Review request: sabayon

Mark McLoughlin markmc at redhat.com
Mon Mar 21 08:15:08 UTC 2005


On Sun, 2005-03-20 at 00:11 -1000, Warren Togami wrote:
> Mark McLoughlin wrote:
> > On Sat, 2005-03-19 at 00:27 -1000, Warren Togami wrote:
> > 
> >>Mark McLoughlin wrote:
> > 
> > 
> >>%pre
> >>/usr/sbin/groupadd -r %{name} &>/dev/null || :
> >>/usr/sbin/useradd  -r -s /sbin/nologin -c "Sabayon user" -g %{name} 
> >>%{name} &>/dev/null || :
> >>/usr/sbin/usermod -d "" %{name} &>/dev/null || :
> >>
> >>Have you tested the effect of this during an upgrade from one package to 
> >>another?
> > 
> > 
> > 	Yep, seems fine.
> 
> Seems fine because it redirected the error messages to /dev/null?
> 
> http://fedoraproject.org/wiki/PackagingGuidelines
> "Running scriptlets only in certain situations"
> According to this table %pre is being run during package upgrade.  You 
> probably want to test the parameter to only create accounts in the 
> install case.
> 
> Although I didn't actually test your package, so I may be wrong for some 
> unknown reason.  Please educate me if I am wrong.

	Yes, if the account already exists, useradd and groupadd are failing
silently. I don't really see the problem though - it works. Personally,
I'd be more worried about the account not getting created for some
unforseen reason.

	You'll also note that since we've changed the username, we do want new
user account to be added on upgrade.

	And finally, its only doing what every other package which creates a
user already does.

Cheers,
Mark.




More information about the fedora-extras-list mailing list