fbradyirl / openwrt-luci-rpc

Other
34 stars 22 forks source link

Version check not working for Turris routers #51

Closed dvenza closed 1 year ago

dvenza commented 3 years ago

The version check performed in _determine_if_legacy_version(self) does not work for TurrisOS routers, mine for example reports:

# cat /etc/os-release
NAME="TurrisOS"
VERSION="5.2.5"
ID="turrisos"
ID_LIKE="lede openwrt"
PRETTY_NAME="TurrisOS 5.2.5"
VERSION_ID="5.2.5"
HOME_URL="https://www.turris.cz/"
BUG_URL="https://gitlab.nic.cz/groups/turris/-/issues/"
SUPPORT_URL="https://www.turris.cz/support/"
BUILD_ID="7378c94"
OPENWRT_BOARD="mvebu/cortexa9"
OPENWRT_ARCH="arm_cortex-a9_vfpv3-d16"
OPENWRT_TAINTS="busybox"
OPENWRT_DEVICE_MANUFACTURER="CZ.NIC"
OPENWRT_DEVICE_MANUFACTURER_URL="https://www.turris.cz/"
OPENWRT_DEVICE_PRODUCT="Turris Omnia"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="TurrisOS 5.2.5 7378c949270067d0a633cfd892b9dd6416581afa"

It runs a recent version of luci (rpc) and the check decides it is speaking to an old version instead.

This cause the home assistant integration to break, like in 50758, since it tries to use the old net.arptable method.

vk496 commented 2 years ago

ugly fix is appending -snapshot to VERSION_ID. But definitely not the solution. I think the version checko should use BUILD_ID revision (is still incremented even if git is used?)