Why bundling lua?

Ralf Corsepius rc040203 at freenet.de
Tue Apr 25 18:38:48 PDT 2006


On Tue, 2006-04-25 at 19:47 +0300, Panu Matilainen wrote:
> On Tue, 2006-04-25 at 18:23 +0200, Ralf Corsepius wrote:
> > On Tue, 2006-04-25 at 18:18 +0200, Matthias Saou wrote:
> > > Panu Matilainen wrote :
> > > 
> > > > On Tue, 2006-04-25 at 17:40 +0200, Ralf Corsepius wrote:
> > > > > Hi,
> > > > > 
> > > > > Question: Why does apt-rpm have a copy of lua bundled with it and can't
> > > > > use an external lua instead?
> > > > > 
> > > > > I see apt-pkg/luaiface.h is accessing some private lua header files, but
> > > > > I know too little about lua to be able to understand it.
> > > > 
> > > > Because it's not just an arbitrarily selected script interpreter to run
> > > > external commands at certain points, it's *embedded* in libapt so that
> > > > it can affect update/downgrade etc decisions, alter configuration at
> > > > runtime and such. It simply wouldn't be possible to do those things from
> > > > an external process.
> > > 
> > > I think Ralf was just asking why apt couldn't link against a separate
> > > static lua library.
> > Exactly.
> > 
> > >  AFAIK, lua is only provided as a static library when
> > > build from the original sources, never as a DSO.
> > Right.
> > 
> > > Maybe lua could be removed from the apt tarball, but still embedded at
> > > build time by using the static library provided by the lua-devel package.
> > That's what I am referring to.

> The point in having private copy of Lua is to be able to control the
> version and exactly how it gets built so apt-lua scripts can be expected
> to work identically everywhere.
Well, you will also want to bundle glibc, gcc, libxml2, rpm and a couple
of further packages for the same reasons then :-)

>  For example the embedded Lua in apt
> includes additional rex and posix extensions, if those don't happen to
> be available in the external Lua, script that works on one system
> doesn't anymore work on another.
Yes, ... but ... where is the problem? Check if these features are
available and switch LUA-support off if these features aren't available
in  system's run-time lua-libs or require apt-lua scripts not to use
them. 

Wrt. this lua isn't any different from any other external library.

AFAIU, lua in FE doesn't seem to have these extensions - What is the
reason for doing so?

> > I want to slimdown to tarball and get rid of code, such it doesn't have
> > to be maintained as part of apt-rpm.
> 
> For the reasons above, I'll rather keep the bundled Lua than start
> slimming things for slimmings sake at the expense of consistency, ~1MB
> tarball isn't exactly big in my book to begin with :) 
The problems isn't only size and building speed. 
There also is code quality, security etc.

Ralf
 




More information about the Apt-Rpm mailing list