From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gD9ULS85NGXeOAAA9RJhRA:P1 (envelope-from ) for ; Sat, 21 Oct 2023 22:48:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gD9ULS85NGXeOAAA9RJhRA (envelope-from ) for ; Sat, 21 Oct 2023 22:48:47 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 48A5446D58 for ; Sat, 21 Oct 2023 22:48:47 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=clisp.org header.s=strato-dkim-0002 header.b=fj0Y38nN; dkim=fail ("headers eddsa verify failed") header.d=clisp.org header.s=strato-dkim-0003 header.b=WU1G8Iaq; arc=reject ("signature check failed: fail, {[1] = sig:strato.com:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=2; s=key1; d=yhetil.org; t=1697921327; a=rsa-sha256; cv=fail; b=ZGUlNCkri/D6sHXTg0tZliLEM+06ATvdVOOwosobvGh23nRF4QRzuyRJ/tN4cTOSOyjbtc wFXRDxy8YB2UXhUyZQvkt0aJqnzmjulZOffUfmYXilYyAlWNwxznGqW8i2F2IuVZ04qpK0 65mZWIFfg/Z+ej8rQHGA1fqzHFkK1mOiiemjk9pGQG+neIp50kZzXAKMVNepGf9XrNKKRQ hnvEzPSyzYOQ7pj5MJ5Cipm7SZW5RjOBwJ0lkUV5LDyhaGZSCHMl+/enjUFexMW/gyDh2k yfOZGhHxqOb9IH4WS2OK+8YRrmJ4nnRR5RQ2J6DE4mT4tSuvlU+WIN9Z0fzuuQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=clisp.org header.s=strato-dkim-0002 header.b=fj0Y38nN; dkim=fail ("headers eddsa verify failed") header.d=clisp.org header.s=strato-dkim-0003 header.b=WU1G8Iaq; arc=reject ("signature check failed: fail, {[1] = sig:strato.com:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697921327; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MCz6RV4vhdbJKZv8ln75JuulXDZ2IQfFDNKofM6Jy3Q=; b=tVESduPwIV0p8g4I+MJleKi0CO2RWCiyCDPg6aaPiwQUU1tU694ZDnc8IgXPW/4RWnbQXY UlEeGR4v3cnBZkQPZhk2gpaeRRwJvYU5xygW6HRBh8KiVY1n4+P0UEcxUbYFFZ8F+60DoA djIiRSFjCNnRHtVD7eVhflpsEX1klOa6eJEph2eRxepdO6fM0LpRNPUbdlOB0BJcHDWFZQ G/RSu8cAyZonoVSXZIezBVjL7+uawPpy51//yqWgysybMkD6ZaA9PjKmTvYoLX0PuXQO9y A0kYouyCxmfBDPrkm2YHyk09QYE09MtAM7nrn2qnMEYGeFUhx6J6T3bLyy+osA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quIth-0005kZ-3J; Sat, 21 Oct 2023 16:48:37 -0400 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 1quItf-0005kA-0b for bug-guix@gnu.org; Sat, 21 Oct 2023 16:48:35 -0400 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 1quIte-0007K7-Ok for bug-guix@gnu.org; Sat, 21 Oct 2023 16:48:34 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1quIu6-0006Yv-DL for bug-guix@gnu.org; Sat, 21 Oct 2023 16:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65927: the role and location of locale.alias Resent-From: Bruno Haible Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 21 Oct 2023 20:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65927 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 65927@debbugs.gnu.org Received: via spool by 65927-submit@debbugs.gnu.org id=B65927.169792129924958 (code B ref 65927); Sat, 21 Oct 2023 20:49:02 +0000 Received: (at 65927) by debbugs.gnu.org; 21 Oct 2023 20:48:19 +0000 Received: from localhost ([127.0.0.1]:45156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quItP-0006UR-6I for submit@debbugs.gnu.org; Sat, 21 Oct 2023 16:48:19 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.163]:43171) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quItM-0006Tz-SZ for 65927@debbugs.gnu.org; Sat, 21 Oct 2023 16:48:18 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1697921267; cv=none; d=strato.com; s=strato-dkim-0002; b=ViqtH7zLV2BLnOsOBqAtPsWSXUBbYq3kevQdrbv5uqzFU/UssEPfHl1mZkMqPqfRK8 O7DZb4G0K2n7ESWuNJs/UKWRAmRHDtBi96hATCbBaEOq0HPkf5qn1ekupPa+rgcO8oL1 kkTSHFmnsPdpFbCW10Q8xT4ADIflLgbHcbvOVC+XV7QDovB+7hSX9I/ZtGcnZ7C8NrUY WL70UF4sdzkWQbSuAT83s3+qYcctL8SM6JwBHv17PcvbLD30e4bMfCnsYCeqHDqboxbw 9KXdeI2WWpaynzSSvZ88TpepD4Y7uMEFo3cr72NIE2du120J71/f1C4/jvlzZzjXqNax b98A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1697921267; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=MCz6RV4vhdbJKZv8ln75JuulXDZ2IQfFDNKofM6Jy3Q=; b=Md1CihAoWkBQVSCFx2eO6pPt0Jyv50U/ZSutIDX7wxeUgYT7Y2vjRtHpzm0qmy5eoW oNnckftUw2su8M+9HDsiAOabmy8+432JA6qfMFMVGer6y/uWBvAdDiHq7+lUeqMDVyIH LLckPjcjOW50IDZ5nTniMbDrMqLtk4cRd+EWfPyCgWAKDenZzwwwwr3T5KBoB/460pJ6 Iwkxo7ueSiSRDT/sz4nKwj5QDE+aViuIjFP8WHRT4GKh9JhfttSSPxjJmWBazKjYjCNp SCgT2wx0CvQ4i9nUsw3KmLqCcxpQAp7ny6nFT3q13sI6hpDwiZWKe+5BxDf5aNoDkpJR gaYg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1697921267; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=MCz6RV4vhdbJKZv8ln75JuulXDZ2IQfFDNKofM6Jy3Q=; b=fj0Y38nNiwaKkIBp9bclTXaZXswU0BK9lPHsrKKNpwas99ztaKprbI0sbFitKGqc/9 +l8ZM4K2woNQieEY4Q8QzvBetBI/OAeDZhTD692VVhaS4ir7mhA0e8c1O1bQDfI6taTY 1MCm5mmiw3U5TBARknOLZg2slZ0SnIL3Vy5AAKhL1tZODqFvd9UKAViodZjPFA2k1qrx sht0h5Xd6V6f1LkGg6OW4BbznQI+V5X4ik1GFSZp50IdpKoPTMxTWLWIIzM6/2J69lH0 Wa9ABP3Dud20y5FWsCV9cN/DFZK7XqZ+YB4p37hgRTzajJJPVyTdVZk3zGPGu4I7z1vy /PVQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1697921267; s=strato-dkim-0003; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=MCz6RV4vhdbJKZv8ln75JuulXDZ2IQfFDNKofM6Jy3Q=; b=WU1G8Iaq1GARA04FwGyYrpK2DnY1jPw/zPq5h+Fo1IcCX3AnFpTzxmpIYIrczRYVLm +zs/RCla1ZopnIMuFQDg== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpOQiKFTpXqE7eOM24VfbLE69WJEew==" Received: from nimes.localnet by smtp.strato.de (RZmta 49.9.0 AUTH) with ESMTPSA id Y1a68az9LKlkWpP (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sat, 21 Oct 2023 22:47:46 +0200 (CEST) From: Bruno Haible Date: Sat, 21 Oct 2023 22:47:46 +0200 Message-ID: <4309618.iZASKD2KPV@nimes> In-Reply-To: <87a5scqck9.fsf@gnu.org> References: <2444710.l5Z5W5aWdd@nimes> <87a5scqck9.fsf@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -0.64 X-Spam-Score: -0.64 X-Migadu-Queue-Id: 48A5446D58 X-TUID: /L8jiAQx7nWc Hi Ludo', > > I explained the purpose of this file in > > https://sourceware.org/pipermail/libc-alpha/2023-September/151524.html . > > In summary, it's a configuration file whose initial contents is provided > > for glibc, but which needs to be edited by the system administrator in > > some situations. > > > > For this reason, in Debian 12, the file has been moved to > > /etc/locale.alias, and /usr/share/locale/locale.alias is merely > > a symbolic link to /etc/locale.alias. IMO, this is the correct > > way to handle this configuration file. >=20 > Does glibc look for =E2=80=98locale.alias=E2=80=99 in $sysconfdir, or doe= s it look for > it in $localstatedir? It looks for it in $(localedir), whose default value is $(datadir)/locale. https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dintl/localealias.c;h= =3Dea4f48b594fe13490f006d95b799213961146e23;hb=3DHEAD#l154 https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dintl/Makefile;h=3Dd7= 223256eb699380ccdf6f6dd37b7490b342e8d3;hb=3DHEAD#l156 https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3DMakeconfig;h=3Dc48fc= c59e8c1b150d40241c31fc63adf4d15ccb3;hb=3DHEAD#l202 The default value of $(datadir) is $(prefix)/share. https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3DMakeconfig;h=3Dc48fc= c59e8c1b150d40241c31fc63adf4d15ccb3;hb=3DHEAD#l182 > To follow the =E2=80=9Ccorrect way=E2=80=9D as you described it, glibc sh= ould look for > it in $sysconfdir by default. I agree; cf. https://www.gnu.org/prep/standards/html_node/Directory-Variabl= es.html But it does not do so currently; therefore the distros fix up the upstream behaviour. > > 2) GNU gettext needs to access this file, in order to recognize the > > same aliases that glibc recognizes. But glibc does not export the > > _nl_expand_alias function. Therefore GNU gettext needs to know > > where the file is. But how could GNU gettext retrieve any of the > > file names > > /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/share/local= e/locale.alias > > /gnu/store/ayc9r7162rphy4zjw8ch01pmyh214h82-glibc-2.33/share/local= e/locale.alias > > ? > > If Guix had this configuration file moved to /etc, like Debian did, = GNU gettext > > could be compiled with '-DLOCALE_ALIAS_PATH=3D\"/etc\"' and would th= en be able > > to access it. >=20 > Right now gettext in Guix ends up being compiled with: >=20 > -DLOCALE_ALIAS_PATH=3D\"\" >=20 > (Example build log at > .) In this case, localealias.c does not attempt to open a locale.alias file at= all. > What you propose is doable. However, how many distros provide > /etc/locale.alias? What happens when it=E2=80=99s missing? >=20 > We have to keep in mind that Guix can be used on top of any distro. When it's missing, localealias.c does not open a locale.alias file. Negative effects can be seen after the ISO 639 language code of a language changed or after the ISO 3166 country code of a territory changed. This is currently not relevant, but may become relevant in the future again. Which distros have it in /etc? - Guix 1.4.0: no - Debian 12, Ubuntu 23.10: yes, /usr/share/locale/locale.alias is a symli= nk. - CentOS Stream 9: no - Arch 19.11: no - openSUSE 15.5: no - Slackware 15: no So, to solve the problem, Guix would need to customize glibc 1. to install locale.alias in /etc (=3D $(sysconfdir)), 2. compile with a LOCALE_ALIAS_PATH=3D$(sysconfdir):$(localedir) Then GNU gettext could be compiled with LOCALE_ALIAS_PATH=3D$(sysconfdir):$= (localedir) as well. This would work in standalone Guix, as well as in Guix-on-top-of-another-distro. Bruno