Open GaetanLepage opened 1 week ago
The package listed in the final stacktrace is not always the same by the way.
Also, earlier during the execution, those error messages appear several times (although they do not directly stop execution):
Error: LuaRocks dev bug (please report at https://github.com/luarocks/luarocks/issues).
Arch.: linux-x86_64
...0-unstable-2024-04-29/share/lua/5.2/luarocks/cmd/nix.lua:350: attempt to concatenate local 'src_str' (a nil value)
stack traceback:
...0-unstable-2024-04-29/share/lua/5.2/luarocks/cmd/nix.lua:350: in function 'convert_spec2nix'
...0-unstable-2024-04-29/share/lua/5.2/luarocks/cmd/nix.lua:544: in function <...0-unstable-2024-04-29/share/lua/5.2/luarocks/cmd/nix.lua:483>
(...tail calls...)
[C]: in function 'xpcall'
...nix-0-unstable-2024-04-29/share/lua/5.2/luarocks/cmd.lua:672: in function 'run_command'
...luarocks-nix-0-unstable-2024-04-29/bin/.luarocks-wrapped:39: in main chunk
[C]: in ?
Error: https://api.github.com/repos/leafo/moonscript/commits?per_page=1: status code 403
Call to nurl --indent 2 https://github.com/leafo/moonscript.git failed with status: nil
try running it with --debug=DEBUG and you might see the real error. It runs updates in parallel, which might explain why you dont see the same output everytime
Thanks, I have done that, along with -p 1
.
I confirm that the script reliably fails on lpeg
. (see the logs in the PR description)
The issue is caused by lpeg's src: http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz being 404.
The script calls luarocks nix --maintainers=vyp
which itself calls nix-prefetch-url
which fails to download the source and returns null
.
I propose to remove the package. Does someone has a better solution ?
Actually, the prior release is still online. Maybe the author has yanked the latest one but forgot to remove it from luarocks...
The issue is caused by lpeg's src: http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz being 404.
The URL works fine on my end :thinking:
I actually don't have a 404, but rather a 301, sorry:
✗ nix-prefetch-url http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz
warning: error: unable to download 'http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz': HTTP error 301 (curl error: SSL peer certificate or SSH remote key was not OK); retrying in 296 ms
warning: error: unable to download 'http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz': HTTP error 301 (curl error: SSL peer certificate or SSH remote key was not OK); retrying in 552 ms
warning: error: unable to download 'http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz': HTTP error 301 (curl error: SSL peer certificate or SSH remote key was not OK); retrying in 1092 ms
warning: error: unable to download 'http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz': HTTP error 301 (curl error: SSL peer certificate or SSH remote key was not OK); retrying in 2658 ms
error: unable to download 'http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz': HTTP error 301 (curl error: SSL peer certificate or SSH remote key was not OK)
My web browser (firefox) doesn't complain, but wget
/nix-prefetch-url
does.
301 is for redirection:
➜ curl 'http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz'
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz">here</a>.</p>
</body></html>
If I follow the redirection:
curl 'https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz'
curl: (35) OpenSSL/3.0.14: error:16000069:STORE routines::unregistered scheme
Note sure what that means. certificate issue ? firefox is fine with https://www.inf.puc-rio.br/~roberto/lpeg/ . No big warning about a self-signed certificate (website is let's encrypt).
Several options:
I'd suggest we go with option 3. (move to overrides) as a temporary hotfix and bug the rockspec maintainer for a fix (I've just sent them an e-mail).
LPeg rockspec maintainer here. i released a new revision of the rockspec earlier, updating all the URLs to https.
LPeg rockspec maintainer here. i released a new revision of the rockspec earlier, updating all the URLs to https.
Thank you for helping us with this !
Unfortunately, nix-prefetch-url
still complains as follows:
✗ nix-prefetch-url https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz
warning: error: unable to download 'https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz': SSL peer certificate or SSH remote key was not OK (60); retrying in 254 ms
warning: error: unable to download 'https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz': SSL peer certificate or SSH remote key was not OK (60); retrying in 503 ms
warning: error: unable to download 'https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz': SSL peer certificate or SSH remote key was not OK (60); retrying in 1132 ms
warning: error: unable to download 'https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz': SSL peer certificate or SSH remote key was not OK (60); retrying in 2676 ms
error: unable to download 'https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz': SSL peer certificate or SSH remote key was not OK (60)
I don't think this can be an issue with the rockspec. However, I have no trouble downloading the lpeg tarball using curl, wget, or clicking the link with my browser from either the http:// or https:// protocols.
$ curl -o lpeg-1.1.0.tar.gz -L 'http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 266 100 266 0 0 391 0 --:--:-- --:--:-- --:--:-- 391
100 78042 100 78042 0 0 38035 0 0:00:02 0:00:02 --:--:-- 112k
$ ls -l
-rw-rw-r--@ 1 gvv staff 78042 Sep 14 16:46 lpeg-1.1.0.tar.gz
$ md5sum lpeg-1.1.0.tar.gz
842a538b403b5639510c9b6fffd2c75b lpeg-1.1.0.tar.gz
$ rm -rf lpeg*
$ curl -o lpeg-1.1.0.tar.gz -L 'https://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.1.0.tar.gz'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 78042 100 78042 0 0 73715 0 0:00:01 0:00:01 --:--:-- 73763
$ md5sum lpeg-1.1.0.tar.gz
842a538b403b5639510c9b6fffd2c75b lpeg-1.1.0.tar.gz
$ ls -l
-rw-rw-r--@ 1 gvv staff 78042 Sep 14 16:49 lpeg-1.1.0.tar.gz
$ luarocks install lpeg
Installing https://luarocks.org/lpeg-1.1.0-2.src.rock
lpeg 1.1.0-1 depends on lua >= 5.1 (5.4-1 provided by VM: success)
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c lpcap.c -o lpcap.o
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c lpcode.c -o lpcode.o
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c lpcset.c -o lpcset.o
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c lpprint.c -o lpprint.o
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c lptree.c -o lptree.o
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -O2 -fPIC -I/opt/homebrew/opt/lua/include/lua5.4 -c lpvm.c -o lpvm.o
env MACOSX_DEPLOYMENT_TARGET=11.0 gcc -bundle -undefined dynamic_lookup -all_load -o /var/folders/_v/znckzrz53bd8nnkrzm09cf_80000gn/T/luarocks_build-LPeg-1.1.0-2--Cba67n/lpeg.so lpcap.o lpcode.o lpcset.o lpprint.o lptree.o lpvm.o
No existing manifest. Attempting to rebuild...
lpeg 1.1.0-2 is now installed in /opt/homebrew (license: MIT/X11)
Maybe nix-prefetch-url is tripping over 301's or has a bad root CA or something?
Describe the bug
The
luarocks-packages-updater
script has a very flaky behavior and crashes. Because of that, I have not been able to update theluaPackages
package set for a while and it starts to affect thevimPlugins
set as well.Logs:
Steps To Reproduce
Steps to reproduce the behavior:
nix run .#luarocks-packages-updater
(from a clone ofnixpkgs
)Expected behavior
The script runs fine and does not crash.
Notify maintainers
cc @mrcjkb @teto
Metadata
Add a :+1: reaction to issues you find important.