aboutsummaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-05-01 21:11:22 +0200
committerLudovic Courtès <ludo@gnu.org>2019-05-01 21:11:22 +0200
commit9c941364bfc0120e3ab5c5c4cc71a9a302d59a2b (patch)
tree577c20dc468cd1dee43c626d690a7471445ba7ea /gnu/system
parent17acc215bfee2d5ee487add8fc8917fbf9d61132 (diff)
downloadpatches-9c941364bfc0120e3ab5c5c4cc71a9a302d59a2b.tar
patches-9c941364bfc0120e3ab5c5c4cc71a9a302d59a2b.tar.gz
vm: Build ISOs and VM images in a UTF-8 environment.
Fixes a bug whereby building an image containing non-ASCII file names would fail due to improper decoding of file names. * gnu/system/vm.scm (iso9660-image, qemu-image): Set GUIX_LOCPATH and call 'setlocale' in the build environment.
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/vm.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 92b03b01ad..124abd0fc9 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -283,6 +283,11 @@ INPUTS is a list of inputs (as for packages)."
(sql-schema #$schema)
+ ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be decoded.
+ (setenv "GUIX_LOCPATH"
+ #+(file-append glibc-utf8-locales "/lib/locale"))
+ (setlocale LC_ALL "en_US.utf8")
+
(let ((inputs
'#$(append (list qemu parted e2fsprogs dosfstools xorriso)
(map canonical-package
@@ -379,6 +384,11 @@ the image."
(sql-schema #$schema)
+ ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be decoded.
+ (setenv "GUIX_LOCPATH"
+ #+(file-append glibc-utf8-locales "/lib/locale"))
+ (setlocale LC_ALL "en_US.utf8")
+
(let ((inputs
'#$(append (list qemu parted e2fsprogs dosfstools)
(map canonical-package