LR 2.0.5.
Rockspec:
package = "foobar"
version = "scm-1"
source = {
url = "" -- Installable with `luarocks make` only
}
description = { }
build = {
type = "none",
copy_directories = {
"files"
}
}
(Note the copy_directories
.)
Directory layout:
$ ls -lR
.:
total 16
drwxr-xr-x 2 agladysh agladysh 4096 2011-09-17 18:31 files
-rw-r--r-- 1 agladysh agladysh 194 2011-09-17 18:36 foobar-scm-1.rockspec
./files:
total 4
-rw-r--r-- 1 agladysh agladysh 16 2011-09-17 18:31 foo.txt
When I use pack
on rockspec file:
$ luarocks pack foobar-scm-1.rockspec
zip warning: name not matched:
adding: foobar-scm-1.rockspec (deflated 25%)
Packed: /home/agladysh/tmp/lrpackbug/foobar-scm-1.src.rock
(Note the warning from zip — it probably must be treated as error by LR.)
The created rockfile contains only unusable (due to url=""
) rockspec file:
$ zipinfo foobar-scm-1.src.rock
Archive: foobar-scm-1.src.rock
Zip file size: 324 bytes, number of entries: 1
-rw-r--r-- 3.0 unx 176 tx defN 11-Sep-17 18:35 foobar-scm-1.rockspec
1 file, 176 bytes uncompressed, 132 bytes compressed: 25.0%
If I build .all.rock
with make + pack, all is OK:
$ sudo luarocks make foobar-scm-1.rockspec
Updating manifest for /usr/local/lib/luarocks/rocks
foobar scm-1 is now built and installed in /usr/local/
$ luarocks pack foobar
adding: files/ (stored 0%)
adding: files/foo.txt (stored 0%)
adding: rock_manifest (deflated 13%)
adding: foobar-scm-1.rockspec (deflated 27%)
Packed: /home/agladysh/tmp/lrpackbug/foobar-scm-1.all.rock
$ zipinfo foobar-scm-1.all.rock
Archive: foobar-scm-1.all.rock
Zip file size: 927 bytes, number of entries: 4
drwxrwxr-x 3.0 unx 0 bx stor 11-Sep-17 18:55 files/
-rw-r--r-- 3.0 unx 16 tx stor 11-Sep-17 18:55 files/foo.txt
-rw-r--r-- 3.0 unx 149 tx defN 11-Sep-17 18:55 rock_manifest
-rw-r--r-- 3.0 unx 194 tx defN 11-Sep-17 18:55 foobar-scm-1.rockspec
4 files, 359 bytes uncompressed, 287 bytes compressed: 20.1%