Gentoo Archives: gentoo-dev

From: Florian Schmaus <flow@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] git-r3.eclass: Add checkout dirs as "safe" directories
Date: Sun, 06 Nov 2022 11:20:06
Message-Id: 45c9b655-d96c-b1cc-d11c-941fc5958dbf@gentoo.org
In Reply to: [gentoo-dev] [PATCH] git-r3.eclass: Add checkout dirs as "safe" directories by "Michał Górny"
1 On 06.11.22 12:03, Michał Górny wrote:
2 > Mark all checkout directories as "safe" to avoid dubious ownership
3 > errors with newer git versions when the checkout directory is accessed
4 > from src_install().
5 >
6 > Bug: https://bugs.gentoo.org/879353
7 > Signed-off-by: Michał Górny <mgorny@g.o>
8 > ---
9 > eclass/git-r3.eclass | 5 +++++
10 > 1 file changed, 5 insertions(+)
11 >
12 > diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass
13 > index 59d4f9a0038f..bdb28565e2f9 100644
14 > --- a/eclass/git-r3.eclass
15 > +++ b/eclass/git-r3.eclass
16 > @@ -887,6 +887,11 @@ git-r3_checkout() {
17 > cp "${orig_repo}"/packed-refs "${GIT_DIR}"/packed-refs || die
18 > fi
19 >
20 > + # mark this directory as "safe" so that src_install() can access it
21 > + # https://bugs.gentoo.org/879353
22 > + git config --global --add safe.directory \
23 > + "$(cd "${out_dir}" && echo "${PWD}")" || die
24
25 I guess there is no way we can avoid the --global and use --local instead?
26
27 - Flow

Replies