diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2025-01-05 21:40:39 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2025-02-21 11:22:43 -0300 |
commit | 7e86fa86b4d08fd6118d6eab46d92b29ffea791e (patch) | |
tree | 10fdd12beed4b0eca408533ad11d1f52d7d62e10 /docs/manifest_file_format.md | |
parent | 1ada2ea4bbd94ac0c58e3e2cc918194140090a75 (diff) | |
download | luarocks-7e86fa86b4d08fd6118d6eab46d92b29ffea791e.tar.gz luarocks-7e86fa86b4d08fd6118d6eab46d92b29ffea791e.tar.bz2 luarocks-7e86fa86b4d08fd6118d6eab46d92b29ffea791e.zip |
docs: import Wiki docs into the main repo
Diffstat (limited to 'docs/manifest_file_format.md')
-rw-r--r-- | docs/manifest_file_format.md | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/docs/manifest_file_format.md b/docs/manifest_file_format.md new file mode 100644 index 00000000..2fe57dee --- /dev/null +++ b/docs/manifest_file_format.md | |||
@@ -0,0 +1,41 @@ | |||
1 | # Manifest file format | ||
2 | |||
3 | A manifest file describes files contained in a rocks tree or server. Each | ||
4 | rocks tree or server has a `manifest` file in its root. Rocks servers may also | ||
5 | have versioned manifests (e.g. `manifest-5.1` for Lua 5.1) and compressed | ||
6 | manifests (e.g. `manifest-5.1.zip`). These must match the contents of the | ||
7 | uncompressed manifest. | ||
8 | |||
9 | Like a rockspec, a manifest file contains a Lua program setting several | ||
10 | globals. Three of them are mandatory: | ||
11 | |||
12 | * `repository`: a table where each key is a package name and its value is a table describing versions of the package | ||
13 | hosted on a server or installed in a rocks tree. | ||
14 | * `repository[package_name]`: a table where each key is a package version (including revision, e.g. `1.0.0-1`) | ||
15 | and its value provides information for that version. | ||
16 | * `repository[package_name][package_version]`: a list of tables containing several fields: | ||
17 | * `arch`: architecture of the rock as a string. Always set to `installed` in rock tree manifests. | ||
18 | * `modules` (only for rock tree manifests): a table mapping module names to paths under installation | ||
19 | directory for Lua or C modules. | ||
20 | * `commands` (only for rock tree manifests): a table mapping script names to paths under installation | ||
21 | directory for binaries. | ||
22 | * `dependencies` (only for rock tree manifests): a table mapping names of packages the rock depends on | ||
23 | (perhaps indirectly) to versions of installed packages satisfying the dependency. | ||
24 | * `modules`: empty table in rock server manifests (may change in future releases). In rock tree manifests | ||
25 | it's a table mapping module names to lists of packages and versions providing that module. Each value in the | ||
26 | list is a string in `module/version` format (e.g. `foo/1.0.0-1`). | ||
27 | * `commands`: empty table in rock server manifests (may change in future releases). In rock tree manifests | ||
28 | it's a table mapping script names to lists of packages and versions providing that script, using same | ||
29 | format as `modules` table. | ||
30 | * `dependencies` (only for rock tree manifests): a table containing precomputed dependency information | ||
31 | to be used by `luarocks.loader`. Each key is a package name. | ||
32 | * `dependencies[package_name]`: A table where each key is a version (with revision) and its value describes | ||
33 | dependencies of that version of the package. | ||
34 | * `dependencies[package_name][package_version]`: An array of direct dependencies represented as tables | ||
35 | with the following fields: | ||
36 | * `name`: name of the rock that is depended on. | ||
37 | * `constraints`: an array of parsed version constraints. Each constraint is represented as | ||
38 | a table with fields: | ||
39 | * `op`: an operator as a string (e.g. `>=`). | ||
40 | * `version`: version to the right of the operator as an array of parts, e.g. `{1, 0, 0}` for `1.0.0`. | ||
41 | It also contains version as a string in `string` field and may contain revision in `revision` field. | ||