ports/73157: [PATCH] update mail/milter-sender to include BDB support/fix cache problems

Michael O. Boev mike at tric.tomsk.gov.ru
Tue Oct 26 12:00:48 UTC 2004

>Number:         73157
>Category:       ports
>Synopsis:       [PATCH] update mail/milter-sender to include BDB support/fix cache problems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 26 12:00:47 GMT 2004
>Originator:     Michael O. Boev
>Release:        FreeBSD 4.10-RELEASE i386
Tomsk Regional Information Center
System: FreeBSD isrv.tric.ru 4.10-RELEASE FreeBSD 4.10-RELEASE #3: Fri May 28 14:45:40 NOVST 2004 root at isrv.tric.ru:/usr/obj/usr/src/sys/ISRV i386

	There is a problem with this port's cachefile and BerkeleyDB 1.x used in base FreeBSD,
	mentioned in pkg-message of this port and on milter.org.
	Although it could be theoretically built with any other version of BerkeleyDB,
	choosing a v3+ resulted in inablility to read sendmail's databases.
	Now that there's support (in mail/sendmail) for databases of later versions of
	BerkeleyDB, the user may choose to use both features, cache in DB format and
	support of reading sendmail databases.
	The following patch is:
	1) adding knobs for linking with BDB ports. Knobs copy/pasted from mail/sendmail port,
	to be consistent with the version of BDB the sendmail is linked with.
	2) cosmetic enhancements to rc script.
	3) disconnecting the tools dir of libsnert from the build, to save both build time and
	from portability issues.

--- milter-sender.patch begins here ---
diff -ruN milter-sender.orig/Makefile milter-sender/Makefile
--- milter-sender.orig/Makefile	Mon Oct 25 12:03:49 2004
+++ milter-sender/Makefile	Mon Oct 25 19:23:05 2004
@@ -7,6 +7,8 @@
 PORTNAME=	milter-sender
 MASTER_SITES=	http://www.snert.com/Software/download/
 DISTFILES=	libsnert-1.40.tgz milter-sender-${PORTVERSION}.tgz
@@ -22,6 +24,14 @@
 WRKSRC=		${WRKDIR}/com/snert/src/milter-sender
 MAKEFILE=	makefile
+# Options to define Features
 .include <bsd.port.pre.mk>
 .if ( ${OSVERSION} < 440000 )
@@ -43,10 +53,48 @@
-CONFIGURE_ARGS+=--with-db --localstatedir=/var/spool --enable-cache=flatfile \
+CONFIGURE_ARGS+=--localstatedir=/var/spool \
 .if !defined(WITH_DEBUG)
+BERKELEYDB_PORT?=       databases/db2
+BERKELEYDB_LIB?=                db2
+BERKELEYDB_PORT?=       databases/db3
+BERKELEYDB_LIB?=                db3
+BERKELEYDB_PORT?=       databases/db4
+BERKELEYDB_LIB?=                db4
+BERKELEYDB_PORT?=       databases/db41
+BERKELEYDB_LIB?=                db41
+BERKELEYDB_PORT?=       databases/db42
+BERKELEYDB_LIB?=                db-4.2
+RUN_DEPENDS+=           ${LOCALBASE}/sbin/makemap:${PORTSDIR}/mail/sendmail
+CONFIGURE_ARGS+=--with-db --enable-cache=flatfile
diff -ruN milter-sender.orig/files/milter-sender.sh milter-sender/files/milter-sender.sh
--- milter-sender.orig/files/milter-sender.sh	Mon Oct 25 12:03:49 2004
+++ milter-sender/files/milter-sender.sh	Mon Oct 25 11:36:14 2004
@@ -26,16 +26,16 @@
     if [ -s "$%%NAME%%_chdir/mutex" ]; then
 	ipcrm -s `cat $%%NAME%%_chdir/mutex`
     rm -f $%%NAME%%_chdir/{mutex,socket} $%%NAME%%_pidfile
-    cd $%%NAME%%_chdir && $command $%%NAME%%_flags >/dev/null &
 load_rc_config $name
diff -ruN milter-sender.orig/files/patch-af milter-sender/files/patch-af
--- milter-sender.orig/files/patch-af	Thu Jan  1 07:00:00 1970
+++ milter-sender/files/patch-af	Mon Oct 25 12:47:23 2004
@@ -0,0 +1,11 @@
+--- ../lib/makefile.in.orig	Mon Oct 25 12:44:54 2004
++++ ../lib/makefile.in	Fri Aug 13 20:34:36 2004
+@@ -60,7 +60,7 @@
+ OBJS = LibSnert$O
+-SUBDIRS = crc type util mail sys io ../tools
++SUBDIRS = crc type util mail sys io
+ all: build
diff -ruN milter-sender.orig/pkg-message milter-sender/pkg-message
--- milter-sender.orig/pkg-message	Mon Oct 25 12:03:49 2004
+++ milter-sender/pkg-message	Mon Oct 25 19:21:27 2004
@@ -18,4 +18,11 @@
 of stability, he should change the CacheType= setting to flatfile in
 milter-sender.cf and move the old cache file away.
+A new solution to the problem exists, which may or may not serve better.
+One may build a BerkeleyDB v.2+ -enabled Sendmail (mail/sendmail port 
+has now got knobs for it). This way is, of course, a bit more tricky,
+as in the very minimum one should also rebuild this port with 
+corresponding BDB settings (see Makefile), may be a couple of other 
+programs that use sendmail databases, and rebuild the very databases.
--- milter-sender.patch ends here ---


More information about the freebsd-ports-bugs mailing list