GNU bug report logs - #73751
[cuirass] channel-update-service fails trying to find key with accent in the name

Previous Next

Package: guix;

Reported by: Noé Lopez <noe <at> xn--no-cja.eu>

Date: Fri, 11 Oct 2024 20:23:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73751 in the body.
You can then email your comments to 73751 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#73751; Package guix. (Fri, 11 Oct 2024 20:23:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Noé Lopez <noe <at> xn--no-cja.eu>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 11 Oct 2024 20:23:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Noé Lopez <noe <at> xn--no-cja.eu>
To: bug-guix <at> gnu.org
Subject: [cuirass] channel-update-service fails trying to find key with
 accent in the name
Date: Fri, 11 Oct 2024 22:23:04 +0200
Hi,

I’ve been trying to make my own channel and run cuirass on it for fun
and to learn more about how guix works.

Cuirass is failing to fetch the channel, because of something with the
key file: « 2024-10-11 21:34:11 error: Git error while fetching channels
from https://framagit.org/nll/bloup.git
https://git.savannah.gnu.org/git/guix.git: the path 'No?? Lopez.key'
does not exist in the given tree »

Indeed, it seems the accent in my name has been replaced with two
question marks…

The specification I’m using is the following:
(specification
	   (name 'bloup)
	   (build '(channels bloup))
	   (channels
	    (cons (channel
		   (name 'bloup)
		   (url "https://framagit.org/nll/bloup.git")
		   (introduction
		    (make-channel-introduction
		     "f627568549edd28c97dded5e5ec985cd11e95f58"
		     (openpgp-fingerprint
		      "5D54 CF25 57B2 38E8 8DC1 80A2 2D22 3241 0AB7 4043"))))
		  %default-channels)))

The unicode signing key doesn’t seem to cause a problem for guix pull,
only cuirass is complaining.

I can try to make a patch, tips and advice for finding the issue
would be greatly appreciated.

Good evening,
Noé « No?? » Lopez




Information forwarded to bug-guix <at> gnu.org:
bug#73751; Package guix. (Thu, 28 Nov 2024 08:00:02 GMT) Full text and rfc822 format available.

Message #8 received at 73751 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Noé Lopez <noe <at> xn--no-cja.eu>
Cc: 73751 <at> debbugs.gnu.org
Subject: Re: bug#73751: [cuirass] channel-update-service fails trying to
 find key with accent in the name
Date: Thu, 28 Nov 2024 08:59:02 +0100
[Message part 1 (text/plain, inline)]
Hi,

Noé Lopez <noe <at> noé.eu> skribis:

> Cuirass is failing to fetch the channel, because of something with the
> key file: « 2024-10-11 21:34:11 error: Git error while fetching channels
> from https://framagit.org/nll/bloup.git
> https://git.savannah.gnu.org/git/guix.git: the path 'No?? Lopez.key'
> does not exist in the given tree »

This error comes from libgit2, and I suspect the reason is that libgit2
interprets file names according to the current locale and ‘cuirass
register’ is not running in a UTF-8 locale.

Could you check with this patch:

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index 187766bc99..f9f6355b98 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -184,7 +184,8 @@ (define (cuirass-shepherd-service config)
                         #$@extra-options)
 
                   #:environment-variables
-                  (list "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt"
+                  (list "LC_ALL=C.UTF-8"
+                        "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt"
                         (string-append "GIT_EXEC_PATH=" #$git
                                        "/libexec/git-core"))
 
[Message part 3 (text/plain, inline)]
Thanks,
Ludo’.

Information forwarded to bug-guix <at> gnu.org:
bug#73751; Package guix. (Tue, 03 Dec 2024 16:06:02 GMT) Full text and rfc822 format available.

Message #11 received at 73751 <at> debbugs.gnu.org (full text, mbox):

From: Noé Lopez <noe <at> xn--no-cja.eu>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 73751 <at> debbugs.gnu.org
Subject: Re: bug#73751: [cuirass] channel-update-service fails trying to
 find key with accent in the name
Date: Tue, 03 Dec 2024 17:04:12 +0100
Hi,

I was able to reproduce this from the cuirass checkout when unsetting
LANG and that indeed seems to be issue, is there a reason why UTF-8 is
not the default in shepherd/guile/cuirass?  IMO it would be better to
set it to the default to avoid future issues with other services.

What do you think?

The specification to reproduce:
(list (specification
       (name 'bloup)
       (channels
	(cons (channel
	       (name 'bloup)
	       (url "https://framagit.org/nll/bloup.git")
               (branch "cuirass-bug")
	       (introduction
	        (make-channel-introduction
	         "f627568549edd28c97dded5e5ec985cd11e95f58"
	         (openpgp-fingerprint
	          "5D54 CF25 57B2 38E8 8DC1 80A2 2D22 3241 0AB7 4043"))))
	      %default-channels))))

Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi,
>
> Noé Lopez <noe <at> noé.eu> skribis:
>
>> Cuirass is failing to fetch the channel, because of something with the
>> key file: « 2024-10-11 21:34:11 error: Git error while fetching channels
>> from https://framagit.org/nll/bloup.git
>> https://git.savannah.gnu.org/git/guix.git: the path 'No?? Lopez.key'
>> does not exist in the given tree »
>
> This error comes from libgit2, and I suspect the reason is that libgit2
> interprets file names according to the current locale and ‘cuirass
> register’ is not running in a UTF-8 locale.
>
> Could you check with this patch:
>
> diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
> index 187766bc99..f9f6355b98 100644
> --- a/gnu/services/cuirass.scm
> +++ b/gnu/services/cuirass.scm
> @@ -184,7 +184,8 @@ (define (cuirass-shepherd-service config)
>                          #$@extra-options)
>  
>                    #:environment-variables
> -                  (list "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt"
> +                  (list "LC_ALL=C.UTF-8"
> +                        "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt"
>                          (string-append "GIT_EXEC_PATH=" #$git
>                                         "/libexec/git-core"))
>  
>
> Thanks,
> Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#73751; Package guix. (Thu, 12 Dec 2024 11:16:02 GMT) Full text and rfc822 format available.

Message #14 received at 73751 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Noé Lopez <noe <at> xn--no-cja.eu>
Cc: 73751 <at> debbugs.gnu.org
Subject: Re: bug#73751: [cuirass] channel-update-service fails trying to
 find key with accent in the name
Date: Thu, 12 Dec 2024 12:14:56 +0100
Hi,

Noé Lopez <noe <at> noé.eu> skribis:

> I was able to reproduce this from the cuirass checkout when unsetting
> LANG and that indeed seems to be issue,

OK, I’m pushing the proposed C.UTF-8 patch, then.

> is there a reason why UTF-8 is not the default in
> shepherd/guile/cuirass?  IMO it would be better to set it to the
> default to avoid future issues with other services.

It’s a long story.  Basically, Guile interprets file name according to
the current locale encoding; it’s been this way on Unix/GNU/Linux for
ages.

However, the default locale on POSIX systems is “C”, meaning ASCII
encoding.  As a consequence, Guile does ASCII “by default”, when LC_ALL
& co. are not specified.

Thanks,
Ludo’.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 19 Jan 2025 18:20:02 GMT) Full text and rfc822 format available.

Notification sent to Noé Lopez <noe <at> xn--no-cja.eu>:
bug acknowledged by developer. (Sun, 19 Jan 2025 18:20:02 GMT) Full text and rfc822 format available.

Message #19 received at 73751-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Noé Lopez <noe <at> xn--no-cja.eu>
Cc: 73751-done <at> debbugs.gnu.org
Subject: Re: bug#73751: [cuirass] channel-update-service fails trying to
 find key with accent in the name
Date: Sun, 19 Jan 2025 19:18:50 +0100
Ludovic Courtès <ludo <at> gnu.org> skribis:

> Noé Lopez <noe <at> noé.eu> skribis:
>
>> I was able to reproduce this from the cuirass checkout when unsetting
>> LANG and that indeed seems to be issue,
>
> OK, I’m pushing the proposed C.UTF-8 patch, then.

That was done as 33bed951079e11bc89bfaf9e9e4af3eb059a2951.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Feb 2025 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 180 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.