unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Timothy Sample <samplet@ngyro.com>
Cc: 52828@debbugs.gnu.org
Subject: [bug#52828] [PATCH] Fix Disarchive fallback on Guix System
Date: Wed, 05 Jan 2022 21:54:02 +0100	[thread overview]
Message-ID: <87mtk9kiol.fsf@gnu.org> (raw)
In-Reply-To: <877dbpuc2n.fsf@ngyro.com> (Timothy Sample's message of "Mon, 27 Dec 2021 13:39:28 -0500")

Hi Timothy,

Timothy Sample <samplet@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@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’.




  reply	other threads:[~2022-01-05 20:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-27 18:39 [bug#52828] [PATCH] Fix Disarchive fallback on Guix System Timothy Sample
2022-01-05 20:54 ` Ludovic Courtès [this message]
2022-01-15 15:33   ` [bug#52828] [PATCH v2] swh: Do not rely on $PATH for tar and gzip Timothy Sample
2022-01-15 21:33     ` [bug#52828] [PATCH] Fix Disarchive fallback on Guix System Ludovic Courtès
2022-01-17  1:00       ` bug#52828: " Timothy Sample
2022-01-17 13:11         ` [bug#52828] " Ludovic Courtès

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtk9kiol.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=52828@debbugs.gnu.org \
    --cc=samplet@ngyro.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).