[OpenWrt-Devel] [PATCH 1/5] include/package: Add generic macro for replacing BusyBox applets

Felix Fietkau nbd at openwrt.org
Thu Jan 21 17:21:16 EST 2016

On 2016-01-21 18:54, openwrt at daniel.thecshore.com wrote:
> From: Daniel Dickinson <openwrt at daniel.thecshore.com>
> There are a number of packages in base and feeds
> that provide full versions of commands that are
> provided by busybox either by default or as a
> configure option.  Here we add a macro that makes
> installation/uninstallation of the full version
> work smoothly (so that --force-overwrite is
> unnecessary and so that so on uninstall the busybox
> functionality is restored, if the applicable
> applet has been included in busybox).
> It does require making sure that if busybox
> applet is installed in /bin that the full
> version is in /usr/bin and vice versa (and
> similarly with /sbin and /usr/sbin) so that
> the path of the file in the package doesn't
> conflict with the symlink to busybox that
> exists in the stock image, so that on
> installation/deinstallation of the package
> we simply point symlinks at the right target
> and at the same time that even if the command isn't
> in the 'standard' location there is a symlink so that
> any program or configuration that depends or
> defaults to a particular path still works.
> Signed-off-by: Daniel Dickinson <openwrt at daniel.thecshore.com>

I don't really like this approach. Here's what I want to have instead:

Any busybox utility for which a full replacement exists should just
install itself to /bin or /sbin. The replacement should go into /usr/bin
or /usr/sbin and is thus preferred via $PATH.
No messing with busybox's symlinks at (un)install time needed.

- Felix
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list