guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Marius Bakke
Subject: 03/05: gnu: glibc: Don't use full version string in locale path.
Date: Mon, 4 Dec 2017 07:51:34 -0500 (EST)

mbakke pushed a commit to branch core-updates
in repository guix.

commit c6bc8e22e9b02a40280a5a1cf3792647755b67bb
Author: Marius Bakke <address@hidden>
Date:   Sun Dec 3 02:32:16 2017 +0100

    gnu: glibc: Don't use full version string in locale path.
    
    This is a follow-up to commit ee3ebf1a357bd4eb36a2fa1790a7b549cffb305a.
    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.
---
 gnu/packages/base.scm | 15 ++++++++++-----
 guix/packages.scm     |  3 ++-
 guix/profiles.scm     |  6 ++++--
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index c8fd862..8190a38 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -523,11 +523,15 @@ store.")
    ;; archive can be generated by checking out the commit ID and running:
    ;; git archive --prefix=$(git describe)/ HEAD | xz -9 > $(git 
describe).tar.xz
    ;; 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
             (method url-fetch)
             (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
              (base32
               "1zwz6d0x3ndd0hgqp17fx71miyjvn4dgkl1nzhaz3mbcqxzrprhk"))
@@ -585,7 +589,7 @@ store.")
             ;; `--localedir' is not honored, so work around it.
             ;; See <http://sourceware.org/ml/libc-alpha/2013-03/msg00093.html>.
             (string-append "libc_cv_complocaledir=/run/current-system/locale/"
-                           ,version)
+                           ,(version-major+minor version))
 
             (string-append "--with-headers="
                            (assoc-ref ,(if (%current-target-system)
@@ -955,7 +959,8 @@ the 'share/locale' sub-directory of this package.")
                    (list (string-append "libc_cv_complocaledir="
                                         (assoc-ref %outputs "out")
                                         "/lib/locale/"
-                                        ,(package-version glibc))))))))))
+                                        ,(version-major+minor
+                                          (package-version glibc)))))))))))
 
 (define-public glibc-utf8-locales
   (package
@@ -973,7 +978,7 @@ the 'share/locale' sub-directory of this package.")
                           (gzip      (assoc-ref %build-inputs "gzip"))
                           (out       (assoc-ref %outputs "out"))
                           (localedir (string-append out "/lib/locale/"
-                                                    ,version)))
+                                                    ,(version-major+minor 
version))))
                      ;; 'localedef' needs 'gzip'.
                      (setenv "PATH" (string-append libc "/bin:" gzip "/bin"))
 
diff --git a/guix/packages.scm b/guix/packages.scm
index f619d9b..35f9b68 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -538,7 +538,8 @@ specifies modules in scope when evaluating SNIPPET."
               (setenv "LOCPATH"
                       (string-append #+locales "/lib/locale/"
                                      #+(and locales
-                                            (package-version locales))))
+                                            (version-major+minor
+                                             (package-version locales)))))
               (setlocale LC_ALL "en_US.utf8"))
 
             (setenv "PATH" (string-append #+xz "/bin" ":"
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 0eb99f4..51c330b 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -812,7 +812,8 @@ MANIFEST.  Single-file bundles are required by programs 
such as Git and Lynx."
           ;; install a UTF-8 locale.
           (setenv "LOCPATH"
                   (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")
 
           (match (append-map ca-files '#$(manifest-inputs manifest))
@@ -1256,7 +1257,8 @@ are cross-built for TARGET."
       #~(begin
           (setenv "LOCPATH"
                   #$(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")))
 
     (define builder



reply via email to

[Prev in Thread] Current Thread [Next in Thread]