Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/build-quattro-image-inputs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ on:
- patches/quattro-desktop-test-fixtures.patch
- pkgbuilds/omarchy-steam-fex/omarchy-launch-steam
- pkgbuilds/omarchy-mac/**
- pkgbuilds/asdcontrol/**
- pkgbuilds/tobi-try/**
- pkgbuilds/qemu-user-static/**
- pkgbuilds/avd-fw/**
- pkgbuilds/libva-v4l2_request-avd/**
push:
Expand All @@ -46,6 +49,9 @@ on:
- patches/quattro-desktop-test-fixtures.patch
- pkgbuilds/omarchy-steam-fex/omarchy-launch-steam
- pkgbuilds/omarchy-mac/**
- pkgbuilds/asdcontrol/**
- pkgbuilds/tobi-try/**
- pkgbuilds/qemu-user-static/**
- pkgbuilds/avd-fw/**
- pkgbuilds/libva-v4l2_request-avd/**
workflow_dispatch:
Expand Down Expand Up @@ -98,7 +104,7 @@ jobs:
run: python3 scripts/detect-quattro-image-inputs.py

build:
name: Build five candidate packages
name: Build nine candidate packages
needs: detect
if: needs.detect.outputs.needs_build == 'true'
runs-on: ubuntu-24.04-arm
Expand Down Expand Up @@ -188,7 +194,7 @@ jobs:
retention-days: 30

sign:
name: Sign five candidate packages
name: Sign nine candidate packages
needs: [detect, build]
if: github.repository == 'omarchy-mac/omarchy-pkgs-aarch64' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && (inputs.source_ref == '' || inputs.source_ref == 'quattro-upstream')
runs-on: ubuntu-24.04
Expand Down
10 changes: 10 additions & 0 deletions docs/quattro-extra-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Additional experimental image dependencies

The full Quattro base list requires `asdcontrol`, `tobi-try`, and `qemu-user-static-binfmt`. They were absent from the captured 50-package edge snapshot. QEMU's binfmt package also requires `qemu-user-static`.

These recipes are imported without modification for candidate validation. They are not added to `packages.json` and must not be published to edge as part of this image work.

- `asdcontrol/PKGBUILD`, `asdcontrol/asdcontrol.sudoers`, and `tobi-try/PKGBUILD`: omacom/omarchy-pkgs commit `4b60e4cd95972c16fbf3da634522a955cf7bf36c`. Existing maintainer attribution is preserved.
- `qemu-user-static/PKGBUILD` and `qemu-user-static/qemu-binfmt-conf.sh`: Marcelo's maralcbr/omarchy-pkgs commit `83973903b7deb9b56ce75f02b432fba0561d6293`. The recipe repackages the checksum-pinned Debian ARM64 static QEMU binaries because Arch Linux ARM omits the static user emulators. Preserve the upstream QEMU licenses and Debian copyright record shipped by the recipe.

All four outputs build successfully in a disposable native ARM container. The candidate builder now uses these recipes in its schema-3 nine-package artifact; the full image transaction and boot remain separate validation.
16 changes: 11 additions & 5 deletions docs/quattro-image-inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The suite runs with the exported desktop commands on `PATH`, plus the real `omar

The desktop pair shares `<source version>.quattro.r<source timestamp>.g<short SHA>` and a run-specific package release. The add-on retains `packages/omarchy-mac/version`, with a run-specific package release. These versions identify candidates; they do not define a future public release version or upgrade policy. Never promote a candidate merely because its version sorts above another package.

Successful builds retain one `quattro-image-inputs-<source SHA>-<build-input digest>` artifact containing all five package archives, `manifest.json`, `SHA256SUMS`, `ownership.json`, generated recipes and `.SRCINFO`, source package manifests, and test/build logs. The packages include their normal `.BUILDINFO` plus the recorded source revision. Failed runs retain diagnostic logs, but never a complete candidate artifact.
Successful builds retain one `quattro-image-inputs-<source SHA>-<build-input digest>` artifact containing all nine package archives, `manifest.json`, `SHA256SUMS`, `ownership.json`, generated recipes and `.SRCINFO`, source package manifests, and test/build logs. The packages include their normal `.BUILDINFO` plus the recorded source revision. Failed runs retain diagnostic logs, but never a complete candidate artifact.

For an equivalent local build on native aarch64, use clean, committed package tooling and existing Git checkouts containing the selected desktop commit and recipe pin:

Expand All @@ -38,15 +38,15 @@ Build tools must already be installed (`base-devel`, Git, Python, jq, Node.js, I

The desktop aggregate suite and standalone add-on suite pass. All packages record the same source commit, the desktop pair's dependency/version relationship matches, transferred microphone and Wi-Fi files belong only to the add-on, and no package payloads overlap. The add-on remains kernel-neutral and does not own administrator configuration under `/etc` or `/boot`.

This is not yet a complete image dependency snapshot or a boot qualification. `makepkg --nodeps` avoids installing the desktop into the build environment; runtime dependency resolution, actual installation hooks, system/user provisioning, signed repository selection, and physical boot are explicitly marked untested in the manifest. The next image-builder change must resolve the full base and Apple manifests against recorded dependency inputs, install all five candidates before hardware setup, and exercise the existing installer end to end. Temporary live staging and encrypted-copy experiments remain separate work.
This is not yet a complete image dependency snapshot or a boot qualification. `makepkg --nodeps` avoids installing the desktop into the build environment; runtime dependency resolution, actual installation hooks, system/user provisioning, signed repository selection, and physical boot are explicitly marked untested in the manifest. The next image-builder change must resolve the full base and Apple manifests against recorded dependency inputs, install all nine candidates before hardware setup, and exercise the existing installer end to end. Temporary live staging and encrypted-copy experiments remain separate work.

## Automatic candidate signing

Every new successful main-branch candidate build selecting exactly `quattro-upstream` (or leaving the source ref empty to use that default) automatically runs `Sign five candidate packages`. It reuses the existing signing helper and credentials in `package-signing-edge`, whose main-branch policy has no per-run human approval. The environment name does not select a publication destination. This job has only `contents: read`, uploads Actions artifacts, and never runs the edge publisher. The separate manual signing workflow is removed.
Every new successful main-branch candidate build selecting exactly `quattro-upstream` (or leaving the source ref empty to use that default) automatically runs `Sign nine candidate packages`. It reuses the existing signing helper and credentials in `package-signing-edge`, whose main-branch policy has no per-run human approval. The environment name does not select a publication destination. This job has only `contents: read`, uploads Actions artifacts, and never runs the edge publisher. The separate manual signing workflow is removed.

The source revision, unsigned artifact name and exact manifest checksum pass directly between jobs in the same run. The signing job checks out the detected package-tooling revision, rechecks the five package hashes, embedded revisions, versions, dependencies, ownership and package manifests, then loads the signing subkey. Signing runs without network access, executes no package scripts, and changes no archive bytes. PR builds and manual builds of other source refs remain unsigned. Forced rebuilds of `quattro-upstream` still sign automatically. No release or repository database is created, no feed is updated, and existing users receive nothing from this workflow.
The source revision, unsigned artifact name and exact manifest checksum pass directly between jobs in the same run. The signing job checks out the detected package-tooling revision, rechecks the nine package hashes, embedded revisions, versions, dependencies, ownership and package manifests, then loads the signing subkey. Signing runs without network access, executes no package scripts, and changes no archive bytes. PR builds and manual builds of other source refs remain unsigned. Forced rebuilds of `quattro-upstream` still sign automatically. No release or repository database is created, no feed is updated, and existing users receive nothing from this workflow.

The resulting `signed-quattro-image-inputs-<source SHA>-<build-input digest>` artifact contains the five archives and detached signatures, the original build manifest and its signature, both package lists and their signatures, a signed `signing.json` receipt, and new checksums. The original manifest retains `signing: none` to describe the build output; `signing.json` records the subsequent signing operation and exact input manifest digest. Build logs and recipes remain in the unsigned artifact. Signing tooling and keyring changes are included in the build-input digest and trigger a new candidate set.
The resulting `signed-quattro-image-inputs-<source SHA>-<build-input digest>` artifact contains the nine archives and detached signatures, the original build manifest and its signature, both package lists and their signatures, a signed `signing.json` receipt, and new checksums. The original manifest retains `signing: none` to describe the build output; `signing.json` records the subsequent signing operation and exact input manifest digest. Build logs and recipes remain in the unsigned artifact. Signing tooling and keyring changes are included in the build-input digest and trigger a new candidate set.

Consumers must verify the signatures against the reviewed public key and fingerprints in `pkgbuilds/omarchy-mac-keyring/signing-policy.json`, then verify the receipt's file hashes and selected source revision. The unsigned `SHA256SUMS` file is a convenience for transfer checks, not an authentication mechanism. Neither it nor a public key supplied by the artifact is a trust anchor. Signing authenticates the candidate; it does not establish installation or boot qualification. The image builder still needs that verification and dependency-installation integration.

Expand All @@ -59,3 +59,9 @@ A failed signing job currently causes a fresh ARM build on the next hourly attem
The candidate set now includes `avd-fw` and `libva-v4l2_request-avd` alongside the desktop trio. Their existing recipes and checksum-pinned upstream sources are exported from the recorded package-repository commit. Candidate-only release numbers and embedded recipe-revision markers distinguish these builds from edge. Firmware remains architecture `any`; the VA-API driver is `aarch64`. Generated recipes and `.SRCINFO` remain in the unsigned evidence artifact. The signed schema-2 manifest binds exactly five package archives; missing, extra, mixed-revision or wrongly architectured inputs fail before signing credentials are loaded.

This does not edit the two rolling recipes, `packages.json`, or edge publication workflows. Signing produces artifacts only. The image builder must explicitly select both signed video packages into its offline dependency closure before hardware setup; fetching substitutes from edge is not an accepted image build.

## Complete base-list gaps in schema 3

Schema 3 binds exactly nine archives: the desktop trio, both video dependencies, `asdcontrol`, `tobi-try`, `qemu-user-static`, and `qemu-user-static-binfmt`. The full image resolver found those last four missing from our 50-package dependency snapshot. The additional recipes have recorded upstream origins in [quattro-extra-dependencies.md](quattro-extra-dependencies.md); their generated candidates carry this package repository's exact revision. The QEMU split recipe builds once and produces two separately verified archives. `tobi-try` retains architecture `any`, and `asdcontrol` retains its version epoch.

These additions are artifact-only. They do not enter `packages.json`, the rolling updater, or edge. The independently signed 50-package snapshot remains unchanged and supplies the other custom dependencies. Image consumers must reject overlapping names between the two sets. Source builds, signing, and image transaction checks remain distinct pieces of evidence.
33 changes: 33 additions & 0 deletions pkgbuilds/asdcontrol/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Maintainer: Ryan Hughes <ryan@omarchy.org>
pkgname=asdcontrol
epoch=1
pkgver=0.6.0
pkgrel=2
pkgdesc="Control brightness on Apple Displays connected via USB-C"
arch=('x86_64' 'aarch64')
url="https://github.com/omakasui/asdcontrol"
license=('GPL2')
options=('!debug')
depends=('glibc' 'gcc-libs')
makedepends=('make' 'gcc')
source=(
"$pkgname-$pkgver.tar.gz::https://github.com/omakasui/asdcontrol/archive/refs/tags/v$pkgver.tar.gz"
'asdcontrol.sudoers'
)
sha256sums=(
'3112a6d5fc51a204c96ef9d27187577c6efc80b952e37a77969efbd0124e81d3'
'70d6838f91cf4b5e51974b9b62b141924cec844a2e60de79607839584ede847f'
)

build() {
cd "$srcdir/asdcontrol-$pkgver"
make
}

package() {
cd "$srcdir/asdcontrol-$pkgver"

install -Dm755 asdcontrol "$pkgdir/usr/bin/asdcontrol"
install -dm750 "$pkgdir/etc/sudoers.d"
install -m440 "$srcdir/asdcontrol.sudoers" "$pkgdir/etc/sudoers.d/50-asdcontrol"
}
3 changes: 3 additions & 0 deletions pkgbuilds/asdcontrol/asdcontrol.sudoers
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Deny arbitrary asdcontrol arguments before allowing only the operations Omarchy uses.
ALL ALL=(ALL) !/usr/bin/asdcontrol
%wheel ALL=(root) NOPASSWD: /usr/bin/asdcontrol ^--detect (/dev/(usb/)?hiddev[0-9]+)( /dev/(usb/)?hiddev[0-9]+)*$, /usr/bin/asdcontrol ^/dev/(usb/)?hiddev[0-9]+$, /usr/bin/asdcontrol ^/dev/(usb/)?hiddev[0-9]+ -- [+-]?[0-9]{1,3}%$
64 changes: 64 additions & 0 deletions pkgbuilds/qemu-user-static/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# aarch64-only build: Arch Linux ARM builds qemu without the static user-mode
# binaries, so the Omarchy default set (qemu-user-static-binfmt, used for
# foreign-architecture containers) repackages Debian's statically linked
# qemu-user build. On x86_64 both packages come from the Arch extra repository.

pkgbase=qemu-user-static
pkgname=('qemu-user-static' 'qemu-user-static-binfmt')
pkgver=10.0.11
_debver="1:10.0.11+ds-0+deb13u1+b1"
pkgrel=1
pkgdesc="A generic and open source machine emulator and virtualizer - static user-mode emulation"
arch=('aarch64')
url="https://www.qemu.org"
license=('GPL-2.0-only' 'LGPL-2.1-only')
source=("qemu-binfmt-conf.sh")
# Debian removes superseded pool files. Pin the official archive snapshot so
# the same checksum-verified binary remains rebuildable.
source_aarch64=("qemu-user_${pkgver}_arm64.deb::https://snapshot.debian.org/archive/debian/20260713T202617Z/pool/main/q/qemu/qemu-user_${_debver#*:}_arm64.deb")
sha256sums=('5e12ef484b8364e1ba7bae4acda837d2e6320ffbeb7fab341034124553cdb137')
sha256sums_aarch64=('6c9483063bf60f37fe181ead911251deabe40c893ea5829bc34b0b7b88913b6a')
noextract=("qemu-user_${pkgver}_arm64.deb")

prepare() {
mkdir -p deb
bsdtar -C deb -xf "qemu-user_${pkgver}_arm64.deb" data.tar.xz
bsdtar -C deb -xf deb/data.tar.xz ./usr/bin ./usr/share/doc/qemu-user/copyright
}

package_qemu-user-static() {
pkgdesc="A generic and open source machine emulator and virtualizer - static user-mode emulation"
depends=('glibc')
optdepends=('qemu-user-static-binfmt: binary format rules for foreign-architecture binaries')
provides=('qemu-user-static')
conflicts=('qemu-user-static-bin')

install -dm755 "$pkgdir/usr/bin"
local binary
for binary in deb/usr/bin/qemu-*; do
install -Dm755 "$binary" "$pkgdir/usr/bin/$(basename "$binary")-static"
done
install -Dm644 deb/usr/share/doc/qemu-user/copyright "$pkgdir/usr/share/licenses/$pkgname/copyright"
}

package_qemu-user-static-binfmt() {
pkgdesc="Binary format rules for the static QEMU user-mode emulators"
depends=('qemu-user-static')
provides=('qemu-user-binfmt-provider')
conflicts=('qemu-user-binfmt-provider' 'binfmt-qemu-static')

install -dm755 "$pkgdir/usr/lib/binfmt.d"
# HOST_ARCH keeps the native architecture out of the rule set regardless
# of the build host, so the package is identical under native and QEMU builds.
HOST_ARCH=aarch64 sh "$srcdir/qemu-binfmt-conf.sh" \
--systemd ALL \
--exportdir "$pkgdir/usr/lib/binfmt.d/" \
--qemu-path /usr/bin \
--qemu-suffix -static \
--persistent yes \
--preserve-argv0 yes
local conf
for conf in "$pkgdir"/usr/lib/binfmt.d/*.conf; do
mv "$conf" "${conf%.conf}-static.conf"
done
}
Loading
Loading