From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jul 2 15:40:07 2010 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 BD27E1065674 for ; Fri, 2 Jul 2010 15:40:07 +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 95A638FC1B for ; Fri, 2 Jul 2010 15:40:07 +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 o62Fe7xv065183 for ; Fri, 2 Jul 2010 15:40:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o62Fe7Rq065182; Fri, 2 Jul 2010 15:40:07 GMT (envelope-from gnats) Resent-Date: Fri, 2 Jul 2010 15:40:07 GMT Resent-Message-Id: <201007021540.o62Fe7Rq065182@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, Bapt Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56A24106564A for ; Fri, 2 Jul 2010 15:34:26 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id DF3BF8FC14 for ; Fri, 2 Jul 2010 15:34:25 +0000 (UTC) Received: by wwd20 with SMTP id 20so638925wwd.1 for ; Fri, 02 Jul 2010 08:34:22 -0700 (PDT) Received: by 10.227.151.196 with SMTP id d4mr532443wbw.71.1278084862284; Fri, 02 Jul 2010 08:34:22 -0700 (PDT) Received: from azathoth.lan (stc92-3-82-245-249-89.fbx.proxad.net [82.245.249.89]) by mx.google.com with ESMTPS id a1sm5472089wbb.20.2010.07.02.08.34.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 02 Jul 2010 08:34:21 -0700 (PDT) Received: from root (uid 0) (envelope-from baptiste.daroussin@gmail.com) id cf2a0 by azathoth.lan (DragonFly Mail Agent) Fri, 02 Jul 2010 17:34:20 +0200 Message-Id: Date: Fri, 02 Jul 2010 17:34:20 +0200 From: Bapt To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: lth@FreeBSD.org Subject: ports/148320: [PATCH] net-mgmt/ifgraph: use USERS/GROUPS X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 15:40:07 -0000 >Number: 148320 >Category: ports >Synopsis: [PATCH] net-mgmt/ifgraph: use USERS/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: Fri Jul 02 15:40:07 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Bapt >Release: FreeBSD 8.1-PRERELEASE amd64 >Organization: >Environment: System: FreeBSD azathoth.lan 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #5 r208894M: Tue Jun 8 11:03:27 >Description: Use the USERS/GROUPS Port maintainer (lth@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.99 >How-To-Repeat: >Fix: --- ifgraph-0.4.10_3.patch begins here --- diff -ruN --exclude=CVS /usr/ports/net-mgmt/ifgraph.orig/Makefile /usr/ports/net-mgmt/ifgraph/Makefile --- /usr/ports/net-mgmt/ifgraph.orig/Makefile 2010-03-28 08:41:52.000000000 +0200 +++ /usr/ports/net-mgmt/ifgraph/Makefile 2010-07-02 17:31:59.983407842 +0200 @@ -26,17 +26,14 @@ PKGINSTALL= ${WRKDIR}/pkg-install PKGDEINSTALL= ${WRKDIR}/pkg-deinstall -IFGRAPH_USER= ifgraph -IFGRAPH_GROUP= ifgraph +USERS= ifgraph +GROUPS= ifgraph PLFILES= find-if.pl ifgraph.pl makegraph.pl DOCFILES= CHANGELOG INSTALACAO INSTALL TODO LICENSE.TXT MUDANCAS SUB_FILES= crontab pkg-deinstall pkg-install pkg-message -SUB_LIST= USER=${IFGRAPH_USER} GROUP=${IFGRAPH_GROUP} PERL=${PERL} - -pre-install: - @ ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL +SUB_LIST= USER=${USERS} PERL=${PERL} do-install: .for plfile in ${PLFILES} diff -ruN --exclude=CVS /usr/ports/net-mgmt/ifgraph.orig/files/pkg-deinstall.in /usr/ports/net-mgmt/ifgraph/files/pkg-deinstall.in --- /usr/ports/net-mgmt/ifgraph.orig/files/pkg-deinstall.in 2010-01-24 19:51:29.000000000 +0100 +++ /usr/ports/net-mgmt/ifgraph/files/pkg-deinstall.in 2010-07-02 17:32:59.793172747 +0200 @@ -16,23 +16,4 @@ ;; -POST-DEINSTALL) - echo '---> Starting post-deinstall script:' - - if [ -f %%PREFIX%%/etc/ifgraph.conf -o \ - -d %%PREFIX%%/ifgraph -o \ - -d %%PREFIX%%/var/ifgraph ]; then - echo '---> You seem to have made some custom ifGraph configuration.' - echo '---> - The "%%USER%%" user and "%%GROUP%%" group were therefore not deleted.' - echo '---> - You may delete them with "pw groupdel %%GROUP%%; pw userdel %%USER%%".' - - else - echo '---> Removing group "%%GROUP%%"' - /usr/sbin/pw groupdel -n %%GROUP%% - echo '---> Removing user "%%USER%%"' - echo 'y' | /usr/sbin/pw userdel -n %%USER%% - fi - - ;; - esac diff -ruN --exclude=CVS /usr/ports/net-mgmt/ifgraph.orig/files/pkg-install.in /usr/ports/net-mgmt/ifgraph/files/pkg-install.in --- /usr/ports/net-mgmt/ifgraph.orig/files/pkg-install.in 2010-01-24 19:51:29.000000000 +0100 +++ /usr/ports/net-mgmt/ifgraph/files/pkg-install.in 2010-07-02 17:31:06.306630031 +0200 @@ -6,34 +6,6 @@ PATH=/bin:/usr/bin:/usr/sbin case $2 in - -PRE-INSTALL) - echo "---> Starting pre-install script:" - - if [ -z "%%USER%%" -o \ - -z "%%GROUP%%" ]; then - echo "ERROR: A required pragma was empty" - exit 1 - fi - - if pw showgroup "%%GROUP%%" 2>/dev/null; then - echo "---> Using existing group \"%%GROUP%%\"" - else - echo "---> Adding group \"%%GROUP%%\"" - pw addgroup %%GROUP%% -h - || exit 1 - fi - - # Create user if required - if pw showuser "%%USER%%" 2>/dev/null; then - echo "---> Using existing user \"%%USER%%\"" - else - echo "---> Adding user \"%%USER%%\"" - pw adduser %%USER%% -g %%GROUP%% -h - \ - -s "/sbin/nologin" -c "ifGraph User" || exit 1 - fi - - ;; - POST-INSTALL) echo "---> Starting post-install script:" --- ifgraph-0.4.10_3.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: