Debian Bug report logs - #659765
iptables-persistent: use Pre-Depends rather than 'dpkg-maintscript-helper supports' guards

version graph

Package: iptables-persistent; Maintainer for iptables-persistent is Jonathan Wiltshire <>; Source for iptables-persistent is src:iptables-persistent.

Reported by: Colin Watson <>

Date: Mon, 13 Feb 2012 16:27:05 UTC

Severity: wishlist

Tags: patch

Found in version iptables-persistent/0.5.3

Fixed in version iptables-persistent/0.5.5

Done: Jonathan Wiltshire <>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox

Report forwarded to, Jonathan Wiltshire <>:
Bug#659765; Package iptables-persistent. (Mon, 13 Feb 2012 16:27:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Colin Watson <>:
New Bug report received and forwarded. Copy sent to Jonathan Wiltshire <>. (Mon, 13 Feb 2012 16:27:09 GMT) Full text and rfc822 format available.

Message #5 received at (full text, mbox):

From: Colin Watson <>
Subject: iptables-persistent: use Pre-Depends rather than 'dpkg-maintscript-helper supports' guards
Date: Mon, 13 Feb 2012 16:25:22 +0000
Package: iptables-persistent
Version: 0.5.3
Severity: wishlist
Tags: patch
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 fonts-f500.
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 (I've sent patches for many other
packages today to that effect).  However, I couldn't make this work in
the context of this package's postinst, because the code inserted by
dh_installinit must come after your hand-written postinst code while the
code generated by dh_installdeb would have to come before it.  This
patch is still a simplification, though.

  * Pre-Depend on a sufficient version of dpkg rather than using
    'dpkg-maintscript-helper supports' guards.

diff -Nru iptables-persistent-0.5.3/debian/control iptables-persistent-0.5.3ubuntu1/debian/control
--- iptables-persistent-0.5.3/debian/control	2011-11-29 00:14:42.000000000 +0000
+++ iptables-persistent-0.5.3ubuntu1/debian/control	2012-02-13 16:13:34.000000000 +0000
@@ -9,6 +9,7 @@
 Package: iptables-persistent
 Architecture: all
+Pre-Depends: dpkg (>=
 Depends: iptables, lsb-base, ${misc:Depends}
 Description: boot-time loader for iptables rules
  This package provides a system startup script that restores iptables
diff -Nru iptables-persistent-0.5.3/debian/iptables-persistent.postinst iptables-persistent-0.5.3ubuntu1/debian/iptables-persistent.postinst
--- iptables-persistent-0.5.3/debian/iptables-persistent.postinst	2011-11-29 00:14:42.000000000 +0000
+++ iptables-persistent-0.5.3ubuntu1/debian/iptables-persistent.postinst	2012-02-13 16:12:47.000000000 +0000
@@ -5,10 +5,8 @@
 # Source debconf library
 . /usr/share/debconf/confmodule
-if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then
-    dpkg-maintscript-helper mv_conffile \
-        /etc/iptables/rules /etc/iptables/rules.v4 0.0.20101230 -- "$@"
+dpkg-maintscript-helper mv_conffile \
+    /etc/iptables/rules /etc/iptables/rules.v4 0.0.20101230 -- "$@"
 case "$1" in
diff -Nru iptables-persistent-0.5.3/debian/iptables-persistent.postrm iptables-persistent-0.5.3ubuntu1/debian/iptables-persistent.postrm
--- iptables-persistent-0.5.3/debian/iptables-persistent.postrm	2011-11-29 00:14:42.000000000 +0000
+++ iptables-persistent-0.5.3ubuntu1/debian/iptables-persistent.postrm	2012-02-13 16:12:52.000000000 +0000
@@ -2,10 +2,8 @@
 set -e
-if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then
-    dpkg-maintscript-helper mv_conffile \
-         /etc/iptables/rules /etc/iptables/rules.v4 0.0.20101230 -- "$@"
+dpkg-maintscript-helper mv_conffile \
+     /etc/iptables/rules /etc/iptables/rules.v4 0.0.20101230 -- "$@"
 case "$1" in
diff -Nru iptables-persistent-0.5.3/debian/iptables-persistent.preinst iptables-persistent-0.5.3ubuntu1/debian/iptables-persistent.preinst
--- iptables-persistent-0.5.3/debian/iptables-persistent.preinst	2011-11-29 00:14:42.000000000 +0000
+++ iptables-persistent-0.5.3ubuntu1/debian/iptables-persistent.preinst	2012-02-13 16:12:42.000000000 +0000
@@ -2,9 +2,7 @@
 set -e
-if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then
-    dpkg-maintscript-helper mv_conffile \
-         /etc/iptables/rules /etc/iptables/rules.v4 0.0.20101230 -- "$@"
+dpkg-maintscript-helper mv_conffile \
+     /etc/iptables/rules /etc/iptables/rules.v4 0.0.20101230 -- "$@"


Colin Watson                                       []

Added tag(s) pending. Request was from Jonathan Wiltshire <> to (Wed, 14 Mar 2012 21:17:12 GMT) Full text and rfc822 format available.

Reply sent to Jonathan Wiltshire <>:
You have taken responsibility. (Sat, 30 Jun 2012 19:36:18 GMT) Full text and rfc822 format available.

Notification sent to Colin Watson <>:
Bug acknowledged by developer. (Sat, 30 Jun 2012 19:36:18 GMT) Full text and rfc822 format available.

Message #12 received at (full text, mbox):

From: Jonathan Wiltshire <>
Subject: Bug#659765: fixed in iptables-persistent 0.5.5
Date: Sat, 30 Jun 2012 19:32:42 +0000
Source: iptables-persistent
Source-Version: 0.5.5

We believe that the bug you reported is fixed in the latest version of
iptables-persistent, which is due to be installed in the Debian FTP archive:

  to main/i/iptables-persistent/iptables-persistent_0.5.5.dsc
  to main/i/iptables-persistent/iptables-persistent_0.5.5.tar.gz
  to main/i/iptables-persistent/iptables-persistent_0.5.5_all.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Jonathan Wiltshire <> (supplier of updated iptables-persistent package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing

Hash: SHA1

Format: 1.8
Date: Sat, 30 Jun 2012 19:52:36 +0100
Source: iptables-persistent
Binary: iptables-persistent
Architecture: source all
Version: 0.5.5
Distribution: unstable
Urgency: low
Maintainer: Jonathan Wiltshire <>
Changed-By: Jonathan Wiltshire <>
 iptables-persistent - boot-time loader for iptables rules
Closes: 651838 656348 659765
 iptables-persistent (0.5.5) unstable; urgency=low
   * Regressions were found in the previous release, this version fixes them
   [ Andreas Rütten ]
   * [e2736e] Fix postinst fails with legacy boot ordering due to wrong call
     to update-rc.d (Closes: #651838)
   * [7ee7cc] Add Andreas Rütten to Uploaders
   [ Jonathan Wiltshire ]
   * [e823c4] iptables-persistent.postinst: check return value of modprobe
     before loading rules
   * [575176] Add dependency on kmod for calls to modprobe in postinst.
     Thanks to Hideki Yamane (Closes: #656348)
   * [24d67d] Pre-Depending on a sufficient version of dpkg is no longer
     necessary (Closes: #659765)
   * [65a9d7] Guard against moving rules files around in preinst/abort-upgrade
 b4fb3489a510e44d5fe13041f9a1abc62b9fae63 1675 iptables-persistent_0.5.5.dsc
 63f912a9be63cf32ec16d8cc892b0cbccd8ccc5f 12830 iptables-persistent_0.5.5.tar.gz
 fb5128fd89af084e6ac9dde91555e98ec577296c 10098 iptables-persistent_0.5.5_all.deb
 449f09956f4f4304a4f3b2a4a4c39bfb612dea261eb5a540a0610f3d5bd79400 1675 iptables-persistent_0.5.5.dsc
 99bc16d09fe7c32dc20c498aab26cd08cf753cb89dbfcd668da1a6981ab3f524 12830 iptables-persistent_0.5.5.tar.gz
 920a66a85adea78e74c96d8b70b6f50cea738da8ea2eb0a1f050f721a6b69578 10098 iptables-persistent_0.5.5_all.deb
 163c6dea0f9ce4659b067e0b1085dbfb 1675 admin optional iptables-persistent_0.5.5.dsc
 081f30e45bfd34da3d9c311c399a8863 12830 admin optional iptables-persistent_0.5.5.tar.gz
 1271805d016245a8b99295ffc18d0bae 10098 admin optional iptables-persistent_0.5.5_all.deb

Version: GnuPG v1.4.12 (GNU/Linux)


Bug archived. Request was from Debbugs Internal Request <> to (Fri, 31 Aug 2012 07:29:12 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.

Debian bug tracking system administrator <>. Last modified: Sat Apr 19 02:35:07 2014; Machine Name:

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.