[pkg-dspam-commits] r113 - in trunk/debian: . manpages patches
Matthijs Mohlmann
matthijs at costa.debian.org
Sun Oct 8 14:04:54 UTC 2006
Author: matthijs
Date: Sun Oct 8 14:04:53 2006
New Revision: 113
Modified:
trunk/debian/changelog
trunk/debian/dspam.default
trunk/debian/dspam.dirs
trunk/debian/dspam.init
trunk/debian/dspam.postinst
trunk/debian/dspam.postrm
trunk/debian/libdspam7-drv-mysql.config
trunk/debian/libdspam7-drv-mysql.cron.daily
trunk/debian/libdspam7-drv-pgsql.config
trunk/debian/manpages/dspam_logrotate.1
trunk/debian/patches/default-server-pidfile.dpatch
trunk/debian/patches/update-dspam.conf.dpatch
Log:
* Acknowlegde NMU.
* Put the dspam pidfile into it's own directory and make it writeable, so dspam
can run as user.
* Update formatting dspam_logrotate manpage.
* Don't remove the dspam user on purge. This is security risk.
Modified: trunk/debian/changelog
==============================================================================
--- trunk/debian/changelog (original)
+++ trunk/debian/changelog Sun Oct 8 14:04:53 2006
@@ -1,20 +1,32 @@
dspam (3.6.8-3) unstable; urgency=low
[ Matthijs Mohlmann ]
- * Fix a policy violation in postrm, we can't assume that dbconfig-common is
- installed at that point.
+ * Acknowlegde NMU. Thanks Steinar H. Gunderson.
+ (Closes: #389538, #388225, #388226)
* Update package descriptions. Neural networking was experimental is now
removed from the upstream sources.
+ * It's a security risk to remove a user on purge of the package. So don't
+ remove it.
+ * Update update-dspam.conf ServerPID parameter, pidfile is now in
+ /var/run/dspam.
[ Jesus Climent ]
- * Removed the call to debconf, since it is added by dh_installdebconf
- automatically and takes care of checking if the package is installed on
- purge time (Closes: #388225, #388226).
* Check for the existance of ucf before executing it on purge time.
* Use the defined MySQL host option in the config file to connect to an
non-local MySQL database server (Closes: #388140).
- -- Debian DSPAM Maintainers <pkg-dspam-misc at lists.alioth.debian.org> Sun, 24 Sep 2006 23:04:21 +0300
+ -- Debian DSPAM Maintainers <pkg-dspam-misc at lists.alioth.debian.org> Sat, 7 Oct 2006 19:54:32 +0200
+
+dspam (3.6.8-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Make config and postrm scripts run with only essential packages
+ installed.
+ * Check for availability of dbconfig-common scripts and ucf in
+ libdspam7-drv-mysql.config and .postrm. (Closes: #388225)
+ * Same for libdspam7-drv-pgsql. (Closes: #388226)
+
+ -- Steinar H. Gunderson <sesse at debian.org> Tue, 26 Sep 2006 12:18:33 +0200
dspam (3.6.8-2) unstable; urgency=low
Modified: trunk/debian/dspam.default
==============================================================================
--- trunk/debian/dspam.default (original)
+++ trunk/debian/dspam.default Sun Oct 8 14:04:53 2006
@@ -3,6 +3,9 @@
# Do not start dspam.
START=no
+# User that runs dspam.
+USER=dspam
+
# Options for dspam.
#OPTIONS="--debug"
Modified: trunk/debian/dspam.dirs
==============================================================================
--- trunk/debian/dspam.dirs (original)
+++ trunk/debian/dspam.dirs Sun Oct 8 14:04:53 2006
@@ -2,4 +2,5 @@
var/spool/dspam/data
etc/dspam/dspam.d
var/log/dspam
+var/run/dspam
usr/lib/dspam
Modified: trunk/debian/dspam.init
==============================================================================
--- trunk/debian/dspam.init (original)
+++ trunk/debian/dspam.init Sun Oct 8 14:04:53 2006
@@ -18,7 +18,7 @@
DESC="DSPAM Statistical anti-spam filter"
NAME=dspam
DAEMON=/usr/bin/$NAME
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/run/dspam/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Gracefully exit if the package has been removed.
@@ -37,7 +37,7 @@
# 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 --exec $DAEMON --test > /dev/null || return 1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER --exec $DAEMON --test > /dev/null || return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $OPTIONS || return 2
}
Modified: trunk/debian/dspam.postinst
==============================================================================
--- trunk/debian/dspam.postinst (original)
+++ trunk/debian/dspam.postinst Sun Oct 8 14:04:53 2006
@@ -48,12 +48,17 @@
then
dpkg-statoverride --update --add dspam dspam 0770 /var/spool/dspam/data
fi
-
+
if ! dpkg-statoverride --list /etc/dspam/default.prefs >/dev/null
then
dpkg-statoverride --update --add dspam dspam 0644 /etc/dspam/default.prefs
fi
-
+
+ if ! dpkg-statoverride --list /var/log/dspam >/dev/null
+ then
+ dpkg-statoverride --update --add dspam dspam 0755 /var/log/dspam
+ fi
+
return 0
}
Modified: trunk/debian/dspam.postrm
==============================================================================
--- trunk/debian/dspam.postrm (original)
+++ trunk/debian/dspam.postrm Sun Oct 8 14:04:53 2006
@@ -2,10 +2,6 @@
set -e
-remove_user() {
- deluser --system dspam
-}
-
remove_dspam_perms() {
for i in \
/etc/dspam/dspam.conf \
@@ -13,6 +9,7 @@
/var/spool/dspam \
/var/spool/dspam/data \
/etc/dspam/default.prefs \
+ /var/log/dspam \
; do
dpkg-statoverride --quiet --remove $i || true
done
@@ -20,7 +17,6 @@
case "$1" in
purge)
- remove_user
remove_dspam_perms
;;
Modified: trunk/debian/libdspam7-drv-mysql.config
==============================================================================
--- trunk/debian/libdspam7-drv-mysql.config (original)
+++ trunk/debian/libdspam7-drv-mysql.config Sun Oct 8 14:04:53 2006
@@ -10,11 +10,14 @@
# The questions that are asked are pretty important.
export DEBIAN_PRIORITY=low
-# Load dbconfig
-. /usr/share/dbconfig-common/dpkg/config.mysql
+if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then
-# Run dbconfig
-dbc_go libdspam7-drv-mysql $@
+ # Load dbconfig
+ . /usr/share/dbconfig-common/dpkg/config.mysql
+
+ # Run dbconfig
+ dbc_go libdspam7-drv-mysql $@
+fi
exit 0
Modified: trunk/debian/libdspam7-drv-mysql.cron.daily
==============================================================================
--- trunk/debian/libdspam7-drv-mysql.cron.daily (original)
+++ trunk/debian/libdspam7-drv-mysql.cron.daily Sun Oct 8 14:04:53 2006
@@ -12,7 +12,9 @@
MYSQL_PASS="`grep "^MySQLPass" $MYSQLCONF | awk '{print $2}'`"
MYSQL_DB="`grep "^MySQLDb" $MYSQLCONF | awk '{print $2}'`"
MYSQL_HOST="`grep "^MySQLServer" $MYSQLCONF | awk '{print $2}'`"
- if [ -z "$MYSQL_HOST" ] ; then
+
+ # If host is empty or starting with a / assume it's localhost.
+ if [ -z "$MYSQL_HOST" ] || [ "${MYSQL_HOST:0:1}" = "/" ]; then
/usr/bin/mysql --user=$MYSQL_USER --password=$MYSQL_PASS $MYSQL_DB < $PURGE
else
/usr/bin/mysql --host=$MYSQL_HOST --user=$MYSQL_USER --password=$MYSQL_PASS $MYSQL_DB < $PURGE
Modified: trunk/debian/libdspam7-drv-pgsql.config
==============================================================================
--- trunk/debian/libdspam7-drv-pgsql.config (original)
+++ trunk/debian/libdspam7-drv-pgsql.config Sun Oct 8 14:04:53 2006
@@ -13,11 +13,14 @@
# Request user otherwise installation will fail.
dbc_dbuser="dspam"
-# Load dbconfig
-. /usr/share/dbconfig-common/dpkg/config.pgsql
+if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
-# Run dbconfig
-dbc_go libdspam7-drv-pgsql $@
+ # Load dbconfig
+ . /usr/share/dbconfig-common/dpkg/config.pgsql
+
+ # Run dbconfig
+ dbc_go libdspam7-drv-pgsql $@
+fi
exit 0
Modified: trunk/debian/manpages/dspam_logrotate.1
==============================================================================
--- trunk/debian/manpages/dspam_logrotate.1 (original)
+++ trunk/debian/manpages/dspam_logrotate.1 Sun Oct 8 14:04:53 2006
@@ -23,8 +23,14 @@
.SH "DESCRIPTION"
.B dspam_logrotate
.SH "OPTIONS"
-\-v : verbose mode
-\-a [age] : rotate files older than age
+.BI \-v\c
+Print verbose output.
+.BI \-a [days]\c
+All log entries older than 'days' will be removed.
+.BI \-l [logfiles]\c
+A list of one or more files to process.
+.BI \-d [dir]\c
+The home directory of dspam.
.SH "SEE ALSO"
.BR dspam (1)
.SH "AUTHOR"
Modified: trunk/debian/patches/default-server-pidfile.dpatch
==============================================================================
--- trunk/debian/patches/default-server-pidfile.dpatch (original)
+++ trunk/debian/patches/default-server-pidfile.dpatch Sun Oct 8 14:04:53 2006
@@ -2,7 +2,7 @@
## default-server-pidfile.dpatch by Matthijs Mohlmann <matthijs at cacholong.nl>
##
## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
+## DP: Default pid file in /var/run/dspam.
@DPATCH@
diff -urNad dspam-3.6.2~/src/dspam.c dspam-3.6.2/src/dspam.c
@@ -13,7 +13,7 @@
int daemon_start(AGENT_CTX *ATX) {
DRIVER_CTX DTX;
- char *pidfile;
-+ char *pidfile = "/var/run/dspam.pid";
++ char *pidfile = "/var/run/dspam/dspam.pid";
__daemon_run = 1;
__num_threads = 0;
Modified: trunk/debian/patches/update-dspam.conf.dpatch
==============================================================================
--- trunk/debian/patches/update-dspam.conf.dpatch (original)
+++ trunk/debian/patches/update-dspam.conf.dpatch Sun Oct 8 14:04:53 2006
@@ -6,9 +6,9 @@
@DPATCH@
-diff -urNad dspam-3.6.6~/src/dspam.conf.in dspam-3.6.6/src/dspam.conf.in
---- dspam-3.6.6~/src/dspam.conf.in 2006-05-19 22:14:13.202423376 +0200
-+++ dspam-3.6.6/src/dspam.conf.in 2006-05-19 22:20:03.904108616 +0200
+diff -urNad dspam-3.6.8~/src/dspam.conf.in dspam-3.6.8/src/dspam.conf.in
+--- dspam-3.6.8~/src/dspam.conf.in 2006-10-07 19:53:52.737369150 +0200
++++ dspam-3.6.8/src/dspam.conf.in 2006-10-07 19:54:11.653493462 +0200
@@ -127,6 +127,7 @@
# able to specify delivery agent privileges or use tools.
#
@@ -128,6 +128,15 @@
#
# TrackSources: specify which (if any) source addresses to track and report
+@@ -644,7 +559,7 @@
+ #
+ #ServerPort 24
+ #ServerQueueSize 32
+-#ServerPID /var/run/dspam.pid
++#ServerPID /var/run/dspam/dspam.pid
+
+ #
+ # ServerMode specifies the type of LMTP server to start. This can be one of:
@@ -721,4 +636,7 @@
#
ProcessorBias on
More information about the Pkg-dspam-commits
mailing list