From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1C05C1382C5 for ; Sun, 21 Jan 2018 00:13:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8F22DE0880; Sun, 21 Jan 2018 00:13:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 41B68E087C for ; Sun, 21 Jan 2018 00:13:26 +0000 (UTC) Received: from sf.home (trofi-1-pt.tunnel.tserv1.lon2.ipv6.he.net [IPv6:2001:470:1f1c:a0f::2]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: slyfox) by smtp.gentoo.org (Postfix) with ESMTPSA id 4990E335C50; Sun, 21 Jan 2018 00:13:25 +0000 (UTC) Received: by sf.home (Postfix, from userid 1000) id 27AE51DB371EB; Sun, 21 Jan 2018 00:13:20 +0000 (GMT) From: Sergei Trofimovich To: gentoo-dev@lists.gentoo.org Cc: mgorny@gentoo.org, Sergei Trofimovich Subject: [gentoo-dev] [PATCH] vcs-snapshot.eclass: set -o (--no-same-owner) when unpacking, bug #645182 Date: Sun, 21 Jan 2018 00:13:04 +0000 Message-Id: <20180121001304.26280-1-slyfox@gentoo.org> X-Mailer: git-send-email 2.16.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: a8819dd3-193e-46d5-8114-d79ce608b4fb X-Archives-Hash: 9c59c75e482a7a0bd8348c5257af80ef Fixes build failures in unprivileged containers like bug #645182: Package: dev-python/pycparser-2.14 >>> Unpacking source... tar: CHANGES: Cannot change ownership to uid 1000, gid 1000: Invalid argument In such containers uid=0 can't really change file ownership. Bug: https://bugs.gentoo.org/645182 Signed-off-by: Sergei Trofimovich --- eclass/vcs-snapshot.eclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eclass/vcs-snapshot.eclass b/eclass/vcs-snapshot.eclass index 3eff6995fae..2b3f73897ce 100644 --- a/eclass/vcs-snapshot.eclass +++ b/eclass/vcs-snapshot.eclass @@ -67,7 +67,8 @@ vcs-snapshot_src_unpack() { # XXX: check whether the directory structure inside is # fine? i.e. if the tarball has actually a parent dir. mkdir "${destdir}" || die - tar -C "${destdir}" -x --strip-components 1 \ + # -o (--no-same-owner) to avoid restoring original owner + tar -C "${destdir}" -xo --strip-components 1 \ -f "${DISTDIR}/${f}" || die ;; *) -- 2.16.0