* [gentoo-dev] [PATCH] vcs-snapshot.eclass: set -o (--no-same-owner) when unpacking, bug #645182
@ 2018-01-21 0:13 Sergei Trofimovich
2018-01-21 0:22 ` Michał Górny
0 siblings, 1 reply; 4+ messages in thread
From: Sergei Trofimovich @ 2018-01-21 0:13 UTC (permalink / raw
To: gentoo-dev; +Cc: mgorny, Sergei Trofimovich
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 <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}" -xo --strip-components 1 \
-f "${DISTDIR}/${f}" || die
;;
*)
--
2.16.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH] vcs-snapshot.eclass: set -o (--no-same-owner) when unpacking, bug #645182
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 ` [gentoo-dev] [PATCH v2] " Sergei Trofimovich
0 siblings, 1 reply; 4+ messages in thread
From: Michał Górny @ 2018-01-21 0:22 UTC (permalink / raw
To: gentoo-dev; +Cc: Sergei Trofimovich
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 <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}" -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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-dev] [PATCH v2] vcs-snapshot.eclass: set -o (--no-same-owner) when unpacking, bug #645182
2018-01-21 0:22 ` Michał Górny
@ 2018-01-21 0:26 ` Sergei Trofimovich
2018-01-21 0:33 ` David Seifert
0 siblings, 1 reply; 4+ messages in thread
From: Sergei Trofimovich @ 2018-01-21 0:26 UTC (permalink / raw
To: gentoo-dev; +Cc: mgorny, Sergei Trofimovich
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH v2] vcs-snapshot.eclass: set -o (--no-same-owner) when unpacking, bug #645182
2018-01-21 0:26 ` [gentoo-dev] [PATCH v2] " Sergei Trofimovich
@ 2018-01-21 0:33 ` David Seifert
0 siblings, 0 replies; 4+ messages in thread
From: David Seifert @ 2018-01-21 0:33 UTC (permalink / raw
To: gentoo-dev
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 <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
> ;;
> *)
Also, ultra-bikeshed: I think using "Signed-off-by" with yourself in it
is generally frowned upon and adds no real value.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-21 0:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [gentoo-dev] [PATCH v2] " Sergei Trofimovich
2018-01-21 0:33 ` David Seifert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox