diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-06-20 10:00:44 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-06-20 10:05:18 +0200 |
commit | 76c321d8e85683091ecbcd3afe8c56fb7c45c00a (patch) | |
tree | d98d2452f448db71465ef920ad34a3be9856a5c1 /gnu/services.scm | |
parent | 661c237b4d8e670e73ea946179a94a3b956bb90e (diff) | |
download | patches-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.scm | 6 |
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") |