From: John Keeping <john@metanate.com>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] support/download/git: disable global & system config
Date: Mon, 15 Aug 2022 15:24:20 +0100 [thread overview]
Message-ID: <YvpXFD8jFf2qtBb5@donbot> (raw)
In-Reply-To: <20220815114143.GV2854108@scaer>
On Mon, Aug 15, 2022 at 01:41:43PM +0200, Yann E. MORIN wrote:
> On 2022-08-15 11:46 +0100, John Keeping spake thusly:
> > On Sun, Aug 14, 2022 at 12:11:43AM +0200, Yann E. MORIN wrote:
> > > On 2022-08-11 14:45 +0100, John Keeping spake thusly:
> > > > The build environment should be isolated from the host system as much as
> > > > possible to keep the build reproducible. Git's global config (usually
> > > > ~/.gitconfig) and system config (/etc/gitconfig) can affect the
> > > > behaviour of all Git operations, so should be disabled.
> > > While I appreciate the reasoning and example, there are valid cases
> > > where we do want to use (at least) the user's settings, [...]
> > What do you thing about adding a config option to specify the global
> > gitconfig file to use?
> [--SNIP--]
> > eval ${BR2_GIT_CONFIG_GLOBAL:+GIT_CONFIG_GLOBAL=\'${BR2_GIT_CONFIG_GLOBAL}\'} \
> > GIT_DIR="${git_cache}/.git" ${GIT} "${@}"
>
> Honestly, I don't think the issue warrants extra complexity.
>
> For your git-lfs example, we would notice a missing FO_GIT_LFS fairly
> quickly, thanks to the autobuilders. So this is not a big issue for
> packages in upstream Buildroot; for br2-external trees, this is most
> probably not an issue either: either all developpers ona project have
> the same settings, or they are using a sane build environment, or they
> would also notice, so this is not very important.
>
> Hwever, there are settings that we would probably want to always
> disable, like line-ending mangling (core.autocrlf or gitattributes) or
> other keyword replacement (gitattributes 'ident' or 'filter'...). But
> then, we haven't had much report about such failures, if at all, so this
> does not look like a problem in practice.
>
> So, I still don't think we need to add complexity to solve this issue.
> If we can get something really simple, that's OK, but no nuclear
> powerplant please. ;-)
I think the above is as simple as it gets, the only alternative I can
see is explicit listing either permitted or banned config variables.
But it turns out that $GIT_CONFIG_GLOBAL was only added last year (in
Git v2.32) so it's not available everywhere yet and we can't rely on the
installed Git supporting this.
I'm dropping this now because it looks like the complexity is going to
outweigh the benefit for any approach that doesn't use
$GIT_CONFIG_GLOBAL.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2022-08-15 14:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 13:45 [Buildroot] [PATCH] support/download/git: disable global & system config John Keeping
2022-08-13 22:11 ` Yann E. MORIN
2022-08-15 10:46 ` John Keeping
2022-08-15 11:41 ` Yann E. MORIN
2022-08-15 14:24 ` John Keeping [this message]
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=YvpXFD8jFf2qtBb5@donbot \
--to=john@metanate.com \
--cc=buildroot@buildroot.org \
--cc=yann.morin.1998@free.fr \
/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