gnu: glibc: Don't use full version string in locale path.

This is a follow-up to commit ee3ebf1a35.
Fixes <https://bugs.gnu.org/29537>.

* gnu/packages/base.scm (glibc/linux)[version]: Change to 2.26.91-gaaa2eb83b8.
[source](uri): Adjust accordingly.
[arguments]: Use VERSION-MAJOR+MINOR for locales path.
(glibc-locales, glibc-utf8-locales): Likewise.
* guix/packages.scm (patch-and-repack): Likewise.
* guix/profiles.scm (ca-certificate-bundle, profile-derivation): Likewise.
This commit is contained in:
Marius Bakke 2017-12-03 02:32:16 +01:00
parent 371193ecbf
commit c6bc8e22e9
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA
3 changed files with 16 additions and 8 deletions

View file

@ -523,11 +523,15 @@ (define-public glibc/linux
;; archive can be generated by checking out the commit ID and running: ;; archive can be generated by checking out the commit ID and running:
;; git archive --prefix=$(git describe)/ HEAD | xz -9 > $(git describe).tar.xz ;; git archive --prefix=$(git describe)/ HEAD | xz -9 > $(git describe).tar.xz
;; See <https://bugs.gnu.org/29406> for details. ;; See <https://bugs.gnu.org/29406> for details.
(version "2.26-91-gaaa2eb83b8") ;;
;; Note: Always use a dot after the minor version since various places rely
;; on "version-major+minor" to determine where locales are found.
(version "2.26.91-gaaa2eb83b8")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://alpha.gnu.org/gnu/guix/mirror/" (uri (string-append "https://alpha.gnu.org/gnu/guix/mirror/"
"glibc-" version ".tar.xz")) "glibc-" (version-major+minor version) "-"
(caddr (string-split version #\.)) ".tar.xz"))
(sha256 (sha256
(base32 (base32
"1zwz6d0x3ndd0hgqp17fx71miyjvn4dgkl1nzhaz3mbcqxzrprhk")) "1zwz6d0x3ndd0hgqp17fx71miyjvn4dgkl1nzhaz3mbcqxzrprhk"))
@ -585,7 +589,7 @@ (define-public glibc/linux
;; `--localedir' is not honored, so work around it. ;; `--localedir' is not honored, so work around it.
;; See <http://sourceware.org/ml/libc-alpha/2013-03/msg00093.html>. ;; See <http://sourceware.org/ml/libc-alpha/2013-03/msg00093.html>.
(string-append "libc_cv_complocaledir=/run/current-system/locale/" (string-append "libc_cv_complocaledir=/run/current-system/locale/"
,version) ,(version-major+minor version))
(string-append "--with-headers=" (string-append "--with-headers="
(assoc-ref ,(if (%current-target-system) (assoc-ref ,(if (%current-target-system)
@ -955,7 +959,8 @@ (define-public glibc-locales
(list (string-append "libc_cv_complocaledir=" (list (string-append "libc_cv_complocaledir="
(assoc-ref %outputs "out") (assoc-ref %outputs "out")
"/lib/locale/" "/lib/locale/"
,(package-version glibc)))))))))) ,(version-major+minor
(package-version glibc)))))))))))
(define-public glibc-utf8-locales (define-public glibc-utf8-locales
(package (package
@ -973,7 +978,7 @@ (define-public glibc-utf8-locales
(gzip (assoc-ref %build-inputs "gzip")) (gzip (assoc-ref %build-inputs "gzip"))
(out (assoc-ref %outputs "out")) (out (assoc-ref %outputs "out"))
(localedir (string-append out "/lib/locale/" (localedir (string-append out "/lib/locale/"
,version))) ,(version-major+minor version))))
;; 'localedef' needs 'gzip'. ;; 'localedef' needs 'gzip'.
(setenv "PATH" (string-append libc "/bin:" gzip "/bin")) (setenv "PATH" (string-append libc "/bin:" gzip "/bin"))

View file

@ -538,7 +538,8 @@ (define (first-file directory)
(setenv "LOCPATH" (setenv "LOCPATH"
(string-append #+locales "/lib/locale/" (string-append #+locales "/lib/locale/"
#+(and locales #+(and locales
(package-version locales)))) (version-major+minor
(package-version locales)))))
(setlocale LC_ALL "en_US.utf8")) (setlocale LC_ALL "en_US.utf8"))
(setenv "PATH" (string-append #+xz "/bin" ":" (setenv "PATH" (string-append #+xz "/bin" ":"

View file

@ -812,7 +812,8 @@ (define (dump file port)
;; install a UTF-8 locale. ;; install a UTF-8 locale.
(setenv "LOCPATH" (setenv "LOCPATH"
(string-append #+glibc-utf8-locales "/lib/locale/" (string-append #+glibc-utf8-locales "/lib/locale/"
#+(package-version glibc-utf8-locales))) #+(version-major+minor
(package-version glibc-utf8-locales))))
(setlocale LC_ALL "en_US.utf8") (setlocale LC_ALL "en_US.utf8")
(match (append-map ca-files '#$(manifest-inputs manifest)) (match (append-map ca-files '#$(manifest-inputs manifest))
@ -1256,7 +1257,8 @@ (define set-utf8-locale
#~(begin #~(begin
(setenv "LOCPATH" (setenv "LOCPATH"
#$(file-append glibc-utf8-locales "/lib/locale/" #$(file-append glibc-utf8-locales "/lib/locale/"
(package-version glibc-utf8-locales))) (version-major+minor
(package-version glibc-utf8-locales))))
(setlocale LC_ALL "en_US.utf8"))) (setlocale LC_ALL "en_US.utf8")))
(define builder (define builder