luci-mod-status: firmware version should include revision number
Steps to reproduce:
- Go to: Status -> Overview
- Notice that the
Firmware versionfield does not include a revision number.
Actual behavior:
Firmware versiondoesn't include the revision number.
Expected behavior:
Firmware versionshould include the revision number.
Additional Information:
The output of ubus call system board was changed in https://github.com/openwrt/procd/commit/0f88a52dc8a5451bd7f1f33ffff3b1ba3db98174 which introduced this problem. First discovered and discussed on the forum at https://forum.openwrt.org/t/strange-firmware-version-string/213745
Here's the SNAPSHOT r27893 at point in time of writing this which doesn't work:
{
"kernel": "6.6.57",
"hostname": "labmouse",
"system": "AMD Ryzen 7 3700X 8-Core Processor",
"model": "VMware, Inc. VMware Virtual Platform",
"board_name": "vmware-inc-vmware-virtual-platform",
"rootfs_type": "ext4",
"release": {
"distribution": "OpenWrt",
"version": "SNAPSHOT",
"description": "OpenWrt SNAPSHOT",
"revision": "r27893-b6bbc76c0b",
"target": "x86/64",
"builddate": "1729635115"
}
}
and here's a device I run r27687 on which does work
{
"kernel": "6.6.54",
"hostname": "JetFuel",
"system": "ARMv8 Processor rev 4",
"model": "Linksys MX4200v1",
"board_name": "linksys,mx4200v1",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "SNAPSHOT",
"revision": "r27687-b62e6f5beb",
"target": "qualcommax/ipq807x",
"description": "OpenWrt SNAPSHOT r27687-b62e6f5beb"
}
}
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_REVISION='r27893-b6bbc76c0b'
DISTRIB_TARGET='x86/64'
DISTRIB_ARCH='x86_64'
DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r27893-b6bbc76c0b'
DISTRIB_TAINTS=''
To get to parity as before I assume we would need to change boardinfo.release.description to boardinfo.release.description + ' ' + boardinfo.release.revision at https://github.com/openwrt/luci/blob/c85af3d7618b55c499ce4bf58e3896068bd413ae/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js#L41 I'm a bit unsure where the stable versions end up but if it's baked in to the description as "description": "OpenWrt 24.10" (assuming that'll be the next stable version) that should work.
Yeah.👍 if we depend on the new file, this is likely a good update. Feeling up for a PR?
Maybe the OpenWrt side change should be fixed, the commit sort of implies that the intention was to provide the same data and there's probably other downstream users affected by this as well.
Unfortunately, I didn't know that information was missing here. The question is whether I should fix this in the procd as suggested by @jow- or in the LuCI as suggested by @dannil.
I would fix this in the procd. And would replace PRETTY_NAME with the information from OPENWRT_RELESE ? Does the value CONFIG_VERSION_CODE is having the correct value SNAPSHOT?
I don't have access to any system at the moment as I'm travelling. So can someone send me the output of /usr/lib/os-release and /etc/openwrt_release, then we can compare and check what the correct value is.
Now I was too hasty. I have just seen that these two values DISTRIB_DESCRIPTION in /etc/openwrt_release and OPENWRT_RELEASE in /usr/lib/os-release are the same, so I will create a Patch and use OPENWRT_RELEASE in procd to fix this.
I don't have access to any system at the moment as I'm travelling. So can someone send me the output of /usr/lib/os-release and /etc/openwrt_release, then we can compare and check what the correct value is.`
@feckert if you still need it.
root@labmouse:~# cat /usr/lib/os-release
NAME="OpenWrt"
VERSION="SNAPSHOT"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt SNAPSHOT"
VERSION_ID="snapshot"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r27893-b6bbc76c0b"
OPENWRT_BOARD="x86/64"
OPENWRT_ARCH="x86_64"
OPENWRT_TAINTS=""
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt SNAPSHOT r27893-b6bbc76c0b"
OPENWRT_BUILD_DATE="1729635115"
root@labmouse:~# cat /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='SNAPSHOT'
DISTRIB_REVISION='r27893-b6bbc76c0b'
DISTRIB_TARGET='x86/64'
DISTRIB_ARCH='x86_64'
DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r27893-b6bbc76c0b'
DISTRIB_TAINTS=''
Patch is on the way https://patchwork.ozlabs.org/project/openwrt/patch/[email protected]/
I'm going to leave the issue open for visibility - at least until the patch is merged.
@feckert did you also send a PR to repo also?
24.10 has now been branched without this fix being merged to procd and at least since 19.07 it hasn't had stable branches so backporting doesn't seem trivial in that repo. How do we go about solving this issue now?
Stay the course. There are a few rc to go yet.
@feckert any update on the patch?
@feckert did you also send a PR to repo also?
No. I only send this to patchwork
@feckert any update on the patch?
No. Sorry
@systemcrash Lets highlight the core maintainer to merge the procd fix for this issue.
@jow- @hauke Could anyone merge this into procd? To Fix this issue?
@feckert I will take care of that. Just one question the PRETTY_NAME was never used? It got dropped?
@feckert I will take care of that. Just one question the PRETTY_NAME was never used? It got dropped?
@Ansuel Correct PRETTY_NAME was never used in the old implementation.
Before my change procd reads the variable DISTRIB_DESCRIPTION from /etc/openwrt_release.
After my change procd reads the varialbe PRETTY_NAME from /usr/lib/os-release.
This is not correct. Unfortunately, I overlooked that. The same information can be found in the variable OPENWRT_RELEASE in /usr/lib/os-release. The patch for procd fixes this. So we have the same information available as before.
Fixed procd pushed. This will be magically fixed once updated packages gets built.
@Ansuel Thank you for taking care of this.
Thanks @Ansuel