Upgrading in chroot fails as postinst calls invoke-rc.d

Bug #1078408 reported by Martin von Gagern
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I'm trying to create an up-to-date chroot based on precise-updates. Since I don't know how to include updates while using debootstrap (see https://answers.launchpad.net/ubuntu/+source/debootstrap/+question/199330 on this), I have to install updates later on from within the chroot. Unfortunately, with dbus 1.4.18-1ubuntu1.3 this fails:

Setting up dbus (1.4.18-1ubuntu1.3) ...
Failed to open connection to "system" message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
invoke-rc.d: initscript dbus, action "start" failed.
dpkg: error processing dbus (--configure):
 subprocess installed post-installation script returned error exit status 1

Looking at the postinst script, I see this:

    # If it's not running (perhaps we're in a chroot) this will just fail
    # harmlessly, so there's no need to condition on status.
    dbus-send … --system … > /dev/null || true

        invoke-rc.d dbus start || exit $?

So someone did actually think about a chroot scenario, and the first error message about the missing system bus is indeed harmless. For the command that starts dbus, however, success is mandatory. This breaks the upgrade of dbus for me, and quite a number of packages which depend on it. It would be nice if the package could be installed in a chroot, without a local dbus instance running.

As a workaround, one can temporarily create a symlink called /sbin/invoke-rc.d pointing at /bin/true.

Revision history for this message
Fabio Kung (fabiokung) wrote :

I've also been hit by this bug while debootstrap'ing a precise chroot image from a lucid box with:

debootstrap --arch amd64 --variant=buildd \
   --components=main,universe,precise-updates,precise-security \
   --include ubuntu-standard,ubuntu-minimal,linux-image-virtual,ssh,git,ruby1.9.3 \
   precise /tmp/root/ http://us-east-1.ec2.archive.ubuntu.com/ubuntu/

`apt-get -y upgrade` fails there for the same reason reported here.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in dbus (Ubuntu):
status: New → Confirmed
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.