[Rpm-maint] [PATCH] RFC: Add build-id links to rpm for all ELF.

Mark Wielaard mjw at redhat.com
Thu Jun 2 14:28:14 UTC 2016


On Thu, 2016-05-26 at 17:00 +0200, Mark Wielaard wrote:
> I am integrating this patch with the patches I posted that integrate the
> debuginfo package handling from fedora and the new testcases and wanted
> to make the behavior configurable so a distro can setup a macro to
> define what they want. Does the following make sense?
> 
> # Defines how and if build_id links are generated for ELF files.
> # The following settings are supported:
> #
> # - none
> #   No build_id links are generated.
> #
> # - debug
> #   build_id links are generated only when the __debug_package global is
> #   defined. This will generate build_id links in the -debuginfo package
> #   for both the main file as /usr/lib/debug/.build-id/xx/yyy and for
> #   the .debug file as /usr/lib/debug/.build-id/xx/yyy.debug.
> #   This is the old style build_id links as generated by the original
> #   find-debuginfo.sh script.
> #
> # - separate
> #   build_id links are generate for all binary packages. If this is a
> #   main package (the __debug_package global isn't set) then the
> #   build_id link is generated as /usr/lib/.build-id/xx/yyy. If this is
> #   a -debuginfo package (the __debug_package global is set) then the
> #   build_id link is generated as /usr/lib/debug/.build-id/xx/yyy.
> #
> # - compat
> #   Same as for "separate" but if the __debug_package global is set then
> #   the -debuginfo package will have a compatibility link for the main
> #   ELF /usr/lib/debug/.build-id/xx/yyy -> /usr/lib/.build-id/xx/yyy
> %_build_id_links compat

I rebased my patch on top of the other debuginfo improvement patches to
implemented this logic. I renamed debug to alldebug to make it more
clear what that setting does. The default ("compat") is now tested
because all tests from the fedora debuginfo patches now PASS. I still
need to write tests for the other settings. It also doesn't handle
duplicate build-ids, which the old find-debuginfo.sh code did handle. So
that has to be added too.

Feedback welcome.

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-build-id-links-to-rpm-for-all-ELF.patch
Type: text/x-patch
Size: 19021 bytes
Desc: not available
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20160602/faff913f/attachment-0001.bin>


More information about the Rpm-maint mailing list