Cut over image build to runtime-overlay release - #158
Merged
Conversation
…ntime overlay New stage 02-install-runtime-overlay invokes the runtime-overlay install.sh in build mode against a pinned release tarball, replacing the in-chroot compile path for readsb, dump978, tar1090 and graphs1090. The legacy stages stay in-tree, SKIP-file gated by AIRPLANES_USE_LEGACY_DECODER_STAGES so the cutover is bisectable. dev defaults to the new path; stable keeps the legacy path until the first runtime-vX.Y.Z release.
Ship the shared install-common.sh helper in the release tarball so the recovery oneshot and self-update can source it. Seed tar1090 defaults, collectd config, and the collectd_to_disk cron entry from the release on first install. Gate the build-stage pubkey override behind an explicit opt-in env var so a stray CI env cannot silently swap verification to a test key.
Switching from env-var gating (AIRPLANES_USE_LEGACY_DECODER_STAGES) to file-presence (-L || -e) makes 06b idempotent under every stage-enumeration path: feed-overlay-smoke iterates stages in a docker container without honouring SKIP files and without sourcing config-dev, so it never sees the env var and would skip render-status. Presence check works whether the runtime overlay symlink, a prior plain file, or nothing is there.
stage 02-install-runtime-overlay invokes runtime-overlay/install.sh --build-mode which calls minisign -V to verify the downloaded release tarball before laying it into the rootfs. The verification runs on the build host, not in the chroot, so the apt entry in stage 00-prep/01-packages (which targets the rootfs) is not enough. Add minisign to depends, the GH Actions workflow apt-install, and the Dockerfile-based build container.
install.sh build-mode runs git rev-parse HEAD against $_self_dir, which walks UP through any ancestor .git — including the image repo's when the scratch source dir lives inside the work tree. That returns the image PR head, mismatching the pinned release's manifest commit_sha. Add an explicit AIRPLANES_RUNTIME_SKIP_SOURCE_SHA_CHECK opt-out and set it in stage 02-install-runtime-overlay. Minisign + manifest-version still pin tag↔manifest↔tarball identity; the in-tree source files are never copied to the device anyway.
d4rken
force-pushed
the
feat/b3a-stage-cutover
branch
from
May 21, 2026 14:06
678e95f to
4fd428a
Compare
manifest-generator.sh runs in stage 07-finalize from the host, where the on-device-absolute symlink target the runtime-manifest pointer uses doesn't resolve. Host-side bash -s test failed and the generator fell back to legacy per-component sentinels (which the new stage doesn't produce). Write a regular-file copy of the manifest in build mode; the first runtime self-update on-device replaces it with the symlink via mv -Tf.
Boot-smoke runs against a fresh-flashed image, so runtime-manifest.json is a regular-file copy (build-mode behaviour), not the symlink it becomes after the first on-device runtime self-update. Probe asserts presence + JSON parseability instead of symlink shape.
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.
A new stage-airplanes/02-install-runtime-overlay/ invokes the runtime-overlay install.sh in build mode against a release pinned by AIRPLANES_RUNTIME_OVERLAY_TAG, extracting the prebuilt readsb, dump978-fa, tar1090 and graphs1090 trees under the runtime overlay tree and flipping the current symlink. The stable FHS paths the image previously owned (decoder binaries, service units, lighttpd snippets, tar1090 + graphs1090 web roots, render-status + ASCII assets, motd hook) now resolve through the runtime overlay.
The three legacy decoder stages (02-install-decoder, 03-install-tar1090, 04-install-graphs1090) stay in tree, SKIP-file-gated by AIRPLANES_USE_LEGACY_DECODER_STAGES. Dev defaults to the new overlay path; stable keeps the legacy in-chroot compile until the first runtime-vX.Y.Z release is published. A separate follow-up deletes the legacy stages once the dev image proves green on the new path.
Adds minisign + the runtime-release public key to the image so on-device self-update can verify release signatures.