From a9eeeaa6aeeafb817df3aad22a4b85205ac3ec13 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 8 Jun 2020 23:22:17 +0200 Subject: pull: Add '--disable-authentication'. * guix/channels.scm (latest-channel-instance): Add #:authenticate? and honor it. (latest-channel-instances): Likewise. * guix/scripts/pull.scm (%default-options): Add 'authenticate-channels?'. (show-help, %options): Add '--disable-authentication'. (guix-pull): Pass #:authenticate? to 'latest-channel-instances'. * doc/guix.texi (Invoking guix pull): Document it. --- guix/scripts/pull.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'guix/scripts/pull.scm') diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index d3d0d2bd64..f953957161 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -82,6 +82,7 @@ (graft? . #t) (debug . 0) (verbosity . 1) + (authenticate-channels? . #t) (validate-pull . ,ensure-forward-channel-update))) (define (show-help) @@ -97,6 +98,9 @@ Download and deploy the latest version of Guix.\n")) --branch=BRANCH download the tip of the specified BRANCH")) (display (G_ " --allow-downgrades allow downgrades to earlier channel revisions")) + (display (G_ " + --disable-authentication + disable channel authentication")) (display (G_ " -N, --news display news compared to the previous generation")) (display (G_ " @@ -165,6 +169,9 @@ Download and deploy the latest version of Guix.\n")) (lambda (opt name arg result) (alist-cons 'validate-pull warn-about-backward-updates result))) + (option '("disable-authentication") #f #f + (lambda (opt name arg result) + (alist-cons 'authenticate-channels? #f result))) (option '(#\p "profile") #t #f (lambda (opt name arg result) (alist-cons 'profile (canonicalize-profile arg) @@ -771,7 +778,8 @@ Use '~/.config/guix/channels.scm' instead.")) (channels (channel-list opts)) (profile (or (assoc-ref opts 'profile) %current-profile)) (current-channels (profile-channels profile)) - (validate-pull (assoc-ref opts 'validate-pull))) + (validate-pull (assoc-ref opts 'validate-pull)) + (authenticate? (assoc-ref opts 'authenticate-channels?))) (cond ((assoc-ref opts 'query) (process-query opts profile)) ((assoc-ref opts 'generation) @@ -793,7 +801,9 @@ Use '~/.config/guix/channels.scm' instead.")) #:current-channels current-channels #:validate-pull - validate-pull))) + validate-pull + #:authenticate? + authenticate?))) (format (current-error-port) (N_ "Building from this channel:~%" "Building from these channels:~%" -- cgit v1.2.3