Subject: Re: Group/user ids in packages
To: None <tech-pkg@netbsd.org>
From: Krzysztof Raczkowski <raczkow@prz.edu.pl>
List: tech-pkg
Date: 04/06/2006 10:57:59
Johnny Lam napisa=B3:

> We don't support this generally in pkgsrc; however, you can force
> particular uids and gids to be used when creating the users and group=
s
> by setting PKG_USERS and PKG_GROUPS appropriately.  In your case abov=
e,
> you could modify postfix/Makefile and use the following settings:
>=20
> # Force gid 101 for the "postfix" group.  We don't care about a
> # specific gid for the "maildrop" group.
> #
> PKG_GROUPS=3D  postfix:101 maildrop
>=20
> # Force uid 55001 for the "postfix" user.
> PKG_USERS?=3D  postfix:postfix:55001:Postfix\ User:${POSTFIX_QUEUE_DI=
R}

Is it going to work also in apache?
APACHE_USER?=3D           www:555
APACHE_GROUP?=3D          www:555

Is this corrent?

If I can achieve my goal my editing all Makefiles in packages that crea=
te
new users, I will be satisfied with this workaround. But it would be gr=
eat
if pkgsrc could have supported this without any manual modification.

> If the users and groups already exist on the machine, then these have=
 no
> effect, and the package will use the pre-existing uids and gids
> allocated for these users and groups on the system.

Yes, it is. And that's obvious for me.

> If there was a true desire by admins for this to be generally tunable=
, I
> suppose I would extend the pkginstall framework to allow PKG_UID.<use=
r>
> and PKG_GID.<group> variables to easily set these values.  Do people
> really want this?

You've got my vote for "YES". I hope I am not alone ;-)

--=20
Krzysztof Raczkowski
raczkow@prz.edu.pl