[Mageia-dev] [Mageia-sysadm] setup package not installed until quite late on...

Thierry Vignaud thierry.vignaud at gmail.com
Mon Apr 1 18:36:41 CEST 2013


 On 1 April 2013 17:54, Colin Guthrie <mageia at colin.guthr.ie> wrote:
>>>> dash-static requires the "mail" group defined by setup package.

For which file?
I failed to see that.

>>>> So really glibc requires dash-static which requires setup which requires
>>>> glibc and shadow-utils and run-parts...
>>>>
>>>> Do we really want to add this loop?
>>>>
>>>> I'd suggest we should rejig setup to not have a hard require on glibc,
>>>> shadow-utils and run-parts but still run it's current scripts if the
>>>> needed binaries/tools are installed (i.e. on package upgrade) and then
>>>> rejig dash-static to Require(pre): setup. This should ensure things are
>>>> installed properly (I think - although not sure how this will affect the
>>>> initial transaction split...)
>>>>
>>>> Any other/better thoughts?
>>
>> rewrite glibc scriptlets in lua instead of sh
>> See http://www.rpm.org/wiki/PackagerDocs/RpmLua
>
> The glibc scriptlets don't seem to really *need* dash-static anyway...
>
> [root at jimmy ~]# rpm -q --scripts glibc| grep dash
> preinstall scriptlet (using /usr/bin/dash.static):
>
>
> So it's only the preinst script. That should be trivial to rewrite in lua.

No as %post is indeed run wih glibc-post-wrapper as interpreter...
But glibc-post-wrapper uses ash.static after running ldconfig...
So %post should be done in lua too, and thus glibc-post-wrapper should
be run from within lua instead of being the %post script interpreter

> OK, so that does avoid the loop, but....... should we still try to work
> out a nice way to get "setup" (and thus the default groups that packages
> may use) installed early or is it just a housekeeping job to make sure
> packages Require(pre) setup package if they want to use the users
> defined in it?

I would say the later but it's obvious it's prone to error, so maybe making it
be installed early with filesystem & glibc (thus having one bigger transaction
at first).
Which is not appealing but can be an acceptable solution.
On the other hand, "Anything not packaged as root.root should requires setup"
is a bit obviouslyoverkill...

> Perhaps we could add some kind of rpmfilter thingy to automatically add
> this Require(pre)? Is that possible?

I suppose it's supposed to do in rpm-setup.
However that will make more requires to process by urpmi and thus
bigger synthesis.

> If so then it might also be
> possible to write similar automatic Require(pre,post,etc) to packages
> using rpm-helper stuff too... that would be be quire nice and reduce the
> packaging burden :)


More information about the Mageia-dev mailing list