Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Dec 2011 16:16:48 +0000
From:      Chris Rees <utisoft@gmail.com>
To:        ports@freebsd.org
Subject:   Using customised usernames in ports
Message-ID:  <CADLo83_-oJ4gqJa7A26Xm0Ywrb3yEBONbz7dgyS26n7GYBP6nw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all,

Since we've stopped using pkg-install scripts and started using USERS=
and GROUPS= to create users and groups we've lost the ability to
provide an alternative username/groupname for the port to install
with.

It's still possible to do for a port (ex postgresql):

PG_USER?= pgsql

USERS= ${PG_USER}

but if PG_USER is set to something different, a new line in
/usr/ports/UIDs must be added to match it, and put back every time the
port is upgraded.

The patch at [1] will allow a username already existing on the system
to be used instead, so it'll be easy enough for the end user to create
the user and group then set the PG_USER (or whatever) in make.conf,
and packages will also be built using the correct user.

Thanks to brooks@ for pointing out the use of getent.

Comments?

Chris

[1] http://www.bayofrum.net/~crees/patches/bsd-port-mk-users-existing.diff



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83_-oJ4gqJa7A26Xm0Ywrb3yEBONbz7dgyS26n7GYBP6nw>