Skip to content

refactor!: install the feeder under the /opt/airplanes FHS layout#144

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

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

Conversation

@d4rken

@d4rken d4rken commented Jun 24, 2026

Copy link
Copy Markdown
Member

Moves the feeder's standalone install onto the FHS layout the image already uses: payload under /opt/airplanes/current, mutable state under /var/lib/airplanes/runtime, and systemd units under /etc/systemd/system, instead of the old /usr/local/share/airplanes tree, /lib units, and /usr/bin binary. The result is one install layout whether the feeder came from the image or a manual install.

Feeders on the previous layout are migrated automatically on their next update: the new layout is installed, the feeder UUID is carried into /etc/airplanes/feeder-id, and the old tree and units are removed. /etc/airplanes is never touched, so identity and configuration are preserved.

d4rken added 5 commits June 24, 2026 21:52
Payload moves under /opt/airplanes/current, state under /var/lib/airplanes/runtime, units under /etc/systemd/system — matching the image layout. Upgrades from the old /usr/local/share/airplanes layout relocate automatically; /etc/airplanes is preserved.

BREAKING CHANGE: the install layout changed; feeders on the old layout are relocated on the next update, preserving feeder identity.
Phase 1 installs origin/main, whose scripts hardcode /usr/local/share/airplanes; only the post-candidate assertions use the new /opt + /var/lib + /run layout.
The /etc/airplanes/image-install marker only exists on overlay images, so a
legacy ROM (baked /usr/bin/airplanes-feeder, pre-marker) was misclassified as a
manual install and dropped into interactive setup on update. Detect the legacy
binary too — a read, not a /usr/bin write — gated on a present config source.
Legacy images (baked /usr/bin/airplanes-feeder, /boot config) lack the image-install marker. Restore that signal in the feed-binary resolver and the daemon/CLI config readers, keep the apl-feed symlink relative, and broaden the pre-FHS cleanup.
The legacy mounted-image and QEMU boot smokes still asserted the pre-FHS /usr/local paths and flat /run state dirs. Point them at /opt/airplanes/current, the $STATE version stamps, and the nested /run/airplanes/{feed,mlat} state files.
@d4rken d4rken marked this pull request as ready for review June 30, 2026 13:48
@d4rken d4rken merged commit 481adbf into dev Jun 30, 2026
12 of 13 checks passed
@d4rken d4rken deleted the refactor/fhs-install-layout branch June 30, 2026 13:48
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