[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66305: Error with recursive git checkout
From: |
Ludovic Courtès |
Subject: |
bug#66305: Error with recursive git checkout |
Date: |
Wed, 04 Oct 2023 18:25:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hello,
Simon Tournier <zimon.toutoune@gmail.com> skribis:
> On Mon, 02 Oct 2023 at 11:17, Guillaume Le Vaillant <glv@posteo.net> wrote:
>
>> With Guix at 47d0346553fdad9795c9390a60944ccaad7e5255, I'm unable to
>> build a package (see attached patch) requiring a recursive git-fetch to
>> get the sources:
>
> [...]
>
>> HEAD is now at 41ef634 Revert "libbladeRF: update compatibility for FPGA
>> v0.15.0 from libbladeRF 2.4.0 to 2.5.0"
>> /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-submodule:
>> line 7: basename: command not found
>> /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-submodule:
>> line 7: sed: command not found
>> /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-sh-setup:
>> line 77: basename: command not found
>> /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-sh-setup:
>> line 77: sed: command not found
>> /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-sh-setup:
>> line 292: uname: command not found
>> /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-submodule:
>> line 613: sed: command not found
>> /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-core/git-submodule:
>> line 613: cmd_: command not found
>> git-fetch:
>> '/gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/bin/git
>> submodule update --init --recursive' failed with exit code 127
>
> It looks very similar as bug#65924:
>
> bug#65924: git searches coreutils and util-linux commands in PATH
> Maxim Cournoyer <maxim.cournoyer@gmail.com>
D’oh! Thanks Simon and Guillaume for the heads-up (I had totally
overlooked that you raised this during the review, Simon; my bad).
Here’s a patch that fixes it for me:
diff --git a/guix/scripts/perform-download.scm
b/guix/scripts/perform-download.scm
index 045dd84ad6..c869f19502 100644
--- a/guix/scripts/perform-download.scm
+++ b/guix/scripts/perform-download.scm
@@ -108,6 +108,10 @@ (define* (perform-git-download drv output
(drv-output (assoc-ref (derivation-outputs drv) "out"))
(algo (derivation-output-hash-algo drv-output))
(hash (derivation-output-hash drv-output)))
+ ;; Commands such as 'git submodule' expect Coreutils and sed (among
+ ;; others) to be in $PATH.
+ (setenv "PATH" "/run/current-system/profile/bin:/bin:/usr/bin")
+
(git-fetch-with-fallback url commit output
#:recursive? recursive?
#:git-command %git))))
To test it, you need to run the daemon from your checkout, with
something like:
sudo herd stop guix-daemon
sudo -E ./pre-inst-env guix-daemon --build-users-group=guixbuild &
(Once we’ve applied the fix, we’ll have to update the ‘guix’ package.)
I think we should eventually our ‘git’ package as discussed in
<https://issues.guix.gnu.org/65924>, but that won’t help on foreign
distros anyway, hence the fix above.
WDYT?
Ludo’.
- bug#66305: Error with recursive git checkout, Guillaume Le Vaillant, 2023/10/02
- bug#66305: Error with recursive git checkout, Guillaume Le Vaillant, 2023/10/02
- bug#66305: Error with recursive git checkout, Simon Tournier, 2023/10/03
- bug#66305: Error with recursive git checkout,
Ludovic Courtès <=
- bug#66305: Error with recursive git checkout, Simon Tournier, 2023/10/04
- bug#66305: Error with recursive git checkout, Simon Tournier, 2023/10/04
- bug#66305: Error with recursive git checkout, Ludovic Courtès, 2023/10/05
- bug#66305: Error with recursive git checkout, Ludovic Courtès, 2023/10/05
- bug#66305: Error with recursive git checkout, Ludovic Courtès, 2023/10/12
bug#66305: Error with recursive git checkout, Alexis Simon, 2023/10/26
bug#66305: Error with recursive git checkout, Alexis Simon, 2023/10/26
bug#66305: Error with recursive git checkout, Alexis Simon, 2023/10/26