all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 67824@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#67824] [PATCH core-updates v2 3/9] gnu: commencement: Remove ‘glibc-utf8-locales’ from ‘%final-inputs’.
Date: Mon, 18 Dec 2023 17:30:14 +0100	[thread overview]
Message-ID: <8f609fdf9e20d9140f149c8255b92334fae84f62.1702916397.git.ludo@gnu.org> (raw)
In-Reply-To: <cover.1702916397.git.ludo@gnu.org>

* gnu/packages/commencement.scm (%boot5-inputs): Make an alias for
‘%boot4-inputs’.
(with-boot5): Turn into an alias for ‘with-boot4’.
(%final-inputs): Override ‘native-inputs’ of GAWK.  Remove "locales"
entry.
(canonical-package): Add “glibc-utf8-locales” entry.
* gnu/packages/base.scm (libc-utf8-locales-for-target): Use
‘canonical-package’.
* gnu/packages/gawk.scm (gawk)[native-inputs]: New field.
* gnu/packages/texinfo.scm (texinfo)[native-inputs]: Add
‘libc-utf8-locales-for-target’.

Change-Id: I2283ffc6c6000c98ad2db89c04d581e050667c94
---
 gnu/packages/base.scm         | 11 ++++++++---
 gnu/packages/commencement.scm | 31 +++++++++++++++----------------
 gnu/packages/gawk.scm         |  6 +++++-
 gnu/packages/texinfo.scm      |  7 +++++--
 4 files changed, 33 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 235ad7fecc..d31c0b0772 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1593,9 +1593,14 @@ (define* (libc-locales-for-target #:optional
 (define* (libc-utf8-locales-for-target #:optional
                                        (target (or (%current-target-system)
                                                    (%current-system))))
-  (if (target-hurd? target)
-      glibc-utf8-locales/hurd
-      glibc-utf8-locales))
+  "Return the glibc UTF-8 locale package for TARGET."
+  ;; Note: To avoid circular dependencies (such as: texinfo ->
+  ;; glibc-utf8-locales -> glibc -> texinfo), refer to
+  ;; 'glibc-utf8-locales-final' via 'canonical-package'.
+  (canonical-package
+   (if (target-hurd? target)
+       glibc-utf8-locales/hurd
+       glibc-utf8-locales)))
 
 (define-public tzdata
   (package
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 988e497ee7..f4882f7cdd 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3394,17 +3394,11 @@ (define-public ld-gold-wrapper
                    #:guile guile-final
                    #:bash bash-final))
 
-(define (%boot5-inputs)
-  ;; 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>.
-  `(("locales" ,(if (target-hurd?)
-                    glibc-utf8-locales-final/hurd
-                    glibc-utf8-locales-final))
-    ,@(%boot4-inputs)))
-
-(define with-boot5
-  (package-with-explicit-inputs %boot5-inputs))
+;; There used to be a "stage 5" including a variant of the
+;; 'glibc-utf8-locales' package.  This is no longer necessary since 'glibc'
+;; embeds the "C.UTF-8" locale, but these aliases are kept for convenience.
+(define %boot5-inputs %boot4-inputs)
+(define with-boot5 with-boot4)
 
 (define gnu-make-final
   ;; The final GNU Make, which uses the final Guile.
@@ -3493,7 +3487,11 @@ (define-public %final-inputs
                    ("diffutils" ,diffutils)
                    ("patch" ,patch)
                    ("findutils" ,findutils)
-                   ("gawk" ,gawk)))
+                   ("gawk" ,(package/inherit gawk
+                              (native-inputs
+                               (list (if (target-hurd?)
+                                         glibc-utf8-locales-final/hurd
+                                         glibc-utf8-locales-final)))))))
           ("sed" ,sed-final)
           ("grep" ,grep-final)
           ("xz" ,xz-final)
@@ -3504,10 +3502,7 @@ (define-public %final-inputs
           ("binutils" ,binutils-final)
           ("gcc" ,gcc-final)
           ("libc" ,glibc-final)
-          ("libc:static" ,glibc-final "static")
-          ("locales" ,(if (target-hurd? (%current-system))
-                          glibc-utf8-locales-final/hurd
-                          glibc-utf8-locales-final)))))))
+          ("libc:static" ,glibc-final "static"))))))
 
 (define-public canonical-package
   (let ((name->package (mlambda (system)
@@ -3518,6 +3513,10 @@ (define-public canonical-package
                                                 package result))))
                                vlist-null
                                `(("guile" ,guile-final)
+                                 ("glibc-utf8-locales"
+                                  ,(if (target-hurd? system)
+                                       glibc-utf8-locales-final/hurd
+                                       glibc-utf8-locales-final))
                                  ,@(%final-inputs system))))))
     (lambda (package)
       "Return the 'canonical' variant of PACKAGE---i.e., if PACKAGE is one of
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index 2d8bc581ef..476865ada3 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2016, 2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2018, 2022, 2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org>
@@ -79,6 +79,10 @@ (define-public gawk
                     (("#! /usr/bin/gawk")
                      (string-append "#!" (which "gawk")))))))))
 
+   ;; Tests explicitly require en_US.UTF-8, fr_FR.UTF-8, ru_RU.UTF-8 and
+   ;; ja_JP.UTF-8.
+   (native-inputs (list (libc-utf8-locales-for-target)))
+
    (inputs (list libsigsegv
                  ;; Use the full-fledged Bash package, otherwise the test suite
                  ;; sometimes fail non-deterministically.
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index ab4583071e..92c9d800a9 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -38,6 +38,7 @@ (define-module (gnu packages texinfo)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ncurses)
@@ -79,10 +80,12 @@ (define-public texinfo
        #:tests? ,(and (not (target-hurd?))
                       (not (%current-target-system)))))
     (inputs (list ncurses perl))
+
     ;; When cross-compiling, texinfo will build some of its own binaries with
     ;; the native compiler. This means ncurses is needed both in both inputs
-    ;; and native-inputs.
-    (native-inputs (list perl ncurses))
+    ;; and native-inputs.  Some of its tests require extra locales such as
+    ;; fr_FR.UTF-8.
+    (native-inputs (list perl ncurses (libc-utf8-locales-for-target)))
 
     (native-search-paths
      ;; This is the variable used by the standalone Info reader.
-- 
2.41.0





  parent reply	other threads:[~2023-12-18 16:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 10:51 [bug#67824] [PATCH core-updates 0/6] Run builds in C.UTF-8 locale Ludovic Courtès
2023-12-14 13:37 ` [bug#67824] [PATCH core-updates 1/6] packages: Remove reference to ‘glibc-utf8-locales’ in ‘patch-and-repack’ Ludovic Courtès
2023-12-14 13:37 ` [bug#67824] [PATCH core-updates 2/6] build-system/gnu: Change default locale to C.UTF-8 Ludovic Courtès
2023-12-14 13:37 ` [bug#67824] [PATCH core-updates 3/6] gnu: commencement: Remove ‘glibc-utf8-locales’ from ‘%final-inputs’ Ludovic Courtès
2023-12-14 13:37 ` [bug#67824] [PATCH core-updates 4/6] profiles: Use C.UTF-8 instead of ‘glibc-utf8-locales’ where possible Ludovic Courtès
2023-12-14 13:37 ` [bug#67824] [PATCH core-updates 5/6] packages: Output and error ports are line-buffered in ‘patch-and-repack’ Ludovic Courtès
2023-12-14 13:37 ` [bug#67824] [PATCH core-updates 6/6] gnu: glibc-utf8-locales: Add the C.UTF-8 locale Ludovic Courtès
2023-12-16  8:49 ` [bug#67824] [PATCH core-updates 0/6] Run builds in " Janneke Nieuwenhuizen
2023-12-16 11:27   ` Ludovic Courtès
2023-12-16 16:47   ` Ludovic Courtès
2023-12-18 16:30 ` [bug#67824] [PATCH core-updates v2 0/9] " Ludovic Courtès
2023-12-18 16:30   ` [bug#67824] [PATCH core-updates v2 1/9] packages: Remove reference to ‘glibc-utf8-locales’ in ‘patch-and-repack’ Ludovic Courtès
2023-12-18 16:30   ` [bug#67824] [PATCH core-updates v2 2/9] build-system/gnu: Change default locale to C.UTF-8 Ludovic Courtès
2023-12-18 16:30   ` Ludovic Courtès [this message]
2023-12-18 16:30   ` [bug#67824] [PATCH core-updates v2 4/9] profiles: Use C.UTF-8 instead of ‘glibc-utf8-locales’ where possible Ludovic Courtès
2023-12-18 16:30   ` [bug#67824] [PATCH core-updates v2 5/9] packages: Output and error ports are line-buffered in ‘patch-and-repack’ Ludovic Courtès
2023-12-18 16:30   ` [bug#67824] [PATCH core-updates v2 6/9] gnu: glibc-utf8-locales: Add the C.UTF-8 locale Ludovic Courtès
2023-12-18 16:30   ` [bug#67824] [PATCH core-updates v2 7/9] gnu: glibc: Add patch for ‘ucontext’ on x86_64-gnu (GNU/Hurd) Ludovic Courtès
2023-12-18 16:30   ` [bug#67824] [PATCH core-updates v2 8/9] build-system/gnu: Turn PID 1 into an “init”-style process by default Ludovic Courtès
2023-12-18 16:30   ` [bug#67824] [PATCH core-updates v2 9/9] gnu: glib: Skip test that fails with glibc 2.38 Ludovic Courtès
2023-12-19 22:54   ` bug#67824: [PATCH core-updates v2 0/9] Run builds in C.UTF-8 locale Ludovic Courtès
2023-12-20  7:20     ` [bug#67824] " Janneke Nieuwenhuizen

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=8f609fdf9e20d9140f149c8255b92334fae84f62.1702916397.git.ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=67824@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.