ports/151797: [PATCH] mail/postgrey: respect PGY_DIR and PREFIX

Sunpoet Po-Chuan Hsieh sunpoet at FreeBSD.org
Thu Oct 28 14:10:08 UTC 2010


>Number:         151797
>Category:       ports
>Synopsis:       [PATCH] mail/postgrey: respect PGY_DIR and PREFIX
>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:   Thu Oct 28 14:10:07 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Sunpoet Po-Chuan Hsieh
>Release:        FreeBSD 8.1-STABLE amd64
>Organization:
>Environment:
System: FreeBSD bonjour.sunpoet.net 8.1-STABLE FreeBSD 8.1-STABLE #0: Sat Oct 23 16:01:16 CST 2010
>Description:
- Respect PGY_DIR and PREFIX
  We should apply PGY_DIR / PREFIX substitution to more files.
  Ex: postgreyreport is unawared of ${PGY_DIR}/postgrey.db.
- Bump PORTREVISION

Port maintainer (ports.maintainer at evilphi.com) is cc'd.

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:

% cat /var/log/maillog | /usr/local/sbin/postgreyreport
ERROR: can't find database /var/spool/postgrey/postgrey.db: No such file or directory

% cat /var/log/maillog | /usr/local/sbin/postgreyreport --dbdir /var/db/postgrey
   xx.xx.xx.xx unknown xxx at xxx.xxx

>Fix:

--- postgrey-1.33_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/postgrey/Makefile,v
retrieving revision 1.25
diff -u -u -r1.25 Makefile
--- Makefile	23 Aug 2010 02:46:42 -0000	1.25
+++ Makefile	28 Oct 2010 13:44:21 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	postgrey
 PORTVERSION=	1.33
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	http://postgrey.schweikert.ch/pub/ \
 		http://postgrey.schweikert.ch/pub/old/
@@ -21,7 +22,7 @@
 		${SITE_PERL}/${PERL_ARCH}/Net/DNS.pm:${PORTSDIR}/dns/p5-Net-DNS
 
 USE_PERL5_RUN=	yes
-USE_RC_SUBR=	postgrey
+USE_RC_SUBR=	${PORTNAME}
 NO_BUILD=	yes
 POD2MAN?=	pod2man
 PORTDOCS=	README Changes README.exim
@@ -38,9 +39,8 @@
 MAN1=		${PORTNAME}.1 policy-test.1 postgreyreport.1
 
 post-patch:
-	@${REINPLACE_CMD} -e "s#/etc/#${PREFIX}/etc/#" ${WRKSRC}/postgrey
-	@${REINPLACE_CMD} -e '/^my.*DEFAULT_DBDIR/s|/var/spool/postfix/postgrey|${PGY_DIR}|' \
-	${WRKSRC}/postgrey
+	@${REINPLACE_CMD} -e "s|/etc/|${PREFIX}&|" ${WRKSRC}/postgrey*
+	@${REINPLACE_CMD} -e "s|/var/spool/postfix/postgrey|${PGY_DIR}|" ${WRKSRC}/postgrey ${WRKSRC}/contrib/postgreyreport
 
 pre-install:
 	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
--- postgrey-1.33_1.patch ends here ---

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



More information about the freebsd-ports-bugs mailing list