diff options
| author | Tobias Geerinckx-Rice <me@tobias.gr> | 2021-09-29 17:43:10 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-12-09 09:59:32 +0100 |
| commit | 416a691cff8b75d0fcba50412c6e347212ab5973 (patch) | |
| tree | f4f1b6ba101763505582e5083195abdc615b74a2 | |
| parent | 156a8810019dd5b8d19f2026be80f199f8e40015 (diff) | |
guix-install.sh: Authorize all project build farms at once.
* etc/guix-install.sh (sys_authorize_build_farms):
Iterate over all hosts.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
| -rwxr-xr-x | etc/guix-install.sh | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 6bef21bb7ee..fb9006b3e21 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh | |||
| @@ -492,14 +492,22 @@ sys_enable_guix_daemon() | |||
| 492 | } | 492 | } |
| 493 | 493 | ||
| 494 | sys_authorize_build_farms() | 494 | sys_authorize_build_farms() |
| 495 | { # authorize the public key of the build farm | 495 | { # authorize the public key(s) of the build farm(s) |
| 496 | local hosts=( | ||
| 497 | ci.guix.gnu.org | ||
| 498 | bordeaux.guix.gnu.org | ||
| 499 | ) | ||
| 500 | |||
| 496 | if prompt_yes_no "Permit downloading pre-built package binaries from the \ | 501 | if prompt_yes_no "Permit downloading pre-built package binaries from the \ |
| 497 | project's build farm?"; then | 502 | project's build farms?"; then |
| 498 | guix archive --authorize \ | 503 | for host in "${hosts[@]}"; do |
| 499 | < ~root/.config/guix/current/share/guix/ci.guix.gnu.org.pub \ | 504 | local key=~root/.config/guix/current/share/guix/$host.pub |
| 500 | && _msg "${PAS}Authorized public key for ci.guix.gnu.org" | 505 | [ -f "$key" ] \ |
| 501 | else | 506 | && guix archive --authorize < "$key" \ |
| 502 | _msg "${INF}Skipped authorizing build farm public keys" | 507 | && _msg "${PAS}Authorized public key for $host" |
| 508 | done | ||
| 509 | else | ||
| 510 | _msg "${INF}Skipped authorizing build farm public keys" | ||
| 503 | fi | 511 | fi |
| 504 | } | 512 | } |
| 505 | 513 | ||
