From patchwork Thu Dec 7 10:22:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 57350 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1811B27BBEA; Thu, 7 Dec 2023 10:24:32 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 756C427BBE2 for ; Thu, 7 Dec 2023 10:24:31 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBBY0-0003Kv-AT; Thu, 07 Dec 2023 05:24:00 -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 1rBBXr-0003J7-NZ for guix-patches@gnu.org; Thu, 07 Dec 2023 05:23:51 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBBXr-0000r9-FK for guix-patches@gnu.org; Thu, 07 Dec 2023 05:23:51 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rBBY3-0005XX-Mp for guix-patches@gnu.org; Thu, 07 Dec 2023 05:24:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67686] [PATCH core-updates 5/5] gnu: glibc: Ensure C.UTF-8 locale is always found. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Dec 2023 10:24:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67686 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67686@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 67686-submit@debbugs.gnu.org id=B67686.170194461221224 (code B ref 67686); Thu, 07 Dec 2023 10:24:03 +0000 Received: (at 67686) by debbugs.gnu.org; 7 Dec 2023 10:23:32 +0000 Received: from localhost ([127.0.0.1]:41144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBBXX-0005WF-9h for submit@debbugs.gnu.org; Thu, 07 Dec 2023 05:23:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBBXR-0005VB-Br for 67686@debbugs.gnu.org; Thu, 07 Dec 2023 05:23: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 1rBBX9-0000jr-PX; Thu, 07 Dec 2023 05:23:07 -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=GPCEuBEsb/Vzau7AXdU6qmjDYauLbiHQxHOYBDuSKLo=; b=Ul0widRDrV15dPsunlvu K+fxpTU4EzZ7cA5hDT4vPoXjOBRCNRl4xZ4wMNCVPNVOaOvPKt4P+MY5gvPG6HWZCiaSjkLW4w3oq I0C6D0AWQ1IkwalAq0ICyDkaqyPRba77aVuQNQfieUc5iEgKkmXWipNhmJo7REjTgxmBvTHGaUD5Y PGuSHdcDgdIojgVDP7aeRbOa22qX0B/RQSIKn3asSSdCysBrG7X1MJBMokR1thKp/FCCNq/una6ZQ WG3Z48R/1UZBGyCBNP1xWZqVap/6jXdC0MFUxt0Tkpl5NH8WSC9FSgrAJ6JkAr6P/0PXcEhCS45VB D7vDdqWm+d+Ugw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Thu, 7 Dec 2023 11:22:48 +0100 Message-ID: <26b8d546eb51e3ef25c160a1e18b4ecb45206540.1701943221.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This change ensures that $prefix/lib/locale, which now contains C.UTF-8 data, is always searched. Thus, “setlocale (LC_ALL, "C.UTF-8")” is guaranteed to always succeed. * gnu/packages/patches/glibc-2.37-versioned-locpath.patch: Adjust. Change-Id: I6aaf2757da98e811aa55e0959126065537cd8970 --- .../glibc-2.37-versioned-locpath.patch | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/gnu/packages/patches/glibc-2.37-versioned-locpath.patch b/gnu/packages/patches/glibc-2.37-versioned-locpath.patch index 8685f2c3b7..1f34292ad0 100644 --- a/gnu/packages/patches/glibc-2.37-versioned-locpath.patch +++ b/gnu/packages/patches/glibc-2.37-versioned-locpath.patch @@ -12,6 +12,20 @@ that variable. So, if GUIX_LOCPATH=/foo:/bar, locale data is searched for in That way, a single 'GUIX_LOCPATH' setting can work even if different libc versions coexist on the system. +diff --git a/locale/Makefile b/locale/Makefile +index d7036b08..b5125166 100644 +--- a/locale/Makefile ++++ b/locale/Makefile +@@ -94,7 +94,9 @@ localepath = "$(complocaledir):$(i18ndir)" + # -Iprograms doesn't really belong here, but this gets it at the head + # of the list instead of the tail, where CPPFLAGS-$(lib) gets added. + # We need it before the standard -I's to see programs/config.h first. ++# Define 'LOCALEDIR' for use in 'compute_locale_search_path'. + locale-CPPFLAGS = -DCOMPLOCALEDIR='"$(complocaledir)"' \ ++ -DLOCALEDIR='"$(libdir)/locale"' \ + -DLOCALE_ALIAS_PATH='"$(localedir)"' \ + -Iprograms + diff --git a/locale/newlocale.c b/locale/newlocale.c index 108d2428..6218e0fa 100644 --- a/locale/newlocale.c @@ -56,7 +70,7 @@ diff --git a/locale/setlocale.c b/locale/setlocale.c index 6a902faa..2d07a644 100644 --- a/locale/setlocale.c +++ b/locale/setlocale.c -@@ -213,12 +213,65 @@ setdata (int category, struct __locale_data *data) +@@ -213,12 +213,71 @@ setdata (int category, struct __locale_data *data) } } @@ -104,6 +118,12 @@ index 6a902faa..2d07a644 100644 + goto bail_out; + } + ++ /* Last, unconditionally append our own locale directory, which should ++ contain data for C.UTF-8. */ ++ if (__argz_add_sep (locale_path, locale_path_len, ++ LOCALEDIR "/" VERSION, ':') != 0) ++ goto bail_out; ++ + return 0; + + bail_out: