View | Details | Raw Unified | Return to bug 88688
Collapse All | Expand All

(-)dspam-devel/Makefile (-18 / +40 lines)
Lines 19-25 Link Here
19
MAINTAINER=	itetcu@people.tecnik93.com
19
MAINTAINER=	itetcu@people.tecnik93.com
20
COMMENT=	Bayesian spam filter - development version
20
COMMENT=	Bayesian spam filter - development version
21
21
22
PORTVER_MAJ=	3.6.0
22
PORTVER_MAJ=	3.6.1
23
#SNAP_DATE=	.20051016.2141
23
#SNAP_DATE=	.20051016.2141
24
24
25
.ifdef(SNAP_DATE)
25
.ifdef(SNAP_DATE)
Lines 87-92 Link Here
87
OPTIONS+=	QMAIL "Play nice with Qmail mail server" off
87
OPTIONS+=	QMAIL "Play nice with Qmail mail server" off
88
88
89
OPTIONS+=	CGI "Install CGI (pulls in apache)" off
89
OPTIONS+=	CGI "Install CGI (pulls in apache)" off
90
OPTIONS+=	TRAIN_SCRIPT "Install trainning script (needs perl)" off
90
91
91
USE_LIBTOOL_VER=15
92
USE_LIBTOOL_VER=15
92
USE_REINPLACE=	yes
93
USE_REINPLACE=	yes
Lines 106-112 Link Here
106
107
107
PKGMESSAGE=	 ${WRKSRC}/src/README.FreeBSD
108
PKGMESSAGE=	 ${WRKSRC}/src/README.FreeBSD
108
109
109
_UPD_LINE_NO=	16
110
_UPD_LINE_NO=	23
110
111
111
CONFLICTS=	dspam-[0-9]*
112
CONFLICTS=	dspam-[0-9]*
112
113
Lines 227-233 Link Here
227
.endif
228
.endif
228
229
229
.if defined(WITH_BDB4)
230
.if defined(WITH_BDB4)
230
LIB_DEPENDS+=	db41.1:${PORTSDIR}/databases/db41
231
# change me when we have BDB_VERSOIN in bsd.databases.mk
232
USE_BDB=	41
231
CONFIGURE_ARGS+=	--with-db4-includes=${LOCALBASE}/include/db41
233
CONFIGURE_ARGS+=	--with-db4-includes=${LOCALBASE}/include/db41
232
PLIST_SUB+=	DB4=""
234
PLIST_SUB+=	DB4=""
233
#PKGNAMESUFFIX=	-bdb41
235
#PKGNAMESUFFIX=	-bdb41
Lines 238-259 Link Here
238
.endif
240
.endif
239
241
240
.if defined(WITH_SQLITE3)
242
.if defined(WITH_SQLITE3)
241
HAVE_SQLITE=	yes
243
USE_SQLITE=	3
242
LIB_DEPENDS+=	sqlite3.8:${PORTSDIR}/databases/sqlite3
243
_DBDRV_COUNT:=	${_DBDRV_COUNT}o
244
_DBDRV_COUNT:=	${_DBDRV_COUNT}o
244
.else
245
.else
245
_DBDRV:=	${_DBDRV:S/sqlite3_drv,//}
246
_DBDRV:=	${_DBDRV:S/sqlite3_drv,//}
246
.endif
247
.endif
247
248
248
.if defined(WITH_SQLITE2)
249
.if defined(WITH_SQLITE2)
249
HAVE_SQLITE=	yes
250
USE_SQLITE=	2
250
LIB_DEPENDS+=	sqlite.2:${PORTSDIR}/databases/sqlite2
251
_DBDRV_COUNT:=	${_DBDRV_COUNT}o
251
_DBDRV_COUNT:=	${_DBDRV_COUNT}o
252
.else
252
.else
253
_DBDRV:=	${_DBDRV:S/sqlite_drv,//}
253
_DBDRV:=	${_DBDRV:S/sqlite_drv,//}
254
.endif
254
.endif
255
255
256
.if defined(HAVE_SQLITE)
256
.if defined(USE_SQLITE)
257
CONFIGURE_ARGS+=	--with-sqlite-includes=${LOCALBASE}/include \
257
CONFIGURE_ARGS+=	--with-sqlite-includes=${LOCALBASE}/include \
258
			--with-sqlite-libraries=${LOCALBASE}/lib
258
			--with-sqlite-libraries=${LOCALBASE}/lib
259
PLIST_SUB+=	SQLITE=""
259
PLIST_SUB+=	SQLITE=""
Lines 402-408 Link Here
402
RUN_DEPENDS+=	${SITE_PERL}/GD/Text.pm:${PORTSDIR}/graphics/p5-GD-TextUtil
402
RUN_DEPENDS+=	${SITE_PERL}/GD/Text.pm:${PORTSDIR}/graphics/p5-GD-TextUtil
403
CONFIGURE_ARGS+=--enable-logging
403
CONFIGURE_ARGS+=--enable-logging
404
CONFIGURE_ARGS+=--enable-user-logging
404
CONFIGURE_ARGS+=--enable-user-logging
405
USE_PERL5_RUN=	yes
405
USE_PERL5=	yes
406
PLIST_SUB+=	CGI=""
406
PLIST_SUB+=	CGI=""
407
CGI_PATH?=	${PREFIX}/www/vhosts/dspam
407
CGI_PATH?=	${PREFIX}/www/vhosts/dspam
408
_SED_SCRIPT+=	-e 's/%%CGI%%//g'
408
_SED_SCRIPT+=	-e 's/%%CGI%%//g'
Lines 414-419 Link Here
414
_SED_SCRIPT+=	-e '/%%CGI%%/D'
414
_SED_SCRIPT+=	-e '/%%CGI%%/D'
415
.endif
415
.endif
416
416
417
.ifdef(WITH_TRAIN_SCRIPT)
418
USE_PERL5=	yes
419
PLIST_SUB+=	TRAIN_SCRIPT=""
420
.else
421
PLIST_SUB+=	TRAIN_SCRIPT="@comment "
422
.endif
423
417
MAN1=	dspam.1 dspam_clean.1 dspam_corpus.1 dspam_dump.1 dspam_merge.1 \
424
MAN1=	dspam.1 dspam_clean.1 dspam_corpus.1 dspam_dump.1 dspam_merge.1 \
418
	dspam_stats.1
425
	dspam_stats.1
419
MAN3=	libdspam.3
426
MAN3=	libdspam.3
Lines 463-469 Link Here
463
		@${ECHO_CMD} "installed in other place that this installation's default"
470
		@${ECHO_CMD} "installed in other place that this installation's default"
464
		@${ECHO_CMD} "${PREFIX}/www/vhosts/dspam"
471
		@${ECHO_CMD} "${PREFIX}/www/vhosts/dspam"
465
.	endif
472
.	endif
466
	@${ECHO_CMD} "Define WITHOUT_DAEMON if not using OPTIONS and do not want daemon."
467
	@${ECHO_CMD} ""
473
	@${ECHO_CMD} ""
468
	@sleep 5
474
	@sleep 5
469
475
Lines 501-511 Link Here
501
	@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \
507
	@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \
502
		${WRKSRC}/Makefile.in
508
		${WRKSRC}/Makefile.in
503
509
504
	@${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
510
	@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|' \
505
	@${REINPLACE_CMD} -e 's|WHERE CURRENT_DATE - created_on > 14;|WHERE CURRENT_DATE - created_on > ${SIGNATURE_LIFE};|'  ${WRKSRC}/src/tools.pgsql_drv/purge.sql
511
		${WRKSRC}/src/tools.mysql_drv/purge.sql
506
	@${REINPLACE_CMD} -e 's|where SYSDATE-created_on > 14|where SYSDATE-created_on > ${SIGNATURE_LIFE};|'  ${WRKSRC}/src/tools.ora_drv/purge.sql
512
	@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|' \
507
	@${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
513
		${WRKSRC}/src/tools.mysql_drv/purge-4.1.sql
508
	@${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
514
	@${REINPLACE_CMD} -e 's|WHERE CURRENT_DATE - created_on > 14;|WHERE CURRENT_DATE - created_on > ${SIGNATURE_LIFE};|' \
515
		${WRKSRC}/src/tools.pgsql_drv/purge.sql
516
	@${REINPLACE_CMD} -e 's|where SYSDATE-created_on > 14|where SYSDATE-created_on > ${SIGNATURE_LIFE};|' \
517
		${WRKSRC}/src/tools.ora_drv/purge.sql
518
	@${REINPLACE_CMD} -e "s|where date('now')-date(created_on) > 14;|where date('now')-date(created_on) > ${SIGNATURE_LIFE};|" \
519
		${WRKSRC}/src/tools.sqlite_drv/purge-2.sql
520
	@${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|" \
521
		 ${WRKSRC}/src/tools.sqlite_drv/purge-3.sql
522
523
.ifdef(WITH_TRAIN_SCRIPT)
524
	 @${REINPLACE_CMD} -e "s^%%PERL%%^${PERL}^; s^%%DSPAM_PATH%%^${PREFIX}/bin^" ${WRKSRC}/scripts/train.pl
525
.endif
509
526
510
pre-configure:
527
pre-configure:
511
	@${ECHO_CMD}
528
	@${ECHO_CMD}
Lines 544-550 Link Here
544
	@${FALSE}
561
	@${FALSE}
545
.endif
562
.endif
546
.if defined(WITH_LDAP) && !( defined(USE_MYSQL) || \
563
.if defined(WITH_LDAP) && !( defined(USE_MYSQL) || \
547
	defined(WITH_POSTGRESQL) || defined(HAVE_SQLITE) )
564
	defined(WITH_POSTGRESQL) || defined(USE_SQLITE) )
548
	@${ECHO_CMD} "You need MySQL, Postgres or SQLITE for LDAP."
565
	@${ECHO_CMD} "You need MySQL, Postgres or SQLITE for LDAP."
549
	@${FALSE}
566
	@${FALSE}
550
.endif
567
.endif
Lines 588-594 Link Here
588
	@cd  ${WRKSRC}/src/tools.pgsql_drv && \
605
	@cd  ${WRKSRC}/src/tools.pgsql_drv && \
589
		${INSTALL_DATA} *.sql ${EXAMPLESDIR}/pgsql
606
		${INSTALL_DATA} *.sql ${EXAMPLESDIR}/pgsql
590
.endif
607
.endif
591
.ifdef(HAVE_SQLITE)
608
.ifdef(USE_SQLITE)
592
	@${MKDIR} ${EXAMPLESDIR}/sqlite
609
	@${MKDIR} ${EXAMPLESDIR}/sqlite
593
	cd ${WRKSRC}/src/tools.sqlite_drv && \
610
	cd ${WRKSRC}/src/tools.sqlite_drv && \
594
		${INSTALL_DATA} *.sql ${EXAMPLESDIR}/sqlite
611
		${INSTALL_DATA} *.sql ${EXAMPLESDIR}/sqlite
Lines 601-607 Link Here
601
618
602
.ifdef(WITH_CGI)
619
.ifdef(WITH_CGI)
603
.	for I in admin.cgi admingraph.cgi configure.pl dspam.cgi graph.cgi
620
.	for I in admin.cgi admingraph.cgi configure.pl dspam.cgi graph.cgi
604
		@${SED} -i '' -e "s,/usr/bin/perl,${PERL},g" ${WRKSRC}/webui/cgi-bin/${I}
621
		@${REINPLACE_CMD} -e "s,/usr/bin/perl,${PERL},g" ${WRKSRC}/webui/cgi-bin/${I}
605
.	endfor
622
.	endfor
606
	cd ${WRKSRC}/webui/cgi-bin && ${MV} configure.pl configure.pl.sample
623
	cd ${WRKSRC}/webui/cgi-bin && ${MV} configure.pl configure.pl.sample
607
	cd ${WRKSRC}/webui/cgi-bin && ${MKDIR} ${CGI_PATH} && \
624
	cd ${WRKSRC}/webui/cgi-bin && ${MKDIR} ${CGI_PATH} && \
Lines 616-621 Link Here
616
		${INSTALL_DATA} admins ${CGI_PATH}/admins.sample
633
		${INSTALL_DATA} admins ${CGI_PATH}/admins.sample
617
	@${MKDIR} ${CGI_PATH}/templates && cd ${WRKSRC}/webui/cgi-bin/templates && \
634
	@${MKDIR} ${CGI_PATH}/templates && cd ${WRKSRC}/webui/cgi-bin/templates && \
618
		${INSTALL_DATA} *.html ${CGI_PATH}/templates/
635
		${INSTALL_DATA} *.html ${CGI_PATH}/templates/
636
.endif
637
638
.ifdef(WITH_TRAIN_SCRIPT)
639
	cd ${WRKSRC}/scripts && \
640
		${INSTALL_SCRIPT} train.pl ${PREFIX}/bin/dspam_train
619
.endif
641
.endif
620
642
621
	@${SED} ${_SED_SCRIPT} ${.CURDIR}/pkg-message > ${WRKSRC}/README.FreeBSD
643
	@${SED} ${_SED_SCRIPT} ${.CURDIR}/pkg-message > ${WRKSRC}/README.FreeBSD
(-)dspam-devel/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
MD5 (dspam-devel-3.6.0.tar.gz) = d9ee63a8cf67ea933d711b00851ce916
1
MD5 (dspam-devel-3.6.1.tar.gz) = 615807289462859f6e2cd12e3f490a49
2
SIZE (dspam-devel-3.6.0.tar.gz) = 732042
2
SHA256 (dspam-devel-3.6.1.tar.gz) = a07f5c4d327cad924175a31607ba1e7986fbe1896247256e051461622ee3375d
3
SIZE (dspam-devel-3.6.1.tar.gz) = 739401
(-)dspam-devel/files/UPDATING (+23 lines)
Lines 12-17 Link Here
12
in the port directory:
12
in the port directory:
13
make extract;  more `find . -type f -maxdepth 2 -name UPGRADING`
13
make extract;  more `find . -type f -maxdepth 2 -name UPGRADING`
14
14
15
###########################################################################
16
# dspam-devel-3.6.1
17
#
18
19
!!! WARNING: Both dspam 3.6.0 and 3.6.1 have a memory leak !!!
20
Watch the size and res (top -o size or top -o res) of dspam process and
21
restart it (/usr/local/etc/rc.d/dspam-devel.sh restart) when it gets to big.
22
23
BUGFIX: ParseToHeaders can segfault on malformatted To header
24
BUGFIX: TrackSources does not correctly parse messages with QMail Received
25
headers
26
BUGFIX: Missing check for existing strcasestr
27
BUGFIX: X-DSPAM-Reclassified heading appears blank
28
BUGFIX: Plused-Detail support does not work with domains
29
BUGFIX: Hash databases are not 8-byte aligned (do not work with 64-bit systems)
30
use cssconvert to convert your hash file
31
BUGFIX: Certain daemon-mode operations append a trailing period
32
BUGFIX: DataSource 'document' option causes improper processing
33
BUGFIX: Segfaults occur on malformed Content-Type header
34
BUGFIX: History appears blank in dspam.cgi
35
36
- WITH_TRAIN_SCRIPT for an example training script dspam_train
37
15
38
16
###########################################################################
39
###########################################################################
17
# dspam-devel-3.6.0
40
# dspam-devel-3.6.0
(-)dspam-devel/files/patch-scripts_train.pl (+17 lines)
Line 0 Link Here
1
--- scripts/train.pl.dist	Tue Nov  8 14:34:38 2005
2
+++ scripts/train.pl	Tue Nov  8 14:36:06 2005
3
@@ -1,4 +1,4 @@
4
-#!/usr/bin/perl
5
+#!%%PERL%%
6
 
7
 # train.pl
8
 # This tool trains a corpus of messages (a directory containing a nonspam and
9
@@ -14,7 +14,7 @@
10
 use vars qw { $USER $PATH $REPORTING_WINDOW $CORPUS $TRAINING_MODE };
11
 
12
 $REPORTING_WINDOW  = 250;			# How often to summarize
13
-$PATH              = "/usr/local/dspam/bin";	# Path to dspam binaries
14
+$PATH              = "%%DSPAM_PATH%%";		# Path to dspam binaries
15
 $TRAINING_MODE     = "teft";			# Training mode
16
 
17
 ### DO NOT CONFIGURE BELOW THIS LINE ###
(-)dspam-devel/files/patch-src_libdspam.c (+23 lines)
Line 0 Link Here
1
--- src/libdspam.c	2 Nov 2005 19:39:28 -0000	1.142
2
+++ src/libdspam.c	8 Nov 2005 15:26:44 -0000	1.143
3
@@ -672,6 +672,8 @@
4
     current_heading = (ds_header_t) node_nt->ptr;
5
     if (!strcmp (current_heading->heading, "Received"))
6
     {
7
+      char *data, *ptr, *tok;
8
+
9
       // detect and skip "Received: (qmail..." lines
10
       if (!strncmp(current_heading->data, "(qmail", 6))
11
       {
12
@@ -680,9 +682,8 @@
13
         continue;
14
       }
15
 
16
-      char *data = strdup (current_heading->data);
17
-      char *ptr = strstr (data, "from");
18
-      char *tok;
19
+      data = strdup (current_heading->data);
20
+      ptr = strstr (data, "from");
21
 
22
       if (ptr != NULL)
23
       {
(-)dspam-devel/pkg-plist (+2 lines)
Lines 1-6 Link Here
1
%%HASH%%bin/cssstat
1
%%HASH%%bin/cssstat
2
%%HASH%%bin/csscompress
2
%%HASH%%bin/csscompress
3
%%HASH%%bin/cssclean
3
%%HASH%%bin/cssclean
4
%%HASH%%bin/cssconvert
4
bin/dspam
5
bin/dspam
5
bin/dspamc
6
bin/dspamc
6
bin/dspam_2sql
7
bin/dspam_2sql
Lines 14-19 Link Here
14
bin/dspam_merge
15
bin/dspam_merge
15
%%PGSQL%%bin/dspam_pg2int8
16
%%PGSQL%%bin/dspam_pg2int8
16
bin/dspam_stats
17
bin/dspam_stats
18
%%TRAIN_SCRIPT%%bin/dspam_train
17
@unexec if cmp -s %D/etc/dspam.conf %D/etc/dspam.conf.sample; then rm -f %D/etc/dspam.conf; fi
19
@unexec if cmp -s %D/etc/dspam.conf %D/etc/dspam.conf.sample; then rm -f %D/etc/dspam.conf; fi
18
etc/dspam.conf.sample
20
etc/dspam.conf.sample
19
include/dspam/buffer.h
21
include/dspam/buffer.h

Return to bug 88688