Mailinglist Archive: opensuse-packaging (47 mails)

< Previous Next >
[opensuse-packaging] Stripping executables
  • From: Michael Behrisch <behrisch@xxxxxxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 23 Sep 2008 22:05:06 +0200
  • Message-id: <200809232205.06237.behrisch@xxxxxxxxxxxxxxxxxxxxxxx>
this is my first try of building an RPM package, so please be patient.
I want to package SUMO (http.// and succeeded in
writing a spec file (attached), placing it into
/usr/src/packages/SPECS together with sources in
/usr/src/packages/SOURCES and in executing rpmbuild -ba
but the resulting RPM is huge because of the generated
debug info in the executables.
Digging into the macros in /usr/lib/rpm I found out that the
%install macro actually should try to strip the executables
but it does not in my case (maybe it gets overwritten by some
suse_macro?). The system I am working on is openSUSE 10.3.
and the (hopefully) relevant part of the rpmbuild output is here:

Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.51377
+ umask 022
+ cd /usr/src/packages/BUILD
+ cd sumo-0.9.10
+ make DESTDIR=/var/tmp/sumo-0.9.10-build install
Making install in src
make[1]: Leaving directory `/usr/src/packages/BUILD/sumo-0.9.10'
+ RPM_BUILD_ROOT=/var/tmp/sumo-0.9.10-build
+ test -x /usr/sbin/Check -a 1000 =
0 -o -x /usr/sbin/Check -a '!' -z /var/tmp/sumo-0.9.10-build
+ echo 'I call /usr/sbin/Check...'
I call /usr/sbin/Check...
+ /usr/sbin/Check
Checking permissions and ownerships - using the permissions files
setting /var/tmp/sumo-0.9.10-build/ to root:root 0755. (wrong owner/group
setting /var/tmp/sumo-0.9.10-build/usr to root:root 0755. (wrong owner/group
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-symlink
Processing files: sumo-0.9.10-1
Finding Provides: /usr/lib/rpm/find-provides sumo
Finding Requires: /usr/lib/rpm/find-requires sumo
sed: kann /usr/src/packages/SOURCES/sumo.spec nicht lesen: Datei oder
Verzeichnis nicht gefunden
Finding Supplements: /usr/lib/rpm/find-supplements sumo
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
Requires: libproj libgdal Xerces-c fox14
Checking for unpackaged
file(s): /usr/lib/rpm/check-files /var/tmp/sumo-0.9.10-build
Wrote: /usr/src/packages/SRPMS/sumo-0.9.10-1.src.rpm
Wrote: /usr/src/packages/RPMS/i586/sumo-0.9.10-1.i586.rpm

There is also a spurious error message about sed being unable to find
the spec (in german above, it looks inside the SOURCES dir?!)
but I don't know whether this is related.

Now, what can I do to strip my executables before packaging them?
Do I have to call strip by hand or I am just overlooking something?

Thanks for your help,
# spec file for package sumo (Version 0.9.10)
# norootforbuild
Name: sumo
Summary: Microscopic Traffic Simulation
Version: 0.9.10
Release: 1
Source0: %{name}-%{version}.tar.bz2
License: GPL v2.1 or later
Group: Productivity/Scientific/Other
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++ libproj-devel libgdal-devel Xerces-c-devel fox14-devel
Requires: libproj libgdal Xerces-c fox14

"Simulation of Urban MObility" (SUMO) is an open source,
highly portable, microscopic road traffic simulation package
designed to handle large road networks.

%setup -q

%configure --prefix=%{_prefix}



< Previous Next >
Follow Ups