public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin-apps@cygwin.com
Subject: Re: Multiple version of Lua with alternatives
Date: Wed, 24 Feb 2021 09:38:33 -0700	[thread overview]
Message-ID: <42e545cf-2a49-f5e2-f75b-0f9ed7f2ac7a@SystematicSw.ab.ca> (raw)
In-Reply-To: <20210224200321.589E.50F79699@gmail.com>

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.]

  reply	other threads:[~2021-02-24 16:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 10:06 [PATCH cygport] A patch to add a flag __SKIP_LIST_DEPS_LUA Lemures Lemniscati
2021-01-15 20:02 ` Achim Gratz
2021-01-15 23:16   ` Lemures Lemniscati
2021-01-16  6:50     ` ASSI
2021-01-17  1:20       ` Lemures Lemniscati
2021-01-17  6:59         ` Achim Gratz
2021-01-18  9:20           ` Lemures Lemniscati
2021-02-15 15:12           ` Multiple version of Lua with alternatives Lemures Lemniscati
2021-02-20  7:40             ` Achim Gratz
2021-02-20 10:15               ` Lemures Lemniscati
2021-02-22 22:14                 ` Multiple versions " Lemures Lemniscati
2021-02-24  4:18                 ` Multiple version " Lemures Lemniscati
2021-02-24  5:20                   ` Marco Atzeri
2021-02-24  6:53                     ` Brian Inglis
2021-02-24 11:03                       ` Lemures Lemniscati
2021-02-24 16:38                         ` Brian Inglis [this message]
2021-02-27  8:13                           ` Lemures Lemniscati
2021-02-27 12:32                             ` Achim Gratz
2021-02-28  9:34                               ` Lemures Lemniscati
2021-03-01 11:26                                 ` Lemures Lemniscati

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42e545cf-2a49-f5e2-f75b-0f9ed7f2ac7a@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).