[FS#753] Alternatives support breaks 'ip' symlink when only 'tc' is installed (breaks e.g. SQM)

LEDE Bugs lede-bugs at lists.infradead.org
Wed May 3 02:13:05 PDT 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - Hannu Nyman (hnyman) 

Attached to Project - LEDE Project
Summary - Alternatives support breaks 'ip' symlink when only 'tc' is installed (breaks e.g. SQM)
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - 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 at 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.


More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=753



More information about the lede-bugs mailing list