From a786acf4d203f29674b9011079e4f2fc30d64993 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 5 Mar 2015 20:25:04 +0100 Subject: [PATCH] hooks/distfiles: do not respect perms/owner when extracting via tar. With user namespaces and uid/gid == 0, tar will try to respect them and will fail with EINVAL. --- common/hooks/do-extract/00-distfiles.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh index ae535d89f01..7ae8efab662 100644 --- a/common/hooks/do-extract/00-distfiles.sh +++ b/common/hooks/do-extract/00-distfiles.sh @@ -63,7 +63,7 @@ hook() { case ${cursufx} in txz|tbz|tlz|tgz) - tar xf $srcdir/$curfile -C $extractdir + tar -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C $extractdir if [ $? -ne 0 ]; then msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n" fi @@ -77,7 +77,7 @@ hook() { fi ;; tar) - tar xf $srcdir/$curfile -C $extractdir + tar -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C $extractdir if [ $? -ne 0 ]; then msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n" fi