lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


G'day,

[Totally unrelated "Last Programming Language" side-note:  My first
language (via a program available to high-school students) was APL,
second was PL/I, and... "Yuck!" BASIC was third.  I also note that
others used Logo, with a real physical "turtle" available... and
found out many years later that it was programmed in Lisp.  The
Lisp->Scheme->Lua connections have influenced me since, along with
a mild Modula-2 overlay added as a nod towards literate
programming.]

Okay, on to the subject line:  Various LuaRocks that help
SysAdmins.

I use the GRML (https://grml.org/) live boot "Linux for Geeks"
small Debian (Ubuntu?)-based Distro, for various work, but
especially for backups.  GRML specialises in giving tools that
are command-line, system (disk) recovery, or forensics-based,
It comes in 32-bit/64-bit/96 (32+64 bit) architecture variants,
along with "small" (no X-windows/FluxBox window manager) and
"full" variants.  Most variants, except especially grml96-full,
are small enough to fit on a CD; the images are set up that
simply copying the .iso image verbatim to a USB key device
results in a bootable USB key.

The most recent release of GRML is 2020.06.  It does not
include Lua.

I've tailored GRML to include Lua and LuaRocks binaries, so that
I can write scripts that are fully automated.  Due in various
reasons, but including the fact that Gentoo Linux does not
support later versions in its package manager, I'm limiting
myself to Lua 5.1.

I would like to propose to the GRML team that Lua, LuaRocks,
and a selected set of "GRML-goals-compatible" Rocks be added
to GRML, so that I do not need to form a tailored GRML image
myself...

... But what Rocks are most appropriate?...

At present, I'm running with a list that is has some sanity,
but sometimes is rather arbitrary.  I would appreciate
suggestions on a more cohesive "Lua and LuaRocks with
GRML-friendly SysAdmin+Command-line Batteries" set of Rocks
to use.

At present, I'm using the following Rocks:  Some are included
because they are dependencies of other Rocks (e.g.
luafilesystem):

        bit32
        ldoc
        luafilesystem
        luaposix
        luasec
        luasocket
        markdown
        md5
        openssl
        penlight
        sha1
        sha2
        std._debug
        std.normalize
        std.strict

(Plus one semi-Rock of my own, as a value-added variant of
an old version of luaposix:

        PosixExec.lua
)

I can already think of some candidates:  JSON and XML parsers,
as partners to the other tools in the GRML toolkit that can
output in a structured format.  (Another thought:  LDAP?)

PosixExec is especially valuable, as the first-word command
is found using the Shell PATH, but all other parameters are
in an array table, and are not subject to any interpretation
by the shell in any way whatsoever -- this helps with
eliminating code injection; occasional downsides include
having to to filename globbing by hand.  By contrast,
"io.popen" hands its entire path to the shell -- this is more
flexible, but leaves potentially unwanted shell
expansions/substitutions/globbing/pipes etc. open.

So, I would like to tap into the experience base of the Lua
list:  What Rocks would you especially find useful in
system-administrator/rescue/forensics (perhaps including
network diagnostics) settings, perhaps as a partner to a Distro
such as GRML?

Thanks in advance for any suggestions... and hopefully, over
time, a list can accumulate... this list would perhaps be a
candidate for the Lua Wiki.

cheers,

sur-behoffski (Brenton Hoff)
programmer, Grouse Software