From 86ba1ea9c58d5dd8482153114934a6d8866db356 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 12 Oct 2014 08:56:32 +0200 Subject: [PATCH] hooks/strip: before stripping make sure files have write bit set. ... otherwise strip(1) errors out. Perl installs shlibs without write bit set and results in EPERM errors. Perl could be fixed instead, but meanwhile this works. --- common/hooks/post-install/03-strip-and-debug-pkgs.sh | 3 +++ 1 file changed, 3 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 f8d3d02038d..0dc45a5a2db 100644 --- a/common/hooks/post-install/03-strip-and-debug-pkgs.sh +++ b/common/hooks/post-install/03-strip-and-debug-pkgs.sh @@ -81,6 +81,7 @@ hook() { fi case "$(file -bi "$f")" in application/x-executable*) + chmod +w "$f" if echo "$(file $f)" | grep -q "statically linked"; then # static binary $STRIP "$f" @@ -101,6 +102,7 @@ hook() { fi ;; application/x-sharedlib*) + chmod +w "$f" # shared library make_debug "$f" $STRIP --strip-unneeded "$f" @@ -120,6 +122,7 @@ hook() { attach_debug "$f" ;; application/x-archive*) + chmod +w "$f" $STRIP --strip-debug "$f" if [ $? -ne 0 ]; then msg_red "$pkgver: failed to strip ${f#$PKGDESTDIR}\n"