Package: guix;
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Wed, 11 Oct 2023 21:44:02 UTC
Severity: normal
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66472 in the body.
You can then email your comments to 66472 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
janneke <at> gnu.org, dev <at> jpoiret.xyz, bug-guix <at> gnu.org
:bug#66472
; Package guix
.
(Wed, 11 Oct 2023 21:44:02 GMT) Full text and rfc822 format available.Ludovic Courtès <ludo <at> gnu.org>
:janneke <at> gnu.org, dev <at> jpoiret.xyz, bug-guix <at> gnu.org
.
(Wed, 11 Oct 2023 21:44:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: bug-guix <at> gnu.org Subject: Wrong ‘glibc-utf8-locales’ package used on GNU/Hurd Date: Wed, 11 Oct 2023 23:42:53 +0200
Hi! We discussed it briefly on IRC the other day: our packages get built on i586-gnu with the wrong ‘glibc-utf8-locales’ package (2.35 instead of 2.37), which causes Coreutils among others to fail to build: --8<---------------cut here---------------start------------->8--- environment variable `GUIX_LOCPATH' set to `/gnu/store/sq6w1nfi59askjfq6b1nqq6z8ld5zh1l-glibc-utf8-locales-2.35/lib/locale' phase `set-paths' succeeded after 0.0 seconds starting phase `install-locale' warning: failed to install 'en_US.utf8' locale: Invalid argument phase `install-locale' succeeded after 0.0 seconds […] starting phase `remove-tests' error: in phase 'remove-tests': uncaught exception: decoding-error "decode-char" "input decoding error" 1073741930 #<input: tests/misc/ls-misc.pl 15> phase `remove-tests' failed after 0.1 seconds […] builder for `/gnu/store/vvp0yxvyxsrwmmzli7dsxinr6p9ba3mj-coreutils-9.1.drv' failed with exit code 1 --8<---------------cut here---------------end--------------->8--- (This is from <https://ci.guix.gnu.org/build/2062597/details>, made with commit cdbd81ce144f17644ceebd3d08723aa244696a05.) So we need a better fix than the local workaround in 21deb89e287b5821975544118bf137562a91d4e1. Thoughts? Perhaps you’ve looked into it already? Ludo’.
bug-guix <at> gnu.org
:bug#66472
; Package guix
.
(Thu, 12 Oct 2023 14:14:02 GMT) Full text and rfc822 format available.Message #8 received at 66472 <at> debbugs.gnu.org (full text, mbox):
From: Janneke Nieuwenhuizen <janneke <at> gnu.org> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 66472 <at> debbugs.gnu.org, Josselin Poiret <dev <at> jpoiret.xyz> Subject: Re: bug#66472: Wrong ‘glibc-utf8-locales’ package used on GNU/Hurd Date: Thu, 12 Oct 2023 16:12:46 +0200
Ludovic Courtès writes: Hey! > We discussed it briefly on IRC the other day: our packages get built on > i586-gnu with the wrong ‘glibc-utf8-locales’ package (2.35 instead of > 2.37), which causes Coreutils among others to fail to build: > > environment variable `GUIX_LOCPATH' set to `/gnu/store/sq6w1nfi59askjfq6b1nqq6z8ld5zh1l-glibc-utf8-locales-2.35/lib/locale' > phase `set-paths' succeeded after 0.0 seconds > starting phase `install-locale' > warning: failed to install 'en_US.utf8' locale: Invalid argument > phase `install-locale' succeeded after 0.0 seconds > […] > starting phase `remove-tests' > error: in phase 'remove-tests': uncaught exception: > decoding-error "decode-char" "input decoding error" 1073741930 #<input: tests/misc/ls-misc.pl 15> > phase `remove-tests' failed after 0.1 seconds > […] > builder for `/gnu/store/vvp0yxvyxsrwmmzli7dsxinr6p9ba3mj-coreutils-9.1.drv' failed with exit code 1 > > (This is from <https://ci.guix.gnu.org/build/2062597/details>, made with > commit cdbd81ce144f17644ceebd3d08723aa244696a05.) > > So we need a better fix than the local workaround in > 21deb89e287b5821975544118bf137562a91d4e1. > > Thoughts? Perhaps you’ve looked into it already? Hmm. I've briefly looked at this but failed to reproduce it. I've tried building coreutils, and coreutils-final in a childhurd created from "a recent" hurd-team branch. --8<---------------cut here---------------start------------->8--- root <at> guixydevel ~/src/guix/hurd-team [env]# ./pre-inst-env guix build --keep-failed -e '(@@ (gnu packages commencement) coreutils-final)' --without-tests=coreutils [..] environment variable `GUIX_LOCPATH' set to `/gnu/store/sq6w1nfi59askjfq6b1nqq6z8ld5zh1l-glibc-utf8-locales-2.35/lib/locale' [..] phase `unpack' succeeded after 10.4 seconds starting phase `remove-tests' phase `remove-tests' succeeded after 0.5 seconds starting phase `bootstrap' [..] successfully built /gnu/store/zryfw42ayqpmk3s15a7s2cn231xsyjf0-coreutils-9.1.drv /gnu/store/zbdppljxvvw3vc6lz64h5ic3fvihdr7q-coreutils-9.1 --8<---------------cut here---------------end--------------->8--- and similar for coreutils. I've seen a similar error before trying to build guile-avahi a while ago (before 21deb89e287b5821975544118bf137562a91d4e1) and it really puzzled me. The idea that a mismatch between GUIX_LOCPATH's glibc version for locales (2.35) and the glibc actually used (2.37) would cause this mysterious bug, is kind of a relief... ...although I've got no idea what causes this mismatch or how to fix it ;) Greetings, Janneke -- Janneke Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
bug-guix <at> gnu.org
:bug#66472
; Package guix
.
(Sat, 14 Oct 2023 17:43:02 GMT) Full text and rfc822 format available.Message #11 received at 66472 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Janneke Nieuwenhuizen <janneke <at> gnu.org> Cc: 66472 <at> debbugs.gnu.org, Josselin Poiret <dev <at> jpoiret.xyz> Subject: Re: bug#66472: Wrong ‘glibc-utf8-locales’ package used on GNU/Hurd Date: Sat, 14 Oct 2023 19:41:21 +0200
Hi, Janneke Nieuwenhuizen <janneke <at> gnu.org> skribis: >> starting phase `remove-tests' >> error: in phase 'remove-tests': uncaught exception: >> decoding-error "decode-char" "input decoding error" 1073741930 #<input: tests/misc/ls-misc.pl 15> [...] > Hmm. I've briefly looked at this but failed to reproduce it. I've > tried building coreutils, and coreutils-final in a childhurd created > from "a recent" hurd-team branch. > > root <at> guixydevel ~/src/guix/hurd-team [env]# ./pre-inst-env guix build --keep-failed -e '(@@ (gnu packages commencement) coreutils-final)' --without-tests=coreutils > [..] > environment variable `GUIX_LOCPATH' set to `/gnu/store/sq6w1nfi59askjfq6b1nqq6z8ld5zh1l-glibc-utf8-locales-2.35/lib/locale' > [..] > phase `unpack' succeeded after 10.4 seconds > starting phase `remove-tests' > phase `remove-tests' succeeded after 0.5 seconds Maybe something differs on ‘hurd-team’? For me it’s 100% reproducible on ‘master’, even though my childhurd has /run/current-system/locale/2.37 (I thought this could interfere but luckily it doesn’t.) Anyway, in both cases the core issue remains: we’re building packages with the wrong locale data. The mismatch comes from the fact that ‘glibc-utf8-locales’ is a system-independent package: you get 2.35 regardless of the system you’re targeting. Thanks, Ludo’.
bug-guix <at> gnu.org
:bug#66472
; Package guix
.
(Sat, 14 Oct 2023 20:23:02 GMT) Full text and rfc822 format available.Message #14 received at 66472 <at> debbugs.gnu.org (full text, mbox):
From: Janneke Nieuwenhuizen <janneke <at> gnu.org> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 66472 <at> debbugs.gnu.org, Josselin Poiret <dev <at> jpoiret.xyz> Subject: Re: bug#66472: Wrong ‘glibc-utf8-locales’ package used on GNU/Hurd Date: Sat, 14 Oct 2023 22:22:15 +0200
Ludovic Courtès writes: > Hi, > > Janneke Nieuwenhuizen <janneke <at> gnu.org> skribis: > >>> starting phase `remove-tests' >>> error: in phase 'remove-tests': uncaught exception: >>> decoding-error "decode-char" "input decoding error" 1073741930 >>> #<input: tests/misc/ls-misc.pl 15> > > [...] > >> Hmm. I've briefly looked at this but failed to reproduce it. I've >> tried building coreutils, and coreutils-final in a childhurd created >> from "a recent" hurd-team branch. >> >> root <at> guixydevel ~/src/guix/hurd-team [env]# ./pre-inst-env guix >> build --keep-failed -e '(@@ (gnu packages commencement) >> coreutils-final)' --without-tests=coreutils >> [..] >> environment variable `GUIX_LOCPATH' set to >> `/gnu/store/sq6w1nfi59askjfq6b1nqq6z8ld5zh1l-glibc-utf8-locales-2.35/lib/locale' >> [..] >> phase `unpack' succeeded after 10.4 seconds >> starting phase `remove-tests' >> phase `remove-tests' succeeded after 0.5 seconds > > Maybe something differs on ‘hurd-team’? Well, yeah. I've been building in a childhurd created from gnu/system/examples/devel-hurd.tmpl, which currently has (locale-libcs (if (system-hurd?) (list glibc/hurd) %default-locale-libcs)) > For me it’s 100% reproducible > on ‘master’, even though my childhurd has > /run/current-system/locale/2.37 (I thought this could interfere but > luckily it doesn’t.) > > Anyway, in both cases the core issue remains: we’re building packages > with the wrong locale data. > > The mismatch comes from the fact that ‘glibc-utf8-locales’ is a > system-independent package: you get 2.35 regardless of the system you’re > targeting. Right. Is that easy, difficult, or impossible to change? Greetings, Janneke -- Janneke Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
bug-guix <at> gnu.org
:bug#66472
; Package guix
.
(Sat, 21 Oct 2023 14:36:02 GMT) Full text and rfc822 format available.Message #17 received at 66472 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Janneke Nieuwenhuizen <janneke <at> gnu.org> Cc: 66472 <at> debbugs.gnu.org, Josselin Poiret <dev <at> jpoiret.xyz> Subject: Re: bug#66472: Wrong ‘glibc-utf8-locales’ package used on GNU/Hurd Date: Sat, 21 Oct 2023 16:34:23 +0200
Hi, Janneke Nieuwenhuizen <janneke <at> gnu.org> skribis: > Ludovic Courtès writes: [...] >> Anyway, in both cases the core issue remains: we’re building packages >> with the wrong locale data. >> >> The mismatch comes from the fact that ‘glibc-utf8-locales’ is a >> system-independent package: you get 2.35 regardless of the system you’re >> targeting. > > Right. Is that easy, difficult, or impossible to change? We could define ‘glibc-utf8-locales’ with ‘define/system-dependent’, as we’ve done in commencement.scm. However, I don’t think that’s feasible because then every place that does: (module-ref (resolve-interface '(gnu packages base)) 'glibc-utf8-locales) will suddenly be broken, and that’s not acceptable. So I’m not sure what to do. Again I feel that maintaining two libc variants is too costly. Time to upgrade in ‘core-updates’? Ludo’.
bug-guix <at> gnu.org
:bug#66472
; Package guix
.
(Sun, 22 Oct 2023 12:28:01 GMT) Full text and rfc822 format available.Message #20 received at 66472 <at> debbugs.gnu.org (full text, mbox):
From: Janneke Nieuwenhuizen <janneke <at> gnu.org> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 66472 <at> debbugs.gnu.org, Josselin Poiret <dev <at> jpoiret.xyz> Subject: Re: bug#66472: Wrong ‘glibc-utf8-locales’ package used on GNU/Hurd Date: Sun, 22 Oct 2023 14:26:51 +0200
[Message part 1 (text/plain, inline)]
Ludovic Courtès writes: Hello, > Janneke Nieuwenhuizen <janneke <at> gnu.org> skribis: > >> Ludovic Courtès writes: >> >>> Anyway, in both cases the core issue remains: we’re building packages >>> with the wrong locale data. >>> >>> The mismatch comes from the fact that ‘glibc-utf8-locales’ is a >>> system-independent package: you get 2.35 regardless of the system you’re >>> targeting. >> >> Right. Is that easy, difficult, or impossible to change? > > We could define ‘glibc-utf8-locales’ with ‘define/system-dependent’, as > we’ve done in commencement.scm. However, I don’t think that’s feasible > because then every place that does: > > (module-ref (resolve-interface '(gnu packages base)) > 'glibc-utf8-locales) > > will suddenly be broken, and that’s not acceptable. Well, unless maybe in the same patch it could also be un-broken? > So I’m not sure what to do. Again I feel that maintaining two libc > variants is too costly. Time to upgrade in ‘core-updates’? Yeah, that would work...until we really need another glibc update for the Hurd. I really don't know what's wise here. So...I've tried the attached to patches "how hard could it be?" (that's not using define/system-dependent just yet) but get --8<---------------cut here---------------start------------->8--- error: failed to load 'guix/self.scm': ice-9/eval.scm:293:34: Wrong type to apply: #<promise #<procedure 7fae0716b620 at ice-9/eval.scm:330:13 ()>> --8<---------------cut here---------------end--------------->8--- ...and now I feel stuck. Greetings, Janneke
[0001-gnu-Add-libc-locales-for-target-and-glibc-locales-hu.patch (text/x-patch, inline)]
From da6027537f2146bb0d62228de2ea15fb271027ea Mon Sep 17 00:00:00 2001 Message-ID: <da6027537f2146bb0d62228de2ea15fb271027ea.1697977363.git.janneke <at> gnu.org> From: Janneke Nieuwenhuizen <janneke <at> gnu.org> Date: Wed, 7 Jun 2023 19:19:01 +0200 Subject: [PATCH 1/2] gnu: Add libc-locales-for-target and glibc-locales/hurd. * gnu/packages/base.scm (glibc-locales/hurd): New variable (libc-locales-for-target): Use it in new procedure. (glibc-utf8-locales/hurd): New variable. (libc-utf8-locales-for-target): Use it in new procedure. --- gnu/packages/base.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 2d8e9143cd..5c0e056261 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -76,6 +76,8 @@ (define-module (gnu packages base) #:use-module (srfi srfi-26) #:export (glibc libc-for-target + libc-locales-for-target + libc-utf8-locales-for-target make-ld-wrapper libiconv-if-needed %final-inputs)) @@ -1521,6 +1523,31 @@ (define* (libc-for-target #:optional (_ glibc))) +(define-public glibc-locales/hurd + (make-glibc-locales glibc/hurd)) + +(define* (libc-locales-for-target #:optional + (target (or (%current-target-system) + (%current-system)))) + (match target + ((? target-hurd?) + glibc-locales/hurd) + (_ + glibc-locales))) + +(define-public glibc-utf8-locales/hurd + (hidden-package + (make-glibc-utf8-locales glibc/hurd))) + +(define* (libc-utf8-locales-for-target #:optional + (target (or (%current-target-system) + (%current-system)))) + (match target + ((? target-hurd?) + glibc-utf8-locales/hurd) + (_ + glibc-utf8-locales))) + (define-public tzdata (package (name "tzdata") base-commit: e6af40d7b46b5c9e397a38c62c885fb42ccd9d26 -- 2.41.0
[0002-DRAFT-Use-libc-utf8-locales-for-target.patch (text/x-patch, inline)]
From 345683fea1be7e6f186fe45b59198caa9ba36890 Mon Sep 17 00:00:00 2001 Message-ID: <345683fea1be7e6f186fe45b59198caa9ba36890.1697977363.git.janneke <at> gnu.org> In-Reply-To: <da6027537f2146bb0d62228de2ea15fb271027ea.1697977363.git.janneke <at> gnu.org> References: <da6027537f2146bb0d62228de2ea15fb271027ea.1697977363.git.janneke <at> gnu.org> From: Janneke Nieuwenhuizen <janneke <at> gnu.org> Date: Sun, 22 Oct 2023 10:23:19 +0200 Subject: [PATCH 2/2] DRAFT Use libc-utf8-locales-for-target. --- gnu/home/services/ssh.scm | 4 ++-- gnu/installer.scm | 7 ++++--- gnu/packages/chromium.scm | 2 +- gnu/packages/gnome.scm | 4 ++-- gnu/packages/javascript.scm | 2 +- gnu/packages/package-management.scm | 4 ++-- gnu/packages/raspberry-pi.scm | 2 +- gnu/packages/suckless.scm | 2 +- gnu/services.scm | 2 +- gnu/services/base.scm | 7 +++++-- gnu/services/guix.scm | 23 +++++++++++++++-------- gnu/services/web.scm | 6 ++++-- gnu/system/image.scm | 12 ++++++++---- gnu/system/install.scm | 2 +- guix/profiles.scm | 27 ++++++++++++++++----------- guix/scripts/pack.scm | 5 +++-- guix/self.scm | 11 ++++++----- tests/pack.scm | 7 ++++--- tests/profiles.scm | 4 ++-- 19 files changed, 79 insertions(+), 54 deletions(-) diff --git a/gnu/home/services/ssh.scm b/gnu/home/services/ssh.scm index 34b1fe4658..c81c42263b 100644 --- a/gnu/home/services/ssh.scm +++ b/gnu/home/services/ssh.scm @@ -32,7 +32,7 @@ (define-module (gnu home services ssh) #:use-module (gnu home services shepherd) #:use-module ((gnu home services utils) #:select (object->camel-case-string)) - #:autoload (gnu packages base) (glibc-utf8-locales) + #:autoload (gnu packages base) (libc-utf8-locales-for-target) #:use-module (gnu packages ssh) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) @@ -357,7 +357,7 @@ (define* (file-join name files #:optional (delimiter " ")) ;; Support non-ASCII file names. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales + #+(file-append (libc-utf8-locales-for-target) "/lib/locale")) (setlocale LC_ALL "en_US.utf8") diff --git a/gnu/installer.scm b/gnu/installer.scm index d9b71e2ca8..db79c11530 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -85,9 +85,10 @@ (define* (build-compiled-file name locale-builder) (define set-utf8-locale #~(begin (setenv "LOCPATH" - #$(file-append glibc-utf8-locales "/lib/locale/" - (version-major+minor - (package-version glibc-utf8-locales)))) + #$(file-append + (libc-utf8-locales-for-target) "/lib/locale/" + (version-major+minor + (package-version (libc-utf8-locales-for-target))))) (setlocale LC_ALL "en_US.utf8"))) (define builder diff --git a/gnu/packages/chromium.scm b/gnu/packages/chromium.scm index 513e545938..bc49e24f0e 100644 --- a/gnu/packages/chromium.scm +++ b/gnu/packages/chromium.scm @@ -967,7 +967,7 @@ (define-public ungoogled-chromium/wayland (name "ungoogled-chromium-wayland") (native-inputs '()) (inputs - (list bash-minimal glibc-utf8-locales ungoogled-chromium)) + (list bash-minimal (libc-utf8-locales-for-target) ungoogled-chromium)) (build-system trivial-build-system) (arguments (list diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 2ffe8dfef2..f339aa115a 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -5917,7 +5917,7 @@ (define-public libgweather4 gi-docgen `(,glib "bin") ;for glib-mkenums gobject-introspection - glibc-utf8-locales + (libc-utf8-locales-for-target) gsettings-desktop-schemas pkg-config python @@ -9472,7 +9472,7 @@ (define-public tracker (native-inputs (list gettext-minimal `(,glib "bin") - glibc-utf8-locales + (libc-utf8-locales-for-target) gobject-introspection docbook-xsl docbook-xml diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index e70aa7d7e1..2c7ff744ea 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -184,7 +184,7 @@ (define-public js-mathjax #t)))) (native-inputs `(("font-mathjax" ,font-mathjax) - ("glibc-utf8-locales" ,glibc-utf8-locales) + ("glibc-utf8-locales" ,(libc-utf8-locales-for-target)) ("uglifyjs" ,node-uglify-js) ,@(package-native-inputs font-mathjax))) (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath") diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index a9bfc27bed..3cc9ee2f56 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -524,7 +524,7 @@ (define-public guix ("git-minimal" ,git-minimal) ;for 'guix perform-download' - ("glibc-utf8-locales" ,glibc-utf8-locales))) + ("glibc-utf8-locales" ,(libc-utf8-locales-for-target)))) (propagated-inputs `(("guile-gnutls" ,guile-gnutls) ;; Avahi requires "glib" which doesn't cross-compile yet. @@ -2052,7 +2052,7 @@ (define-public flatpak dbus ; for dbus-daemon gettext-minimal `(,glib "bin") ; for glib-mkenums + gdbus-codegen - glibc-utf8-locales + (libc-utf8-locales-for-target) gobject-introspection libcap pkg-config diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm index 80bfaf0896..5c25ed96da 100644 --- a/gnu/packages/raspberry-pi.scm +++ b/gnu/packages/raspberry-pi.scm @@ -199,7 +199,7 @@ (define-public raspi-arm64-chainloader ("ld-wrapper" ,ld-wrapper) ("make" ,gnu-make) ("gcc" ,gcc-6) - ("locales" ,glibc-utf8-locales))) + ("locales" ,(libc-utf8-locales-for-target)))) (inputs `()) (arguments diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm index 400832045f..714225c654 100644 --- a/gnu/packages/suckless.scm +++ b/gnu/packages/suckless.scm @@ -1247,7 +1247,7 @@ (define-public svkbd (delete 'configure)))) ;no configure script (native-inputs (list pkg-config)) (inputs (list freetype libx11 libxft libxtst libxinerama)) - (propagated-inputs (list glibc-utf8-locales)) + (propagated-inputs (list (libc-utf8-locales-for-target))) (home-page "https://tools.suckless.org/x/svkbd/") (synopsis "Virtual on-screen keyboard") (description "svkbd is a simple virtual keyboard, intended to be used in diff --git a/gnu/services.scm b/gnu/services.scm index ff153fbc7b..01d954fbc9 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -651,7 +651,7 @@ (define (cleanup-gexp _) ;; Force file names to be decoded as UTF-8. See ;; <https://bugs.gnu.org/26353>. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target) "/lib/locale")) (setlocale LC_CTYPE "en_US.utf8") (delete-file-recursively "/tmp") (delete-file-recursively "/var/run") diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 82c6940780..dc001fdef6 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -63,7 +63,9 @@ (define-module (gnu services base) #:use-module (gnu packages bash) #:use-module ((gnu packages base) #:select (coreutils glibc glibc/hurd - glibc-utf8-locales make-glibc-utf8-locales + glibc-utf8-locales + libc-utf8-locales-for-target + make-glibc-utf8-locales tar canonical-package)) #:use-module ((gnu packages compression) #:select (gzip)) #:use-module (gnu packages fonts) @@ -2147,7 +2149,8 @@ (define (guix-publish-shepherd-service config) ;; nars for packages that contain UTF-8 file names such ;; as 'nss-certs'. See <https://bugs.gnu.org/26948>. (list (string-append "GUIX_LOCPATH=" - #$glibc-utf8-locales "/lib/locale") + #$(libc-utf8-locales-for-target) + "/lib/locale") "LC_ALL=en_US.utf8") #:log-file "/var/log/guix-publish.log")) (endpoints #~(let ((ai (false-if-exception diff --git a/gnu/services/guix.scm b/gnu/services/guix.scm index fe602efb99..389903451a 100644 --- a/gnu/services/guix.scm +++ b/gnu/services/guix.scm @@ -23,7 +23,7 @@ (define-module (gnu services guix) #:use-module (guix records) #:use-module (guix packages) #:use-module ((gnu packages base) - #:select (glibc-utf8-locales)) + #:select (libc-utf8-locales-for-target)) #:use-module (gnu packages admin) #:use-module (gnu packages databases) #:use-module (gnu packages web) @@ -381,7 +381,8 @@ (define (guix-build-coordinator-shepherd-services config) #:pid-file-timeout 60 #:environment-variables `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.utf8" "PATH=/run/current-system/profile/bin" ; for hooks #$@extra-environment-variables) @@ -508,7 +509,8 @@ (define (guix-build-coordinator-agent-shepherd-services config) #:user #$user #:environment-variables `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") ;; XDG_CACHE_HOME is used by Guix when caching narinfo files "XDG_CACHE_HOME=/var/cache/guix-build-coordinator-agent" "LC_ALL=en_US.utf8") @@ -600,7 +602,8 @@ (define (guix-build-coordinator-queue-builds-shepherd-services config) #:user #$user #:environment-variables `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.utf8") #:log-file "/var/log/guix-build-coordinator/queue-builds.log")))) (stop #~(make-kill-destructor)) @@ -712,7 +715,8 @@ (define (guix-data-service-shepherd-services config) #:pid-file "/var/run/guix-data-service/pid" #:environment-variables `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.UTF-8") #:log-file "/var/log/guix-data-service/web.log")) (stop #~(make-kill-destructor))) @@ -733,7 +737,8 @@ (define (guix-data-service-shepherd-services config) `("HOME=/var/lib/guix-data-service" "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt" ,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.UTF-8") #:log-file "/var/log/guix-data-service/process-jobs.log")) (stop #~(make-kill-destructor)))))) @@ -989,7 +994,8 @@ (define (nar-herder-shepherd-services config) #:pid-file "/var/run/nar-herder/pid" #:environment-variables `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.utf8" #$@extra-environment-variables) #:log-file "/var/log/nar-herder/server.log")) @@ -1108,7 +1114,8 @@ (define (bffe-shepherd-services config) #:directory "/var/lib/bffe" #:environment-variables `(,(string-append - "GUIX_LOCPATH=" #$glibc-utf8-locales "/lib/locale") + "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.utf8" #$@extra-environment-variables) #:log-file "/var/log/bffe/server.log")) diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 818226a4f7..023b187cb0 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -1498,7 +1498,8 @@ (define (anonip-shepherd-service config) '#$(optional anonip-configuration-regex "--regex")) ;; Run in a UTF-8 locale #:environment-variables - (list (string-append "GUIX_LOCPATH=" #$glibc-utf8-locales + (list (string-append "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale") "LC_ALL=en_US.utf8"))) @@ -1976,7 +1977,8 @@ (define %mumi-worker-log "/var/log/mumi.worker.log") (define (mumi-shepherd-services config) (define environment #~(list "LC_ALL=en_US.utf8" - (string-append "GUIX_LOCPATH=" #$glibc-utf8-locales + (string-append "GUIX_LOCPATH=" + #$(libc-utf8-locales-for-target) "/lib/locale"))) (match config diff --git a/gnu/system/image.scm b/gnu/system/image.scm index a990c4f861..addae6d0dc 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -466,7 +466,8 @@ (define* (system-disk-image image ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be ;; decoded. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") (initializer image-root @@ -633,7 +634,8 @@ (define* (system-iso9660-image image ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be decoded. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") @@ -737,7 +739,8 @@ (define* (system-docker-image image ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be decoded. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") (set-path-environment-variable "PATH" '("bin" "sbin") '(#+tar)) @@ -816,7 +819,8 @@ (define* (system-tarball-image image ;; Allow non-ASCII file names--e.g., 'nss-certs'--to be decoded. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") (let ((image-root (string-append (getcwd) "/tmp-root")) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 28161de153..09aa30791c 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -454,7 +454,7 @@ (define* (%installation-services #:key (system (or (and=> (service gc-root-service-type (append (list bare-bones-os - glibc-utf8-locales + (libc-utf8-locales-for-target) texinfo guile-3.0) %default-locale-libcs))) diff --git a/guix/profiles.scm b/guix/profiles.scm index fea766879d..03afbe2479 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1000,8 +1000,9 @@ (define (info-dir-file manifest) (module-ref (resolve-interface '(gnu packages texinfo)) 'texinfo)) (define gzip ;lazy reference (module-ref (resolve-interface '(gnu packages compression)) 'gzip)) - (define glibc-utf8-locales ;lazy reference - (module-ref (resolve-interface '(gnu packages base)) 'glibc-utf8-locales)) + (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)) @@ -1043,7 +1044,7 @@ (define (info-dir-file manifest) (setenv "PATH" (string-append #+gzip "/bin")) ;for info.gz files (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target) "/lib/locale")) (mkdir-p (string-append #$output "/share/info")) (exit (every install-info @@ -1122,8 +1123,9 @@ (define (ca-certificate-bundle manifest) ;; See <http://lists.gnu.org/archive/html/guix-devel/2015-02/msg00429.html> ;; for a discussion. - (define glibc-utf8-locales ;lazy reference - (module-ref (resolve-interface '(gnu packages base)) 'glibc-utf8-locales)) + (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)) @@ -1157,9 +1159,10 @@ (define (ca-certificate-bundle manifest) ;; Some file names in the NSS certificates are UTF-8 encoded so ;; install a UTF-8 locale. (setenv "LOCPATH" - (string-append #+glibc-utf8-locales "/lib/locale/" + (string-append #+(libc-utf8-locales-for-target) "/lib/locale/" #+(version-major+minor - (package-version glibc-utf8-locales)))) + (package-version + (libc-utf8-locales-for-target))))) (setlocale LC_ALL "en_US.utf8") (match (append-map ca-files '#$(manifest-inputs manifest)) @@ -1984,18 +1987,20 @@ (define* (profile-derivation manifest (and (derivation? drv) (gexp-input drv))) extras)) - (define glibc-utf8-locales ;lazy reference + (define libc-utf8-locales-for-target ;lazy reference (module-ref (resolve-interface '(gnu packages base)) - 'glibc-utf8-locales)) + '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. #~(begin (setenv "LOCPATH" - #$(file-append glibc-utf8-locales "/lib/locale/" + #$(file-append (libc-utf8-locales-for-target) + "/lib/locale/" (version-major+minor - (package-version glibc-utf8-locales)))) + (package-version + (libc-utf8-locales-for-target))))) (setlocale LC_ALL "en_US.utf8"))) (define builder diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index bdbea49910..4523f3182b 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -137,7 +137,8 @@ (define (store-database items) ;; Make sure non-ASCII file names are properly handled. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") (sql-schema #$schema) @@ -209,7 +210,7 @@ (define (set-utf8-locale profile) (profile-locales? profile)) #~(begin (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target) "/lib/locale")) (setlocale LC_ALL "en_US.utf8")) #~(setenv "GUIX_LOCPATH" "unset for tests"))) diff --git a/guix/self.scm b/guix/self.scm index a1f235659d..eed6809187 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -73,7 +73,7 @@ (define %packages ("po4a" . ,(ref 'gettext 'po4a)) ("gettext-minimal" . ,(ref 'gettext 'gettext-minimal)) ("gcc-toolchain" . ,(ref 'commencement 'gcc-toolchain)) - ("glibc-utf8-locales" . ,(ref 'base 'glibc-utf8-locales)) + ("glibc-utf8-locales" . ,((ref 'base 'libc-utf8-locales-for-target))) ("graphviz" . ,(ref 'graphviz 'graphviz-minimal)) ("font-ghostscript" . ,(ref 'ghostscript 'font-ghostscript)) ("texinfo" . ,(ref 'texinfo 'texinfo))))) @@ -372,7 +372,7 @@ (define (translate-texi-manuals source) (find-files #$documentation-po ".*.po$")) (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target) "/lib/locale")) (setenv "PATH" #+(file-append gettext-minimal "/bin")) (setenv "LC_ALL" "en_US.UTF-8") (setlocale LC_ALL "en_US.UTF-8") @@ -484,7 +484,7 @@ (define (info-manual source) ;; Provide UTF-8 locales needed by the 'xspara.c' code in makeinfo. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales "/lib/locale")) + #+(file-append (libc-utf8-locales-for-target) "/lib/locale")) (for-each (lambda (texi) (match (string-split (basename texi) #\.) @@ -634,8 +634,9 @@ (define* (guix-command modules (string-append (if locpath (string-append locpath ":") "") - #$(file-append glibc-utf8-locales - "/lib/locale")))) + #$(file-append + (libc-utf8-locales-for-target) + "/lib/locale")))) (let ((guix-main (module-ref (resolve-interface '(guix ui)) 'guix-main))) diff --git a/tests/pack.scm b/tests/pack.scm index 8fdaed0168..ac78817a70 100644 --- a/tests/pack.scm +++ b/tests/pack.scm @@ -30,7 +30,7 @@ (define-module (test-pack) #:use-module (guix modules) #:use-module (guix utils) #:use-module (gnu packages) - #:use-module ((gnu packages base) #:select (glibc-utf8-locales)) + #:use-module ((gnu packages base) #:select (libc-utf8-locales-for-target)) #:use-module (gnu packages bootstrap) #:use-module ((gnu packages package-management) #:select (rpm)) #:use-module ((gnu packages compression) #:select (squashfs-tools)) @@ -197,8 +197,9 @@ (define rpm-for-tests ;; Make sure non-ASCII file names are properly ;; handled. (setenv "GUIX_LOCPATH" - #+(file-append glibc-utf8-locales - "/lib/locale")) + #+(file-append + (libc-utf8-locales-for-target) + "/lib/locale")) (setlocale LC_ALL "en_US.utf8") (mkdir #$output) diff --git a/tests/profiles.scm b/tests/profiles.scm index 9ad03f2b24..57650bd505 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -441,7 +441,7 @@ (define glibc (target -> "arm-linux-gnueabihf") (grep (package->cross-derivation packages:grep target)) (sed (package->cross-derivation packages:sed target)) - (locales (package->derivation packages:glibc-utf8-locales)) + (locales (package->derivation (packages:libc-utf8-locales-for-target))) (drv (profile-derivation manifest #:hooks '() #:locales? #t @@ -460,7 +460,7 @@ (define glibc (derivation-file-name grep)) (string=? (find-input packages:sed) (derivation-file-name sed)) - (string=? (find-input packages:glibc-utf8-locales) + (string=? (find-input (packages:libc-utf8-locales-for-target)) (derivation-file-name locales)))))) (test-assert "package->manifest-entry defaults to \"out\"" -- 2.41.0
[Message part 4 (text/plain, inline)]
-- Janneke Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
bug-guix <at> gnu.org
:bug#66472
; Package guix
.
(Sat, 25 Nov 2023 16:52:02 GMT) Full text and rfc822 format available.Message #23 received at 66472 <at> debbugs.gnu.org (full text, mbox):
From: Ludovic Courtès <ludo <at> gnu.org> To: Janneke Nieuwenhuizen <janneke <at> gnu.org> Cc: 66472 <at> debbugs.gnu.org, Josselin Poiret <dev <at> jpoiret.xyz> Subject: Re: bug#66472: Wrong ‘glibc-utf8-locales’ package used on GNU/Hurd Date: Sat, 25 Nov 2023 17:51:42 +0100
Hello! Janneke Nieuwenhuizen <janneke <at> gnu.org> skribis: > Ludovic Courtès writes: [...] >> We could define ‘glibc-utf8-locales’ with ‘define/system-dependent’, as >> we’ve done in commencement.scm. However, I don’t think that’s feasible >> because then every place that does: >> >> (module-ref (resolve-interface '(gnu packages base)) >> 'glibc-utf8-locales) >> >> will suddenly be broken, and that’s not acceptable. [...] >>From da6027537f2146bb0d62228de2ea15fb271027ea Mon Sep 17 00:00:00 2001 > Message-ID: <da6027537f2146bb0d62228de2ea15fb271027ea.1697977363.git.janneke <at> gnu.org> > From: Janneke Nieuwenhuizen <janneke <at> gnu.org> > Date: Wed, 7 Jun 2023 19:19:01 +0200 > Subject: [PATCH 1/2] gnu: Add libc-locales-for-target and glibc-locales/hurd. > > * gnu/packages/base.scm (glibc-locales/hurd): New variable > (libc-locales-for-target): Use it in new procedure. > (glibc-utf8-locales/hurd): New variable. > (libc-utf8-locales-for-target): Use it in new procedure. [...] >>From 345683fea1be7e6f186fe45b59198caa9ba36890 Mon Sep 17 00:00:00 2001 > Message-ID: <345683fea1be7e6f186fe45b59198caa9ba36890.1697977363.git.janneke <at> gnu.org> > In-Reply-To: <da6027537f2146bb0d62228de2ea15fb271027ea.1697977363.git.janneke <at> gnu.org> > References: <da6027537f2146bb0d62228de2ea15fb271027ea.1697977363.git.janneke <at> gnu.org> > From: Janneke Nieuwenhuizen <janneke <at> gnu.org> > Date: Sun, 22 Oct 2023 10:23:19 +0200 > Subject: [PATCH 2/2] DRAFT Use libc-utf8-locales-for-target. I think we’ll need these two patches eventually; for now, commit 95ea1277ae2ebd278bdb51a7887f5ba1116fbc64 fixes the default ‘glibc-utf8-locales’ package, the one that’s added implicitly by all build systems, which unlocks basic builds. Now waiting for <https://ci.guix.gnu.org/jobset/hurd-packages> to pick it up! Ludo’.
bug-guix <at> gnu.org
:bug#66472
; Package guix
.
(Mon, 27 Nov 2023 17:13:02 GMT) Full text and rfc822 format available.Message #26 received at 66472 <at> debbugs.gnu.org (full text, mbox):
From: Janneke Nieuwenhuizen <janneke <at> gnu.org> To: Ludovic Courtès <ludo <at> gnu.org> Cc: 66472 <at> debbugs.gnu.org, Josselin Poiret <dev <at> jpoiret.xyz> Subject: Re: bug#66472: Wrong ‘glibc-utf8-locales’ package used on GNU/Hurd Date: Mon, 27 Nov 2023 18:12:18 +0100
Ludovic Courtès writes: Hi! > Janneke Nieuwenhuizen <janneke <at> gnu.org> skribis: > >> Ludovic Courtès writes: > > [...] > >>> We could define ‘glibc-utf8-locales’ with ‘define/system-dependent’, as >>> we’ve done in commencement.scm. However, I don’t think that’s feasible >>> because then every place that does: >>> >>> (module-ref (resolve-interface '(gnu packages base)) >>> 'glibc-utf8-locales) >>> >>> will suddenly be broken, and that’s not acceptable. > > [...] > >> Subject: [PATCH 1/2] gnu: Add libc-locales-for-target and glibc-locales/hurd. >> Subject: [PATCH 2/2] DRAFT Use libc-utf8-locales-for-target. > > I think we’ll need these two patches eventually; for now, Ok, we'll see; git is patient :) > commit > 95ea1277ae2ebd278bdb51a7887f5ba1116fbc64 fixes the default > ‘glibc-utf8-locales’ package, the one that’s added implicitly by all > build systems, which unlocks basic builds. > > Now waiting for <https://ci.guix.gnu.org/jobset/hurd-packages> to pick > it up! Awesome...yeah, it's "evaluating"... Seems like we're (almost?) there! Greetings, Janneke -- Janneke Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
Ludovic Courtès <ludo <at> gnu.org>
to control <at> debbugs.gnu.org
.
(Thu, 07 Dec 2023 09:30:02 GMT) Full text and rfc822 format available.Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Thu, 04 Jan 2024 12:24:10 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.