From patchwork Thu Sep 1 09:01:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: M X-Patchwork-Id: 42111 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 2B8CB27BBEA; Thu, 1 Sep 2022 11:04:48 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable 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 B7D3527BBE9 for ; Thu, 1 Sep 2022 11:04:47 +0100 (BST) Received: from localhost ([::1]:36984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTh42-0000tS-SH for patchwork@mira.cbaines.net; Thu, 01 Sep 2022 06:04:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTg6I-00047I-Ns for guix-patches@gnu.org; Thu, 01 Sep 2022 05:03:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTg6I-0005dU-AL for guix-patches@gnu.org; Thu, 01 Sep 2022 05:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTg6H-0008Px-Tc for guix-patches@gnu.org; Thu, 01 Sep 2022 05:03:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57515] [PATCH 3/8] gnu-maintenance: Produce mirror:// URIs in latest-html-release. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 01 Sep 2022 09:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57515 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57515@debbugs.gnu.org Received: via spool by 57515-submit@debbugs.gnu.org id=B57515.166202292332215 (code B ref 57515); Thu, 01 Sep 2022 09:03:01 +0000 Received: (at 57515) by debbugs.gnu.org; 1 Sep 2022 09:02:03 +0000 Received: from localhost ([127.0.0.1]:41188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTg5K-0008NG-UT for submit@debbugs.gnu.org; Thu, 01 Sep 2022 05:02:03 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:48474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTg5G-0008ME-0S for 57515@debbugs.gnu.org; Thu, 01 Sep 2022 05:02:00 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]) by michel.telenet-ops.be with bizsmtp id EZ1v2800K20ykKC06Z1wpZ; Thu, 01 Sep 2022 11:01:56 +0200 From: Maxime Devos Date: Thu, 1 Sep 2022 11:01:50 +0200 Message-Id: X-Mailer: git-send-email 2.37.2 In-Reply-To: References: MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1662022916; bh=wLsvPwlYd2XNSjRPCGUV2yb4QPUKFBjiSxlxu1o8s30=; h=From:To:Subject:Date:In-Reply-To:References:Reply-To; b=OrRfBIaO48nbc0+PgNRcdwObyfCTZWCi500fc0hhskIXEPqeENzyFdJFEqUfFDnCe GGAEO2b4soWxQ4WLoT7AGIzjmrw3YAagaSwgxaIQ/VBlpG4PleNAGG1ZsXPfbGMmPa 7OmmYTxohjjCwiFVBIY9Kdgoe7Oi2NzGw177NpbMa5biHFtByoZq5FsOtMnlEdkYJ1 Zk9bP9X9wTcsWdG9eJMKJtH3A9zqhJQeWvn5X937WzcJNfcuL4x+URZB3O5KBUzEPc eQUHRp0aOt95IN5je3woxGNkRo+OobgmUdPHS9yJq162pWf6qi1/oZzUqOT53FvsOo +n3vOzoeAkPhg== 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: , Reply-To: 57515@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Partially fixes: https://issues.guix.gnu.org/57477. TODO: test case, it's http! I'm not aware of a package using both latest-html-release and mirrors, so it has not been completely tested. However, updating "yt-dlp" appears to work (except for git-fetch not being supported yet). The expression for the signature-urls field had to be tweaked to not call uri-mirror-rewrite on #false. * guix/gnu-maintenance.scm (latest-html-release)[url->research]{urls,signature-urls}: Call uri-mirror-rewrite on the URLs. --- guix/gnu-maintenance.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 84fd087319..2f09539d5d 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -532,9 +532,12 @@ (define (url->release url) (upstream-source (package package) (version version) - (urls (list url)) + ;; uri-mirror-rewrite: Don't turn nice mirror:// URIs into ftp:// + ;; URLs during "guix refresh -u". + (urls (list (uri-mirror-rewrite url))) (signature-urls - (list ((or file->signature file->signature/guess) url)))))))) + (and=> ((or file->signature file->signature/guess) url) + (lambda (url) (list (uri-mirror-rewrite url)))))))))) (define candidates (filter-map url->release links))