On Mon, Nov 11, 2024 at 3:21 AM Daan De Meyer <daan.j.demeyer@xxxxxxxxx> wrote: > > It's a useful property for kernel rpms produced from the kernel source > tree to behave somewhat as drop-in replacements for the kernel rpms > shipped by distributions. For example, when building Linux OS images, > this allows replacing the distribution kernel rpm packages with kernel > rpm packages produced from the kernel source tree without having to modify > the OS image recipes. Instead, by just adding an extra repository containing > the kernel rpms built from the kernel source tree, the OS image build process > will prefer these rpms over the distribution ones if they're of a newer version. > > To make this work, let's add various extra Provides to the kernel > rpm spec so that it provides more of the common kernel rpm package names > used by the CentOS/Fedora distribution kernel rpm packages. I did not check these one by one, but kerne.spec in Fedora specifies '= <version>'. So, I guess this patch will not work equivalently. > --- > scripts/package/kernel.spec | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec > index 42447c5fd7ac..61a151026afc 100644 > --- a/scripts/package/kernel.spec > +++ b/scripts/package/kernel.spec > @@ -17,6 +17,21 @@ Source0: linux.tar.gz > Source1: config > Source2: diff.patch > Provides: kernel-%{KERNELRELEASE} > +Provides: kernel-%{_target_cpu} > +Provides: kernel-uname-r > +Provides: kernel-core > +Provides: kernel-modules > +Provides: kernel-modules-uname-r > +Provides: kernel-modules-%{_target_cpu} > +Provides: kernel-modules-internal > +Provides: kernel-modules-internal-uname-r > +Provides: kernel-modules-internal-%{_target_cpu} > +Provides: kernel-modules-extra > +Provides: kernel-modules-extra-uname-r > +Provides: kernel-modules-extra-%{_target_cpu} > +Provides: kernel-modules-core > +Provides: kernel-modules-core-uname-r > +Provides: kernel-modules-core-%{_target_cpu} > BuildRequires: bc binutils bison dwarves > BuildRequires: (elfutils-libelf-devel or libelf-devel) flex > BuildRequires: gcc make openssl openssl-devel perl python3 rsync > -- > 2.47.0 > > -- Best Regards Masahiro Yamada