Saturday, October 01, 2005

» Adding debuginfo support to my packages

Finally, I've decided to add "debuginfo" support to my packages. It's a bit tricky to implement though, as the %debug_package RPM macro has been around since SUSE 9.0 (at least) but actually only works on >= 9.3. On < 9.3, rpmbuild bails out and complains about not finding "eu-strip", something that doesn't even exist (zgrep eu-strip ARCHIVES.gz didn't find it)... weird. As I build my RPMs for SUSE 9.0, 9.1, 9.2, 9.3, 10.0 and always use the same spec file for all of those, I had to implement it this way:
# define another variable if we have an actually working debug_package:
%if %suse_version >= 930
%define debugrpm 1
# use the debug_package macro if applicable:
%setup -q

Note that with %debug_package, symbols are stripped out of the binary RPM anyway, after extracting them to make the -debuginfo package. And on SUSE, stripping is performed by the rpmbuild post triggers, so you never need to explicitely strip binaries.


Blogger Robert said...

eu-strip is the strip command from Ulrich Drepper's elfutils package which is not shipped in these versions. As a solution you could use the latest RPM package on older releases. I have them in my repository.


Post a Comment

<< Home