aboutsummaryrefslogtreecommitdiff
path: root/mail/dspam-devel
diff options
context:
space:
mode:
authorMarcus Alves Grando <mnag@FreeBSD.org>2005-11-11 12:24:37 +0000
committerMarcus Alves Grando <mnag@FreeBSD.org>2005-11-11 12:24:37 +0000
commit07a08f5dae81e728c6e9de53017a2b83d9f24ba6 (patch)
tree6c40ed465ebe45887210904c303b49567130b5bf /mail/dspam-devel
parent54cb5b41b935c23d53b94914cfd672fc873f59a1 (diff)
downloadports-07a08f5dae81e728c6e9de53017a2b83d9f24ba6.tar.gz
ports-07a08f5dae81e728c6e9de53017a2b83d9f24ba6.zip
Notes
Diffstat (limited to 'mail/dspam-devel')
-rw-r--r--mail/dspam-devel/Makefile59
-rw-r--r--mail/dspam-devel/distinfo5
-rw-r--r--mail/dspam-devel/files/UPDATING23
-rw-r--r--mail/dspam-devel/files/patch-scripts_train.pl17
-rw-r--r--mail/dspam-devel/files/patch-src_libdspam.c23
-rw-r--r--mail/dspam-devel/pkg-plist2
6 files changed, 108 insertions, 21 deletions
diff --git a/mail/dspam-devel/Makefile b/mail/dspam-devel/Makefile
index 8455e07babca..096c637d10d9 100644
--- a/mail/dspam-devel/Makefile
+++ b/mail/dspam-devel/Makefile
@@ -12,14 +12,13 @@
PORTNAME= dspam-devel
PORTVERSION= ${PORTVER_MAJ}${SNAP_DATE}
-PORTREVISION= 0
CATEGORIES= mail
MASTER_SITES= http://people.tecnik93.com/~itetcu/FreeBSD/ports/${PORTNAME}/sources/
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 +86,7 @@ OPTIONS+= POSTFIX_MBC "Dspam as mailbox_command in Postfix" off
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 +106,7 @@ STRIP=
PKGMESSAGE= ${WRKSRC}/src/README.FreeBSD
-_UPD_LINE_NO= 16
+_UPD_LINE_NO= 23
CONFLICTS= dspam-[0-9]*
@@ -227,7 +227,8 @@ _DBDRV:= ${_DBDRV:S/pgsql_drv,//}
.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 +239,20 @@ PLIST_SUB+= DB4="@comment "
.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 +401,7 @@ RUN_DEPENDS+= ${SITE_PERL}/GD/Graph3d.pm:${PORTSDIR}/graphics/p5-GD-Graph3d
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 +413,13 @@ PLIST_SUB+= CGI="@comment "
_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 +469,6 @@ pre-extract:
@${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 +506,22 @@ post-patch:
@${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 +560,7 @@ pre-configure:
@${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 +604,7 @@ post-install:
@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 +617,7 @@ post-install:
.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} && \
@@ -618,6 +634,11 @@ post-install:
${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
.if !defined(NOPORTDOCS)
diff --git a/mail/dspam-devel/distinfo b/mail/dspam-devel/distinfo
index 665646d3c417..5f4d75df6cbc 100644
--- a/mail/dspam-devel/distinfo
+++ b/mail/dspam-devel/distinfo
@@ -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 --git a/mail/dspam-devel/files/UPDATING b/mail/dspam-devel/files/UPDATING
index 4503e8d3ad25..8433e99c9ac6 100644
--- a/mail/dspam-devel/files/UPDATING
+++ b/mail/dspam-devel/files/UPDATING
@@ -12,6 +12,29 @@ also the UPGRADING enclosed in the dspam distribution. You can see it by doing
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 --git a/mail/dspam-devel/files/patch-scripts_train.pl b/mail/dspam-devel/files/patch-scripts_train.pl
new file mode 100644
index 000000000000..3550e64474f5
--- /dev/null
+++ b/mail/dspam-devel/files/patch-scripts_train.pl
@@ -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 --git a/mail/dspam-devel/files/patch-src_libdspam.c b/mail/dspam-devel/files/patch-src_libdspam.c
new file mode 100644
index 000000000000..e7f818e9502c
--- /dev/null
+++ b/mail/dspam-devel/files/patch-src_libdspam.c
@@ -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 --git a/mail/dspam-devel/pkg-plist b/mail/dspam-devel/pkg-plist
index 9808731f752a..dbf1d74a5842 100644
--- a/mail/dspam-devel/pkg-plist
+++ b/mail/dspam-devel/pkg-plist
@@ -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_logrotate
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