From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 14 07:59:44 2023 Received: (at submit) by debbugs.gnu.org; 14 Dec 2023 12:59:44 +0000 Received: from localhost ([127.0.0.1]:48872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDlJX-00073o-Sb for submit@debbugs.gnu.org; Thu, 14 Dec 2023 07:59:44 -0500 Received: from lists.gnu.org ([2001:470:142::17]:46580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDlJW-000737-2o for submit@debbugs.gnu.org; Thu, 14 Dec 2023 07:59:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDjJy-0002lH-Ch for guix-patches@gnu.org; Thu, 14 Dec 2023 05:52:02 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDjJx-0001bd-Ec; Thu, 14 Dec 2023 05:52:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=KayY8RNd0k21v8hl3BbjH/xhFvcxJTEvLA0jSOXfTEY=; b=dCUjQvIC9udvy4 8ThsadFQ7Qm0cnlN3r+htOAIBvVQMh6A1g+70UMpcBIyRaPTK8LrFvD8omdBh8fku/xhT8I7EaJd3 H/RoYj+V+NMaGErqoKYCA/bokkKbKPsmqA+Rh8pq0MhVMyTMl9towMSGgy9DHhoO12CEsilotli3A O76gq5IcxdsjVMqY8vGadYetPr0r4OBYbyVHDQDyOcFRkl46QFzEwzXhTma1ftvjMgIlnzoc8iTs5 FVFQNfWd6bhFi6IOo/8FLqY2Pjnly34AqJi3hjshlUAW7hngXsSAtZ3W5rZofSTMK8zZykSOrKvbP 9Fpu1TR0pxeSXQn9OmVg==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: guix-patches@gnu.org Subject: [PATCH core-updates 0/6] Run builds in C.UTF-8 locale Date: Thu, 14 Dec 2023 11:51:29 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Tobias Geerinckx-Rice , Maxim Cournoyer , Janneke Nieuwenhuizen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, This is the logical followup to : running builds in the C.UTF-8 locale (instead of en_US.UTF-8) and removing ‘glibc-utf8-locales’ from the set of implicit inputs. Tested on x86_64-linux with: guix build texinfo nss-certs make check TESTS=tests/profiles.scm I’d like to merge it soon so we can move forward. Let me know what you think! Ludo’. Ludovic Courtès (6): packages: Remove reference to ‘glibc-utf8-locales’ in ‘patch-and-repack’. build-system/gnu: Change default locale to C.UTF-8. gnu: commencement: Remove ‘glibc-utf8-locales’ from ‘%final-inputs’. profiles: Use C.UTF-8 instead of ‘glibc-utf8-locales’ where possible. packages: Output and error ports are line-buffered in ‘patch-and-repack’. gnu: glibc-utf8-locales: Add the C.UTF-8 locale. gnu/packages/base.scm | 23 ++++++++++++++++++----- gnu/packages/commencement.scm | 31 +++++++++++++++---------------- gnu/packages/gawk.scm | 6 +++++- gnu/packages/texinfo.scm | 7 +++++-- guix/build-system/gnu.scm | 4 ++-- guix/packages.scm | 34 +++++++++++++++++----------------- guix/profiles.scm | 33 +++++---------------------------- tests/profiles.scm | 7 +------ 8 files changed, 68 insertions(+), 77 deletions(-) base-commit: e4013b31266b40dc9cb250c44b2088d3931cb3b3 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 14 08:38:10 2023 Received: (at 67824) by debbugs.gnu.org; 14 Dec 2023 13:38:10 +0000 Received: from localhost ([127.0.0.1]:48950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDluk-0007EC-Dc for submit@debbugs.gnu.org; Thu, 14 Dec 2023 08:38:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDlui-0007Dx-LF for 67824@debbugs.gnu.org; Thu, 14 Dec 2023 08:38:09 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDluc-0002fr-Ko; Thu, 14 Dec 2023 08:38:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=esGTSCCwbyWAuZisK1NnkyH8jwizKtf2uxVtQOahA4M=; b=j6SzzXJdMe5/JodZ2Mmc 5yN9qej3jDdoy5P68nrRAAiLIM8BQ0xYlYEheqBa8HF23Atd1q3qj0DGqUWw/+qW8Zkk2oScObaEI uDpzzk/ecDQ/JyoRcN+vdvO+HublE2Esi2Ll+bPd/tXvjKHWKIZ8H+tqRt/RgcnT/ronHWm/1k/v7 2AA7IG0uGuvMGdudcaDI+TieFxXwQhEjezSlX5aHpje7oilGdSC/LEQfA54cwsLuxifxVeWVSJoM2 tdEISymY2BvCp6UdrgH7EPXKeyW+V47zvzqMGZELu0YRESLDigau3WSh6LEnTbc+8ILtR+f84+U56 bVW9BQ/eVlxuJQ==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates 1/6] =?UTF-8?q?packages:=20Remove=20reference?= =?UTF-8?q?=20to=20=E2=80=98glibc-utf8-locales=E2=80=99=20in=20=E2=80=98pa?= =?UTF-8?q?tch-and-repack=E2=80=99.?= Date: Thu, 14 Dec 2023 14:37:37 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a followup to 1cebc334a77030c0c94955981652f4df7608c9e3. * guix/packages.scm (%standard-patch-inputs): Remove “locales” entry. (patch-and-repack): Remove ‘locales’ variable. [build]: Remove reference to ‘locales’. Use “C.UTF-8” unconditionally. Change-Id: I54219b232880e05534599fbba8738cc00fb5d568 --- guix/packages.scm | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index 930b1a3b0e..4b0c478ff4 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -866,13 +866,7 @@ (define (%standard-patch-inputs system) ("gzip" ,(ref '(gnu packages compression) 'gzip)) ("lzip" ,(ref '(gnu packages compression) 'lzip)) ("unzip" ,(ref '(gnu packages compression) 'unzip)) - ("patch" ,(ref '(gnu packages base) 'patch)) - ("locales" - ,(parameterize ((%current-target-system #f) - (%current-system system)) - (canonical - ((module-ref (resolve-interface '(gnu packages base)) - 'libc-utf8-locales-for-target)))))))) + ("patch" ,(ref '(gnu packages base) 'patch))))) (define (default-guile) "Return the default Guile package used to run the build code of @@ -955,7 +949,6 @@ (define* (patch-and-repack source patches (lzip (lookup-input "lzip")) (xz (lookup-input "xz")) (patch (lookup-input "patch")) - (locales (lookup-input "locales")) (comp (and=> (compressor source-file-name) lookup-input)) (patches (map instantiate-patch patches))) (define build @@ -1017,15 +1010,17 @@ (define* (patch-and-repack source patches ;; Encoding/decoding errors shouldn't be silent. (fluid-set! %default-port-conversion-strategy 'error) - (when #+locales - ;; First of all, install a UTF-8 locale so that UTF-8 file names - ;; are correctly interpreted. During bootstrap, LOCALES is #f. - (setenv "LOCPATH" - (string-append #+locales "/lib/locale/" - #+(and locales - (version-major+minor - (package-version locales))))) - (setlocale LC_ALL "en_US.utf8")) + ;; First of all, install a UTF-8 locale so that UTF-8 file names + ;; are correctly interpreted. During bootstrap, locales are + ;; missing. + (let ((locale "C.UTF-8")) + (catch 'system-error + (lambda () + (setlocale LC_ALL locale)) + (lambda args + (format (current-error-port) + "failed to install '~a' locale: ~a~%" + locale (system-error-errno args))))) (setenv "PATH" (string-append #+xz "/bin" -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 14 08:38:19 2023 Received: (at 67824) by debbugs.gnu.org; 14 Dec 2023 13:38:19 +0000 Received: from localhost ([127.0.0.1]:48954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDlus-0007EY-QC for submit@debbugs.gnu.org; Thu, 14 Dec 2023 08:38:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDlur-0007EL-86 for 67824@debbugs.gnu.org; Thu, 14 Dec 2023 08:38:17 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDlum-0002nR-MO; Thu, 14 Dec 2023 08:38:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=yEzo0D57tC1n5USaZP8ls4vTfLo1FE5r2OarIyYJPK4=; b=ozuFdqB+Jk9ZHjLYwLct dlAtI3zZUBz8wQQ4Ct/FAThb3t/Alq6xViHAQG7ANKAmDYuMscqo667BbBqHgtchCfX6BJnJXas6D FIhItzY6VmT7nPICErAJ4kaIhkQx2qcEWeeMCqUn9BhCyzIhbjx5WsocGm+sgR5YdOTM+QDq8gQPz sOeyQzCIu9Gk0HiKy2b4E05QdNcu4Fp/5iyZcdpiMajjxRw6Kr2oPmZTCfybn+NM460TDLNemW0Mv B2nZNerLcdZLsB/wPCb/aAagK+ZI6oMEieOT8Q7qA7KCUzbZIpeWNoAf486tlttya5VBWDIO2hWUz +RGNGyAoHWQQEw==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates 2/6] build-system/gnu: Change default locale to C.UTF-8. Date: Thu, 14 Dec 2023 14:37:38 +0100 Message-ID: <1df36313ccd91f5249261ae14d222658d5564183.1702550735.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a followup to 1cebc334a77030c0c94955981652f4df7608c9e3. * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): #:locale now defaults to "C.UTF-8". Change-Id: I9a4bfe564bcd8bbd0d57ba04568eb6b8020bd051 --- guix/build-system/gnu.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index ed1dc33c76..0f886fe21d 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -361,7 +361,7 @@ (define* (gnu-build name inputs (make-dynamic-linker-cache? #t) (license-file-regexp %license-file-regexp) (phases '%standard-phases) - (locale "en_US.utf8") + (locale "C.UTF-8") (system (%current-system)) (build (nix-system->gnu-triplet system)) (imported-modules %default-gnu-imported-modules) @@ -501,7 +501,7 @@ (define* (gnu-cross-build name (license-file-regexp %license-file-regexp) (phases '%standard-phases) - (locale "en_US.utf8") + (locale "C.UTF-8") (system (%current-system)) (build (nix-system->gnu-triplet system)) (imported-modules %default-gnu-imported-modules) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 14 08:38:27 2023 Received: (at 67824) by debbugs.gnu.org; 14 Dec 2023 13:38:27 +0000 Received: from localhost ([127.0.0.1]:48961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDlv0-0007Ev-5b for submit@debbugs.gnu.org; Thu, 14 Dec 2023 08:38:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDlux-0007EX-PZ for 67824@debbugs.gnu.org; Thu, 14 Dec 2023 08:38:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDlus-0002xS-UX; Thu, 14 Dec 2023 08:38:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=r9wGA/+CXEPOp5EOH40rNSzpYDxMrzUg+jLA9nlIY2s=; b=sDXq6sGm8mnraPfx75Gx 97/rdbhdcdEUc1D4qf6ux7fDjbyeZ5ghnq/2D/UZDBHiC1fG0NqiX7wMB9CpVLSMSrqLqT/PDf5ZB YQ8DtcVRmE6EWN7qi4LrObvJ8mqu8KLi+6tb5bkGX4aQgTuolLVL2cd0caVpGdQwAw5mvJOjDYXA5 OPg8hb5BLYWOyyDanAl6DtbO5yfaW+knfmIlBmpf4hm8K2JoEzYzhdw1Upkbej5Cf2oJ9GX4b1lEx WZBs1NvMkJ+b2iZA/rtoiMdpy9bUVdz1BJq/VUhgfSCpb9zkzrnH0llixVL0lalcanLXYUJmDtofP THt2vw6lR65EPw==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates 3/6] =?UTF-8?q?gnu:=20commencement:=20Remove?= =?UTF-8?q?=20=E2=80=98glibc-utf8-locales=E2=80=99=20from=20=E2=80=98%fina?= =?UTF-8?q?l-inputs=E2=80=99.?= Date: Thu, 14 Dec 2023 14:37:39 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * 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 - ;; . - `(("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 +;;; Copyright © 2012-2016, 2023 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2018, 2022, 2023 Efraim Flashner ;;; Copyright © 2021, 2022 Marius Bakke @@ -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 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 14 08:38:29 2023 Received: (at 67824) by debbugs.gnu.org; 14 Dec 2023 13:38:29 +0000 Received: from localhost ([127.0.0.1]:48963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDlv2-0007FF-8X for submit@debbugs.gnu.org; Thu, 14 Dec 2023 08:38:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDluz-0007Eh-KY for 67824@debbugs.gnu.org; Thu, 14 Dec 2023 08:38:26 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDluu-0002yf-TK; Thu, 14 Dec 2023 08:38:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=TwvTpdL8/xMKO5FWaa90V1adDxfqVe8ftAvsBI051cA=; b=ihjtVFc4hTCdn7wJaOYR 868oUujS4J+8UNYFrL6iVKqAWRIw+hFnj55tlcUWYSiUB1jBl7tMAccRRKGuRVLpaVzRLEG+ou1UC LT46z8CMKU3+tl0JFm7IHM37qbBMQ5XyoM2jzf4fgeHVyBpqnsWDOvPkcKoY19UvW5KDZkvjlps8S ZPbfostr6XAeBQpVQ51A8Gc+XelmAc0I3oVK3xjToIwg/9J3yh8tvf1NJ3rO5PAHUvpnmAp5dMtFy 601RTa3HPAfao1W9l3VudwBMcITSukS1IpBi0AYYpFtv283psa6o3/9gqvjXZQ/gc26PIcydrvVRc QMQ8pHtDYN2C9Q==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates 4/6] =?UTF-8?q?profiles:=20Use=20C.UTF-8=20in?= =?UTF-8?q?stead=20of=20=E2=80=98glibc-utf8-locales=E2=80=99=20where=20pos?= =?UTF-8?q?sible.?= Date: Thu, 14 Dec 2023 14:37:40 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a followup to 1cebc334a77030c0c94955981652f4df7608c9e3. * guix/profiles.scm (ca-certificate-bundle)[libc-utf8-locales-for-target]: Remove. [build]: Use “C.UTF-8” instead of “en_US.utf8”. (profile-derivation)[libc-utf8-locales-for-target]: Remove. [set-utf8-locale]: Rewrite to a gexp that calls ‘setlocale’ for “C.UTF-8”. * tests/profiles.scm ("profile-derivation, cross-compilation"): Remove ‘locales’ variable and related check. Change-Id: I7cb148b9149fe5fbe5b9b1b25fdce1002ad1f37e --- guix/profiles.scm | 33 +++++---------------------------- tests/profiles.scm | 7 +------ 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index ce2f8337bf..da7790d819 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1125,11 +1125,6 @@ (define* (ca-certificate-bundle manifest #:optional system) MANIFEST. Single-file bundles are required by programs such as Git and Lynx." ;; See ;; for a discussion. - - (define libc-utf8-locales-for-target ;lazy reference - (module-ref (resolve-interface '(gnu packages base)) - 'libc-utf8-locales-for-target)) - (define build (with-imported-modules '((guix build utils)) #~(begin @@ -1161,13 +1156,7 @@ (define* (ca-certificate-bundle manifest #:optional system) ;; Some file names in the NSS certificates are UTF-8 encoded so ;; install a UTF-8 locale. - (setenv "LOCPATH" - (string-append #+(libc-utf8-locales-for-target system) - "/lib/locale/" - #+(version-major+minor - (package-version - (libc-utf8-locales-for-target system))))) - (setlocale LC_ALL "en_US.utf8") + (setlocale LC_ALL "C.UTF-8") (match (append-map ca-files '#$(manifest-inputs manifest)) (() @@ -1960,8 +1949,7 @@ (define* (profile-derivation manifest or TARGET is set, raise an error if MANIFEST contains a package that does not support SYSTEM. -When LOCALES? is true, the build is performed under a UTF-8 locale; this adds -a dependency on the 'glibc-utf8-locales' package. +When LOCALES? is true, the build is performed under a UTF-8 locale. When RELATIVE-SYMLINKS? is true, use relative file names for symlink targets. This is one of the things to do for the result to be relocatable. @@ -2004,21 +1992,10 @@ (define* (profile-derivation manifest (and (derivation? drv) (gexp-input drv))) extras)) - (define libc-utf8-locales-for-target ;lazy reference - (module-ref (resolve-interface '(gnu packages base)) - 'libc-utf8-locales-for-target)) - (define set-utf8-locale - ;; Some file names (e.g., in 'nss-certs') are UTF-8 encoded so - ;; install a UTF-8 locale. - (let ((locales (libc-utf8-locales-for-target - (or system (%current-system))))) - #~(begin - (setenv "LOCPATH" - #$(file-append locales "/lib/locale/" - (version-major+minor - (package-version locales)))) - (setlocale LC_ALL "en_US.utf8")))) + ;; Some file names (e.g., in 'nss-certs') are UTF-8 encoded so install a + ;; UTF-8 locale. Assume libc comes with a copy of C.UTF-8. + #~(setlocale LC_ALL "C.UTF-8")) (define builder (with-imported-modules '((guix build profiles) diff --git a/tests/profiles.scm b/tests/profiles.scm index ddd6d74f3b..e448137cff 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -463,7 +463,6 @@ (define glibc (target -> "arm-linux-gnueabihf") (grep (package->cross-derivation packages:grep target)) (sed (package->cross-derivation packages:sed target)) - (locales (package->derivation (packages:libc-utf8-locales-for-target))) (drv (profile-derivation manifest #:hooks '() #:locales? #t @@ -475,15 +474,11 @@ (define glibc (and (string-suffix? name input) input))) (derivation-inputs drv)))) - ;; The inputs for grep and sed should be cross-build derivations, but that - ;; for the glibc-utf8-locales should be a native build. (return (and (string=? (derivation-system drv) (%current-system)) (string=? (find-input packages:grep) (derivation-file-name grep)) (string=? (find-input packages:sed) - (derivation-file-name sed)) - (string=? (find-input (packages:libc-utf8-locales-for-target)) - (derivation-file-name locales)))))) + (derivation-file-name sed)))))) (test-assert "package->manifest-entry defaults to \"out\"" (let ((outputs (package-outputs packages:glibc))) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 14 08:38:32 2023 Received: (at 67824) by debbugs.gnu.org; 14 Dec 2023 13:38:32 +0000 Received: from localhost ([127.0.0.1]:48969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDlv5-0007Fe-Q4 for submit@debbugs.gnu.org; Thu, 14 Dec 2023 08:38:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDlv2-0007Em-Ai for 67824@debbugs.gnu.org; Thu, 14 Dec 2023 08:38:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDluw-0002zc-Lo; Thu, 14 Dec 2023 08:38:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=gJLkm5f50IdnsS1kUIz/qsUkKwRYPGDpDAcRBMXWB7A=; b=QlmtWlwRBv3M49cKjkAh WweQT1nFhVWSZOvbta4v3DbvB0GXMoURnyoK6WfIMLw75nQqbvsO2Mwcg4Ssvwh9QlDDM9GSPR9bq 777o66ttdkZkxEiVVC6Qy0W/Qisy+86rObM3dMY7Qnfh0Ogg+orCl0giLVNYYZO5N3yu+7LduBB/T 5Lty1/rkqN9ETCWy0Xazic3GTnDk3hP9nqMObox0bmjAVP0UjrjXGuAzYx4yMi2UXgrze8kJ4Z1Ok gRmXj/4iTqeCLIROdN5N3RVFXQMvtTWAOJLDshAeJ0286nUW40WAwy97HJaqp+LGEHLhRx7ciZQqs pKqLxYh5f1Lrrw==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates 5/6] =?UTF-8?q?packages:=20Output=20and=20err?= =?UTF-8?q?or=20ports=20are=20line-buffered=20in=20=E2=80=98patch-and-repa?= =?UTF-8?q?ck=E2=80=99.?= Date: Thu, 14 Dec 2023 14:37:41 +0100 Message-ID: <2533db50b4cf1f21baf85b63d2266055d53618a2.1702550735.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/packages.scm (patch-and-repack): Add ‘setvbuf’ calls. Change-Id: I039bb6407263d5172bf0bc716bda6860dc2615fb --- guix/packages.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/guix/packages.scm b/guix/packages.scm index 4b0c478ff4..cb8db925f8 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -1007,6 +1007,11 @@ (define* (patch-and-repack source patches '("--no-recursion" "--files-from=.file_list")))) + (let ((line (cond-expand (guile-2.0 _IOLBF) + (else 'line)))) + (setvbuf (current-output-port) line) + (setvbuf (current-error-port) line)) + ;; Encoding/decoding errors shouldn't be silent. (fluid-set! %default-port-conversion-strategy 'error) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 14 08:38:40 2023 Received: (at 67824) by debbugs.gnu.org; 14 Dec 2023 13:38:40 +0000 Received: from localhost ([127.0.0.1]:48976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDlvD-0007G6-Pa for submit@debbugs.gnu.org; Thu, 14 Dec 2023 08:38:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDlvC-0007Fs-2H for 67824@debbugs.gnu.org; Thu, 14 Dec 2023 08:38:38 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rDlv7-0003Iy-H3; Thu, 14 Dec 2023 08:38:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=tN+Fn29suZxK3b8EnX4BuK8bWqEj5AMsqDEwh9mq2sI=; b=IqXJIy3n/RfGXo2efTpL wZLmR8jrCg+An+lHuUHf+UlvAddlstyJEfdb0R1HZS1BMkqtHO/Ew8GYS1Jt/GB7ri4+c8NSrClIs Rw1y25Q9HY+q5qJjbN5Y81mgUZHdz/YgpsEaN7RlSh3iqSRVuV6tJuBKGgmoR+Fbyj7WCpKXEeN13 Ss9CUew3FiRqI31+rru0+DAvwAaAv+OVED/Sf6U9Z7MDix4CJkhlpu5Tmv/sq8rn756fdwD7sP7IZ 4qA256zJSJyk4kZ83QUmGdwuuN+9m5i0FiNkPME7fNvyNs8B7jHLy/HnO+bL1r0+ZCA0PMEriyUj1 XXUG5llNY693pw==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates 6/6] gnu: glibc-utf8-locales: Add the C.UTF-8 locale. Date: Thu, 14 Dec 2023 14:37:42 +0100 Message-ID: <48fba13f955b3552c7f011672763052752cc7c35.1702550735.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/base.scm (%default-utf8-locales): Add "C". (make-glibc-utf8-locales): Delete "C" from LOCALES for glibc versions lower than or equal to 2.35. Change-Id: I6a6faa68dc18bf0f87c372109a17f476d3561278 --- gnu/packages/base.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index d31c0b0772..eab9ff411d 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1396,7 +1396,8 @@ (define-public (make-glibc-locales glibc) (define %default-utf8-locales ;; These are the locales commonly used for tests---e.g., in Guile's i18n ;; tests. - '("de_DE" "el_GR" "en_US" "fr_FR" "tr_TR")) + '("C" "de_DE" "el_GR" "en_US" "fr_FR" "tr_TR")) + (define*-public (make-glibc-utf8-locales glibc #:key (locales %default-utf8-locales) (name "glibc-utf8-locales")) @@ -1444,7 +1445,14 @@ (define*-public (make-glibc-utf8-locales glibc #:key (symlink (string-append locale ".utf8") (string-append localedir "/" locale ".UTF-8"))) - '#$locales))))) + + ;; The C.UTF-8 locale was introduced in 2.35 but it + ;; fails to build there: + ;; . + '#$(if (version>? (package-version this-package) + "2.35") + locales + (delete "C" locales))))))) (native-inputs (list glibc gzip)) (synopsis (if default-locales? (P_ "Small sample of UTF-8 locales") -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 16 03:49:54 2023 Received: (at 67824) by debbugs.gnu.org; 16 Dec 2023 08:49:54 +0000 Received: from localhost ([127.0.0.1]:53934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEQMs-0000p4-Fb for submit@debbugs.gnu.org; Sat, 16 Dec 2023 03:49:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEQMp-0000op-LL for 67824@debbugs.gnu.org; Sat, 16 Dec 2023 03:49:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEQMh-0003b0-CH; Sat, 16 Dec 2023 03:49:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=HgF26BZM5/z7OcaAjmyWgS99uqeth876yyQxTi9NgIA=; b=PxPVkbO1uJbrpbYUAeK+ JaN6vYOl1HR58prBTfFos8HwiTzl+4gONWQMmYQNM4y/GMe/Pxs9nf+fGLs4Gw6t+WruiUGFNRkE0 89P8leGFeNMB0/WA9KN3Arq1h3e32kPPGJYT5fUOlQZxCdLPl6YIFfbjlwN8m9T1/J6RtOdj4Swyw 9vyETRiVAngdPabQ4c01OlGKvShTHO25P/2uMBYNQQ1qlocGQ2xoFYUhmPC/qpOui9x9BNjd6WnNv /W5wd9WqhKm0jwDve/4ffG24k+R8HP/ozQRYvHxcLz6dX3siXp/iiut+qO2Nn23DXK3RkhFBHWsJt huQNKhkFuPZLgA==; From: Janneke Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#67824] [PATCH core-updates 0/6] Run builds in C.UTF-8 locale In-Reply-To: ("Ludovic =?utf-8?Q?Court?= =?utf-8?Q?=C3=A8s=22's?= message of "Thu, 14 Dec 2023 11:51:29 +0100") Organization: AvatarAcademy.nl References: X-Url: http://AvatarAcademy.nl Date: Sat, 16 Dec 2023 09:49:38 +0100 Message-ID: <87h6kir0pp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: Christopher Baines , Josselin Poiret , Tobias Geerinckx-Rice , Maxim Cournoyer , 67824@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: Hi, > This is the logical followup to : > running builds in the C.UTF-8 locale (instead of en_US.UTF-8) and > removing =E2=80=98glibc-utf8-locales=E2=80=99 from the set of implicit in= puts. > > Tested on x86_64-linux with: > > guix build texinfo nss-certs > make check TESTS=3Dtests/profiles.scm > > I=E2=80=99d like to merge it soon so we can move forward. > > Let me know what you think! I like the idea but I cannot build it, i.e., building gcc-mesboot1 hangs for me in the gmp configure: --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix build '(@@ (gnu packages commencement) gcc-mesboot1)' [..] (Configuring in host-i686-unknown-linux-gnu/gmp) checking whether sscanf needs writable input... no checking for struct pst_processor.psp_iticksperclktick... no --8<---------------cut here---------------end--------------->8--- I've tried at least 6 times. Gash running configure just hangs. On a related note, I found that running --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix shell --bootstrap --no-grafts -e '(@@ (gnu packages co= mmencement) gcc-mesboot1)' --8<---------------cut here---------------end--------------->8--- wants to build gcc-mesboot1 when attempting to easily create a shell in which to run and debug the hanging configure command. I guess someone needs to patch gcc-mesboot1 and dive into it. Greetings, Janneke --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 16 06:27:18 2023 Received: (at 67824) by debbugs.gnu.org; 16 Dec 2023 11:27:18 +0000 Received: from localhost ([127.0.0.1]:54049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rESpC-0005tL-GG for submit@debbugs.gnu.org; Sat, 16 Dec 2023 06:27:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rESpB-0005t8-IX for 67824@debbugs.gnu.org; Sat, 16 Dec 2023 06:27:17 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rESp4-0002Ze-An; Sat, 16 Dec 2023 06:27:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=ttUpnopbylRwjqKcHFlIPbYLeRJVK3WWwpDsFFG03Iw=; b=hPxhWhgojUj7nP+Tle4z 87B8qsHhuY+/Id2KFSPOSMyEuL/TC6AC3UgAOYONdixE0CMYYULIgS7lT70JRmKvaXvJZiISEKNa3 wUEaaoBikuyWYtfRrjI0hAOfsxtYOjI9R40JCz/bf+MuI1PIjA0WxokXkoNGaTb93yNWQ0OHXIJhf YsOHuwgPJO/b9PsEsFPKpUMLNHekKGKGvcv2/kSQSM37+mjoSBaFEH/DyoQTqwbWQClD/DUm8DRTL 5GwfAuFxaQpgpn+4ErUrXVtbpb5/yHBU2XDhKHVm9fQKXG/AJXVQPztfskbROnrezm4c15kUdoL4X O+UQSRL1thGQ3w==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Janneke Nieuwenhuizen Subject: Re: [bug#67824] [PATCH core-updates 0/6] Run builds in C.UTF-8 locale In-Reply-To: <87h6kir0pp.fsf@gnu.org> (Janneke Nieuwenhuizen's message of "Sat, 16 Dec 2023 09:49:38 +0100") References: <87h6kir0pp.fsf@gnu.org> Date: Sat, 16 Dec 2023 12:27:07 +0100 Message-ID: <87h6kis7zo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: Christopher Baines , Josselin Poiret , Tobias Geerinckx-Rice , 67824@debbugs.gnu.org, Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Janneke Nieuwenhuizen skribis: > I like the idea but I cannot build it, i.e., building gcc-mesboot1 hangs > for me in the gmp configure: > > ./pre-inst-env guix build '(@@ (gnu packages commencement) gcc-mesboot1)' > [..] > (Configuring in host-i686-unknown-linux-gnu/gmp) > checking whether sscanf needs writable input... no > checking for struct pst_processor.psp_iticksperclktick... no > Hmm it works for me, weird. Now I realize I forgot to change the default value of #:locale in =E2=80=98gnu-build-system.scm=E2=80=99 plus a couple of other things, so I= =E2=80=99m starting another round of rebuilds to test it. It=E2=80=99s all about patience. :-) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 16 11:47:32 2023 Received: (at 67824) by debbugs.gnu.org; 16 Dec 2023 16:47:32 +0000 Received: from localhost ([127.0.0.1]:55866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEXp6-00053Z-1W for submit@debbugs.gnu.org; Sat, 16 Dec 2023 11:47:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEXp1-00052x-Mt for 67824@debbugs.gnu.org; Sat, 16 Dec 2023 11:47:31 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEXou-0004W8-Ta; Sat, 16 Dec 2023 11:47:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=tn0Ao7w4yHbdANT7zjRsqgY1uMPI0Fo+Tb8Ut8iZklM=; b=nTlVYTVdctRIseBaDwwM 4bhF2i6Ab3Tz2CEEZLBhhqeWQOYZ5M3sJDivHZDNqG5l1OYr3WuFfJKuM2x3Lnlcd3xLF/9gk4sLf Mv2MPCmZSzcg3fo19OxGW1AzPRKsSxvF2GGZXBE1xnnDVECPNqJRbmAIn57R23DI7bIvSfB8qR5JF RblHXub00REU3AX2N5uMiQEAHsRDklztTpbu38FS3lIzFpxXj60khylzjykMxdqjVXzXa+dTenWQ0 n3rht+mz/jQ8e5rxV5tMCo1hMqjtqGC4vcN+hyBQqJ1fnpZKlds73+Zg2GxZQssVOf4HVRNoQ/2Kl z9POO+vROI/bqw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Janneke Nieuwenhuizen Subject: Re: [bug#67824] [PATCH core-updates 0/6] Run builds in C.UTF-8 locale In-Reply-To: <87h6kir0pp.fsf@gnu.org> (Janneke Nieuwenhuizen's message of "Sat, 16 Dec 2023 09:49:38 +0100") References: <87h6kir0pp.fsf@gnu.org> Date: Sat, 16 Dec 2023 17:47:17 +0100 Message-ID: <874jgirt62.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: Christopher Baines , Josselin Poiret , Tobias Geerinckx-Rice , 67824@debbugs.gnu.org, Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Janneke Nieuwenhuizen skribis: > I like the idea but I cannot build it, i.e., building gcc-mesboot1 hangs > for me in the gmp configure: > > ./pre-inst-env guix build '(@@ (gnu packages commencement) gcc-mesboot1)' > [..] > (Configuring in host-i686-unknown-linux-gnu/gmp) > checking whether sscanf needs writable input... no > checking for struct pst_processor.psp_iticksperclktick... no > > > > I've tried at least 6 times. Gash running configure just hangs. I experienced a similar thing just now (I had removed #:parallel-build? #f from =E2=80=98binutils-mesboot0=E2=80=99): --8<---------------cut here---------------start------------->8--- $ pstree -p 29600 .guile-real(29600)=E2=94=80=E2=94=AC=E2=94=80conftest(45270) =E2=94=9C=E2=94=80make(34404)=E2=94=80=E2=94=80=E2=94=80= .guile-real(34406)=E2=94=80=E2=94=80=E2=94=80make(34421)=E2=94=80=E2=94=80= =E2=94=80.guile-real(6216)=E2=94=80=E2=94=80=E2=94=80.guile-real(6247)=E2= =94=80=E2=94=80=E2=94=80make(629+ =E2=94=94=E2=94=80{.guile-real}(29610) ludo@guix-hpc5 ~$ sudo cat /proc/29600/cmdline |xargs -0 /gnu/store/lgi9x15a0w35mcpd7g1kb9274r6wy4pv-guile-bootstrap-2.0/bin/guile -= -no-auto-compile -L /gnu/store/4zibvq0ffm75xrmmkm0997rnwl3i835p-module-impo= rt -C /gnu/store/idi8frs4vz0ympplpm1kddp8932kgkr1-module-import-compiled /g= nu/store/kj2wyb3w6c6zqdjfmizv826rgfb383rf-binutils-mesboot0-2.20.1a-builder $ sudo guix processes |guix shell recutils -- recsel -e 'LockHeld ~ "binuti= ls"' SessionPID: 17495 ClientPID: 17477 ClientCommand: /gnu/store/n2amn1hpl41r403n0rq7cjbawvzfx51m-guix-1.4.0-16.ae= b4943/libexec/guix/guile \ /run/current-system/profile/bin/guix build -c32 = -M3 /gnu/store/icfjxv22fysqpip9zxfqv7xjdahziv94-hello-2.12.1.drv LockHeld: /gnu/store/pkaxhawivjhhff55ncglr30c6d9dzlaz-binutils-mesboot0-2.2= 0.1a.lock ChildPID: 17496 ChildCommand: : /gnu/store/n2amn1hpl41r403n0rq7cjbawvzfx51m-guix-1.4.0-16.a= eb4943/libexec/guix/guile \ /gnu/store/n2amn1hpl41r403n0rq7cjbawvzfx51m-gui= x-1.4.0-16.aeb4943/bin/guix substitute --query ChildPID: 17522 ChildCommand: : /gnu/store/n2amn1hpl41r403n0rq7cjbawvzfx51m-guix-1.4.0-16.a= eb4943/libexec/guix/guile \ /gnu/store/n2amn1hpl41r403n0rq7cjbawvzfx51m-gui= x-1.4.0-16.aeb4943/bin/guix offload x86_64-linux 0 1 0 ChildPID: 29600 ChildCommand: : /gnu/store/lgi9x15a0w35mcpd7g1kb9274r6wy4pv-guile-bootstrap= -2.0/bin/guile --no-auto-compile -L /gnu/store/4zibvq0ffm75xrmmkm0997rnwl3i= 835p-module-import -C /gnu/store/idi8frs4vz0ympplpm1kddp8932kgkr1-module-im= port-compiled /gnu/store/kj2wyb3w6c6zqdjfmizv826rgfb383rf-binutils-mesboot0= -2.20.1a-builder --8<---------------cut here---------------end--------------->8--- Here =E2=80=98conftest=E2=80=99 is a zombie, which means that the shell run= ning ./configure (gash-boot-0.3.0) did not call =E2=80=98waitpid=E2=80=99 (bug #= 1). There=E2=80=99s another bunch of .guile-real zombie processes (child processes of =E2=80=98= make DESTDIR=3D RPATH_ENVVAR=3DLD_LIBRARY_PATH TARGET_SUBDIR=3Di686-unknown-linux-gnu bindir=3D/gnu/store/pkaxhawivjhhff55ncglr30c6d9dzlaz-binutils-mesboot0-2.20= .1a/bin [=E2=80=A6]=E2=80=99). Thus the =E2=80=98conftest=E2=80=99 process got reparented to the Guile pro= cess that runs the build script (PID 1), and then we run into (bug #2): https://issues.guix.gnu.org/30948 Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 11:30:53 2023 Received: (at 67824) by debbugs.gnu.org; 18 Dec 2023 16:30:53 +0000 Received: from localhost ([127.0.0.1]:33346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGW4-0006VE-Hu for submit@debbugs.gnu.org; Mon, 18 Dec 2023 11:30:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGW2-0006Gu-Cm for 67824@debbugs.gnu.org; Mon, 18 Dec 2023 11:30:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFGVu-0007Pn-C4; Mon, 18 Dec 2023 11:30:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=esGTSCCwbyWAuZisK1NnkyH8jwizKtf2uxVtQOahA4M=; b=qoWWFG5E5oRAOKaN59EH XKCV71eKNJhcjLUMyxkMW/VrYKrnzm2PAIsMbIW22JQso4SlEu2vfZMyz7f3LnJ3pqOKfKb4guBY3 Vb5rWN7WZ2fW9qIkoQv1t7tEjzFVnpoCeuv1BrGecHBYgeagwxrizfgvtECid53hn9NdL5YRXncKt M2i0sZ/rFRIL/y7sMal3b3c4I3x/dCCjk3PHIjjCdbihmHqXtTPEzdoPKq2GKqLQbikza0HnrF1Yd 8250YWg/RFk94H5IpY9aIJZeNqQj52Bf721KAdkT4WHD0nhtXozWpXn6UHzQGff5T35qLG6VR5U+i dHk7xyDQvHZaCA==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates v2 1/9] =?UTF-8?q?packages:=20Remove=20refere?= =?UTF-8?q?nce=20to=20=E2=80=98glibc-utf8-locales=E2=80=99=20in=20?= =?UTF-8?q?=E2=80=98patch-and-repack=E2=80=99.?= Date: Mon, 18 Dec 2023 17:30:12 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a followup to 1cebc334a77030c0c94955981652f4df7608c9e3. * guix/packages.scm (%standard-patch-inputs): Remove “locales” entry. (patch-and-repack): Remove ‘locales’ variable. [build]: Remove reference to ‘locales’. Use “C.UTF-8” unconditionally. Change-Id: I54219b232880e05534599fbba8738cc00fb5d568 --- guix/packages.scm | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index 930b1a3b0e..4b0c478ff4 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -866,13 +866,7 @@ (define (%standard-patch-inputs system) ("gzip" ,(ref '(gnu packages compression) 'gzip)) ("lzip" ,(ref '(gnu packages compression) 'lzip)) ("unzip" ,(ref '(gnu packages compression) 'unzip)) - ("patch" ,(ref '(gnu packages base) 'patch)) - ("locales" - ,(parameterize ((%current-target-system #f) - (%current-system system)) - (canonical - ((module-ref (resolve-interface '(gnu packages base)) - 'libc-utf8-locales-for-target)))))))) + ("patch" ,(ref '(gnu packages base) 'patch))))) (define (default-guile) "Return the default Guile package used to run the build code of @@ -955,7 +949,6 @@ (define* (patch-and-repack source patches (lzip (lookup-input "lzip")) (xz (lookup-input "xz")) (patch (lookup-input "patch")) - (locales (lookup-input "locales")) (comp (and=> (compressor source-file-name) lookup-input)) (patches (map instantiate-patch patches))) (define build @@ -1017,15 +1010,17 @@ (define* (patch-and-repack source patches ;; Encoding/decoding errors shouldn't be silent. (fluid-set! %default-port-conversion-strategy 'error) - (when #+locales - ;; First of all, install a UTF-8 locale so that UTF-8 file names - ;; are correctly interpreted. During bootstrap, LOCALES is #f. - (setenv "LOCPATH" - (string-append #+locales "/lib/locale/" - #+(and locales - (version-major+minor - (package-version locales))))) - (setlocale LC_ALL "en_US.utf8")) + ;; First of all, install a UTF-8 locale so that UTF-8 file names + ;; are correctly interpreted. During bootstrap, locales are + ;; missing. + (let ((locale "C.UTF-8")) + (catch 'system-error + (lambda () + (setlocale LC_ALL locale)) + (lambda args + (format (current-error-port) + "failed to install '~a' locale: ~a~%" + locale (system-error-errno args))))) (setenv "PATH" (string-append #+xz "/bin" -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 11:30:54 2023 Received: (at 67824) by debbugs.gnu.org; 18 Dec 2023 16:30:54 +0000 Received: from localhost ([127.0.0.1]:33350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGW5-0006W2-CD for submit@debbugs.gnu.org; Mon, 18 Dec 2023 11:30:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGW2-0006HR-Lz for 67824@debbugs.gnu.org; Mon, 18 Dec 2023 11:30:51 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFGVt-0007On-Ez; Mon, 18 Dec 2023 11:30:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=JvKP4OF1GJURXp9G9MsYjo0yy/bIpXOw85+uPH7iyWc=; b=YARSG0kD7uhfLM aiJk7zEqdPWJmdK6GluKKfLrdD0KicQvHcGSxQEjPOrc/UAuSAqqFMVwIsfv1zW9EH5hnbDzwEZX7 SsCztBbZ8k6BIq9RtJhTeg1zBYIkgPOq8sp6EjIpFzWAMHuHkvZNQkF60Enpc8BlZ+P9YQPHt/9bt 9HkPM/x7O9ooHGZlRveQx8BKYvYbH7xO0WdtXRMlS8NhByQD6pdscQuvQfce8xObCyW0PvC1iln7c CUrFeFRqOHc7kTKqoSfKtrVqWcSmEcHHBOe9uqd9Wo0aOdIcNfZm5MvwhHfdSSLVVmnHnHBF+0w5L tur7ODMDAUHdRQHddBYw==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates v2 0/9] Run builds in C.UTF-8 locale Date: Mon, 18 Dec 2023 17:30:11 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Liliana Marie Prikler , Maxim Cournoyer , Raghav Gururajan Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: Josselin Poiret , Maxim Cournoyer , =?UTF-8?q?Ludovic=20Court=C3=A8s?= , Tobias Geerinckx-Rice , Christopher Baines , Janneke Nieuwenhuizen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello Guix! This is an updated version of the patch set. Changes since v1: • Change default value of #:locale in ‘gnu-build-system.scm’, since all the build systems except ‘gnu’ rely on it. • Remove customization of util-linux tests that was due to the lack of C.UTF-8 on our side before. • Skip failing GLib test, which should allow us to go further towards evaluating ‘core-updates’ (!). • Add useful x86_64-gnu patch in glibc (piggy-backed, not related to the issues at hand). • Include fix for . Probably not strictly necessary but a good opportunity, especially since Gash/Guile & co. seem to leave zombies when building the early ‘mesboot’ packages (something Janneke and I discussed on IRC a couple of days ago). Feedback welcome! Ludo’. Ludovic Courtès (9): packages: Remove reference to ‘glibc-utf8-locales’ in ‘patch-and-repack’. build-system/gnu: Change default locale to C.UTF-8. gnu: commencement: Remove ‘glibc-utf8-locales’ from ‘%final-inputs’. profiles: Use C.UTF-8 instead of ‘glibc-utf8-locales’ where possible. packages: Output and error ports are line-buffered in ‘patch-and-repack’. gnu: glibc-utf8-locales: Add the C.UTF-8 locale. gnu: glibc: Add patch for ‘ucontext’ on x86_64-gnu (GNU/Hurd). build-system/gnu: Turn PID 1 into an “init”-style process by default. gnu: glib: Skip test that fails with glibc 2.38. gnu/local.mk | 1 + gnu/packages/base.scm | 24 +++-- gnu/packages/commencement.scm | 31 ++++--- gnu/packages/gawk.scm | 6 +- gnu/packages/glib.scm | 6 +- gnu/packages/linux.scm | 6 +- .../patches/glibc-2.38-hurd-ucontext.patch | 87 +++++++++++++++++++ gnu/packages/texinfo.scm | 7 +- guix/build-system/gnu.scm | 8 +- guix/build/gnu-build-system.scm | 41 ++++++++- guix/packages.scm | 34 ++++---- guix/profiles.scm | 33 ++----- tests/profiles.scm | 7 +- 13 files changed, 206 insertions(+), 85 deletions(-) create mode 100644 gnu/packages/patches/glibc-2.38-hurd-ucontext.patch base-commit: e4013b31266b40dc9cb250c44b2088d3931cb3b3 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 11:30:54 2023 Received: (at 67824) by debbugs.gnu.org; 18 Dec 2023 16:30:54 +0000 Received: from localhost ([127.0.0.1]:33352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGW6-0006Wy-6z for submit@debbugs.gnu.org; Mon, 18 Dec 2023 11:30:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGW3-0006IG-3g for 67824@debbugs.gnu.org; Mon, 18 Dec 2023 11:30:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFGVv-0007RL-QK; Mon, 18 Dec 2023 11:30:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=et/sECpzylS1JuG0KCO2HY6TF+xrYhHhF6XJVAmbFdE=; b=Cas19niNXpV/8dTjlO82 0zo45oa1iEK5LT0i4wm0wDt7YDIZLWXQp2oGgWfe2jyvaIlV83FTzOS6GpQF+L2Hzha1CcnA/ba2H Dn/1DQr9lWpN9eMw3AZjMskGeDU0KvxjrjIcKmhfHe9uFt+K8+nXTE6D81DN7dCEFbkWD+pVIZ/oF V6n1Gnv8ryHAxRoM2VTkDRnZtrPUp33CfJ/+SprJeJqRjD73KAwEXsOIsUc6Hc47IzvHu2M5CXmSp iiWMdEDsCVl/Gv05NOy1ItWAshpLUbR6olbQ+5xK36AiKXgKbevBXQ65LlMyQleH6+bh3zs97UI53 /fo8QaZmvKCDPA==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates v2 2/9] build-system/gnu: Change default locale to C.UTF-8. Date: Mon, 18 Dec 2023 17:30:13 +0100 Message-ID: <6fbee1e6544d1abcaf781fc246004de494396868.1702916397.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Leo Famulari , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a followup to 1cebc334a77030c0c94955981652f4df7608c9e3. * guix/build-system/gnu.scm (gnu-build, gnu-cross-build): #:locale now defaults to "C.UTF-8". * guix/build/gnu-build-system.scm (install-locale): Likewise. * gnu/packages/linux.scm (util-linux)[arguments]: In ‘pre-check’ phase, remove ‘invalid-multibyte’ modification so the test runs under C.UTF-8. Change-Id: I9a4bfe564bcd8bbd0d57ba04568eb6b8020bd051 --- gnu/packages/linux.scm | 6 +----- guix/build-system/gnu.scm | 4 ++-- guix/build/gnu-build-system.scm | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 430645e4ad..0572ad3a73 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2257,11 +2257,7 @@ (define-public util-linux ;; Change the test to refer to the right file. (substitute* "tests/ts/misc/mcookie" (("/etc/services") - services)) - - ;; The C.UTF-8 locale does not exist in our libc. - (substitute* "tests/ts/column/invalid-multibyte" - (("C\\.UTF-8") "en_US.utf8"))))) + services))))) (add-before 'check 'disable-setarch-test (lambda _ ;; The setarch tests are unreliable in QEMU's user-mode diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index ed1dc33c76..0f886fe21d 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -361,7 +361,7 @@ (define* (gnu-build name inputs (make-dynamic-linker-cache? #t) (license-file-regexp %license-file-regexp) (phases '%standard-phases) - (locale "en_US.utf8") + (locale "C.UTF-8") (system (%current-system)) (build (nix-system->gnu-triplet system)) (imported-modules %default-gnu-imported-modules) @@ -501,7 +501,7 @@ (define* (gnu-cross-build name (license-file-regexp %license-file-regexp) (phases '%standard-phases) - (locale "en_US.utf8") + (locale "C.UTF-8") (system (%current-system)) (build (nix-system->gnu-triplet system)) (imported-modules %default-gnu-imported-modules) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index ef5873d793..39707e7ace 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -123,7 +123,7 @@ (define* (set-paths #:key target inputs native-inputs native-search-paths))) (define* (install-locale #:key - (locale "en_US.utf8") + (locale "C.UTF-8") (locale-category LC_ALL) #:allow-other-keys) "Try to install LOCALE; emit a warning if that fails. The main goal is to -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 11:31:05 2023 Received: (at 67824) by debbugs.gnu.org; 18 Dec 2023 16:31:05 +0000 Received: from localhost ([127.0.0.1]:33374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGWG-0006kh-Q3 for submit@debbugs.gnu.org; Mon, 18 Dec 2023 11:31:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGW4-0006Lh-K5 for 67824@debbugs.gnu.org; Mon, 18 Dec 2023 11:30:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFGVx-0007SB-9W; Mon, 18 Dec 2023 11:30:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=r9wGA/+CXEPOp5EOH40rNSzpYDxMrzUg+jLA9nlIY2s=; b=Z82PEJ+00RZZUIpp9s4/ dnDck43eElaV0pHeGZJvgp0fw+EOfgpu+LlDyduBUv0yNItRxuJTN1pi3BLoSYJgMuHfSIVwJLVk2 ASL8goit2Npp1Ksbqo1G33iR1fq6mUSceuPwg+e4jeMso0l3AG8AlZgyZUpmeEipfIMyCiZ4QgwUy TJXvDT9Z8jsm/f5YOgZQQGenotpqoJTs2PX5QYMq2cFg0lmQ1klvR7KJGNvYGx3Er+pXQPK/SOTNl 7UU4xfjrwYpsMSJhkcsvRL163bRvPQQk3ZXunAevcbZiVQAm8A2mXgyIaQQcrqYW2rVbxtUs6jClu VEk0uoURCHqbsQ==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates v2 3/9] =?UTF-8?q?gnu:=20commencement:=20Remo?= =?UTF-8?q?ve=20=E2=80=98glibc-utf8-locales=E2=80=99=20from=20=E2=80=98%fi?= =?UTF-8?q?nal-inputs=E2=80=99.?= Date: Mon, 18 Dec 2023 17:30:14 +0100 Message-ID: <8f609fdf9e20d9140f149c8255b92334fae84f62.1702916397.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * 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 - ;; . - `(("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 +;;; Copyright © 2012-2016, 2023 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2018, 2022, 2023 Efraim Flashner ;;; Copyright © 2021, 2022 Marius Bakke @@ -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 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 11:31:06 2023 Received: (at 67824) by debbugs.gnu.org; 18 Dec 2023 16:31:06 +0000 Received: from localhost ([127.0.0.1]:33378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGWH-0006lS-HU for submit@debbugs.gnu.org; Mon, 18 Dec 2023 11:31:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGW7-0006Qo-Ak for 67824@debbugs.gnu.org; Mon, 18 Dec 2023 11:30:56 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFGW0-0007UN-1l; Mon, 18 Dec 2023 11:30:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=TwvTpdL8/xMKO5FWaa90V1adDxfqVe8ftAvsBI051cA=; b=fp+z3oil6ne74o7cmiu4 z0EIg153fM5Zy2qSfsisxYi0VMa2lBcTHlKKGoQGllF9xlyUSRNcE0k7ytBYzwC9NLEtiSpHAqTCk Ph5k+Onhlr5icgWu6ufLzjoyejAj1BsukXZmkZ1JqCDOBnGdZ5PAOlU7nkUhTvBS2yZzOcJOE4NUA QTyu0l+n3HqNX33+xo5IuVvAmYXEzVvE/h/gK3EZVABHO3ZyhO7S+JFCFHlbyNm1Xe9RdzkkYWFQs zWSQI2b50CLYyrC8ZoB6+C1b9b14NIFCtzVpgYAccEc5WCF6sGT64/XE6Lok6Zsyt2MwYPj7vJtDm g+l5Tu5zjCvtVQ==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates v2 4/9] =?UTF-8?q?profiles:=20Use=20C.UTF-8?= =?UTF-8?q?=20instead=20of=20=E2=80=98glibc-utf8-locales=E2=80=99=20where?= =?UTF-8?q?=20possible.?= Date: Mon, 18 Dec 2023 17:30:15 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is a followup to 1cebc334a77030c0c94955981652f4df7608c9e3. * guix/profiles.scm (ca-certificate-bundle)[libc-utf8-locales-for-target]: Remove. [build]: Use “C.UTF-8” instead of “en_US.utf8”. (profile-derivation)[libc-utf8-locales-for-target]: Remove. [set-utf8-locale]: Rewrite to a gexp that calls ‘setlocale’ for “C.UTF-8”. * tests/profiles.scm ("profile-derivation, cross-compilation"): Remove ‘locales’ variable and related check. Change-Id: I7cb148b9149fe5fbe5b9b1b25fdce1002ad1f37e --- guix/profiles.scm | 33 +++++---------------------------- tests/profiles.scm | 7 +------ 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index ce2f8337bf..da7790d819 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1125,11 +1125,6 @@ (define* (ca-certificate-bundle manifest #:optional system) MANIFEST. Single-file bundles are required by programs such as Git and Lynx." ;; See ;; for a discussion. - - (define libc-utf8-locales-for-target ;lazy reference - (module-ref (resolve-interface '(gnu packages base)) - 'libc-utf8-locales-for-target)) - (define build (with-imported-modules '((guix build utils)) #~(begin @@ -1161,13 +1156,7 @@ (define* (ca-certificate-bundle manifest #:optional system) ;; Some file names in the NSS certificates are UTF-8 encoded so ;; install a UTF-8 locale. - (setenv "LOCPATH" - (string-append #+(libc-utf8-locales-for-target system) - "/lib/locale/" - #+(version-major+minor - (package-version - (libc-utf8-locales-for-target system))))) - (setlocale LC_ALL "en_US.utf8") + (setlocale LC_ALL "C.UTF-8") (match (append-map ca-files '#$(manifest-inputs manifest)) (() @@ -1960,8 +1949,7 @@ (define* (profile-derivation manifest or TARGET is set, raise an error if MANIFEST contains a package that does not support SYSTEM. -When LOCALES? is true, the build is performed under a UTF-8 locale; this adds -a dependency on the 'glibc-utf8-locales' package. +When LOCALES? is true, the build is performed under a UTF-8 locale. When RELATIVE-SYMLINKS? is true, use relative file names for symlink targets. This is one of the things to do for the result to be relocatable. @@ -2004,21 +1992,10 @@ (define* (profile-derivation manifest (and (derivation? drv) (gexp-input drv))) extras)) - (define libc-utf8-locales-for-target ;lazy reference - (module-ref (resolve-interface '(gnu packages base)) - 'libc-utf8-locales-for-target)) - (define set-utf8-locale - ;; Some file names (e.g., in 'nss-certs') are UTF-8 encoded so - ;; install a UTF-8 locale. - (let ((locales (libc-utf8-locales-for-target - (or system (%current-system))))) - #~(begin - (setenv "LOCPATH" - #$(file-append locales "/lib/locale/" - (version-major+minor - (package-version locales)))) - (setlocale LC_ALL "en_US.utf8")))) + ;; Some file names (e.g., in 'nss-certs') are UTF-8 encoded so install a + ;; UTF-8 locale. Assume libc comes with a copy of C.UTF-8. + #~(setlocale LC_ALL "C.UTF-8")) (define builder (with-imported-modules '((guix build profiles) diff --git a/tests/profiles.scm b/tests/profiles.scm index ddd6d74f3b..e448137cff 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -463,7 +463,6 @@ (define glibc (target -> "arm-linux-gnueabihf") (grep (package->cross-derivation packages:grep target)) (sed (package->cross-derivation packages:sed target)) - (locales (package->derivation (packages:libc-utf8-locales-for-target))) (drv (profile-derivation manifest #:hooks '() #:locales? #t @@ -475,15 +474,11 @@ (define glibc (and (string-suffix? name input) input))) (derivation-inputs drv)))) - ;; The inputs for grep and sed should be cross-build derivations, but that - ;; for the glibc-utf8-locales should be a native build. (return (and (string=? (derivation-system drv) (%current-system)) (string=? (find-input packages:grep) (derivation-file-name grep)) (string=? (find-input packages:sed) - (derivation-file-name sed)) - (string=? (find-input (packages:libc-utf8-locales-for-target)) - (derivation-file-name locales)))))) + (derivation-file-name sed)))))) (test-assert "package->manifest-entry defaults to \"out\"" (let ((outputs (package-outputs packages:glibc))) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 11:31:06 2023 Received: (at 67824) by debbugs.gnu.org; 18 Dec 2023 16:31:07 +0000 Received: from localhost ([127.0.0.1]:33380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGWI-0006mG-4K for submit@debbugs.gnu.org; Mon, 18 Dec 2023 11:31:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGW8-0006Sb-5s for 67824@debbugs.gnu.org; Mon, 18 Dec 2023 11:30:56 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFGW0-0007UT-TW; Mon, 18 Dec 2023 11:30:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=gJLkm5f50IdnsS1kUIz/qsUkKwRYPGDpDAcRBMXWB7A=; b=FKt88P1YWR+syKugEtV2 nEwwD0X9mmdcfY0sWLPBfRUiKZaIWrVHfpc84iSJFm2yuJk2jkbSJ4LdPeVmmGZCQrEDmiIQRDuLi cONfOyL6bGE1bwPVx0GSV4yeMNHfEeDixqGogoatM2YAeU4P2Nh2xSHerBY3MRag5uZlAVlLYKStT 9LnKPXoHNVQD7wk0KhjHef5h1Rnw+Y8iO24zuhh5qsPLj7ypxabqMB/oCSlHlA2lIX9EkXV3a5xo2 AEGiKvq/jj9eIgV4WxoHtsmLDOCPu87MYtrlkQDlY+Rq4DOEf3zrUob4L/w2ydJACgeOeDfA8tvE5 5BzB1ZgkvNbqiQ==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates v2 5/9] =?UTF-8?q?packages:=20Output=20and=20?= =?UTF-8?q?error=20ports=20are=20line-buffered=20in=20=E2=80=98patch-and-r?= =?UTF-8?q?epack=E2=80=99.?= Date: Mon, 18 Dec 2023 17:30:16 +0100 Message-ID: <568767c79a40cf44a01fe9b57372defce13ec620.1702916397.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Christopher Baines , Josselin Poiret , Ludovic Courtès , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * guix/packages.scm (patch-and-repack): Add ‘setvbuf’ calls. Change-Id: I039bb6407263d5172bf0bc716bda6860dc2615fb --- guix/packages.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/guix/packages.scm b/guix/packages.scm index 4b0c478ff4..cb8db925f8 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -1007,6 +1007,11 @@ (define* (patch-and-repack source patches '("--no-recursion" "--files-from=.file_list")))) + (let ((line (cond-expand (guile-2.0 _IOLBF) + (else 'line)))) + (setvbuf (current-output-port) line) + (setvbuf (current-error-port) line)) + ;; Encoding/decoding errors shouldn't be silent. (fluid-set! %default-port-conversion-strategy 'error) -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 11:31:07 2023 Received: (at 67824) by debbugs.gnu.org; 18 Dec 2023 16:31:07 +0000 Received: from localhost ([127.0.0.1]:33384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGWI-0006ml-Nw for submit@debbugs.gnu.org; Mon, 18 Dec 2023 11:31:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGW9-0006UZ-6O for 67824@debbugs.gnu.org; Mon, 18 Dec 2023 11:30:57 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFGW1-0007Uc-Qb; Mon, 18 Dec 2023 11:30:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=tN+Fn29suZxK3b8EnX4BuK8bWqEj5AMsqDEwh9mq2sI=; b=Zuf2BoAr+ZwlKOi/qSHX 5Pn+12wAAPmpVDQzkpfdbNrJQXVsnHfIXBSKBSetXaCg/F78Kzu7aHi7uKOmickHn9Xjlod2qw4Uq GaNU5sXBVqVbKToeQwBtW4H0skHGr8VvuatNUn6/8izmL8uRVSSBpVtwnup+GAM/RRl2E7K4Htan/ kfBMxPzAGLSwHTociXW1LskmuBrBxCovBC3oZ9p9lYm0eV6csOJN6cbr/JLQ1WgNj3Atmaj2bLkPv 4mwu0wIc6fnN3IpombHiZuAiJsXwhcuoy/5g4uIELoqTYThz0M4afi8FcKbZ5SMwCknn9eR55shoL Ff8L/Tcd/0vtxQ==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates v2 6/9] gnu: glibc-utf8-locales: Add the C.UTF-8 locale. Date: Mon, 18 Dec 2023 17:30:17 +0100 Message-ID: <7f7ca40f6236f1456cdc5604549a60f8070d6514.1702916397.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/base.scm (%default-utf8-locales): Add "C". (make-glibc-utf8-locales): Delete "C" from LOCALES for glibc versions lower than or equal to 2.35. Change-Id: I6a6faa68dc18bf0f87c372109a17f476d3561278 --- gnu/packages/base.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index d31c0b0772..eab9ff411d 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1396,7 +1396,8 @@ (define-public (make-glibc-locales glibc) (define %default-utf8-locales ;; These are the locales commonly used for tests---e.g., in Guile's i18n ;; tests. - '("de_DE" "el_GR" "en_US" "fr_FR" "tr_TR")) + '("C" "de_DE" "el_GR" "en_US" "fr_FR" "tr_TR")) + (define*-public (make-glibc-utf8-locales glibc #:key (locales %default-utf8-locales) (name "glibc-utf8-locales")) @@ -1444,7 +1445,14 @@ (define*-public (make-glibc-utf8-locales glibc #:key (symlink (string-append locale ".utf8") (string-append localedir "/" locale ".UTF-8"))) - '#$locales))))) + + ;; The C.UTF-8 locale was introduced in 2.35 but it + ;; fails to build there: + ;; . + '#$(if (version>? (package-version this-package) + "2.35") + locales + (delete "C" locales))))))) (native-inputs (list glibc gzip)) (synopsis (if default-locales? (P_ "Small sample of UTF-8 locales") -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 11:31:08 2023 Received: (at 67824) by debbugs.gnu.org; 18 Dec 2023 16:31:08 +0000 Received: from localhost ([127.0.0.1]:33386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGWJ-0006nK-Hz for submit@debbugs.gnu.org; Mon, 18 Dec 2023 11:31:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGW9-0006Ve-VB for 67824@debbugs.gnu.org; Mon, 18 Dec 2023 11:30:58 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFGW2-0007Un-Ko; Mon, 18 Dec 2023 11:30:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=dPHtgIeOoli4nEd9fPV/besd3+isLEewGoQH9UkRGDc=; b=XBMrjGPe2L2rI+QrzZLr EmjOftVa8OdUxfeAc6Aln0M+6JE8RRrxEmZvNuR2vtttaaAcrc2fuklxBoI1No6nGlMxgkvPIwnuU fKn9nUtaFh9myiRXMqKdQ9h0b5gi5cKB2RZGCRcETp0jJcqGeoa6dm3Z91uNq0llFXf+9B6wmxfiB /MVW1gcMNcq1xoJ0q9eS5DhVyGePLfiHzcLkxWoFZq95Flg0fEM+81k85CM2i+gPOXv7UiPyn2NxY U8uWsf/RD/E/2Acqp6JtSQisC4/VMQXlrXQK4Y/OEwmGnR0TBnAeIj2KbIejrEK9T1dk0WtH1TnDE FAHCN5XmrDQ8cw==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates v2 7/9] =?UTF-8?q?gnu:=20glibc:=20Add=20patch?= =?UTF-8?q?=20for=20=E2=80=98ucontext=E2=80=99=20on=20x86=5F64-gnu=20(GNU/?= =?UTF-8?q?Hurd).?= Date: Mon, 18 Dec 2023 17:30:18 +0100 Message-ID: <2f3b64b9d967b4eea5cbdb32c859f4e3ac3b1a83.1702916397.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Suggested by Sergey Bugaev. * gnu/packages/patches/glibc-2.38-hurd-ucontext.patch: New file. * gnu/packages/base.scm (glibc)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. Change-Id: Ib74e93f2414eda2ec4b3e01fc2bb67b02838fabb --- gnu/local.mk | 1 + gnu/packages/base.scm | 1 + .../patches/glibc-2.38-hurd-ucontext.patch | 87 +++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 gnu/packages/patches/glibc-2.38-hurd-ucontext.patch diff --git a/gnu/local.mk b/gnu/local.mk index ff2f82a23a..e92cf871ad 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1320,6 +1320,7 @@ dist_patch_DATA = \ %D%/packages/patches/glibc-2.37-hurd-clock_t_centiseconds.patch \ %D%/packages/patches/glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch \ %D%/packages/patches/glibc-2.37-versioned-locpath.patch \ + %D%/packages/patches/glibc-2.38-hurd-ucontext.patch \ %D%/packages/patches/glibc-2.38-ldd-x86_64.patch \ %D%/packages/patches/glibc-hurd-clock_t_centiseconds.patch \ %D%/packages/patches/glibc-hurd-getauxval.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index eab9ff411d..e2a952cc42 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -813,6 +813,7 @@ (define-public glibc "glibc-supported-locales.patch" "glibc-2.37-hurd-clock_t_centiseconds.patch" "glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch" + "glibc-2.38-hurd-ucontext.patch" "glibc-hurd-mach-print.patch" "glibc-hurd-gettyent.patch" "glibc-hurd-getauxval.patch")))) diff --git a/gnu/packages/patches/glibc-2.38-hurd-ucontext.patch b/gnu/packages/patches/glibc-2.38-hurd-ucontext.patch new file mode 100644 index 0000000000..03a6132666 --- /dev/null +++ b/gnu/packages/patches/glibc-2.38-hurd-ucontext.patch @@ -0,0 +1,87 @@ +commit 29d4591b07a4da53320e949557c6946c62c26bde +Author: Samuel Thibault +Date: Thu Sep 28 00:07:18 2023 +0200 + + hurd: Drop REG_GSFS and REG_ESDS from x86_64's ucontext + + These are useless on x86_64, and __NGREG was actually wrong with them. + +diff --git a/sysdeps/mach/hurd/x86/trampoline.c b/sysdeps/mach/hurd/x86/trampoline.c +index 6318c9528a..bc3f15e1e0 100644 +--- a/sysdeps/mach/hurd/x86/trampoline.c ++++ b/sysdeps/mach/hurd/x86/trampoline.c +@@ -79,8 +79,8 @@ static void fill_ucontext (ucontext_t *uc, const struct sigcontext *sc) + + /* Registers. */ + #ifdef __x86_64__ +- memcpy (&uc->uc_mcontext.gregs[REG_GSFS], &sc->sc_gs, +- (REG_ERR - REG_GSFS) * sizeof (long)); ++ memcpy (&uc->uc_mcontext.gregs[REG_R8], &sc->sc_r8, ++ (REG_ERR - REG_R8) * sizeof (long)); + #else + memcpy (&uc->uc_mcontext.gregs[REG_GS], &sc->sc_gs, + (REG_TRAPNO - REG_GS) * sizeof (int)); +diff --git a/sysdeps/mach/hurd/x86_64/bits/sigcontext.h b/sysdeps/mach/hurd/x86_64/bits/sigcontext.h +index 6396054463..7facc587b8 100644 +--- a/sysdeps/mach/hurd/x86_64/bits/sigcontext.h ++++ b/sysdeps/mach/hurd/x86_64/bits/sigcontext.h +@@ -59,13 +59,7 @@ struct sigcontext + } + trampoline.c knows this, so it must be changed if this changes. */ + +-#define sc_i386_thread_state sc_gs /* Beginning of correspondence. */ +- /* Segment registers. */ +- int sc_gs; +- int sc_fs; +- int sc_es; +- int sc_ds; +- ++#define sc_i386_thread_state sc_r8 /* Beginning of correspondence. */ + long sc_r8; + long sc_r9; + long sc_r10; +diff --git a/sysdeps/mach/x86/thread_state.h b/sysdeps/mach/x86/thread_state.h +index 8c419515f9..e237e46cb2 100644 +--- a/sysdeps/mach/x86/thread_state.h ++++ b/sysdeps/mach/x86/thread_state.h +@@ -34,12 +34,13 @@ + #define PC rip + #define SP ursp + #define SYSRETURN rax ++#define MACHINE_THREAD_STATE_FIX_NEW(ts) do { \ ++ asm ("mov %%cs, %w0" : "=q" ((ts)->cs)); \ ++} while(0) + #else + #define PC eip + #define SP uesp + #define SYSRETURN eax +-#endif +- + #define MACHINE_THREAD_STATE_FIX_NEW(ts) do { \ + asm ("mov %%cs, %w0" : "=q" ((ts)->cs)); \ + asm ("mov %%ds, %w0" : "=q" ((ts)->ds)); \ +@@ -47,6 +48,7 @@ + asm ("mov %%fs, %w0" : "=q" ((ts)->fs)); \ + asm ("mov %%gs, %w0" : "=q" ((ts)->gs)); \ + } while(0) ++#endif + + struct machine_thread_all_state + { +diff --git a/sysdeps/x86_64/sys/ucontext.h b/sysdeps/x86_64/sys/ucontext.h +index d73a893795..f1b6be77a7 100644 +--- a/sysdeps/x86_64/sys/ucontext.h ++++ b/sysdeps/x86_64/sys/ucontext.h +@@ -47,11 +47,7 @@ typedef greg_t gregset_t[__NGREG]; + /* Number of each register in the `gregset_t' array. */ + enum + { +- REG_GSFS = 0, /* Actually int gs, fs. */ +-# define REG_GSFS REG_GSFS +- REG_ESDS, /* Actually int es, ds. */ +-# define REG_ESDS REG_ESDS +- REG_R8, ++ REG_R8 = 0, + # define REG_R8 REG_R8 + REG_R9, + # define REG_R9 REG_R9 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 11:31:09 2023 Received: (at 67824) by debbugs.gnu.org; 18 Dec 2023 16:31:09 +0000 Received: from localhost ([127.0.0.1]:33388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGWK-0006nd-Gg for submit@debbugs.gnu.org; Mon, 18 Dec 2023 11:31:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGWC-0006Xi-10 for 67824@debbugs.gnu.org; Mon, 18 Dec 2023 11:31:00 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFGW4-0007V9-NI; Mon, 18 Dec 2023 11:30:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=L42db8QBpkkS7mLjYOdS1Zt7UdFfrQfMW4IzOoje71c=; b=eEj4yUpmV42nj4E403c6 yvLyg2N3U/fQ9oIQq87havzFMXpx67dcif0VIVfwiPjdI4i1r4fSvzU/LgnbC4Ti2Da1CRKuoE49j uC1wa5isLPZZe+JH8hcXTZFxcReSKDZNkcbndByBfhTKc9PC9GJIWbv+JSKKplmR9O+2opHsKejwt I0hP1aeHePsv+E4nAeU37Z5ezA51oqJs5EuAfpWifckEltpRNgfgAEPIGoqb1o8hyzPBZGEcsm+BG wq54o4tFalEmw9B6edqCE4XegN8dCC7RTyvmVF/OMeKdwCLyAqFBq7mjMSdZDOvkN9YlAApZJAapW 35eWeRf4goVHDw==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates v2 9/9] gnu: glib: Skip test that fails with glibc 2.38. Date: Mon, 18 Dec 2023 17:30:20 +0100 Message-ID: <08c866533e2a76bcf91149208c1323ecbfcff4cd.1702916397.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Debbugs-Cc: Liliana Marie Prikler , Maxim Cournoyer , Raghav Gururajan Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/glib.scm (glib)[arguments]: In ‘disable-failing-tests’ phase, substitute “glib/tests/error.c”. Change-Id: I9e3f5f1f5f55d08c83fbde3b79931987df27ebdf --- gnu/packages/glib.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index dc8cf5800b..13f957f810 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020, 2021, 2023 Ludovic Courtès ;;; Copyright © 2013, 2015 Andreas Enge ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2021 Mark H Weaver @@ -275,6 +275,10 @@ (define glib (substitute* '("contenttype.c" "gdbus-address-get-session.c" "gdbus-peer.c" "appinfo.c" "desktop-app-info.c") (("[ \t]*g_test_add_func.*;") ""))) + (substitute* "glib/tests/error.c" + ;; This test segfaults with glibc 2.38. + (("g_test_add_func.*new-valist/invalid.*" all) + (string-append "//" all "\n"))) #$@(if (target-x86-32?) ;; Comment out parts of timer.c that fail on i686 due to -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 18 11:31:09 2023 Received: (at 67824) by debbugs.gnu.org; 18 Dec 2023 16:31:09 +0000 Received: from localhost ([127.0.0.1]:33390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGWL-0006nw-0R for submit@debbugs.gnu.org; Mon, 18 Dec 2023 11:31:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFGWC-0006YG-Gt for 67824@debbugs.gnu.org; Mon, 18 Dec 2023 11:31:01 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFGW3-0007V0-S1; Mon, 18 Dec 2023 11:30:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=us/RZNPz9QE+U7JBcmSVn0PlJR0j2F9GiJmk2W8LmWg=; b=i9OOXkMDu2IrIv0DsUrW ENHyfwEL75pS53trqp/KKt5pGWm7xjbgewxfivc19XDiH23bk2/XjqlVEBOwiW3c7AygwABoOjCOQ Vv8faB56DXLNQ4RrJ5n5IIy0I8fk9Cnr+Jq8+bpDq/eAXW7lxMXdFA9RO2xVftArNDCrDyAAAcXAi VTUSCebv3FNgYbVv3EMKgPhtIgmuXe6KAlYj7NiABBl32a7oOT+wcEhrof1RbbgC9fFwo2CMGthMG Cj9YPXtFC0YxUpva1ZVU3g1J/t+S+2QObtVZZv2mY+c9j6t2k+Go8OlEa0UuElKG3UEY9DkpsdPYB B1J3TDY+YEn0Dg==; From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= To: 67824@debbugs.gnu.org Subject: [PATCH core-updates v2 8/9] =?UTF-8?q?build-system/gnu:=20Turn=20?= =?UTF-8?q?PID=201=20into=20an=20=E2=80=9Cinit=E2=80=9D-style=20process=20?= =?UTF-8?q?by=20default.?= Date: Mon, 18 Dec 2023 17:30:19 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824 Cc: =?UTF-8?q?Ludovic=20Court=C3=A8s?= , Carlo Zancanaro X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Fixes . * guix/build/gnu-build-system.scm (separate-from-pid1): New procedure. (%standard-phases): Add it. * guix/build-system/gnu.scm (gnu-build): Add #:separate-from-pid1? and honor it. (gnu-cross-build): Likewise. Reported-by: Carlo Zancanaro Change-Id: I6f3bc8d8186d1a571f983a38d5e3fd178ffa2678 --- guix/build-system/gnu.scm | 4 ++++ guix/build/gnu-build-system.scm | 39 ++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm index 0f886fe21d..6a89bcc0d8 100644 --- a/guix/build-system/gnu.scm +++ b/guix/build-system/gnu.scm @@ -362,6 +362,7 @@ (define* (gnu-build name inputs (license-file-regexp %license-file-regexp) (phases '%standard-phases) (locale "C.UTF-8") + (separate-from-pid1? #t) (system (%current-system)) (build (nix-system->gnu-triplet system)) (imported-modules %default-gnu-imported-modules) @@ -404,6 +405,7 @@ (define* (gnu-build name inputs (sexp->gexp phases) phases) #:locale #$locale + #:separate-from-pid1? #$separate-from-pid1? #:bootstrap-scripts #$bootstrap-scripts #:configure-flags #$(if (pair? configure-flags) (sexp->gexp configure-flags) @@ -502,6 +504,7 @@ (define* (gnu-cross-build name (license-file-regexp %license-file-regexp) (phases '%standard-phases) (locale "C.UTF-8") + (separate-from-pid1? #t) (system (%current-system)) (build (nix-system->gnu-triplet system)) (imported-modules %default-gnu-imported-modules) @@ -547,6 +550,7 @@ (define* (gnu-cross-build name (sexp->gexp phases) phases) #:locale #$locale + #:separate-from-pid1? #$separate-from-pid1? #:bootstrap-scripts #$bootstrap-scripts #:configure-flags #$configure-flags #:make-flags #$make-flags diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 39707e7ace..51b8f9acbf 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -72,6 +72,42 @@ (define (first-subdirectory directory) ((first . _) first) (_ #f))) +(define* (separate-from-pid1 #:key (separate-from-pid1? #t) + #:allow-other-keys) + "When running as PID 1 and SEPARATE-FROM-PID1? is true, run build phases as +a child process; PID 1 then becomes responsible for reaping child processes." + (if separate-from-pid1? + (if (= 1 (getpid)) + (dynamic-wind + (const #t) + (lambda () + (match (primitive-fork) + (0 #t) + (builder-pid + (format (current-error-port) + "build process now running as PID ~a~%" + builder-pid) + (let loop () + ;; Running as PID 1 so take responsibility for reaping + ;; child processes. + (match (waitpid WAIT_ANY) + ((pid . status) + (if (= pid builder-pid) + (if (zero? status) + (primitive-exit 0) + (begin + (format (current-error-port) + "build process ~a exited with status ~a~%" + pid status) + (primitive-exit 1))) + (loop)))))))) + (const #t)) + (format (current-error-port) "not running as PID 1 (PID: ~a)~%" + (getpid))) + (format (current-error-port) + "build process running as PID ~a; not forking~%" + (getpid)))) + (define* (set-paths #:key target inputs native-inputs (search-paths '()) (native-search-paths '()) #:allow-other-keys) @@ -872,7 +908,8 @@ (define %standard-phases ;; Standard build phases, as a list of symbol/procedure pairs. (let-syntax ((phases (syntax-rules () ((_ p ...) `((p . ,p) ...))))) - (phases set-SOURCE-DATE-EPOCH set-paths install-locale unpack + (phases separate-from-pid1 + set-SOURCE-DATE-EPOCH set-paths install-locale unpack bootstrap patch-usr-bin-file patch-source-shebangs configure patch-generated-file-shebangs -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 19 17:55:07 2023 Received: (at 67824-done) by debbugs.gnu.org; 19 Dec 2023 22:55:08 +0000 Received: from localhost ([127.0.0.1]:37860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFizT-0000nC-JK for submit@debbugs.gnu.org; Tue, 19 Dec 2023 17:55:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFizR-0000lv-SU for 67824-done@debbugs.gnu.org; Tue, 19 Dec 2023 17:55:06 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFiz9-0008Jm-F2; Tue, 19 Dec 2023 17:54:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=75Hzy++yoyVE3K7nUcJuKsJD02fYlTaIJGLjZ3JOMqc=; b=AQi5IHWjjoWDGHq1SNUC qq1fv6P6BHAy/w3xp14VycJ4Q3AsyjjeC6IFHEFwgZyu5Z8JCYxPWMWDtHvXXsBylIl9O4qAz+4Aj KX3im2AmX0LjI0IgZbxCPk5Z4NoO3f2CN3xXI8fr6XxMurO3LiHDG/qGuCn/Yn3AvojOilwdsOeYm b3A7fJj5ictEagx8H36iHK4UmKP//+xNFDlnUPFkUe86aZhasiiU5uUZjAndGts6ysZs23JJsy3pJ py7HbjLtYPnqRYHwwK93VloNSjhENCJE3BTCTs3Gwr72oLFCehj8q+dc1s29YnGkZCM2q4Xcq9w19 9b6Yu4LDSOemtA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 67824-done@debbugs.gnu.org Subject: Re: [bug#67824] [PATCH core-updates v2 0/9] Run builds in C.UTF-8 locale In-Reply-To: ("Ludovic =?utf-8?Q?Court?= =?utf-8?Q?=C3=A8s=22's?= message of "Mon, 18 Dec 2023 17:30:11 +0100") References: Date: Tue, 19 Dec 2023 23:54:42 +0100 Message-ID: <875y0tiz0t.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824-done Cc: Josselin Poiret , Maxim Cournoyer , Tobias Geerinckx-Rice , Liliana Marie Prikler , Raghav Gururajan , Christopher Baines , Janneke Nieuwenhuizen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s skribis: > packages: Remove reference to =E2=80=98glibc-utf8-locales=E2=80=99 in > =E2=80=98patch-and-repack=E2=80=99. > build-system/gnu: Change default locale to C.UTF-8. > gnu: commencement: Remove =E2=80=98glibc-utf8-locales=E2=80=99 from =E2= =80=98%final-inputs=E2=80=99. > profiles: Use C.UTF-8 instead of =E2=80=98glibc-utf8-locales=E2=80=99 w= here possible. > packages: Output and error ports are line-buffered in > =E2=80=98patch-and-repack=E2=80=99. > gnu: glibc-utf8-locales: Add the C.UTF-8 locale. > gnu: glibc: Add patch for =E2=80=98ucontext=E2=80=99 on x86_64-gnu (GNU= /Hurd). > build-system/gnu: Turn PID 1 into an =E2=80=9Cinit=E2=80=9D-style proce= ss by default. > gnu: glib: Skip test that fails with glibc 2.38. Pushed v2 as 62e67aa7994f40c438ef5a528675e85699d7af76. Now to see what ci.guix thinks about it=E2=80=A6 Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 20 02:21:13 2023 Received: (at 67824-done) by debbugs.gnu.org; 20 Dec 2023 07:21:13 +0000 Received: from localhost ([127.0.0.1]:38521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFqtF-0001hM-By for submit@debbugs.gnu.org; Wed, 20 Dec 2023 02:21:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rFqtB-0001gu-M3 for 67824-done@debbugs.gnu.org; Wed, 20 Dec 2023 02:21:12 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rFqt2-0004Dy-AM; Wed, 20 Dec 2023 02:21:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=nWR7vs3yvg61atqbruyr4RZ3vIrmK9QPX81vJgG3sDQ=; b=pUbDb19weBzGitqbgdKS SdXsNNSm/Df179QxH62cXLWkXUxGlZ+os77WuTZi3suk28ETw2S8L5uc4EKgZaQaIEsQXK5STYhcm MIb35xqTGPGbKn7Yt/nThuOLawMWYfdJroLzkYC7HVvlFeYPhMJ2hoFfH+VmWwlGG+bHelnq/kGHo /AouVQvmiqql+UbGND3nkIbHzQoCgyQW+PnZHHepFwuiEhsA3b7Lqo9uuMXPS/w+dfQlTj333Av5U j9qR6yzo0LaEAjvVw9RXOfdhKczVgUQ9kEnokgijHK74F49IR8d2YJYsARcdZyTEZVLtXV2GLfw5G BwXgaDKsmZVPQg==; From: Janneke Nieuwenhuizen To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#67824] [PATCH core-updates v2 0/9] Run builds in C.UTF-8 locale In-Reply-To: <875y0tiz0t.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Tue, 19 Dec 2023 23:54:42 +0100") Organization: AvatarAcademy.nl References: <875y0tiz0t.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Wed, 20 Dec 2023 08:20:56 +0100 Message-ID: <874jgdpcfb.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67824-done Cc: Josselin Poiret , 67824-done@debbugs.gnu.org, Maxim Cournoyer , Tobias Geerinckx-Rice , Liliana Marie Prikler , Raghav Gururajan , Christopher Baines X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ludovic Court=C3=A8s writes: > Ludovic Court=C3=A8s skribis: > >> packages: Remove reference to =E2=80=98glibc-utf8-locales=E2=80=99 in >> =E2=80=98patch-and-repack=E2=80=99. >> build-system/gnu: Change default locale to C.UTF-8. >> gnu: commencement: Remove =E2=80=98glibc-utf8-locales=E2=80=99 from = =E2=80=98%final-inputs=E2=80=99. >> profiles: Use C.UTF-8 instead of =E2=80=98glibc-utf8-locales=E2=80=99 = where possible. >> packages: Output and error ports are line-buffered in >> =E2=80=98patch-and-repack=E2=80=99. >> gnu: glibc-utf8-locales: Add the C.UTF-8 locale. >> gnu: glibc: Add patch for =E2=80=98ucontext=E2=80=99 on x86_64-gnu (GN= U/Hurd). >> build-system/gnu: Turn PID 1 into an =E2=80=9Cinit=E2=80=9D-style proc= ess by default. >> gnu: glib: Skip test that fails with glibc 2.38. > > Pushed v2 as 62e67aa7994f40c438ef5a528675e85699d7af76. > > Now to see what ci.guix thinks about it=E2=80=A6 +1 Haven't built everyting just yet, but it's looking good. Thank you! --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com From unknown Thu Sep 11 04:20:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 17 Jan 2024 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator