ports/90725: [PATCH] mail/postgrey: fix compatibility
Yen-Ming Lee
leeym at FreeBSD.org
Wed Dec 21 02:20:04 UTC 2005
>Number: 90725
>Category: ports
>Synopsis: [PATCH] mail/postgrey: fix compatibility
>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: Wed Dec 21 02:20:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Yen-Ming Lee
>Release: FreeBSD 6.0-STABLE i386
>Organization:
FreeBSD Taiwan
>Environment:
System: FreeBSD utopia.leeym.com 6.0-STABLE FreeBSD 6.0-STABLE #0: Thu Nov 17 09:15:19 CST 2005
>Description:
- postgrey is compatibile with Berkeley-DB < 4.1 since postgrey-1.23
(WWW: http://lists.ee.ethz.ch/postgrey/msg00922.html)
- replace USE_PERL5 with USE_PERL5_RUN
- install postgreyreport
- add comment and update wording for IGNORE message
- bump PORTREVISION
Removed file(s):
- pkg-req
Port maintainer (haroldp at internal.org) is cc'd.
Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:
--- postgrey-1.23_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/mail/postgrey/Makefile,v
retrieving revision 1.10
diff -u -u -r1.10 Makefile
--- Makefile 24 Nov 2005 08:24:56 -0000 1.10
+++ Makefile 21 Dec 2005 01:42:58 -0000
@@ -7,6 +7,7 @@
PORTNAME= postgrey
PORTVERSION= 1.23
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://isg.ee.ethz.ch/tools/postgrey/pub/
@@ -17,7 +18,7 @@
${SITE_PERL}/IO/Multiplex.pm:${PORTSDIR}/devel/p5-IO-Multiplex \
${SITE_PERL}/${PERL_ARCH}/BerkeleyDB.pm:${PORTSDIR}/databases/p5-BerkeleyDB
-USE_PERL5= yes
+USE_PERL5_RUN= yes
USE_RC_SUBR= yes
USE_REINPLACE= yes
NO_BUILD= yes
@@ -32,25 +33,13 @@
PKGINSTALL= ${WRKDIR}/pkg-install
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
-pre-extract:
-.if !defined(SKIP_BDB_CHECK) && !defined(PACKAGE_BUILDING)
-.if !defined(WITH_BDB_VER)
- @${ECHO} "This port requires databases/p5-BerkeleyDB to be built with"
- @${ECHO} "WITH_BDB_VER=41 or later."
- exit 1
-.else
-.if ${WITH_BDB_VER} < 41
- @${ECHO} "This port requires databases/p5-BerkeleyDB to be built with"
- @${ECHO} "WITH_BDB_VER=41 or later."
- exit 1
-.endif
-.endif
-.endif
-
.include <bsd.port.pre.mk>
+# Sys::Syslog::openlog won't return 1 for success in perl 5.00503, and causes
+# "Couldn't open syslog[] at ... Net/Server.pm line ..." problem.
+# See the thread of http://lists.ee.ethz.ch/postgrey/msg00001.html
.if ${PERL_LEVEL} < 500600
-IGNORE= Needs perl 5.6.1 or higher, install lang/perl5.8 and try again
+IGNORE= needs perl 5.6.0 or higher, install lang/perl5.8 and try again
.endif
post-patch:
@@ -64,13 +53,11 @@
-e 's#%%PREFIX%%#${PREFIX}#g' -e 's#%%ETCFILES%%#${ETCFILES}#g' \
-e 's#%%POSTGREYDIR%%#${PGY_DIR}#g' ${MASTERDIR}/pkg-install > \
${PKGINSTALL}
-.if !defined(SKIP_BDB_CHECK) && !defined(PACKAGE_BUILDING)
- ${SH} ${PKGREQ} INSTALL
-.endif
${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/postgrey ${PREFIX}/sbin
+ ${INSTALL_SCRIPT} ${WRKSRC}/contrib/postgreyreport ${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKDIR}/postgrey.sh ${PREFIX}/etc/rc.d
${MKDIR} ${PREFIX}/etc/postfix
.for i in ${ETCFILES}
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/mail/postgrey/pkg-plist,v
retrieving revision 1.1
diff -u -u -r1.1 pkg-plist
--- pkg-plist 1 Sep 2004 22:11:21 -0000 1.1
+++ pkg-plist 21 Dec 2005 01:42:58 -0000
@@ -1,6 +1,7 @@
@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
@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
sbin/postgrey
+sbin/postgreyreport
etc/rc.d/postgrey.sh
etc/postfix/dist-postgrey_whitelist_recipients
etc/postfix/dist-postgrey_whitelist_clients
Index: pkg-req
===================================================================
RCS file: pkg-req
diff -N pkg-req
--- pkg-req 1 Sep 2004 22:11:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-PATH=$PATH:/usr/local/bin
-
-if [ "x$1" = "xINSTALL" -o "x$2" = "xINSTALL" ]; then
- perl -e "use BerkeleyDB;BerkeleyDB::Env->new(-Home => 'test',-Flags => DB_CREATE|DB_RECOVER|DB_INIT_TXN|DB_INIT_MPOOL|DB_INIT_LOG,-SetFlags => DB_AUTO_COMMIT|DB_TXN_NOSYNC);"
- if [ $? != 0 ]; then
- echo "-----------------------------------------------------------"
- echo "Postgrey requires databases/p5-BerkeleyDB to be built with"
- echo "Berkeley DB 4.1 or newer. Please reinstall it with the"
- echo "WITH_BDB_VER set to 41 or newer."
- echo "-----------------------------------------------------------"
- exit 1
- fi
-fi
--- postgrey-1.23_1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list