Subject: Re: bug#36076: Manual should clarify that glibc-utf8-locales is needed by default on foreign distros

From: Giovanni Biscuolo <[email-masked]>
Date: Wed, 05 Jun 2019 19:28:25 +0200

Hello Jack,

I'm also on foreign distro so maybe I could help to clarify what's
missing here

Did you use the last shell installer script [1] you or did it
"manually" using the last binary tarball?

[1] https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh

Jack Hill <[email-masked]> writes:

[...]

> application setup. I installed the glibc-locales package in both my user's 
> profile and root's so that the locales would be available to
> guix-daemon.

I installed glibc-utf8-locales in the root profile:

--8<---------------cut here---------------start------------->8---
glibc-utf8-locales	2.28	out	/gnu/store/94k5w17z54w25lgp90czdqfv9m4hwzhq-glibc-utf8-locales-2.28
--8<---------------cut here---------------end--------------->8---

and both in my user profile:

--8<---------------cut here---------------start------------->8---
glibc-utf8-locales	2.28	out	/gnu/store/94k5w17z54w25lgp90czdqfv9m4hwzhq-glibc-utf8-locales-2.28
glibc-locales	2.28	out	/gnu/store/acl2wxzzkkcjv74rlqswdf9p8pwddlmk-glibc-locales-2.28
--8<---------------cut here---------------end--------------->8---

> However, I was surprised that even though I had the full set of locales 
> available guix-daemon couldn't find the locale it was looking for.

Please are you able to reproduce the error you got from guix-daemon?
What's the error message?

> This is 
> because the default systemd unit for guix-daemon configures it to use the 
> en_US.utf8 locale which is provided by glibc-utf8-locales (en_US.UTF-8 is 
> in glibc-locales).

Well, actually both en_US.utf8 and en_US.UTF-8 are both in
glibc-utf8-locales:

--8<---------------cut here---------------start------------->8---
~$ ls -lah /var/guix/profiles/per-user/root/guix-profile/lib/locale/2.28/ | grep en_US
dr-xr-xr-x 3 root root 4.0K Jan  1  1970 en_US.utf8
lrwxrwxrwx 3 root root   10 Jan  1  1970 en_US.UTF-8 -> en_US.utf8
--8<---------------cut here---------------end--------------->8---

and glibc-locales

--8<---------------cut here---------------start------------->8---
$ ls -lah /var/guix/profiles/per-user/giovanni/guix-profile/lib/locale/2.28/ | grep en_US
lrwxrwxrwx 33 root root   84 Jan  1  1970 en_US -> /gnu/store/acl2wxzzkkcjv74rlqswdf9p8pwddlmk-glibc-locales-2.28/lib/locale/2.28/en_US
lrwxrwxrwx 33 root root   94 Jan  1  1970 en_US.utf8 -> /gnu/store/94k5w17z54w25lgp90czdqfv9m4hwzhq-glibc-utf8-locales-2.28/lib/locale/2.28/en_US.utf8
dr-xr-xr-x  3 root root 4.0K Jan  1  1970 en_US.UTF-8
--8<---------------cut here---------------end--------------->8---

So AFAIU glibc-locales provides both en_US.UTF-8 and en_US.utf8 that is
used by guix-daemon.

HTH! Gio'.

-- 
Giovanni Biscuolo

Xelera IT Infrastructures