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 5808B1382C5 for ; Sun, 21 Jan 2018 00:27:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E6500E08ED; Sun, 21 Jan 2018 00:27:19 +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 9A6D7E088A for ; Sun, 21 Jan 2018 00:27:19 +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 62C28335C58; Sun, 21 Jan 2018 00:27:18 +0000 (UTC) Received: by sf.home (Postfix, from userid 1000) id 3843D1DB393DD; Sun, 21 Jan 2018 00:27:14 +0000 (GMT) From: Sergei Trofimovich To: gentoo-dev@lists.gentoo.org Cc: mgorny@gentoo.org, Sergei Trofimovich Subject: [gentoo-dev] [PATCH v2] vcs-snapshot.eclass: set -o (--no-same-owner) when unpacking, bug #645182 Date: Sun, 21 Jan 2018 00:26:50 +0000 Message-Id: <20180121002650.20876-1-slyfox@gentoo.org> X-Mailer: git-send-email 2.16.0 In-Reply-To: <1516494134.1103.4.camel@gentoo.org> References: <1516494134.1103.4.camel@gentoo.org> 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: f8d48e31-0a30-4905-bafc-394594dd42ce X-Archives-Hash: d907516cb86251f1055cc4e1a9440771 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. Closes: 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}" -x -o --strip-components 1 \ -f "${DISTDIR}/${f}" || die ;; *) -- 2.16.0