From patchwork Mon Feb 6 15:55:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 46696 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A392E27BBED; Mon, 6 Feb 2023 15:56:26 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0D11527BBE9 for ; Mon, 6 Feb 2023 15:56:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pP3qo-00064s-Df; Mon, 06 Feb 2023 10:56:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pP3qc-00060R-KN for guix-patches@gnu.org; Mon, 06 Feb 2023 10:56:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pP3qc-0002jG-Aj for guix-patches@gnu.org; Mon, 06 Feb 2023 10:56:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pP3qb-000494-Ld for guix-patches@gnu.org; Mon, 06 Feb 2023 10:56:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61324] [PATCH] download: Add bordeaux.guix.gnu.org as a content addressed mirror. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Feb 2023 15:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61324 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61324@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167569891815869 (code B ref -1); Mon, 06 Feb 2023 15:56:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Feb 2023 15:55:18 +0000 Received: from localhost ([127.0.0.1]:49653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pP3pt-00047t-Ku for submit@debbugs.gnu.org; Mon, 06 Feb 2023 10:55:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:41070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pP3pn-00047c-1k for submit@debbugs.gnu.org; Mon, 06 Feb 2023 10:55:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pP3pm-0005VR-0l for guix-patches@gnu.org; Mon, 06 Feb 2023 10:55:10 -0500 Received: from mira.cbaines.net ([212.71.252.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pP3pk-0002Wd-4a for guix-patches@gnu.org; Mon, 06 Feb 2023 10:55:09 -0500 Received: from localhost (unknown [IPv6:2a02:1808:200:8622:f055:17e:cfb4:2]) by mira.cbaines.net (Postfix) with ESMTPSA id A3FF527BBE9 for ; Mon, 6 Feb 2023 15:55:06 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id df7b81f4 for ; Mon, 6 Feb 2023 15:55:05 +0000 (UTC) From: Christopher Baines Date: Mon, 6 Feb 2023 16:55:05 +0100 Message-Id: <20230206155505.6397-1-mail@cbaines.net> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches bordeaux.guix.gnu.org now provides access to some files by hash. This is done through the nar-herder finding a nar produced by a fixed output derivation for the requested content, and then providing the content stored inside that nar. I've put this new entry at the start of the list, as I think it's more likely to have content than the others. Because bordeaux.guix.gnu.org stores nars indefinitely, my suspicion is that it's going to be able to fulfil more requests than ci.guix.gnu.org, which relies on the file requested being in the store (so the now frequent garbage collection is going to limit the files available). * guix/download.scm (%content-addressed-mirrors): Add bordeaux.guix.gnu.org. --- guix/download.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/guix/download.scm b/guix/download.scm index fff54d7a17..561a893eee 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -387,7 +387,11 @@ (define (guix-publish host) file "/" (symbol->string algo) "/" (bytevector->nix-base32-string hash)))) - (list (guix-publish "ci.guix.gnu.org") + (list (guix-publish + ;; bordeaux.guix.gnu.org uses the nar-herder rather than guix + ;; publish, but it supports the same style of requests + "bordeaux.guix.gnu.org") + (guix-publish "ci.guix.gnu.org") (lambda (file algo hash) ;; 'tarballs.nixos.org' supports several algorithms. (string-append "https://tarballs.nixos.org/"