FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 02-09-2010, 02:45 AM
David Malcolm
 
Default Custom content within -debuginfo packages for gdb archer

As part of https://fedoraproject.org/wiki/Features/EasierPythonDebugging
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 -gdb.py suffix)

I didn't know of a way to add custom content to the debuginfo package,
so I first tried putting the file here:
/usr/lib{64}/libpython2.6.so.1.0-gdb.py
but doing so generated lots of noise from ldconfig of the form:
"/usr/lib/libpython2.6.so.1.0-gdb.py 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
into
/usr/lib/debug/usr/lib{64}/libpython2.6.so.1.0.debug-gdb.py

(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
subpackage.

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/find-debuginfo.sh 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 debug-gdb.py payload file would be
unpackaged)

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?
(please!)

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

Dave

--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 

Thread Tools




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

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org