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 From patchwork Tue Aug 15 20:29:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52864 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 4234827BBE9; Tue, 15 Aug 2023 21:32:33 +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,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 5B89827BBE2 for ; Tue, 15 Aug 2023 21:32:31 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i6-00059K-Iq; Tue, 15 Aug 2023 16:32:14 -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 1qW0hx-00053S-0n for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32: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 1qW0hw-0008Ki-OD; Tue, 15 Aug 2023 16:32:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hu-0005fP-8n; Tue, 15 Aug 2023 16:32:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 02/13] download: Add mirrors for Qt. 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:32: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.169213146221561 (code B ref 65230); Tue, 15 Aug 2023 20:32:02 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:02 +0000 Received: from localhost ([127.0.0.1]:36770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0gw-0005bP-0c for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:02 -0400 Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]:45404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0gq-0005aU-UA for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:30:59 -0400 Received: by mail-qk1-x72d.google.com with SMTP id af79cd13be357-76cd8dab98fso388410985a.3 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131451; x=1692736251; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NJ1V86HTOXkVQrgZV0m9bn/cQKyACxOKVPLxgvK8f1c=; b=bgfMmww74UhHqFhugWiNyyTsWL/grlKkL7GjZ9c6cFDS5MB5Y6ToHxXg5GYtet54rd Tp8T0qxiy9XtecvEoWnqFP1b8pFHD22MNbTBAXkUIxIjzRJtG2upkLPsBdLgNOKkrQK0 3dD2TmbseEN8X9cdoM38BGD/+iHD/sfbFgxkfPaOAdobr2a9R091FKE0F6jZt2K9WBEz vL+oJkkJqqT2cv+twQGy6U1+dr2HB4nJ2Xs6n24HDa13oD+42mtttmSLCmzWAZZex5+I lcQ5/zpTLIDjwgZpB6v2OxbtyRuu82Hrqw2NvS8Cdq7R6CX18pQ6SC8/6OW0KGAEslsa BVbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131451; x=1692736251; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NJ1V86HTOXkVQrgZV0m9bn/cQKyACxOKVPLxgvK8f1c=; b=UA/3KqNQv5V0n8teBjmZi86wUDFSG5QlVmbQNIwWAjlLd6I5TxG+Pnz05numt4qgl9 S4tVNJmUEDKhOIEXhTkt3pdRPrizKTdvg8ihAjbCiIi8XSLAmkmdy8SOkjvzobSqnirn 1OjBL1H3D8XVMEtk1oiVga8fqlO4JBI3g8iV1UbSlQIQwou5099zXeTSlnP87GuWFM6G EEhF8zg9Y/6ab8aQQdgsHhOSrRNuyrc1ytFaEq1VIIFVw0t83EQQaxbkC5nz0sx70SGR rKM1ukiIsyfj+R9UclhTuabiqb9htLlq3vurxaYJB4+eyf9Ma4xf/bZNaPc75NTQF7mj QnIg== X-Gm-Message-State: AOJu0Yx6wT3RxsznjR04v9SGVeD8937tMVg7WwNbajiZrMOBVmJZlh33 DT4NnRr6ciwX7PAFfJ6CUUe5qAipf7UaCw== X-Google-Smtp-Source: AGHT+IH8pcg7dnOaSk+h+b3zPQj2tkpM2Zz8VtxvnkD5LNX0yuM/3zO7iAr92opC6EnU9ei5s9/sFA== X-Received: by 2002:a05:620a:2687:b0:76c:8e13:75f0 with SMTP id c7-20020a05620a268700b0076c8e1375f0mr16707372qkp.5.1692131451117; Tue, 15 Aug 2023 13:30:51 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:30:50 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:26 -0400 Message-ID: <78c1cc15d8c345a43a016eab4b816c0408340450.1692131377.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> 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 * guix/download.scm (%mirrors): Augment with qt mirrors. --- Changes in v2: - Move authoritative mirror last, as it's too slow. guix/download.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/guix/download.scm b/guix/download.scm index 30d7c5a86e..ce6ebd0df8 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -358,7 +358,15 @@ (define %mirrors "https://mirror.esc7.net/pub/OpenBSD/") (mate "https://pub.mate-desktop.org/releases/" - "http://pub.mate-desktop.org/releases/")))) + "http://pub.mate-desktop.org/releases/") + (qt + "https://mirrors.ocf.berkeley.edu/qt/official_releases/" + "https://ftp.jaist.ac.jp/pub/qtproject/official_releases/" + "https://ftp.nluug.nl/languages/qt/official_releases/" + "https://mirrors.cloud.tencent.com/qt/official_releases/" + "https://mirrors.sjtug.sjtu.edu.cn/qt/official_releases/" + "https://qtproject.mirror.liquidtelecom.com/official_releases/" + "https://download.qt.io/official_releases/")))) ;slow (define %mirror-file ;; Copy of the list of mirrors to a file. This allows us to keep a single From patchwork Tue Aug 15 20:29:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52866 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 3906527BBEC; Tue, 15 Aug 2023 21:32:53 +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,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 9C25027BBE2 for ; Tue, 15 Aug 2023 21:32:50 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i0-00054d-Np; Tue, 15 Aug 2023 16:32: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 1qW0hw-00053J-Eq for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:04 -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 1qW0hw-0008KR-61 for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hu-0005fY-PN; Tue, 15 Aug 2023 16:32:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 03/13] gnu: qt: Streamline qt-urls. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, maxim.cournoyer@gmail.com, iyzsong@envs.net, guix-patches@gnu.org Resent-Date: Tue, 15 Aug 2023 20:32: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 , Andreas Enge , Maxim Cournoyer , =?utf-8?b?5a6L5paH5q2m?= X-Debbugs-Original-Xcc: Andreas Enge , Maxim Cournoyer , =?utf-8?b?5a6L5paH5q2m?= Received: via spool by 65230-submit@debbugs.gnu.org id=B65230.169213146421601 (code B ref 65230); Tue, 15 Aug 2023 20:32:02 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:04 +0000 Received: from localhost ([127.0.0.1]:36776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0gw-0005bj-Mv for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:04 -0400 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:55699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0gs-0005aX-QY for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:00 -0400 Received: by mail-qt1-x830.google.com with SMTP id d75a77b69052e-40fda409ca7so40737561cf.3 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131453; x=1692736253; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=h3jUPm0YLqqvrgloZ38QyiGL7Nhxo+f3fSjBD8yX/1c=; b=dusFihQkzJvhXwOKohsk4JN2hGi0XASmoTg2MpkFcT6jw9hFCIev469JPhEOXQO1or WgvP9pg+YDNIeb33Uk5GfuIrWqxOWlnxtNtx7CcUrgI+GkFaPY7S3h9O1FN+Rc1XuAXy HEfhD1mSNK/5xQtFy+9vAws9ZezzKf+HBFSCeT433nUpi7+1F1X4QY0yNNeC+kopM4Eg Z4nkxws6rhEikdmzmuanmGcCYOUjEl9kA2UyiZsAl84pSKRl6LmHdeSwfsXFgwipwA+6 B4Zg7ykIco2ZT2cftkiTz5Z4gkHltbD6BcImUndZMS/xCP+7ZNDPK+VS0hPKT3j7vNmo iqLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131453; x=1692736253; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h3jUPm0YLqqvrgloZ38QyiGL7Nhxo+f3fSjBD8yX/1c=; b=IvFGfqUqw1rLymonCC29tJ6bXswMj08kQTxMhao3Z8UANDQZAvDWIg9VxbgAH6P+wx Ih/RTAchIHDzcKcSebC5vQ0enBpA8Z8oodKRvIyQLfvqk3T3wnpoarl5LzEVvlwD4scP +ioBaxV4PzNm/CO0Tnsm1ROb78g4TOrCuwa4hnJQg/deJ+KZZqJ2Fp7z5BadA+Lqqlh9 dmoiDDXrfyVgu/71m+AQoZHCDRrl0e/7Qofu80Xr9/C5adN/mot8afgDqMvtNebbYCcx /7Cj3bZeXEojgXrk9iFAGFGZhn2hRj8+oE+6FgBrMdZGOOgzVp89HdBfqJEClzCR9gsf FuJA== X-Gm-Message-State: AOJu0YwoXp/uJ2KkbsraXw8RjMIEE/jfBNFe3fVLwgK7wVGZ4JPDBCY4 XV84ou3N8nZ/j47YwvE2jULuDX4evPdmkg== X-Google-Smtp-Source: AGHT+IEEDY4iqjQBRFtr7vPfRJ7IJ23/dZTAm/ZhtZW5/Fdeiptb6GHEaMmxDUBalFoH+AHcDd/KKw== X-Received: by 2002:a05:622a:587:b0:40f:d49c:c93b with SMTP id c7-20020a05622a058700b0040fd49cc93bmr18189916qtb.28.1692131452916; Tue, 15 Aug 2023 13:30:52 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:30:52 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:27 -0400 Message-ID: <4ee6615142612a619dbe736f1e4ea253196d54a0.1692131377.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> 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 * gnu/packages/qt.scm (qt-urls): Rename to... (qt-url): ... this. Return a single URL built using the mirror:// scheme. Adjust all callers accordingly. --- (no changes since v1) gnu/packages/qt.scm | 124 +++++++++++++++++++++----------------------- 1 file changed, 58 insertions(+), 66 deletions(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 1184a85938..b73acef3c5 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -124,6 +124,7 @@ (define-module (gnu packages qt) #:use-module (gnu packages xiph) #:use-module (gnu packages xorg) #:use-module (gnu packages xml) + #:use-module (ice-9 match) #:use-module (srfi srfi-1)) (define %qt-version "5.15.8") @@ -315,27 +316,18 @@ (define-public grantlee system, and the core design of Django is reused in Grantlee.") (license license:lgpl2.1+))) -(define (qt-urls component version) - "Return a list of URLs for VERSION of the Qt5 COMPONENT." +(define (qt-url component version) + "Return a mirror URL for the Qt5 COMPONENT at VERSION." ;; We can't use a mirror:// scheme because these URLs are not exact copies: ;; the layout differs between them. - (list (string-append "https://download.qt.io/official_releases/qt/" - (version-major+minor version) "/" version - "/submodules/" component "-everywhere-opensource-src-" - version ".tar.xz") - (string-append "https://download.qt.io/official_releases/qt/" - (version-major+minor version) "/" version - "/submodules/" component "-everywhere-src-" - version ".tar.xz") - (string-append "https://download.qt.io/archive/qt/" - (version-major+minor version) "/" version - "/submodules/" component "-everywhere-opensource-src-" - version ".tar.xz") - (let ((directory (string-append "qt5" (string-drop component 2)))) - (string-append "http://sources.buildroot.net/" directory "/" - component "-everywhere-opensource-src-" version ".tar.xz")) - (string-append "https://distfiles.macports.org/qt5/" - component "-everywhere-opensource-src-" version ".tar.xz"))) + (let ((x (match (version-major version) + ("5" "-everywhere-opensource-src-") + ;; Version 6 and later dropped 'opensource' from the archive + ;; names. + (_ "-everywhere-src-")))) + (string-append "mirror://qt/qt/" + (version-major+minor version) "/" version + "/submodules/" component x version ".tar.xz"))) (define-public qtbase-5 (package @@ -343,7 +335,7 @@ (define-public qtbase-5 (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "175ynjndpzsw69vnsq4swykn9f48568ww9b4z3yw7azkqwk13cdz")) @@ -596,7 +588,7 @@ (define-public qtbase (version "6.3.2") (source (origin (inherit (package-source qtbase-5)) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "19m9r8sf9mvyrwipn44if3nhding4ljys2mwf04b7dkhz16vlabr")) @@ -899,7 +891,7 @@ (define-public qt3d-5 (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "18hbv4l9w0czaxcch6af9130fgs4sf400xp0pfzl81c78fwrkfsb")))) @@ -961,7 +953,7 @@ (define-public qt5compat (version "6.3.2") (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1k30hnwnlbay1hnkdavgf6plsdzrryzcqd2qz8x11r477w7sr8wi")))) @@ -991,7 +983,7 @@ (define-public qtsvg-5 (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0qnmcvp5jap4qq9w7xak66g6fsb48q1lg02rn4lycvnhgwzblbww")))) @@ -1059,7 +1051,7 @@ (define-public qtsvg (version "6.3.2") (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "14i3f23k9k0731akpwa6zzhw5m3c0m2l5r7irvim4h4faah445ac")))) @@ -1090,7 +1082,7 @@ (define-public qtimageformats (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0c6fq9zcw5hbkiny56wx2fbm123x14l7habydv6zhvnhn3rhwi31")) @@ -1117,7 +1109,7 @@ (define-public qtx11extras (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1gzmf0y2byzrgfbing7xk3cwlbk1cyjlhqjbfh8n37y09gg65maf")))) @@ -1183,7 +1175,7 @@ (define-public qtxmlpatterns (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1inf7ar32a557faqpwdsmafhz1p6k8hywpw3wbsdjlj74dkgdq35")))) @@ -1212,7 +1204,7 @@ (define-public qtdeclarative-5 (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1kb8nj17vmnky0ayiwypim7kf6rmlmfcjf6gnrw8rydmp61w0vh2")))) @@ -1258,7 +1250,7 @@ (define-public qtdeclarative ;; TODO: Package 'masm' and unbundle from sources. (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1hbw63828pp8vm9b46i2pkcbcpr4mq9nblhmpwrw2pflq0fi24xq")))) @@ -1390,7 +1382,7 @@ (define-public qtconnectivity (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1j6qgkg77ycwcjxnhh38i9np1z8pjsqrzvfk3zsyq07f6k563fnc")))) @@ -1408,7 +1400,7 @@ (define-public qtwebsockets-5 (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "12h520lpj2pljgkyq36p1509mw4pxgb76n30d32kg52crjsk34pa")))) @@ -1431,7 +1423,7 @@ (define-public qtwebsockets (version "6.3.2") (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1smbvidaybphvsmaap9v1pbkibwmng11hb925g0ww4ghwzpxkb8q")))) @@ -1471,7 +1463,7 @@ (define-public qtsensors (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1fdpgbikvxjacyipcyac0czqhv96pvc75dl9cyafslws8m53fm56")))) @@ -1500,7 +1492,7 @@ (define-public qtmultimedia-5 (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1fz0ffpckvbg6qfhab2rrzfnvh4mlalqxcn0kbkd21mi44apjirk")) @@ -1544,7 +1536,7 @@ (define-public qtshadertools (version "6.3.2") (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) ;; Note: the source bundles *patched* glslang and SPIRV-Cross ;; sources. (sha256 @@ -1573,7 +1565,7 @@ (define-public qtmultimedia (version "6.3.2") (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0hqwq0ad6z8c5kyyvbaddj00mciijn2ns2r60jc3mqh98nm2js3z")) @@ -1639,7 +1631,7 @@ (define-public qtwayland-5 (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (patches (search-patches "qtwayland-gcc-11.patch" "qtwayland-dont-recreate-callbacks.patch" "qtwayland-cleanup-callbacks.patch")) @@ -1689,7 +1681,7 @@ (define-public qtwayland (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0rwiirkibgpvx05pg2842j4dcq9ckxmcqxhaf50xx2i55z64ll83")))) (build-system cmake-build-system) @@ -1739,7 +1731,7 @@ (define-public qtserialport (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "04i8pdyml1sw4dkk9vyw2xy5bz3fp6f90fws7ag5y8iizfgs5v2v")))) @@ -1770,7 +1762,7 @@ (define-public qtserialbus (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0ws3pjbp4g8f49k8q0qa5hgyisbyk3m7kl8pwzkfws048glvz570")))) @@ -1797,7 +1789,7 @@ (define-public qtwebchannel-5 (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1pfmy6fqis47awjb590r63y13vvsfm0fq70an3ylsknhyq3firgn")))) @@ -1815,7 +1807,7 @@ (define-public qtwebchannel (version "6.3.2") (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0gqm09yqdq27kgb02idx5ycj14k5mjhh10ddp9jfs8lblimlgfni")))) @@ -1853,7 +1845,7 @@ (define-public qtwebglplugin (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1gvzhgfn55kdp5g11fg5yja5xb6wghx5sfc8vfp8zzpxnak7pbn1")))) @@ -1882,7 +1874,7 @@ (define-public qtwebview (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1b03dzlff840n2i53r105c7sv91ivwzxn7ldpgnhiyrhr897i9kj")))) @@ -1900,7 +1892,7 @@ (define-public qtlocation (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0r16qxy0pfpwvna4gpz67jk3qv3qizfd659kc9iwdh8bhz7lpjrw")))) @@ -1924,7 +1916,7 @@ (define-public qtlottie (version "6.3.2") (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1c092hmf114r8jfdhkhxnn3vywj93mg33whzav47gr9mbza44icq")))) @@ -1957,7 +1949,7 @@ (define-public qttools-5 (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1i79fwsn799x3n3jidp3f4gz9d5vi9gg6p8g8lbswb832gggigm3")))) @@ -1977,7 +1969,7 @@ (define-public qttools (version "6.3.2") (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1lmfk5bhgg4daxkqrhmx4iyln7pyiz40c9cp6plyp35nz8ppvc75")))) @@ -2017,7 +2009,7 @@ (define-public qttranslations (version "6.3.2") (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1h66n9cx4g65c9wrgp32h9gm3r47gyh1nrcn3ivbfbvngfawqxpg")))) @@ -2039,7 +2031,7 @@ (define-public qtscript (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0rjj1pn0fwdq0qz0nzisxza671ywfrq5cv6iplywfyflh7q4dmcs")) @@ -2058,7 +2050,7 @@ (define-public qtquickcontrols-5 (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0yp47bpkfckms76vw0hrwnzchy8iak23ih6w9pnwrnjkmbc65drc")))) @@ -2078,7 +2070,7 @@ (define-public qtquickcontrols2-5 (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "058dkj6272za47vnz3mxsmwsj85gxf6g0ski645fphk8s3jp2bk5")))) @@ -2105,7 +2097,7 @@ (define-public qtgraphicaleffects (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0wypji8i19kjq18qd92z8kkd3fj2n0d5hgh6xiza96833afvibj9")))) @@ -2128,7 +2120,7 @@ (define-public qtgamepad (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0vgxprgk7lak209wsg2ljzfkpwgjzscpbxmj5fyvvwm2pbnpspvk")))) @@ -2154,7 +2146,7 @@ (define-public qtscxml (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "17j6npvgr8q3lyrqmvfh1n47mkhfzk18r998hcjm2w75xj46km1n")) @@ -2181,7 +2173,7 @@ (define-public qtpositioning (version "6.3.2") (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0zh45lf164nzwl1hh96qm64nyw9wzzrnm5s7sx761glz54q6l5xz")))) @@ -2212,7 +2204,7 @@ (define-public qtpurchasing (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0bjky5ncg9yhz4a63g3jl1r5pa6i09f6g8wgzs591mhybrbmhcw8")))) @@ -2228,7 +2220,7 @@ (define-public qtcharts (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1q11ank69l9qw3iks2svr0g2g6pzng9v8p87dpsmjs988f4ysmll")))) @@ -2257,7 +2249,7 @@ (define-public qtdatavis3d (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1mr2kdshahxrkjs9wlgpr59jbqvyvlax16rlnca4iq00w3v5hrdh")))) @@ -2279,7 +2271,7 @@ (define-public qtnetworkauth-5 (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0fsmpjwkzzy3281shld7gs1gj217smb1f8ai63gdvnkp0jb2fhc5")))) @@ -2294,7 +2286,7 @@ (define-public qtnetworkauth (version "6.3.2") (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "0mjnz87splyxq7jwydi5ws2aqb6j7czscrkns193w425x0dgy94l")))) @@ -2314,7 +2306,7 @@ (define-public qtremoteobjects (version "6.3.2") (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "099b3vchi458i4fci9kfwan871jplqlk5l8q78mfnh33g80qnasi")))) @@ -2352,7 +2344,7 @@ (define-public qtspeech (version %qt-version) (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1q56lyj7s05sx52j5z6gcs000mni4c7mb7qyq4lfval7c06hw5p6")))) @@ -2461,7 +2453,7 @@ (define-public qtwebengine-5 (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "1qv15g5anhlfsdwnjxy21vc3zxxm8149vysi774l93iab6mxqmjg")) @@ -2789,7 +2781,7 @@ (define-public qtwebengine (source (origin (method url-fetch) - (uri (qt-urls name version)) + (uri (qt-url name version)) (sha256 (base32 "09j4w9ax8242d1yx3hmic7jcwidwdrn8sp7k89hj4l0n8mzkkd35")) From patchwork Tue Aug 15 20:29:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52868 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 CF8AA27BBEA; Tue, 15 Aug 2023 21:33:02 +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,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 C713C27BBE2 for ; Tue, 15 Aug 2023 21:33:00 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i1-00055B-Nw; Tue, 15 Aug 2023 16:32:09 -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 1qW0hw-00053N-Tw for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:04 -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 1qW0hw-0008Kg-Lk for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hv-0005fe-62; Tue, 15 Aug 2023 16:32:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 04/13] gnu: qt-creator: Use mirror://qt for source URI. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, maxim.cournoyer@gmail.com, iyzsong@envs.net, guix-patches@gnu.org Resent-Date: Tue, 15 Aug 2023 20:32:03 +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 , Andreas Enge , Maxim Cournoyer , =?utf-8?b?5a6L5paH5q2m?= X-Debbugs-Original-Xcc: Andreas Enge , Maxim Cournoyer , =?utf-8?b?5a6L5paH5q2m?= Received: via spool by 65230-submit@debbugs.gnu.org id=B65230.169213146521617 (code B ref 65230); Tue, 15 Aug 2023 20:32:03 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:05 +0000 Received: from localhost ([127.0.0.1]:36787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0gy-0005cL-Bf for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:05 -0400 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]:55475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0gu-0005aa-AT for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:00 -0400 Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-40fed08b990so40803121cf.2 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131455; x=1692736255; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dOzai3AU80LIMqO+acyHfxkgixo5o+mUIbWqdz+AkeE=; b=AM3GaSPCMyvuW/SlzsXH7bXy65SMbm4B5VVFAshu3oiAf1F5PytGv8ttYT/kHyjVlX whYCH6oLhzHsiByyL6toqvFRPTUOcCvSPE/dsHRUaTD2lpmq3+B3CdDG4Q3d+ozSmmTq 2FNnUcOhzsPCMOVZe/fGWYjCXi0Heohd1pL2mIxs0lTSfQOCJbYXt177VoPaf5lXdp9M iLK03ewFz0kC+V3ukemvo+85mVs8XmDIC3aWheBp2QjMOqCBkdeUkhiTlxK0KRSVd5fr dhGphW6wp6fjfTBV3BDS3IbxKBRYnoO3nUYP7L4b36mIfug78i6dJP43zW86GNb/BQiR d1+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131455; x=1692736255; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dOzai3AU80LIMqO+acyHfxkgixo5o+mUIbWqdz+AkeE=; b=NMzgm4zlRmCv7M/cwxOkMbjpGn05Tp7hnFDzXziCCf9df35vkzYupTYKaZekMdeP0S wRmntt2fjyZykVR42kJ9OwCLDkx3jKelWd3ktFhUyjT9elw5TCSmPCEgAriSfGaDmOB7 UWD+mvuuDcObVY+PF+1fx8GT4nMDlvyE2L0fYIibS6vz7eMesAmCb0GPFR2nSk5EsrOG 00BDJnvEBFmfN55Q7JRc5WKIENAUPOeZLJdB2xV27Q2boqI/sL0M/5054FuDQKo90f+k A71n0dtE1E77hbjVsvVTocu2Ugqw9T4tNXtU96FHawKxX3r8MnQUR4JKF8Sj4mt8qQPp y69A== X-Gm-Message-State: AOJu0YyZjbwm+7eR1rCr7uGFNwZoYAi7zO69m45AEBUVmOqCa4TBmjtj 0W0127ywisNBuMjunkKM+uDiYwhPVkRyFw== X-Google-Smtp-Source: AGHT+IHtI6wtV+OfSGO/DZHY7W51YlbSJ6QWFQg0uBX6r+2+F5DHucF3v2GrKVibYHjhFwCYWUe9Gg== X-Received: by 2002:a05:622a:1482:b0:403:ae9e:2a6d with SMTP id t2-20020a05622a148200b00403ae9e2a6dmr18060704qtx.43.1692131454646; Tue, 15 Aug 2023 13:30:54 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:30:54 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:28 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> 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 * gnu/packages/qt.scm (qt-creator) [source]: Use mirror://qt for origin URI. --- (no changes since v1) gnu/packages/qt.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index b73acef3c5..2ca03b77d1 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -4703,7 +4703,7 @@ (define-public qt-creator (source (origin (method url-fetch) (uri (string-append - "https://download.qt.io/official_releases/qtcreator/" + "mirror://qt/qtcreator/" (version-major+minor version) "/" version "/qt-creator-opensource-src-" version ".tar.gz")) (modules '((guix build utils))) From patchwork Tue Aug 15 20:29:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52869 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 90DDC27BBE2; Tue, 15 Aug 2023 21:33:03 +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 0465527BBEB for ; Tue, 15 Aug 2023 21:33:01 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i1-00055W-Vu; Tue, 15 Aug 2023 16:32:10 -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 1qW0hw-00053O-UQ for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:04 -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 1qW0hw-0008Kf-KE; Tue, 15 Aug 2023 16:32:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hv-0005fl-Ii; Tue, 15 Aug 2023 16:32:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 05/13] gnu-maintenance: Fix docstring. 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:32:03 +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.169213146921642 (code B ref 65230); Tue, 15 Aug 2023 20:32:03 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:09 +0000 Received: from localhost ([127.0.0.1]:36792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0h3-0005cz-8Z for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:09 -0400 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]:56531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0gw-0005ai-8S for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:03 -0400 Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-40ffbc3488eso36286911cf.0 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131456; x=1692736256; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=q3JO7BEWz5sr9o2eOQRUBQ3oLEReWz5mfl3yoNMGD5g=; b=pxY/OwtpBAOEranyFuZdE78L8oFI1fMqyFP9xRRp3TgRs64zcgtI6RsOLvgbyuVchg vTeZtRCos01mldacptfb/VEVLqquoclrqw0xznBwYXkZGyNsK0yJaosm174ibtNFuspF ulvVHQFL/Lpcu7sdUoic9SV7HDTr9mfp4lrZrv6SHKpMrZNDHgM5oqniUmBCnF6mxmYK x/ghRNIgh4FieA0s+j4A2pqz6C5njSkeeYt8DZAbNBTtRXyN7WF/vuh7IXPK+moO48S7 j3G9+Pttn1IDYL1bmHi66uF5f4WPaVYHdhV++8T2giQ+sLoWgLGO3zHXNlP0oP0eOpxv dkKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131456; x=1692736256; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q3JO7BEWz5sr9o2eOQRUBQ3oLEReWz5mfl3yoNMGD5g=; b=cI3DrwKd0pv+20IxeD3yfP0XcDfQj0y0NjJeWxtECkEuyBwt70375Lwk7wYmwmDe51 o4YMHVTTpJlK7RWaJkcEOCNGZyJqi8GU9biMm7WfHaBFPI5m2WXg2wNJ08u5dkV4ZAQX 0pmMMnr1L/CAt6aBBC/AZ/vDttvJnwuek4jq12zVGSAwTXWuYhr129820I8uLXG3INv5 6RfPRlt1lVFKEYk/RhA9sYTenJXKYAunEDKTRpyS2+A3nZCRczwY/TNo28wwfWuPzNKv 0QtGjyWnJPoCNMvI5KQqM3UZYG2D1z3RZ9kiIWv2QeBPCHd7xVyaGn9kV/ca7KI7vVAh fkSg== X-Gm-Message-State: AOJu0YwRZZGs3xnWhz/DSxKaf2+d4qmMXYeIH9nN5eTwPMHUw5F+a299 qdyF+Y6Q9XxzRMnp++3f2fT/HJAYNBioqw== X-Google-Smtp-Source: AGHT+IHXmBlrGR0NFLcYYPctLV+RhCDdab1h7DIonHJy9gQ4a2qk73LCBb7CYUGwy2IJpsMOpDr4rA== X-Received: by 2002:ac8:7f8c:0:b0:403:b6a9:b8f9 with SMTP id z12-20020ac87f8c000000b00403b6a9b8f9mr16750410qtj.36.1692131456551; Tue, 15 Aug 2023 13:30:56 -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.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:30:56 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:29 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> 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 * guix/gnu-maintenance.scm (import-kernel.org-release): Fix docstring. --- (no changes since v1) guix/gnu-maintenance.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index b95a45824e..a314923d3b 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -489,7 +489,7 @@ (define* (import-html-release base-url package (directory (string-append "/" package)) file->signature) "Return an for the latest release of PACKAGE (a string) -under DIRECTORY at BASE-URL, or #f. Optionally include a VERSION string to +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 @@ -806,7 +806,7 @@ (define* (import-xorg-release package #:key (version #f)) (string-append "/pub/xorg/" (dirname (uri-path uri))))))) (define* (import-kernel.org-release package #:key (version #f)) - "Return the latest release of PACKAGE, the name of a kernel.org package. + "Return the latest release of PACKAGE, a Linux kernel package. Optionally include a VERSION string to fetch a specific version." (define %kernel.org-base ;; This URL and sub-directories thereof are nginx-generated directory From patchwork Tue Aug 15 20:29:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52867 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 4E4FC27BBE2; Tue, 15 Aug 2023 21:32:54 +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 2BE7327BBEA for ; Tue, 15 Aug 2023 21:32:51 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i0-00054l-W5; Tue, 15 Aug 2023 16:32:09 -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 1qW0hy-00053x-6P for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:06 -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 1qW0hx-0008L8-US; Tue, 15 Aug 2023 16:32:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hw-0005fv-0z; Tue, 15 Aug 2023 16:32:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 06/13] gnu-maintenance: Extract url->links procedure. 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:32:03 +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.169213147021649 (code B ref 65230); Tue, 15 Aug 2023 20:32:03 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:10 +0000 Received: from localhost ([127.0.0.1]:36794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0h3-0005d1-Iq for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:09 -0400 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]:54477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0gy-0005ar-91 for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:04 -0400 Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-410450b3f55so20341351cf.0 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131458; x=1692736258; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lVilgTs+co6otIBGSPy1QW/2lzqmpgq2oXWxpSWuqAA=; b=OEfTIQ6JyhwumDMLex/EmN74cBsgjVRcy6dedM/1G5IRmLNmHp/YgEVusIte9pCnKv 8LrRnVEAZ1oYOgXTZIpuTfNDej9xM95CE/vuHWbjXG7s/JEmuvsmYHKmsYMz832JJJMg jiXlq0h2zD5VGSRWp/6gfS9CsqjGIIjyhPaxXWpgmcQRK64pb7/7eFuVIH+pzZVwW8Hm nIIPamaVidpCrUfdAmIIFsNv5DQtIvth74n40gI7nyAm4t3g/KNOiL12A/VfZGwUNzbo m8FjOt5/Tk+S33bSLIyfOrx+dV9jRbaOMsERka03RBEHyNMF5GZQ4s4a39Zcf/ip9gGq IK8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131458; x=1692736258; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lVilgTs+co6otIBGSPy1QW/2lzqmpgq2oXWxpSWuqAA=; b=TRZ0gCIdbcPtN6Lbj6Jvoiu0CrVnKkDpWUmltfnUL6pYbyJsR2++amYZ2+Kn/btboY BXf3ojaVz/N021/NgFgLiCYB2FyFE1S1XLS9fWPnL/j53cGJH3yqezcZPpApJhw0g6+3 QQTUTaOX30Ces3Ug6/UgqqagbdR+7zZI/1gg9is/K3lglnnv8rHDrYA5YqfS3Yc9tEwo h+F7nSvXtTSYsmBgP53k3fGxd6VQ5EOK4NE/WYcv40C476dpZvq245vqv1Eg7q1m2TTf 1uevxFOsmwj2HvXd4mgVeBkz+C2JrGeHYpPrfuq+GmtILx3vKIQ6NVjCNwXW5vKzpmit G89g== X-Gm-Message-State: AOJu0Yx2DKymIJQVlDeT+MEXq8op5qPYgXY6X0L7FEuyTyBO1SIC3HU4 f3/GmQggcuQYAWMtC29pGTGy2VA3x9RWOA== X-Google-Smtp-Source: AGHT+IFjXkiOPHVTzX0W3Nz+1QlvbmzpTN/w5rKo5fQ8V+3BNac92RqkXvMzqxxsC8YeMhCYdE/rxQ== X-Received: by 2002:a05:622a:1103:b0:404:e64:f5ad with SMTP id e3-20020a05622a110300b004040e64f5admr19077558qty.47.1692131458510; Tue, 15 Aug 2023 13:30:58 -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.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:30:58 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:30 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> 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 * guix/gnu-maintenance.scm (url->links): New procedure. (import-html-release): Use it. --- (no changes since v1) guix/gnu-maintenance.scm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index a314923d3b..2e0fc3e8ab 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -483,6 +483,14 @@ (define (html-links sxml) (_ links)))) +(define (url->links url) + "Return the unique links on the HTML page accessible at URL." + (let* ((uri (string->uri url)) + (port (http-fetch/cached uri #:ttl 3600)) + (sxml (html->sxml port))) + (close-port port) + (delete-duplicates (html-links sxml)))) + (define* (import-html-release base-url package #:key (version #f) @@ -499,12 +507,10 @@ (define* (import-html-release base-url package if any. Otherwise, FILE->SIGNATURE must be a procedure; it is passed a source file URL and must return the corresponding signature URL, or #f it signatures are unavailable." - (let* ((uri (string->uri (if (string-null? directory) - base-url - (string-append base-url directory "/")))) - (port (http-fetch/cached uri #:ttl 3600)) - (sxml (html->sxml port)) - (links (delete-duplicates (html-links sxml)))) + (let* ((url (if (string-null? directory) + base-url + (string-append base-url directory "/"))) + (links (url->links url))) (define (file->signature/guess url) (let ((base (basename url))) (any (lambda (link) @@ -562,7 +568,6 @@ (define* (import-html-release base-url package (define candidates (filter-map url->release links)) - (close-port port) (match candidates (() #f) ((first . _) From patchwork Tue Aug 15 20:29:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52871 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 B529F27BBE9; Tue, 15 Aug 2023 21:33:05 +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 2FB6327BBE2 for ; Tue, 15 Aug 2023 21:33:04 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i1-000555-Fi; Tue, 15 Aug 2023 16:32:09 -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 1qW0hz-00054G-Av for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:07 -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 1qW0hz-0008LT-2i; Tue, 15 Aug 2023 16:32:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hw-0005g8-EW; Tue, 15 Aug 2023 16:32:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 07/13] gnu-maintenance: Fix indentation. 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:32:04 +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.169213147021656 (code B ref 65230); Tue, 15 Aug 2023 20:32:04 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:10 +0000 Received: from localhost ([127.0.0.1]:36796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0h3-0005d8-V2 for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:10 -0400 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]:54583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0h0-0005bA-10 for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:06 -0400 Received: by mail-qt1-x82a.google.com with SMTP id d75a77b69052e-40fd2f6bd7cso40873421cf.1 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131460; x=1692736260; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NChkL5OrIwj9vZ+wWHvnTwIVDB6osNDrfs6xUqJhXf0=; b=mEtIu7a6rwsniVM0gY9fRlyMkiyYi0CnxkBFDDdCT8kOoARcOup4JQdcjnxjCa3R1S 2GfeceCw5FoOsD4spauM6ODQHwN8+vIP1VyozJSTGKXUd3bicl73mnCTUOX4EX6sPDm9 E27F3vb485E2At+T/drCDeYvALxOqZ87xqWTSgx0B6ZZXCeeDHBX6OeFyp/XZVjvntR0 /c3633hG8EjnfqElVLrIsk+Q5ipa/COiBybdElp6tsBclzySIfsZSiVwtIfrJR+vTg2x LK+51cCiRyVDMy35bHppqdCxkVYjK0ecAIx0B+vMKjfMp+C5qGyINnEEjIiJA8vmhNr2 kLnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131460; x=1692736260; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NChkL5OrIwj9vZ+wWHvnTwIVDB6osNDrfs6xUqJhXf0=; b=BSDdy+q5ztdX4hrPDWyHmUTLOPopK0FkNrS+Oo3ka9lL8qMGyMBCamKbShp6Azi3T+ IBlZcP8xXEvjNKoidIDn95fbLdX/AmXq6C7rrOyXTFp5zmCZLsgyKdroSSUnJ4afs/4A gtbxnDupJE8qBu4m3XZDmItbyyePbDESpJs68Jnbq9/mhCCl5fXohJpXyliwGs5xF6dD WyBNlMPbxDm9eTg3dQnMG2F9nYvcNtOlT0d1fHms6mDaejt+C0OqSuPSnPQJmVSH+oiJ a+wV7MoHby/g1lDOj/hA+ysyIYQspnPOHmRxt6OEsPKn20NzUGh3fqR9v/1pYgbF4t4e EVpg== X-Gm-Message-State: AOJu0YxEcmpf6IN9NwfQRUOfbBPCib7Nq7MSChcWsuDHBlN4H2uWT1UA imlgLu3x1W5wj4FN0Eza3pbsR8PwAh3l9w== X-Google-Smtp-Source: AGHT+IGS8so/tgQjixqP7gKcD0r0ZNK56nRnoT1yIBdkovVPfmKTpKhAbECW+07hCDUfWuW+cJYMuw== X-Received: by 2002:a05:622a:14b:b0:400:9c4e:2abe with SMTP id v11-20020a05622a014b00b004009c4e2abemr21010569qtw.13.1692131460257; Tue, 15 Aug 2023 13:31:00 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:31:00 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:31 -0400 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> 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 * guix/gnu-maintenance.scm: Re-indent file. --- (no changes since v1) guix/gnu-maintenance.scm | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 2e0fc3e8ab..67abbc1c5a 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -578,11 +578,11 @@ (define* (import-html-release base-url package (coalesce-sources candidates)) ;; Select the most recent release and return it. (reduce (lambda (r1 r2) - (if (version>? (upstream-source-version r1) - (upstream-source-version r2)) - r1 r2)) - first - (coalesce-sources candidates))))))) + (if (version>? (upstream-source-version r1) + (upstream-source-version r2)) + r1 r2)) + first + (coalesce-sources candidates))))))) ;;; @@ -656,20 +656,20 @@ (define* (import-gnu-release package #:key (version #f)) (tarballs (filter (lambda (file) (string=? version (tarball->version file))) relevant))) - (match tarballs - (() #f) - (_ - (upstream-source - (package name) - (version version) - (urls (map (lambda (file) - (string-append "mirror://gnu/" - (string-drop file - (string-length "/gnu/")))) - ;; Sort so that the tarball with the same compression - ;; format as currently used in PACKAGE comes first. - (sort tarballs better-tarball?))) - (signature-urls (map (cut string-append <> ".sig") urls)))))))) + (match tarballs + (() #f) + (_ + (upstream-source + (package name) + (version version) + (urls (map (lambda (file) + (string-append "mirror://gnu/" + (string-drop file + (string-length "/gnu/")))) + ;; Sort so that the tarball with the same compression + ;; format as currently used in PACKAGE comes first. + (sort tarballs better-tarball?))) + (signature-urls (map (cut string-append <> ".sig") urls)))))))) (define %package-name-rx ;; Regexp for a package name, e.g., "foo-X.Y". Since TeXmacs uses From patchwork Tue Aug 15 20:29:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52862 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 A754F27BBE2; Tue, 15 Aug 2023 21:32:14 +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 B427527BBED for ; Tue, 15 Aug 2023 21:32:11 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i1-00054n-7c; Tue, 15 Aug 2023 16:32:09 -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 1qW0hy-000547-Mv for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:06 -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 1qW0hy-0008L4-Dc; Tue, 15 Aug 2023 16:32:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hw-0005gM-Qn; Tue, 15 Aug 2023 16:32:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 08/13] gnu-maintenance: Accept package object in 'import-html-release' procedure. 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:32:04 +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.169213147721687 (code B ref 65230); Tue, 15 Aug 2023 20:32:04 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:17 +0000 Received: from localhost ([127.0.0.1]:36802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0hA-0005di-C6 for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:17 -0400 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:53667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0h2-0005c3-Bx for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:08 -0400 Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-40fd6da0325so34925961cf.3 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:31:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131462; x=1692736262; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fSvqP932FLPbM8fa3EzPSgM/uOJTV+oVvRl1fFsvuP4=; b=l4ZfFXjDKbH5eSgpJ6KSO4j7T/90qWcPl0M/RyXF8k51XXi2NmAg4CM6LfOMgWMI+M Ap+cjwzE46KJacBXoA/dw+QZCnDh0yADeawwbIv1/w+U3eotdBNb50v+RWZP5NoUHtbz UxBcv0I5EUYzJY+1DVuMuIelGPxeYqJ+WHo+Da/lbIJrsMH/5ZtRfjfjFcFD2ikO142W odz2dSbGEOXdCGtrt+51IxJTz12LCNWPZQ9eT55vbcrqi8VzI/eFJLj4lre8D98SAKgp PDfAOmVCBO9bSTu9NMa1/4HtaPtrqo/SDWqyqWDekGLhlWyVIeBCkAMtd+yAhUVwSTJ0 +6ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131462; x=1692736262; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fSvqP932FLPbM8fa3EzPSgM/uOJTV+oVvRl1fFsvuP4=; b=OZsG95aEil8Fjvf6bvdJt9jF7erhkRORv7GTerGOjZi0PgirJ469UghKG9s+Kphr/a WBX1jLdiX8JYlQ5G4tT/zOLdmdGowetg3PNkQer8/oaMAIG4mvpRnFS8Uoh98QV7DFdt VVqM1Wmnqh01prYrYj5lC6ur00KOBxvTFs42qfvMVyEt/RoijH+6e42+lPvW6U2aNXAR Uo68AY7uOYlJEYwSiRCl5Fx/fsqMLX4DFc24Dr6nFYnB0sXrcyi5fcS1a7+DSl5vQcgn jVdwKgh42wbAYvr2THoWuFcAilKCVniV5uCyXa2WdMk1Q3kuEae87Ke8P15mGQ6p81xT Hhzw== X-Gm-Message-State: AOJu0YxhZ4coQ0LdApsQT+lhjJ1fk7xoT7kuqX2BR7nOfMYbVl3KEa97 VfVq8ctMdn6YfGFuTm8OSHYu/H2NAB2Cwg== X-Google-Smtp-Source: AGHT+IEoCAOjW2WNk+73e18qhaj3JEB0L9qFpbu4HqA8MJJ8B7H1J8Rb35fezBUKWsnDXNaDK7SDww== X-Received: by 2002:ac8:7d12:0:b0:403:a262:7751 with SMTP id g18-20020ac87d12000000b00403a2627751mr20059423qtb.12.1692131462541; Tue, 15 Aug 2023 13:31:02 -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.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:31:02 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:32 -0400 Message-ID: <4a7c49a38983592313b30522f57e7b6a1f0e67ae.1692131377.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> 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 This is in preparation for a new URL rewriting feature, which will need to have the current version information available. * guix/gnu-maintenance.scm (import-html-release): Update doc. Adjust default value of the DIRECTORY argument. Bind PACKAGE in lexical scope so that its value there is unchanged. (import-savannah-release, import-kernel.org-release) (import-html-updatable-release): Adjust accordingly. --- (no changes since v1) guix/gnu-maintenance.scm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 67abbc1c5a..13d6c1c7f2 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -494,11 +494,12 @@ (define (url->links url) (define* (import-html-release base-url package #:key (version #f) - (directory (string-append "/" package)) + (directory (string-append + "/" (package-upstream-name package))) file->signature) - "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. + "Return an for the latest release of PACKAGE 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'. @@ -507,7 +508,8 @@ (define* (import-html-release base-url package if any. Otherwise, FILE->SIGNATURE must be a procedure; it is passed a source file URL and must return the corresponding signature URL, or #f it signatures are unavailable." - (let* ((url (if (string-null? directory) + (let* ((package (package-upstream-name package)) + (url (if (string-null? directory) base-url (string-append base-url directory "/"))) (links (url->links url))) @@ -730,7 +732,6 @@ (define* (import-savannah-release package #:key (version #f)) (match (origin-uri (package-source package)) ((? string? uri) uri) ((uri mirrors ...) uri)))) - (package (package-upstream-name package)) (directory (dirname (uri-path uri)))) ;; Note: We use the default 'file->signature', which adds ".sig", ".asc", ;; or whichever detached signature naming scheme PACKAGE uses. @@ -825,7 +826,6 @@ (define* (import-kernel.org-release package #:key (version #f)) (match (origin-uri (package-source package)) ((? string? uri) uri) ((uri mirrors ...) uri)))) - (package (package-upstream-name package)) (directory (dirname (uri-path uri)))) (import-html-release %kernel.org-base package #:version version @@ -869,8 +869,7 @@ (define* (import-html-updatable-release package #:key (version #f)) "://" (uri-host uri)))) (directory (if custom "" - (dirname (uri-path uri)))) - (package (package-upstream-name package))) + (dirname (uri-path uri))))) (false-if-networking-error (import-html-release base package #:version version From patchwork Tue Aug 15 20:29:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52865 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 3848D27BBE9; Tue, 15 Aug 2023 21:32:46 +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 8882B27BBE2 for ; Tue, 15 Aug 2023 21:32:44 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i4-00058S-EM; Tue, 15 Aug 2023 16:32:12 -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 1qW0i1-00054m-69 for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:09 -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 1qW0i0-0008N6-Tr; Tue, 15 Aug 2023 16:32:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hx-0005gX-98; Tue, 15 Aug 2023 16:32:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 09/13] gnu-maintenance: Document nested procedures in 'import-html-release'. 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:32:05 +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.169213147821701 (code B ref 65230); Tue, 15 Aug 2023 20:32:05 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:18 +0000 Received: from localhost ([127.0.0.1]:36804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0hB-0005dp-BG for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:17 -0400 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:42067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0h4-0005cb-4q for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:11 -0400 Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-40fda01c8beso26577641cf.0 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131464; x=1692736264; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AMByyaIJSuomag/N+KKSRiluVBRVpJ6bNmbJjcSE/M8=; b=amYGO+J9p8HpR4yok5kWLrX8NVMoSmAoz3Je+3vbg5MmmBYO4P8aL43LKDUAygS3NA gk4/yOWydloK89ZI1jTPbxsm2KEX1SuREVRCHs9juWVrYqM4oU2BkBm5YXH3VzpgousY Szxk6auaBwNLgygl4e9OrRKCC1C+Vewg9XJa2AczSf8xrEOSFNx0lG69uJwtdbECdzCN s1dZtots5CeuxAdvxqwPaTx/8TIlmA1kc5VO3Cu/5seevFGpanqlSDw8npa2QcP15kz3 dcCEh9sgf2KwoQdYBbMPOjNUGH2NGAvZ8Y6yBfMjGADa1hdJlBx3kDM3NIwaxUCMSsRJ wYOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131464; x=1692736264; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AMByyaIJSuomag/N+KKSRiluVBRVpJ6bNmbJjcSE/M8=; b=aUfyJ90XXN/yLUCBXf/6jiGRmyhkT5jCHs0mOiHyJW92czj/9kQI3rDNixfbyvsaWe PBqm5KTnuGqzs4s1y8AwBUV5ty0VCS8ylJlIOfh5UvUDfNky4WSIYCPBeYaz2bO2I4br b1J1dvt9/i/d9irO0Lp4sePTND66iD75KBfZdYAs+AeBPhZ1Ag/Jjc7E4BrgciK9roX9 Jw0fbhezkAxXm3f5XCB7fJZ52xNYTsiX2n+8D3162aeI4u1v9KBFbKFLzM6Sjo4+BlzI myeRZrhT3yL3ZrePvcFo8Ki9NfU8SRCvm4EewjCsOT399rhzU8Y8T9Yixnt0EJ0aOh3g y3pg== X-Gm-Message-State: AOJu0YxpehDUl7UzjYL5WpFLyt74f9yxw4eQEmzFsGpc0NSb7d5MSCLb UbW9EJyNx64ngQV4MSal/HTUCQHUfyTwPA== X-Google-Smtp-Source: AGHT+IGSYJdhOgS3nqYfo/H9leM7/NayDex0GpAW4S9/G5C9A3GHN1F06etLcie0vH49WAgsFBZKpg== X-Received: by 2002:a05:622a:285:b0:405:47aa:6846 with SMTP id z5-20020a05622a028500b0040547aa6846mr4259017qtw.32.1692131464404; Tue, 15 Aug 2023 13:31:04 -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.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:31:03 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:33 -0400 Message-ID: <13bb74db81862803c9e2ae982c117de71acd2611.1692131377.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> 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 * guix/gnu-maintenance.scm (import-html-release): Add docstring to the 'file->signature/guess' and 'url->release' nested procedures. --- (no changes since v1) guix/gnu-maintenance.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 13d6c1c7f2..9bab8e9e5f 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -514,6 +514,7 @@ (define* (import-html-release base-url package (string-append base-url directory "/"))) (links (url->links url))) (define (file->signature/guess url) + "Return the first link that matches a signature extension, else #f." (let ((base (basename url))) (any (lambda (link) (any (lambda (extension) @@ -524,6 +525,8 @@ (define* (import-html-release base-url package links))) (define (url->release url) + "Return an object if a release file was found at URL, +else #f." (let* ((base (basename url)) (base-url (string-append base-url directory)) (url (cond ((and=> (string->uri url) uri-scheme) ;full URL? @@ -574,7 +577,7 @@ (define* (import-html-release base-url package (() #f) ((first . _) (if version - ;; find matching release version and return it + ;; Find matching release version and return it. (find (lambda (upstream) (string=? (upstream-source-version upstream) version)) (coalesce-sources candidates)) From patchwork Tue Aug 15 20:29:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52872 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 816E727BBEA; Tue, 15 Aug 2023 21:33:07 +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 5371C27BBEB for ; Tue, 15 Aug 2023 21:33:04 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i3-00056r-1M; Tue, 15 Aug 2023 16:32:11 -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 1qW0i0-00054Q-AR for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:08 -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 1qW0i0-0008MC-1W; Tue, 15 Aug 2023 16:32:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hx-0005gh-O2; Tue, 15 Aug 2023 16:32:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 10/13] gnu-maintenance: Extract 'canonicalize-url' from 'import-html-release'. 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:32:05 +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.169213147821709 (code B ref 65230); Tue, 15 Aug 2023 20:32:05 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:18 +0000 Received: from localhost ([127.0.0.1]:36806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0hB-0005dy-RW for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:18 -0400 Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]:56502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0h7-0005cr-Tw for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:14 -0400 Received: by mail-oi1-x236.google.com with SMTP id 5614622812f47-3a78a29bca3so4554568b6e.0 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:31:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131468; x=1692736268; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yvDbRzPxClF/CYFUkNp+pm1g6bxCyyal/mrJmNA9dow=; b=Q54FghUx5cdwsuWy7l4lMCj3S1XYJasQp6eGhZKiWSFpSvfKHfaaKBjqYDEkuZV/ZT 1wwG7yRVQNP78HzLCeC1yTVU9rZ2ebQ6oeVsptzhNq0G1ZydU5FApG3b1NxkTeBPBbXS 5OAt+4l2atEvAsOCx4VrFp1iGVzpCtYVwuTEqqj2OvkYqV700A61ve4QRdPXNli6GIhm ejVWIHOq6uHeOAkaRQahp7BnhMm+HwAB1nKaw0Reh0mRaQQhjow3XtJHxC0xJGnbnOcV 2YhW8li1QXqFdBzSY7WVDJKFMAFkzA5qyT/6M1d9i9/C6WlufSHbtHU1yPkPRe98cVon +sSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131468; x=1692736268; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yvDbRzPxClF/CYFUkNp+pm1g6bxCyyal/mrJmNA9dow=; b=VE3WFSh4PXNpivz24C6t7ZR1kEVlXpqhkI8voigL5yXTeIoD5Nm9x+477a6lc6+CSG FgWFFGGuRDO+PO7KfeomOK0G1OST5/QgWApZeC+1UQVioM7Ue42w5/JTqbwvHSi/Q70E qHGh4fjx4XXRe8nuVNZ9Cl6KAKeT3H2279nCS4J7K2jjzXe6ibyL6Geoi8wwShT3Ld0Q xfCJvWkfQqFtAd0WkPnz6FfILHt2R4SBjJSrPgbJXGzTZXK1pOFrUucKrurpW75A7hed UvGuXbkEQXp8Umrvczqo3201k7vGxvzA1Ax72BTpl81BLWQo66eL8g2WsMkKe0HV/kxt aKNQ== X-Gm-Message-State: AOJu0YxcqLDB1/BrLQf9w+vaubANUYjVjDzWYJQ4UotfAY0ktVdi9aP9 DXtMeHeQOo9N2b3qLLQ5P30NDEdADgI2gw== X-Google-Smtp-Source: AGHT+IH9kvmpPn4nxkZhT4Zzihz51TK4jZ4R3RyPYrIuIqoAaNZlrqpixOwqk870NkNdE2nYbhxAug== X-Received: by 2002:a05:6358:880a:b0:130:f1e5:acc6 with SMTP id hv10-20020a056358880a00b00130f1e5acc6mr36625rwb.8.1692131466521; Tue, 15 Aug 2023 13:31:06 -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.31.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:31:06 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:34 -0400 Message-ID: <7773174a5afd8623cd7bcce8f906248107f0c15f.1692131377.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> 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 * guix/gnu-maintenance.scm (canonicalize-url): New procedure, extracted from... (import-html-release): ... here. Use it. Rename inner PACKAGE variable to NAME, to explicit it is a string and not a package object. --- (no changes since v1) guix/gnu-maintenance.scm | 70 +++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 9bab8e9e5f..abba891d4b 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -491,6 +491,33 @@ (define (url->links url) (close-port port) (delete-duplicates (html-links sxml)))) +(define (canonicalize-url url base-url) + "Make relative URL absolute, by appending URL to BASE-URL as required. If +URL is a directory instead of a file, it should be suffixed with a slash (/)." + (cond ((and=> (string->uri url) uri-scheme) + ;; Fully specified URL. + url) + ((string-prefix? "//" url) + ;; Full URL lacking a URI scheme. Reuse the URI scheme of the + ;; document that contains the URL. + (string-append (symbol->string (uri-scheme (string->uri base-url))) + ":" url)) + ((string-prefix? "/" url) + ;; Absolute URL. + (let ((uri (string->uri base-url))) + (uri->string + (build-uri (uri-scheme uri) + #:host (uri-host uri) + #:port (uri-port uri) + #:path url)))) + ;; URL is relative to BASE-URL, which is assumed to be a directory. + ((string-suffix? "/" base-url) + (string-append base-url url)) + (else + ;; URL is relative to BASE-URL, which is assumed to denote a file + ;; within a directory. + (string-append (dirname base-url) "/" url)))) + (define* (import-html-release base-url package #:key (version #f) @@ -508,11 +535,12 @@ (define* (import-html-release base-url package if any. Otherwise, FILE->SIGNATURE must be a procedure; it is passed a source file URL and must return the corresponding signature URL, or #f it signatures are unavailable." - (let* ((package (package-upstream-name package)) + (let* ((name (package-upstream-name package)) (url (if (string-null? directory) base-url (string-append base-url directory "/"))) - (links (url->links url))) + (links (map (cut canonicalize-url <> url) (url->links url)))) + (define (file->signature/guess url) "Return the first link that matches a signature extension, else #f." (let ((base (basename url))) @@ -526,42 +554,12 @@ (define* (import-html-release base-url package (define (url->release url) "Return an object if a release file was found at URL, -else #f." - (let* ((base (basename url)) - (base-url (string-append base-url directory)) - (url (cond ((and=> (string->uri url) uri-scheme) ;full URL? - url) - ;; full URL, except for URI scheme. Reuse the URI - ;; scheme of the document that contains the link. - ((string-prefix? "//" url) - (string-append - (symbol->string (uri-scheme (string->uri base-url))) - ":" url)) - ((string-prefix? "/" url) ;absolute path? - (let ((uri (string->uri base-url))) - (uri->string - (build-uri (uri-scheme uri) - #:host (uri-host uri) - #:port (uri-port uri) - #:path url)))) - - ;; URL is a relative path and BASE-URL may or may not - ;; end in slash. - ((string-suffix? "/" base-url) - (string-append base-url url)) - (else - ;; If DIRECTORY is non-empty, assume BASE-URL - ;; denotes a directory; otherwise, assume BASE-URL - ;; denotes a file within a directory, and that URL - ;; is relative to that directory. - (string-append (if (string-null? directory) - (dirname base-url) - base-url) - "/" url))))) - (and (release-file? package base) +else #f. URL is assumed to fully specified." + (let ((base (basename url))) + (and (release-file? name base) (let ((version (tarball->version base))) (upstream-source - (package package) + (package name) (version version) ;; uri-mirror-rewrite: Don't turn nice mirror:// URIs into ftp:// ;; URLs during "guix refresh -u". From patchwork Tue Aug 15 20:29:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52873 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 D5E7627BBE9; Tue, 15 Aug 2023 21:33:09 +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,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 7A6A227BBE2 for ; Tue, 15 Aug 2023 21:33:06 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i3-00057Z-AL; Tue, 15 Aug 2023 16:32:11 -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 1qW0i0-00054R-FH for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:08 -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 1qW0i0-0008MD-2z; Tue, 15 Aug 2023 16:32:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hy-0005gu-5G; Tue, 15 Aug 2023 16:32:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 11/13] gnu-maintenance: Add support to rewrite version in URL path. 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:32:06 +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.169213147921722 (code B ref 65230); Tue, 15 Aug 2023 20:32:06 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:19 +0000 Received: from localhost ([127.0.0.1]:36809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0hC-0005e7-GQ for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:19 -0400 Received: from mail-qk1-x734.google.com ([2607:f8b0:4864:20::734]:51306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0h7-0005cs-Uk for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:14 -0400 Received: by mail-qk1-x734.google.com with SMTP id af79cd13be357-768054797f7so471776385a.2 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:31:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131468; x=1692736268; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pSgDAuzYQ4pY5Tno0h9v46bbcunDuIvk9rvy84FGWMI=; b=UOKb6TWLKll+bTZ34vN+DOOMWqvf1mmxqdG0HzgmnddQ90Ac+J1j/Jv0Qs3xH+c0gN LChYecgfd0FyuOL4vZ2fgiz4/kQhMoOAvxxqcgFNF++24X9BR4goH4BuDHYhe7NOudwl 4w/1sysbw3VpVxz48ZIdWjZEhYXTly+iA1kCJ32ssyLI5XO95NZjUy4MSmY5QvRZwzsU aXK55WPpBIEL3CgnadjjfEiNhZN+U0e2aSs5lS9KoFY0ZMNy/+suNUCtL6NijMmAPcO2 xA04VoqVSpcFhVmilsLgd9LMkfwaXNSGhnkmE+qL4/V/Hz8UHOdvpMe8DXkLuiBOTlE2 yooA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131468; x=1692736268; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pSgDAuzYQ4pY5Tno0h9v46bbcunDuIvk9rvy84FGWMI=; b=cpkEcNWSni29OJOAD2jzVEXiM4yzH+ByxuvPkUqwf65elm7ILLD1/eiMciFj3QdfHp 2RYcnUNMkktNQrdxts7RudH/lkzGcEyo2FSisiRrhxNVkniBs6WAkDGzt8xJXVzGbvpM kpmushfgQq7zg3ZMPRAtmxzcss56lalgIIyzp5Ea8J2UsneGMuZfJKpWibDe/Jo2oBHB NJxyo1GscbRLw9Uz6gEDDNqISkwZDWBhLWTuyW3pZvq3x7qHcWWwNTITDH3F2IHhX+Hn Iiu0uPYFgKhqs1GBBCae+fG4KhyWbkcUfa3ka4ODevppaBP32dND2DcUyZeBNy3Fc3AM VUzw== X-Gm-Message-State: AOJu0YxMdCPhh/TJfBwSBMJgYzJIzm6iLpQKaGW34E3uUSi/g2f8i0rv cf1xj9fEQKEL8nrthH9DBNFKYV6XMnFvtA== X-Google-Smtp-Source: AGHT+IFsZkUImxhfuX96w8y7XLkQ9NyF+RIdbQhwtfhl/mNlMjP086gVpUqbSKwNaVNNcZvfBD4qWA== X-Received: by 2002:a05:622a:15c6:b0:40f:ef6d:1a31 with SMTP id d6-20020a05622a15c600b0040fef6d1a31mr20598151qty.13.1692131468211; Tue, 15 Aug 2023 13:31:08 -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.31.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:31:07 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:35 -0400 Message-ID: <0088dbabf3dc9e00ebfa3e5beea4712094956ed6.1692131377.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> 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 Fixes . Previously, the generic HTML updater would only look for the list of files found at the parent of its current source URL, ignoring that the URL may embed the version elsewhere in its path. This could cause 'guix refresh' to report no updates available, while in fact there were, such as for 'libuv'. * guix/gnu-maintenance.scm (strip-trailing-slash): New procedure. (%version-rx): New variable. (rewrite-url): New procedure. (import-html-release): New rewrite-url? argument. When true, use the above procedure. (import-html-updatable-release): Call import-html-release with #:rewrite-url set to #t. * tests/gnu-maintenance.scm ("rewrite-url, to-version specified") ("rewrite-url, without to-version"): New tests. --- (no changes since v1) guix/gnu-maintenance.scm | 102 ++++++++++++++++++++++++++++++++++++-- tests/gnu-maintenance.scm | 43 ++++++++++++++++ 2 files changed, 142 insertions(+), 3 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index abba891d4b..3cd84ee3d7 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2012, 2013 Nikita Karetnikov ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2022 Maxime Devos +;;; Copyright © 2023 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,6 +27,7 @@ (define-module (guix gnu-maintenance) #:use-module (ice-9 regex) #:use-module (ice-9 match) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-2) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) #:use-module (rnrs io ports) @@ -61,6 +63,7 @@ (define-module (guix gnu-maintenance) gnu-package? uri-mirror-rewrite + rewrite-url release-file? releases @@ -518,9 +521,93 @@ (define (canonicalize-url url base-url) ;; within a directory. (string-append (dirname base-url) "/" url)))) +(define (strip-trailing-slash s) + "Strip any trailing slash from S, a string." + (if (string-suffix? "/" s) + (string-drop-right s 1) + s)) + +;;; TODO: Extend to support the RPM and GNOME version schemes? +(define %version-rx "[0-9.]+") + +(define* (rewrite-url url version #:key to-version) + "Rewrite URL so that the URL path components matching the current VERSION or +VERSION-MAJOR.VERSION-MINOR are updated with that of the latest version found +by crawling the corresponding URL directories. Alternatively, when TO-VERSION +is specified, rewrite version matches directly to it without crawling URL. + +For example, the URL +\"https://dist.libuv.org/dist/v1.45.0/libuv-v1.45.0.tar.gz\" could be +rewritten to something like +\"https://dist.libuv.org/dist/v1.46.0/libuv-v1.46.0.tar.gz\"." + ;; XXX: major-minor may be #f if version is not a triplet but a single + ;; number such as "2". + (let* ((major-minor (false-if-exception (version-major+minor version))) + (to-major-minor (false-if-exception + (and=> to-version version-major+minor))) + (uri (string->uri url)) + (url-prefix (string-drop-right url (string-length (uri-path uri)))) + (url-prefix-components (string-split url-prefix #\/)) + (path (uri-path uri)) + ;; Strip a forward slash on the path to avoid a double slash when + ;; string-joining later. + (path (if (string-prefix? "/" path) + (string-drop path 1) + path)) + (path-components (string-split path #\/))) + (string-join + (reverse + (fold + (lambda (s parents) + (if to-version + ;; Direct rewrite case; the archive is assumed to exist. + (let ((u (string-replace-substring s version to-version))) + (cons (if (and major-minor to-major-minor) + (string-replace-substring u major-minor to-major-minor) + u) + parents)) + ;; More involved HTML crawl case. + (let* ((pattern (if major-minor + (format #f "(~a|~a)" version major-minor) + (format #f "(~a)" version))) + (m (string-match pattern s))) + (if m + ;; Crawl parent and rewrite current component. + (let* ((parent-url (string-join (reverse parents) "/")) + (links (url->links parent-url)) + ;; The pattern matching the version. + (pattern (string-append "^" (match:prefix m) + "(" %version-rx ")" + (match:suffix m) "$")) + (candidates (filter-map + (lambda (l) + ;; Links may be followed by a + ;; trailing '/' in the case of + ;; directories. + (and-let* + ((l (strip-trailing-slash l)) + (m (string-match pattern l)) + (v (match:substring m 1))) + (cons v l))) + links))) + ;; Retrieve the item having the largest version. + (if (null? candidates) + (error "no candidates found in rewrite-url") + (cons (cdr (first (sort candidates + (lambda (x y) + (version>? (car x) + (car y)))))) + parents))) + ;; No version found in path component; continue. + (cons s parents))))) + (reverse url-prefix-components) + path-components)) + "/"))) + (define* (import-html-release base-url package #:key - (version #f) + rewrite-url? + version (directory (string-append "/" (package-upstream-name package))) file->signature) @@ -534,11 +621,19 @@ (define* (import-html-release base-url package When FILE->SIGNATURE is omitted or #f, guess the detached signature file name, if any. Otherwise, FILE->SIGNATURE must be a procedure; it is passed a source file URL and must return the corresponding signature URL, or #f it signatures -are unavailable." - (let* ((name (package-upstream-name package)) +are unavailable. + +When REWRITE-URL? is #t, versioned components in BASE-URL and/or DIRECTORY are +also updated to the latest version, as explained in the doc of the +\"rewrite-url\" procedure used." + (let* ((current-version (package-version package)) + (name (package-upstream-name package)) (url (if (string-null? directory) base-url (string-append base-url directory "/"))) + (url (if rewrite-url? + (rewrite-url url current-version #:to-version version) + url)) (links (map (cut canonicalize-url <> url) (url->links url)))) (define (file->signature/guess url) @@ -873,6 +968,7 @@ (define* (import-html-updatable-release package #:key (version #f)) (dirname (uri-path uri))))) (false-if-networking-error (import-html-release base package + #:rewrite-url? #t #:version version #:directory directory)))) diff --git a/tests/gnu-maintenance.scm b/tests/gnu-maintenance.scm index 516e02ec6a..196a6f9092 100644 --- a/tests/gnu-maintenance.scm +++ b/tests/gnu-maintenance.scm @@ -147,4 +147,47 @@ (define-module (test-gnu-maintenance) (equal? (list expected-signature-url) (upstream-source-signature-urls update)))))) +(test-equal "rewrite-url, to-version specified" + "https://download.qt.io/official_releases/qt/6.5/6.5.2/\ +submodules/qtbase-everywhere-src-6.5.2.tar.xz" + (rewrite-url "https://download.qt.io/official_releases/qt/6.3/6.3.2/\ +submodules/qtbase-everywhere-src-6.3.2.tar.xz" "6.3.2" #:to-version "6.5.2")) + +(test-equal "rewrite-url, without to-version" + "https://dist.libuv.org/dist/v1.46.0/libuv-v1.46.0.tar.gz" + (with-http-server + ;; First reply, crawling https://dist.libuv.org/dist/. + `((200 "\ + + +Index of dist + +../ +v1.44.0/ +v1.44.1/ +v1.44.2/ +v1.45.0/ +v1.46.0/ + +") + ;; Second reply, crawling https://dist.libuv.org/dist/v1.46.0/. + (200 "\ + + +Index of dist/v1.46.0 + +../ + + libuv-v1.46.0-dist.tar.gz +libuv-v1.46.0-dist.tar.gz.sign + + libuv-v1.46.0.tar.gz + + libuv-v1.46.0.tar.gz.sign + +")) + (rewrite-url "https://dist.libuv.org/dist/v1.45.0/libuv-v1.45.0.tar.gz" + "1.45.0"))) + (test-end) From patchwork Tue Aug 15 20:29:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52863 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 B1F0A27BBE9; Tue, 15 Aug 2023 21:32:22 +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,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 21FDB27BBE2 for ; Tue, 15 Aug 2023 21:32:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i5-00058o-BZ; Tue, 15 Aug 2023 16:32:13 -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 1qW0i1-00054p-8r for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:09 -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 1qW0i0-0008NA-W3; Tue, 15 Aug 2023 16:32:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hy-0005h7-L8; Tue, 15 Aug 2023 16:32:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 12/13] gnu-maintenance: Allow mirror URLs to fallback to the generic HTML updater. 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:32:06 +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.169213148421733 (code B ref 65230); Tue, 15 Aug 2023 20:32:06 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:24 +0000 Received: from localhost ([127.0.0.1]:36811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0hH-0005eT-Oo for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:24 -0400 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:60555) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0h9-0005dL-SH for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:17 -0400 Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-76cab6fe9c0so515324285a.0 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:31:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131470; x=1692736270; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SEeClsUv+e3kHzfh3GOl/JxDCKKLfgqIO+d081rOqTc=; b=UYm7gnThyMAVEbVCpvcWhlRkfXlkcYPnwjnI1xKK/lk6KYcgDjz5rLdW0Hz+CmIhNs RzKlU0Ns6Utjb2DOgwJPstKzl+dVvxFWHih2YG8KaeASkVqs2XdyT6ssb1SET5U3y4Kn oExp20nqCzdvlG1uIyn1PbqnUXgzIAXM23CSEh/POzVZEN2cvocZdr2SEqn7D63ux8JO W/x2epLcdwbEX5LPqEX7tiMH2dd8KN2PAl6VhbEP5gZ/hUWVB5Pi16XaGztI/IofEz6r Uj3vqkwqEkmmetiQdkfwA3r86xytN1dxNXvxp51bx+ejBNGB4OjzhCxUtrsYyFMMhlV8 4Czw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131470; x=1692736270; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SEeClsUv+e3kHzfh3GOl/JxDCKKLfgqIO+d081rOqTc=; b=BFgAjpHMRJK8aPn3WvRVdrmg51a7F4Ao+iyF+Lb3FGWlVAO1Z801CSvnV06bPWMx+m W8PUuJBJ6k6b+I+XqZ8ewf5UruHRJCEK2cyF29EzqVTQbB3AX/MPxtD2jNL56dUVJaOy mPFjcDyGOvpOl8jyyYL+3NG8Nb+NKMt9N5abUZW4CRXs6NF6x97wMwK7g6xBFcweqEFL aYIZ3B/dfOr2p+ycMFwySSI6Y06xoXSxEJJNT2+HgLgZZpP6mp1Ad/3fODUrTn5gsaft z+KjUU2GI9+PrExqZhFytZrUtSIEoNZ3DV5acQzJbbD26FLyrBo71ZD47preQpQu2Wl9 JS2A== X-Gm-Message-State: AOJu0YwozoXJGlz5nE5cGwDACzAR/eVkWwSe0JmyllyQK9z02Si6SOCo HI08k/VxM2u8HLnd2FQysrg+J9ApOeAKMg== X-Google-Smtp-Source: AGHT+IHdLo3eILTXO4pzPemfIjr5KoaGk0E3Lv5+XR2ftZJdpnPOWeJFErDPHvC0v6jjOGsAF+AbDg== X-Received: by 2002:a05:620a:372b:b0:767:5bdf:3e22 with SMTP id de43-20020a05620a372b00b007675bdf3e22mr19603465qkb.40.1692131470187; Tue, 15 Aug 2023 13:31:10 -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.31.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:31:09 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:36 -0400 Message-ID: <4f3cd2f7afc562f9e0b93f87daf4aeadd0c7954e.1692131377.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> 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 * guix/gnu-maintenance.scm (http-url?): Extract from html-updatable-package?, modify to return the HTTP URL, and support the mirror:// scheme. (%disallowed-hosting-sites): New variable, extracted from html-updatable-package. (html-updatable-package?): Rewrite a mirror:// URL to an HTTP or HTTPS one. * guix/download.scm (%mirrors): Update comment. --- Changes in v2: - Update %mirrors comment to mention speed-related exceptions guix/download.scm | 5 +++- guix/gnu-maintenance.scm | 58 +++++++++++++++++++++++++--------------- 2 files changed, 41 insertions(+), 22 deletions(-) diff --git a/guix/download.scm b/guix/download.scm index ce6ebd0df8..31a41e8183 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -51,7 +51,10 @@ (define-module (guix download) ;;; Code: (define %mirrors - ;; Mirror lists used when `mirror://' URLs are passed. + ;; Mirror lists used when `mirror://' URLs are passed. The first mirror + ;; entry of each set should ideally be the most authoritative one, as that's + ;; what the generic HTML updater will pick to look for updates, with + ;; possible exceptions when the authoritative mirror is too slow. (let* ((gnu-mirrors '(;; This one redirects to a (supposedly) nearby and (supposedly) ;; up-to-date mirror. diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 3cd84ee3d7..2574e0f827 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -928,27 +928,40 @@ (define* (import-kernel.org-release package #:key (version #f)) #:directory directory #:file->signature file->signature))) -(define html-updatable-package? - ;; Return true if the given package may be handled by the generic HTML - ;; updater. - (let ((hosting-sites '("github.com" "github.io" "gitlab.com" - "notabug.org" "sr.ht" "gitlab.inria.fr" - "ftp.gnu.org" "download.savannah.gnu.org" - "pypi.org" "crates.io" "rubygems.org" - "bioconductor.org"))) - (define http-url? - (url-predicate (lambda (url) - (match (string->uri url) - (#f #f) - (uri - (let ((scheme (uri-scheme uri)) - (host (uri-host uri))) - (and (memq scheme '(http https)) - (not (member host hosting-sites))))))))) - - (lambda (package) - (or (assoc-ref (package-properties package) 'release-monitoring-url) - (http-url? package))))) +;;; These sites are disallowed for the generic HTML updater as there are +;;; better means to query them. +(define %disallowed-hosting-sites + '("github.com" "github.io" "gitlab.com" + "notabug.org" "sr.ht" "gitlab.inria.fr" + "ftp.gnu.org" "download.savannah.gnu.org" + "pypi.org" "crates.io" "rubygems.org" + "bioconductor.org")) + +(define (http-url? url) + "Return URL if URL has HTTP or HTTPS as its protocol. If URL uses the +special mirror:// protocol, substitute it with the first HTTP or HTTPS URL +prefix from its set." + (match (string->uri url) + (#f #f) + (uri + (let ((scheme (uri-scheme uri)) + (host (uri-host uri))) + (or (and (memq scheme '(http https)) + (not (member host %disallowed-hosting-sites)) + url) + (and (eq? scheme 'mirror) + (and=> (find http-url? + (assoc-ref %mirrors + (string->symbol host))) + (lambda (url) + (string-append (strip-trailing-slash url) + (uri-path uri)))))))))) + +(define (html-updatable-package? package) + "Return true if the given package may be handled by the generic HTML +updater." + (or (assoc-ref (package-properties package) 'release-monitoring-url) + ((url-predicate http-url?) package))) (define* (import-html-updatable-release package #:key (version #f)) "Return the latest release of PACKAGE. Do that by crawling the HTML page of @@ -956,6 +969,9 @@ (define* (import-html-updatable-release package #:key (version #f)) string to fetch a specific version." (let* ((uri (string->uri (match (origin-uri (package-source package)) + ((? (cut string-prefix? "mirror://" <>) url) + ;; Retrieve the authoritative HTTP URL from a mirror. + (http-url? url)) ((? string? url) url) ((url _ ...) url)))) (custom (assoc-ref (package-properties package) From patchwork Tue Aug 15 20:29:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 52870 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 4CE3C27BBEE; Tue, 15 Aug 2023 21:33:05 +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 5AD3C27BBE9 for ; Tue, 15 Aug 2023 21:33:02 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qW0i3-00057O-4g; Tue, 15 Aug 2023 16:32:11 -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 1qW0i1-00054o-7W for guix-patches@gnu.org; Tue, 15 Aug 2023 16:32:09 -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 1qW0i0-0008N7-Uf; Tue, 15 Aug 2023 16:32:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qW0hz-0005hI-18; Tue, 15 Aug 2023 16:32:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65230] [PATCH v2 13/13] gnu-maintenance: Consider Qt source tarballs as "release files". 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:32:06 +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.169213148721742 (code B ref 65230); Tue, 15 Aug 2023 20:32:06 +0000 Received: (at 65230) by debbugs.gnu.org; 15 Aug 2023 20:31:27 +0000 Received: from localhost ([127.0.0.1]:36813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0hK-0005ec-HK for submit@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:26 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:46099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW0hC-0005dT-BR for 65230@debbugs.gnu.org; Tue, 15 Aug 2023 16:31:19 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1bc8045e09dso36831915ad.0 for <65230@debbugs.gnu.org>; Tue, 15 Aug 2023 13:31:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692131472; x=1692736272; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fF6sRBMxGgR3r5YzaGPi9LVNpsjj1JR812vljzN319c=; b=q+NDfdULGmUly2X+oe4xdfBEPf+Ks+/XGS5mhTWNhxLy/Asy8yPXN1R4Y5iNUzCqWD xTSgAuUph/fOK7RGuZlED19iLsR+1UnPLPFbTqitGabnS1V7G+BsTswzFssV7bxME4GK r18aEqukKdrJPUvW1+BPJRIF5ITEtwKfewjhLIyzpTos1QOSLtqyQxhwitElpdGkvfx8 HD58+iJSryS4txe94P1uvzQ1uThGgP/NMJ1tfdLc76b3cmOuhzNkBCrOEzaUMaJL1Xd4 1lyojd/16AWiqiFuvMOg1kTQQf9696yN7QRcrBaC/qFF9vpC3iG69SHBJlIoizC2mYI+ 9/dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692131472; x=1692736272; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fF6sRBMxGgR3r5YzaGPi9LVNpsjj1JR812vljzN319c=; b=XpLXugl7svp04JIwJpIeJRLpq18X41B+UhGIwfb6buN2E9KKDa6SZy3AKqpUQF4Bf0 RaZ58fChWESmgDRpBAq8tbqIqoPqabFhM5Pb26R+QEuG57YtB0SR/tIPYMfyKrNimjEW QS1mB5l/6PRUYZbTQLJiEmH67XxLyppFbu/4sZnQ12yxvqQHBatTT+L19Fq9MBdLQN9o 4N7gY29q1B5q5KNhVmCzNCC/b+mPJZTyYa+UCS6Tzp6RjWjIRFQGaXm42WtfL7cXxK2r xMQkG8hSeXdZfdK7giLcvdcBcE7g0XCbGEU0fDk+7OHeufMNioX35iO/EhTe7/Qftapw ZjZg== X-Gm-Message-State: AOJu0YwzUAAI1tYkm1aDJlg1M0Mzh9fHzuuN0VLAYj546jAPQw0vSiEn ANoelB2UPcjr+DFTWbCK+nNAipJt567y/A== X-Google-Smtp-Source: AGHT+IEC4JAwJspLYSLEst8OPnJri7pRzYf941i2ufAIOfNTuVsAGQ30YDvTwZ/ryIKLujR9V8/Jew== X-Received: by 2002:a17:903:41c2:b0:1bb:a55d:c6e7 with SMTP id u2-20020a17090341c200b001bba55dc6e7mr12445336ple.55.1692131472362; Tue, 15 Aug 2023 13:31:12 -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.31.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Aug 2023 13:31:11 -0700 (PDT) From: Maxim Cournoyer Date: Tue, 15 Aug 2023 16:29:37 -0400 Message-ID: <8e06a5301d2857027e6acf41c28173f9530e2c9a.1692131377.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> References: <73d2f33e50141cd7bf6118f7f2db156e455294b1.1692131377.git.maxim.cournoyer@gmail.com> 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 * guix/gnu-maintenance.scm (release-file?): Use positive logic in doc. Add a special case for Qt source archives. * tests/gnu-maintenance.scm ("release-file?"): Update test. --- Changes in v2: - Also special case release file of Qt Creator guix/gnu-maintenance.scm | 18 +++++++++++++----- tests/gnu-maintenance.scm | 5 ++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 2574e0f827..04827a9f27 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -258,8 +258,7 @@ (define %alpha-tarball-rx (make-regexp "^.*-.*[0-9](-|~|\\.)?(alpha|beta|rc|RC|cvs|svn|git)-?[0-9\\.]*\\.tar\\.")) (define (release-file? project file) - "Return #f if FILE is not a release tarball of PROJECT, otherwise return -true." + "Return true if FILE is a release tarball of PROJECT." (and (not (member (file-extension file) '("sig" "sign" "asc" "md5sum" "sha1sum" "sha256sum"))) @@ -268,12 +267,21 @@ (define (release-file? project file) ;; Filter out unrelated files, like `guile-www-1.1.1'. ;; Case-insensitive for things like "TeXmacs" vs. "texmacs". ;; The "-src" suffix is for "freefont-src-20120503.tar.gz". + ;; The '-everywhere-src' suffix is for Qt modular components. (and=> (match:substring match 1) (lambda (name) (or (string-ci=? name project) - (string-ci=? name - (string-append project - "-src"))))))) + (string-ci=? name (string-append project "-src")) + (string-ci=? + name (string-append project "-everywhere-src")) + ;; For older Qt releases such as version 5. + (string-ci=? + name (string-append + project "-everywhere-opensource-src")) + ;; For Qt Creator. + (string-ci=? + name (string-append + project "-opensource-src"))))))) (not (regexp-exec %alpha-tarball-rx file)) (let ((s (tarball-sans-extension file))) (regexp-exec %package-name-rx s)))) diff --git a/tests/gnu-maintenance.scm b/tests/gnu-maintenance.scm index 196a6f9092..61ae295b96 100644 --- a/tests/gnu-maintenance.scm +++ b/tests/gnu-maintenance.scm @@ -40,7 +40,10 @@ (define-module (test-gnu-maintenance) ("exiv2" "exiv2-0.27.3-Source.tar.gz") ("mpg321" "mpg321_0.3.2.orig.tar.gz") ("bvi" "bvi-1.4.1.src.tar.gz") - ("hostscope" "hostscope-V2.1.tgz"))) + ("hostscope" "hostscope-V2.1.tgz") + ("qtbase" "qtbase-everywhere-src-6.5.2.tar.xz") + ("qtbase" "qtbase-everywhere-opensource-src-5.15.10.tar.xz") + ("qt-creator" "qt-creator-opensource-src-11.0.1.tar.xz"))) (every (lambda (project+file) (not (apply release-file? project+file))) '(("guile" "guile-www-1.1.1.tar.gz")