[pkg-dspam-commits] r120 - trunk/debian

Kurt B. Kaiser kbk-guest at alioth.debian.org
Sat Dec 23 22:45:17 CET 2006


Author: kbk-guest
Date: Sat Dec 23 22:45:17 2006
New Revision: 120

Added:
   trunk/debian/libdspam7.postinst
Modified:
   trunk/debian/changelog
   trunk/debian/control
   trunk/debian/dspam.postinst
   trunk/debian/libdspam7-drv-pgsql.override
   trunk/debian/libdspam7.dirs
Log:
   [Kurt B. Kaiser]
   * dspam-webfrontend needs Depends: on dspam to assure user 'dspam'
     exists before configuration. (Closes: #349591)
   * Move user 'dspam' creation to libdspam7.postinst to avoid having
     the libdspam7-drv-* similarly error out due to missing user.

M    debian/control
M    debian/libdspam7.dirs
M    debian/dspam.postinst
M    debian/libdspam7-drv-pgsql.override
M    debian/changelog
A    debian/libdspam7.postinst


Modified: trunk/debian/changelog
==============================================================================
--- trunk/debian/changelog	(original)
+++ trunk/debian/changelog	Sat Dec 23 22:45:17 2006
@@ -1,3 +1,13 @@
+dspam (3.6.8-5) unstable; urgency=medium
+
+  [Kurt B. Kaiser]
+  * dspam-webfrontend needed a dependency on dspam to assure user 'dspam'
+    exists before configuration. (Closes: #349591)
+  * Move user 'dspam' creation to libdspam7.postinst to avoid having
+    libdspam7-drv-{mysql,pgsql} similarly error out due to missing user.
+
+ -- Debian DSPAM Maintainers <pkg-dspam-misc at lists.alioth.debian.org>  Sat, 23 Dec 2006 16:28:28 -0500
+
 dspam (3.6.8-4) unstable; urgency=low
 
   [ Matthijs Mohlmann ]

Modified: trunk/debian/control
==============================================================================
--- trunk/debian/control	(original)
+++ trunk/debian/control	Sat Dec 23 22:45:17 2006
@@ -8,7 +8,7 @@
 
 Package: dspam
 Architecture: any
-Depends: procmail | sensible-mda, adduser, ${shlibs:Depends}
+Depends: procmail | sensible-mda, ${shlibs:Depends}
 Recommends: dspam-doc, clamav-daemon
 Description: is a scalable, fast and statistical anti-spam filter
  DSPAM is a dedicated statistical filter with minimal resources. It includes
@@ -22,7 +22,7 @@
 
 Package: dspam-webfrontend
 Architecture: all
-Depends: libgd-gd2-noxpm-perl | libgd-gd2-perl, libgd-graph3d-perl
+Depends: dspam, libgd-gd2-noxpm-perl | libgd-gd2-perl, libgd-graph3d-perl
 Suggests: libapache-mod-perl | libapache-mod-perl2, libapache-mod-auth-curdir | libapache-mod-auth-kerb | libapache-mod-auth-mysql | libapache-mod-auth-pam | libapache-mod-auth-pgsql | libapache-mod-auth-plain | libapache-mod-auth-radius | libapache-mod-auth-shadow | libapache-mod-auth-useragent | libapache2-mod-auth-kerb | libapache2-mod-auth-mysql | libapache2-mod-auth-pam | libapache2-mod-auth-pgsql | libapache2-mod-auth-plain | libapache2-mod-auth-sys-group
 Description: DSPAM is a scalable and statistical anti-spam filter
  DSPAM is a dedicated statistical filter with minimal resources. It includes
@@ -39,7 +39,7 @@
 Package: libdspam7
 Section: libs
 Architecture: any
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, adduser
 Suggests: libdspam7-drv
 Description: DSPAM is a scalable and statistical anti-spam filter
  DSPAM is a dedicated statistical filter with minimal resources. It includes

Modified: trunk/debian/dspam.postinst
==============================================================================
--- trunk/debian/dspam.postinst	(original)
+++ trunk/debian/dspam.postinst	Sat Dec 23 22:45:17 2006
@@ -4,20 +4,6 @@
 
 test $DEBIAN_SCRIPT_DEBUG && set -v -x
 
-create_user() {
-    # idea stolen from postfix.postinst: make sure our user exists,
-    # simplest portable way to check is to chown something.
-    touch /var/spool/dspam/temp
-    if ! chown dspam /var/spool/dspam/temp 2>/dev/null; then
-        addgroup --quiet --system dspam
-        adduser --quiet --system --ingroup dspam --home /var/spool/dspam \
-            --no-create-home --disabled-password \
-            --gecos 'DSPAM' dspam
-    fi
-    rm -f /var/spool/dspam/temp 2>/dev/null
-    return 0
-}
-
 set_dspam_perms() {
 
     #touch /var/log/dspam.debug /var/log/sql.errors /var/log/dspam.messages
@@ -64,7 +50,6 @@
 
 case "$1" in
     configure)
-        create_user
         set_dspam_perms
     ;;
 

Modified: trunk/debian/libdspam7-drv-pgsql.override
==============================================================================
--- trunk/debian/libdspam7-drv-pgsql.override	(original)
+++ trunk/debian/libdspam7-drv-pgsql.override	Sat Dec 23 22:45:17 2006
@@ -1,2 +1,2 @@
 libdspam7-drv-pgsql: no-debconf-templates
-libdspam7-drv-pgsql: package-has-a-duplicate-relation depends: libdspam7, libdspam7 (= 3.6.8-3)
+libdspam7-drv-pgsql: package-has-a-duplicate-relation depends: libdspam7, libdspam7 (= 3.6.8-5)

Modified: trunk/debian/libdspam7.dirs
==============================================================================
--- trunk/debian/libdspam7.dirs	(original)
+++ trunk/debian/libdspam7.dirs	Sat Dec 23 22:45:17 2006
@@ -1 +1,2 @@
 usr/lib
+var/spool/dspam

Added: trunk/debian/libdspam7.postinst
==============================================================================
--- (empty file)
+++ trunk/debian/libdspam7.postinst	Sat Dec 23 22:45:17 2006
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+set -e
+
+test $DEBIAN_SCRIPT_DEBUG && set -v -x
+
+create_user() {
+    # idea stolen from postfix.postinst: make sure our user exists,
+    # simplest portable way to check is to chown something.
+    touch /var/spool/dspam/temp
+    if ! chown dspam /var/spool/dspam/temp 2>/dev/null; then
+        addgroup --quiet --system dspam
+        adduser --quiet --system --ingroup dspam --home /var/spool/dspam \
+            --no-create-home --disabled-password \
+            --gecos 'DSPAM' dspam
+    fi
+    rm -f /var/spool/dspam/temp 2>/dev/null
+    return 0
+}
+
+case "$1" in
+    configure)
+        create_user
+    ;;
+
+    reconfigure)
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0



More information about the Pkg-dspam-commits mailing list