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

2013-04-01 Thread David Walser
Colin Guthrie mageia@... writes:
 Any other/better thoughts?

Probably not directly relevant, but we haven't done anything with the setup
package since importing IINM, but there have been some changes to it in mdv.
We should check to see if we want those as well.



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

2013-04-01 Thread Colin Guthrie
'Twas brillig, and Thierry Vignaud at 01/04/13 14:37 did gyre and gimble:
 On 1 April 2013 15:24, Colin Guthrie mag...@colin.guthr.ie wrote:
 The setup package contains /etc/group and friends, but when installing a
 chroot, it is not installed until after some packages which require the
 default groups it defines (e.g. sysvinit-legacy-tools requires the tty
 group yet it is installed before setup.


 Now here comes the tricky part... As part of the very first transaction
 which includes filesystem and glibc, dash-static is pulled in.

 dash-static requires the mail group defined by setup package.

 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@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.



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?

Perhaps we could add some kind of rpmfilter thingy to automatically add
this Require(pre)? Is that possible? 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 :)

Col


PS Replying on cauldron as my original mail wasn't really meant for
sysadm list - just me being stupid!


-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


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

2013-04-01 Thread Thierry Vignaud
On 1 April 2013 16:39, David Walser luigiwal...@yahoo.com wrote:
 Colin Guthrie mageia@... writes:
 Any other/better thoughts?

 Probably not directly relevant, but we haven't done anything with the setup
 package since importing IINM, but there have been some changes to it in mdv.
 We should check to see if we want those as well.

there's nothing related to this there


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

2013-04-01 Thread Thierry Vignaud
 On 1 April 2013 17:54, Colin Guthrie mag...@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@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 :)


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

2013-04-01 Thread Thierry Vignaud
On 1 April 2013 18:36, Thierry Vignaud thierry.vign...@gmail.com wrote:
 dash-static requires the mail group defined by setup package.

 For which file?
 I failed to see that.

actually it's the filesystem package that is bogus:
drwxr-xr-x2 root daemon   4096 Gen  11 21:34 /var/spool/lpd
drwxrwxr-x2 root mail 4096 Gen  11 21:34 /var/spool/mail

you got bitten by the off by one issue due to %pretrans meaning rpm runs
open_callback more than we though

so forget about glibc's scriptlets


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

2013-04-01 Thread Thierry Vignaud
On 1 April 2013 22:19, Colin Guthrie mag...@colin.guthr.ie wrote:
 actually it's the filesystem package that is bogus:
 drwxr-xr-x2 root daemon   4096 Gen  11 21:34 /var/spool/lpd
 drwxrwxr-x2 root mail 4096 Gen  11 21:34 /var/spool/mail

 you got bitten by the off by one issue due to %pretrans meaning rpm runs
 open_callback more than we though

 so forget about glibc's scriptlets

 Ha! So it is :)

 So should the plan be to make setup's scripts run via dash-static and
 not use rpm-helper scripts and deal gracefully with non-existing
 binaries etc.?

 Then filesystem can require setup and all will be well in the world
 (other than the general draklive problem where groups are somehow not
 honoured by rpm when installing in the chroot)

Already fixed as part of bug #9326

setup's scriptlets were archeological remanants of mdv2007.
I've killed them for now.
If needed, they can be restored either by spliting setup-basesystem
(https://bugs.mageia.org/show_bug.cgi?id=9326#c19)
or by converting them to lua as suggested by you.


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

2013-04-01 Thread David W. Hodgins

On Mon, 01 Apr 2013 16:56:40 -0400, Thierry Vignaud thierry.vign...@gmail.com 
wrote:


setup's scriptlets were archeological remanants of mdv2007.
I've killed them for now.
If needed, they can be restored either by spliting setup-basesystem
(https://bugs.mageia.org/show_bug.cgi?id=9326#c19)
or by converting them to lua as suggested by you.


As the posttrans scriptlet no longer runs
pwconv 2/dev/null /dev/null  || :
grpconv 2/dev/null /dev/null  || :
what is supposed to create /etc/shadow and /etc/gshadow?

Regards, Dave Hodgins


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

2013-04-01 Thread Thierry Vignaud
On 2 April 2013 02:19, David W. Hodgins davidwhodg...@gmail.com wrote:
 setup's scriptlets were archeological remanants of mdv2007.
 I've killed them for now.
 If needed, they can be restored either by spliting setup-basesystem
 (https://bugs.mageia.org/show_bug.cgi?id=9326#c19)
 or by converting them to lua as suggested by you.


 As the posttrans scriptlet no longer runs
 pwconv 2/dev/null /dev/null  || :
 grpconv 2/dev/null /dev/null  || :
 what is supposed to create /etc/shadow and /etc/gshadow?

moved to basesystem-minimal