Multiple version of Lua with alternatives

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Wed Feb 24 16:38:33 GMT 2021


On 2021-02-24 04:03, Lemures Lemniscati via Cygwin-apps wrote:
> On Tue, 23 Feb 2021 23:53:08 -0700, Brian Inglis
>> On 2021-02-23 22:20, Marco Atzeri via Cygwin-apps wrote:
>>> On 24.02.2021 05:18, Lemures Lemniscati via Cygwin-apps wrote:
>>>> On Sat, 20 Feb 2021 19:15:38 +0900, Lemures Lemniscati
>>>>> On Sat, 20 Feb 2021 08:40:33 +0100, Achim Gratz
>>>>>> Lemures Lemniscati via Cygwin-apps writes:
>>>>>>> * A new source luarocks provides lua53- and lua54-luarocks.
>>>>>>>     They install rocks into an alternative tree /var/lib/lua-site/.

>>>>>> That looks wrong to me, I'd have expected
>>>>>> /usr/share/lua/luarocks
>>>>>> or maybe /usr/local as a prefix depending on how much emphasis you want
>>>>>> to put on the user-installable part.  The /var/lib tree is for local
>>>>>> state information per FHS, not installed components.

>>>>> Thank you for review.
>>>>> I've fixed it, so that luarocks should install rocks into
>>>>> /usr/share/lua/luarocks, and updated packages [1].
>      ^^^^^^^^^ (Sorry I accidentally replaced it by '/usr/local' in the
>                 original mail: it is still /usr/share/lua/luarocks )
>>>> I'm wondering again it would be better for luarock to install into /usr/local
>>>> tree.

>>> usually installation with a similar subtree are installed
>>> under usr/lib
>>> $ find /usr/lib -name bin

>>> there are few cases under usr/share
>>> but usually are sub-sub trees
>>> $ find /usr/share -name bin

>>> we have nothing "current" installed under usr/local
>>> at all. No package should be installed there

>> Indeed - that's where I stash all my personal Cygwin scripts and exes.

>> Another good spot is /usr/libexec/ which is well populated by the likes of
>> git plumbing and other packages. I prefer the packages that populate
>> subdirectories rather than littering the top level like geoclue and gvfsd.

> Thank you for advices!
> I've understood that we should avoid /usr/local.
> And, choices for a tree-prefix where luarocks will install rocks are:
> 1) luarocks_tree=/usr/share/lua/luarocks
> 2) luarocks_tree=/usr/lib/lua/luarocks
> 3) luarocks_tree=/usr/libexec/lua/luarocks
> And rocks will go:
> ${luarocks_tree}/bin
> ${luarocks_tree}/lib/lua/5.3
> ${luarocks_tree}/lib/lua/5.4
> ${luarocks_tree}/lib/luarocks/rocks-5.3/
> ${luarocks_tree}/lib/luarocks/rocks-5.4/
> ${luarocks_tree}/share/lua/5.3
> ${luarocks_tree}/share/lua/5.4
> I don't know which is the best.
> Current choice is still /usr/share/lua/luarocks [1].
> [1]: https://cygwin-lem.github.io/lua-cygwin-packages/

Packaging luarocks varies across distros. Where I have been able to find target 
directories suggests:

basing off Fedora as much here does:

https://src.fedoraproject.org/rpms/luarocks/blob/rawhide/f/luarocks.spec#_57:

	mkdir -p %{buildroot}%{_prefix}/lib/luarocks/rocks-%{lua_version}

would suggest /usr/lib/luarocks/rocks-%{lua_version}

msys2 uses:

https://github.com/msys2/MINGW-packages/blob/fbe23378fcb1fa50dcd132ce8ab24217a6d9e433/mingw-w64-lua-luarocks/luarocks-x86_64.install#L8

	${MINGW_PREFIX}/share/lua/5.1/luarocks/site_config.lua

	/usr/share/lua/$VER/luarocks/

Arch uses:

	https://archlinux.org/packages/community/any/luarocks/

	usr/share/lua/$VER/luarocks/

slack uses:

https://slackbuilds.org/slackbuilds/14.2/development/luarocks/luarocks.SlackBuild#77

suggests /usr/lib{,64}/ and whatever make install defaults to.

Ubuntu uses:

	https://packages.ubuntu.com/groovy/all/luarocks/filelist

	/usr/share/lua/$VER/luarocks/

[Note: repology.org and wikidata.org link each other for useful package info]

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]


More information about the Cygwin-apps mailing list