On Fri, 2015-12-25 at 14:46 +0100, Jonas Meurer wrote: [...] > > > /usr/share/initramfs-tools/hooks/busybox will see the BUSYBOX=y setting > > and copy the busybox binary. > > > > /usr/share/initramfs-tools/hooks/zz-busybox sources > > /etc/initramfs-tools/initramfs.conf, therefor BUSYBOX=n will be set > > again, and the symlinks are not created. > > Honestly, this looks like a bug in busybox to me. What's the reason for > the two busybox initramfs hook scripts at all? > > *) /usr/share/initramfs-tools/hooks/busybox copies bin/busybox to the > initramfs and links /bin/sh to it without sourcing initramfs.conf. This is part of initramfs-tools. > *) /usr/share/initramfs-tools/hooks/zz-busybox-initramfs sources > initramfs.conf, removes busybox binary from initramfs if existent, > and copies bin/busybox to initramfs and links all aliases provided > by busybox to it. This is actually called zz-busybox, and is part of busybox. Somehow I failed to notice this exists. :-/ > I don't understand the following: > > What's the purpose of /usr/share/initramfs-tools/hooks/busybox at all, > if changes are reverted by > /usr/share/initramfs-tools/hooks/zz-busybox-initramfs later on anyway > and redone in a slightly different fashion? Yes, this is stupid. We should arrange to properly hand over responsibility for installing busybox, and adjust package dependencies accordingly. > Why does /usr/share/initramfs-tools/hooks/zz-busybox-initramfs source > initramfs.conf? The BUSYBOY variable is exported by mkinitramfs anyway. > > The simplest fix to this bug would be to stop sourcing initramfs.conf in > hooks/zz-busybox-initramfs. It should certainly stop doing that. [...] > > b/ /usr/share/initramfs-tools/conf-hooks.d/cryptsetup drops the > > BUSYBOX=y line. And if this is not an option, because cryptsetup > > requires busybox, then this should be reflected in the package > > dependencies accordingly by making the Recommends a Depends. > > Do you think that the cryptsetup packages should depend on > initramfs-tools and busybox despite the fact that they're usable without? No, they should only recommend them. The busybox hook script is changed in initramfs-tools 0.121~rc2 to hard fail if busybox is wanted but not installed. If it's dropped in favour of the zz-busybox hook script, then I can move that check into mkinitramfs. Ben. -- Ben Hutchings Power corrupts. Absolute power is kind of neat. - John Lehman, Secretary of the US Navy 1981-1987
Attachment:
signature.asc
Description: This is a digitally signed message part