[Pkg-dspam-commits] [pkg-dspam-commits] r253 - in branches/development/debian: . config patches
Julien Valroff
julien-guest at alioth.debian.org
Tue Apr 20 17:08:50 UTC 2010
Author: julien-guest
Date: Tue Apr 20 17:08:47 2010
New Revision: 253
Log:
Many various improvements on SQL drivers
Added:
branches/development/debian/split-config.sh (contents, props changed)
Deleted:
branches/development/debian/config/extlookup.conf
branches/development/debian/config/hash.conf
branches/development/debian/config/mysql.conf
branches/development/debian/config/pgsql.conf
branches/development/debian/config/sqlite.conf
branches/development/debian/patches/015_dspam-maintenance.diff
Modified:
branches/development/debian/TODO.Debian
branches/development/debian/changelog
branches/development/debian/dspam.default
branches/development/debian/dspam.install
branches/development/debian/libdspam7-drv-mysql.install
branches/development/debian/libdspam7-drv-pgsql.install
branches/development/debian/libdspam7-drv-sqlite3.dirs
branches/development/debian/libdspam7-drv-sqlite3.install
branches/development/debian/patches/003_update-dspam.conf.diff
branches/development/debian/patches/010_default-daemon-port.diff
branches/development/debian/patches/series
branches/development/debian/rules
Modified: branches/development/debian/TODO.Debian
==============================================================================
--- branches/development/debian/TODO.Debian Sat Apr 17 13:29:08 2010 (r252)
+++ branches/development/debian/TODO.Debian Tue Apr 20 17:08:47 2010 (r253)
@@ -12,4 +12,4 @@
http://www.debian.org/doc/debian-policy/ch-customized-programs.html#s-web-appl
-* Install some or all of the contribs (TB plugin as a separate package?)
+* Buikd TB plugin as a separate package?
Modified: branches/development/debian/changelog
==============================================================================
--- branches/development/debian/changelog Sat Apr 17 13:29:08 2010 (r252)
+++ branches/development/debian/changelog Tue Apr 20 17:08:47 2010 (r253)
@@ -1,4 +1,4 @@
-dspam (3.9.0+git20100417-1) experimental; urgency=low
+dspam (3.9.0+git20100420-1) experimental; urgency=low
[ Kurt B. Kaiser ]
* debian/rules: don't use --build config option if host equals target.
@@ -84,8 +84,10 @@
* Add automatic configuration file splitting snippet in rules
(thanks to Stevan Bajić <stevan at bajic.ch>)
* Make use of dspam_maintenance.sh script instead of homemade purge scripts
+ * Only ships SQL files for MySQL >= 4.1 as no older version is available
+ in Debian
- -- Julien Valroff <julien at kirya.net> Sat, 17 Apr 2010 15:11:07 +0200
+ -- Julien Valroff <julien at kirya.net> Tue, 20 Apr 2010 18:43:04 +0200
dspam (3.6.8-9.3) unstable; urgency=low
Modified: branches/development/debian/dspam.default
==============================================================================
--- branches/development/debian/dspam.default Sat Apr 17 13:29:08 2010 (r252)
+++ branches/development/debian/dspam.default Tue Apr 20 17:08:47 2010 (r253)
@@ -11,4 +11,4 @@
# Options for dspam_maintenance script (daily cronjob)
# See dspam_maintenance(1) for possible options
-#MAINTENANCE_OPTIONS="--verbose"
+MAINTENANCE_OPTIONS="--with-sql-optimization"
Modified: branches/development/debian/dspam.install
==============================================================================
--- branches/development/debian/dspam.install Sat Apr 17 13:29:08 2010 (r252)
+++ branches/development/debian/dspam.install Tue Apr 20 17:08:47 2010 (r253)
@@ -2,7 +2,7 @@
debian/tmp/etc/dspam/* etc/dspam/
webui/cgi-bin/default.prefs etc/dspam/
debian/config/hash.conf etc/dspam/dspam.d/
-debian/config/extlookup.conf etc/dspam/dspam.d/
+debian/config/extlookup.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/development/debian/libdspam7-drv-mysql.install
==============================================================================
--- branches/development/debian/libdspam7-drv-mysql.install Sat Apr 17 13:29:08 2010 (r252)
+++ branches/development/debian/libdspam7-drv-mysql.install Tue Apr 20 17:08:47 2010 (r253)
@@ -2,10 +2,7 @@
debian/sqlfiles/mysql usr/share/dbconfig-common/data/libdspam7-drv-mysql/install
debian/sqlfiles/upgrade/mysql usr/share/dbconfig-common/data/libdspam7-drv-mysql/upgrade
src/tools.mysql_drv/mysql_objects-4.1.sql usr/share/doc/libdspam7-drv-mysql/sql/
-src/tools.mysql_drv/mysql_objects-space.sql usr/share/doc/libdspam7-drv-mysql/sql/
-src/tools.mysql_drv/mysql_objects-speed.sql usr/share/doc/libdspam7-drv-mysql/sql/
src/tools.mysql_drv/virtual_user_aliases.sql usr/share/doc/libdspam7-drv-mysql/sql/
src/tools.mysql_drv/virtual_users.sql usr/share/doc/libdspam7-drv-mysql/sql/
src/tools.mysql_drv/purge-4.1.sql usr/share/doc/libdspam7-drv-mysql/sql/
-src/tools.mysql_drv/purge.sql usr/share/doc/libdspam7-drv-mysql/sql/
-debian/config/mysql.conf usr/share/doc/libdspam7-drv-mysql/
+debian/config/mysql.conf etc/dspam/dspam.d/
Modified: branches/development/debian/libdspam7-drv-pgsql.install
==============================================================================
--- branches/development/debian/libdspam7-drv-pgsql.install Sat Apr 17 13:29:08 2010 (r252)
+++ branches/development/debian/libdspam7-drv-pgsql.install Tue Apr 20 17:08:47 2010 (r253)
@@ -3,6 +3,6 @@
debian/sqlfiles/upgrade/pgsql usr/share/dbconfig-common/data/libdspam7-drv-pgsql/upgrade
src/tools.pgsql_drv/pgsql_objects.sql usr/share/doc/libdspam7-drv-pgsql/sql/
src/tools.pgsql_drv/virtual_users.sql usr/share/doc/libdspam7-drv-pgsql/sql/
-src/tools.pgsql_drv/purge.sql usr/share/doc/libdspam7-drv-pgsql/sql/
+src/tools.pgsql_drv/purge-pe.sql usr/share/doc/libdspam7-drv-pgsql/sql/
debian/tmp/usr/bin/dspam_pg2int8 usr/bin/
-debian/config/pgsql.conf usr/share/doc/libdspam7-drv-pgsql/
+debian/config/pgsql.conf etc/dspam/dspam.d/
Modified: branches/development/debian/libdspam7-drv-sqlite3.dirs
==============================================================================
--- branches/development/debian/libdspam7-drv-sqlite3.dirs Sat Apr 17 13:29:08 2010 (r252)
+++ branches/development/debian/libdspam7-drv-sqlite3.dirs Tue Apr 20 17:08:47 2010 (r253)
@@ -1,2 +1 @@
usr/lib/dspam
-usr/share/dspam/clean
Modified: branches/development/debian/libdspam7-drv-sqlite3.install
==============================================================================
--- branches/development/debian/libdspam7-drv-sqlite3.install Sat Apr 17 13:29:08 2010 (r252)
+++ branches/development/debian/libdspam7-drv-sqlite3.install Tue Apr 20 17:08:47 2010 (r253)
@@ -1,3 +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/tmp/usr/lib/dspam/libsqlite3_drv.so* usr/lib/dspam/
+src/tools.sqlite_drv/purge-3.sql usr/share/doc/libdspam-drv-sqlite3/sql/
debian/config/sqlite.conf etc/dspam/dspam.d/
Modified: branches/development/debian/patches/003_update-dspam.conf.diff
==============================================================================
--- branches/development/debian/patches/003_update-dspam.conf.diff Sat Apr 17 13:29:08 2010 (r252)
+++ branches/development/debian/patches/003_update-dspam.conf.diff Tue Apr 20 17:08:47 2010 (r253)
@@ -36,16 +36,10 @@
Preference "spamSubject=[SPAM]" # { string } -> default:[SPAM]
Preference "statisticalSedation=5" # { 0 - 10 } -> default:0
Preference "enableBNR=on" # { on | off } -> default:off
-@@ -340,222 +339,6 @@
- AllowOverride dailyQuarantineSummary
- AllowOverride notifications
-
--# --- MySQL ---
--
--#
--# Storage driver settings: Specific to a particular storage driver. Uncomment
--# the configuration specific to your installation, if applicable.
--#
+@@ -346,19 +345,19 @@
+ # Storage driver settings: Specific to a particular storage driver. Uncomment
+ # the configuration specific to your installation, if applicable.
+ #
-#MySQLServer /var/lib/mysql/mysql.sock
-#MySQLPort
-#MySQLUser dspam
@@ -53,213 +47,42 @@
-#MySQLDb dspam
-#MySQLCompress true
-#MySQLReconnect true
--
--# If you are using replication for clustering, you can also specify a separate
--# server to perform all writes to.
--#
++MySQLServer /var/run/mysqld/mysqld.sock
++#MySQLPort 3306
++MySQLUser _DBC_DBUSER_
++MySQLPass _DBC_DBPASS_
++MySQLDb _DBC_DBNAME_
++MySQLCompress true
++MySQLReconnect true
+
+ # 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
-#MySQLWritePort
--#MySQLWriteUser dspam
--#MySQLWritePass changeme
--#MySQLWriteDb dspam_write
--#MySQLCompress true
--#MySQLReconnect true
--
--# If your replication isn't close to real-time, your retraining might fail if
--# the signature isn't found. One workaround for this is to use the write
--# database for all signature reads:
--#
--#MySQLReadSignaturesFromWriteDb on
--
--# Use this if you have the 4.1 quote bug (see doc/mysql.txt)
--#MySQLSupressQuote on
--
--# If you're running DSPAM in client/server (daemon) mode, uncomment the
--# setting below to override the default connection cache size (the number
--# of connections the server pools between all clients). The connection cache
--# represents the maximum number of database connections *available* and should
--# be set based on the maximum number of concurrent connections you're likely
--# to have. Each connection may be used by only one thread at a time, so all
--# other threads _will block_ until another connection becomes available.
--#
--#MySQLConnectionCache 10
--
--# If you're using vpopmail or some other type of virtual setup and wish to
--# change the table dspam uses to perform username/uid lookups, you can over-
--# ride it below
--
--#MySQLVirtualTable dspam_virtual_uids
--#MySQLVirtualUIDField uid
--#MySQLVirtualUsernameField username
--
--# UIDInSignature: MySQL supports the insertion of the user id into the DSPAM
--# signature. This allows you to create one single spam or fp alias
--# (pointing to some arbitrary user), and the uid in the signature will
--# switch to the correct user. Result: you need only one spam alias
--
--#MySQLUIDInSignature on
--
--# --- PostgreSQL ---
--
--# For PgSQLServer you can Use a TCP/IP address or a socket. If your socket is
--# in /var/run/postgresql/.s.PGSQL.5432 specify just the path where the socket
--# resits (without .s.PGSQL.5432).
--
++#MySQLWriteServer /var/run/mysqld/mysqld.sock
++#MySQLWritePort 3306
+ #MySQLWriteUser dspam
+ #MySQLWritePass changeme
+ #MySQLWriteDb dspam_write
+@@ -405,11 +404,11 @@
+ # in /var/run/postgresql/.s.PGSQL.5432 specify just the path where the socket
+ # resits (without .s.PGSQL.5432).
+
-#PgSQLServer /var/run/postgresql/
-#PgSQLPort
-#PgSQLUser dspam
-#PgSQLPass changeme
-#PgSQLDb dspam
--
--# If you're running DSPAM in client/server (daemon) mode, uncomment the
--# setting below to override the default connection cache size (the number
--# of connections the server pools between all clients).
--#
--#PgSQLConnectionCache 3
--
--# UIDInSignature: PgSQL supports the insertion of the user id into the DSPAM
--# signature. This allows you to create one single spam or fp alias
--# (pointing to some arbitrary user), and the uid in the signature will
--# switch to the correct user. Result: you need only one spam alias
--
--#PgSQLUIDInSignature on
--
--# If you're using vpopmail or some other type of virtual setup and wish to
--# change the table dspam uses to perform username/uid lookups, you can over-
--# ride it below
--
--#PgSQLVirtualTable dspam_virtual_uids
--#PgSQLVirtualUIDField uid
--#PgSQLVirtualUsernameField username
--
--# --- 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 --
--
--# ExtLookup: Prefrom various external lookup functions depending on user-
--# defined variables. ExtLookup can either be set to 'on' or 'off'. The
--# behavior of such lookups are defined by the use of ExtLookupMode, which
--# can be set to 'verify', 'map' and 'strict'.
--#
--# verify Will cause dspam to validate the user, prior to
--# creating the user entry in the system.
--#
--# map Will cause dspam to try to map the user address
--# to a certain unique identifier.
--#
--# strict Will cause dspam to enforce both 'verify' and 'map'.
--#
--# ExtLookupDriver will set the engine behind the lookups. For now the only
--# supported mechanisms are 'ldap' and 'program'. The first will make dspam
--# talk directly to the configured LDAP server. The second will prefrom the
--# various lookup functions by running a certain binary program or executable
--# script. The program MUST be a binary executable or a script with a well
--# defined interperter in its first line ( #!/path/to/interperter ). There
--# are plans to support TLS/SSL connections to backend databases.
--#
--#ExtLookup on # Turns on/off external lookup
--#ExtLookupMode strict # available modes are 'verify', 'map' and 'strict'.
-- # 'strict' enforces both verify and map
--#ExtLookupDriver ldap # Currently only ldap and program are supported.
-- # There are plans to support both MySQL and Postgres.
--#ExtLookupServer ldap.domain.com # Can either be a database hostname or the full path to
-- # an executable lookup program and its arguments.
--#ExtLookupPort 389 # Desired port when connecting to the lookup database.
--#ExtLookupDB "ou=Users,dc=domain,dc=com" # Can either be an LDAP search base or a database name (TODO).
--#ExtLookupQuery "(&(objectClass=qmailUser)(|(mail=%u)(mailAlternateAddress=%u)))" # Can either be an LDAP search filter or an SQL query (TODO)
--#ExtLookupLDAPAttribute "mail" # Attribute to be used when ExtLookupDriver is 'ldap'
-- # and ExtLookupMode 'map' or 'strict'
--#ExtLookupLDAPScope sub # Can be set to 'base', 'sub' or 'one'. Only used when ExtLookupDriver is 'ldap'.
--#ExtLookupLDAPVersion 3 # Sets the LDAP protocol version (1, 2 or 3)
--#ExtLookupLogin "cn=admin,dc=domain,dc=com" # Login to be used when connecting to any direct database backend.
--#ExtLookupPassword itsasecret # Password to use with ExtLookupLogin.
--#ExtLookupCrypto tls # Sets the use of TLS on backend communication (only compatible with LDAPv3)
--
--
- # -- Profiles --
++PgSQLServer 127.0.0.1
++PgSQLPort 5432
++PgSQLUser _DBC_DBUSER_
++PgSQLPass _DBC_DBPASS_
++PgSQLDb _DBC_DBNAME_
- #
-@@ -801,7 +584,7 @@
+ # If you're running DSPAM in client/server (daemon) mode, uncomment the
+ # setting below to override the default connection cache size (the number
+@@ -803,7 +802,7 @@
#ServerHost 127.0.0.1
#ServerPort 24
#ServerQueueSize 32
@@ -268,7 +91,7 @@
#
# ServerMode specifies the type of LMTP server to start. This can be one of:
-@@ -837,14 +620,14 @@
+@@ -839,14 +838,14 @@
# you are running the client and server on the same machine, as it eliminates
# much of the bandwidth overhead.
#
@@ -285,11 +108,12 @@
#ClientIdent "secret at Relay1"
#
#ClientHost 127.0.0.1
-@@ -891,4 +674,7 @@
- #
- StripRcptDomain off
+@@ -900,7 +899,7 @@
+ # --- Split Configuration File Support ---
-+# Include a directory with configuration items.
+ # Include a directory with configuration items.
+-#Include /etc/dspam/dspam.d/
+Include /etc/dspam/dspam.d/
-+
- ## EOF
+
+ # --- ---
+
Modified: branches/development/debian/patches/010_default-daemon-port.diff
==============================================================================
--- branches/development/debian/patches/010_default-daemon-port.diff Sat Apr 17 13:29:08 2010 (r252)
+++ branches/development/debian/patches/010_default-daemon-port.diff Tue Apr 20 17:08:47 2010 (r253)
@@ -25,7 +25,7 @@
#DeliveryIdent localhost
#DeliveryProto LMTP
-@@ -581,8 +581,12 @@
+@@ -799,8 +799,12 @@
# ServerHost: Not enabling ServerHost will bind DSPAM server to all available
# interfaces.
#
@@ -39,7 +39,7 @@
#ServerQueueSize 32
#ServerPID /var/run/dspam/dspam.pid
-@@ -631,7 +635,7 @@
+@@ -849,7 +853,7 @@
#ClientIdent "secret at Relay1"
#
#ClientHost 127.0.0.1
@@ -47,4 +47,4 @@
+#ClientPort 1024
#ClientIdent "secret at Relay1"
- # RABLQueue: Touch files in the RABL queue
+ # --- RABL ---
Modified: branches/development/debian/patches/series
==============================================================================
--- branches/development/debian/patches/series Sat Apr 17 13:29:08 2010 (r252)
+++ branches/development/debian/patches/series Tue Apr 20 17:08:47 2010 (r253)
@@ -4,4 +4,3 @@
004_dspam-default.prefs-in_etc.diff
008_where-to-find-txt-files.diff
010_default-daemon-port.diff
-015_dspam-maintenance.diff
Modified: branches/development/debian/rules
==============================================================================
--- branches/development/debian/rules Sat Apr 17 13:29:08 2010 (r252)
+++ branches/development/debian/rules Tue Apr 20 17:08:47 2010 (r253)
@@ -78,6 +78,13 @@
# dh_install does not support renaming
mv contrib/dspam_maintenance/dspam_maintenance.sh contrib/dspam_maintenance/dspam_maintenance
+ ./debian/split-config.sh
+ #for foo in Hash=hash ExtLookup=extlookup SQLite=sqlite MySQL=mysql PostgreSQL=pgsql; do \
+ # ( shell sed -n -e "/^#[\t ]\{1,99\}\-\{2,3\}[\t ]\{1,99\}${foo%=*}[\t ]\{1,99\}\-\{2,3\}[\t ]*$/,/^#[\t ]\{1,99\}\-\{2,3\}[\t ]\{1,99\}[^-]\{1,99\}\-\{2,3\}[\t ]*$/p" src/dspam.conf.in > debian/config/${foo#*=}.conf ); \
+ # ( shell sed -i -e '$d' debian/config/${foo#*=}.conf ); \
+ #done;
+
+
# Build target.
build: build-stamp
build-stamp: configure
@@ -89,12 +96,6 @@
cat src/tools.pgsql_drv/pgsql_objects.sql > debian/sqlfiles/pgsql
cat src/tools.pgsql_drv/virtual_users.sql >> debian/sqlfiles/pgsql
- #for foo in ExtLookup=extlookup SQLite=sqlite MySQL=mysql PostgreSQL=pgsql Hash=hash;
- #do
- # sed -n -e "/^# \-\- ${foo%=*} \-\-[\t ]*$/,/^# \-\- [^-]\{1,99\}\-\-[\t ]*$/p" src/dspam.conf.in > debian/config/${foo#*=}.conf;
- # sed -i -e '$d' debian/config/${foo#*=}.conf;
- #done;
-
touch build-stamp
clean:
@@ -106,6 +107,9 @@
# Remove DB schemas
rm -f debian/sqlfiles/pgsql debian/sqlfiles/mysql
+ # Remove splitted configuration files
+ rm -rf debian/config/*
+
dh_clean
install: build
Added: branches/development/debian/split-config.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/development/debian/split-config.sh Tue Apr 20 17:08:47 2010 (r253)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for foo in Hash=hash ExtLookup=extlookup SQLite=sqlite MySQL=mysql PostgreSQL=pgsql;
+do
+ sed -n -e "/^#[\t ]\{1,99\}\-\{2,3\}[\t ]\{1,99\}${foo%=*}[\t ]\{1,99\}\-\{2,3\}[\t ]*$/,/^#[\t ]\{1,99\}\-\{2,3\}[\t ]\{1,99\}[^-]\{1,99\}\-\{2,3\}[\t ]*$/p" src/dspam.conf.in > debian/config/${foo#*=}.conf;
+ sed -i -e '$d' debian/config/${foo#*=}.conf;
+done;
More information about the Pkg-dspam-commits
mailing list