* [PATCH v1] kbuild: rpm-pkg: provide kernel{-devel}-uname-r
@ 2026-04-14 21:04 Avi Kivity
2026-04-29 22:58 ` Nathan Chancellor
0 siblings, 1 reply; 2+ messages in thread
From: Avi Kivity @ 2026-04-14 21:04 UTC (permalink / raw)
To: linux-kbuild; +Cc: linux-kernel
From: Avi Kivity <avi@scylladb.com>
Fedora kernels provide, and the akmods external module build tools
expect, kernel-devel-uname-r virtual packages. To improve the life
of those who depend on akmods, do the same with the kernel's RPM
packages.
Assisted-by: OpenCode:claude-opus-4.6
Signed-off-by: Avi Kivity <avi@scylladb.com>
---
scripts/package/kernel.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index b3c956205af00..dcb04c1e7e8ef 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -13,10 +13,11 @@ Vendor: The Linux Community
URL: https://www.kernel.org
Source0: linux.tar.gz
Source1: config
Source2: diff.patch
Provides: kernel-%{KERNELRELEASE}
+Provides: kernel-uname-r = %{KERNELRELEASE}
BuildRequires: bc binutils bison dwarves
BuildRequires: (elfutils-devel or libdw-devel)
BuildRequires: (elfutils-libelf-devel or libelf-devel) flex
BuildRequires: gcc make openssl openssl-devel perl python3 rsync
@@ -38,10 +39,11 @@ glibc package.
%if %{with_devel}
%package devel
Summary: Development package for building kernel modules to match the %{version} kernel
Group: System Environment/Kernel
AutoReqProv: no
+Provides: kernel-devel-uname-r = %{KERNELRELEASE}
%description -n kernel-devel
This package provides kernel headers and makefiles sufficient to build modules
against the %{version} kernel package.
%endif
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1] kbuild: rpm-pkg: provide kernel{-devel}-uname-r
2026-04-14 21:04 [PATCH v1] kbuild: rpm-pkg: provide kernel{-devel}-uname-r Avi Kivity
@ 2026-04-29 22:58 ` Nathan Chancellor
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Chancellor @ 2026-04-29 22:58 UTC (permalink / raw)
To: Avi Kivity; +Cc: linux-kbuild, linux-kernel
On Wed, 15 Apr 2026 00:04:57 +0300, Avi Kivity <avi@lists.scylladb.com> wrote:
> diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
> index b3c956205af0..dcb04c1e7e8e 100644
> --- a/scripts/package/kernel.spec
> +++ b/scripts/package/kernel.spec
> @@ -15,6 +15,7 @@ Source0: linux.tar.gz
> Source1: config
> Source2: diff.patch
> Provides: kernel-%{KERNELRELEASE}
> +Provides: kernel-uname-r = %{KERNELRELEASE}
Sashiko notes that this will cause the build to fail when there are two
or more hyphens in KERNELRELEASE:
https://sashiko.dev/#/message/20260414210457.41675-1-avi@lists.scylladb.com
I can confirm this easily reproduces when CONFIG_LOCALVERSION_AUTO is
enabled:
| $ make -skj"$(nproc)" ARCH=arm64 CROSS_COMPILE=aarch64-linux- mrproper defconfig binrpm-pkg
| Building target platforms: aarch64-linux
| Building for target aarch64-linux
| error: line 24: Invalid version (double separator '-'): 7.0.0-08202-g663bd6ce5b7f: Provides: kernel-uname-r = 7.0.0-08202-g663bd6ce5b7f
| ...
This should probably be %{version}? Please test and verify that change
still works for your use case then send a v2.
--
Cheers,
Nathan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-29 22:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-14 21:04 [PATCH v1] kbuild: rpm-pkg: provide kernel{-devel}-uname-r Avi Kivity
2026-04-29 22:58 ` Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®