public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Sergei Trofimovich <slyfox@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: mgorny@gentoo.org, Sergei Trofimovich <slyfox@gentoo.org>
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	[thread overview]
Message-ID: <20180121002650.20876-1-slyfox@gentoo.org> (raw)
In-Reply-To: <1516494134.1103.4.camel@gentoo.org>

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 <slyfox@gentoo.org>
---
 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



  reply	other threads:[~2018-01-21  0:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-21  0:13 [gentoo-dev] [PATCH] vcs-snapshot.eclass: set -o (--no-same-owner) when unpacking, bug #645182 Sergei Trofimovich
2018-01-21  0:22 ` Michał Górny
2018-01-21  0:26   ` Sergei Trofimovich [this message]
2018-01-21  0:33     ` [gentoo-dev] [PATCH v2] " David Seifert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180121002650.20876-1-slyfox@gentoo.org \
    --to=slyfox@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=mgorny@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox