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 11D441382C5 for ; Sun, 21 Jan 2018 00:33:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2BBD1E0894; Sun, 21 Jan 2018 00:33:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 CC0FEE081E for ; Sun, 21 Jan 2018 00:33:30 +0000 (UTC) Received: from [192.168.42.11] (cable-static-238-109.teleport.ch [213.188.238.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: soap) by smtp.gentoo.org (Postfix) with ESMTPSA id 26E28335C5A for ; Sun, 21 Jan 2018 00:33:28 +0000 (UTC) Message-ID: <1516494804.10394.0.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH v2] vcs-snapshot.eclass: set -o (--no-same-owner) when unpacking, bug #645182 From: David Seifert To: gentoo-dev@lists.gentoo.org Date: Sun, 21 Jan 2018 01:33:24 +0100 In-Reply-To: <20180121002650.20876-1-slyfox@gentoo.org> References: <1516494134.1103.4.camel@gentoo.org> <20180121002650.20876-1-slyfox@gentoo.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.24.6 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 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Archives-Salt: f44379f5-b7a8-46e3-ad08-1c5e41a37134 X-Archives-Hash: 90dec574fcc25c1170d04aafcfc58ae3 On Sun, 2018-01-21 at 00:26 +0000, Sergei Trofimovich wrote: > 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 > ;; > *) Also, ultra-bikeshed: I think using "Signed-off-by" with yourself in it is generally frowned upon and adds no real value.