Followup-For: Bug #717495
Control: tag -1 patch

Hi,

I'm attaching a patch with a proposed fix for the
lenny->squeeze->upgrade patch, this patch needs to be applied in
wheezy-pu to be effective.

The idea is to rename the initscript from bootchart to stop-bootchart,
so that the buggy script is no longer available while configuring
sysv-rc, even if bootchart has not yet been configured and the new
initscript is not yet in place.

Note that the version to be uploaded to wheezy needs to have a version
>= 0.10~svn407-4 because of the Breaks in initscripts. The version
uploaded to sid needs to be even larger.

The NMU version pair (sid, wheezy) I suggest is
  (0.10~svn407-4.1, 0.10~svn407-4.1~deb7u1)
A maintainer upload of
  (0.10~svn407-4, 0.10~svn407-4~deb7u1)
*WONT WORK* (without changing sysvinit), probably bump to
  (0.10~svn407-5, 0.10~svn407-5~deb7u1)


Andreas
diff -u bootchart-0.10~svn407/debian/control bootchart-0.10~svn407/debian/control
--- bootchart-0.10~svn407/debian/control
+++ bootchart-0.10~svn407/debian/control
@@ -12,6 +12,7 @@
 
 Package: bootchart
 Architecture: all
+Pre-Depends: dpkg (>= 1.15.7.2)
 Depends: psmisc, lsb-base (>= 3.0-6)
 Recommends: bootchart-view, acct
 Description: Boot process performance analyser
diff -u bootchart-0.10~svn407/debian/rules bootchart-0.10~svn407/debian/rules
--- bootchart-0.10~svn407/debian/rules
+++ bootchart-0.10~svn407/debian/rules
@@ -50,6 +50,7 @@
 	dh_installexamples
 	dh_installman
 	dh_installinit --no-restart-on-upgrade --no-start \
+	  --init-script=stop-bootchart \
 	  --update-rcd-params="start 99 1 2 3 4 5 ."
 	dh_link
 	dh_compress 
diff -u bootchart-0.10~svn407/debian/changelog bootchart-0.10~svn407/debian/changelog
--- bootchart-0.10~svn407/debian/changelog
+++ bootchart-0.10~svn407/debian/changelog
@@ -1,3 +1,23 @@
+bootchart (0.10~svn407-4.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix the upgrade path lenny (bootchart 0.10~svn407-3) => squeeze (bootchart
+    0.10~svn407-3 from lenny because bootchart was not included in squeeze) =>
+    wheezy. The initscript from 0.10~svn407-3 prevents migration to dependency
+    based boot sequencing causing a sysv-rc upgrade failure. Since it is not
+    possible to express a dependency/conflict like "either bootchart is purged
+    or fully configured", it is possible for an updated bootchart being
+    unpacked but unconfigured, leaving the broken initscript still in place at
+    the time sysv-rc tries to switch to dependency-based sequencing.
+    Therefore rename the initscript from "bootchart" to "stop-bootchart" which
+    will move the buggy script out of the way early enough to make sysv-rc
+    succeed. Use Pre-Depends: dpkg (>= 1.15.7.2) and dpkg-maintscript-helper
+    for the renaming.  (Closes: #717495)
+  * Bump Debian revision to -4.1 to restore installability after recent
+    initscripts having Breaks: bootchart (<< 0.10~svn407-4).
+
+ -- Andreas Beckmann <a...@debian.org>  Sat, 20 Jul 2013 16:44:05 +0200
+
 bootchart (0.10~svn407-3.3) unstable; urgency=low
 
   * Non-maintainer upload.
diff -u bootchart-0.10~svn407/debian/bootchart.init bootchart-0.10~svn407/debian/bootchart.init
--- bootchart-0.10~svn407/debian/bootchart.init
+++ bootchart-0.10~svn407/debian/bootchart.init
@@ -17,7 +17,7 @@
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 NAME=bootchartd
 DAEMON=/sbin/$NAME
-SCRIPTNAME=/etc/init.d/bootchart
+SCRIPTNAME=/etc/init.d/stop-bootchart
 
 # Exit if the package is not installed
 [ -x "$DAEMON" ] || exit 0
diff -u bootchart-0.10~svn407/debian/bootchart.postrm bootchart-0.10~svn407/debian/bootchart.postrm
--- bootchart-0.10~svn407/debian/bootchart.postrm
+++ bootchart-0.10~svn407/debian/bootchart.postrm
@@ -5,6 +5,8 @@
 
 set -e
 
+dpkg-maintscript-helper mv_conffile /etc/init.d/bootchart /etc/init.d/stop-bootchart 0.10~svn407-4~ bootchart -- "$@"
+
 case "$1" in
     purge)
 	rm -f /var/log/bootchart.tgz
only in patch2:
unchanged:
--- bootchart-0.10~svn407.orig/debian/bootchart.preinst
+++ bootchart-0.10~svn407/debian/bootchart.preinst
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+
+dpkg-maintscript-helper mv_conffile /etc/init.d/bootchart /etc/init.d/stop-bootchart 0.10~svn407-4~ bootchart -- "$@"
+
+#DEBHELPER#
only in patch2:
unchanged:
--- bootchart-0.10~svn407.orig/debian/bootchart.postinst
+++ bootchart-0.10~svn407/debian/bootchart.postinst
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+
+dpkg-maintscript-helper mv_conffile /etc/init.d/bootchart /etc/init.d/stop-bootchart 0.10~svn407-4~ bootchart -- "$@"
+
+#DEBHELPER#

Reply via email to