Skip to contentSkip to conversation

kbuild: rpm-pkg: Disable automatic requires for manual debuginfo package

PATCH In review Nathan Chancellor 1 participant 2 messages Feb 16 – Feb 18

Subsystems (2)
lore
Share & tools
lore

Nathan Chancellor

author maintainer
#0 lore raw

PATCH 1/1 kbuild: rpm-pkg: Disable automatic requires for manual debuginfo package

Stefano reports that after commit 62089b804895 ("kbuild: rpm-pkg:
Generate debuginfo package manually"), building with an rpm package using rpm 4.20.0 fails with:

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

This error comes from the automatic requirements feature of rpm. The -debuginfo subpackage has no dependencies, so disable this feature with 'AutoReq: 0' for this subpackage, avoiding the error. This matches the official %_debug_template macro that rpm provides. While automatic provides should be default enabled, be explicit like %_debug_template does.

Additionally, while in the area, add the manual debug information package to the Development/Debug group, further aligning with %_debug_template.

---
 scripts/package/kernel.spec | 3 +++
 1 file changed, 3 insertions(+)
scripts/package/kernel.spec +3 -0
index bccf58bdd45f..b3c956205af0 100644
@@ -48,6 +48,9 @@ against the %{version} kernel package.
 %if %{with_debuginfo_manual}
 %package debuginfo
 Summary: Debug information package for the Linux kernel
+Group: Development/Debug
+AutoReq: 0
+AutoProv: 1
 %description debuginfo
 This package provides debug information for the kernel image and modules from the
 %{version} package.

---
base-commit: afdfb71c018e9a0aa2e51fb8186d3fb1acdd3f0e
change-id: 20260216-improve-manual-debuginfo-template-bfb3f482c2bc

Best regards,

Signature · 1 line
Nathan Chancellor <[email protected]>
author maintainer
#1 lore raw
Quoted 13 lines · Nathan Chancellor

Stefano reports that after commit 62089b804895 ("kbuild: rpm-pkg:
Generate debuginfo package manually"), building with an rpm package using rpm 4.20.0 fails with:

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
Quoted 1 line

[...]

Applied to

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

Thanks!

[1/1] kbuild: rpm-pkg: Disable automatic requires for manual debuginfo package

      https://git.kernel.org/kbuild/c/f94711255a73d

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,

Signature · 1 line
Nathan Chancellor <[email protected]>