Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Supressing the 'strip' phase of RPMBUILD...

519 views
Skip to first unread message

Robert Heller

unread,
Sep 4, 2010, 3:13:32 PM9/4/10
to
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
hel...@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk


Michal Jaegermann

unread,
Sep 7, 2010, 4:20:20 PM9/7/10
to
Robert Heller <hel...@deepsoft.com> wrote:
> I have discovered a nasty problem with rpmbuild -- the stripping of
> shared objects.
....

>
> 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

0 new messages