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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Timothy Sample <samplet@HIDDEN>; Keywords: patch; dated Mon, 27 Dec 2021 18:40:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.
Added indication that bug 52828 blocks53214 Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 52828 <at> debbugs.gnu.org:


Received: (at 52828) by debbugs.gnu.org; 5 Jan 2022 20:54:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 05 15:54:13 2022
Received: from localhost ([127.0.0.1]:38994 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n5DIT-0004xI-2N
	for submit <at> debbugs.gnu.org; Wed, 05 Jan 2022 15:54:13 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:44146)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1n5DIR-0004x4-7D
 for 52828 <at> debbugs.gnu.org; Wed, 05 Jan 2022 15:54:11 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 7B8882C1;
 Wed,  5 Jan 2022 21:54:04 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id mxJJt4LJyGwV; Wed,  5 Jan 2022 21:54:03 +0100 (CET)
Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 4E5CB112;
 Wed,  5 Jan 2022 21:54:03 +0100 (CET)
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Timothy Sample <samplet@HIDDEN>
Subject: Re: bug#52828: [PATCH] Fix Disarchive fallback on Guix System
References: <877dbpuc2n.fsf@HIDDEN>
Date: Wed, 05 Jan 2022 21:54:02 +0100
In-Reply-To: <877dbpuc2n.fsf@HIDDEN> (Timothy Sample's message of "Mon, 27
 Dec 2021 13:39:28 -0500")
Message-ID: <87mtk9kiol.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spamd-Bar: /
Authentication-Results: hera.aquilenet.fr;
	none
X-Rspamd-Server: hera
X-Rspamd-Queue-Id: 7B8882C1
X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[];
 RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2];
 FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[];
 TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain];
 FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];
 RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[];
 MID_RHS_MATCH_FROM(0.00)[]
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 52828
Cc: 52828 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

Hi Timothy,

Timothy Sample <samplet@HIDDEN> skribis:

> I noticed recently that Disarchive fallback does not work on Guix
> System.  This is because the =E2=80=98(guix swh)=E2=80=99 module shells o=
ut to =E2=80=98tar=E2=80=99 to
> extract the tarball that it downloads from SWH.  However, when used as
> part of =E2=80=98guix perform-download=E2=80=99 via the daemon, =E2=80=98=
tar=E2=80=99 is not available.
> AFAICS, that the daemon is run with no =E2=80=98PATH=E2=80=99 at all.
>
> You can confirm this by running (on Guix System):
>
>     $ GUIX_DOWNLOAD_FALLBACK_TEST=3Ddisarchive-mirrors \
>           guix build --check -S python-flask
>
> You should see:
>
>     [...]
>     Downloading [...] from Software Heritage...
>     In procedure fport_write: Broken pipe
>     [...]
>
> This patch adds =E2=80=98tar=E2=80=99 and =E2=80=98gzip=E2=80=99 to the d=
aemon=E2=80=99s =E2=80=98PATH=E2=80=99.  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@HIDDEN>
> 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=E2=80=99d feel more comfortable with a solution at the package level.  In=
 the
=E2=80=98guix=E2=80=99 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=E2=80=99d 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=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#52828; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Dec 2021 18:39:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 27 13:39:42 2021
Received: from localhost ([127.0.0.1]:44275 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1n1uuM-0004fm-Jl
	for submit <at> debbugs.gnu.org; Mon, 27 Dec 2021 13:39:42 -0500
Received: from lists.gnu.org ([209.51.188.17]:48998)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <samplet@HIDDEN>) id 1n1uuK-0004fe-RD
 for submit <at> debbugs.gnu.org; Mon, 27 Dec 2021 13:39:41 -0500
Received: from eggs.gnu.org ([209.51.188.92]:53722)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <samplet@HIDDEN>) id 1n1uuK-0004GH-Bb
 for guix-patches@HIDDEN; Mon, 27 Dec 2021 13:39:40 -0500
Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:47933)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <samplet@HIDDEN>) id 1n1uuH-0005tw-U6
 for guix-patches@HIDDEN; Mon, 27 Dec 2021 13:39:39 -0500
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44])
 by mailout.west.internal (Postfix) with ESMTP id E73AB3200645
 for <guix-patches@HIDDEN>; Mon, 27 Dec 2021 13:39:29 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute4.internal (MEProxy); Mon, 27 Dec 2021 13:39:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm1; bh=VDALH5f5JIJ96Ef/cQRHRlevtdw8i
 /1fF1jq57bBEbY=; b=j5H2tLddtJ8OMYdRhBLiccfqSf4tM+EHuErFyAgGupg1h
 LvHcxLDTGakLyGbbKisa7vCgeNL9qTM1/T2iD6et9NJxPEo8Ywm1zzLcfL/hlL7n
 aVg7k7lovv4/xSJzS7VC0XrpBd5BZfd88jaH3B+QQJSJiBlEnjGYdZj/wZGwDcuL
 RoTWzcKP0IjxcqiWQsddzmy1WyBqBb+325EWuueUhrqze7kPUP0B0XLLsqCaQc2H
 m0DMkPozPmt3sMV6UrXynStzm/WKYHBGz14MKpWwFAYR+QlFzqD0h0zAEq0Uvx6a
 vcHi5XOtrJLuyiEX3a9SyAU98S+EF8ApQpTBaa2Qg==
X-ME-Sender: <xms:YQjKYVajHHfEXpB3mybl9M30Hnq0P319IArtMSdgzny0CjL3j5q5Dw>
 <xme:YQjKYcbrLuEld28-K-thMKmxxPKkHvHqZ9gqxV2kU2MHvBlVeCRdS48dmbyrqKmg9
 l2fZ2mp9N0u5xdM1Q>
X-ME-Received: <xmr:YQjKYX-ftg6HXWzLa5VPXJU3fS6mQR6OKaDspdKlrnCgzMSO3vpPGBM7UR_Oc86oHO7fyO9xUtCltoX0lCwXaw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddujedguddtgecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgfgggtsehmtderre
 dtreejnecuhfhrohhmpefvihhmohhthhihucfurghmphhlvgcuoehsrghmphhlvghtsehn
 ghihrhhordgtohhmqeenucggtffrrghtthgvrhhnpedvleelvdeiffffudefhfffhfekke
 fggfeftddugefhudegtdeklefggeffledvtdenucevlhhushhtvghrufhiiigvpedtnecu
 rfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmphhlvghtsehnghihrhhordgtohhm
X-ME-Proxy: <xmx:YQjKYTpvBceqgb1DWVWe_JClsnurmB_0ncMA6w93A5GikLcJx3Lh1A>
 <xmx:YQjKYQo8-rDoZvrj2cn63WTyMrEOIntC7mHtD2fh_Qwqxxn4pJdxdg>
 <xmx:YQjKYZQom7KEJdKbyiu8NzjsJwjp9fvKqLldnnSXtZd19ar_49DxEg>
 <xmx:YQjKYWGR3qhj4990z1ehLFbn9yOStfGgzoifTu8tfqYXLzdCGnnJnQ>
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <guix-patches@HIDDEN>; Mon, 27 Dec 2021 13:39:29 -0500 (EST)
From: Timothy Sample <samplet@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] Fix Disarchive fallback on Guix System
Date: Mon, 27 Dec 2021 13:39:28 -0500
Message-ID: <877dbpuc2n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=64.147.123.20; envelope-from=samplet@HIDDEN;
 helo=wout4-smtp.messagingengine.com
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.7 (--)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi everyone,

I noticed recently that Disarchive fallback does not work on Guix
System.  This is because the =E2=80=98(guix swh)=E2=80=99 module shells out=
 to =E2=80=98tar=E2=80=99 to
extract the tarball that it downloads from SWH.  However, when used as
part of =E2=80=98guix perform-download=E2=80=99 via the daemon, =E2=80=98ta=
r=E2=80=99 is not available.
AFAICS, that the daemon is run with no =E2=80=98PATH=E2=80=99 at all.

You can confirm this by running (on Guix System):

    $ GUIX_DOWNLOAD_FALLBACK_TEST=3Ddisarchive-mirrors \
          guix build --check -S python-flask

You should see:

    [...]
    Downloading [...] from Software Heritage...
    In procedure fport_write: Broken pipe
    [...]

This patch adds =E2=80=98tar=E2=80=99 and =E2=80=98gzip=E2=80=99 to the dae=
mon=E2=80=99s =E2=80=98PATH=E2=80=99.  To me, this is
the most straight-forward way to fix the issue, but there are others.
Any opinions?


-- Tim


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-services-guix-Add-tar-and-gzip-to-PATH.patch

From 2893252c16f3e447eccd0f8d216bfb44b1965c43 Mon Sep 17 00:00:00 2001
From: Timothy Sample <samplet@HIDDEN>
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


--=-=-=--




Acknowledgement sent to Timothy Sample <samplet@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#52828; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 13 Jan 2022 11:00:02 UTC

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