all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#73751: [cuirass] channel-update-service fails trying to find key with accent in the name
@ 2024-10-11 20:23 Noé Lopez via Bug reports for GNU Guix
  2024-11-28  7:59 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Noé Lopez via Bug reports for GNU Guix @ 2024-10-11 20:23 UTC (permalink / raw)
  To: 73751

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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#73751: [cuirass] channel-update-service fails trying to find key with accent in the name
  2024-10-11 20:23 bug#73751: [cuirass] channel-update-service fails trying to find key with accent in the name Noé Lopez via Bug reports for GNU Guix
@ 2024-11-28  7:59 ` Ludovic Courtès
  2024-12-03 16:04   ` Noé Lopez via Bug reports for GNU Guix
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2024-11-28  7:59 UTC (permalink / raw)
  To: Noé Lopez; +Cc: 73751

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

Hi,

Noé Lopez <noe@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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 636 bytes --]

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"))
 

[-- Attachment #3: Type: text/plain, Size: 21 bytes --]


Thanks,
Ludo’.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#73751: [cuirass] channel-update-service fails trying to find key with accent in the name
  2024-11-28  7:59 ` Ludovic Courtès
@ 2024-12-03 16:04   ` Noé Lopez via Bug reports for GNU Guix
  2024-12-12 11:14     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Noé Lopez via Bug reports for GNU Guix @ 2024-12-03 16:04 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 73751

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@gnu.org> writes:

> Hi,
>
> Noé Lopez <noe@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’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#73751: [cuirass] channel-update-service fails trying to find key with accent in the name
  2024-12-03 16:04   ` Noé Lopez via Bug reports for GNU Guix
@ 2024-12-12 11:14     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2024-12-12 11:14 UTC (permalink / raw)
  To: Noé Lopez; +Cc: 73751

Hi,

Noé Lopez <noe@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’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-12 11:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-11 20:23 bug#73751: [cuirass] channel-update-service fails trying to find key with accent in the name Noé Lopez via Bug reports for GNU Guix
2024-11-28  7:59 ` Ludovic Courtès
2024-12-03 16:04   ` Noé Lopez via Bug reports for GNU Guix
2024-12-12 11:14     ` Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.