GNU bug report logs -
#30185
[PATCH] [core-updates] Put locales where libc will find them
Previous Next
Reported by: Mark H Weaver <mhw <at> netris.org>
Date: Sat, 20 Jan 2018 21:26:01 UTC
Severity: normal
Tags: patch
Done: Mark H Weaver <mhw <at> netris.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 30185 in the body.
You can then email your comments to 30185 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#30185
; Package
guix
.
(Sat, 20 Jan 2018 21:26:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mark H Weaver <mhw <at> netris.org>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Sat, 20 Jan 2018 21:26:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On my mips64el-linux GuixSD system, now updated to something close to
core-updates (but with binutils-2.25.1), guile prints this warning:
guile: warning: failed to install locale
and 'locale' prints:
mhw <at> yeeloong ~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
[...]
strace shows attempts to open files in /run/current-system/locale/2.26,
which was not included in my built system. Instead I have:
/run/current-system/locale/2.26.105-g0890d5379c
This matches the version field of our 'glibc' package in core-updates,
but it's not where libc is looking.
I've attached a patch that fixes the problem for me.
What do you think?
Mark
[0001-system-Put-locales-where-libc-will-find-them.patch (text/x-patch, inline)]
From cb343d623d31e0687725d37c8585b440ec5144ec Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw <at> netris.org>
Date: Sat, 20 Jan 2018 01:57:07 -0500
Subject: [PATCH] system: Put locales where libc will find them.
* gnu/system/locale.scm (localedef-command, single-locale-directory): Use only
the major+minor part of the libc version number in the locale directory name.
---
gnu/system/locale.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm
index 75cb855b5..75417f669 100644
--- a/gnu/system/locale.scm
+++ b/gnu/system/locale.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2018 Mark H Weaver <mhw <at> netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +22,7 @@
#:use-module (guix store)
#:use-module (guix records)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (srfi srfi-26)
@@ -90,9 +92,9 @@ or #f on failure."
"--no-archive" "--prefix" #$output
"-i" #$(locale-definition-source locale)
"-f" #$(locale-definition-charset locale)
- (string-append #$output "/"
- #$(package-version libc) "/"
- #$(locale-definition-name locale))))))
+ (string-append #$output "/" #$(version-major+minor
+ (package-version libc))
+ "/" #$(locale-definition-name locale))))))
(define* (single-locale-directory locales
#:key (libc (canonical-package glibc)))
@@ -102,7 +104,7 @@ Because locale data formats are incompatible when switching from one libc to
another, locale data is put in a sub-directory named after the 'version' field
of LIBC."
(define version
- (package-version libc))
+ (version-major+minor (package-version libc)))
(define build
#~(begin
--
2.16.0
Information forwarded
to
bug-guix <at> gnu.org
:
bug#30185
; Package
guix
.
(Sat, 20 Jan 2018 21:46:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 30185 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I remember having a similar issue, and a patch was included to look for
locales in version major+minor instead of the whole version string.
This was tacked at: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29537
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29537>
I think this might be relevant to this.
2018-01-20 22:22 GMT+01:00 Mark H Weaver <mhw <at> netris.org>:
> On my mips64el-linux GuixSD system, now updated to something close to
> core-updates (but with binutils-2.25.1), guile prints this warning:
>
> guile: warning: failed to install locale
>
> and 'locale' prints:
>
> mhw <at> yeeloong ~$ locale
> locale: Cannot set LC_CTYPE to default locale: No such file or directory
> locale: Cannot set LC_MESSAGES to default locale: No such file or
> directory
> locale: Cannot set LC_ALL to default locale: No such file or directory
> LANG=en_US.utf8
> LC_CTYPE="en_US.utf8"
> LC_NUMERIC="en_US.utf8"
> [...]
>
> strace shows attempts to open files in /run/current-system/locale/2.26,
> which was not included in my built system. Instead I have:
>
> /run/current-system/locale/2.26.105-g0890d5379c
>
> This matches the version field of our 'glibc' package in core-updates,
> but it's not where libc is looking.
>
> I've attached a patch that fixes the problem for me.
> What do you think?
>
> Mark
>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#30185
; Package
guix
.
(Wed, 24 Jan 2018 14:35:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 30185 <at> debbugs.gnu.org (full text, mbox):
Mark H Weaver <mhw <at> netris.org> skribis:
> From cb343d623d31e0687725d37c8585b440ec5144ec Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <mhw <at> netris.org>
> Date: Sat, 20 Jan 2018 01:57:07 -0500
> Subject: [PATCH] system: Put locales where libc will find them.
>
> * gnu/system/locale.scm (localedef-command, single-locale-directory): Use only
> the major+minor part of the libc version number in the locale directory name.
Good catch, go for it!
Thanks,
Ludo’.
Reply sent
to
Mark H Weaver <mhw <at> netris.org>
:
You have taken responsibility.
(Wed, 24 Jan 2018 23:34:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mark H Weaver <mhw <at> netris.org>
:
bug acknowledged by developer.
(Wed, 24 Jan 2018 23:34:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 30185-done <at> debbugs.gnu.org (full text, mbox):
ludo <at> gnu.org (Ludovic Courtès) writes:
> Mark H Weaver <mhw <at> netris.org> skribis:
>
>> * gnu/system/locale.scm (localedef-command, single-locale-directory): Use only
>> the major+minor part of the libc version number in the locale directory name.
>
> Good catch, go for it!
Pushed as commit 6d5a65de7fba53ca1160844550d261f540f110e1 on
core-updates. I'm closing this bug now.
Thanks,
Mark
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 22 Feb 2018 12:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 63 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.