Skip to content

refactor!: install the feeder stack under the /opt/airplanes FHS layout - #225

Merged
d4rken merged 5 commits into
devfrom
refactor/fhs-install-layout
Jun 30, 2026
Merged

refactor!: install the feeder stack under the /opt/airplanes FHS layout#225
d4rken merged 5 commits into
devfrom
refactor/fhs-install-layout

Conversation

@d4rken

@d4rken d4rken commented Jun 24, 2026

Copy link
Copy Markdown
Member

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/bin or /usr/local/{lib,share}. What remains in /usr/local/bin is a small set of guarded CLI launchers (apl-feed, apl-wifi, apl-ssh, apl-aggregator) plus readsb/dump978-fa operator shims; third-party tar1090/graphs1090 read-only data keeps its conventional share location. Decoders, wrappers, render-status, and the web-config payload are reached through /opt/airplanes/current rather 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/bin or /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.

d4rken added 5 commits June 25, 2026 00:32
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.
@d4rken
d4rken marked this pull request as ready for review June 30, 2026 18:05
@d4rken
d4rken merged commit 8ede72f into dev Jun 30, 2026
18 of 19 checks passed
@d4rken
d4rken deleted the refactor/fhs-install-layout branch June 30, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant