From nobody@FreeBSD.org  Wed Dec 15 02:10:10 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 305A9106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 Dec 2010 02:10:10 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 18E958FC17
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 Dec 2010 02:10:10 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oBF2A9x8052215
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 Dec 2010 02:10:09 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oBF2A9NE052214;
	Wed, 15 Dec 2010 02:10:09 GMT
	(envelope-from nobody)
Message-Id: <201012150210.oBF2A9NE052214@red.freebsd.org>
Date: Wed, 15 Dec 2010 02:10:09 GMT
From: Corey Smith <corsmith@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [MAINTAINER UPDATE] net-mgmt/torrus: 1.0.9 to 1.0.9_1
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         153162
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE] net-mgmt/torrus: 1.0.9 to 1.0.9_1
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 15 02:20:08 UTC 2010
>Closed-Date:    Wed Dec 22 21:59:32 UTC 2010
>Last-Modified:  Wed Dec 22 22:00:25 UTC 2010
>Originator:     Corey Smith
>Release:        8.1-RELEASE
>Organization:
>Environment:
FreeBSD host 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Tue Nov 16 13:55:37 EST 2010     root@host:/usr/src/sys/amd64/compile/CUSTOM  amd64

>Description:
Maintainer update to torrus 1.0.9_1

This revision fixes some inconsistencies between the port and package installs regarding directory permissions and user/group creation.  This revision also allows torrus to support multiple threads if the installed perl supports it.
>How-To-Repeat:
Patch attached
>Fix:
Patch attached

Patch attached with submission follows:

diff -urN torrus-1.0.9/Makefile torrus/Makefile
--- torrus-1.0.9/Makefile	2010-11-26 06:16:34.000000000 -0500
+++ torrus/Makefile	2010-12-14 13:49:50.270310278 -0500
@@ -7,6 +7,7 @@
 
 PORTNAME=	torrus
 PORTVERSION=	1.0.9
+PORTREVISION=	1
 CATEGORIES=	net-mgmt
 MASTER_SITES=	SF
 
@@ -42,8 +43,7 @@
 		pkgdocdir=${DOCSDIR} \
 		exmpdir=${EXAMPLESDIR} \
 		perllibdir=${SITE_PERL} \
-		scriptsdir=${PREFIX}/libexec/torrus/scripts \
-		--enable-pkgonly
+		scriptsdir=${PREFIX}/libexec/torrus/scripts
 
 MAN1=		torrus.1 torrus_acledit.1 torrus_buildsearchdb.1 \
 		torrus_cleanup.1 torrus_clearcache.1 torrus_collector.1 \
@@ -60,13 +60,13 @@
 
 .include <bsd.port.pre.mk>
 
-pre-install:
-	@if ! pw groupshow ${TORRUS_USER}; then \
+pre-configure:
+	@if ! pw groupshow ${TORRUS_USER} >/dev/null 2>&1; then \
 		pw groupadd ${TORRUS_USER}; \
 	fi
-	@if ! pw usershow ${TORRUS_USER}; then \
+	@if ! pw usershow ${TORRUS_USER} >/dev/null 2>&1; then \
 		pw useradd ${TORRUS_USER} -g ${TORRUS_USER} \
-			-h - -d ${PREFIX}/torrus -c "torrus daemon"; \
+			-h - -d /var/torrus -c "torrus daemon"; \
 		pw usermod www -G ${TORRUS_USER}; \
 	fi
 
diff -urN torrus-1.0.9/pkg-plist torrus/pkg-plist
--- torrus-1.0.9/pkg-plist	2010-11-26 06:16:34.000000000 -0500
+++ torrus/pkg-plist	2010-12-14 16:47:23.777743071 -0500
@@ -269,6 +269,11 @@
 %%SITE_PERL%%/Torrus/SQL/SrvExport.pm
 %%SITE_PERL%%/Torrus/SQL.pm
 %%SITE_PERL%%/Torrus/TimeStamp.pm
+@exec if ! pw groupshow %%TORRUS_USER%% >/dev/null 2>&1; then pw groupadd %%TORRUS_USER%%; fi
+@exec if ! pw usershow %%TORRUS_USER%% >/dev/null 2>&1; then pw useradd %%TORRUS_USER%% -g %%TORRUS_USER%% -h - -d /var/torrus -c "torrus daemon"; pw usermod www -G %%TORRUS_USER%%; fi
+@unexec if pw groupshow %%TORRUS_USER%% >/dev/null 2>&1; then pw groupdel %%TORRUS_USER%%; fi
+@unexec if pw usershow %%TORRUS_USER%% >/dev/null 2>&1; then pw userdel %%TORRUS_USER%%; fi
+@exec install -d -g %%TORRUS_USER%% -o %%TORRUS_USER%% -m 2775 /var/log/torrus 2>/dev/null || true
 @exec install -d -g %%TORRUS_USER%% -o %%TORRUS_USER%% -m 755 /var/torrus 2>/dev/null || true
 @exec install -d -g %%TORRUS_USER%% -o %%TORRUS_USER%% -m 2775 /var/torrus/cache 2>/dev/null || true
 @exec install -d -g %%TORRUS_USER%% -o %%TORRUS_USER%% -m 2775 /var/torrus/collector_rrd 2>/dev/null || true
@@ -321,4 +326,3 @@
 @dirrm %%SITE_PERL%%/Torrus/Collector
 @dirrm %%SITE_PERL%%/Torrus/ACL
 @dirrm %%SITE_PERL%%/Torrus
-@exec mkdir -p /var/log/torrus


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: pav 
State-Changed-When: Fri Dec 17 10:04:14 UTC 2010 
State-Changed-Why:  
Perhaps it would be better to convert your port to use the new USERS/GROUPS 
macros? 


Responsible-Changed-From-To: freebsd-ports-bugs->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Fri Dec 17 10:04:14 UTC 2010 
Responsible-Changed-Why:  
Track 

http://www.freebsd.org/cgi/query-pr.cgi?pr=153162 
State-Changed-From-To: feedback->closed 
State-Changed-By: pav 
State-Changed-When: Wed Dec 22 21:58:38 UTC 2010 
State-Changed-Why:  
Committed, thanks 

http://www.freebsd.org/cgi/query-pr.cgi?pr=153162 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/153162: commit references a PR
Date: Wed, 22 Dec 2010 21:59:26 +0000 (UTC)

 pav         2010-12-22 21:59:21 UTC
 
   FreeBSD ports repository
 
   Modified files:
     .                    UIDs GIDs 
     net-mgmt/torrus      Makefile pkg-plist 
   Added files:
     net-mgmt/torrus/files torrus_collector.in torrus_monitor.in 
   Log:
   - Upgrade to USERS/GROUPS
   - Provide new rc scripts
   
   PR:             ports/153162
   Submitted by:   Corey Smith <corsmith@gmail.com> (maintainer)
   
   Revision  Changes    Path
   1.120     +2 -1      ports/GIDs
   1.133     +2 -1      ports/UIDs
   1.11      +8 -18     ports/net-mgmt/torrus/Makefile
   1.1       +94 -0     ports/net-mgmt/torrus/files/torrus_collector.in (new)
   1.1       +76 -0     ports/net-mgmt/torrus/files/torrus_monitor.in (new)
   1.7       +2 -2      ports/net-mgmt/torrus/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
