diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2023-01-30 11:33:18 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2023-01-30 12:39:40 +0200 |
commit | 4cf1acc7f3033b50b0bf19e02c9f522d522d338c (patch) | |
tree | 9fd64956ee60304c15387eb394cd649e49f01467 /guix/channels.scm | |
parent | edb8c09addd186d9538d43b12af74d6c7aeea082 (diff) | |
parent | 595b53b74e3ef57a1c0c96108ba86d38a170a241 (diff) |
Merge remote-tracking branch 'origin/master' into core-updates
Conflicts:
doc/guix.texi
gnu/local.mk
gnu/packages/admin.scm
gnu/packages/base.scm
gnu/packages/chromium.scm
gnu/packages/compression.scm
gnu/packages/databases.scm
gnu/packages/diffoscope.scm
gnu/packages/freedesktop.scm
gnu/packages/gnome.scm
gnu/packages/gnupg.scm
gnu/packages/guile.scm
gnu/packages/inkscape.scm
gnu/packages/llvm.scm
gnu/packages/openldap.scm
gnu/packages/pciutils.scm
gnu/packages/ruby.scm
gnu/packages/samba.scm
gnu/packages/sqlite.scm
gnu/packages/statistics.scm
gnu/packages/syndication.scm
gnu/packages/tex.scm
gnu/packages/tls.scm
gnu/packages/version-control.scm
gnu/packages/xml.scm
guix/build-system/copy.scm
guix/scripts/home.scm
Diffstat (limited to 'guix/channels.scm')
-rw-r--r-- | guix/channels.scm | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/guix/channels.scm b/guix/channels.scm index ad6d3fb8ac..40cbc4bb3a 100644 --- a/guix/channels.scm +++ b/guix/channels.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018-2022 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2018-2023 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> @@ -248,7 +248,7 @@ could be found at DIRECTORY or one of its ancestors." 'latest-repository-commit'." (match (channel-commit channel) (#f `(branch . ,(channel-branch channel))) - (commit `(commit . ,(channel-commit channel))))) + (commit `(tag-or-commit . ,(channel-commit channel))))) (define sexp->channel-introduction (match-lambda @@ -419,19 +419,28 @@ their relation. When AUTHENTICATE? is false, CHANNEL is not authenticated." (if authenticate? (if (channel-introduction channel) (authenticate-channel channel checkout commit) - ;; TODO: Warn for all the channels once the authentication interface - ;; is public. - (when (guix-channel? channel) - (raise (make-compound-condition - (formatted-message (G_ "channel '~a' lacks an \ + (begin + (when (file-exists? + (string-append checkout "/.guix-authorizations")) + (warning (and=> (channel-location channel) + source-properties->location) + (G_ "channel '~a' lacks 'introduction' field but \ +'.guix-authorizations' found\n") + (channel-name channel))) + + ;; TODO: Warn for all the channels once the authentication interface + ;; is public. + (when (guix-channel? channel) + (raise (make-compound-condition + (formatted-message (G_ "channel '~a' lacks an \ introduction and cannot be authenticated~%") - (channel-name channel)) - (condition - (&fix-hint - (hint (G_ "Add the missing introduction to your + (channel-name channel)) + (condition + (&fix-hint + (hint (G_ "Add the missing introduction to your channels file to address the issue. Alternatively, you can pass @option{--disable-authentication}, at the risk of running unauthenticated and -thus potentially malicious code.")))))))) +thus potentially malicious code."))))))))) (warning (G_ "channel authentication disabled~%"))) (when (guix-channel? channel) @@ -1048,7 +1057,9 @@ true, include its introduction, if any." (name ',(channel-name channel)) (url ,(channel-url channel)) (branch ,(channel-branch channel)) - (commit ,(channel-commit channel)) + ,@(if (channel-commit channel) + `((commit ,(channel-commit channel))) + '()) ,@(if intro `((introduction (make-channel-introduction ,(channel-introduction-first-signed-commit intro) |