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 55A731382C5 for ; Sun, 21 Jan 2018 00:22:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D4DDFE0894; Sun, 21 Jan 2018 00:22:20 +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 83273E087C for ; Sun, 21 Jan 2018 00:22:20 +0000 (UTC) Received: from pomiot (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 4B72B335C5A; Sun, 21 Jan 2018 00:22:18 +0000 (UTC) Message-ID: <1516494134.1103.4.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH] vcs-snapshot.eclass: set -o (--no-same-owner) when unpacking, bug #645182 From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: Sergei Trofimovich Date: Sun, 21 Jan 2018 01:22:14 +0100 In-Reply-To: <20180121001304.26280-1-slyfox@gentoo.org> References: <20180121001304.26280-1-slyfox@gentoo.org> Organization: Gentoo 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: 8bit X-Archives-Salt: 143dfa76-4256-4398-83a6-39b20d73fef8 X-Archives-Hash: 6f5f095d139e21a5b6840f285b2f8721 W dniu nie, 21.01.2018 o godzinie 00∶13 +0000, użytkownik Sergei Trofimovich napisał: > 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 You can close it ;-). > 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 \ Well, I'd personally prefer '-x -o' because every other option is separate right now, and this one is easy to miss then. > -f "${DISTDIR}/${f}" || die > ;; > *) -- Best regards, Michał Górny