services: guix: Use the right locale package on GNU/Hurd.
Fixes a bug introduced in 0dd293b4d9
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’.
parent
ae50099c46
commit
21deb89e28
|
@ -62,8 +62,9 @@
|
||||||
util-linux xfsprogs))
|
util-linux xfsprogs))
|
||||||
#:use-module (gnu packages bash)
|
#:use-module (gnu packages bash)
|
||||||
#:use-module ((gnu packages base)
|
#:use-module ((gnu packages base)
|
||||||
#:select (coreutils glibc glibc-utf8-locales tar
|
#:select (coreutils glibc glibc/hurd
|
||||||
canonical-package))
|
glibc-utf8-locales make-glibc-utf8-locales
|
||||||
|
tar canonical-package))
|
||||||
#:use-module ((gnu packages compression) #:select (gzip))
|
#:use-module ((gnu packages compression) #:select (gzip))
|
||||||
#:use-module (gnu packages fonts)
|
#:use-module (gnu packages fonts)
|
||||||
#:autoload (gnu packages guile-xyz) (guile-netlink)
|
#:autoload (gnu packages guile-xyz) (guile-netlink)
|
||||||
|
@ -87,6 +88,7 @@
|
||||||
#:use-module ((guix self) #:select (make-config.scm))
|
#:use-module ((guix self) #:select (make-config.scm))
|
||||||
#:use-module (guix diagnostics)
|
#:use-module (guix diagnostics)
|
||||||
#:use-module (guix i18n)
|
#:use-module (guix i18n)
|
||||||
|
#:autoload (guix utils) (target-hurd?)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
#:use-module (srfi srfi-34)
|
#:use-module (srfi srfi-34)
|
||||||
|
@ -1831,6 +1833,12 @@ proxy of 'guix-daemon'...~%")
|
||||||
|
|
||||||
(define (guix-shepherd-service config)
|
(define (guix-shepherd-service config)
|
||||||
"Return a <shepherd-service> for the Guix daemon service with 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>
|
(match-record config <guix-configuration>
|
||||||
(guix build-group build-accounts authorize-key? authorized-keys
|
(guix build-group build-accounts authorize-key? authorized-keys
|
||||||
use-substitutes? substitute-urls max-silent-time timeout
|
use-substitutes? substitute-urls max-silent-time timeout
|
||||||
|
@ -1912,8 +1920,7 @@ proxy of 'guix-daemon'...~%")
|
||||||
;; 'nss-certs'. See
|
;; 'nss-certs'. See
|
||||||
;; <https://bugs.gnu.org/32942>.
|
;; <https://bugs.gnu.org/32942>.
|
||||||
(string-append "GUIX_LOCPATH="
|
(string-append "GUIX_LOCPATH="
|
||||||
#$glibc-utf8-locales
|
#$locales "/lib/locale")
|
||||||
"/lib/locale")
|
|
||||||
"LC_ALL=en_US.utf8"
|
"LC_ALL=en_US.utf8"
|
||||||
;; Make 'tar' and 'gzip' available so
|
;; Make 'tar' and 'gzip' available so
|
||||||
;; that 'guix perform-download' can use
|
;; that 'guix perform-download' can use
|
||||||
|
|
Reference in New Issue