unofficial mirror of bug-guix@gnu.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,
	"pelzflorian \(Florian Pelz\)" <pelzflorian@pelzflorian.de>,
	50892@debbugs.gnu.org
Subject: bug#59781: bug#50892: [PATCH] guix-install.sh: Authorize all project build farms at once.
Date: Thu, 08 Dec 2022 12:34:20 +0100	[thread overview]
Message-ID: <87edtaf7sz.fsf_-_@gnu.org> (raw)
In-Reply-To: <87tui31g2y.fsf@nckx> (Tobias Geerinckx-Rice's message of "Wed, 29 Sep 2021 18:49:21 +0200")

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

Hi,

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

> Tobias Geerinckx-Rice via Guix-patches via 写道:
>> +                 <
>> "~root/.config/guix/current/share/guix/$host.pub" \
>
> This file is missing for bordeaux in the 1.3.0 release, so this would
> have to wait until the next one…

If there are no objections I’d like to push to ‘master’ and
‘version-1.4.0’ this modified version of your patch.

Thanks,
Ludo’.


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

From f13e03d57ae9784a349bfa2eab0285e2c5b58eb7 Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Wed, 29 Sep 2021 17:43:10 +0200
Subject: [PATCH] guix-install.sh: Authorize all project build farms at once.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* etc/guix-install.sh (sys_authorize_build_farms):
Iterate over all hosts.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
---
 etc/guix-install.sh | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 6bef21bb7e..fb9006b3e2 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -492,14 +492,22 @@ sys_enable_guix_daemon()
 }
 
 sys_authorize_build_farms()
-{ # authorize the public key of the build farm
+{ # authorize the public key(s) of the build farm(s)
+    local hosts=(
+	ci.guix.gnu.org
+	bordeaux.guix.gnu.org
+    )
+
     if prompt_yes_no "Permit downloading pre-built package binaries from the \
-project's build farm?"; then
-        guix archive --authorize \
-             < ~root/.config/guix/current/share/guix/ci.guix.gnu.org.pub \
-            && _msg "${PAS}Authorized public key for ci.guix.gnu.org"
-        else
-            _msg "${INF}Skipped authorizing build farm public keys"
+project's build farms?"; then
+	for host in "${hosts[@]}"; do
+	    local key=~root/.config/guix/current/share/guix/$host.pub
+	    [ -f "$key" ] \
+		&& guix archive --authorize < "$key" \
+		&& _msg "${PAS}Authorized public key for $host"
+	done
+    else
+        _msg "${INF}Skipped authorizing build farm public keys"
     fi
 }
 
-- 
2.38.1


       reply	other threads:[~2022-12-08 11:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210929154310.25788-1-me@tobias.gr>
     [not found] ` <87tui31g2y.fsf@nckx>
2022-12-08 11:34   ` Ludovic Courtès [this message]
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

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87edtaf7sz.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=50892@debbugs.gnu.org \
    --cc=59781@debbugs.gnu.org \
    --cc=me@tobias.gr \
    --cc=pelzflorian@pelzflorian.de \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).