[Rpm-ecosystem] lua, unprivileged rpm, and rpm-ostree

Miroslav Suchý msuchy at redhat.com
Thu Aug 11 21:52:03 UTC 2016


Dne 11.8.2016 v 19:39 Colin Walters napsal(a):
>> There is a very important reason for Lua: it's the only way to do
>> > scripts without requiring an external interpreter. For packages that
>> > are part of the minimal rootfs required for building packages or
>> > creating containers or whatnot, this is critical in order to prevent a
>> > circular dependency error (package requires /bin/bash but bash isn't
>> > installed and can't be installed until the package is installed
>> > first). So, we do need it.
> Yeah, this is a rationale on the http://www.rpm.org/wiki/PackagerDocs/RpmLua
> page.  But I can't think of a reason to ensure that at least everything
> up to bash can be "installed" by simply unpacking.  At that level the only
> script that comes into play is ldconfig, which one can just run after.

Well, the main reason are %pretrans scripts. They are executed before 
transaction start. And when you are preparing buildroot or when you 
install new bare metal machine, there is no shell.

Such scriptlets are usually used to support upgrades from some previous 
version, where you made some error (remember you cannot change anything 
in packages you already released and which are already installed on some 
machines). Example can be package httrack.

You cannot use bash (to support new clean install) and you cannot omit 
this script (to support upgrades of older versions).

-- 
Miroslav Suchy, RHCA
Red Hat, Senior Software Engineer, #brno, #devexp, #fedora-buildsys


More information about the Rpm-ecosystem mailing list