Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Nov 2005 22:23:21 +0200
From:      "Ion-Mihai "IOnut" Tetcu" <itetcu@people.tecnik93.com>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/88688: [MAINTAINER UPDATE] mail/dspam-devel: update to 3.6.1
Message-ID:  <1131481401.0@it.buh.tecnik93.com>
Resent-Message-ID: <200511082030.jA8KUH2F091198@freefall.freebsd.org>

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

>Number:         88688
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE] mail/dspam-devel: update to 3.6.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 08 20:30:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Ion-Mihai "IOnut" Tetcu
>Release:        FreeBSD 6.0-RC1 i386
>Organization:
>Environment:


System: FreeBSD 6.0-RC1 #1: Fri Oct 28 10:49:49 EEST 2005



>Description:


 dspam-devel-3.6.1

## Before anyone asks, I WON'T MFC in mail/dspam until the memory leak is resolved.

!!! WARNING: Both dspam 3.6.0 and 3.6.1 have a memory leak !!!
Watch the size and res (top -o size or top -o res) of dspam process and
restart it (/usr/local/etc/rc.d/dspam-devel.sh restart) when it gets to big.

BUGFIX: ParseToHeaders can segfault on malformatted To header
BUGFIX: TrackSources does not correctly parse messages with QMail Received
headers
BUGFIX: Missing check for existing strcasestr
BUGFIX: X-DSPAM-Reclassified heading appears blank
BUGFIX: Plused-Detail support does not work with domains
BUGFIX: Hash databases are not 8-byte aligned (do not work with 64-bit systems)
use cssconvert to convert your hash file
BUGFIX: Certain daemon-mode operations append a trailing period
BUGFIX: DataSource 'document' option causes improper processing
BUGFIX: Segfaults occur on malformed Content-Type header
BUGFIX: History appears blank in dspam.cgi

- WITH_TRAIN_SCRIPT for an example training script dspam_train

Add SHA256 sum to distinfo
 


>How-To-Repeat:





>Fix:


--- dspam-devel-3.6.0_to_3.6.1.diff begins here ---
diff -urN dspam-devel.cvs/Makefile dspam-devel/Makefile
--- dspam-devel.cvs/Makefile	Wed Oct 26 10:58:04 2005
+++ dspam-devel/Makefile	Tue Nov  8 21:55:09 2005
@@ -19,7 +19,7 @@
 MAINTAINER=	itetcu@people.tecnik93.com
 COMMENT=	Bayesian spam filter - development version
 
-PORTVER_MAJ=	3.6.0
+PORTVER_MAJ=	3.6.1
 #SNAP_DATE=	.20051016.2141
 
 .ifdef(SNAP_DATE)
@@ -87,6 +87,7 @@
 OPTIONS+=	QMAIL "Play nice with Qmail mail server" off
 
 OPTIONS+=	CGI "Install CGI (pulls in apache)" off
+OPTIONS+=	TRAIN_SCRIPT "Install trainning script (needs perl)" off
 
 USE_LIBTOOL_VER=15
 USE_REINPLACE=	yes
@@ -106,7 +107,7 @@
 
 PKGMESSAGE=	 ${WRKSRC}/src/README.FreeBSD
 
-_UPD_LINE_NO=	16
+_UPD_LINE_NO=	23
 
 CONFLICTS=	dspam-[0-9]*
 
@@ -227,7 +228,8 @@
 .endif
 
 .if defined(WITH_BDB4)
-LIB_DEPENDS+=	db41.1:${PORTSDIR}/databases/db41
+# change me when we have BDB_VERSOIN in bsd.databases.mk
+USE_BDB=	41
 CONFIGURE_ARGS+=	--with-db4-includes=${LOCALBASE}/include/db41
 PLIST_SUB+=	DB4=""
 #PKGNAMESUFFIX=	-bdb41
@@ -238,22 +240,20 @@
 .endif
 
 .if defined(WITH_SQLITE3)
-HAVE_SQLITE=	yes
-LIB_DEPENDS+=	sqlite3.8:${PORTSDIR}/databases/sqlite3
+USE_SQLITE=	3
 _DBDRV_COUNT:=	${_DBDRV_COUNT}o
 .else
 _DBDRV:=	${_DBDRV:S/sqlite3_drv,//}
 .endif
 
 .if defined(WITH_SQLITE2)
-HAVE_SQLITE=	yes
-LIB_DEPENDS+=	sqlite.2:${PORTSDIR}/databases/sqlite2
+USE_SQLITE=	2
 _DBDRV_COUNT:=	${_DBDRV_COUNT}o
 .else
 _DBDRV:=	${_DBDRV:S/sqlite_drv,//}
 .endif
 
-.if defined(HAVE_SQLITE)
+.if defined(USE_SQLITE)
 CONFIGURE_ARGS+=	--with-sqlite-includes=${LOCALBASE}/include \
 			--with-sqlite-libraries=${LOCALBASE}/lib
 PLIST_SUB+=	SQLITE=""
@@ -402,7 +402,7 @@
 RUN_DEPENDS+=	${SITE_PERL}/GD/Text.pm:${PORTSDIR}/graphics/p5-GD-TextUtil
 CONFIGURE_ARGS+=--enable-logging
 CONFIGURE_ARGS+=--enable-user-logging
-USE_PERL5_RUN=	yes
+USE_PERL5=	yes
 PLIST_SUB+=	CGI=""
 CGI_PATH?=	${PREFIX}/www/vhosts/dspam
 _SED_SCRIPT+=	-e 's/%%CGI%%//g'
@@ -414,6 +414,13 @@
 _SED_SCRIPT+=	-e '/%%CGI%%/D'
 .endif
 
+.ifdef(WITH_TRAIN_SCRIPT)
+USE_PERL5=	yes
+PLIST_SUB+=	TRAIN_SCRIPT=""
+.else
+PLIST_SUB+=	TRAIN_SCRIPT="@comment "
+.endif
+
 MAN1=	dspam.1 dspam_clean.1 dspam_corpus.1 dspam_dump.1 dspam_merge.1 \
 	dspam_stats.1
 MAN3=	libdspam.3
@@ -463,7 +470,6 @@
 		@${ECHO_CMD} "installed in other place that this installation's default"
 		@${ECHO_CMD} "${PREFIX}/www/vhosts/dspam"
 .	endif
-	@${ECHO_CMD} "Define WITHOUT_DAEMON if not using OPTIONS and do not want daemon."
 	@${ECHO_CMD} ""
 	@sleep 5
 
@@ -501,11 +507,22 @@
 	@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \
 		${WRKSRC}/Makefile.in
 
-	@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|'  ${WRKSRC}/src/tools.mysql_drv/purge.sql
-	@${REINPLACE_CMD} -e 's|WHERE CURRENT_DATE - created_on > 14;|WHERE CURRENT_DATE - created_on > ${SIGNATURE_LIFE};|'  ${WRKSRC}/src/tools.pgsql_drv/purge.sql
-	@${REINPLACE_CMD} -e 's|where SYSDATE-created_on > 14|where SYSDATE-created_on > ${SIGNATURE_LIFE};|'  ${WRKSRC}/src/tools.ora_drv/purge.sql
-	@${REINPLACE_CMD} -e "s|where date('now')-date(created_on) > 14;|where date('now')-date(created_on) > ${SIGNATURE_LIFE};|"  ${WRKSRC}/src/tools.sqlite_drv/purge-2.sql
-	@${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|"  ${WRKSRC}/src/tools.sqlite_drv/purge-3.sql
+	@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|' \
+		${WRKSRC}/src/tools.mysql_drv/purge.sql
+	@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|' \
+		${WRKSRC}/src/tools.mysql_drv/purge-4.1.sql
+	@${REINPLACE_CMD} -e 's|WHERE CURRENT_DATE - created_on > 14;|WHERE CURRENT_DATE - created_on > ${SIGNATURE_LIFE};|' \
+		${WRKSRC}/src/tools.pgsql_drv/purge.sql
+	@${REINPLACE_CMD} -e 's|where SYSDATE-created_on > 14|where SYSDATE-created_on > ${SIGNATURE_LIFE};|' \
+		${WRKSRC}/src/tools.ora_drv/purge.sql
+	@${REINPLACE_CMD} -e "s|where date('now')-date(created_on) > 14;|where date('now')-date(created_on) > ${SIGNATURE_LIFE};|" \
+		${WRKSRC}/src/tools.sqlite_drv/purge-2.sql
+	@${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|" \
+		 ${WRKSRC}/src/tools.sqlite_drv/purge-3.sql
+
+.ifdef(WITH_TRAIN_SCRIPT)
+	 @${REINPLACE_CMD} -e "s^%%PERL%%^${PERL}^; s^%%DSPAM_PATH%%^${PREFIX}/bin^" ${WRKSRC}/scripts/train.pl
+.endif
 
 pre-configure:
 	@${ECHO_CMD}
@@ -544,7 +561,7 @@
 	@${FALSE}
 .endif
 .if defined(WITH_LDAP) && !( defined(USE_MYSQL) || \
-	defined(WITH_POSTGRESQL) || defined(HAVE_SQLITE) )
+	defined(WITH_POSTGRESQL) || defined(USE_SQLITE) )
 	@${ECHO_CMD} "You need MySQL, Postgres or SQLITE for LDAP."
 	@${FALSE}
 .endif
@@ -588,7 +605,7 @@
 	@cd  ${WRKSRC}/src/tools.pgsql_drv && \
 		${INSTALL_DATA} *.sql ${EXAMPLESDIR}/pgsql
 .endif
-.ifdef(HAVE_SQLITE)
+.ifdef(USE_SQLITE)
 	@${MKDIR} ${EXAMPLESDIR}/sqlite
 	cd ${WRKSRC}/src/tools.sqlite_drv && \
 		${INSTALL_DATA} *.sql ${EXAMPLESDIR}/sqlite
@@ -601,7 +618,7 @@
 
 .ifdef(WITH_CGI)
 .	for I in admin.cgi admingraph.cgi configure.pl dspam.cgi graph.cgi
-		@${SED} -i '' -e "s,/usr/bin/perl,${PERL},g" ${WRKSRC}/webui/cgi-bin/${I}
+		@${REINPLACE_CMD} -e "s,/usr/bin/perl,${PERL},g" ${WRKSRC}/webui/cgi-bin/${I}
 .	endfor
 	cd ${WRKSRC}/webui/cgi-bin && ${MV} configure.pl configure.pl.sample
 	cd ${WRKSRC}/webui/cgi-bin && ${MKDIR} ${CGI_PATH} && \
@@ -616,6 +633,11 @@
 		${INSTALL_DATA} admins ${CGI_PATH}/admins.sample
 	@${MKDIR} ${CGI_PATH}/templates && cd ${WRKSRC}/webui/cgi-bin/templates && \
 		${INSTALL_DATA} *.html ${CGI_PATH}/templates/
+.endif
+
+.ifdef(WITH_TRAIN_SCRIPT)
+	cd ${WRKSRC}/scripts && \
+		${INSTALL_SCRIPT} train.pl ${PREFIX}/bin/dspam_train
 .endif
 
 	@${SED} ${_SED_SCRIPT} ${.CURDIR}/pkg-message > ${WRKSRC}/README.FreeBSD
diff -urN dspam-devel.cvs/distinfo dspam-devel/distinfo
--- dspam-devel.cvs/distinfo	Wed Oct 26 10:58:04 2005
+++ dspam-devel/distinfo	Tue Nov  8 21:09:49 2005
@@ -1,2 +1,3 @@
-MD5 (dspam-devel-3.6.0.tar.gz) = d9ee63a8cf67ea933d711b00851ce916
-SIZE (dspam-devel-3.6.0.tar.gz) = 732042
+MD5 (dspam-devel-3.6.1.tar.gz) = 615807289462859f6e2cd12e3f490a49
+SHA256 (dspam-devel-3.6.1.tar.gz) = a07f5c4d327cad924175a31607ba1e7986fbe1896247256e051461622ee3375d
+SIZE (dspam-devel-3.6.1.tar.gz) = 739401
diff -urN dspam-devel.cvs/files/UPDATING dspam-devel/files/UPDATING
--- dspam-devel.cvs/files/UPDATING	Wed Oct 26 10:58:04 2005
+++ dspam-devel/files/UPDATING	Tue Nov  8 14:49:34 2005
@@ -12,6 +12,29 @@
 in the port directory:
 make extract;  more `find . -type f -maxdepth 2 -name UPGRADING`
 
+###########################################################################
+# dspam-devel-3.6.1
+#
+
+!!! WARNING: Both dspam 3.6.0 and 3.6.1 have a memory leak !!!
+Watch the size and res (top -o size or top -o res) of dspam process and
+restart it (/usr/local/etc/rc.d/dspam-devel.sh restart) when it gets to big.
+
+BUGFIX: ParseToHeaders can segfault on malformatted To header
+BUGFIX: TrackSources does not correctly parse messages with QMail Received
+headers
+BUGFIX: Missing check for existing strcasestr
+BUGFIX: X-DSPAM-Reclassified heading appears blank
+BUGFIX: Plused-Detail support does not work with domains
+BUGFIX: Hash databases are not 8-byte aligned (do not work with 64-bit systems)
+use cssconvert to convert your hash file
+BUGFIX: Certain daemon-mode operations append a trailing period
+BUGFIX: DataSource 'document' option causes improper processing
+BUGFIX: Segfaults occur on malformed Content-Type header
+BUGFIX: History appears blank in dspam.cgi
+
+- WITH_TRAIN_SCRIPT for an example training script dspam_train
+
 
 ###########################################################################
 # dspam-devel-3.6.0
diff -urN dspam-devel.cvs/files/patch-scripts_train.pl dspam-devel/files/patch-scripts_train.pl
--- dspam-devel.cvs/files/patch-scripts_train.pl	Thu Jan  1 02:00:00 1970
+++ dspam-devel/files/patch-scripts_train.pl	Tue Nov  8 14:39:10 2005
@@ -0,0 +1,17 @@
+--- scripts/train.pl.dist	Tue Nov  8 14:34:38 2005
++++ scripts/train.pl	Tue Nov  8 14:36:06 2005
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl
++#!%%PERL%%
+ 
+ # train.pl
+ # This tool trains a corpus of messages (a directory containing a nonspam and
+@@ -14,7 +14,7 @@
+ use vars qw { $USER $PATH $REPORTING_WINDOW $CORPUS $TRAINING_MODE };
+ 
+ $REPORTING_WINDOW  = 250;			# How often to summarize
+-$PATH              = "/usr/local/dspam/bin";	# Path to dspam binaries
++$PATH              = "%%DSPAM_PATH%%";		# Path to dspam binaries
+ $TRAINING_MODE     = "teft";			# Training mode
+ 
+ ### DO NOT CONFIGURE BELOW THIS LINE ###
diff -urN dspam-devel.cvs/files/patch-src_libdspam.c dspam-devel/files/patch-src_libdspam.c
--- dspam-devel.cvs/files/patch-src_libdspam.c	Thu Jan  1 02:00:00 1970
+++ dspam-devel/files/patch-src_libdspam.c	Tue Nov  8 22:10:38 2005
@@ -0,0 +1,23 @@
+--- src/libdspam.c	2 Nov 2005 19:39:28 -0000	1.142
++++ src/libdspam.c	8 Nov 2005 15:26:44 -0000	1.143
+@@ -672,6 +672,8 @@
+     current_heading = (ds_header_t) node_nt->ptr;
+     if (!strcmp (current_heading->heading, "Received"))
+     {
++      char *data, *ptr, *tok;
++
+       // detect and skip "Received: (qmail..." lines
+       if (!strncmp(current_heading->data, "(qmail", 6))
+       {
+@@ -680,9 +682,8 @@
+         continue;
+       }
+ 
+-      char *data = strdup (current_heading->data);
+-      char *ptr = strstr (data, "from");
+-      char *tok;
++      data = strdup (current_heading->data);
++      ptr = strstr (data, "from");
+ 
+       if (ptr != NULL)
+       {
diff -urN dspam-devel.cvs/pkg-plist dspam-devel/pkg-plist
--- dspam-devel.cvs/pkg-plist	Wed Oct 26 10:58:04 2005
+++ dspam-devel/pkg-plist	Tue Nov  8 21:59:42 2005
@@ -1,6 +1,7 @@
 %%HASH%%bin/cssstat
 %%HASH%%bin/csscompress
 %%HASH%%bin/cssclean
+%%HASH%%bin/cssconvert
 bin/dspam
 bin/dspamc
 bin/dspam_2sql
@@ -14,6 +15,7 @@
 bin/dspam_merge
 %%PGSQL%%bin/dspam_pg2int8
 bin/dspam_stats
+%%TRAIN_SCRIPT%%bin/dspam_train
 @unexec if cmp -s %D/etc/dspam.conf %D/etc/dspam.conf.sample; then rm -f %D/etc/dspam.conf; fi
 etc/dspam.conf.sample
 include/dspam/buffer.h
--- dspam-devel-3.6.0_to_3.6.1.diff ends here ---



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



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