LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Prevent strip when building an RPM package (https://www.linuxquestions.org/questions/red-hat-31/prevent-strip-when-building-an-rpm-package-591099/)

sidra 10-11-2007 11:45 AM

Prevent strip when building an RPM package
 
Hi all,

I'm packaging some software into an rpm package. It consists of binaries and libraries. I'm building the binaries with a certain debug level enabled but when i run rpmbuild on my .spec file it strips the binaries and removes all debugging information and symbols, decreasing the size of the binaries. How do i prevent this????

I've tried commenting out the lines to strip ELF binaries in:
/usr/lib/rpm/redhat/brp-redhat & /usr/lib/rpm/brp-redhat

However when i run 'rpmbuild -ba <name of spec file>.spec' i can see that it still does strip! How can i disable this?

Please let me know. Thanks!

unSpawn 10-13-2007 04:30 AM

Something with the "debug_package" define?

sidra 10-15-2007 12:20 PM

I figured it out, don't worry about it!

atqasap 10-18-2007 02:58 PM

Hi Sid,

I'm running into the same problem, what solution did you find? How to avoid the stripping?

Help will be highly welcomed :)

Thanks,
Atqasap

unSpawn 10-18-2007 03:12 PM

Quote:

Originally Posted by sidra (Post 2925007)
I figured it out, don't worry about it!

Yeah, post your solution.

XaViaR 10-19-2007 09:54 AM

Please post what you did. I'm having this problem too.

fearandloathinglinux 10-23-2007 09:40 AM

possible solution, ie. works for me
 
I also had this problem building rpm's with binaries that I did not want stripped. I solved the problem by adding the following line to the top of my spec file.

# Turn off strip'ng of binaries
%global __strip /bin/true

sidra 10-26-2007 12:48 PM

Thanks a lot, i'll check this out!


All times are GMT -5. The time now is 06:10 AM.