summaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* tar: do not attempt to create directory more than onceHisham Muhammad2019-04-011-3/+4
|
* fs: versions of exists, is_file, is_dir for Unix and Windows that do not forkHisham Muhammad2019-04-016-50/+85
| | | | | | | | Implements versions of exists, is_file, is_dir for POSIX and Windows using io.open only, based on the semantics of their error codes on these platforms. Drops the dependency on TEST.EXE on Windows.
* init: ensure --reset resets lua wrapper and config fileHisham Muhammad2019-04-011-20/+24
|
* fun: add find and memoize functionsHisham Muhammad2019-04-011-0/+40
|
* cmd: refactor detection code and improve detection of project dirHisham Muhammad2019-04-013-171/+186
|
* upload: accept non-200 codesHisham Muhammad2019-03-291-3/+4
| | | | | | | | | This will try to JSON-decode any response, and if it succeds, will return it regardless of status code. If the body cannot be JSON-decoded, then the status code and URL are returned as an error. Fixes #975.
* Remove spurious argumentsHisham Muhammad2019-03-181-2/+2
|
* core.cfg: produce quoted values in tool variables for WindowsHisham Muhammad2019-03-154-21/+21
| | | | | | | | | | | | Alternative solution to the problem described in #968. We can't use #968 because on Unix sometimes people set the value of those variables so they include arguments (even LuaRocks does it by default, setting `UNZIP="unzip -n"`). Now that the variables are quoted, we stop auto-quoting them in `luarocks.fs`. I expect this change to have to practical impact on Unix, where paths with spaces are uncommon (those can use explicit quotes in their values).
* deps: improve performance of external dependency checksHisham Muhammad2019-03-151-16/+33
| | | | | This is especially important now that the Lua library paths are detected using the dependency check machinery.
* cmd: improve detection of project dirHisham Muhammad2019-03-151-28/+31
| | | | | Perform detection of project dir earlier, so we can inspect what Lua version its config uses.
* refactor: move require_json from luarocks.upload.api to luarocks.utilHisham Muhammad2019-03-142-23/+23
|
* util: when bootstrapped, return self path as wrapperHisham Muhammad2019-03-141-1/+10
| | | | | | | | | | | | | | | | | Avoid reporting itself via the true path of the script; use the wrapper instead. That is, instead of ``` Error: Argument missing. See '$HOME/.luarocks/lib/luarocks/rocks-5.3/luarocks/dev-1/bin/luarocks help install'. ``` report ``` Error: Argument missing. See '$HOME/.luarocks/bin/luarocks help install'. ``` See https://github.com/luarocks/luarocks/issues/952#issuecomment-449966779
* init: support running from the root directoryHisham Muhammad2019-03-141-0/+3
| | | | | | | | Containers often run things from the root directory. This makes the <name> argument mandatory when running `luarocks init` from `/`. See https://github.com/luarocks/luarocks/issues/952#issuecomment-456528919
* Do not register system tree if installing to ~/.luarocksHisham Muhammad2019-03-141-1/+1
| | | | See https://github.com/luarocks/luarocks/issues/952#issuecomment-449966779
* core.cfg: make detection of sysconfdir version independentHisham Muhammad2019-03-141-3/+3
| | | | | When LuaRocks is running on Lua 5.3 and a user uses --lua-version=5.1, this allows sysconfdir to continue being detected correctly.
* cmd: be more lenient when --lua-version can't find an interpreterHisham Muhammad2019-03-141-1/+8
| | | | | This will still allow things like `luarocks list` and `luarocks search` to work.
* cmd: if ./.luarocks/config-5.x.lua exists, assume Lua version 5.x by defaultHisham Muhammad2019-03-141-10/+16
|
* Add info about lua-version option in helpJacekJaszczuk2019-03-141-0/+1
|
* fixup! core.sysdetect: Fallback to /proc to detect LinuxLuke Gorrie2019-03-121-5/+5
|
* core.sysdetect: Fallback to /proc to detect LinuxLuke Gorrie2019-03-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if /proc/sys/kernel/ostype reads as "Linux\n" to detect when a "sysv" platform is really Linux. This test is a fallback with lower priority than the existing heuristics based on ELF headers. This fixes a problem with Alpine Linux docker images where LuaRocks does not detect Linux because /bin/sh ELF headers don't contain have the expected clues: $ docker run -ti alpine / # apk add --no-cache build-base [...] / # readelf -h /bin/sh ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: DYN (Shared object file) Machine: Advanced Micro Devices X86-64 Version: 0x1 Entry point address: 0xc410 Start of program headers: 64 (bytes into file) Start of section headers: 803616 (bytes into file) Flags: 0x0 Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 7 Size of section headers: 64 (bytes) Number of section headers: 22 Section header string table index: 21
* Support installations without documentationGeorge Roman2019-02-123-3/+39
|
* fix: make variable changes localSimone Livieri2019-02-121-0/+1
|
* Fix small misspellings (#957)Antonin Décimo2019-02-0911-13/+13
|
* core.cfg: fix sysconfdir detection trimming @ from debug.getinfoTomás Guisasola2019-01-081-0/+3
| | | | Signed-off-by: Hisham Muhammad <hisham@gobolinux.org>
* persist: handle keys that are keywords correctly.Hisham Muhammad2018-12-101-13/+62
| | | | Closes #947.
* fs.win32: fix setting permissions for all users (#943)FYP2018-11-211-1/+1
|
* only report on local cache ownership if we can check itHisham Muhammad2018-11-121-1/+5
| | | | Closes #901.
* Smarter default rockspec, based on current dir basenameHisham Muhammad2018-10-301-0/+8
| | | | | | | | | | | | This allows the following to work: ``` git clone https://github.com/example/foo cd foo luarocks download --rockspec bar luarocks test # will still use the foo rockspec # regardless of the presence of bar rockspec ```
* Unbundle pe-parser from LuaRocks sourcesHisham Muhammad2018-10-301-568/+0
|
* core.sysdetect: add fork-free OS detection (#938)Hisham Muhammad2018-10-302-35/+442
| | | | | Detect operating system and architecture without forking subprocesses, doing `file`-like detection reading data from well-known system executables.
* cmd: fix setting up deployment paths from a treeFYP2018-10-291-5/+5
| | | | | | (Amended with a regression test.) Co-authored-by: Hisham Muhammad <hisham@gobolinux.org>
* test: rename a misinterpretable vararg (#936)Oliver Vartiainen2018-10-221-7/+7
| | | Fixes #931
* pack: fix packing installed rockFYP2018-10-171-2/+2
|
* Fix dependency pattern matching for patterns including "+"Hisham Muhammad2018-10-011-1/+1
|
* Improve error messages when external tools are not foundHisham Muhammad2018-09-265-7/+23
| | | | | | Give informative error messages when external tools are not installed. In particular, give a nicer error on `luarocks pack` when 'zip' is not installed.
* write_rockspec: fix representation of Lua version dependencyHisham Muhammad2018-09-251-0/+7
| | | | | | | | The Lua version dependency specified with --lua-versions was using the internal table format. This commit ensures that it is stored in rockspecs using the string format. Includes a regression test.
* Remove unnecessary old check from fs.set_permissionsGeorge Roman2018-09-161-5/+3
|
* fs: fix target pathname in wrap_scriptHisham Muhammad2018-09-162-24/+21
| | | | | | The second argument is always the full pathname of the target script to be created (except for the wrapper suffix ".bat" on Windows).
* core.util: be more resilient when reading command outputsHisham Muhammad2018-09-161-2/+9
| | | | | | When luarocks.loader runs from within another process, we may end up getting an Interrupted signal when reading from a pipe, which is not handled by Lua.
* cfg: fix cosmetic improvement in LUA variableHisham Muhammad2018-09-111-1/+1
|
* fs.win32: fix wrapper generation when a folder with the same basename existsHisham Muhammad2018-09-111-2/+2
| | | | Fixes #908.
* builtin: autogenerate valid variable names for libraries with symbolsHisham Muhammad2018-09-071-1/+1
|
* cfg: cosmetic improvement in LUA variableHisham Muhammad2018-09-071-1/+1
|
* cfg: allow an empty rocks_trees in a config-5.x.lua fileHisham Muhammad2018-09-072-4/+3
| | | | This is so a project uses only the auto-inserted project tree
* init: add --reset optionHisham Muhammad2018-09-072-1/+18
| | | | | This allows for easier switching between Lua versions in a project directory.
* init: store cmd_interpreter and luajit_version in generated configHisham Muhammad2018-09-071-0/+6
|
* write_rockspec, init: rename --lua-version to --lua-versionsHisham Muhammad2018-09-073-4/+5
| | | | | | | Fixes conflict between the use of --lua-version in write_rockspec to list supported Lua versions in a rockspec (now renamed to --lua-versions) and the general --lua-version flag used to select a Lua interpreter.
* cmd: look for proper Lua version in $PATH when --lua-version is givenHisham Muhammad2018-09-071-15/+38
|
* builtin: improve skiplist for module autodetectionHisham Muhammad2018-09-071-18/+22
| | | | Skips spec/ files even when there is no src/
* repos: fix upgrade and downgrade of files when module names clashHisham Muhammad2018-09-042-187/+262
| | | | | | | | | This reworks the logic of upgrading/downgrading multiple versions of the same package (or different packages) when they have different files that resolve to the same module name (foo.lua and foo.so). For a concrete example, this was hitting LuaSec downgrades.