luarocks / luarocks/luarocks

Broken package: lsqlite3

Open
#1,822 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
3.7k
Forks
479
PR merge metrics
No merged PRs in 30d

Description

- **Platform:**
- Linux

- **LuaRocks version:**
- `luarocks --version` /usr/bin/luarocks 3.8.0

- **LuaRocks output from when the issue occurred:**
```
# luarocks install lsqlite3 --verbose
...
fs.absolute_name("/tmp/luarocks_luarocks-rockspec-lsqlite3-0.9.6-1-554432/lsqlite3-0.9.6-1.rockspec")
fs.current_dir()
fs.make_temp_dir("luarocks-source-lsqlite3-0.9.6-1")
fs.system_temp_dir()
fs.change_dir("/tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330")
fs.download("https://lua.sqlite.org/home/zip/lsqlite3_v096.zip?uuid=v0.9.6", "lsqlite3_v096.zip", nil)
fs.absolute_name("lsqlite3_v096.zip")
fs.current_dir()
GET https://lua.sqlite.org/home/zip/lsqlite3_v096.zip?uuid=v0.9.6
fs.pop_dir()
fs.change_dir("/tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330")
fs.unpack_archive("lsqlite3_v096.zip")
fs.absolute_name("lsqlite3_v096.zip")
fs.current_dir()
fs.unzip("/tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330/lsqlite3_v096.zip")
fs.is_tool_available("unzip -n", "unzip", "--help")
fs.execute_quiet("unzip -n", "--help")
fs.Q("--help")
fs.execute_string("unzip -n '--help'")

os.execute: unzip -n '--help'
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
Default action is to extract files in list, except those in xlist, to exdir;
file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage).

-p extract files to pipe, no messages -l list files (short format)
-f freshen existing files, create none -t test compressed archive data
-u update files, create if necessary -z display archive comment only
-v list verbosely/show version info -T timestamp archive to latest
-x exclude files that follow (in xlist) -d extract files into exdir
modifiers:
-n never overwrite existing files -q quiet mode (-qq => quieter)
-o overwrite files WITHOUT prompting -a auto-convert any text files
-j junk paths (do not make directories) -aa treat ALL files as text
-U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields
-C match filenames case-insensitively -L make (some) names lowercase
-X restore UID/GID info -V retain VMS version numbers
-K keep setuid/setgid/tacky permissions -M pipe through "more" pager
See "unzip -hh" or unzip.txt for more help. Examples:
unzip data1 -x joe => extract all files except joe from zipfile data1.zip
unzip -p foo | more => send contents of foo.zip via pipe into program more
unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer
Results: 1
1 (number): 0
fs.execute_quiet("unzip -n", "/tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330/lsqlite3_v096.zip")
fs.Q("/tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330/lsqlite3_v096.zip")
fs.execute_string("unzip -n '/tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330/lsqlite3_v096.zip'")

os.execute: unzip -n '/tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330/lsqlite3_v096.zip'
Archive: /tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330/lsqlite3_v096.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330/lsqlite3_v096.zip or
/tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330/lsqlite3_v096.zip.zip, and cannot find /tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330/lsqlite3_v096.zip.ZIP, period.
Results: 1
1 (number): 2304

Error: Failed extracting /tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330/lsqlite3_v096.zip: failed extracting /tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330/lsqlite3_v096.zip
fs.change_dir_to_root()
fs.delete("/tmp/luarocks_luarocks-source-lsqlite3-0.9.6-1-5420330")
fs.delete("/tmp/luarocks_luarocks-rockspec-lsqlite3-0.9.6-1-554432")
```

- **Description:**
luarocks installs lsqlite3 from source per the rockspec. However, it seems that upstream has added some form of browser/origin check which is breaking downloads via CLI

Attached is a screengrab of the browser check

Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the lsqlite3 rockspec and reproduce `luarocks install lsqlite3 --verbose` on Linux. Trace the source download and extraction steps around the reported URL, and consider the work complete when the package can be downloaded, extracted, and installed successfully through the CLI.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, sqlite
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.