Skip to content

Automate source tracking, testing snapshots and stable promotion - #14

Merged
DjDeveloperr merged 16 commits into
mainfrom
feat/update-automation-20261023
Oct 23, 2026
Merged

DjDeveloperr merged 16 commits into
mainfrom
feat/update-automation-20261023

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Automates ALARM updates from source branch to installed Macs. Overview, threat model and key procedures: aurora-distributions docs/updates.md (aurora-silicon/aurora-distributions#5); runbook: docs/updates.md here.

Source tracking (track-sources.yml, scripts/track-sources.py, tracking.json): every 30 minutes once TRACK_SOURCES=true, moves aura (aura main), kernel-aurora (aurora-silicon/linux integration/aurora) and mesa-aurora (aurora-silicon/mesa aurora-wip) to their tips in one PR on auto/track-sources: sources.json, _commit, pkgver/pkgrel, aura's qualification record and checksum. Archives are proven against the commit's Git tree; the kernel/Mesa GPU UAPI is compared. It dispatches packages.yml on the PR head and merges when green (AUTO_MERGE_SOURCES), never on rewritten history, a kernel version change, an unverifiable archive or a UAPI conflict. Pins still in another repository (the kernel until #13 lands) are reported, not changed.

Publication (publish.yml): no run list. Picks the newest qualifying build of each recipe, carries unchanged recipes from the newest snapshot (signatures and digests checked), refuses version regressions, requests a main build for recipes that have none. Signs in the testing-signing environment, key on stdin of a network-less container; releases carry SHA256SUMS and an attestation. Deploys only with AUTO_DEPLOY_TESTING or deploy=yes. Explicit build-run still works.

Channels (deploy-snapshot.yml, promote.yml): Pages serves testing/aarch64 and stable/aarch64, each a copy of one signed snapshot; every deploy verifies signatures, attestation and the live database's versions and records channels.json on a channels branch. Stable takes what testing served, after a stable-promotion reviewer and STABLE_MIN_SOAK_HOURS.

Also: packages and images are attested; actions pinned by SHA; failed attempts upload under another artifact name; images.yml takes a channel (default testing, today's URL); aurora-keyring now runs pacman-key --populate aurora on upgrade (it never did, so a rotated key could not reach installed systems); optional image and payload rebuilds (AUTO_IMAGES, AUTO_PAYLOADS).

Flagged

  • Installed-system repo URLs do not change unless images are built with channel=stable.
  • Changing packages.yml makes every earlier build ineligible: the first publication after merge needs a full main build (it requests it itself). Merge after the 7.3 switch's snapshot is out, or accept one rebuild.
  • aurora-keyring gets pkgrel=2.

Tests

updatelib.py and trackerlib.py are shared verbatim with fedora-aurora and
nixos-aurora:

- downloads that retry rate limits and server errors with backoff that
  honours Retry-After, fall through to the next source on a checksum
  mismatch and never leave an unverified file in place
- Nix SRI hashes from the archive SHA-256
- a Git tree hash of a source archive, so a pinned hash is proven to be
  the archive of exactly the pinned commit
- pacman and RPM version comparison (checked against vercmp and rpm's
  own test vectors), used to refuse version regressions
- a GPU UAPI comparison of the kernel and Mesa headers with clang:
  constants, record sizes and field offsets both sides define must agree;
  size-versioned commands may grow at the end
- channel state on a `channels` branch, and the source-tracking PR and
  merge logic
track-sources.yml checks aurora-silicon/aura main, aurora-silicon/linux
integration/aurora and aurora-silicon/mesa aurora-wip every 30 minutes
once TRACK_SOURCES is true. A read-only job downloads each new archive,
proves it against the commit's Git tree, updates sources.json and the
PKGBUILDs (pkgver, pkgrel, _commit, and the aura qualification record's
checksum) and runs the repository checks. A second job commits that patch
to auto/track-sources, opens or refreshes one PR and dispatches the
package builds on its exact head.

With AUTO_MERGE_SOURCES true the PR is merged (merge commit, so the
dispatched build stays reusable) when every run on that head passed and
tracking.json's policy allows it: never on rewritten upstream history,
a kernel version change, an unverifiable archive or conflicting GPU UAPI.
A PR anyone else has pushed to is left alone. Pins whose repository
differs from the tracked one (the kernel, until it moves to
aurora-silicon/linux) are reported, not changed.

The same workflow keeps every pinned archive in a `source-cache` release.
On pull requests it runs as a dry run.
publish.yml now resolves the newest qualifying build of every recipe
itself (same rules as before: successful main or merged manual build,
unchanged recipe, pin and builder) and carries recipes without a current
build from the newest snapshot after checking their signatures and
manifest digests. A re-run's newest artifact wins over a failed
attempt's. When a recipe has no publishable build, it requests a main
build of exactly those recipes; the build's completion starts
publication again. Explicit build-run IDs still work.

The candidate is refused if any package version would go backwards
against the newest snapshot. Collection runs without secrets and
verifies the build provenance attestation of every package whose build
workflow records one. Signing happens in the testing-signing environment
on the verified candidate only, with the key on stdin of a container
without network; a dry run signs with a throwaway key and publishes
nothing. Releases get a SHA256SUMS and an attestation for every asset,
and deploy to testing only with AUTO_DEPLOY_TESTING or deploy=yes.

Automatic runs (after main builds, every 6 hours) start once
AUTO_PUBLISH_TESTING is true.
deploy-snapshot.yml takes a channel. Pages serves one site, so every
deployment assembles both testing/aarch64 and stable/aarch64 from their
immutable snapshot releases, verifies every package and database
signature against the committed key, the snapshot's attestation and that
no package goes backwards against the live database, then records the
change in channels.json on the `channels` branch.

promote.yml gives stable what testing serves after a stable-promotion
reviewer approves, only if testing has served it and it soaked for
STABLE_MIN_SOAK_HOURS. Rollbacks need the same approval.

build-image takes the channel installed systems follow; the default is
testing, today's URL. The firstboot finalizer is fetched through the
verified source cache with retries.
Package and image builds record GitHub build provenance for the exact
bytes they produce; publication verifies it. A failed build attempt keeps
its log under a name publication never reads. Third-party actions are
pinned by commit SHA and checkouts drop their credentials.

payload-after-images.yml can publish a signed payload release after each
successful image build (AUTO_PAYLOADS); a testing deploy can rebuild the
images (AUTO_IMAGES). Catalog adoption stays a separate step.

Changing packages.yml makes earlier builds ineligible for publication,
so the first publication after this change needs a full main build.
aurora-keyring installed its keyring files but never ran pacman-key on
upgrade, so a new Aurora key shipped in a later version would not have
been trusted by installed systems. The install script now populates the
aurora keyring on install and upgrade, the fingerprint file may list
several keys during a rotation, and an aurora-revoked file is shipped for
retiring one.
docs/updates.md is the ALARM runbook; the cross-distribution overview, threat model and key procedures live in aurora-distributions.
A Mesa pkgver of packaging date plus commit hash sorts by the hash when
two updates land on one day, so the second could look older to pacman.
The date part is now the upstream commit time (YYYYMMDDHHMM), which
grows along the branch, and the tracker refuses any update whose full
[epoch:]pkgver-pkgrel would not be newer than the current one. pkgrel
resets whenever the resulting version string changes.
A called workflow cannot exceed the permissions of its calling job; the optional image dispatch after a testing deploy needs actions: write.
The tracker runs the repository checks after moving pins, so these tests now use dates and directories no real pin can match.
publish.yml stops before signing when every package version equals the
newest snapshot's, unless explicit runs were given, so scheduled runs do
not mint identical snapshots. The tracker no longer rewrites commit IDs
inside PKGBUILD comments.
A carried package must match the snapshot manifest and its detached signature, and a recipe changed since that build cannot be carried.
A compiler error while laying out the GPU UAPI records now becomes a reported conflict with its message, instead of failing the whole plan.
Recent kernel UAPI headers include linux/bits.h, which the runner's
system headers lack; the kernel's own copy is used only where the system
has none, and a header that does not compile is now reported instead of
silently comparing nothing.

The workflow token cannot open pull requests while the repository keeps
"Allow GitHub Actions to create and approve pull requests" off. With
TRACKER_APP_CLIENT_ID set, the tracker uses a GitHub App token whose key
lives in the source-tracking environment; App merges also start the
normal push builds.
Point the payload callers at aurora-distributions 2225014, whose
build-payload.yml assembles without credentials, signs the catalog in a
small job that runs in this repository's catalog-signing environment,
and attests every payload asset. The calling jobs grant the id-token and
attestations permissions that needs.
@DjDeveloperr
DjDeveloperr merged commit fa86a7d into main Oct 23, 2026
45 of 48 checks passed
@DjDeveloperr
DjDeveloperr deleted the feat/update-automation-20261023 branch October 23, 2026 08:06
7robertodantas added a commit to 7robertodantas/alarm-aurora that referenced this pull request Nov 15, 2026
sources.json records the same pin (commit, tarball URL, archive root,
sha256 of the codeload tarball, which reproduces the recorded 099f2b9c
hash). The package still pinned 099f2b9c, from before the J575c, J614s, J713,
J714 and J815 audio changes merged in alsa-ucm-conf-asahi (aurora-silicon#6, aurora-silicon#10, aurora-silicon#14,
aurora-silicon#15, aurora-silicon#16). On a fresh alpha.21 install of a Mac Studio (J575c) there is
no "Mac Studio J575 Jack.conf", so PipeWire runs the jack card on
stereo-fallback, and the speaker card offers only pro-audio/off.

Tested on J575c (7.3.0-1-40-ARCH, aurora-audio 4.1.aurora2-16): with this
build the speaker card gets HiFi and "Mac Studio Speaker" (graph-j575)
plays through RawSpeakers (6-channel S24 PCM running, speakersafetyd
active); the jack card gets HiFi with a Headphones sink. Owner listening
test at 20% volume: speaker and headphones pass, and both outputs come
back after a reboot.

Signed-off-by: Roberto Dantas <7robertodantas@gmail.com>
Assisted-by: LLM (Claude Code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7robertodantas added a commit to 7robertodantas/alarm-aurora that referenced this pull request Nov 15, 2026
The package still pinned 099f2b9c, from before the J575c, J614s, J713,
J714 and J815 audio changes merged in alsa-ucm-conf-asahi (aurora-silicon#6, aurora-silicon#10, aurora-silicon#14,
aurora-silicon#15, aurora-silicon#16). On a fresh alpha.21 install of a Mac Studio (J575c) there is
no "Mac Studio J575 Jack.conf", so PipeWire runs the jack card on
stereo-fallback, and the speaker card offers only pro-audio/off.

Move the pin in the PKGBUILD and in sources.json (commit, tarball URL,
archive root and the codeload tarball's sha256; the same method
reproduces the recorded 099f2b9c hash).

Tested on J575c (7.3.0-1-40-ARCH, aurora-audio 4.1.aurora2-16): with this
build the speaker card gets HiFi and "Mac Studio Speaker" (graph-j575)
plays through RawSpeakers (6-channel S24 PCM running, speakersafetyd
active); the jack card gets HiFi with a Headphones sink. Owner listening
test at 20% volume: speaker and headphones pass, and both outputs come
back after a reboot.

Signed-off-by: Roberto Dantas <7robertodantas@gmail.com>
Assisted-by: LLM (Claude Code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RyanTheTide pushed a commit that referenced this pull request Nov 19, 2026
)

The package still pinned 099f2b9c, from before the J575c, J614s, J713,
J714 and J815 audio changes merged in alsa-ucm-conf-asahi (#6, #10, #14,
#15, #16). On a fresh alpha.21 install of a Mac Studio (J575c) there is
no "Mac Studio J575 Jack.conf", so PipeWire runs the jack card on
stereo-fallback, and the speaker card offers only pro-audio/off.

Move the pin in the PKGBUILD and in sources.json (commit, tarball URL,
archive root and the codeload tarball's sha256; the same method
reproduces the recorded 099f2b9c hash).

Tested on J575c (7.3.0-1-40-ARCH, aurora-audio 4.1.aurora2-16): with this
build the speaker card gets HiFi and "Mac Studio Speaker" (graph-j575)
plays through RawSpeakers (6-channel S24 PCM running, speakersafetyd
active); the jack card gets HiFi with a Headphones sink. Owner listening
test at 20% volume: speaker and headphones pass, and both outputs come
back after a reboot.


Assisted-by: LLM (Claude Code)

Signed-off-by: Roberto Dantas <7robertodantas@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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