aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-10-03 12:13:53 +0200
committerLudovic Courtès <ludo@gnu.org>2015-10-04 00:09:29 +0200
commitb6ac54517cc878034f57f983cfe561ebf8e2eb7f (patch)
treecb9df45ab58f2aaf7ccce6613a20fb7995c27178 /gnu
parentf2d7bbb537dd3e3fa3b0215549640d2d9c0aeaec (diff)
downloadpatches-b6ac54517cc878034f57f983cfe561ebf8e2eb7f.tar
patches-b6ac54517cc878034f57f983cfe561ebf8e2eb7f.tar.gz
gnu: commencement: Remove the tricky locale compatibility handling.
This is made unnecessary by the use of 'GUIX_LOCPATH'. * gnu/packages/commencement.scm (locale-proof-package): Remove. (%boot5-inputs): Add on GLIBC-UTF8-LOCALES-FINAL. This reverts parts of commit 28cbc58. * gnu/packages/gawk.scm (gawk): Set 'GUIX_LOCPATH' instead of 'LOCPATH'.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/commencement.scm77
-rw-r--r--gnu/packages/gawk.scm2
2 files changed, 5 insertions, 74 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 56c4cefaf9..73b0ce4364 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -660,46 +660,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(current-source-location)
#:guile %bootstrap-guile))))))
-(define (locale-proof-package p)
- "Return a new package based on P that ignores 'LOCPATH'. The result is a
-\"locale-proof\" package in the sense that it cannot end up loading locale
-data that is not in the format its libc expects. This is useful because the
-locale binary format may change incompatibly between libc versions."
- (package
- (inherit p)
- (name (string-append (package-name p) "-lp"))
- (build-system trivial-build-system)
- (inputs `(("original" ,p)
- ("bash" ,bash-final)))
- (outputs '("out"))
- (arguments
- '(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
-
- (let* ((out (assoc-ref %outputs "out"))
- (bin (string-append out "/bin"))
- (bash (assoc-ref %build-inputs "bash"))
- (binaries (assoc-ref %build-inputs "original"))
- (programs (find-files (string-append binaries "/bin"))))
- (define (wrap-program program)
- (let ((base (basename program)))
- (call-with-output-file base
- (lambda (port)
- (format port "#!~a/bin/sh
-# Unset 'LOCPATH' so that the program does not end up loading incompatible
-# locale data.
-unset LOCPATH
-exec \"~a\" \"$@\"\n"
- bash program)))
- (chmod base #o755)))
-
- (mkdir-p bin)
- (with-directory-excursion bin
- (for-each wrap-program programs)
- #t)))))))
-
(define-public ld-wrapper
;; The final 'ld' wrapper, which uses the final Guile and Binutils.
(package (inherit ld-wrapper-boot3)
@@ -710,40 +670,11 @@ exec \"~a\" \"$@\"\n"
'("guile" "bash"))))))
(define %boot5-inputs
- ;; Now with UTF-8 locales. Since the locale binary format differs between
- ;; libc versions, we have to rebuild some of the packages so that they use
- ;; the new libc, which allows them to load locale data from
- ;; GLIBC-UTF8-LOCALES-FINAL (remember that the bootstrap binaries were built
- ;; with an older libc, which cannot load the new locale format.) See
+ ;; Now with UTF-8 locales. Remember that the bootstrap binaries were built
+ ;; with an older libc, which cannot load the new locale format. See
;; <https://lists.gnu.org/archive/html/guix-devel/2015-08/msg00737.html>.
- (let ((new-libc-package (compose package-with-bootstrap-guile
- (cut package-with-explicit-inputs <>
- %boot4-inputs
- (current-source-location)
- #:guile %bootstrap-guile))))
- `(("locales" ,glibc-utf8-locales-final)
- ("ld-wrapper" ,ld-wrapper)
- ("binutils" ,binutils-final)
- ("bash" ,bash-final)
- ("make" ,(new-libc-package gnu-make))
-
- ;; Some test suites (grep, Gnulib) use 'diff' to compare files in locale
- ;; encoding, so we need support this.
- ("diffutils" ,(new-libc-package diffutils))
- ("findutils" ,(new-libc-package findutils))
-
- ;; Grep's test suite uses 'timeout' from Coreutils to execute command,
- ;; and yet these commands need to see the valid 'LOCPATH'.
- ("coreutils" ,(new-libc-package coreutils-minimal))
-
- ;; We just wrap the remaining binaries (tar, gzip, xz, etc.) so that
- ;; they ignore 'LOCPATH' (if they did not, they would be hit by an
- ;; assertion failure in loadlocale.c.)
- ("coreutils&co" ,(locale-proof-package %bootstrap-coreutils&co))
-
- ,@(fold alist-delete %boot4-inputs
- '("coreutils&co" "findutils" "diffutils" "make"
- "bash" "binutils-cross" "ld-wrapper")))))
+ `(("locales" ,glibc-utf8-locales-final)
+ ,@%boot4-inputs))
(define gnu-make-final
;; The final GNU Make, which uses the final Guile.
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index d2639a32a3..fa07f5bd4b 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -63,7 +63,7 @@
;; A bunch of tests require the availability of a UTF-8
;; locale and otherwise fail. Since UTF-8 locales are not
;; available during bootstrap, create one here.
- (setenv "LOCPATH" (getcwd))
+ (setenv "GUIX_LOCPATH" (getcwd))
(zero? (system* "localedef" "--no-archive"
"--prefix" (getcwd) "-i" "en_US"
"-f" "UTF-8" "./en_US.UTF-8")))