Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jul 2008 21:30:06 GMT
From:      "Philip M. Gollucci" <pgollucci@p6m7g8.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        ache@FreeBSD.org
Subject:   ports/125653: [PATCH] mail/milter-greylist: USE_RC_SUBR !=yes, cleanups
Message-ID:  <200807152130.m6FLU6cU038557@riderwayinc.com>
Resent-Message-ID: <200807152140.m6FLe15v033784@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         125653
>Category:       ports
>Synopsis:       [PATCH] mail/milter-greylist: USE_RC_SUBR !=yes, cleanups
>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:   Tue Jul 15 21:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Philip M. Gollucci
>Release:        FreeBSD 7.0-RELEASE amd64
>Organization:
Riderway Inc.
>Environment:
System: FreeBSD riderwayinc.com 7.0-RELEASE FreeBSD 7.0-RELEASE #2: Thu Feb 28 21:20:48 UTC 2008
>Description:
- Respect NO_INSTALL_MANPAGES
- repocopy [files/milter-greylist.sh -> files/milter-greylist.in, pkg-message -> files/pkg-message.in]
  itectu@: no more .sh
- Bump PORTREVISION
- Broken messages are not quoted
- silence some portlint tab warnings
- seperate NOPORTDOCS from NOPORTEXAMPLES
- drop 5.x support
- use SUB_FILES for pkg-message processing
- make use of @dirrmtry in pkg-plist

Added file(s):
- files/milter-greylist.in
- files/pkg-message.in

Removed file(s):
- pkg-message
- files/milter-greylist.sh

Port maintainer (ache@FreeBSD.org) is cc'd.

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

--- milter-greylist-4.0_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/milter-greylist/Makefile,v
retrieving revision 1.24
diff -u -u -r1.24 Makefile
--- Makefile	28 Apr 2008 23:23:06 -0000	1.24
+++ Makefile	15 Jul 2008 21:27:19 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	milter-greylist
 PORTVERSION=	4.0
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	ftp://ftp.espci.fr/pub/milter-greylist/
 DISTNAME=	milter-greylist-${PORTVERSION}
@@ -29,10 +30,10 @@
 # installed port preference over it.
 ##
 
+.if !defined (NO_INSTALL_MANPAGES)
 MAN5=		greylist.conf.5
 MAN8=		milter-greylist.8
-
-.include <bsd.port.pre.mk>
+.endif
 
 .if !defined(WITH_SENDMAIL_BASE) && \
     !defined(WITH_SENDMAIL_PORT) && \
@@ -45,7 +46,7 @@
 _MILT_DEP=
 MILTERBASE=	/usr
 .else
-BROKEN=		"Base system sendmail not found or too old, rebuild with WITH_SENDMAIL_PORT=yes"
+BROKEN=		Base system sendmail not found or too old, rebuild with WITH_SENDMAIL_PORT=yes
 .endif
 .else
 _MILT_DEP=	${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
@@ -56,23 +57,19 @@
 # If you have a reentrant resolver (starting with RELENG_5_2) you can use SPF
 ##
 .if defined(WITH_LIBSPF2)
-.if ${OSVERSION} < 502102
-IGNORE=		Using libspf2 requires a thread safe resolver
-.else
 BUILD_DEPENDS+=	libspf2>=1.2.5:${PORTSDIR}/mail/libspf2
-CONFIGURE_ARGS+= 	--with-libspf2=${LOCALBASE}
-.endif
+CONFIGURE_ARGS+=	--with-libspf2=${LOCALBASE}
 .endif
 .if defined(WITH_GEOIP)
 BUILD_DEPENDS+=	GeoIP>=1.4.4:${PORTSDIR}/net/GeoIP
-CONFIGURE_ARGS+= 	--with-libGeoIP=${LOCALBASE}
+CONFIGURE_ARGS+=	--with-libGeoIP=${LOCALBASE}
 .endif
 .if defined(WITH_CURL)
-BUILD_DEPENDS+= curl>=7.18:${PORTSDIR}/ftp/curl
+BUILD_DEPENDS+=	curl>=7.18:${PORTSDIR}/ftp/curl
 CONFIGURE_ARGS+=	--with-curl=${LOCALBASE}
 .endif
 RUN_DEPENDS+=	${BUILD_DEPENDS}
-BUILD_DEPENDS+= ${_MILT_DEP}
+BUILD_DEPENDS+=	${_MILT_DEP}
 
 CFLAGS+=	${PTHREAD_CFLAGS}
 LIBS+=		${PTHREAD_LIBS}
@@ -80,39 +77,30 @@
 GNU_CONFIGURE=	yes
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_ARGS+=	--with-user=mailnull --with-libmilter=${MILTERBASE}
-.if ${OSVERSION} >= 502102
-CONFIGURE_ARGS+=	--enable-dnsrbl --with-thread-safe-resolver
-.endif
 CONFIGURE_ENV+=	CFLAGS="${CFLAGS}" LIBS="${LIBS} "
 
 ALL_TARGET=	milter-greylist
+SUB_FILES+=	pkg-message
 
-USE_RC_SUBR=	yes
-RC_SCRIPTS_SUB=	PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
-
-post-extract:
-	@${SED}	${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
-		${FILESDIR}/milter-greylist.sh > ${WRKSRC}/milter-greylist.sh
+USE_RC_SUBR=	milter-greylist
 
 do-install:
 	@${MKDIR} ${PREFIX}/etc/mail
-	@${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist ${PREFIX}/libexec
 	@${INSTALL_MAN} ${WRKSRC}/greylist.conf.5 ${PREFIX}/man/man5
 	@${INSTALL_MAN} ${WRKSRC}/milter-greylist.8 ${PREFIX}/man/man8
+	@${INSTALL_PROGRAM} ${WRKSRC}/milter-greylist ${PREFIX}/libexec
 	@${INSTALL_DATA} ${WRKSRC}/greylist.conf \
 			${PREFIX}/etc/mail/greylist.conf.sample
-	@${INSTALL_SCRIPT} ${WRKSRC}/milter-greylist.sh ${PREFIX}/etc/rc.d/
-	@${SED} -e "s,%%DOCSDIR%%,${DOCSDIR},g" \
-		-e "s,%%PREFIX%%,${PREFIX},g" \
-		${.CURDIR}/pkg-message > ${PKGMESSAGE}
 
 post-install:
 	@${MKDIR} /var/milter-greylist
 	@${CHOWN} -R mailnull /var/milter-greylist
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
-	@${MKDIR} ${EXAMPLESDIR}
 	@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+.endif
+.if !defined (NOPORTEXAMPLES)
+	@${MKDIR} ${EXAMPLESDIR}
 	@${INSTALL_DATA} ${WRKSRC}/greylist.conf ${EXAMPLESDIR}
 .endif
 	@${TEST} -f /var/db/milter-greylist/greylist.db && ( \
@@ -131,4 +119,4 @@
 	) || ${TRUE}
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Index: pkg-message
===================================================================
RCS file: pkg-message
diff -N pkg-message
--- pkg-message	10 Dec 2006 14:01:02 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-===> IMPORTANT NOTE
-
-    A sample configuration file has been installed in %%PREFIX%%/etc/mail
-    directory. Copy and edit it to suit your needs before launching
-    milter-greylist.
-
-    Add following lines
-
-dnl j,{if_addr},{cert_subject},i,{auth_authen} are already enabled by default
-define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO``, {verify}'')
-define(`confMILTER_MACROS_ENVRCPT', confMILTER_MACROS_ENVRCPT``, {greylist}'')
-INPUT_MAIL_FILTER(`greylist', `S=local:/var/milter-greylist/milter-greylist.sock, F=T, T=R:30s')
-
-    to your /etc/mail/<your_host>.mc configuration.
-
-    To run milter-greylist from startup, add miltergreylist_enable="YES"
-    in your /etc/rc.conf or your /etc/rc.conf.local
-
-    See %%DOCSDIR%%/README for operation details.
-
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/mail/milter-greylist/pkg-plist,v
retrieving revision 1.5
diff -u -u -r1.5 pkg-plist
--- pkg-plist	25 Apr 2008 19:15:33 -0000	1.5
+++ pkg-plist	15 Jul 2008 21:27:19 -0000
@@ -1,12 +1,11 @@
 libexec/milter-greylist
 etc/mail/greylist.conf.sample
-etc/rc.d/milter-greylist.sh
 %%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%EXAMPLESDIR%%/greylist.conf
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/greylist.conf
 @exec /bin/mkdir -p /var/milter-greylist
 @exec /usr/sbin/chown -R mailnull /var/milter-greylist
 @exec [ -f /var/db/milter-greylist/greylist.db ] && printf '\n\n************************************************************\n************************************************************\n**                                                        **\n**                        WARNING                         **\n**                                                        **\n** The default dump file location has changed.            **\n** Please move greylist.db from /var/db/milter-greylist/  **\n** to /var/milter-greylist/ and update your greylist.conf **\n** accordingly.                                           **\n**                                                        **\n************************************************************\n************************************************************\n' ||true
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
-%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
-@unexec /bin/rmdir %D/etc/mail 2>/dev/null || true
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
+@dirrmtry etc/mail
 @unexec [ -f /var/milter-greylist/greylist.db ] || /bin/rmdir /var/milter-greylist || true
Index: files/milter-greylist.in
===================================================================
RCS file: files/milter-greylist.in
diff -N files/milter-greylist.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/milter-greylist.in	15 Jul 2008 21:27:19 -0000
@@ -0,0 +1,34 @@
+#!/bin/sh
+# $FreeBSD: ports/mail/milter-greylist/files/milter-greylist.sh,v 1.4 2006/12/10 05:10:38 ache Exp $
+
+# PROVIDE: miltergreylist
+# REQUIRE: LOGIN
+# BEFORE: sendmail
+# KEYWORD: milter-greylist
+
+# Define these miltergreylist_* variables in one of these files:
+#       /etc/rc.conf
+#       /etc/rc.conf.local
+#       /etc/rc.conf.d/miltergreylist
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+
+. %%RC_SUBR%%
+
+name="miltergreylist"
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/libexec/milter-greylist"
+
+load_rc_config $name
+
+miltergreylist_enable=${miltergreylist_enable-"NO"}
+miltergreylist_runas=${miltergreylist_runas-"mailnull"}
+miltergreylist_pidfile=${miltergreylist_pidfile-"/var/run/milter-greylist.pid"}
+miltergreylist_sockfile=${miltergreylist_sockfile-"/var/milter-greylist/milter-greylist.sock"}
+miltergreylist_cfgfile=${miltergreylist_cfgfile-"%%PREFIX%%/etc/mail/greylist.conf"}
+miltergreylist_flags=${miltergreylist_flags-"-P $miltergreylist_pidfile \
+-f $miltergreylist_cfgfile -p $miltergreylist_sockfile -u $miltergreylist_runas"}
+
+run_rc_command "$1"
Index: files/milter-greylist.sh
===================================================================
RCS file: files/milter-greylist.sh
diff -N files/milter-greylist.sh
--- files/milter-greylist.sh	10 Dec 2006 05:10:38 -0000	1.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-#!/bin/sh
-# $FreeBSD: ports/mail/milter-greylist/files/milter-greylist.sh,v 1.4 2006/12/10 05:10:38 ache Exp $
-
-# PROVIDE: miltergreylist
-# REQUIRE: LOGIN
-# BEFORE: sendmail
-# KEYWORD: milter-greylist
-
-# Define these miltergreylist_* variables in one of these files:
-#       /etc/rc.conf
-#       /etc/rc.conf.local
-#       /etc/rc.conf.d/miltergreylist
-#
-# DO NOT CHANGE THESE DEFAULT VALUES HERE
-#
-
-. %%RC_SUBR%%
-
-name="miltergreylist"
-rcvar=`set_rcvar`
-
-load_rc_config $name
-
-miltergreylist_enable=${miltergreylist_enable-"NO"}
-miltergreylist_runas=${miltergreylist_runas-"mailnull"}
-miltergreylist_pidfile=${miltergreylist_pidfile-"/var/run/milter-greylist.pid"}
-miltergreylist_sockfile=${miltergreylist_sockfile-"/var/milter-greylist/milter-greylist.sock"}
-miltergreylist_cfgfile=${miltergreylist_cfgfile-"%%PREFIX%%/etc/mail/greylist.conf"}
-miltergreylist_flags=${miltergreylist_flags-"-P $miltergreylist_pidfile \
--f $miltergreylist_cfgfile -p $miltergreylist_sockfile -u $miltergreylist_runas"}
-
-command="%%PREFIX%%/libexec/milter-greylist"
-
-run_rc_command "$1"
Index: files/pkg-message.in
===================================================================
RCS file: files/pkg-message.in
diff -N files/pkg-message.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/pkg-message.in	15 Jul 2008 21:27:19 -0000
@@ -0,0 +1,20 @@
+===> IMPORTANT NOTE
+
+    A sample configuration file has been installed in %%PREFIX%%/etc/mail
+    directory. Copy and edit it to suit your needs before launching
+    milter-greylist.
+
+    Add following lines
+
+dnl j,{if_addr},{cert_subject},i,{auth_authen} are already enabled by default
+define(`confMILTER_MACROS_HELO', confMILTER_MACROS_HELO``, {verify}'')
+define(`confMILTER_MACROS_ENVRCPT', confMILTER_MACROS_ENVRCPT``, {greylist}'')
+INPUT_MAIL_FILTER(`greylist', `S=local:/var/milter-greylist/milter-greylist.sock, F=T, T=R:30s')
+
+    to your /etc/mail/<your_host>.mc configuration.
+
+    To run milter-greylist from startup, add miltergreylist_enable="YES"
+    in your /etc/rc.conf or your /etc/rc.conf.local
+
+    See %%DOCSDIR%%/README for operation details.
+
--- milter-greylist-4.0_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807152130.m6FLU6cU038557>