From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: bug#30185: [PATCH] [core-updates] Put locales where libc will find them Date: Sat, 20 Jan 2018 16:22:40 -0500 Message-ID: <87po64ql7j.fsf@netris.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ed0eL-0001nK-MR for bug-guix@gnu.org; Sat, 20 Jan 2018 16:26:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ed0eI-00087Y-Jg for bug-guix@gnu.org; Sat, 20 Jan 2018 16:26:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:56702) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ed0eI-00087Q-Eh for bug-guix@gnu.org; Sat, 20 Jan 2018 16:26:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ed0eI-0000Mb-2e for bug-guix@gnu.org; Sat, 20 Jan 2018 16:26:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ed0dV-0001Vm-5Y for bug-guix@gnu.org; Sat, 20 Jan 2018 16:25:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ed0dS-0007J1-1H for bug-guix@gnu.org; Sat, 20 Jan 2018 16:25:13 -0500 Received: from world.peace.net ([50.252.239.5]:46696) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ed0dR-0007IX-RU for bug-guix@gnu.org; Sat, 20 Jan 2018 16:25:09 -0500 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 30185@debbugs.gnu.org --=-=-= Content-Type: text/plain 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@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 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-system-Put-locales-where-libc-will-find-them.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH] system: Put locales where libc will find them >From cb343d623d31e0687725d37c8585b440ec5144ec Mon Sep 17 00:00:00 2001 From: Mark H Weaver 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 o= nly the major+minor part of the libc version number in the locale directory nam= e. --- 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 =C2=A9 2014, 2015, 2016, 2017 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2018 Mark H Weaver ;;; ;;; 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)= ))))) =20 (define* (single-locale-directory locales #:key (libc (canonical-package glibc))) @@ -102,7 +104,7 @@ Because locale data formats are incompatible when switc= hing from one libc to another, locale data is put in a sub-directory named after the 'version' f= ield of LIBC." (define version - (package-version libc)) + (version-major+minor (package-version libc))) =20 (define build #~(begin --=20 2.16.0 --=-=-=--