[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
15/16: transformations: Add #:authenticate? to ‘package-with-upstream-ve
From: |
guix-commits |
Subject: |
15/16: transformations: Add #:authenticate? to ‘package-with-upstream-version’. |
Date: |
Sun, 1 Dec 2024 14:15:21 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 3dfb757a45f49dbc83769477fc8d0d88b8e71556
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Nov 28 22:27:00 2024 +0100
transformations: Add #:authenticate? to ‘package-with-upstream-version’.
* 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 @@
#: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 @@ additional patches."
"This origin method simply downloads SOURCE, an <upstream-source> 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
- branch master updated (85743578bc -> 858dd7e721), guix-commits, 2024/12/01
- 02/16: gnu-maintenance: ‘import-html-release’ doesn’t abort upon HTTP 404., guix-commits, 2024/12/01
- 06/16: guix build: Add ‘--dependents’., guix-commits, 2024/12/01
- 05/16: packages: Factorize ‘all-packages’., guix-commits, 2024/12/01
- 01/16: transformations: Export ‘package-with-upstream-version’., guix-commits, 2024/12/01
- 04/16: guix build: Add ‘--development’ option., guix-commits, 2024/12/01
- 15/16: transformations: Add #:authenticate? to ‘package-with-upstream-version’.,
guix-commits <=
- 16/16: etc: Add upgrade manifest., guix-commits, 2024/12/01
- 07/16: import: gnome: Keep going upon HTTP errors., guix-commits, 2024/12/01
- 11/16: gnu: git-minimal: Add ‘upstream-name’ property., guix-commits, 2024/12/01
- 08/16: gnu-maintenance: ‘gnu-ftp’ updater excludes GnuPG-hosted packages., guix-commits, 2024/12/01
- 10/16: gnu: gnutls: Change release monitoring URL., guix-commits, 2024/12/01
- 09/16: gnu: Update updater properties for GnuPG-related packages., guix-commits, 2024/12/01
- 14/16: transformations: ‘package-with-upstream-version’ can preserve patches., guix-commits, 2024/12/01
- 12/16: gnu-maintenance: ‘generic-html’ update honors <base href="…">., guix-commits, 2024/12/01
- 03/16: gnu-maintenance: Savannah/Xorg updaters no longer abort on network errors., guix-commits, 2024/12/01
- 13/16: guix build: Validate that the file passed to ‘-m’ returns a manifest., guix-commits, 2024/12/01