On Wed, 24 Feb 2021 09:38:33 -0700, Brian Inglis > 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/
Thank you. Their places for luarocks package itself seem to be almost default with prefix /usr. I've tested luarocks on fedora/opensuse/debian/ubuntu to find out places in which luarocks install rocks and libraries [1]. [1]: https://gitlab.com/test.cases/luarocks-test/-/pipelines/262667066 fedora: using /usr tree https://gitlab.com/test.cases/luarocks-test/-/jobs/1060115707 https://gitlab.com/test.cases/luarocks-test/-/jobs/1060115708 /usr/bin/ /usr/lib64/luarocks/rocks-5.4/ /usr/lib/lua/5.4/ /usr/share/lua/5.4/ opensuse: using /usr tree https://gitlab.com/test.cases/luarocks-test/-/jobs/1060115709 /usr/bin/ /usr/lib64/lua/5.3/ /usr/lib/luarocks/rocks-5.3/ /usr/share/lua/5.3/ debian/ubuntu: using /usr/local tree https://gitlab.com/test.cases/luarocks-test/-/jobs/1060115705 https://gitlab.com/test.cases/luarocks-test/-/jobs/1060115706 https://gitlab.com/test.cases/luarocks-test/-/jobs/1060115710 /usr/local/bin/ /usr/local/lib/luarocks/rocks/ /usr/local/lib/lua/5.1/ /usr/local/share/lua/5.1/ Lem