[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/11: pack: 'self-contained-tarball' runs derivation in a UTF-8local.
From: |
guix-commits |
Subject: |
03/11: pack: 'self-contained-tarball' runs derivation in a UTF-8local. |
Date: |
Mon, 20 Jul 2020 17:26:11 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 181e0dddd68dc58190bd4831ea5d1ecbd420d83a
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Jul 20 16:11:24 2020 +0200
pack: 'self-contained-tarball' runs derivation in a UTF-8local.
* guix/scripts/pack.scm (self-contained-tarball)
[set-utf8-locale]: New variable.
[build]: Use it.
* tests/pack.scm ("self-contained-tarball"): Use a <profile> record
instead of 'profile-derivation'.
---
guix/scripts/pack.scm | 12 ++++++++++++
tests/pack.scm | 8 ++++----
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 5bd405a..51afaeb 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -181,6 +181,15 @@ added to the pack."
(file-append (store-database (list profile))
"/db/db.sqlite")))
+ (define set-utf8-locale
+ ;; Arrange to not depend on 'glibc-utf8-locales' when using '--bootstrap'.
+ (and (or (not (profile? profile))
+ (profile-locales? profile))
+ #~(begin
+ (setenv "GUIX_LOCPATH"
+ #+(file-append glibc-utf8-locales "/lib/locale"))
+ (setlocale LC_ALL "en_US.utf8"))))
+
(define build
(with-imported-modules (source-module-closure
`((guix build utils)
@@ -226,6 +235,9 @@ added to the pack."
"cf" "/dev/null" "--files-from=/dev/null"
"--sort=name")))
+ ;; Make sure non-ASCII file names are properly handled.
+ #+set-utf8-locale
+
;; Add 'tar' to the search path.
(setenv "PATH" #+(file-append archiver "/bin"))
diff --git a/tests/pack.scm b/tests/pack.scm
index 0c1406e..cb7e110 100644
--- a/tests/pack.scm
+++ b/tests/pack.scm
@@ -57,10 +57,10 @@
(unless (network-reachable?) (test-skip 1))
(test-assertm "self-contained-tarball" %store
(mlet* %store-monad
- ((profile (profile-derivation (packages->manifest
- (list %bootstrap-guile))
- #:hooks '()
- #:locales? #f))
+ ((profile -> (profile
+ (content (packages->manifest (list %bootstrap-guile)))
+ (hooks '())
+ (locales? #f)))
(tarball (self-contained-tarball "pack" profile
#:symlinks '(("/bin/Guile"
-> "bin/guile"))
- branch master updated (4874cae -> 64066ab), guix-commits, 2020/07/20
- 07/11: download: Add Savannah mirror., guix-commits, 2020/07/20
- 10/11: json: Re-export 'define-json-mapping' from (json) when available., guix-commits, 2020/07/20
- 09/11: gnu-maintenance: 'kernel.org' and 'savannah' updaters rewrite URLs., guix-commits, 2020/07/20
- 01/11: gnu: guile-ssh: Update to 0.13.0., guix-commits, 2020/07/20
- 11/11: gnu: python-aionotify: Fix test cases with Python 3.8., guix-commits, 2020/07/20
- 03/11: pack: 'self-contained-tarball' runs derivation in a UTF-8local.,
guix-commits <=
- 02/11: ssh: Speed up RPCs by using #:nodelay., guix-commits, 2020/07/20
- 05/11: gnu-maintenance: 'latest-html-release' honors #:file->signature., guix-commits, 2020/07/20
- 04/11: pack: Build the store database under a UTF-8 locale., guix-commits, 2020/07/20
- 06/11: gnu-maintenance: Add 'savannah' updater., guix-commits, 2020/07/20
- 08/11: upstream: Use 'warning' instead of 'format'., guix-commits, 2020/07/20