[Pkg-dspam-commits] [SCM] Debian packages for the DSPAM anti-spam filter branch, master, updated. debian/3.9.1_rc1+git20110419.29261fb+dfsg-2-3-g6904569

Julien Valroff julien at kirya.net
Sat May 14 18:45:03 UTC 2011


The following commit has been merged in the master branch:
commit a65333a8b1ad2fbb71f83b583d7771d595b846e3
Author: Julien Valroff <julien at kirya.net>
Date:   Sat May 14 08:58:34 2011 +0200

    Ensure old conffiles are correctly removed on upgrade

diff --git a/debian/changelog b/debian/changelog
index 495022a..efb0b2e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
 dspam (3.9.1~rc1+git20110419.29261fb+dfsg-3) unstable; urgency=low
 
   * Fix typo in libdspam7-drv-pgsql short description (Closes: #626608) 
+  * Ensure old conffiles are correctly removed on upgrade (Closes: #626286)
 
- -- Julien Valroff <julien at debian.org>  Fri, 13 May 2011 19:57:57 +0200
+ -- Julien Valroff <julien at debian.org>  Sat, 14 May 2011 08:57:43 +0200
 
 dspam (3.9.1~rc1+git20110419.29261fb+dfsg-2) unstable; urgency=low
 
diff --git a/debian/dspam-webfrontend.postinst b/debian/dspam-webfrontend.postinst
index b5f8001..f2334cb 100644
--- a/debian/dspam-webfrontend.postinst
+++ b/debian/dspam-webfrontend.postinst
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 set -e
 
 case "$1" in
@@ -26,7 +25,7 @@ case "$1" in
         fi
     ;;
 
-    reconfigure|abort-upgrade|abort-remove|abort-deconfigure)
+    abort-upgrade|abort-remove|abort-deconfigure)
     ;;
 
     *)
@@ -35,6 +34,12 @@ case "$1" in
     ;;
 esac
 
+# Remove old conffiles
+if dpkg-maintscript-helper supports rm_conffile >/dev/null 2>&1; then
+    dpkg-maintscript-helper rm_conffile /etc/dspam/dspam-apache.conf 3.9.1~rc1+git20110419.29261fb+dfsg-2 -- "$@"
+    dpkg-maintscript-helper rm_conffile /etc/dspam/dspam-apache2.conf 3.9.1~rc1+git20110419.29261fb+dfsg-2 -- "$@"
+fi
+
 #DEBHELPER#
 
 exit 0
diff --git a/debian/dspam-webfrontend.postrm b/debian/dspam-webfrontend.postrm
index 8acea51..c300c9c 100644
--- a/debian/dspam-webfrontend.postrm
+++ b/debian/dspam-webfrontend.postrm
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 set -e
 
 case "$1" in
@@ -39,6 +38,11 @@ case "$1" in
 
 esac
 
+# Remove old conffiles
+if dpkg-maintscript-helper supports rm_conffile >/dev/null 2>&1; then
+    dpkg-maintscript-helper rm_conffile /etc/dspam/dspam-apache.conf 3.9.1~rc1+git20110419.29261fb+dfsg-2 -- "$@"
+    dpkg-maintscript-helper rm_conffile /etc/dspam/dspam-apache2.conf 3.9.1~rc1+git20110419.29261fb+dfsg-2 -- "$@"
+fi
 
 #DEBHELPER#
 
diff --git a/debian/dspam-webfrontend.preinst b/debian/dspam-webfrontend.preinst
index b480067..efa6255 100644
--- a/debian/dspam-webfrontend.preinst
+++ b/debian/dspam-webfrontend.preinst
@@ -1,17 +1,30 @@
 #!/bin/sh
-
 set -e
 
 case "$1" in
-    upgrade)
-	if dpkg --compare-versions "$2" lt "3.6.8-9"; then
-        # remove bad symlinks created in previous package versions
-        # by removing the dspam directory:
-	    rm -rf /usr/share/dspam
-	fi
+    install|upgrade)
+	    if dpkg --compare-versions "$2" lt "3.6.8-9"; then
+            # remove bad symlinks created in previous package versions
+            # by removing the dspam directory:
+	        rm -rf /usr/share/dspam
+	    fi
 	;;
+
+    abort-upgrade)
+    ;;  
+
+    *)  
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;  
 esac
 
+# Remove old conffiles
+if dpkg-maintscript-helper supports rm_conffile >/dev/null 2>&1; then
+    dpkg-maintscript-helper rm_conffile /etc/dspam/dspam-apache.conf 3.9.1~rc1+git20110419.29261fb+dfsg-2 -- "$@"
+    dpkg-maintscript-helper rm_conffile /etc/dspam/dspam-apache2.conf 3.9.1~rc1+git20110419.29261fb+dfsg-2 -- "$@"
+fi
+
 #DEBHELPER#
 
 exit 0
diff --git a/debian/dspam.postinst b/debian/dspam.postinst
index 7affb77..6b44945 100644
--- a/debian/dspam.postinst
+++ b/debian/dspam.postinst
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 set -e
 
 set_dspam_perms() {
@@ -61,9 +60,6 @@ case "$1" in
         set_dspam_perms
     ;;
 
-    reconfigure)
-    ;;
-
     abort-upgrade|abort-remove|abort-deconfigure)
     ;;
 
diff --git a/debian/dspam.postrm b/debian/dspam.postrm
index d21bdcf..ee1aff2 100644
--- a/debian/dspam.postrm
+++ b/debian/dspam.postrm
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 set -e
 
 case "$1" in
@@ -35,7 +34,7 @@ case "$1" in
     *)
         echo "postrm called with unknown argument \`$1'" >&2
         exit 1
-
+    ;;
 esac
 
 #DEBHELPER#
diff --git a/debian/libdspam7-drv-mysql.postinst b/debian/libdspam7-drv-mysql.postinst
index 1359fd0..9f0502c 100644
--- a/debian/libdspam7-drv-mysql.postinst
+++ b/debian/libdspam7-drv-mysql.postinst
@@ -1,7 +1,4 @@
 #!/bin/sh
-#
-# Post installation for the mysql backend.
-
 set -e
 
 # Load debconf
@@ -18,21 +15,27 @@ dbc_generate_include_args="-U -o template_infile='/etc/dspam/dspam.d/mysql.conf'
 dbc_go libdspam7-drv-mysql $@
 
 case "$1" in
-  configure)
-
-    if ! dpkg-statoverride --list /etc/dspam/dspam.d/mysql.conf >/dev/null
-    then
-      dpkg-statoverride --update --add dspam dspam 0640 /etc/dspam/dspam.d/mysql.conf
-    fi
-
-  ;;
-  abort-upgrade|abort-remove|abort-deconfigure)
-  ;;
-  *)
-    echo "postinst called with unknown argument \`$1'" >&2
-  ;;
+    configure)
+        if ! dpkg-statoverride --list /etc/dspam/dspam.d/mysql.conf >/dev/null
+        then
+            dpkg-statoverride --update --add dspam dspam 0640 /etc/dspam/dspam.d/mysql.conf
+        fi
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+    ;;
 esac
 
+# Remove old conffile
+if dpkg-maintscript-helper supports rm_conffile >/dev/null 2>&1; then
+    dpkg-maintscript-helper rm_conffile /etc/cron.daily/libdspam7-drv-mysql 3.9.1~rc1+git20110419.29261fb+dfsg-2 -- "$@"
+fi
+
 #DEBHELPER#
 
 exit 0
diff --git a/debian/libdspam7-drv-mysql.postrm b/debian/libdspam7-drv-mysql.postrm
index 175e643..723af00 100644
--- a/debian/libdspam7-drv-mysql.postrm
+++ b/debian/libdspam7-drv-mysql.postrm
@@ -1,7 +1,4 @@
 #!/bin/sh
-#
-# Post removal
-
 set -e
 
 # Load debconf
@@ -9,36 +6,40 @@ set -e
 
 # Load dbconfig
 if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then
-	. /usr/share/dbconfig-common/dpkg/postrm.mysql
-	dbc_go libdspam7-drv-mysql $@
+    . /usr/share/dbconfig-common/dpkg/postrm.mysql
+    dbc_go libdspam7-drv-mysql $@
 fi
 
 case "$1" in
-  remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-  ;;
-
-  purge)
+    purge)
+        dpkg-statoverride --quiet --remove /etc/dspam/dspam.d/mysql.conf || true
 
-    dpkg-statoverride --quiet --remove /etc/dspam/dspam.d/mysql.conf || true
+        # Remove files registered with ucf.
+        for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist .ucf-old .ucf-dist; do
+            rm -f /etc/dspam/dspam.d/mysql.conf$ext
+        done
 
-    # Remove files registered with ucf.
-    for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist .ucf-old .ucf-dist; do
-      rm -f /etc/dspam/dspam.d/mysql.conf$ext
-    done
-    rm -f /etc/dspam/dspam.d/mysql.conf
-    if [ -x /usr/bin/ucf ]; then
-      ucf --purge /etc/dspam/dspam.d/mysql.conf
-    fi
+        rm -f /etc/dspam/dspam.d/mysql.conf
 
+        if [ -x /usr/bin/ucf ]; then
+            ucf --purge /etc/dspam/dspam.d/mysql.conf
+        fi
+    ;;
 
-  ;;
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
 
-  *)
-    echo "postrm called with unknown argument \`$1'" >&2
-    exit 1
-  ;;
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
 esac
 
+# Remove olf conffile
+if dpkg-maintscript-helper supports rm_conffile >/dev/null 2>&1; then
+    dpkg-maintscript-helper rm_conffile /etc/cron.daily/libdspam7-drv-mysql 3.9.1~rc1+git20110419.29261fb+dfsg-2 -- "$@"
+fi
+
 #DEBHELPER#
 
 exit 0
diff --git a/debian/libdspam7-drv-mysql.preinst b/debian/libdspam7-drv-mysql.preinst
new file mode 100644
index 0000000..1fc37f9
--- /dev/null
+++ b/debian/libdspam7-drv-mysql.preinst
@@ -0,0 +1,24 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    install|upgrade)
+    ;;
+
+    abort-upgrade)
+    ;;  
+
+    *)  
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;  
+esac
+
+# Remove old conffile
+if dpkg-maintscript-helper supports rm_conffile >/dev/null 2>&1; then
+    dpkg-maintscript-helper rm_conffile /etc/cron.daily/libdspam7-drv-mysql 3.9.1~rc1+git20110419.29261fb+dfsg-2 -- "$@"
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/libdspam7-drv-mysql.prerm b/debian/libdspam7-drv-mysql.prerm
index 55b1e17..9bec737 100644
--- a/debian/libdspam7-drv-mysql.prerm
+++ b/debian/libdspam7-drv-mysql.prerm
@@ -1,7 +1,4 @@
 #!/bin/sh
-#
-# Pre removal
-
 set -e
 
 # Load debconf
diff --git a/debian/libdspam7-drv-pgsql.postinst b/debian/libdspam7-drv-pgsql.postinst
index dc671ac..de326c8 100644
--- a/debian/libdspam7-drv-pgsql.postinst
+++ b/debian/libdspam7-drv-pgsql.postinst
@@ -1,7 +1,4 @@
 #!/bin/sh
-#
-# Post installation for the PostgreSQL backend.
-
 set -e
 
 # Load debconf
@@ -18,19 +15,19 @@ dbc_generate_include_args="-U -o template_infile='/etc/dspam/dspam.d/pgsql.conf'
 dbc_go libdspam7-drv-pgsql $@
 
 case "$1" in
-  configure)
-
-    if ! dpkg-statoverride --list /etc/dspam/dspam.d/pgsql.conf >/dev/null
-    then
-      dpkg-statoverride --update --add dspam dspam 0640 /etc/dspam/dspam.d/pgsql.conf
-    fi
-
-  ;;
-  abort-upgrade|abort-remove|abort-deconfigure)
-  ;;
-  *)
-    echo "postinst called with unknown argument \`$1'" >&2
-  ;;
+    configure)
+        if ! dpkg-statoverride --list /etc/dspam/dspam.d/pgsql.conf >/dev/null
+        then
+            dpkg-statoverride --update --add dspam dspam 0640 /etc/dspam/dspam.d/pgsql.conf
+        fi
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+    ;;
 esac
 
 #DEBHELPER#
diff --git a/debian/libdspam7-drv-pgsql.postrm b/debian/libdspam7-drv-pgsql.postrm
index 545faa7..e07e326 100644
--- a/debian/libdspam7-drv-pgsql.postrm
+++ b/debian/libdspam7-drv-pgsql.postrm
@@ -1,7 +1,4 @@
 #!/bin/sh
-#
-# Post removal
-
 set -e
 
 # Load debconf
@@ -9,33 +6,33 @@ set -e
 
 # Load dbconfig
 if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then
-	. /usr/share/dbconfig-common/dpkg/postrm.pgsql
-	dbc_go libdspam7-drv-pgsql $@
+    . /usr/share/dbconfig-common/dpkg/postrm.pgsql
+    dbc_go libdspam7-drv-pgsql $@
 fi
 
 case "$1" in
-  remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-  ;;
-
-  purge)
-
-    dpkg-statoverride --quiet --remove /etc/dspam/dspam.d/pgsql.conf || true
-
-    # Remove files registered with ucf.
-    for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist .ucf-old .ucf-dist; do
-      rm -f /etc/dspam/dspam.d/pgsql.conf$ext
-    done
-    rm -f /etc/dspam/dspam.d/pgsql.conf
-    if [ -x /usr/bin/ucf ]; then
-      ucf --purge /etc/dspam/dspam.d/pgsql.conf
-    fi
-
-  ;;
-
-  *)
-    echo "postrm called with unknown argument \`$1'" >&2
-    exit 1
-  ;;
+    purge)
+        dpkg-statoverride --quiet --remove /etc/dspam/dspam.d/pgsql.conf || true
+
+        # Remove files registered with ucf.
+        for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist .ucf-old .ucf-dist; do
+            rm -f /etc/dspam/dspam.d/pgsql.conf$ext
+        done
+
+        rm -f /etc/dspam/dspam.d/pgsql.conf
+        
+        if [ -x /usr/bin/ucf ]; then
+            ucf --purge /etc/dspam/dspam.d/pgsql.conf
+        fi
+    ;;
+
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
 esac
 
 #DEBHELPER#
diff --git a/debian/libdspam7-drv-pgsql.prerm b/debian/libdspam7-drv-pgsql.prerm
index 315609a..0d61f6b 100644
--- a/debian/libdspam7-drv-pgsql.prerm
+++ b/debian/libdspam7-drv-pgsql.prerm
@@ -1,7 +1,4 @@
 #!/bin/sh
-#
-# Pre removal
-
 set -e
 
 # Load debconf
diff --git a/debian/libdspam7-drv-sqlite3.postinst b/debian/libdspam7-drv-sqlite3.postinst
index 4265f29..18df27c 100644
--- a/debian/libdspam7-drv-sqlite3.postinst
+++ b/debian/libdspam7-drv-sqlite3.postinst
@@ -1,25 +1,27 @@
 #!/bin/sh
-#
-# Post installation for the sqlite backend.
-
 set -e
 
 case "$1" in
-  configure)
+    configure)
+        if ! dpkg-statoverride --list /etc/dspam/dspam.d/sqlite.conf >/dev/null
+        then
+            dpkg-statoverride --update --add dspam dspam 0640 /etc/dspam/dspam.d/sqlite.conf
+        fi
+    ;;
 
-    if ! dpkg-statoverride --list /etc/dspam/dspam.d/sqlite.conf >/dev/null
-    then
-      dpkg-statoverride --update --add dspam dspam 0640 /etc/dspam/dspam.d/sqlite.conf
-    fi
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
 
-  ;;
-  abort-upgrade|abort-remove|abort-deconfigure)
-  ;;
-  *)
-    echo "postinst called with unknown argument \`$1'" >&2
-  ;;
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+    ;;
 esac
 
+# Remove old conffile
+if dpkg-maintscript-helper supports rm_conffile >/dev/null 2>&1; then
+    dpkg-maintscript-helper rm_conffile /etc/cron.daily/libdspam7-drv-sqlite3 3.9.1~rc1+git20110419.29261fb+dfsg-2 -- "$@"
+fi
+
 #DEBHELPER#
 
 exit 0
diff --git a/debian/libdspam7-drv-sqlite3.postrm b/debian/libdspam7-drv-sqlite3.postrm
index 503429b..3ca06b7 100644
--- a/debian/libdspam7-drv-sqlite3.postrm
+++ b/debian/libdspam7-drv-sqlite3.postrm
@@ -1,25 +1,21 @@
 #!/bin/sh
-#
-# Post removal
-
 set -e
 
 case "$1" in
-  remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-  ;;
-
-  purge)
-
-    dpkg-statoverride --quiet --remove /etc/dspam/dspam.d/sqlite.conf || true
+    purge|remove|upgrade|abort-install|abort-upgrade|failed-upgrade|disappear)
+    ;;
 
-  ;;
-
-  *)
-    echo "postrm called with unknown argument \`$1'" >&2
-    exit 1
-  ;;
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
 esac
 
+# Remove old conffile
+if dpkg-maintscript-helper supports rm_conffile >/dev/null 2>&1; then
+    dpkg-maintscript-helper rm_conffile /etc/cron.daily/libdspam7-drv-sqlite3 3.9.1~rc1+git20110419.29261fb+dfsg-2 -- "$@"
+fi
+
 #DEBHELPER#
 
 exit 0
diff --git a/debian/libdspam7-drv-sqlite3.preinst b/debian/libdspam7-drv-sqlite3.preinst
new file mode 100644
index 0000000..3207ecd
--- /dev/null
+++ b/debian/libdspam7-drv-sqlite3.preinst
@@ -0,0 +1,24 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    install|upgrade)
+    ;;
+
+    abort-upgrade)
+    ;;  
+
+    *)  
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;  
+esac
+
+# Remove old conffile
+if dpkg-maintscript-helper supports rm_conffile >/dev/null 2>&1; then
+    dpkg-maintscript-helper rm_conffile /etc/cron.daily/libdspam7-drv-sqlite3 3.9.1~rc1+git20110419.29261fb+dfsg-2 -- "$@"
+fi
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/libdspam7.postinst b/debian/libdspam7.postinst
index 5dd5516..07573ae 100644
--- a/debian/libdspam7.postinst
+++ b/debian/libdspam7.postinst
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 set -e
 
 case "$1" in
@@ -12,9 +11,6 @@ case "$1" in
         fi
     ;;
 
-    reconfigure)
-    ;;
-
     abort-upgrade|abort-remove|abort-deconfigure)
     ;;
 
diff --git a/debian/libdspam7.postrm b/debian/libdspam7.postrm
index 672f5af..b06462a 100644
--- a/debian/libdspam7.postrm
+++ b/debian/libdspam7.postrm
@@ -1,12 +1,11 @@
 #!/bin/sh
-
 set -e
 
-#DEBHELPER#
-
 if [ "$1" = "purge" ] ; then
     # locks dspam system account on purge
     usermod -L dspam > /dev/null || true
 fi
 
+#DEBHELPER#
+
 exit 0

-- 
Debian packages for the DSPAM anti-spam filter



More information about the Pkg-dspam-commits mailing list