-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upstream debuginfo enablement #3040
Conversation
An alternative implementation to #3036 |
Like #3040, this would need to pass with It's an interesting solution, but I don't see making it any less magic, perhaps to the contrary. |
Would be great if #3042 could also be fixed at the same time as it touches the same logic. |
This keep the right value for the rest of the build
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. Turn this isto a proper macro in __spec_install_template that drops the package definition into a .SPECPART file. This way debuginfo can be part of the %install script without messing up the parsing. Fixes: rpm-software-management#2204 Fixes: rpm-software-management#1878
OK, the _target_cpu issue is now papered over and debuginfo is enabled through the whole test suite. This should ow all works as expected (with the exception of the --build-in_place stuff I dd not look at) |
%global __debug_package 1\ | ||
%(cat > "%{specpartsdir}/rpm-debuginfo.specpart" << EOL\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like it a whole lot more if the cat
was in the template part. This is an ugly side-effect for a macro to have, eg somebody doing rpm --eval "%{debug_package}"
to see what it's made of.
@@ -145,6 +145,9 @@ | |||
#%__systemd_sysusers @__SYSTEMD_SYSUSERS@ | |||
%__systemd_sysusers %{_rpmconfigdir}/sysusers.sh | |||
|
|||
# enable debug package generation | |||
%_enable_debug_packages 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized this doesn't belong to the main macros.in, really - it should probably be in platform.in instead. For one, this is a Linux-only feature due to the ties elfutils, but also: we don't want debug packages for noarch packages, that is the place to express it. Sadly we'll still need the other noarch checks because the platform files aren't reread on spec parse recursion, but it's the right direction anyhow.
This is superseded by #3085 which solves is similarly but even a bit cleaner. |
! This removes the %ifnarch noarch check. We need to find a solution for this before merging (or decise it is just an optimization we don't really need)
All these years, enabling debuginfo has required distros to hijack the spec %install section with a macro like this:
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.
Turn this isto a proper macro that drops the package definition into a .SPECPART file. This way debuginfo can be part of the %install script without messing up the parsing.
Fixes: #2204
Fixes: #1878