From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IMIsLUCfQ2Gy2gAAgWs5BA (envelope-from ) for ; Thu, 16 Sep 2021 21:47:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oCPXKECfQ2ESFwAA1q6Kng (envelope-from ) for ; Thu, 16 Sep 2021 19:47:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F36C05828 for ; Thu, 16 Sep 2021 21:47:11 +0200 (CEST) Received: from localhost ([::1]:33044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQxLh-0003KW-TT for larch@yhetil.org; Thu, 16 Sep 2021 15:47:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQxLa-0003KL-25 for bug-guix@gnu.org; Thu, 16 Sep 2021 15:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQxLZ-0000nM-QC for bug-guix@gnu.org; Thu, 16 Sep 2021 15:47:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQxLZ-00054d-Kq for bug-guix@gnu.org; Thu, 16 Sep 2021 15:47:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#50568: Missing source code Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 16 Sep 2021 19:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50568 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "pelzflorian (Florian Pelz)" Received: via spool by 50568-submit@debbugs.gnu.org id=B50568.163182156319413 (code B ref 50568); Thu, 16 Sep 2021 19:47:01 +0000 Received: (at 50568) by debbugs.gnu.org; 16 Sep 2021 19:46:03 +0000 Received: from localhost ([127.0.0.1]:56621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQxKT-00052S-FW for submit@debbugs.gnu.org; Thu, 16 Sep 2021 15:46:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQxKR-00052D-LI for 50568@debbugs.gnu.org; Thu, 16 Sep 2021 15:45:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33846) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQxKL-00087o-2q; Thu, 16 Sep 2021 15:45:45 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35714 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQxK4-0006F6-CS; Thu, 16 Sep 2021 15:45:43 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87k0jk8vkf.fsf@inria.fr> <87tuin7dr4.fsf@gnu.org> <20210914093610.u56q7ltjbwbbnf34@pelzflorian.localdomain> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 30 Fructidor an 229 de la =?UTF-8?Q?R=C3=A9volution?= 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: Thu, 16 Sep 2021 21:45:26 +0200 In-Reply-To: <20210914093610.u56q7ltjbwbbnf34@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Tue, 14 Sep 2021 11:36:10 +0200") Message-ID: <8735q41ezt.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 50568@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631821632; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=emQrKtVxh4flVTVaVCB6njWvVbg6a8ViiBjS2TZy0qA=; b=fqrMX/1w1aIrjNcQIp/kbz96LSzoM6OzSJ8rgY/ePPrJBCb396jLZ9tkiJrx2aFiuvammZ ArNAd8e1ZQf2arM37RYEmNuoS/YMD5AZYAf2YD7ID6VfHvTVO5KEMKJww8n0rPCP7oF2pW BxwQeyvJNzmXBw1/1gzyfks0nU9c8vs703ZSCLsMwwgUaIsGL5NTWjk0nnO/g2tHkVNjpg hzOw0oxWjWJsnPIxLuxkSC6GTibpXvu5oc72tFMRQVkBge3zMtLpAM3q2lr38GPSDqMOvS dLsvUMP2VLWBzQFuE8F2cuis+x8zRGNIeKEK+v5m8/8870OgMtSRSXWuR1d51Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631821632; a=rsa-sha256; cv=none; b=Sb6JAnaXJVB4gx5lkpKmWj6nlno+6XLQEAm7ZZ4u4PBaUsOvO4XEBhPX/gVdm9EJjsh5C6 lPYz5tP2d1gMW+WIhHS+52UI0a65NMAWO+IWUDbag9x6kqjddWWu8lxSam3i4opJLiZhUG hy7u7VE54b1n4BykYCn9nVplDYVcaNxFCn1nZvDkamIEbxLRNIfd89iGTUI+7WwwZVhPWV +c4LI6hJCv3vt4hvrdKukqtvBBUrQdjZ3YCUGbM9Ed3YofpbRY/OyQKBlodm3Fh3yFGIxi cxV5f3f03DCSGIghyB+rskmrlxpKZlWiZIbABjGxeI54oNa+lQ4raXoZ8Muvuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.40 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: F36C05828 X-Spam-Score: -1.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: GQBU3ON9F0a2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Florian, "pelzflorian (Florian Pelz)" skribis: > On Tue, Sep 14, 2021 at 10:38:55AM +0200, Ludovic Court=C3=A8s wrote: >> Hi, >>=20 >> Maxime Devos skribis: >>=20 >> > The Wayback Machine has some copies of software at https://www.atromat= ic.net: >>=20 >> Thanks, they=E2=80=99re now all in store on berlin. >>=20 >> It=E2=80=99s kinda ironic that it=E2=80=99s the Wayback Machine that=E2= =80=99s saving us here=E2=80=A6 >> I wonder if there=E2=80=99s a way to construct generic web.archive.org U= RLs that >> we could use as a fallback in (guix build download)? > > AFAIK Just replace the date in > > On Mon, Sep 13, 2021 at 03:49:05PM +0200, Maxime Devos wrote: >> https://web.archive.org/web/20161204140455/https://www.astromatic.net/do= wnload/stuff/stuff-1.26.0.tar.gz > > by the current time. Oh nice, that seems to work: --8<---------------cut here---------------start------------->8--- $ guix download https://web.archive.org/web/20210911171400/https://www.astr= omatic.net/download/stuff/stuff-1.26.0.tar.gz Starting download of /tmp/guix-file.QXTq4V >From https://web.archive.org/web/20210911171400/https://www.astromatic.net/= download/stuff/stuff-1.26.0.tar.gz... following redirection to `https://web.archive.org/web/20161204140455/http:/= /www.astromatic.net/download/stuff/stuff-1.26.0.tar.gz'... =E2=80=A66.0.tar.gz = 200KiB/s 00:20 | 3.9MiB transferred /gnu/store/l3r5j8r4f6fh6bxa9va3681n3bclxpdq-stuff-1.26.0.tar.gz 1syibi3b86z9pikhicvkkmgxm916j732fdiw0agw0lq6z13fdcjm --8<---------------cut here---------------end--------------->8--- How =E2=80=99bout the attached patch? Works for me. Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/build/download.scm b/guix/build/download.scm index c8ddadfdd4..140e42afec 100644 --- a/guix/build/download.scm +++ b/guix/build/download.scm @@ -678,6 +678,18 @@ and write the output to FILE." (false-if-exception* (disarchive-assemble spec file #:resolver resolve)))))))) +(define (internet-archive-uri uri) + "Return a URI corresponding to an Internet Archive backup of URI, or #f if +URI does not denote a Web URI." + (and (memq (uri-scheme uri) '(http https)) + (let* ((now (time-utc->date (current-time time-utc))) + (date (date->string now "~Y~m~d~H~M~S"))) + ;; Note: the date in the URL can be anything and web.archive.org + ;; automatically redirects to the closest date. + (build-uri 'https #:host "web.archive.org" + #:path (string-append "/web/" date "/" + (uri->string uri)))))) + (define* (url-fetch url file #:key (timeout 10) (verify-certificate? #t) @@ -769,7 +781,9 @@ otherwise simply ignore them." (setvbuf (current-error-port) 'line) - (let try ((uri (append uri content-addressed-uris))) + (let try ((uri (append uri content-addressed-uris + (or (and=> (internet-archive-uri (first uri)) list) + '())))) (match uri ((uri tail ...) (or (fetch uri file) --=-=-=--