Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3299 - busybox: Alternatives gets overwrited when busybox updates #6431

Open
openwrt-bot opened this issue Aug 21, 2020 · 3 comments
Open
Labels

Comments

@openwrt-bot
Copy link

howl:

This is device independent and I think it affects all versions but I have seen this over 19.07. If you have binary programs that conflicts with busybox ones, opkg sets them to be used instead when they are installed.

I discovered this because mwan3 got broke and investigating the error it dropped the problems seems to be that the ip binary from busybox doesn't support some features mwan3 needs. I could find that I had ip installed as is a dependency of mwan3 so I just remembered that busybox was updated recently.

Just by reinstalling ip the issue was solved.

I don't know how this could be managed, perhaps just when a package that has alternatives is installed update them and when the package is being upgraded ignore updating the alternatives.

I set this critical just because it could be very difficult to see where the problem is for many people (I surprised myself how it could take so many time to advert the real issue when I found it, it's simple, but if you don't notice busybox upgrading could be cumbersome to see), and, this could break things, like for example mwan3 or any other program that rely using alternative binaries and not the busybox ones. Of course fell free to set the severity you think could be more accurate.

@openwrt-bot
Copy link
Author

jow-:

Well either a package is an alternative for another or it is not. If mwan3 really needs functionality not provided by busybox IP, it should not depend on the abstract ip but on something like ip-full instead.

@openwrt-bot
Copy link
Author

hnyman:

If mwan3 really needs functionality not provided by busybox IP, it should not depend on the abstract ip but on something like ip-full instead.

Note that that argument about "ip" may partially be a fallout of the (three years old) change, where busybox started to provide "ip". Earlier "ip" provide was just for ip-tiny, ip-full, but not busybox.

In the forum discussion also "sort" and adblock has been mentioned as problematic. So the problem is not related just to "ip" app.

As far as I understand, the "alternatives" provides a precedence definition mechanism, which should lead to the more preferred app getting precendence.

Possibly there is bad handling of "alternatives" precedence with "opkg upgrade" (which command I dislike in any case...).

I feel that trying to provide full "upgrade anything" capability is contrdictory to the aim of keeping OpenWrt and opkg simple, but sadly there seems to be more and more people who try to upgrade anything. (Busybox is roughly the most dangerous item to be upgraded, as it is so core.)

One possible generic solution might be the busybox build config option "always install to /sbin, /bin and avoid /usr". That should keep the busybox stuff late on the path, preventing their usage if there is a better app typically in /usr, earlier in the path.

https://github.com/openwrt/openwrt/blob/master/package/utils/busybox/config/Config.in#L194

config BUSYBOX_CONFIG_INSTALL_NO_USR bool "Don't use /usr" default BUSYBOX_DEFAULT_INSTALL_NO_USR help Disable use of /usr. "busybox --install" and "make install" will install applets only to /bin and /sbin, never to /usr/bin or /usr/sbin.

I wonder if that has ever been evaluated by OpenWrt?

@openwrt-bot
Copy link
Author

brianjmurrell:

I don't think $PATH location for alternatives is a good solution. People might have perfectly valid reasons for preferring one /bin directory over another.

What I am failing to understand is why this problem is even happening with ALTERNATIVES:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/utils/busybox/Makefile;h=62af99d3ae15f4b2aca76111124fc114fdee2b7b;hb=HEAD#l51
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/utils/iproute2/Makefile;h=1c8e3e66d6174d1da78d82dc19aa6ec72acbb073;hb=HEAD#l40
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/network/utils/iproute2/Makefile;h=1c8e3e66d6174d1da78d82dc19aa6ec72acbb073;hb=HEAD#l49

[links from #1895 where this was explained to me previously]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant