public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0
@ 2026-02-10  7:04 Nathan Chancellor
  2026-02-10  7:04 ` [PATCH 1/2] kbuild: rpm-pkg: Restrict manual debug package creation Nathan Chancellor
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Nathan Chancellor @ 2026-02-10  7:04 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier
  Cc: linux-kbuild, linux-kernel, stable, Steve French

Steve reported a build issue with commit 62089b804895 ("kbuild: rpm-pkg:
Generate debuginfo package manually") on RHEL9, which has an older
version of RPM than what I tested. Turns out that RPM 4.20.0 fixed an
issue with specifying %files for a -debuginfo subpackage.

The first patch restricts the new -debuginfo package generation process
to CONFIG_MODULE_SIG=y and RPM >= 4.20.0 to ensure it is actually
necessary and working. The second patch restores the original -debuginfo
package generation process from commit a7c699d090a1 ("kbuild: rpm-pkg:
build a debuginfo RPM") when CONFIG_MODULE_SIG is disabled to keep the
-debuginfo package around for older versions of RPM.

---
Nathan Chancellor (2):
      kbuild: rpm-pkg: Restrict manual debug package creation
      kernel: rpm-pkg: Restore find-debuginfo.sh approach to -debuginfo package

 scripts/package/kernel.spec | 57 +++++++++++++++++++++++++++++++++++++++------
 scripts/package/mkspec      | 38 +++++++++++++++++++++++++++---
 2 files changed, 85 insertions(+), 10 deletions(-)
---
base-commit: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
change-id: 20260209-kbuild-fix-debuginfo-rpm-718f81dbcaa6

Best regards,
--  
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/2] kbuild: rpm-pkg: Restrict manual debug package creation
  2026-02-10  7:04 [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0 Nathan Chancellor
@ 2026-02-10  7:04 ` Nathan Chancellor
  2026-02-10  7:04 ` [PATCH 2/2] kernel: rpm-pkg: Restore find-debuginfo.sh approach to -debuginfo package Nathan Chancellor
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Nathan Chancellor @ 2026-02-10  7:04 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier
  Cc: linux-kbuild, linux-kernel, stable, Steve French

Commit 62089b804895 ("kbuild: rpm-pkg: Generate debuginfo package
manually") moved away from the built-in RPM machinery for generating
-debuginfo packages to a more manual way to be compatible with module
signing, as the built-in machinery strips the modules after the
installation process, breaking the signatures.

Unfortunately, prior to rpm 4.20.0, there is a bug where a custom %files
directive is ignored for a -debuginfo subpackage [1], meaning builds
using older versions of RPM (such as on RHEL9 or RHEL10) fail with:

  Checking for unpackaged file(s): /usr/lib/rpm/check-files .../rpmbuild/BUILDROOT/kernel-6.19.0_dirty-1.x86_64
  error: Installed (but unpackaged) file(s) found:
     /debuginfo.list
     /usr/lib/debug/.build-id/09/748c214974bfba1522d434a7e0a02e2fd7f29b.debug
     /usr/lib/debug/.build-id/0b/b96dd9c7d3689d82e56d2e73b46f53103cc6c7.debug
     /usr/lib/debug/.build-id/0e/979a2f34967c7437fd30aabb41de1f0c8b6a66.debug
    ...

To workaround this, restrict the manual debug info package creation
process to when it is necessary (CONFIG_MODULE_SIG=y) and possible (when
using RPM >= 4.20.0). A follow up change will restore the RPM debuginfo
creation process using a separate internal flag to allow the package to
be built in more situations, as RPM 4.20.0 is a fairly recent version
and the built-in -debuginfo generation works fine when module signing is
disabled.

Cc: stable@vger.kernel.org
Fixes: 62089b804895 ("kbuild: rpm-pkg: Generate debuginfo package manually")
Link: https://github.com/rpm-software-management/rpm/commit/49f906998f3cf1f4152162ca61ac0869251c380f [1]
Reported-by: Steve French <smfrench@gmail.com>
Closes: https://lore.kernel.org/CAH2r5mugbrHTwnaQwQiYEUVwbtqmvFYf0WZiLrrJWpgT8iwftw@mail.gmail.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 scripts/package/kernel.spec |  9 +++++----
 scripts/package/mkspec      | 33 ++++++++++++++++++++++++++++++---
 2 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index 0f1c8de1bd95..b7deb159f404 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -47,12 +47,13 @@ This package provides kernel headers and makefiles sufficient to build modules
 against the %{version} kernel package.
 %endif
 
-%if %{with_debuginfo}
+%if %{with_debuginfo_manual}
 %package debuginfo
 Summary: Debug information package for the Linux kernel
 %description debuginfo
 This package provides debug information for the kernel image and modules from the
 %{version} package.
+%define install_mod_strip 1
 %endif
 
 %prep
@@ -67,7 +68,7 @@ patch -p1 < %{SOURCE2}
 mkdir -p %{buildroot}/lib/modules/%{KERNELRELEASE}
 cp $(%{make} %{makeflags} -s image_name) %{buildroot}/lib/modules/%{KERNELRELEASE}/vmlinuz
 # DEPMOD=true makes depmod no-op. We do not package depmod-generated files.
-%{make} %{makeflags} INSTALL_MOD_PATH=%{buildroot} INSTALL_MOD_STRIP=1 DEPMOD=true modules_install
+%{make} %{makeflags} INSTALL_MOD_PATH=%{buildroot} %{?install_mod_strip:INSTALL_MOD_STRIP=1} DEPMOD=true modules_install
 %{make} %{makeflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
 cp System.map %{buildroot}/lib/modules/%{KERNELRELEASE}
 cp .config %{buildroot}/lib/modules/%{KERNELRELEASE}/config
@@ -98,7 +99,7 @@ ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEA
 	echo "%exclude /lib/modules/%{KERNELRELEASE}/build"
 } > %{buildroot}/kernel.list
 
-%if %{with_debuginfo}
+%if %{with_debuginfo_manual}
 # copying vmlinux directly to the debug directory means it will not get
 # stripped (but its source paths will still be collected + fixed up)
 mkdir -p %{buildroot}/usr/lib/debug/lib/modules/%{KERNELRELEASE}
@@ -162,7 +163,7 @@ fi
 /lib/modules/%{KERNELRELEASE}/build
 %endif
 
-%if %{with_debuginfo}
+%if %{with_debuginfo_manual}
 %files -f %{buildroot}/debuginfo.list debuginfo
 %defattr (-, root, root)
 %exclude /debuginfo.list
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index c7375bfc25a9..1080395ca0e1 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -23,15 +23,42 @@ else
 echo '%define with_devel 0'
 fi
 
+# manually generate -debuginfo package
+with_debuginfo_manual=0
 # debuginfo package generation uses find-debuginfo.sh under the hood,
 # which only works on uncompressed modules that contain debuginfo
 if grep -q CONFIG_DEBUG_INFO=y include/config/auto.conf &&
    (! grep -q CONFIG_MODULE_COMPRESS=y include/config/auto.conf) &&
    (! grep -q CONFIG_DEBUG_INFO_SPLIT=y include/config/auto.conf); then
-echo '%define with_debuginfo %{?_without_debuginfo: 0} %{?!_without_debuginfo: 1}'
-else
-echo '%define with_debuginfo 0'
+	# If module signing is enabled (which may be required to boot with
+	# lockdown enabled), the find-debuginfo.sh machinery cannot be used
+	# because the signatures will be stripped off the modules. However, due
+	# to an rpm bug in versions prior to 4.20.0
+	#
+	#     https://github.com/rpm-software-management/rpm/issues/3057
+	#     https://github.com/rpm-software-management/rpm/commit/49f906998f3cf1f4152162ca61ac0869251c380f
+	#
+	# We cannot provide our own debuginfo package because it does not listen
+	# to our custom files list, failing the build due to unpackaged files.
+	# Manually generate the debug info package if using rpm 4.20.0. If not
+	# using rpm 4.20.0, avoid generating a -debuginfo package altogether,
+	# as it is not safe.
+	if grep -q CONFIG_MODULE_SIG=y include/config/auto.conf; then
+		rpm_ver_str=$(rpm --version 2>/dev/null)
+		# Split the version on spaces
+		IFS=' '
+		set -- $rpm_ver_str
+		if [ "${1:-}" = RPM -a "${2:-}" = version ]; then
+			IFS=.
+			set -- $3
+			rpm_ver=$(( 1000000 * $1 + 10000 * $2 + 100 * $3 + ${4:-0} ))
+			if [ "$rpm_ver" -ge 4200000 ]; then
+				with_debuginfo_manual='%{?_without_debuginfo:0}%{?!_without_debuginfo:1}'
+			fi
+		fi
+	fi
 fi
+echo "%define with_debuginfo_manual $with_debuginfo_manual"
 
 cat<<EOF
 %define ARCH ${ARCH}

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/2] kernel: rpm-pkg: Restore find-debuginfo.sh approach to -debuginfo package
  2026-02-10  7:04 [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0 Nathan Chancellor
  2026-02-10  7:04 ` [PATCH 1/2] kbuild: rpm-pkg: Restrict manual debug package creation Nathan Chancellor
@ 2026-02-10  7:04 ` Nathan Chancellor
  2026-02-11 20:33 ` [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0 Nicolas Schier
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Nathan Chancellor @ 2026-02-10  7:04 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier; +Cc: linux-kbuild, linux-kernel, stable

Commit 62089b804895 ("kbuild: rpm-pkg: Generate debuginfo package
manually") effectively reverted commit a7c699d090a1 ("kbuild: rpm-pkg:
build a debuginfo RPM") but the approach it took is not safe for older
RPM releases. Restore commit a7c699d090a1 ("kbuild: rpm-pkg: build a
debuginfo RPM") for the !CONFIG_MODULE_SIG case to allow more
environments and configurations to take advantage of the separate debug
information package process.

Cc: stable@vger.kernel.org
Fixes: 62089b804895 ("kbuild: rpm-pkg: Generate debuginfo package manually")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 scripts/package/kernel.spec | 50 +++++++++++++++++++++++++++++++++++++++++----
 scripts/package/mkspec      |  5 +++++
 2 files changed, 51 insertions(+), 4 deletions(-)

diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index b7deb159f404..af682a705477 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -2,8 +2,6 @@
 %{!?_arch: %define _arch dummy}
 %{!?make: %define make make}
 %define makeflags %{?_smp_mflags} ARCH=%{ARCH}
-%define __spec_install_post /usr/lib/rpm/brp-compress || :
-%define debug_package %{nil}
 
 Name: kernel
 Summary: The Linux Kernel
@@ -56,6 +54,38 @@ This package provides debug information for the kernel image and modules from th
 %define install_mod_strip 1
 %endif
 
+%if %{with_debuginfo_rpm}
+# list of debuginfo-related options taken from distribution kernel.spec
+# files
+%undefine _include_minidebuginfo
+%undefine _find_debuginfo_dwz_opts
+%undefine _unique_build_ids
+%undefine _unique_debug_names
+%undefine _unique_debug_srcs
+%undefine _debugsource_packages
+%undefine _debuginfo_subpackages
+%global _find_debuginfo_opts -r
+%global _missing_build_ids_terminate_build 1
+%global _no_recompute_build_ids 1
+%{debug_package}
+
+# later, we make all modules executable so that find-debuginfo.sh strips
+# them up. but they don't actually need to be executable, so remove the
+# executable bit, taking care to do it _after_ find-debuginfo.sh has run
+%define __spec_install_post \
+	%{?__debug_package:%{__debug_install_post}} \
+	%{__arch_install_post} \
+	%{__os_install_post} \
+	find %{buildroot}/lib/modules/%{KERNELRELEASE} -name "*.ko" -type f \\\
+		| xargs --no-run-if-empty chmod u-x
+%else
+%define __spec_install_post /usr/lib/rpm/brp-compress || :
+%endif
+# some (but not all) versions of rpmbuild emit %%debug_package with
+# %%install. since we've already emitted it manually, that would cause
+# a package redefinition error. ensure that doesn't happen
+%define debug_package %{nil}
+
 %prep
 %setup -q -n linux
 cp %{SOURCE1} .config
@@ -99,14 +129,22 @@ ln -fns /usr/src/kernels/%{KERNELRELEASE} %{buildroot}/lib/modules/%{KERNELRELEA
 	echo "%exclude /lib/modules/%{KERNELRELEASE}/build"
 } > %{buildroot}/kernel.list
 
-%if %{with_debuginfo_manual}
+%if 0%{with_debuginfo_manual}%{with_debuginfo_rpm} > 0
 # copying vmlinux directly to the debug directory means it will not get
 # stripped (but its source paths will still be collected + fixed up)
 mkdir -p %{buildroot}/usr/lib/debug/lib/modules/%{KERNELRELEASE}
 cp vmlinux %{buildroot}/usr/lib/debug/lib/modules/%{KERNELRELEASE}
+%endif
 
-echo /usr/lib/debug/lib/modules/%{KERNELRELEASE}/vmlinux > %{buildroot}/debuginfo.list
+%if %{with_debuginfo_rpm}
+# make modules executable so that find-debuginfo.sh strips them. this
+# will be undone later in %%__spec_install_post
+find %{buildroot}/lib/modules/%{KERNELRELEASE} -name "*.ko" -type f \
+	| xargs --no-run-if-empty chmod u+x
+%endif
 
+%if %{with_debuginfo_manual}
+echo /usr/lib/debug/lib/modules/%{KERNELRELEASE}/vmlinux > %{buildroot}/debuginfo.list
 while read -r mod; do
 	mod="${mod%.o}.ko"
 	dbg="%{buildroot}/usr/lib/debug/lib/modules/%{KERNELRELEASE}/kernel/${mod}"
@@ -124,6 +162,10 @@ done < modules.order
 
 %clean
 rm -rf %{buildroot}
+%if %{with_debuginfo_rpm}
+rm -f debugfiles.list debuglinks.list debugsourcefiles.list debugsources.list \
+	elfbins.list
+%endif
 
 %post
 if [ -x /usr/bin/kernel-install ]; then
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 1080395ca0e1..c604f8c174e2 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -23,6 +23,8 @@ else
 echo '%define with_devel 0'
 fi
 
+# use %{debug_package} machinery to generate -debuginfo
+with_debuginfo_rpm=0
 # manually generate -debuginfo package
 with_debuginfo_manual=0
 # debuginfo package generation uses find-debuginfo.sh under the hood,
@@ -56,9 +58,12 @@ if grep -q CONFIG_DEBUG_INFO=y include/config/auto.conf &&
 				with_debuginfo_manual='%{?_without_debuginfo:0}%{?!_without_debuginfo:1}'
 			fi
 		fi
+	else
+		with_debuginfo_rpm='%{?_without_debuginfo:0}%{?!_without_debuginfo:1}'
 	fi
 fi
 echo "%define with_debuginfo_manual $with_debuginfo_manual"
+echo "%define with_debuginfo_rpm $with_debuginfo_rpm"
 
 cat<<EOF
 %define ARCH ${ARCH}

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0
  2026-02-10  7:04 [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0 Nathan Chancellor
  2026-02-10  7:04 ` [PATCH 1/2] kbuild: rpm-pkg: Restrict manual debug package creation Nathan Chancellor
  2026-02-10  7:04 ` [PATCH 2/2] kernel: rpm-pkg: Restore find-debuginfo.sh approach to -debuginfo package Nathan Chancellor
@ 2026-02-11 20:33 ` Nicolas Schier
  2026-02-13 14:11 ` Stefano Garzarella
  2026-02-18 20:49 ` Nathan Chancellor
  4 siblings, 0 replies; 13+ messages in thread
From: Nicolas Schier @ 2026-02-11 20:33 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: linux-kbuild, linux-kernel, stable, Steve French

On Tue, Feb 10, 2026 at 12:04:47AM -0700, Nathan Chancellor wrote:
> Steve reported a build issue with commit 62089b804895 ("kbuild: rpm-pkg:
> Generate debuginfo package manually") on RHEL9, which has an older
> version of RPM than what I tested. Turns out that RPM 4.20.0 fixed an
> issue with specifying %files for a -debuginfo subpackage.
> 
> The first patch restricts the new -debuginfo package generation process
> to CONFIG_MODULE_SIG=y and RPM >= 4.20.0 to ensure it is actually
> necessary and working. The second patch restores the original -debuginfo
> package generation process from commit a7c699d090a1 ("kbuild: rpm-pkg:
> build a debuginfo RPM") when CONFIG_MODULE_SIG is disabled to keep the
> -debuginfo package around for older versions of RPM.
> 
> ---
> Nathan Chancellor (2):
>       kbuild: rpm-pkg: Restrict manual debug package creation
>       kernel: rpm-pkg: Restore find-debuginfo.sh approach to -debuginfo package
> 
>  scripts/package/kernel.spec | 57 +++++++++++++++++++++++++++++++++++++++------
>  scripts/package/mkspec      | 38 +++++++++++++++++++++++++++---
>  2 files changed, 85 insertions(+), 10 deletions(-)
> ---
> base-commit: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
> change-id: 20260209-kbuild-fix-debuginfo-rpm-718f81dbcaa6
> 
> Best regards,
> --  
> Nathan Chancellor <nathan@kernel.org>
> 

Thanks!

I cannot test this properly right now, but the changes look good to me.

Acked-by: Nicolas Schier <nsc@kernel.org>

-- 
Nicolas

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0
  2026-02-10  7:04 [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0 Nathan Chancellor
                   ` (2 preceding siblings ...)
  2026-02-11 20:33 ` [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0 Nicolas Schier
@ 2026-02-13 14:11 ` Stefano Garzarella
  2026-02-13 17:34   ` Steve French
  2026-02-13 19:11   ` Nathan Chancellor
  2026-02-18 20:49 ` Nathan Chancellor
  4 siblings, 2 replies; 13+ messages in thread
From: Stefano Garzarella @ 2026-02-13 14:11 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Nicolas Schier, linux-kbuild, linux-kernel, stable, Steve French

On Tue, Feb 10, 2026 at 12:04:47AM -0700, Nathan Chancellor wrote:
>Steve reported a build issue with commit 62089b804895 ("kbuild: rpm-pkg:
>Generate debuginfo package manually") on RHEL9, which has an older
>version of RPM than what I tested. Turns out that RPM 4.20.0 fixed an
>issue with specifying %files for a -debuginfo subpackage.
>
>The first patch restricts the new -debuginfo package generation process
>to CONFIG_MODULE_SIG=y and RPM >= 4.20.0 to ensure it is actually
>necessary and working. The second patch restores the original -debuginfo
>package generation process from commit a7c699d090a1 ("kbuild: rpm-pkg:
>build a debuginfo RPM") when CONFIG_MODULE_SIG is disabled to keep the
>-debuginfo package around for older versions of RPM.

Yeah, I had similar issue on Fedora 42 (RPM version 4.20.1) and this 
series fixed my issue.

>
>---
>Nathan Chancellor (2):
>      kbuild: rpm-pkg: Restrict manual debug package creation
>      kernel: rpm-pkg: Restore find-debuginfo.sh approach to -debuginfo package
>
> scripts/package/kernel.spec | 57 +++++++++++++++++++++++++++++++++++++++------
> scripts/package/mkspec      | 38 +++++++++++++++++++++++++++---
> 2 files changed, 85 insertions(+), 10 deletions(-)
>---
>base-commit: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
>change-id: 20260209-kbuild-fix-debuginfo-rpm-718f81dbcaa6

Tested-by: Stefano Garzarella <sgarzare@redhat.com>

Thanks,
Stefano


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0
  2026-02-13 14:11 ` Stefano Garzarella
@ 2026-02-13 17:34   ` Steve French
  2026-02-13 19:11   ` Nathan Chancellor
  1 sibling, 0 replies; 13+ messages in thread
From: Steve French @ 2026-02-13 17:34 UTC (permalink / raw)
  To: Stefano Garzarella
  Cc: Nathan Chancellor, Nicolas Schier, linux-kbuild, linux-kernel,
	stable

Can also add Tested-by: Steve French <stfrench@microsoft.com>

On Fri, Feb 13, 2026 at 8:11 AM Stefano Garzarella <sgarzare@redhat.com> wrote:
>
> On Tue, Feb 10, 2026 at 12:04:47AM -0700, Nathan Chancellor wrote:
> >Steve reported a build issue with commit 62089b804895 ("kbuild: rpm-pkg:
> >Generate debuginfo package manually") on RHEL9, which has an older
> >version of RPM than what I tested. Turns out that RPM 4.20.0 fixed an
> >issue with specifying %files for a -debuginfo subpackage.
> >
> >The first patch restricts the new -debuginfo package generation process
> >to CONFIG_MODULE_SIG=y and RPM >= 4.20.0 to ensure it is actually
> >necessary and working. The second patch restores the original -debuginfo
> >package generation process from commit a7c699d090a1 ("kbuild: rpm-pkg:
> >build a debuginfo RPM") when CONFIG_MODULE_SIG is disabled to keep the
> >-debuginfo package around for older versions of RPM.
>
> Yeah, I had similar issue on Fedora 42 (RPM version 4.20.1) and this
> series fixed my issue.
>
> >
> >---
> >Nathan Chancellor (2):
> >      kbuild: rpm-pkg: Restrict manual debug package creation
> >      kernel: rpm-pkg: Restore find-debuginfo.sh approach to -debuginfo package
> >
> > scripts/package/kernel.spec | 57 +++++++++++++++++++++++++++++++++++++++------
> > scripts/package/mkspec      | 38 +++++++++++++++++++++++++++---
> > 2 files changed, 85 insertions(+), 10 deletions(-)
> >---
> >base-commit: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
> >change-id: 20260209-kbuild-fix-debuginfo-rpm-718f81dbcaa6
>
> Tested-by: Stefano Garzarella <sgarzare@redhat.com>
>
> Thanks,
> Stefano
>


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0
  2026-02-13 14:11 ` Stefano Garzarella
  2026-02-13 17:34   ` Steve French
@ 2026-02-13 19:11   ` Nathan Chancellor
  2026-02-13 19:41     ` Stefano Garzarella
  1 sibling, 1 reply; 13+ messages in thread
From: Nathan Chancellor @ 2026-02-13 19:11 UTC (permalink / raw)
  To: Stefano Garzarella
  Cc: Nicolas Schier, linux-kbuild, linux-kernel, stable, Steve French

Hi Stefano,

On Fri, Feb 13, 2026 at 03:11:38PM +0100, Stefano Garzarella wrote:
> On Tue, Feb 10, 2026 at 12:04:47AM -0700, Nathan Chancellor wrote:
> > Steve reported a build issue with commit 62089b804895 ("kbuild: rpm-pkg:
> > Generate debuginfo package manually") on RHEL9, which has an older
> > version of RPM than what I tested. Turns out that RPM 4.20.0 fixed an
> > issue with specifying %files for a -debuginfo subpackage.
> > 
> > The first patch restricts the new -debuginfo package generation process
> > to CONFIG_MODULE_SIG=y and RPM >= 4.20.0 to ensure it is actually
> > necessary and working. The second patch restores the original -debuginfo
> > package generation process from commit a7c699d090a1 ("kbuild: rpm-pkg:
> > build a debuginfo RPM") when CONFIG_MODULE_SIG is disabled to keep the
> > -debuginfo package around for older versions of RPM.
> 
> Yeah, I had similar issue on Fedora 42 (RPM version 4.20.1) and this series
> fixed my issue.

Thanks for testing! I find that a little odd though since I tested
62089b804895 in Fedora 42 during my investigation of the problem and it
worked fine without these changes. Nevertheless, I will add your tags to
this series when I apply it.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0
  2026-02-13 19:11   ` Nathan Chancellor
@ 2026-02-13 19:41     ` Stefano Garzarella
  2026-02-15 21:29       ` Nathan Chancellor
  0 siblings, 1 reply; 13+ messages in thread
From: Stefano Garzarella @ 2026-02-13 19:41 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Nicolas Schier, linux-kbuild, linux-kernel, stable, Steve French

On Fri, 13 Feb 2026 at 20:11, Nathan Chancellor <nathan@kernel.org> wrote:
>
> Hi Stefano,
>
> On Fri, Feb 13, 2026 at 03:11:38PM +0100, Stefano Garzarella wrote:
> > On Tue, Feb 10, 2026 at 12:04:47AM -0700, Nathan Chancellor wrote:
> > > Steve reported a build issue with commit 62089b804895 ("kbuild: rpm-pkg:
> > > Generate debuginfo package manually") on RHEL9, which has an older
> > > version of RPM than what I tested. Turns out that RPM 4.20.0 fixed an
> > > issue with specifying %files for a -debuginfo subpackage.
> > >
> > > The first patch restricts the new -debuginfo package generation process
> > > to CONFIG_MODULE_SIG=y and RPM >= 4.20.0 to ensure it is actually
> > > necessary and working. The second patch restores the original -debuginfo
> > > package generation process from commit a7c699d090a1 ("kbuild: rpm-pkg:
> > > build a debuginfo RPM") when CONFIG_MODULE_SIG is disabled to keep the
> > > -debuginfo package around for older versions of RPM.
> >
> > Yeah, I had similar issue on Fedora 42 (RPM version 4.20.1) and this series
> > fixed my issue.
>
> Thanks for testing! I find that a little odd though since I tested
> 62089b804895 in Fedora 42 during my investigation of the problem and it
> worked fine without these changes. Nevertheless, I will add your tags to
> this series when I apply it.

mmm, that it's odd indeed.
Without this series applied, I had issues on Fedora 42 (RPM version 
4.20.1), but it worked on Fedora 43 (RPM version 6.0.1).

I just retried on Fedora 42 to build commit cee73b1e840c ("Merge tag 
'riscv-for-linus-7.0-mw1' of 
git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux") and I have 
the following errors:

RPM build errors:
    Dependency tokens must begin with alpha-numeric, '_' or '/': #�) = 0x0d000002
    Dependency tokens must begin with alpha-numeric, '_' or '/': �) = 0x0d000000
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x7c0e000000
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x47161b0700
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x339b1a000ac0
    Dependency tokens must begin with alpha-numeric, '_' or '/': �) = 0x36000000
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x7508200000000000
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x2e76000000000400
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x803ab2b00000000
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x1a00000000005e00
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x125590000000060
    Dependency tokens must begin with alpha-numeric, '_' or '/': = 0x03080000
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x818000000003600
    Dependency tokens must begin with alpha-numeric, '_' or '/': �) = 0x0d000000
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x7c0e000000
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
    Dependency tokens must begin with alpha-numeric, '_' or '/': $) = 0x1c01040000004d00
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x63c300000000000
    Illegal char '?' (0xffffffd8) in: 3�
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x1320f691700
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x2e17101500
    Version required: ksym(g) =
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
    Dependency tokens must begin with alpha-numeric, '_' or '/': p) = 0x3875480000005c
    Dependency tokens must begin with alpha-numeric, '_' or '/': ]) = 0xfc22000000003000
    Dependency tokens must begin with alpha-numeric, '_' or '/': 2) = 0x5d0d03cc22
    Dependency tokens must begin with alpha-numeric, '_' or '/': ]) = 0x32042c1c
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x1c11a3d1b00
    Version required: ksym(�) =
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3220312e322e3400
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x322e353120295400
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x2029554e47282000
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
    Illegal char ')' (0x29) in: (GNU)
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
    Dependency tokens must begin with alpha-numeric, '_' or '/': #) = 0x031c0000
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x570d03ea11
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x4000000520d03c0
    Dependency tokens must begin with alpha-numeric, '_' or '/': C) = 0x690d03cf33
    Dependency tokens must begin with alpha-numeric, '_' or '/': �l) = 0x102000001471140
    Dependency tokens must begin with alpha-numeric, '_' or '/': i) = 0x4a00000000011000
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x2e00000000240000
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x42111503a533
    Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0xea1303bb33000000
    Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000

But if I apply this series on top, everything is fine.

Thanks,
Stefano


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0
  2026-02-13 19:41     ` Stefano Garzarella
@ 2026-02-15 21:29       ` Nathan Chancellor
  2026-02-16  8:25         ` Stefano Garzarella
  0 siblings, 1 reply; 13+ messages in thread
From: Nathan Chancellor @ 2026-02-15 21:29 UTC (permalink / raw)
  To: Stefano Garzarella
  Cc: Nicolas Schier, linux-kbuild, linux-kernel, stable, Steve French

On Fri, Feb 13, 2026 at 08:41:24PM +0100, Stefano Garzarella wrote:
> mmm, that it's odd indeed.
> Without this series applied, I had issues on Fedora 42 (RPM version 
> 4.20.1), but it worked on Fedora 43 (RPM version 6.0.1).
> 
> I just retried on Fedora 42 to build commit cee73b1e840c ("Merge tag 
> 'riscv-for-linus-7.0-mw1' of 
> git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux") and I have 
> the following errors:
> 
> RPM build errors:
>     Dependency tokens must begin with alpha-numeric, '_' or '/': #�) = 0x0d000002
>     Dependency tokens must begin with alpha-numeric, '_' or '/': �) = 0x0d000000
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x7c0e000000
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x47161b0700
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x339b1a000ac0
>     Dependency tokens must begin with alpha-numeric, '_' or '/': �) = 0x36000000
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x7508200000000000
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x2e76000000000400
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x803ab2b00000000
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x1a00000000005e00
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x125590000000060
>     Dependency tokens must begin with alpha-numeric, '_' or '/': = 0x03080000
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x818000000003600
>     Dependency tokens must begin with alpha-numeric, '_' or '/': �) = 0x0d000000
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x7c0e000000
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>     Dependency tokens must begin with alpha-numeric, '_' or '/': $) = 0x1c01040000004d00
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x63c300000000000
>     Illegal char '?' (0xffffffd8) in: 3�
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x1320f691700
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x2e17101500
>     Version required: ksym(g) =
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>     Dependency tokens must begin with alpha-numeric, '_' or '/': p) = 0x3875480000005c
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ]) = 0xfc22000000003000
>     Dependency tokens must begin with alpha-numeric, '_' or '/': 2) = 0x5d0d03cc22
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ]) = 0x32042c1c
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x1c11a3d1b00
>     Version required: ksym(�) =
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3220312e322e3400
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x322e353120295400
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x2029554e47282000
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>     Illegal char ')' (0x29) in: (GNU)
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>     Dependency tokens must begin with alpha-numeric, '_' or '/': #) = 0x031c0000
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x570d03ea11
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x4000000520d03c0
>     Dependency tokens must begin with alpha-numeric, '_' or '/': C) = 0x690d03cf33
>     Dependency tokens must begin with alpha-numeric, '_' or '/': �l) = 0x102000001471140
>     Dependency tokens must begin with alpha-numeric, '_' or '/': i) = 0x4a00000000011000
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x2e00000000240000
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x42111503a533
>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0xea1303bb33000000
>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
> 
> But if I apply this series on top, everything is fine.

Okay interesting! I have not seen that error yet... I wonder if adding
'AutoReqProv: no' to the kernel-debuginfo subpackage (like the
kernel-devel subpackage) would avoid that for rpm 4.20.0... Probably not
that big of a deal if it is resolved with rpm 6.0.1 but it would be good
to avoid as many corner cases as possible.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0
  2026-02-15 21:29       ` Nathan Chancellor
@ 2026-02-16  8:25         ` Stefano Garzarella
  2026-02-16 11:42           ` Nathan Chancellor
  0 siblings, 1 reply; 13+ messages in thread
From: Stefano Garzarella @ 2026-02-16  8:25 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Nicolas Schier, linux-kbuild, linux-kernel, stable, Steve French

On Sun, Feb 15, 2026 at 04:29:01PM -0500, Nathan Chancellor wrote:
>On Fri, Feb 13, 2026 at 08:41:24PM +0100, Stefano Garzarella wrote:
>> mmm, that it's odd indeed.
>> Without this series applied, I had issues on Fedora 42 (RPM version
>> 4.20.1), but it worked on Fedora 43 (RPM version 6.0.1).
>>
>> I just retried on Fedora 42 to build commit cee73b1e840c ("Merge tag
>> 'riscv-for-linus-7.0-mw1' of
>> git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux") and I have
>> the following errors:
>>
>> RPM build errors:
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': #�) = 0x0d000002
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': �) = 0x0d000000
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x7c0e000000
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x47161b0700
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x339b1a000ac0
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': �) = 0x36000000
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x7508200000000000
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x2e76000000000400
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x803ab2b00000000
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x1a00000000005e00
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x125590000000060
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': = 0x03080000
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x818000000003600
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': �) = 0x0d000000
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x7c0e000000
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': $) = 0x1c01040000004d00
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x63c300000000000
>>     Illegal char '?' (0xffffffd8) in: 3�
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x1320f691700
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x2e17101500
>>     Version required: ksym(g) =
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': p) = 0x3875480000005c
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ]) = 0xfc22000000003000
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': 2) = 0x5d0d03cc22
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ]) = 0x32042c1c
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x1c11a3d1b00
>>     Version required: ksym(�) =
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3220312e322e3400
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x322e353120295400
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x2029554e47282000
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>>     Illegal char ')' (0x29) in: (GNU)
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': #) = 0x031c0000
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x570d03ea11
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x4728203a43434800
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 
>>     0x4000000520d03c0
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': C) = 0x690d03cf33
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': �l) = 0x102000001471140
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': i) = 0x4a00000000011000
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x2e00000000240000
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0x42111503a533
>>     Dependency tokens must begin with alpha-numeric, '_' or '/': ) = 0xea1303bb33000000
>>     Unknown rich dependency op 'Hat': (Red Hat 15.2.1-7)) = 0x3130363230322000
>>
>> But if I apply this series on top, everything is fine.
>
>Okay interesting! I have not seen that error yet... I wonder if adding
>'AutoReqProv: no' to the kernel-debuginfo subpackage (like the
>kernel-devel subpackage) would avoid that for rpm 4.20.0... Probably not
>that big of a deal if it is resolved with rpm 6.0.1 but it would be good
>to avoid as many corner cases as possible.

Oh, yeah, I just tried the following change on top of commit 
cee73b1e840c ("Merge tag 'riscv-for-linus-7.0-mw1' of 
git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux"), so without 
this series applied:

diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index 0f1c8de1bd95..86ca327ebccf 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -50,6 +50,7 @@ against the %{version} kernel package.
  %if %{with_debuginfo}
  %package debuginfo
  Summary: Debug information package for the Linux kernel
+AutoReqProv: no
  %description debuginfo
  This package provides debug information for the kernel image and modules from the
  %{version} package.

And I'm able to generate RPMs too without errors!

Thanks,
Stefano


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0
  2026-02-16  8:25         ` Stefano Garzarella
@ 2026-02-16 11:42           ` Nathan Chancellor
  2026-02-16 14:03             ` Stefano Garzarella
  0 siblings, 1 reply; 13+ messages in thread
From: Nathan Chancellor @ 2026-02-16 11:42 UTC (permalink / raw)
  To: Stefano Garzarella
  Cc: Nicolas Schier, linux-kbuild, linux-kernel, stable, Steve French

On Mon, Feb 16, 2026 at 09:25:25AM +0100, Stefano Garzarella wrote:
> Oh, yeah, I just tried the following change on top of commit cee73b1e840c
> ("Merge tag 'riscv-for-linus-7.0-mw1' of
> git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux"), so without this
> series applied:
> 
> diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
> index 0f1c8de1bd95..86ca327ebccf 100644
> --- a/scripts/package/kernel.spec
> +++ b/scripts/package/kernel.spec
> @@ -50,6 +50,7 @@ against the %{version} kernel package.
>  %if %{with_debuginfo}
>  %package debuginfo
>  Summary: Debug information package for the Linux kernel
> +AutoReqProv: no
>  %description debuginfo
>  This package provides debug information for the kernel image and modules from the
>  %{version} package.
> 
> And I'm able to generate RPMs too without errors!

Great, thanks for confirming! Does it still work with:

  AutoReq: 0
  AutoProv: 1

as I notice that is what the %_debuginfo_template in /usr/lib/rpm/macros
uses by default. I suspect that the automatic requires is where things
explodes and I think we do want the automatic provides because I believe
that is how the "this package provides this debug build ID" generation
happens.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0
  2026-02-16 11:42           ` Nathan Chancellor
@ 2026-02-16 14:03             ` Stefano Garzarella
  0 siblings, 0 replies; 13+ messages in thread
From: Stefano Garzarella @ 2026-02-16 14:03 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Nicolas Schier, linux-kbuild, linux-kernel, stable, Steve French

On Mon, Feb 16, 2026 at 06:42:27AM -0500, Nathan Chancellor wrote:
>On Mon, Feb 16, 2026 at 09:25:25AM +0100, Stefano Garzarella wrote:
>> Oh, yeah, I just tried the following change on top of commit cee73b1e840c
>> ("Merge tag 'riscv-for-linus-7.0-mw1' of
>> git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux"), so without this
>> series applied:
>>
>> diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
>> index 0f1c8de1bd95..86ca327ebccf 100644
>> --- a/scripts/package/kernel.spec
>> +++ b/scripts/package/kernel.spec
>> @@ -50,6 +50,7 @@ against the %{version} kernel package.
>>  %if %{with_debuginfo}
>>  %package debuginfo
>>  Summary: Debug information package for the Linux kernel
>> +AutoReqProv: no
>>  %description debuginfo
>>  This package provides debug information for the kernel image and modules from the
>>  %{version} package.
>>
>> And I'm able to generate RPMs too without errors!
>
>Great, thanks for confirming! Does it still work with:
>
>  AutoReq: 0
>  AutoProv: 1

Yep, I tried this (compared to the previous email, just to be sure I get 
you):

diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index 86ca327ebccf..f5d0fa34c51b 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -50,7 +50,8 @@ against the %{version} kernel package.
  %if %{with_debuginfo}
  %package debuginfo
  Summary: Debug information package for the Linux kernel
-AutoReqProv: no
+AutoReq: 0
+AutoProv: 1
  %description debuginfo
  This package provides debug information for the kernel image and modules from the
  %{version} package.

And I'm able to generate RPMs without errors.


>
>as I notice that is what the %_debuginfo_template in /usr/lib/rpm/macros
>uses by default. I suspect that the automatic requires is where things
>explodes and I think we do want the automatic provides because I believe
>that is how the "this package provides this debug build ID" generation
>happens.

Oh I see, I also have:

     #	Template for debug information sub-package.
     %_debuginfo_template \
     %package debuginfo\
     Summary: Debug information for package %{name}\
     Group: Development/Debug\
     AutoReq: 0\
     AutoProv: 1\
     %description debuginfo\
     This package provides debug information for package %{name}.\
     Debug information is useful when developing applications that use this\
     package or when debugging this package.\
     %files debuginfo -f debugfiles.list\
     %{nil}

So I guess I tested the right thing and it works ;-)

Thanks,
Stefano


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0
  2026-02-10  7:04 [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0 Nathan Chancellor
                   ` (3 preceding siblings ...)
  2026-02-13 14:11 ` Stefano Garzarella
@ 2026-02-18 20:49 ` Nathan Chancellor
  4 siblings, 0 replies; 13+ messages in thread
From: Nathan Chancellor @ 2026-02-18 20:49 UTC (permalink / raw)
  To: Nicolas Schier, Nathan Chancellor
  Cc: linux-kbuild, linux-kernel, stable, Steve French

On Tue, 10 Feb 2026 00:04:47 -0700, Nathan Chancellor wrote:
> Steve reported a build issue with commit 62089b804895 ("kbuild: rpm-pkg:
> Generate debuginfo package manually") on RHEL9, which has an older
> version of RPM than what I tested. Turns out that RPM 4.20.0 fixed an
> issue with specifying %files for a -debuginfo subpackage.
> 
> The first patch restricts the new -debuginfo package generation process
> to CONFIG_MODULE_SIG=y and RPM >= 4.20.0 to ensure it is actually
> necessary and working. The second patch restores the original -debuginfo
> package generation process from commit a7c699d090a1 ("kbuild: rpm-pkg:
> build a debuginfo RPM") when CONFIG_MODULE_SIG is disabled to keep the
> -debuginfo package around for older versions of RPM.
> 
> [...]

Applied to

  https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-fixes

Thanks!

[1/2] kbuild: rpm-pkg: Restrict manual debug package creation
      https://git.kernel.org/kbuild/c/6d6b8b0e28c46
[2/2] kernel: rpm-pkg: Restore find-debuginfo.sh approach to -debuginfo package
      https://git.kernel.org/kbuild/c/ffe9ac1ad56df

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped or
reverted. Patches applied to an "unstable" branch are accepted pending
wider testing in -next and any post-commit review; they will generally
be moved to the main branch in a week if no issues are found.

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-02-18 20:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10  7:04 [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0 Nathan Chancellor
2026-02-10  7:04 ` [PATCH 1/2] kbuild: rpm-pkg: Restrict manual debug package creation Nathan Chancellor
2026-02-10  7:04 ` [PATCH 2/2] kernel: rpm-pkg: Restore find-debuginfo.sh approach to -debuginfo package Nathan Chancellor
2026-02-11 20:33 ` [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0 Nicolas Schier
2026-02-13 14:11 ` Stefano Garzarella
2026-02-13 17:34   ` Steve French
2026-02-13 19:11   ` Nathan Chancellor
2026-02-13 19:41     ` Stefano Garzarella
2026-02-15 21:29       ` Nathan Chancellor
2026-02-16  8:25         ` Stefano Garzarella
2026-02-16 11:42           ` Nathan Chancellor
2026-02-16 14:03             ` Stefano Garzarella
2026-02-18 20:49 ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox