lua-users home
lua-l archive

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


It was thus said that the Great Kevin Martin once stated:
> 
> I think something like this is a great idea, and is the way to move
> forward in distributing Lua Software. We have a similar system that uses
> an SQLite3 database as opposed to zip files, and a custom Lua executable
> that knows how to load them.

  Yeah, it sounds like it would be easier to import/export Lua scripts into
SQLite3 than a ZIP file.  I was a bit surprised at just how ... lacking,
some of the zip libraries are.

> Our applications are then very simple script files that look like
> 
> #!/path/to/custom/lua
> --instructions of how to find sqlite3 file
> --and custom configuration information for this application deployment
> 
> I see that you load your shared objects by using package.loadlib after
> saving the file in /tmp. Unfortunately, in Linux, /tmp is normally mounted
> noexec, as is every other spot in the filesystem you can write to. I'd be
> interested in any thoughts people have as how to solve this. We have yet
> to come up with a nice way to extract and load shared objects on the fly.

  I don't think I've encountered a system with a noexec mounted /tmp
directory---perhaps I haven't worked in paranoid-enough companies to
encounter such restrictions.

  But unfortunately, doing a dlopen() on a region of memory requires a
custom dlopen() function.

  -spc (But in LEM, Lua files are loaded directly from memory)