[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
16/24: services: guix: Use the right locale package on GNU/Hurd.
From: |
guix-commits |
Subject: |
16/24: services: guix: Use the right locale package on GNU/Hurd. |
Date: |
Fri, 29 Sep 2023 06:10:55 -0400 (EDT) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit 3bb48fb16a81a4f988fefb0b43bbb35363ad4bbc
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Sep 22 14:54:06 2023 +0200
services: guix: Use the right locale package on GNU/Hurd.
Fixes a bug introduced in 0dd293b4d9095137c9952e16ca951f887b7e7018
whereby guix-daemon on GNU/Hurd would have ‘GUIX_LOCPATH’ set to the
“wrong” locale data (2.35 instead of 2.37).
Consequently, it would fail to setlocale(3) and calls to
‘std::stoi’ (when reading the output of ‘guix authenticate’) would
throw, leading to this error message of guix-daemon:
unexpected build daemon error: stoi
This would manifest when sending store items to a childhurd:
$ guix copy --to=localhost:10022 sed
guix copy: sending 1 store item (1 MiB) to 'localhost'...
guix copy: error: unknown error while sending files over SSH
The “unknown error” is the ‘stoi’ exception.
This commit fixes that, but for the ‘guix-daemon’ service only.
* gnu/services/base.scm (guix-shepherd-service)[locales]: New variable.
Use it instead of ‘glibc-utf8-locales’.
---
gnu/services/base.scm | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 0ad36658d8..007f8c11ed 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -63,8 +63,9 @@
util-linux xfsprogs))
#:use-module (gnu packages bash)
#:use-module ((gnu packages base)
- #:select (coreutils glibc glibc-utf8-locales tar
- canonical-package))
+ #:select (coreutils glibc glibc/hurd
+ glibc-utf8-locales make-glibc-utf8-locales
+ tar canonical-package))
#:use-module ((gnu packages compression) #:select (gzip))
#:use-module (gnu packages fonts)
#:autoload (gnu packages guile-xyz) (guile-netlink)
@@ -88,6 +89,7 @@
#:use-module ((guix self) #:select (make-config.scm))
#:use-module (guix diagnostics)
#:use-module (guix i18n)
+ #:autoload (guix utils) (target-hurd?)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
@@ -1832,6 +1834,12 @@ proxy of 'guix-daemon'...~%")
(define (guix-shepherd-service config)
"Return a <shepherd-service> for the Guix daemon service with CONFIG."
+ (define locales
+ (let-system (system target)
+ (if (target-hurd? (or target system))
+ (make-glibc-utf8-locales glibc/hurd)
+ glibc-utf8-locales)))
+
(match-record config <guix-configuration>
(guix build-group build-accounts authorize-key? authorized-keys
use-substitutes? substitute-urls max-silent-time timeout
@@ -1913,8 +1921,7 @@ proxy of 'guix-daemon'...~%")
;; 'nss-certs'. See
;; <https://bugs.gnu.org/32942>.
(string-append "GUIX_LOCPATH="
- #$glibc-utf8-locales
- "/lib/locale")
+ #$locales "/lib/locale")
"LC_ALL=en_US.utf8"
;; Make 'tar' and 'gzip' available so
;; that 'guix perform-download' can use
- 11/24: Revert "system: bare-hurd.tmpl: Include glibc-2.33 locales in cross-build.", (continued)
- 11/24: Revert "system: bare-hurd.tmpl: Include glibc-2.33 locales in cross-build.", guix-commits, 2023/09/29
- 08/24: DRAFT daemon: Support chroot builds on GNU/Hurd., guix-commits, 2023/09/29
- 09/24: Revert "DRAFT daemon: Support chroot builds on GNU/Hurd.", guix-commits, 2023/09/29
- 10/24: system: bare-hurd.tmpl: Include glibc-2.33 locales in cross-build., guix-commits, 2023/09/29
- 17/24: services: guix: Support declarative offloading setup., guix-commits, 2023/09/29
- 18/24: services: childhurd: Authorize the childhurd’s key on the host., guix-commits, 2023/09/29
- 19/24: services: hurd-vm: ‘image’ field has to be an <image> record., guix-commits, 2023/09/29
- 20/24: tests: hurd-vm: Remove custom disk image configuration., guix-commits, 2023/09/29
- 21/24: services: hurd-vm: Disable password-based authentication for root., guix-commits, 2023/09/29
- 22/24: doc: Give an example showing how to add an account in the childhurd., guix-commits, 2023/09/29
- 16/24: services: guix: Use the right locale package on GNU/Hurd.,
guix-commits <=
- 23/24: services: hurd-vm: Implement zero-configuration offloading., guix-commits, 2023/09/29
- 24/24: gnu: guix: Update to 1.4.0-12.449ed59b54., guix-commits, 2023/09/29