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#753 - Alternatives support breaks 'ip' symlink when only 'tc' is installed (breaks e.g. SQM) #5729

Closed
openwrt-bot opened this issue May 3, 2017 · 2 comments
Labels

Comments

@openwrt-bot
Copy link

hnyman:

The recent addition of "Alternatives" support seems to break "ip" symlink if only "tc" is selected from the iproute2 package. That will make /sbin/ip to point into non-existent /sbin/ip-full. That will make "ip" non-functional, breaking all packages that use "ip" command, inlucding SQM, BCP38 and various others.


I have selected in my config only "tc" from iproute2, but not ip-tiny or ip-full. Busybox ip is enough for me. This will be the case for all basic SQM users, so this will hit users in large scale.

When debugging firewall I noticed an "ip" error and started to investigate. Then I noticed that my system had a faulty symlink to ip-full although that is not installed:

root@LEDE:~# ls -l /sbin/ip lrwxrwxrwx 1 root root 13 May 2 19:16 /sbin/ip -> /sbin/ip-full

After some compilation testing with minimal firmware (no additional packages), I have noticed that:

  • compiling from dac629f is still ok ("ip" symlink to /bin/busybox)
  • compiling from 9b4c415 is ok, if tc is built but not installed ("m").
  • compiling from 9b4c415 generates the wrong symlink, if tc is installed ("y").

I looked into the compiled tc .ipk and noticed that for some reason the Alternatives definition for "ip" gets also included in "tc" package .ipk:

control file from .ipk:

Package: tc Version: 4.4.0-10 Depends: libc, kmod-sched-core Alternatives: 300:/sbin/ip:/sbin/ip-full Source: package/network/utils/iproute2 ...

Looking at the iproute2 Makefile it is not obvious to me why that happens. The Alternatives definitions are in the ip-tiny and ip-full definitions, so they should not wander into "tc". Likely the script parsing the Alternatives for ipk inclusion is faulty somehow.

@openwrt-bot
Copy link
Author

yousong:

The issue should now be fixed with r4077-0c3fe281e3

@openwrt-bot
Copy link
Author

hnyman:

Thanks. Seems to compile ok.

Please close the task, as we normal users can't do that in Flyspray :-(

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