From: Josef Schlehofer Date: Thu, 6 Aug 2026 12:21:13 +0000 (+0200) Subject: olsrd: report the packaged version in the binary X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=9c79e6bed31119abc517612ddb8a35af616b0d35;p=openwrt-packages.git olsrd: report the packaged version in the binary olsrd builds its version banner from the VERS make variable, which defaults to the upstream development version "pre-0.9.9", so `olsrd -v` never mentioned the version the package was built from. The source tarball carries no git metadata either, so the git hash in that string is always zero: olsr.org - pre-0.9.9-git_0000000-hash_5fd8976... Pass PKG_VERSION as VERS, the same way alfred and batctl already pass REVISION, so the banner identifies the packaged revision. This also lets test-version.sh check the real version instead of merely confirming that the binary starts. Signed-off-by: Josef Schlehofer Co-authored-by: Claude Fable 5 --- diff --git a/net/olsrd/Makefile b/net/olsrd/Makefile index 8160b8a2b..f86f3d593 100644 --- a/net/olsrd/Makefile +++ b/net/olsrd/Makefile @@ -177,6 +177,7 @@ endef MAKE_FLAGS+= \ NO_DEBUG_MESSAGES=1 \ + VERS="$(PKG_VERSION)" \ OS="linux" \ DESTDIR="$(PKG_INSTALL_DIR)" \ STRIP="true" \ diff --git a/net/olsrd/test-version.sh b/net/olsrd/test-version.sh index 06024ba79..629a61966 100644 --- a/net/olsrd/test-version.sh +++ b/net/olsrd/test-version.sh @@ -4,10 +4,7 @@ case "$PKG_NAME" in olsrd) - # The version of olsrd is derived from the source date and git - # hash, which the binary does not report. Check that the binary - # starts and prints its version banner instead. - olsrd -v 2>&1 | grep -F "olsr.org" + olsrd -v 2>&1 | grep -F "$PKG_VERSION" ;; olsrd-mod-*)