From patchwork Wed Sep 29 15:43:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Geerinckx-Rice X-Patchwork-Id: 33419 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 E781727BBE1; Wed, 29 Sep 2021 16:44:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3E7D127BBE3 for ; Wed, 29 Sep 2021 16:44:10 +0100 (BST) Received: from localhost ([::1]:54468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVbkf-0007gs-7a for patchwork@mira.cbaines.net; Wed, 29 Sep 2021 11:44:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVbkY-0007fe-Oh for guix-patches@gnu.org; Wed, 29 Sep 2021 11:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVbkY-0007kg-HH for guix-patches@gnu.org; Wed, 29 Sep 2021 11:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVbkY-00029J-BL for guix-patches@gnu.org; Wed, 29 Sep 2021 11:44:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50892] [PATCH] guix-install.sh: Authorize all project build farms at once. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Sep 2021 15:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50892 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50892@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16329302108208 (code B ref -1); Wed, 29 Sep 2021 15:44:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Sep 2021 15:43:30 +0000 Received: from localhost ([127.0.0.1]:49920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVbjt-00028D-Ne for submit@debbugs.gnu.org; Wed, 29 Sep 2021 11:43:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:56874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVbjo-000281-J1 for submit@debbugs.gnu.org; Wed, 29 Sep 2021 11:43:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVbjo-0006zm-56 for guix-patches@gnu.org; Wed, 29 Sep 2021 11:43:16 -0400 Received: from tobias.gr ([2a02:c205:2020:6054::1]:60028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVbji-00070u-5b for guix-patches@gnu.org; Wed, 29 Sep 2021 11:43:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=tnvk0zCzDBqQi gdHuSm/qfcGsYMWaiTeAv2OyGzYgiY=; h=date:subject:to:from; d=tobias.gr; b=p0d6clnhATo91IldyaQRr5ekFExqYC6xx69HZBLbLyKjJ7b6+t6jVBtlyiPAvm+zkyYL Wt+ubW/9akRgd3d5B8swT/mwDtrsLNPTfR3XAN01+mygftGrobgiX4VV4mPozjuGpMIc0D UEdgir5qBz9iaJasfuwRBbkDFLTtWJ6PfSSVkfYhnD7u5y4yYyfzUrK8CMUG2LxupXfGWn OJWvztiYrmiikWxtutP7dcgHU74KerZMLfeYA/4orBvZ168fmWgEXzUupEfMw31hK00s6a 22welshZmBOK52LxlzHMAWrFH+mjWFvAVFiOFywcfjRxU/mt/HZcxHNJd2DHOCYw== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 6a8a506d (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Wed, 29 Sep 2021 15:43:04 +0000 (UTC) Date: Wed, 29 Sep 2021 17:43:10 +0200 Message-Id: <20210929154310.25788-1-me@tobias.gr> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Reply-to: Tobias Geerinckx-Rice X-ACL-Warn: , Tobias Geerinckx-Rice via Guix-patches X-Patchwork-Original-From: Tobias Geerinckx-Rice via Guix-patches via From: Tobias Geerinckx-Rice X-getmail-retrieved-from-mailbox: Patches * etc/guix-install.sh (sys_authorize_build_farms): Iterate over all hosts. --- etc/guix-install.sh | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index b0d4a8b95e..e3b8485a50 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -1,21 +1,21 @@ #!/bin/sh # GNU Guix --- Functional package management for GNU # Copyright © 2017 sharlatan # Copyright © 2018 Ricardo Wurmus # Copyright © 2018 Efraim Flashner -# Copyright © 2019, 2020 Tobias Geerinckx-Rice +# Copyright © 2019–2021 Tobias Geerinckx-Rice # Copyright © 2020 Morgan Smith # Copyright © 2020 Simon Tournier # Copyright © 2020 Daniel Brooks # Copyright © 2021 Jakub Kądziołka # Copyright © 2021 Chris Marusich # Copyright © 2021 Maxim Cournoyer # # 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 @@ -476,38 +476,45 @@ sys_enable_guix_daemon() ;; esac _msg "${INF}making the guix command available to other users" [ -e "$local_bin" ] || mkdir -p "$local_bin" ln -sf "${var_guix}/bin/guix" "$local_bin" [ -e "$info_path" ] || mkdir -p "$info_path" for i in "${var_guix}"/share/info/*; do ln -sf "$i" "$info_path" done } 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? (yes/no)"; 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? (yes/no)"; then + for host in "${hosts[@]}"; do + guix archive --authorize \ + < "~root/.config/guix/current/share/guix/$host.pub" \ + && _msg "${PAS}Authorized public key for $host" + done + else + _msg "${INF}Skipped authorizing build farm public keys" fi } sys_create_init_profile() { # Define for better desktop integration # This will not take effect until the next shell or desktop session! [ -d "/etc/profile.d" ] || mkdir /etc/profile.d # Just in case cat <<"EOF" > /etc/profile.d/guix.sh # _GUIX_PROFILE: `guix pull` profile _GUIX_PROFILE="$HOME/.config/guix/current" export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH" # Export INFOPATH so that the updated info pages can be found # and read by both /usr/bin/info and/or $GUIX_PROFILE/bin/info # When INFOPATH is unset, add a trailing colon so that Emacs # searches 'Info-default-directory-list'.