From lifanov@mail.lifanov.com  Tue May  7 14:30:19 2013
Return-Path: <lifanov@mail.lifanov.com>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id 5DB295F1
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  7 May 2013 14:30:19 +0000 (UTC)
	(envelope-from lifanov@mail.lifanov.com)
Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12])
	by mx1.freebsd.org (Postfix) with ESMTP id 50A34BEF
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  7 May 2013 14:30:19 +0000 (UTC)
Received: by mail.lifanov.com (Postfix, from userid 1001)
	id B10A31A1F64; Tue,  7 May 2013 14:30:18 +0000 (UTC)
Message-Id: <20130507143018.B10A31A1F64@mail.lifanov.com>
Date: Tue,  7 May 2013 14:30:18 +0000 (UTC)
From: Nikolai Lifanov <lifanov@mail.lifanov.com>
Reply-To: Nikolai Lifanov <lifanov@mail.lifanov.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] mail/postgrey shebangfix
X-Send-Pr-Version: 3.113
X-GNATS-Notify: ports.maintainer@evilphi.com

>Number:         178400
>Category:       ports
>Synopsis:       [patch] mail/postgrey shebangfix
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    madpilot
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 07 14:40:00 UTC 2013
>Closed-Date:    Sun May 12 14:29:56 UTC 2013
>Last-Modified:  Sun May 12 14:30:01 UTC 2013
>Originator:     Nikolai Lifanov
>Release:        FreeBSD 9.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD mail.lifanov.com 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
	postgrey hardcodes perl location as "/usr/bin/perl".
	This doesn't account for situations where perl package is compiled
	without the symlink OPTION, which is necessary when /usr is read-only.

	The user, after every package installation has to replace the shebang
	with the appropriate location before restarting the service, or
	otherwise the MTA that uses postgrey might end up rejecting all mail.

	Until now, there was no easy way to stop users that install the package
	from shooting themselves in the foot.
>How-To-Repeat:
	* compile perl without USE_PERL option
	* compile postgrey
	* install postgrey
	* use postgrey with an MTA
>Fix:
	See the patch attached. It makes use of USES=shebangfix to solve the
	problem. Also, I converted the Makefile header.

--- postgrey.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	postgrey
#	postgrey/files
#	postgrey/files/postgrey.in
#	postgrey/files/pkg-install.in
#	postgrey/pkg-plist
#	postgrey/distinfo
#	postgrey/Makefile
#	postgrey/pkg-descr
#
echo c - postgrey
mkdir -p postgrey > /dev/null 2>&1
echo c - postgrey/files
mkdir -p postgrey/files > /dev/null 2>&1
echo x - postgrey/files/postgrey.in
sed 's/^X//' >postgrey/files/postgrey.in << 'b9ac248ee4d3f60fd038188546836856'
X#!/bin/sh
X# $FreeBSD: head/mail/postgrey/files/postgrey.in 300896 2012-07-14 13:54:48Z beat $
X#
X
X# PROVIDE: postgrey
X# REQUIRE: LOGIN
X# BEFORE: mail
X# KEYWORD: shutdown
X
X#
X# Add the following lines to /etc/rc.conf to enable postgrey:
X#
X# postgrey_enable="YES"
X#
X# See perldoc postgrey for flags
X#
X
X. /etc/rc.subr
X
Xname=postgrey
Xrcvar=postgrey_enable
X
Xcommand=%%PREFIX%%/sbin/postgrey
Xrequired_dirs=/var/db/postgrey
Xextra_commands=reload
X
Xstop_postcmd=stop_postcmd
X
Xstop_postcmd()
X{
X  rm -f $pidfile
X}
X
X# set defaults
X
Xload_rc_config $name
X
Xpostgrey_enable=${postgrey_enable:-"NO"}
Xpostgrey_greylist_header=${postgrey_greylist_header:-"X-Greylist: delayed %t seconds by postgrey-%v at %h\; %d"}
Xpostgrey_pidfile=${postgrey_pidfile:-"/var/run/postgrey.pid"}
Xpostgrey_flags=${postgrey_flags:-"--pidfile=${postgrey_pidfile} \
X	--inet=10023 -d --user=%%USER%% --group=%%GROUP%% --dbdir=/var/db/postgrey \
X	--x-greylist-header=${postgrey_greylist_header}"}
X
Xpidfile="${postgrey_pidfile}"
X
Xrun_rc_command "$1"
b9ac248ee4d3f60fd038188546836856
echo x - postgrey/files/pkg-install.in
sed 's/^X//' >postgrey/files/pkg-install.in << 'd450ee948617a016209f77dcb37cb116'
X#! /bin/sh
X#
X# $FreeBSD: /tmp/pcvs/ports/mail/postgrey/files/pkg-install.in,v 1.6 2012-04-18 07:54:30 crees Exp $
X
XPATH=/bin:/usr/bin:/usr/sbin
X
Xcase $2 in
X
XPRE-INSTALL)
X  echo "---> Starting install script:"
X
X  if [ -z "%%POSTGREYDIR%%" -o \
X       -z "%%USER%%" -o -z "%%GROUP%%" -o \
X       -z "%%UID%%" -o -z "%%GID%%" ]; then
X    echo "ERROR: A required pragma was empty"
X    exit 1
X  fi
X
X  ;;
X
XPOST-INSTALL)
X  echo "---> Starting post-install script:"
X
X  # Create home directory if required
X  if [ -d "%%POSTGREYDIR%%" ]; then
X    echo "---> Using existing Postgrey database directory (%%POSTGREYDIR%%)"
X    echo "     (There may be existing active postgrey databases - this installation"
X    echo "     will attempt to preserve them.)"
X  else
X    echo "---> Creating Postgrey database directory (%%POSTGREYDIR%%)"
X    (umask 002 && /bin/mkdir -p "%%POSTGREYDIR%%") || exit 1
X    /usr/sbin/chown -R "%%USER%%:%%GROUP%%" "%%POSTGREYDIR%%" || exit 1
X    /bin/chmod g+s "%%POSTGREYDIR%%" || exit 1
X  fi
X
X  for i in %%ETCFILES%%; do
X    if [ ! -f "%%PREFIX%%/etc/postfix/postgrey_${i}" ]; then
X	echo "---> Installing new config file %%PREFIX%%/etc/postfix/postgrey_${i}"
X	cp -p	%%PREFIX%%/etc/postfix/dist-postgrey_${i} \
X		%%PREFIX%%/etc/postfix/postgrey_${i}
X    else
X	echo "---> Keeping existing config file %%PREFIX%%/etc/postfix/postgrey_${i}"
X    fi
X  done
X  ;;
X
Xesac
d450ee948617a016209f77dcb37cb116
echo x - postgrey/pkg-plist
sed 's/^X//' >postgrey/pkg-plist << 'deb1067e69ea21e4e981c3454d6f91aa'
X@unexec if cmp -s %D/etc/postfix/dist-postgrey_whitelist_recipients %D/etc/postfix/postgrey_whitelist_recipients; then rm -f %D/etc/postfix/postgrey_whitelist_recipients; fi
X@unexec if cmp -s %D/etc/postfix/dist-postgrey_whitelist_clients %D/etc/postfix/postgrey_whitelist_clients; then rm -f %D/etc/postfix/postgrey_whitelist_clients; fi
Xsbin/postgrey
Xsbin/policy-test
Xsbin/postgreyreport
Xetc/postfix/dist-postgrey_whitelist_recipients
Xetc/postfix/dist-postgrey_whitelist_clients
X@dirrmtry etc/postfix
X@unexec rmdir /var/db/postgrey 2>/dev/null || true
deb1067e69ea21e4e981c3454d6f91aa
echo x - postgrey/distinfo
sed 's/^X//' >postgrey/distinfo << '9b67ee39cd06d0bcc401f341edb9eb9c'
XSHA256 (postgrey-1.34.tar.gz) = 9a9ee2f4e3cbbf15642e47802407c810ac5c54f0ad1572ebec3f0f645eb35707
XSIZE (postgrey-1.34.tar.gz) = 36399
9b67ee39cd06d0bcc401f341edb9eb9c
echo x - postgrey/Makefile
sed 's/^X//' >postgrey/Makefile << '854c7eae4c26d2f798e6d679b8c6b91f'
X# Created by: Will Andrews <will@FreeBSD.org>
X# $FreeBSD$
X
XPORTNAME=	postgrey
XPORTVERSION=	1.34
XPORTREVISION=	5
XCATEGORIES=	mail
XMASTER_SITES=	http://postgrey.schweikert.ch/pub/ \
X		http://postgrey.schweikert.ch/pub/old/
X
XMAINTAINER=	ports.maintainer@evilphi.com
XCOMMENT=	Greylisting policy server for Postfix
X
XRUN_DEPENDS=	p5-Net-Server>=0:${PORTSDIR}/net/p5-Net-Server \
X		p5-IO-Multiplex>=0:${PORTSDIR}/devel/p5-IO-Multiplex \
X		p5-Parse-Syslog>=0:${PORTSDIR}/textproc/p5-Parse-Syslog \
X		p5-BerkeleyDB>=0:${PORTSDIR}/databases/p5-BerkeleyDB \
X		p5-Net-DNS>=0:${PORTSDIR}/dns/p5-Net-DNS
X
XUSE_PERL5_RUN=	yes
XUSE_RC_SUBR=	${PORTNAME}
XNO_BUILD=	yes
XPOD2MAN?=	pod2man
XPORTDOCS=	README Changes README.exim
XSUB_FILES=	pkg-install
XSUB_LIST=	USER=${PGY_USERNAME} UID=${PGY_USERID} GROUP=${PGY_GROUPNAME} \
X		GID=${PGY_GROUPID} ETCFILES="${ETCFILES}" \
X		POSTGREYDIR=${PGY_DIR}
XETCFILES=	whitelist_clients whitelist_recipients
XPGY_USERNAME?=	postgrey
XPGY_USERID?=	225
XPGY_GROUPNAME?=	${PGY_USERNAME}
XPGY_GROUPID?=	${PGY_USERID}
XPGY_DIR?=	/var/db/postgrey
X
XUSERS=		${PGY_USERNAME}
XGROUPS=		${PGY_GROUPNAME}
XMAN1=		${PORTNAME}.1 policy-test.1 postgreyreport.1
X
XUSES=shebangfix
XSHEBANG_FILES=	${WRKSRC}/postgrey
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's#/etc/main.cf#/etc/postfix/main.cf#' ${WRKSRC}/postgrey
X	@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
X	@${REINPLACE_CMD} -e 's#/var/spool/postfix/postgrey#${PGY_DIR}#' ${WRKSRC}/postgrey ${WRKSRC}/contrib/postgreyreport
X
Xpre-install:
X	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
X
Xdo-install:
X	@${POD2MAN} ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.1
X	@${POD2MAN} ${WRKSRC}/policy-test ${WRKSRC}/policy-test.1
X	@${POD2MAN} ${WRKSRC}/contrib/postgreyreport ${WRKSRC}/postgreyreport.1
X	@${INSTALL_SCRIPT} ${WRKSRC}/postgrey ${PREFIX}/sbin
X	@${INSTALL_SCRIPT} ${WRKSRC}/policy-test ${PREFIX}/sbin
X	@${INSTALL_SCRIPT} ${WRKSRC}/contrib/postgreyreport ${PREFIX}/sbin
X	@${INSTALL} -d ${PREFIX}/etc/postfix
X.for i in ${ETCFILES}
X	${INSTALL_DATA} ${WRKSRC}/postgrey_${i} ${PREFIX}/etc/postfix/dist-postgrey_${i}
X.endfor
X
X.if !defined(NOPORTDOCS)
X	@${INSTALL} -d ${DOCSDIR}
X	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
X.endif
X	@cd ${WRKSRC} && ${INSTALL_MAN} ${MAN1} ${MANPREFIX}/man/man1
X
Xpost-install:
X	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
X
X.include <bsd.port.mk>
854c7eae4c26d2f798e6d679b8c6b91f
echo x - postgrey/pkg-descr
sed 's/^X//' >postgrey/pkg-descr << '0639cc31e9cc6580040970d7c849495e'
XPostgrey is a program which implements greylisting and is
Xdesigned to work with the Postfix MTA.
X
XWWW:  http://postgrey.schweikert.ch/
0639cc31e9cc6580040970d7c849495e
exit
--- postgrey.shar ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Tue May 7 14:40:08 UTC 2013 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: ports.maintainer@evilphi.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
Date: Tue, 7 May 2013 14:40:07 UT

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

From: Darren Pilgrim <ports.maintainer@evilphi.com>
To: Nikolai Lifanov <lifanov@mail.lifanov.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
Date: Tue, 07 May 2013 11:44:33 -0700

 Instead of a shar of the entire port, please submit a diff.

From: Nikolai Lifanov <lifanov@mail.lifanov.com>
To: Darren Pilgrim <ports.maintainer@evilphi.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
Date: Tue, 07 May 2013 15:24:42 -0400

 On 05/07/2013 02:44 PM, Darren Pilgrim wrote:
 > Instead of a shar of the entire port, please submit a diff.
 
 Here you go:
 
 -# New ports collection makefile for:    postgrey
 -# Date created:				24 August 2004
 -# Whom:					Will Andrews <will@FreeBSD.org>
 -#
 -# $FreeBSD: head/mail/postgrey/Makefile 300896 2012-07-14 13:54:48Z
 beat $
 -#
 +# Created by: Will Andrews <will@FreeBSD.org>
 +# $FreeBSD$
 
  PORTNAME=	postgrey
  PORTVERSION=	1.34
 -PORTREVISION=	4
 +PORTREVISION=	5
  CATEGORIES=	mail
  MASTER_SITES=	http://postgrey.schweikert.ch/pub/ \
  		http://postgrey.schweikert.ch/pub/old/
 @@ -41,6 +37,9 @@
  GROUPS=		${PGY_GROUPNAME}
  MAN1=		${PORTNAME}.1 policy-test.1 postgreyreport.1
 
 +USES=shebangfix
 +SHEBANG_FILES=	${WRKSRC}/postgrey
 +
  post-patch:
  	@${REINPLACE_CMD} -e 's#/etc/main.cf#/etc/postfix/main.cf#'
 ${WRKSRC}/postgrey
  	@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey
 ${WRKSRC}/postgrey_whitelist_*
 

From: Darren Pilgrim <ports.maintainer@evilphi.com>
To: bug-followup@FreeBSD.org, lifanov@mail.lifanov.com
Cc:  
Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
Date: Tue, 07 May 2013 20:29:55 -0700

 This is a multi-part message in MIME format.
 --------------030002090101040401030602
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Thanks for the diff!  There were some minor issues with it:
 
 - You shouldn't reset the CVS tag
 - Don't need to bump to PORTREVISION
 
 The first is documented.  The second is a judgement call.  The change is 
 a no-op for the vast majority of users, so I'm not going to bug them 
 with an upgrade cycle.  Please confirm the attached patch works for you.
 
 --------------030002090101040401030602
 Content-Type: text/plain; charset=windows-1252;
  name="postgrey_shebangfix.patch.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="postgrey_shebangfix.patch.txt"
 
 --- Makefile.orig	2012-11-16 21:59:11.000000000 -0800
 +++ Makefile	2013-05-07 20:16:28.177286116 -0700
 @@ -1,9 +1,5 @@
 -# New ports collection makefile for:    postgrey
 -# Date created:				24 August 2004
 -# Whom:					Will Andrews <will@FreeBSD.org>
 -#
 +# Created by: Will Andrews <will@FreeBSD.org>
  # $FreeBSD: ports/mail/postgrey/Makefile,v 1.35 2012/11/17 05:59:11 svnexp Exp $
 -#
  
  PORTNAME=	postgrey
  PORTVERSION=	1.34
 @@ -41,6 +37,9 @@
  GROUPS=		${PGY_GROUPNAME}
  MAN1=		${PORTNAME}.1 policy-test.1 postgreyreport.1
  
 +USES=		shebangfix
 +SHEBANG_FILES=	${WRKSRC}/postgrey
 +
  post-patch:
  	@${REINPLACE_CMD} -e 's#/etc/main.cf#/etc/postfix/main.cf#' ${WRKSRC}/postgrey
  	@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
 
 --------------030002090101040401030602--

From: Nikolai Lifanov <lifanov@mail.lifanov.com>
To: Darren Pilgrim <ports.maintainer@evilphi.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
Date: Wed, 08 May 2013 09:49:12 -0400

 On 05/07/2013 11:29 PM, Darren Pilgrim wrote:
 > Thanks for the diff!  There were some minor issues with it:
 > 
 > - You shouldn't reset the CVS tag - Don't need to bump to
 > PORTREVISION
 > 
 > The first is documented.  The second is a judgement call.  The
 > change is a no-op for the vast majority of users, so I'm not going
 > to bug them with an upgrade cycle.  Please confirm the attached
 > patch works for you.
 
 I can confirm that the attached patch works for me.
 On another thought, bumping PORTREVISION is not appropriate here,
 since this change affect the functionality of existing (working)
 installations.
 
 Thanks!
 
Responsible-Changed-From-To: freebsd-ports-bugs->madpilot 
Responsible-Changed-By: madpilot 
Responsible-Changed-When: Wed May 8 16:07:04 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=178400 
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Wed May 8 21:21:28 UTC 2013 
State-Changed-Why:  
Maintainer approved. 

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

From: Mark Linimon <linimon@lonesome.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
Date: Wed, 8 May 2013 16:21:23 -0500

 ----- Forwarded message from Darren Pilgrim <ports.maintainer@evilphi.com> -----
 
 Date: Wed, 08 May 2013 13:01:24 -0700
 From: Darren Pilgrim <ports.maintainer@evilphi.com>
 To: madpilot@FreeBSD.org
 Cc: freebsd-ports-bugs@FreeBSD.org
 Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
 User-Agent: Mozilla/5.0 (Windows NT 6.1;
 	rv:17.0) Gecko/20130107 Thunderbird/17.0.2
 
 Looks like the patch works for Nikokai.  Please commit the patch I
 provided.  Thanks!
 
 _______________________________________________
 freebsd-ports-bugs@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
 To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscribe@freebsd.org"
 
 
 ----- End forwarded message -----
State-Changed-From-To: open->feedback 
State-Changed-By: madpilot 
State-Changed-When: Thu May 9 11:36:52 UTC 2013 
State-Changed-Why:  
Ask for maintainer approval. 

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

From: Guido Falsi <madpilot@FreeBSD.org>
To: bug-followup@FreeBSD.org, lifanov@mail.lifanov.com, 
 Darren Pilgrim <ports.maintainer@evilphi.com>
Cc:  
Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
Date: Thu, 09 May 2013 13:36:21 +0200

 This is a multi-part message in MIME format.
 --------------040806030504070208040405
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Hi!
 
 While checking this patch I noticed a few more things to fix:
 
 - port really needs perl also during install
 - NOPORTDOCS is deprecated, the optionsng equivalent should be used
 - WWW: line in pkg-descr must have a single space after the colon
 
 I'm attaching a further patch also addressing these points.
 
 Can you Darren please approve it?
 
 Thanks in advance.
 
 -- 
 Guido Falsi <madpilot@FreeBSD.org>
 
 --------------040806030504070208040405
 Content-Type: text/plain; charset=us-ascii;
  name="postgrey.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="postgrey.diff"
 
 Index: Makefile
 ===================================================================
 --- Makefile	(revision 317693)
 +++ Makefile	(working copy)
 @@ -1,9 +1,5 @@
 -# New ports collection makefile for:    postgrey
 -# Date created:				24 August 2004
 -# Whom:					Will Andrews <will@FreeBSD.org>
 -#
 +# Created by: Will Andrews <will@FreeBSD.org>
  # $FreeBSD$
 -#
  
  PORTNAME=	postgrey
  PORTVERSION=	1.34
 @@ -21,7 +17,7 @@
  		p5-BerkeleyDB>=0:${PORTSDIR}/databases/p5-BerkeleyDB \
  		p5-Net-DNS>=0:${PORTSDIR}/dns/p5-Net-DNS
  
 -USE_PERL5_RUN=	yes
 +USE_PERL5=	yes
  USE_RC_SUBR=	${PORTNAME}
  NO_BUILD=	yes
  POD2MAN?=	pod2man
 @@ -41,6 +37,11 @@
  GROUPS=		${PGY_GROUPNAME}
  MAN1=		${PORTNAME}.1 policy-test.1 postgreyreport.1
  
 +USES=		shebangfix
 +SHEBANG_FILES=	${WRKSRC}/postgrey
 +
 +.include <bsd.port.options.mk>
 +
  post-patch:
  	@${REINPLACE_CMD} -e 's#/etc/main.cf#/etc/postfix/main.cf#' ${WRKSRC}/postgrey
  	@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
 @@ -61,7 +62,7 @@
  	${INSTALL_DATA} ${WRKSRC}/postgrey_${i} ${PREFIX}/etc/postfix/dist-postgrey_${i}
  .endfor
  
 -.if !defined(NOPORTDOCS)
 +.if ${PORT_OPTIONS:MDOCS}
  	@${INSTALL} -d ${DOCSDIR}
  	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
  .endif
 Index: pkg-descr
 ===================================================================
 --- pkg-descr	(revision 317693)
 +++ pkg-descr	(working copy)
 @@ -1,4 +1,4 @@
  Postgrey is a program which implements greylisting and is
  designed to work with the Postfix MTA.
  
 -WWW:  http://postgrey.schweikert.ch/
 +WWW: http://postgrey.schweikert.ch/
 
 --------------040806030504070208040405--

From: Nikolai Lifanov <lifanov@mail.lifanov.com>
To: Guido Falsi <madpilot@FreeBSD.org>
Cc: bug-followup@FreeBSD.org, 
 Darren Pilgrim <ports.maintainer@evilphi.com>
Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
Date: Thu, 09 May 2013 08:59:40 -0400

 On 05/09/2013 07:36 AM, Guido Falsi wrote:
 > Hi!
 > 
 > While checking this patch I noticed a few more things to fix:
 > 
 > - port really needs perl also during install - NOPORTDOCS is
 > deprecated, the optionsng equivalent should be used - WWW: line in
 > pkg-descr must have a single space after the colon
 > 
 > I'm attaching a further patch also addressing these points.
 > 
 > Can you Darren please approve it?
 > 
 > Thanks in advance.
 > 
 
 Good spotting of NOPORTDOCS conversion.
 However, shouldn't USE_PERL5_RUN and/or the p5-* run dependencies
 already make sure that perl is present during install?
 Note: you don't need perl for "make" target to succeed, so perl
 shouldn't be a build dependency.

From: Guido Falsi <madpilot@FreeBSD.org>
To: Nikolai Lifanov <lifanov@mail.lifanov.com>
Cc: bug-followup@FreeBSD.org, 
 Darren Pilgrim <ports.maintainer@evilphi.com>
Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
Date: Thu, 09 May 2013 17:59:29 +0200

 This is a multi-part message in MIME format.
 --------------060606050708040009020502
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 On 05/09/13 14:59, Nikolai Lifanov wrote:
 > On 05/09/2013 07:36 AM, Guido Falsi wrote:
 >> Hi!
 >>
 >> While checking this patch I noticed a few more things to fix:
 >>
 >> - port really needs perl also during install - NOPORTDOCS is
 >> deprecated, the optionsng equivalent should be used - WWW: line in
 >> pkg-descr must have a single space after the colon
 >>
 >> I'm attaching a further patch also addressing these points.
 >>
 >> Can you Darren please approve it?
 >>
 >> Thanks in advance.
 >>
 >
 > Good spotting of NOPORTDOCS conversion.
 > However, shouldn't USE_PERL5_RUN and/or the p5-* run dependencies
 > already make sure that perl is present during install?
 > Note: you don't need perl for "make" target to succeed, so perl
 > shouldn't be a build dependency.
 >
 
 Sorry, you're right. My mistake.
 
 Attaching a fixed patch.
 
 Thanks.
 
 -- 
 Guido Falsi <madpilot@FreeBSD.org>
 
 --------------060606050708040009020502
 Content-Type: text/plain; charset=us-ascii;
  name="postgrey.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="postgrey.diff"
 
 Index: Makefile
 ===================================================================
 --- Makefile	(revision 317693)
 +++ Makefile	(working copy)
 @@ -1,9 +1,5 @@
 -# New ports collection makefile for:    postgrey
 -# Date created:				24 August 2004
 -# Whom:					Will Andrews <will@FreeBSD.org>
 -#
 +# Created by: Will Andrews <will@FreeBSD.org>
  # $FreeBSD$
 -#
  
  PORTNAME=	postgrey
  PORTVERSION=	1.34
 @@ -41,6 +37,11 @@
  GROUPS=		${PGY_GROUPNAME}
  MAN1=		${PORTNAME}.1 policy-test.1 postgreyreport.1
  
 +USES=		shebangfix
 +SHEBANG_FILES=	${WRKSRC}/postgrey
 +
 +.include <bsd.port.options.mk>
 +
  post-patch:
  	@${REINPLACE_CMD} -e 's#/etc/main.cf#/etc/postfix/main.cf#' ${WRKSRC}/postgrey
  	@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
 @@ -61,7 +62,7 @@
  	${INSTALL_DATA} ${WRKSRC}/postgrey_${i} ${PREFIX}/etc/postfix/dist-postgrey_${i}
  .endfor
  
 -.if !defined(NOPORTDOCS)
 +.if ${PORT_OPTIONS:MDOCS}
  	@${INSTALL} -d ${DOCSDIR}
  	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
  .endif
 Index: pkg-descr
 ===================================================================
 --- pkg-descr	(revision 317693)
 +++ pkg-descr	(working copy)
 @@ -1,4 +1,4 @@
  Postgrey is a program which implements greylisting and is
  designed to work with the Postfix MTA.
  
 -WWW:  http://postgrey.schweikert.ch/
 +WWW: http://postgrey.schweikert.ch/
 
 --------------060606050708040009020502--

From: Darren Pilgrim <ports.maintainer@evilphi.com>
To: Guido Falsi <madpilot@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
Date: Sat, 11 May 2013 18:37:28 -0700

 This is a multi-part message in MIME format.
 --------------070402030705010407040602
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 On 2013-05-09 04:36, Guido Falsi wrote:
 > While checking this patch I noticed a few more things to fix:
 [...]
 
 I approve the patch attached to this email.
 
 --------------070402030705010407040602
 Content-Type: text/plain; charset=windows-1252;
  name="postgrey.diff.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="postgrey.diff.txt"
 
 Index: Makefile
 ===================================================================
 --- Makefile	(revision 317693)
 +++ Makefile	(working copy)
 @@ -1,9 +1,5 @@
 -# New ports collection makefile for:    postgrey
 -# Date created:				24 August 2004
 -# Whom:					Will Andrews <will@FreeBSD.org>
 -#
 +# Created by: Will Andrews <will@FreeBSD.org>
  # $FreeBSD$
 -#
  
  PORTNAME=	postgrey
  PORTVERSION=	1.34
 @@ -41,6 +37,11 @@
  GROUPS=		${PGY_GROUPNAME}
  MAN1=		${PORTNAME}.1 policy-test.1 postgreyreport.1
  
 +USES=		shebangfix
 +SHEBANG_FILES=	${WRKSRC}/postgrey
 +
 +.include <bsd.port.options.mk>
 +
  post-patch:
  	@${REINPLACE_CMD} -e 's#/etc/main.cf#/etc/postfix/main.cf#' ${WRKSRC}/postgrey
  	@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
 @@ -61,7 +62,7 @@
  	${INSTALL_DATA} ${WRKSRC}/postgrey_${i} ${PREFIX}/etc/postfix/dist-postgrey_${i}
  .endfor
  
 -.if !defined(NOPORTDOCS)
 +.if ${PORT_OPTIONS:MDOCS}
  	@${INSTALL} -d ${DOCSDIR}
  	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
  .endif
 Index: pkg-descr
 ===================================================================
 --- pkg-descr	(revision 317693)
 +++ pkg-descr	(working copy)
 @@ -1,4 +1,4 @@
  Postgrey is a program which implements greylisting and is
  designed to work with the Postfix MTA.
  
 -WWW:  http://postgrey.schweikert.ch/
 +WWW: http://postgrey.schweikert.ch/
 
 --------------070402030705010407040602--

From: Darren Pilgrim <ports.maintainer@evilphi.com>
To: Guido Falsi <madpilot@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
Date: Sat, 11 May 2013 22:40:04 -0700

 This is a multi-part message in MIME format.
 --------------040903090309010600080209
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 On 2013-05-11 18:37, Darren Pilgrim wrote:
 > On 2013-05-09 04:36, Guido Falsi wrote:
 >> While checking this patch I noticed a few more things to fix:
 > [...]
 >
 > I approve the patch attached to this email.
 
 Patch was missing bits needed to actually enable OPTIONSng.  Please 
 commit this patch instead:
 
 
 --------------040903090309010600080209
 Content-Type: text/plain; charset=windows-1252;
  name="postgrey.diff.txt"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment;
  filename="postgrey.diff.txt"
 
 LS0tIE1ha2VmaWxlLm9yaWcJMjAxMi0xMS0xNiAyMTo1OToxMS4wMDAwMDAwMDAgLTA4MDAK
 KysrIE1ha2VmaWxlCTIwMTMtMDUtMTEgMjI6Mzg6MzkuOTQxMjM2NzMwIC0wNzAwCkBAIC0x
 LDkgKzEsNSBAQAotIyBOZXcgcG9ydHMgY29sbGVjdGlvbiBtYWtlZmlsZSBmb3I6ICAgIHBv
 c3RncmV5Ci0jIERhdGUgY3JlYXRlZDoJCQkJMjQgQXVndXN0IDIwMDQKLSMgV2hvbToJCQkJ
 CVdpbGwgQW5kcmV3cyA8d2lsbEBGcmVlQlNELm9yZz4KLSMKKyMgQ3JlYXRlZCBieTogV2ls
 bCBBbmRyZXdzIDx3aWxsQEZyZWVCU0Qub3JnPgogIyAkRnJlZUJTRDogcG9ydHMvbWFpbC9w
 b3N0Z3JleS9NYWtlZmlsZSx2IDEuMzUgMjAxMi8xMS8xNyAwNTo1OToxMSBzdm5leHAgRXhw
 ICQKLSMKIAogUE9SVE5BTUU9CXBvc3RncmV5CiBQT1JUVkVSU0lPTj0JMS4zNApAQCAtNDEs
 NiArMzcsMTQgQEAKIEdST1VQUz0JCSR7UEdZX0dST1VQTkFNRX0KIE1BTjE9CQkke1BPUlRO
 QU1FfS4xIHBvbGljeS10ZXN0LjEgcG9zdGdyZXlyZXBvcnQuMQogCitVU0VTPQkJc2hlYmFu
 Z2ZpeAorU0hFQkFOR19GSUxFUz0JJHtXUktTUkN9L3Bvc3RncmV5CisKK09QVElPTlNfREVG
 SU5FPQlET0NTCitPUFRJT05TX0RFRkFVTFQ9RE9DUworCisuaW5jbHVkZSA8YnNkLnBvcnQu
 b3B0aW9ucy5taz4KKwogcG9zdC1wYXRjaDoKIAlAJHtSRUlOUExBQ0VfQ01EfSAtZSAncyMv
 ZXRjL21haW4uY2YjL2V0Yy9wb3N0Zml4L21haW4uY2YjJyAke1dSS1NSQ30vcG9zdGdyZXkK
 IAlAJHtSRUlOUExBQ0VfQ01EfSAtZSAncyMvZXRjL3Bvc3RmaXgjJHtQUkVGSVh9JiMnICR7
 V1JLU1JDfS9wb3N0Z3JleSAke1dSS1NSQ30vcG9zdGdyZXlfd2hpdGVsaXN0XyoKQEAgLTYx
 LDcgKzY1LDcgQEAKIAkke0lOU1RBTExfREFUQX0gJHtXUktTUkN9L3Bvc3RncmV5XyR7aX0g
 JHtQUkVGSVh9L2V0Yy9wb3N0Zml4L2Rpc3QtcG9zdGdyZXlfJHtpfQogLmVuZGZvcgogCi0u
 aWYgIWRlZmluZWQoTk9QT1JURE9DUykKKy5pZiAke1BPUlRfT1BUSU9OUzpNRE9DU30KIAlA
 JHtJTlNUQUxMfSAtZCAke0RPQ1NESVJ9CiAJQGNkICR7V1JLU1JDfSAmJiAke0lOU1RBTExf
 REFUQX0gJHtQT1JURE9DU30gJHtET0NTRElSfQogLmVuZGlmCi0tLSBwa2ctZGVzY3Iub3Jp
 ZwkyMDEzLTA1LTExIDE4OjM2OjQwLjc5Nzk3NzU4NiAtMDcwMAorKysgcGtnLWRlc2NyCTIw
 MTMtMDUtMTEgMjI6Mjg6MjUuOTgyODE3NTc2IC0wNzAwCkBAIC0xLDQgKzEsNCBAQAogUG9z
 dGdyZXkgaXMgYSBwcm9ncmFtIHdoaWNoIGltcGxlbWVudHMgZ3JleWxpc3RpbmcgYW5kIGlz
 CiBkZXNpZ25lZCB0byB3b3JrIHdpdGggdGhlIFBvc3RmaXggTVRBLgogCi1XV1c6ICBodHRw
 Oi8vcG9zdGdyZXkuc2Nod2Vpa2VydC5jaC8KK1dXVzogaHR0cDovL3Bvc3RncmV5LnNjaHdl
 aWtlcnQuY2gvDQo=
 --------------040903090309010600080209--
State-Changed-From-To: feedback->closed 
State-Changed-By: madpilot 
State-Changed-When: Sun May 12 14:29:54 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/178400: commit references a PR
Date: Sun, 12 May 2013 14:29:54 +0000 (UTC)

 Author: madpilot
 Date: Sun May 12 14:29:46 2013
 New Revision: 317962
 URL: http://svnweb.freebsd.org/changeset/ports/317962
 
 Log:
   - Add USES=shebangfix
   - Convert to new options framework
   - Use space for WWW line in pkg-descr
   - Trim Makefile headers
   
   PR:		ports/178400
   Submitted by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
 
 Modified:
   head/mail/postgrey/Makefile   (contents, props changed)
   head/mail/postgrey/pkg-descr   (contents, props changed)
 
 Modified: head/mail/postgrey/Makefile
 ==============================================================================
 --- head/mail/postgrey/Makefile	Sun May 12 14:05:52 2013	(r317961)
 +++ head/mail/postgrey/Makefile	Sun May 12 14:29:46 2013	(r317962)
 @@ -1,9 +1,5 @@
 -# New ports collection makefile for:    postgrey
 -# Date created:				24 August 2004
 -# Whom:					Will Andrews <will@FreeBSD.org>
 -#
 +# Created by: Will Andrews <will@FreeBSD.org>
  # $FreeBSD$
 -#
  
  PORTNAME=	postgrey
  PORTVERSION=	1.34
 @@ -41,6 +37,14 @@ USERS=		${PGY_USERNAME}
  GROUPS=		${PGY_GROUPNAME}
  MAN1=		${PORTNAME}.1 policy-test.1 postgreyreport.1
  
 +USES=		shebangfix
 +SHEBANG_FILES=	${WRKSRC}/postgrey
 +
 +OPTIONS_DEFINE=	DOCS
 +OPTIONS_DEFAULT=DOCS
 +
 +.include <bsd.port.options.mk>
 +
  post-patch:
  	@${REINPLACE_CMD} -e 's#/etc/main.cf#/etc/postfix/main.cf#' ${WRKSRC}/postgrey
  	@${REINPLACE_CMD} -e 's#/etc/postfix#${PREFIX}&#' ${WRKSRC}/postgrey ${WRKSRC}/postgrey_whitelist_*
 @@ -61,7 +65,7 @@ do-install:
  	${INSTALL_DATA} ${WRKSRC}/postgrey_${i} ${PREFIX}/etc/postfix/dist-postgrey_${i}
  .endfor
  
 -.if !defined(NOPORTDOCS)
 +.if ${PORT_OPTIONS:MDOCS}
  	@${INSTALL} -d ${DOCSDIR}
  	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
  .endif
 
 Modified: head/mail/postgrey/pkg-descr
 ==============================================================================
 --- head/mail/postgrey/pkg-descr	Sun May 12 14:05:52 2013	(r317961)
 +++ head/mail/postgrey/pkg-descr	Sun May 12 14:29:46 2013	(r317962)
 @@ -1,4 +1,4 @@
  Postgrey is a program which implements greylisting and is
  designed to work with the Postfix MTA.
  
 -WWW:  http://postgrey.schweikert.ch/
 +WWW: http://postgrey.schweikert.ch/
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 

From: Guido Falsi <madpilot@FreeBSD.org>
To: Darren Pilgrim <ports.maintainer@evilphi.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/178400: [patch] mail/postgrey shebangfix
Date: Sun, 12 May 2013 16:20:34 +0200

 On 05/12/13 07:40, Darren Pilgrim wrote:
 > On 2013-05-11 18:37, Darren Pilgrim wrote:
 >> On 2013-05-09 04:36, Guido Falsi wrote:
 >>> While checking this patch I noticed a few more things to fix:
 >> [...]
 >>
 >> I approve the patch attached to this email.
 >
 > Patch was missing bits needed to actually enable OPTIONSng.  Please
 > commit this patch instead:
 >
 
 
 Just a note that OPTIONS_DEFINE is not strictly needed to have working 
 optionsng. the DOCS option is exposed for all the ports and enabled by 
 default. It can be manipulated through make.conf, for example.
 
 Not all ports expose it with the dialog interface, it's maintainer's 
 choice. Some maintainers have expressed they actually don't want it to 
 be exposed as the only option of their port through the dialog interface.
 
 So both patches could be correct. The maintainer has already expressed 
 his preference though :)
 
 -- 
 Guido Falsi <madpilot@FreeBSD.org>
>Unformatted:
