[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/07: channels: Warn about missing introductions.
From: |
guix-commits |
Subject: |
02/07: channels: Warn about missing introductions. |
Date: |
Tue, 4 Oct 2022 12:17:25 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 5bc4b8e8e3960d431d66e3e4ac97f196059a875b
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Oct 4 09:28:01 2022 +0200
channels: Warn about missing introductions.
* guix/channels.scm (latest-channel-instance): Warn when CHANNEL has no
introduction and CHECKOUT contains '.guix-authorizations'.
---
guix/channels.scm | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/guix/channels.scm b/guix/channels.scm
index ad6d3fb8ac..f1c23c17fb 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -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)
- branch master updated (7030f592c6 -> ecee392ef1), guix-commits, 2022/10/04
- 01/07: gnu: guix: Update to 17134b9., guix-commits, 2022/10/04
- 03/07: services: anonip: Bail out when the input is not a FIFO., guix-commits, 2022/10/04
- 02/07: channels: Warn about missing introductions.,
guix-commits <=
- 04/07: gnu: Add python-property-manager., guix-commits, 2022/10/04
- 05/07: gnu: Add python-executor., guix-commits, 2022/10/04
- 06/07: gnu: Add awscli-2., guix-commits, 2022/10/04
- 07/07: gnu: eog-plugins: Fix source URL., guix-commits, 2022/10/04