From brooks@lor.one-eyed-alien.net  Mon Apr  6 20:07:00 2009
Return-Path: <brooks@lor.one-eyed-alien.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 278021065CDF
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  6 Apr 2009 20:07:00 +0000 (UTC)
	(envelope-from brooks@lor.one-eyed-alien.net)
Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232])
	by mx1.freebsd.org (Postfix) with ESMTP id CCAD78FC0C
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  6 Apr 2009 20:06:59 +0000 (UTC)
	(envelope-from brooks@lor.one-eyed-alien.net)
Received: from lor.one-eyed-alien.net (localhost [127.0.0.1])
	by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id n36Jc6Fb022709;
	Mon, 6 Apr 2009 14:38:07 -0500 (CDT)
	(envelope-from brooks@lor.one-eyed-alien.net)
Received: (from brooks@localhost)
	by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id n36Jc624022708;
	Mon, 6 Apr 2009 14:38:06 -0500 (CDT)
	(envelope-from brooks)
Message-Id: <200904061938.n36Jc624022708@lor.one-eyed-alien.net>
Date: Mon, 6 Apr 2009 14:38:06 -0500 (CDT)
From: Brooks Davis <brooks@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: gerrit.beine@gmx.de
Subject: [PATCH] www/trac-email2trac: [SUMMARIZE CHANGES]
X-Send-Pr-Version: 3.113
X-GNATS-Notify: gerrit.beine@gmx.de

>Number:         133438
>Category:       ports
>Synopsis:       [PATCH] www/trac-email2trac: [SUMMARIZE CHANGES]
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    brooks
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 06 20:10:02 UTC 2009
>Closed-Date:    Fri Apr 10 15:32:48 UTC 2009
>Last-Modified:  Fri Apr 10 15:32:48 UTC 2009
>Originator:     Brooks Davis
>Release:        FreeBSD 7.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD lor.one-eyed-alien.net 7.1-RELEASE FreeBSD 7.1-RELEASE #2 r186702: Fri Jan  2 14:31:39
>Description:

Add --with-trac-user and --with-mta-user to CONFIGURE_ARGS to specify
correct values to the setuid wrapper.  Default to www and mailnull
respectivly to support sendmail and an apache based trac install.

Add an option to enable postfix support for the wrapper by switching the
mta user to nobody.

Actually install the setuid wrapper setuid.

Install the scripts without .py extensions as expected by the setuid
wrapper.

Install the example email2trac.conf as email2trac.conf.sample.  Only
copy it to email2trac.conf if none exists and only remove email2trac.conf
if it is unchanged.

[An UPDATING entry is probably called since some users may be using the
scripts direction if using mailers such as postfix and exim that do not
require the setuid wrapper.]

Port maintainer (gerrit.beine@gmx.de) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- trac-email2trac-0.40_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/www/trac-email2trac/Makefile /home/brooks/trac-email2trac/Makefile
--- /usr/ports/www/trac-email2trac/Makefile	2009-01-19 17:28:13.000000000 -0600
+++ /home/brooks/trac-email2trac/Makefile	2009-04-06 14:24:38.000000000 -0500
@@ -7,6 +7,7 @@
 
 PORTNAME=	email2trac
 PORTVERSION=	0.40
+PORTREVISION=	1
 CATEGORIES=	www devel python
 MASTER_SITES=	http://www.gerritbeine.de/download/trac/
 PKGNAMEPREFIX=	trac-
@@ -17,22 +18,41 @@
 BUILD_DEPENDS+=	easy_install:${PORTSDIR}/devel/py-setuptools
 RUN_DEPENDS+=	tracd:${PORTSDIR}/www/trac
 
+OPTIONS=	POSTFIX "Configure suid script for postfix" OFF
+
+TRACUSER?=	${WWWOWN}
+
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--with-trac-user=${TRACUSER} --with-mta-user=${MTAUSER}
 USE_PYTHON=	2.3+
 
 PORTDOCS=	AUTHORS COPYING ChangeLog INSTALL README
 
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_POSTFIX)
+MTAUSER?=	nobody
+.else
+MTAUSER?=	mailnull
+.endif
+
 do-install:
-	${INSTALL_SCRIPT} ${WRKSRC}/delete_spam.py ${PREFIX}/bin
-	${INSTALL_SCRIPT} ${WRKSRC}/email2trac.py ${PREFIX}/bin
-	${INSTALL_PROGRAM} ${WRKSRC}/run_email2trac ${PREFIX}/bin
-	${INSTALL_DATA} ${WRKSRC}/email2trac.conf ${PREFIX}/etc
+	@${INSTALL_SCRIPT} ${WRKSRC}/delete_spam.py ${PREFIX}/bin/delete_spam
+	@${INSTALL_SCRIPT} ${WRKSRC}/email2trac.py ${PREFIX}/bin/email2trac
+	@${INSTALL} ${COPY} ${STRIP} ${_BINOWNGRP} -m 4111 \
+	    ${WRKSRC}/run_email2trac ${PREFIX}/bin
+	@${INSTALL_DATA} ${WRKSRC}/email2trac.conf \
+	    ${PREFIX}/etc/email2trac.conf.sample
+	@if [ ! -e ${PREFIX}/etc/email2trac.conf ]; then \
+		${CP} -p ${PREFIX}/etc/email2trac.conf.sample \
+		    ${PREFIX}/etc/email2trac.conf ; \
+	fi
 .if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}
+	@${MKDIR} ${DOCSDIR}
 .for file in ${PORTDOCS}
-	${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
+	@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
 .endfor
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/www/trac-email2trac/pkg-plist /home/brooks/trac-email2trac/pkg-plist
--- /usr/ports/www/trac-email2trac/pkg-plist	2007-05-27 12:34:05.000000000 -0500
+++ /home/brooks/trac-email2trac/pkg-plist	2009-04-06 11:18:41.000000000 -0500
@@ -1,4 +1,6 @@
-bin/delete_spam.py
-bin/email2trac.py
+bin/delete_spam
+bin/email2trac
 bin/run_email2trac
-etc/email2trac.conf
+@unexec if cmp -s %D/etc/email2trac.conf %D/etc/email2trac.conf.sample; then rm -f %D/etc/email2trac.conf; fi
+etc/email2trac.conf.sample
+@exec if [ ! -e %D/etc/email2trac.conf ]; then cp %D/etc/email2trac.conf.sample %D/etc/email2trac.conf; fi
--- trac-email2trac-0.40_1.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->brooks 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Apr 6 20:10:38 UTC 2009 
Responsible-Changed-Why:  
Submitter has GNATS access (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133438 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Mon Apr 6 20:10:42 UTC 2009 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: gerrit.beine@gmx.de
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/133438: [PATCH] www/trac-email2trac: [SUMMARIZE CHANGES]
Date: Mon, 6 Apr 2009 20:10:40 UT

 Maintainer of www/trac-email2trac,
 
 Please note that PR ports/133438 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/133438
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Brooks Davis <brooks@freebsd.org>
To: bug-followup@freebsd.org
Cc: Brooks Davis <brooks@freebsd.org>, gerrit.beine@gmx.de
Subject: Re: ports/133438: [PATCH] www/trac-email2trac: [SUMMARIZE CHANGES]
Date: Thu, 9 Apr 2009 15:21:23 -0500

 The following patch replaces the previous one and is identical except for
 updating the port to the new 0.80 release and using the vendor's ftp
 site since they provide versioned tarballs.
 
 Gerrit,
 
 Please approve this patch, I'd like to get a generally usable port into
 the 7.2 package set.
 
 -- Brooks
 
 ===> Generating patch
 ===> Viewing diff with more
 diff -ruN --exclude=CVS /usr/ports/www/trac-email2trac/Makefile /home/brooks/trac-email2trac/Makefile
 --- /usr/ports/www/trac-email2trac/Makefile	2009-01-19 17:28:13.000000000 -0600
 +++ /home/brooks/trac-email2trac/Makefile	2009-04-09 15:17:27.000000000 -0500
 @@ -6,9 +6,9 @@
  #
  
  PORTNAME=	email2trac
 -PORTVERSION=	0.40
 +PORTVERSION=	0.80
  CATEGORIES=	www devel python
 -MASTER_SITES=	http://www.gerritbeine.de/download/trac/
 +MASTER_SITES=	ftp://ftp.sara.nl/pub/outgoing/
  PKGNAMEPREFIX=	trac-
  
  MAINTAINER=	gerrit.beine@gmx.de
 @@ -17,22 +17,41 @@
  BUILD_DEPENDS+=	easy_install:${PORTSDIR}/devel/py-setuptools
  RUN_DEPENDS+=	tracd:${PORTSDIR}/www/trac
  
 +OPTIONS=	POSTFIX "Configure suid script for postfix" OFF
 +
 +TRACUSER?=	${WWWOWN}
 +
  WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
  GNU_CONFIGURE=	yes
 +CONFIGURE_ARGS=	--with-trac-user=${TRACUSER} --with-mta-user=${MTAUSER}
  USE_PYTHON=	2.3+
  
  PORTDOCS=	AUTHORS COPYING ChangeLog INSTALL README
  
 +.include <bsd.port.pre.mk>
 +
 +.if defined(WITH_POSTFIX)
 +MTAUSER?=	nobody
 +.else
 +MTAUSER?=	mailnull
 +.endif
 +
  do-install:
 -	${INSTALL_SCRIPT} ${WRKSRC}/delete_spam.py ${PREFIX}/bin
 -	${INSTALL_SCRIPT} ${WRKSRC}/email2trac.py ${PREFIX}/bin
 -	${INSTALL_PROGRAM} ${WRKSRC}/run_email2trac ${PREFIX}/bin
 -	${INSTALL_DATA} ${WRKSRC}/email2trac.conf ${PREFIX}/etc
 +	@${INSTALL_SCRIPT} ${WRKSRC}/delete_spam.py ${PREFIX}/bin/delete_spam
 +	@${INSTALL_SCRIPT} ${WRKSRC}/email2trac.py ${PREFIX}/bin/email2trac
 +	@${INSTALL} ${COPY} ${STRIP} ${_BINOWNGRP} -m 4111 \
 +	    ${WRKSRC}/run_email2trac ${PREFIX}/bin
 +	@${INSTALL_DATA} ${WRKSRC}/email2trac.conf \
 +	    ${PREFIX}/etc/email2trac.conf.sample
 +	@if [ ! -e ${PREFIX}/etc/email2trac.conf ]; then \
 +		${CP} -p ${PREFIX}/etc/email2trac.conf.sample \
 +		    ${PREFIX}/etc/email2trac.conf ; \
 +	fi
  .if !defined(NOPORTDOCS)
 -	${MKDIR} ${DOCSDIR}
 +	@${MKDIR} ${DOCSDIR}
  .for file in ${PORTDOCS}
 -	${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
 +	@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
  .endfor
  .endif
  
 -.include <bsd.port.mk>
 +.include <bsd.port.post.mk>
 diff -ruN --exclude=CVS /usr/ports/www/trac-email2trac/distinfo /home/brooks/trac-email2trac/distinfo
 --- /usr/ports/www/trac-email2trac/distinfo	2009-01-19 17:28:13.000000000 -0600
 +++ /home/brooks/trac-email2trac/distinfo	2009-04-09 15:06:26.000000000 -0500
 @@ -1,3 +1,3 @@
 -MD5 (email2trac-0.40.tar.gz) = fcdb6bf864f257d8b4faa6e230f8fcd3
 -SHA256 (email2trac-0.40.tar.gz) = 1b2633cb4369ad0b39585c25762ddb729c46ed33a65351e7546bbf78a34ab80a
 -SIZE (email2trac-0.40.tar.gz) = 77614
 +MD5 (email2trac-0.80.tar.gz) = d4d8831874f89d56b6bce9cdbad67df7
 +SHA256 (email2trac-0.80.tar.gz) = a3c8ee2f8b9be28e6754e462a535cad34a4683391f8166baeecbaec85be8944f
 +SIZE (email2trac-0.80.tar.gz) = 84419
 diff -ruN --exclude=CVS /usr/ports/www/trac-email2trac/pkg-plist /home/brooks/trac-email2trac/pkg-plist
 --- /usr/ports/www/trac-email2trac/pkg-plist	2007-05-27 12:34:05.000000000 -0500
 +++ /home/brooks/trac-email2trac/pkg-plist	2009-04-06 11:18:41.000000000 -0500
 @@ -1,4 +1,6 @@
 -bin/delete_spam.py
 -bin/email2trac.py
 +bin/delete_spam
 +bin/email2trac
  bin/run_email2trac
 -etc/email2trac.conf
 +@unexec if cmp -s %D/etc/email2trac.conf %D/etc/email2trac.conf.sample; then rm -f %D/etc/email2trac.conf; fi
 +etc/email2trac.conf.sample
 +@exec if [ ! -e %D/etc/email2trac.conf ]; then cp %D/etc/email2trac.conf.sample %D/etc/email2trac.conf; fi
 ===> Done
State-Changed-From-To: feedback->closed 
State-Changed-By: brooks 
State-Changed-When: Fri Apr 10 15:32:20 UTC 2009 
State-Changed-Why:  
Committed with maintainer approval. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133438 
>Unformatted:
