guix refresh fails. struct-vtable: Wrong type argument in position 1 (expecting struct)

  • Open
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Maxime Devos
  • Rostislav Svoboda
Owner
unassigned
Submitted by
Rostislav Svoboda
Severity
normal
R
R
Rostislav Svoboda wrote on 11 May 2022 15:10
(address . bug-guix@gnu.org)
CAEtmmezp1tw=aY5dcX4OgJQXmiXika04aQqWv0XiM68tG3cTFw@mail.gmail.com
The /home/bost/.config/guix/current/bin/guix is attached.
Greetings,
Bost


$ guix refresh
nongnu/packages/wine.scm:160:13: dxvk would be upgraded from 1.9 to 1.10.1
nongnu/packages/wasm.scm:146:13: wasm32-wasi-libcxx would be upgraded
from 13.0.0 to 14.0.3
nongnu/packages/vpn.scm:31:13: zerotier would be upgraded from 1.8.4 to 1.8.9
nongnu/packages/video.scm:56:13: intel-media-driver would be upgraded
from 22.2.2 to 2018Q2.1
nongnu/packages/video.scm:31:13: gmmlib would be upgraded from 22.0.3 to 22.1.2
nongnu/packages/playonlinux.scm:41:13: playonlinux would be upgraded
from 4.3.4 to 4.4
nongnu/packages/nvidia.scm:410:2: nvidia-settings would be upgraded
from 470.86 to 510.68.02
nongnu/packages/mozilla.scm:94:13: firefox would be upgraded from
100.0 to 100.0.
nongnu/packages/linux.scm:194:11: raspberrypi-firmware would be
upgraded from 1.20220120 to 1.20220331
following redirection to
nongnu/packages/linux.scm:790:5: warning: no valid tags found for
intel-microcode
nongnu/packages/linux.scm:576:7: warning: no tags were found for
rtl8192eu-linux-module
nongnu/packages/linux.scm:841:13: sof-firmware would be upgraded from
1.7 to 2.1.1
nongnu/packages/linux.scm:53:2: linux would be upgraded from 5.17.5 to 5.17.6
nongnu/packages/gog.scm:36:13: lgogdownloader would be upgraded from 3.7 to 3.9
nongnu/packages/game-development.scm:280:2: warning: no valid tags
found for fury
nongnu/packages/game-development.scm:185:7: warning: no valid tags
found for eduke32
following redirection to
Backtrace:
15 (primitive-load "/home/bost/.config/guix/current/bin/gu…")
In guix/ui.scm:
2230:7 14 (run-guix . _)
2193:10 13 (run-guix-command _ . _)
In ice-9/boot-9.scm:
1752:10 12 (with-exception-handler _ _ #:unwind? _ # _)
1752:10 11 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
658:37 10 (thunk)
2129:25 9 (run-with-store #<store-connection 256.99 7f3142848a00> …)
In guix/scripts/refresh.scm:
578:14 8 (_ _)
In srfi/srfi-1.scm:
634:9 7 (for-each #<procedure 7f31509298a0 at guix/scripts/ref…> …)
In guix/scripts/refresh.scm:
378:10 6 (check-for-package-update #<package gog-world-of-goo@1…> …)
In srfi/srfi-1.scm:
858:15 5 (any1 #<procedure 7f314c55de60 at guix/upstream.scm:28…> …)
In guix/upstream.scm:
284:15 4 (_ _)
In guix/memoization.scm:
101:0 3 (_ #<hash-table 7f31422cfce0 55/113> #<package gog-wor…> …)
In guix/gnu-maintenance.scm:
188:20 2 (_)
In ice-9/boot-9.scm:
1685:16 1 (raise-exception _ #:continuable? _)
1685:16 0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure struct-vtable: Wrong type argument in position 1
(expecting struct): #f
Attachment: guix
R
R
Rostislav Svoboda wrote on 11 May 2022 15:15
Re: bug#55367: Acknowledgement (guix refresh fails. struct-vtable: Wrong type argument in position 1 (expecting struct))
(address . 55367@debbugs.gnu.org)
CAEtmmezNp-jo8FnhXmA3cOUgwiYz3ssSFKcmWOiYJmbnP46o9Q@mail.gmail.com
And also I just noticed, for firefox the indicated version numbers are
the same. I.e. from 100.0 to 100.0
```
nongnu/packages/mozilla.scm:94:13: firefox would be upgraded from
100.0 to 100.0.
```
L
L
Ludovic Courtès wrote on 11 May 2022 15:49
Re: bug#55367: guix refresh fails. struct-vtable: Wrong type argument in position 1 (expecting struct)
(name . Rostislav Svoboda)(address . rostislav.svoboda@gmail.com)(address . 55367@debbugs.gnu.org)
874k1wnpqw.fsf@gnu.org
Hi,

Rostislav Svoboda <rostislav.svoboda@gmail.com> skribis:

Toggle quote (18 lines)
> In guix/scripts/refresh.scm:
> 378:10 6 (check-for-package-update #<package gog-world-of-goo@1…> …)
> In srfi/srfi-1.scm:
> 858:15 5 (any1 #<procedure 7f314c55de60 at guix/upstream.scm:28…> …)
> In guix/upstream.scm:
> 284:15 4 (_ _)
> In guix/memoization.scm:
> 101:0 3 (_ #<hash-table 7f31422cfce0 55/113> #<package gog-wor…> …)
> In guix/gnu-maintenance.scm:
> 188:20 2 (_)
> In ice-9/boot-9.scm:
> 1685:16 1 (raise-exception _ #:continuable? _)
> 1685:16 0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure struct-vtable: Wrong type argument in position 1
> (expecting struct): #f

This happens with a package that’s not in the ‘guix’ channel (see
above). I can’t find the definition of that package though, so I can’t
really help.

If you can reproduce it with a package that’s in Guix, or if you can
point me to the source, we might be able to better understand.

The code at guix/gnu-maintenance.scm:188:20 checks a URI, so my guess is
that the source of that package is not a valid URI, and thus
‘string->uri’ returns #false.

Ludo’.
M
M
Maxime Devos wrote on 11 May 2022 16:08
(address . 55367@debbugs.gnu.org)
60cd5b74cb5d7c9b706c5af70bfb1edd2f6736fd.camel@telenet.be
Ludovic Courtès schreef op wo 11-05-2022 om 15:49 [+0200]:
Toggle quote (4 lines)
> The code at guix/gnu-maintenance.scm:188:20 checks a URI, so my guess is
> that the source of that package is not a valid URI, and thus
> ‘string->uri’ returns #false.

It's "gogdownloader://world_of_goo/en3installer0".

(string->uri "gogdownloader://world_of_goo/en3installer0")
$1 = #f
(string->uri "gogdownloader://worldofgoo/en3installer0")
$2 = #f

Apparently it doesn't like _ characters.  Makes some sense for http,
https and ftp, but what about other protocols? Do the Internet RFCs
say anything about this?

Worse, looks like non-ASCII characters (that are valid DNS names, at
least ignoring punycode encodings and such) aren't supported:

(string->uri "https://www.étoile.fr")
$3 = #f

though maybe that's due to the URI -- IRI distinction. Even then, not
supporting IRIs (even if in a separate module or such) seems like quite
a limitation. (What does Guile aim to implement -- the strict version
of URIs, or the more general IRIs, sometimes just named URIs?)

However, non-ASCII in 'path' is supported:


#<<uri> scheme: https userinfo: #f host: "etoile.fr" port: #f path: "/étoile.html" query: #f fragment: #f>

Seems a bit arbitrary to me ...
I guess 'top-level-regexp' and 'domain-label-regexp' might need to be adjusted.

Though there's a comment

;; See RFC 3986 #3.2.2 for comments on percent-encodings, IDNA (RFC
;; 3490), and non-ASCII host names.

in the Guile module ... maybe we want IRIs instead?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYnvDdBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ibTAP9RcmSdDjrTNVzGLdh48q/oUpOp
p6BeKiROCI7fX6W8oAD9HsmWFIDK5fCKTNZv5fX28LMaKsYQcSuJuTfFUVA6pQ4=
=ou5d
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 11 May 2022 16:13
(address . 55367@debbugs.gnu.org)
7f9c8d327d90d434dfe7e3cdd95880b26a4c67b0.camel@telenet.be
Maxime Devos schreef op wo 11-05-2022 om 16:08 [+0200]:
Toggle quote (7 lines)
> Though there's a comment
>
> ;; See RFC 3986 #3.2.2 for comments on percent-encodings, IDNA (RFC
> ;; 3490), and non-ASCII host names.
>
> in the Guile module ... maybe we want IRIs instead?

Some URI and IRI things on debbugs:

unicode characters, though I don't know if this is also supports them
in the host component)

terminating dot (not i18n related).

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYnvEbBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hBlAP4/nJ1RNbvu9eHHg0rCgN6z3kUG
DK5POyqgVLzF9LvVoAD9EfBaLarpuapgxQ+R6nvwk/6Gx+scDgyNRlJmI8GYOQw=
=y/Mx
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 12 May 2022 10:18
(name . Maxime Devos)(address . maximedevos@telenet.be)
87a6bnmaen.fsf@gnu.org
Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (12 lines)
> Ludovic Courtès schreef op wo 11-05-2022 om 15:49 [+0200]:
>> The code at guix/gnu-maintenance.scm:188:20 checks a URI, so my guess is
>> that the source of that package is not a valid URI, and thus
>> ‘string->uri’ returns #false.
>
> It's "gogdownloader://world_of_goo/en3installer0".
>
> (string->uri "gogdownloader://world_of_goo/en3installer0")
> $1 = #f
> (string->uri "gogdownloader://worldofgoo/en3installer0")
> $2 = #f

The second one works for me:

Toggle snippet (4 lines)
scheme@(guile-user)> (string->uri "gogdownloader://worldofgoo/en3installer0")
$7 = #<<uri> scheme: gogdownloader userinfo: #f host: "worldofgoo" port: #f path: "/en3installer0" query: #f fragment: #f>

The first one has an invalid authority part, which doesn’t match
‘authority-regexp’ (underscores are not permitted; I believe (web uri)
is correct here.)

Toggle quote (6 lines)
> Worse, looks like non-ASCII characters (that are valid DNS names, at
> least ignoring punycode encodings and such) aren't supported:
>
> (string->uri "https://www.étoile.fr")
> $3 = #f

Right; I think ‘string->uri’ expects a Punycode-encoded string, which is
probably correct per RFC 3986.

That said, it’s beyond this scope of this bug report.

To me, the conclusion is that the package has a invalid URI, so it’s not
a Guix bug strictly speaking. However, we could change
gnu-maintenance.scm so that it deals with invalid URIs gracefully.

Thoughts?

Ludo’.
M
M
Maxime Devos wrote on 12 May 2022 10:57
(name . Ludovic Courtès)(address . ludo@gnu.org)
81337845c8f49d9c14e361b603b3757f783dfd43.camel@telenet.be
Ludovic Courtès schreef op do 12-05-2022 om 10:18 [+0200]:
Toggle quote (4 lines)
> > (string->uri "gogdownloader://worldofgoo/en3installer0")
> > $2 = #f
>

Oops I miscopied this, needs to be

scheme@(guile-user)> (string->uri
"gogdownloader://worldofgoo/en3installer0")
$7 = #<<uri> scheme: gogdownloader userinfo: #f host: "worldofgoo"
port: #f path: "/en3installer0" query: #f fragment: #f>
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYnzL5RccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ivCAP9N/vtgvCRtYqGCwz8QHg+Ft4h9
LljhDTL0YpMbzZYczgD/ZhXwNaOglybPU6X5sa6zDlA5ztGkbIsirs+OisCdug8=
=rBFJ
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 12 May 2022 11:07
(name . Ludovic Courtès)(address . ludo@gnu.org)
fe865a99c8fb32a0c7ccca7f162387d1f63120c0.camel@telenet.be
Ludovic Courtès schreef op do 12-05-2022 om 10:18 [+0200]:
Toggle quote (6 lines)
> To me, the conclusion is that the package has a invalid URI, so it’s not
> a Guix bug strictly speaking.  However, we could change
> gnu-maintenance.scm so that it deals with invalid URIs gracefully.
>
> Thoughts?

Maybe emit a warning and skip them? Or just skip them (by returning
#false in the is-it-a-gnu-package procedure)?

Extending Guile to support IRIs can be left for later I think.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYnzOUxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qC/AQC8lGSCF/HSQJkEsgOBXc26LlX1
3rW+UXQrCKBDX5dkXAEA2Qb5ZcbCCuoQNVJTVsNgbGPISnMTS+8HkMAp81GRzQw=
=yTsQ
-----END PGP SIGNATURE-----


R
R
Rostislav Svoboda wrote on 12 May 2022 11:47
CAEtmmezQbwUCzVOYcZCdv-HP32zQGKBgktx605yatSDTNum5sA@mail.gmail.com
That invalid uri string comes from
(uri "gogdownloader://world_of_goo/en3installer0")
and the commit was made by Alex Griffin <a@ajgrf.com> ~2,5 years ago
on Dec 17 2019.

@Alex if you remember, can you tell us please how it got committed?
(See the package definition below. The whole discussion is here

Greetings,
Bost

(define-public gog-world-of-goo
(let ((buildno "29337")
(binary (if (target-64bit?)
"data/x86_64/WorldOfGoo.bin.x86_64"
"data/x86/WorldOfGoo.bin.x86")))
(package
(inherit world-of-goo)
(name "gog-world-of-goo")
(version "1.51")
(source
(origin
(method gog-fetch)
(uri "gogdownloader://world_of_goo/en3installer0")
(file-name (string-append "world_of_goo_"
(string-replace-substring version "." "_")
"_" buildno ".sh"))
(sha256
(base32
"01bhwnlgpkrjz6sb72z8ci51pwb38b9bp4ifncw480022qlswya1"))))
(build-system mojo-build-system)
(arguments
`(#:patchelf-plan
`((,,binary
("libc" "sdl2" "sdl2-mixer" "libvorbis" "libogg" "gcc"
"mesa" "glu")))))
(license (undistributable
(string-append "file://data/noarch/docs/"
"End User License Agreement.txt"))))))
?