From patchwork Tue Aug 22 16:52:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 53099 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 090CE27BBE2; Tue, 22 Aug 2023 17:55:34 +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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS 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 0170C27BBE9 for ; Tue, 22 Aug 2023 17:55:33 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYUep-0004E9-IS; Tue, 22 Aug 2023 12:55:07 -0400 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 1qYUen-0004CG-6O for guix-patches@gnu.org; Tue, 22 Aug 2023 12:55:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYUem-0000UA-4o; Tue, 22 Aug 2023 12:55:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qYUek-0007ff-Dx; Tue, 22 Aug 2023 12:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v4 01/10] gnu-maintenance: Make base-url argument of import-html-release required. References: In-Reply-To: Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 22 Aug 2023 16:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65230 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65230@debbugs.gnu.org Cc: Maxim Cournoyer , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 65230-submit@debbugs.gnu.org id=B65230.169272329729445 (code B ref 65230); Tue, 22 Aug 2023 16:55:02 +0000 Received: (at 65230) by debbugs.gnu.org; 22 Aug 2023 16:54:57 +0000 Received: from localhost ([127.0.0.1]:60307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYUef-0007er-8I for submit@debbugs.gnu.org; Tue, 22 Aug 2023 12:54:57 -0400 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]:60730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qYUed-0007ec-RU for 65230@debbugs.gnu.org; Tue, 22 Aug 2023 12:54:56 -0400 Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-76dacc4b378so116701885a.1 for <65230@debbugs.gnu.org>; Tue, 22 Aug 2023 09:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692723287; x=1693328087; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zwtEy8EVivZqRWhgKLVL9BFYU9+RVCEkhF+RI8/P9js=; b=cJbd3Mz+UCGxRJozjFg/oQHfgEkqDJ2xXXhi+rO86hbOpd4VMEkkV3JqCNveJNgWyV uA/hcH9gEuG7VSIvJfyvGWo2XoA/m+aI7klMPbXFavWoOinfAmXY7XGfoEN12u2eNmrh GDuwlTofnstEwmzx3Zf8oXPn+Bzr1N8/GaFRTPdEb2oRqIhMarPj4mbZuuRwvzKnzb/a /NhrK/a8DjyKJpb2lYAD8wUo4mDaWPbsChFS/7nAsg13Sv46prw8cFDxCh93WpAI/JFr HIDhvbnxlzvPxscZGpcYfLKvW9tSOsl9KZFi1Trdul4WOMWLVSnduhp8lDh2gtACZ8UE /pKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692723287; x=1693328087; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zwtEy8EVivZqRWhgKLVL9BFYU9+RVCEkhF+RI8/P9js=; b=jaXexXZ/Hcunumm6DNy+qx0wn1hvoTSFZaZZQrhHXDKXVMqitlA6E6uXx6I4uYtWpl rFpBlnYEQcr1wrfKPO+qPnCKYI/9/FLyRw1dHMfMBL69PCD8hblf1fmvuvXI4xyBWumI gZ11JRfVIgGbzxyBjthBDPM98vvBp+bRQDeKg46KR9J0ioSrcCoWqB95f/jIXzlE9Bwe 81w3MvpHymOYKz49buuWwNxxLaWWS8M1BQfJIaB1tdrSnheCVF//Pj+uI1KDcKShZADS YlqwlYvaWwT+GBWiDOrlzG6PEaVybcgJQDW2OL0ZKauLX5ESznm5Jw19w9c/pcUxyuH0 N1ZA== X-Gm-Message-State: AOJu0YzP3I1M9mjRmM3UvV7BQo0C4iAxbNZ8ttEPmGOLTRQG9h21IYNd Qp1z9Z0q4qoIuh8adkGWQ1UVNI+DC0U= X-Google-Smtp-Source: AGHT+IH4alNg0JT6rCmP6WFjkVXIanDFhTS08jNI0Qx0wiG+2oBHxoWLj+HYG8hPNsgxMEfcTH/y7Q== X-Received: by 2002:a05:620a:408e:b0:767:c572:ab10 with SMTP id f14-20020a05620a408e00b00767c572ab10mr14763835qko.35.1692723287030; Tue, 22 Aug 2023 09:54:47 -0700 (PDT) Received: from localhost.localdomain (dsl-158-129.b2b2c.ca. [66.158.158.129]) by smtp.gmail.com with ESMTPSA id p12-20020ae9f30c000000b007678973eaa1sm3336262qkg.127.2023.08.22.09.54.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 09:54:46 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 22 Aug 2023 12:52:18 -0400 Message-ID: <06b6c57b1af15b6ddca780182fc4a5e5264a67db.1692723147.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 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 It doesn't make sense to have it default to something like "https://kernel.org/pub"; it should always be provided explicitly. * guix/gnu-maintenance.scm (import-html-release) <#:base-url>: Turn keyword argument into a positional argument. Update doc. * guix/gnu-maintenance.scm (import-savannah-release): Adjust call accordingly. (import-kernel.org-release): Likewise. (import-html-updatable-release): Likewise. --- (no changes since v1) guix/gnu-maintenance.scm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) base-commit: c655231b72ac28b5a433069fcf86a835c9c83691 diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 5c16a7617d..198d72fc86 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -483,15 +483,14 @@ (define (html-links sxml) (_ links)))) -(define* (import-html-release package +(define* (import-html-release base-url package #:key (version #f) - (base-url "https://kernel.org/pub") (directory (string-append "/" package)) file->signature) - "Return an for the latest release of PACKAGE (a string) on -SERVER under DIRECTORY, or #f. Optionally include a VERSION string to fetch a -specific version. + "Return an for the latest release of PACKAGE (a string) +under DIRECTORY at BASE-URL, or #f. Optionally include a VERSION string to +fetch a specific version. BASE-URL should be the URL of an HTML page, typically a directory listing as found on 'https://kernel.org/pub'. @@ -730,9 +729,8 @@ (define* (import-savannah-release package #:key (version #f)) (directory (dirname (uri-path uri)))) ;; Note: We use the default 'file->signature', which adds ".sig", ".asc", ;; or whichever detached signature naming scheme PACKAGE uses. - (import-html-release package + (import-html-release %savannah-base package #:version version - #:base-url %savannah-base #:directory directory))) (define* (latest-sourceforge-release package #:key (version #f)) @@ -824,9 +822,8 @@ (define* (import-kernel.org-release package #:key (version #f)) ((uri mirrors ...) uri)))) (package (package-upstream-name package)) (directory (dirname (uri-path uri)))) - (import-html-release package + (import-html-release %kernel.org-base package #:version version - #:base-url %kernel.org-base #:directory directory #:file->signature file->signature))) @@ -874,9 +871,8 @@ (define* (import-html-updatable-release package #:key (version #f)) (dirname (uri-path uri)))) (package (package-upstream-name package))) (false-if-networking-error - (import-html-release package + (import-html-release base package #:version version - #:base-url base #:directory directory)))) (define %gnu-updater