From owner-freebsd-ports@FreeBSD.ORG Sun Dec 18 16:17:20 2011 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92D4D106566C for ; Sun, 18 Dec 2011 16:17:20 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 654FC8FC15 for ; Sun, 18 Dec 2011 16:17:20 +0000 (UTC) Received: by iadj38 with SMTP id j38so4696727iad.13 for ; Sun, 18 Dec 2011 08:17:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=ggnJBxmTkpdo2CjVNGy8r7F+2MFb6j3Co8SbJhI2hiA=; b=gkHPSmhbSpWf+QjJpJ/+T83uPQBp7uI7rrJJFsENASzrfTDzf4oRZYFMQQDDlah1nx Ics7E4uaVpOQAbf3HrNF1ow8L6Bc4UngLFWpDs/rqXjz1KwrXYcqr64hv0k4DVGUltuq daUdLXihkEPUMGfl48rp1FnA6KrujtBrlrWTA= Received: by 10.50.171.5 with SMTP id aq5mr21517872igc.76.1324225039323; Sun, 18 Dec 2011 08:17:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.199.18 with HTTP; Sun, 18 Dec 2011 08:16:48 -0800 (PST) From: Chris Rees Date: Sun, 18 Dec 2011 16:16:48 +0000 Message-ID: To: ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Using customised usernames in ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 16:17:20 -0000 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