GNU bug report logs -
#37869
[PATCH] pull: Honor '/etc/guix/channels.scm'.
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Tue, 22 Oct 2019 16:08:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37869 in the body.
You can then email your comments to 37869 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#37869
; Package
guix-patches
.
(Tue, 22 Oct 2019 16:08:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 22 Oct 2019 16:08:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
* guix/scripts/pull.scm (channel-list)[global-file]: New variable.
[channels]: Honor it.
* doc/guix.texi (Invoking guix pull): Document it.
---
doc/guix.texi | 18 +++++++++++++++++-
guix/scripts/pull.scm | 5 +++++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index b550b1c34a..ec331c37cd 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3666,6 +3666,21 @@ descriptions, and deploys it. Source code is downloaded from a
@uref{https://git-scm.com, Git} repository, by default the official
GNU <at> tie{}Guix repository, though this can be customized.
+Specifically, @command{guix pull} downloads code from the @dfn{channels}
+(@pxref{Channels}) specified by one of the followings, in this order:
+
+@enumerate
+@item
+the @option{--channels} option;
+@item
+the user's @file{~/.config/guix/channels.scm} file;
+@item
+the system-wide @file{/etc/guix/channels.scm} file;
+@item
+the built-in default channels specified in the @code{%default-channels}
+variable.
+@end enumerate
+
On completion, @command{guix package} will use packages and package
versions from this just-retrieved copy of Guix. Not only that, but all
the Guix commands and Scheme modules will also be taken from that latest
@@ -3763,7 +3778,8 @@ configuration in the @file{~/.config/guix/channels.scm} file or using the
@item --channels=@var{file}
@itemx -C @var{file}
Read the list of channels from @var{file} instead of
-@file{~/.config/guix/channels.scm}. @var{file} must contain Scheme code that
+@file{~/.config/guix/channels.scm} or @file{/etc/guix/channels.scm}.
+@var{file} must contain Scheme code that
evaluates to a list of channel objects. @xref{Channels}, for more
information.
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 7876019eac..80d070652b 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -714,6 +714,9 @@ transformations specified in OPTS (resulting from '--url', '--commit', or
(define default-file
(string-append (config-directory) "/channels.scm"))
+ (define global-file
+ (string-append %sysconfdir "/guix/channels.scm"))
+
(define (load-channels file)
(let ((result (load* file (make-user-module '((guix channels))))))
(if (and (list? result) (every channel? result))
@@ -725,6 +728,8 @@ transformations specified in OPTS (resulting from '--url', '--commit', or
(load-channels file))
((file-exists? default-file)
(load-channels default-file))
+ ((file-exists? global-file)
+ (load-channels global-file))
(else
%default-channels)))
--
2.23.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#37869
; Package
guix-patches
.
(Tue, 22 Oct 2019 16:14:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 37869 <at> debbugs.gnu.org (full text, mbox):
Hello,
Ludovic Courtès <ludo <at> gnu.org> skribis:
> +Specifically, @command{guix pull} downloads code from the @dfn{channels}
> +(@pxref{Channels}) specified by one of the followings, in this order:
> +
> +@enumerate
> +@item
> +the @option{--channels} option;
> +@item
> +the user's @file{~/.config/guix/channels.scm} file;
> +@item
> +the system-wide @file{/etc/guix/channels.scm} file;
> +@item
> +the built-in default channels specified in the @code{%default-channels}
> +variable.
> +@end enumerate
A word on the use case: on clusters at work and in other research
institutes, having a system-wide default channel file allows newcomers
to get started right away, without having to look for the ‘channels.scm’
file that their colleagues happen to be using.
Nothing revolutionary, but it can be convenient. :-)
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#37869
; Package
guix-patches
.
(Fri, 25 Oct 2019 15:15:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 37869 <at> debbugs.gnu.org (full text, mbox):
Hi there!
I’d like to add this news entry for this patch when I push it (within a
day or two if there aren’t any objections):
(entry (commit "XXX")
(title (en "@command{guix pull} now honors @file{/etc/guix/channels.scm"))
(body
(en "The @command{guix pull} command will now read the
@file{/etc/guix/channels.scm} file if it exists and if the per-user
@file{~/.config/guix/channels.scm} is not present. This allows administrators
of multi-user systems to define site-wide defaults.")))
(See <https://issues.guix.gnu.org/issue/37869> for context.)
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#37869
; Package
guix-patches
.
(Fri, 25 Oct 2019 18:21:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 37869 <at> debbugs.gnu.org (full text, mbox):
Le Fri, 25 Oct 2019 17:13:53 +0200,
Ludovic Courtès <ludo <at> gnu.org> a écrit :
> Hi there!
>
> I’d like to add this news entry for this patch when I push it (within
> a day or two if there aren’t any objections):
>
> (entry (commit "XXX")
> (title (en "@command{guix pull} now honors
> @file{/etc/guix/channels.scm")) (body
> (en "The @command{guix pull} command will now read the
> @file{/etc/guix/channels.scm} file if it exists and if the per-user
> @file{~/.config/guix/channels.scm} is not present. This allows
> administrators of multi-user systems to define site-wide defaults.")))
>
> (See <https://issues.guix.gnu.org/issue/37869> for context.)
>
> Thanks,
> Ludo’.
>
>
>
French:
(entry (commit "XXX")
(title (en "@command{guix pull} lit maintenant
@file{/etc/guix/channels.scm}"))
(body
(en "La commande @command{guix pull} lira maintenant le fichier
@file{/etc/guix/channels.scm} s'il existe et si le fichier
@file{~/.config/guix/channels.scm} par utilisateur n'est pas présent.
Cela permet aux administrateurs de systèmes multi-utilisateurs de
définir les paramètres par défaut.")))
As always, feel free to adapt or change anything :)
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Sun, 27 Oct 2019 22:24:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
bug acknowledged by developer.
(Sun, 27 Oct 2019 22:24:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 37869-done <at> debbugs.gnu.org (full text, mbox):
Hi,
Ludovic Courtès <ludo <at> gnu.org> skribis:
> From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
>
> * guix/scripts/pull.scm (channel-list)[global-file]: New variable.
> [channels]: Honor it.
> * doc/guix.texi (Invoking guix pull): Document it.
Pushed as 49af34cfac89d384c46269bfd9388b2c73b1220a.
Julien Lepiller <julien <at> lepiller.eu> skribis:
> French:
Thank you, Julien; added with minor tweaks.
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#37869
; Package
guix-patches
.
(Mon, 28 Oct 2019 20:31:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 37869 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
Ludovic Courtès <ludo <at> gnu.org> writes:
[…]
>> From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
>>
>> * guix/scripts/pull.scm (channel-list)[global-file]: New variable.
>> [channels]: Honor it.
>> * doc/guix.texi (Invoking guix pull): Document it.
>
> Pushed as 49af34cfac89d384c46269bfd9388b2c73b1220a.
I got an error during the guix pull:
--8<---------------cut here---------------start------------->8---
oleg <at> guixsd ~$ guix pull
News for channel 'guix'
Backtrace:
In guix/ui.scm:
1730:12 19 (run-guix-command _ . _)
In ice-9/boot-9.scm:
829:9 18 (catch _ _ #<procedure 7f289995e018 at guix/ui.scm:642…> …)
829:9 17 (catch _ _ #<procedure 7f289995e030 at guix/ui.scm:765…> …)
829:9 16 (catch _ _ #<procedure 7f2896e85828 at guix/scripts/pu…> …)
In guix/store.scm:
623:10 15 (call-with-store _)
In guix/status.scm:
768:4 14 (call-with-status-report _ _)
In guix/scripts/pull.scm:
804:24 13 (_)
In guix/store.scm:
1815:24 12 (run-with-store #<store-connection 256.99 7f288e2ff3c0> …)
In guix/scripts/pull.scm:
393:28 11 (_ #<store-connection 256.99 7f288a4366c0>)
356:15 10 (display-channel-news-headlines _)
In srfi/srfi-1.scm:
592:29 9 (map1 _)
592:17 8 (map1 ((#<<channel> name: guix url: "https://git.sa…> …)))
In guix/scripts/pull.scm:
283:11 7 (display-channel-specific-news _ _ #:port _ #:concise? _)
In srfi/srfi-1.scm:
640:9 6 (for-each #<procedure 7f2888451060 at guix/scripts/pul…> …)
In guix/scripts/pull.scm:
241:12 5 (display-news-entry-title _ _ #<output: file /dev/pts/13>)
In guix/ui.scm:
1210:23 4 (texi->plain-text _)
In texinfo.scm:
1131:22 3 (parse _)
979:31 2 (loop #<input: string 7f289890b930> (*fragment*) _ _ _)
910:31 1 (loop #<input: string 7f289890b930> #f #<procedure ide…> …)
745:27 0 (_ #<input: string 7f289890b930> #f #f #<procedure 7f2…> …)
texinfo.scm:745:27: Throw to key `parser-error' with args `(#<input: string 7f289890b930> "EOF while reading a token " "reading char data")'.
--8<---------------cut here---------------end--------------->8---
Here is a backtrace from guix repl:
--8<---------------cut here---------------start------------->8---
oleg <at> guixsd ~$ guix repl
scheme@(guix scripts pull)> (display-channel-news "/gnu/store/36kli1qk27gshy9zfszs1w08jgyigmp0-profile" "/gnu/store/89rwy7mnpwwd7gnnpz4lq8gxd66pnd1a-profile")
News for channel 'guix'
texinfo.scm:745:27: Throw to key `parser-error' with args `(#<input: string 7f79cd794930> "EOF while reading a token " "reading char data")'.
scheme@(guix scripts pull) [1]> ,backtrace #:width 1000
In srfi/srfi-1.scm:
640:9 9 (for-each #<procedure 7f79d830a6e0 at guix/scripts/pull.scm:324:23 (expr)> _)
In guix/scripts/pull.scm:
283:11 8 (display-channel-specific-news _ _ #:port _ #:concise? _)
In srfi/srfi-1.scm:
640:9 7 (for-each #<procedure 7f79ca0d9560 at guix/scripts/pull.scm:285:25 (t-136e29f79df174e1-14e9)> (#<<channel-news-entry> commit: "49af34cfac89d384c46269bfd9388b2c73b1220a" tag: #f title: (("en" . "@command{guix pull} now honors\n <at> file{/etc/guix/channels.scm") ("fr" . "@command{guix pull} lit maintenant\n <at> file{/etc/guix/channels.scm}")) body: (("en" . "The @command{guix pull} command will now read the\n <at> file{/etc/guix/channels.scm} file if it exists and if the per-user\n <at> file{~/.config/guix/channels.scm} is not present. This allows administrators\nof multi-user systems to define site-wide defaults.") ("fr" . "La commande @command{guix pull} lira maintenant le fichier\n <at> file{/etc/guix/channels.scm} s'il existe et si le fichier\n <at> file{~/.config/guix/channels.scm} par utilisateur·rice n'est pas présent.\nCela permet aux personnes administrant des systèmes multi-utilisateurs de\ndéfinir les canaux par défaut."))>))
In guix/scripts/pull.scm:
251:2 6 (display-news-entry #<<channel-news-entry> commit: "49af34cfac89d384c46269bfd9388b2c73b1220a" tag: #f title: (("en" . "@command{guix pull} now honors\n <at> file{/etc/guix/channels.scm") ("fr" . "@command{guix pull} lit maintenant\n <at> file{/etc/guix/channels.scm}")) body: (("en" . "The @command{guix pull} command will now read the\n <at> file{/etc/guix/channels.scm} file if it exists and if the per-user\n <at> file{~/.config/guix/channels.scm} is not present. This allows administrators\nof multi-user systems to define site-wide defaults.") ("fr" . "La commande @command{guix pull} lira maintenant le fichier\n <at> file{/etc/guix/channels.scm} s'il existe et si le fichier\n <at> file{~/.config/guix/channels.scm} par utilisateur·rice n'est pas présent.\nCela permet aux personnes administrant des systèmes multi-utilisateurs de\ndéfinir les canaux par défaut."))> "en" #<output: file /dev/pts/17>)
241:12 5 (display-news-entry-title _ _ #<output: file /dev/pts/17>)
In guix/ui.scm:
1210:23 4 (texi->plain-text _)
In texinfo.scm:
1131:22 3 (parse _)
979:31 2 (loop #<input: string 7f79cdf555b0> (*fragment*) _ _ _)
910:31 1 (loop #<input: string 7f79cdf555b0> #f #<procedure identity (x)> #f ())
745:27 0 (_ #<input: string 7f79cdf555b0> #f #f #<procedure 7f79d9fd1ec0 at texinfo.scm:1068:3 (string1 string2 seed)> _)
--8<---------------cut here---------------end--------------->8---
Regards,
Oleg.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#37869
; Package
guix-patches
.
(Fri, 01 Nov 2019 11:25:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 37869 <at> debbugs.gnu.org (full text, mbox):
Hi Oleg,
Oleg Pykhalov <go.wigust <at> gmail.com> skribis:
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
> […]
>
>>> From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
>>>
>>> * guix/scripts/pull.scm (channel-list)[global-file]: New variable.
>>> [channels]: Honor it.
>>> * doc/guix.texi (Invoking guix pull): Document it.
>>
>> Pushed as 49af34cfac89d384c46269bfd9388b2c73b1220a.
>
> I got an error during the guix pull:
>
> oleg <at> guixsd ~$ guix pull
> News for channel 'guix'
> Backtrace:
> In guix/ui.scm:
> 1730:12 19 (run-guix-command _ . _)
> In ice-9/boot-9.scm:
> 829:9 18 (catch _ _ #<procedure 7f289995e018 at guix/ui.scm:642…> …)
> 829:9 17 (catch _ _ #<procedure 7f289995e030 at guix/ui.scm:765…> …)
> 829:9 16 (catch _ _ #<procedure 7f2896e85828 at guix/scripts/pu…> …)
> In guix/store.scm:
> 623:10 15 (call-with-store _)
> In guix/status.scm:
> 768:4 14 (call-with-status-report _ _)
> In guix/scripts/pull.scm:
> 804:24 13 (_)
> In guix/store.scm:
> 1815:24 12 (run-with-store #<store-connection 256.99 7f288e2ff3c0> …)
> In guix/scripts/pull.scm:
> 393:28 11 (_ #<store-connection 256.99 7f288a4366c0>)
> 356:15 10 (display-channel-news-headlines _)
> In srfi/srfi-1.scm:
> 592:29 9 (map1 _)
> 592:17 8 (map1 ((#<<channel> name: guix url: "https://git.sa…> …)))
> In guix/scripts/pull.scm:
> 283:11 7 (display-channel-specific-news _ _ #:port _ #:concise? _)
> In srfi/srfi-1.scm:
> 640:9 6 (for-each #<procedure 7f2888451060 at guix/scripts/pul…> …)
> In guix/scripts/pull.scm:
> 241:12 5 (display-news-entry-title _ _ #<output: file /dev/pts/13>)
> In guix/ui.scm:
> 1210:23 4 (texi->plain-text _)
> In texinfo.scm:
> 1131:22 3 (parse _)
> 979:31 2 (loop #<input: string 7f289890b930> (*fragment*) _ _ _)
> 910:31 1 (loop #<input: string 7f289890b930> #f #<procedure ide…> …)
> 745:27 0 (_ #<input: string 7f289890b930> #f #f #<procedure 7f2…> …)
>
> texinfo.scm:745:27: Throw to key `parser-error' with args `(#<input: string 7f289890b930> "EOF while reading a token " "reading char data")'.
My bad! Tobias fixed it in 6b00a5f4a79819db08cb4d8e9f24a01445b7962b,
thanks Tobias!
I think we need (1) a way to validate channel news, and (2) graceful
handling of Texinfo errors. Commit
6330db4d55bf9be3702cc03145470c970fb7ae9b implements #2.
Thanks,
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 29 Nov 2019 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 200 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.