diff mbox series

package: Add extra Provides to the kernel rpm package

Message ID 20241110182132.810269-1-daan.j.demeyer@gmail.com (mailing list archive)
State New
Headers show
Series package: Add extra Provides to the kernel rpm package | expand

Commit Message

Daan De Meyer Nov. 10, 2024, 6:20 p.m. UTC
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(+)
diff mbox series

Patch

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