From mel.flynn+fbsd.ports@mailing.thruhere.net  Sat Aug  8 07:59:11 2009
Return-Path: <mel.flynn+fbsd.ports@mailing.thruhere.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E9BBD106566B
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  8 Aug 2009 07:59:11 +0000 (UTC)
	(envelope-from mel.flynn+fbsd.ports@mailing.thruhere.net)
Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27])
	by mx1.freebsd.org (Postfix) with ESMTP id 5D43E8FC16
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  8 Aug 2009 07:59:10 +0000 (UTC)
Received: from smoochies.rachie.is-a-geek.net (mailhub.lan.rachie.is-a-geek.net [192.168.2.11])
	by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id CEBDF7E818;
	Fri,  7 Aug 2009 23:39:38 -0800 (AKDT)
Message-Id: <20090808073938.CEBDF7E818@mailhub.rachie.is-a-geek.net>
Date: Fri,  7 Aug 2009 23:39:38 -0800 (AKDT)
From: Mel Flynn <mel.flynn+fbsd.ports@mailing.thruhere.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: <janos.mohacsi@bsd.hu>
Subject: [PATCH] Unbreak and refine net-mgmt/flowd
X-Send-Pr-Version: 3.113
X-GNATS-Notify: janos.mohacsi@bsd.hu

>Number:         137560
>Category:       ports
>Synopsis:       [PATCH] Unbreak and refine net-mgmt/flowd
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    wxs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 08 08:00:16 UTC 2009
>Closed-Date:    Thu Oct 15 21:27:09 UTC 2009
>Last-Modified:  Thu Oct 15 21:30:00 UTC 2009
>Originator:     Mel Flynn
>Release:        FreeBSD 8.0-BETA2 i386
>Organization:
>Environment:
System: FreeBSD smoochies.rachie.is-a-geek.net 8.0-BETA2 FreeBSD 8.0-BETA2 #9 r195941M: Sun Aug 2 12:25:04 AKDT 2009 mel@smoochies.rachie.is-a-geek.net:/usr/obj/usr/src/sys/HPDV9000 i386


	
>Description:
WITH_PERL and WITH_PYTHON are marked as broken, due to faulty plist.

While I was in there, refined pkg-install to accept a numeric UID through
shell environment / make.conf and made the output consistent. Also used
SCRIPTS_ENV to do the job.
Last but not least, put the perl manpage in the normal man3 directory.

>How-To-Repeat:
make -C ${PORTSDIR}/net-mgmt/flowd/ -DWITH_PERL build
make -C ${PORTSDIR}/net-mgmt/flowd/ -DWITH_PYTHON build

>Fix:

	

--- unbreak-flowd.patch begins here ---
Index: net-mgmt/flowd/Makefile
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/flowd/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- net-mgmt/flowd/Makefile	13 Jul 2009 16:22:56 -0000	1.14
+++ net-mgmt/flowd/Makefile	8 Aug 2009 05:38:03 -0000
@@ -22,13 +22,15 @@
 MAN5=		flowd.conf.5
 PORTDOCS=	README INSTALL
 FLOWD_USER?=	_flowd
+SCRIPTS_ENV+=	FLOWD_USER="${FLOWD_USER}"
+.if defined(FLOWD_UID)
+SCRIPTS_ENV+=	FLOWD_UID="${FLOWD_UID}"
+.endif
 
 .if defined(WITH_PERL)
 USE_PERL5=	yes
 PLIST_SUB+=	WITH_PERL=""
-#MAN3PREFIX=	${PREFIX}/lib/perl5/${PERL_VERSION}
-#MAN3=		Flowd.3
-BROKEN=		Incomplete pkg-plist
+MAN3=		Flowd.3
 .else
 PLIST_SUB+=	WITH_PERL="@comment "
 .endif
@@ -36,7 +38,7 @@
 .if defined(WITH_PYTHON)
 USE_PYTHON=	yes
 PLIST_SUB+=	WITH_PYTHON=""
-BROKEN=		Incomplete pkg-plist
+INSTALLS_EGGINFO=	yes
 .else
 PLIST_SUB+=	WITH_PYTHON="@comment "
 .endif
@@ -67,9 +69,10 @@
 
 .if defined(WITH_PERL)
 	cd ${WRKSRC}/Flowd-perl && \
-	${PERL} Makefile.PL  && \
+	${PERL} Makefile.PL INSTALLSITEMAN3DIR=${MAN3PREFIX}/man/man3 && \
 	${GMAKE} && \
-	${GMAKE} install
+	${GMAKE} install;
+	-@${RM} -f ${SITE_PERL}/${PERL_ARCH}/perllocal.pod
 .endif
 
 .if defined(WITH_PYTHON)
@@ -78,6 +81,6 @@
 	${PYTHON_CMD} setup.py install
 .endif
 
-	FLOWD_USER=${FLOWD_USER} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+	@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 
 .include <bsd.port.mk>
Index: net-mgmt/flowd/pkg-install
===================================================================
RCS file: /home/ncvs/ports/net-mgmt/flowd/pkg-install,v
retrieving revision 1.2
diff -u -r1.2 pkg-install
--- net-mgmt/flowd/pkg-install	4 Jun 2005 00:43:20 -0000	1.2
+++ net-mgmt/flowd/pkg-install	8 Aug 2009 05:44:35 -0000
@@ -20,9 +20,15 @@
 		shell=/nonexistent
 	fi
 	uhome="/var/empty"
+	if [ -z "${FLOWD_UID}" ]; then
+		uid=`${PW} usernext`;
+		uid=${uid%%:*}
+	else
+		uid=${FLOWD_UID}
+	fi
 
 	if ! ${PW} show user ${USER} -q >/dev/null; then
-		if ! ${PW} add user ${USER} -g ${GROUP} -d "${uhome}" \
+		if ! ${PW} add user ${USER} -u ${uid} -g ${GROUP} -d "${uhome}" \
 				-c "flowd privilege separation user" -s "${shell}" -p "*" \
 				; then
 			e=$?
@@ -31,7 +37,7 @@
 		fi
 		echo "*** Added user \`${USER}' (id ${uid})"
 	else
-		echo "*** You already have user \`${USER}'."
+		echo "*** You already have user \`${USER} (id `id -u ${USER}`)'."
 	fi
 }
 
--- unbreak-flowd.patch ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sat Aug 8 08:00:58 UTC 2009 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: janos.mohacsi@bsd.hu
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/137560: [PATCH] Unbreak and refine net-mgmt/flowd
Date: Sat, 8 Aug 2009 08:00:56 UT

 Maintainer of net-mgmt/flowd,
 
 Please note that PR ports/137560 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/137560
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Janos Mohacsi <mohacsi@niif.hu>
To: bug-followup@FreeBSD.org, mel.flynn+fbsd.ports@mailing.thruhere.net
Cc:  
Subject: Re: ports/137560: [PATCH] Unbreak and refine net-mgmt/flowd
Date: Mon, 24 Aug 2009 15:49:28 +0200

 approved. Sorry for the delay
 Thanks for the patch.
           Janos Mohacsi
Responsible-Changed-From-To: freebsd-ports-bugs->wxs 
Responsible-Changed-By: wxs 
Responsible-Changed-When: Mon Oct 12 17:23:43 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=137560 
State-Changed-From-To: feedback->closed 
State-Changed-By: wxs 
State-Changed-When: Thu Oct 15 21:27:07 UTC 2009 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/137560: commit references a PR
Date: Thu, 15 Oct 2009 21:27:07 +0000 (UTC)

 wxs         2009-10-15 21:26:58 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net-mgmt/flowd       Makefile pkg-install 
   Log:
   - Fix when using WITH_PERL and WITH_PYTHON
   - Make pkg-install script accept FLOWD_UID from environment
   
   PR:             ports/137560
   Submitted by:   Mel Flynn <mel.flynn+fbsd.ports@mailing.thruhere.net>
   Approved by:    Janos Mohacsi <mohacsi@niif.hu> (maintainer)
   
   Revision  Changes    Path
   1.15      +10 -7     ports/net-mgmt/flowd/Makefile
   1.3       +9 -3      ports/net-mgmt/flowd/pkg-install
 _______________________________________________
 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:
