From 32b7789e9ac09dad7f6d39df349c9a94e93e00c8 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 28 Apr 2021 10:33:23 +0200 Subject: [PATCH] abuild: allow override setfattr In osme situations it might be needed to disable setfattr. Allow this via: `SETFATTR=true abuild ...` fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10027 --- abuild.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/abuild.in b/abuild.in index 5a295f0..8a93cf2 100644 --- a/abuild.in +++ b/abuild.in @@ -27,6 +27,7 @@ fi : ${ADDGROUP:="abuild-addgroup"} : ${CC:="gcc"} : ${CXX:="g++"} +: ${SETFATTR:="setfattr"} apk_opt_wait="--wait 30" @@ -1847,7 +1848,7 @@ default_dbg() { mv "$ddbg_dstfile" "$ddbg_dstdir" ${CROSS_COMPILE}strip "$ddbg_srcfile" if [ -n "$xattr" ]; then - echo "$xattr" | setfattr --restore=- + echo "$xattr" | "$SETFATTR" --restore=- fi done return 0 @@ -2402,7 +2403,7 @@ stripbin() { local XATTR=$(getfattr --match="" --dump "${filename}") "${stripcmd}" "${filename}" if [ -n "$XATTR" ]; then - echo "$XATTR" | setfattr --restore=- + echo "$XATTR" | "$SETFATTR" --restore=- fi done }