refactor!: install the feeder stack under the /opt/airplanes FHS layout - #225
Merged
Conversation
Move the runtime overlay, image-baked helpers, and per-service state under
/opt/airplanes, /var/lib/airplanes, and /run/airplanes; stop creating symlinks
in /usr/bin and /usr/local/{lib,share}. Decoders, wrappers, and render-status
are reached via /opt/airplanes/current; the release gates reject re-squatting.
BREAKING CHANGE: on-device install paths change; a feeder is reflashed.
After the de-squat, web-config privileged helpers are granted by their absolute /opt/airplanes/current path (payload) and the orchestrator trampoline by its image-baked /opt/airplanes/libexec path, neither of which is a managed_paths symlink. Teach sudoers-managed-check to accept both — payload paths iff the file ships in the release tree, libexec paths as always-present image-baked helpers.
first-run sources the overlay's wifi-validators and the console dashboard renders via the overlay's render-status, so both must wait for the recovery shim's last-good flip; otherwise a half-flipped current/ breaks them on a recovery boot.
The overlay mirrors every airplanes-*.{service,timer} unit, but staged wrapper scripts from a hardcoded list missing airplanes-stats.sh — so airplanes-stats.service referenced a script the overlay never shipped. Glob airplanes-*.sh to match the unit glob.
The overlay smoke skips the runtime-overlay stage but asserts render-status and the console-dashboard assets it now delivers. Stage those source files so the renderer self-test keeps running at PR time.
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.
Move the on-device feeder install to a Filesystem Hierarchy Standard layout. All first-party payload now lives under
/opt/airplanes: the versioned runtime overlay at/opt/airplanes/current, image-baked helpers (the recovery shim, the orchestrator trampoline, the /run-resize helper, the release-signing public key) at/opt/airplanes/libexec, and per-service state nested under/var/lib/airplanes/…and/run/airplanes/….The install no longer writes into
/usr/binor/usr/local/{lib,share}. What remains in/usr/local/binis a small set of guarded CLI launchers (apl-feed,apl-wifi,apl-ssh,apl-aggregator) plusreadsb/dump978-faoperator shims; third-party tar1090/graphs1090 read-only data keeps its conventionalsharelocation. Decoders, wrappers, render-status, and the web-config payload are reached through/opt/airplanes/currentrather than through symlinks squatting OS-owned trees.The release gates enforce this going forward: the manifest validator fails the build if any managed path lands back in
/usr/binor/usr/local/{lib,share}/airplanes, and the executable-bit gate now fails loudly instead of silently passing if the overlay prefix ever drifts out of sync with the manifest.This is a breaking change to the on-device layout — a feeder is reflashed rather than updated in place.