package: Add extra Provides to the kernel rpm package
PATCH 1/1 package: Add extra Provides to the kernel rpm package
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.
--- scripts/package/kernel.spec | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
scripts/package/kernel.spec +15 -0
@@ -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
Signature · 1 line
2.47.0
Quoted 10 lines · Daan De Meyer
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.
Quoted 3 lines
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.
Quoted 34 lines
--- scripts/package/kernel.spec | 15 +++++++++++++++ 1 file changed, 15 insertions(+)scripts/package/kernel.spec +15
-1@@ -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
Signature · 2 lines
Best Regards Masahiro Yamada