From b3802495f607fd5e17c5acf0be2ee014036e2464 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 20 Jul 2020 16:12:29 +0200 Subject: pack: Build the store database under a UTF-8 locale. Fixes . Reported by branjam4@gmail.com. * guix/scripts/pack.scm (store-database)[build]: Add calls to 'setenv' and 'setlocale'. * tests/pack.scm ("self-contained-tarball + localstatedir, UTF-8 file names"): New test. --- guix/scripts/pack.scm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'guix') diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 51afaeb379..13ade37515 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -149,6 +149,11 @@ dependencies are registered." (define db-file (store-database-file #:state-directory #$output)) + ;; Make sure non-ASCII file names are properly handled. + (setenv "GUIX_LOCPATH" + #+(file-append glibc-utf8-locales "/lib/locale")) + (setlocale LC_ALL "en_US.utf8") + (sql-schema #$schema) (let ((items (append-map read-closure '#$labels))) (with-database db-file db -- cgit v1.2.3