From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qEzhJC7dj18lGgAA0tVLHw (envelope-from ) for ; Wed, 21 Oct 2020 07:03:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id APS4IC7dj184ewAAbx9fmQ (envelope-from ) for ; Wed, 21 Oct 2020 07:03:10 +0000 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 D0FF09409D3 for ; Wed, 21 Oct 2020 07:03:09 +0000 (UTC) Received: from localhost ([::1]:49048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kV89M-0000Gr-9w for larch@yhetil.org; Wed, 21 Oct 2020 03:03:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kV89G-0000FP-CZ for guix-patches@gnu.org; Wed, 21 Oct 2020 03:03:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kV89G-0001Rh-3F for guix-patches@gnu.org; Wed, 21 Oct 2020 03:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kV89F-0007rG-V9 for guix-patches@gnu.org; Wed, 21 Oct 2020 03:03:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44075] [PATCH] gnu: Add make-glibc-locales-collection. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Oct 2020 07:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44075 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Miguel =?UTF-8?Q?=C3=81ngel?= Arruga Vivas Cc: 44075@debbugs.gnu.org Received: via spool by 44075-submit@debbugs.gnu.org id=B44075.160326375530165 (code B ref 44075); Wed, 21 Oct 2020 07:03:01 +0000 Received: (at 44075) by debbugs.gnu.org; 21 Oct 2020 07:02:35 +0000 Received: from localhost ([127.0.0.1]:47608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kV88p-0007qT-CQ for submit@debbugs.gnu.org; Wed, 21 Oct 2020 03:02:35 -0400 Received: from flashner.co.il ([178.62.234.194]:42802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kV88n-0007qF-SG for 44075@debbugs.gnu.org; Wed, 21 Oct 2020 03:02:34 -0400 Received: from localhost (unknown [141.226.13.8]) by flashner.co.il (Postfix) with ESMTPSA id 79CE74064F; Wed, 21 Oct 2020 07:02:27 +0000 (UTC) Date: Wed, 21 Oct 2020 10:01:55 +0300 From: Efraim Flashner Message-ID: <20201021070155.GQ9117@E5400> References: <20201019064739.4736-1-efraim@flashner.co.il> <87tuuqnym5.fsf@gmail.com> <20201019140236.GF9117@E5400> <87mu0im7r4.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="X9hp/qFlD/MyfJCu" Content-Disposition: inline In-Reply-To: <87mu0im7r4.fsf@gmail.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -2.61 X-TUID: 7rBNyuW3Dra4 --X9hp/qFlD/MyfJCu Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 19, 2020 at 07:43:27PM +0200, Miguel =C3=81ngel Arruga Vivas wr= ote: > Hello, >=20 > Efraim Flashner writes: > > Thanks for taking a look. >=20 > No problem at all, I was thinking about something along these lines too, > but then I saw your patch. :-) Your patch was what got me to actually send mine to guix-patches :) > > For the utf8 vs UTF-8 there are a couple of comments in the code: > > The above phase does not install locales with names using > > the "normalized codeset." Thus, create symlinks like: > > en_US.utf8 -> en_US.UTF-8 > > > > and also: > > For backward compatibility with Guix > > <=3D 0.8.3, add "xx_YY.UTF-8". >=20 > Yes, what I mean is that the comments along the code may need to be > clarified, but adding a "nobody knows" doesn't add much information. That is a good point. I'll change it to something actually useful, mentioning that there's a convention but that people often get it wrong. > The actual source[1] says that the correct value is utf8, following > the rules for the 'normalized codeset' naming, that I copy here: >=20 > 1. Remove all characters besides numbers and letters. > 2. Fold letters to lowercase. > 3. If the same only contains digits prepend the string =E2=80=98"iso"= =E2=80=99. >=20 > We should stick to that naming regarding libc locales (note to self), > even though we keep the links for compatibility. That includes the > other locale at en_us-glibc-locales. I agree it should be renamed to en-us. I have some bikeshedding to think about for en-us-glibc-locales vs glibc-locales-en-us. And I'll also test out one for glibc-locales-guile-tests. > >> What do you think about replacing make-glibc-utf8-locales with a call = of > >> the new function (using that code) ensuring that the generated > >> derivation stays the same for that case (i.e. it's optimized for the > >> UTF-8 case)? > > > > This is what I originally wanted to do, but there's a glibc-locales > > buried in the bootstrap path so it's not so easy to just swap it out. >=20 > I guess you mean glibc-utf8-locales, if not I'm missing where that > reference could come from. That's why I insist on leaving exactly the > same derivation. I meant in commencement.scm. There's a glibc-utf8-locales-final near the definition for %boot5-inputs. > > I can make the change in core-updates. I'll play around with it and > > see if I can come out with the same derivation using a different > > function, but I'm not expecting it to turn out identical. >=20 > The colour of my lisp-rate belt isn't even close to some you can see > around here but I could bring you some help if you want, because I think > it's easier to do it without any change in current packages than it > might sound. Not the definitions in scheme, of course, I mean the > derivations the daemon actually sees. >=20 > Said this, I've seen that [single-]locale-directory does mostly the > same, and there is a build-locale function in gnu/build/locale.scm... so > I'm starting to see as a better idea to clean up glibc-utf8-locales up > in core-updates using the latter, as it would lead to cleaner code for > the builder. >=20 > Could you check that and tell if you consider feasible what I propose? I hadn't seen gnu/build/locales.scm. I'll have to see what we can do about using it. We normally don't allow cross-over from the build side to the packages side. > Happy hacking! > Miguel >=20 > [1] info "(libc)Using gettextized software" --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --X9hp/qFlD/MyfJCu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl+P3OAACgkQQarn3Mo9 g1Es1Q/8CNLcoZtmwR/84oN5iZF+f+U5jqgaPAi/r9/VjnREPvhVPxiAMbwDBLlO 2vxB6kxn+iP9sDKpcafNNdNHSbOe98blIb/+xXBbG48dzw9Jncq2abN77970MJXg 5S70r1t01iX4qHl46YqttFyWhYVrMoadRj7hJrMzAnTlO8/yAimNDWhf+Z6VHv5n qHiUpdYZXlNdnpcI851OueqIEqNCn7+FF5O9oF9g3qlfEL8F+NyuvWd0zmXAjcfg UnmMKHjMXvopx8v/YSyo+gP+XPpJzEtvW6rD3EeAMFQE67UNU3sKJNytpubtZ4a+ 5xielVXNS/ndvbOLrP/8+lESv1YJHrPWQLtiufEwqBkEfCwtJIHnL37ceODgXSWN v9rs0MFC8F2BGqBqyHn7SSVfTc+nW/RmSv8vymbsKPwZqqTXmNWNFZxe6CmLpkCc 1NwnrMAx0VyODPCd20e7deJxScjDNz2nXGCkR2usy2/AY88wQABYVduecUO8uu8g 5Zyya3BuJ77IKzFRBovgYfK0DOSBaTt1Ly9pp/SqeLKwx5H2h9faFPKigl3CDE9P ZJfaG0DyJBZQ3+E2JXW+gOiExwfa32OMEf+GtYYI/yVj6+Hi0n9v3MF8IMQwiA/3 7JiQiwdYSZCu6AyfqxdtCq8SLEONhxqxl1PpUEU03dLyBy9jV2s= =eAqn -----END PGP SIGNATURE----- --X9hp/qFlD/MyfJCu--