Bug#386469: openbsd-inetd, action start failed when upgrading

2007-03-21 Thread Steve Langasek
Hi Marco,

I've prepared an NMU for this issue with the following patch.  I think the
'which invoke-rc.d' check is probably unnecessary altogether, because
invoke-rc.d has been part of essential since sarge, but it doesn't hurt
overly much; anyway, if invoke-rc.d is missing, I haven't bothered calling
the init script by hand, because that's such a pathological corner case.

I've also made it best-effort, because if for some reason invoke-rc.d
returns an error, the postinst should still have an opportunity to /try/ to
start the service again, and if that succeeds, consider the package
configured.

Package is built and sitting on my hard drive; I won't upload until morning
(hmm... afternoon rather), so if you see any problems with this NMU please
say so.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/
diff -u openbsd-inetd-0.20050402/debian/changelog openbsd-inetd-0.20050402/debian/changelog
--- openbsd-inetd-0.20050402/debian/changelog
+++ openbsd-inetd-0.20050402/debian/changelog
@@ -1,3 +1,13 @@
+openbsd-inetd (0.20050402-5.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * High-urgency upload for RC bugfix.
+  * Try to stop openbsd-inetd again in the postinst before starting it,
+because update-inetd may have restarted it after the prerm ran on
+upgrade.  Really closes: #386469.
+
+ -- Steve Langasek [EMAIL PROTECTED]  Wed, 21 Mar 2007 04:25:24 -0700
+
 openbsd-inetd (0.20050402-5) unstable; urgency=medium
 
   * Try again to fix #386469, this time by removing from the init script
only in patch2:
unchanged:
--- openbsd-inetd-0.20050402.orig/debian/openbsd-inetd.postinst
+++ openbsd-inetd-0.20050402/debian/openbsd-inetd.postinst
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+
+if [ -x /etc/init.d/openbsd-inetd ]  which invoke-rc.d /dev/null 21
+then
+	# ignore any errors, this should be best-effort as it shouldn't
+	# normally be needed in the first place
+	invoke-rc.d openbsd-inetd stop || true
+fi
+
+#DEBHELPER#


Bug#386469: openbsd-inetd, action start failed when upgrading

2007-03-11 Thread Steve Langasek
So far, none of the people reporting this bug have provided information that
can be used to track it down.  Most users are quoting the failure to set up
openbsd-inetd -- that's not news, what we need is output from the *unpack*
stage of the upgrade showing why the attempt to *stop* the previous inetd
failed.

Others are quoting dpkg logs showing that they've only upgraded to version
-4, when this bug is being reported against version -5.  That doesn't
clarify anything; we need to see that the bug is happening with the current
version of the package, not obsolete versions that have been removed from
the archive.

Others are providing aptitude logs, which tell nothing about what went wrong
in dpkg.

A good report to work with on this bug is going to be:

- what version of openbsd-inetd you were upgrading from (this information is
  avaliable from dpkg.log)
- logs showing what happened when unpacking the new version of openbsd-inetd
- confirmation that you are installing the *current* version of
  openbsd-inetd -- that's version -5, not version -4
- ps output showing the inetd processes running after the point at which the
  new version of the package has failed to configure

There are lots of theories about what's happening here, but without the
above information as a starting point, they're effectively impossible to
investigate.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#386469: openbsd-inetd, action start failed when upgrading

2007-03-11 Thread Norman Messtorff
Very strange, but i cannot reproduce this bug again on my machine.

Upgrade from:
 -3 to -4: no problems
 -4 to -5: no problems
 -3 to -5: no problems
 -5 plain install: no problems.

Every time purged the package.

Downgrade from:
 -5 to -4: no problems

All on the same machine i've reported some days ago.
Ok, where are the voodoo doll's?

Attached you will find a logfile with my trials and the snipplet of my
dpkg.log from upgrade on 2007-03-05.

This bug _must_ be in context with another package upgrade.
How can i go on to help you?

-- 
Norman Messtorff | http://normes.org
Do _not_ use this Spamtrap: [EMAIL PROTECTED]
2007-03-05 09:11:27 upgrade libusb-0.1-4 2:0.1.12-2 2:0.1.12-5
2007-03-05 09:11:27 status half-configured libusb-0.1-4 2:0.1.12-2
2007-03-05 09:11:27 status unpacked libusb-0.1-4 2:0.1.12-2
2007-03-05 09:11:27 status half-installed libusb-0.1-4 2:0.1.12-2
2007-03-05 09:11:27 status half-installed libusb-0.1-4 2:0.1.12-2
2007-03-05 09:11:27 status unpacked libusb-0.1-4 2:0.1.12-5
2007-03-05 09:11:27 status unpacked libusb-0.1-4 2:0.1.12-5
2007-03-05 09:11:27 upgrade libsdl1.2debian 1.2.11-7 1.2.11-8
2007-03-05 09:11:27 status half-configured libsdl1.2debian 1.2.11-7
2007-03-05 09:11:27 status unpacked libsdl1.2debian 1.2.11-7
2007-03-05 09:11:27 status half-installed libsdl1.2debian 1.2.11-7
2007-03-05 09:11:27 status half-installed libsdl1.2debian 1.2.11-7
2007-03-05 09:11:27 status unpacked libsdl1.2debian 1.2.11-8
2007-03-05 09:11:27 status unpacked libsdl1.2debian 1.2.11-8
2007-03-05 09:11:27 upgrade libsdl1.2debian-oss 1.2.11-7 1.2.11-8
2007-03-05 09:11:27 status half-configured libsdl1.2debian-oss 1.2.11-7
2007-03-05 09:11:27 status unpacked libsdl1.2debian-oss 1.2.11-7
2007-03-05 09:11:27 status half-installed libsdl1.2debian-oss 1.2.11-7
2007-03-05 09:11:28 status half-installed libsdl1.2debian-oss 1.2.11-7
2007-03-05 09:11:28 status unpacked libsdl1.2debian-oss 1.2.11-8
2007-03-05 09:11:28 status unpacked libsdl1.2debian-oss 1.2.11-8
2007-03-05 09:11:29 status half-configured openbsd-inetd 0.20050402-5
2007-03-05 09:11:30 status unpacked libusb-0.1-4 2:0.1.12-5
2007-03-05 09:11:30 status half-configured libusb-0.1-4 2:0.1.12-5
2007-03-05 09:11:40 status installed libusb-0.1-4 2:0.1.12-5
2007-03-05 09:11:40 status unpacked libsdl1.2debian-oss 1.2.11-8
2007-03-05 09:11:40 status half-configured libsdl1.2debian-oss 1.2.11-8
2007-03-05 09:11:41 status installed libsdl1.2debian-oss 1.2.11-8
2007-03-05 09:11:41 status unpacked libsdl1.2debian 1.2.11-8
2007-03-05 09:11:41 status half-configured libsdl1.2debian 1.2.11-8
2007-03-05 09:11:41 status installed libsdl1.2debian 1.2.11-8
2007-03-05 09:11:45 status half-configured openbsd-inetd 0.20050402-5
2007-03-05 09:13:21 install linux-headers-2.6.18-4 keine 2.6.18.dfsg.1-11
2007-03-05 09:13:21 status half-installed linux-headers-2.6.18-4 
2.6.18.dfsg.1-11
2007-03-05 09:13:23 status unpacked linux-headers-2.6.18-4 2.6.18.dfsg.1-11
2007-03-05 09:13:23 status unpacked linux-headers-2.6.18-4 2.6.18.dfsg.1-11
2007-03-05 09:13:23 install linux-headers-2.6.18-4-486 keine 2.6.18.dfsg.1-11
2007-03-05 09:13:23 status half-installed linux-headers-2.6.18-4-486 
2.6.18.dfsg.1-11
2007-03-05 09:13:25 status unpacked linux-headers-2.6.18-4-486 2.6.18.dfsg.1-11
2007-03-05 09:13:25 status unpacked linux-headers-2.6.18-4-486 2.6.18.dfsg.1-11
2007-03-05 09:13:25 upgrade linux-headers-2.6-486 2.6.18+5 2.6.18+6
2007-03-05 09:13:25 status half-configured linux-headers-2.6-486 2.6.18+5
2007-03-05 09:13:25 status unpacked linux-headers-2.6-486 2.6.18+5
2007-03-05 09:13:25 status half-installed linux-headers-2.6-486 2.6.18+5
2007-03-05 09:13:25 status half-installed linux-headers-2.6-486 2.6.18+5
2007-03-05 09:13:25 status unpacked linux-headers-2.6-486 2.6.18+6
2007-03-05 09:13:25 status unpacked linux-headers-2.6-486 2.6.18+6
2007-03-05 09:13:27 status installed linux-headers-2.6.18-3-486 2.6.18-7
2007-03-05 09:13:28 remove linux-headers-2.6.18-3-486 2.6.18-7 2.6.18-7
2007-03-05 09:13:28 status half-configured linux-headers-2.6.18-3-486 2.6.18-7
2007-03-05 09:13:28 status half-installed linux-headers-2.6.18-3-486 2.6.18-7
2007-03-05 09:13:29 status config-files linux-headers-2.6.18-3-486 2.6.18-7
2007-03-05 09:13:29 status config-files linux-headers-2.6.18-3-486 2.6.18-7
2007-03-05 09:13:29 status config-files linux-headers-2.6.18-3-486 2.6.18-7
2007-03-05 09:13:29 status not-installed linux-headers-2.6.18-3-486 keine
2007-03-05 09:13:31 install linux-image-2.6.18-4-486 keine 2.6.18.dfsg.1-11
2007-03-05 09:13:31 status half-installed linux-image-2.6.18-4-486 
2.6.18.dfsg.1-11
2007-03-05 09:13:37 status unpacked linux-image-2.6.18-4-486 2.6.18.dfsg.1-11
2007-03-05 09:13:37 status unpacked linux-image-2.6.18-4-486 2.6.18.dfsg.1-11
2007-03-05 09:13:37 install linux-image-2.6.18-4-686 keine 2.6.18.dfsg.1-11
2007-03-05 09:13:37 status half-installed linux-image-2.6.18-4-686 
2.6.18.dfsg.1-11
2007-03-05 09:13:43 status unpacked linux-image-2.6.18-4-686 2.6.18.dfsg.1-11

Bug#386469: openbsd-inetd, action start failed when upgrading

2007-03-11 Thread Steve Langasek
On Sun, Mar 11, 2007 at 05:42:38PM +0100, Norman Messtorff wrote:
 Attached you will find a logfile with my trials and the snipplet of my
 dpkg.log from upgrade on 2007-03-05.

Ok, but this dpkg.log only shows the status of openbsd-inetd *after* the
upgrade has been started.  Context at the beginning of the upgrade process
is missing, so it's certainly not possible to figure out what other package
might be involved here from the provided log.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#386469: openbsd-inetd, action start failed when upgrading

2007-03-11 Thread Steve Langasek
clone 386469 -1
tags -1 =patch
reassign -1 update-inetd
retitle -1 update-inetd: no reason to restart inetd on service removal
severity -1 important
thanks

Discussing with Marco on IRC, it seems he's reluctant to have inetd running
when no services are configured, but it's clear in any case that
update-inted doesn't need to restart inetd on service removal/deactivation:
a force-reload is always sufficient, because either inetd is running and a
reload does what's expected, or inetd isn't running and there's no reason to
start it.

So attached is a patch that changes this aspect of update-inetd's behavior.
It doesn't completely resolve the issues described here (as noted, the
problem can occur on package configuration, just not on package removal),
but is nevertheless correct in its own right.

NMU on its way shortly to incoming with this change, per Marco's standing
NMU policy for this package.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
[EMAIL PROTECTED]   http://www.debian.org/
diff -Nru /tmp/kPrNSDnFv0/update-inetd-4.27/debian/changelog /tmp/Oys7lzOfbb/update-inetd-4.27/debian/changelog
--- /tmp/kPrNSDnFv0/update-inetd-4.27/debian/changelog	2007-02-21 15:16:12.0 -0800
+++ /tmp/Oys7lzOfbb/update-inetd-4.27/debian/changelog	2007-03-11 18:09:39.0 -0700
@@ -1,3 +1,13 @@
+update-inetd (4.27-0.5) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * When called with --disable or --remove, call invoke-rc.d $inetd
+force-reload instead of restart -- if inetd isn't running, there's no
+reason that we should be restarting it in the process of *removing*
+services from inetd.conf.
+
+ -- Steve Langasek [EMAIL PROTECTED]  Sun, 11 Mar 2007 17:52:56 -0700
+
 update-inetd (4.27-0.4) unstable; urgency=high
 
   * Non-maintainer upload.
diff -Nru /tmp/kPrNSDnFv0/update-inetd-4.27/DebianNet.pm /tmp/Oys7lzOfbb/update-inetd-4.27/DebianNet.pm
--- /tmp/kPrNSDnFv0/update-inetd-4.27/DebianNet.pm	2007-02-21 15:16:30.0 -0800
+++ /tmp/Oys7lzOfbb/update-inetd-4.27/DebianNet.pm	2007-03-11 18:42:30.0 -0700
@@ -153,7 +153,7 @@
 die Error installing new $inetdcf: $!\n;
 chmod(0644, $inetdcf);
 
-wakeup_inetd;
+wakeup_inetd(1);
 return(1);
 }
 
@@ -192,7 +192,7 @@
 die Error installing new $inetdcf: $!\n;
 chmod(0644, $inetdcf);
 
-wakeup_inetd;
+wakeup_inetd(1);
 return(1);
 }
 
@@ -222,7 +222,16 @@
 }
 
 sub wakeup_inetd {
+my($removal) = @_;
 my($pid);
+my($action);
+
+if ($removal) {
+$action = 'force-reload';
+} else {
+$action = 'restart';
+}
+
 if (open(P,/var/run/inetd.pid)) {
 $pid=P;
 if (open(C,sprintf(/proc/%d/stat,$pid))) {
@@ -235,7 +244,7 @@
 $_ = glob /etc/init.d/*inetd;
 if (m/\/etc\/init\.d\/(.*inetd)/) {
 my $service = $1;
-system(invoke-rc.d $service restart /dev/null);
+system(invoke-rc.d $service $action /dev/null);
 }
 }
 return(1);