[natty] dbus fails to install in a schroot

Bug #728434 reported by Marc Deslauriers
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)
Fix Released
Critical
Jamie Strandboge
Natty
Fix Released
Critical
Jamie Strandboge

Bug Description

Binary package hint: dbus

natty's dbus fails to install in an up-to-date schroot. This causes problems trying to build some natty packages using sbuild, for example, gedit.

Details:

# apt-get install dbus
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libexpat1
Suggested packages:
  dbus-x11
The following NEW packages will be installed:
  dbus libexpat1
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 370 kB of archives.
After this operation, 1110 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.ubuntu.com/ubuntu/ natty/main libexpat1 amd64 2.0.1-7ubuntu1 [138 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ natty/main dbus amd64 1.4.6-1ubuntu3 [233 kB]
Fetched 370 kB in 0s (20.5 MB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
 LANGUAGE = "en_CA:en",
 LC_ALL = (unset),
 LANG = "en_CA.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously deselected package libexpat1.
(Reading database ... 13534 files and directories currently installed.)
Unpacking libexpat1 (from .../libexpat1_2.0.1-7ubuntu1_amd64.deb) ...
Selecting previously deselected package dbus.
Unpacking dbus (from .../dbus_1.4.6-1ubuntu3_amd64.deb) ...
Setting up libexpat1 (2.0.1-7ubuntu1) ...
Setting up dbus (1.4.6-1ubuntu3) ...
start: Unknown job: dbus
invoke-rc.d: initscript dbus, action "start" failed.
dpkg: error processing dbus (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 dbus
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: dbus 1.4.6-1ubuntu3
ProcVersionSignature: Ubuntu 2.6.38-5.32-generic 2.6.38-rc6
Uname: Linux 2.6.38-5-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Thu Mar 3 08:16:41 2011
EcryptfsInUse: Yes
ProcEnviron:
 LANGUAGE=en_CA:en
 PATH=(custom, user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
SourcePackage: dbus
UpgradeStatus: Upgraded to natty on 2011-02-01 (29 days ago)

Related branches

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

I can confirm this bug. This is actually quite severe because if we release with this bug, the security team won't be able to properly prepare security updates for packages that have a dependency on dbus.

Changed in dbus (Ubuntu Natty):
importance: Undecided → Critical
milestone: none → ubuntu-11.04-beta-1
status: New → Confirmed
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This happens because of these automatically generated lines in the postinst:
# Automatically added by dh_installinit
if [ -e "/etc/init/dbus.conf" ]; then
        invoke-rc.d dbus start || exit $?
fi

Running this in the chroot on its own yields:
$ invoke-rc.d dbus start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service dbus start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start dbus
start: Unknown job: dbus
invoke-rc.d: initscript dbus, action "start" failed.
[1]

Or simply:
$ start dbus
start: Unknown job: dbus
[1]
$ status dbus
status: Unknown job: dbus
[1]

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This debhelper snippet in dbus.postinst is the problem:
# Automatically added by dh_installinit
if [ -e "/etc/init/dbus.conf" ]; then
        invoke-rc.d dbus start || exit $?
fi

In maverick (where this did not fail), it was:
# Automatically added by dh_installinit
if [ -e "/etc/init/dbus.conf" ]; then
        # start fails if already running
        start dbus || :
fi

Indeed, changing the dbus.postint to use 'start dbus || :' shows that dbus start fails, but the install continues:
$ apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up dbus (1.4.6-1ubuntu3) ...
start: Unknown job: dbus
invoke-rc.d: initscript dbus, action "start" failed.
$

The dash manpage shows that ':' is the equivalent to 'true'.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This is a result of the change in 8.0.0ubuntu2 for bug #690640:
 if [ -e "/etc/init/#JOB#.conf" ]; then
- # start fails if already running
- start #JOB# || :
+ invoke-rc.d #JOB# start || #ERROR_HANDLER#
 fi

Passing --error-handler=: to dh_installinit will restore the old behavior.

Changed in dbus (Ubuntu Natty):
assignee: nobody → Jamie Strandboge (jdstrand)
status: Confirmed → Triaged
status: Triaged → In Progress
Changed in dbus (Ubuntu Natty):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dbus - 1.4.6-1ubuntu4

---------------
dbus (1.4.6-1ubuntu4) natty; urgency=low

  * debian/rules: update dh_installinit to use the old '|| :' behavior instead
    of the default behavior (exiting with error) by specifying
    '--error-handler=:' to dh_installinit (LP: #728434)
 -- Jamie Strandboge <email address hidden> Tue, 08 Mar 2011 15:41:27 -0600

Changed in dbus (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
gregrwm (gregrwm) wrote :

this appears nearly identical to Bug #1032915 (quantal), install or upgrade of dbus in a chroot yields:

Setting up dbus (1.6.4-1ubuntu4) ...
start: Unknown job: dbus
invoke-rc.d: initscript dbus, action "start" failed.
dpkg: error processing dbus (--configure):
 subprocess installed post-installation script returned error exit status 1

as a result, dbus, and all packages that depend upon it, remain "unconfigured", causing app failures (eg gnucash fails to find config data).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.