[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#571056: chroot_upstart: divert initctl (like policy-rc.d) to fix start(8) in Ubuntu Lucid postinsts.



Package: live-helper
Version: 2.0~a7-1
Severity: normal

See also http://bugs.debian.org/571054 (same issue, in pbuilder).

In chroot_sysv-rc, live-helper currently creates a policy-rc.d that
prevents daemons from starting when they are installed.  This works
well for sysvinit packages.

However, when working with Ubuntu Lucid[0] chroots, many daemons use
upstart instead of sysvinit.  Thus, they ignore policy-rc.d, try (and
fail) to start, further causing dpkg and thus "lh build" to fail.

According to CJ Watson of #ubuntu-devel, this can be done by diverting
/sbin/initctl and substituting a stub.  An example of this can be seen
in debootstrap's "gutsy" script (excerpt below).  Please add something
similar, I guess to /usr/share/live-helper/helpers/chroot_upstart.

        mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL"
        echo \
    "#!/bin/sh
    echo
    echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
        chmod 755 "$TARGET/sbin/start-stop-daemon"

        if [ -x "$TARGET/sbin/initctl" ]; then
          mv "$TARGET/sbin/initctl" "$TARGET/sbin/initctl.REAL"
          echo \
    "#!/bin/sh
    echo
    echo \"Warning: Fake initctl called, doing nothing\"" > "$TARGET/sbin/initctl"
          chmod 755 "$TARGET/sbin/initctl"
        fi

[0] In theory this was an issue with earlier Ubuntu releases, but it
    seems to be far more prevalent in Lucid.

-- Package-specific info:

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages live-helper depends on:
ii  cdebootstrap                  0.5.5      Bootstrap a Debian system
ii  debootstrap                   1.0.20     Bootstrap a basic Debian system

Versions of packages live-helper recommends:
ii  gettext-base                  0.17-9     GNU Internationalization utilities

Versions of packages live-helper suggests:
ii  dosfstools        3.0.9-1                utilities for making and checking 
ii  fakeroot          1.14.4-1               Gives a fake root environment
ii  genext2fs         1.4.1-2.2              ext2 filesystem generator for embe
ii  genisoimage       9:1.1.10-1             Creates ISO-9660 CD-ROM filesystem
ii  memtest86+        4.00-2.2               thorough real-mode memory tester
ii  mtd-utils [mtd-to 20090606-1             Memory Technology Device Utilities
ii  mtools            4.0.12-1               Tools for manipulating MSDOS files
ii  parted            1.8.8.git.2009.07.19-5 The GNU Parted disk partition resi
ii  squashfs-tools    1:4.0-6                Tool to create and append to squas
ii  sudo              1.7.2p1-1              Provide limited super user privile
ii  syslinux          2:3.83+dfsg-3          utilities for the syslinux bootloa
ii  uuid-runtime      2.16.2-0               runtime components for the Univers
pn  win32-loader      <none>                 (no description available)

-- no debconf information



Reply to: