Bug#801850: busybox: readlink gets shadowed by busybox causing debconf to possibly fail
Hey Christoph On 03-10-17 21:42, Christoph Biedl wrote: tags 801850 +moreinfo +patch thanks With both coreutils and busybox installed however, the busybox variant gets used before the coreutils variant causing package failures. Does such a breakage happen or is this rather a theoretical scenario? Or: Is this an issue to be fixed in (old)stable as well? This happened in an actual situation, hence why i brought it up :) Since my ticket is 2 years old in 10 days, I'm not sure exactly what I was doing to trigger this (call it a bad bug report on my part :) but I think what was going on (and writing it down again freshens my memory) we have an "embedded" jessie rootfs filesystem, and after post-install, we run a busybox --install to 'fill in the blanks'. Because busybox's readlink has as you say precedence, flash-kernel in this case, fails to work as busybox's readlink is not as complete (or not fully compatible). A quick fix/workaround: if [ -f /bin/readlink ]; then unlink /usr/bin/readlink fi Things are not that easy unfortunately. Which would be kind of an ugly workaround imo. As you first run busybox --install to 'fill in the blank' and still have to go fix things manually afterwards. It's saner to fix the underlying problem which took a while to understand: busybox --install places the readlink link in /usr/bin/, a directory that has precedence in $PATH over /bin/ where coreutils version resides. And things go downhill from there. The patch attached changes busybox' install path for readlink to /bin/ as well - since busybox never replaces existing files, everything should be fine. This sounds quite reasonable and should work rather well, even better (but that's beyond a simple patch like this) would be if busybox --install would check if something exists, and not install the duplicate (unless --force is supplied (without overwriting)) Please give it a try and report whether this helps in your situation. Since we haven't switched to flash-kernel, we haven't had the issue yet, but once it does; I'll definitely check this if it works now! Thanks, Olliver Christoph
Bug#801850: busybox: readlink gets shadowed by busybox causing debconf to possibly fail
tags 801850 +moreinfo +patch thanks > With both coreutils and busybox installed however, the > busybox variant gets used before the coreutils variant causing package > failures. Does such a breakage happen or is this rather a theoretical scenario? Or: Is this an issue to be fixed in (old)stable as well? > A quick fix/workaround: > if [ -f /bin/readlink ]; then > unlink /usr/bin/readlink > fi Things are not that easy unfortunately. It's saner to fix the underlying problem which took a while to understand: busybox --install places the readlink link in /usr/bin/, a directory that has precedence in $PATH over /bin/ where coreutils version resides. And things go downhill from there. The patch attached changes busybox' install path for readlink to /bin/ as well - since busybox never replaces existing files, everything should be fine. Please give it a try and report whether this helps in your situation. Christoph --- a/coreutils/readlink.c +++ b/coreutils/readlink.c @@ -20,7 +20,7 @@ //config: help //config: Enable the readlink option (-f). -//applet:IF_READLINK(APPLET(readlink, BB_DIR_USR_BIN, BB_SUID_DROP)) +//applet:IF_READLINK(APPLET(readlink, BB_DIR_BIN, BB_SUID_DROP)) //kbuild:lib-$(CONFIG_READLINK) += readlink.o signature.asc Description: Digital signature
Bug#801850: busybox: readlink gets shadowed by busybox causing debconf to possibly fail
Package: busybox Version: 1:1.22.0-15 Severity: important Tags: newcomer Dear Maintainer, When installing busybox's symlink readlink gets installed (without checking) into /usr/bin/readlink. Some packages require readlink support via debconf (for example the flash-kernel package) but busybox's readlink does not offer the -m option. Coreutils however, a requirement for debian and its tools (debconf), also supplies readlink. With both coreutils and busybox installed however, the busybox variant gets used before the coreutils variant causing package failures. A quick fix/workaround: if [ -f /bin/readlink ]; then unlink /usr/bin/readlink fi This on armhf jessie variant using busybox 1:1.22.0-9+deb8u1. -- System Information: Debian Release: stretch/sid Architecture: amd64 (x86_64) Foreign Architectures: i386, armhf Kernel: Linux 4.3.0-rc1+ (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages busybox depends on: ii libc6 2.19-22 busybox recommends no packages. busybox suggests no packages. -- no debconf information