Gentoo Archives: gentoo-dev

From: Samuli Suominen <ssuominen@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: enewuser should force updates to shell and home
Date: Wed, 13 Jun 2012 18:27:50
In Reply to: Re: [gentoo-dev] RFC: enewuser should force updates to shell and home by Mike Gilbert
On 06/13/2012 09:18 PM, Mike Gilbert wrote:
> On 6/13/2012 12:00 PM, Ian Stakenvicius wrote: >> Hey all - I'd like to propose that enewuser forces updates to a user's >> home dir and shell whenever it is called, so that if this changes with >> new versions of an ebuild it is dealt with automatically rather than >> having to modify them in pkg_postinst/pkg_setup directly. >> > > Can you give an example of a case where modifying the home directory > and/or shell is necessary? I don't really understand how this is useful.
package-1.2.3.ebuild creates user foobard with group foobard and sets home to /dev/null bug gets filed against package-1.2.3.ebuild that foobard needs a home or it won't execute itself, and the maintainer changes the home to be /var/lib/foobard in package-1.2.3-r1.ebuild no change happens to passwd and the package continues to fail to run at all like sed -i -e '/^foobard/s:/dev/null:/var/lib/foobard' "${ROOT}"/etc/passwd in pkg_postinst() doesn't seem very nice solution :/
> > Also, grobian raised a good point in that the sysadmin may have changed > it manually. It might be better to ewarn and make the user deal with it. >
i'd prefer argument to force the update, when the problem hits something that 99,98% of users have installed, like sys-auth/polkit, an ewarn is not adequate - Samuli