GNU bug report logs - #52828
[PATCH] Fix Disarchive fallback on Guix System

Previous Next

Package: guix-patches;

Reported by: Timothy Sample <samplet <at> ngyro.com>

Date: Mon, 27 Dec 2021 18:40:01 UTC

Severity: normal

Tags: patch

Done: Timothy Sample <samplet <at> ngyro.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 52828 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Timothy Sample <samplet <at> ngyro.com>
Cc: 52828 <at> debbugs.gnu.org
Subject: Re: bug#52828: [PATCH] Fix Disarchive fallback on Guix System
Date: Wed, 05 Jan 2022 21:54:02 +0100
Hi Timothy,

Timothy Sample <samplet <at> ngyro.com> skribis:

> I noticed recently that Disarchive fallback does not work on Guix
> System.  This is because the ‘(guix swh)’ module shells out to ‘tar’ to
> extract the tarball that it downloads from SWH.  However, when used as
> part of ‘guix perform-download’ via the daemon, ‘tar’ is not available.
> AFAICS, that the daemon is run with no ‘PATH’ at all.
>
> You can confirm this by running (on Guix System):
>
>     $ GUIX_DOWNLOAD_FALLBACK_TEST=disarchive-mirrors \
>           guix build --check -S python-flask
>
> You should see:
>
>     [...]
>     Downloading [...] from Software Heritage...
>     In procedure fport_write: Broken pipe
>     [...]
>
> This patch adds ‘tar’ and ‘gzip’ to the daemon’s ‘PATH’.  To me, this is
> the most straight-forward way to fix the issue, but there are others.
> Any opinions?
>
>>From 2893252c16f3e447eccd0f8d216bfb44b1965c43 Mon Sep 17 00:00:00 2001
> From: Timothy Sample <samplet <at> ngyro.com>
> Date: Thu, 23 Dec 2021 22:32:07 -0500
> Subject: [PATCH] services: guix: Add tar and gzip to PATH.
>
> * gnu/services/base.scm (guix-shepherd-service): Add the PATH
> environment-variable and populate it with tar and gzip.

What about uses of guix-daemon on other distros?  Perhaps we assume tar
and gzip are already on PATH?

I’d feel more comfortable with a solution at the package level.  In the
‘guix’ package, or perhaps in a Makefile.am, we could hard-code absolute
file names of tar and gzip in (guix scripts perform-download) and set
PATH from there.  We’d need to do the same in (guix self) though.

Alternatively, we could change (guix swh) to use Guile-Zlib and the tar
implementation of Gash-Utils or that of Disarchive.

WDYT?

Thanks,
Ludo’.




This bug report was last modified 3 years and 188 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.