scripts/package/kernel.spec | 57 +++++++++++++++++++++++++++++++++++++++------ scripts/package/mkspec | 38 +++++++++++++++++++++++++++--- 2 files changed, 85 insertions(+), 10 deletions(-)
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>
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>
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
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
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
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
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
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
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
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
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
© 2016 - 2026 Red Hat, Inc.