[pacman-dev] makepkg: fix one more file-seccomp issue

Message ID 20200110015935.981029-1-eschwartz@archlinux.org
State New
Delegated to: Andrew Gregory
Headers show
Series
  • [pacman-dev] makepkg: fix one more file-seccomp issue
Related show

Commit Message

Eli Schwartz Jan. 10, 2020, 1:59 a.m. UTC
When file is called via fakeroot, it doesn't matter whether you use -z
or not, it is still incompatible with seccomp. Fix by configuring it
with FILECMD when used in the fakeroot 'tidy' run.

Fixes FS#65100

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
---

For release/5.2.x only since the call site is gone in master.

 scripts/libmakepkg/tidy/strip.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/scripts/libmakepkg/tidy/strip.sh.in b/scripts/libmakepkg/tidy/strip.sh.in
index 1bd810f0..876f00f0 100644
--- a/scripts/libmakepkg/tidy/strip.sh.in
+++ b/scripts/libmakepkg/tidy/strip.sh.in
@@ -111,7 +111,7 @@  tidy_strip() {
 
 		local binary strip_flags
 		find . -type f -perm -u+w -print0 2>/dev/null | while IFS= read -rd '' binary ; do
-			case "$(file -bi "$binary")" in
+			case "$(@FILECMD@ -bi "$binary")" in
 				*application/x-sharedlib*)  # Libraries (.so)
 					strip_flags="$STRIP_SHARED";;
 				*application/x-archive*)    # Libraries (.a)