Discussion:
Supressing the 'strip' phase of RPMBUILD...
(too old to reply)
Robert Heller
2010-09-04 19:13:32 UTC
Permalink
I have discovered a nasty problem with rpmbuild -- the stripping of
shared objects. I have some packages that build 'starkits'. These are
Tcl/Tk programs that are built with a self-contained version of the
Tcl/Tk system, with a 'virtual file system' tacked onto the end of the
Tcl/Tk executable. The strip command seems to chop off the 'extra'
*data* tacked onto the executable, which effectivly breaks the starkit.

Is there a way to supress the /usr/lib/rpm/redhat/brp-strip-* operations
that rpmbuild performs?
--
Robert Heller -- Get the Deepwoods Software FireFox Toolbar!
Deepwoods Software -- Linux Installation and Administration
http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
***@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk
Michal Jaegermann
2010-09-07 20:20:20 UTC
Permalink
Post by Robert Heller
I have discovered a nasty problem with rpmbuild -- the stripping of
shared objects.
....
Post by Robert Heller
Is there a way to supress the /usr/lib/rpm/redhat/brp-strip-* operations
that rpmbuild performs?
$ rpm --showrc | grep strip
/usr/lib/rpm/redhat/brp-strip %{__strip}
/usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump}
/usr/lib/rpm/redhat/brp-strip-static-archive %{__strip}
-14: __strip /usr/bin/strip

(and that should be something similar if you are using a different set
of rpm macros). So you may redefine to order in your specs __strip
(say, to drop all local and debugging symbols only), or maybe
__os_install_post instead which does that processing, and off you go.
On the top of that /usr/lib/rpm/redhat/brp-strip* are shell scripts
which look at a value of $STRIP so you have another way to affect
results.

There are examples of packages which do such things. None specific
comes to mind at the moment but if you will look around in some specs of
Lisp and/or Tcl packages then you will likely find it. I think that
kernel specs are also do redefinitions of that sort but there this tends
to be quite involved so not a good place to look for examples.

http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-specfiles.html
should be also of help.

Michal

Loading...