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 aotx.uscourts.gov
Greg_Swift at aotx.uscourts.gov
Wed Jan 21 14:14:44 UTC 2009
> > to stop the debug package I believe what you are looking for is:
> >
> > %define debug_package %{nil}
> >
> > but if you are looking to stop it from striping all symbols from the
> > pre-built binaries, thats something else. If the first doesn't work
for
> > you let me know.
> >
> > -greg
>
> First of all, thanks for the reply.
>
>
> Adding the line you mentioned prevented from the debug package to be
> created but the binary size wasn't as expected
> (it was larger than the one without this line, i guess only part of
> the symbols were stripped).
>
> I added the following line too:
> %define __strip /bin/true
>
> and now the debuginfo RPM is not being created and the debug symbols
> are not being stripped from the binaries at all
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 at
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 the
binaries, thus destroying the integrity of the binaries and preventing them
from working. You can read more specifics about it here:
https://www.redhat.com/archives/rpm-list/2008-May/msg00062.html
but in summary, the fix was to use:
%define __spec_install_port /usr/lib/rpm/brp-compress
I'd probably still use the debug_package line as well.
Now if that doesn't work, I'm not sure what to tell ya.
-greg
ps. changed the name so that it might be helpful for people in the future
because the name of my last post's subject doesn't say anything about it.
More information about the Rpm-list
mailing list