Package: freeipmi-bmc-watchdog
Version: 0.8.12-3
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch precise
Using 'dpkg-maintscript-helper supports rm_conffile' guards introduces
unreliability into upgrades; it means that the conffile is removed or
not depending on whether dpkg happens to be unpacked before
freeipmi-bmc-watchdog. This seems generally undesirable; it would be
better to enforce a single code path. (This is academic for Debian
because the version of dpkg in squeeze supported
dpkg-maintscript-helper, hence Severity: wishlist; Ubuntu's last LTS
release didn't have a sufficient version of dpkg for that which is why I
care.)
It would be nice to just use dh_installdeb's support for generating
dpkg-maintscript-helper commands, which was introduced in debhelper
8.1.0. This would remove duplicate code from your maintainer scripts -
in fact, you'd no longer need to have handwritten maintainer scripts at
all. Here's a patch:
* Use maintscript support in dh_installdeb rather than writing out
dpkg-maintscript-helper commands by hand. We now simply Pre-Depend on a
new enough version of dpkg rather than using 'dpkg-maintscript-helper
supports' guards, leading to more predictable behaviour on upgrades.
diff -Nru freeipmi-0.8.12/debian/control freeipmi-0.8.12/debian/control
--- freeipmi-0.8.12/debian/control 2011-07-19 03:28:12.0 +0100
+++ freeipmi-0.8.12/debian/control 2012-02-13 15:33:56.0 +
@@ -2,7 +2,7 @@
Section: admin
Priority: extra
Maintainer: Yaroslav Halchenko deb...@onerussian.com
-Build-Depends: debhelper (= 7.0.50~),
+Build-Depends: debhelper (= 8.1.0~),
autotools-dev,
libgcrypt11-dev,
chrpath,
@@ -59,6 +59,7 @@
Package: freeipmi-bmc-watchdog
Section: admin
Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends}, ${misc:Depends}, freeipmi-tools
Description: GNU implementation of the IPMI protocol - BMC watchdog
FreeIPMI is a collection of Intelligent Platform Management IPMI
diff -Nru freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.maintscript
freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.maintscript
--- freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.maintscript1970-01-01
01:00:00.0 +0100
+++ freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.maintscript2012-02-13
15:32:47.0 +
@@ -0,0 +1,3 @@
+mv_conffile /etc/default/freeipmi-bmc-watchdog /etc/default/bmc-watchdog
0.7.17~beta2-1
+mv_conffile /etc/init.d/freeipmi-bmc-watchdog /etc/init.d/bmc-watchdog
0.7.17~beta2-1
+mv_conffile /etc/logrotate.d/freeipmi-bmc-watchdog
/etc/logrotate.d/bmc-watchdog 0.7.17~beta2-1
diff -Nru freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.postinst
freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.postinst
--- freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.postinst 2011-07-19
03:28:12.0 +0100
+++ freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.postinst 1970-01-01
01:00:00.0 +0100
@@ -1,16 +0,0 @@
-#!/bin/sh
-# postinst script for freeipmi-bmc-watchdog
-#
-# see: dh_installdeb(1)
-
-set -e
-
-if dpkg-maintscript-helper supports mv_conffile 2/dev/null; then
-dpkg-maintscript-helper mv_conffile /etc/default/freeipmi-bmc-watchdog
/etc/default/bmc-watchdog 0.7.17~beta2-1 -- $@
-dpkg-maintscript-helper mv_conffile /etc/init.d/freeipmi-bmc-watchdog
/etc/init.d/bmc-watchdog 0.7.17~beta2-1 -- $@
-dpkg-maintscript-helper mv_conffile /etc/logrotate.d/freeipmi-bmc-watchdog
/etc/logrotate.d/bmc-watchdog 0.7.17~beta2-1 -- $@
-fi
-
-#DEBHELPER#
-
-exit 0
diff -Nru freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.postrm
freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.postrm
--- freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.postrm 2011-07-19
03:28:12.0 +0100
+++ freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.postrm 1970-01-01
01:00:00.0 +0100
@@ -1,16 +0,0 @@
-#!/bin/sh
-# postrm script for freeipmi-bmc-watchdog
-#
-# see: dh_installdeb(1)
-
-set -e
-
-if dpkg-maintscript-helper supports mv_conffile 2/dev/null; then
-dpkg-maintscript-helper mv_conffile /etc/default/freeipmi-bmc-watchdog
/etc/default/bmc-watchdog 0.7.17~beta2-1 -- $@
-dpkg-maintscript-helper mv_conffile /etc/init.d/freeipmi-bmc-watchdog
/etc/init.d/bmc-watchdog 0.7.17~beta2-1 -- $@
-dpkg-maintscript-helper mv_conffile /etc/logrotate.d/freeipmi-bmc-watchdog
/etc/logrotate.d/bmc-watchdog 0.7.17~beta2-1 -- $@
-fi
-
-#DEBHELPER#
-
-exit 0
diff -Nru freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.preinst
freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.preinst
--- freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.preinst2011-07-19
03:28:12.0 +0100
+++ freeipmi-0.8.12/debian/freeipmi-bmc-watchdog.preinst1970-01-01
01:00:00.0 +0100
@@ -1,17 +0,0 @@
-#!/bin/sh
-# preinst script for freeipmi-bmc-watchdog
-#
-# see: dh_installdeb(1)
-
-set -e
-
-if dpkg-maintscript-helper supports mv_conffile 2/dev/null; then
-