]> git.99rst.org Git - openwrt-packages.git/commitdiff
olsrd: report the packaged version in the binary
authorJosef Schlehofer <redacted>
Thu, 6 Aug 2026 12:21:13 +0000 (14:21 +0200)
committerNick Hainke <redacted>
Thu, 13 Aug 2026 21:21:19 +0000 (23:21 +0200)
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 <redacted>
Co-authored-by: Claude Fable 5 <redacted>
net/olsrd/Makefile
net/olsrd/test-version.sh

index 8160b8a2b1e85936dba20d616054a76a180b2657..f86f3d5936e1610dd6fb75ed1368f2d4e39274e9 100644 (file)
@@ -177,6 +177,7 @@ endef
 
 MAKE_FLAGS+= \
        NO_DEBUG_MESSAGES=1 \
+       VERS="$(PKG_VERSION)" \
        OS="linux" \
        DESTDIR="$(PKG_INSTALL_DIR)" \
        STRIP="true" \
index 06024ba79253f5a43b6135735c89a4935354ca9b..629a619666955a27c5b21878bbd3479daea251c4 100644 (file)
@@ -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-*)
git clone https://git.99rst.org/PROJECT