Hi all,
I'm overhauling luarocks' packaging (TL;DR, it's the Lua equivalent of
Python's pip or Rust's cargo).
Previously it flipped from being a noarch package (because the files
shipped are pure Lua code) to arched (because it hardcoded some
settings based on the system it's built on).
With recent luarocks that's no longer necessary as it can auto-detect
the installed Lua environment (I added a little patch to make it prefer
/usr/lib64 if it is available).
This works well, but ... luarocks keeps a 'rocks tree' (basically a
record of which rocks are installed and their checksums):
```
$ luarocks config | grep ROCKS
ROCKS_TREE = "/usr/lib/luarocks/rocks-5.4",
```
The files here are mostly noarch but if the user compiles a binary
module it does record the checksum of the binary as well. e.g.
```
$ cat /usr/lib/luarocks/rocks-5.4/bit32/5.3.5.1-1/rock_manifest
rock_manifest = {
["bit32-5.3.5.1-1.rockspec"] = "63172097de28df84f5de587c25d866d0",
doc = {
LICENSE = "47a1db9761ff46e15d0f65fbc87d4bd5",
["README.md"] = "0f5f506e9b1697622bf4a2e0faeb1746"
},
lib = {
["bit32.so"] = "5b35079ba129529a30f6a7f9adba309e"
}
}
```
Would %{_var}/lib/luarocks be a better location for this? (since it's
in effect similar to /var/lib/rpm and /var/lib/dnf). Either that
location or /usr/lib would be fine for now.
If we ever want to, say, use luarocks to build lua module RPMs, this
might be a problem if we ever want 64-bit and 32-bit RPMs to be
installable. We can always get around it by stripping the rock
manifests though.
Thanks,
--
Michel Alexandre Salim
profile:
https://keyoxide.org/michel@michel-slm.name