GNU bug report logs - #58017
[PATCH 0/2] Retry nar downloads upon failure

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: Ludovic Courtès <ludo@HIDDEN>; Keywords: patch; Done: Ludovic Courtès <ludo@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 58017-done <at> debbugs.gnu.org:


Received: (at 58017-done) by debbugs.gnu.org; 28 Sep 2022 21:25:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 28 17:25:03 2022
Received: from localhost ([127.0.0.1]:35050 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1odeYB-0004y2-6p
	for submit <at> debbugs.gnu.org; Wed, 28 Sep 2022 17:25:03 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37050)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1odeY4-0004wy-4C; Wed, 28 Sep 2022 17:24:56 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40132)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1odeXy-0007QK-D5; Wed, 28 Sep 2022 17:24:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=BeP3M2GVP+R0tvyYPHKRqGRKuzk6Z3HFNm6o7oho2+4=; b=sXkfaqzgs12icuv+GLlA
 ru1j/Tm6ZdM0tJ1mTuvt+Iu8LgvR39DydvjHfVFWgGv70bqLui/epkTscGXNiIHOXZ4V2sgA+pIB5
 KeTanOGPqAcgDKauX0vhp8CZVDQNuDWtsNl0tQiyIjEfXM7H3zNjme2npjysXouP7BfCQs3XnPoI9
 Y4pIDILaN2o9eetGNxF96tZlY9gN0CuzgUs/JixvG1/LyULwdseO/OzOfT39nsArsGGC0S2vQt/Ct
 mMJw6eKTN8tEu1IaPcdu7C4kjt6YaJ/rzWEXkc/MmHkUja4TTG5j6131isf+ZyKLakUHA0wC5w7j4
 BgRMHuRgPoemfw==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:60820
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1odeXx-0007Dz-Qd; Wed, 28 Sep 2022 17:24:50 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 58017-done <at> debbugs.gnu.org
Subject: Re: bug#58017: [PATCH 0/2] Retry nar downloads upon failure
References: <875yhfivub.fsf@HIDDEN> <20220923061616.5453-1-ludo@HIDDEN>
Date: Wed, 28 Sep 2022 23:24:42 +0200
In-Reply-To: <20220923061616.5453-1-ludo@HIDDEN> ("Ludovic =?utf-8?Q?Cour?=
 =?utf-8?Q?t=C3=A8s=22's?= message
 of "Fri, 23 Sep 2022 08:16:16 +0200")
Message-ID: <87leq3dwf9.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58017-done
Cc: Attila Lendvai <attila@HIDDEN>, 57978-done <at> debbugs.gnu.org,
 zimoun <zimon.toutoune@HIDDEN>
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: -3.3 (---)

Hi,

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

>   substitute: Split nar download.
>   substitute: Retry downloading when a nar is unavailable.

Pushed as 8bd4126917f59f4af9a4323c3d5699201862dca2.  The =E2=80=98guix=E2=
=80=99 package
has yet to be updated.

Thanks,
Ludo=E2=80=99.




Notification sent to Ludovic Courtès <ludo@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Ludovic Courtès <ludo@HIDDEN>:
You have taken responsibility. Full text available.

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


Received: (at 58017) by debbugs.gnu.org; 24 Sep 2022 17:18:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 24 13:18:27 2022
Received: from localhost ([127.0.0.1]:45187 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oc8nL-0000nX-4U
	for submit <at> debbugs.gnu.org; Sat, 24 Sep 2022 13:18:27 -0400
Received: from andre.telenet-ops.be ([195.130.132.53]:57584)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1oc8nI-0000nG-Vw
 for 58017 <at> debbugs.gnu.org; Sat, 24 Sep 2022 13:18:26 -0400
Received: from [IPV6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]
 ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16])
 by andre.telenet-ops.be with bizsmtp
 id PtJN2801X20ykKC01tJNsJ; Sat, 24 Sep 2022 19:18:23 +0200
Message-ID: <c0e05b63-3773-7350-76c8-15876fd873bc@HIDDEN>
Date: Sat, 24 Sep 2022 19:18:15 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.12.0
Content-Language: en-US
To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= <ludo@HIDDEN>
References: <20220923061957.5658-1-ludo@HIDDEN>
 <20220923061957.5658-2-ludo@HIDDEN>
 <46a88139-3994-71e5-1a78-398d6926ef88@HIDDEN> <87a66o7ndo.fsf@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [bug#58017] [PATCH 2/2] substitute: Retry downloading when a nar
 is unavailable.
In-Reply-To: <87a66o7ndo.fsf@HIDDEN>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="------------1VjPL57oLlwo0EnFQsgE7EZ9"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1664039903; bh=BS/anhtCj3EG0/xlJv4sF5NvKwfd2qTFB5Fd8G9YlYY=;
 h=Date:To:Cc:References:From:Subject:In-Reply-To;
 b=IlWztSoMIRgnTpfkN+WQA3LjpuXD3ccRzOJflLdtc2gA1u4A4e0rKzO9Y5nVhj4rJ
 A7rL5aXTJBH8pVcEAhPwX9YybPZUHAQPODdnWv+WYg78vn6W7Pr4EfB79DM/a3PGAE
 PXhOkZBOpRaBOw2qCNs/jWQHhCZsRULMe0jkfG3rPM9K9Br/Ib7+Cf8hAC+Gc4V/sq
 wwRNI0PUmqF4YIMuczTMUY6l60f75a3tfhTd3jy1iLWLE0Fv1akT9Ep71XROTFtQXR
 L/uSYkO9868kbrbQN8uxmMDlcBP6PSb/MXOQ7PTjC79VFrmykGnheZG8qk3OYcQMar
 Ln1uQKfU6oqAA==
X-Spam-Score: -2.5 (--)
X-Debbugs-Envelope-To: 58017
Cc: 58017 <at> debbugs.gnu.org, 57978 <at> debbugs.gnu.org,
 Attila Lendvai <attila@HIDDEN>, zimoun <zimon.toutoune@HIDDEN>
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: -3.5 (---)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--------------1VjPL57oLlwo0EnFQsgE7EZ9
Content-Type: multipart/mixed; boundary="------------NdBk9XwLdtiKdYdNunK7UDoB";
 protected-headers="v1"
From: Maxime Devos <maximedevos@HIDDEN>
To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= <ludo@HIDDEN>
Cc: 58017 <at> debbugs.gnu.org, Attila Lendvai <attila@HIDDEN>,
 57978 <at> debbugs.gnu.org, zimoun <zimon.toutoune@HIDDEN>
Message-ID: <c0e05b63-3773-7350-76c8-15876fd873bc@HIDDEN>
Subject: Re: [bug#58017] [PATCH 2/2] substitute: Retry downloading when a nar
 is unavailable.
References: <20220923061957.5658-1-ludo@HIDDEN>
 <20220923061957.5658-2-ludo@HIDDEN>
 <46a88139-3994-71e5-1a78-398d6926ef88@HIDDEN> <87a66o7ndo.fsf@HIDDEN>
In-Reply-To: <87a66o7ndo.fsf@HIDDEN>

--------------NdBk9XwLdtiKdYdNunK7UDoB
Content-Type: multipart/mixed; boundary="------------uF0qMxEtD0QcBXQ1L54jEfm0"

--------------uF0qMxEtD0QcBXQ1L54jEfm0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64

DQoNCk9uIDI0LTA5LTIwMjIgMTg6MjIsIEx1ZG92aWMgQ291cnTDqHMgd3JvdGU6DQo+IEhp
IE1heGltZSwNCj4gDQo+IE1heGltZSBEZXZvcyA8bWF4aW1lZGV2b3NAdGVsZW5ldC5iZT4g
c2tyaWJpczoNCj4gDQo+Pj4gKyh0ZXN0LWVxdWFsICJzdWJzdGl0dXRlLCBmaXJzdCBVUkwg
aGFzIG5hcmluZm8gYnV0IG5hciBpcyA0MDQsIGJvdGggVVJMcyBhdXRob3JpemVkIg0KPj4+
ICsgICJTdWJzdGl0dXRhYmxlIGRhdGEuIg0KPj4+ICsgICh3aXRoLW5hcmluZm8qDQo+Pj4g
KyAgICAgIChzdHJpbmctYXBwZW5kICVuYXJpbmZvICJTaWduYXR1cmU6ICINCj4+PiArICAg
ICAgICAgICAgICAgICAgICAgKHNpZ25hdHVyZS1maWVsZCAlbmFyaW5mbykpDQo+Pj4gKyAg
ICAgICVtYWluLXN1YnN0aXR1dGUtZGlyZWN0b3J5DQo+Pj4gKw0KPj4+ICsgICAgKHdpdGgt
aHR0cC1zZXJ2ZXIgYCgoMjAwICwoc3RyaW5nLWFwcGVuZCAlbmFyaW5mbyAiU2lnbmF0dXJl
OiAiDQo+Pj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
IChzaWduYXR1cmUtZmllbGQgJW5hcmluZm8pKSkNCj4+PiArICAgICAgICAgICAgICAgICAg
ICAgICAgKDQwNCAiU29ycnksIG5hciBpcyBtaXNzaW5nISIpKQ0KPj4+ICsgICAgICAoZHlu
YW1pYy13aW5kDQo+Pj4gKyAgICAgICAgKGNvbnN0ICN0KQ0KPj4+ICsgICAgICAgIChsYW1i
ZGEgKCkNCj4+PiArICAgICAgICAgIChwYXJhbWV0ZXJpemUgKChzdWJzdGl0dXRlLXVybHMN
Cj4+PiArICAgICAgICAgICAgICAgICAgICAgICAgICAobGlzdCAoJWxvY2FsLXVybCkNCj4+
PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc3RyaW5nLWFwcGVuZCAiZmls
ZTovLyINCj4+PiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAlbWFpbi1zdWJzdGl0dXRlLWRpcmVjdG9yeSkpKSkNCj4+PiArICAgICAgICAgICAg
KHJlcXVlc3Qtc3Vic3RpdHV0aW9uIChzdHJpbmctYXBwZW5kICglc3RvcmUtcHJlZml4KQ0K
Pj4+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
Ii9hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYS1mb28iKQ0KPj4+ICsgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgInN1YnN0aXR1dGUtcmV0cmlldmVkIikpDQo+
Pj4gKyAgICAgICAgICAoY2FsbC13aXRoLWlucHV0LWZpbGUgInN1YnN0aXR1dGUtcmV0cmll
dmVkIiBnZXQtc3RyaW5nLWFsbCkpDQo+Pj4gKyAgICAgICAgKGxhbWJkYSAoKQ0KPj4+ICsg
ICAgICAgICAgKGZhbHNlLWlmLWV4Y2VwdGlvbiAoZGVsZXRlLWZpbGUgInN1YnN0aXR1dGUt
cmV0cmlldmVkIikpKSkpKSkNCj4+DQo+PiBTaG91bGRuJ3QgaXQgb25seSBpZ25vcmUgJ2Zp
bGUgbm90IGZvdW5kJyAoRU5PRU5UPykgZXhjZXB0aW9ucz8NCj4gDQo+IEJ5IOKAnGl04oCd
LCBkbyB5b3UgbWVhbiDigJhkeW5hbWljLXdpbmTigJkgc2hvdWxkIGJlIHJlcGxhY2VkIGJ5
IGEg4oCYY2F0Y2jigJkNCj4gZm9ybT8NCg0KTm8sIEknbSBub3QgcmVmZXJyaW5nIHRvIHRo
ZSBkeW5hbWljLXdpbmQgYXMgYSB3aG9sZSwgcmF0aGVyICdpdCcgPSB0aGUgDQpmb2xsb3dp
bmcgY29kZToNCg0KICAoZmFsc2UtaWYtZXhjZXB0aW9uIChkZWxldGUtZmlsZSAic3Vic3Rp
dHV0ZS1yZXRyaWV2ZWQiKSkNCg0KLS0gdGhlIGNhdGNoIGNhbiBzdGF5LCBBRkFJSy4NCg0K
PiBXZSBjb3VsZCBkaXNjdXNzIGl0LCBidXQgbm90ZSB0aGF0IHRoaXMgcGF0Y2gganVzdCBr
ZWVwcyB3aXRoIHRoZSBzdHlsZQ0KPiBvZiBleGlzdGluZyB0ZXN0cy4NCg0KRm9yIHRoZSBy
ZWFzb25zIGdpdmVuLCBJIGRvbid0IHRoaW5rIHRoaXMgc3R5bGUgc2hvdWxkIGJlIGNvbnRp
bnVlZCwgDQp0aG91Z2ggSSBzdXBwb3NlIGFsbCBvZiB0aGVtIGNhbiBiZSBkb25lIGF0IG9u
Y2UgaW4gYSBzZXBhcmF0ZSBwYXRjaC4NCg0KR3JlZXRpbmdzLA0KTWF4aW1lLg0K
--------------uF0qMxEtD0QcBXQ1L54jEfm0
Content-Type: application/pgp-keys; name="OpenPGP_0x49E3EE22191725EE.asc"
Content-Disposition: attachment; filename="OpenPGP_0x49E3EE22191725EE.asc"
Content-Description: OpenPGP public key
Content-Transfer-Encoding: quoted-printable

-----BEGIN PGP PUBLIC KEY BLOCK-----

xjMEX4ch6BYJKwYBBAHaRw8BAQdANPb/d6MrGnGi5HyvODCkBUJPRjiFQcRU5V+m
xvMaAa/NL01heGltZSBEZXZvcyA8bWF4aW1lLmRldm9zQHN0dWRlbnQua3VsZXV2
ZW4uYmU+wpAEExYIADgWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCX4ch6AIbAwUL
CQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRBJ4+4iGRcl7japAQC3opZ2KGWzWmRc
/gIWSu0AAcfMwyinFEEPa/QhUt2CogD/e2RdF4CYAgaRHJJmZ9WU7piKbLZ7llB4
LzgezVDHggzNJU1heGltZSBEZXZvcyA8bWF4aW1lZGV2b3NAdGVsZW5ldC5iZT7C
kAQTFggAOBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJf56ycAhsDBQsJCAcDBRUK
CQgLBRYCAwEAAh4BAheAAAoJEEnj7iIZFyXujpQBAKV1SwDDl4f24rXciDlB9L8W
ycZt30CgbewMSRQk4mvbAP9dFMbVVixYBd6C8cfhR+NsOBGiOJnQABlUmgNuqGFJ
Dc44BF+HIegSCisGAQQBl1UBBQEBB0BOlzIWiJzgobMF6/cqwLaLk7jIcFSZ++c0
k9cCNT6YXwMBCAfCeAQYFggAIBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJfhyHo
AhsMAAoJEEnj7iIZFyXuMr0BAJc8cl5PGvVmVuSQVKjleNl4DK1/XAaPAYPe34AE
fZJPAP9IqLCQhH/FeJanHqBP8gNdGNI2qn8RnnLVfRJgUjZ1BA=3D=3D
=3DOVqp
-----END PGP PUBLIC KEY BLOCK-----

--------------uF0qMxEtD0QcBXQ1L54jEfm0--

--------------NdBk9XwLdtiKdYdNunK7UDoB--

--------------1VjPL57oLlwo0EnFQsgE7EZ9
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wnsEABYIACMWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYy871wUDAAAAAAAKCRBJ4+4iGRcl7tbW
AQCp6OOIlrB/+S1BBSaoJpabGDBaz+mH/yJ8rcWXw15CHwEA8OzyhFHOOmcsZnBt4GxoLNEgM3dT
wnA8x4lLkkN3YwU=
=TmU1
-----END PGP SIGNATURE-----

--------------1VjPL57oLlwo0EnFQsgE7EZ9--




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

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


Received: (at 58017) by debbugs.gnu.org; 24 Sep 2022 16:23:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 24 12:23:11 2022
Received: from localhost ([127.0.0.1]:45081 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oc7vq-0003Mj-JP
	for submit <at> debbugs.gnu.org; Sat, 24 Sep 2022 12:23:10 -0400
Received: from eggs.gnu.org ([209.51.188.92]:59944)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1oc7vn-0003Lp-9v; Sat, 24 Sep 2022 12:23:08 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43008)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1oc7vi-0001nx-0I; Sat, 24 Sep 2022 12:23:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=l4tzOcvP/a+5KaASrZj0zNeEKMK0+WftwcbVLe+VOes=; b=GMqza6MuAtCP+zm05bNP
 NqGioZmwHtKEoKicf/OLDLGfrvvlThTH7jtEyyvFxTIuIVY3VLrF8yI0qy3MGmaAWQOAPIn+ZQ2hv
 QxqJQ2jVM1x5QlTHCXlqovo4q5cLpVlPcKHE6lxlcguIq04qb76zX8IR0q7jiOi3ZXcd8zghfK9zd
 lW6bniJSJ2S85wHpSe5up0bmvE1kxVnqZtrR86ZEzIVMAXvuygWBN7YQoNHo4KmsB2GatvJQ+DgMO
 1owYtFLW/IJEdzwHDdhWV8iy2lJbFpDQMqgvj5fd9znXijiyY2kW/DPKXcjqx5UQlqRMfqG8I+4m8
 04Hge1Qk0sW0pg==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:54790
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1oc7vh-0008Jl-Hs; Sat, 24 Sep 2022 12:23:01 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [bug#58017] [PATCH 2/2] substitute: Retry downloading when a
 nar is unavailable.
References: <20220923061957.5658-1-ludo@HIDDEN>
 <20220923061957.5658-2-ludo@HIDDEN>
 <46a88139-3994-71e5-1a78-398d6926ef88@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Tridi 3 =?utf-8?Q?Vend=C3=A9miaire?= an 231 de la
 =?utf-8?Q?R=C3=A9volution=2C?= jour de
 la =?utf-8?Q?Ch=C3=A2taigne?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Sat, 24 Sep 2022 18:22:59 +0200
In-Reply-To: <46a88139-3994-71e5-1a78-398d6926ef88@HIDDEN> (Maxime Devos's
 message of "Sat, 24 Sep 2022 03:57:33 +0200")
Message-ID: <87a66o7ndo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58017
Cc: 58017 <at> debbugs.gnu.org, 57978 <at> debbugs.gnu.org,
 Attila Lendvai <attila@HIDDEN>, zimoun <zimon.toutoune@HIDDEN>
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: -3.3 (---)

Hi Maxime,

Maxime Devos <maximedevos@HIDDEN> skribis:

>> +(test-equal "substitute, first URL has narinfo but nar is 404, both URL=
s authorized"
>> +  "Substitutable data."
>> +  (with-narinfo*
>> +      (string-append %narinfo "Signature: "
>> +                     (signature-field %narinfo))
>> +      %main-substitute-directory
>> +
>> +    (with-http-server `((200 ,(string-append %narinfo "Signature: "
>> +                                             (signature-field %narinfo)=
))
>> +                        (404 "Sorry, nar is missing!"))
>> +      (dynamic-wind
>> +        (const #t)
>> +        (lambda ()
>> +          (parameterize ((substitute-urls
>> +                          (list (%local-url)
>> +                                (string-append "file://"
>> +                                               %main-substitute-directo=
ry))))
>> +            (request-substitution (string-append (%store-prefix)
>> +                                                 "/aaaaaaaaaaaaaaaaaaaa=
aaaaaaaaaaaa-foo")
>> +                                  "substitute-retrieved"))
>> +          (call-with-input-file "substitute-retrieved" get-string-all))
>> +        (lambda ()
>> +          (false-if-exception (delete-file "substitute-retrieved")))))))
>
> Shouldn't it only ignore 'file not found' (ENOENT?) exceptions?

By =E2=80=9Cit=E2=80=9D, do you mean =E2=80=98dynamic-wind=E2=80=99 should =
be replaced by a =E2=80=98catch=E2=80=99
form?

We could discuss it, but note that this patch just keeps with the style
of existing tests.

> This test, and some others, can be improved by also checking the
> URI. While currently 'with-http-server' does not support that, there
> are (5 months, with the v1 having seen some reviewing and a v2
> available) patches for that at <https://issues.guix.gnu.org/53389>.
>
> That patch also _requires_ always mentioning the URI, if the cover
> letter is correct.  It also allows simplifying the use of '%local-url'
> a bit.

Ah, thanks for the reminder!  I=E2=80=99ve just spent most of the day revie=
wing
patches, but not that one=E2=80=A6

Ludo=E2=80=99.




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

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


Received: (at 58017) by debbugs.gnu.org; 24 Sep 2022 16:20:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 24 12:20:23 2022
Received: from localhost ([127.0.0.1]:45066 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oc7t9-0003GP-BQ
	for submit <at> debbugs.gnu.org; Sat, 24 Sep 2022 12:20:23 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42278)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1oc7t4-0003G3-5J; Sat, 24 Sep 2022 12:20:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59756)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1oc7sy-0001Px-MM; Sat, 24 Sep 2022 12:20:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To:
 From; bh=vPN51RhCKZY0FhZm4S+VSAZbCkTO3uV7ghSMRjdxWZI=; b=G+6qPFQZtHZp+q+Ti7ch
 ccYWRJ1966oQN3K7ORtSKbKwFSawhwrOSQTqpxAnALTG01XtSQwhO9ZsuGjJMJ0k7QifURTss+Th2
 GHk4XMba0Dr4dqoi5yICYS3cZYRgYl3Y50PA6Wxi2vrlGWgbbmC96hv1C1ZB3RvxbF4stC9Y4DbDa
 4mBDHkd40JhLKmbmSB6yMny8ZQs404MXDZrVtKwdk/T/VgZBdqXJB8+lvJ9D898Zz2WolLdeET6Uw
 QksPYlMdvQMRoXXCCg+UC8OjcDnAkkzFmBjK5fyX1j9erOu65Nnrt7dUr8BJxPxJI/7+gZVh5GIGI
 p9x86+40epwVvA==;
Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:55812
 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1oc7sx-0007zE-Cd; Sat, 24 Sep 2022 12:20:12 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: bug#57978: [PATCH 2/2] substitute: Retry downloading when a nar
 is unavailable.
References: <20220923061957.5658-1-ludo@HIDDEN>
 <20220923061957.5658-2-ludo@HIDDEN> <87pmfmcxo3.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Tridi 3 =?utf-8?Q?Vend=C3=A9miaire?= an 231 de la
 =?utf-8?Q?R=C3=A9volution=2C?= jour de
 la =?utf-8?Q?Ch=C3=A2taigne?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Sat, 24 Sep 2022 18:20:08 +0200
In-Reply-To: <87pmfmcxo3.fsf@HIDDEN> (zimoun's message of "Fri, 23 Sep 2022
 10:17:16 +0200")
Message-ID: <87fsgg7nif.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58017
Cc: 58017 <at> debbugs.gnu.org, 57978 <at> debbugs.gnu.org,
 Attila Lendvai <attila@HIDDEN>
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: -3.3 (---)

Hi!

zimoun <zimon.toutoune@HIDDEN> skribis:

>> +  (with-narinfo*
>> +      (string-append %narinfo "Signature: "
>> +                     (signature-field
>> +                      %narinfo
>> +                      #:public-key %wrong-public-key))
>> +      %main-substitute-directory
>> +
>> +    (with-http-server `((200 ,(string-append %narinfo "Signature: "
>> +                                             (signature-field
>> +                                              %narinfo
>> +                                              #:public-key %wrong-publi=
c-key)))
>> +                        (404 "Sorry, nar is missing!"))
>> +      (let ((url1 (%local-url)))
>> +        (parameterize ((%http-server-port 0))
>> +          (with-http-server `((200 ,(string-append %narinfo "Signature:=
 "
>> +                                                   (signature-field %na=
rinfo)))
>> +                              (404 "Sorry, nar is missing!"))
>> +            (let ((url2 (%local-url)))
>> +              (dynamic-wind
>> +                (const #t)
>> +                (lambda ()
>> +                  (parameterize ((substitute-urls
>> +                                  (list url1 url2
>> +                                        (string-append "file://"
>> +                                                       %main-substitute=
-directory))))

[...]

> Although I do not understand this test.  Why is 404 appearing twice?

That=E2=80=99s because it=E2=80=99s testing with 3 substitute URLs.

Thanks for taking a look!

Ludo=E2=80=99.




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

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


Received: (at 58017) by debbugs.gnu.org; 24 Sep 2022 01:57:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 23 21:57:40 2022
Received: from localhost ([127.0.0.1]:41998 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1obuQG-0006ab-3U
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2022 21:57:40 -0400
Received: from baptiste.telenet-ops.be ([195.130.132.51]:38588)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1obuQC-0006aI-Jb
 for 58017 <at> debbugs.gnu.org; Fri, 23 Sep 2022 21:57:38 -0400
Received: from [IPV6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]
 ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16])
 by baptiste.telenet-ops.be with bizsmtp
 id PdxZ2800F20ykKC01dxZUF; Sat, 24 Sep 2022 03:57:34 +0200
Message-ID: <46a88139-3994-71e5-1a78-398d6926ef88@HIDDEN>
Date: Sat, 24 Sep 2022 03:57:33 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.12.0
Content-Language: en-US
To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= <ludo@HIDDEN>, 58017 <at> debbugs.gnu.org
References: <20220923061957.5658-1-ludo@HIDDEN>
 <20220923061957.5658-2-ludo@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [bug#58017] [PATCH 2/2] substitute: Retry downloading when a nar
 is unavailable.
In-Reply-To: <20220923061957.5658-2-ludo@HIDDEN>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="------------J06zg3z13WA7t02AIQ5csC8t"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1663984654; bh=i54KHjE1TFIxuyixurGXBo7rjqrE7rAmPAAhGbfvhGg=;
 h=Date:To:Cc:References:From:Subject:In-Reply-To;
 b=WN5RtM9FuzN15SRd/RS+eMjibu5UmlrwlWBxZ/ebLDhd1tw/mmfJpg1ieVbnMWbLo
 aR50B/17Cmex3SYctuOezA/bSefplx6pD48ztMjsLQLh0zAKiX9a2pJPVtVdNgN896
 bSRRkEecfBeoh+efCjbiizaafYN+Np6HrVPYb7khL4Qk3rIyFesEyejL70E16YsYS5
 Wv/n4weyRJs2F9yAIISRZ6PZHLkMeK0q8GbcnNT6AKdRMjassdiJm2Mr6gAclt1iRm
 MXgNuDXhDvrhHyej46EWQj4IlealROTZsTH8ysms9k8i3sLqM4TouTWI5hSVH6LDrB
 I9CLvIJWwTvtw==
X-Spam-Score: -2.5 (--)
X-Debbugs-Envelope-To: 58017
Cc: Attila Lendvai <attila@HIDDEN>, 57978 <at> debbugs.gnu.org,
 zimoun <zimon.toutoune@HIDDEN>
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: -3.5 (---)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--------------J06zg3z13WA7t02AIQ5csC8t
Content-Type: multipart/mixed; boundary="------------XYod98BSBSs0JuLX0Qse5qED";
 protected-headers="v1"
From: Maxime Devos <maximedevos@HIDDEN>
To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= <ludo@HIDDEN>, 58017 <at> debbugs.gnu.org
Cc: Attila Lendvai <attila@HIDDEN>, 57978 <at> debbugs.gnu.org,
 zimoun <zimon.toutoune@HIDDEN>
Message-ID: <46a88139-3994-71e5-1a78-398d6926ef88@HIDDEN>
Subject: Re: [bug#58017] [PATCH 2/2] substitute: Retry downloading when a nar
 is unavailable.
References: <20220923061957.5658-1-ludo@HIDDEN>
 <20220923061957.5658-2-ludo@HIDDEN>
In-Reply-To: <20220923061957.5658-2-ludo@HIDDEN>

--------------XYod98BSBSs0JuLX0Qse5qED
Content-Type: multipart/mixed; boundary="------------yDVFx9V8ZXPwFNr4zrsLV24s"

--------------yDVFx9V8ZXPwFNr4zrsLV24s
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64

PiArKHRlc3QtZXF1YWwgInN1YnN0aXR1dGUsIGZpcnN0IFVSTCBoYXMgbmFyaW5mbyBidXQg
bmFyIGlzIDQwNCwgYm90aCBVUkxzIGF1dGhvcml6ZWQiDQo+ICsgICJTdWJzdGl0dXRhYmxl
IGRhdGEuIg0KPiArICAod2l0aC1uYXJpbmZvKg0KPiArICAgICAgKHN0cmluZy1hcHBlbmQg
JW5hcmluZm8gIlNpZ25hdHVyZTogIg0KPiArICAgICAgICAgICAgICAgICAgICAgKHNpZ25h
dHVyZS1maWVsZCAlbmFyaW5mbykpDQo+ICsgICAgICAlbWFpbi1zdWJzdGl0dXRlLWRpcmVj
dG9yeQ0KPiArDQo+ICsgICAgKHdpdGgtaHR0cC1zZXJ2ZXIgYCgoMjAwICwoc3RyaW5nLWFw
cGVuZCAlbmFyaW5mbyAiU2lnbmF0dXJlOiAiDQo+ICsgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAoc2lnbmF0dXJlLWZpZWxkICVuYXJpbmZvKSkpDQo+
ICsgICAgICAgICAgICAgICAgICAgICAgICAoNDA0ICJTb3JyeSwgbmFyIGlzIG1pc3Npbmch
IikpDQo+ICsgICAgICAoZHluYW1pYy13aW5kDQo+ICsgICAgICAgIChjb25zdCAjdCkNCj4g
KyAgICAgICAgKGxhbWJkYSAoKQ0KPiArICAgICAgICAgIChwYXJhbWV0ZXJpemUgKChzdWJz
dGl0dXRlLXVybHMNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgKGxpc3QgKCVsb2Nh
bC11cmwpDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzdHJpbmctYXBw
ZW5kICJmaWxlOi8vIg0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAlbWFpbi1zdWJzdGl0dXRlLWRpcmVjdG9yeSkpKSkNCj4gKyAgICAgICAg
ICAgIChyZXF1ZXN0LXN1YnN0aXR1dGlvbiAoc3RyaW5nLWFwcGVuZCAoJXN0b3JlLXByZWZp
eCkNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAiL2FhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhLWZvbyIpDQo+ICsgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgInN1YnN0aXR1dGUtcmV0cmlldmVkIikpDQo+
ICsgICAgICAgICAgKGNhbGwtd2l0aC1pbnB1dC1maWxlICJzdWJzdGl0dXRlLXJldHJpZXZl
ZCIgZ2V0LXN0cmluZy1hbGwpKQ0KPiArICAgICAgICAobGFtYmRhICgpDQo+ICsgICAgICAg
ICAgKGZhbHNlLWlmLWV4Y2VwdGlvbiAoZGVsZXRlLWZpbGUgInN1YnN0aXR1dGUtcmV0cmll
dmVkIikpKSkpKSkNCg0KU2hvdWxkbid0IGl0IG9ubHkgaWdub3JlICdmaWxlIG5vdCBmb3Vu
ZCcgKEVOT0VOVD8pIGV4Y2VwdGlvbnM/DQpJZiB0aGUgZXhjZXB0aW9uIGhhbmRsaW5nIGlz
IHJlZmluZWQgYSBiaXQsIGl0IGJlY29tZXMgYSBiaXQgbW9yZSANCmNvbXBsaWNhdGVkLCBh
bmQgY291bGQgYmUgc2ltcGxpZmllZCB0byAod2hlbiBbZXhpc3RzXSBbZGVsZXRlXSksIGFz
IA0KdGhlcmUgYXJlIG5vIGF0b21pY2l0eSBjb25jZXJucy4NCg0KVGhpcyB0ZXN0LCBhbmQg
c29tZSBvdGhlcnMsIGNhbiBiZSBpbXByb3ZlZCBieSBhbHNvIGNoZWNraW5nIHRoZSBVUkku
IA0KV2hpbGUgY3VycmVudGx5ICd3aXRoLWh0dHAtc2VydmVyJyBkb2VzIG5vdCBzdXBwb3J0
IHRoYXQsIHRoZXJlIGFyZSAoNSANCm1vbnRocywgd2l0aCB0aGUgdjEgaGF2aW5nIHNlZW4g
c29tZSByZXZpZXdpbmcgYW5kIGEgdjIgYXZhaWxhYmxlKSANCnBhdGNoZXMgZm9yIHRoYXQg
YXQgPGh0dHBzOi8vaXNzdWVzLmd1aXguZ251Lm9yZy81MzM4OT4uDQoNClRoYXQgcGF0Y2gg
YWxzbyBfcmVxdWlyZXNfIGFsd2F5cyBtZW50aW9uaW5nIHRoZSBVUkksIGlmIHRoZSBjb3Zl
ciANCmxldHRlciBpcyBjb3JyZWN0LiAgSXQgYWxzbyBhbGxvd3Mgc2ltcGxpZnlpbmcgdGhl
IHVzZSBvZiAnJWxvY2FsLXVybCcgYSANCmJpdC4NCg0KR3JlZXRpbmdzLA0KTWF4aW1lLg0K

--------------yDVFx9V8ZXPwFNr4zrsLV24s
Content-Type: application/pgp-keys; name="OpenPGP_0x49E3EE22191725EE.asc"
Content-Disposition: attachment; filename="OpenPGP_0x49E3EE22191725EE.asc"
Content-Description: OpenPGP public key
Content-Transfer-Encoding: quoted-printable

-----BEGIN PGP PUBLIC KEY BLOCK-----

xjMEX4ch6BYJKwYBBAHaRw8BAQdANPb/d6MrGnGi5HyvODCkBUJPRjiFQcRU5V+m
xvMaAa/NL01heGltZSBEZXZvcyA8bWF4aW1lLmRldm9zQHN0dWRlbnQua3VsZXV2
ZW4uYmU+wpAEExYIADgWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCX4ch6AIbAwUL
CQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRBJ4+4iGRcl7japAQC3opZ2KGWzWmRc
/gIWSu0AAcfMwyinFEEPa/QhUt2CogD/e2RdF4CYAgaRHJJmZ9WU7piKbLZ7llB4
LzgezVDHggzNJU1heGltZSBEZXZvcyA8bWF4aW1lZGV2b3NAdGVsZW5ldC5iZT7C
kAQTFggAOBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJf56ycAhsDBQsJCAcDBRUK
CQgLBRYCAwEAAh4BAheAAAoJEEnj7iIZFyXujpQBAKV1SwDDl4f24rXciDlB9L8W
ycZt30CgbewMSRQk4mvbAP9dFMbVVixYBd6C8cfhR+NsOBGiOJnQABlUmgNuqGFJ
Dc44BF+HIegSCisGAQQBl1UBBQEBB0BOlzIWiJzgobMF6/cqwLaLk7jIcFSZ++c0
k9cCNT6YXwMBCAfCeAQYFggAIBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJfhyHo
AhsMAAoJEEnj7iIZFyXuMr0BAJc8cl5PGvVmVuSQVKjleNl4DK1/XAaPAYPe34AE
fZJPAP9IqLCQhH/FeJanHqBP8gNdGNI2qn8RnnLVfRJgUjZ1BA=3D=3D
=3DOVqp
-----END PGP PUBLIC KEY BLOCK-----

--------------yDVFx9V8ZXPwFNr4zrsLV24s--

--------------XYod98BSBSs0JuLX0Qse5qED--

--------------J06zg3z13WA7t02AIQ5csC8t
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wnsEABYIACMWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYy5kDQUDAAAAAAAKCRBJ4+4iGRcl7tFk
AP977ntbwicRVbpwY00qy28AEbF+zTWXvWiA8QfTeGJGUgD/XY/FfgH6Veml9R9e0SIVX2553Edy
gWS11Uiget4MkQA=
=FH6r
-----END PGP SIGNATURE-----

--------------J06zg3z13WA7t02AIQ5csC8t--




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

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


Received: (at 58017) by debbugs.gnu.org; 23 Sep 2022 09:25:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 23 05:25:37 2022
Received: from localhost ([127.0.0.1]:39449 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1obewC-0005o8-Ng
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2022 05:25:37 -0400
Received: from mail-wm1-f44.google.com ([209.85.128.44]:45590)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>)
 id 1obew9-0005nL-Dh; Fri, 23 Sep 2022 05:25:34 -0400
Received: by mail-wm1-f44.google.com with SMTP id
 d12-20020a05600c3acc00b003b4c12e47f3so2841064wms.4; 
 Fri, 23 Sep 2022 02:25:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date;
 bh=6hmTHHlYrLLRksYrRPV/cZKh1q81dRJpJQVP0qEWTx8=;
 b=NElmsQAE53geHDpcg2EsYEFkr9vIAmyODGQ57hFhyy2zed57TJoDdWQ9Lh2lmq899G
 jQGnj/I/scPhcZF790VJrlpiqDvF/Yr2uq1gyVUzFVXqhFuXs+kJojrL58wI7FU6Fs/z
 1krL38yaJ8bv49FKy9C5fQIrS7oAMcaW8hOOhYd6wGaPgL6aT6QuVdTq8qqOXZpe/Ggj
 jyDgYtL9s4yUUZPXrAcywSLtYqt84mCvZXAxejZtG1vU+5Jq+U73yVBPmpDeZ5HJml9x
 Qi0yq1u5FZc2xarkLUmuU21ePO+7lEFwSKTgX4c7EEiGOyylsDQz9i7npbnLJFxI8eBj
 kmYA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date;
 bh=6hmTHHlYrLLRksYrRPV/cZKh1q81dRJpJQVP0qEWTx8=;
 b=k6/2gFyOc8bndZhy+8HPTwZnSzDO9LMTfRnu12y0veE5gB+n61MCPFukOY0+R0qxAn
 CJ0qOCazFF+b/1JcYfiZqLFskbydg1aO/vVBeC42E37q4ySDwsu/9FnOeOkGcsIn5gP9
 mdRw2zlTqZ5RWQf+W3WSs317nxKZgND9CG7CqnnSPk0nFk4nvsYAcMHS8dHFWHleS3+T
 +quQ7IjLJzMDO2PRqxcU0TVvgxh0LKW2i5gt6ZqaEWUqV1MBOmGnCAvF87OFHJhQcAkN
 Yhmrufjw/TUZ3+uajMdZCRpiPyL/X08INeY55il2XPjew9UYiduBwrF/MZc+4AVJYxp+
 AFJA==
X-Gm-Message-State: ACrzQf0MCi1ffxPkxugwJHPKU4znj0SHnUvy5pbfOSU31kannbzZst96
 Z1kZmLUkiVxCLP9GkSDqD0Y=
X-Google-Smtp-Source: AMsMyM4MliwE7aUrD/TKPOcjRicUOhkmG2NwSq1iKw6A/oLyv/ieAmRwJadT3aVrm//xFaSrabUx8w==
X-Received: by 2002:a05:600c:500c:b0:3b4:92e4:c77c with SMTP id
 n12-20020a05600c500c00b003b492e4c77cmr5197900wmr.41.1663925127495; 
 Fri, 23 Sep 2022 02:25:27 -0700 (PDT)
Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id
 f12-20020adffccc000000b0022afddab5dfsm7259621wrs.7.2022.09.23.02.25.26
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 23 Sep 2022 02:25:27 -0700 (PDT)
From: zimoun <zimon.toutoune@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 58017 <at> debbugs.gnu.org
Subject: Re: bug#57978: [PATCH 2/2] substitute: Retry downloading when a nar
 is unavailable.
In-Reply-To: <20220923061957.5658-2-ludo@HIDDEN>
References: <20220923061957.5658-1-ludo@HIDDEN>
 <20220923061957.5658-2-ludo@HIDDEN>
Date: Fri, 23 Sep 2022 10:17:16 +0200
Message-ID: <87pmfmcxo3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58017
Cc: Attila Lendvai <attila@HIDDEN>, 57978 <at> debbugs.gnu.org,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
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: -1.0 (-)

Hi,

On ven., 23 sept. 2022 at 08:19, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:

> Fixes <https://issues.guix.gnu.org/57978>
> Reported by Attila Lendvai <attila@HIDDEN>.
>
> Previously, if a narinfo was available but its corresponding nar was
> missing (for instance because the narinfo was cached and the server
> became unreachable in the meantime), 'guix substitute --substitute'
> would try to download the nar from its preferred location and abort when
> that fails.  This change forces one retry with each of the URLs.
>
> * guix/scripts/substitute.scm (download-nar): Do not catch
> 'http-get-error?' exceptions.
> (system-error?, network-error?, process-substitution/fallback): New
> procedures.
> (process-substitution): Call 'process-substitution/fallback' upon
> 'network-error?'.
> * tests/substitute.scm ("substitute, first URL has narinfo but lacks nar,=
 second URL unauthorized")
> ("substitute, first URL has narinfo but nar is 404, both URLs authorized")
> ("substitute, first URL has narinfo but nar is 404, one URL authorized")
> ("substitute, narinfo is available but nar is missing"): New tests.

LGTM.


> +(test-equal "substitute, first URL has narinfo but nar is 404, one URL a=
uthorized"
> +  "Substitutable data."
> +  (with-narinfo*
> +      (string-append %narinfo "Signature: "
> +                     (signature-field
> +                      %narinfo
> +                      #:public-key %wrong-public-key))
> +      %main-substitute-directory
> +
> +    (with-http-server `((200 ,(string-append %narinfo "Signature: "
> +                                             (signature-field
> +                                              %narinfo
> +                                              #:public-key %wrong-public=
-key)))
> +                        (404 "Sorry, nar is missing!"))
> +      (let ((url1 (%local-url)))
> +        (parameterize ((%http-server-port 0))
> +          (with-http-server `((200 ,(string-append %narinfo "Signature: "
> +                                                   (signature-field %nar=
info)))
> +                              (404 "Sorry, nar is missing!"))
> +            (let ((url2 (%local-url)))
> +              (dynamic-wind
> +                (const #t)
> +                (lambda ()
> +                  (parameterize ((substitute-urls
> +                                  (list url1 url2
> +                                        (string-append "file://"
> +                                                       %main-substitute-=
directory))))
> +                    (request-substitution (string-append (%store-prefix)
> +                                                         "/aaaaaaaaaaaaa=
aaaaaaaaaaaaaaaaaaa-foo")
> +                                          "substitute-retrieved"))
> +                  (call-with-input-file "substitute-retrieved" get-strin=
g-all))
> +                (lambda ()
> +                  (false-if-exception (delete-file "substitute-retrieved=
")))))))))))

Although I do not understand this test.  Why is 404 appearing twice?


Cheers,
simon




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

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


Received: (at 58017) by debbugs.gnu.org; 23 Sep 2022 09:25:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 23 05:25:36 2022
Received: from localhost ([127.0.0.1]:39445 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1obewB-0005nt-TB
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2022 05:25:36 -0400
Received: from mail-wr1-f42.google.com ([209.85.221.42]:42809)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>)
 id 1obew8-0005nJ-Bn; Fri, 23 Sep 2022 05:25:34 -0400
Received: by mail-wr1-f42.google.com with SMTP id n12so19453480wrx.9;
 Fri, 23 Sep 2022 02:25:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:from:to:cc:subject:date;
 bh=XKsl+fzxeWnyu+02NZQlZckb4+DNzcYH4ZewHZt1agg=;
 b=OyGjBKMKUao11UvE4pUW9vbBCORmhbl+AWPPVwRuWZEIB2JEjgZeIBC5Gq0dKF5N/f
 DFwsBGi19W13CI/F6GbKuKtdjvU4Qr1HrZJDXX3kSMKS4o29Pyd5CReFOL1OJHn5UF3o
 oLSU0wyexUffZQBC1QS9hS9hAI5CxCi5SgsyQKKYp7B/nWD79bU/yp35uA5H7cYBPkjc
 IMdu3ozNrKm/DX6ddcdUxI/lXCS0jQtKwlnSFKj48PyM+n/dL4JkSSWURRVar26BETC4
 INXJZuDI5sAiS5aGxsYOco6n5yMR2F7IDWdCVCgDZpKFKoLussyvOTVmNbwUBRAE/zlW
 9xmw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:references
 :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date;
 bh=XKsl+fzxeWnyu+02NZQlZckb4+DNzcYH4ZewHZt1agg=;
 b=Dn0hHIJ9xneTRAD3yiKEtws9NEPHPjRvnMMCNLuiXqogZf7HqC2th1ZaQMR2kazJJ2
 IiVVqEy4sepdrU/JkVIXsoehS0F66eUtcXaQbVZmklvmqMw+zAL+cTuaRaT5pQFmRoGx
 k5Y6Q55nruY9gynFX/2pwAS1gdzbp2QtEppyFZTVB9Cd4l7nhZkfXTBlmtK89ZmZ91Ov
 ui+7+cwg9TyrEm9edKEOYJw0kzO8DZ6KwJtB/EKlQim6FG3FCj77XTTp9dWU1NOZnGNw
 XRfJjd5+XkoNTJ/kQ1YI83Yp4Rma1fo4pMn26TE+RNF78jNmgil2ZvWwztGEH7OUg32k
 tfCQ==
X-Gm-Message-State: ACrzQf30DOU0NtFReBioavS17gNRC2gnsqfObfTyGR99U930QzSqaJ7O
 YSNxZ4mAISk66j9yfK3hCws=
X-Google-Smtp-Source: AMsMyM6Az09MCNc+RbbPAWkfbTiscY8lRvtmGWBWJTmoXouGuTLmYmikTqJIo6FPxs9/bs0ZL4ZWTQ==
X-Received: by 2002:adf:f44c:0:b0:228:8686:552f with SMTP id
 f12-20020adff44c000000b002288686552fmr4370996wrp.587.1663925126396; 
 Fri, 23 Sep 2022 02:25:26 -0700 (PDT)
Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id
 u7-20020a056000038700b002258235bda3sm7493593wrf.61.2022.09.23.02.25.25
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 23 Sep 2022 02:25:25 -0700 (PDT)
From: zimoun <zimon.toutoune@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 58017 <at> debbugs.gnu.org
Subject: Re: bug#57978: [PATCH 1/2] substitute: Split nar download.
In-Reply-To: <20220923061957.5658-1-ludo@HIDDEN>
References: <GH6ClCMfJDFA4PobJSLUVueUqLEv5WxDfh-ekx5Cfu5sUiZM3pNUX_vEr00tR4vg7Z2x3L22NRmWl6HRGseLa8MgT3O9EpUlpOo2MfznfOY=@lendvai.name>
 <20220923061957.5658-1-ludo@HIDDEN>
Date: Fri, 23 Sep 2022 09:56:47 +0200
Message-ID: <87tu4ycym8.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 58017
Cc: Attila Lendvai <attila@HIDDEN>, 57978 <at> debbugs.gnu.org,
 Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
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: -1.0 (-)

Hi,


On ven., 23 sept. 2022 at 08:19, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:
> * guix/scripts/substitute.scm (download-nar): New procedure, with most
> of the code moved from...
> (process-substitution): ... here.  Call it.

LTGM.

Just to be sure, the patch tweaks the logic checking about narinfo and
it is not mentioned in the commit message, IMHO.



Cheers,
simon





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

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


Received: (at 58017) by debbugs.gnu.org; 23 Sep 2022 06:20:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 23 02:20:35 2022
Received: from localhost ([127.0.0.1]:39160 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1obc38-0007Hg-Dc
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2022 02:20:35 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49970)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1obc2z-0007Gk-R7; Fri, 23 Sep 2022 02:20:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39110)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1obc2u-0007ve-Jr; Fri, 23 Sep 2022 02:20:20 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To:
 From; bh=GClk5QRgnyaP1phI++P1FZ/h1HaztCmPzpWsKUV67jc=; b=iLvQS6rmqCSMyQWi1Pwl
 xKY3lgcPqDsXW9ps0Tv9vJZPpfxZmJKKAo2FGLB7No7Tk7hGawGvWziWRjcHYkEciNrptQ8IQXthW
 xnljBFF4xfCA8xXrcFD4CkF2iVpIaVBTWHxBriLpq5Mg1Yk4wHjU/lTRyg7dfKybE7oWvydE4enJ/
 8EJVKH7x1hfky1mAVNbsXFw+cJU7RU9zcES829V3hVR2Xek0G6PIYSeZNSiaCaJE/Q1heBaTy7DUe
 8AppX1pVLX8bSNgNhg5swti5Gq7/gF6DqG4uYnLwoz+GLYUrddgMAxTnmIDXpXlbsOycHfVziOEuR
 aiT/ISdyvJ9qxw==;
Received: from [89.207.171.75] (port=38064 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1obc2r-0007Hi-KL; Fri, 23 Sep 2022 02:20:20 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 58017 <at> debbugs.gnu.org
Subject: [PATCH 2/2] substitute: Retry downloading when a nar is unavailable.
Date: Fri, 23 Sep 2022 08:19:57 +0200
Message-Id: <20220923061957.5658-2-ludo@HIDDEN>
X-Mailer: git-send-email 2.37.3
In-Reply-To: <20220923061957.5658-1-ludo@HIDDEN>
References: <20220923061957.5658-1-ludo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: Fixes <https://issues.guix.gnu.org/57978> Reported by Attila
 Lendvai <attila@HIDDEN>. Previously, if a narinfo was available but
 its corresponding nar was missing (for instance because the narinfo was cached
 and the server became unreachable in the meantime), 'guix substitute --substit
 [...] Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
 medium trust [209.51.188.92 listed in list.dnswl.org]
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [89.207.171.75 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
X-Debbugs-Envelope-To: 58017
Cc: Attila Lendvai <attila@HIDDEN>, 57978 <at> debbugs.gnu.org,
 =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
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.3 (/)

Fixes <https://issues.guix.gnu.org/57978>
Reported by Attila Lendvai <attila@HIDDEN>.

Previously, if a narinfo was available but its corresponding nar was
missing (for instance because the narinfo was cached and the server
became unreachable in the meantime), 'guix substitute --substitute'
would try to download the nar from its preferred location and abort when
that fails.  This change forces one retry with each of the URLs.

* guix/scripts/substitute.scm (download-nar): Do not catch
'http-get-error?' exceptions.
(system-error?, network-error?, process-substitution/fallback): New
procedures.
(process-substitution): Call 'process-substitution/fallback' upon
'network-error?'.
* tests/substitute.scm ("substitute, first URL has narinfo but lacks nar, second URL unauthorized")
("substitute, first URL has narinfo but nar is 404, both URLs authorized")
("substitute, first URL has narinfo but nar is 404, one URL authorized")
("substitute, narinfo is available but nar is missing"): New tests.
---
 guix/scripts/substitute.scm | 113 ++++++++++++++++++++++++++++--------
 tests/substitute.scm        | 113 ++++++++++++++++++++++++++++++++++++
 2 files changed, 203 insertions(+), 23 deletions(-)

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index e3b382d0d8..cf59db4315 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -460,25 +460,20 @@ (define (fetch uri)
        (let ((port (open-file (uri-path uri) "r0b")))
          (values port (stat:size (stat port)))))
       ((http https)
-       (guard (c ((http-get-error? c)
-                  (leave (G_ "download from '~a' failed: ~a, ~s~%")
-                         (uri->string (http-get-error-uri c))
-                         (http-get-error-code c)
-                         (http-get-error-reason c))))
-         ;; Test this with:
-         ;;   sudo tc qdisc add dev eth0 root netem delay 1500ms
-         ;; and then cancel with:
-         ;;   sudo tc qdisc del dev eth0 root
-         (with-timeout %fetch-timeout
-           (begin
-             (warning (G_ "while fetching ~a: server is somewhat slow~%")
-                      (uri->string uri))
-             (warning (G_ "try `--no-substitutes' if the problem persists~%")))
-           (with-cached-connection uri port
-             (http-fetch uri #:text? #f
-                         #:port port
-                         #:keep-alive? #t
-                         #:buffered? #f)))))
+       ;; Test this with:
+       ;;   sudo tc qdisc add dev eth0 root netem delay 1500ms
+       ;; and then cancel with:
+       ;;   sudo tc qdisc del dev eth0 root
+       (with-timeout %fetch-timeout
+         (begin
+           (warning (G_ "while fetching ~a: server is somewhat slow~%")
+                    (uri->string uri))
+           (warning (G_ "try `--no-substitutes' if the problem persists~%")))
+         (with-cached-connection uri port
+           (http-fetch uri #:text? #f
+                       #:port port
+                       #:keep-alive? #t
+                       #:buffered? #f))))
       (else
        (leave (G_ "unsupported substitute URI scheme: ~a~%")
               (uri->string uri)))))
@@ -572,6 +567,68 @@ (define cpu-usage
                     (bytevector->nix-base32-string expected)
                     (bytevector->nix-base32-string actual)))))))
 
+(define system-error?
+  (let ((kind-and-args? (exception-predicate &exception-with-kind-and-args)))
+    (lambda (exception)
+      "Return true if EXCEPTION is a Guile 'system-error exception."
+      (and (kind-and-args? exception)
+           (eq? 'system-error (exception-kind exception))))))
+
+(define network-error?
+  (let ((kind-and-args? (exception-predicate &exception-with-kind-and-args)))
+    (lambda (exception)
+      "Return true if EXCEPTION denotes a networking error."
+      (or (and (system-error? exception)
+               (let ((errno (system-error-errno
+                             (cons 'system-error (exception-args exception)))))
+                 (memv errno (list ECONNRESET ECONNABORTED
+                                   ECONNREFUSED EHOSTUNREACH
+                                   ENOENT))))     ;for "file://"
+          (and (kind-and-args? exception)
+               (memq (exception-kind exception)
+                     '(gnutls-error getaddrinfo-error)))
+          (and (http-get-error? exception)
+               (begin
+                 (warning (G_ "download from '~a' failed: ~a, ~s~%")
+                          (uri->string (http-get-error-uri exception))
+                          (http-get-error-code exception)
+                          (http-get-error-reason exception))
+                 #t))))))
+
+(define* (process-substitution/fallback port narinfo destination
+                                        #:key cache-urls acl
+                                        deduplicate? print-build-trace?)
+  "Attempt to substitute NARINFO, which is assumed to be authorized or
+equivalent, by trying to download its nar from each entry in CACHE-URLS.
+
+This can be less efficient than 'lookup-narinfo', which stops at the first
+entry that provides a valid narinfo, but it makes sure we eventually find a
+way to download the nar."
+  ;; Note: Keep NARINFO's uri-base in CACHE-URLS: that lets us retry in case
+  ;; this was a transient issue.
+  (let loop ((cache-urls cache-urls))
+    (match cache-urls
+      (()
+       (leave (G_ "failed to find alternative substitute for '~a'~%")
+              (narinfo-path narinfo)))
+      ((cache-url rest ...)
+       (match (lookup-narinfos cache-url
+                               (list (narinfo-path narinfo))
+                               #:open-connection
+                               open-connection-for-uri/cached)
+         ((alternate)
+          (if (or (equivalent-narinfo? narinfo alternate)
+                  (valid-narinfo? alternate acl)
+                  (%allow-unauthenticated-substitutes?))
+              (guard (c ((network-error? c) (loop rest)))
+                (download-nar alternate destination
+                              #:status-port port
+                              #:deduplicate? deduplicate?
+                              #:print-build-trace? print-build-trace?))
+              (loop rest)))
+         (()
+          (loop rest)))))))
+
 (define* (process-substitution port store-item destination
                                #:key cache-urls acl
                                deduplicate? print-build-trace?)
@@ -590,10 +647,20 @@ (define narinfo
     (leave (G_ "no valid substitute for '~a'~%")
            store-item))
 
-  (download-nar narinfo destination
-                #:status-port port
-                #:deduplicate? deduplicate?
-                #:print-build-trace? print-build-trace?))
+  (guard (c ((network-error? c)
+             (format (current-error-port)
+                     (G_ "retrying download of '~a' with other substitute URLs...~%")
+                     store-item)
+             (process-substitution/fallback port narinfo destination
+                                            #:cache-urls cache-urls
+                                            #:acl acl
+                                            #:deduplicate? deduplicate?
+                                            #:print-build-trace?
+                                            print-build-trace?)))
+    (download-nar narinfo destination
+                  #:status-port port
+                  #:deduplicate? deduplicate?
+                  #:print-build-trace? print-build-trace?)))
 
 
 ;;;
diff --git a/tests/substitute.scm b/tests/substitute.scm
index 5315292987..9032a50268 100644
--- a/tests/substitute.scm
+++ b/tests/substitute.scm
@@ -523,6 +523,119 @@ (define-syntax-rule (with-narinfo* narinfo directory body ...)
         (lambda ()
           (false-if-exception (delete-file "substitute-retrieved")))))))
 
+(test-equal "substitute, first URL has narinfo but lacks nar, second URL unauthorized"
+  "Substitutable data."
+  (with-narinfo*
+      (string-append %narinfo "Signature: "
+                     (signature-field
+                      %narinfo
+                      #:public-key %wrong-public-key))
+      %alternate-substitute-directory
+
+    (with-narinfo* (string-append %narinfo "Signature: "
+                                  (signature-field %narinfo))
+        %main-substitute-directory
+
+      (dynamic-wind
+        (const #t)
+        (lambda ()
+          ;; Remove this file so that the substitute can only be retrieved
+          ;; from %ALTERNATE-SUBSTITUTE-DIRECTORY.
+          (delete-file (string-append %main-substitute-directory
+                                      "/example.nar"))
+
+          (parameterize ((substitute-urls
+                          (map (cut string-append "file://" <>)
+                               (list %main-substitute-directory
+                                     %alternate-substitute-directory))))
+            (request-substitution (string-append (%store-prefix)
+                                                 "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo")
+                                  "substitute-retrieved"))
+          (call-with-input-file "substitute-retrieved" get-string-all))
+        (lambda ()
+          (false-if-exception (delete-file "substitute-retrieved")))))))
+
+(test-equal "substitute, first URL has narinfo but nar is 404, both URLs authorized"
+  "Substitutable data."
+  (with-narinfo*
+      (string-append %narinfo "Signature: "
+                     (signature-field %narinfo))
+      %main-substitute-directory
+
+    (with-http-server `((200 ,(string-append %narinfo "Signature: "
+                                             (signature-field %narinfo)))
+                        (404 "Sorry, nar is missing!"))
+      (dynamic-wind
+        (const #t)
+        (lambda ()
+          (parameterize ((substitute-urls
+                          (list (%local-url)
+                                (string-append "file://"
+                                               %main-substitute-directory))))
+            (request-substitution (string-append (%store-prefix)
+                                                 "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo")
+                                  "substitute-retrieved"))
+          (call-with-input-file "substitute-retrieved" get-string-all))
+        (lambda ()
+          (false-if-exception (delete-file "substitute-retrieved")))))))
+
+(test-equal "substitute, first URL has narinfo but nar is 404, one URL authorized"
+  "Substitutable data."
+  (with-narinfo*
+      (string-append %narinfo "Signature: "
+                     (signature-field
+                      %narinfo
+                      #:public-key %wrong-public-key))
+      %main-substitute-directory
+
+    (with-http-server `((200 ,(string-append %narinfo "Signature: "
+                                             (signature-field
+                                              %narinfo
+                                              #:public-key %wrong-public-key)))
+                        (404 "Sorry, nar is missing!"))
+      (let ((url1 (%local-url)))
+        (parameterize ((%http-server-port 0))
+          (with-http-server `((200 ,(string-append %narinfo "Signature: "
+                                                   (signature-field %narinfo)))
+                              (404 "Sorry, nar is missing!"))
+            (let ((url2 (%local-url)))
+              (dynamic-wind
+                (const #t)
+                (lambda ()
+                  (parameterize ((substitute-urls
+                                  (list url1 url2
+                                        (string-append "file://"
+                                                       %main-substitute-directory))))
+                    (request-substitution (string-append (%store-prefix)
+                                                         "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo")
+                                          "substitute-retrieved"))
+                  (call-with-input-file "substitute-retrieved" get-string-all))
+                (lambda ()
+                  (false-if-exception (delete-file "substitute-retrieved")))))))))))
+
+(test-quit "substitute, narinfo is available but nar is missing"
+    "failed to find alternative substitute"
+  (with-narinfo*
+      (string-append %narinfo "Signature: "
+                     (signature-field
+                      %narinfo
+                      #:public-key %wrong-public-key))
+      %main-substitute-directory
+
+    (with-http-server `((200 ,(string-append %narinfo "Signature: "
+                                             (signature-field %narinfo)))
+                        (404 "Sorry, nar is missing!"))
+      (parameterize ((substitute-urls
+                      (list (%local-url)
+                            (string-append "file://"
+                                           %main-substitute-directory))))
+        (delete-file (string-append %main-substitute-directory
+                                    "/example.nar"))
+        (request-substitution (string-append (%store-prefix)
+                                             "/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo")
+                              "substitute-retrieved")
+        (not (file-exists? "substitute-retrieved"))))))
+
 (test-equal "substitute, first narinfo is unsigned and has wrong hash"
   "Substitutable data."
   (with-narinfo* (regexp-substitute #f
-- 
2.37.3





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

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


Received: (at 58017) by debbugs.gnu.org; 23 Sep 2022 06:20:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 23 02:20:26 2022
Received: from localhost ([127.0.0.1]:39154 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1obc2z-0007H2-Q3
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2022 02:20:26 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49968)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>)
 id 1obc2y-0007Gi-64; Fri, 23 Sep 2022 02:20:24 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49284)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1obc2q-0007uy-5K; Fri, 23 Sep 2022 02:20:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to:
 references; bh=v8zk/MAZ5CmI+AWHnZJ9I77Ii2NvFYgBrf8bJ9F0cik=; b=q4Ut3ZolX4f1wa
 VAy+0BKigkFKNSD8nkjTppza1q7UGU8m2FymhjgmBq7lLwWLjjxnOsVCQ0gGKurNLiasaVaP8SLo7
 eiIdoCf7F4fs5MrgfPnHobpNo1NJZUMQpw+Yn+cNXSA4GB3m7b24pyNVU3VkCdRV34MBUUXqkGqKe
 6D5bxoqqVkfsguyuitdjTACqnXUUrqIHk+AwtHdJD/CUpl24PSzyEtmR6FtMcpjBRaSTOFDazX8kM
 ZRnDukiED9/IOZFfNF0c86gvWD2+kcNwzDd6sPY1J8bdF4QImMcGHIr0kJcvx4l2IWlwCxjb6/2/P
 3J6xWL5ddlxYxs2DBOjQ==;
Received: from [89.207.171.75] (port=38064 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1obc2o-0007Hi-Uw; Fri, 23 Sep 2022 02:20:15 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: 58017 <at> debbugs.gnu.org
Subject: [PATCH 1/2] substitute: Split nar download.
Date: Fri, 23 Sep 2022 08:19:56 +0200
Message-Id: <20220923061957.5658-1-ludo@HIDDEN>
X-Mailer: git-send-email 2.37.3
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * guix/scripts/substitute.scm (download-nar): New procedure, 
 with most of the code moved from... (process-substitution): ... here. Call
 it. --- guix/scripts/substitute.scm | 52 +++++++++++++++++++++++ [...] 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
 medium trust [209.51.188.92 listed in list.dnswl.org]
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [89.207.171.75 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
X-Debbugs-Envelope-To: 58017
Cc: Attila Lendvai <attila@HIDDEN>, 57978 <at> debbugs.gnu.org,
 =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
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.3 (/)

* guix/scripts/substitute.scm (download-nar): New procedure, with most
of the code moved from...
(process-substitution): ... here.  Call it.
---
 guix/scripts/substitute.scm | 52 +++++++++++++++++++++++--------------
 1 file changed, 32 insertions(+), 20 deletions(-)

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index cdf591ac4d..e3b382d0d8 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -437,20 +437,13 @@ (define-syntax-rule (with-cached-connection uri port exp ...)
   "Bind PORT with EXP... to a socket connected to URI."
   (call-with-cached-connection uri (lambda (port) exp ...)))
 
-(define* (process-substitution port store-item destination
-                               #:key cache-urls acl
-                               deduplicate? print-build-trace?)
-  "Substitute STORE-ITEM (a store file name) from CACHE-URLS, and write it to
-DESTINATION as a nar file.  Verify the substitute against ACL, and verify its
-hash against what appears in the narinfo.  When DEDUPLICATE? is true, and if
-DESTINATION is in the store, deduplicate its files.  Print a status line to
-PORT."
-  (define narinfo
-    (lookup-narinfo cache-urls store-item
-                    (if (%allow-unauthenticated-substitutes?)
-                        (const #t)
-                        (cut valid-narinfo? <> acl))))
-
+(define* (download-nar narinfo destination
+                       #:key status-port
+                       deduplicate? print-build-trace?)
+  "Download the nar prescribed in NARINFO, which is assumed to be authentic
+and authorized, and write it to DESTINATION.  When DEDUPLICATE? is true, and
+if DESTINATION is in the store, deduplicate its files.  Print a status line to
+STATUS-PORT."
   (define destination-in-store?
     (string-prefix? (string-append (%store-prefix) "/")
                     destination))
@@ -490,10 +483,6 @@ (define (fetch uri)
        (leave (G_ "unsupported substitute URI scheme: ~a~%")
               (uri->string uri)))))
 
-  (unless narinfo
-    (leave (G_ "no valid substitute for '~a'~%")
-           store-item))
-
   (let ((uri compression file-size
              (narinfo-best-uri narinfo
                                #:fast-decompression?
@@ -575,14 +564,37 @@ (define cpu-usage
       (let ((actual (get-hash)))
         (if (bytevector=? actual expected)
             ;; Tell the daemon that we're done.
-            (format port "success ~a ~a~%"
+            (format status-port "success ~a ~a~%"
                     (narinfo-hash narinfo) (narinfo-size narinfo))
             ;; The actual data has a different hash than that in NARINFO.
-            (format port "hash-mismatch ~a ~a ~a~%"
+            (format status-port "hash-mismatch ~a ~a ~a~%"
                     (hash-algorithm-name algorithm)
                     (bytevector->nix-base32-string expected)
                     (bytevector->nix-base32-string actual)))))))
 
+(define* (process-substitution port store-item destination
+                               #:key cache-urls acl
+                               deduplicate? print-build-trace?)
+  "Substitute STORE-ITEM (a store file name) from CACHE-URLS, and write it to
+DESTINATION as a nar file.  Verify the substitute against ACL, and verify its
+hash against what appears in the narinfo.  When DEDUPLICATE? is true, and if
+DESTINATION is in the store, deduplicate its files.  Print a status line to
+PORT."
+  (define narinfo
+    (lookup-narinfo cache-urls store-item
+                    (if (%allow-unauthenticated-substitutes?)
+                        (const #t)
+                        (cut valid-narinfo? <> acl))))
+
+  (unless narinfo
+    (leave (G_ "no valid substitute for '~a'~%")
+           store-item))
+
+  (download-nar narinfo destination
+                #:status-port port
+                #:deduplicate? deduplicate?
+                #:print-build-trace? print-build-trace?))
+
 
 ;;;
 ;;; Entry point.
-- 
2.37.3





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

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


Received: (at submit) by debbugs.gnu.org; 23 Sep 2022 06:16:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 23 02:16:39 2022
Received: from localhost ([127.0.0.1]:39143 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1obbzK-0007Al-Qt
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2022 02:16:39 -0400
Received: from lists.gnu.org ([209.51.188.17]:39058)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1obbzJ-0007Ae-D6
 for submit <at> debbugs.gnu.org; Fri, 23 Sep 2022 02:16:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37944)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1obbzJ-00080T-5Y
 for guix-patches@HIDDEN; Fri, 23 Sep 2022 02:16:37 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40378)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1obbzH-0006AQ-F1; Fri, 23 Sep 2022 02:16:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To:
 From; bh=DCIXCZcW2ZUjK6C//gJkFKV1hUKRzIQPqxuBUyH+GxM=; b=jp44reQ8DQ+YeR4PeE7q
 2cdtpKKHIVcQgqlWAPwSFTTVjP9QGpIkArNm2HgNADvRkgAjN5juuwVk6muq+4K3yMshim6UgNqZv
 5KObsOrlXArxRY6N/sIugE9Dlh5iJrh9w6dX7u3yM4d1XQlkBSEN3D9K7PRBHnnkOXsPjMo3DW5HZ
 xTwP94Ux1oof5TIzl9R76Rl2ydzq/yHqRDVMzdL+DUqeBHpTxhrBJYyNggI3qva3jL8HQt0LdUiNp
 frzj3EPII5OhYAG1cqfTup4f14dCarzs2UCVRfjDIgP6Qy+qmvjZ9oMaV+0y1TmuY6nSQgeNG+mA3
 gBfz94eDmpyVig==;
Received: from [89.207.171.75] (port=47558 helo=gnu.org)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1obbzF-00071e-VB; Fri, 23 Sep 2022 02:16:34 -0400
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/2] Retry nar downloads upon failure
Date: Fri, 23 Sep 2022 08:16:16 +0200
Message-Id: <20220923061616.5453-1-ludo@HIDDEN>
X-Mailer: git-send-email 2.37.3
In-Reply-To: <875yhfivub.fsf@HIDDEN>
References: <875yhfivub.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Hello! This is a long overdue fix for <https://issues.guix.gnu.org/57978>:
    when a nar cannot be downloaded from its “preferred” location, ‘guix
    substitute --substitute’ will now retry once for each s [...] 
 
 Content analysis details:   (1.3 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
                             medium trust
                             [209.51.188.17 listed in list.dnswl.org]
  3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
                             [89.207.171.75 listed in zen.spamhaus.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
X-Debbugs-Envelope-To: submit
Cc: Attila Lendvai <attila@HIDDEN>, 57978 <at> debbugs.gnu.org,
 =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
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.3 (/)

Hello!

This is a long overdue fix for <https://issues.guix.gnu.org/57978>:
when a nar cannot be downloaded from its “preferred” location,
‘guix substitute --substitute’ will now retry once for each substitute
URL instead of failing right away.

This should address the most common issues such as transient
networking failures.

Comments?

Thanks,
Ludo’.

Ludovic Courtès (2):
  substitute: Split nar download.
  substitute: Retry downloading when a nar is unavailable.

 guix/scripts/substitute.scm | 157 +++++++++++++++++++++++++++---------
 tests/substitute.scm        | 113 ++++++++++++++++++++++++++
 2 files changed, 231 insertions(+), 39 deletions(-)


base-commit: a09655b20850d065333ec333e6e184b604f606a8
-- 
2.37.3





Acknowledgement sent to Ludovic Courtès <ludo@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#58017; 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: Wed, 28 Sep 2022 21:30:02 UTC

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