From patchwork Tue Aug 15 20:29:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52861 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 90DD927BBEA; Tue, 15 Aug 2023 21:31:29 +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 4618A27BBE9 for ; Tue, 15 Aug 2023 21:31:27 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0h1-0004oo-Mb; Tue, 15 Aug 2023 16:31:08 -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 1qW0gy-0004nx-H8 for guix-patches@gnu.org; Tue, 15 Aug 2023 16:31: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 1qW0gx-0008D2-9R; Tue, 15 Aug 2023 16:31:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0gv-0005bJ-M2; Tue, 15 Aug 2023 16:31:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 01/13] 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, 15 Aug 2023 20:31:01 +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.169213145921502 (code B ref 65230); Tue, 15 Aug 2023 20:31:01 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:30:59 +0000 Received: from localhost ([127.0.0.1]:36766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0gs-0005ak-GF for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:30:58 -0400 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]:54473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0go-0005aF-Mc for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:30:56 -0400 Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-410450b3f55so20340581cf.0 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131449; x=1692736249; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZycyRDVxA31d99W688/qtGx7VDHoDk3U3xexygAJT7E=; b=Ge8P6zxGtRoRB/8NP/GqAh97On+Hg++Ii0CRdYtgxTUHmtC/+f0piXWH6bbcoKQS3V JjuPaza+VfP8zRhrmTEVjNUBK86oxEcF53Q72B/7+kOxPz/DX+0YnMFpSZ61v4ra1kVj gcJfh2COMCdcnOJrCMIXCH88VyX2cp34sHHBQxZzvPOef3hotqM/FB3oIHzZlbHCMZSx tlsgQq6505vtQy2VuyUUckAULzUdpVckRohbAe484ZFX193eduksB95yhWWi+87YJDDz Dpi/MnCNZj6n9RMxYGvwBk5ofhX+Xj6u3a/LIYQTZi8nQ8XPiCOoJSRWUzAcoWAQGk3k VXwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131449; x=1692736249; 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=ZycyRDVxA31d99W688/qtGx7VDHoDk3U3xexygAJT7E=; b=lO32/L6rwzSoqMFFEF4aq2Yh818/xhNsOqViNI/6wu7oueWPK0FYNdmsbUS6zVkT2y oLhhLdVpcxRM8pxquxsBOkqMa3AO+MpKUsI1SwlomHxWct7WtySzzEbWJ0NRmnaoqeZD WcinGbz6Hv+dWoDGddjzHxeIAnVFFHVsQBbrfQIgn3uqsc15cqqQ7eXNqVNkonJP736H Z+IYYl7nEkLgl4H+TDac2jsAvjELICUZMQdqJrT3qPMFXOJZZmewpcS8TFTiQy0mlYdC yGJDEd1NxtLUUjFAHrEsHpnV+6t/URsm6XOHKnllk9l+AWUv2trg+wKlGgSR1r1TAeGu cTgg== X-Gm-Message-State: AOJu0YzI+pLAz+DVG/8j75M3ka56KzpDqByc+L/nmpkAF0wiKFwY9zzH iz5GpU8v0Kulp9XcO5+68E0v0R4+7g8xeg== X-Google-Smtp-Source: AGHT+IEurBFO9WwqzTdEKxOIzIN2AtctyTcvMg+0/v5rMdLV1WV6jHHeVSkIrmQERad9WZfypDGX9g== X-Received: by 2002:a05:622a:190a:b0:40f:dcd0:9660 with SMTP id w10-20020a05622a190a00b0040fdcd09660mr19840176qtc.65.1692131448717; Tue, 15 Aug 2023 13:30:48 -0700 (PDT) Received: from localhost.localdomain (dsl-148-65.b2b2c.ca. [66.158.148.65]) by smtp.gmail.com with ESMTPSA id f26-20020ac86eda000000b0040fe13251dasm4021078qtv.83.2023.08.15.13.30.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:30:48 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:25 -0400 Message-ID: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.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: a4bed14c438dc0cbc1c1885a38f8409c7fef7957 diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 32712f7218..b95a45824e 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))) @@ -870,9 +867,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