all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: 59781@debbugs.gnu.org, 50892@debbugs.gnu.org
Subject: [bug#50892] bug#59781: [version 1.4.0rc1] install.sh script should authorize bordeaux
Date: Fri, 09 Dec 2022 10:09:58 +0100	[thread overview]
Message-ID: <87359paqop.fsf_-_@gnu.org> (raw)
In-Reply-To: <87ililzhx8.fsf@nckx> (Tobias Geerinckx-Rice's message of "Thu, 08 Dec 2022 22:42:59 +0100")

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

Hi,

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> (Ugh, this patch is so ugly, all to work around that triplication in
> ~/.config/guix/current/share/guix/*.pub…  Would it be OK for ‘guix
> archive --authorize’ to silently ignore duplicate keys?)

Oh, good point.  I guess we could change ‘public-keys->acl’ to
deduplicate entries.  Maybe something along these lines:


[-- Attachment #2: Type: text/x-patch, Size: 1240 bytes --]

diff --git a/guix/pki.scm b/guix/pki.scm
index 6326e065e9..c5b2fb9634 100644
--- a/guix/pki.scm
+++ b/guix/pki.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2016, 2022 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,6 +21,7 @@ (define-module (guix pki)
   #:use-module (gcrypt pk-crypto)
   #:use-module ((guix utils) #:select (with-atomic-file-output))
   #:use-module ((guix build utils) #:select (mkdir-p))
+  #:autoload   (srfi srfi-1) (delete-duplicates)
   #:use-module (ice-9 match)
   #:use-module (ice-9 rdelim)
   #:use-module (ice-9 binary-ports)
@@ -61,9 +62,10 @@ (define (public-keys->acl keys)
   ;; want to have name certificates and to use subject names instead of
   ;; complete keys.
   `(acl ,@(map (lambda (key)
-                 `(entry ,(canonical-sexp->sexp key)
+                 `(entry ,key
                          (tag (guix import))))
-               keys)))
+               (delete-duplicates
+                (map canonical-sexp->sexp keys)))))
 
 (define %acl-file
   (string-append %config-directory "/acl"))

[-- Attachment #3: Type: text/plain, Size: 21 bytes --]


WDYT?

Ludo’.

  reply	other threads:[~2022-12-09  9:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 15:43 [bug#50892] [PATCH] guix-install.sh: Authorize all project build farms at once Tobias Geerinckx-Rice via Guix-patches via
2021-09-29 16:49 ` Tobias Geerinckx-Rice via Guix-patches via
2022-12-08 11:34   ` bug#59781: bug#50892: " Ludovic Courtès
2022-12-08 21:27     ` [bug#50892] " pelzflorian (Florian Pelz)
2022-12-09  9:01       ` bug#50892: bug#59781: [version 1.4.0rc1] install.sh script should authorize bordeaux Ludovic Courtès
2022-12-08 21:42     ` bug#59781: bug#50892: [PATCH] guix-install.sh: Authorize all project build farms at once Tobias Geerinckx-Rice via Bug reports for GNU Guix
2022-12-09  9:09       ` Ludovic Courtès [this message]
2021-09-29 16:51 ` [bug#50892] " Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87359paqop.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=50892@debbugs.gnu.org \
    --cc=59781@debbugs.gnu.org \
    --cc=me@tobias.gr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.