tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Permit existing users/groups
* On 2013-06-13 at 21:46 BST, David Holland wrote:
> On Wed, Jun 12, 2013 at 04:59:49PM +0100, Jonathan Perkin wrote:
> > Currently, if:
> >
> > * PKG_UID or PKG_GID are specified
> > * the user/group already exists
> > * the existing uid/gid do not match PKG_UID/PKG_GID
> >
> > the failure mode is pretty rough, the package will be left in a
> > half-limbo state whilst pkg_add will continue to try installing
> > further packages which fail in weird and wonderful ways.
>
> Blah.
I should point out that half of this failure mode is my fault, our
patched pbulk didn't exit properly on pkg_add failure.
However, it's still a bug that pkg_add doesn't correctly handle
+INSTALL scripts failing.
> > I'd like to fix this, and to also provide a user-defined option which
> > configures how pkg_install should proceed when provided a static
> > uid/gid which conflicts with the existing system.
>
> Well... since in general packages shouldn't provide static uids and
> gids, and when they do it's because a defective configure or build
> process has compiled in the numbers, it seems to me there's no reason
> for configurable behavior here; it should just fail.
>
> If there are packages that do this that specifically cause problems,
> we can always try to fix them.
No, it has nothing to do with that. pkgsrc supports providing static
uid/gid allocations for packages via PKG_{UID,GID}.PKGNAME, and we use
that at Joyent to ensure that all pkgsrc users are created in a
certain range (top down from 999), leaving 1000+ for users.
This ensures that our users have consistency across their machines,
however we want to still provide fallback in situations where either
the name or id is already allocated.
This also helps to ensure our packages are portable across all illumos
distributions, where - for example - the distribution might still
include an 'lp' user which will conflict with cups from pkgsrc.
--
Jonathan Perkin - Joyent, Inc. - www.joyent.com
Home |
Main Index |
Thread Index |
Old Index