how to disable rpmbuild from stripping the debug information from binaries?

Greg_Swift at aotx.uscourts.gov Greg_Swift at aotx.uscourts.gov
Tue Jan 20 17:36:00 UTC 2009


> When i build RPM with binaries which contains debug information,
> rpmbuild strips the debug information and put it in debuginfo RPM.
>
> Can i tell rpmbuild not to strip the debug information?
> Here are the different approaches that i tried:
>
> 1) I added %global __strip /bin/true to my spec file but the stripping
> still occurs.
>
> 2) I tried to add  %define __spec_install_post /bin/true  to my spec
> files, but then the rpmbuild get the following error message:
>    error: Could not open %files file
> /tmp/rpm_dir.sdjsidjsid/BUILD/my_rpm/debugfiles.list: No such file or
> directory


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



More information about the Rpm-list mailing list