[Rpm-maint] [rpm-software-management/rpm] Add proper logic for debuginfo enablement (PR #3085)
Panu Matilainen
notifications at github.com
Fri May 10 13:05:06 UTC 2024
All these years, enabling debuginfo has required distros to hijack the spec %install section with a macro like this:
%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
%%install\
%{nil}
This for a widely used, longtime upstream supported feature is just gross, and also very non-obvious, feeble and whatnot. And totally prevents the new append/prepend options from being used with %install.
Take advantage of several newish features to make this happen: we need expressions to properly handle the numeric %_enable_debug_packages value from a macro, and if enabled, output the debuginfo template as a dynamic .specpart.
Enable debuginfo on Linux by default in the platform configuration. Notably noarch should not have debuginfo so it's disabled in the platform configuration - since 96467dce18f264b278e17ffe1859c88d9b5aa4b6 we can now actually rely on the platform configuration being valid, so we can drop the "%ifnarch noarch" from the debug package check. Further streamlining should be possible.
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/3085
-- Commit Summary --
* Simplify doBuildDir() and use appropriate macros as well
* Always create %specpartsdir on build
* Add proper logic for debuginfo enablement
-- File Changes --
M build/build.c (12)
M build/parsePrep.c (10)
M installplatform (6)
M macros.in (2)
M platform.in (3)
M tests/data/SPECS/specstep.spec (1)
M tests/data/macros.debug (10)
M tests/rpmbuild.at (1)
M tests/rpmspec.at (2)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/3085.patch
https://github.com/rpm-software-management/rpm/pull/3085.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3085
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3085 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240510/fcf9e063/attachment-0001.html>
More information about the Rpm-maint
mailing list