On 2 October 2015 at 15:07, Eric Sproul <eric.spr...@circonus.com> wrote:
> Hi,
> I'm new to the Lua universe, having been asked to help bring support
> for LuaRocks into our product development process.  I'm a release
> engineer with Circonus, and we run a SaaS monitoring/trending/analysis
> platform which embeds Lua in a couple of key components.  We also sell
> a private, on-premise version of the product for larger enterprises to
> operate for themselves.  For this reason, everything we require for a
> SaaS install has to be delivered as an OS package.
>
> I've been trying to understand how a rock gets installed on the system
> and grapple with how we might translate that into a package.

> What I'm
> wondering about is the function of the manifest file,

Serving as a database for installed packages, so that both `luarocks`
command-line commands work (i.e., can list what's already installed
and resolve dependencies) and the optional "luarocks.loader" package
loader is able to resolve dependencies.

> and whether
> luarocks supports a concept like Perl's MakeMaker "pure install",
> which avoids creating a local log of what was installed.

No, but one can do a self-contained install using --tree to point to
an arbitrary directory, ensuring all changes are self-contained.

> The point is
> that end users won't be running luarocks themselves to install rocks--
> they'll do a package install instead, and the rocks dependencies will
> be translated into package dependencies.  This avoids having to have a
> full build environment on every system, and eliminates the need to
> reach out to various internet sources, which isn't possible for most
> of our on-premise environments.

There are several approaches that could be used here. One of them
would be to use luarocks strictly as a build tool, have it generate
.rock files (they are relocatable by design) and then extract their
contents (they are a zip file) and produce native packages. This is a
mechanically automatable process. Look at flags such as --tree,
--deps-mode and the `luarocks pack` and `luarocks unpack` commands.

A downside is that users won't be able to use LuaRocks themselves (ie,
including their own rocks installed in their home directories and
having those point to dependency rocks installed system-wide). A way
to solve this is to install files with your tool mirroring the setup
of files as installed by LuaRocks and then run `luarocks-admin
make-manifest` to regenerate the global manifest (in your post-install
hook or equivalent).

> I hope that makes sense, and if anyone here is familiar with how other
> OSes (if any) package rocks, I'd love to know more about it.  It looks
> like Ubuntu delivers some Lua modules (penlight, filesystem, etc.) but
> they don't appear to be using luarocks to do it.  Color me confused...
> :)

Ubuntu packages are the Debian packages, using a methodology which
predates LuaRocks. Homebrew, for Mac OSX, for instance, currently
bundles LuaRocks with their Lua package, AFAIK.

-- Hisham

------------------------------------------------------------------------------
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to