[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#696301: preapproval unblock: dspam/3.10.1+dfsg-6



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package dspam as it fixes bug #695275 of severity
serious:

src:dspam: harmful actions in multiple postrm scripts of M-A:same
packages

The proposed patch is to detect through dpkg-query if this is the last
instance of libdspam7 to be purged and only lock dspam user account if
it is the case. The detection is made by counting the number of packages
not purged (not installed are not considered) excluding the currently
being uninstalled package. See debdiff attached.

My proposition for more testing is to first upload the fix in unstable
and then after 10 days do the upload in tpu (version in unstable is not
the same as in testing). Is this procedure fine for you?

unblock dspam/3.10.1+dfsg-6

-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'stable-updates'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff --git a/debian/changelog b/debian/changelog
index b157048..b8912a4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+dspam (3.10.1+dfsg-6) unstable; urgency=medium
+
+  * Only lock dspam user account when the last libdspam7 package is purged
+    (Closes: #695275).
+
+ -- Thomas Preud'homme <robotux@celest.fr>  Wed, 19 Dec 2012 02:17:46 +0100
+
 dspam (3.10.1+dfsg-5) testing-proposed-updates; urgency=low
 
   [ Thomas Preud'homme ]
diff --git a/debian/libdspam7.postrm b/debian/libdspam7.postrm
index 3841a02..97b6f9d 100644
--- a/debian/libdspam7.postrm
+++ b/debian/libdspam7.postrm
@@ -2,8 +2,11 @@
 set -e
 
 if [ "$1" = "purge" ] ; then
-    # locks dspam system account on purge
-    usermod -L -e 1 dspam > /dev/null || true
+    # locks dspam system account on purge of last package
+    if ! dpkg-query '-f=${db:Status-Abbrev}\n' -W libdspam7 | grep -vE '(.n|pc)' >/dev/null
+    then
+        usermod -L -e 1 dspam > /dev/null || true
+    fi
 fi
 
 #DEBHELPER#

Reply to: