summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail/dspam-devel/Makefile90
-rw-r--r--mail/dspam-devel/distinfo6
-rw-r--r--mail/dspam-devel/files/UPDATING21
-rw-r--r--mail/dspam-devel/files/dspam-devel.sh.in4
-rw-r--r--mail/dspam-devel/files/patch-CHANGELOG22
-rw-r--r--mail/dspam-devel/files/patch-src_ldap_client.c25
-rw-r--r--mail/dspam-devel/files/patch-src_libdspam.c23
-rw-r--r--mail/dspam-devel/files/patch-src_mysql_drv.c23
-rw-r--r--mail/dspam-devel/files/patch-src_pgsql_drv.c23
-rw-r--r--mail/dspam-devel/pkg-message13
-rw-r--r--mail/dspam-devel/pkg-plist2
11 files changed, 183 insertions, 69 deletions
diff --git a/mail/dspam-devel/Makefile b/mail/dspam-devel/Makefile
index 3464f1a42773..66748add9268 100644
--- a/mail/dspam-devel/Makefile
+++ b/mail/dspam-devel/Makefile
@@ -3,6 +3,7 @@
# Whom: Ion-Mihai "IOnut" Tetcu <itetcu@people.tecnik93.com>
#
# $FreeBSD$
+# $Tecnik: ports/mail/dspam-devel/Makefile,v 1.9 2005/12/12 01:53:28 itetcu Exp $
#
# Note to commiters: If don't commit a maintainer patch and as a result PKGNAME
@@ -18,8 +19,8 @@ MASTER_SITES= http://people.tecnik93.com/~itetcu/FreeBSD/ports/${PORTNAME}/sourc
MAINTAINER= itetcu@people.tecnik93.com
COMMENT= Bayesian spam filter - development version
-PORTVER_MAJ= 3.6.1
-#SNAP_DATE= .20051016.2141
+PORTVER_MAJ= 3.6.2
+#SNAP_DATE= .20051211.2134
.ifdef(SNAP_DATE)
WRKSRC= ${WRKDIR}/dspam-cvs-devel${SNAP_DATE}
@@ -39,38 +40,42 @@ DISTFILES= snapshot-devel.tar.gz
FETCH_BEFORE_ARGS= -v -o ${DISTDIR}/${PORTNAME}-${PORTVERSION}.tar.gz
.endif
-_UPD_LINE_NO= 31
+_UPD_LINE_NO= 17
## debug / log / admin options
OPTIONS= DEBUG "Enable debugging logging" on
OPTIONS+= VERBOSE_DEBUG "Enable debug in LOGDIR/dspam.debug" off
OPTIONS+= BNR_DEBUG "Enable debug for BNR" off
OPTIONS+= PREF_EXT "Preferences in database not in files" off
-OPTIONS+= DAEMON "Daemonize dspam; speak LMTP or DLMTP" on
+OPTIONS+= DAEMON "Daemonize dspam; speaks LMTP or DLMTP" on
## algorithm options
OPTIONS+= NEURAL_NET "Enable neural networking" off
+#
OPTIONS+= CLAMAV "Enable clamav support" on
OPTIONS+= CLAMAV_DEVEL "Enable clamav support" off
-
-## run-time configure options
-OPTIONS+= USER_HOMEDIR "Store user data in ~/.dspam" off
-OPTIONS+= TRUSTED_USERS "Disable trusted user security" off
-
-## back-end
+OPTIONS+= CLAMAV_LOCAL "RUN_DEPEND on selected clamav" on
+#
OPTIONS+= MYSQL40 "Use MySQL 4.0.x as back-end" off
OPTIONS+= MYSQL41 "Use MySQL 4.1.x as back-end" on
OPTIONS+= MYSQL50 "Use MySQL 5.0.x as back-end" off
OPTIONS+= MYSQL_COMPRESS "Compress dspam <--> MySQL" off
+OPTIONS+= MYSQL_LOCAL "RUN_DEPEND on MySQL server selected version" off
OPTIONS+= POSTGRESQL "Use PostgreSQL as back-end" on
+OPTIONS+= POSTGRESQL_LOCAL "RUN_DEPEND on PostgreSQL server" off
OPTIONS+= ORACLE "Use Oracle as back-end (BROKEN)" off
OPTIONS+= BDB4 "Use BDB4 as back-end (not recomanded)" off
OPTIONS+= SQLITE2 "Use SQLite v2.x as back-end" off
OPTIONS+= SQLITE3 "Use SQLite v3.x as back-end" on
OPTIONS+= HASH "Use hash driver" on
-OPTIONS+= VIRT_USERS "Enable virtual users (needs SQL back-end)" off
+#
OPTIONS+= LDAP "Enable recipient verification via LDAP" off
+
+# layout
+OPTIONS+= USER_HOMEDIR "Store user data in ~/.dspam" off
+OPTIONS+= TRUSTED_USERS "Disable trusted user security" off
+OPTIONS+= VIRT_USERS "Enable virtual users (needs SQL back-end)" off
OPTIONS+= LONG_USERNAMES "Usernames longer that OS supports" off
OPTIONS+= LARGE_SCALE "File structure for large scale" off
OPTIONS+= DOMAIN_SCALE "File structure for multiple domains" off
@@ -137,13 +142,15 @@ PLIST_SUB+= DSPAM_HOME=${DSPAM_HOME}
CONFIGURE_ARGS+= --with-dspam-owner=${DSPAM_OWNER}
CONFIGURE_ARGS+= --with-dspam-group=${DSPAM_GROUP}
-# we set DSPAM_MODE at the end as some LDAs whant specific mode
+# we set DSPAM_MODE at the end as some LDAs want specific mode
_SED_SCRIPT= -e 's,%%DOCSDIR%%,${DOCSDIR},g' \
-e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g' \
-e 's,%%DSPAM_HOME%%,${DSPAM_HOME},g' \
-e 's,%%PORTNAME%%,${PORTNAME},g' \
- -e 's,%%_VAR_DIR%%,${_VAR_DIR},g'
+ -e 's,%%_VAR_DIR%%,${_VAR_DIR},g' \
+ -e '/^%%FreeBSD/D' \
+ -e '/^%%Tecnik%%/D'
.ifdef(WITH_DEBUG)
CONFIGURE_ARGS+= --enable-debug
@@ -175,27 +182,18 @@ _SED_SCRIPT+= -e '/%%DAEMON%%/D'
CONFIGURE_ARGS+= --enable-neural-networking
.endif
-.ifdef(WITH_CLAMAV)
-RUN_DEPENDS+= ${LOCALBASE}/etc/clamd.conf:${PORTSDIR}/security/clamav
-.endif
-
-.ifdef(WITH_CLAMAV_DEVEL)
-RUN_DEPENDS+= ${LOCALBASE}/etc/clamd.conf:${PORTSDIR}/security/clamav-devel
-.endif
-
-.ifdef(WITH_CLAMAV) || defined(WITH_CLAMAV_DEVEL)
+.ifdef(WITH_CLAMAV) && defined(WITH_CLAMAV_LOCAL)
CONFIGURE_ARGS+= --enable-clamav
+RUN_DEPENDS+= clamav>=0:${PORTSDIR}/security/clamav
SUB_LIST+= CLAMD=clamd
-.else
-SUB_LIST+= CLAMD=
.endif
-
-.ifdef(WITH_USER_HOMEDIR)
-CONFIGURE_ARGS+= --enable-homedir
+.ifdef(WITH_CLAMAV_DEVEL) && defined(WITH_CLAMAV_LOCAL)
+CONFIGURE_ARGS+= --enable-clamav
+RUN_DEPENDS+= clamav-devel>=0:${PORTSDIR}/security/clamav-devel
+SUB_LIST+= CLAMD=clamd
.endif
-
-.ifdef(WITH_TRUSTED_USERS)
-CONFIGURE_ARGS+= --disable-trusted-user-security
+.ifndef(WITH_CLAMAV_LOCAL)
+SUB_LIST+= CLAMD=
.endif
# we need to know if we are building statically or dynamicaly for the plist
@@ -211,6 +209,12 @@ CONFIGURE_ARGS+= --with-pgsql-includes=${LOCALBASE}/include \
PLIST_SUB+= PGSQL=""
#PKGNAMESUFFIX= -pgsql
_DBDRV_COUNT:= ${_DBDRV_COUNT}o
+. if defined(WITH_POSTGRESQL_LOCAL)
+RUN_DEPENDS+= postgresql-server>=0:${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
+SUB_LIST+= PGSQL=postgresql
+. else
+SUB_LIST+= PGSQL=
+. endif
.else
PLIST_SUB+= PGSQL="@comment "
_DBDRV:= ${_DBDRV:S/pgsql_drv,//}
@@ -289,9 +293,13 @@ _DBDRV_COUNT:= ${_DBDRV_COUNT}o
. if defined(WITH_MYSQL_COMPRESS)
CONFIGURE_ARGS+= --enable-client-compression
. endif
+. if defined(WITH_MYSQL_LOCAL)
+RUN_DEPENDS+= mysql-server>=0:${PORTSDIR}/databases/mysql${WANT_MYSQL_VER}-server
SUB_LIST+= MYSQL=mysql
-.else
+. else
SUB_LIST+= MYSQL=
+. endif
+.else
_DBDRV:= ${_DBDRV:S/mysql_drv,//}
PLIST_SUB+= MYSQL="@comment "
.endif
@@ -305,10 +313,6 @@ PLIST_SUB+= DYNAMIC=""
PLIST_SUB+= DYNAMIC="@comment "
.endif
-.ifdef(WITH_VIRT_USERS)
-CONFIGURE_ARGS+= --enable-virtual-users
-.endif
-
.ifdef(WITH_LDAP)
CONFIGURE_ARGS+= --enable-ldap
USE_OPENLDAP= YES
@@ -317,6 +321,18 @@ USE_OPENLDAP= YES
#CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
.endif
+.ifdef(WITH_USER_HOMEDIR)
+CONFIGURE_ARGS+= --enable-homedir
+.endif
+
+.ifdef(WITH_TRUSTED_USERS)
+CONFIGURE_ARGS+= --disable-trusted-user-security
+.endif
+
+.ifdef(WITH_VIRT_USERS)
+CONFIGURE_ARGS+= --enable-virtual-users
+.endif
+
.ifdef(WITH_LONG_USERNAMES)
CONFIGURE_ARGS+= --enable-long-usernames
.endif
@@ -630,7 +646,7 @@ post-install:
${INSTALL_DATA} default.prefs ${CGI_PATH}/default.prefs.sample
cd ${WRKSRC}/webui/cgi-bin && \
${INSTALL_DATA} admins ${CGI_PATH}/admins.sample
- @${MKDIR} ${CGI_PATH}/templates && cd ${WRKSRC}/webui/cgi-bin/templates && \
+ ${MKDIR} ${CGI_PATH}/templates && cd ${WRKSRC}/webui/cgi-bin/templates && \
${INSTALL_DATA} *.html ${CGI_PATH}/templates/
.endif
@@ -651,7 +667,7 @@ post-install:
@${MKDIR} -m ${DSPAM_HOME_MODE} ${DSPAM_HOME}
@${CHOWN} ${DSPAM_HOME_OWNER}:${DSPAM_HOME_GROUP} ${DSPAM_HOME}
.for _file in firstrun.txt firstspam.txt quarantinefull.txt
- if ! ${TEST} -e ${WRKSRC}/txt/${_file}.sample;\
+ @if ! ${TEST} -e ${WRKSRC}/txt/${_file}.sample;\
then\
cd ${WRKSRC}/txt && \
${MV} ${_file} ${_file}.sample;\
diff --git a/mail/dspam-devel/distinfo b/mail/dspam-devel/distinfo
index 5f4d75df6cbc..355ef62dec98 100644
--- a/mail/dspam-devel/distinfo
+++ b/mail/dspam-devel/distinfo
@@ -1,3 +1,3 @@
-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
+MD5 (dspam-devel-3.6.2.tar.gz) = cde38b1fe37daf531475251e95253033
+SHA256 (dspam-devel-3.6.2.tar.gz) = c99b4ba5b414df6dbd8e252243ebd1a079591669de91deee456ac64a802d1178
+SIZE (dspam-devel-3.6.2.tar.gz) = 740001
diff --git a/mail/dspam-devel/files/UPDATING b/mail/dspam-devel/files/UPDATING
index 3cb8adbfb599..44d7221ec419 100644
--- a/mail/dspam-devel/files/UPDATING
+++ b/mail/dspam-devel/files/UPDATING
@@ -1,4 +1,5 @@
$FreeBSD$
+$Tecnik: ports/mail/dspam-devel/files/UPDATING,v 1.6 2005/12/12 01:53:20 itetcu Exp $
This file documents some of the problems you may encounter when
upgrading dspam port. I will try my best to minimize these disruptions,
@@ -13,7 +14,25 @@ in the port directory:
make extract; more `find . -type f -maxdepth 2 -name UPGRADING`
###########################################################################
-# dspam-devel-3.6.1 (2005/11/17)
+# dspam-devel-3.6.2 (2005-12-11 21:34)
+#
+
+Memory leak still here :(
+
+BUGFIX: segfaults in daemon mode with hash_drv plus other hash_dvr fixes
+BUGFIX: for how token values are calculated, cutting false positives nearly
+in half
+BUGFIX: close connections to ldap after calls
+ on ldap failure fail database creation
+
+CLAMAV* now only enables clam support in dspam; use CLAMAV_LOCAL to
+RUN_DEPEND on the port and have it REQUIRED in the rc script.
+Add MYSQL_LOCAL and POSTGRESQL_LOCAL options to RUN_DEPEND on servers and
+have them REQUIRED in the rc script.
+
+
+###########################################################################
+# dspam-devel-3.6.1 (2005-11-17)
#
fix RUN_DEPENDS for WITH_CGI=on by USE_APACHE=1.3+, no need to upgrade if
diff --git a/mail/dspam-devel/files/dspam-devel.sh.in b/mail/dspam-devel/files/dspam-devel.sh.in
index 1695560c4529..a94e95abffac 100644
--- a/mail/dspam-devel/files/dspam-devel.sh.in
+++ b/mail/dspam-devel/files/dspam-devel.sh.in
@@ -1,10 +1,10 @@
#!/bin/sh
# $FreeBSD$
# formerly $ FreeBSD: ports/mail/dspam-devel/files/dspam.rc,v 1.2 2005/02/25 03:09:26 leeym Exp $
-#
+# $Tecnik: ports/mail/dspam-devel/files/dspam-devel.sh.in,v 1.2 2005/12/11 21:57:45 itetcu Exp $
# PROVIDE: dspam
-# REQUIRE: LOGIN NETWORKING SERVERS %%MYSQL%% %%CLAMD%%
+# REQUIRE: DAEMON %%MYSQL%% %%PGSQL%% %%CLAMD%%
# BEFORE: mail
# KEYWORD: shutdown
diff --git a/mail/dspam-devel/files/patch-CHANGELOG b/mail/dspam-devel/files/patch-CHANGELOG
new file mode 100644
index 000000000000..05f011c1fba2
--- /dev/null
+++ b/mail/dspam-devel/files/patch-CHANGELOG
@@ -0,0 +1,22 @@
+Index: CHANGELOG
+===================================================================
+RCS file: /usr/local/cvsroot/dspam/CHANGELOG,v
+retrieving revision 1.387
+retrieving revision 1.388
+diff -u -r1.387 -r1.388
+--- CHANGELOG 25 Nov 2005 17:46:31 -0000 1.387
++++ CHANGELOG 2 Dec 2005 05:06:11 -0000 1.388
+@@ -1,4 +1,12 @@
+-$Id: CHANGELOG,v 1.387 2005/11/25 17:46:31 jonz Exp $
++$Id: CHANGELOG,v 1.388 2005/12/02 05:06:11 jonz Exp $
++
++Version NEXT
++------------
++
++[20051201.0000] jonz: fix for ldap calls
++
++fix to close connections to ldap after calls
++fix to fail database creation on ldap failure
+
+ Version 3.6.2
+ -------------
diff --git a/mail/dspam-devel/files/patch-src_ldap_client.c b/mail/dspam-devel/files/patch-src_ldap_client.c
new file mode 100644
index 000000000000..3143daee7d6b
--- /dev/null
+++ b/mail/dspam-devel/files/patch-src_ldap_client.c
@@ -0,0 +1,25 @@
+Index: src/ldap_client.c
+===================================================================
+RCS file: /usr/local/cvsroot/dspam/src/ldap_client.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- src/ldap_client.c 24 Sep 2005 17:48:59 -0000 1.2
++++ src/ldap_client.c 2 Dec 2005 05:06:11 -0000 1.3
+@@ -1,4 +1,4 @@
+-/* $Id: ldap_client.c,v 1.2 2005/09/24 17:48:59 jonz Exp $ */
++/* $Id: ldap_client.c,v 1.3 2005/12/02 05:06:11 jonz Exp $ */
+
+ /*
+ DSPAM
+@@ -80,7 +80,9 @@
+ return EFAILURE;
+ }
+
+- result = ldap_count_entries(ld, msg);
++ result = ldap_count_entries(ld, msg) > 0;
++ ldap_msgfree (msg);
++ ldap_unbind(ld);
+ return result;
+ }
+
diff --git a/mail/dspam-devel/files/patch-src_libdspam.c b/mail/dspam-devel/files/patch-src_libdspam.c
deleted file mode 100644
index e7f818e9502c..000000000000
--- a/mail/dspam-devel/files/patch-src_libdspam.c
+++ /dev/null
@@ -1,23 +0,0 @@
---- 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/files/patch-src_mysql_drv.c b/mail/dspam-devel/files/patch-src_mysql_drv.c
new file mode 100644
index 000000000000..bd92853cd914
--- /dev/null
+++ b/mail/dspam-devel/files/patch-src_mysql_drv.c
@@ -0,0 +1,23 @@
+Index: src/mysql_drv.c
+===================================================================
+RCS file: /usr/local/cvsroot/dspam/src/mysql_drv.c,v
+retrieving revision 1.57
+retrieving revision 1.58
+diff -u -r1.57 -r1.58
+--- src/mysql_drv.c 1 Oct 2005 15:33:18 -0000 1.57
++++ src/mysql_drv.c 2 Dec 2005 05:06:11 -0000 1.58
+@@ -1,4 +1,4 @@
+-/* $Id: mysql_drv.c,v 1.57 2005/10/01 15:33:18 jonz Exp $ */
++/* $Id: mysql_drv.c,v 1.58 2005/12/02 05:06:11 jonz Exp $ */
+
+ /*
+ DSPAM
+@@ -1804,7 +1804,7 @@
+
+ #ifdef USE_LDAP
+ if (_ds_match_attribute(CTX->config->attributes, "LDAPMode", "verify") &&
+- !ldap_verify(CTX, name))
++ ldap_verify(CTX, name)<=0)
+ {
+ LOGDEBUG("LDAP verification of %s failed: not adding user", name);
+ return NULL;
diff --git a/mail/dspam-devel/files/patch-src_pgsql_drv.c b/mail/dspam-devel/files/patch-src_pgsql_drv.c
new file mode 100644
index 000000000000..a880c8c4be00
--- /dev/null
+++ b/mail/dspam-devel/files/patch-src_pgsql_drv.c
@@ -0,0 +1,23 @@
+Index: src/pgsql_drv.c
+===================================================================
+RCS file: /usr/local/cvsroot/dspam/src/pgsql_drv.c,v
+retrieving revision 1.47
+retrieving revision 1.48
+diff -u -r1.47 -r1.48
+--- src/pgsql_drv.c 9 Oct 2005 20:29:55 -0000 1.47
++++ src/pgsql_drv.c 2 Dec 2005 05:06:11 -0000 1.48
+@@ -1,4 +1,4 @@
+-/* $Id: pgsql_drv.c,v 1.47 2005/10/09 20:29:55 jonz Exp $ */
++/* $Id: pgsql_drv.c,v 1.48 2005/12/02 05:06:11 jonz Exp $ */
+
+ /*
+ DSPAM
+@@ -1923,7 +1923,7 @@
+
+ #ifdef USE_LDAP
+ if (_ds_match_attribute(CTX->config->attributes, "LDAPMode", "verify") &&
+- !ldap_verify(CTX, name))
++ ldap_verify(CTX, name)<=0)
+ {
+ LOGDEBUG("LDAP verification of %s failed: not adding user", name);
+ return NULL;
diff --git a/mail/dspam-devel/pkg-message b/mail/dspam-devel/pkg-message
index 857c7c46bf05..0ceb924bd5e6 100644
--- a/mail/dspam-devel/pkg-message
+++ b/mail/dspam-devel/pkg-message
@@ -1,4 +1,5 @@
-
+%%FreeBSD%%$FreeBSD$
+%%Tecnik%%$Tecnik: ports/mail/dspam-devel/pkg-message,v 1.3 2005/12/11 20:59:38 itetcu Exp $
-------------------------------------------------------------------------------
Reporting problems, asking questions:
- FreeBSD specific port-related problems/questions/paches: maintainer
@@ -6,7 +7,13 @@
- dspam specific questions: dspam/dspam-dev mailling list (maintainer cc'ed)
- dspam specific patches: dspam/dspam-dev mailling list (maintainer cc'ed if)
Please be sure to include in your email/pr relevant information such as:
- uname -a, dspam --version, /var/db/ports/dspam-devel/options, MTA setup.
+ uname -a, dspam --version, %%_VAR_DIR%%/db/ports/%%PORTNAME%%/options, MTA setup.
+
+Asking about updates or telling me there is one: not only I am active on the
+mailing lists but I also track dspam csv so I already know; either there is a
+problem with the new version or I didn't have enough time to patch the port
+and _test_ the new version; please report your succes/failure if you run the
+new version or the cvs version.
%%CGI%% The CGI files had been installed in
%%CGI%% %%CGI_PATH%%
@@ -32,7 +39,7 @@
%%DAEMON%% To enable the dspam deamon put dspam_enable="YES" in your
%%DAEMON%% /etc/rc.conf
- You'll find additionl setup instructions under
+ You'll find additional setup instructions under
%%DOCSDIR%%
and
%%EXAMPLESDIR%%
diff --git a/mail/dspam-devel/pkg-plist b/mail/dspam-devel/pkg-plist
index dbf1d74a5842..f6cd548670c3 100644
--- a/mail/dspam-devel/pkg-plist
+++ b/mail/dspam-devel/pkg-plist
@@ -1,3 +1,5 @@
+@comment $FreeBSD$
+@comment $Tecnik: ports/mail/dspam-devel/pkg-plist,v 1.2 2005/12/11 20:46:46 itetcu Exp $
%%HASH%%bin/cssstat
%%HASH%%bin/csscompress
%%HASH%%bin/cssclean