oonf-olsrd2: reinstate and update to OONF master - #1176
Conversation
c17f401 to
d308f19
Compare
|
Given that the package was removed nearly a year ago and we want to add it back, it basically needs a complete rebirth at this point. We should approach it and review it from scratch to ensure it’s clean and makes sense. If we don’t do it now, it’ll never happen. I was hoping to convince Copilot to take a look at it, but apparently, it’s a no. :) We’ll see, maybe it’ll get moving. As a next step, I suggest we set up a quick review of the original requirements so we don't bring back any old technical debt. |
|
Agreed, let's treat it as a fresh package rather than a revert. I'll go through both Makefiles against current conventions and push a cleaned version. For the requirements review: the default plugin set is driven by Config.in (lan_import, route_modifier, mpr, etc. as compile-time options folded into the single static binary), oonf-init-scripts ships two sourced shell helpers to /lib/functions/, and oonf-olsrd2 carries the procd init + hotplug + a default UCI config. Happy to align on what the default-enabled plugin set should be before I resubmit, so we don't bring back anything stale. |
d308f19 to
e2f7443
Compare
|
Pushed a cleaned-up version treating this as a fresh package per your suggestion, rather than a revert. Summary of changes: dropped the PKG_BUILD_DIR override, kernel.mk include, redundant VERSION lines, and the oonf-git/template indirection; added SPDX headers, PKG_MAINTAINER, PKG_LICENSE; switched URLs to https; fixed install macros (INSTALL_DIR + INSTALL_CONF for the config file); reset PKG_RELEASE to 1; added dependencies. Replaced the test-version.sh skip with a real check. Fixed several pre-existing bugs in oonf_init.sh that Copilot caught. I built and validated everything in QEMU on the x86-64 snapshot target: the package installs, jshn resolves as a dependency, olsrd2 reports the pinned commit, and the ignore-section logic works correctly. Details in the per-line replies. |
83de819 to
6c1d2c4
Compare
0762baf to
e714af7
Compare
|
Rebased onto current master as a single clean commit (the merge commit and the Copilot autofix commit are gone — my mistake, I'd used the "Update branch" button). Addressed from the formality bot: Makefile := spacing on SPACE, CMAKE_OPTIONAL_PLUGINS and BUILD_TYPE is fixed. On the remaining Copilot comment about MAKE_PATH: it's empty for this package, so |
|
On PKG_LICENSE_FILES: upstream confirmed BSD-3-Clause and asked me to submit a LICENSE file (OLSR/OONF#76), which I've now done (OLSR/OONF#77). Once it's merged I can add PKG_LICENSE_FILES:=LICENSE ; this will also require to bumping the source pin to a commit containing the file, plus a rebuild/re-verify. |
|
This PR is stale because it has been inactive for 14 days and has the "not following guidelines" label. |
|
While testing on real hardware (GL.iNet Flint 2, aarch64/filogic), found that nl80211_listener needs libnl-genl-3.0, which libnl-tiny doesn't provide. The existing core netlink code (os_system_linux.c) still uses libnl-tiny at runtime, so libnl-genl is needed in addition to it, not instead of it. Added +libnl-genl to DEPENDS alongside the existing +libnl-tiny, and the libnl3 include path alongside the libnl-tiny one. Verified building, packaging, and installing cleanly on both x86-64 (gcc-14.3.0_musl SDK) and aarch64_cortex-a53 (mediatek/filogic, OpenWrt 25.12.5), with correct dependency resolution on both. Re-ran the QEMU checks on x86-64: jshn ownership, olsrd2 -v reporting the pinned commit with nl80211_listener now genuinely loaded, and the ignore-section config logic all pass. |
|
Bumped the source pin to 477e716 (2026-08-06), which includes the upstream LICENSE file added in OLSR/OONF#77. Added PKG_LICENSE:=BSD-3-Clause and PKG_LICENSE_FILES:=LICENSE accordingly. |
|
@BKPepe can you restart the Copilot check please? |
Reinstates oonf-olsrd2 and its oonf-init-scripts dependency, removed in 58070aa. The two issues that motivated removal are fixed in current OONF master: - GCC 14 -Wint-conversion in os_system_linux.c: master uses designated initializers for struct msghdr. The fix existed on develop and landed on master in the 2025-12 develop->master merge. - CMake 4.x: root CMakeLists.txt now sets cmake_minimum_required 3.10. Bumps the source pin from the stale 2022-08-25 commit to master 477e716 (2026-08-06), adds PKG_LICENSE_FILES:=LICENSE, bumps PKG_RELEASE, and drops 100-enable-lan-import-plugin.patch, which upstream has absorbed (lan_import is now in src/olsrv2/CMakeLists.txt). Adds libnl-genl dependency for nl80211_listener. Modernizes both Makefiles: SPDX headers, PKG_MAINTAINER, PKG_LICENSE, PKG_LICENSE_FILES, https URLs, idiomatic install macros, and PKGARCH:=all for the architecture-independent oonf-init-scripts. Replaces the test-version.sh skip with a real check against the pinned commit. Fixes pre-existing bugs in oonf_init.sh (undefined index in the ignore path, hardcoded pidfile, stray debug output) and corrects the hotplug handler to invoke the init script directly instead of sourcing rc.common. Verified: clean build across CI architectures and runtime validation in QEMU on x86-64 (package install, dependency resolution, version reporting, and ignore-section handling). Signed-off-by: Matthias Tarasiewicz <mt@riat.at>
e714af7 to
65794f7
Compare
Summary
Reinstates
oonf-olsrd2(and itsoonf-init-scriptsdependency), which were removed in #1145. The two issues that motivated the removal are both fixed in current OONF master, and I've verified a clean build.Why this is safe now
The removal in #1145 cited three problems. Status of each:
-Wint-conversion(radio and proxy can not be compiled with GCC 14 (error: initialization of 'int' from 'void *' makes integer from pointer without a cast [-Wint-conversion]) OLSR/OONF#71): fixed upstream. Thestruct msghdrinitializers insrc/base/os_linux/os_system_linux.cnow use designated initializers, which skip musl's padding fields. The fix existed on thedevelopbranch and only reachedmasterin the 2025-12develop→masterreconciliation, which is why the old 2022 pin never had it.CMakeLists.txtnow setscmake_minimum_required(VERSION 3.10 FATAL_ERROR), above the 3.5 floor CMake 4.x enforces.masterbranch (notice dated 2025-12-04).What this PR changes
2022-08-25commit to masterb2164126e12340f19ea33070e1e11eb469a051e5(2025-12-04), with a refreshedPKG_MIRROR_HASH.PKG_RELEASE.100-enable-lan-import-plugin.patch. Upstream has absorbed it:add_subdirectory(lan_import)is already present insrc/olsrv2/CMakeLists.txt, so the patch no longer applies and is redundant.No source code changes and no plugin-list changes were needed.
Verification
Clean build and
PKG_MIRROR_HASHverification with the OpenWrtx86-64gcc-14.3.0_muslSDK (snapshots). x86-64 is 64-bit musl, the same ABI condition that triggered the original-Wint-conversionfailure, so the build exercises the relevant code path. No-Wint-conversionand no CMake minimum-version error.Scope
This PR covers
oonf-olsrd2only. The DLEP packages (oonf-dlep-radio,oonf-dlep-proxy) were the actual subjects of OLSR/OONF#71 and remain removed; they can follow in a separate PR once each is build-tested individually.@XDjackieXD noted intent to re-add the packages in #1145.