Linux Archive

Linux Archive (
-   Fedora Packaging (
-   -   Custom content within -debuginfo packages for gdb archer (

David Malcolm 02-09-2010 02:45 AM

Custom content within -debuginfo packages for gdb archer
As part of
I needed to drop a python file into the location where gdb 7 can
autoload it (same absolute path as the ELF file with a suffix)

I didn't know of a way to add custom content to the debuginfo package,
so I first tried putting the file here:
but doing so generated lots of noise from ldconfig of the form:
"/usr/lib/ is not an ELF file - it has the
wrong magic bytes at the start."

(I filed this as bug 562980)

Given that these .py files are only really usable when the .debug files
are available (they use the DWARF debug data), I tried putting them

(note that the debug path is /usr/lib/debug for both 32/64 bit)

and it turned out that doing so adds the .py file to the debuginfo

Digging into this, my reading is that /usr/lib/rpm/redhat/macros defines
%__debug_package to use "debugfiles.list", and it appears
that /usr/lib/rpm/ adds everything below /usr/lib/debug
(and /usr/src/debug) this file (via "LISTFILES").

Hence by installing the .py file below /usr/lib/debug it seems to ensure
that it is added to the -debuginfo subpackage (if it doesn't, then the
rpmbuild ought to fail since the payload file would be

How sane is this? It seems to work, sidesteps the ldconfig issue, and
the end result seems like the right result, but the method feels a
little like a hack; I stumbled on this by accident. Is this a
reasonable thing to do going forward? can this be supported in rpm?

Arguably I may need to ensure the files get byte-compiled as well (using
the same version of python as gdb is linked against).


packaging mailing list

All times are GMT. The time now is 02:24 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.