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

Neal Gompa ngompa13 at gmail.com
Fri Aug 12 12:27:20 UTC 2016


On Fri, Aug 12, 2016 at 8:19 AM, Colin Walters <walters at verbum.org> wrote:
>
>
> On Thu, Aug 11, 2016, at 05:52 PM, Miroslav Suchý wrote:
>
>> 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,
>
> Your two paragraphs here conflict - if you're doing a new install, there
> is nothing to upgrade from, hence we don't need to execute %pretrans.
> If you're doing an upgrade, you have bash already.

RPM executes %pretrans scriptlets on initial chroot builds too. These
are the scriptlets that tend to bite us hard when they are written in
shell script. To some extent, it could be avoided if the transaction
handler detected initial setup and broke the transaction down into
smaller ones so that the base environment to run bash would be
available (as Zypper and urpmi can do), but Yum has never done that,
and DNF doesn't currently either[1], and it still wouldn't avoid the
need for Lua scriptlets.

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1032541



-- 
真実はいつも一つ!/ Always, there's only one truth!


More information about the Rpm-ecosystem mailing list