GNU bug report logs -
#65866
[PATCH 0/8] Add built-in builder for Git checkouts
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Mon, 11 Sep 2023 14:25:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#65866: [PATCH 0/8] Add built-in builder for Git checkouts
which was filed against the guix-patches package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 65866 <at> debbugs.gnu.org.
--
65866: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65866
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hi,
Simon Tournier <zimon.toutoune <at> gmail.com> skribis:
> Re,
>
> On Mon, 25 Sep 2023 at 11:23, Ludovic Courtès <ludo <at> gnu.org> wrote:
>
>>>> + "Return a fixed-output derivation without any dependency that performs a Git
>>>> +checkout of REF, using the \"builtin:git-download\" derivation builder."
>>>
>>> I do not understand what means “without any dependency” here.
>>
>> It means the derivation does not depend on anything (it has zero
>> “sources” and zero “input derivations”). That’s fundamental here, which
>> is why I made it explicit.
>
> For instance, in ’built-in-download’, the docstring reads:
>
> This is an \"out-of-band\" download in that the returned derivation does not
> explicitly depend on Guile, GnuTLS, etc. Instead, the daemon performs the
> download by itself using its own dependencies.
>
> which I find “clearer” than “without any dependency”.
Yes, good idea.
I changed the docstring as you suggest and pushed the whole thing:
ba21eeb565 tests: Assume ‘git’ is always available.
13b0cf85eb git-download: Use “builtin:git-download” when available.
c4a1d69a69 perform-download: Use the ‘git’ command captured at configure time.
f651a35969 build: Add dependency on Git.
95f2123135 daemon: Add “git-download” built-in builder.
9d0e2002a5 perform-download: Remove unused one-argument clause.
c7ed1e0160 git-download: Honor the ‘GUIX_DOWNLOAD_FALLBACK_TEST’ environment variable.
811b249397 git-download: Move fallback code to (guix build git).
I’ll update the ‘guix’ package soon so we can start using the new
builtin.
Thanks to the two of you!
Ludo’.
[Message part 3 (message/rfc822, inline)]
Hello Guix!
This patch series is a first step towards getting Git out of
derivation graphs when it’s only used to fetch source code
(origins with ‘git-fetch’), with the goal of fixing:
https://issues.guix.gnu.org/63331
The is similar to how we solved the problem for regular file
downloads: we add a new “builtin:git-download” builder for
derivations, which is implemented on the daemon size by the
‘guix perform-download’ helper. That command uses the same
code that is currently used by ‘git-fetch’.
Eventually, when users are all running recent versions of
‘guix-daemon’ with support for “builtin:git-download” (2–4
years from now?), we’ll be able to use “builtin:git-download”
unconditionally and thus be sure there are no risks of
derivation cycles.
Note that the patch series adds a hard dependency on Git.
This is because the existing ‘git-fetch’ code depends on Git,
which is itself motivated by the fact that Git supports
shallow clones and libgit2/Guile-Git doesn’t.
As a side effect, this dependency will prove useful to
address <https://issues.guix.gnu.org/65720>.
Thoughts?
Ludo’.
Ludovic Courtès (8):
git-download: Move fallback code to (guix build git).
git-download: Honor the ‘GUIX_DOWNLOAD_FALLBACK_TEST’ environment
variable.
perform-download: Remove unused one-argument clause.
daemon: Add “git-download” built-in builder.
build: Add dependency on Git.
perform-git-download: Use the ‘git’ command captured at configure
time.
git-download: Use “builtin:git-download” when available.
tests: Assume ‘git’ is always available.
configure.ac | 7 ++
doc/guix.texi | 1 +
guix/build/git.scm | 44 ++++++++++-
guix/config.scm.in | 6 +-
guix/git-download.scm | 122 ++++++++++++++++++------------
guix/scripts/perform-download.scm | 59 +++++++++++----
guix/self.scm | 10 ++-
nix/libstore/builtins.cc | 5 +-
tests/builders.scm | 29 ++++++-
tests/channels.scm | 7 +-
tests/derivations.scm | 94 ++++++++++++++++++++++-
tests/git-authenticate.scm | 1 -
tests/git.scm | 10 ---
tests/import-git.scm | 18 -----
14 files changed, 308 insertions(+), 105 deletions(-)
base-commit: a4c35c607cfd7d6b0bad90cfcc46188d489e1754
--
2.41.0
This bug report was last modified 1 year and 201 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.