aboutsummaryrefslogtreecommitdiff
path: root/gnu/services.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-06-20 10:00:44 +0200
committerLudovic Courtès <ludo@gnu.org>2018-06-20 10:05:18 +0200
commit76c321d8e85683091ecbcd3afe8c56fb7c45c00a (patch)
treed98d2452f448db71465ef920ad34a3be9856a5c1 /gnu/services.scm
parent661c237b4d8e670e73ea946179a94a3b956bb90e (diff)
downloadpatches-76c321d8e85683091ecbcd3afe8c56fb7c45c00a.tar
patches-76c321d8e85683091ecbcd3afe8c56fb7c45c00a.tar.gz
services: cleanup: Expect file names to be UTF-8-encoded.
Fixes <https://bugs.gnu.org/26353>. Reported by Danny Milosavljevic <dannym@scratchpost.org>. * gnu/services.scm (cleanup-gexp): Add 'setenv' and 'setlocale' calls before 'delete-file-recursively'. * gnu/tests/base.scm (%cleanup-os, %test-cleanup): New variables. (run-cleanup-test): New procedure.
Diffstat (limited to 'gnu/services.scm')
-rw-r--r--gnu/services.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/gnu/services.scm b/gnu/services.scm
index 3162c6ba05..55ad5c9368 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -394,8 +394,14 @@ boot."
(delete-file "/etc/passwd.lock")
(delete-file "/etc/.pwd.lock") ;from 'lckpwdf'
+ ;; Force file names to be decoded as UTF-8. See
+ ;; <https://bugs.gnu.org/26353>.
+ (setenv "GUIX_LOCPATH"
+ #+(file-append glibc-utf8-locales "/lib/locale"))
+ (setlocale LC_CTYPE "en_US.utf8")
(delete-file-recursively "/tmp")
(delete-file-recursively "/var/run")
+
(mkdir "/tmp")
(chmod "/tmp" #o1777)
(mkdir "/var/run")