Skip to content

Commit

Permalink
Add build-id links to rpm for all ELF files.
Browse files Browse the repository at this point in the history
This patch moves the main ELF file build-id symlinks from the
debuginfo package into the main package. And uses different
base directories for the main ELF file build-id symlink.
For the main build-id use /usr/lib/.build-id and for the debug
build-id use /usr/lib/debug/.build-id.

There are two reasons for doing this. The main package and the
debuginfo package might get out of sync, or the debuginfo package
might not be installed at all. In which case finding the main ELF
file through the build-id symlink becomes impossible. Secondly by
moving the main ELF build-id symlink in its own directory the
/usr/lib/debug directory gets populated with only debuginfo files
which is convenient if the user might want to have that directory
populated through a network mountpoint.

To support the new logic the symlink code has been moved from
find-debuginfo.sh to build/files.c.

This also includes support for a new config %_build_id_links that
defaults to compat. The other settings are none, alldebug (the old
style) and separate. compat is like separate, but adds a compatibility
link under /usr/lib/debug/.build-id for the main build-id symlink.

There are several new testcases added to test the various settings
using the new keyword "buildid".

Signed-off-by: Mark Wielaard <mjw@redhat.com>
  • Loading branch information
Mark Wielaard authored and ffesti committed Jul 29, 2016
1 parent 4ec7c39 commit bbfe1f8
Show file tree
Hide file tree
Showing 10 changed files with 1,312 additions and 60 deletions.
4 changes: 4 additions & 0 deletions build/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ librpmbuild_la_LIBADD = \
@LTLIBICONV@ \
@WITH_POPT_LIB@ \
@WITH_MAGIC_LIB@

if LIBDW
librpmbuild_la_LIBADD += @WITH_LIBELF_LIB@ @WITH_LIBDW_LIB@
endif
Loading

0 comments on commit bbfe1f8

Please sign in to comment.