Mailing List Archive

State of Lua in Gentoo, Part Two
Hello.

There have been discussions about the status of the Lua in Gentoo
earlier[1][2][3], but they have not led to any progress: we are still
stuck on Lua 5.1, which is approaching to EOL. And there almost ready
lua 5.4 on the sight... I would like to return to the discussion of
the problems with the Lua, which over a period of more than 7 years
have accumulated quite a lot.

Firstly, an assembly system is needed that would allow adapt new
versions of lua without heavy patchwork. I suggest using one of the
options that other distributions already use - for example, RedHat use
autotools[4], we can adapt their works or write our own, for example,
on cmake or meson.

Secondly, we need to make the lua available in the system as a regular
dependency for other packages. Here I also suggest to use working of
RedHat and Debian, which offer a rather convenient mechanism through
the pkg-config, which we also have, but in a broken state.

It is also important to keep in mind that in a lua there are the
concepts of LMOD (pure lua modules that depend only on it, install
path is /usr/share/lua/5.{1,2,3}) and CMOD (modules that require
external dependencies and install shared libraries, install path is
/usr/lib/lua/5.{1,2,3}). This smoothly takes us to the third question
- slotting the package. The current implementation is broken by
design; it does not implement a coherent hierarchy, all dependent
packages will instantly broke. Also, it does not solve the problem of
smooth migration between major versions. We need a lua.eclass, like a
ruby or a python, which could fully manage slotted versions.

The final question is the migration of the current lua package
ecosystem. There are not many of them in the repository (I mean
directly the lua modules, there about 40 dev-lua/* packages in
desperate state), so we can relatively easily migrate them. There is
also a Luarocks[5] package manager in lua, which we could adapt to our
future ecosystem.


[1] https://archives.gentoo.org/gentoo-dev/message/49b75e2dfa21d1a72c9531a9054389dd
[2] https://archives.gentoo.org/gentoo-dev/message/c1dbc4a812dd41bfce9abd165ac9cf39
[3] https://archives.gentoo.org/gentoo-dev/message/489dd050913744a35aa1e8df5d43c85a
[4] https://git.centos.org/rpms/lua/blob/c8/f/SOURCES
[5] https://luarocks.org/

--
From Siberia with Love!