Package: ulogd2
Version: 2.0.4-1
Severity: serious
Tags: patch
User: [email protected]
Usertags: piuparts

Hi,

the removal of /etc/init.d/ulogd does not work as intended since
dpkg-maintscript-helper rm_conffile does not work upon initial
installation (upon upgrading from ulogd to ulogd2 the ulogd2 package
will be installed for the first time) unless tricked into believing
this is an upgrade instead of an initial install.
=> patch 0001

While we are at it, perform some more removal of obsolete conffiles in
the transitional ulogd package
=> patch 0002

While the second patch duplicates the actions of the first, the first
one is important for cases where the ulogd package was already removed
(but not purged) but it's "problematic" initscript is still sitting
around. The second just ensures an even smoother experience if the
transitional ulogd package is installed.

Severity serious since
* your maintscript comment said "as it can cause problems/confusion"
* I already had to dig into several failing upgrade paths involving
  obsolete initscripts and changes in the things they provide ... with
  nontrivial recovery paths.
  (I didn't manage to run into failures with ulogd/ulogd2, yet, maybe I
  didn't try hard enough. :-)


Andreas
>From 8688648c4cedc7f2cc4478279b071de42e518522 Mon Sep 17 00:00:00 2001
From: Andreas Beckmann <[email protected]>
Date: Thu, 5 Mar 2015 18:32:43 +0100
Subject: [PATCH 1/2] fix removal of old ulogd initscript upon initial
 installation of ulogd2

---
 debian/changelog          | 6 ++++++
 debian/ulogd2.maintscript | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 716e6f5..c5cd521 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ulogd2 (2.0.4-2) UNRELEASED; urgency=medium
+
+  * Fix removal of old ulogd initscript upon initial installation of ulogd2.
+
+ -- Andreas Beckmann <[email protected]>  Wed, 04 Mar 2015 21:54:40 +0100
+
 ulogd2 (2.0.4-1) unstable; urgency=medium
 
   * New upstream release:
diff --git a/debian/ulogd2.maintscript b/debian/ulogd2.maintscript
index 02c899b..efcdeba 100644
--- a/debian/ulogd2.maintscript
+++ b/debian/ulogd2.maintscript
@@ -1,4 +1,6 @@
 
 # Remove the old ulogd 1.x init script, as it can cause problems/confusion
-rm_conffile /etc/init.d/ulogd 2.0.2-4~ ulogd
+# Provide a fall-back old-version ("0") as a hack to ensure this is performed
+# by dpkg-maintscript-helper on the initial install of ulogd2, too.
+rm_conffile /etc/init.d/ulogd 2.0.4-2~ ulogd -- "$@" 0
 
-- 
2.1.4

>From c5ce5e12d260d6539e75785d6ab9e34fb1baa89b Mon Sep 17 00:00:00 2001
From: Andreas Beckmann <[email protected]>
Date: Thu, 5 Mar 2015 19:01:45 +0100
Subject: [PATCH 2/2] remove obsolete /etc/logrotate.d/ulogd, too

---
 debian/changelog         | 1 +
 debian/ulogd.maintscript | 2 ++
 2 files changed, 3 insertions(+)
 create mode 100644 debian/ulogd.maintscript

diff --git a/debian/changelog b/debian/changelog
index c5cd521..c8defe1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 ulogd2 (2.0.4-2) UNRELEASED; urgency=medium
 
   * Fix removal of old ulogd initscript upon initial installation of ulogd2.
+  * Remove more obsolete conffiles.
 
  -- Andreas Beckmann <[email protected]>  Wed, 04 Mar 2015 21:54:40 +0100
 
diff --git a/debian/ulogd.maintscript b/debian/ulogd.maintscript
new file mode 100644
index 0000000..cc65a1b
--- /dev/null
+++ b/debian/ulogd.maintscript
@@ -0,0 +1,2 @@
+rm_conffile /etc/init.d/ulogd 2.0.4-2~
+rm_conffile /etc/logrotate.d/ulogd 2.0.4-2~
-- 
2.1.4

Reply via email to