Skip to content

Build the omarchy package pair for aarch64 - #275

Open
maralcbr wants to merge 2 commits into
omacom:masterfrom
maralcbr:omacom/pkgbuild-portability
Open

Build the omarchy package pair for aarch64#275
maralcbr wants to merge 2 commits into
omacom:masterfrom
maralcbr:omacom/pkgbuild-portability

Conversation

@maralcbr

@maralcbr maralcbr commented Sep 2, 2026

Copy link
Copy Markdown

Summary

Build the omarchy / omarchy-settings pair (and the -dev pair) for aarch64 alongside x86_64, and pin retroarch-joypad-autoconfig-git to a commit.

This is the first of a small series bringing the Apple Silicon (Asahi) work from maralcbr/omarchy-pkgs upstream. It contains only recipe changes; the aarch64 release plumbing (built on the existing x86_64 build host under QEMU, on its own timer) follows in a separate PR so each can be reviewed on its own.

Why the pair becomes arch-specific

The Omarchy payload is architecture-independent, but the package is not:

  • The dependency set differs. On x86_64 omarchy pulls the Limine + mkinitcpio hook + Snapper stack. On Apple Silicon the system boots through m1n1 + GRUB from the Asahi packages on Arch Linux ARM's kernel, so that stack does not apply, and Wi-Fi on the Broadcom parts needs the iwd backend.
  • The shipped /etc tree differs. mkinitcpio reads every file under /etc/mkinitcpio.conf.d/, so shipping omarchy_hooks.conf on aarch64 injects the Limine hooks into the Asahi kernel's initramfs. The Limine entry-tool config, the zram/zswap/oomd drop-ins and the zram-tuned vm.* sysctls belong to the x86_64 boot and memory stack.

makepkg only honours depends_x86_64, depends_aarch64 and optdepends_x86_64 on arch-specific packages, so arch=('any') becomes arch=('x86_64' 'aarch64'). The x86_64 package is byte-for-byte what it was apart from the filename suffix (-any becomes -x86_64). backup=() has no arch-suffixed form, so the x86_64-only entries are appended under [[ $CARCH == x86_64 ]] and each of those paths is removed from the aarch64 package in package().

What the aarch64 package leaves out

  • etc/limine-entry-tool.d/, etc/mkinitcpio.conf.d/, /usr/share/omarchy/default/limine/
  • etc/systemd/oomd.conf.d/, etc/systemd/zram-generator.conf, etc/tmpfiles.d/omarchy-zswap.conf, the user app.slice.d/10-oomd.conf and the zram vendor drop-in
  • etc/modprobe.d/omarchy-usb-autosuspend.conf
  • the limine-snapper-notify autostart entry
  • etc/sysctl.d/99-omarchy-sysctl.conf keeps only the TCP MTU probing line

The install scriptlet on Apple Silicon

omarchy-settings.install now applies the hardened cups-files.conf on every platform, then on Apple Silicon (aarch64 with apple, in the device-tree compatible string) keeps the Arch Linux ARM system identity: /etc/os-release stays a symlink to /usr/lib/os-release and the PAM, NSS, plymouth and skel overrides are not applied. This is the behaviour of the shipped Apple Silicon builds. If you would rather narrow it to just os-release, that is a one-line change and I am happy to make it.

retroarch-joypad-autoconfig-git

The recipe fetched the branch tip, so a rebuild on another architecture could package a different tree than the one already published. It is now pinned to a commit, with pkgver set to what that commit describes (1.22.0.r96.g0331510, as an aarch64 build of it reports). The old pkgver had drifted 72 commits behind the tip it was building.

Testing

  • makepkg --printsrcinfo for all five recipes under CARCH=aarch64 and CARCH=x86_64 in an Arch Linux ARM container: the arch-suffixed depends and backup entries land only under x86_64.
  • Real makepkg of omarchy-settings and omarchy for both CARCH values in the same container; the aarch64 package contains none of the paths listed above, the x86_64 package contains all of them, and .PKGINFO carries the split depends.
  • bin/omarchy-pkgs self-test and bin/omarchy-release self-test pass.
  • On a MacBook Pro M1 Pro (apple,j314s) running Omarchy on Asahi: pacman -U --print of both aarch64 packages against the live install resolves with no missing dependencies (iwd and NetworkManager already present, no Limine or Snapper requested). A full pacman -U of both packages plus their dependencies (1.36 GiB from Arch Linux ARM, the Asahi repo and an Omarchy aarch64 repo) in a privileged Arch Linux ARM container on the same machine, so the scriptlet sees the real device tree: it takes the Apple Silicon branch, /etc/os-release stays the distribution symlink, the PAM/NSS overrides are untouched, depends_aarch64 pulls iwd + networkmanager, and no Limine or Snapper package is installed.
  • The same recipe changes have shipped in every Apple Silicon release from the fork since July, including the 4.0.2 build installed and accepted on that M1 Pro on 2 September.

Follow-ups (separate PRs)

  • Builder flags for CI and resumed builds (OMARCHY_SKIP_BUILDER_IMAGE, OMARCHY_KEEP_BUILD_WORKSPACE, OMARCHY_DEFER_RUNTIME_DEPS).
  • aarch64 as a first-class architecture in the release pipeline (arch-aware check-versions, auto-release, a separate aarch64 timer, clean-repo, omarchy-release, and a keyring bootstrap for a not-yet-published aarch64 tree). Built on the same host as x86_64 via the QEMU path bin/build already has; expect roughly 5-10x the x86_64 wall time. This will carry Build aarch64 packages on native ARM64 runners #171 and Publish a reusable aarch64 repository artifact #223 with their authors' commits.
  • The Limine Gradle pin needed to build the Limine stack on Arch Linux ARM is already in Build the Quattro Limine stack on aarch64 #222.

The Omarchy payload is architecture-independent, but the package is not.
On x86_64 omarchy pulls the Limine + mkinitcpio hook + Snapper boot stack;
on Apple Silicon the system boots through m1n1 + GRUB from the Asahi
packages on Arch Linux ARM's kernel, so that stack does not apply, and
Wi-Fi on the Broadcom parts needs the iwd backend. The shipped /etc tree
differs too: mkinitcpio reads every file under /etc/mkinitcpio.conf.d/,
so shipping omarchy_hooks.conf on aarch64 injects the Limine hooks into
the Asahi kernel's initramfs, and the zram/zswap/oomd drop-ins and the
zram-tuned vm.* sysctls belong to the x86_64 memory stack.

makepkg only honours depends_<arch> and optdepends_<arch> on
arch-specific packages, so arch=('any') becomes ('x86_64' 'aarch64').
backup=() has no arch-suffixed form, so the x86_64-only entries are
appended under CARCH and each of those paths is removed from the aarch64
package in package(). The x86_64 package keeps exactly the contents it
had; only its filename suffix changes.

The install scriptlet applies the hardened cups-files.conf on every
platform, then on Apple Silicon keeps the Arch Linux ARM system identity
(/etc/os-release stays the distribution's symlink) instead of the
etc-overrides. The -dev pair carries the same change so the pairs stay in
lockstep.
The recipe fetched the branch tip, so a rebuild on another architecture
could package a different tree than the one already published. Pin the
source to a commit and set pkgver to what that commit describes
(1.22.0.r96.g0331510, as an aarch64 build of it reports); bump both
together from now on.
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