emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54893: closed (guix-daemon, locale, LANG, and unicode in git tag nam


From: GNU bug Tracking System
Subject: bug#54893: closed (guix-daemon, locale, LANG, and unicode in git tag names)
Date: Wed, 20 Apr 2022 20:13:01 +0000

Your message dated Wed, 20 Apr 2022 22:12:26 +0200
with message-id <875yn3o6ol.fsf_-_@gnu.org>
and subject line Re: bug#54893: guix-daemon, locale, LANG, and unicode in git 
tag names
has caused the debbugs.gnu.org bug report #54893,
regarding guix-daemon, locale, LANG, and unicode in git tag names
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
54893: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=54893
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: guix-daemon, locale, LANG, and unicode in git tag names Date: Tue, 12 Apr 2022 19:47:51 +0000
i'm trying to build a golang package that i have just imported. its repo has a 
tag with unicode in it, namely v½.2.0, as observable at 
https://github.com/klauspost/pgzip/tags

(define-public the-pkg
  (package
    (name "go-github-com-klauspost-pgzip")
    (version "1.0.2-0.20170402124221-0bf5dcad4ada")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
               (url "https://github.com/klauspost/pgzip";)
               (commit "0bf5dcad4ada")))
        (file-name (git-file-name name version))
        (sha256
          (base32 "0dgp2iljvhibzxia1g3lsfg4bjmfh4kf0bfrmfi7sd49hwhrvk7s"))))
    (build-system go-build-system)
    (arguments '(#:skip-build? #t #:import-path "github.com/klauspost/pgzip"))
    (home-page "https://github.com/klauspost/pgzip";)
    (synopsis "pgzip")
    (description
      "Package pgzip implements reading and writing of gzip format compressed 
files, as
specified in @url{https://rfc-editor.org/rfc/rfc1952.html,RFC 1952}.")
    (license license:expat)))

i have attached the build log, but the essence is this:

guile: warning: failed to install locale

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.

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“The unexamined life is not worth living for a human being.”
        — Socrates (c. 470–399 BC, tried and executed), 'Apology' (399 BC)

Attachment: build-log
Description: Binary data


--- End Message ---
--- Begin Message --- Subject: Re: bug#54893: guix-daemon, locale, LANG, and unicode in git tag names Date: Wed, 20 Apr 2022 22:12:26 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hi,

Attila Lendvai <attila@lendvai.name> skribis:

> Without this the git-fetch GEXP is run in an environment that uses ASCII
> character encoding when strings are crossing the Guile - C boundary.  It means
> that e.g. tag names that have Unicode chars in them will cause problems,
> e.g. when walking and deleting the .git directory.
>
> An example in the wild: https://github.com/klauspost/pgzip/tags
>
> For more details see: https://issues.guix.gnu.org/54893
>
> * guix/git-download.scm (git-fetch): Call setlocale to set it to en_US.utf8.

[...]

> +  (define glibc-locales
> +    (module-ref (resolve-interface '(gnu packages base)) 'glibc-locales))

I changed this to ‘glibc-utf8-locales’, which is sufficient here, and
committed.

Thanks everyone for the investigation and fix!

Ludo’.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]