unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Adam Griffiths <adam.lw.griffiths@gmail.com>
Cc: 43039@debbugs.gnu.org
Subject: bug#43039: Vanilla GUIX 1.1.0 reconfigure fails on nss-certs
Date: Fri, 28 Aug 2020 16:05:45 +0200	[thread overview]
Message-ID: <877dtiq30m.fsf@gnu.org> (raw)
In-Reply-To: <CAFgA=J4xLub19T8hBcr2aHMoj6y_7JUCyf41tE0Hs9AQfxgS3w@mail.gmail.com> (Adam Griffiths's message of "Tue, 25 Aug 2020 20:43:29 +1000")

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’.




  parent reply	other threads:[~2020-08-28 14:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-25 10:43 bug#43039: Vanilla GUIX 1.1.0 reconfigure fails on nss-certs Adam Griffiths
2020-08-27  1:21 ` conjaroy
2020-08-28 14:05 ` Ludovic Courtès [this message]
2020-08-29  3:10   ` Adam Griffiths
2020-09-02 15:21     ` Ludovic Courtès
     [not found] ` <handler.43039.D43039.159906009821340.notifdone@debbugs.gnu.org>
2020-09-02 23:57   ` bug#43039: closed (Re: bug#43039: Vanilla GUIX 1.1.0 reconfigure fails on nss-certs) Adam Griffiths

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877dtiq30m.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=43039@debbugs.gnu.org \
    --cc=adam.lw.griffiths@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).