From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Oct 5 20:09:38 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC9EE1065674 for ; Wed, 5 Oct 2011 20:09:37 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C9DD98FC19 for ; Wed, 5 Oct 2011 20:09:37 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p95K9bIq058406 for ; Wed, 5 Oct 2011 20:09:37 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p95K9bEb058405; Wed, 5 Oct 2011 20:09:37 GMT (envelope-from gnats) Resent-Date: Wed, 5 Oct 2011 20:09:37 GMT Resent-Message-Id: <201110052009.p95K9bEb058405@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Chris Rees Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25277106566C for ; Wed, 5 Oct 2011 19:31:38 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EFB2E8FC0C for ; Wed, 5 Oct 2011 19:31:37 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p95JVbR6078362 for ; Wed, 5 Oct 2011 19:31:37 GMT (envelope-from crees@freefall.freebsd.org) Received: (from crees@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p95JVbKS078358; Wed, 5 Oct 2011 19:31:37 GMT (envelope-from crees) Message-Id: <201110051931.p95JVbKS078358@freefall.freebsd.org> Date: Wed, 5 Oct 2011 19:31:37 GMT From: Chris Rees To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/161311: mail/postgrey should use USERS and GROUPS X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Chris Rees List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2011 20:09:38 -0000 >Number: 161311 >Category: ports >Synopsis: mail/postgrey should use USERS and GROUPS >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Oct 05 20:09:37 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Chris Rees >Release: FreeBSD 8.2-STABLE i386 >Organization: >Environment: System: FreeBSD freefall.freebsd.org 8.2-STABLE FreeBSD 8.2-STABLE #4 r220774: Mon Apr 18 13:56:14 UTC 2011 simon@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386 >Description: postgrey creates users and groups the 'old-fashioned' way with pkg-install.in. This patch brings it in line with new policy, so that it uses the USERS and GROUPS hooks. >How-To-Repeat: >Fix: --- postgrey.diff begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/mail/postgrey/Makefile,v retrieving revision 1.28 diff -u -r1.28 Makefile --- Makefile 2 Oct 2011 14:17:54 -0000 1.28 +++ Makefile 5 Oct 2011 19:28:53 -0000 @@ -35,6 +35,9 @@ PGY_GROUPNAME?= ${PGY_USERNAME} PGY_GROUPID?= ${PGY_USERID} PGY_DIR?= /var/db/postgrey + +USERS= ${PGY_USERNAME} +GROUPS= ${PGY_USERID} MAN1= ${PORTNAME}.1 policy-test.1 postgreyreport.1 post-patch: Index: files/pkg-install.in =================================================================== RCS file: /home/pcvs/ports/mail/postgrey/files/pkg-install.in,v retrieving revision 1.1 diff -u -r1.1 pkg-install.in --- files/pkg-install.in 27 Jun 2007 21:13:24 -0000 1.1 +++ files/pkg-install.in 5 Oct 2011 19:28:53 -0000 @@ -16,23 +16,6 @@ exit 1 fi - # Create group if required - if pw group show "%%GROUP%%" >/dev/null 2>&1; then - echo "---> Using existing group \"%%GROUP%%\"" - else - echo "---> Adding group \"%%GROUP%%\" (%%GID%%)" - /usr/sbin/pw groupadd %%GROUP%% -g %%GID%% || exit 1 - fi - - # Create user if required - if pw user show "%%USER%%" >/dev/null 2>&1; then - echo "---> Using existing user \"%%USER%%\"" - else - echo "---> Adding user \"%%USER%%\" (%%UID%%)" - pw useradd "%%USER%%" -u "%%UID%%" -g "%%GROUP%%" -h - \ - -d "%%POSTGREYDIR%%" -s "/sbin/nologin" -c "Postgrey Owner" || exit 1 - fi - # Create home directory if required if [ -d "%%POSTGREYDIR%%" ]; then echo "---> Using existing Postgrey database directory (%%POSTGREYDIR%%)" --- postgrey.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: