1 |
On Sun, 2018-01-21 at 00:26 +0000, Sergei Trofimovich wrote: |
2 |
> Fixes build failures in unprivileged containers like bug #645182: |
3 |
> Package: dev-python/pycparser-2.14 |
4 |
> >>> Unpacking source... |
5 |
> tar: CHANGES: Cannot change ownership to uid 1000, gid 1000: |
6 |
> Invalid argument |
7 |
> |
8 |
> In such containers uid=0 can't really change file ownership. |
9 |
> |
10 |
> Closes: https://bugs.gentoo.org/645182 |
11 |
> Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
12 |
> --- |
13 |
> eclass/vcs-snapshot.eclass | 3 ++- |
14 |
> 1 file changed, 2 insertions(+), 1 deletion(-) |
15 |
> |
16 |
> diff --git a/eclass/vcs-snapshot.eclass b/eclass/vcs-snapshot.eclass |
17 |
> index 3eff6995fae..2b3f73897ce 100644 |
18 |
> --- a/eclass/vcs-snapshot.eclass |
19 |
> +++ b/eclass/vcs-snapshot.eclass |
20 |
> @@ -67,7 +67,8 @@ vcs-snapshot_src_unpack() { |
21 |
> # XXX: check whether the directory |
22 |
> structure inside is |
23 |
> # fine? i.e. if the tarball has |
24 |
> actually a parent dir. |
25 |
> mkdir "${destdir}" || die |
26 |
> - tar -C "${destdir}" -x --strip- |
27 |
> components 1 \ |
28 |
> + # -o (--no-same-owner) to avoid |
29 |
> restoring original owner |
30 |
> + tar -C "${destdir}" -x -o --strip- |
31 |
> components 1 \ |
32 |
> -f "${DISTDIR}/${f}" || die |
33 |
> ;; |
34 |
> *) |
35 |
|
36 |
Also, ultra-bikeshed: I think using "Signed-off-by" with yourself in it |
37 |
is generally frowned upon and adds no real value. |