From c920736289f8714d4e39530d1cae7aca4d40c1d7 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 27 Sep 2014 07:19:42 +0200 Subject: [PATCH] xbps-src: hooks/strip: ignore debug files; set proper perms to files. --- common/hooks/post-install/03-strip-and-debug-pkgs.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/hooks/post-install/03-strip-and-debug-pkgs.sh b/common/hooks/post-install/03-strip-and-debug-pkgs.sh index 60cc0999250..d42c86d0d4a 100644 --- a/common/hooks/post-install/03-strip-and-debug-pkgs.sh +++ b/common/hooks/post-install/03-strip-and-debug-pkgs.sh @@ -64,6 +64,10 @@ hook() { fi find ${PKGDESTDIR} -type f | while read f; do + if [[ $f =~ ^/usr/lib/debug/ ]]; then + continue + fi + fname=$(basename "$f") for x in ${nostrip_files}; do if [ "$x" = "$fname" ]; then @@ -77,6 +81,7 @@ hook() { fi case "$(file -bi "$f")" in application/x-executable*) + chmod 755 "$f" if echo "$(file $f)" | grep -q "statically linked"; then # static binary $STRIP "$f" @@ -97,6 +102,7 @@ hook() { fi ;; application/x-sharedlib*) + chmod 755 "$f" # shared library make_debug "$f" $STRIP --strip-unneeded "$f" @@ -116,6 +122,7 @@ hook() { attach_debug "$f" ;; application/x-archive*) + chmod 644 "$f" $STRIP --strip-debug "$f" if [ $? -ne 0 ]; then msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"