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

Bug#680343: marked as done (unblock: trousers/0.3.9-2)



Your message dated Thu, 2 Aug 2012 20:29:25 +0200
with message-id <20120802182925.GR17223@radis.cristau.org>
and subject line Re: Bug#680343: unblock: trousers/0.3.9-2
has caused the Debian Bug report #680343,
regarding unblock: trousers/0.3.9-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
680343: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680343
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package trousers

This version fixes an annoying bug which prevents upgrades or removal
from previous versions, including stable (and thus makes upgrades fail,
without any proper way to upgrade or remove the old version).
See #67682 and #679621

The fix is a workaround: since the init script cannot be used, we kill
and remove the executable in the prerm script so the init script can
exit properly, and continue the upgrade process with the new version.

debdiff attached

Thanks,
Pierre

unblock trousers/0.3.9-2
diff -Nru trousers-0.3.9/debian/changelog trousers-0.3.9/debian/changelog
--- trousers-0.3.9/debian/changelog	2012-06-18 22:22:21.000000000 +0200
+++ trousers-0.3.9/debian/changelog	2012-07-04 21:57:25.000000000 +0200
@@ -1,3 +1,10 @@
+trousers (0.3.9-2) unstable; urgency=low
+
+  * Add workaround for upgrade failure for versions before 0.3.8-3
+    (Closes: #679621)
+
+ -- Pierre Chifflier <pollux@debian.org>  Wed, 04 Jul 2012 21:57:22 +0200
+
 trousers (0.3.9-1) unstable; urgency=low
 
   * Imported Upstream version 0.3.9
diff -Nru trousers-0.3.9/debian/trousers.postinst trousers-0.3.9/debian/trousers.postinst
--- trousers-0.3.9/debian/trousers.postinst	2012-02-26 11:47:51.000000000 +0100
+++ trousers-0.3.9/debian/trousers.postinst	2012-07-04 21:46:07.000000000 +0200
@@ -5,7 +5,7 @@
 case "${1}" in
 	configure)
 		# Adding tss system user
-		adduser --system --home /var/lib/tpm --shell /bin/false --no-create-home --group tss
+		adduser --system --quiet --home /var/lib/tpm --shell /bin/false --no-create-home --group tss
 
 		# Setting owner
 		chown tss:tss /var/lib/tpm -R
diff -Nru trousers-0.3.9/debian/trousers.prerm trousers-0.3.9/debian/trousers.prerm
--- trousers-0.3.9/debian/trousers.prerm	1970-01-01 01:00:00.000000000 +0100
+++ trousers-0.3.9/debian/trousers.prerm	2012-07-04 21:46:07.000000000 +0200
@@ -0,0 +1,42 @@
+#!/bin/sh
+# prerm script for trousers
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    failed-upgrade)
+        if dpkg --compare-versions "$2" lt 0.3.8-3; then
+            # hack to avoid #676828
+            # removing the executable will make the init script exit gracefully
+            rm -f /usr/sbin/tcsd
+            # kill tcsd (and any other process owned by the tss user)
+            killall -u tss  2>/dev/null || true
+        fi
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

--- End Message ---
--- Begin Message ---
On Sun, Jul 22, 2012 at 18:27:15 +0200, Pierre Chifflier wrote:

> On Sat, Jul 21, 2012 at 12:23:03PM +0200, Julien Cristau wrote:
> > On Thu, Jul  5, 2012 at 21:25:38 +0200, Pierre Chifflier wrote:
> > 
> > > +            # kill tcsd (and any other process owned by the tss user)
> > > +            killall -u tss  2>/dev/null || true
> > 
> > Why is this necessary, and what happens if psmisc isn't installed?
> > 
> 
> Hi Julien,
> 
> This is used to kill the daemon if the process is running, and avoid
> that two processes try to access /dev/tpm0 on the next start.
> If the command fails, or if psmisc is not installed, the script should
> continue to allow the upgrade. The next start of the init script will
> run a second daemon, which will stop (EBUSY). A second restart should
> work, since the init script will be fixed after.
> 
OK, fair enough.  Unblocked.

Cheers,
Julien

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: