Re: [PATCH 0/2] kbuild: rpm-pkg: Address -debuginfo build regression with RPM < 4.20.0

From: Stefano Garzarella

Date: Mon Feb 16 2026 - 09:05:27 EST


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