[Pkg-dspam-commits] [pkg-dspam-commits] r202 - in branches/experimental/debian: . config patches
Julien Valroff
julien-guest at alioth.debian.org
Tue Aug 18 18:09:31 UTC 2009
Author: julien-guest
Date: Tue Aug 18 18:09:31 2009
New Revision: 202
Log:
Reworked init script
Completed README.source
Added numerical prefix to patches
Fixed verbose-debug configuration option
Removed deprecated --enable-ldap build option
Added --disable-dependency-tracking to default build options
Added dspam.messages & sql.errors to logrotate file
Re-included txt/ to dspam package
Split dspam.conf: hash.conf & sqlite.conf
Removed temp patches regarindg WebUI l1°n - merged upstream
Added:
branches/experimental/debian/config/hash.conf
branches/experimental/debian/config/sqlite.conf
branches/experimental/debian/patches/01_drivers-in-usr_lib_dspam.dpatch
- copied unchanged from r200, branches/experimental/debian/patches/drivers-in-usr_lib_dspam.dpatch
branches/experimental/debian/patches/02_dspam-webfrontend-config-debian.dpatch
- copied, changed from r200, branches/experimental/debian/patches/dspam-webfrontend-config-debian.dpatch
branches/experimental/debian/patches/03_update-dspam.conf.dpatch
- copied, changed from r200, branches/experimental/debian/patches/update-dspam.conf.dpatch
branches/experimental/debian/patches/04_dspam-default.prefs-in_etc.dpatch
- copied unchanged from r200, branches/experimental/debian/patches/dspam-default.prefs-in_etc.dpatch
branches/experimental/debian/patches/05_background-dspam.dpatch
- copied unchanged from r199, branches/experimental/debian/patches/background-dspam.dpatch
branches/experimental/debian/patches/06_clean-manpages.dpatch
- copied unchanged from r200, branches/experimental/debian/patches/clean-manpages.dpatch
branches/experimental/debian/patches/07_path-to-dspam_for-training-script.dpatch
- copied unchanged from r200, branches/experimental/debian/patches/path-to-dspam_for-training-script.dpatch
branches/experimental/debian/patches/09_where-to-find-txt-files.dpatch
- copied unchanged from r200, branches/experimental/debian/patches/where-to-find-txt-files.dpatch
Deleted:
branches/experimental/debian/patches/background-dspam.dpatch
branches/experimental/debian/patches/clean-manpages.dpatch
branches/experimental/debian/patches/complete_l10n.dpatch
branches/experimental/debian/patches/drivers-in-usr_lib_dspam.dpatch
branches/experimental/debian/patches/dspam-default.prefs-in_etc.dpatch
branches/experimental/debian/patches/dspam-webfrontend-config-debian.dpatch
branches/experimental/debian/patches/dspam_notify.dpatch
branches/experimental/debian/patches/path-to-dspam_for-training-script.dpatch
branches/experimental/debian/patches/remove-daily-quarantine-pref-from-webui.dpatch
branches/experimental/debian/patches/templates_fr.dpatch
branches/experimental/debian/patches/update-dspam.conf.dpatch
branches/experimental/debian/patches/where-to-find-txt-files.dpatch
Modified:
branches/experimental/debian/README.source
branches/experimental/debian/changelog
branches/experimental/debian/config/mysql.conf
branches/experimental/debian/control
branches/experimental/debian/dspam-webfrontend.install
branches/experimental/debian/dspam-webfrontend.lintian-overrides
branches/experimental/debian/dspam.init
branches/experimental/debian/dspam.install
branches/experimental/debian/dspam.logrotate
branches/experimental/debian/libdspam7-drv-sqlite3.install
branches/experimental/debian/patches/00list
branches/experimental/debian/rules
Modified: branches/experimental/debian/README.source
==============================================================================
--- branches/experimental/debian/README.source Mon Aug 17 08:48:09 2009 (r201)
+++ branches/experimental/debian/README.source Tue Aug 18 18:09:31 2009 (r202)
@@ -1,3 +1,10 @@
+Patch system
+============
+
+This package uses dpatch to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
To get the fully patched source after unpacking the source package, cd
to the root level of the source package and run:
@@ -21,3 +28,37 @@
work for you - or you can of course choose to call
"fakeroot debian/rules clean" all together.
+
+Build options
+=============
+
+This package honours the following build options which have to be set
+as DEB_BUILD_OPTIONS.
+
+All these options are disabled by default.
+
+a. General options:
+--------------------
+
+ noopt
+ package is built without optimization flags
+
+ nostrip
+ binaries are not stripped
+
+
+b- Package specific options:
+----------------------------
+
+ disable_virtual_users
+ package is built without virtual users support
+
+ disable_preferences_extension
+ package is built without preferences extension support
+
+ verbose_debug
+ package is built with verbose debug
+
+ disable_clamav
+ package is built without clamav support
+
Modified: branches/experimental/debian/changelog
==============================================================================
--- branches/experimental/debian/changelog Mon Aug 17 08:48:09 2009 (r201)
+++ branches/experimental/debian/changelog Tue Aug 18 18:09:31 2009 (r202)
@@ -1,4 +1,4 @@
-dspam (3.9.0~beta1+git20090815-1) experimental; urgency=low
+dspam (3.9.0~beta1+git20090818-1) experimental; urgency=low
[ Kurt B. Kaiser ]
* debian/rules: don't use --build config option if host equals target.
@@ -59,12 +59,17 @@
is "required"
* Purge ucf database and ucf config files on package purge
* Remove unused lintian overrides
- * Add patch to allow complete translation of the WebUI
* Add description to all patches
* Fix provides and dependencies in init script - thanks to Petter
Reinholdtsen <pere at hungry.com> (Closes: #541982)
+ * Rewrite init script based on the current skeleton shipped in the
+ initscripts package
+ * Add numerical prefixes to Debian patches
+ * Fix verbose_bug build option
+ * Add logrotate entry for dspam.messages and sql.errors
+ * Add 'notifempty' option for logrotate
- -- Julien Valroff <julien at kirya.net> Mon, 17 Aug 2009 10:45:21 +0200
+ -- Julien Valroff <julien at kirya.net> Tue, 18 Aug 2009 13:18:00 +0200
dspam (3.6.8-9) unstable; urgency=low
Added: branches/experimental/debian/config/hash.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/debian/config/hash.conf Tue Aug 18 18:09:31 2009 (r202)
@@ -0,0 +1,77 @@
+# --- Hash ---
+
+#
+# HashRecMax: Default number of records to create in the initial segment when
+# building hash files. 100,000 yields files 1.6MB in size, but can fill up
+# fast, so be sure to increase this (to a million or more) if you're not using
+# autoextend.
+#
+# NOTE: If you're using a heavy-weight tokenizer, such as SBPH, you should be
+# looking for settings in the 'millions' of records.
+#
+# Primes List:
+# 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, 98317, 196613,
+# 393241, 786433, 1572869, 3145739, 6291469, 12582917, 25165843, 50331653,
+# 100663319, 201326611, 402653189, 805306457, 1610612741, 3221225473,
+# 4294967291
+#
+HashRecMax 98317
+
+#
+# HashAutoExtend: Autoextend hash databases when they fill up. This allows
+# them to continue to train by adding extents (extensions) to the file. There
+# will be a small delay during the growth process, as everything needs to be
+# closed and remapped.
+#
+HashAutoExtend on
+
+#
+# HashMaxExtents: The maximum number of extents that may be created in a single
+# hash file. Set this to zero for unlimited
+#
+HashMaxExtents 0
+
+#
+# HashExtentSize: The initial record size for newly created extents. Creating
+# this too small could result in many extents being created. Creating this too
+# large could result in excessive disk space usage. Typically, a value close
+# to half of the HashRecMax size is good.
+#
+HashExtentSize 49157
+
+#
+# HashPctIncrease: Increase the next extent size by n% from the size of the
+# last extent. This is useful in accommodating systems where the default
+# HashExtentSize can be too small for certain high-volume users, and can also
+# help keep seeks nice and speedy and/or prevent too many unnecessary extents
+# from being created when using a low HashMaxSeek. The default behavior, when
+# HashPctIncrease is not used, is to always use # HashExtentSize with no
+# increase.
+#
+HashPctIncrease 10
+
+#
+# HashMaxSeek: The maximum number of record seeks when inserting a new record
+# before failing or adding a new extent. This ultimately translates into the
+# max # of acceptable seeks per segment. Setting this too high will exhaustively
+# scan each segment and hurt performance. Typically, a low value is acceptable
+# as even older extents will continue to fill as training progresses.
+#
+HashMaxSeek 10
+
+#
+# HashConcurrentUser: If you are using a single, stateful hash database in
+# daemon mode, specifying a concurrent user below will cause the user to be
+# permanently mapped into memory and shared via rwlocks. This is very fast and
+# very cool if you are running a "userless" relay appliance.
+#
+#HashConcurrentUser user
+
+#
+# HashConnectionCache: If running in daemon mode, this is the max # of
+# concurrent connections that will be supported. NOTE: If you are using
+# HashConcurrentUser, this option is ignored, as all connections are read-
+# write locked instead of mutex locked.
+#
+HashConnectionCache 10
+
Modified: branches/experimental/debian/config/mysql.conf
==============================================================================
--- branches/experimental/debian/config/mysql.conf Mon Aug 17 08:48:09 2009 (r201)
+++ branches/experimental/debian/config/mysql.conf Tue Aug 18 18:09:31 2009 (r202)
@@ -14,7 +14,7 @@
# If you are using replication for clustering, you can also specify a separate
# server to perform all writes to.
#
-#MySQLWriteServer /var/lib/mysql/mysql.sock
+#MySQLWriteServer /var/run/mysqld/mysqld.sock
#MySQLWritePort
#MySQLWriteUser dspam
#MySQLWritePass changeme
Added: branches/experimental/debian/config/sqlite.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/debian/config/sqlite.conf Tue Aug 18 18:09:31 2009 (r202)
@@ -0,0 +1,4 @@
+# --- SQLite ---
+
+#SQLitePragma "synchronous = OFF"
+
Modified: branches/experimental/debian/control
==============================================================================
--- branches/experimental/debian/control Mon Aug 17 08:48:09 2009 (r201)
+++ branches/experimental/debian/control Tue Aug 18 18:09:31 2009 (r202)
@@ -26,7 +26,7 @@
Package: dspam
Architecture: any
-Depends: ${misc:Depends}, procmail | maildrop | courier-maildrop | sensible-mda, ${shlibs:Depends}
+Depends: ${misc:Depends}, procmail | maildrop | courier-maildrop | sensible-mda, lsb-base (>= 3.0-6), ${shlibs:Depends}
Recommends: dspam-doc
Suggests: clamav-daemon, dspam-webfrontend
Description: Scalable, fast and statistical anti-spam filter
Modified: branches/experimental/debian/dspam-webfrontend.install
==============================================================================
--- branches/experimental/debian/dspam-webfrontend.install Mon Aug 17 08:48:09 2009 (r201)
+++ branches/experimental/debian/dspam-webfrontend.install Tue Aug 18 18:09:31 2009 (r202)
@@ -1,9 +1,12 @@
webui/cgi-bin/*.cgi var/www/dspam/
webui/cgi-bin/templates/*.html etc/dspam/templates/
+webui/cgi-bin/templates/strings.pl etc/dspam/templates/
webui/cgi-bin/templates/fr/*.html etc/dspam/templates/fr
+webui/cgi-bin/templates/fr/strings.pl etc/dspam/templates/fr
webui/cgi-bin/templates/he/*.html etc/dspam/templates/he
+#webui/cgi-bin/templates/he/strings.pl etc/dspam/templates/he
webui/cgi-bin/templates/ro/*.html etc/dspam/templates/ro
-webui/cgi-bin/templates/strings.txt etc/dspam/templates/
+#webui/cgi-bin/templates/ro/strings.pl etc/dspam/templates/ro
webui/cgi-bin/configure.pl usr/share/dspam/
webui/htdocs/base.css usr/share/dspam/
webui/htdocs/dspam.js usr/share/dspam/
Modified: branches/experimental/debian/dspam-webfrontend.lintian-overrides
==============================================================================
--- branches/experimental/debian/dspam-webfrontend.lintian-overrides Mon Aug 17 08:48:09 2009 (r201)
+++ branches/experimental/debian/dspam-webfrontend.lintian-overrides Tue Aug 18 18:09:31 2009 (r202)
@@ -1,2 +1 @@
dspam-webfrontend: script-not-executable ./usr/share/dspam/configure.pl
-dspam-webfrontend: script-not-executable ./etc/dspam/templates/strings.txt
Modified: branches/experimental/debian/dspam.init
==============================================================================
--- branches/experimental/debian/dspam.init Mon Aug 17 08:48:09 2009 (r201)
+++ branches/experimental/debian/dspam.init Tue Aug 18 18:09:31 2009 (r202)
@@ -11,135 +11,144 @@
# Description: dspam is a scalable, fast and statistical anti-spam filter
### END INIT INFO
#
-# Author: Matthijs Mohlmann <matthijs at cacholong.nl>.
-#
-# Based on the init script of pdns-recursor
-#
+# Authors: Matthijs Mohlmann <matthijs at cacholong.nl>
+# Julien Valroff <julien at kirya.net>
+# Original script based on the init script of pdns-recursor
+# Reworked script based on the skeleton script of the initscripts package
-PATH=/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="DSPAM Statistical anti-spam filter"
NAME=dspam
DAEMON=/usr/bin/$NAME
PIDFILE=/var/run/dspam/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
+USER=dspam
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+. /lib/lsb/init-functions
-# Gracefully exit if the package has been removed.
-test -x $DAEMON || exit 0
+# Create directory for PIDFILE, if it does not exist
+[ -d $(dirname $PIDFILE) ] || mkdir -p -m 755 $(dirname $PIDFILE)
+
+# Make sure the directory for PIDFILE is owned by the user which runs dspam
+chown --quiet $USER $(dirname $PIDFILE)
+
+DAEMON_ARGS="--daemon $OPTIONS"
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER --exec $DAEMON --test > /dev/null \
+ || return 1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER --exec $DAEMON -- $DAEMON_ARGS \
+ || return 2
+}
-# Read config file if it is present.
-if [ -r /etc/default/$NAME ]; then
- . /etc/default/$NAME
-fi
-
-# Create directory for PIDFILE, if it does not exist and change ownership.
-test -d $(dirname $PIDFILE) || mkdir -p -m 755 $(dirname $PIDFILE)
-chown $USER $(dirname $PIDFILE)
-
-OPTIONS="--daemon $OPTIONS"
-
-# Start the daemon
-d_start() {
-# Return
-# 0 if daemon has been started
-# 1 if daemon was already running
-# 2 if daemon could not be started
- start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER --exec $DAEMON --test > /dev/null || return 1
- start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER --exec $DAEMON -- $OPTIONS || return 2
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+ start-stop-daemon --stop --quiet --retry=TERM/5/KILL/5 --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ rm -f $PIDFILE
+ return "$RETVAL"
}
-# Stop the daemon
-d_stop() {
-# Return
-# 0 if daemon has been stopped
-# 1 if daemon was already stopped
-# 2 if daemon could not be stopped
-# other if a failure occured
- start-stop-daemon --stop --quiet --retry=TERM/5/KILL/5 --pidfile $PIDFILE --name $NAME
- RETVAL="$?"
- [ "$RETVAL" = 2 ] && return 2
- start-stop-daemon --stop --quiet --oknodo --retry=KILL/5 --exec $DAEMON
- [ "$?" = 2 ] && return 2
- rm -f $PIDFILE
- return "$RETVAL"
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+ start-stop-daemon --stop --quiet --signal 1 --pidfile $PIDFILE --name $NAME
+ return 0
}
+
case "$1" in
+
start)
- if [ "$START" != "yes" ]; then
- echo "Not starting $DESC -- disabled."
- exit 0
- fi
- echo -n "Starting $DESC: $NAME"
- d_start
- case "$?" in
- 0)
- echo "."
- exit 0
- ;;
- 1)
- echo " (already running)."
- exit 0
- ;;
- *)
- echo " (failed)."
- exit 1
- ;;
- esac
- ;;
+ if [ "$START" != "yes" ]; then
+ [ "$VERBOSE" != no ] && log_daemon_msg "Not starting $DESC -- disabled."
+ exit 0
+ fi
+
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+
stop)
- # Always try to stop the daemon.
- echo -n "Stopping $DESC: $NAME"
- d_stop
- case "$?" in
- 0)
- echo "."
- exit 0
- ;;
- 1)
- echo " (not running)."
- exit 0
- ;;
- *)
- echo " (failed)."
- exit 1
- esac
- ;;
- restart|force-reload)
- if [ "$START" != "yes" ]; then
- $0 stop
- exit 0
- fi
- echo -n "Restarting $DESC: $NAME"
- d_stop
- case "$?" in
- 0|1)
- d_start
- case "$?" in
- 0)
- echo "."
- exit 0
- ;;
- 1)
- echo " (failed -- old process still running)."
- exit 1
- ;;
- *)
- echo " (failed to start)."
- exit 1
- ;;
- esac
- ;;
- *)
- echo " (failed to stop)."
- exit 1
- ;;
- esac
- ;;
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+
+
+ reload|force-reload)
+ log_daemon_msg "Reloading $DESC" "$NAME"
+ do_reload
+ log_end_msg $?
+ ;;
+
+ restart)
+ if [ "$START" != "yes" ]; then
+ $0 stop
+ exit 0
+ fi
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+
*)
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
- exit 1
- ;;
-esac
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|reload|status}" >&2
+ exit 3
+ ;;
-exit 0
+esac
+:
Modified: branches/experimental/debian/dspam.install
==============================================================================
--- branches/experimental/debian/dspam.install Mon Aug 17 08:48:09 2009 (r201)
+++ branches/experimental/debian/dspam.install Tue Aug 18 18:09:31 2009 (r202)
@@ -1,5 +1,7 @@
+txt/*.txt etc/dspam/txt/
debian/tmp/etc/dspam/* etc/dspam/
webui/cgi-bin/default.prefs etc/dspam/
+debian/config/hash.conf etc/dspam/dspam.d/
debian/tmp/usr/bin/dspam_2sql usr/bin/
debian/tmp/usr/bin/dspamc usr/bin/
debian/tmp/usr/bin/dspam_train usr/bin/
Modified: branches/experimental/debian/dspam.logrotate
==============================================================================
--- branches/experimental/debian/dspam.logrotate Mon Aug 17 08:48:09 2009 (r201)
+++ branches/experimental/debian/dspam.logrotate Tue Aug 18 18:09:31 2009 (r202)
@@ -1,6 +1,10 @@
-/var/log/dspam/dspam.debug {
+/var/log/dspam/dspam.debug
+/var/log/dspam/dspam.messages
+/var/log/dspam/sql.errors
+{
monthly
missingok
+ notifempty
rotate 7
compress
}
Modified: branches/experimental/debian/libdspam7-drv-sqlite3.install
==============================================================================
--- branches/experimental/debian/libdspam7-drv-sqlite3.install Mon Aug 17 08:48:09 2009 (r201)
+++ branches/experimental/debian/libdspam7-drv-sqlite3.install Tue Aug 18 18:09:31 2009 (r202)
@@ -1,2 +1,3 @@
debian/tmp/usr/lib/dspam/libsqlite3_drv.so* usr/lib/dspam
src/tools.sqlite_drv/purge-3.sql usr/share/dspam/clean
+debian/config/sqlite.conf etc/dspam/dspam.d/
Modified: branches/experimental/debian/patches/00list
==============================================================================
--- branches/experimental/debian/patches/00list Mon Aug 17 08:48:09 2009 (r201)
+++ branches/experimental/debian/patches/00list Tue Aug 18 18:09:31 2009 (r202)
@@ -1,13 +1,9 @@
# list patches in order to apply
-drivers-in-usr_lib_dspam.dpatch
-dspam-webfrontend-config-debian.dpatch
-update-dspam.conf.dpatch
-dspam-default.prefs-in_etc.dpatch
-background-dspam.dpatch
-clean-manpages.dpatch
-path-to-dspam_for-training-script.dpatch
-#dspam_notify.dpatch
-remove-daily-quarantine-pref-from-webui.dpatch
-where-to-find-txt-files.dpatch
-complete_l10n.dpatch
-templates_fr.dpatch
+01_drivers-in-usr_lib_dspam.dpatch
+02_dspam-webfrontend-config-debian.dpatch
+03_update-dspam.conf.dpatch
+04_dspam-default.prefs-in_etc.dpatch
+05_background-dspam.dpatch
+06_clean-manpages.dpatch
+07_path-to-dspam_for-training-script.dpatch
+09_where-to-find-txt-files.dpatch
Copied: branches/experimental/debian/patches/01_drivers-in-usr_lib_dspam.dpatch (from r200, branches/experimental/debian/patches/drivers-in-usr_lib_dspam.dpatch)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/debian/patches/01_drivers-in-usr_lib_dspam.dpatch Tue Aug 18 18:09:31 2009 (r202, copy of r200, branches/experimental/debian/patches/drivers-in-usr_lib_dspam.dpatch)
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## drivers-in-usr_lib_dspam.dpatch by Julien Valroff <julien at kirya.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Default hash storage driver is installed in /usr/lib/dspam
+
+ at DPATCH@
+diff -urNad dspam-3.9.0~git20090606~/src/dspam.conf.in dspam-3.9.0~git20090606/src/dspam.conf.in
+--- dspam-3.9.0~git20090606~/src/dspam.conf.in 2009-06-06 09:19:46.000000000 +0200
++++ dspam-3.9.0~git20090606/src/dspam.conf.in 2009-06-06 09:21:10.000000000 +0200
+@@ -26,7 +26,7 @@
+ # this option. If you do not wish to lose all of your data, you will need to
+ # migrate it to the new backend before making this change.
+ #
+-StorageDriver @libdir@/dspam/@storage_driver@
++StorageDriver /usr/lib/dspam/libhash_drv.so
+
+ #
+ # Trusted Delivery Agent: Specifies the local delivery agent DSPAM should call
Copied and modified: branches/experimental/debian/patches/02_dspam-webfrontend-config-debian.dpatch (from r200, branches/experimental/debian/patches/dspam-webfrontend-config-debian.dpatch)
==============================================================================
--- branches/experimental/debian/patches/dspam-webfrontend-config-debian.dpatch Wed Aug 12 10:56:29 2009 (r200, copy source)
+++ branches/experimental/debian/patches/02_dspam-webfrontend-config-debian.dpatch Tue Aug 18 18:09:31 2009 (r202)
@@ -1,13 +1,13 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
-## dspam-webfrontend-config-debian.dpatch by Julien Valroff <julien at kirya.net>
+## 02_dspam-webfrontend-config-debian.dpatch by Julien Valroff <julien at kirya.net>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Debian configuration for the WebUI
@DPATCH@
-diff -urNad dspam-3.9.0~beta1+git20090802~/webui/cgi-bin/admin.cgi dspam-3.9.0~beta1+git20090802/webui/cgi-bin/admin.cgi
---- dspam-3.9.0~beta1+git20090802~/webui/cgi-bin/admin.cgi 2009-07-21 18:31:31.000000000 +0200
-+++ dspam-3.9.0~beta1+git20090802/webui/cgi-bin/admin.cgi 2009-08-02 15:45:34.000000000 +0200
+diff -urNad dspam-3.9.0~beta1+git20090815~/webui/cgi-bin/admin.cgi dspam-3.9.0~beta1+git20090815/webui/cgi-bin/admin.cgi
+--- dspam-3.9.0~beta1+git20090815~/webui/cgi-bin/admin.cgi 2009-08-18 13:18:51.000000000 +0200
++++ dspam-3.9.0~beta1+git20090815/webui/cgi-bin/admin.cgi 2009-08-18 14:13:12.933903467 +0200
@@ -24,7 +24,7 @@
require "ctime.pl";
@@ -16,17 +16,17 @@
+require "/etc/dspam/webfrontend.conf";
#
- # The current CGI script
-@@ -37,7 +37,7 @@
+ # Read language file
+@@ -48,7 +48,7 @@
#
do {
my($admin) = 0;
- open(FILE, "<./admins");
-+ open(FILE, "</etc/dspam/admins");
++ open(FILE, "/etc/dspam/admins");
while(<FILE>) {
chomp;
if ($_ eq $ENV{'REMOTE_USER'}) {
-@@ -134,9 +134,9 @@
+@@ -145,9 +145,9 @@
$DATA{'USERNAME'} = $USER;
@@ -39,7 +39,7 @@
$DATA{'ERROR'} = "<em>WARNING:</em> " .
"These default preferences will not be loaded by DSPAM, but only by ".
" the CGI interface when a user initially sets up their preferences. ".
-@@ -230,7 +230,7 @@
+@@ -241,7 +241,7 @@
}
if (! -e $FILE) {
@@ -48,7 +48,7 @@
} else {
%PREFS = GetPrefs($USER, $FILE);
}
-@@ -821,7 +821,7 @@
+@@ -833,7 +833,7 @@
close(PIPE);
} else {
if (! -e $FILE) {
@@ -57,16 +57,20 @@
}
if (! -e $FILE) {
-diff -urNad dspam-3.9.0~beta1+git20090802~/webui/cgi-bin/admingraph.cgi dspam-3.9.0~beta1+git20090802/webui/cgi-bin/admingraph.cgi
---- dspam-3.9.0~beta1+git20090802~/webui/cgi-bin/admingraph.cgi 2009-07-20 18:25:15.000000000 +0200
-+++ dspam-3.9.0~beta1+git20090802/webui/cgi-bin/admingraph.cgi 2009-08-02 15:45:34.000000000 +0200
-@@ -24,11 +24,11 @@
- use vars qw { %CONFIG %FORM @spam @nonspam @period @data @inoc @sm @fp @wh @corpus @virus @black @block };
+diff -urNad dspam-3.9.0~beta1+git20090815~/webui/cgi-bin/admingraph.cgi dspam-3.9.0~beta1+git20090815/webui/cgi-bin/admingraph.cgi
+--- dspam-3.9.0~beta1+git20090815~/webui/cgi-bin/admingraph.cgi 2009-08-18 13:18:51.000000000 +0200
++++ dspam-3.9.0~beta1+git20090815/webui/cgi-bin/admingraph.cgi 2009-08-18 14:13:35.109903422 +0200
+@@ -24,7 +24,7 @@
+ use vars qw { %CONFIG %FORM %LANG @spam @nonspam @period @data @inoc @sm @fp @wh @corpus @virus @black @block };
# Read configuration parameters common to all CGI scripts
-require "configure.pl";
+require "/etc/dspam/webfrontend.conf";
+ #
+ # Read language file
+@@ -39,7 +39,7 @@
+
%FORM = &ReadParse();
-GD::Graph::colour::read_rgb("rgb.txt");
@@ -74,15 +78,15 @@
do {
my($spam, $nonspam, $sm, $fp, $inoc, $wh, $corpus, $virus, $black, $block, $period) = split(/\_/, $FORM{'data'});
-diff -urNad dspam-3.9.0~beta1+git20090802~/webui/cgi-bin/configure.pl.in dspam-3.9.0~beta1+git20090802/webui/cgi-bin/configure.pl.in
---- dspam-3.9.0~beta1+git20090802~/webui/cgi-bin/configure.pl.in 2009-07-20 18:25:15.000000000 +0200
-+++ dspam-3.9.0~beta1+git20090802/webui/cgi-bin/configure.pl.in 2009-08-02 15:45:34.000000000 +0200
+diff -urNad dspam-3.9.0~beta1+git20090815~/webui/cgi-bin/configure.pl.in dspam-3.9.0~beta1+git20090815/webui/cgi-bin/configure.pl.in
+--- dspam-3.9.0~beta1+git20090815~/webui/cgi-bin/configure.pl.in 2009-08-03 19:54:28.000000000 +0200
++++ dspam-3.9.0~beta1+git20090815/webui/cgi-bin/configure.pl.in 2009-08-18 14:14:56.881903581 +0200
@@ -29,11 +29,11 @@
$CONFIG{'DSPAM_STATS'} = $CONFIG{'DSPAM_BIN'} . "/dspam_stats";
$CONFIG{'DSPAM_ARGS'} = "--deliver=innocent --class=innocent " .
"--source=error --user %CURRENT_USER% -d %u";
-$CONFIG{'TEMPLATES'} = "./templates"; # Location of HTML templates
-+$CONFIG{'TEMPLATES'} = "/etc/dspam/templates/"; # Location of HTML templates
++$CONFIG{'TEMPLATES'} = "/etc/dspam/templates"; # Location of HTML templates
$CONFIG{'DSPAM_PROCESSES'} = "ps auxw | grep dspam | grep -v 'grep\|cgi\|sock' | wc -l"; # use ps -deaf for Solaris
$CONFIG{'MAIL_QUEUE'} = "mailq | grep '^[0-9,A-F]\{10,12\}[\t ][\t ]*[1-9]' | wc -l";
@@ -97,24 +101,26 @@
$CONFIG{'3D_GRAPHS'} = 1;
-$CONFIG{'OPTMODE'} = "NONE"; # OUT=OptOut IN=OptIn NONE=not selectable
-$CONFIG{'LOCAL_DOMAIN'} = "localhost";
-+$CONFIG{'OPTMODE'} = "IN"; # OUT=OptOut IN=OptIn NONE=not selectable
++$CONFIG{'OPTMODE'} = "IN"; # OUT=OptOut IN=OptIn NONE=not selectable
# Add customized settings below
$CONFIG{'LOCAL_DOMAIN'} = "yourdomain.com";
-@@ -57,9 +56,8 @@
+@@ -57,10 +56,9 @@
# Or, if you're running dspam.cgi as untrusted, it won't be able to auto-detect
# so you will need to specify some features manually:
-#$CONFIG{'AUTODETECT'} = 0;
#$CONFIG{'LARGE_SCALE'} = 0;
-#$CONFIG{'DOMAIN_SCALE'} = 0;
+-#$CONFIG{'PREFERENCES_EXTENSION'} = 0;
+#$CONFIG{'DOMAIN_SCALE'} = 1;
- #$CONFIG{'PREFERENCES_EXTENSION'} = 0;
++#$CONFIG{'PREFERENCES_EXTENSION'} = 1;
# Get DSPAM version
-diff -urNad dspam-3.9.0~beta1+git20090802~/webui/cgi-bin/dspam.cgi dspam-3.9.0~beta1+git20090802/webui/cgi-bin/dspam.cgi
---- dspam-3.9.0~beta1+git20090802~/webui/cgi-bin/dspam.cgi 2009-07-26 14:15:17.000000000 +0200
-+++ dspam-3.9.0~beta1+git20090802/webui/cgi-bin/dspam.cgi 2009-08-02 15:45:34.000000000 +0200
+ $CONFIG{'DSPAM_VERSION'} = "Unknown Version";
+diff -urNad dspam-3.9.0~beta1+git20090815~/webui/cgi-bin/dspam.cgi dspam-3.9.0~beta1+git20090815/webui/cgi-bin/dspam.cgi
+--- dspam-3.9.0~beta1+git20090815~/webui/cgi-bin/dspam.cgi 2009-08-18 13:18:51.000000000 +0200
++++ dspam-3.9.0~beta1+git20090815/webui/cgi-bin/dspam.cgi 2009-08-18 14:16:47.873903595 +0200
@@ -25,7 +25,7 @@
require "ctime.pl";
@@ -122,18 +128,18 @@
-require "configure.pl";
+require "/etc/dspam/webfrontend.conf";
- if($CONFIG{"DATE_FORMAT"}) {
- use POSIX qw(strftime);
-@@ -67,7 +67,7 @@
+ #
+ # Read language file
+@@ -78,7 +78,7 @@
$CONFIG{'ADMIN'} = 0;
if ($ENV{'REMOTE_USER'} ne "") {
- open(FILE, "<./admins");
-+ open(FILE, "</etc/dspam/admins");
++ open(FILE, "/etc/dspam/admins");
while(<FILE>) {
chomp;
if ($_ eq $ENV{'REMOTE_USER'}) {
-@@ -626,7 +626,7 @@
+@@ -637,7 +637,7 @@
sub DisplayPreferences {
my(%PREFS);
@@ -142,7 +148,7 @@
my $username = $CURRENT_USER;
-@@ -1643,6 +1643,7 @@
+@@ -1655,6 +1655,7 @@
my(%PREFS);
my($FILE) = "$USER.prefs";
@@ -150,33 +156,37 @@
if ($CONFIG{'PREFERENCES_EXTENSION'} == 1) {
open(PIPE, "$CONFIG{'DSPAM_BIN'}/dspam_admin agg pref " . quotemeta($CURRENT_USER) . "|");
-@@ -1656,10 +1657,10 @@
+@@ -1668,10 +1669,10 @@
if (keys(%PREFS) eq "0" || $CONFIG{'PREFERENCES_EXTENSION'} != 1) {
- if (! -e "./default.prefs") {
+ if (! -e "$DEFAULT_PREFS") {
- &error("Unable to load default preferences");
+ &error("$LANG{'error_load_default_prefs'}");
}
- open(FILE, "<./default.prefs");
+ open(FILE, "<$DEFAULT_PREFS");
while(<FILE>) {
chomp;
my($directive, $value) = split(/\=/);
-diff -urNad dspam-3.9.0~beta1+git20090802~/webui/cgi-bin/graph.cgi dspam-3.9.0~beta1+git20090802/webui/cgi-bin/graph.cgi
---- dspam-3.9.0~beta1+git20090802~/webui/cgi-bin/graph.cgi 2009-07-20 18:25:15.000000000 +0200
-+++ dspam-3.9.0~beta1+git20090802/webui/cgi-bin/graph.cgi 2009-08-02 15:45:34.000000000 +0200
-@@ -25,11 +25,11 @@
- use vars qw { %CONFIG %FORM @spam_day @nonspam_day @period @data };
+diff -urNad dspam-3.9.0~beta1+git20090815~/webui/cgi-bin/graph.cgi dspam-3.9.0~beta1+git20090815/webui/cgi-bin/graph.cgi
+--- dspam-3.9.0~beta1+git20090815~/webui/cgi-bin/graph.cgi 2009-08-18 13:18:51.000000000 +0200
++++ dspam-3.9.0~beta1+git20090815/webui/cgi-bin/graph.cgi 2009-08-18 14:17:18.137903590 +0200
+@@ -25,7 +25,7 @@
+ use vars qw { %CONFIG %FORM %LANG @spam_day @nonspam_day @period @data };
# Read configuration parameters common to all CGI scripts
-require "configure.pl";
+require "/etc/dspam/webfrontend.conf";
+ #
+ # Read language file
+@@ -40,7 +40,7 @@
+
%FORM = &ReadParse();
-GD::Graph::colour::read_rgb("rgb.txt");
-+GD::Graph::colour::read_rgb("/etc/dspam/rgb.txt");
++GD::Graph::colour::read_rgb("/etc/dspam/rgb.txt");
do {
my($spam, $nonspam, $period) = split(/\_/, $FORM{'data'});
Copied and modified: branches/experimental/debian/patches/03_update-dspam.conf.dpatch (from r200, branches/experimental/debian/patches/update-dspam.conf.dpatch)
==============================================================================
--- branches/experimental/debian/patches/update-dspam.conf.dpatch Wed Aug 12 10:56:29 2009 (r200, copy source)
+++ branches/experimental/debian/patches/03_update-dspam.conf.dpatch Tue Aug 18 18:09:31 2009 (r202)
@@ -5,9 +5,9 @@
## DP: Debian default configuration
@DPATCH@
-diff -urNad dspam-3.9.0~beta1+git20090802~/src/dspam.conf.in dspam-3.9.0~beta1+git20090802/src/dspam.conf.in
---- dspam-3.9.0~beta1+git20090802~/src/dspam.conf.in 2009-08-02 16:05:42.000000000 +0200
-+++ dspam-3.9.0~beta1+git20090802/src/dspam.conf.in 2009-08-02 16:20:54.000000000 +0200
+diff -urNad dspam-3.9.0~beta1+git20090818~/src/dspam.conf.in dspam-3.9.0~beta1+git20090818/src/dspam.conf.in
+--- dspam-3.9.0~beta1+git20090818~/src/dspam.conf.in 2009-08-18 17:11:25.097904791 +0200
++++ dspam-3.9.0~beta1+git20090818/src/dspam.conf.in 2009-08-18 17:11:25.225904167 +0200
@@ -129,11 +129,10 @@
#
Trust root
@@ -37,7 +37,7 @@
#
# Overrides: Specifies the user preferences which may override configuration
-@@ -292,94 +291,6 @@
+@@ -292,175 +291,6 @@
AllowOverride optIn optOut
AllowOverride whitelistThreshold
@@ -129,10 +129,91 @@
-#PgSQLVirtualUIDField uid
-#PgSQLVirtualUsernameField username
-
- # --- SQLite ---
+-# --- SQLite ---
+-
+-#SQLitePragma "synchronous = OFF"
+-
+-# --- Hash ---
+-
+-#
+-# HashRecMax: Default number of records to create in the initial segment when
+-# building hash files. 100,000 yields files 1.6MB in size, but can fill up
+-# fast, so be sure to increase this (to a million or more) if you're not using
+-# autoextend.
+-#
+-# NOTE: If you're using a heavy-weight tokenizer, such as SBPH, you should be
+-# looking for settings in the 'millions' of records.
+-#
+-# Primes List:
+-# 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, 98317, 196613,
+-# 393241, 786433, 1572869, 3145739, 6291469, 12582917, 25165843, 50331653,
+-# 100663319, 201326611, 402653189, 805306457, 1610612741, 3221225473,
+-# 4294967291
+-#
+-HashRecMax 98317
+-
+-#
+-# HashAutoExtend: Autoextend hash databases when they fill up. This allows
+-# them to continue to train by adding extents (extensions) to the file. There
+-# will be a small delay during the growth process, as everything needs to be
+-# closed and remapped.
+-#
+-HashAutoExtend on
+-
+-#
+-# HashMaxExtents: The maximum number of extents that may be created in a single
+-# hash file. Set this to zero for unlimited
+-#
+-HashMaxExtents 0
+-
+-#
+-# HashExtentSize: The initial record size for newly created extents. Creating
+-# this too small could result in many extents being created. Creating this too
+-# large could result in excessive disk space usage. Typically, a value close
+-# to half of the HashRecMax size is good.
+-#
+-HashExtentSize 49157
+-
+-#
+-# HashPctIncrease: Increase the next extent size by n% from the size of the
+-# last extent. This is useful in accommodating systems where the default
+-# HashExtentSize can be too small for certain high-volume users, and can also
+-# help keep seeks nice and speedy and/or prevent too many unnecessary extents
+-# from being created when using a low HashMaxSeek. The default behavior, when
+-# HashPctIncrease is not used, is to always use # HashExtentSize with no
+-# increase.
+-#
+-HashPctIncrease 10
+-
+-#
+-# HashMaxSeek: The maximum number of record seeks when inserting a new record
+-# before failing or adding a new extent. This ultimately translates into the
+-# max # of acceptable seeks per segment. Setting this too high will exhaustively
+-# scan each segment and hurt performance. Typically, a low value is acceptable
+-# as even older extents will continue to fill as training progresses.
+-#
+-HashMaxSeek 10
+-
+-#
+-# HashConcurrentUser: If you are using a single, stateful hash database in
+-# daemon mode, specifying a concurrent user below will cause the user to be
+-# permanently mapped into memory and shared via rwlocks. This is very fast and
+-# very cool if you are running a "userless" relay appliance.
+-#
+-#HashConcurrentUser user
+-
+-#
+-# HashConnectionCache: If running in daemon mode, this is the max # of
+-# concurrent connections that will be supported. NOTE: If you are using
+-# HashConcurrentUser, this option is ignored, as all connections are read-
+-# write locked instead of mutex locked.
+-#
+-HashConnectionCache 10
+-
+
+ # -- ExtLookup --
- #SQLitePragma "synchronous = OFF"
-@@ -649,7 +560,7 @@
+@@ -649,7 +479,7 @@
# users will be filtered unless a .nodspam file is dropped in
# /var/dspam/opt-out/user.nodspam
#
@@ -141,7 +222,7 @@
#
# TrackSources: specify which (if any) source addresses to track and report
-@@ -657,7 +568,7 @@
+@@ -657,7 +487,7 @@
# blacklist and would like to use this information. Spam reporting also drops
# RABL blacklist files (see http://www.nuclearelephant.com/projects/rabl/).
#
@@ -150,7 +231,7 @@
#
# ParseToHeaders: In lieu of setting up individual aliases for each user,
-@@ -736,7 +647,7 @@
+@@ -736,7 +566,7 @@
#ServerHost 127.0.0.1
#ServerPort 24
#ServerQueueSize 32
@@ -159,12 +240,12 @@
#
# ServerMode specifies the type of LMTP server to start. This can be one of:
-@@ -772,14 +683,14 @@
+@@ -772,14 +602,14 @@
# you are running the client and server on the same machine, as it eliminates
# much of the bandwidth overhead.
#
-#ServerDomainSocketPath "/tmp/dspam.sock"
-+#ServerDomainSocketPath "/var/run/dspam/dspam.sock"
++ServerDomainSocketPath "/var/run/dspam/dspam.sock"
#
# Client Mode: If you are running DSPAM in client/server mode, uncomment and
@@ -176,7 +257,7 @@
#ClientIdent "secret at Relay1"
#
#ClientHost 127.0.0.1
-@@ -826,4 +737,7 @@
+@@ -826,4 +656,7 @@
#
StripRcptDomain off
Copied: branches/experimental/debian/patches/04_dspam-default.prefs-in_etc.dpatch (from r200, branches/experimental/debian/patches/dspam-default.prefs-in_etc.dpatch)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/debian/patches/04_dspam-default.prefs-in_etc.dpatch Tue Aug 18 18:09:31 2009 (r202, copy of r200, branches/experimental/debian/patches/dspam-default.prefs-in_etc.dpatch)
@@ -0,0 +1,55 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## dspam-default.prefs-in_etc.dpatch by Julien Valroff <julien at kirya.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: default.prefs file is installed in /etc/dspam
+
+ at DPATCH@
+diff -urNad dspam-3.9.0~git+alpha2+git20090627~/src/pref.c dspam-3.9.0~git+alpha2+git20090627/src/pref.c
+--- dspam-3.9.0~git+alpha2+git20090627~/src/pref.c 2009-06-27 12:13:57.000000000 +0200
++++ dspam-3.9.0~git+alpha2+git20090627/src/pref.c 2009-06-27 12:36:45.000000000 +0200
+@@ -177,7 +177,7 @@
+ PTX[0] = NULL;
+
+ if (user == NULL) {
+- snprintf(filename, MAX_FILENAME_LENGTH, "%s/default.prefs", home);
++ snprintf(filename, MAX_FILENAME_LENGTH, "/etc/dspam/default.prefs", home);
+ } else {
+ _ds_userdir_path (filename, home, user, "prefs");
+ }
+@@ -307,7 +307,7 @@
+ FILE *out_file;
+
+ if (username == NULL) {
+- snprintf(filename, MAX_FILENAME_LENGTH, "%s/default.prefs", home);
++ snprintf(filename, MAX_FILENAME_LENGTH, "/etc/dspam/default.prefs", home);
+ } else {
+ _ds_userdir_path (filename, home, username, "prefs");
+ }
+@@ -334,7 +334,7 @@
+ int nlines;
+
+ if (username == NULL) {
+- snprintf(filename, MAX_FILENAME_LENGTH, "%s/default.prefs", home);
++ snprintf(filename, MAX_FILENAME_LENGTH, "/etc/dspam/default.prefs", home);
+ } else {
+ _ds_userdir_path (filename, home, username, "prefs");
+ }
+diff -urNad dspam-3.9.0~git+alpha2+git20090627~/webui/cgi-bin/admin.cgi dspam-3.9.0~git+alpha2+git20090627/webui/cgi-bin/admin.cgi
+--- dspam-3.9.0~git+alpha2+git20090627~/webui/cgi-bin/admin.cgi 2009-06-27 12:36:45.000000000 +0200
++++ dspam-3.9.0~git+alpha2+git20090627/webui/cgi-bin/admin.cgi 2009-06-27 12:37:23.000000000 +0200
+@@ -136,14 +136,6 @@
+
+ if ($FORM{'username'} eq "") {
+ $FILE = "/etc/dspam/default.prefs";
+- if ($CONFIG{'PREFERENCES_EXTENSION'} != 1 && ! -l "/etc/dspam/default.prefs") {
+- $DATA{'ERROR'} = "<em>WARNING:</em> " .
+- "These default preferences will not be loaded by DSPAM, but only by ".
+- " the CGI interface when a user initially sets up their preferences. ".
+- "To have DSPAM override its configuration with these default ".
+- "preferences, symlink $CONFIG{'DSPAM_HOME'}/default.prefs to the ".
+- "default.prefs file in the CGI directory.<BR><BR>";
+- }
+ } else {
+ $FILE = GetPath($FORM{'username'}) . ".prefs";
+ }
Copied: branches/experimental/debian/patches/05_background-dspam.dpatch (from r199, branches/experimental/debian/patches/background-dspam.dpatch)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/debian/patches/05_background-dspam.dpatch Tue Aug 18 18:09:31 2009 (r202, copy of r199, branches/experimental/debian/patches/background-dspam.dpatch)
@@ -0,0 +1,22 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## background-dspam.dpatch by Matthijs Mohlmann <matthijs at cacholong.nl>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fork dspam into the background.
+
+ at DPATCH@
+diff -urNad dspam-3.6.2~/src/dspam.c dspam-3.6.2/src/dspam.c
+--- dspam-3.6.2~/src/dspam.c 2006-01-02 12:40:52.000000000 +0100
++++ dspam-3.6.2/src/dspam.c 2006-01-02 12:43:04.566063250 +0100
+@@ -3830,6 +3830,11 @@
+ DRIVER_CTX DTX;
+ char *pidfile;
+
++ /* Fork dspam into the background */
++ if (fork()) {
++ exit(EXIT_SUCCESS);
++ }
++
+ __daemon_run = 1;
+ __num_threads = 0;
+ __hup = 0;
Copied: branches/experimental/debian/patches/06_clean-manpages.dpatch (from r200, branches/experimental/debian/patches/clean-manpages.dpatch)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/debian/patches/06_clean-manpages.dpatch Tue Aug 18 18:09:31 2009 (r202, copy of r200, branches/experimental/debian/patches/clean-manpages.dpatch)
@@ -0,0 +1,129 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## clean-manpages.dpatch by Julien Valroff <julien at kirya.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Various fixes to manpages
+
+ at DPATCH@
+diff -urNad dspam-3.9.0~alpha2+git20090720~/man/dspam.1 dspam-3.9.0~alpha2+git20090720/man/dspam.1
+--- dspam-3.9.0~alpha2+git20090720~/man/dspam.1 2009-07-20 18:25:15.000000000 +0200
++++ dspam-3.9.0~alpha2+git20090720/man/dspam.1 2009-07-21 18:58:16.000000000 +0200
+@@ -102,7 +102,7 @@
+ delivered, the $u (or %u) parameters of the argument string will be interpolated
+ for the current user being processed.
+
+-.n3 3
++.ne 3
+ .TP
+ .BI \--mode= [toe|tum|teft|notrain]\c
+ Configures the training mode to be used for this process, overriding any
+diff -urNad dspam-3.9.0~alpha2+git20090720~/man/dspam_clean.1 dspam-3.9.0~alpha2+git20090720/man/dspam_clean.1
+--- dspam-3.9.0~alpha2+git20090720~/man/dspam_clean.1 2009-07-20 18:25:15.000000000 +0200
++++ dspam-3.9.0~alpha2+git20090720/man/dspam_clean.1 2009-07-21 18:58:25.000000000 +0200
+@@ -45,7 +45,7 @@
+ 14 days will be overridden. Specifying an age of 0 will delete all signatures
+ from the user(s) processed.
+
+-.n 3
++.ne 3
+ .TP
+ .BI \-p\fR\c
+ Deletes all tokens from the target user(s) database whose probability is
+@@ -54,7 +54,7 @@
+ to use this flag once with a life of 0 days for users after a significant amount
+ of corpus training.
+
+-.n 3
++.ne 3
+ .TP
+ .BI \-u\fR\c
+ Deletes all unused tokens from a user's dataset. Four different life values
+@@ -77,7 +77,7 @@
+ where each number represents the respective life. Specifying a life of zero
+ will delete all unused tokens in the category.
+
+-.n 3
++.ne 3
+ .TP
+ .BI \ user1\ user2\ ...\ userN\fR\c
+ Specify the username(s) to perform the selected maintenance operations on. If
+diff -urNad dspam-3.9.0~alpha2+git20090720~/man/dspam_dump.1 dspam-3.9.0~alpha2+git20090720/man/dspam_dump.1
+--- dspam-3.9.0~alpha2+git20090720~/man/dspam_dump.1 2009-07-20 18:25:15.000000000 +0200
++++ dspam-3.9.0~alpha2+git20090720/man/dspam_dump.1 2009-07-21 18:58:16.000000000 +0200
+@@ -39,7 +39,7 @@
+ The username of the user to dump. Only trusted users (or root) can use this
+ program for the usernames different from the current one.
+
+-.n3
++.ne 3
+ .TP
+ .BI \ token \fR\c
+ .br
+diff -urNad dspam-3.9.0~alpha2+git20090720~/man/dspam_merge.1 dspam-3.9.0~alpha2+git20090720/man/dspam_merge.1
+--- dspam-3.9.0~alpha2+git20090720~/man/dspam_merge.1 2009-07-20 18:25:15.000000000 +0200
++++ dspam-3.9.0~alpha2+git20090720/man/dspam_merge.1 2009-07-21 18:58:16.000000000 +0200
+@@ -46,7 +46,7 @@
+ .BI \ user1\ user2\ ...\ userN \fR\c
+ A list of users to merge together.
+
+-.n3
++.ne 3
+ .TP
+ .BI \ -o \ username \fR\c
+ The target user which will be created (if necessary). This user will contain
+diff -urNad dspam-3.9.0~alpha2+git20090720~/man/dspam_stats.1 dspam-3.9.0~alpha2+git20090720/man/dspam_stats.1
+--- dspam-3.9.0~alpha2+git20090720~/man/dspam_stats.1 2009-07-20 18:25:15.000000000 +0200
++++ dspam-3.9.0~alpha2+git20090720/man/dspam_stats.1 2009-07-21 18:58:16.000000000 +0200
+@@ -62,7 +62,7 @@
+ .BI \-t\fR\c
+ Displays a total of all statistics displayed
+
+-.n3 3
++.ne 3
+ .TP
+ .BI [username]\c
+ Specifies the username to query. If no username is provided, all users will be
+diff -urNad dspam-3.9.0~alpha2+git20090720~/man/dspam_train.1 dspam-3.9.0~alpha2+git20090720/man/dspam_train.1
+--- dspam-3.9.0~alpha2+git20090720~/man/dspam_train.1 2009-07-20 18:25:15.000000000 +0200
++++ dspam-3.9.0~alpha2+git20090720/man/dspam_train.1 2009-07-21 18:58:16.000000000 +0200
+@@ -43,24 +43,24 @@
+ .ne 3
+ .TP
+
+-.n3 3
++.ne 3
+ .TP
+ .BI --client\c
+ If specified, dspam is used in client-server mode.
+
+-.n3 3
++.ne 3
+ .TP
+ .BI username\c
+ Specifies the user to train, if omitted the current user name is used.
+
+-.n3 3
++.ne 3
+ .TP
+ .BI spam_corpus\c
+ Specifies either the pathname to the directory containing the corpus of spam,
+ with each in a separate file (e.g. maildir format) or a path to the mailbox in
+ the traditional Unix MBOX format.
+
+-.n3 3
++.ne 3
+ .TP
+ .BI nonspam_corpus\c
+ Specifies either the pathname to the directory containing the corpus of
+diff -urNad dspam-3.9.0~alpha2+git20090720~/man/libdspam.3 dspam-3.9.0~alpha2+git20090720/man/libdspam.3
+--- dspam-3.9.0~alpha2+git20090720~/man/libdspam.3 2009-07-20 18:25:15.000000000 +0200
++++ dspam-3.9.0~alpha2+git20090720/man/libdspam.3 2009-07-21 18:58:16.000000000 +0200
+@@ -11,7 +11,7 @@
+ .TH libdspam 3 "Sep 29, 2004" "libdspam" "libdspam"
+
+ .SH NAME
+-libdspam, dspam_init, dspam_create, dspam_addattribute, dspam_attach, dspam_process, dspam_getsource, dspam_detach, dspam_clearattributes, dspam_destroy
++libdspam - core message processing and classification for dspam
+ .PP
+ DSPAM Core Analyis Engine Functions
+
Copied: branches/experimental/debian/patches/07_path-to-dspam_for-training-script.dpatch (from r200, branches/experimental/debian/patches/path-to-dspam_for-training-script.dpatch)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/debian/patches/07_path-to-dspam_for-training-script.dpatch Tue Aug 18 18:09:31 2009 (r202, copy of r200, branches/experimental/debian/patches/path-to-dspam_for-training-script.dpatch)
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## path-to-dspam_for-training-script.dpatch by Julien Valroff <julien at kirya.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix path to dspam binary
+
+ at DPATCH@
+diff -urNad dspam-3.9.0~git+alpha2+git20090714~/scripts/train.pl dspam-3.9.0~git+alpha2+git20090714/scripts/train.pl
+--- dspam-3.9.0~git+alpha2+git20090714~/scripts/train.pl 2009-06-27 12:13:57.000000000 +0200
++++ dspam-3.9.0~git+alpha2+git20090714/scripts/train.pl 2009-07-18 16:09:24.000000000 +0200
+@@ -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 = "/usr/bin"; # Path to dspam binaries
+ $TRAINING_MODE = "teft"; # Training mode
+
+ ### DO NOT CONFIGURE BELOW THIS LINE ###
Copied: branches/experimental/debian/patches/09_where-to-find-txt-files.dpatch (from r200, branches/experimental/debian/patches/where-to-find-txt-files.dpatch)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/debian/patches/09_where-to-find-txt-files.dpatch Tue Aug 18 18:09:31 2009 (r202, copy of r200, branches/experimental/debian/patches/where-to-find-txt-files.dpatch)
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## where-to-find-txt-files.dpatch by Julien Valroff <julien at kirya.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: txt files are installed in /etc/dspam/txt
+
+ at DPATCH@
+diff -urNad dspam-3.9.0~beta2~/src/dspam.c dspam-3.9.0~beta2/src/dspam.c
+--- dspam-3.9.0~beta2~/src/dspam.c 2009-08-09 21:40:44.183588053 +0200
++++ dspam-3.9.0~beta2/src/dspam.c 2009-08-09 21:41:09.043585576 +0200
+@@ -1532,7 +1532,7 @@
+
+ time(&now);
+
+- snprintf(msgfile, sizeof(msgfile), "%s/txt/%s", _ds_read_attribute(agent_config, "Home"), filename);
++ snprintf(msgfile, sizeof(msgfile), "/etc/dspam/txt/%s", filename);
+ f = fopen(msgfile, "r");
+ if (!f) {
+ LOG(LOG_ERR, ERR_IO_FILE_OPEN, filename, strerror(errno));
Modified: branches/experimental/debian/rules
==============================================================================
--- branches/experimental/debian/rules Mon Aug 17 08:48:09 2009 (r201)
+++ branches/experimental/debian/rules Tue Aug 18 18:09:31 2009 (r202)
@@ -24,6 +24,7 @@
CONFIGURE = $(CROSS) \
--host=$(DEB_HOST_GNU_TYPE) \
--prefix=/usr \
+ --disable-dependency-tracking \
--includedir=/usr/include \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
@@ -43,7 +44,6 @@
--with-mysql-includes=/usr/include/mysql \
--with-pgsql-includes=`pg_config --includedir` \
--with-storage-driver=${STORAGE} \
- --enable-ldap \
--enable-debug
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -62,7 +62,7 @@
CONFIGURE += --enable-preferences-extension
endif
ifneq (,$(findstring verbose_debug,$(DEB_BUILD_OPTIONS)))
- CONFIGURE += --verbose-debug
+ CONFIGURE += --enable-verbose-debug
endif
ifeq (,$(findstring disable_clamav,$(DEB_BUILD_OPTIONS)))
CONFIGURE += --enable-clamav
More information about the Pkg-dspam-commits
mailing list