From: "Ludovic Courtès" <ludo@gnu.org>
To: 67686@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#67686] [PATCH core-updates 4/5] gnu: glibc: Install C.UTF-8 locale.
Date: Thu, 7 Dec 2023 11:22:47 +0100 [thread overview]
Message-ID: <3e187cf8646059a513b502a17abe9f88daae6f6b.1701943221.git.ludo@gnu.org> (raw)
In-Reply-To: <cover.1701943221.git.ludo@gnu.org>
* gnu/packages/base.scm (glibc)[arguments]: Add ‘install-utf8-c-locale’
phase.
(glibc-2.35)[arguments]: Delete ‘install-utf8-c-locale’ phase.
(glibc-2.33, glibc-2.32, glibc-2.31): Inherit from ‘glibc-2.35’.
Change-Id: I7ba515184c7b7c40eaefd355639ffef8eeca66d8
---
gnu/packages/base.scm | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index c5eac8a2da..985cd627fe 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1023,6 +1023,21 @@ (define-public glibc
(map (cut string-append slib "/" <>)
files))))))
+ (add-after 'install 'install-utf8-c-locale
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Install the C.UTF-8 locale so there's always a UTF-8
+ ;; locale around.
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (locale (string-append out "/lib/locale/"
+ ,(package-version
+ this-package))))
+ (mkdir-p locale)
+ (invoke (string-append bin "/localedef")
+ "--no-archive" "--prefix" locale
+ "-i" "C" "-f" "UTF-8"
+ (string-append locale "/C.UTF-8")))))
+
,@(if (target-hurd?)
'((add-after 'install 'augment-libc.so
(lambda* (#:key outputs #:allow-other-keys)
@@ -1108,11 +1123,19 @@ (define-public glibc-2.35
"glibc-hurd-clock_t_centiseconds.patch"
"glibc-hurd-clock_gettime_monotonic.patch"
"glibc-hurd-mach-print.patch"
- "glibc-hurd-gettyent.patch"))))))
+ "glibc-hurd-gettyent.patch"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments glibc)
+ ((#:phases phases)
+ ;; The C.UTF-8 fails to build in glibc 2.35:
+ ;; <https://sourceware.org/bugzilla/show_bug.cgi?id=28861>.
+ ;; It is missing altogether in versions earlier than 2.35.
+ `(modify-phases ,phases
+ (delete 'install-utf8-c-locale)))))))
(define-public glibc-2.33
(package
- (inherit glibc)
+ (inherit glibc-2.35)
(name "glibc")
(version "2.33")
(source (origin
@@ -1139,7 +1162,7 @@ (define-public glibc-2.33
(define-public glibc-2.32
(package
- (inherit glibc)
+ (inherit glibc-2.35)
(version "2.32")
(source (origin
(inherit (package-source glibc))
@@ -1194,7 +1217,7 @@ (define-public glibc-2.32
(define-public glibc-2.31
(package
- (inherit glibc)
+ (inherit glibc-2.35)
(version "2.31")
(source (origin
(inherit (package-source glibc))
--
2.41.0
next prev parent reply other threads:[~2023-12-07 10:24 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 10:19 [bug#67686] [PATCH core-updates 0/5] Update glibc to 2.38; make C.UTF-8 always available Ludovic Courtès
2023-12-07 10:22 ` [bug#67686] [PATCH core-updates 1/5] gnu: gcc@11: Update to 11.4.0 Ludovic Courtès
2023-12-07 20:11 ` Janneke Nieuwenhuizen
2023-12-07 21:13 ` Ludovic Courtès
2023-12-07 10:22 ` [bug#67686] [PATCH core-updates 2/5] gnu: glibc-utf8-locales: Generalize and use gexps Ludovic Courtès
2023-12-07 10:22 ` [bug#67686] [PATCH core-updates 3/5] DRAFT gnu: glibc: Update to 2.38 Ludovic Courtès
2023-12-07 10:22 ` Ludovic Courtès [this message]
2023-12-07 10:30 ` [bug#67686] [PATCH core-updates 4/5] gnu: glibc: Install C.UTF-8 locale Ludovic Courtès
2023-12-07 20:31 ` Janneke Nieuwenhuizen
2023-12-07 21:12 ` Ludovic Courtès
2023-12-07 21:26 ` Ludovic Courtès
2023-12-09 16:33 ` Efraim Flashner
2023-12-09 21:41 ` Ludovic Courtès
2023-12-10 7:24 ` Efraim Flashner
2023-12-07 10:22 ` [bug#67686] [PATCH core-updates 5/5] gnu: glibc: Ensure C.UTF-8 locale is always found Ludovic Courtès
2023-12-07 22:54 ` [bug#67686] [PATCH core-updates v2 0/7] Update glibc to 2.38; make C.UTF-8 always available Ludovic Courtès
2023-12-07 22:54 ` [bug#67686] [PATCH core-updates v2 1/7] gnu: gcc@11: Update to 11.4.0 Ludovic Courtès
2023-12-08 17:39 ` Janneke Nieuwenhuizen
2023-12-07 22:54 ` [bug#67686] [PATCH core-updates v2 2/7] gnu: glibc-utf8-locales: Generalize and use gexps Ludovic Courtès
2023-12-07 22:54 ` [bug#67686] [PATCH core-updates v2 3/7] gnu: mpfr: Update to 4.2.1 Ludovic Courtès
2023-12-07 22:54 ` [bug#67686] [PATCH core-updates v2 4/7] DRAFT gnu: glibc: Update to 2.38 Ludovic Courtès
2023-12-09 21:44 ` Ludovic Courtès
2023-12-10 10:14 ` Ludovic Courtès
2023-12-07 22:54 ` [bug#67686] [PATCH core-updates v2 5/7] gnu: glibc: Install C.UTF-8 locale Ludovic Courtès
2023-12-07 22:54 ` [bug#67686] [PATCH core-updates v2 6/7] gnu: glibc: Ensure C.UTF-8 locale is always found Ludovic Courtès
2023-12-07 22:54 ` [bug#67686] [PATCH core-updates v2 7/7] gnu: glibc: Improve handling of empty .a files Ludovic Courtès
2023-12-09 14:58 ` bug#67686: [PATCH core-updates v2 0/7] Update glibc to 2.38; make C.UTF-8 always available Ludovic Courtès
2023-12-09 16:37 ` [bug#67686] " Efraim Flashner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e187cf8646059a513b502a17abe9f88daae6f6b.1701943221.git.ludo@gnu.org \
--to=ludo@gnu.org \
--cc=67686@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.