Preventing the striping of symbols when packaging pre-existing binaries [ WAS: Re: how to disable rpmbuild from stripping the debug information from binaries?]

Greg_Swift at Greg_Swift at
Wed Jan 21 16:40:19 UTC 2009

first i want to apologize, my heads a bit cloudy from being sick and I
misread your comment thinking the __strip thing didn't get it fixed.

> > I was afraid that that wasn't what you were really looking for.  I few
> > months back I was given the task of packaging IBM DB2 for internal use
> > my organization and I spent 2 months trying to figure out why it wasn't
> > working.  It ended up being the automatic stripping of all symbols from
> > binaries, thus destroying the integrity of the binaries and preventing
> > from working.  You can read more specifics about it here:
> For me, by adding the following lines:
> %define debug_package %{nil}
> %define __strip /bin/true
> The debuginfo wasn't created and the debug information is not being
> stripped anymore
> (the binary file size is just like the original size that i wanted to
> add to the RPM)

I can see how your solution might actually be a possibly better route, see
below for more.

> > but in summary, the fix was to use:
> >
> > %define __spec_install_port /usr/lib/rpm/brp-compress
> >
> Can you tell me what the line you suggested does?
> (or why the solution that i'm using is not the solution that i should

Normally %{__spec_install_post} evaluates to the following:

[me at mybox build]$ rpm --eval %__spec_install_post


    /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
    /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip

/usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump

The primary issue there is the brp-strip*, so my solution would drop it to
just the brp-compress. At the time that I ran across this I didn't
experiment with having it still do everything else, which in some cases
might still be important.  So.. ya..

thanks for setting me straight and once again sorry. :)


More information about the Rpm-list mailing list