unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 54893@debbugs.gnu.org
Subject: bug#54893: guix-daemon, locale, LANG, and unicode in git tag names
Date: Tue, 19 Apr 2022 11:38:30 +0000	[thread overview]
Message-ID: <WcqSj-dYaLnSoWUgtJRJ7q-cPoDkwPkyysN70f0ECkmqH8sc2TMeuKYSfY0VV1MlOxNg5YkjNs1g0BM3eoxNuPw044fcN__02VZO_wS_L-s=@lendvai.name> (raw)
In-Reply-To: <JCMTCZvk2OTWWeyGIiR41DHbLWe7Ks7r-ekFRD8SVaYA8a3FaWMvTFxUBS3VQ94vVTYX0hWe5v18wrg1N8OJCW6P8dVauBMumKK_Kf2tyBU=@lendvai.name>

> thank you, this works indeed as a band aid:
>
> (setenv "GUIX_LOCPATH" #+(file-append glibc-locales "/lib/locale"))
> (setlocale LC_ALL "en_US.utf8")


i spoke too early. this works in a git checkout of guix, but it fails
to compile when i try to guix pull it.

even if i declare the dependency like this:

#:autoload   (gnu packages base) (glibc-locales)

IIUC, this is due to a circular dependency: glibc-locales (and its
variants) depend on git-fetch, therefore i cannot refer to them from
the implementation of git-fetch.

i tried to set the locale to "C" or "POSIX", but it results in ASCII encoding.

i tried to set the locale to "en_US.iso-8859-1", hoping that it's
available, but it isn't.

all that is needed here is an encoding that is idempotent wrt a cycle
through bytes->string, string->bytes. i think the iso-8859-n encodings
are like that.

to verify that hypothesis:

$ mkdir -p /tmp/delme/v½.2.0
$ LANG=C guix repl
scheme@(guix-user)> (use-modules (guix build utils))
scheme@(guix-user)> (delete-file-recursively "/tmp/delme")
warning: failed to delete /tmp/delme/v??.2.0: No such file or directory
warning: failed to delete /tmp/delme: Directory not empty
$1 = #t
$2 = #<vhash 7fd60aef5540 1 pairs>
scheme@(guix-user)>

$ LANG=en_US.iso-8859-1 guix repl
scheme@(guix-user)> (use-modules (guix build utils))
scheme@(guix-user)> (delete-file-recursively "/tmp/delme")
$1 = #<vhash 7f7d7acc2040 2 pairs>
scheme@(guix-user)>


so, is such an idempotent locale available/embedded in glibc without any external dependencies? searching the web suggests that there isn't.

if not, then what would be a bird's eye view plan to make one
available for git-fetch?

should we create a new, ASCII-only git-fetch variant used in the bootstrap process?

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“The world is changed by your example, not by your opinion.”
	— Paulo Coelho (1947–)





  reply	other threads:[~2022-04-19 11:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 19:47 bug#54893: guix-daemon, locale, LANG, and unicode in git tag names Attila Lendvai
2022-04-12 20:40 ` Maxime Devos
2022-04-13  7:51   ` Attila Lendvai
2022-04-13  8:03     ` Maxime Devos
2022-04-13  8:45       ` Attila Lendvai
2022-04-19 11:38         ` Attila Lendvai [this message]
2022-04-19 15:45           ` Maxime Devos
2022-04-19 16:07           ` Maxime Devos
2022-04-13  8:22     ` Maxime Devos
2022-04-13 10:40       ` Liliana Marie Prikler
2022-04-13 10:57         ` Maxime Devos
2022-04-13  8:29     ` Maxime Devos
2022-04-19 18:09 ` bug#54893: [PATCH] guix: git-download: Set locale to deal with Unicode in git metadata Attila Lendvai
2022-04-20 20:12   ` bug#54893: guix-daemon, locale, LANG, and unicode in git tag names Ludovic Courtès
2022-04-20 22:15   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='WcqSj-dYaLnSoWUgtJRJ7q-cPoDkwPkyysN70f0ECkmqH8sc2TMeuKYSfY0VV1MlOxNg5YkjNs1g0BM3eoxNuPw044fcN__02VZO_wS_L-s=@lendvai.name' \
    --to=attila@lendvai.name \
    --cc=54893@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).