From patchwork Tue Nov 26 10:33:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 70988 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 05C3327BBEA; Tue, 26 Nov 2024 10:37:25 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 CA9D227BBE2 for ; Tue, 26 Nov 2024 10:37:24 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFswS-0005JS-VP; Tue, 26 Nov 2024 05:37:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFswL-0005IO-1y for guix-patches@gnu.org; Tue, 26 Nov 2024 05:37:05 -0500 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 1tFswJ-0000or-S7; Tue, 26 Nov 2024 05:37:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=7skomakDrjVvD2DjZQrnab6W+vi82mi4d1yEkNRwGt8=; b=Z6NHIZ+ZQf1oQ7dx2A1Ph1QtQNwGE10LeRvmwC9XVyRwUgArH9SLaGeTSQc8Yxwqx1bvVAlj95+Hvq2LWn0NhZo4D3vezNIM9oTgvEPuGO6y8QelghX82/Fbd4x9HVq0sRt0IcPGF2rslQDSWoWXygiEcq62CDMnDBFSjamlwrlwErn1iq7ni3tFpRnGPAULD1gt2s1FTgOkrKYeidU6fSB2hs/pUJFB7OCTyDAOzbAqUGcc1Vjlz7PxE5Mphi/eGaUORRzxYJxRgQubqLSRuot8Z18Ys76KmV4w26+Xk32+w72QdjhGC0GqXqH2LnDuvT+TXGFNjvUopm4d3IP/kA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFswI-0002db-5q; Tue, 26 Nov 2024 05:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 01/11] transformations: Export =?utf-8?b?4oCY?= =?utf-8?b?cGFja2FnZS13aXRoLXVwc3RyZWFtLXZlcnNpb27igJku?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 10:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.17326173899990 (code B ref 74542); Tue, 26 Nov 2024 10:37:02 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:36:29 +0000 Received: from localhost ([127.0.0.1]:46177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvk-0002au-GE for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvj-0002aP-32 for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:27 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFstW-0008WP-HX; Tue, 26 Nov 2024 05:34:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=7skomakDrjVvD2DjZQrnab6W+vi82mi4d1yEkNRwGt8=; b=INYKZbUbTW3cWg3KCEzl KhIzrM2xYMXA5qOWAk9kE+oKMGlsTZKEgSL5/B37WV9J8LQclPel+Ye8d58uGcvl2MBX0bO/aBySd Q4/fN4cy8dMPj1o8iGZrVZ9M5hhnepcD+N1IF4dWMcJJt0SNUk8U1ccPtuBnxnh3S7aOqlyASMQim cHbyriTaeCU5kRsYbLE+kIXT3KUrzlU6ljSe3OpYqqCnaYlMtrRn/v+Tqh0CsPiMjqIx0+ZQhjEhD hyy1XDbZc2VdS33cM7RQAstZc55z8GcbHE3nB4eQ8EsjRSMAltV23mkNVkMldTYCAQ6XLM68ec6bM oIcYUhuJJ4ClUw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:40 +0100 Message-ID: <7758b6e93f83b69a2c5a402447df65c563d6ace0.1732615193.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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/transformations.scm (package-with-upstream-version): Export. Change-Id: I8e09e69e9c32bffc329c97ef1c0258f750181b11 --- guix/transformations.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guix/transformations.scm b/guix/transformations.scm index ea8b7a0844..9dfc4402c5 100644 --- a/guix/transformations.scm +++ b/guix/transformations.scm @@ -61,6 +61,8 @@ (define-module (guix transformations) tunable-package? tuned-package + package-with-upstream-version + show-transformation-options-help transformation-option-key? cacheable-transformation-option-key? From patchwork Tue Nov 26 10:33:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 70993 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 35FFF27BBEA; Tue, 26 Nov 2024 10:37:54 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 E95FF27BBE2 for ; Tue, 26 Nov 2024 10:37:53 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFswb-0005Kd-1H; Tue, 26 Nov 2024 05:37:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFswL-0005IL-1y for guix-patches@gnu.org; Tue, 26 Nov 2024 05:37:05 -0500 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 1tFswJ-0000oq-Fz; Tue, 26 Nov 2024 05:37:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=gUsH8apnherpQShGuu1InrWaP5q5OLB8UdwDPUoWXik=; b=mEfTtM7fY+b1+dwPxKDWCYUrvj7NB/9022aC57NJ49QlqsQA8B2zxjIggQ1D+6OaLjzpBl7hdfd4RR8zMqmvG4L3mRM+gKkRA9Ve8sLWla+XSkYhTKAkvj95nEHFE0MaE4FUQsjwSpo3lfV/tjpk/3QK///xZLnitpHSwYGBjefD0mNBfMEMqzEzooOktRwwlEgtz9NwwFUvqHTlNF9tqR5PlXFbuQQQRPy7IiK4h7rfQft260EL1DX9xH7zoyanVGbJfmflD3dnNRwHHA720ve9atMTKvgrBuuzEe5MDxe5u22PEmyGW/H/Msr3VZGN76/9zzjmLWQCSwNoiUaCmQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFswI-0002dk-Oo; Tue, 26 Nov 2024 05:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 02/11] gnu-maintenance: =?utf-8?b?4oCYaW1wb3J0?= =?utf-8?b?LWh0bWwtcmVsZWFzZeKAmSBkb2VzbuKAmXQ=?= abort upon HTTP 404. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 10:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173261739310023 (code B ref 74542); Tue, 26 Nov 2024 10:37:02 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:36:33 +0000 Received: from localhost ([127.0.0.1]:46188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvp-0002bS-0r for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvj-0002aS-4s for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFstX-00004u-Fy; Tue, 26 Nov 2024 05:34:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=gUsH8apnherpQShGuu1InrWaP5q5OLB8UdwDPUoWXik=; b=APGgY+MM1KX4NwTN5iDa 5RvtVLSsxL4cojmXVBpQgEakF5S7dT19F3c0wxUVZNXDk4CT7NgpSkFDqSG5kLAK0PJUN6gitRhad LRiExovN37DX9X/sRkTQqXcOTRIj93Hd6WNbltsBSBf7hUh4O7sKccGlLjLKb23iBjqZYS0gZTieT jZSZevj0CL7iZPK4/9ahHSnJvTTtPsz6GC2Te9raJiqg/5Ro5xWqrLDKtpIiNv4V16UP9AZGaYP7K 4QDbl7gkCT6dISKqxUyacO1qmooUdmIpLBtyaB1cRnCkS8cG2XfxML3D2nMAyiN2JXnlGCS8lqKRh zvBwx33lUNdqNA==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:41 +0100 Message-ID: <92c108d975939b5dece3fb86ac7bce1edaf619a4.1732615193.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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 Previously, updaters using ‘import-html-release’ would throw to 'quit when the HTML page isn’t found, aborting the whole process: $ guix refresh coreutils libchop guix refresh: error: https://de.freedif.org/savannah//libchop/: HTTP download failed: 404 ("Not Found") * guix/gnu-maintenance.scm (url->links): Guard against ‘http-get-error?’ and return the empty list when it is raised. Change-Id: I419ff96ddb424aa8c74d6bab3d66a5e85355c3dc --- guix/gnu-maintenance.scm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 881e941fbf..f34dcfc13f 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2010-2023 Ludovic Courtès +;;; Copyright © 2010-2024 Ludovic Courtès ;;; Copyright © 2012, 2013 Nikita Karetnikov ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2022 Maxime Devos @@ -30,6 +30,7 @@ (define-module (guix gnu-maintenance) #:use-module (srfi srfi-2) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-34) #:use-module (rnrs io ports) #:use-module ((guix http-client) #:hide (open-socket-for-uri)) ;; not required in many cases, so autoloaded to reduce start-up costs. @@ -496,11 +497,16 @@ (define (html-links sxml) (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)))) + (guard (c ((http-get-error? c) + (warning (G_ "failed to download '~a': ~a (~a)~%") + url (http-get-error-code c) + (http-get-error-reason c)) + '())) + (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 (canonicalize-url url base-url) "Make relative URL absolute, by appending URL to BASE-URL as required. If From patchwork Tue Nov 26 10:33:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 70992 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 2C33D27BBEA; Tue, 26 Nov 2024 10:37:51 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 B315627BBE2 for ; Tue, 26 Nov 2024 10:37:50 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFswW-0005JY-Dm; Tue, 26 Nov 2024 05:37:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFswL-0005IN-1b for guix-patches@gnu.org; Tue, 26 Nov 2024 05:37:05 -0500 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 1tFswK-0000ou-MJ; Tue, 26 Nov 2024 05:37:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=kl+o3JDOVclar88DBNdgoen9lS8pCWyJIdQt9A5uZV8=; b=vaJqR3+cGUstyW35KiGIxShUhLqhXMwflQwd2CpR8zn7xbc79bvktf8O/Z3ebQuAHG4ykIfp5WekzJYF6AE+ucS7mz0fwbN2j2VvODiOS6aghRmNalHDrqmK5GRlVqFbhgAv7RtcY5SkMBqQnsY66GdiCF2jbbW2mPQ3e50GoWpLz16qbj48g+DI/fWumM6dM8Y/soEJB+Vh9wHOkE9F9pt56bpDRANSgs7D9FnYZwY05JK7zhObV2ZjxpJcJlYavNtksBDTC2+6JBTKocknQJhLqzmdyouiepbzCPojBhIla2Gj6dXpFakbb8K3ouZTjkmGP2TsFeyPayh4Tpii5A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFswJ-0002dt-Ak; Tue, 26 Nov 2024 05:37:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 03/11] gnu-maintenance: Savannah/Xorg updaters no longer abort on network errors. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 10:37:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173261739510032 (code B ref 74542); Tue, 26 Nov 2024 10:37:03 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:36:35 +0000 Received: from localhost ([127.0.0.1]:46196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvp-0002bd-KM for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvj-0002aT-4o for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFstY-00005O-Ln; Tue, 26 Nov 2024 05:34:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=kl+o3JDOVclar88DBNdgoen9lS8pCWyJIdQt9A5uZV8=; b=hUXg78eqqEb0caSIy3z2 Us1K7+gJhuLuq4k+Zeg7s/XWBukYOXCHGvoc5jJvNZbSQ/RwkIQORnFU3gzg7Munw6q8H+89yDX/l EIbnzrT7xjCneXdFrPAYpR+9qkpVdLFoeIA5s7k0Anw37MML/KiHLlbglQcc+NJ8iqmop5Q9v7kUQ lygiPaIKeQafIVMvyUiIZzqNapdr78BZsfVIILPb/HHUGJJ8xI1YUkGiZ3Ynt/4jL4lydTdSvhtKW P/O81SZMIx4Ms8NA/VDAd2Q7SnTkO26APP5O5eWKVca5qbqxwLIBiNRDQTqzI8Frj6FHcVOQH5kvn cTNGiZDYIVUViw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:42 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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 Previously these updaters would fail upon networking error, causing the whole process to abort: $ guix refresh coreutils libgcrypt guix refresh: error: connect*: Connection refused * guix/gnu-maintenance.scm (import-release*, import-xorg-release): Wrap in ‘false-if-networking-error’. Change-Id: I8d309bf8662e2d46460585b4a1b7da0a4f2e8907 --- guix/gnu-maintenance.scm | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index f34dcfc13f..866b960a4a 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -469,10 +469,12 @@ (define* (import-release* package #:key (version #f)) \"emacs-auctex\", for instance.)" (let-values (((server directory) (ftp-server/directory package))) - (false-if-ftp-error (import-release (package-upstream-name package) - #:version version - #:server server - #:directory directory)))) + (false-if-networking-error + (false-if-ftp-error + (import-release (package-upstream-name package) + #:version version + #:server server + #:directory directory))))) ;;; @@ -913,13 +915,14 @@ (define* (import-xorg-release package #:key (version #f)) "Return the latest release of PACKAGE. Optionally include a VERSION string to fetch a specific version." (let ((uri (string->uri (origin-uri (package-source package))))) - (false-if-ftp-error - (import-ftp-release - (package-name package) - #:version version - #:server "ftp.freedesktop.org" - #:directory - (string-append "/pub/xorg/" (dirname (uri-path uri))))))) + (false-if-networking-error + (false-if-ftp-error + (import-ftp-release + (package-name package) + #:version version + #:server "ftp.freedesktop.org" + #:directory + (string-append "/pub/xorg/" (dirname (uri-path uri)))))))) (define* (import-kernel.org-release package #:key (version #f)) "Return the latest release of PACKAGE, a Linux kernel package. From patchwork Tue Nov 26 10:33:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 70995 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 B3ED927BBE9; Tue, 26 Nov 2024 10:38:02 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 C39F227BBE2 for ; Tue, 26 Nov 2024 10:38:00 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFswb-0005Kk-8X; Tue, 26 Nov 2024 05:37:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFswM-0005IP-58 for guix-patches@gnu.org; Tue, 26 Nov 2024 05:37:08 -0500 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 1tFswK-0000ov-RG; Tue, 26 Nov 2024 05:37:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=fqh6EUI8OTpBwB00eruwI0TwIUEw3M7Z/G3uk+D4mMs=; b=avu209DVFEYxqKKVYJv0N0QIxOD0hl/gjfH1L49XMHeyaFkEGpT0Ut9Bss0zl3KHBjceV1JEh2036lNW3sZHO9WGPRYm3vGzS99FlT4xUErSABlz3BhajzUsEMx6agbRiy/DMDPpLKHGNaEsIEs6E3cc0mO5QmASy1yTejKcLvODUDYT5vvdBmanWViOC2XCDOxXt37aC70lytYpvg6L092/dyTFBEX0M3fmn36szjBautwB1CjDMvnME2GDcFWotx6q2M5W8Iz0LF/Zmot21jVEdUklYxoSdxNx6Iybyk02NUsBLTGQt/Vl6BQbsY3NES2sBN3ebqMtcWHlmCS44Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFswJ-0002e4-Pb; Tue, 26 Nov 2024 05:37:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 04/11] build: Add =?utf-8?b?4oCYLS1kZXZlbG9wbWVu?= =?utf-8?b?dOKAmQ==?= option. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, maxim.cournoyer@gmail.com, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 10:37:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173261739610055 (code B ref 74542); Tue, 26 Nov 2024 10:37:03 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:36:36 +0000 Received: from localhost ([127.0.0.1]:46198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvq-0002bl-PM for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvm-0002ac-Mz for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:31 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFstZ-000062-Qm; Tue, 26 Nov 2024 05:34:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=fqh6EUI8OTpBwB00eruwI0TwIUEw3M7Z/G3uk+D4mMs=; b=ZfxMnSfcxZaI+wxRGzr9 3UhlZgkuRHvoqsfN/7x5lTaw82MkhTHK5jURnJVU3honlMdRv6PWbCEnhzA7iGoKqHXW40IEwRCac /oMQWI/VwOEt3y8a0tAR9d2Y8zflPutJTJ9UvdJbcyZlrpOGVoiMTTADuOy32dMDlXEb2m1LHhF74 K3Q31uRA32qranETxEmIWdjpfIjYq+noCbnjcD6dPzkTcb0BePwgwDmKBZfnZh1mTIuSZkwybTiz/ MqPCLaXzuc/A8O+noi9/aI0vT20ABQZqku6V1HmUlYiAOhWid3SzkHX/xPEqXyTauzHxJd0dCxVpV jandyQTRFnBIsQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:43 +0100 Message-ID: <7c530a62370853828f181db011cb2f12fdc78847.1732615193.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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/scripts/build.scm (show-help, %options): Add ‘-D’. (options->things-to-build): Change ‘append-map’ to a loop. Honor ‘-D’. * tests/guix-build.sh: Add test. * doc/guix.texi (Additional Build Options): Document it. Change-Id: I99227aadfe861e43c001a4872292bd687b37f5d4 --- doc/guix.texi | 25 +++++++++ guix/scripts/build.scm | 119 ++++++++++++++++++++++++++++------------- tests/guix-build.sh | 5 ++ 3 files changed, 112 insertions(+), 37 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 26488b41c8..a9d0d044ae 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13614,6 +13614,31 @@ Additional Build Options (@pxref{The Store Monad}). The procedure must return a derivation as a monadic value, which is then passed through @code{run-with-store}. +@item --development +@itemx -D +Build the ``development environment'' (build dependencies) of the +following package. + +For example, the following command builds the inputs of @code{hello}, +but @emph{not} @code{hello} itself, and also builds @code{guile}: + +@example +guix build -D hello guile +@end example + +Notice that @option{-D} (or @option{--development}) only applies to the +immediately following package on the command line. Under the hood, it +uses @code{package->development-manifest} +(@pxref{package-development-manifest, +@code{package->development-manifest}}). + +@quotation Note +The effect of combining @option{--development} with @option{--target} +(for cross-compilation) may not be what you expect: it will +cross-compile all the dependencies of the given package when it is built +natively. +@end quotation + @item --source @itemx -S Build the source derivations of the packages, rather than the packages diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 9e05bb532b..326d04f1f8 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -438,6 +438,8 @@ (define (show-help) -m, --manifest=FILE build the packages that the manifest given in FILE evaluates to")) (display (G_ " + -D, --development build the inputs of the following package")) + (display (G_ " -S, --source build the packages' source derivations")) (display (G_ " --sources[=TYPE] build source derivations; TYPE may optionally be one @@ -522,6 +524,9 @@ (define %options (option '(#\m "manifest") #t #f (lambda (opt name arg result) (alist-cons 'manifest arg result))) + (option '(#\D "development") #f #f + (lambda (opt name arg result) + (alist-cons 'development? #t result))) (option '(#\n "dry-run") #f #f (lambda (opt name arg result) (alist-cons 'dry-run? #t result))) @@ -581,43 +586,83 @@ (define-public my-package (for-each validate-type lst) lst)) - (append-map (match-lambda - (('argument . (? string? spec)) - (cond ((derivation-path? spec) - (catch 'system-error - (lambda () - ;; Ask for absolute file names so that .drv file - ;; names passed from the user to 'read-derivation' - ;; are absolute when it returns. - (let ((spec (canonicalize-path spec))) - (list (read-derivation-from-file spec)))) - (lambda args - ;; Non-existent .drv files can be substituted down - ;; the road, so don't error out. - (if (= ENOENT (system-error-errno args)) - '() - (apply throw args))))) - ((store-path? spec) - ;; Nothing to do; maybe for --log-file. - '()) - (else - (list (specification->package spec))))) - (('file . file) - (let ((file (or (and (string-suffix? ".json" file) - (json->scheme-file file)) - file))) - (ensure-list (load* file (make-user-module '()))))) - (('manifest . manifest) - (map manifest-entry-item - (manifest-entries - (load* manifest - (make-user-module '((guix profiles) (gnu))))))) - (('expression . str) - (ensure-list (read/eval str))) - (('argument . (? derivation? drv)) - drv) - (_ '())) - opts)) + (define system + (or (assoc-ref opts 'system) (%current-system))) + + ;; Process OPTS in "the right order", meaning that if the user typed + ;; "-D hello", arrange to see the 'development? option before the "hello" + ;; spec. + (let loop ((opts (reverse opts)) + (type 'regular) + (result '())) + (define (for-type obj) + ;; Return a list of objects corresponding to OBJ adjusted for TYPE. + (match type + ('regular + (list obj)) + ('development + (if (package? obj) + (map manifest-entry-item + (manifest-entries + (package->development-manifest obj system))) + obj)))) + + (match opts + (() + (reverse result)) + ((head . tail) + (match head + (('argument . (? string? spec)) + (cond ((derivation-path? spec) + (catch 'system-error + (lambda () + ;; Ask for absolute file names so that .drv file + ;; names passed from the user to 'read-derivation' + ;; are absolute when it returns. + (let ((spec (canonicalize-path spec))) + (loop tail 'regular + (cons (read-derivation-from-file spec) + result)))) + (lambda args + ;; Non-existent .drv files can be substituted down + ;; the road, so don't error out. + (if (= ENOENT (system-error-errno args)) + (loop tail 'regular result) + (apply throw args))))) + ((store-path? spec) + ;; Nothing to do; maybe for --log-file. + (loop tail type result)) + (else + (loop tail 'regular + (append (for-type (specification->package spec)) + result))))) + (('file . file) + (let ((file (or (and (string-suffix? ".json" file) + (json->scheme-file file)) + file))) + (loop tail 'regular + (append (append-map + for-type + (ensure-list (load* file (make-user-module '())))) + result)))) + (('manifest . manifest) + (loop tail 'regular + (append (map manifest-entry-item + (manifest-entries + (load* manifest + (make-user-module '((guix profiles) + (gnu)))))) + result))) + (('expression . str) + (loop tail 'regular + (append (append-map for-type (ensure-list (read/eval str))) + result))) + (('argument . (? derivation? drv)) + (loop tail 'regular (cons drv result))) + (('development? . #t) + (loop tail 'development result)) + (_ + (loop tail type result))))))) (define (options->derivations store opts) "Given OPTS, the result of 'args-fold', return a list of derivations to diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 36eac2b7e0..3637bcdeb3 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -190,6 +190,11 @@ test `guix build -d --sources=transitive foo \ | grep -e 'foo\.tar\.gz' -e 'bar\.tar\.gz' -e 'bar\.dat' \ | wc -l` -eq 3 +# Building the inputs. +guix build -D hello -n +test `guix build -D hello -d \ + | grep -e 'glibc.*\.drv$' -e 'gcc.*\.drv$' -e 'binutils.*\.drv$' \ + | wc -l` -ge 3 # Unbound variable in thunked field. cat > "$module_dir/foo.scm" < X-Patchwork-Id: 70989 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 00DFD27BBEA; Tue, 26 Nov 2024 10:37:30 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 6457927BBE2 for ; Tue, 26 Nov 2024 10:37:30 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFswY-0005Jp-BH; Tue, 26 Nov 2024 05:37:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFswM-0005Il-G2 for guix-patches@gnu.org; Tue, 26 Nov 2024 05:37:08 -0500 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 1tFswM-0000pd-6g; Tue, 26 Nov 2024 05:37:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=fVG6zE1g5+COgLKTSq6q72yUelSVfBfqbZ9R64BW7Zw=; b=s4XgT3ZzFGoXypnOvqdGHMT7fTdO74xdbArfprxgik7OoTL/M/HK2IojBbeSBQxiyGqZ4gINioC1DA0A3sn4choKok4PDNGT7Asa8nEVj1c0ufbNkZ+S7ZbgMkdZ4R1g+U7p8dUp4S2F+otSKPwNba4S8ZQF90dDkKUa5CWNzLxAv6/SMT6mWo+jyZMjzxAKvM9I58IyKwyoiJThGSgqW1XZCtgFaYzWwiYKY7Oss5iB9LMJKUNbNwFtuwR8vxZpk1BIkt4u7lLxLpySOrPOL9DK662mSkDvqib2q2IBcUTFdH1MRvHJdZWBjE35I8OxgAP+8XT8BhdlM4leeTIWnQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFswK-0002eF-8N; Tue, 26 Nov 2024 05:37:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 05/11] packages: Factorize =?utf-8?b?4oCYYWxs?= =?utf-8?b?LXBhY2thZ2Vz4oCZLg==?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 10:37:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173261740510081 (code B ref 74542); Tue, 26 Nov 2024 10:37:04 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:36:45 +0000 Received: from localhost ([127.0.0.1]:46202 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsw0-0002cV-Vv for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvo-0002ae-5V for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFsta-00006Y-U0; Tue, 26 Nov 2024 05:34:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=fVG6zE1g5+COgLKTSq6q72yUelSVfBfqbZ9R64BW7Zw=; b=P8Ia4mWfmBwTQczy4ko6 D5yj8KuzmqjgxwB5l8GlEyivMrwR4m9mVGg4lvvs44RLYvyywC9CRv/RbC87hGRS6bjfNeHg+dtOX kiS5D3dTyIzE8N+75nH8twjcEPq20yjis65O2kesFgezMwVzSiNYpZE69nR6Yboknal0Bsl56fPNb T90LwQEPp6h/eSbKTziv35XS9iijyPnqdwWs8vTBSNEKlYPPVXU6qhdFcC0P7NVlk8Uzbp7UB88g6 eORR1IVXWxz3TvvpCFCQL49EK3kvC3JsFJiJcNNnbBApVeCCKPDXh4nbP1yRntNLqujyeclStwfaF X+Df8ePaHR2+rQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:44 +0100 Message-ID: <21b5368441ff34f5a54b78550b87d97ca765785e.1732615193.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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.scm (all-packages): New procedure. * etc/source-manifest.scm (all-packages): Remove. * guix/scripts/graph.scm (all-packages): Remove. * guix/scripts/refresh.scm (all-packages): Remove. * guix/scripts/weather.scm (all-packages): Remove. Change-Id: I6072952c4b877b541037ce86402cfb7744eeb0a0 --- etc/source-manifest.scm | 13 +------------ gnu/packages.scm | 20 +++++++++++++++++++- guix/scripts/graph.scm | 10 ---------- guix/scripts/refresh.scm | 10 ---------- guix/scripts/weather.scm | 15 --------------- 5 files changed, 20 insertions(+), 48 deletions(-) diff --git a/etc/source-manifest.scm b/etc/source-manifest.scm index f96a5da6f7..3e1ae07959 100644 --- a/etc/source-manifest.scm +++ b/etc/source-manifest.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2021, 2024 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,17 +25,6 @@ (guix packages) (guix profiles) (gnu packages)) -(define (all-packages) - "Return the list of all the packages, public or private, omitting only -superseded packages." - (fold-packages (lambda (package lst) - (match (package-replacement package) - (#f (cons package lst)) - (replacement - (append (list replacement package) lst)))) - '() - #:select? (negate package-superseded))) - (define (upstream-origin source) "Return SOURCE without any patches or snippet." (origin (inherit source) diff --git a/gnu/packages.scm b/gnu/packages.scm index 80c22d1d7f..1af3b8d440 100644 --- a/gnu/packages.scm +++ b/gnu/packages.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012-2020, 2022-2023 Ludovic Courtès +;;; Copyright © 2012-2020, 2022-2024 Ludovic Courtès ;;; Copyright © 2013 Mark H Weaver ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016, 2017 Alex Kost @@ -56,6 +56,7 @@ (define-module (gnu packages) cache-is-authoritative? fold-packages + all-packages fold-available-packages find-newest-available-packages @@ -253,6 +254,23 @@ (define* (fold-packages proc init init modules)) +(define all-packages + (mlambda () + "Return the list of all public packages, including replacements and hidden +packages, excluding superseded packages." + (delete-duplicates + (fold-packages (lambda (package result) + (match (package-replacement package) + ((? package? replacement) + (cons* replacement package result)) + (#f + (cons package result)))) + '() + + ;; Dismiss deprecated packages but keep hidden packages. + #:select? (negate package-superseded)) + eq?))) + (define %package-cache-file ;; Location of the package cache. "/lib/guix/package.cache") diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm index 6740858d8b..935721edea 100644 --- a/guix/scripts/graph.scm +++ b/guix/scripts/graph.scm @@ -119,16 +119,6 @@ (define %package-node-type ;;; Reverse package DAG. ;;; -(define (all-packages) ;XXX: duplicated from (guix scripts refresh) - "Return the list of all the distro's packages." - (fold-packages (lambda (package result) - ;; Ignore deprecated packages. - (if (package-superseded package) - result - (cons package result))) - '() - #:select? (const #t))) ;include hidden packages - (define %reverse-package-node-type ;; For this node type we first need to compute the list of packages and the ;; list of back-edges. Since we want to do it only once, we use the diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index ec7d38c22a..8c72d0c545 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -455,16 +455,6 @@ (define* (check-for-package-update update-spec updaters #:key warn?) ;;; Dependents. ;;; -(define (all-packages) - "Return the list of all the distro's packages." - (fold-packages (lambda (package result) - ;; Ignore deprecated packages. - (if (package-superseded package) - result - (cons package result))) - '() - #:select? (const #t))) ;include hidden packages - (define (list-dependents packages) "List all the things that would need to be rebuilt if PACKAGES are changed." ;; Using %BAG-NODE-TYPE is more accurate than using %PACKAGE-NODE-TYPE diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm index 08a1b22a74..29432fd923 100644 --- a/guix/scripts/weather.scm +++ b/guix/scripts/weather.scm @@ -55,21 +55,6 @@ (define-module (guix scripts weather) #:use-module (ice-9 vlist) #:export (guix-weather)) -(define (all-packages) - "Return the list of public packages we are going to query." - (delete-duplicates - (fold-packages (lambda (package result) - (match (package-replacement package) - ((? package? replacement) - (cons* replacement package result)) - (#f - (cons package result)))) - '() - - ;; Dismiss deprecated packages but keep hidden packages. - #:select? (negate package-superseded)) - eq?)) - (define (call-with-progress-reporter reporter proc) "This is a variant of 'call-with-progress-reporter' that works with monadic scope." From patchwork Tue Nov 26 10:33:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 70990 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 939D427BBEA; Tue, 26 Nov 2024 10:37:37 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 DF9E027BBE2 for ; Tue, 26 Nov 2024 10:37:36 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFswY-0005Jl-90; Tue, 26 Nov 2024 05:37:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFswO-0005Im-Aq for guix-patches@gnu.org; Tue, 26 Nov 2024 05:37:08 -0500 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 1tFswM-0000pe-9o; Tue, 26 Nov 2024 05:37:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=k3k/sg0/wgle55A25LQqmWpOUX+fPsiNJz/UedSG5CU=; b=lk07KNhvhYxTNhe9921yKHSff3fkUMz04Fu7+AfhUCjpSVYQb5nVL9gvLQ2teU74HS5hiHvEFk9xmuGDwaTV95z73mfdzc5jKsCedeRxDRP4mVDWnV28Fnvh3/Wcf/aoefcps+gmdY6N9td3MAgxwCOdgmuovRJL2dWND19AEWagOZqPiUEssIjmLPECP5RHKtFNxWRPI9uQd0Z/BeeQh12+33Y7rLFbJaL+pNL+v+hdt3LCT4YU+bjKBMA2eqDwC/xGEP5BEfqK0EPABzDh8jtZuIXtRxQ1kK8RgtQonjP7o5Jn9br4UhlGRXelWEwmauVRVs3A29ZYE3l4lzRnjQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFswK-0002eQ-P8; Tue, 26 Nov 2024 05:37:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 06/11] guix build: Add =?utf-8?b?4oCYLS1kZXBl?= =?utf-8?b?bmRlbnRz4oCZLg==?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, maxim.cournoyer@gmail.com, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 10:37:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173261740610088 (code B ref 74542); Tue, 26 Nov 2024 10:37:04 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:36:46 +0000 Received: from localhost ([127.0.0.1]:46204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsw1-0002cY-PR for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvo-0002af-5U for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:32 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFstc-00006m-AL; Tue, 26 Nov 2024 05:34:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=k3k/sg0/wgle55A25LQqmWpOUX+fPsiNJz/UedSG5CU=; b=DlOjfn24XgIyfLJWx6ac HrRsYWG9mWedyNOuDuFJ8PMaWheLketKnPOtaQSxjBD+GuDXXqGgUCm/ywxdG6H4C9C6ja4kl4i/R bIr0x7U7kq8U6FnNDfByIodYT5oueGADRp8iqO5BJaJhd4mKWYB0GR2GNjvgMvJIo1uEWHLgaf5y2 UcoEmIQQnLYCzED0KxinjKuI3wEo9VBZwVAfgBBkkCm9AdXELxMUhRYPaOkBqdj0B5je/vgymblFP pVSqDd7PDEZ/7fOP061U1iOynwqnSG+0ZRO5qepfn95ZR7UsreKt1UAMZCtHsrGCrpBsnKz9lwdm/ j6bP+/nYaQKGnA==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:45 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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/scripts/build.scm (show-help, %options): Add ‘--dependents’. (dependents): New procedure. (options->things-to-build): Add ‘store’ parameter; honor ‘dependents’ option. [for-type]: Handle ‘dependents’ type. (options->derivations): Update call to ‘options->things-to-build’. * tests/guix-build.sh: Add test. * doc/guix.texi (Additional Build Options): Document ‘--dependents’. (Invoking guix refresh): Cross-reference it. * doc/contributing.texi (Submitting Patches): Mention it. Change-Id: I00b6d5831e1f1d35dc8b84a82605391d5a8f417c --- doc/contributing.texi | 4 ++- doc/guix.texi | 27 ++++++++++++++++++++ guix/scripts/build.scm | 56 ++++++++++++++++++++++++++++++++++++++++-- tests/guix-build.sh | 6 +++++ 4 files changed, 90 insertions(+), 3 deletions(-) diff --git a/doc/contributing.texi b/doc/contributing.texi index b063169189..5a778466d7 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -1914,7 +1914,9 @@ Submitting Patches @item Make sure the package builds on your platform, using @command{guix build -@var{package}}. +@var{package}}. Also build at least its direct dependents with +@command{guix build --dependents=1 @var{package}} +(@pxref{build-dependents, @command{guix build}}). @item We recommend you also try building the package on other supported diff --git a/doc/guix.texi b/doc/guix.texi index a9d0d044ae..5734cf306b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13639,6 +13639,31 @@ Additional Build Options natively. @end quotation +@cindex dependents of a package, building them +@cindex building the dependents of a package +@anchor{build-dependents} +@item --dependents[=@var{depth}] +@itemx -T [@var{depth}] +Build the dependents of the following package. By default, build all +the direct and indirect dependents; when @var{depth} is provided, limit +to dependents at that distance: 1 for direct dependents, 2 for +dependents of dependents, and so on. + +For example, the command below builds @emph{all} the dependents of libgit2: + +@example +guix build --dependents libgit2 +@end example + +To build all the packages that directly depend on NumPy, run: + +@example +guix build -T1 python-numpy +@end example + +The list of dependents is computed in the same way as with @command{guix +refresh --list-dependent} (@pxref{Invoking guix refresh}). + @item --source @itemx -S Build the source derivations of the packages, rather than the packages @@ -15142,6 +15167,8 @@ Invoking guix refresh @command{guix graph}}, for information on how to visualize the list of dependents of a package. +@xref{build-dependents, @command{guix build --dependents}}, for a +convenient way to build all the dependents of a package. @end table Be aware that the @option{--list-dependent} option only diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 326d04f1f8..565bfd48e9 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -33,6 +33,9 @@ (define-module (guix scripts build) #:use-module (guix profiles) #:use-module (guix diagnostics) #:autoload (guix http-client) (http-fetch http-get-error?) + #:autoload (guix scripts graph) (%bag-node-type) + #:autoload (guix graph) (node-back-edges) + #:autoload (guix sets) (setq set-contains? set-insert) #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (srfi srfi-1) @@ -440,6 +443,9 @@ (define (show-help) (display (G_ " -D, --development build the inputs of the following package")) (display (G_ " + -T, --dependents[=N] build dependents of the following package, up to + depth N")) + (display (G_ " -S, --source build the packages' source derivations")) (display (G_ " --sources[=TYPE] build source derivations; TYPE may optionally be one @@ -527,6 +533,11 @@ (define %options (option '(#\D "development") #f #f (lambda (opt name arg result) (alist-cons 'development? #t result))) + (option '(#\T "dependents") #f #t + (lambda (opt name arg result) + (alist-cons 'dependents + (or (and=> arg string->number*) +inf.0) + result))) (option '(#\n "dry-run") #f #f (lambda (opt name arg result) (alist-cons 'dry-run? #t result))) @@ -551,7 +562,39 @@ (define %options %standard-cross-build-options %standard-native-build-options))) -(define (options->things-to-build opts) +(define (dependents store packages max-depth) + "List all the things that would need to be rebuilt if PACKAGES are changed." + ;; Using %BAG-NODE-TYPE is more accurate than using %PACKAGE-NODE-TYPE + ;; because it includes implicit dependencies. + (define (get-dependents packages edges) + (let loop ((packages packages) + (result '()) + (depth 0) + (visited (setq))) + (if (> depth max-depth) + (values result visited) + (match packages + (() + (values result visited)) + ((head . tail) + (if (set-contains? visited head) + (loop tail result depth visited) + (let ((next (edges head))) + (call-with-values + (lambda () + (loop next + (cons head result) + (+ depth 1) + (set-insert head visited))) + (lambda (result visited) + (loop tail result depth visited)))))))))) + + (with-store store + (run-with-store store + (mlet %store-monad ((edges (node-back-edges %bag-node-type (all-packages)))) + (return (get-dependents packages edges)))))) + +(define (options->things-to-build store opts) "Read the arguments from OPTS and return a list of high-level objects to build---packages, gexps, derivations, and so on." (define (validate-type x) @@ -600,6 +643,13 @@ (define-public my-package (match type ('regular (list obj)) + (('dependents . depth) + (if (package? obj) + (begin + (info (G_ "computing dependents of package ~a...~%") + (package-full-name obj)) + (dependents store (list obj) depth)) + (list obj))) ('development (if (package? obj) (map manifest-entry-item @@ -661,6 +711,8 @@ (define-public my-package (loop tail 'regular (cons drv result))) (('development? . #t) (loop tail 'development result)) + (('dependents . depth) + (loop tail `(dependents . ,depth) result)) (_ (loop tail type result))))))) @@ -687,7 +739,7 @@ (define (options->derivations store opts) (systems systems))) (define things-to-build - (map transform (options->things-to-build opts))) + (map transform (options->things-to-build store opts))) (define warn-if-unsupported (let ((target (assoc-ref opts 'target))) diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 3637bcdeb3..42e2ecafb1 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -196,6 +196,12 @@ test `guix build -D hello -d \ | grep -e 'glibc.*\.drv$' -e 'gcc.*\.drv$' -e 'binutils.*\.drv$' \ | wc -l` -ge 3 +# Building the dependents. +test `guix build -T1 libgit2 -T1 libssh -d \ + | grep -e 'guile-git.*\.drv$' -e 'guile-ssh.*\.drv$' \ + -e 'libgit2.*\.drv$' -e 'libssh.*\.drv$' \ + | wc -l` -eq 4 + # Unbound variable in thunked field. cat > "$module_dir/foo.scm" < X-Patchwork-Id: 70991 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 0186427BBEA; Tue, 26 Nov 2024 10:37:40 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 AC70627BBE2 for ; Tue, 26 Nov 2024 10:37:40 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFswY-0005Jj-26; Tue, 26 Nov 2024 05:37:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFswL-0005Ij-No for guix-patches@gnu.org; Tue, 26 Nov 2024 05:37:08 -0500 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 1tFswL-0000pT-Ej for guix-patches@gnu.org; Tue, 26 Nov 2024 05:37:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=acgj0glEt7hanHQUf4oPk2R5nSiXvs7JtfKGwt4jdQ8=; b=nWZeWl8xb6u3qhCYES2Hbw1mOFjtDfslSVqdfcgJwlZIR0VShhC0iG29/rZWlIjvguTgJuTkiUVQHEDiDa9Lge5gJBYZj3zKPfgDkKnA7UqzCdXK1AfwGtMNnCLb6miel5oyucTP6Wpf/3rwznifE+yt8NvMRR41QF/R2ScupNgzmdxWVme+NdmXEftN+W+0elswqMgABnYP8ocByT92DM5xpNoSPq262c1gUPz1ecbzaJ46Hue3jvySXbCDFROvjDbksJxB3vFwsN4l41gvr8NK/by1r4VuEqkWdCRyIbeJBJCJZ+aFXb49Oldmyj1ckA6R8D2ZFKhuY26RExEl3Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFswL-0002ec-Al for guix-patches@gnu.org; Tue, 26 Nov 2024 05:37:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 07/11] import: gnome: Keep going upon HTTP errors. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 10:37:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173261740710096 (code B ref 74542); Tue, 26 Nov 2024 10:37:05 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:36:47 +0000 Received: from localhost ([127.0.0.1]:46206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsw2-0002cf-Ex for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvp-0002ar-9C for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFstd-00006z-D1; Tue, 26 Nov 2024 05:34:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=acgj0glEt7hanHQUf4oPk2R5nSiXvs7JtfKGwt4jdQ8=; b=VFMYY1xckA/1cY68C6n+ u0RkJahBdj6TniBcDBJB+QEcKqNjXwxz0SDObgS805f54PYn3Wube72/q67EdbTP7rLn7c+T+tOfo KdSTPl8tA5EqLllpYAQdJtcr/CFjaWzLtRMqnOcvgfN9DcmN1KItfjf9rbKKEeYHMBeJkrK9ozV8V 9mewSfX5KE/dhH9Bw4E2IxXLm4dxXiGdoOQe8CKR7YNVadWqJ+UmsEW7IURUT9BM833/Aprst8Edg xF3JLTs2r5Ng0do7gSUZWU072ilmCQbfBR6ESsXVM+FzkDCWrpIrrN5vnTg+QR872/QInt+gQ/oa1 H3DcnZvoRgO6hg==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:46 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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/import/gnome.scm (import-gnome-release): Do not re-raise condition C, emit a warning instead. Change-Id: I9a7c337a17d1f7ed4677398e7b0f383befca7d74 --- guix/import/gnome.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/guix/import/gnome.scm b/guix/import/gnome.scm index 054ae44f7a..3ba8ae02e5 100644 --- a/guix/import/gnome.scm +++ b/guix/import/gnome.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017, 2019, 2021 Ludovic Courtès +;;; Copyright © 2017, 2019, 2021, 2024 Ludovic Courtès ;;; Copyright © 2022 Maxim Cournoyer ;;; Copyright © 2022 Hartmut Goebel ;;; @@ -23,6 +23,8 @@ (define-module (guix import gnome) #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix http-client) + #:use-module (guix diagnostics) + #:use-module (guix i18n) #:use-module (json) #:use-module (srfi srfi-1) #:use-module (srfi srfi-34) @@ -111,9 +113,12 @@ (define* (import-gnome-release package #:key (version #f)) releases)) (guard (c ((http-get-error? c) - (if (= 404 (http-get-error-code c)) - #f - (raise c)))) + (unless (= 404 (http-get-error-code c)) + (warning (G_ "failed to download from '~a': ~a (~s)~%") + (uri->string (http-get-error-uri c)) + (http-get-error-code c) + (http-get-error-reason c))) + #f)) (let* ((port (http-fetch/cached (string->uri (string-append "https://ftp.gnome.org/pub/gnome/sources/" From patchwork Tue Nov 26 10:33:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 70994 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 12BCE27BBE9; Tue, 26 Nov 2024 10:38:02 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 3B39227BBEA for ; Tue, 26 Nov 2024 10:38:01 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFswb-0005Ke-4K; Tue, 26 Nov 2024 05:37:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFswO-0005In-Cu for guix-patches@gnu.org; Tue, 26 Nov 2024 05:37:08 -0500 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 1tFswO-0000qG-1M; Tue, 26 Nov 2024 05:37:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=s3NlCK5g4EoLnXqtNocOLhHNwSIxIbo8INXA2YVICF4=; b=G1mUok7nQU4xXOHgBR6igrgqGhlSOLltMKQA28RopjW7dreX2ifJWYON0dhcd0k5s8ZCopFEic+kTNDjruKc18mXOyK6XjuLr/zDkCSuv8ddhyXWNVn4RtU0cHv+B9T30Ab5yfZ2VbWiBjJF/CfaxmCDYrBlEiE2m4kxEiChdbfPLY/G6vVJ2bXrOHagONc8CKvsWl0n7YCntoT3Cm8HIOzfufiiYgcUpdVbLElQMVleItSTtIYwqpoPjYwpAG+KTpzKKsGLeTOrDf1pYRvYg2V3RJciIU/quTFrLDoHh5kZM5FJn6zDuvi1NkHI3qN6BspbQoqRLFsO65xsQ0TBRQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFswL-0002en-P4; Tue, 26 Nov 2024 05:37:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 08/11] gnu-maintenance: =?utf-8?b?4oCYZ251LWZ0?= =?utf-8?b?cOKAmQ==?= updater excludes GnuPG-hosted packages. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 10:37:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173261740710102 (code B ref 74542); Tue, 26 Nov 2024 10:37:05 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:36:47 +0000 Received: from localhost ([127.0.0.1]:46208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsw3-0002cn-1R for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFsvp-0002as-9B for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:36:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFste-00007E-Km; Tue, 26 Nov 2024 05:34:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=s3NlCK5g4EoLnXqtNocOLhHNwSIxIbo8INXA2YVICF4=; b=X89Gu1MjG/saIzuIZUf9 DdfF2susgi0GDgiRaOuoukxIkn8GRA/03wpLasld/2DGpqFkqv7ZdB8FKlCDtEKQ6MLnmv+HtXlws ALg1cgZ6Hk1rCda0Wpbr5iB/NqQp3+EooyG4vFVKDdq6b+kRUawpZOpgW3Sm0eMtAVkzzvyn0ZbNB CABGoWUumtluSNma4wqcCJbkGoS4WFGnNjlf+fY3S+Nri05JglzUNzFQspmbnekC450wmXkY5iwHh bWFCDf19tP5Y1Ufe8H3HrDdDo8LW2gmLLrMNnhaB8VoONeyCjkg71Y0rOZewPKcuIO0cMmUjgjpxY GenRwFXTJ/sqLw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:47 +0100 Message-ID: <3459c668f8e6ee0b195f4e1ec8eb437dd3c1ec6c.1732615193.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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 Since ftp://ftp.gnupg.org no longer exists, another updater should be used for packages with code fetched from mirror://gnupg. * guix/gnu-maintenance.scm (gnupg-hosted?): New procedure. (%gnu-ftp-updater): Exclude packages that match ‘gnupg-hosted?’. * guix/download.scm (%mirrors): Remove ftp://ftp.gnupg.org. Change-Id: I653877ad843da60281d3a234acc85743bee64856 --- guix/download.scm | 3 +-- guix/gnu-maintenance.scm | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/guix/download.scm b/guix/download.scm index e37c2195ee..d88ad0ee44 100644 --- a/guix/download.scm +++ b/guix/download.scm @@ -78,8 +78,7 @@ (define %mirrors "ftp://mirrors.dotsrc.org/gcrypt/" "ftp://ftp.heanet.ie/mirrors/ftp.gnupg.org/gcrypt/" "ftp://ftp.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/" - "ftp://ftp.ring.gr.jp/pub/net/gnupg/" - "ftp://ftp.gnupg.org/gcrypt/") + "ftp://ftp.ring.gr.jp/pub/net/gnupg/") (gnome "https://download.gnome.org/" "http://ftp.gnome.org/pub/GNOME/") diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 866b960a4a..b612b11c00 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -1025,15 +1025,19 @@ (define %gnu-updater (false-if-networking-error (gnu-hosted? package)))) (import import-gnu-release))) +(define gnupg-hosted? + (url-prefix-predicate "mirror://gnupg/")) + (define %gnu-ftp-updater ;; This is for GNU packages taken from alternate locations, such as - ;; alpha.gnu.org, ftp.gnupg.org, etc. It is obsolescent. + ;; alpha.gnu.org (ftp.gnupg.org is no longer available). It is obsolescent. (upstream-updater (name 'gnu-ftp) (description "Updater for GNU packages only available via FTP") (pred (lambda (package) (false-if-networking-error (and (not (gnu-hosted? package)) + (not (gnupg-hosted? package)) (pure-gnu-package? package))))) (import import-release*))) From patchwork Tue Nov 26 10:33:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 70998 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 AC90127BBE9; Tue, 26 Nov 2024 10:38:27 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 DAA9427BBE2 for ; Tue, 26 Nov 2024 10:38:25 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFsxJ-0005nJ-Lz; Tue, 26 Nov 2024 05:38:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFsxH-0005kq-R3 for guix-patches@gnu.org; Tue, 26 Nov 2024 05:38:03 -0500 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 1tFsxH-00012p-2j for guix-patches@gnu.org; Tue, 26 Nov 2024 05:38:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=IvFL757UmbVE9HTsId8rEfePRLq4bgwscx0vxswRNgs=; b=qV3lS+1eq8xE/sD2u+srCcErqwB0wQa+WJJrxuTR1ipqJYc8kfcOnWPPuIBnZ7wHUUqMrZ9KMzNy7/XDNaQOvRWhym1Fz9GEAoEiyW1QABck2CSgUUto8YgIpOGdSRwadiixgNlAzKlmFVBdnm4/BVztQhWCCuDyw815JzYt1vmE9+GQQS/t0N90pfM075DUX/rG/Bel+fxWh2ja9jr1FS2HwZsWAVbfxJgLbhECL1wlja200OIysEe8nVPPjk4IwhoPiTgdWdUfhxzA2oP3VwBabRyAR0Ees136gWjva48xcZ/uHeLOCvlezNwlNoN1eE1DsqhGA9BdEVssqPzakg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFsxG-0002hg-TR for guix-patches@gnu.org; Tue, 26 Nov 2024 05:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 09/11] gnu: Update updater properties for GnuPG-related packages. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 10:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173261744510305 (code B ref 74542); Tue, 26 Nov 2024 10:38:02 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:37:25 +0000 Received: from localhost ([127.0.0.1]:46266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFswf-0002g6-5z for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:37:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFswZ-0002fS-HS for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:37:21 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFsuM-0000HR-Gq; Tue, 26 Nov 2024 05:35:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=IvFL757UmbVE9HTsId8rEfePRLq4bgwscx0vxswRNgs=; b=IGCGDH8EW36d4en854L0 j0QFdMau805i4RRnzqygRhEqeTiA6ZdxYAbe5ltZbLFrpsDxIDOj7ZTAFxU3T/nZIFrkbkNKRJVOA 2mH7zok9iPr0dH1Cwh2CvNNzKQXvrZc57HcaV4Tji7nMcnFx7I/PDEFUf3DZ/rGJvNoXPr9yZKOEB THzUQcDX8vRylJuXaJxIwjEDM64CwwAS0olMZoSIEA5irRBSm1r7F4EOBLOmIN6i2V2IQlxAIVBnB E9FhSauDhn840f8CRJVV+bnY9kxuldnXWnkX8UpoV65WgkmGy3Gar/CDo/R4uf315aiBNTC4PA/ut tAEXUKe/889shw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:48 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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/gnupg.scm (libgpg-error)[properties]: Remove. (libgcrypt)[properties]: Remove. (libassuan)[properties]: Remove. (libksba)[properties]: Remove. (npth)[properties]: Remove. (gnupg)[properties]: Remove. (gpgme)[properties]: Remove. (pinentry-tty)[properties]: Change for ‘generic-html’. (gpa)[properties]: Remove. Change-Id: I1eb9d6ad5bb3ecbfbef3d44dbae281a3de7ebac7 --- gnu/packages/gnupg.scm | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 2e97c2244a..3f55ccaf5b 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012-2021, 2023 Ludovic Courtès +;;; Copyright © 2012-2021, 2023, 2024 Ludovic Courtès ;;; Copyright © 2013, 2015, 2018 Andreas Enge ;;; Copyright © 2014, 2018 Eric Bavier ;;; Copyright © 2014, 2015, 2016, 2020 Mark H Weaver @@ -160,9 +160,7 @@ (define-public libgpg-error for all GnuPG components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SmartCard Daemon and possibly more in the future.") - (license license:lgpl2.0+) - (properties '((ftp-server . "ftp.gnupg.org") - (ftp-directory . "/gcrypt/libgpg-error"))))) + (license license:lgpl2.0+))) (define-public libgcrypt (package @@ -217,9 +215,7 @@ (define-public libgcrypt standard cryptographic building blocks such as symmetric ciphers, hash algorithms, public key algorithms, large integer functions and random number generation.") - (license license:lgpl2.0+) - (properties '((ftp-server . "ftp.gnupg.org") - (ftp-directory . "/gcrypt/libgcrypt"))))) + (license license:lgpl2.0+))) (define-public libassuan (package @@ -250,9 +246,7 @@ (define-public libassuan protocol. This protocol is used for IPC between most newer GnuPG components. Both, server and client side functions are provided.") - (license license:lgpl2.0+) - (properties '((ftp-server . "ftp.gnupg.org") - (ftp-directory . "/gcrypt/libassuan"))))) + (license license:lgpl2.0+))) (define-public libksba (package @@ -283,9 +277,7 @@ (define-public libksba "KSBA (pronounced Kasbah) is a library to make X.509 certificates as well as the CMS easily accessible by other applications. Both specifications are building blocks of S/MIME and TLS.") - (license license:gpl3+) - (properties '((ftp-server . "ftp.gnupg.org") - (ftp-directory . "/gcrypt/libksba"))))) + (license license:gpl3+))) (define-public npth (package @@ -307,9 +299,7 @@ (define-public npth In contrast to GNU Pth is is based on the system's standard threads implementation. This allows the use of libraries which are not compatible to GNU Pth.") - (license (list license:lgpl3+ license:gpl2+)) ; dual license - (properties '((ftp-server . "ftp.gnupg.org") - (ftp-directory . "/gcrypt/npth"))))) + (license (list license:lgpl3+ license:gpl2+)))) ;dual license (define-public gnupg (package @@ -404,9 +394,7 @@ (define-public gnupg servers. It includes several libraries: libassuan (IPC between GnuPG components), libgpg-error (centralized GnuPG error values), and libskba (working with X.509 certificates and CMS data).") - (license license:gpl3+) - (properties '((ftp-server . "ftp.gnupg.org") - (ftp-directory . "/gcrypt/gnupg"))))) + (license license:gpl3+))) (define-public gnupg-1 (package (inherit gnupg) @@ -463,9 +451,7 @@ (define-public gpgme programming task, it is suggested that all software should try to use GPGME instead. This way bug fixes or improvements can be done at a central place and every application benefits from this.") - (license license:lgpl2.1+) - (properties '((ftp-server . "ftp.gnupg.org") - (ftp-directory . "/gcrypt/gpgme"))))) + (license license:lgpl2.1+))) (define-public gpgme-1.23 (hidden-package @@ -886,9 +872,9 @@ (define-public pinentry-tty "Pinentry provides a console that allows users to enter a passphrase when @code{gpg} is run and needs it.") (license license:gpl2+) - (properties '((ftp-server . "ftp.gnupg.org") - (ftp-directory . "/gcrypt/pinentry") - (upstream-name . "pinentry"))))) + (properties + '((release-monitoring-url . "https://gnupg.org/ftp/gcrypt/pinentry/") + (upstream-name . "pinentry"))))) (define-public pinentry-emacs (package @@ -1134,9 +1120,7 @@ (define-public gpa "GPA, the GNU Privacy Assistant, is a graphical user interface for @uref{https://gnupg.org, GnuPG}. It can be used to encrypt, decrypt, and sign files, to verify signatures, and to manage the private and public keys.") - (license license:gpl3+) - (properties '((ftp-server . "ftp.gnupg.org") - (ftp-directory . "/gcrypt/gpa"))))) + (license license:gpl3+))) (define-public parcimonie (package From patchwork Tue Nov 26 10:33:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 70996 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 AA0BC27BBEA; Tue, 26 Nov 2024 10:38:07 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 73B3427BBE2 for ; Tue, 26 Nov 2024 10:38:07 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFsxI-0005lJ-9e; Tue, 26 Nov 2024 05:38:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFsxH-0005kj-5F for guix-patches@gnu.org; Tue, 26 Nov 2024 05:38:03 -0500 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 1tFsxG-00012Z-JF; Tue, 26 Nov 2024 05:38:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=CoGqDz0fxhwpk2Eg8ySDIRaRYGrkmNVQjcD8SsCnGXY=; b=sHBLNI6tzv2jwYDIunmsgyxvGjwH7Ma1v8BbzxJhCzOlspKxSpJB0xEwsETm0VkSMsYObZhabzaHPK9Kj8TRimgvhoOCJ2nPjwpQKJneR0acxT4umHKxewIyC/dsLS5pe8KfyfL72xpkIQ+jX8bVZCioptckAF0o6RHSaAezDEr7QQcD0daYhYT4x/X4jhtH5VeEHKU3avpi2L6Kb3nLRIUe+ridlvE8Pe+48TRnq5UKNbD1yhUnVc5TnUU0iTmkAOcLdR2kKKaJ2J7AnJTF7GcQZlq1+CMKBRmY8JqlwruP6Yu2B2bRzBli7cbbNmSBgmyVmZIoquQB1CKK4E1umQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFsxG-0002hW-D7; Tue, 26 Nov 2024 05:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 10/11] guix build: Validate that the file passed to =?utf-8?b?4oCYLW3igJk=?= returns a manifest. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 10:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173261744210287 (code B ref 74542); Tue, 26 Nov 2024 10:38:02 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:37:22 +0000 Received: from localhost ([127.0.0.1]:46264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFswb-0002fm-MP for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:37:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFswa-0002fU-Ce for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:37:20 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFsuO-0000Sb-2h; Tue, 26 Nov 2024 05:35:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=CoGqDz0fxhwpk2Eg8ySDIRaRYGrkmNVQjcD8SsCnGXY=; b=nvsuCe7PDLUBiV2D+pS7 iVfKwwL3hwsUKIGOBDSdBaWu1fJVfQFyRvWcByBMh2feqnthEDgXdS/YA+Y64s03x+YIPd6YaDiSk gY6ynlsgWupQAPGmvj6RvuUTSOuRA8eBl1K620ljv6EHc8VCDbSk9z6wjTmbAOJNB61GMrNGPa0GU vo0mdxGGAnRHWTs6Liej5djHcQrIcnUgDP91xYZgKwBzz4aps5JdyuLibLYVx6NEo0RshC6BhT6A7 kBwYGlKL3bUBoLj9ZDT5IsFWP1i353tmlxPLY3cIA81jjqMgMGEym48eaaqNtB115/U6a0Q6pxnQR QV7OydSiuL6DaQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:49 +0100 Message-ID: <5f26bd9db3ae03117474be2ec678d8dc72695102.1732615193.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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/scripts/build.scm (options->things-to-build)[ensure-manifest]: New procedure. Use it. Change-Id: If64c483d7079f441a296d5bd4e06e67f44cbb7bf --- guix/scripts/build.scm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 565bfd48e9..1b0b006ad5 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -629,6 +629,12 @@ (define-public my-package (for-each validate-type lst) lst)) + (define (ensure-manifest x file) + (unless (manifest? x) + (raise (formatted-message (G_ "file '~a' does not return a manifest") + file))) + x) + (define system (or (assoc-ref opts 'system) (%current-system))) @@ -699,9 +705,11 @@ (define-public my-package (loop tail 'regular (append (map manifest-entry-item (manifest-entries - (load* manifest - (make-user-module '((guix profiles) - (gnu)))))) + (ensure-manifest + (load* manifest + (make-user-module '((guix profiles) + (gnu)))) + manifest))) result))) (('expression . str) (loop tail 'regular From patchwork Tue Nov 26 10:33:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 70997 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 4786A27BBEA; Tue, 26 Nov 2024 10:38:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 A276427BBE2 for ; Tue, 26 Nov 2024 10:38:10 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFsxL-0005pJ-71; Tue, 26 Nov 2024 05:38:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFsxJ-0005n8-Ei for guix-patches@gnu.org; Tue, 26 Nov 2024 05:38:05 -0500 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 1tFsxJ-00013M-4m; Tue, 26 Nov 2024 05:38:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=yrwyfajQUwJrMTFkU5RfFAhrmVeKfBlbsu7ncWd18mg=; b=XyqrS2pB39b1qxTGclQHHC3fphleS+2qqRzbuCPrnw01ktBbUt+ujDwhHElCWITFsQ0BIHvRud0ASVzYG2CvmizX1fu/87cl/OTqfsLQ/o1dy27eb+b49jNm2wcgXr5FWOtfgdr/FKKQUyR6MCQt9FpmNTkk9CtuZJAPoAU62/nkbPZRkP5MXDQMnVIShB5bR25JLV13wLRxmnS82mZ+KWlWpzEuHlUZOfpwz79Vydeq1QJVunNhIO5nmNi3CVP6pWslGmQAhp0Kp+24/EX4ctmFkNIZ3Q0OBGBnQPS11HhJJZDiVrOrvxyZovrkJF3RvR0HDerw+U08umWmkBKIiQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tFsxH-0002hq-Ew; Tue, 26 Nov 2024 05:38:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH 11/11] etc: Add upgrade manifest. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Tue, 26 Nov 2024 10:38:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic Court?s , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173261744610311 (code B ref 74542); Tue, 26 Nov 2024 10:38:03 +0000 Received: (at 74542) by debbugs.gnu.org; 26 Nov 2024 10:37:26 +0000 Received: from localhost ([127.0.0.1]:46268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFswf-0002gA-QL for submit@debbugs.gnu.org; Tue, 26 Nov 2024 05:37:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60934) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tFswa-0002fT-Cj for 74542@debbugs.gnu.org; Tue, 26 Nov 2024 05:37:21 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFsuO-0000T1-UX; Tue, 26 Nov 2024 05:35:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=yrwyfajQUwJrMTFkU5RfFAhrmVeKfBlbsu7ncWd18mg=; b=LAwWxWginKDqJiGf/Z1x cqZChG+xLhIFWcDgPxi7/kpiR8CSXnL+ayBcykUlvbdaHMJaRcDNZ1Ja0v15sIeECMIkd5CyM3PZC XczeVxQTgC4smlbLDwyZvqWNvNk+Zx/JXZvMlbeGfGvpn+BsBl9tNnremu+PRtfID2OIkUsIFwVsg BEdvLvXlMPdH3CU6qEKxYm5z9SX6jrX943HElZVE/tKXj1mUWQhdNQgtWfQJon5tS8KoXO8/I7nsk W1HwTmdHKQwd8B3wXQ+bdhHe1a2ECDDSQGjvQmwTMJUZaI0odKHI6alao5bqj8a4XkYCg80GBAwTK pShqp4dPyWesIA==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 26 Nov 2024 11:33:50 +0100 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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/scripts/build.scm (dependents): Export. * etc/upgrade-manifest.scm: New file. * Makefile.am (EXTRA_DIST): Add it. Change-Id: I1b2a2ebd09e559c68da9f25772bf33caacb4c031 --- Makefile.am | 1 + etc/upgrade-manifest.scm | 98 ++++++++++++++++++++++++++++++++++++++++ guix/scripts/build.scm | 2 + 3 files changed, 101 insertions(+) create mode 100644 etc/upgrade-manifest.scm diff --git a/Makefile.am b/Makefile.am index e94ba87797..0cff32c607 100644 --- a/Makefile.am +++ b/Makefile.am @@ -743,6 +743,7 @@ EXTRA_DIST += \ etc/source-manifest.scm \ etc/system-tests.scm \ etc/time-travel-manifest.scm \ + etc/upgrade-manifest.scm \ scripts/guix.in \ tests/cve-sample.json \ tests/keys/civodul.pub \ diff --git a/etc/upgrade-manifest.scm b/etc/upgrade-manifest.scm new file mode 100644 index 0000000000..6dd605ef03 --- /dev/null +++ b/etc/upgrade-manifest.scm @@ -0,0 +1,98 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Ludovic Courtès +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +;; This manifest computes upgrades of key packages using the 'with-latest' +;; package transformation. + +(use-modules (guix monads) + (guix graph) + (guix packages) + (guix profiles) + (guix store) + (guix transformations) + ((guix scripts build) #:select (dependents)) + ((guix scripts graph) #:select (%bag-node-type)) + ((guix import github) #:select (%github-api)) + (guix build-system gnu) + (guix build-system cmake) + ((gnu packages) #:select (all-packages)) + (ice-9 match) + (srfi srfi-1)) + +;; Bypass the GitHub updater: we'd need an API token or we would hit the rate +;; limit. +(%github-api "http://example.org") + +(define (leaf-packages) + (with-store store + (run-with-store store + (mlet %store-monad ((edges (node-back-edges %bag-node-type (all-packages)))) + (return (filter (lambda (package) + (null? (edges package))) + (all-packages))))))) + +(define security-packages + '("git" "git-minimal" + "xorg-server" + "elogind" + "openssl" + "gnutls" + "libarchive" + "libgit2" + "libssh" + + ;; GnuPG. + "libassuan" + "libgpg-error" + "libgcrypt" + "libksba" + "npth" + "gnupg" + "gpgme" + "pinentry")) + +(define security-upgrades + ;; Upgrades of individual packages with their dependents built against that + ;; upgrade. + (manifest + (with-store store + (append-map (match-lambda + ((package . output) + (let* ((name (package-name package)) + (latest (options->transformation + `((with-latest . ,name))))) + (map (lambda (package) + (manifest-entry + (inherit (package->manifest-entry + (latest (pk 'latest package)))) + (name (string-append (package-name package) + "-with-latest-" name)))) + (dependents store (list package) 2))))) + (specifications->packages security-packages))))) + +(define leaf-package-updates + ;; Select a subset (~22%) of all the leaf packages, typically small C/C++ + ;; packages not part of a bigger "collection" or repo (CRAN, PyPI, etc.). + (manifest + (filter-map (lambda (package) + (and (memq (package-build-system package) + (list gnu-build-system cmake-build-system)) + (package-with-upstream-version (pk 'up package)))) + (leaf-packages)))) + +(concatenate-manifest (list leaf-package-updates security-upgrades)) diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 1b0b006ad5..ddebcaf743 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -63,6 +63,8 @@ (define-module (guix scripts build) show-cross-build-options-help show-native-build-options-help + dependents + guix-build register-root register-root*)) From patchwork Fri Nov 29 09:40:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 71174 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 003F327BBEB; Fri, 29 Nov 2024 09:43:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 C63CE27BBE2 for ; Fri, 29 Nov 2024 09:43:24 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGxWO-0000sJ-Oe; Fri, 29 Nov 2024 04:42:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGxWF-0000kc-1H for guix-patches@gnu.org; Fri, 29 Nov 2024 04:42:35 -0500 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 1tGxVq-0004aN-8m; Fri, 29 Nov 2024 04:42:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=daye11wnh0O2WBRGlTnRr0RWCL+zd3LG/X6f+lWkhIo=; b=Thn8mG5aNC3iwFLCXXsTw9RXGNsCsgo5ocFtEfnYTJT9GyvoCEYyyhFUilggaPtEK7+/SrJcSYNopXmmawgkFSN2vcFXrG7kgJfOVvKFQX2sccwxV1QdYEyW8tFFLAHVCWuIp+M6hzvtEUK9e+OvLTJrteEnQiNM2Vm5wNwb3zpMg6TEoxnHSpE2RDXqKRmjCodcAeqP6ZdkRqEBwnVyUCYTWddX+Cwe2srUl4Vv7joB89qe/ZcVayDvbMddTNAUUyocTdDrkTyWV6ANPUBG+5f9yXxoo+Hxr1tjCl9ZnrPTe1VP7Jc90d71hkETXSQJMo27JmVzuWrnFpVpNMjY6Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tGxVo-0005xl-5c; Fri, 29 Nov 2024 04:42:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH v2 12/16] gnu-maintenance: =?utf-8?b?4oCYZ2Vu?= =?utf-8?b?ZXJpYy1odG1s4oCZ?= update honors . Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 29 Nov 2024 09:42:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173287328722729 (code B ref 74542); Fri, 29 Nov 2024 09:42:08 +0000 Received: (at 74542) by debbugs.gnu.org; 29 Nov 2024 09:41:27 +0000 Received: from localhost ([127.0.0.1]:41075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGxV9-0005uQ-Am for submit@debbugs.gnu.org; Fri, 29 Nov 2024 04:41:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGxUp-0005r9-3x for 74542@debbugs.gnu.org; Fri, 29 Nov 2024 04:41:07 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGxUj-0003rH-Tb; Fri, 29 Nov 2024 04:41:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=daye11wnh0O2WBRGlTnRr0RWCL+zd3LG/X6f+lWkhIo=; b=dRMqrzHFyi2MCv8s97lO 0KmUJsi9G/9tyJFIfdXCWxue0AW37qDO8s8vmOdAlNAaf+FEBUvJ9F14rc4BnBWDyvDHhEw+1rjMV AbFZyW3+UBnBuwwc6bnPDgFTW7ETPJDzb8ZFJfoFRQmYzOXRrb00Pv8nhw9MQV2kB+Fp2SmZnbz4U MftlurQ91tFW1Y2BuZilB7UNl110kS58bxO28QTHD0LN1xYL6TNagjmPv+D2qUWgZTDD6TL3C6Gyn 9i2Dpl0bfqEHK0EuzJtQTXeJy5uQRsf9TppfAF4z8wzDp9mrhi8/XKNwI2i7aJhjDdfxnmYpfGInw 0bY1Q5oj8Q4l1g==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 29 Nov 2024 10:40:15 +0100 Message-ID: <112b57b3d8cf1208f3390602dfab6932fac7c505.1732872499.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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 fixes updates of ‘curl’: includes in its head and ignoring it would lead to incorrect download URLs. * guix/gnu-maintenance.scm (html-links): Keep track of in ‘loop’. Rewrite relative links at the end. Change-Id: I989da78df3431034c9a584f8e10cad87ae6dc920 --- guix/gnu-maintenance.scm | 41 +++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index b612b11c00..ee4882326f 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -39,6 +39,7 @@ (define-module (guix gnu-maintenance) #:use-module (guix utils) #:use-module (guix diagnostics) #:use-module (guix i18n) + #:autoload (guix combinators) (fold2) #:use-module (guix memoization) #:use-module (guix records) #:use-module (guix upstream) @@ -483,19 +484,33 @@ (define* (import-release* package #:key (version #f)) (define (html-links sxml) "Return the list of links found in SXML, the SXML tree of an HTML page." - (let loop ((sxml sxml) - (links '())) - (match sxml - (('a ('@ attributes ...) body ...) - (match (assq 'href attributes) - (#f (fold loop links body)) - (('href url) (fold loop (cons url links) body)))) - ((tag ('@ _ ...) body ...) - (fold loop links body)) - ((tag body ...) - (fold loop links body)) - (_ - links)))) + (define-values (links base) + (let loop ((sxml sxml) + (links '()) + (base #f)) + (match sxml + (('a ('@ attributes ...) body ...) + (match (assq 'href attributes) + (#f (fold2 loop links base body)) + (('href url) (fold2 loop (cons url links) base body)))) + (('base ('@ ('href new-base))) + ;; The base against which relative URL paths must be resolved. + (values links new-base)) + ((tag ('@ _ ...) body ...) + (fold2 loop links base body)) + ((tag body ...) + (fold2 loop links base body)) + (_ + (values links base))))) + + (if base + (map (lambda (link) + (let ((uri (string->uri link))) + (if (or uri (string-prefix? "/" link)) + link + (in-vicinity base link)))) + links) + links)) (define (url->links url) "Return the unique links on the HTML page accessible at URL." From patchwork Fri Nov 29 09:40:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 71170 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 43B9627BBEA; Fri, 29 Nov 2024 09:43:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 1121E27BBE2 for ; Fri, 29 Nov 2024 09:43:10 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGxWO-0000s7-FX; Fri, 29 Nov 2024 04:42:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGxVp-0000fm-62 for guix-patches@gnu.org; Fri, 29 Nov 2024 04:42:14 -0500 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 1tGxVo-0004a9-RS; Fri, 29 Nov 2024 04:42:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=HB1jDZjF+USzml5XD8PWIalZQ2+ZvjbRkFumUMAyKv4=; b=VOoinOIANAPufpNNniVbsyyvKhIBFSJCaMSXSY2tUqu2GUOscvRO58jiU+SWJAX95bR6NXuPN/u8juJNjJlP9QYt8fKeBQ27MmEpx5HvBDCwjUpp5r8w5Tu37Uuto3heEweMMm8P8OtJEAVPbhyZDrGUS7ypf+ZX+j2VFqb9fq70JLj9/ZMiW36BBk93gJkimcnsV20h1WWXrcQeqIi79ji+87YKaX1iIZMAvez0Dhz4JCobpw5nZcNgfnFTrMqLeTAYRlyMD7YL4DJ7zw13X39Qp43MaNNhWvozfKzpQjq1zrVddr8U7CW9tCHQ6IriU0YLNlXdZpQMi3fhEV+oKQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tGxVo-0005xu-L9; Fri, 29 Nov 2024 04:42:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH v2 13/16] guix build: Validate that the file passed to =?utf-8?b?4oCYLW3igJk=?= returns a manifest. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 29 Nov 2024 09:42:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173287328822736 (code B ref 74542); Fri, 29 Nov 2024 09:42:08 +0000 Received: (at 74542) by debbugs.gnu.org; 29 Nov 2024 09:41:28 +0000 Received: from localhost ([127.0.0.1]:41077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGxV9-0005uY-Pw for submit@debbugs.gnu.org; Fri, 29 Nov 2024 04:41:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGxUq-0005rN-3O for 74542@debbugs.gnu.org; Fri, 29 Nov 2024 04:41:08 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGxUk-0003tg-N8; Fri, 29 Nov 2024 04:41:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=HB1jDZjF+USzml5XD8PWIalZQ2+ZvjbRkFumUMAyKv4=; b=U/huP6mwtHN+zB3VJ+P8 k33a9OvUE1B426y6uJEOloyYaHDLPpt/LyYrpGWZyyUxAzbIOZ0gFuBKdu1l/bh0xRHjYDw5ZkknV 2pEAxudoSL1j8gjXZ0F3VuMPY+4apTV9VrZ8GAjN02ABWOwHEd974hTPGusJFh5GjPELyD3sCxGxf GWzAIdrSDDgs58BoD68fN3u0+GKhGTb5XQh89w27ElTppqnDFOTjmT8aAUeWfzSDPsq+v3kC9GgSI xzX8y8oXApGMEi7e7n3Y+rdmTyKcIccvkRwJhFZmD5smTtspSh7GYhm9GjmJIKwpCfFXxIhVcCrT6 1sOsM7chFCHrzw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 29 Nov 2024 10:40:16 +0100 Message-ID: <3226de68aaff509d5e38e2344cf428cf27e68aab.1732872499.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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/scripts/build.scm (options->things-to-build)[ensure-manifest]: New procedure. Use it. Change-Id: If64c483d7079f441a296d5bd4e06e67f44cbb7bf --- guix/scripts/build.scm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 5c93dc78f8..d1368f7e48 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -629,6 +629,12 @@ (define-public my-package (for-each validate-type lst) lst)) + (define (ensure-manifest x file) + (unless (manifest? x) + (raise (formatted-message (G_ "file '~a' does not return a manifest") + file))) + x) + (define system (or (assoc-ref opts 'system) (%current-system))) @@ -701,9 +707,11 @@ (define-public my-package (loop tail 'regular (append (map manifest-entry-item (manifest-entries - (load* manifest - (make-user-module '((guix profiles) - (gnu)))))) + (ensure-manifest + (load* manifest + (make-user-module '((guix profiles) + (gnu)))) + manifest))) result))) (('expression . str) (loop tail 'regular From patchwork Fri Nov 29 09:40:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 71169 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 C886527BBEA; Fri, 29 Nov 2024 09:43:08 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 4895A27BBE2 for ; Fri, 29 Nov 2024 09:43:08 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGxWS-0000uM-UX; Fri, 29 Nov 2024 04:42:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGxWF-0000kd-2m for guix-patches@gnu.org; Fri, 29 Nov 2024 04:42:37 -0500 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 1tGxVq-0004aM-12; Fri, 29 Nov 2024 04:42:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=8mPyDNRRzYPXx/ZHBp28evdnsI7YwlIPsD3iNYPaD7c=; b=cqfTbGalUugeiwVfP2XUl5deVSfG9YcoyV0tizv+KQD8qiZVWpnU/Q7ptfiJ7FmfdMqtXJ7O/LuAw1RzVegJFMGBJoEVgfuuXIkQGEdGMO4DsOuZ2JXK3IlJ2hF+bCKMyJvf7CAdaQVtXEPRBwK6UDd3Qm69/NDH0LCv4/haqczaDlD9s6gntXX8IRzwJsMG0RQ6cNMX4+5a3P6crdL06pBK3sG1t9sUSGRMD5jRx9RcRhdtdgSBccA4865/tC4tQ2CRW5yH4/58TPyOm8jdUm/BeMDSuSz3d4TBfCv8KgU8e9H4xMgs2p/2yRQZ6Ok9+jfXY1LMlJpKvu1vTBNZQQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tGxVp-0005y3-5R; Fri, 29 Nov 2024 04:42:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH v2 14/16] transformations: =?utf-8?q?=E2=80=98pa?= =?utf-8?q?ckage-with-upstream-version=E2=80=99?= can preserve patches. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 29 Nov 2024 09:42:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173287328822743 (code B ref 74542); Fri, 29 Nov 2024 09:42:09 +0000 Received: (at 74542) by debbugs.gnu.org; 29 Nov 2024 09:41:28 +0000 Received: from localhost ([127.0.0.1]:41079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGxVA-0005uf-9u for submit@debbugs.gnu.org; Fri, 29 Nov 2024 04:41:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGxUq-0005rR-Nf for 74542@debbugs.gnu.org; Fri, 29 Nov 2024 04:41:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGxUl-0003ve-HH; Fri, 29 Nov 2024 04:41:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=8mPyDNRRzYPXx/ZHBp28evdnsI7YwlIPsD3iNYPaD7c=; b=XwJMEH3PZJ3SgRPumqDq KCdG5Pd0aq5E0AEbvffT/Kmfc/0Of29kKIEqkORxKkbtaMPTHmJLxi0ic44QT+GJtzUBjLNQwh8st j4bR5hzeDZrRagu2kf03gbIKpGoq4Dt6j2CQ3e8RF80SkRxZFEINg7JUJN8eGtW/NjzAH6P8pg1u2 N7UPfEXQlf5oIf1bS2DNhxZ4qYDStyEdDppd0iw7vLzA3L9suYf0NlOmDv8Du7tpRqs4kv5b/gNAy d5XGsEc6jCmLkcQJaIx0YalttKoqDQ6x7RPdbUclo1MvLHG/WIms3hWAsjLtPoAk7VjsdH01LpybY Y51CZvcVtBVOCQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 29 Nov 2024 10:40:17 +0100 Message-ID: <16a63273fb59de165d2908bd370e9314b757d13f.1732872499.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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/transformations.scm (upstream-fetch): New procedure. (package-with-upstream-version): Add #:preserve-patches? and honor it. Change-Id: Ib56b84957d8bdad2eebe2551e2a6e477506fc55e --- guix/transformations.scm | 25 ++++++++++++++++++++++--- tests/transformations.scm | 31 ++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/guix/transformations.scm b/guix/transformations.scm index 9dfc4402c5..a32aad39f2 100644 --- a/guix/transformations.scm +++ b/guix/transformations.scm @@ -848,9 +848,20 @@ (define (transform-package-patches specs) (rewrite obj) obj))) -(define* (package-with-upstream-version p #:optional version) +(define* (upstream-fetch source hash-algo hash + #:optional name + #:key (system (%current-system)) + (guile (default-guile)) + executable?) + "This origin method simply downloads SOURCE, an record." + (lower-object source system)) + +(define* (package-with-upstream-version p #:optional version + #:key (preserve-patches? #f)) "Return package P changed to use the given upstream VERSION or, if VERSION -is #f, the latest known upstream version." +is #f, the latest known upstream version. When PRESERVE-PATCHES? is true, +preserve patches and snippets found in the source of P, provided it's an +origin." (let ((source (package-latest-release p #:version version))) (cond ((not source) (if version @@ -885,7 +896,15 @@ (define* (package-with-upstream-version p #:optional version) (package (inherit p) (version (upstream-source-version source)) - (source source)))))) + (source (if (and preserve-patches? + (origin? (package-source p))) + ;; Inherit P's origin so snippets and patches are + ;; applied as if we had run 'guix refresh -u'. + (origin + (inherit (package-source p)) + (method upstream-fetch) + (uri source)) + source))))))) (define (transform-package-latest specs) "Return a procedure that rewrites package graphs such that those in SPECS diff --git a/tests/transformations.scm b/tests/transformations.scm index 755211d65d..5285d98f17 100644 --- a/tests/transformations.scm +++ b/tests/transformations.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016-2017, 2019-2023 Ludovic Courtès +;;; Copyright © 2016-2017, 2019-2024 Ludovic Courtès ;;; Copyright © 2021 Marius Bakke ;;; ;;; This file is part of GNU Guix. @@ -497,6 +497,35 @@ (define* (depends-on-toolchain? p #:optional (toolchain "gcc-toolchain")) (let ((new (t coreutils))) (assq-ref (package-properties new) 'transformations)))) +(test-equal "package-with-upstream-version" + '("42.0" "42.0" + ("http://example.org") + ("a" "b") (do something)) + (mock ((guix upstream) %updaters + (delay (list (upstream-updater + (name 'dummy) + (pred (const #t)) + (description "") + (import (const (upstream-source + (package "foo") + (version "42.0") + (urls '("http://example.org"))))))))) + (let* ((old (dummy-package "foo" (version "1.0") + (source (dummy-origin + (patches '("a" "b")) + (snippet '(do something)))))) + (new (package-with-upstream-version old)) + (new+patches (package-with-upstream-version + old #:preserve-patches? #t))) + (list (package-version new) (package-version new+patches) + + ;; Source of NEW is directly an . + (upstream-source-urls (package-source new)) + + ;; Check that #:preserve-patches? #t gave us an origin. + (origin-patches (package-source new+patches)) + (origin-snippet (package-source new+patches)))))) + (test-equal "options->transformation, with-latest" "42.0" (mock ((guix upstream) %updaters From patchwork Fri Nov 29 09:40:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 71168 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 31FF627BBEC; Fri, 29 Nov 2024 09:43:04 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 E2EC027BBE2 for ; Fri, 29 Nov 2024 09:43:03 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGxWS-0000ts-Lo; Fri, 29 Nov 2024 04:42:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGxWF-0000kf-3S for guix-patches@gnu.org; Fri, 29 Nov 2024 04:42:37 -0500 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 1tGxVr-0004aT-BX; Fri, 29 Nov 2024 04:42:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=exqb2JyVM9pf15rsNsmXF+soeRzoQH8Jd+LNl81XjUA=; b=ARdrRUvezSU69kb9kb/WzsZbxX23QZs7V5kyRm5ZEhnvXr+0CeEAeNTeTp345nkqs2EcEiZj9bnM8SST0Lf2s4NR8BZxJPDC16LFdroIeyjb3uKSxqPPh/lNmbZhUDYtfo8yNW7ikgGa/fj8a0b/x9qu2nzbIhi3xzSkjhl15bFNi+J/t/RhKIaknkozMVJw/zVYpAi/YeICpEZBrAovucldzvTG5ltADVC9F5ZvERe6BnzIKx+llQkA2flu57uVngfw5xWNU7t5sRqub+J8CGkMyoKahXE9YTGi94fv32z5YbAWpHOD3sg0zWMUnvhsjwqIxNFFS80VydhNlwlggQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tGxVp-0005yE-Kb; Fri, 29 Nov 2024 04:42:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH v2 15/16] transformations: Add #:authenticate? to =?utf-8?b?4oCYcGFja2FnZS13aXRoLXVwc3RyZWFtLXZlcnNpb27igJku?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 29 Nov 2024 09:42:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173287328922751 (code B ref 74542); Fri, 29 Nov 2024 09:42:09 +0000 Received: (at 74542) by debbugs.gnu.org; 29 Nov 2024 09:41:29 +0000 Received: from localhost ([127.0.0.1]:41081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGxVA-0005ur-TB for submit@debbugs.gnu.org; Fri, 29 Nov 2024 04:41:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGxUr-0005rq-IE for 74542@debbugs.gnu.org; Fri, 29 Nov 2024 04:41:10 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGxUm-0003w8-Bm; Fri, 29 Nov 2024 04:41:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=exqb2JyVM9pf15rsNsmXF+soeRzoQH8Jd+LNl81XjUA=; b=JXepLYV7O5i14nOeK4Jk sTklviNvk5T4T0vekEDkwwgzHv9s9MjjrAjP2iZKUthI4Mb+Whjeptl4SACI4PjYczcwvsIuS8Pa6 r1y5XnmBuitPcQl7aOSmcPVN8G53iXwU2ATM0XLRqRY8CIoRgAWanBpbw+0GJnzL4fDOgW2/i/y70 22RJujkcFh/FMGH6fZAxXCzLjt2x1i1Bkde8qYoWwcDAe9qOhKz5hCwQQwfUpjJTNcxEC909NJzJM zmhcZEnt8O7RTksQPNKP4EipoN++vJbIMcBywPFK0PQltqBt5+c5S175EkfOrxfrVT5Ds1rB7Z9RX JcsGSV7vwTL2oQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 29 Nov 2024 10:40:18 +0100 Message-ID: <59a90dbf5692b02d31b8bbc4ee86b93880475cfc.1732872499.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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/transformations.scm (upstream-source-without-signatures): New procedures. (package-with-upstream-version): Add #:authenticate? and honor it. Change-Id: Ib86feb765f57bc1b129e813780abc605c43ed97b --- guix/transformations.scm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/guix/transformations.scm b/guix/transformations.scm index a32aad39f2..3f7d20beaa 100644 --- a/guix/transformations.scm +++ b/guix/transformations.scm @@ -31,7 +31,8 @@ (define-module (guix transformations) #:autoload (guix download) (download-to-store) #:autoload (guix git-download) (git-reference? git-reference-url) #:autoload (guix git) (git-checkout git-checkout? git-checkout-url) - #:autoload (guix upstream) (package-latest-release + #:autoload (guix upstream) (upstream-source + package-latest-release upstream-source-version upstream-source-signature-urls) #:autoload (guix cpu) (current-cpu @@ -856,13 +857,24 @@ (define* (upstream-fetch source hash-algo hash "This origin method simply downloads SOURCE, an record." (lower-object source system)) +(define (upstream-source-without-signatures source) + "Return SOURCE with #f as its 'signature-urls' field." + (upstream-source (inherit source) + (signature-urls #f))) + (define* (package-with-upstream-version p #:optional version - #:key (preserve-patches? #f)) + #:key + (preserve-patches? #f) + (authenticate? #t)) "Return package P changed to use the given upstream VERSION or, if VERSION is #f, the latest known upstream version. When PRESERVE-PATCHES? is true, preserve patches and snippets found in the source of P, provided it's an -origin." - (let ((source (package-latest-release p #:version version))) +origin. When AUTHENTICATE? is false, disable OpenPGP signature verification +of upstream source code." + (let ((source (and=> (package-latest-release p #:version version) + (if authenticate? + identity + upstream-source-without-signatures)))) (cond ((not source) (if version (warning From patchwork Fri Nov 29 09:40:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 71165 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 3E3C227BBEC; Fri, 29 Nov 2024 09:43:00 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 044F127BBE2 for ; Fri, 29 Nov 2024 09:42:59 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGxWQ-0000sm-IC; Fri, 29 Nov 2024 04:42:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGxWF-0000ke-3p for guix-patches@gnu.org; Fri, 29 Nov 2024 04:42:37 -0500 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 1tGxVr-0004aW-Jk; Fri, 29 Nov 2024 04:42:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=BLU0AjlNhxfzkeV9f0SFoNZYGxXI16nFBD9qccLJFTM=; b=Pe+h9pm0RBNxU3W1Qu7gnIdZ7VTTYekl76qj5/dwZa1F1hRd9yjdW+o8HE116tCKJA3HH8ku5gEiqL2eaKL5pI8egXpWBYx6DD7SfuFGYFJn6/F4uFobxrFOzrO6w923H4CXflYAn3H3cVJ/CbYzSKKyaBSVtIhD3WvBAYnaV5e1Wxep/XaWN0lvDskrWCp5Qi9nZQsl7HY56TjGmzstRdLfEHMe6hNFdkrGUVP0H94Dr9lEHwZp2QXIwepOF9+JBXeSrKsGJ1MZnSMdXTRjqJK4LT95ouu4mhnvMoBLqcobzOHam6B1op0mWJ3Wu/iMdSCvqxwkepzMyp1W9z2/eA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tGxVq-0005yP-4L; Fri, 29 Nov 2024 04:42:10 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74542] [PATCH v2 16/16] etc: Add upgrade manifest. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 29 Nov 2024 09:42:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74542 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74542@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 74542-submit@debbugs.gnu.org id=B74542.173287329022758 (code B ref 74542); Fri, 29 Nov 2024 09:42:10 +0000 Received: (at 74542) by debbugs.gnu.org; 29 Nov 2024 09:41:30 +0000 Received: from localhost ([127.0.0.1]:41083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGxVB-0005uu-9Z for submit@debbugs.gnu.org; Fri, 29 Nov 2024 04:41:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tGxUs-0005ry-AV for 74542@debbugs.gnu.org; Fri, 29 Nov 2024 04:41:11 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tGxUn-0003wG-4C; Fri, 29 Nov 2024 04:41:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=BLU0AjlNhxfzkeV9f0SFoNZYGxXI16nFBD9qccLJFTM=; b=Po0NIcftSm/U1dBzhdr6 AkaRdNpGjBVEs93WA8qMXF6Ay+FMFtqxyKc/LTmpJ4pQYA4brKaQ0ZTguNbKq852ozguYNaBi49ZW fADz3GjgHvcdcOevUlY7egfEKMqnCDQn92BBYd+KQ/ALJHOXeXMQ6Z2F73cZZMLbFJlnvga8hNg9t 9JdnBxuXLcJ3BBmZU5dW4BFQb4SdOboAqzw2EzMVtMTZQBeiRr3nqKZXbachbtiGCwz0aGUnvRls9 EPsSmNinhAADJQyNORlBKJhiCutlbW+SU3uJnGNeSV9PAKL+PeAEVqaHdGBg9C16f96+Eu7vOW56i Z/18fUCNhc1NTw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 29 Nov 2024 10:40:19 +0100 Message-ID: <11eaf63e70243255682cb325b8781dcb28841b7c.1732872499.git.ludo@gnu.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: 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/scripts/build.scm (dependents): Export. * etc/upgrade-manifest.scm: New file. * Makefile.am (EXTRA_DIST): Add it. Change-Id: I1b2a2ebd09e559c68da9f25772bf33caacb4c031 --- Makefile.am | 1 + etc/upgrade-manifest.scm | 128 +++++++++++++++++++++++++++++++++++++++ guix/scripts/build.scm | 2 + 3 files changed, 131 insertions(+) create mode 100644 etc/upgrade-manifest.scm diff --git a/Makefile.am b/Makefile.am index e94ba87797..0cff32c607 100644 --- a/Makefile.am +++ b/Makefile.am @@ -743,6 +743,7 @@ EXTRA_DIST += \ etc/source-manifest.scm \ etc/system-tests.scm \ etc/time-travel-manifest.scm \ + etc/upgrade-manifest.scm \ scripts/guix.in \ tests/cve-sample.json \ tests/keys/civodul.pub \ diff --git a/etc/upgrade-manifest.scm b/etc/upgrade-manifest.scm new file mode 100644 index 0000000000..5e6d7d85e4 --- /dev/null +++ b/etc/upgrade-manifest.scm @@ -0,0 +1,128 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Ludovic Courtès +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +;; This manifest computes upgrades of key packages using updaters from (guix +;; upstream) and supporting code for the 'with-latest' transformation. + +(use-modules (guix memoization) + (guix monads) + (guix graph) + (guix packages) + (guix profiles) + (guix store) + (guix transformations) + (guix upstream) + ((guix scripts build) #:select (dependents)) + ((guix scripts graph) #:select (%bag-node-type)) + ((guix import github) #:select (%github-api)) + (guix build-system gnu) + (guix build-system cmake) + ((gnu packages) #:select (all-packages)) + + (gnu packages backup) + (gnu packages curl) + (gnu packages freedesktop) + (gnu packages gnupg) + (gnu packages ssh) + (gnu packages tls) + (gnu packages version-control) + (gnu packages xorg) + + (ice-9 match) + (srfi srfi-1)) + +;; Bypass the GitHub updater: we'd need an API token or we would hit the rate +;; limit. +(%github-api "http://example.org") + +(define security-packages + (list xorg-server + elogind + + openssl + gnutls + curl + curl-ssh + + libarchive + libgit2 + libssh + + ;; GnuPG. + libassuan + libgpg-error + libgcrypt + libksba + npth + gnupg + gpgme + pinentry)) + +(define latest-version + (mlambdaq (package) + (package-with-upstream-version package + ;; Preserve patches and snippets to get + ;; exactly the same as what we'd have with + ;; 'guix refresh -u PACKAGE'. + #:preserve-patches? #t + + ;; XXX: Disable source code authentication: + ;; this requires a local keyring, populated + ;; from key servers, but key servers may be + ;; unreliable or may lack the upstream + ;; keys. Leave it up to packagers to + ;; actually authenticate code and make sure + ;; it matches what this manifest computed. + #:authenticate? #f))) + +(define individual-security-upgrades + ;; Upgrades of individual packages with their direct dependents built + ;; against that upgrade. + (manifest + (with-store store + (append-map (lambda (package) + (let* ((name (package-name package)) + (newest (latest-version package)) + (update (package-input-rewriting + `((,package . ,newest))))) + (map (lambda (package) + (manifest-entry + (inherit (package->manifest-entry + (update package))) + (name (string-append (package-name package) + "-with-latest-" name)))) + (dependents store (list package) 1)))) + security-packages)))) + +(define joint-security-upgrades + ;; All of SECURITY-PACKAGES updated at once, together with their dependents. + (manifest + (with-store store + (let ((update-all (package-input-rewriting + (map (lambda (package) + `(,package . ,(latest-version package))) + security-packages)))) + (map (lambda (package) + (manifest-entry + (inherit (package->manifest-entry + (update-all package))) + (name (string-append (package-name package) "-full-upgrade")))) + (dependents store security-packages 2)))))) + +(concatenate-manifests + (list individual-security-upgrades joint-security-upgrades)) diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index d1368f7e48..0080f1fe58 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -63,6 +63,8 @@ (define-module (guix scripts build) show-cross-build-options-help show-native-build-options-help + dependents + guix-build register-root register-root*))