[opensuse-buildservice] Stripping debug info into a separate rpm?
Hi, Is there a method to strip debug into a foo-debuginfo.rpm package instead of keeping it in the main rpm file? For a few libraries that I'm building the debug symbols are actually larger than the library rpm file itself, so splitting those out to a separate rpm file would be great.
OK, it would seem to be an advanced project flag but I'm having trouble changing it to verify my guess... osc meta -e prj monkeyiq:home <debuginfo> <disable /> </debuginfo> abstractly, s/disable/enable/g ZZ Sending meta data... cannot save meta data - an unexpected error occured Try again? (yY = Yes - nN = No): The web interface under advanced gives me this when I click on the debug icon; ERROR unknown element: debug an strace on osc seems to show normal proxy activity. I'll retry later :( On Sun, 2007-11-25 at 01:02 +1000, Ben Martin wrote:
Hi, Is there a method to strip debug into a foo-debuginfo.rpm package instead of keeping it in the main rpm file? For a few libraries that I'm building the debug symbols are actually larger than the library rpm file itself, so splitting those out to a separate rpm file would be great.
On Saturday 24 November 2007 16:14:11 wrote Ben Martin:
OK, it would seem to be an advanced project flag but I'm having trouble changing it to verify my guess...
osc meta -e prj monkeyiq:home <debuginfo> <disable /> </debuginfo>
yes, this is defined in xml schemas, but not yet supported in the backend. So this have no effect atm. All what you can do atm, is to change this settings directly in the spec files. bye adrian -- Adrian Schroeter SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Sun, 2007-11-25 at 17:35 +0100, Adrian Schröter wrote:
On Saturday 24 November 2007 16:14:11 wrote Ben Martin:
OK, it would seem to be an advanced project flag but I'm having trouble changing it to verify my guess...
osc meta -e prj monkeyiq:home <debuginfo> <disable /> </debuginfo>
yes, this is defined in xml schemas, but not yet supported in the backend. So this have no effect atm.
All what you can do atm, is to change this settings directly in the spec files.
bye adrian
Hmm, after a little digging this is what I came up with, mainly posted as a kickoff point for others and in case other ml readers have a better solution. This seems to work for F7,F8 and opensuse 10.3. I already had at the top of the specfile; %define name foo Directly adding the debuginfo macro expansion after my own package metadata at the top of the spec... %package debuginfo Summary: Debug information for package %{name} Group: Development/Debug %description debuginfo This package provides debug information for package %{name}. Debug information is useful when developing applications that use this package or when debugging this package. %files debuginfo -f debugfiles.list %defattr(-,root,root) And after calling %makeinstall adding %__debug_install_post Not quite as easy as I'd hoped but makes for a much leaner download with the possibility for debugging if desired :)
On Sunday 25 November 2007 19:05:51 Ben Martin wrote:
This seems to work for F7,F8 and opensuse 10.3.
I already had at the top of the specfile; %define name foo
Not needed.
Directly adding the debuginfo macro expansion after my own package metadata at the top of the spec... %package debuginfo Summary: Debug information for package %{name} ...
You can just insert %debug_package, which does everything for you. Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tue, 2007-11-27 at 10:43 +0100, Michal Marek wrote:
On Sunday 25 November 2007 19:05:51 Ben Martin wrote:
This seems to work for F7,F8 and opensuse 10.3.
I already had at the top of the specfile; %define name foo
Not needed.
I had that in there already because the %{name} is used many times in the header of the package and I don't tend to like s/foo/bar/g when I use my spec.in.template to start packaging a new tarball. Not strictly needed of course.
Directly adding the debuginfo macro expansion after my own package metadata at the top of the spec... %package debuginfo Summary: Debug information for package %{name} ...
You can just insert %debug_package, which does everything for you.
I did at first try this method, hoping it would just work. I'm still all for getting it to work properly rather than embedding the contents of the debug macro into the specfile. I just moved my %{name} definition and gave it another shot using %debug_package after a blank line after my %description. Having %__debug_install_post in place doesn't seem to change the outcome when just using %debug_package. On Fedora 8: error: Installed (but unpackaged) file(s) found: /usr/lib/debug/.build-id/21/fa83c1714247ffac3294880f6aa9c1f9a20636 /usr/lib/debug/.build-id/21/fa83c1714247ffac3294880f6aa9c1f9a20636.debug /usr/lib/debug/usr/lib/libfuselagefs.so.0.0.0.debug /usr/lib/debug/usr/lib/libfuselagefs.so.0.debug /usr/lib/debug/usr/lib/libfuselagefs.so.debug /usr/src/debug/fuselagefs-0.0.1/src/fuselagefs.cpp /usr/src/debug/fuselagefs-0.0.1/src/fuselagefs.hh On opensuse 10.3: error: Installed (but unpackaged) file(s) found: /usr/lib/debug/usr/lib/libfuselagefs.so.0.0.0.debug With the nastier brute force method I was using it would package on both platforms. package = ~/fuselagefs
On Tuesday 27 November 2007 11:27:45 Ben Martin wrote:
On Tue, 2007-11-27 at 10:43 +0100, Michal Marek wrote:
On Sunday 25 November 2007 19:05:51 Ben Martin wrote:
This seems to work for F7,F8 and opensuse 10.3.
I already had at the top of the specfile; %define name foo
Not needed.
I had that in there already because the %{name} is used many times in the header of the package
Still not needed. Name: foo defines the %name macro for you.
On Fedora 8: error: Installed (but unpackaged) file(s) found: /usr/lib/debug/.build-id/21/fa83c1714247ffac3294880f6aa9c1f9a20636 /usr/lib/debug/.build-id/21/fa83c1714247ffac3294880f6aa9c1f9a20636.debug /usr/lib/debug/usr/lib/libfuselagefs.so.0.0.0.debug /usr/lib/debug/usr/lib/libfuselagefs.so.0.debug /usr/lib/debug/usr/lib/libfuselagefs.so.debug /usr/src/debug/fuselagefs-0.0.1/src/fuselagefs.cpp /usr/src/debug/fuselagefs-0.0.1/src/fuselagefs.hh
On opensuse 10.3: error: Installed (but unpackaged) file(s) found: /usr/lib/debug/usr/lib/libfuselagefs.so.0.0.0.debug
With the nastier brute force method I was using it would package on both platforms. package = ~/fuselagefs
Is this home:monkeyiq/fuselagefs? I'm not sure if it's the cause of the problem, but I see you "commented" out some macros in the spec. Unfortunately the way rpm parses specfiles is that it first evaluates macros and then strips comments. So your #%debug_package fuselagefs-debuginfo line will results in an expansion of the %debug_package macro with the first line commented out. hth, Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tue, 27 Nov 2007, Michal Marek wrote:
Is this home:monkeyiq/fuselagefs? I'm not sure if it's the cause of the problem, but I see you "commented" out some macros in the spec. Unfortunately the way rpm parses specfiles is that it first evaluates macros and then strips comments. So your #%debug_package fuselagefs-debuginfo line will results in an expansion of the %debug_package macro with the first line commented out.
Yeah, that's a brain-damaged behaviour. Always nice to track down the errors of somethink like %define myvar value # myvar contains ... or # %debug_package BTW: Could %debug_package be changed, so newer Mandriva and Fedora do not expand it twice? It seems this macro is enabled by default for these and if contained without if in the spec-file it results in an error. Ciao -- http://www.dstoecker.eu/ (PGP key available) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tue, 2007-11-27 at 13:24 +0100, Michal Marek wrote:
On Tuesday 27 November 2007 11:27:45 Ben Martin wrote:
On Tue, 2007-11-27 at 10:43 +0100, Michal Marek wrote:
On Sunday 25 November 2007 19:05:51 Ben Martin wrote:
This seems to work for F7,F8 and opensuse 10.3.
I already had at the top of the specfile; %define name foo
Not needed.
I had that in there already because the %{name} is used many times in the header of the package
Still not needed. Name: foo defines the %name macro for you.
Ah... one of those moments when I realize that I need to RE-RTFM. Thanks for pointing this out to me.
On Fedora 8: error: Installed (but unpackaged) file(s) found: /usr/lib/debug/.build-id/21/fa83c1714247ffac3294880f6aa9c1f9a20636 /usr/lib/debug/.build-id/21/fa83c1714247ffac3294880f6aa9c1f9a20636.debug /usr/lib/debug/usr/lib/libfuselagefs.so.0.0.0.debug /usr/lib/debug/usr/lib/libfuselagefs.so.0.debug /usr/lib/debug/usr/lib/libfuselagefs.so.debug /usr/src/debug/fuselagefs-0.0.1/src/fuselagefs.cpp /usr/src/debug/fuselagefs-0.0.1/src/fuselagefs.hh
On opensuse 10.3: error: Installed (but unpackaged) file(s) found: /usr/lib/debug/usr/lib/libfuselagefs.so.0.0.0.debug
With the nastier brute force method I was using it would package on both platforms. package = ~/fuselagefs
Is this home:monkeyiq/fuselagefs? I'm not sure if it's the cause of the problem, but I see you "commented" out some macros in the spec. Unfortunately the way rpm parses specfiles is that it first evaluates macros and then strips comments. So your #%debug_package fuselagefs-debuginfo line will results in an expansion of the %debug_package macro with the first line commented out.
hth, Michal
Yep, thats the fuselagefs. You were correct, stripping out all of the debug comments and just putting the one solo %debug_package after the description works like a charm. Thanks for highlighting this little somewhat unintuitive trap of rpm spec files.
participants (4)
-
Adrian Schröter
-
Ben Martin
-
Dirk Stoecker
-
Michal Marek