[pacman-dev] [PATCH] makepkg: remove STRIP_DIRS
Dan McGee
dpmcgee at gmail.com
Wed Sep 29 09:23:40 EDT 2010
On Wed, Sep 29, 2010 at 6:28 AM, Allan McRae <allan at archlinux.org> wrote:
> For binary packages, the majority of the time used in the debugs symbol
> stripping process is the actual stripping of the binaries/libraries and
> not the testing of which files to strip. This allows more complete
> stripping of packages that install to "non-standard" paths that would
> not be generally included in makepkg.conf.
>
> Any performance hit that may be apparent for (_large_) "arch=('any')"
> packages can readily be avoided by disabling stripping in the PKGBUILD
> options array.
>
> Signed-off-by: Allan McRae <allan at archlinux.org>
> ---
> doc/makepkg.conf.5.txt | 7 -------
> etc/makepkg.conf.in | 4 +---
> scripts/makepkg.sh.in | 4 ++--
> 3 files changed, 3 insertions(+), 12 deletions(-)
>
> diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt
> index 753b179..4700d9c 100644
> --- a/doc/makepkg.conf.5.txt
> +++ b/doc/makepkg.conf.5.txt
> @@ -160,13 +160,6 @@ Options
> that are located in opt/, you may need to add the directory to this
> array. *NOTE:* Do not add the leading slash to the directory name.
>
> -**STRIP_DIRS=(**bin lib sbin usr/{bin,lib} ...**)**::
> - If `strip` is specified in the OPTIONS array, this variable will
> - instruct makepkg where to look to for files to strip. If you build
> - packages that are located in opt/, you may need to add the directory
> - to this array. *NOTE:* Do not add the leading slash to the directory
> - name.
> -
Since we're making this vanish without a trace, perhaps we should have
a section in the manpage detailing anything that was used in the past
but no longer exists? xdelta (commit b4e1365657f), BUILDSCRIPT (commit
3d6da93093) also come to mind, for instance.
> **PURGE_TARGETS=(**usr/{,share}/info/dir .podlist *.pod...**)**::
> If `purge` is specified in the OPTIONS array, this variable will
> instruct makepkg which files to remove from the package. This is
> diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in
> index f0d1c44..c795432 100644
> --- a/etc/makepkg.conf.in
> +++ b/etc/makepkg.conf.in
> @@ -61,7 +61,7 @@ BUILDENV=(fakeroot !distcc color !ccache)
> # Default: OPTIONS=(strip docs libtool emptydirs zipman purge)
> # A negated option will do the opposite of the comments below.
> #
> -#-- strip: Strip symbols from binaries/libraries in STRIP_DIRS
> +#-- strip: Strip symbols from binaries/libraries
> #-- docs: Save doc directories specified by DOC_DIRS
> #-- libtool: Leave libtool (.la) files in packages
> #-- emptydirs: Leave empty directories in packages
> @@ -82,8 +82,6 @@ STRIP_STATIC="@STRIP_STATIC@"
> MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
> #-- Doc directories to remove (if !docs is specified)
> DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
> -#-- Directories to be searched for the strip option (if strip is specified)
> -STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
> #-- Files to be removed from all packages (if purge is specified)
> PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index de24338..ed1380d 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -874,13 +874,13 @@ tidy_install() {
> done
> fi
>
> - if [[ $(check_option strip) = y && -n ${STRIP_DIRS[*]} ]]; then
> + if [[ $(check_option strip) = y ]]; then
> msg2 "$(gettext "Stripping unneeded symbols from binaries and libraries...")"
> # make sure library stripping variables are defined to prevent excess stripping
> [[ -z ${STRIP_SHARED+x} ]] && STRIP_SHARED="-S"
> [[ -z ${STRIP_STATIC+x} ]] && STRIP_STATIC="-S"
> local binary
> - find ${STRIP_DIRS[@]} -type f -perm -u+w 2>/dev/null | while read binary ; do
> + find . -type f -perm -u+w 2>/dev/null | while read binary ; do
> case "$(file -bi "$binary")" in
> *application/x-sharedlib*) # Libraries (.so)
> /usr/bin/strip $STRIP_SHARED "$binary";;
> --
> 1.7.3
>
>
>
More information about the pacman-dev
mailing list