[Rpm-maint] [rpm-software-management/rpm] Properly upstream debuginfo enablement (Issue #2204)

Florian Festi notifications at github.com
Wed Sep 28 14:39:28 UTC 2022


OK, I guess I start with writing down how debuginfo works right now:

There are quite a few macros that [control](https://github.com/rpm-software-management/rpm/blob/master/macros.in#L452) and [implement](https://github.com/rpm-software-management/rpm/blob/master/macros.in#L135) the debuginfo creation.

The macro starting the show is not even in RPM but added by the distributions in their own macros. Z.B. in [Fedora](https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/macros#_285). This hack prepends the first piece before `%install` (creating all kind of problems wrt SPEC order and parsing `%prep` and `%install` back to back).

If `_enable_debug_packages` and `buildsubdir` are set and this is not an `noarch` package debuginfos are created. Right there `__debug_package` is set which is used by the other pieces to activate. Also the main `-debuginfo` package and - if enabled - `-debugsource` package is declared there.

Next stop is `__spec_install_post` which executes `find_debuginfo` (which is now part of the `debugedit` package) at the end of `%install`. This creates the manifest file for the main `-debuginfo` package and possibly `-debugsource` package.

Everything else is handles in [build/files.](https://github.com/rpm-software-management/rpm/blob/master/build/files.c) during the assembling of the packages:

[generateBuildIDs](https://github.com/rpm-software-management/rpm/blob/master/build/files.c#L1814) adds the links to the packages.

Depending on the settings the debuginfo files are processed and relocated  if necessary.
It does so by finding the previously declared `-debuginfo` and `-debugsource` packages now having read in their manifest files.
Other debuginfo packages are created by cloning the main debuginfo package in [filterDebuginfoPackage](https://github.com/rpm-software-management/rpm/blob/master/build/files.c#L2900)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2204#issuecomment-1261015083
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/2204/1261015083 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220928/a3fbee9b/attachment.html>


More information about the Rpm-maint mailing list