LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 10-11-2007, 11:45 AM   #1
sidra
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora Core 3, Red Hat 9, CentOS 4.2, Mandriva, Ret Hat Enterprise Linux 4.0
Posts: 116

Rep: Reputation: 15
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!
 
Old 10-13-2007, 04:30 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,944
Blog Entries: 54

Rep: Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731
Something with the "debug_package" define?
 
Old 10-15-2007, 12:20 PM   #3
sidra
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora Core 3, Red Hat 9, CentOS 4.2, Mandriva, Ret Hat Enterprise Linux 4.0
Posts: 116

Original Poster
Rep: Reputation: 15
I figured it out, don't worry about it!
 
Old 10-18-2007, 02:58 PM   #4
atqasap
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: Disabled
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
 
Old 10-18-2007, 03:12 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,944
Blog Entries: 54

Rep: Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731
Quote:
Originally Posted by sidra View Post
I figured it out, don't worry about it!
Yeah, post your solution.
 
Old 10-19-2007, 09:54 AM   #6
XaViaR
Member
 
Registered: Dec 2004
Distribution: RHEL, CentOS, SuSE
Posts: 170

Rep: Reputation: 30
Please post what you did. I'm having this problem too.
 
Old 10-23-2007, 09:40 AM   #7
fearandloathinglinux
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: 0
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
 
Old 10-26-2007, 12:48 PM   #8
sidra
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora Core 3, Red Hat 9, CentOS 4.2, Mandriva, Ret Hat Enterprise Linux 4.0
Posts: 116

Original Poster
Rep: Reputation: 15
Thanks a lot, i'll check this out!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
prevent a package from upgrade kushalkoolwal Debian 2 04-17-2006 08:16 PM
How to prevent a package from being removed? raid517 Debian 3 04-29-2005 10:09 PM
building rpm package question hct224 Linux - Newbie 2 09-02-2004 05:41 AM
building POSTFIX rpm package for Redhat hct224 Linux - Newbie 6 06-16-2004 01:32 AM
Building own RPM package hems Linux - Newbie 1 11-28-2002 03:16 AM


All times are GMT -5. The time now is 08:19 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration