[Fedora-packaging] How to patch against strip?

Richard W.M. Jones rjones at redhat.com
Thu Nov 19 19:40:37 UTC 2009


On Thu, Nov 19, 2009 at 10:13:19AM +0300, Tareq Al Jurf wrote:
> I'm building a package
> Probably the package’s ‘make install’ function invokes ‘strip’ on the
> binaries it produces. How do i patch the Makefile to not do that.

You can redefine __strip in your RPM to another strip program or to
/bin/true.  However you should be cautious about doing this.

We do it for legitimate reasons in Fedora MinGW packages, but are
careful to invoke an alternate strip program that correctly strips
Windows and Linux binaries (the default program strips Linux binaries
and corrupts Windows binaries, hence the need for a replacement).

Shipping a Fedora package that isn't stripped at all may contravene
the guidelines, so it shouldn't be done lightly.

You should also note that if you're having problems with strip
corrupting your programs, then it's likely that you'll need to take
steps to prevent prelink doing the same thing.  (This is a problem
with some older OCaml programs that I maintain).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top




More information about the Fedora-packaging mailing list