unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Attila Lendvai <attila@lendvai.name>, 54893@debbugs.gnu.org
Subject: bug#54893: guix-daemon, locale, LANG, and unicode in git tag names
Date: Tue, 12 Apr 2022 22:40:59 +0200	[thread overview]
Message-ID: <be1fe91166c5a9e95975084d9e8dc7f80222cf4d.camel@telenet.be> (raw)
In-Reply-To: <dgH8LAbYICFwRYBwMqWgymICHzzpPfoGjhJaxzv82-4I5UNd6NWdkLbJehfCHGTEpQk2KvGwhI0OIeRkSu2F85hvrJelJKM_Hv2OEwTp5B0=@lendvai.name>

[-- Attachment #1: Type: text/plain, Size: 1799 bytes --]

Attila Lendvai schreef op di 12-04-2022 om 19:47 [+0000]:
> and i can't get rid of this^ warning. i installed glibc-locales to
> root and my user, reconfigured, restarted the guix-daemon.
> 
> which is probably the cause of the ultimate error:
> 
> warning: failed to delete .git/refs/tags/v??.2.0: No such file or
> directory
> r:sha256 hash mismatch for...
> 
> the daemon starts from an empty env:
> 
> https://git.savannah.gnu.org/cgit/guix.git/tree/nix/libstore/build.cc#n1590
> 
> and then copies the env from the derivation, but it doesn't seem to
> contain any LANG value. i assume guile is also launched then without
> a LANG env. BTW, guile could be more informative in its warning, too.

Some remarks:

  * LANG should be set, because it is in #:leaked-env-vars (see
    guix/git-download.scm).  I don't know whose LANG it is though
    -- the user's, or the daemon's?

  * To install an UTF-8 locale, you need glibc-locales (or possibly
    glibc-utf8-locales)  (At least, for now.  Upstream has some plans
    for including a C.UTF-8 locale so maybe eventually we can fallback
    to C.UTF-8.)

  * This locale data needs to be in $GUIX_LOCPATH.

  * GUIX_LOCPATH is not leaked.

  * Even if it was, I don't think that /gnu/store/...glibc-locales
    would be accessible from the build container (though you could give
    it a try?).

  * So perhaps GUIX_LOCPATH needs to be set in the gexp in
    guix/git-download.scm, + some setlocale as done by
    gnu-build-system.

  * Long-term, it could be interesting to remove the
    ‘file name = string encoded in current locale's encoding’
    assumption from Guile.

  * svn-download, hg-download, bzr-download and cvs-download
    probably have the same issue.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2022-04-12 20:42 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 [this message]
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
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=be1fe91166c5a9e95975084d9e8dc7f80222cf4d.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=54893@debbugs.gnu.org \
    --cc=attila@lendvai.name \
    /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).