On Sat, 2007-05-26 at 21:24 +0200, Dick Hoogendijk wrote:
> "file /opt/csw/bin/slrn"
> /opt/csw/bin/slrn: ELF 32-bit LSB executable 80386 Version 1,
> dynamically linked, stripped
>
> "file /usr/bin/vim"
> /usr/bin/vim: ELF 32-bit LSB executable 80386 Version 1 [FPU],
> dynamically linked, not stripped
>
> Vim is compiled in the CBE from SFEvim.spec
>
> What is the difference? stripped / not stripped
> Why are the executables from blastwave "stripped" and those of
> "spec-files-extra" from the JDS CBE made "not stripped"
>
> What is better? And why?
Artem explained the difference. In terms of how to create stripped
binaries, you can use the strip(1) command (currently lives
in /usr/ccs/bin). In JDS, we strip the binaries with "strip -x".
Instead of adding strip commands in each %install section,
pkgbuild comes with a postprocessing script, the
%pkgbuild_postprocess macro stores the location of this script.
It can do a bunch of things:
- change permissions to sane ones (note: you can always override
the permissions using %attr)
- change the ELF .comments section to whatever you want
- strip ELF binaries
We usually call it like this in %install of JDS spec files:
%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c
"%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date
+%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
The above means: if %pkgbuild_postprocess is defined, call it with
-v = verbose
-c "....." = change .comments
$RPM_BUILD_ROOT = recursively for all files in $RPM_BUILD_ROOT
Calling strip -x is the default behaviour.
Run /opt/jdsbld/lib/pkgbuild-1.2.0/pkgbuild-postprocess --help
for more usage info.
Laca