Skip to content

Cut over image build to runtime-overlay release - #158

Merged
d4rken merged 8 commits into
devfrom
feat/b3a-stage-cutover
May 21, 2026
Merged

Cut over image build to runtime-overlay release#158
d4rken merged 8 commits into
devfrom
feat/b3a-stage-cutover

Conversation

@d4rken

@d4rken d4rken commented May 21, 2026

Copy link
Copy Markdown
Member

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.

d4rken added 5 commits May 21, 2026 16:05
…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
d4rken force-pushed the feat/b3a-stage-cutover branch from 678e95f to 4fd428a Compare May 21, 2026 14:06
d4rken added 3 commits May 21, 2026 16:13
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.
@d4rken
d4rken merged commit 3d6319a into dev May 21, 2026
18 checks passed
@d4rken
d4rken deleted the feat/b3a-stage-cutover branch May 21, 2026 15:17
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