[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43039: Vanilla GUIX 1.1.0 reconfigure fails on nss-certs
From: |
Ludovic Courtès |
Subject: |
bug#43039: Vanilla GUIX 1.1.0 reconfigure fails on nss-certs |
Date: |
Fri, 28 Aug 2020 16:05:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hi Adam,
Thanks for taking the time to report the bug here! It’s more likely to
be seen and addressed than on external fora—much appreciated.
Adam Griffiths <adam.lw.griffiths@gmail.com> skribis:
> After installing GuixSD 1.1.0 into a VirtualBox VM and following the After
> System Installation steps (
> https://guix.gnu.org/manual/en/html_node/After-System-Installation.html#After-System-Installation),
> the update fails when trying to update nss-certs.
>
> Possibly related to #37662 <https://issues.guix.gnu.org/37662>
>
> Error:
>
> $ guix pull
> Migrating profile generations to '/var/guix/profiles/per-user/adam'...
> Updating channel 'guix' from Git repository at '
> https://git.savannah.gnu.org/git/guix.git'...
> <snip>
I got rid of the “Migrating profile” messages, which was confusing:
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=0c9d22c13fef9056413338293747c0d32f0cd5a4
> $ sudo guix system reconfigure /etc/config.scm
> <sudo warning snipped>
> guile: warning: failed to install locale
> hint: Consider installing the `glibc-utf8-locales' or `glibc-locales'
> package and defining
> `GUIX_LOCPATH', along these lines:
>
> guix package -i glibc-utf8-locales
> export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
>
> See the "Application Setup" section in the manual, for more info.
>
> guix system: warning: cannot determine provenance for current system
> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
That, I don’t understand. I tried to reproduce it by downloading
<https://ftp.gnu.org/gnu/guix/guix-system-vm-image-1.1.0.x86_64-linux.xz>
(which is essentially the result of installing Guix System from 1.1.0).
I ran ‘guix pull’ (which took a lot of time…) and then ‘guix system
reconfigure’. ‘guix system reconfigure’ would only emit the one-liner:
warning: failed to install locale
and not the hint about GUIX_LOCPATH, and then it just went ahead.
What locale does your system use? You can type “env | grep LC_” to see.
(The ‘guix’ command provided by ‘guix pull’ comes with
‘glibc-utf8-locales’ since commit
ba48895899a117d6ace2209c3f54411a4a989133, but the locale you’re using
could be missing from that.)
> downloading from
> https://ci.guix.gnu.org/nar/lzip/0llx3y194278l5ksr4xh9kc64mh8nn8d-nss-certs-3.52.1
> ...
> nss-certs-3.52.1 133KiB 186KiB/s 00:00
> [######## ] 48.3%
> Backtrace:
> 3 (apply-smob/1 #<catch-closure 7f10d4c80120>)
> In ice-9/boot-9.scm:
> 705:2 2 (call-with-prompt _ _ #<procedure default-prompt-handle?>)
> In ice-9/eval.scm:
> 619:8 1 (_ #(#(#<directory (guile-user) 7f10d490e140>)))
> In guix/ui.scm:
> 1936:12 0 (run-guix-command _ . _)
>
> guix/ui.scm:1936:12: In procedure run-guix-command:
> Throw to key `encoding-error' with args `("scm_to_stringn" "cannot convert
> wide string to output locale" 84 #f #f)'.
> substitution of
> /gnu/store/0llx3y194278l5ksr4xh9kc64mh8nn8d-nss-certs-3.52.1 failed
This is really puzzling: guix-daemon is always running in a valid UTF-8
locale, as can be seen like this:
--8<---------------cut here---------------start------------->8---
$ sudo herd status guix-daemon
Status of guix-daemon:
It is started.
Running value is 29814.
It is enabled.
Provides (guix-daemon).
Requires (user-processes).
Conflicts with ().
Will be respawned.
$ sudo cat /proc/29814/environ |tr '\0' '\n'
GUIX_LOCPATH=/gnu/store/z7a6sbvqzb5zapwpznmjkq2rsxil6i67-glibc-utf8-locales-2.31/lib/locale
LC_ALL=en_US.utf8
--8<---------------cut here---------------end--------------->8---
However, I just realized that ‘guix substitute’ switches to the client’s
locale:
--8<---------------cut here---------------start------------->8---
;; Attempt to install the client's locale, mostly so that messages are
;; suitably translated.
(match (or (find-daemon-option "untrusted-locale")
(find-daemon-option "locale"))
(#f #f)
(locale (false-if-exception (setlocale LC_ALL locale))))
--8<---------------cut here---------------end--------------->8---
Thus, if the client is running in a non-UTF-8 locale, we can end up with
the error you report.
Thanks,
Ludo’.