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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Timothy Sample <samplet <at> ngyro.com>
Subject: bug#52828: closed (Re: bug#52828: [PATCH] Fix Disarchive fallback
 on Guix System)
Date: Mon, 17 Jan 2022 01:01:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#52828: [PATCH] Fix Disarchive fallback on Guix System

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 52828 <at> debbugs.gnu.org.

-- 
52828: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52828
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Timothy Sample <samplet <at> ngyro.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 52828-done <at> debbugs.gnu.org
Subject: Re: bug#52828: [PATCH] Fix Disarchive fallback on Guix System
Date: Sun, 16 Jan 2022 20:00:24 -0500
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hmm yes, I guess you’re right, I prefer the initial patch after all.
> (In particular I’m not keen on adding things to (guix config).)
>
> Go for it?

Pushed as 3b6755defe44c4795e134a46a7ef7b6009146872.

> Longer-term, I think it would still be interesting to migrate to
> Guile-Zlib + Disarchive/Gash-Utils, but we can check that later—better
> fix the Disarchive fallback first.

For sure.  Changing it to use zlib was pretty easy.  Sadly, neither of
those tarball libraries are slam dunks for Guix as of today.

> Thanks and sorry for the hesitations!

No worries.  Thanks very much for the review!  :)


-- Tim

[Message part 3 (message/rfc822, inline)]
From: Timothy Sample <samplet <at> ngyro.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] Fix Disarchive fallback on Guix System
Date: Mon, 27 Dec 2021 13:39:28 -0500
[Message part 4 (text/plain, inline)]
Hi everyone,

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?


-- Tim

[0001-services-guix-Add-tar-and-gzip-to-PATH.patch (text/x-patch, inline)]
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.
---
 gnu/services/base.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 88869e40d2..2fad07097b 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -55,7 +55,8 @@ (define-module (gnu services base)
                 #:select (alsa-utils crda eudev e2fsprogs fuse gpm kbd lvm2 rng-tools))
   #:use-module (gnu packages bash)
   #:use-module ((gnu packages base)
-                #:select (coreutils glibc glibc-utf8-locales))
+                #:select (coreutils glibc glibc-utf8-locales tar))
+  #:use-module ((gnu packages compression) #:select (gzip))
   #:autoload   (gnu packages guile-xyz) (guile-netlink)
   #:autoload   (gnu packages hurd) (hurd)
   #:use-module (gnu packages package-management)
@@ -1709,7 +1710,14 @@ (define (guix-shepherd-service config)
                                  (string-append "GUIX_LOCPATH="
                                                 #$glibc-utf8-locales
                                                 "/lib/locale")
-                                 "LC_ALL=en_US.utf8")
+                                 "LC_ALL=en_US.utf8"
+                                 ;; Make 'tar' and 'gzip' available so
+                                 ;; that 'guix perform-download' can use
+                                 ;; them when downloading from Software
+                                 ;; Heritage via '(guix swh)'.
+                                 (string-append "PATH="
+                                                #$(file-append tar "/bin") ":"
+                                                #$(file-append gzip "/bin")))
                            (if proxy
                                (list (string-append "http_proxy=" proxy)
                                      (string-append "https_proxy=" proxy))
-- 
2.34.0


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

Previous Next


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