[Pkg-dspam-commits] [pkg-dspam-commits] r153 - in trunk/debian: . patches

Matthijs Mohlmann matthijs at alioth.debian.org
Sun Mar 9 17:56:55 UTC 2008


Author: matthijs
Date: Sun Mar  9 17:56:55 2008
New Revision: 153

Log:
 * Fix several bugs, in installation process.


Added:
   trunk/debian/patches/cssclean-csscompress.dpatch   (contents, props changed)
Modified:
   trunk/debian/changelog
   trunk/debian/dspam-apache2.conf
   trunk/debian/dspam-webfrontend.postinst
   trunk/debian/dspam-webfrontend.postrm
   trunk/debian/dspam.init
   trunk/debian/libdspam7-drv-mysql.cron.daily
   trunk/debian/libdspam7-drv-sqlite3.cron.daily
   trunk/debian/patches/00list

Modified: trunk/debian/changelog
==============================================================================
--- trunk/debian/changelog	(original)
+++ trunk/debian/changelog	Sun Mar  9 17:56:55 2008
@@ -1,3 +1,22 @@
+dspam (3.6.8-8) unstable; urgency=high
+
+  [ Matthijs Mohlmann ]
+  * Urgency high, fixes a serious bug.
+  * Fix post install dspam-webfrontend (Closes: #469668)
+  * When $MYSQL_HOST is empty or starting with a / assume socket communication
+    otherwise tcp communication (Closes: #466992)
+  * Fix apache2 config to get authentication working with the example
+    (Closes: #425542)
+  * Fix typo sqlite -> sqlite3 (Closes: #400917)
+  * Run dspam as user and fix ownership of directory /var/run/dspam
+    (Closes: #385760)
+  * Remove symlink added by postinst of dspam-webfrontend. (Lenny
+    recommendation) (Closes: #455052)
+  * Add patch to fix cssclean and csscompress to work when /tmp is on another
+    partition. (Closes: #438605)
+
+ -- Debian DSPAM Maintainers <pkg-dspam-misc at lists.alioth.debian.org>  Sun, 09 Mar 2008 13:55:15 +0100
+
 dspam (3.6.8-7) unstable; urgency=low
 
   [Kurt B. Kaiser]

Modified: trunk/debian/dspam-apache2.conf
==============================================================================
--- trunk/debian/dspam-apache2.conf	(original)
+++ trunk/debian/dspam-apache2.conf	Sun Mar  9 17:56:55 2008
@@ -17,6 +17,7 @@
 #       group to make this work. You whould
 #       better change for another authentication bakend
 AuthPAM_Enabled on
+AuthBasicAuthoritative Off
 
 	AuthType Basic
 	AllowOverride None

Modified: trunk/debian/dspam-webfrontend.postinst
==============================================================================
--- trunk/debian/dspam-webfrontend.postinst	(original)
+++ trunk/debian/dspam-webfrontend.postinst	Sun Mar  9 17:56:55 2008
@@ -23,7 +23,7 @@
 
         # Give users the chance to change the templates used for the webfrontend
         # and give us the chance to update the templates properly.
-        ln -sf /usr/share/dspam upstream-templates /usr/share/dspam/templates
+        ln -sf /usr/share/dspam/upstream-templates /usr/share/dspam/templates
     ;;
 
     reconfigure|abort-upgrade|abort-remove|abort-deconfigure)

Modified: trunk/debian/dspam-webfrontend.postrm
==============================================================================
--- trunk/debian/dspam-webfrontend.postrm	(original)
+++ trunk/debian/dspam-webfrontend.postrm	Sun Mar  9 17:56:55 2008
@@ -18,6 +18,13 @@
 case "$1" in
     remove)
         remove_dspam_perms
+
+        # Remove symlink added in postinst.
+        rm -f /usr/share/dspam/templates
+
+        # Remove other symlinks which are added by accident in the postinst
+        # script.
+        rm -f /usr/share/dspam/upstream-templates/dspam /usr/share/dspam/upstream-templates/upstream-templates
         
 	if [ -f /usr/sbin/apache2ctl ]; then
 		rm -f /etc/apache2/conf.d/dspam-apache2.conf

Modified: trunk/debian/dspam.init
==============================================================================
--- trunk/debian/dspam.init	(original)
+++ trunk/debian/dspam.init	Sun Mar  9 17:56:55 2008
@@ -29,8 +29,9 @@
 	. /etc/default/$NAME
 fi
 
-# Create directory for PIDFILE, if it does not exist.
+# Create directory for PIDFILE, if it does not exist and change ownership.
 test -d $(dirname $PIDFILE) || mkdir -p -m 755 $(dirname $PIDFILE)
+chown dspam $(dirname $PIDFILE)
 
 OPTIONS="--daemon $OPTIONS"
 

Modified: trunk/debian/libdspam7-drv-mysql.cron.daily
==============================================================================
--- trunk/debian/libdspam7-drv-mysql.cron.daily	(original)
+++ trunk/debian/libdspam7-drv-mysql.cron.daily	Sun Mar  9 17:56:55 2008
@@ -26,12 +26,7 @@
         /usr/bin/mysql --defaults-file=$MYSQLCONF_PASSWD \
 	               --user=$MYSQL_USER $MYSQL_DB < $PURGE
     else
-        if echo "$MYSQL_HOST" | grep "^/" > /dev/null 2>&1 ; then
-            # Assume it is a socket:
-            /usr/bin/mysql --defaults-file=$MYSQLCONF_PASSWD --socket=$MYSQL_HOST --user=$MYSQL_USER < $PURGE
-        else
-            /usr/bin/mysql --defaults-file=$MYSQLCONF_PASSWD --host=$MYSQL_HOST --user=$MYSQL_USER < $PURGE
-        fi
+        /usr/bin/mysql --defaults-file=$MYSQLCONF_PASSWD --host=$MYSQL_HOST --user=$MYSQL_USER < $PURGE
     fi
 
     rm "$MYSQLCONF_PASSWD"

Modified: trunk/debian/libdspam7-drv-sqlite3.cron.daily
==============================================================================
--- trunk/debian/libdspam7-drv-sqlite3.cron.daily	(original)
+++ trunk/debian/libdspam7-drv-sqlite3.cron.daily	Sun Mar  9 17:56:55 2008
@@ -6,7 +6,7 @@
 DSPAMHOME=`cat $DSPAMCONF | grep ^Home | awk '{print $2}'`
 
 if [ -d "$DSPAMHOME/data" ]; then
-  find $DSPAMHOME/data -name "*.sdb" -exec sqlite {} < /usr/share/dspam/clean/purge-3.sql \;
+  find $DSPAMHOME/data -name "*.sdb" -exec sqlite3 {} < /usr/share/dspam/clean/purge-3.sql \;
 fi
 
 exit 0

Modified: trunk/debian/patches/00list
==============================================================================
--- trunk/debian/patches/00list	(original)
+++ trunk/debian/patches/00list	Sun Mar  9 17:56:55 2008
@@ -22,3 +22,4 @@
 fix-manpage-libdspam.dpatch
 cleanup-manpages.dpatch
 use_ldap_deprecated.dpatch
+cssclean-csscompress.dpatch

Added: trunk/debian/patches/cssclean-csscompress.dpatch
==============================================================================
--- (empty file)
+++ trunk/debian/patches/cssclean-csscompress.dpatch	Sun Mar  9 17:56:55 2008
@@ -0,0 +1,47 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## cssclean-csscompress.dpatch by Matthijs Mohlmann <matthijs at cacholong.nl>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix error when *.css files are on another partition then /tmp.
+
+ at DPATCH@
+diff -urNad dspam-3.6.8~/src/tools.hash_drv/cssclean.c dspam-3.6.8/src/tools.hash_drv/cssclean.c
+--- dspam-3.6.8~/src/tools.hash_drv/cssclean.c	2006-05-13 14:17:31.000000000 +0200
++++ dspam-3.6.8/src/tools.hash_drv/cssclean.c	2008-03-09 15:49:11.648833698 +0100
+@@ -123,7 +123,7 @@
+   if (READ_ATTRIB("HashMaxSeek"))
+      max_seek = strtol(READ_ATTRIB("HashMaxSeek"), NULL, 0);
+ 
+-  snprintf(newfile, sizeof(newfile), "/tmp/%u.css", (unsigned int) getpid());
++  snprintf(newfile, sizeof(newfile), "%s/%u.css", dirname(filename), (unsigned int) getpid());
+ 
+   if (_hash_drv_open(filename, &old, 0, max_seek,
+                      max_extents, extent_size, flags))
+@@ -159,6 +159,7 @@
+     filepos += sizeof(struct _hash_drv_header);
+   }
+ 
++  bcopy(old.header, new.header, sizeof(struct _hash_drv_header));
+   _hash_drv_close(&new);
+   _hash_drv_close(&old);
+   rename(newfile, filename);
+diff -urNad dspam-3.6.8~/src/tools.hash_drv/csscompress.c dspam-3.6.8/src/tools.hash_drv/csscompress.c
+--- dspam-3.6.8~/src/tools.hash_drv/csscompress.c	2006-05-13 14:17:31.000000000 +0200
++++ dspam-3.6.8/src/tools.hash_drv/csscompress.c	2008-03-09 15:50:31.302327080 +0100
+@@ -125,7 +125,7 @@
+   if (READ_ATTRIB("HashMaxSeek"))
+      max_seek = strtol(READ_ATTRIB("HashMaxSeek"), NULL, 0);
+ 
+-  snprintf(newfile, sizeof(newfile), "/tmp/%u.css", (unsigned int) getpid());
++  snprintf(newfile, sizeof(newfile), "%s/%u.css", dirname(filename), (unsigned int) getpid());
+ 
+   if (_hash_drv_open(filename, &old, 0, max_seek,
+                      max_extents, extent_size, flags))
+@@ -176,6 +176,7 @@
+     filepos += sizeof(struct _hash_drv_header);
+   }
+ 
++  bcopy(old.header, new.header, sizeof(struct _hash_drv_header));
+   _hash_drv_close(&new);
+   _hash_drv_close(&old);
+   if (rename(newfile, filename)) 



More information about the Pkg-dspam-commits mailing list