Build aarch64 packages on native ARM64 runners - #171
Conversation
The build system already supports aarch64 end to end -- bin/build, bin/sign, bin/update-repo and bin/sync-repo all take --arch, the Dockerfile bootstraps an Arch Linux ARM rootfs, and omarchy-keyring is published for aarch64 so that image can bootstrap -- but nothing runs it, so pkgs.omarchy.org serves no aarch64 tree. GitHub's ARM64 runners are free for public repositories, so the build needs no QEMU. The workflow is dispatch-only and takes an optional package list, and it stops at uploading artifacts: signing and syncing need credentials only a maintainer has.
The builder container works as its own uid 1000 user, while a GitHub runner is uid 1001, and make_dir_writable() chowns the mounted output directories to the host user. The container then cannot write its incremental omarchy-build database, pacman -Sy fails to open it, and no makedepends resolve -- the build dies on the first package. This is invisible on a workstation, where the developer is uid 1000 too.
|
There are now eight open aarch64 PRs on this repo and we're starting to collide. Posting a map here since this PR is the one several of the others already reference. How they fit
These are complementary rather than competing. #223 says so directly — it carries this branch's commits so it can be exercised today, and plans to rebase to only its follow-up commits once this merges. #240 is the mirror image: its Where we actually conflictUntil a few minutes ago three PRs flipped
I've removed those from this PR (see below), so what remains is #195 and #240, which also overlap on The diffs agree — Proposed sequencing
Happy to reorder if maintainers would rather take #240 first — the point is mainly that these want an order rather than parallel resolution of the same files. |
|
Re-reviewed at 60d8452 (previous pass was 913d235). Reviewed by Claude Opus 5 and by Codex at xhigh reasoning as an independent second reviewer; where the two agree below I say so, and Codex's independence is not currently guaranteed, so agreement is worth less than the two findings it contributed on its own. What changed since the last pass. The branch was rebased rather than extended: Still open, and new.
Re-verified clean at this head. No fork can reach this workflow: What was not tested. Nothing was executed. This repository has no test suite, and the only thing that can exercise a GitHub Actions workflow on Where this sits. Waiting on you for item 1 — a few lines in the header comment. Nothing was pushed to your branch. For the maintainer there is a sequencing question this comment's map understates: #223 does not carry this branch's workflow, it replaces |
|
@scottjones if you can land this one, i can rebase the prs i have that build on top. |
The maintainer recipe in the header comment published packages without a
database. bin/promote-build skips omarchy-build.db* when it moves packages
into the published tree, and bin/repo update is the only thing that runs the
repo-add that produces omarchy.db, so sign -> promote -> sync uploaded package
files that no pacman client could resolve. Add the update step, and thread
--mirror through all four: helpers/paths.sh defaults MIRROR to edge, so the
recipe as written would have read the wrong tree for a stable artifact.
The batching suggestion on timeout-minutes was not dependency-complete either.
build/build.sh builds only the named packages and counts a dependency only
when it is also in the selected set, and it configures the production
[omarchy] repo only when a database already exists, which is never true on a
clean runner. A batch containing omarchy without omarchy-settings fails at
makepkg -s on its pinned omarchy-settings=${pkgver}. Say what the input is
actually for rather than offering it as a way to split a full build.
The log upload could never match. LOG_DIR is logs/, written only by bin/repo,
and this workflow calls bin/build directly; build/build.sh writes no log files
at all. With if-no-files-found: ignore the step was silent about it, implying
a diagnostic artifact that never existed. The job log is the diagnostic.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Thanks — items 1, 2 and 3 are fixed in 7d50d88. All three were comment-only, so the workflow's behaviour is unchanged; what changed is that the comments no longer describe things that do not work. 1. Publish recipe (medium). Confirmed, and the diagnosis was exactly right. with 2. Batching advice (low). Confirmed. 3. Log upload (low). Confirmed, and slightly worse than described — not only does this workflow call 4. On the sequencing note at the end: agreed, and thanks for catching it — I had #223 as stacked on this branch, and it is a competing rewrite of the same file rather than a follow-up. That is worth settling before either merges. cc @birkskyum, since it changes what "rebase on top" means for #223 specifically — #221 and #222 are unaffected. |
Build aarch64 packages on native ARM64 runners
Omarchy runs on Apple Silicon today through @malik-na's
omarchy-mac, and the one thing that makes an
install slow is that every AUR package is compiled on the laptop.
pkgs.omarchy.orgservesno aarch64 tree, so there is nothing to download.
The interesting part is that this repo is already set up for it.
bin/build,bin/sign,bin/update-repoandbin/sync-repoall take--arch;build/Dockerfilebootstraps anArch Linux ARM rootfs with the ALARM keyring and
[alarm]/[aur]repos;sync-repowritesto
$MIRROR/$ARCH; andshould_build_for_arch()already skips packages whosearch=()excludes aarch64.
omarchy-keyringis even published for aarch64 so the ARM builder imagecan bootstrap. What is missing is something that runs it.
What this adds
A Build aarch64 Packages workflow on
ubuntu-24.04-arm— GitHub's ARM64 runners, freefor public repositories. The README currently tells you to emulate ARM64 on an x86_64 host
with QEMU and warns it is slower; a native runner removes the emulation.
It is
workflow_dispatchonly, so it costs nothing until someone triggers it, and takes anoptional package list so a full build can be run in batches.
It deliberately does not publish. Signing and syncing need the repository key and the
pkgs.omarchy.orgcredentials, so the workflow uploads packages as an artifact and leavesthe maintainer steps alone:
PKGBUILD changes
tensakuandtzupdatebuild cleanly on aarch64 — both are plain Rust builds with nothingarchitecture-specific — but carry
arch=('x86_64'). Both are AUR-synced, so the change is a.omarchy/patches/entry alongside the PKGBUILD edit, matching howumu-launcherand othershandle local modifications, so the next
sync-aurdoes not revert it.These two are not a guess: both are built and running on an M2 Max at the same versions in
this PR (
tensaku0.26.7,tzupdate3.1.0).Coverage
Of the 115 packages in
pkgbuilds/, 76 need no change at all — 52 already declareaarch64and 24 arearch=any. Most of the remaining 39 are legitimately x86-only(
nvidia-580xx-utils,intel-ipu7-camera,asusctl,supergfxctl,macbook12-spi-driver-dkms) or proprietary binaries with no ARM build.One build-system fix came out of this
The first CI run failed on the very first package, and the cause is worth flagging beyond
this PR.
bin/buildbind-mountsbuild-output/andpkgs.omarchy.org/into the buildercontainer, which works as the image's
builderuser — uid 1000, from theuseraddinbuild/Dockerfile. A GitHub runner is uid 1001, andmake_dir_writable()chowns thosedirectories to the host user, so the container loses write access.
repo-addthen failsto create the incremental
omarchy-build.db— silently, because its output goes to/dev/null—pacman -Sycannot open it, and every package dies with "Could not resolveall dependencies".
This is invisible on a workstation, where the developer is usually uid 1000 as well and the
two users coincide. It will affect anything that automates this repo on any runner whose uid
differs, on either architecture. The workflow opens the modes before
bin/buildruns, sincechownpreserves them; a deeper fix inmake_dir_writable()felt out of scope for this PR,as it would change behavior for the existing x86_64 flow.
Verification
Run on a native ARM64 runner, not described in theory:
uname -m=aarch64), so no emulation was involved.bin/build --arch aarch64 --package tzupdatereportedBuilt: 1 Failed: 0in roughly twominutes.
tzupdate-3.1.0-1-aarch64.pkg.tar.xz, whose.PKGINFOreadsarch = aarch64and whose/usr/bin/tzupdateis anELF 64-bit LSB pie executable, ARM aarch64.CI run for the verification above: https://github.com/scottjones/omarchy-pkgs/actions/runs/32306145100