olsrd: fix plugin SONAME, add test-version.sh, clean up Makefile - #1191
Open
BKPepe wants to merge 9 commits into
Open
olsrd: fix plugin SONAME, add test-version.sh, clean up Makefile#1191BKPepe wants to merge 9 commits into
BKPepe wants to merge 9 commits into
Conversation
BKPepe
force-pushed
the
olsrd-ci-fixes
branch
2 times, most recently
from
August 6, 2026 10:14
7964592 to
72ad5e7
Compare
The plugins are linked with SONAME lib$(PLUGIN_NAME).so, but they are
installed as $(PLUGIN_NAME).so.$(PLUGIN_VER) without any symlink
named after the SONAME. The CI runtime tests verify that a library
with a SONAME has a matching symlink and therefore fail for every
olsrd-mod-* package:
olsrd-mod-arprefresh: [fail] Library
/usr/lib/olsrd_arprefresh.so.0.1 has SONAME
'libolsrd_arprefresh.so' but no corresponding symlink was found
in /usr/lib
Add a patch which sets the SONAME to the full installed filename.
The plugins are dlopen()ed by path and never linked against, so this
has no functional effect on olsrd itself. The patch has been
submitted upstream.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The package version is derived from PKG_SOURCE_DATE and the git hash
(e.g. 2024.06.09~d72be9ad), which no executable installed by the
olsrd packages reports, so the generic version check of the CI
runtime tests always fails:
olsrd: No executables in the package provided version
2024.06.09~d72be9ad
Override the generic version check: verify that the olsrd binary
starts and prints its version banner, and skip the check for the
plugin and utility packages, which do not provide any version
information.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
- Remove the MAINTAINER override from the shared package template. It shadowed PKG_MAINTAINER for every olsrd package and listed a different person than the intended maintainer. - Add PKG_LICENSE_FILES pointing to license.txt shipped in the source tree. - Use HTTPS for the project homepage URL. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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:
olsr.org - pre-0.9.9-git_0000000-hash_5fd8976...
The source tarball carries no git metadata either, so the git hash
in that string is always zero.
Pass PKG_VERSION as VERS, the same way alfred and batctl already
pass REVISION, so the banner identifies the packaged revision:
olsr.org - 2024.06.09~d72be9ad-git_0000000-hash_5fd8976...
This also lets test-version.sh check the real version instead of
merely confirming that the binary starts.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The UCI option is spelled respawn_threshold, as documented in files/olsrd6.config and as read by files/olsrd4.init, but the IPv6 init script looks up _respawn_threshold. The lookup never matches, so a user-configured value is silently ignored and the built-in default of 3600 is always used. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The only file shipped by olsrd-utils is olsrd-neigh.sh, which sources /usr/share/libubox/jshn.sh on its third line. That file belongs to the jshn package, which is not pulled in by the olsrd -> libubus -> libubox dependency chain, so on a minimal image the utility fails immediately with "not found". Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The ubus add_interface handler allocates a struct olsr_lq_mult with
malloc() and assigns only ->addr and ->value, leaving ->next
uninitialized before the node is published into cnf->lq_mult. olsrd
walks that list with
for (mult = cnf->lq_mult; mult != NULL; mult = mult->next)
so the first traversal follows an indeterminate pointer.
Chain the new node onto the existing list, which is what the
configuration file parser does for LinkQualityMult in
src/cfgparser/oparse.y. This also makes the orig_lq_mult_cnt++ on
the next line consistent, since the entry really is prepended to the
list instead of replacing it.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
olsrd-neigh.sh builds shell variable names from data announced by
other nodes in the mesh and passes them through eval:
eval IP_${ip//[.:]/_}="$hostname"
eval re-parses the string after the quotes have been consumed by the
first expansion pass, so a hostname of `x;reboot` announced by a
remote node is executed as a command on every node that runs the
utility. The values come from the nameservice plugin's hosts file
and from the txtinfo plugin, both of which carry unauthenticated
remote input.
Discard entries containing anything other than the characters that
can legitimately appear in an address or hostname before they reach
eval, in both places.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
olsrd leaves through olsr_exit(), which ends the process with raise(SIGTERM) rather than returning from main, so the shell reports "Terminated" right after the version banner even for a plain `olsrd -v`. The pipeline status comes from grep, so the check itself is unaffected, but the line in the CI log looks like a failure to anyone reading it. Note it in the script so the next reader does not go hunting. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Member
Author
|
[allow cherry-pick] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the failing CI runtime tests for olsrd, which is part of the fallback test set (
bird2 cjdns olsrd) used for every PR that does not change any package, so these failures currently make CI red repo-wide.lib$(PLUGIN_NAME).sobut installed as$(PLUGIN_NAME).so.$(PLUGIN_VER)without any matching symlink, so the library check of the CI runtime tests failed for all 18 olsrd-mod-* packages. Add a patch setting the SONAME to the installed filename; the plugins are dlopen()ed by path, so this has no functional effect. The patch will also be submitted upstream.test-version.sh: the package version is date+hash based and not reported by any binary, so the generic version check could never pass. Verify the olsrd version banner instead and skip the check for plugin/utility packages.Maintainer: @PolynomialDivision