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

Bug#750598: debian-installer scribbles over policy-rc.d




Package: debian-installer
Version: 20101020ubuntu318

(Note: I am aware that the version listed above is an Ubuntu version, however this is present in all versions of d-i, and if I submit an Ubuntu bug, I'll simply be told to go submit it upstream anyway, which is what I'm doing.)

chroot_setup() and chroot_cleanup() in /lib/chroot-setup.sh in the installer unconditionally scribble over /usr/sbin/policy-rc.d. This prevents any packages which install policy-rc.d from ever working correctly. Per /usr/share/doc/sysv-rc/README.policy-rc.d.gz, a package can provide /usr/sbin/policy-rc.d if it is managed by alternatives. Which is fine, except the symlink (/usr/sbin/policy-rc.d -> /etc/alternatives/policy-rc.d) will get clobbered in chroot_cleanup, which assumes that it can unconditionally scribble over files in /target.

There's not a great solution here. At our site, we previously worked around this with a late_command which diverts policy-rc.d before calling chroot_setup, installs the package that provides policy-rc.d, and then restores the diversion before chroot_cleanup. This happened to work because late_command was in fact the last thing to be run in the installer, but apparently that's no longer true, and some in-target commands are run after late_command, thus scribbling over /target again.

Either chroot_setup needs to divert it instead (as it does with start-stop-daemon), or chroot_cleanup should only remove policy-rc.d if it hasn't changed since chroot_setup, or the policy-rc.d documentation needs to be updated to point out that the installer does not support this and packages should fix themselves up later.


Reply to: