aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes1
-rw-r--r--.github/workflows/pr-gh-actions.yml107
-rw-r--r--.github/workflows/test.yml19
-rw-r--r--.gitignore1
-rw-r--r--CHANGELOG.md651
-rw-r--r--binary/Makefile.windows6
-rwxr-xr-xconfigure2
-rw-r--r--docs/creating_a_makefile_that_plays_nice_with_luarocks.md15
-rw-r--r--docs/creating_a_rock.md8
-rw-r--r--docs/download.md16
-rw-r--r--docs/index.md2
-rw-r--r--docs/luarocks.md135
-rw-r--r--docs/release_history.md597
-rw-r--r--install.bat2
-rw-r--r--luarocks-3.12.2-1.rockspec (renamed from luarocks-dev-1.rockspec)3
-rwxr-xr-xmakedist4
-rwxr-xr-xpublishrelease50
-rw-r--r--spec/build_spec.lua95
-rw-r--r--src/luarocks/build/cmake.lua5
-rw-r--r--src/luarocks/build/cmake.tl5
-rw-r--r--src/luarocks/cmd/upload.lua5
-rw-r--r--src/luarocks/cmd/upload.tl3
-rw-r--r--src/luarocks/core/cfg.lua15
-rw-r--r--src/luarocks/core/manif.lua11
-rw-r--r--src/luarocks/core/manif.tl9
-rw-r--r--src/luarocks/core/persist.lua30
-rw-r--r--src/luarocks/core/persist.tl30
-rw-r--r--src/luarocks/deps.lua21
-rw-r--r--src/luarocks/deps.tl25
-rw-r--r--src/luarocks/fetch.lua9
-rw-r--r--src/luarocks/fetch.tl9
-rw-r--r--src/luarocks/fs/unix.lua5
-rw-r--r--src/luarocks/manif.lua6
-rw-r--r--src/luarocks/manif.tl4
-rw-r--r--src/luarocks/rockspecs.lua19
-rw-r--r--src/luarocks/rockspecs.tl19
-rw-r--r--src/luarocks/tools/patch.lua11
-rw-r--r--src/luarocks/tools/patch.tl13
-rw-r--r--src/luarocks/type/rockspec.lua5
-rw-r--r--src/luarocks/type/rockspec.tl7
-rw-r--r--src/luarocks/vendor/dkjson.d.tl2
41 files changed, 1151 insertions, 831 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..4f593865
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
*.tl linguist-language=Lua
diff --git a/.github/workflows/pr-gh-actions.yml b/.github/workflows/pr-gh-actions.yml
new file mode 100644
index 00000000..fa0cd465
--- /dev/null
+++ b/.github/workflows/pr-gh-actions.yml
@@ -0,0 +1,107 @@
1name: PR on GH Actions
2
3on:
4 push:
5 tags:
6 - 'v*'
7 workflow_dispatch:
8
9jobs:
10
11 SanitizeVersion:
12 runs-on: ubuntu-latest
13
14 outputs:
15 version: ${{ steps.version.outputs.version }}
16
17 steps:
18 - name: Extract version from the tag and set it as output
19 id: version
20 run: |
21 if [ "${{ github.ref_type }}" = "tag" ];
22 then
23 version=$(echo "${{ github.ref_name }}" | sed -e "s/v//g" | grep -oP '^(\d+\.\d+\.\d+)$')
24
25 if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]];
26 then
27 echo "version=${version}" >> "$GITHUB_OUTPUT"
28 else
29 echo "version=none" >> "$GITHUB_OUTPUT"
30 fi
31 else
32 echo "version=none" >> "$GITHUB_OUTPUT"
33 fi
34
35 CreatePullRequest:
36 runs-on: ubuntu-latest
37 needs:
38 - SanitizeVersion
39 if: ${{ github.ref_type == 'tag' && needs.SanitizeVersion.outputs.version != 'none' }}
40
41 env:
42 TARGET_REPOSITORY: luarocks/gh-actions-luarocks
43 NEW_BRANCH: luarocks-${{ needs.SanitizeVersion.outputs.version }}
44 NEW_COMMIT_MSG: 'LuaRocks: update to ${{ needs.SanitizeVersion.outputs.version }}'
45 NEW_PR_TITLE: 'LuaRocks: update to ${{ needs.SanitizeVersion.outputs.version }}'
46
47 # comma (,) separated list
48 # of users to mention in the
49 # body of the Pull Request
50 USERS_TO_MENTION: hishamhm
51
52 steps:
53
54 - uses: actions/checkout@v4
55 with:
56 repository: ${{ env.TARGET_REPOSITORY }}
57 token: ${{ secrets.GH_ACTIONS_LUAROCKS_TOKEN }}
58 path: gh-actions-luarocks
59
60 - name: Create a new branch
61 working-directory: gh-actions-luarocks
62 run: git checkout -b ${{ env.NEW_BRANCH }}
63
64 - name: Set user name and email on commit
65 working-directory: gh-actions-luarocks
66 run: |
67 git config user.name "github-actions[bot]"
68 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
69
70 - name: Replace default version on action.yml
71 working-directory: gh-actions-luarocks
72 run: |
73 sed -e "s/default: \".*\"/default: \"${{ needs.SanitizeVersion.outputs.version }}\"/g" -i action.yml
74
75 - name: Stage changes
76 working-directory: gh-actions-luarocks
77 run: git add action.yml
78
79 - name: Commit changes
80 working-directory: gh-actions-luarocks
81 run: git commit "--message=${{ env.NEW_COMMIT_MSG }}"
82
83 - name: Print diff
84 working-directory: gh-actions-luarocks
85 run: git show
86
87 - name: Push changes
88 working-directory: gh-actions-luarocks
89 run: git push --set-upstream origin ${{ env.NEW_BRANCH }}
90
91 - name: Submit Pull Request
92 working-directory: gh-actions-luarocks
93 env:
94 GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_LUAROCKS_TOKEN }}
95 run: |
96 PR_BODY=""
97
98 IFS=',' read -ra reviewers <<< "${{ env.USERS_TO_MENTION }}"
99 for i in "${reviewers[@]}"; do
100 PR_BODY+="CC @${i} "
101 done
102
103 gh pr create \
104 --repo "${{ env.TARGET_REPOSITORY }}" \
105 --head ${{ env.NEW_BRANCH }} \
106 --title "${{ env.NEW_PR_TITLE }}" \
107 --body "${PR_BODY}" \ No newline at end of file
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index f973b30b..5acc786a 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -2,17 +2,18 @@ name: test
2 2
3on: 3on:
4 push: 4 push:
5 branches: main 5 branches:
6 - main
6 paths-ignore: 7 paths-ignore:
7 - "docs" 8 - "docs"
8 - "**/*.md" 9 - "**/*.md"
9 pull_request: 10 pull_request:
10 branches: '*' 11 branches:
12 - '*'
11 paths-ignore: 13 paths-ignore:
12 - "docs" 14 - "docs"
13 - "**/*.md" 15 - "**/*.md"
14 workflow_dispatch: 16 workflow_dispatch:
15 branches: '*'
16 17
17jobs: 18jobs:
18 ############################################################################## 19 ##############################################################################
@@ -45,7 +46,9 @@ jobs:
45 with: 46 with:
46 luaVersion: ${{ matrix.lua-version }} 47 luaVersion: ${{ matrix.lua-version }}
47 48
48 - uses: leafo/gh-actions-luarocks@v5 49 - uses: luarocks/gh-actions-luarocks@master
50 with:
51 luaRocksVersion: "3.12.2"
49 52
50 - name: 'Setup macOS deps' 53 - name: 'Setup macOS deps'
51 if: ${{ contains(matrix.os, 'macos') }} 54 if: ${{ contains(matrix.os, 'macos') }}
@@ -301,7 +304,7 @@ jobs:
301 # The following env variables 304 # The following env variables
302 # only applies to Visual Studio 305 # only applies to Visual Studio
303 LUAROCKS_DEPS_DIR: c:\external 306 LUAROCKS_DEPS_DIR: c:\external
304 LUAROCKS_DEPS_OPENSSL_VER: "3.4.1" 307 LUAROCKS_DEPS_OPENSSL_VER: "3.5.1"
305 LUAROCKS_DEPS_ZLIB_VER: "1.3.1" 308 LUAROCKS_DEPS_ZLIB_VER: "1.3.1"
306 # The following env variable 309 # The following env variable
307 # applies to both Visual Studio and MinGW-w64 310 # applies to both Visual Studio and MinGW-w64
@@ -484,7 +487,7 @@ jobs:
484 } 487 }
485 488
486 if ($installerUrl -eq $null) { 489 if ($installerUrl -eq $null) {
487 throw "Installer not found for version $version"; 490 throw "Installer not found for version ${version}. Please, update OpenSSL to the latest version found at ${jsonUrl}";
488 } 491 }
489 492
490 # Download the installer 493 # Download the installer
@@ -594,11 +597,11 @@ jobs:
594 SET "CURRENT_LUA_BIN=%CURRENT_LUA_DIR%\bin" 597 SET "CURRENT_LUA_BIN=%CURRENT_LUA_DIR%\bin"
595 SET "CURRENT_LUA_INTERPRETER=%CURRENT_LUA_BIN%\lua.exe" 598 SET "CURRENT_LUA_INTERPRETER=%CURRENT_LUA_BIN%\lua.exe"
596 599
597 pip install hererocks && ^ 600 pip install git+https://github.com/luarocks/hererocks && ^
598 hererocks ^ 601 hererocks ^
599 "%CURRENT_LUA_DIRNAME%" ^ 602 "%CURRENT_LUA_DIRNAME%" ^
600 "--${{ matrix.LUAT }}" "${{ matrix.LUAV }}" ^ 603 "--${{ matrix.LUAT }}" "${{ matrix.LUAV }}" ^
601 --luarocks latest ^ 604 --luarocks "3.12.2" ^
602 "--target=${{ matrix.COMPILER }}" 605 "--target=${{ matrix.COMPILER }}"
603 606
604 IF %ERRORLEVEL% NEQ 0 ( 607 IF %ERRORLEVEL% NEQ 0 (
diff --git a/.gitignore b/.gitignore
index 35ddbf42..3317a870 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,7 +8,6 @@
8/*.rock 8/*.rock
9/*.tar.gz 9/*.tar.gz
10/*.zip 10/*.zip
11/src/*.*
12/prefix-* 11/prefix-*
13/dev_* 12/dev_*
14/gh-pages 13/gh-pages
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4af612e9..d666eed0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,68 @@
1## LuaRocks 3.12.1
2
3> Released 17/Jun/2025
4
5* rockspec: re-add deprecated function type().
6 Removing this broke the behavior of some luarocks.build
7 plugins. LuaRocks does not have a stable public API,
8 but since this function was returned as part of the
9 function signature, we'll revert this as a deprecated
10 function, to be removed in LuaRocks 4.0. No other
11 reverts are planned for the sake of restoring private APIs.
12
13## LuaRocks 0.3.1
14
15> Released 18/Dec/2007
16
17* Improved search: results now feature separate lists for source and binary rocks.
18* Windows support for the "module" build type (using Visual Studio).
19* Many assorted bugfixes.
20
21
22## LuaRocks 0.3
23
24> ReleA
25
26## LuaRocks 3.12.0
27
28> Released 05/Jun/2025
29
30LuaRocks 3.12.0 marks the transition of the implementation of the tool from
31Lua to Teal! This was implemented by Victor Ilchev as his Google Summer of
32Code project.
33
34### What's new
35
36* Transition entire implementation from Lua to Teal!
37* `luarocks upload`: include .src.rock file when given.
38* Various Windows fixes:
39 * Prioritize `bin` over `lib` for `LUA_LIBDIR` on Windows.
40 * `luarocks upload`: Accept Windows-style paths when sending
41 multipart data. (#1687)
42 * Update pe-parser to 0.6.
43 * Fix `LUA_LIBDIR` for MSVC installations. (#1744)
44 * Fixed make check for msys2 mingw system. (#1745)
45 * Override default C compiler to `cc.exe` on MSYS2 (#1754)
46 * Allow Lua C modules to be uninstalled on MSYS2. (#1756)
47 * Cygwin fixes for `external_deps_patterns` and
48 `runtime_external_deps_patterns`. (#1782)
49* Only create binary wrapper for Lua scripts. (#1738)
50* Project dir initialized via `luarocks init` has higher
51 precedence than `local_by_default` configuration. (#1682)
52* add `LUA_VERSION` build variable for rockspecs.
53* Rockspec format addition, feature-gated with
54 `rockspec_format = "3.1`:
55 * add build variables for rockspecs with the directories
56 of its dependencies: `<DEPENDENCY_NAME>_ROCKDIR`.
57* Avoid overwriting CMake variables from rockspec.
58* Allow loading JSON-formatted manifest, to circumvent
59 a LuaJIT bug when loading Lua files.
60* Various other minor fixes.
61
1## What's new in LuaRocks 3.11.1 62## What's new in LuaRocks 3.11.1
2 63
64> Released 31/May/2024
65
3* Fixes: 66* Fixes:
4 * normalize namespace names to lowercase when performing 67 * normalize namespace names to lowercase when performing
5 dependency resolution, to match CLI behavior 68 dependency resolution, to match CLI behavior
@@ -10,8 +73,11 @@
10 * Fix behavior of luarocks.lock file when dealing 73 * Fix behavior of luarocks.lock file when dealing
11 with dependencies 74 with dependencies
12 75
76
13## What's new in LuaRocks 3.11.0 77## What's new in LuaRocks 3.11.0
14 78
79> Released 13/Mar/2024
80
15* Features: 81* Features:
16 * `luarocks build` and `luarocks install` no longer rebuild 82 * `luarocks build` and `luarocks install` no longer rebuild
17 or reinstall if the version is already installed 83 or reinstall if the version is already installed
@@ -45,8 +111,11 @@
45 * install.bat sets LUALIB. 111 * install.bat sets LUALIB.
46 * Improved help for `luarocks path`. 112 * Improved help for `luarocks path`.
47 113
114
48## What's new in LuaRocks 3.10.0 115## What's new in LuaRocks 3.10.0
49 116
117> Released 27/Feb/2024
118
50* Features: 119* Features:
51 * Introduce file-based locking for concurrent access 120 * Introduce file-based locking for concurrent access
52 control. Previously, LuaRocks would produce undefined behavior 121 control. Previously, LuaRocks would produce undefined behavior
@@ -117,8 +186,11 @@
117 * Don't use floats to parse Lua version number. 186 * Don't use floats to parse Lua version number.
118 * Various fixes related to path normalization. 187 * Various fixes related to path normalization.
119 188
189
120## What's new in LuaRocks 3.9.2 190## What's new in LuaRocks 3.9.2
121 191
192> Released 08/Dec/2022
193
122* Configuration now honors typical compiler environment variables 194* Configuration now honors typical compiler environment variables
123 for all build backends: 195 for all build backends:
124 * `MAKE`, `CC`, `AR`, `RANLIB` on Unix 196 * `MAKE`, `CC`, `AR`, `RANLIB` on Unix
@@ -137,8 +209,11 @@
137 * `persist.save_from_table`: ensure directory exists when 209 * `persist.save_from_table`: ensure directory exists when
138 saving a file 210 saving a file
139 211
212
140## What's new in LuaRocks 3.9.1 213## What's new in LuaRocks 3.9.1
141 214
215> Released 01/Jul/2022
216
142* Fixed error message when Lua library is not found 217* Fixed error message when Lua library is not found
143* Fixed build of Windows binary 218* Fixed build of Windows binary
144* A couple of minor feature additions: 219* A couple of minor feature additions:
@@ -153,6 +228,8 @@
153 228
154## What's new in LuaRocks 3.9.0 229## What's new in LuaRocks 3.9.0
155 230
231> Released 17/Apr/2022
232
156* `builtin` build mode now always respects CC, CFLAGS and LDFLAGS 233* `builtin` build mode now always respects CC, CFLAGS and LDFLAGS
157* Check that lua.h version matches the desired Lua version 234* Check that lua.h version matches the desired Lua version
158* Check that the version of the Lua C library matches the desired Lua version 235* Check that the version of the Lua C library matches the desired Lua version
@@ -170,8 +247,11 @@
170* LuaRocks test suite now runs on Lua 5.4 and LuaJIT 247* LuaRocks test suite now runs on Lua 5.4 and LuaJIT
171* Internal dependencies of standalone LuaRocks executable were bumped 248* Internal dependencies of standalone LuaRocks executable were bumped
172 249
250
173## What's new in LuaRocks 3.8.0 251## What's new in LuaRocks 3.8.0
174 252
253> Released 08/Nov/2021
254
175* Support GitHub's protocol security changes transparently. 255* Support GitHub's protocol security changes transparently.
176 * The raw git:// protocol will stop working on GitHub. LuaRocks already 256 * The raw git:// protocol will stop working on GitHub. LuaRocks already
177 supports git+https:// as an alternative, but to avoid having to update 257 supports git+https:// as an alternative, but to avoid having to update
@@ -192,8 +272,11 @@
192 * Revert the use of `Everyone` back to `*S-1-1-0` 272 * Revert the use of `Everyone` back to `*S-1-1-0`
193 * Quote the use of the `%USERNAME%` variable to support names with spaces 273 * Quote the use of the `%USERNAME%` variable to support names with spaces
194 274
275
195## What's new in LuaRocks 3.7.0 276## What's new in LuaRocks 3.7.0
196 277
278> Released 13/Apr/2021
279
197* Improved connectivity resiliency 280* Improved connectivity resiliency
198 * LuaRocks can now use mirrors for downloading rocks even if downloading 281 * LuaRocks can now use mirrors for downloading rocks even if downloading
199 the manifest from the main server succeeds. 282 the manifest from the main server succeeds.
@@ -219,8 +302,11 @@
219* Fixes an issue on Windows where it would incorrectly revoke permissions 302* Fixes an issue on Windows where it would incorrectly revoke permissions
220 from the current user when installing 303 from the current user when installing
221 304
305
222## What's new in LuaRocks 3.6.0 306## What's new in LuaRocks 3.6.0
223 307
308> Released 30/Mar/2021
309
224* Adds a double-check step to verify that all files from a rock are installed 310* Adds a double-check step to verify that all files from a rock are installed
225* Improve resilience of the manifest reader to deal with manifests 311* Improve resilience of the manifest reader to deal with manifests
226 written with older versions of LuaRocks lower than 3.0 312 written with older versions of LuaRocks lower than 3.0
@@ -245,8 +331,11 @@
245* Luacheck now runs on the LuaRocks CI 331* Luacheck now runs on the LuaRocks CI
246* Distributed binaries are built using Lua 5.3 332* Distributed binaries are built using Lua 5.3
247 333
334
248## What's new in LuaRocks 3.5.0 335## What's new in LuaRocks 3.5.0
249 336
337> Released 10/Dec/2020
338
250This is a small release: 339This is a small release:
251 340
252* Added support for MSYS2 and Mingw-w64 341* Added support for MSYS2 and Mingw-w64
@@ -254,9 +343,10 @@ This is a small release:
254* Fixes a bug where `--verbose` raised an exception with a nil argument 343* Fixes a bug where `--verbose` raised an exception with a nil argument
255* Added proper error messages when lua.h is invalid 344* Added proper error messages when lua.h is invalid
256 345
257
258## What's new in LuaRocks 3.4.0 346## What's new in LuaRocks 3.4.0
259 347
348> Released 25/Sep/2020
349
260### Features 350### Features
261 351
262* `luarocks make` now supports `--only-deps` 352* `luarocks make` now supports `--only-deps`
@@ -301,6 +391,8 @@ This is a small release:
301 391
302## What's new in LuaRocks 3.3.1 392## What's new in LuaRocks 3.3.1
303 393
394> Released 07/Feb/2020
395
304This is a bugfix release: 396This is a bugfix release:
305 397
306* Fix downgrades of rocks containing directories: stop it 398* Fix downgrades of rocks containing directories: stop it
@@ -310,6 +402,8 @@ This is a bugfix release:
310 402
311## What's new in LuaRocks 3.3.0 403## What's new in LuaRocks 3.3.0
312 404
405> Released 28/Jan/2020
406
313### Features 407### Features
314 408
315* **Dependency pinning** 409* **Dependency pinning**
@@ -362,8 +456,11 @@ This is a bugfix release:
362* Windows: fix generation of temporary filenames (#1058) 456* Windows: fix generation of temporary filenames (#1058)
363* Windows: force `.lib` over `.dll` extension when resolving `LUALIB` 457* Windows: force `.lib` over `.dll` extension when resolving `LUALIB`
364 458
459
365## What's new in LuaRocks 3.2.1 460## What's new in LuaRocks 3.2.1
366 461
462> Released 05/Sep/2019
463
367* fix installation of LuaRocks via rockspec (`make bootstrap` and 464* fix installation of LuaRocks via rockspec (`make bootstrap` and
368`luarocks install`): correct a problem in the initialization of the 465`luarocks install`): correct a problem in the initialization of the
369luarocks.fs module and its interaction with the cfg module. 466luarocks.fs module and its interaction with the cfg module.
@@ -374,8 +471,11 @@ luarocks.fs module and its interaction with the cfg module.
374luarocks.cmd.external modules 471luarocks.cmd.external modules
375* correct override of config values via CLI flags 472* correct override of config values via CLI flags
376 473
474
377## What's new in LuaRocks 3.2.0 475## What's new in LuaRocks 3.2.0
378 476
477> Released 28/Aug/2019
478
379LuaRocks 3.2.0 now uses argument parsing based on argparse 479LuaRocks 3.2.0 now uses argument parsing based on argparse
380instead of a homegrown parser. This was implemented by Paul 480instead of a homegrown parser. This was implemented by Paul
381Ouellette as his Google Summer of Code project, mentored by 481Ouellette as his Google Summer of Code project, mentored by
@@ -399,23 +499,35 @@ package.cpath as well
399* install.bat: Improved detection for Visual Studio 2017 and higher 499* install.bat: Improved detection for Visual Studio 2017 and higher
400* Bundled LuaSec in all-in-one binary bumped to version 0.8.1 500* Bundled LuaSec in all-in-one binary bumped to version 0.8.1
401 501
502
402## What's new in LuaRocks 3.1.3 503## What's new in LuaRocks 3.1.3
403 504
505> Released 06/Jun/2019
506
404This is another bugfix release, that incldes a couple of fixes, 507This is another bugfix release, that incldes a couple of fixes,
405including better Lua detection, and fixes specific to MacOS and 508including better Lua detection, and fixes specific to MacOS and
406FreeBSD. 509FreeBSD.
407 510
511
408## What's new in LuaRocks 3.1.2 512## What's new in LuaRocks 3.1.2
409 513
514> Released 07/May/2019
515
410This is again a small fix release. 516This is again a small fix release.
411 517
518
412## What's new in LuaRocks 3.1.1 519## What's new in LuaRocks 3.1.1
413 520
521> Released 06/May/2019
522
414This is a hotfix release fixing an issue that affected initialization 523This is a hotfix release fixing an issue that affected initialization
415in some scenarios. 524in some scenarios.
416 525
526
417## What's new in LuaRocks 3.1.0 527## What's new in LuaRocks 3.1.0
418 528
529> Released 30/Apr/2019
530
419### More powerful `luarocks config` 531### More powerful `luarocks config`
420 532
421The `luarocks config` command used to only list the current 533The `luarocks config` command used to only list the current
@@ -473,19 +585,28 @@ longer complains with a warning message if the home cache cannot be
473created (it just uses a temporary dir instead). And of course, the 585created (it just uses a temporary dir instead). And of course, the
474release includes multiple bugfixes. 586release includes multiple bugfixes.
475 587
588
476## What's new in LuaRocks 3.0.4 589## What's new in LuaRocks 3.0.4
477 590
591> Released 30/Oct/2018
592
478* Fork-free platform detection at startup 593* Fork-free platform detection at startup
479* Improved detection of the default rockspec in commands such as `luarocks test` 594* Improved detection of the default rockspec in commands such as `luarocks test`
480* Various minor bugfixes 595* Various minor bugfixes
481 596
597
482## What's new in LuaRocks 3.0.3 598## What's new in LuaRocks 3.0.3
483 599
600> Released 15/Sep/2018
601
484LuaRocks 3.0.3 is a minor bugfix release, fixing a regression in 602LuaRocks 3.0.3 is a minor bugfix release, fixing a regression in
485luarocks.loader introduced in 3.0.2. 603luarocks.loader introduced in 3.0.2.
486 604
605
487## What's new in LuaRocks 3.0.2 606## What's new in LuaRocks 3.0.2
488 607
608> Released 07/Sep/2018
609
489* Improvements in luarocks init, new --reset flag 610* Improvements in luarocks init, new --reset flag
490* write_rockspec: --lua-version renamed to --lua-versions 611* write_rockspec: --lua-version renamed to --lua-versions
491* Improved behavior in module autodetection 612* Improved behavior in module autodetection
@@ -498,6 +619,8 @@ characters (should fix the libstdc++ issue when installing xml)
498 619
499## What's new in LuaRocks 3.0.1 620## What's new in LuaRocks 3.0.1
500 621
622> Released 14/Aug/2018
623
501* Numerous bugfixes including: 624* Numerous bugfixes including:
502 * Handle missing global `arg` 625 * Handle missing global `arg`
503 * Fix umask behavior 626 * Fix umask behavior
@@ -519,8 +642,11 @@ for that project
519support and an uninstall rule 642support and an uninstall rule
520* Autodetect FreeBSD-style include paths (/usr/include/lua5x/) 643* Autodetect FreeBSD-style include paths (/usr/include/lua5x/)
521 644
645
522## What's new in LuaRocks 3.0.0 646## What's new in LuaRocks 3.0.0
523 647
648> Released 25/Jul/2018
649
524- [New rockspec format](#new-rockspec-format) 650- [New rockspec format](#new-rockspec-format)
525- [New commands](#new-commands), including [luarocks init](https://github.com/luarocks/luarocks/wiki/Project:-LuaRocks-per-project-workflow) for per-project workflows 651- [New commands](#new-commands), including [luarocks init](https://github.com/luarocks/luarocks/wiki/Project:-LuaRocks-per-project-workflow) for per-project workflows
526- [New flags](#new-flags), including `--lua-dir` and `--lua-version` for using multiple Lua installs with a single LuaRocks 652- [New flags](#new-flags), including `--lua-dir` and `--lua-version` for using multiple Lua installs with a single LuaRocks
@@ -704,3 +830,526 @@ overhauled, making use of LuaRocks 3 features to greatly simplify them:
704* New internal objects for representing interaction with the repostories: 830* New internal objects for representing interaction with the repostories:
705 `luarocks.queries` and `luarocks.results` 831 `luarocks.queries` and `luarocks.results`
706* Type checking rules of file formats were moved into the `luarocks.type` namespace. 832* Type checking rules of file formats were moved into the `luarocks.type` namespace.
833
834
835
836## LuaRocks 2.4.4
837
838> Released 12/Mar/2018
839
840* Do not halt a package deletion process when a file from the package is missing
841* Updated bundled binaries in Windows package: Lua 5.1.5, Wget 1.19.4, 7zip 18.01
842* Updated Windows installer to better handle gcc toolchains
843* Fix detection of directories on Windows
844* Fixes .def generation on Windows
845
846
847## LuaRocks 2.4.3
848
849> Released 12/Sep/2017
850
851* Fixed display of pathnames in `luarocks show`
852* Improved check for write permissions when installing
853* Plus assorted bugfixes and improvements
854
855
856## LuaRocks 2.4.2
857
858> Released 30/Nov/2016
859
860* Fixed conflict resolution on deploy/delete
861* Improved dependency check messages
862* Performance improvements when removing packages
863* Support user-defined `platforms` array in config file
864* Improvements in Lua interpreter version detection in Unix configure script
865* Relaxed Lua version detection to improve support for alternative implementations (e.g. Ravi)
866* Plus assorted bugfixes and improvements
867
868
869## LuaRocks 2.4.1
870
871> Released 06/Oct/2016
872
873* Avoid coroutine use in luarocks.loader
874* Fix upgrade issues for very old versions
875
876
877## LuaRocks 2.4.0
878
879> Released 08/Sep/2016
880
881* New test suite based on Busted; runs on Linux, OSX and Windows
882* git+ssh:// fetch protocol
883* Improved behavior preserving permissions
884* Improved listing of dependencies on installation
885* Improved behavior of argument handling in `pack`
886* MSYS and Haiku platform detection
887* Feature-based detection of internal bit32 and utf8 modules
888* Internal reorganization of luarocks.fs code
889* `remove` option --force=fast renamed to --force-fast
890* Plus assorted bugfixes and cleanups
891
892
893## LuaRocks 2.3.0
894
895> Released 09/Jan/2016
896
897* Windows: major redesign of the install tree structure
898* Windows: Auto setup of MSVC environments
899* Improve error messages when tools are not installed
900* CMake: generate 64-bit builds when appropriate
901* Improve check of location of config files
902* MacOSX: set MACOSX_DEPLOYMENT_TARGET using env
903* Remove --extensions flag; use rockspec_format instead
904* New `luarocks config` command to query configuration
905* Improved UI for messages when external deps are missing
906* Unix: Robustness improvement in configure script
907* Plus tweaks and bugfixes. See the changelog for details.
908
909
910## LuaRocks 2.2.2
911
912> Released 24/Apr/2015
913
914* `luarocks build --only-deps` and `luarocks install --only-deps` for installing dependencies only
915* Mercurial support
916* Improved command-line argument parser, now validates arguments (it previously ignored unrecognized arguments) and accepts both `--flag=option` and `--flag option` in flags that take arguments.
917* For consistency with `luarocks show`, `luarocks doc --homepage` is now `luarocks doc --home`
918* Improvements to CMake build backend
919* Improved Makefiles for handling simultaneous bootstrapped installations
920* Various bugfixes
921
922
923## LuaRocks 2.2.1
924
925> Released 17/Mar/2015
926
927* Improved compatibility with Lua 5.3
928* `luarocks list --outdated` for listing modules with available upgrades
929* Assorted bugfixes
930
931
932## LuaRocks 2.2.0
933
934> Released 15/Aug/2014
935
936* MoonRocks is the new default repository: http://rocks.moonscript.org - Rocks don't need to be sent to the LuaRocks mailing list anymore, you can upload them directly at the website or using...
937* ...`luarocks upload` command for uploading rocks to MoonRocks via the command-line
938* Preliminary support for Lua 5.3
939* No longer uses the module() function, for Lua 5.2 installations built without Lua 5.1 compatibility
940* --branch flag for `luarocks build` and `luarocks make`
941* various improvements in `luarocks doc` command
942* "git+http" transport for source.url
943
944
945## LuaRocks 2.1.2
946
947> Released 10/Jan/2014
948
949* major improvements in the Windows install.bat script. Now installs by default on standard Windows locations, while the old self-contained all-under-one-dir installation is still supported through an option flag. The documentation at luarocks.org didn't catch up with it yet, so please refer to "install /?" for instructions.
950* a new command, "luarocks doc <module>" that tries to find any installed documentation. Due to the lack of documentation standards for Lua, this uses a few heuristics. Feedback on the feature is appreciated.
951* a rocks_provided configuration entry in which you can preload dependencies that are already fulfulled in your system; a few defaults are included (bit32 is auto-provided in Lua 5.2; luabitop is auto-provided in LuaJIT)
952* generated script wrappers are now more robust
953* Graceful handling of permission errors on Windows
954* Minor performance improvements
955* Support for "named trees", so you can label your rocks trees and use flags such as --tree=system or --tree=user instead of the full path
956* "luarocks" with no arguments presents more useful diagnostics
957* Improved Lua detection in Unix installer
958* plus assorted bugfixes
959
960
961## LuaRocks 2.1.1
962
963> Released 29/Oct/2013
964
965* Remote manifests are now compressed and locally cached, making commands faster
966* New command "write_rockspec" which generates rockspec file templates
967* detection of multiarch directories on Linux
968* environment and performance improvements on Windows
969* New --force=fast option for `luarocks remove`
970* New --local-tree flag for `luarocks-admin make-manifest`
971* Improved error checking
972* plus assorted bugfixes
973
974
975## LuaRocks 2.1.0
976
977> Released 09/Aug/2013
978
979* accesses manifest-{5.1,5.2} in remote servers to provide properly filtered results for Lua 5.1 or 5.2
980* Remove old versions when installing a new one and old versions are no longer needed to honor dependencies.
981* `make bootstrap` is now an advertised option for installing LuaRocks itself as a rock on Unix systems
982* `luarocks purge --old-versions` for cleaning up a local tree
983* --keep flag to produce the old behavior of keeping old versions around (can be made permanent setting keep_old_versions=true in the config file)
984* security config options `accepted_build_types` and `hooks_enabled`
985* `lua_version` is now available as a global for your config.lua
986* new flags --lr-path, --lr-cpath, --lr-bin for `luarocks path` for use in scripts
987* friendlier error messages
988* plus bugfixes
989
990
991## LuaRocks 2.0.13
992
993> Released 16/Apr/2013
994
995* Support for Lua 5.2 is no longer marked as experimental
996* Support for installing two instances of LuaRocks, for Lua 5.1 and 5.2, in parallel
997* Improvements for the `builtin` build mode on Windows
998* rclauncher on Windows does not rely on a precompiled object anymore
999* Improvements for the Windows installer, including optional registry entries for context-menu operations
1000* Improvements in `luarocks new_version` command for autogenerating updated rockspecs
1001* `luarocks remove` command accepts rock and rockspec filenames
1002
1003
1004## LuaRocks 2.0.12
1005
1006> Released 05/Nov/2012
1007
1008* "Dependencies mode" selection to configure how to work with multiple local trees
1009* New command "purge" that erases a local tree
1010* --porcelain flag for "list" and "search"
1011* More consistent user-agent reporting
1012* Code cleanups, removal of dead code
1013* Fixes regressions on Mac and Windows
1014
1015
1016## LuaRocks 2.0.11
1017
1018> Released 21/Sep/2012
1019
1020* Work around LuaSocket crash when given proxy URLs without the scheme part
1021* Save manifest file in a single fs operation to make it more atomic
1022* Fix tree loading order on luarocks.loader with multiple trees
1023* Fix detection of write permissions
1024* Improve dependency detection using configurable patterns, now a file like "libfoo.so.1" satisfies "libfoo.so"
1025* --bin flag for "luarocks path" command, exports $PATH
1026* Support for mirrors in the rocks_servers list, default list of mirrors included
1027* Avoid using Lua modules internally on Windows, to avoid file system locking
1028* Add NetBSD support
1029* Rename luarocks.rep to luarocks.repos
1030* Fail gracefully on the absence of cmake, on cmake build mode
1031* New command "lint", to check the syntax of a rockspec
1032* Fix builtin build mode on Mac OSX < 10.5
1033* Improve configure tests for Debian-based platforms
1034
1035
1036## LuaRocks 2.0.10
1037
1038> Released 12/Jul/2012
1039
1040* Fix fetching Git tags/branches
1041* Fix strictness issue with parameter of io.open
1042* Builtin mode sets rpath when compiling on Unix
1043* Use full path in $(LUA) when configured with --with-lua
1044* Cleanup of .svn dir in svn-based rocks
1045* Improvement for `make bootstrap`
1046
1047
1048## LuaRocks 2.0.9
1049
1050> Released 31/May/2012
1051
1052* Experimental support for Lua 5.2 (auto-detection and explicit --lua-version flag in configure)
1053* Solaris support and BSD fixes
1054* --nodeps flag for forced installation without dependencies
1055* "new_version" command to streamline writing of updated rockspecs
1056* Improved handling of LUAROCKS_SYSCONFIG variable
1057* Clickable URLs in descriptions in rocks repo index.html
1058* Nicer-looking persisted tables
1059* Assorted bugfixes
1060
1061
1062## LuaRocks 2.0.8
1063
1064> Released 29/Feb/2012
1065
1066* Fix in CMake build backend
1067* Fix handling error condition of --pack-binary-rock
1068* Fixes for Windows .bat installer
1069* Improved arch detection when packing binary rocks
1070* Workaround LuaPosix 5.1.15 problem with chmod()
1071* Proper error messages when config files are invalid
1072* Avoid checking permissions when it's not necessary
1073* Fix behavior of `builtin` rocks which install init.lua scripts
1074* git+file:// pseudoprotocol for local Git repos
1075* New binaries from GnuWin32 shipped in Win32 zip
1076* Nicer-looking help
1077
1078
1079## LuaRocks 2.0.7.1
1080
1081> Released 10/Jan/2012
1082
1083* Fix installation of files in build operation
1084* Deprecate --to and --from, use --server and --tree instead
1085* Improved documentation, thanks to LDoc
1086
1087
1088## LuaRocks 2.0.7
1089
1090> Released 10/Dec/2011
1091
1092* Quieter git checkout
1093* --only-sources flag to restrict download of sources from a single domain
1094* Copy entries to bin/ with proper permissions
1095* Fix --pack-binary-rock and add support for it in "luarocks make" as well
1096* Isolate references to "5.1" to luarocks.cfg module
1097* More logical names for flags: --tree, --server
1098* Improved documentation
1099
1100
1101## LuaRocks 2.0.6
1102
1103> Released 04/Oct/2011
1104
1105* Fixes for rockspecs missing `description` or the contents of `source.url`
1106* Escape fixes for LuaJIT/Metalua
1107* Support for building a rock without installing it
1108* Site-local configuration is now at luarocks.site_config
1109* Support for Mercurial
1110* Flag for experimental extensions
1111* Plus assorted bugfixes
1112
1113
1114## LuaRocks 2.0.5
1115
1116> Released 17/Aug/2011
1117
1118* External commands are overridable through variables or config.lua
1119* No longer uses print() - output goes to stdout, errors to stderr
1120* Handle redirects between http (LuaSocket) and https (LuaSec)
1121* Avoid relying on the $PWD variable
1122* Code cleanups
1123
1124
1125## LuaRocks 2.0.4.1
1126
1127> Released 17/Jan/2011
1128
1129* Minor bugfix release
1130
1131
1132## LuaRocks 2.0.4
1133
1134> Released 23/Dec/2010
1135
1136* Command "remove" for luarocks-admin
1137* Check for write permissions in repository and suggest --local
1138* Remove .git from source tree when downloading from Git
1139* Display of external dependencies in index.html
1140* OpenBSD support
1141* More thorough search for external libraries
1142* Normalize paths to fix behavior when LFS is used under Windows
1143* Add HTTPS support using LuaSec when using LuaSocket, for consistency
1144* Better propagation of error messages
1145* Stable sort of persisted files such as manifests
1146* Plus assorted bugfixes
1147
1148
1149## LuaRocks 2.0.3
1150
1151> Released 14/Sep/2010
1152
1153* Check for permissions and warn user instead of just installing in local tree
1154* --local flag for operations on the local tree
1155* -fPIC is always set in CFLAGS exported to makefiles
1156* respect permissions when copying files in Unix systems
1157* display license after build/installation
1158* svn:// protocol for scm rockspecs
1159* "luarocks list" and "luarocks search" are now case-insensitive
1160* "luarocks-admin add" supports adding multiple files at once
1161* "luarocks-admin add" supports rsync for download and upload and scp for upload
1162* new command: "luarocks show" displays information about an installed rock
1163* new command: "luarocks path" to make it easy to export Lua env variables
1164* plus assorted bugfixes
1165
1166
1167## LuaRocks 2.0.2
1168
1169> Released 01/Apr/2010
1170
1171* use LuaSocket if available for downloading files
1172* use LuaZip if available for unzipping files
1173* MinGW support in builtin build backend
1174* updated installation files for Windows, including a LuaForWindows-compatible package
1175
1176
1177## LuaRocks 2.0.1
1178
1179> Released 27/Oct/2009
1180
1181* luarocks.cfg is no longer edited during installation; a separate site-local luarocks.config module is created.
1182* robustness fixes and improvements for luarocks.add
1183* cleanup of configure options and references to the old LuaForge URLs
1184* install LuaRocks as a rock
1185* plus assorted bugfixes
1186
1187
1188## LuaRocks 2.0
1189
1190> Released 17/Oct/2009
1191
1192* module files are now deployed to standard Lua-style paths
1193* new package loader module luarocks.loader, superseding the require()-override module luarocks.require
1194* new abstraction system for file system operations: the OS-specific back-ends for luarocks.fs were split between native-Lua and tool-based implementations
1195* new format for local manifest
1196* new command for luarocks: "download", to fetch .rock and .rockspec files
1197* new commands for luarocks-admin: "add", to upload rocks to a repository, and "refresh_cache", to refresh the cache used by the "add" command
1198* plus a number of cleanups and bugfixes
1199
1200
1201## LuaRocks 1.0.1
1202
1203> Released 13/Mar/2009
1204
1205* Improve portability in usage of Unix tools
1206* Allow use of local rocks servers in the --from flag
1207* Improve detection of external libraries on Mac OSX
1208* Fix build of the `builtin` backend under Windows
1209* Support for the `md5` binary as a MD5 checker
1210
1211
1212## LuaRocks 1.0
1213
1214> Released 01/Sep/2008
1215
1216* Add support for post-install hooks
1217* Path helper scripts for binaries on Windows systems.
1218* Git support, contributed by Thomas Harning.
1219* Improve shell compatibility for different Unix systems.
1220* Add the @ operator for no-upgrade dependencies.
1221* Add check for rockspec version format.
1222* Generate index.html when building a manifest for a repository.
1223* Plus assorted bugfixes.
1224
1225
1226## LuaRocks 0.6
1227
1228> Released 30/Jun/2008
1229
1230* Check external deps on binary installs. Allow rockspecs to specify supported platforms. Support platform-agnostic specification of external deps files. Allow overriding external deps subdirs.
1231* Structured build systems in subdirectories.
1232* Smarter check to decide if a rock is pure Lua or not, also checking bin/
1233* Restructuring of fs code.
1234* Modularized fetch code to support multiple SCMs.
1235* Added specific support for `doc` directory in rockspecs. Auto-install files in `lua` in builtin builds.
1236* Support for Surround SCM, contributed by Ignacio Burgueño.
1237* "module" build type renamed to "builtin"; "cvs_tag" and "cvs_module" renamed to "tag" and "module". Old names still supported for compatibility for now, to be cleaned up by 1.0.
1238* Plus many bugfixes.
1239
1240
1241## LuaRocks 0.5.2
1242
1243> Released 13/May/2008
1244
1245* Fixes problems with removal of read-only files on Windows
1246* Fixes issues with external libraries on the `module` build type on Windows
1247* Fixes the --only-from flag
1248* Renames the luarocks.config module to luarocks.cfg avoiding conflict's with the user configuration file config.lua
1249
1250
1251## LuaRocks 0.5.1
1252
1253> Released 25/Apr/2008
1254
1255* Added function get_rock_from_module in luarocks.require, allowing apps to inspect which rock they're getting modules from.
1256* Added variables LUA, LIB_EXTENSION and OBJ_EXTENSION, now available for rockspec authors.
1257* Assorted bugfixes, especially for the Windows package.
1258* Build system improvements: add DESTDIR variable to makefile to make things easier for distros packaging LuaRocks.
1259
1260
1261## LuaRocks 0.5
1262
1263> Released 03/Apr/2008
1264
1265* New flags in the ./configure on Unix (see configure --help) and install.bat on Windows (see install.bat /?)
1266* Support for multiple local repositories. By extension, LuaRocks features more intuitive configuration defaults (it installs rocks to $PREFIX/lib/luarocks if you have the permission, and to $HOME/.luarocks if you don't).
1267* Flags --from=_server_, --only-from=_server_ and --to=_tree_, to allow specifying exactly where to get rocks from and where to install them to.
1268* The manifest file now stores dependency info -- luarocks.require no longer scans rockspec files.
1269* `unpack` command allows unpacking binary and pure-Lua rocks, for inspecting.
1270* Plus assorted bugfixes.
1271
1272
1273## LuaRocks 0.4.3
1274
1275> Released 03/Mar/2008
1276
1277* The MD5 check feature added in 0.4.2 can now use openssl instead of md5sum (making LuaRocks friendlier to OSX).
1278* Added a license file in the tarball (making LuaRocks friendlier to Debian).
1279* Plus assorted bugfixes.
1280
1281
1282## LuaRocks 0.4.2
1283
1284> Released 09/Feb/2008
1285
1286* Support .lua files directly in the URL field.
1287* Perform check of MD5 checksum in sources.
1288* Accept plain strings in all fields of the source table of the "module" build type.
1289* Bugfixes.
1290
1291
1292## LuaRocks 0.4.1
1293
1294> Released 25/Jan/2008
1295
1296* New configure/install.bat flags for setting scripts dir and local repository dir.
1297* "unpack" command now supports rockspec files as well.
1298* Complete code documentation.
1299* Many assorted bugfixes.
1300
1301
1302## LuaRocks 0.4
1303
1304> Released 18/Jan/2008
1305
1306* Adds the "unpack" command for debugging rocks (.src.rock only at this point).
1307* Support curl as an alternative downloader for OSX, removing the dependency on wget.
1308* Support for installing non-Lua entries in bin/ dirs.
1309* Support for specifying libdirs, incdirs, libraries and defines in "module"-type builds.
1310* x86_64 support, by Brian Hetro.
1311* FreeBSD support, by Matthew M. Burke.
1312* Performance improvements.
1313* Many assorted bugfixes.
1314
1315
1316## LuaRocks 0.3.2
1317
1318> Released 21/Dec/2007
1319
1320* Support for patching and inclusion of extra files (such as Makefiles) through a rockspec.
1321* Support "platforms" overrides table for dependencies, external dependencies and source URLs.
1322* Many assorted bugfixes.
1323
1324
1325## LuaRocks 0.3.1
1326
1327> Released 18/Dec/2007
1328
1329* Improved search: results now feature separate lists for source and binary rocks.
1330* Windows support for the "module" build type (using Visual Studio).
1331* Many assorted bugfixes.
1332
1333
1334## LuaRocks 0.3
1335
1336> Released 04/Dec/2007
1337
1338* Includes Windows package.
1339* Adds the "module" build type.
1340* Performance improvements.
1341
1342
1343## LuaRocks 0.2
1344
1345> Released 23/Oct/2007
1346
1347* Bugfixes and improvements to build infrastructure.
1348* Adds the LuaRocks "remove" command.
1349
1350
1351## LuaRocks 0.1
1352
1353> Released 09/Aug/2007
1354
1355* Initial release.
diff --git a/binary/Makefile.windows b/binary/Makefile.windows
index e749cb00..4d7ce243 100644
--- a/binary/Makefile.windows
+++ b/binary/Makefile.windows
@@ -7,9 +7,9 @@ MINGW_SYSROOT=/usr/lib/mingw-w64-sysroot/$(MINGW_PREFIX)
7OPENSSL_PLATFORM=mingw 7OPENSSL_PLATFORM=mingw
8# Versions of dependencies 8# Versions of dependencies
9LIBLUA_VERSION=5.4.3 9LIBLUA_VERSION=5.4.3
10OPENSSL_VERSION=1.0.2o 10OPENSSL_VERSION=1.1.1w
11ZLIB_VERSION=1.3.1 11ZLIB_VERSION=1.3.1
12BZIP2_VERSION=1.0.6 12BZIP2_VERSION=1.0.8
13 13
14WINDOWS_DEPS_DIR=windows-deps-$(MINGW_PREFIX) 14WINDOWS_DEPS_DIR=windows-deps-$(MINGW_PREFIX)
15BUILD_WINDOWS_DEPS_DIR=build-windows-deps-$(MINGW_PREFIX) 15BUILD_WINDOWS_DEPS_DIR=build-windows-deps-$(MINGW_PREFIX)
@@ -61,7 +61,7 @@ $(WINDOWS_DEPS_DIR)/lib/libz.a: $(BUILD_WINDOWS_DEPS_DIR)/zlib-$(ZLIB_VERSION)
61 61
62$(BUILD_WINDOWS_DEPS_DIR)/bzip2-$(BZIP2_VERSION).tar.gz: 62$(BUILD_WINDOWS_DEPS_DIR)/bzip2-$(BZIP2_VERSION).tar.gz:
63 mkdir -p $(@D) 63 mkdir -p $(@D)
64 cd $(BUILD_WINDOWS_DEPS_DIR) && curl -OL http://downloads.sourceforge.net/project/bzip2/bzip2-$(BZIP2_VERSION).tar.gz 64 cd $(BUILD_WINDOWS_DEPS_DIR) && curl -OL https://sourceware.org/pub/bzip2/bzip2-$(BZIP2_VERSION).tar.gz
65$(BUILD_WINDOWS_DEPS_DIR)/bzip2-$(BZIP2_VERSION): $(BUILD_WINDOWS_DEPS_DIR)/bzip2-$(BZIP2_VERSION).tar.gz 65$(BUILD_WINDOWS_DEPS_DIR)/bzip2-$(BZIP2_VERSION): $(BUILD_WINDOWS_DEPS_DIR)/bzip2-$(BZIP2_VERSION).tar.gz
66 cd $(BUILD_WINDOWS_DEPS_DIR) && tar zxvpf bzip2-$(BZIP2_VERSION).tar.gz 66 cd $(BUILD_WINDOWS_DEPS_DIR) && tar zxvpf bzip2-$(BZIP2_VERSION).tar.gz
67$(WINDOWS_DEPS_DIR)/lib/libbz2.a: $(BUILD_WINDOWS_DEPS_DIR)/bzip2-$(BZIP2_VERSION) 67$(WINDOWS_DEPS_DIR)/lib/libbz2.a: $(BUILD_WINDOWS_DEPS_DIR)/bzip2-$(BZIP2_VERSION)
diff --git a/configure b/configure
index 4c86cb36..cc3e9dab 100755
--- a/configure
+++ b/configure
@@ -321,7 +321,7 @@ do
321done 321done
322 322
323echo 323echo
324BLUE "Configuring LuaRocks version dev..." 324BLUE "Configuring LuaRocks version 3.12.2..."
325echo 325echo
326echo 326echo
327 327
diff --git a/docs/creating_a_makefile_that_plays_nice_with_luarocks.md b/docs/creating_a_makefile_that_plays_nice_with_luarocks.md
index d6d43a6b..a6187659 100644
--- a/docs/creating_a_makefile_that_plays_nice_with_luarocks.md
+++ b/docs/creating_a_makefile_that_plays_nice_with_luarocks.md
@@ -16,18 +16,19 @@ For building:
16 16
17* `CFLAGS` - flags for the C compiler 17* `CFLAGS` - flags for the C compiler
18* `LIBFLAG` - the flags needed for the linker to create shared libraries 18* `LIBFLAG` - the flags needed for the linker to create shared libraries
19* `LUA_LIBDIR` - where to find the lua libraries 19* `LUA_LIBDIR` - where to find the Lua libraries
20* `LUA_BINDIR` - where to find the lua binary 20* `LUA_BINDIR` - where to find the Lua binary
21* `LUA_INCDIR` - where to find the lua headers 21* `LUA_INCDIR` - where to find the Lua headers
22* `LUALIB` - the name of the lua library. This is not available nor needed on all platforms. 22* `LUALIB` - the name of the Lua library. This is not available nor needed on all platforms.
23* `LUA` - the name of the lua interpreter 23* `LUA` - the name of the Lua interpreter
24* `LUA_VERSION` - the version of Lua
24 25
25For installing: 26For installing:
26 27
27* `PREFIX` - basic installation prefix for the module 28* `PREFIX` - basic installation prefix for the module
28* `BINDIR` - where to put user callable programs or scripts 29* `BINDIR` - where to put user callable programs or scripts
29* `LIBDIR` - where to put the shared libraries 30* `LIBDIR` - where to put the shared libraries implementing modules
30* `LUADIR` - where to put the lua files 31* `LUADIR` - where to put the Lua scripts implementing modules
31* `CONFDIR` - where to put your modules configuration 32* `CONFDIR` - where to put your modules configuration
32 33
33Most of these variables point immediately where you'd expect them to, but 34Most of these variables point immediately where you'd expect them to, but
diff --git a/docs/creating_a_rock.md b/docs/creating_a_rock.md
index 1d42b07f..a5441ea4 100644
--- a/docs/creating_a_rock.md
+++ b/docs/creating_a_rock.md
@@ -148,6 +148,14 @@ and `5.3`, but not yet-to-be-released `5.4`. There are a few other operators
148for specifying version constraints, see 148for specifying version constraints, see
149[Rockspec format](rockspec_format.md#dependency-information). 149[Rockspec format](rockspec_format.md#dependency-information).
150 150
151Rockspecs from [`rockspec_format = "3.1"`](rockspec_format.md#package-metadata)),
152have access to special variables with the path of the installed rocks of its
153dependencies. See the [section below](#including-documentation-and-other-files)
154for information on how rocks can include files in their installation. Each
155variable is the name of the dependency followed by the suffix `_ROCKDIR`. For
156the example above, variable `LUAKNIFE_ROCKDIR` will be provided with the path of
157the installed rock.
158
151#### C modules linking to external libraries 159#### C modules linking to external libraries
152 160
153*If your code does not use third-party libraries, you may skip this subsection.* 161*If your code does not use third-party libraries, you may skip this subsection.*
diff --git a/docs/download.md b/docs/download.md
index 9413ed10..b580ff8a 100644
--- a/docs/download.md
+++ b/docs/download.md
@@ -1,17 +1,11 @@
1# Download 1# Download
2 2
3# Downloading 3# Downloading
4 4
5Latest release: **LuaRocks 3.11.1** - '31/May/2024' 5* [Releases](https://luarocks.github.io/luarocks/releases/)
6* [Changelog](../CHANGELOG.md)
6 7
7* [Tarball for Unix](https://luarocks.org/releases/luarocks-3.11.1.tar.gz) 8# Installing
8* [Windows all-in-one executable (32-bit)](https://luarocks.org/releases/luarocks-3.11.1-windows-32.zip)
9* [Windows all-in-one executable (64-bit)](https://luarocks.org/releases/luarocks-3.11.1-windows-64.zip)
10* [other files](https://luarocks.github.io/luarocks/releases/)
11
12For release notes and older versions, see the [release history](release_history.md).
13
14# Installing
15 9
16* [Installation instructions for Unix](installation_instructions_for_unix.md) (Linux, BSDs, etc.) 10* [Installation instructions for Unix](installation_instructions_for_unix.md) (Linux, BSDs, etc.)
17* [Installation instructions for macOS](installation_instructions_for_macos.md) 11* [Installation instructions for macOS](installation_instructions_for_macos.md)
@@ -25,7 +19,7 @@ package already includes them and a binary of Lua, as a convenience.
25Once LuaRocks is installed, make sure to read the 19Once LuaRocks is installed, make sure to read the
26[Documentation](index.md) for more information! 20[Documentation](index.md) for more information!
27 21
28# The bleeding edge 22# The bleeding edge
29 23
30Development is done using Git. To get the latest development sources, run: 24Development is done using Git. To get the latest development sources, run:
31 25
diff --git a/docs/index.md b/docs/index.md
index 075593e7..f4d60b49 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -76,7 +76,7 @@
76 * [luarocks-admin refresh cache](luarocks_admin_refresh_cache.md) 76 * [luarocks-admin refresh cache](luarocks_admin_refresh_cache.md)
77 * [luarocks-admin remove](luarocks_admin_remove.md) 77 * [luarocks-admin remove](luarocks_admin_remove.md)
78 78
79 * [Release history](release_history.md) 79 * [Release history](../CHANGELOG.md)
80 80
81* [Credits](credits.md) 81* [Credits](credits.md)
82* [License](license.md) 82* [License](license.md)
diff --git a/docs/luarocks.md b/docs/luarocks.md
index 6338743b..99dff011 100644
--- a/docs/luarocks.md
+++ b/docs/luarocks.md
@@ -2,101 +2,66 @@
2 2
3**luarocks** is the command-line interface for LuaRocks, the Lua package manager. 3**luarocks** is the command-line interface for LuaRocks, the Lua package manager.
4 4
5# Usage 5## Usage
6 6
7``` 7```
8luarocks [--server=<server> | --only-server=<server>] [--tree=<tree>] [--only-sources=<url>] [--deps-mode=<mode>] [<VAR>=<VALUE>]... <command> [<argument>] 8luarocks [--server=<server> | --only-server=<server>] [--tree=<tree>] [--only-sources=<url>] [--deps-mode=<mode>] [<VAR>=<VALUE>]... <command> [<argument>]
9``` 9```
10 10
11Variables from the "variables" table of the [configuration file](config_file_format.md) can be overriden with VAR=VALUE assignments. 11Variables from the "variables" table of the [configuration file](config_file_format.md) can be overridden with `VAR=VALUE` assignments.
12 12
13{| 13### Options
14| --server=_server_ || Fetch rocks/rockspecs from this server (takes priority over config file)
15|-
16| --only-server=_server_ || Fetch rocks/rockspecs from this server only (overrides any entries in the config file)
17|-
18| --only-sources=_url_ || Restrict downloads of sources to URLs starting with the given URL. For example, --only-sources=https://luarocks.org will allow LuaRocks to download sources only if the URL given in the rockspec starts with https://luarocks.org .
19|-
20| --tree=_tree_ || Which tree to operate on.
21|-
22| --local || Use the tree in the user's home directory. To enable it, see `[luarocks path](luarocks_path.md)`
23|-
24| --deps-mode=_mode_ || Select dependencies mode:
25 14
26How to handle the list of rocks servers given in the rocks_servers array in the [config file](config_file_format.md). 15- `--server=<server>`: Fetch rocks/rockspecs from this server (takes priority over config file).
16- `--only-server=<server>`: Fetch rocks/rockspecs from this server only (overrides any entries in the config file).
17- `--only-sources=<url>`: Restrict downloads of sources to URLs starting with the given URL. For example, `--only-sources=https://luarocks.org` will allow LuaRocks to download sources only if the URL given in the rockspec starts with `https://luarocks.org`.
18- `--tree=<tree>`: Which tree to operate on.
19- `--local`: Use the tree in the user's home directory. To enable it, see [`luarocks path`](luarocks_path.md).
20- `--deps-mode=<mode>`: Select dependencies mode:
21 - **one**: Consider only the tree at the top of the list (possibly, the one given by the `--tree` flag, overriding all entries from `rocks_trees`).
22 - **all**: Consider all trees: if a dependency is installed in any tree of the `rocks_trees` list, we have a positive match.
23 - **order**: Consider only trees starting from the "current" one in the order, where the "current" is either:
24 - the one at the bottom of the `rocks_trees` list,
25 - or one explicitly given with `--tree`,
26 - or the "home" tree if `--local` was given or `local_by_default=true` is configured (usually at the top of the list).
27- `--verbose`: Display verbose output of commands executed.
28- `--timeout`: Timeout on network operations, in seconds. `0` means no timeout (wait forever). Default is `30`.
27 29
28* **one** - Consider only the tree at the top of the list (possibly, the one given by the --tree flag, overriding all entries from rocks_trees), ignore all others 30---
29* **all** - Consider all trees: if a dependency is installed in any tree of the rocks_trees list, we have a positive match.
30* **order** - Consider only trees starting from the "current" one in the order, where the "current" is either:
31 * the one at the bottom of the rocks_trees list,
32 * or one explicitly given with --tree
33 * or the "home" tree if --local was given or local_by_default=true is configured (usually at the top of the list)
34|-
35| --verbose || Display verbose output of commands executed.
36|-
37| --timeout || Timeout on network operations, in seconds. 0 means no timeout (wait forever). Default is 30.
38|}
39 31
40# Supported commands 32## Supported Commands
41 33
42{| 34- **[build](luarocks_build.md)**: Build/compile and install a rock.
43| [build](luarocks_build.md) || Build/compile and install a rock. 35- **[doc](luarocks_doc.md)**: Shows documentation for an installed rock.
44|- 36- **[download](luarocks_download.md)**: Download a specific rock or rockspec file from a rocks server.
45| [doc](luarocks_doc.md) || Shows documentation for an installed rock. 37- **[help](luarocks_help.md)**: Help on commands.
46|- 38- **[install](luarocks_install.md)**: Install a rock.
47| [download](luarocks_download.md)|| Download a specific rock or rockspec file from a rocks server. 39- **[lint](luarocks_lint.md)**: Check syntax of a rockspec.
48|- 40- **[list](luarocks_list.md)**: Lists currently installed rocks.
49| [help](luarocks_help.md) || Help on commands. 41- **[config](luarocks_config.md)**: Query and set the LuaRocks configuration.
50|- 42- **[make](luarocks_make.md)**: Compile package in the current directory using a rockspec and install it.
51| [install](luarocks_install.md) || Install a rock. 43- **[new_version](luarocks_new_version.md)**: Auto-write a rockspec for a new version of a rock.
52|- 44- **[pack](luarocks_pack.md)**: Create a rock, packing sources or binaries.
53| [lint](luarocks_lint.md) || Check syntax of a rockspec. 45- **[path](luarocks_path.md)**: Return the currently configured package path.
54|- 46- **[purge](luarocks_purge.md)**: Remove all installed rocks from a tree.
55| [list](luarocks_list.md) || Lists currently installed rocks. 47- **[remove](luarocks_remove.md)**: Uninstall a rock.
56|- 48- **[search](luarocks_search.md)**: Query the LuaRocks repositories.
57| [config](luarocks_config.md) || Query and set the LuaRocks configuration. 49- **[test](luarocks_test.md)**: Run the test suite in the current directory.
58|- 50- **[show](luarocks_show.md)**: Shows information about an installed rock.
59| [make](luarocks_make.md) || Compile package in current directory using a rockspec and install it. 51- **[unpack](luarocks_unpack.md)**: Unpack the contents of a rock.
60|- 52- **[upload](luarocks_upload.md)**: Upload a rockspec to the public rocks repository.
61| [new_version](luarocks_new_version.md) || Auto-write a rockspec for a new version of a rock. 53- **[write_rockspec](luarocks_write_rockspec.md)**: Write a template for a rockspec file.
62|-
63| [pack](luarocks_pack.md) || Create a rock, packing sources or binaries.
64|-
65| [path](luarocks_path.md) || Return the currently configured package path.
66|-
67| [purge](luarocks_purge.md) || Remove all installed rocks from a tree.
68|-
69| [remove](luarocks_remove.md) || Uninstall a rock.
70|-
71| [search](luarocks_search.md) || Query the LuaRocks repositories.
72|-
73| [test](luarocks_test.md) || Run the test suite in the current directory.
74|-
75| [show](luarocks_show.md) || Shows information about an installed rock.
76|-
77| [unpack](luarocks_unpack.md) || Unpack the contents of a rock.
78|-
79| [upload](luarocks_upload.md) || Upload a rockspec to the public rocks repository.
80|-
81| [write_rockspec](luarocks_write_rockspec.md) || Write a template for a rockspec file.
82|}
83 54
84# Overview of the difference between "make", "build", "install" and "pack" 55---
85
86{|
87| luarocks install modulename || downloads a binary .rock file and installs it to the local tree (falls back to "luarocks build modulename" behavior if a binary rock is not found)
88|-
89| luarocks build modulename || downloads a .src.rock or a rockspec and builds+installs it to the local tree.
90|-
91| luarocks build modulename-1.0-1.linux-x86.rock || extracts the rockspec from the rock and builds it as if the rockspec was passed in the command-line (i.e., redownloading sources and recompiling C modules if any).
92|-
93| luarocks build modulename-1.0-1.rockspec || builds+installs the rock using the given rockspec downloading the sources
94|-
95| luarocks make modulename-1.0-1.rockspec || builds+installs the rock using the rockspec using the contents of your current directory (kind of like the way make uses a Makefile) instead of downloading sources
96|-
97| luarocks pack modulename || grabs the rock from your local tree and packs it into a binary .rock file
98|-
99| luarocks pack modulename-1.0-1.rockspec || downloads the sources from the url and packs it into a .src.rock file
100|}
101 56
57## Overview of the Difference Between `make`, `build`, `install`, and `pack`
102 58
59| Command | Description |
60|-------------------------------------------|-------------------------------------------------------------------------------------------------|
61| `luarocks install modulename` | Downloads a binary `.rock` file and installs it to the local tree (falls back to `luarocks build modulename` behavior if a binary rock is not found). |
62| `luarocks build modulename` | Downloads a `.src.rock` or a rockspec and builds+installs it to the local tree. |
63| `luarocks build modulename-1.0-1.linux-x86.rock` | Extracts the rockspec from the rock and builds it as if the rockspec was passed in the command-line (i.e., redownloading sources and recompiling C modules if any). |
64| `luarocks build modulename-1.0-1.rockspec` | Builds+installs the rock using the given rockspec, downloading the sources. |
65| `luarocks make modulename-1.0-1.rockspec` | Builds+installs the rock using the rockspec and the contents of your current directory (kind of like the way `make` uses a Makefile) instead of downloading sources. |
66| `luarocks pack modulename` | Grabs the rock from your local tree and packs it into a binary `.rock` file. |
67| `luarocks pack modulename-1.0-1.rockspec` | Downloads the sources from the URL and packs it into a `.src.rock` file. |
diff --git a/docs/release_history.md b/docs/release_history.md
deleted file mode 100644
index 52c61893..00000000
--- a/docs/release_history.md
+++ /dev/null
@@ -1,597 +0,0 @@
1# Release history
2
3**Version 3.11.1** - 31/May/2024 - [Source tarball for Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.11.1.tar.gz) -
4[Windows binary (32-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.11.1-windows-32.zip) -
5[Windows binary (64-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.11.1-windows-64.zip) -
6[Linux binary (x86_64)](https://luarocks.github.io/luarocks/releases/luarocks-3.11.1-linux-x86_64.zip) -
7[other files](https://luarocks.github.io/luarocks/releases/)
8
9**Version 3.11.0** - 13/Mar/2024 - [Source tarball for Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.11.0.tar.gz) -
10[Windows binary (32-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.11.0-windows-32.zip) -
11[Windows binary (64-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.11.0-windows-64.zip) -
12[Linux binary (x86_64)](https://luarocks.github.io/luarocks/releases/luarocks-3.11.0-linux-x86_64.zip) -
13[other files](https://luarocks.github.io/luarocks/releases/)
14
15**Version 3.10.0** - 27/Feb/2024 - [Source tarball for Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.10.0.tar.gz) -
16[Windows binary (32-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.10.0-windows-32.zip) -
17[Windows binary (64-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.10.0-windows-64.zip) -
18[Linux binary (x86_64)](https://luarocks.github.io/luarocks/releases/luarocks-3.10.0-linux-x86_64.zip) -
19[other files](https://luarocks.github.io/luarocks/releases/)
20
21**Version 3.9.2** - 08/Dec/2022 - [Source tarball for Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.9.2.tar.gz) -
22[Windows binary (32-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.9.2-windows-32.zip) -
23[Windows binary (64-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.9.2-windows-64.zip) -
24[Linux binary (x86_64)](https://luarocks.github.io/luarocks/releases/luarocks-3.9.2-linux-x86_64.zip) -
25[other files](https://luarocks.github.io/luarocks/releases/)
26
27**Version 3.9.1** - 01/Jul/2022 - [Source tarball for Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.9.1.tar.gz) -
28[Windows binary (32-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.9.1-windows-32.zip) -
29[Windows binary (64-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.9.1-windows-64.zip) -
30[Linux binary (x86_64)](https://luarocks.github.io/luarocks/releases/luarocks-3.9.1-linux-x86_64.zip) -
31[other files](https://luarocks.github.io/luarocks/releases/)
32
33**Version 3.9.0** - 17/Apr/2022 - [Source tarball for Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.9.0.tar.gz) -
34[Windows binary (32-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.9.0-windows-32.zip) -
35[Windows binary (64-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.9.0-windows-64.zip) -
36[Linux binary (x86_64)](https://luarocks.github.io/luarocks/releases/luarocks-3.9.0-linux-x86_64.zip) -
37[other files](https://luarocks.github.io/luarocks/releases/)
38
39* `builtin` build mode now always respects CC, CFLAGS and LDFLAGS
40* Check that lua.h version matches the desired Lua version
41* Check that the version of the Lua C library matches the desired Lua version
42* Fixed deployment of non-wrapped binaries
43* Fixed crash when `--lua-version` option is malformed
44* Fixed help message for `--pin` option
45* Unix: use native methods and don't always rely on $USER to determine user
46* Windows: use native CLI tooling more
47* macOS: support .tbd extension when checking for libraries
48* macOS: add XCode SDK path to search paths
49* macOS: add best-effort heuristic for library search using Homebrew paths
50* macOS: avoid quoting issues with LIBFLAG
51* macOS: deployment target is now 11.0 on macOS 11+
52* added DragonFly BSD support
53* LuaRocks test suite now runs on Lua 5.4 and LuaJIT
54* Internal dependencies of standalone LuaRocks executable were bumped
55
56**Version 3.8.0** - 08/Nov/2021 - [Source tarball for Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.8.0.tar.gz) -
57[Windows binary (32-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.8.0-windows-32.zip) -
58[Windows binary (64-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.8.0-windows-64.zip) -
59[Linux binary (x86_64)](https://luarocks.github.io/luarocks/releases/luarocks-3.8.0-linux-x86_64.zip) -
60[other files](https://luarocks.github.io/luarocks/releases/)
61
62**Version 3.7.0** - 13/Apr/2021 - [Source tarball for Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.7.0.tar.gz) -
63[Windows binary (32-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.7.0-windows-32.zip) -
64[Windows binary (64-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.7.0-windows-64.zip) -
65[Linux binary (x86_64)](https://luarocks.github.io/luarocks/releases/luarocks-3.7.0-linux-x86_64.zip) -
66[other files](https://luarocks.github.io/luarocks/releases/)
67
68**Version 3.6.0** - 30/Mar/2021 - [Source tarball for Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.6.0.tar.gz) -
69[Windows binary (32-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.6.0-windows-32.zip) -
70[Windows binary (64-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.6.0-windows-64.zip) -
71[Linux binary (x86_64)](https://luarocks.github.io/luarocks/releases/luarocks-3.6.0-linux-x86_64.zip) -
72[other files](https://luarocks.github.io/luarocks/releases/)
73
74**Version 3.5.0** - 10/Dec/2020 - [Source tarball for Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.5.0.tar.gz) -
75[Windows binary (32-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.5.0-windows-32.zip) -
76[Windows binary (64-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.5.0-windows-64.zip) -
77[Linux binary (x86_64)](https://luarocks.github.io/luarocks/releases/luarocks-3.5.0-linux-x86_64.zip) -
78[other files](https://luarocks.github.io/luarocks/releases/)
79
80**Version 3.4.0** - 25/Sep/2020 - [Source tarball for Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.4.0.tar.gz) -
81[Windows binary (32-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.4.0-windows-32.zip) -
82[Windows binary (64-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.4.0-windows-64.zip) -
83[Linux binary (x86_64)](https://luarocks.github.io/luarocks/releases/luarocks-3.4.0-linux-x86_64.zip) -
84[other files](https://luarocks.github.io/luarocks/releases/)
85
86* `luarocks make` now supports `--only-deps`
87* `luarocks make` new flag: `--no-install`, which only performs the compilation step
88* `--deps-only` is now an alias for `--only-deps` (useful in case you always kept getting it wrong, like me!)
89* `luarocks build` and `luarocks make` now support using `--pin` and `--only-deps` at the same time, to produce a lock file of dependencies in use without installing the main package.
90* `luarocks show` can now accept a substring of the rock's name, like `list`.
91* `luarocks config`: when running without system-wide permissions, try storing the config locally by default. Also, if setting both lua_dir and --lua-version explicitly, auto-switch the default Lua version.
92* `luarocks` with no arguments now prints more info about the location of the Lua interpreter which is being used
93* `luarocks new_version` now keeps the old URL if the MD5 doesn't change.
94* `DEPS_DIR` is now accepted as a generic variable for dependency directories (e.g. `luarocks install foo DEPS_DIR=/usr/local`)
95* Handle quoting of arguments at the application level, for improved Windows support
96* All-in-one binary bundles `dkjson`, so it runs `luarocks upload` without requiring any additional dependencies.
97* Tweaks for Terra compatibility
98* win32: generate proper temp filename
99* No longer assume that Lua 5.3 is built with compat libraries and bundles `bit32`
100* `luarocks show`: do not crash when rockspec description is empty
101* When detecting the location of `lua.h`, check that its version matches the version of Lua being used
102* Fail gracefully when a third-party tool (wget, etc.) is missing
103* Fix logic for disabling mirrors that return network errors
104* Fix detection of Lua path based on arg variable
105* Fix regression on dependency matching of luarocks.loader
106
107**Version 3.3.1** - 07/Feb/2020 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.3.1.tar.gz) -
108[Windows all-in-one executable (32-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.3.1-windows-32.zip) -
109[Windows all-in-one executable (64-bit)](https://luarocks.github.io/luarocks/releases/luarocks-3.3.1-windows-64.zip) -
110[other files](https://luarocks.github.io/luarocks/releases/)
111
112* Fix downgrades of rocks containing directories: stop it from creating spurious 0-byte files where directories have been
113* Fix error message when attempting to copy a file that is missing
114* Detect OpenBSD-specific dependency paths
115
116**Version 3.3.0** - 28/Jan/2020 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.3.0.tar.gz) -
117[Windows all-in-one executable](https://luarocks.github.io/luarocks/releases/luarocks-3.3.0-windows-32.zip) -
118[other files](https://luarocks.github.io/luarocks/releases/)
119
120**Version 3.2.1** - 05/Sep/2019 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.2.1.tar.gz) -
121[Windows all-in-one executable](https://luarocks.github.io/luarocks/releases/luarocks-3.2.1-windows-32.zip) -
122[other files](https://luarocks.github.io/luarocks/releases/)
123
124**Version 3.2.0** - 28/Aug/2019 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.2.0.tar.gz) -
125[Windows all-in-one executable](https://luarocks.github.io/luarocks/releases/luarocks-3.2.0-windows-32.zip) - [other files](https://luarocks.github.io/luarocks/releases)
126
127* Bugfix: luarocks path does not change the order of pre-existing path items when prepending or appending to path variables
128* Bugfix: fix directory detection on the Mac
129* When building with --force-config, LuaRocks now never uses the "project" directory, but only the forced configuration
130* Lua libdir is now only checked for commands/platforms that really need to link Lua explicitly
131* LuaJIT is now detected dynamically
132* RaptorJIT is now detected as a LuaJIT variant
133* Improvements in Lua autodetection at runtime
134* luarocks new_version: new option --dir
135* luarocks which: report modules found via package.path and package.cpath as well
136* install.bat: Improved detection for Visual Studio 2017 and higher
137* Bundled LuaSec in all-in-one binary bumped to version 0.8.1
138
139**Version 3.1.3** - 06/Jun/2019 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.1.3.tar.gz) -
140[Windows all-in-one executable](https://luarocks.github.io/luarocks/releases/luarocks-3.1.3-windows-32.zip)
141
142**Version 3.1.2** - 07/May/2019 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.1.2.tar.gz) -
143[Windows all-in-one executable](https://luarocks.github.io/luarocks/releases/luarocks-3.1.2-windows-32.zip)
144
145**Version 3.1.1** - 06/May/2019 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.1.1.tar.gz) -
146[Windows all-in-one executable](https://luarocks.github.io/luarocks/releases/luarocks-3.1.1-windows-32.zip)
147
148**Version 3.1.0** - 30/Apr/2019 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.1.0.tar.gz) -
149[Windows all-in-one executable](https://luarocks.github.io/luarocks/releases/luarocks-3.1.0-windows-32.zip)
150
151* config: add git-like modes for setting and inspecting configuration
152* make: run rockspec patches on first `luarocks make` run and use a lockfile to avoid double patching
153* persist selected Lua version when setting `luarocks config lua_version 5.x`
154* new flag --global for overriding local_by_default = true
155* do not complain if home cache cannot be created (use temp dir instead)
156* caching improvements for increased performance
157* project-based workflow: if ./.luarocks/config-5.x.lua exists, assume Lua 5.x
158* install, pack, build, make: new flags --sign and --verify (using GPG)
159* install: new flag --no-doc
160* Improve Lua paths auto-detection
161* Various bugfixes
162
163**Version 3.0.4** - 30/Oct/2018 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.0.4.tar.gz) -
164[Windows all-in-one executable](https://luarocks.github.io/luarocks/releases/luarocks-3.0.4-windows-32.zip)
165
166* Fork-free platform detection at startup
167* Improved detection of the default rockspec in commands such as `luarocks test`
168* Various minor bugfixes
169
170**Version 3.0.3** - 15/Sep/2018 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.0.3.tar.gz) -
171[Windows all-in-one executable](https://luarocks.github.io/luarocks/releases/luarocks-3.0.3-windows-32.zip)
172
173* Minor bugfixes
174
175**Version 3.0.2** - 07/Sep/2018 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.0.2.tar.gz) -
176[Windows all-in-one executable](https://luarocks.github.io/luarocks/releases/luarocks-3.0.2-windows-32.zip)
177
178* Improvements in luarocks init, new --reset flag
179* write_rockspec: --lua-version renamed to --lua-versions
180* Improved behavior in module autodetection
181* Bugfixes in luarocks show
182* Fix upgrade/downgrade when a single rock has clashing module filenames
183* Fix for autodetected external dependencies with non-alphabetic characters
184
185**Version 3.0.1** - 14/Aug/2018 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.0.1.tar.gz) -
186[Windows all-in-one executable](https://luarocks.github.io/luarocks/releases/luarocks-3.0.1-windows-32.zip)
187
188* Numerous bugfixes
189* Store Lua location in config file, so that a user can run `luarocks init --lua-dir=/my/lua/location` and have that location remain active for that project
190* Various improvements to the Unix makefile, including $(DESTDIR) support and an uninstall rule
191* Autodetect FreeBSD-style include paths (/usr/include/lua5x/)
192
193**Version 3.0.0** - 25/Jul/2018 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-3.0.0.tar.gz) -
194[Windows batch installer](https://luarocks.github.io/luarocks/releases/luarocks-3.0.0-win32.zip)
195
196* New rockspec format
197* New commands, including `luarocks init` for per-project workflows
198* New flags, including `--lua-dir` and `--lua-version` for using multiple Lua installs with a single LuaRocks
199* New build system, gearing towards a new distribution model
200* General improvements, including namespaces
201* User-visible changes, including some breaking changes
202* Internal changes
203
204**Version 2.4.4** - 12/Mar/2018 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.4.4.tar.gz) -
205[Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.4.4-win32.zip)
206
207* Do not halt a package deletion process when a file from the package is missing
208* Updated bundled binaries in Windows package: Lua 5.1.5, Wget 1.19.4, 7zip 18.01
209* Updated Windows installer to better handle gcc toolchains
210* Fix detection of directories on Windows
211* Fixes .def generation on Windows
212
213**Version 2.4.3** - 12/Sep/2017 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.4.3.tar.gz) -
214[Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.4.3-win32.zip)
215
216* Fixed display of pathnames in `luarocks show`
217* Improved check for write permissions when installing
218* Plus assorted bugfixes and improvements
219
220**Version 2.4.2** - 30/Nov/2016 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.4.2.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.4.2-win32.zip)
221
222* Fixed conflict resolution on deploy/delete
223* Improved dependency check messages
224* Performance improvements when removing packages
225* Support user-defined `platforms` array in config file
226* Improvements in Lua interpreter version detection in Unix configure script
227* Relaxed Lua version detection to improve support for alternative implementations (e.g. Ravi)
228* Plus assorted bugfixes and improvements
229
230**Version 2.4.1** - 06/Oct/2016 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.4.1.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.4.1-win32.zip)
231
232* Avoid coroutine use in luarocks.loader
233* Fix upgrade issues for very old versions
234
235**Version 2.4.0** - 08/Sep/2016 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.4.0.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.4.0-win32.zip)
236
237* New test suite based on Busted; runs on Linux, OSX and Windows
238* git+ssh:// fetch protocol
239* Improved behavior preserving permissions
240* Improved listing of dependencies on installation
241* Improved behavior of argument handling in `pack`
242* MSYS and Haiku platform detection
243* Feature-based detection of internal bit32 and utf8 modules
244* Internal reorganization of luarocks.fs code
245* `remove` option --force=fast renamed to --force-fast
246* Plus assorted bugfixes and cleanups
247
248**Version 2.3.0** - 09/Jan/2016 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.3.0.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.3.0-win32.zip)
249
250* Windows: major redesign of the install tree structure
251* Windows: Auto setup of MSVC environments
252* Improve error messages when tools are not installed
253* CMake: generate 64-bit builds when appropriate
254* Improve check of location of config files
255* MacOSX: set MACOSX_DEPLOYMENT_TARGET using env
256* Remove --extensions flag; use rockspec_format instead
257* New `luarocks config` command to query configuration
258* Improved UI for messages when external deps are missing
259* Unix: Robustness improvement in configure script
260* Plus tweaks and bugfixes. See the changelog for details.
261
262**Version 2.2.2** - 24/Apr/2015 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.2.2.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.2.2-win32.zip)
263
264* `luarocks build --only-deps` and `luarocks install --only-deps` for installing dependencies only
265* Mercurial support
266* Improved command-line argument parser, now validates arguments (it previously ignored unrecognized arguments) and accepts both `--flag=option` and `--flag option` in flags that take arguments.
267* For consistency with `luarocks show`, `luarocks doc --homepage` is now `luarocks doc --home`
268* Improvements to CMake build backend
269* Improved Makefiles for handling simultaneous bootstrapped installations
270* Various bugfixes
271
272**Version 2.2.1** - 17/Mar/2015 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.2.1.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.2.1-win32.zip)
273
274* Improved compatibility with Lua 5.3
275* `luarocks list --outdated` for listing modules with available upgrades
276* Assorted bugfixes
277
278**Version 2.2.0** - 15/Aug/2014 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.2.0.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.2.0-win32.zip)
279
280* MoonRocks is the new default repository: http://rocks.moonscript.org - Rocks don't need to be sent to the LuaRocks mailing list anymore, you can upload them directly at the website or using...
281* ...`luarocks upload` command for uploading rocks to MoonRocks via the command-line
282* Preliminary support for Lua 5.3
283* No longer uses the module() function, for Lua 5.2 installations built without Lua 5.1 compatibility
284* --branch flag for `luarocks build` and `luarocks make`
285* various improvements in `luarocks doc` command
286* "git+http" transport for source.url
287
288**Version 2.1.2** - 10/Jan/2014 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.1.2.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.1.2-win32.zip)
289
290* major improvements in the Windows install.bat script. Now installs by default on standard Windows locations, while the old self-contained all-under-one-dir installation is still supported through an option flag. The documentation at luarocks.org didn't catch up with it yet, so please refer to "install /?" for instructions.
291* a new command, "luarocks doc <module>" that tries to find any installed documentation. Due to the lack of documentation standards for Lua, this uses a few heuristics. Feedback on the feature is appreciated.
292* a rocks_provided configuration entry in which you can preload dependencies that are already fulfulled in your system; a few defaults are included (bit32 is auto-provided in Lua 5.2; luabitop is auto-provided in LuaJIT)
293* generated script wrappers are now more robust
294* Graceful handling of permission errors on Windows
295* Minor performance improvements
296* Support for "named trees", so you can label your rocks trees and use flags such as --tree=system or --tree=user instead of the full path
297* "luarocks" with no arguments presents more useful diagnostics
298* Improved Lua detection in Unix installer
299* plus assorted bugfixes
300
301**Version 2.1.1** - 29/Oct/2013 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.1.1.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.1.1-win32.zip)
302
303* Remote manifests are now compressed and locally cached, making commands faster
304* New command "write_rockspec" which generates rockspec file templates
305* detection of multiarch directories on Linux
306* environment and performance improvements on Windows
307* New --force=fast option for 'luarocks remove'
308* New --local-tree flag for 'luarocks-admin make-manifest'
309* Improved error checking
310* plus assorted bugfixes
311
312**Version 2.1.0** - 09/Aug/2013 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.1.0.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.1.0-win32.zip)
313
314* accesses manifest-{5.1,5.2} in remote servers to provide properly filtered results for Lua 5.1 or 5.2
315* Remove old versions when installing a new one and old versions are no longer needed to honor dependencies.
316* 'make bootstrap' is now an advertised option for installing LuaRocks itself as a rock on Unix systems
317* 'luarocks purge --old-versions' for cleaning up a local tree
318* --keep flag to produce the old behavior of keeping old versions around (can be made permanent setting keep_old_versions=true in the config file)
319* security config options 'accepted_build_types' and 'hooks_enabled'
320* 'lua_version' is now available as a global for your config.lua
321* new flags --lr-path, --lr-cpath, --lr-bin for 'luarocks path' for use in scripts
322* friendlier error messages
323* plus bugfixes
324
325**Version 2.0.13** - 16/Apr/2013 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.13.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.13-win32.zip)
326
327* Support for Lua 5.2 is no longer marked as experimental
328* Support for installing two instances of LuaRocks, for Lua 5.1 and 5.2, in parallel
329* Improvements for the 'builtin' build mode on Windows
330* rclauncher on Windows does not rely on a precompiled object anymore
331* Improvements for the Windows installer, including optional registry entries for context-menu operations
332* Improvements in 'luarocks new_version` command for autogenerating updated rockspecs
333* 'luarocks remove' command accepts rock and rockspec filenames
334
335**Version 2.0.12** - 05/Nov/2012 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.12.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.12-win32.zip)
336
337* "Dependencies mode" selection to configure how to work with multiple local trees
338* New command "purge" that erases a local tree
339* --porcelain flag for "list" and "search"
340* More consistent user-agent reporting
341* Code cleanups, removal of dead code
342* Fixes regressions on Mac and Windows
343
344**Version 2.0.11** - 21/Sep/2012 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.11.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.11-win32.zip)
345
346* Work around LuaSocket crash when given proxy URLs without the scheme part
347* Save manifest file in a single fs operation to make it more atomic
348* Fix tree loading order on luarocks.loader with multiple trees
349* Fix detection of write permissions
350* Improve dependency detection using configurable patterns, now a file like "libfoo.so.1" satisfies "libfoo.so"
351* --bin flag for "luarocks path" command, exports $PATH
352* Support for mirrors in the rocks_servers list, default list of mirrors included
353* Avoid using Lua modules internally on Windows, to avoid file system locking
354* Add NetBSD support
355* Rename luarocks.rep to luarocks.repos
356* Fail gracefully on the absence of cmake, on cmake build mode
357* New command "lint", to check the syntax of a rockspec
358* Fix builtin build mode on Mac OSX < 10.5
359* Improve configure tests for Debian-based platforms
360
361**Version 2.0.10** - 12/Jul/2012 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.10.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.10-win32.zip)
362
363* Fix fetching Git tags/branches
364* Fix strictness issue with parameter of io.open
365* Builtin mode sets rpath when compiling on Unix
366* Use full path in $(LUA) when configured with --with-lua
367* Cleanup of .svn dir in svn-based rocks
368* Improvement for 'make bootstrap'
369
370**Version 2.0.9** - 31/May/2012 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.9.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.9-win32.zip)
371
372* Experimental support for Lua 5.2 (auto-detection and explicit --lua-version flag in configure)
373* Solaris support and BSD fixes
374* --nodeps flag for forced installation without dependencies
375* "new_version" command to streamline writing of updated rockspecs
376* Improved handling of LUAROCKS_SYSCONFIG variable
377* Clickable URLs in descriptions in rocks repo index.html
378* Nicer-looking persisted tables
379* Assorted bugfixes
380
381**Version 2.0.8** - 29/Feb/2012 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.8.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.8-win32.zip)
382
383* Fix in CMake build backend
384* Fix handling error condition of --pack-binary-rock
385* Fixes for Windows .bat installer
386* Improved arch detection when packing binary rocks
387* Workaround LuaPosix 5.1.15 problem with chmod()
388* Proper error messages when config files are invalid
389* Avoid checking permissions when it's not necessary
390* Fix behavior of 'builtin' rocks which install init.lua scripts
391* git+file:// pseudoprotocol for local Git repos
392* New binaries from GnuWin32 shipped in Win32 zip
393* Nicer-looking help
394
395**Version 2.0.7.1** - 10/Jan/2012 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.7.1.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.7.1-win32.zip)
396
397* Fix installation of files in build operation
398* Deprecate --to and --from, use --server and --tree instead
399* Improved documentation, thanks to LDoc
400
401**Version 2.0.7** - 10/Dec/2011 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.7.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.7-win32.zip)
402
403* Quieter git checkout
404* --only-sources flag to restrict download of sources from a single domain
405* Copy entries to bin/ with proper permissions
406* Fix --pack-binary-rock and add support for it in "luarocks make" as well
407* Isolate references to "5.1" to luarocks.cfg module
408* More logical names for flags: --tree, --server
409* Improved documentation
410
411**Version 2.0.6** - 04/Oct/2011 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.6.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.6-win32.zip)
412
413* Fixes for rockspecs missing 'description' or the contents of 'source.url'
414* Escape fixes for LuaJIT/Metalua
415* Support for building a rock without installing it
416* Site-local configuration is now at luarocks.site_config
417* Support for Mercurial
418* Flag for experimental extensions
419* Plus assorted bugfixes
420
421**Version 2.0.5** - 17/Aug/2011 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.5.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.5-win32.zip)
422
423* External commands are overridable through variables or config.lua
424* No longer uses print() - output goes to stdout, errors to stderr
425* Handle redirects between http (LuaSocket) and https (LuaSec)
426* Avoid relying on the $PWD variable
427* Code cleanups
428
429**Version 2.0.4.1** - 17/Jan/2011 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.4.1.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.4.1-win32.zip)
430
431* Minor bugfix release
432
433**Version 2.0.4** - 23/Dec/2010 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.4.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.4-win32.zip)
434
435* Command "remove" for luarocks-admin
436* Check for write permissions in repository and suggest --local
437* Remove .git from source tree when downloading from Git
438* Display of external dependencies in index.html
439* OpenBSD support
440* More thorough search for external libraries
441* Normalize paths to fix behavior when LFS is used under Windows
442* Add HTTPS support using LuaSec when using LuaSocket, for consistency
443* Better propagation of error messages
444* Stable sort of persisted files such as manifests
445* Plus assorted bugfixes
446
447**Version 2.0.3** - 14/Sep/2010 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.3.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.3-win32.zip)
448
449* Check for permissions and warn user instead of just installing in local tree
450* --local flag for operations on the local tree
451* -fPIC is always set in CFLAGS exported to makefiles
452* respect permissions when copying files in Unix systems
453* display license after build/installation
454* svn:// protocol for scm rockspecs
455* "luarocks list" and "luarocks search" are now case-insensitive
456* "luarocks-admin add" supports adding multiple files at once
457* "luarocks-admin add" supports rsync for download and upload and scp for upload
458* new command: "luarocks show" displays information about an installed rock
459* new command: "luarocks path" to make it easy to export Lua env variables
460* plus assorted bugfixes
461
462**Version 2.0.2** - 01/Apr/2010 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.2.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.2-win32.zip)
463
464* use LuaSocket if available for downloading files
465* use LuaZip if available for unzipping files
466* MinGW support in builtin build backend
467* updated installation files for Windows, including a LuaForWindows-compatible package
468
469**Version 2.0.1** - 27/Oct/2009 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.1.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0.1-win32.zip)
470
471* luarocks.cfg is no longer edited during installation; a separate site-local luarocks.config module is created.
472* robustness fixes and improvements for luarocks.add
473* cleanup of configure options and references to the old LuaForge URLs
474* install LuaRocks as a rock
475* plus assorted bugfixes
476
477**Version 2.0** - 17/Oct/2009 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-2.0.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-2.0-win32.zip)
478
479* module files are now deployed to standard Lua-style paths
480* new package loader module luarocks.loader, superseding the require()-override module luarocks.require
481* new abstraction system for file system operations: the OS-specific back-ends for luarocks.fs were split between native-Lua and tool-based implementations
482* new format for local manifest
483* new command for luarocks: "download", to fetch .rock and .rockspec files
484* new commands for luarocks-admin: "add", to upload rocks to a repository, and "refresh_cache", to refresh the cache used by the "add" command
485* plus a number of cleanups and bugfixes
486
487**Version 1.0.1** - 13/Mar/2009 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-1.0.1.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-1.0.1-win32.zip)
488
489* Improve portability in usage of Unix tools
490* Allow use of local rocks servers in the --from flag
491* Improve detection of external libraries on Mac OSX
492* Fix build of the 'builtin' backend under Windows
493* Support for the 'md5' binary as a MD5 checker
494
495**Version 1.0** - 01/Sep/2008 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-1.0.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-1.0-win32.zip)
496
497* Add support for post-install hooks
498* Path helper scripts for binaries on Windows systems.
499* Git support, contributed by Thomas Harning.
500* Improve shell compatibility for different Unix systems.
501* Add the @ operator for no-upgrade dependencies.
502* Add check for rockspec version format.
503* Generate index.html when building a manifest for a repository.
504* Plus assorted bugfixes.
505
506**Version 0.6** - 30/Jun/2008 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.6.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-0.6-win32.zip)
507
508* Check external deps on binary installs. Allow rockspecs to specify supported platforms. Support platform-agnostic specification of external deps files. Allow overriding external deps subdirs.
509* Structured build systems in subdirectories.
510* Smarter check to decide if a rock is pure Lua or not, also checking bin/
511* Restructuring of fs code.
512* Modularized fetch code to support multiple SCMs.
513* Added specific support for 'doc' directory in rockspecs. Auto-install files in 'lua' in builtin builds.
514* Support for Surround SCM, contributed by Ignacio Burgueño.
515* "module" build type renamed to "builtin"; "cvs_tag" and "cvs_module" renamed to "tag" and "module". Old names still supported for compatibility for now, to be cleaned up by 1.0.
516* Plus many bugfixes.
517
518**Version 0.5.2** - 13/May/2008 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.5.2.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-0.5.2-win32.zip)
519
520* Fixes problems with removal of read-only files on Windows
521* Fixes issues with external libraries on the 'module' build type on Windows
522* Fixes the --only-from flag
523* Renames the luarocks.config module to luarocks.cfg avoiding conflict's with the user configuration file config.lua
524
525**Version 0.5.1** - 25/Apr/2008 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.5.1.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-0.5.1-win32.zip)
526
527* Added function get_rock_from_module in luarocks.require, allowing apps to inspect which rock they're getting modules from.
528* Added variables LUA, LIB_EXTENSION and OBJ_EXTENSION, now available for rockspec authors.
529* Assorted bugfixes, especially for the Windows package.
530* Build system improvements: add DESTDIR variable to makefile to make things easier for distros packaging LuaRocks.
531
532**Version 0.5** - 03/Apr/2008 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.5.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-0.5-win32.zip)
533
534* New flags in the ./configure on Unix (see configure --help) and install.bat on Windows (see install.bat /?)
535* Support for multiple local repositories. By extension, LuaRocks features more intuitive configuration defaults (it installs rocks to $PREFIX/lib/luarocks if you have the permission, and to $HOME/.luarocks if you don't).
536* Flags --from=_server_, --only-from=_server_ and --to=_tree_, to allow specifying exactly where to get rocks from and where to install them to.
537* The manifest file now stores dependency info -- luarocks.require no longer scans rockspec files.
538* 'unpack' command allows unpacking binary and pure-Lua rocks, for inspecting.
539* Plus assorted bugfixes.
540
541**Version 0.4.3** - 03/Mar/2008 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.4.3.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-0.4.3-win32.zip)
542
543* The MD5 check feature added in 0.4.2 can now use openssl instead of md5sum (making LuaRocks friendlier to OSX).
544* Added a license file in the tarball (making LuaRocks friendlier to Debian).
545* Plus assorted bugfixes.
546
547**Version 0.4.2** - 09/Feb/2008 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.4.2.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-0.4.2-win32.zip)
548
549* Support .lua files directly in the URL field.
550* Perform check of MD5 checksum in sources.
551* Accept plain strings in all fields of the source table of the "module" build type.
552* Bugfixes.
553
554**Version 0.4.1** - 25/Jan/2008 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.4.1.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-0.4.1-win32.zip)
555
556* New configure/install.bat flags for setting scripts dir and local repository dir.
557* "unpack" command now supports rockspec files as well.
558* Complete code documentation.
559* Many assorted bugfixes.
560
561**Version 0.4** - 18/Jan/2008 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.4.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-0.4-win32.zip)
562
563* Adds the "unpack" command for debugging rocks (.src.rock only at this point).
564* Support curl as an alternative downloader for OSX, removing the dependency on wget.
565* Support for installing non-Lua entries in bin/ dirs.
566* Support for specifying libdirs, incdirs, libraries and defines in "module"-type builds.
567* x86_64 support, by Brian Hetro.
568* FreeBSD support, by Matthew M. Burke.
569* Performance improvements.
570* Many assorted bugfixes.
571
572**Version 0.3.2** - 21/Dec/2007 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.3.2.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-0.3.2-win32.zip)
573
574* Support for patching and inclusion of extra files (such as Makefiles) through a rockspec.
575* Support "platforms" overrides table for dependencies, external dependencies and source URLs.
576* Many assorted bugfixes.
577
578**Version 0.3.1** - 18/Dec/2007 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.3.1.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-0.3.1-win32.zip)
579
580* Improved search: results now feature separate lists for source and binary rocks.
581* Windows support for the "module" build type (using Visual Studio).
582* Many assorted bugfixes.
583
584**Version 0.3** - 04/Dec/2007 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.3.tar.gz) - [Windows](https://luarocks.github.io/luarocks/releases/luarocks-0.3-win32.zip)
585
586* Includes Windows package.
587* Adds the "module" build type.
588* Performance improvements.
589
590**Version 0.2** - 23/Oct/2007 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.2.tar.gz)
591
592* Bugfixes and improvements to build infrastructure.
593* Adds the LuaRocks "remove" command.
594
595**Version 0.1** - 09/Aug/2007 - [All Unix](https://luarocks.github.io/luarocks/releases/luarocks-0.1.tar.gz)
596
597* Initial release.
diff --git a/install.bat b/install.bat
index 07b06d61..6dd71125 100644
--- a/install.bat
+++ b/install.bat
@@ -6,7 +6,7 @@ local vars = {}
6 6
7 7
8vars.PREFIX = nil 8vars.PREFIX = nil
9vars.VERSION = "3.0" 9vars.VERSION = "3.12"
10vars.SYSCONFDIR = nil 10vars.SYSCONFDIR = nil
11vars.CONFBACKUPDIR = nil 11vars.CONFBACKUPDIR = nil
12vars.SYSCONFFILENAME = nil 12vars.SYSCONFFILENAME = nil
diff --git a/luarocks-dev-1.rockspec b/luarocks-3.12.2-1.rockspec
index 677b07cf..728854cb 100644
--- a/luarocks-dev-1.rockspec
+++ b/luarocks-3.12.2-1.rockspec
@@ -1,8 +1,9 @@
1rockspec_format = "3.0" 1rockspec_format = "3.0"
2package = "luarocks" 2package = "luarocks"
3version = "dev-1" 3version = "3.12.2-1"
4source = { 4source = {
5 url = "git+https://github.com/luarocks/luarocks", 5 url = "git+https://github.com/luarocks/luarocks",
6 tag = "v3.12.2",
6} 7}
7description = { 8description = {
8 summary = "A package manager for Lua modules.", 9 summary = "A package manager for Lua modules.",
diff --git a/makedist b/makedist
index 8b65a62e..0d136478 100755
--- a/makedist
+++ b/makedist
@@ -2,7 +2,7 @@
2 2
3if ! [ "$1" ] 3if ! [ "$1" ]
4then 4then
5 echo "usage: $0 <version> <lua54dir>" 5 echo "usage: $0 <version> <lua54dir> [branch] [binary] [sign]"
6 exit 1 6 exit 1
7fi 7fi
8 8
@@ -23,7 +23,7 @@ shift || {
23 exit 1 23 exit 1
24} 24}
25 25
26if ! [ -d "$lua54dir" ] 26if ! [ -d "$lua54dir" -a -d "$lua54dir/lib" ]
27then 27then
28 echo "Second argument must be the Lua 5.4 prefix." 28 echo "Second argument must be the Lua 5.4 prefix."
29 exit 1 29 exit 1
diff --git a/publishrelease b/publishrelease
index 808202e4..98717bc9 100755
--- a/publishrelease
+++ b/publishrelease
@@ -5,7 +5,7 @@
5 echo "example...: $0 3.1.1" 5 echo "example...: $0 3.1.1"
6 echo 6 echo
7 echo "Before running this, make sure the packages were built:" 7 echo "Before running this, make sure the packages were built:"
8 echo " makedist 3.1.1 /opt/lua54/ binary sign" 8 echo " makedist 3.1.1 /opt/lua54/ branch binary sign"
9 echo "And the tag was merged:" 9 echo "And the tag was merged:"
10 echo " mergerelease 3.1.1" 10 echo " mergerelease 3.1.1"
11 echo 11 echo
@@ -124,7 +124,7 @@ gawk '
124 print "\"'$v'\": {" 124 print "\"'$v'\": {"
125 print "\"date\": \"'$(date +'%Y-%m-%d')'\"," 125 print "\"date\": \"'$(date +'%Y-%m-%d')'\","
126 print "\"files\": [\"luarocks-'$v'.tar.gz\", \"luarocks-'$v'.tar.gz.asc\", \"luarocks-'$v'-win32.zip\", \"luarocks-'$v'-win32.zip.asc\", \"luarocks-'$v'-windows-32.zip\", \"luarocks-'$v'-windows-32.zip.asc\", \"luarocks-'$v'-windows-64.zip\", \"luarocks-'$v'-windows-64.zip.asc\", \"luarocks-'$v'-linux-x86_64.zip\", \"luarocks-'$v'-linux-x86_64.zip.asc\"]," 126 print "\"files\": [\"luarocks-'$v'.tar.gz\", \"luarocks-'$v'.tar.gz.asc\", \"luarocks-'$v'-win32.zip\", \"luarocks-'$v'-win32.zip.asc\", \"luarocks-'$v'-windows-32.zip\", \"luarocks-'$v'-windows-32.zip.asc\", \"luarocks-'$v'-windows-64.zip\", \"luarocks-'$v'-windows-64.zip.asc\", \"luarocks-'$v'-linux-x86_64.zip\", \"luarocks-'$v'-linux-x86_64.zip.asc\"],"
127 print "\"about\": []", 127 print "\"about\": []"
128 print "\"source_digest\": \"'$source_digest'\"" 128 print "\"source_digest\": \"'$source_digest'\""
129 print "}}," 129 print "}},"
130 } 130 }
@@ -170,49 +170,3 @@ confirm master
170git commit static/md/home.md -m "update front page for LuaRocks $v" 170git commit static/md/home.md -m "update front page for LuaRocks $v"
171git push 171git push
172 172
173#######################################
174# luarocks.wiki
175#######################################
176
177[ -e ../luarocks.wiki ] || {
178 cd ..
179 git clone ssh://git@github.com/luarocks/luarocks.wiki.git
180}
181
182if [ -e ../luarocks.wiki ]
183then
184 cd ../luarocks.wiki
185 git pull
186else
187 cd ..
188 git clone ssh://git@github.com/luarocks/luarocks.wiki.git
189 cd luarocks.wiki
190fi
191
192sed -i "s,Latest release: .*,Latest release: '''LuaRocks $v''' - '$(date +'%d/%b/%Y')'," Download.mediawiki
193
194sed -i "s,/luarocks-[0-9.]*[0-9],/luarocks-$v,g" Download.mediawiki
195
196gawk '
197BEGIN {
198 print "'\'\'\''Version '$v\'\'\'' - '$(date +'%d/%b/%Y')' - [http://luarocks.org/releases/luarocks-'$v'.tar.gz Source tarball for Unix] -"
199 print "[http://luarocks.org/releases/luarocks-'$v'-windows-32.zip Windows binary (32-bit)] -"
200 print "[http://luarocks.org/releases/luarocks-'$v'-windows-64.zip Windows binary (64-bit)] -"
201 print "[http://luarocks.org/releases/luarocks-'$v'-linux-x86_64.zip Linux binary (x86_64)] -"
202 print "[http://luarocks.github.io/luarocks/releases other files]"
203 print ""
204}
205// {
206 print
207}
208' "Release-history.mediawiki" > "Release-history.mediawiki.1"
209mv "Release-history.mediawiki.1" "Release-history.mediawiki"
210
211git add "Download.mediawiki"
212git add "Release-history.mediawiki"
213git add "Installation-instructions-for-Unix.md"
214
215confirm master
216
217git commit -av -m "Release $v"
218git push
diff --git a/spec/build_spec.lua b/spec/build_spec.lua
index 034c70d7..2e139a41 100644
--- a/spec/build_spec.lua
+++ b/spec/build_spec.lua
@@ -373,6 +373,101 @@ describe("LuaRocks build #integration", function()
373 end) 373 end)
374 end) 374 end)
375 375
376 describe("rockspec format 3.1", function()
377 it("version of Lua is not provided for old format", function()
378 test_env.run_in_tmp(function(tmpdir)
379 write_file("verify_argument.lua", string.format("assert(arg[1] == %q)", test_env.lua_version))
380 write_file("uses_luaversion_variable-3.1-11.rockspec", [[
381 package = "uses_luaversion_variable"
382 version = "3.1-11"
383 source = {
384 url = "file://]] .. tmpdir:gsub("\\", "/") .. [[/verify_argument.lua"
385 }
386 dependencies = {
387 "lua >= 5.1"
388 }
389 build = {
390 type = "command",
391 build_command = "$(LUA) verify_argument.lua $(LUA_VERSION)",
392 }
393 ]])
394 assert.is_false(run.luarocks_bool("build uses_luaversion_variable-3.1-11.rockspec"))
395 end, finally)
396 end)
397
398 it("version of Lua is provided as variable", function()
399 test_env.run_in_tmp(function(tmpdir)
400 write_file("verify_argument.lua", string.format("assert(arg[1] == %q)", test_env.lua_version))
401 write_file("uses_luaversion_variable-3.1-11.rockspec", [[
402 rockspec_format = "3.1"
403 package = "uses_luaversion_variable"
404 version = "3.1-11"
405 source = {
406 url = "file://]] .. tmpdir:gsub("\\", "/") .. [[/verify_argument.lua"
407 }
408 dependencies = {
409 "lua >= 5.1"
410 }
411 build = {
412 type = "command",
413 build_command = "$(LUA) verify_argument.lua $(LUA_VERSION)",
414 }
415 ]])
416 assert.is_truthy(run.luarocks_bool("build uses_luaversion_variable-3.1-11.rockspec"))
417 assert.is.truthy(run.luarocks("show uses_luaversion_variable"))
418 end, finally)
419 end)
420
421
422 it("dependency directory is not provided for old format", function()
423 test_env.run_in_tmp(function(tmpdir)
424 local rocks_tree = run.luarocks("config variables.ROCKS_TREE")
425 local rocks_path = table.concat({rocks_tree, "a_rock", "1.0-1"}, package.config:sub(1, 1))
426 write_file("verify_argument.lua", string.format("assert(arg[1] == %q)", rocks_path))
427 write_file("uses_rockdir_variable-3.1-11.rockspec", [[
428 package = "uses_rockdir_variable"
429 version = "3.1-11"
430 source = {
431 url = "file://]] .. tmpdir:gsub("\\", "/") .. [[/verify_argument.lua"
432 }
433 dependencies = {
434 "a_rock 1.0"
435 }
436 build = {
437 type = "command",
438 build_command = "$(LUA) verify_argument.lua $(A_ROCK_ROCKDIR)",
439 }
440 ]])
441 assert.is_false(run.luarocks_bool("build uses_rockdir_variable-3.1-11.rockspec"))
442 end, finally)
443 end)
444
445 it("dependency directory is provided as variable", function()
446 test_env.run_in_tmp(function(tmpdir)
447 local rocks_tree = run.luarocks("config variables.ROCKS_TREE")
448 local rocks_path = table.concat({rocks_tree, "a_rock", "1.0-1"}, package.config:sub(1, 1))
449 write_file("verify_argument.lua", string.format("assert(arg[1] == %q)", rocks_path))
450 write_file("uses_rockdir_variable-3.1-11.rockspec", [[
451 rockspec_format = "3.1"
452 package = "uses_rockdir_variable"
453 version = "3.1-11"
454 source = {
455 url = "file://]] .. tmpdir:gsub("\\", "/") .. [[/verify_argument.lua"
456 }
457 dependencies = {
458 "a_rock 1.0"
459 }
460 build = {
461 type = "command",
462 build_command = "$(LUA) verify_argument.lua $(A_ROCK_ROCKDIR)",
463 }
464 ]])
465 assert.is_truthy(run.luarocks_bool("build uses_rockdir_variable-3.1-11.rockspec"))
466 assert.is.truthy(run.luarocks("show uses_rockdir_variable"))
467 end, finally)
468 end)
469 end)
470
376 describe("#mock external dependencies", function() 471 describe("#mock external dependencies", function()
377 lazy_setup(function() 472 lazy_setup(function()
378 test_env.setup_specs(nil, "mock") 473 test_env.setup_specs(nil, "mock")
diff --git a/src/luarocks/build/cmake.lua b/src/luarocks/build/cmake.lua
index ea132a3e..b9954cf4 100644
--- a/src/luarocks/build/cmake.lua
+++ b/src/luarocks/build/cmake.lua
@@ -27,11 +27,6 @@ function cmake.run(rockspec, no_install)
27 local build = rockspec.build 27 local build = rockspec.build
28 local variables = build.variables or {} 28 local variables = build.variables or {}
29 29
30
31 variables.CMAKE_MODULE_PATH = os.getenv("CMAKE_MODULE_PATH")
32 variables.CMAKE_LIBRARY_PATH = os.getenv("CMAKE_LIBRARY_PATH")
33 variables.CMAKE_INCLUDE_PATH = os.getenv("CMAKE_INCLUDE_PATH")
34
35 util.variable_substitutions(variables, rockspec.variables) 30 util.variable_substitutions(variables, rockspec.variables)
36 31
37 local ok, err_msg = fs.is_tool_available(rockspec.variables.CMAKE, "CMake") 32 local ok, err_msg = fs.is_tool_available(rockspec.variables.CMAKE, "CMake")
diff --git a/src/luarocks/build/cmake.tl b/src/luarocks/build/cmake.tl
index 9a512d1e..35e64bd6 100644
--- a/src/luarocks/build/cmake.tl
+++ b/src/luarocks/build/cmake.tl
@@ -27,11 +27,6 @@ function cmake.run(rockspec: Rockspec, no_install: boolean): boolean, string, st
27 local build = rockspec.build as cmake.CMakeBuild 27 local build = rockspec.build as cmake.CMakeBuild
28 local variables = build.variables or {} 28 local variables = build.variables or {}
29 29
30 -- Pass Env variables
31 variables.CMAKE_MODULE_PATH=os.getenv("CMAKE_MODULE_PATH")
32 variables.CMAKE_LIBRARY_PATH=os.getenv("CMAKE_LIBRARY_PATH")
33 variables.CMAKE_INCLUDE_PATH=os.getenv("CMAKE_INCLUDE_PATH")
34
35 util.variable_substitutions(variables, rockspec.variables) 30 util.variable_substitutions(variables, rockspec.variables)
36 31
37 local ok, err_msg = fs.is_tool_available(rockspec.variables.CMAKE, "CMake") 32 local ok, err_msg = fs.is_tool_available(rockspec.variables.CMAKE, "CMake")
diff --git a/src/luarocks/cmd/upload.lua b/src/luarocks/cmd/upload.lua
index 755dd4e7..e4319bb1 100644
--- a/src/luarocks/cmd/upload.lua
+++ b/src/luarocks/cmd/upload.lua
@@ -1,4 +1,4 @@
1local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local string = _tl_compat and _tl_compat.string or string 1local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local math = _tl_compat and _tl_compat.math or math; local string = _tl_compat and _tl_compat.string or string
2local upload = { Response = { version = {} } } 2local upload = { Response = { version = {} } }
3 3
4 4
@@ -132,7 +132,8 @@ function upload.command(args)
132 return nil, "Invalid response from server." 132 return nil, "Invalid response from server."
133 end 133 end
134 util.printout(("Sending " .. tostring(rock_fname) .. " ...")) 134 util.printout(("Sending " .. tostring(rock_fname) .. " ..."))
135 res, err = api:method("upload_rock/" .. ("%d"):format(res.version.id), nil, { 135 local id = math.tointeger(res.version.id)
136 res, err = api:method("upload_rock/" .. ("%d"):format(id), nil, {
136 rock_file = multipart.new_file(rock_fname), 137 rock_file = multipart.new_file(rock_fname),
137 rock_sig = rock_sigfname and multipart.new_file(rock_sigfname), 138 rock_sig = rock_sigfname and multipart.new_file(rock_sigfname),
138 }) 139 })
diff --git a/src/luarocks/cmd/upload.tl b/src/luarocks/cmd/upload.tl
index 5b6e3314..a12b30c0 100644
--- a/src/luarocks/cmd/upload.tl
+++ b/src/luarocks/cmd/upload.tl
@@ -132,7 +132,8 @@ function upload.command(args: Args): boolean, string, string
132 return nil, "Invalid response from server." 132 return nil, "Invalid response from server."
133 end 133 end
134 util.printout(("Sending " .. tostring(rock_fname) .. " ...")) 134 util.printout(("Sending " .. tostring(rock_fname) .. " ..."))
135 res, err = api:method("upload_rock/" .. ("%d"):format(res.version.id), nil, { 135 local id = math.tointeger(res.version.id)
136 res, err = api:method("upload_rock/" .. ("%d"):format(id), nil, {
136 rock_file = multipart.new_file(rock_fname), 137 rock_file = multipart.new_file(rock_fname),
137 rock_sig = rock_sigfname and multipart.new_file(rock_sigfname), 138 rock_sig = rock_sigfname and multipart.new_file(rock_sigfname),
138 }) as (Response, string) 139 }) as (Response, string)
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua
index 8c2d7d79..7e1294cd 100644
--- a/src/luarocks/core/cfg.lua
+++ b/src/luarocks/core/cfg.lua
@@ -21,7 +21,7 @@ local vers = require("luarocks.core.vers")
21 21
22-------------------------------------------------------------------------------- 22--------------------------------------------------------------------------------
23 23
24local program_version = "dev" 24local program_version = "3.12.2"
25 25
26local is_windows = package.config:sub(1,1) == "\\" 26local is_windows = package.config:sub(1,1) == "\\"
27 27
@@ -413,13 +413,24 @@ local function make_defaults(lua_version, target_cpu, platforms, home)
413 end 413 end
414 414
415 if platforms.cygwin then 415 if platforms.cygwin then
416 defaults.lib_extension = "so" -- can be overridden in the config file for mingw builds 416 defaults.lib_extension = "dll"
417 defaults.arch = "cygwin-"..target_cpu 417 defaults.arch = "cygwin-"..target_cpu
418 defaults.cmake_generator = "Unix Makefiles" 418 defaults.cmake_generator = "Unix Makefiles"
419 defaults.variables.CC = "echo -llua | xargs " .. (os.getenv("CC") or "gcc") 419 defaults.variables.CC = "echo -llua | xargs " .. (os.getenv("CC") or "gcc")
420 defaults.variables.LD = "echo -llua | xargs " .. (os.getenv("CC") or "gcc") 420 defaults.variables.LD = "echo -llua | xargs " .. (os.getenv("CC") or "gcc")
421 defaults.variables.LIBFLAG = "-shared" 421 defaults.variables.LIBFLAG = "-shared"
422 defaults.link_lua_explicitly = true 422 defaults.link_lua_explicitly = true
423 defaults.external_deps_patterns = {
424 bin = { "?.exe", "?.bat", "?" },
425 lib = { "cyg?.dll", "lib?.so", "lib?.so.*", "lib?.dll.a", "?.dll.a",
426 "lib?.a", "lib?.dll", "?.dll" },
427 include = { "?.h" }
428 }
429 defaults.runtime_external_deps_patterns = {
430 bin = { "?.exe", "?.bat" },
431 lib = { "cyg?.dll", "lib?.so", "?.dll", "lib?.dll" },
432 include = { "?.h" }
433 }
423 end 434 end
424 435
425 if platforms.msys then 436 if platforms.msys then
diff --git a/src/luarocks/core/manif.lua b/src/luarocks/core/manif.lua
index 4c5e0441..c5ee158e 100644
--- a/src/luarocks/core/manif.lua
+++ b/src/luarocks/core/manif.lua
@@ -1,4 +1,4 @@
1local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local table = _tl_compat and _tl_compat.table or table; local type = type 1local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table; local type = type
2 2
3local manif = {} 3local manif = {}
4 4
@@ -52,7 +52,14 @@ end
52 52
53 53
54function manif.manifest_loader(file, repo_url, lua_version) 54function manif.manifest_loader(file, repo_url, lua_version)
55 local manifest, err, errcode = persist.load_into_table(file) 55 local manifest, err, errcode
56
57 if file:match(".*%.json$") then
58 manifest, err, errcode = persist.load_json_into_table(file)
59 else
60 manifest, err, errcode = persist.load_into_table(file)
61 end
62
56 if not manifest and type(err) == "string" then 63 if not manifest and type(err) == "string" then
57 return nil, "Failed loading manifest for " .. repo_url .. ": " .. err, errcode 64 return nil, "Failed loading manifest for " .. repo_url .. ": " .. err, errcode
58 end 65 end
diff --git a/src/luarocks/core/manif.tl b/src/luarocks/core/manif.tl
index 1f3b3659..0a96d47e 100644
--- a/src/luarocks/core/manif.tl
+++ b/src/luarocks/core/manif.tl
@@ -52,7 +52,14 @@ end
52-- @return table or (nil, string, string): the manifest or nil, 52-- @return table or (nil, string, string): the manifest or nil,
53-- error message and error code ("open", "load", "run"). 53-- error message and error code ("open", "load", "run").
54function manif.manifest_loader(file: string, repo_url: string, lua_version: string): Manifest, string | {any: any}, string 54function manif.manifest_loader(file: string, repo_url: string, lua_version: string): Manifest, string | {any: any}, string
55 local manifest, err, errcode = persist.load_into_table(file) 55 local manifest, err, errcode: {string: any}, {string: boolean} | string, string
56
57 if file:match(".*%.json$") then
58 manifest, err, errcode = persist.load_json_into_table(file)
59 else
60 manifest, err, errcode = persist.load_into_table(file)
61 end
62
56 if not manifest and err is string then 63 if not manifest and err is string then
57 return nil, "Failed loading manifest for "..repo_url..": " .. err, errcode 64 return nil, "Failed loading manifest for "..repo_url..": " .. err, errcode
58 end 65 end
diff --git a/src/luarocks/core/persist.lua b/src/luarocks/core/persist.lua
index 258a42c0..c9ccb4a0 100644
--- a/src/luarocks/core/persist.lua
+++ b/src/luarocks/core/persist.lua
@@ -2,6 +2,8 @@ local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 th
2local persist = {} 2local persist = {}
3 3
4 4
5local json = require("luarocks.vendor.dkjson")
6
5 7
6 8
7 9
@@ -67,4 +69,32 @@ function persist.load_into_table(filename, tbl)
67 return result, globals 69 return result, globals
68end 70end
69 71
72
73
74
75
76
77
78
79
80
81
82function persist.load_json_into_table(filename)
83 local fd, open_err = io.open(filename)
84 if not fd then
85 return nil, open_err, "open"
86 end
87 local str, read_err = fd:read("*a")
88 fd:close()
89 if not str then
90 return nil, read_err, "open"
91 end
92 local manifest, _, err = json.decode(str)
93 if not manifest then
94 return nil, "Failed decode manifest: " .. err, "load"
95 end
96
97 return manifest, {}
98end
99
70return persist 100return persist
diff --git a/src/luarocks/core/persist.tl b/src/luarocks/core/persist.tl
index 4694afcb..268d2bb6 100644
--- a/src/luarocks/core/persist.tl
+++ b/src/luarocks/core/persist.tl
@@ -2,6 +2,8 @@
2local record persist 2local record persist
3end 3end
4 4
5local json = require("luarocks.vendor.dkjson")
6
5-------------------------------------------------------------------------------- 7--------------------------------------------------------------------------------
6 8
7--- Load and run a Lua file in an environment. 9--- Load and run a Lua file in an environment.
@@ -67,5 +69,33 @@ function persist.load_into_table(filename: string, tbl?: {string:any}) : {string
67 return result, globals 69 return result, globals
68end 70end
69 71
72--- Load a JSON file containing assignments, storing them in a table.
73-- The global environment is not propagated to the loaded file.
74-- @param filename string: the name of the file.
75-- @param tbl table or nil: if given, this table is used to store
76-- loaded values.
77-- @return (table, table) or (nil, string, string): a table with the file's assignments
78-- as fields and set of undefined globals accessed in file,
79-- or nil, an error message and an error code ("open"; couldn't open the file,
80-- "load"; compile-time error, or "run"; run-time error)
81-- in case of errors.
82function persist.load_json_into_table(filename: string) : {string: any}, {string: boolean} | string, string
83 local fd, open_err = io.open(filename)
84 if not fd then
85 return nil, open_err, "open"
86 end
87 local str, read_err = fd:read("*a")
88 fd:close()
89 if not str then
90 return nil, read_err, "open"
91 end
92 local manifest, _, err = json.decode(str)
93 if not manifest then
94 return nil, "Failed decode manifest: " .. err, "load"
95 end
96
97 return manifest, {}
98end
99
70return persist 100return persist
71 101
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua
index e02d4694..13b531f6 100644
--- a/src/luarocks/deps.lua
+++ b/src/luarocks/deps.lua
@@ -1,4 +1,4 @@
1local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local io = _tl_compat and _tl_compat.io or io; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local pairs = _tl_compat and _tl_compat.pairs or pairs; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table; local type = type 1local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local io = _tl_compat and _tl_compat.io or io; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local math = _tl_compat and _tl_compat.math or math; local pairs = _tl_compat and _tl_compat.pairs or pairs; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table; local type = type
2 2
3local deps = {} 3local deps = {}
4 4
@@ -201,7 +201,7 @@ function deps.report_missing_dependencies(name, version, dependencies, deps_mode
201 first_missing_dep = false 201 first_missing_dep = false
202 end 202 end
203 203
204 util.printout((" %s (%s)"):format(tostring(depq), rock_status(depq, get_versions))) 204 util.printout((" %s (%s)"):format(tostring(depq), (rock_status(depq, get_versions))))
205 end 205 end
206 end 206 end
207end 207end
@@ -301,7 +301,7 @@ function deps.fulfill_dependencies(rockspec, depskey, deps_mode, verify, deplock
301 local depq = queries.new(dname, dnamespace, dversion) 301 local depq = queries.new(dname, dnamespace, dversion)
302 302
303 util.printout(("%s %s is pinned to %s (%s)"):format( 303 util.printout(("%s %s is pinned to %s (%s)"):format(
304 name, version, tostring(depq), rock_status(depq, get_versions))) 304 name, version, tostring(depq), (rock_status(depq, get_versions))))
305 305
306 local okfullfill, errfullfill = deps.fulfill_dependency(depq, "none", rocks_provided, verify, depskey) 306 local okfullfill, errfullfill = deps.fulfill_dependency(depq, "none", rocks_provided, verify, depskey)
307 if not okfullfill then 307 if not okfullfill then
@@ -327,11 +327,14 @@ function deps.fulfill_dependencies(rockspec, depskey, deps_mode, verify, deplock
327 for _, depq in ipairs((rockspec)[depskey].queries) do 327 for _, depq in ipairs((rockspec)[depskey].queries) do
328 328
329 util.printout(("%s %s depends on %s (%s)"):format( 329 util.printout(("%s %s depends on %s (%s)"):format(
330 name, version, tostring(depq), rock_status(depq, get_versions))) 330 name, version, tostring(depq), (rock_status(depq, get_versions))))
331 331
332 local okfulfill, found_or_err, _ = deps.fulfill_dependency(depq, deps_mode, rocks_provided, verify, depskey) 332 local okfulfill, version_or_err, tree = deps.fulfill_dependency(depq, deps_mode, rocks_provided, verify, depskey)
333 if okfulfill then 333 if okfulfill then
334 deplocks.add(depskey, depq.name, found_or_err) 334 deplocks.add(depskey, depq.name, version_or_err)
335 if tree and rockspec:format_is_at_least("3.1") then
336 rockspec.variables[depq.name:upper() .. "_ROCKDIR"] = path.install_dir(depq.name, version_or_err, tree)
337 end
335 else 338 else
336 if depq.constraints and depq.constraints[1] and depq.constraints[1].no_upgrade then 339 if depq.constraints and depq.constraints[1] and depq.constraints[1].no_upgrade then
337 util.printerr("This version of " .. name .. " is designed for use with") 340 util.printerr("This version of " .. name .. " is designed for use with")
@@ -341,7 +344,7 @@ function deps.fulfill_dependencies(rockspec, depskey, deps_mode, verify, deplock
341 util.printerr("or look for a suitable version of " .. name .. " with") 344 util.printerr("or look for a suitable version of " .. name .. " with")
342 util.printerr(" luarocks search " .. name) 345 util.printerr(" luarocks search " .. name)
343 end 346 end
344 return nil, found_or_err 347 return nil, version_or_err
345 end 348 end
346 end 349 end
347 350
@@ -703,7 +706,7 @@ end
703 706
704local function lua_h_exists(d, luaver) 707local function lua_h_exists(d, luaver)
705 local major, minor = luaver:match("(%d+)%.(%d+)") 708 local major, minor = luaver:match("(%d+)%.(%d+)")
706 local luanum = ("%s%02d"):format(major, tonumber(minor)) 709 local luanum = ("%s%02d"):format(major, math.tointeger(minor))
707 710
708 local lua_h = dir.path(d, "lua.h") 711 local lua_h = dir.path(d, "lua.h")
709 local fd = io.open(lua_h) 712 local fd = io.open(lua_h)
@@ -808,7 +811,7 @@ function deps.check_lua_libdir(vars)
808 local err 811 local err
809 if ok then 812 if ok then
810 local filename = dir.path(vars.LUA_LIBDIR, vars.LUA_LIBDIR_FILE) 813 local filename = dir.path(vars.LUA_LIBDIR, vars.LUA_LIBDIR_FILE)
811 local fd = io.open(filename, "r") 814 local fd = io.open(filename, "rb")
812 if fd then 815 if fd then
813 if not vars.LUA_LIBDIR_FILE:match((cfg.lua_version:gsub("%.", "%%.?"))) then 816 if not vars.LUA_LIBDIR_FILE:match((cfg.lua_version:gsub("%.", "%%.?"))) then
814 817
diff --git a/src/luarocks/deps.tl b/src/luarocks/deps.tl
index 5ca9c879..98fad54d 100644
--- a/src/luarocks/deps.tl
+++ b/src/luarocks/deps.tl
@@ -201,7 +201,7 @@ function deps.report_missing_dependencies(name: string, version: string, depende
201 first_missing_dep = false 201 first_missing_dep = false
202 end 202 end
203 203
204 util.printout((" %s (%s)"):format(tostring(depq), rock_status(depq, get_versions))) 204 util.printout((" %s (%s)"):format(tostring(depq), (rock_status(depq, get_versions))))
205 end 205 end
206 end 206 end
207end 207end
@@ -301,7 +301,7 @@ function deps.fulfill_dependencies(rockspec: Rockspec, depskey: DepsKey, deps_mo
301 local depq = queries.new(dname, dnamespace, dversion) 301 local depq = queries.new(dname, dnamespace, dversion)
302 302
303 util.printout(("%s %s is pinned to %s (%s)"):format( 303 util.printout(("%s %s is pinned to %s (%s)"):format(
304 name, version, tostring(depq), rock_status(depq, get_versions))) 304 name, version, tostring(depq), (rock_status(depq, get_versions))))
305 305
306 local okfullfill, errfullfill = deps.fulfill_dependency(depq, "none", rocks_provided, verify, depskey) 306 local okfullfill, errfullfill = deps.fulfill_dependency(depq, "none", rocks_provided, verify, depskey)
307 if not okfullfill then 307 if not okfullfill then
@@ -327,11 +327,14 @@ function deps.fulfill_dependencies(rockspec: Rockspec, depskey: DepsKey, deps_mo
327 for _, depq in ipairs((rockspec as {string: Dependencies})[depskey].queries) do 327 for _, depq in ipairs((rockspec as {string: Dependencies})[depskey].queries) do
328 328
329 util.printout(("%s %s depends on %s (%s)"):format( 329 util.printout(("%s %s depends on %s (%s)"):format(
330 name, version, tostring(depq), rock_status(depq, get_versions))) 330 name, version, tostring(depq), (rock_status(depq, get_versions))))
331 331
332 local okfulfill, found_or_err, _ = deps.fulfill_dependency(depq, deps_mode, rocks_provided, verify, depskey) 332 local okfulfill, version_or_err, tree = deps.fulfill_dependency(depq, deps_mode, rocks_provided, verify, depskey)
333 if okfulfill then 333 if okfulfill then
334 deplocks.add(depskey, depq.name, found_or_err) 334 deplocks.add(depskey, depq.name, version_or_err)
335 if tree and rockspec:format_is_at_least("3.1") then
336 rockspec.variables[depq.name:upper() .. "_ROCKDIR"] = path.install_dir(depq.name, version_or_err, tree)
337 end
335 else 338 else
336 if depq.constraints and depq.constraints[1] and depq.constraints[1].no_upgrade then 339 if depq.constraints and depq.constraints[1] and depq.constraints[1].no_upgrade then
337 util.printerr("This version of "..name.." is designed for use with") 340 util.printerr("This version of "..name.." is designed for use with")
@@ -341,7 +344,7 @@ function deps.fulfill_dependencies(rockspec: Rockspec, depskey: DepsKey, deps_mo
341 util.printerr("or look for a suitable version of "..name.." with") 344 util.printerr("or look for a suitable version of "..name.." with")
342 util.printerr(" luarocks search "..name) 345 util.printerr(" luarocks search "..name)
343 end 346 end
344 return nil, found_or_err 347 return nil, version_or_err
345 end 348 end
346 end 349 end
347 350
@@ -703,7 +706,7 @@ end
703 706
704local function lua_h_exists(d: string, luaver: string): boolean, string, string, integer 707local function lua_h_exists(d: string, luaver: string): boolean, string, string, integer
705 local major, minor = luaver:match("(%d+)%.(%d+)") 708 local major, minor = luaver:match("(%d+)%.(%d+)")
706 local luanum = ("%s%02d"):format(major, tonumber(minor)) 709 local luanum = ("%s%02d"):format(major, math.tointeger(minor))
707 710
708 local lua_h = dir.path(d, "lua.h") 711 local lua_h = dir.path(d, "lua.h")
709 local fd = io.open(lua_h) 712 local fd = io.open(lua_h)
@@ -749,7 +752,7 @@ local function find_lua_incdir(prefix: string, luaver: string, luajitver: string
749end 752end
750 753
751function deps.check_lua_incdir(vars: {string: string}): boolean, string, string 754function deps.check_lua_incdir(vars: {string: string}): boolean, string, string
752 if vars.LUA_INCDIR_OK == "ok" 755 if vars.LUA_INCDIR_OK == "ok"
753 then return true 756 then return true
754 end 757 end
755 758
@@ -777,7 +780,7 @@ function deps.check_lua_incdir(vars: {string: string}): boolean, string, string
777end 780end
778 781
779function deps.check_lua_libdir(vars: {string: string}): boolean, string, string, {string : {string}} 782function deps.check_lua_libdir(vars: {string: string}): boolean, string, string, {string : {string}}
780 if vars.LUA_LIBDIR_OK == "ok" 783 if vars.LUA_LIBDIR_OK == "ok"
781 then return true 784 then return true
782 end 785 end
783 786
@@ -808,13 +811,13 @@ function deps.check_lua_libdir(vars: {string: string}): boolean, string, string,
808 local err: string 811 local err: string
809 if ok then 812 if ok then
810 local filename = dir.path(vars.LUA_LIBDIR, vars.LUA_LIBDIR_FILE) 813 local filename = dir.path(vars.LUA_LIBDIR, vars.LUA_LIBDIR_FILE)
811 local fd = io.open(filename, "r") 814 local fd = io.open(filename, "rb")
812 if fd then 815 if fd then
813 if not vars.LUA_LIBDIR_FILE:match((cfg.lua_version:gsub("%.", "%%.?"))) then 816 if not vars.LUA_LIBDIR_FILE:match((cfg.lua_version:gsub("%.", "%%.?"))) then
814 -- if filename isn't versioned, check file contents 817 -- if filename isn't versioned, check file contents
815 local txt = fd:read("*a") 818 local txt = fd:read("*a")
816 ok = txt:find("Lua " .. cfg.lua_version, 1, true) 819 ok = txt:find("Lua " .. cfg.lua_version, 1, true)
817 or txt:find("lua" .. (cfg.lua_version:gsub("%.", "")), 1, true) 820 or txt:find("lua" .. (cfg.lua_version:gsub("%.", "")), 1, true)
818 and true 821 and true
819 if not ok then 822 if not ok then
820 err = "Lua library at " .. filename .. " does not match Lua version " .. cfg.lua_version .. ". You can use `luarocks config variables.LUA_LIBDIR <path>` to set the correct location." 823 err = "Lua library at " .. filename .. " does not match Lua version " .. cfg.lua_version .. ". You can use `luarocks config variables.LUA_LIBDIR <path>` to set the correct location."
diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua
index 07c4bf94..50363cc0 100644
--- a/src/luarocks/fetch.lua
+++ b/src/luarocks/fetch.lua
@@ -49,12 +49,15 @@ function fetch.fetch_caching(url, mirroring)
49 local repo_url, filename = url:match("^(.*)/([^/]+)$") 49 local repo_url, filename = url:match("^(.*)/([^/]+)$")
50 local name = repo_url:gsub("[/:]", "_") 50 local name = repo_url:gsub("[/:]", "_")
51 local cache_dir = dir.path(cfg.local_cache, name) 51 local cache_dir = dir.path(cfg.local_cache, name)
52 local ok = fs.make_dir(cache_dir) 52 local ok = fs.exists(cfg.local_cache)
53 if ok then
54 ok = fs.make_dir(cache_dir)
55 end
53 56
54 local cachefile = dir.path(cache_dir, filename) 57 local cachefile = dir.path(cache_dir, filename)
55 local checkfile = cachefile .. ".check" 58 local checkfile = cachefile .. ".check"
56 59
57 if (fs.file_age(checkfile) < 10 or 60 if (fs.exists(checkfile) and fs.file_age(checkfile) < 10 or
58 cfg.aggressive_cache and (not name:match("^manifest"))) and fs.exists(cachefile) then 61 cfg.aggressive_cache and (not name:match("^manifest"))) and fs.exists(cachefile) then
59 62
60 return cachefile, nil, nil, true 63 return cachefile, nil, nil, true
@@ -75,6 +78,8 @@ function fetch.fetch_caching(url, mirroring)
75 if not ok then 78 if not ok then
76 return nil, "Failed creating temporary cache directory " .. cache_dir 79 return nil, "Failed creating temporary cache directory " .. cache_dir
77 end 80 end
81 cachefile = dir.path(cache_dir, filename)
82 checkfile = cachefile .. ".check"
78 lock = fs.lock_access(cache_dir) 83 lock = fs.lock_access(cache_dir)
79 end 84 end
80 85
diff --git a/src/luarocks/fetch.tl b/src/luarocks/fetch.tl
index 2f81ac0c..75f0a157 100644
--- a/src/luarocks/fetch.tl
+++ b/src/luarocks/fetch.tl
@@ -49,12 +49,15 @@ function fetch.fetch_caching(url: string, mirroring?: string): string, string, s
49 local repo_url, filename = url:match("^(.*)/([^/]+)$") 49 local repo_url, filename = url:match("^(.*)/([^/]+)$")
50 local name = repo_url:gsub("[/:]","_") 50 local name = repo_url:gsub("[/:]","_")
51 local cache_dir = dir.path(cfg.local_cache, name) 51 local cache_dir = dir.path(cfg.local_cache, name)
52 local ok = fs.make_dir(cache_dir) 52 local ok = fs.exists(cfg.local_cache)
53 if ok then
54 ok = fs.make_dir(cache_dir)
55 end
53 56
54 local cachefile = dir.path(cache_dir, filename) 57 local cachefile = dir.path(cache_dir, filename)
55 local checkfile = cachefile .. ".check" 58 local checkfile = cachefile .. ".check"
56 59
57 if (fs.file_age(checkfile) < 10 or 60 if (fs.exists(checkfile) and fs.file_age(checkfile) < 10 or
58 cfg.aggressive_cache and (not name:match("^manifest"))) and fs.exists(cachefile) 61 cfg.aggressive_cache and (not name:match("^manifest"))) and fs.exists(cachefile)
59 then 62 then
60 return cachefile, nil, nil, true 63 return cachefile, nil, nil, true
@@ -75,6 +78,8 @@ function fetch.fetch_caching(url: string, mirroring?: string): string, string, s
75 if not ok then 78 if not ok then
76 return nil, "Failed creating temporary cache directory "..cache_dir 79 return nil, "Failed creating temporary cache directory "..cache_dir
77 end 80 end
81 cachefile = dir.path(cache_dir, filename)
82 checkfile = cachefile .. ".check"
78 lock = fs.lock_access(cache_dir) 83 lock = fs.lock_access(cache_dir)
79 end 84 end
80 85
diff --git a/src/luarocks/fs/unix.lua b/src/luarocks/fs/unix.lua
index 41a9ba8b..2c99ff0d 100644
--- a/src/luarocks/fs/unix.lua
+++ b/src/luarocks/fs/unix.lua
@@ -145,13 +145,14 @@ function unix.is_actual_binary(filename)
145 if not file then 145 if not file then
146 return true 146 return true
147 end 147 end
148 local first = file:read(2) 148 local first = file:read()
149 file:close() 149 file:close()
150 if not first then 150 if not first then
151 util.warning("could not read "..filename) 151 util.warning("could not read "..filename)
152 return true 152 return true
153 end 153 end
154 return first ~= "#!" 154 -- only create wrapper for lua scripts with `#!/usr/bin/env lua` or `#!/usr/bin/lua`
155 return first:match('^#!.*[ /]lua.*') == first
155end 156end
156 157
157function unix.copy_binary(filename, dest) 158function unix.copy_binary(filename, dest)
diff --git a/src/luarocks/manif.lua b/src/luarocks/manif.lua
index 809b823d..b608d363 100644
--- a/src/luarocks/manif.lua
+++ b/src/luarocks/manif.lua
@@ -1,4 +1,4 @@
1local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local io = _tl_compat and _tl_compat.io or io; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local pairs = _tl_compat and _tl_compat.pairs or pairs; local string = _tl_compat and _tl_compat.string or string; local type = type 1local _tl_compat; if (tonumber((_VERSION or ''):match('[%d.]*$')) or 0) < 5.3 then local p, m = pcall(require, 'compat53.module'); if p then _tl_compat = m end end; local assert = _tl_compat and _tl_compat.assert or assert; local io = _tl_compat and _tl_compat.io or io; local ipairs = _tl_compat and _tl_compat.ipairs or ipairs; local pairs = _tl_compat and _tl_compat.pairs or pairs; local string = _tl_compat and _tl_compat.string or string; local table = _tl_compat and _tl_compat.table or table; local type = type
2 2
3 3
4 4
@@ -103,6 +103,10 @@ function manif.load_manifest(repo_url, lua_version, versioned_only)
103 not versioned_only and "manifest" or nil, 103 not versioned_only and "manifest" or nil,
104 } 104 }
105 105
106 if util.get_luajit_version() then
107 table.insert(filenames, 1, "manifest-" .. lua_version .. ".json")
108 end
109
106 local protocol, repodir = dir.split_url(repo_url) 110 local protocol, repodir = dir.split_url(repo_url)
107 local pathname, from_cache 111 local pathname, from_cache
108 if protocol == "file" then 112 if protocol == "file" then
diff --git a/src/luarocks/manif.tl b/src/luarocks/manif.tl
index 6a62a73f..da9b7d4c 100644
--- a/src/luarocks/manif.tl
+++ b/src/luarocks/manif.tl
@@ -103,6 +103,10 @@ function manif.load_manifest(repo_url: string, lua_version?: string, versioned_o
103 not versioned_only and "manifest" or nil, 103 not versioned_only and "manifest" or nil,
104 } 104 }
105 105
106 if util.get_luajit_version() then
107 table.insert(filenames, 1, "manifest-" .. lua_version .. ".json")
108 end
109
106 local protocol, repodir = dir.split_url(repo_url) 110 local protocol, repodir = dir.split_url(repo_url)
107 local pathname, from_cache: string, boolean 111 local pathname, from_cache: string, boolean
108 if protocol == "file" then 112 if protocol == "file" then
diff --git a/src/luarocks/rockspecs.lua b/src/luarocks/rockspecs.lua
index 6a9a376c..7f137b87 100644
--- a/src/luarocks/rockspecs.lua
+++ b/src/luarocks/rockspecs.lua
@@ -24,6 +24,19 @@ local vendored_build_type_set = {
24 ["none"] = true, 24 ["none"] = true,
25} 25}
26 26
27local rockspec_mt_funcs = {}
28
29local rockspec_mt = {}
30rockspec_mt.__index = rockspec_mt_funcs
31
32function rockspec_mt_funcs.type()
33 util.warning("The function rockspec.type() is no longer " ..
34 "necessary and is now deprecated. Please update your " ..
35 "plugin to remove calls to this function.")
36
37 return "rockspec"
38end
39
27 40
28 41
29 42
@@ -83,6 +96,9 @@ local function configure_paths(rockspec)
83 vars.CONFDIR = path.conf_dir(name, version) 96 vars.CONFDIR = path.conf_dir(name, version)
84 vars.BINDIR = path.bin_dir(name, version) 97 vars.BINDIR = path.bin_dir(name, version)
85 vars.DOCDIR = path.doc_dir(name, version) 98 vars.DOCDIR = path.doc_dir(name, version)
99 if rockspec:format_is_at_least("3.1") then
100 vars.LUA_VERSION = cfg.lua_version
101 end
86 rockspec.variables = vars 102 rockspec.variables = vars
87end 103end
88 104
@@ -178,7 +194,8 @@ function rockspecs.from_persisted_table(filename, rockspec, globals, quick)
178 configure_paths(rockspec) 194 configure_paths(rockspec)
179 end 195 end
180 196
181 return rockspec 197
198 return setmetatable(rockspec, rockspec_mt)
182end 199end
183 200
184return rockspecs 201return rockspecs
diff --git a/src/luarocks/rockspecs.tl b/src/luarocks/rockspecs.tl
index a34c0dbf..7f31f786 100644
--- a/src/luarocks/rockspecs.tl
+++ b/src/luarocks/rockspecs.tl
@@ -24,6 +24,19 @@ local vendored_build_type_set: {string: boolean} = {
24 ["none"] = true, 24 ["none"] = true,
25} 25}
26 26
27local rockspec_mt_funcs = {}
28
29local rockspec_mt: metatable<Rockspec> = {}
30rockspec_mt.__index = rockspec_mt_funcs
31
32function rockspec_mt_funcs.type(): string
33 util.warning("The function rockspec.type() is no longer " ..
34 "necessary and is now deprecated. Please update your " ..
35 "plugin to remove calls to this function.")
36
37 return "rockspec"
38end
39
27--- Perform platform-specific overrides on a table. 40--- Perform platform-specific overrides on a table.
28-- Overrides values of table with the contents of the appropriate 41-- Overrides values of table with the contents of the appropriate
29-- subset of its "platforms" field. The "platforms" field should 42-- subset of its "platforms" field. The "platforms" field should
@@ -83,6 +96,9 @@ local function configure_paths(rockspec: Rockspec)
83 vars.CONFDIR = path.conf_dir(name, version) 96 vars.CONFDIR = path.conf_dir(name, version)
84 vars.BINDIR = path.bin_dir(name, version) 97 vars.BINDIR = path.bin_dir(name, version)
85 vars.DOCDIR = path.doc_dir(name, version) 98 vars.DOCDIR = path.doc_dir(name, version)
99 if rockspec:format_is_at_least("3.1") then
100 vars.LUA_VERSION = cfg.lua_version
101 end
86 rockspec.variables = vars 102 rockspec.variables = vars
87end 103end
88 104
@@ -178,7 +194,8 @@ function rockspecs.from_persisted_table(filename: string, rockspec: Rockspec, gl
178 configure_paths(rockspec) 194 configure_paths(rockspec)
179 end 195 end
180 196
181 return rockspec 197 -- TODO remove this on LuaRocks 4.0
198 return setmetatable(rockspec, rockspec_mt)
182end 199end
183 200
184return rockspecs 201return rockspecs
diff --git a/src/luarocks/tools/patch.lua b/src/luarocks/tools/patch.lua
index 8dc188a6..d1575cb0 100644
--- a/src/luarocks/tools/patch.lua
+++ b/src/luarocks/tools/patch.lua
@@ -129,14 +129,13 @@ local function file_lines(f)
129 end 129 end
130 end 130 end
131 end 131 end
132 local posi = math.tointeger(pos) 132 if not pos then
133 if not posi then 133 pos = #buffer
134 posi = #buffer
135 elseif chars == '\r\n' then 134 elseif chars == '\r\n' then
136 posi = posi + 1 135 pos = pos + 1
137 end 136 end
138 local line = buffer:sub(pos_beg, posi) 137 local line = buffer:sub(pos_beg, pos)
139 pos_beg = posi + 1 138 pos_beg = pos + 1
140 if #line > 0 then 139 if #line > 0 then
141 return line 140 return line
142 end 141 end
diff --git a/src/luarocks/tools/patch.tl b/src/luarocks/tools/patch.tl
index 83c16ab7..553964e3 100644
--- a/src/luarocks/tools/patch.tl
+++ b/src/luarocks/tools/patch.tl
@@ -114,7 +114,7 @@ local function file_lines(f: FILE): function(): string
114 local buffer = "" 114 local buffer = ""
115 local pos_beg = 1 115 local pos_beg = 1
116 return function(): string 116 return function(): string
117 local pos, chars: string, string 117 local pos, chars: integer, string
118 while 1 do 118 while 1 do
119 pos, chars = buffer:match('()([\r\n].)', pos_beg) 119 pos, chars = buffer:match('()([\r\n].)', pos_beg)
120 if pos or not f then 120 if pos or not f then
@@ -129,14 +129,13 @@ local function file_lines(f: FILE): function(): string
129 end 129 end
130 end 130 end
131 end 131 end
132 local posi = math.tointeger(pos) 132 if not pos then
133 if not posi then 133 pos = #buffer
134 posi = #buffer
135 elseif chars == '\r\n' then 134 elseif chars == '\r\n' then
136 posi = posi + 1 135 pos = pos + 1
137 end 136 end
138 local line = buffer:sub(pos_beg, posi) 137 local line = buffer:sub(pos_beg, pos)
139 pos_beg = posi + 1 138 pos_beg = pos + 1
140 if #line > 0 then 139 if #line > 0 then
141 return line 140 return line
142 end 141 end
diff --git a/src/luarocks/type/rockspec.lua b/src/luarocks/type/rockspec.lua
index cd4044f6..10b06690 100644
--- a/src/luarocks/type/rockspec.lua
+++ b/src/luarocks/type/rockspec.lua
@@ -11,7 +11,7 @@ local type_check = require("luarocks.type_check")
11 11
12 12
13 13
14type_rockspec.rockspec_format = "3.0" 14type_rockspec.rockspec_format = "3.1"
15 15
16 16
17 17
@@ -174,6 +174,9 @@ local rockspec_formats, versions = type_check.declare_schemas({
174 }, 174 },
175 }, 175 },
176 }, 176 },
177
178 ["3.1"] = {},
179
177}) 180})
178 181
179 182
diff --git a/src/luarocks/type/rockspec.tl b/src/luarocks/type/rockspec.tl
index 599c13ce..52ad7909 100644
--- a/src/luarocks/type/rockspec.tl
+++ b/src/luarocks/type/rockspec.tl
@@ -11,7 +11,7 @@ local type_check = require("luarocks.type_check")
11 11
12-- local type TableSchema = type_check.TableSchema 12-- local type TableSchema = type_check.TableSchema
13 13
14type_rockspec.rockspec_format = "3.0" 14type_rockspec.rockspec_format = "3.1"
15 15
16-- Syntax for type-checking tables: 16-- Syntax for type-checking tables:
17-- 17--
@@ -173,7 +173,10 @@ local rockspec_formats, versions = type_check.declare_schemas({
173 _more = true, 173 _more = true,
174 }, 174 },
175 } 175 }
176 } 176 },
177
178 ["3.1"] = {},
179
177}) 180})
178 181
179-- type_rockspec.order = {"rockspec_format", "package", "version", 182-- type_rockspec.order = {"rockspec_format", "package", "version",
diff --git a/src/luarocks/vendor/dkjson.d.tl b/src/luarocks/vendor/dkjson.d.tl
index a7c76389..4245e8aa 100644
--- a/src/luarocks/vendor/dkjson.d.tl
+++ b/src/luarocks/vendor/dkjson.d.tl
@@ -15,7 +15,7 @@ local record dkjson
15 end 15 end
16 encode: function({string:any}, ?JsonState): string 16 encode: function({string:any}, ?JsonState): string
17 17
18 decode: function(string, ?number, ?any, ?table): {string:any} 18 decode: function(string, ?number, ?any, ?table): {string:any}, integer, string
19 19
20 null: table 20 null: table
21 21