[opensuse-packaging] Stripping executables
Hello, this is my first try of building an RPM package, so please be patient. I want to package SUMO (http.//sumo.sf.net/) 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 + export RPM_BUILD_ROOT + 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 /tmp/Check.perms.z14272 setting /var/tmp/sumo-0.9.10-build/ to root:root 0755. (wrong owner/group micha:users) setting /var/tmp/sumo-0.9.10-build/usr to root:root 0755. (wrong owner/group micha:users) + /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 libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libc.so.6(GLIBC_2.1.3) libFOX-1.4.so.0 libgcc_s.so.1 libgcc_s.so.1(GCC_3.0) libgdal.so.1 libGL.so.1.2 libGLU.so.1 libm.so.6 libm.so.6(GLIBC_2.0) libproj.so.0 libpthread.so.0 libpthread.so.0(GLIBC_2.0) libpthread.so.0(GLIBC_2.1) libstdc++.so.6 libstdc++.so.6(CXXABI_1.3) libstdc++.so.6(CXXABI_1.3.1) libstdc++.so.6(GLIBCXX_3.4) libstdc++.so.6 (GLIBCXX_3.4.9) libxerces-c.so.27 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, Michael
On 2008-09-23 22:05:06 +0200, Michael Behrisch wrote:
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?
you can enable debuginfo packages for your project [[[ <debuginfo> <enable/> </debuginfo> ]]] osc meta prj -e yourproject and add this block above the first <repository> block (without the [[[]]]) that will strip the binaries and create additional packages for easier debugging. hth darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Marcus Rueckert schrieb:
On 2008-09-23 22:05:06 +0200, Michael Behrisch wrote:
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?
you can enable debuginfo packages for your project
[[[ <debuginfo> <enable/> </debuginfo> ]]]
osc meta prj -e yourproject
and add this block above the first <repository> block (without the [[[]]])
that will strip the binaries and create additional packages for easier debugging.
And if it should not be project wide you could use the %debug_package macro in your spec file (and add -g to your buildflags since $RPM_OPT_FLAGS wouldn't have it in that case). Wolfgang -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Friday 26 September 2008 09:56:36 wrote Wolfgang Rosenauer:
Marcus Rueckert schrieb:
On 2008-09-23 22:05:06 +0200, Michael Behrisch wrote:
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?
you can enable debuginfo packages for your project
[[[ <debuginfo> <enable/> </debuginfo> ]]]
osc meta prj -e yourproject
and add this block above the first <repository> block (without the [[[]]])
that will strip the binaries and create additional packages for easier debugging.
And if it should not be project wide you could use the %debug_package macro in your spec file (and add -g to your buildflags since $RPM_OPT_FLAGS wouldn't have it in that case).
or even better use the same flag for the package only in the package meta data. All this is also nice reachable in the web interface btw ;) bye adrian -- Adrian Schroeter SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) email: adrian@suse.de -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Friday 26 September 2008 10:00:00 wrote Adrian Schröter:
On Friday 26 September 2008 09:56:36 wrote Wolfgang Rosenauer:
Marcus Rueckert schrieb:
On 2008-09-23 22:05:06 +0200, Michael Behrisch wrote:
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?
you can enable debuginfo packages for your project
[[[ <debuginfo> <enable/> </debuginfo> ]]]
osc meta prj -e yourproject
and add this block above the first <repository> block (without the [[[]]])
that will strip the binaries and create additional packages for easier debugging.
And if it should not be project wide you could use the %debug_package macro in your spec file (and add -g to your buildflags since $RPM_OPT_FLAGS wouldn't have it in that case).
Thank you, that solved my problem. As this is my first try on rpm packaging, I am not using the build service (yet), thus the other approaches did not work for me (at least as far as I understood them, they referred to build service configuration). Regards, Michael -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (4)
-
Adrian Schröter
-
Marcus Rueckert
-
Michael Behrisch
-
Wolfgang Rosenauer