Subject: Re: creating user before configuration starts
To: Lubomir Sedlacik <>
From: Alistair Crooks <>
List: tech-pkg
Date: 05/21/2002 19:44:04
On Tue, May 21, 2002 at 07:13:09PM +0200, Lubomir Sedlacik wrote:
> On Tue, May 21, 2002 at 07:52:48PM +0200, Hannes Frederic Sowa wrote:
> > I need to create a user before the configuration of the port starts.
> > My Makefile:
> > 
> > pre-configure:
> >        ${GROUPADD} vchkpw;                               \
> >        ${USERADD} -g vchkpw -d ${VPOPMAILDIR} vpopmail;  \
> > 
> > There will be also a notfication for that in DEINSTALL and MESSAGE.
> > 
> > Would that be acceptable or is there a better method to do that?
> check mail/qmail-users and mail/qmail how to do it better way.

Actually, I believe that qmail and qmail-users don't need the uid until
package install time, and so they use the PKG_USERS/PKG_GROUPS mechanism,
in conjuntion with

The canonical example of a package which creates the user before building
is pkgsrc/mail/majordomo.

Please note that people normally build in pkgsrc as normal users, and then
a just-in-time su(1) is done at installation time (this is different to the
way that FreeBSD used, last I looked). And so special measures need to be
taken at configure time for majordomo.