Skip to content

Stage and manage the airplanes-stats wrapper in the runtime overlay - #224

Closed
d4rken wants to merge 1 commit into
devfrom
stats-overlay-fix
Closed

Stage and manage the airplanes-stats wrapper in the runtime overlay#224
d4rken wants to merge 1 commit into
devfrom
stats-overlay-fix

Conversation

@d4rken

@d4rken d4rken commented Jun 21, 2026

Copy link
Copy Markdown
Member

The runtime overlay shipped feed's airplanes-stats.service/.timer (picked up by the unit glob) but not the airplanes-stats.sh script they execute, and never symlinked or enabled the units. The wrapper scripts were staged from a hardcoded list and their manifest rows were maintained by hand, so when feed added the stats pusher the script silently fell through the cracks — a feeder updating to the overlay got a stats timer pointing at a missing ExecStart and never enabled.

This stages the daemon wrappers by glob (the same way the units are already globbed, so a new feed wrapper lands automatically), adds the airplanes-stats managed_paths symlinks (script + service + timer) and the timer to the systemd.json enable list.

It also closes the gap that let the broken overlay ship: exec-bit-check (which runs in the publish path) previously treated a unit Exec= of an unmanaged runtime-dir path as "host-installed, out of scope" and skipped it. It now fails the release when a unit references a script directly under the overlay runtime dir with no managed_paths symlink — scanning the whole Exec= line so an interpreter form (/bin/bash …/foo.sh) is covered too. Paths under managed directory symlinks (venv, apl-feed, lib) are excluded. A new bats assertion pins wrapper-script symmetry alongside the existing unit symmetry.

After this merges, a fresh dev build republishes the overlay with the stats pusher actually present and enabled.

The overlay globbed feed's airplanes-*.{service,timer} units but staged the
daemon wrapper scripts from a hardcoded list and listed their manifest rows
by hand. When feed added airplanes-stats.{sh,service,timer}, the units
shipped but airplanes-stats.sh was never staged, symlinked, or enabled, so a
feeder updating to the overlay got a stats timer pointing at a missing
ExecStart.

Stage the wrappers by glob (mirroring the unit glob), add the airplanes-stats
managed_paths symlinks plus the timer to systemd.json enable, and tighten
exec-bit-check so a unit that Exec=s an unmanaged script under the runtime dir
(direct or interpreter form) fails the release. That gate runs in the publish
path, so a future dropped wrapper can't reach a published overlay.
@d4rken d4rken added the bug Something isn't working label Jun 21, 2026
@d4rken

d4rken commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

Superseded by #227. This change predates the /opt/airplanes FHS layout (it targets /opt/airplanes-runtime and /usr/local/share/airplanes managed symlinks that the de-squat removed). #227 carries the FHS-correct stats wiring — the managed_paths symlinks and the timer enable — coupled with the config-stable feed-pin advance to the FHS feed, since the two are inseparable (the advanced feed pin is what brings the stats units the symmetry test then requires). Closing.

@d4rken d4rken closed this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant