Subject: bug#73181: guix-daemon fails when invoking ‘guix authenticate’ on the Hurd

From: Ludovic Courtès <[email-masked]>
Date: Wed, 11 Sep 2024 17:40:13 +0200

As reported by yelninei on IRC, Guix on the Hurd is in half-broken state
following the recent ‘core-updates’ merge.

Specifically, sending store items over SSH (and thus breaks offloading
too):

--8<---------------cut here---------------start------------->8---
$ guix copy --to=localhost:10022 idutils
guix copy: sending 1 store item (1 MiB) to 'localhost'...
guix copy: error: unknown error while sending files over SSH
--8<---------------cut here---------------end--------------->8---

(Here localhost:10022 is a childhurd.)

Inside the childhurd, we get:

--8<---------------cut here---------------start------------->8---
root@childhurd ~# tail -1 /var/log/guix-daemon.log 
2024-09-09 21:09:03 unexpected build daemon error: stoi
--8<---------------cut here---------------end--------------->8---

Last time we got that error was in commit
21deb89e287b5821975544118bf137562a91d4e1: guix-daemon was running with
incorrect locale data, and thus ‘std::stoi’ would throw (‘std::stoi’ in
guix-daemon is used for the communication with the ‘guix authenticate’
process, see ‘readAuthenticateReply’).

When running guix-daemon by hand instead of via the Shepherd service,
with the same environment variables, everything works, unless we set one
of the LC_* variables.

Ludo’.