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
%endif
...
# use the debug_package macro if applicable:
%{?debugrpm:%debug_package}
%prep
%setup -q
...

%install
%makeinstall
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.

1 Comments:

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.

05:54  

Post a Comment

Links to this post:

Create a Link

<< Home