Package: debirf Version: 0.34 Severity: normal Tags: patch Dear Maintainer,
It seems that daemon start is attempted when packages are installed during module run by debirf. Is this always desirable ? We usually don't want to restart a daemon on the build host, or one may build a debirf instance for another machine (different hardware). For instance : $ debirf make minimal $ debirf enter minimal # apt-get update # apt-get install acpi-fakekey [ ... ] Setting up acpi-fakekey (0.141-4) ... [FAIL] Starting acpi_fakekey daemon...failed (No suitable uinput module for running kernel found). failed to open /dev/uinput: No such file or directory open fifo: Permission denied failed (Could not start /usr/sbin/acpi_fakekeyd). The error occurred at postinst when trying to start a daemon acpi_fakekeyd on the build machine. Perhaps we could inhibit daemon start when the modules are run in debirf. With the following patch, the installation finished without error. Thank you for your ongoing work on debirf ! Regards, JH Chatenet --- a/usr/bin/debirf +++ b/usr/bin/debirf @@ -327,6 +327,33 @@ fi } +# Inhibit daemon restart +disable_daemon_start() { + fakeroot_if_needed debirf_exec dpkg-divert --divert /sbin/start-stop-daemon.REAL --rename /sbin/start-stop-daemon + + fakeroot_if_needed touch "$DEBIRF_ROOT/sbin/start-stop-daemon" + cat > "$DEBIRF_ROOT/sbin/start-stop-daemon" <<EOF +#!/bin/sh +echo +echo "Warning: Fake start-stop-daemon called, doing nothing" +EOF + fakeroot_if_needed chmod 755 "$DEBIRF_ROOT/sbin/start-stop-daemon" + + fakeroot_if_needed touch "$DEBIRF_ROOT/usr/sbin/policy-rc.d" + cat > "$DEBIRF_ROOT/usr/sbin/policy-rc.d" <<EOF +#!/bin/sh +exit 101 +EOF + fakeroot_if_needed chmod 755 "$DEBIRF_ROOT/usr/sbin/policy-rc.d" +} + +# Enable daemon restart +enable_daemon_start() { + fakeroot_if_needed rm -f "$DEBIRF_ROOT/usr/sbin/policy-rc.d" + fakeroot_if_needed rm -f "$DEBIRF_ROOT/sbin/start-stop-daemon" + fakeroot_if_needed debirf_exec dpkg-divert --rename --remove /sbin/start-stop-daemon +} + # make profile make() { # option parsing @@ -485,7 +512,9 @@ ### RUN MODULES if [ "$STAGE_MODULES" = 'true' ] ; then msg "executing modules..." + disable_daemon_start run_modules + enable_daemon_start msg "modules complete" else msg "not running modules" @@ -522,11 +551,13 @@ setup_environment "$1" shift + disable_daemon_start if [ "$1" ] ; then fakeroot_if_needed bash -c ". $DEBIRF_COMMON && debirf_exec $@" else fakeroot_if_needed bash -c ". $DEBIRF_COMMON && debirf_exec bash -i" fi + enable_daemon_start } # create an ISO from the given kernel and initramfs (requires GRUB, -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash Versions of packages debirf depends on: ii apt 1.0.5 ii cpio 2.11+dfsg-2 ii debootstrap 1.0.60 ii fakechroot 2.17.2-1 ii fakeroot 1.18.4-2 ii klibc-utils 2.0.3-1 Versions of packages debirf recommends: ii grub-common 2.00-22 ii lsb-release 4.1+Debian13 ii xorriso 1.3.2-1 debirf suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org