[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/08: channels: Add 'openpgp-fingerprint->bytevector'.
From: |
guix-commits |
Subject: |
01/08: channels: Add 'openpgp-fingerprint->bytevector'. |
Date: |
Wed, 1 Jul 2020 17:48:53 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 6577682a6c4885020949e014a536f96e8ae315d0
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Jun 24 15:58:16 2020 +0200
channels: Add 'openpgp-fingerprint->bytevector'.
* guix/channels.scm (openpgp-fingerprint->bytevector): New procedure.
(openpgp-fingerprint): New macro.
(%guix-channel-introduction): Use it.
---
guix/channels.scm | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/guix/channels.scm b/guix/channels.scm
index 1016b95..02619c2 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -71,6 +71,9 @@
channel-introduction?
;; <channel-introduction> accessors purposefully omitted for now.
+ openpgp-fingerprint->bytevector
+ openpgp-fingerprint
+
%default-channels
guix-channel?
@@ -134,6 +137,23 @@
(first-commit-signer channel-introduction-first-commit-signer) ;bytevector
(signature channel-introduction-signature)) ;string
+(define (openpgp-fingerprint->bytevector str)
+ "Convert STR, an OpenPGP fingerprint (hexadecimal string with whitespace),
+to the corresponding bytevector."
+ (base16-string->bytevector
+ (string-downcase (string-filter char-set:hex-digit str))))
+
+(define-syntax openpgp-fingerprint
+ (lambda (s)
+ "Convert STR, an OpenPGP fingerprint (hexadecimal string with whitespace),
+to the corresponding bytevector."
+ (syntax-case s ()
+ ((_ str)
+ (string? (syntax->datum #'str))
+ (openpgp-fingerprint->bytevector (syntax->datum #'str)))
+ ((_ str)
+ #'(openpgp-fingerprint->bytevector str)))))
+
(define %guix-channel-introduction
;; Introduction of the official 'guix channel. The chosen commit is the
;; first one that introduces '.guix-authorizations' on the 'staging'
@@ -142,11 +162,8 @@
;; & co.
(make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad" ;2020-05-26
- (base16-string->bytevector
- (string-downcase
- (string-filter char-set:hex-digit ;mbakke
- "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))
- #f)) ;TODO: Add an intro signature so it can be exported.
+ (openpgp-fingerprint ;mbakke
+ "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))
(define %default-channel-url
;; URL of the default 'guix' channel.
- branch master updated (67ba981 -> d774c7b), guix-commits, 2020/07/01
- 02/08: channels: Make channel introductions public., guix-commits, 2020/07/01
- 03/08: channels: Remove 'signature' from <channel-introduction>., guix-commits, 2020/07/01
- 08/08: channels: Dependencies listed in '.guix-channel' can have an introduction., guix-commits, 2020/07/01
- 01/08: channels: Add 'openpgp-fingerprint->bytevector'.,
guix-commits <=
- 05/08: guix describe: Display channel introductions and add 'channels-sans-intro'., guix-commits, 2020/07/01
- 06/08: services: provenance: Save channel introductions., guix-commits, 2020/07/01
- 04/08: channels: Save and interpret 'introduction' field in provenance data., guix-commits, 2020/07/01
- 07/08: channels: Properly diagnose test failure., guix-commits, 2020/07/01