From c5e2722edba0640bc8aaaad0e9692a45c60a63ca Mon Sep 17 00:00:00 2001 From: Marcelo Alcantara Date: Sat, 10 Oct 2026 10:42:39 +1000 Subject: [PATCH 1/6] Ask omarchy-mac's platform questions through the Apple predicate omacom/omarchy now names Apple Silicon aarch64-apple, so comparing omarchy-hw-platform with apple-silicon skipped all of omarchy-mac's setup. omarchy-hw-apple-silicon answers on runtimes before and after the rename; tests stub the new names and keep one old-runtime case. Bump to 0.1.2. --- omarchy-mac/README.md | 8 ++++---- omarchy-mac/bin/omarchy-battery-charge-limit | 2 +- omarchy-mac/bin/omarchy-mac-setup-system | 4 ++-- omarchy-mac/lib/battery-charge-limit-restore | 2 +- omarchy-mac/lib/electron-desktop-entries | 2 +- omarchy-mac/lib/electron-launchers | 2 +- omarchy-mac/lib/steam-launcher | 2 +- omarchy-mac/lib/wifi-iwd-profiles | 2 +- omarchy-mac/lib/wifi-supported | 2 +- omarchy-mac/test/app-hooks-test.sh | 2 +- omarchy-mac/test/base-test.sh | 12 ++++++++++++ omarchy-mac/test/battery-test.sh | 9 +++++---- omarchy-mac/test/brcmfmac-quirk-test.sh | 5 +++-- omarchy-mac/test/desktop-setup-test.sh | 12 +++++------- omarchy-mac/test/platform-test.sh | 2 +- omarchy-mac/test/setup-test.sh | 16 +++++++--------- omarchy-mac/test/systemd-test.sh | 3 ++- omarchy-mac/test/wifi-profiles-test.sh | 3 ++- omarchy-mac/test/wifi-test.sh | 11 ++++++----- omarchy-mac/version | 2 +- .../{apple => aarch64-apple}/pacman.conf | 0 .../platforms/{apple => aarch64-apple}/platform | 0 .../{generic-aarch64 => aarch64}/pacman.conf | 0 .../{generic-aarch64 => aarch64}/platform | 0 24 files changed, 58 insertions(+), 45 deletions(-) rename tools/package-resolution/platforms/{apple => aarch64-apple}/pacman.conf (100%) rename tools/package-resolution/platforms/{apple => aarch64-apple}/platform (100%) rename tools/package-resolution/platforms/{generic-aarch64 => aarch64}/pacman.conf (100%) rename tools/package-resolution/platforms/{generic-aarch64 => aarch64}/platform (100%) diff --git a/omarchy-mac/README.md b/omarchy-mac/README.md index 0526e05..04c6b26 100644 --- a/omarchy-mac/README.md +++ b/omarchy-mac/README.md @@ -1,6 +1,6 @@ # omarchy-mac -Apple Silicon defaults and support services for Omarchy. Version: `0.1.1` (candidate). This add-on complements `omarchy` and `omarchy-settings`; it selects no kernel and contains no installer or repository trust configuration. It covers what stays on an installed Mac; installing one is the job of the [Omarchy Installer](https://github.com/omacom/omarchy-mac-installer), and boot support is the separate `omarchy-mac-boot` package beside this one. +Apple Silicon defaults and support services for Omarchy. Version: `0.1.2` (candidate). This add-on complements `omarchy` and `omarchy-settings`; it selects no kernel and contains no installer or repository trust configuration. It covers what stays on an installed Mac; installing one is the job of the [Omarchy Installer](https://github.com/omacom/omarchy-mac-installer), and boot support is the separate `omarchy-mac-boot` package beside this one. ## Build and stage @@ -10,9 +10,9 @@ Runtime dependencies: `omarchy` (the `omarchy-hw-platform` detector and its Appl ## Setup contract -Upgrade the matching runtime, settings and add-on candidates in one pacman transaction. Their transferred commands and user unit must have only one owner. A fresh Apple Silicon install takes two transactions before `omarchy-apply-system`: first one that installs the settings package, then one that installs the platform's default set (`omarchy-pkg-defaults apple-silicon`: the base, aarch64 and Apple lists, this add-on included). The settings package's pacman platform guard checks only transactions that start after it is installed, so no Apple package may share a transaction with it; the runtime can go in either. The recipe must tag this package with `groups=('omarchy-platform-apple-silicon')`; the desktop's `docs/platform-guard.md` has the contract. The desktop's last hardware leaf runs this package's system setup through the dispatcher, and offline setup never downloads it: a Mac without it keeps Omarchy's generic setup. +Upgrade the matching runtime, settings and add-on candidates in one pacman transaction. Their transferred commands and user unit must have only one owner. A fresh Apple Silicon install takes two transactions before `omarchy-apply-system`: first one that installs the settings package, then one that installs the platform's default set (`omarchy-pkg-defaults aarch64-apple`: the base, aarch64 and Apple lists, this add-on included). The settings package's pacman platform guard checks only transactions that start after it is installed, so no Apple package may share a transaction with it; the runtime can go in either. The recipe must tag this package with `groups=('omarchy-platform-apple-silicon')`; the desktop's `docs/platform-guard.md` has the contract. The desktop's last hardware leaf runs this package's system setup through the dispatcher, and offline setup never downloads it: a Mac without it keeps Omarchy's generic setup. -Run `omarchy-mac-setup-system` as root on the target hardware (inside its target chroot for offline provisioning). An optional absolute root argument supports staging against the same target hardware without a bus. It exits without changes unless `omarchy-hw-platform` reports `apple-silicon`, and fails if the detector does. It removes the Intel Mac Broadcom quirk (`options brcmfmac feature_disable=0x82000`, which breaks Apple Silicon Wi-Fi) from `/etc/modprobe.d/brcmfmac.conf` wherever an unguarded runtime migration appended it: only that exact line, with the comment block and blank line written right above it, goes; the file goes when nothing but blank lines is left, a link is left alone with the manual fix, and the initramfs rebuild it owes is recorded under `/var/lib/omarchy/migrations/1789172112-initramfs-pending`, which the runtime's migration finishes. It enables resume recovery only for BCM4378, BCM4387 and BCM4388 on Apple Silicon; Intel/T2 Macs are excluded. It is the only enabler of `speakersafetyd`, without which the kernel keeps the speakers muted: it applies the package's `80-omarchy-mac-audio.preset` once speakersafetyd is installed, so `/etc` presets that sort before it or replace it by name, masks and later explicit disables win, and image builders that apply presets get the same result. A live run also restarts a speakersafetyd left dead by a start-limit. No NetworkManager restart or driver reload occurs during setup. The backend applies when NetworkManager next starts; notch changes apply when appledrm next loads. A live run gives iwd a profile for each Wi-Fi network NetworkManager saved with its key before the switch, as NetworkManager itself does for a new connection, so saved networks keep connecting instead of reading as a wrong password. The greeter drop-in needs no setup: from the next `sddm` start it holds the greeter, for at most 10 s, until Apple's display controller has replaced the boot framebuffer. +Run `omarchy-mac-setup-system` as root on the target hardware (inside its target chroot for offline provisioning). An optional absolute root argument supports staging against the same target hardware without a bus. It exits without changes unless the runtime's Apple predicate `omarchy-hw-apple-silicon` holds (`omarchy-hw-platform` reports `aarch64-apple`, or `apple-silicon` on a runtime from before the platform rename), and fails if the detector does. It removes the Intel Mac Broadcom quirk (`options brcmfmac feature_disable=0x82000`, which breaks Apple Silicon Wi-Fi) from `/etc/modprobe.d/brcmfmac.conf` wherever an unguarded runtime migration appended it: only that exact line, with the comment block and blank line written right above it, goes; the file goes when nothing but blank lines is left, a link is left alone with the manual fix, and the initramfs rebuild it owes is recorded under `/var/lib/omarchy/migrations/1789172112-initramfs-pending`, which the runtime's migration finishes. It enables resume recovery only for BCM4378, BCM4387 and BCM4388 on Apple Silicon; Intel/T2 Macs are excluded. It is the only enabler of `speakersafetyd`, without which the kernel keeps the speakers muted: it applies the package's `80-omarchy-mac-audio.preset` once speakersafetyd is installed, so `/etc` presets that sort before it or replace it by name, masks and later explicit disables win, and image builders that apply presets get the same result. A live run also restarts a speakersafetyd left dead by a start-limit. No NetworkManager restart or driver reload occurs during setup. The backend applies when NetworkManager next starts; notch changes apply when appledrm next loads. A live run gives iwd a profile for each Wi-Fi network NetworkManager saved with its key before the switch, as NetworkManager itself does for a new connection, so saved networks keep connecting instead of reading as a wrong password. The greeter drop-in needs no setup: from the next `sddm` start it holds the greeter, for at most 10 s, until Apple's display controller has replaced the boot framebuffer. Run `omarchy-mac-setup-user` as each target user with their HOME/XDG directories. It enables the vendor unit without a session bus. It writes nothing into the user's Hyprland files; a block an earlier version appended to `input.lua` or `looknfeel.lua` stays, as the user's. With a live bus, reached only through XDG_RUNTIME_DIR (which `sudo -i` clears), it reloads the user manager, reports the effective unit and starts the mapper. The mapper makes its stereo monitor the default input only if a brief sample finds signal, and hands a silent one back to the DSP source. A muted mapping, on either side (the mute key mutes the sink side while the monitor is the default), is the user's microphone mute and is left alone. Provisioning and first run call setup; subsequent session starts only start the enabled unit, without reloading the user manager or repeating setup. The first desktop session does not depend on a bus existing during installation. Custom fragments, masks, activation links and headset or speaker policies are preserved; setup markers preserve explicit disables after initial setup. User gain state remains in `omarchy/asahi-mic-gain.json` under XDG_STATE_HOME. The desktop saves that state before restarting audio. @@ -46,7 +46,7 @@ The default decodes H.264, HEVC and VP9 on the Apple Video Decoder with copy-bac ## Battery charge limit -`omarchy battery charge limit [80|100]` shows or sets the `macsmc-battery` charge thresholds and refuses unless `omarchy-hw-platform` reports `apple-silicon`. It writes only the end threshold through `sudo`, since the driver derives the start threshold (80 restarts charging at 75; 100 restores full charging), and checks the SMC's readback. Full charging stays the default. +`omarchy battery charge limit [80|100]` shows or sets the `macsmc-battery` charge thresholds and refuses unless `omarchy-hw-apple-silicon` holds. It writes only the end threshold through `sudo`, since the driver derives the start threshold (80 restarts charging at 75; 100 restores full charging), and checks the SMC's readback. Full charging stays the default. A set limit is saved as `CHARGE_CONTROL_END_THRESHOLD=` in `/etc/udev/macsmc-battery.conf`, the file asahi-scripts' own rule restores from, so both agree on one value. The package's udev rule runs `/usr/lib/omarchy-mac/battery-charge-limit-restore` when the SMC battery appears at boot; it reapplies a saved 80 or 100 on Apple Silicon and otherwise leaves the SMC alone. Nothing needs enabling. diff --git a/omarchy-mac/bin/omarchy-battery-charge-limit b/omarchy-mac/bin/omarchy-battery-charge-limit index 8f97f36..0b23f99 100755 --- a/omarchy-mac/bin/omarchy-battery-charge-limit +++ b/omarchy-mac/bin/omarchy-battery-charge-limit @@ -33,7 +33,7 @@ case "$limit" in *) usage ;; esac -if ! platform=$(omarchy-hw-platform) || [[ $platform != "apple-silicon" ]]; then +if ! omarchy-hw-apple-silicon; then echo "The battery charge limit is only available on Apple Silicon Macs." >&2 exit 1 fi diff --git a/omarchy-mac/bin/omarchy-mac-setup-system b/omarchy-mac/bin/omarchy-mac-setup-system index d5813f7..9e84347 100755 --- a/omarchy-mac/bin/omarchy-mac-setup-system +++ b/omarchy-mac/bin/omarchy-mac-setup-system @@ -7,8 +7,8 @@ root=${1:-/} root=${root%/} [[ -z $root || $root == /* ]] || exit 2 # A detector failure stops setup rather than reading as another platform. -platform=$(omarchy-hw-platform) -[[ $platform == "apple-silicon" ]] || exit 0 +omarchy-hw-platform >/dev/null +omarchy-hw-apple-silicon || exit 0 # The Intel Mac Broadcom quirk breaks Apple Silicon Wi-Fi, but a runtime without # its Apple guard (migration 1786391100) appended it here. Only its exact line diff --git a/omarchy-mac/lib/battery-charge-limit-restore b/omarchy-mac/lib/battery-charge-limit-restore index 0dd8022..d1341b5 100755 --- a/omarchy-mac/lib/battery-charge-limit-restore +++ b/omarchy-mac/lib/battery-charge-limit-restore @@ -6,7 +6,7 @@ set -euo pipefail saved_file="/etc/udev/macsmc-battery.conf" end_file="/sys/class/power_supply/macsmc-battery/charge_control_end_threshold" -[[ $(omarchy-hw-platform 2>/dev/null) == "apple-silicon" ]] || exit 0 +omarchy-hw-apple-silicon 2>/dev/null || exit 0 [[ -r $saved_file && -w $end_file ]] || exit 0 limit="" diff --git a/omarchy-mac/lib/electron-desktop-entries b/omarchy-mac/lib/electron-desktop-entries index 83f696a..22a6a28 100755 --- a/omarchy-mac/lib/electron-desktop-entries +++ b/omarchy-mac/lib/electron-desktop-entries @@ -6,7 +6,7 @@ # a wrapper that is not ready yet (exit 3 or 4 from --check) is skipped, and # so is a runtime without the helpers. set -euo pipefail -[[ $(omarchy-hw-platform) == "apple-silicon" ]] || exit 0 +omarchy-hw-apple-silicon || exit 0 for helper in omarchy-cmd-electron-gl-wrap omarchy-cmd-desktop-exec-repair; do if ! command -v "$helper" >/dev/null; then echo "Skipping Electron desktop repair: the runtime has no $helper" >&2 diff --git a/omarchy-mac/lib/electron-launchers b/omarchy-mac/lib/electron-launchers index 8f188d6..9f935e4 100755 --- a/omarchy-mac/lib/electron-launchers +++ b/omarchy-mac/lib/electron-launchers @@ -8,7 +8,7 @@ # launcher an administrator owns (exit 3) is kept. A runtime without the # helper ships no wrapping, so there is nothing to install. set -euo pipefail -[[ $(omarchy-hw-platform) == "apple-silicon" ]] || exit 0 +omarchy-hw-apple-silicon || exit 0 if ! command -v omarchy-cmd-electron-gl-wrap >/dev/null; then echo "Skipping Electron launchers: the runtime has no omarchy-cmd-electron-gl-wrap" >&2 exit 0 diff --git a/omarchy-mac/lib/steam-launcher b/omarchy-mac/lib/steam-launcher index 7587b8a..9c126bc 100755 --- a/omarchy-mac/lib/steam-launcher +++ b/omarchy-mac/lib/steam-launcher @@ -5,7 +5,7 @@ # it. An image's first boot (OMARCHY_MAC_SETUP_OFFLINE=1) may be offline and # downloads nothing; Steam is never part of an image anyway. set -euo pipefail -[[ $(omarchy-hw-platform) == "apple-silicon" ]] || exit 0 +omarchy-hw-apple-silicon || exit 0 [[ ${OMARCHY_MAC_SETUP_OFFLINE:-} != "1" ]] || exit 0 if pacman -Q steam >/dev/null 2>&1 && ! pacman -Q omarchy-steam-fex >/dev/null 2>&1; then echo "Installing the Steam FEX launcher" diff --git a/omarchy-mac/lib/wifi-iwd-profiles b/omarchy-mac/lib/wifi-iwd-profiles index 08f92c9..fc5226a 100755 --- a/omarchy-mac/lib/wifi-iwd-profiles +++ b/omarchy-mac/lib/wifi-iwd-profiles @@ -17,7 +17,7 @@ export LC_ALL=C dir=${OMARCHY_MAC_IWD_STATE:-/var/lib/iwd} -[[ $(omarchy-hw-platform) == "apple-silicon" ]] || exit 0 +omarchy-hw-apple-silicon || exit 0 NetworkManager --print-config 2>/dev/null | grep -x 'wifi.backend=iwd' >/dev/null || exit 0 # iwd reads the file like a GKeyFile: a backslash and a leading space escape. diff --git a/omarchy-mac/lib/wifi-supported b/omarchy-mac/lib/wifi-supported index ac21e23..78dba53 100755 --- a/omarchy-mac/lib/wifi-supported +++ b/omarchy-mac/lib/wifi-supported @@ -1,4 +1,4 @@ #!/bin/bash # BCM4378, BCM4387 and BCM4388. T2 Macs share some of these IDs, so the platform decides first. set -o pipefail -[[ $(omarchy-hw-platform) == "apple-silicon" ]] && lspci -nn | grep -E '14e4:(4425|4433|4434)' >/dev/null +omarchy-hw-apple-silicon && lspci -nn | grep -E '14e4:(4425|4433|4434)' >/dev/null diff --git a/omarchy-mac/test/app-hooks-test.sh b/omarchy-mac/test/app-hooks-test.sh index 3eec769..a8c3005 100755 --- a/omarchy-mac/test/app-hooks-test.sh +++ b/omarchy-mac/test/app-hooks-test.sh @@ -19,7 +19,7 @@ mkdir -p "$work/bin" "$work/home" for command in sudo omarchy-pkg-drop omarchy-launch-steam omarchy-hw-platform; do case $command in sudo) body='echo "sudo $*" >>"$CALLS"; "$@"' ;; - omarchy-hw-platform) body='echo apple-silicon' ;; + omarchy-hw-platform) body='echo aarch64-apple' ;; *) body='echo "${0##*/} $*" >>"$CALLS"; exit "${FAIL_STATUS:-0}"' ;; esac printf '#!/bin/bash\n%s\n' "$body" >"$work/bin/$command" diff --git a/omarchy-mac/test/base-test.sh b/omarchy-mac/test/base-test.sh index eaf9f78..b1df23b 100755 --- a/omarchy-mac/test/base-test.sh +++ b/omarchy-mac/test/base-test.sh @@ -3,3 +3,15 @@ ROOT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd) export ROOT pass() { printf 'ok - %s\n' "$1"; } fail() { printf 'not ok - %s %s\n' "$1" "${2:-}" >&2; exit 1; } +# The runtime's Apple predicate over the stubbed detector, which names a Mac +# aarch64-apple, or apple-silicon on a runtime from before the platform rename. +stub_apple_predicate() { + cat >"$1/omarchy-hw-apple-silicon" <<'STUB' +#!/bin/bash +case $(omarchy-hw-platform) in + aarch64-apple | apple-silicon) exit 0 ;; + *) exit 1 ;; +esac +STUB + chmod +x "$1/omarchy-hw-apple-silicon" +} diff --git a/omarchy-mac/test/battery-test.sh b/omarchy-mac/test/battery-test.sh index e6c518f..3ff5025 100644 --- a/omarchy-mac/test/battery-test.sh +++ b/omarchy-mac/test/battery-test.sh @@ -33,12 +33,13 @@ fixture "$stage/usr/lib/omarchy-mac/battery-charge-limit-restore" "$restore" cat >"$work/bin/omarchy-hw-platform" <<'STUB' #!/bin/bash -if [[ ${PLATFORM:-apple-silicon} == "contradiction" ]]; then +if [[ ${PLATFORM:-aarch64-apple} == "contradiction" ]]; then echo "Error: contradictory platform identity" >&2 exit 1 fi -echo "${PLATFORM:-apple-silicon}" +echo "${PLATFORM:-aarch64-apple}" STUB +stub_apple_predicate "$work/bin" # The SMC derives the start threshold from the end threshold. cat >"$work/bin/sudo" <<'STUB' #!/bin/bash @@ -113,7 +114,7 @@ done reads 100 100 && [[ ! -s $SUDO_LOG ]] || fail 'invalid input leaves the limit unchanged' pass 'rejects unsupported limits without changing the device' -for platform in qualcomm generic-aarch64 generic contradiction; do +for platform in qualcomm aarch64 x86 contradiction; do for args in '' 80 100; do # shellcheck disable=SC2086 if PLATFORM=$platform "$command" $args >/dev/null 2>&1; then fail "$platform refuses ${args:-status}"; fi @@ -153,7 +154,7 @@ for content in 'CHARGE_CONTROL_END_THRESHOLD=85' 'CHARGE_CONTROL_END_THRESHOLD=6 untouched "$restore" || fail "ignores saved content: $content" done printf 'CHARGE_CONTROL_END_THRESHOLD=80\n' >"$saved" -for platform in qualcomm generic-aarch64 generic contradiction; do +for platform in qualcomm aarch64 x86 contradiction; do PLATFORM=$platform untouched "$restore" || fail "$platform leaves the battery alone" done rm "$battery/charge_control_end_threshold" diff --git a/omarchy-mac/test/brcmfmac-quirk-test.sh b/omarchy-mac/test/brcmfmac-quirk-test.sh index 178bc92..5949684 100644 --- a/omarchy-mac/test/brcmfmac-quirk-test.sh +++ b/omarchy-mac/test/brcmfmac-quirk-test.sh @@ -9,8 +9,9 @@ trap 'rm -rf "$work"' EXIT mkdir -p "$work/bin" cat >"$work/bin/omarchy-hw-platform" <<'STUB' #!/bin/bash -echo "${PLATFORM:-apple-silicon}" +echo "${PLATFORM:-aarch64-apple}" STUB +stub_apple_predicate "$work/bin" cat >"$work/bin/lspci" <<'STUB' #!/bin/bash echo "Broadcom [14e4:4433]" @@ -83,7 +84,7 @@ for line in '#options brcmfmac feature_disable=0x82000' 'options brcmfmac featur done reset printf '\n%s\n' "$block" >"$conf" -PLATFORM=generic setup +PLATFORM=x86 setup [[ -f $conf && ! -e $pending ]] || fail 'a machine that is not a Mac is untouched' reset printf '\n%s\n' "$block" >"$work/target" diff --git a/omarchy-mac/test/desktop-setup-test.sh b/omarchy-mac/test/desktop-setup-test.sh index 257577c..875af1c 100644 --- a/omarchy-mac/test/desktop-setup-test.sh +++ b/omarchy-mac/test/desktop-setup-test.sh @@ -49,12 +49,9 @@ pass 'the setup entrypoints, platform files and Electron helpers are staged' mkdir -p "$work/bin" "$work/apps" cat >"$work/bin/omarchy-hw-platform" <<'STUB' #!/bin/bash -echo "${PLATFORM:-apple-silicon}" -STUB -cat >"$work/bin/omarchy-hw-apple-silicon" <<'STUB' -#!/bin/bash -[[ $(omarchy-hw-platform) == "apple-silicon" ]] +echo "${PLATFORM:-aarch64-apple}" STUB +stub_apple_predicate "$work/bin" cat >"$work/bin/lspci" <<'STUB' #!/bin/bash echo "Broadcom [14e4:4433]" @@ -98,6 +95,7 @@ grep -q 'Preserving administrator-owned chromium launcher' <<<"$output" && grep if WRAP_1PASSWORD=1 "$launchers" >/dev/null 2>&1; then fail 'a wrapper that fails fails setup'; fi mkdir -p "$work/bare" ln -s "$work/bin/omarchy-hw-platform" "$work/bare/omarchy-hw-platform" +ln -s "$work/bin/omarchy-hw-apple-silicon" "$work/bare/omarchy-hw-apple-silicon" : >"$CALLS" output=$(PATH="$work/bare" "$launchers" 2>&1) || fail 'a runtime without the wrapper helper does not fail setup' "$output" grep -q 'runtime has no omarchy-cmd-electron-gl-wrap' <<<"$output" || fail 'a runtime without the wrapper helper is named' "$output" @@ -144,7 +142,7 @@ pass "user setup writes nothing into the user's input.lua" flags="$HOME/.config/brave-flags.conf" printf '%s\n' '--ozone-platform=wayland' >"$flags" -PLATFORM=generic-aarch64 "$setup_user" "$stage" +PLATFORM=aarch64 "$setup_user" "$stage" [[ $(<"$flags") == '--ozone-platform=wayland' ]] || fail 'other platforms keep browser hardware decode' "$setup_user" "$stage" [[ $(<"$flags") == $'--ozone-platform=wayland\n--disable-features=AcceleratedVideoDecoder' ]] || fail 'a plain flags file gets the decode workaround' "$(cat "$flags")" @@ -215,7 +213,7 @@ INSTALLED_PACKAGES="steam omarchy-steam-fex" "$steam_launcher" ! grep -q '^pacman -S' "$CALLS" || fail 'an installed launcher is left alone' if INSTALLED_PACKAGES="steam" PACMAN_STATUS=1 "$steam_launcher" >/dev/null 2>&1; then fail 'a failed launcher install fails setup'; fi : >"$CALLS" -PLATFORM=generic-aarch64 INSTALLED_PACKAGES="steam" "$steam_launcher" +PLATFORM=aarch64 INSTALLED_PACKAGES="steam" "$steam_launcher" ! grep -q '^pacman' "$CALLS" || fail 'other platforms never get the FEX launcher' : >"$CALLS" INSTALLED_PACKAGES="steam" OMARCHY_MAC_SETUP_OFFLINE=1 "$steam_launcher" diff --git a/omarchy-mac/test/platform-test.sh b/omarchy-mac/test/platform-test.sh index fb23609..4f60dc5 100644 --- a/omarchy-mac/test/platform-test.sh +++ b/omarchy-mac/test/platform-test.sh @@ -16,7 +16,7 @@ STUB cat >"$work/bin/omarchy-hw-platform" <<'STUB' #!/bin/bash echo platform >>"$CALLS" -echo generic-aarch64 +echo aarch64 STUB for command in systemctl nmcli pactl pw-dump pw-cli wpctl modprobe journalctl lspci rfkill udevadm busctl sudo tee; do printf '#!/bin/bash\necho %s >>"$CALLS"\n' "$command" >"$work/bin/$command" diff --git a/omarchy-mac/test/setup-test.sh b/omarchy-mac/test/setup-test.sh index b175d08..abcdd30 100644 --- a/omarchy-mac/test/setup-test.sh +++ b/omarchy-mac/test/setup-test.sh @@ -7,12 +7,9 @@ mkdir -p "$work/bin" cat >"$work/bin/omarchy-hw-platform" <<'STUB' #!/bin/bash [[ -z ${PLATFORM_ERROR:-} ]] || { echo "Error: $PLATFORM_ERROR" >&2; exit 1; } -echo "${PLATFORM:-apple-silicon}" -STUB -cat >"$work/bin/omarchy-hw-apple-silicon" <<'STUB' -#!/bin/bash -[[ $(omarchy-hw-platform) == "apple-silicon" ]] +echo "${PLATFORM:-aarch64-apple}" STUB +stub_apple_predicate "$work/bin" cat >"$work/bin/lspci" <<'STUB' #!/bin/bash echo "Broadcom [14e4:${WIFI_ID:-4433}]" @@ -42,7 +39,7 @@ ln -s /dev/null "$unit" "$setup" "$stage" [[ $(readlink "$unit") == /dev/null && ! -s $CALLS ]] || fail 'mask survives setup' rm "$unit" -for spec in 'generic 4433' 'qualcomm 4434' 'apple-silicon 0000'; do +for spec in 'x86 4433' 'qualcomm 4434' 'aarch64-apple 0000'; do read -r platform wifi <<<"$spec" PLATFORM=$platform WIFI_ID=$wifi "$setup" "$stage" [[ ! -s $CALLS ]] || fail 'non-Apple and excluded hardware are untouched' @@ -51,9 +48,10 @@ rm "$stage/var/lib/omarchy-mac/wifi-configured" if SYSTEMCTL_STATUS=42 "$setup" "$stage"; then fail 'enable failure must be retryable'; fi "$setup" "$stage" pass 'fresh, repeated, overrides, masks and hardware gates' -# Each fresh root: recovery is enabled for BCM4378, BCM4387 and BCM4388 on Apple Silicon only. -for spec in 'apple-silicon 4425 1' 'apple-silicon 4433 1' 'apple-silicon 4434 1' 'apple-silicon 4488 0' \ - 'generic 4433 0' 'generic-aarch64 4434 0' 'qualcomm 4434 0'; do +# Each fresh root: recovery is enabled for BCM4378, BCM4387 and BCM4388 on Apple Silicon only, +# by the platform's name or by its name on a runtime from before the rename. +for spec in 'aarch64-apple 4425 1' 'aarch64-apple 4433 1' 'aarch64-apple 4434 1' 'aarch64-apple 4488 0' \ + 'apple-silicon 4433 1' 'x86 4433 0' 'aarch64 4434 0' 'qualcomm 4434 0'; do read -r platform wifi enabled <<<"$spec" fresh="$work/fresh-$platform-$wifi" "$ROOT/install" "$fresh" diff --git a/omarchy-mac/test/systemd-test.sh b/omarchy-mac/test/systemd-test.sh index 22f3eed..1cdbb36 100644 --- a/omarchy-mac/test/systemd-test.sh +++ b/omarchy-mac/test/systemd-test.sh @@ -4,7 +4,8 @@ source "$(dirname "$0")/base-test.sh" work=$(mktemp -d) trap 'rm -rf "$work"' EXIT mkdir -p "$work/bin" -printf '#!/bin/bash\necho apple-silicon\n' >"$work/bin/omarchy-hw-platform" +printf '#!/bin/bash\necho aarch64-apple\n' >"$work/bin/omarchy-hw-platform" +stub_apple_predicate "$work/bin" printf '#!/bin/bash\necho "14e4:${WIFI_ID:-4433}"\n' >"$work/bin/lspci" chmod +x "$work/bin/"* diff --git a/omarchy-mac/test/wifi-profiles-test.sh b/omarchy-mac/test/wifi-profiles-test.sh index baca11d..af208e8 100755 --- a/omarchy-mac/test/wifi-profiles-test.sh +++ b/omarchy-mac/test/wifi-profiles-test.sh @@ -13,8 +13,9 @@ state="$work/iwd" mkdir -p "$work/bin" "$work/nm" cat >"$work/bin/omarchy-hw-platform" <<'STUB' #!/bin/bash -echo apple-silicon +echo aarch64-apple STUB +stub_apple_predicate "$work/bin" cat >"$work/bin/NetworkManager" <<'STUB' #!/bin/bash [[ $* == "--print-config" ]] && printf '[device]\nwifi.backend=%s\n' "${BACKEND:-iwd}" diff --git a/omarchy-mac/test/wifi-test.sh b/omarchy-mac/test/wifi-test.sh index d6d8163..522aa04 100755 --- a/omarchy-mac/test/wifi-test.sh +++ b/omarchy-mac/test/wifi-test.sh @@ -33,9 +33,10 @@ SH # platform it runs on rather than inherit the machine running the suite. cat >"$stub_bin/omarchy-hw-platform" <<'SH' #!/bin/bash -[[ ${PLATFORM:-generic} != "error" ]] || { echo "Error: contradictory platform identity" >&2; exit 1; } -echo "${PLATFORM:-generic}" +[[ ${PLATFORM:-x86} != "error" ]] || { echo "Error: contradictory platform identity" >&2; exit 1; } +echo "${PLATFORM:-x86}" SH +stub_apple_predicate "$stub_bin" cat >"$stub_bin/systemctl" <<'SH' #!/bin/bash @@ -156,7 +157,7 @@ chmod +x "$stub_bin"/* sed "s|/usr/lib/omarchy-mac/wifi-supported|$ROOT/lib/wifi-supported|" "$fix" >"$test_tmp/fix" chmod +x "$test_tmp/fix" fix="$test_tmp/fix" -export PLATFORM=apple-silicon WIFI_ID=4433 +export PLATFORM=aarch64-apple WIFI_ID=4433 # The recovery command itself: wedge detection and the decision to reload. run_fix() { @@ -263,7 +264,7 @@ pass "a reload that never reconnects fails loudly" out=$(LOAD_FAILS=1 run_fix) && fail "failed driver reload must fail" "$out" grep -q 'failed to reload' <<<"$out" || fail "failed reload is diagnosed" "$out" -for spec in 'generic 4433' 'generic-aarch64 4434' 'qualcomm 4425' 'error 4434' 'apple-silicon 4488' 'apple-silicon 0000'; do +for spec in 'x86 4433' 'aarch64 4434' 'qualcomm 4425' 'error 4434' 'aarch64-apple 4488' 'aarch64-apple 0000'; do read -r PLATFORM WIFI_ID <<<"$spec" REJECT_LINES=2 run_fix >/dev/null 2>&1 [[ ! -s $calls ]] || fail "unsupported hardware must not reload" "$spec" @@ -272,7 +273,7 @@ pass "failed reload and excluded chipsets are safe" # BCM4378, BCM4387 and BCM4388 all wedge across s2idle, so each one recovers. for WIFI_ID in 4425 4433 4434; do - PLATFORM=apple-silicon + PLATFORM=aarch64-apple out=$(REJECT_LINES=2 run_fix) || fail "a wedged $WIFI_ID recovers" "$out" grep -Fxq $'modprobe\tbrcmfmac' "$calls" || fail "a wedged $WIFI_ID reloads the driver" "$(cat "$calls")" done diff --git a/omarchy-mac/version b/omarchy-mac/version index 17e51c3..d917d3e 100644 --- a/omarchy-mac/version +++ b/omarchy-mac/version @@ -1 +1 @@ -0.1.1 +0.1.2 diff --git a/tools/package-resolution/platforms/apple/pacman.conf b/tools/package-resolution/platforms/aarch64-apple/pacman.conf similarity index 100% rename from tools/package-resolution/platforms/apple/pacman.conf rename to tools/package-resolution/platforms/aarch64-apple/pacman.conf diff --git a/tools/package-resolution/platforms/apple/platform b/tools/package-resolution/platforms/aarch64-apple/platform similarity index 100% rename from tools/package-resolution/platforms/apple/platform rename to tools/package-resolution/platforms/aarch64-apple/platform diff --git a/tools/package-resolution/platforms/generic-aarch64/pacman.conf b/tools/package-resolution/platforms/aarch64/pacman.conf similarity index 100% rename from tools/package-resolution/platforms/generic-aarch64/pacman.conf rename to tools/package-resolution/platforms/aarch64/pacman.conf diff --git a/tools/package-resolution/platforms/generic-aarch64/platform b/tools/package-resolution/platforms/aarch64/platform similarity index 100% rename from tools/package-resolution/platforms/generic-aarch64/platform rename to tools/package-resolution/platforms/aarch64/platform From 68dcc8044040667dc654412218a7900da48f3497 Mon Sep 17 00:00:00 2001 From: Marcelo Alcantara Date: Sat, 10 Oct 2026 10:42:39 +1000 Subject: [PATCH 2/6] Recognise aarch64-apple in omarchy-mac-boot Owner provisioning and reset ask the Apple predicate. The snapshot hook still needs the detector's answer to tell a failure apart, so it accepts aarch64-apple and the older apple-silicon. --- omarchy-mac-boot/bin/omarchy-mac-snapshot-check | 10 ++++++---- omarchy-mac-boot/lib/provision.sh | 2 +- omarchy-mac-boot/test/base-test.sh | 12 ++++++++++++ omarchy-mac-boot/test/mac-provision-test.sh | 7 ++++--- omarchy-mac-boot/test/mac-reset-test.sh | 5 +++-- omarchy-mac-boot/test/snapshot-check-test.sh | 12 +++++++----- 6 files changed, 33 insertions(+), 15 deletions(-) diff --git a/omarchy-mac-boot/bin/omarchy-mac-snapshot-check b/omarchy-mac-boot/bin/omarchy-mac-snapshot-check index bf895ce..725fd79 100755 --- a/omarchy-mac-boot/bin/omarchy-mac-snapshot-check +++ b/omarchy-mac-boot/bin/omarchy-mac-snapshot-check @@ -180,14 +180,16 @@ restore_mode() { } # Only a Mac's restores are this hook's to check. A root from before the -# platform detector has only omarchy-hw-apple-silicon. Anything but a clear -# answer returns 2: the platform cannot be told, which is not waved through. +# platform detector has only omarchy-hw-apple-silicon, and one from before the +# rename names a Mac apple-silicon. Anything unclear returns 2, never waved through. on_a_mac() { local platform status if command -v omarchy-hw-platform >/dev/null 2>&1; then if platform=$(omarchy-hw-platform); then - [[ $platform == apple-silicon ]] - return + case $platform in + aarch64-apple | apple-silicon) return 0 ;; + *) return 1 ;; + esac fi else omarchy-hw-apple-silicon diff --git a/omarchy-mac-boot/lib/provision.sh b/omarchy-mac-boot/lib/provision.sh index b47bd1b..c19c4f3 100644 --- a/omarchy-mac-boot/lib/provision.sh +++ b/omarchy-mac-boot/lib/provision.sh @@ -34,7 +34,7 @@ refuse() { } require_apple_silicon() { - [[ $(omarchy-hw-platform 2>/dev/null) == apple-silicon ]] || + omarchy-hw-apple-silicon 2>/dev/null || refuse "This omarchy-mac-boot entrypoint runs only on Apple Silicon Macs." } diff --git a/omarchy-mac-boot/test/base-test.sh b/omarchy-mac-boot/test/base-test.sh index e75fb4f..48411d6 100644 --- a/omarchy-mac-boot/test/base-test.sh +++ b/omarchy-mac-boot/test/base-test.sh @@ -14,3 +14,15 @@ requires_runtime() { return 1 fi } +# The runtime's Apple predicate over the stubbed detector, which names a Mac +# aarch64-apple, or apple-silicon on a runtime from before the platform rename. +stub_apple_predicate() { + cat >"$1/omarchy-hw-apple-silicon" <<'STUB' +#!/bin/bash +case $(omarchy-hw-platform) in + aarch64-apple | apple-silicon) exit 0 ;; + *) exit 1 ;; +esac +STUB + chmod +x "$1/omarchy-hw-apple-silicon" +} diff --git a/omarchy-mac-boot/test/mac-provision-test.sh b/omarchy-mac-boot/test/mac-provision-test.sh index cf2b2b4..9d229eb 100644 --- a/omarchy-mac-boot/test/mac-provision-test.sh +++ b/omarchy-mac-boot/test/mac-provision-test.sh @@ -23,8 +23,9 @@ firmware_listing='./usr/lib/systemd/system-generators/systemd-cryptsetup-generat ./usr/lib/systemd/system/systemd-cryptsetup@.service.d/omarchy-vendorfw-initrd.conf' cat >"$stub_bin/omarchy-hw-platform" <<'SH' #!/bin/bash -echo "${TEST_PLATFORM:-apple-silicon}" +echo "${TEST_PLATFORM:-aarch64-apple}" SH +stub_apple_predicate "$stub_bin" cat >"$stub_bin/omarchy-mac-kernel" <<'SH' #!/bin/bash echo linux-aurora @@ -184,7 +185,7 @@ run provision-prepare || fail "an encrypted image root is ready for owner setup" [[ $(snapshot) == "$before" && ! -s $calls ]] || fail "provision-prepare changes nothing" pass "provision-prepare accepts an encrypted image root and changes nothing" -for platform in generic-aarch64 qualcomm generic; do +for platform in aarch64 qualcomm x86; do fixture before=$(snapshot) for name in provision-prepare provision-commit provision-verify luks-slots; do @@ -598,7 +599,7 @@ TEST_KEYSLOTS="2 3 32" owner_refused "an owner slot out of range" "records owner sed -i 's/^owner_slot=.*/owner_slot=/' "$root/boot/omarchy/encrypt.state" TEST_KEYSLOTS="2 3" owner_refused "an empty owner slot" "records owner_slot=, which is not a LUKS key slot number" sed -i 's/^owner_slot=.*/owner_slot=2/' "$root/boot/omarchy/encrypt.state" -TEST_PLATFORM=generic-aarch64 TEST_KEYSLOTS="2 3" owner_refused "off Apple Silicon" "runs only on Apple Silicon" +TEST_PLATFORM=aarch64 TEST_KEYSLOTS="2 3" owner_refused "off Apple Silicon" "runs only on Apple Silicon" TEST_BOOT_UUID="" TEST_KEYSLOTS="2 3" owner_refused "an unmounted Boot partition" "Boot partition is not mounted at /boot" mv "$root/dev/disk/by-uuid/$luks_uuid" "$test_tmp/by-uuid" TEST_KEYSLOTS="2 3" owner_refused "a crypttab device that is not there" "Could not find the encrypted disk" diff --git a/omarchy-mac-boot/test/mac-reset-test.sh b/omarchy-mac-boot/test/mac-reset-test.sh index ae5f5b1..a6b27fb 100644 --- a/omarchy-mac-boot/test/mac-reset-test.sh +++ b/omarchy-mac-boot/test/mac-reset-test.sh @@ -35,8 +35,9 @@ firmware_listing='./usr/lib/systemd/system-generators/systemd-cryptsetup-generat cat >"$stub_bin/omarchy-hw-platform" <<'SH' #!/bin/bash -echo "${TEST_PLATFORM:-apple-silicon}" +echo "${TEST_PLATFORM:-aarch64-apple}" SH +stub_apple_predicate "$stub_bin" cat >"$stub_bin/omarchy-mac-kernel" <<'SH' #!/bin/bash echo linux-aurora @@ -225,7 +226,7 @@ done fixture before=$(boot_tree) -for platform in generic-aarch64 qualcomm generic; do +for platform in aarch64 qualcomm x86; do if TEST_PLATFORM=$platform run reset-prepare "$next" "$root/dev/luks"; then fail "reset-prepare refuses to run on $platform"; fi error_says "runs only on Apple Silicon" for name in reset-commit reset-rollback; do diff --git a/omarchy-mac-boot/test/snapshot-check-test.sh b/omarchy-mac-boot/test/snapshot-check-test.sh index 73982b7..66051ff 100644 --- a/omarchy-mac-boot/test/snapshot-check-test.sh +++ b/omarchy-mac-boot/test/snapshot-check-test.sh @@ -36,14 +36,14 @@ mkdir -p "$fake" "$tmp/check-stub" mkdir -p "$tmp/detector" "$tmp/no-detector" cat >"$tmp/detector/omarchy-hw-platform" <<'SH' #!/bin/bash -[[ ${TEST_PLATFORM:-apple-silicon} != error ]] || exit 1 -echo "${TEST_PLATFORM:-apple-silicon}" +[[ ${TEST_PLATFORM:-aarch64-apple} != error ]] || exit 1 +echo "${TEST_PLATFORM:-aarch64-apple}" SH # TEST_APPLE_STATUS: an exit status other than a clear answer, such as 127. cat >"$fake/omarchy-hw-apple-silicon" <<'SH' #!/bin/bash [[ -z ${TEST_APPLE_STATUS:-} ]] || exit "$TEST_APPLE_STATUS" -[[ ${TEST_PLATFORM:-apple-silicon} == apple-silicon ]] +[[ ${TEST_PLATFORM:-aarch64-apple} == aarch64-apple || $TEST_PLATFORM == apple-silicon ]] SH printf '#!/bin/bash\nexit 0\n' >"$fake/limine-update" # pacman -Q lists the snapshot's packages; everything else is the fixture's. @@ -149,7 +149,7 @@ for hook_cmdline in "" "--add 3" "--no-force-save --add 3" "--debounce" "--no-ho (( status == 0 )) && [[ ! -s $tmp/out && ! -s $tmp/err && ! -s $tmp/check-ran ]] || fail "limine-snapper-sync '$hook_cmdline' passes the hook untouched" done -TEST_PLATFORM=generic TEST_PATH_FIRST=$tmp/check-stub run_check "--restore --no-mutex" "$snapshot_cmdline" +TEST_PLATFORM=x86 TEST_PATH_FIRST=$tmp/check-stub run_check "--restore --no-mutex" "$snapshot_cmdline" (( status == 0 )) && [[ ! -s $tmp/err && ! -s $tmp/check-ran ]] || fail "a restore on anything but a Mac is not this hook's to check" pass "the hook stays out of everything but a restore on a Mac" @@ -160,7 +160,7 @@ pass "a restore is refused when the platform cannot be told" TEST_NO_DETECTOR=1 TEST_PATH_FIRST=$tmp/check-stub run_check "--restore --no-mutex" "$live_cmdline" expect_refused "a restore from the running system of a root without the platform detector" "open Snapshots" -TEST_NO_DETECTOR=1 TEST_PLATFORM=generic TEST_PATH_FIRST=$tmp/check-stub run_check "--restore --no-mutex" "$snapshot_cmdline" +TEST_NO_DETECTOR=1 TEST_PLATFORM=x86 TEST_PATH_FIRST=$tmp/check-stub run_check "--restore --no-mutex" "$snapshot_cmdline" (( status == 0 )) && [[ ! -s $tmp/err && ! -s $tmp/check-ran ]] || fail "a root without the detector and not a Mac is not this hook's to check" TEST_NO_DETECTOR=1 TEST_APPLE_STATUS=127 TEST_PATH_FIRST=$tmp/check-stub run_check "--restore --no-mutex" "$snapshot_cmdline" expect_refused "a restore where omarchy-hw-apple-silicon is missing" "Cannot tell which platform this is" @@ -244,6 +244,8 @@ expect_refused "a restore from the running system" \ "open Snapshots" "run omarchy-snapshot restore once it" \ "Snapshots taken before Limine was activated on this Mac cannot be restored" \ "that is gets refused" +TEST_PLATFORM=apple-silicon TEST_PATH_FIRST=$tmp/check-stub run_check "--restore --no-mutex" "$live_cmdline" +expect_refused "a restore from the running system of a runtime from before the platform rename" "open Snapshots" rm "$mac_root/var/lib/omarchy/limine.enabled" TEST_PATH_FIRST=$tmp/check-stub run_check "--restore --no-mutex" "$live_cmdline" expect_refused "limine-snapper-restore on a Mac that boots GRUB" \ From c3320eca55dcd75869c822425454db2d4879c13a Mon Sep 17 00:00:00 2001 From: Marcelo Alcantara Date: Sat, 10 Oct 2026 10:42:39 +1000 Subject: [PATCH 3/6] Name platforms x86, aarch64 and aarch64-apple in the integration tests runtime_platform maps them to a pre-rename runtime's names, so the suite runs against either. --- test/integration/apple-platform-hooks-test.sh | 6 ++++-- test/integration/base-test.sh | 12 +++++++++++ test/integration/electron-apple-gl-test.sh | 2 +- .../electron-desktop-repair-test.sh | 2 +- test/integration/factory-reset-luks-test.sh | 4 ++-- .../mac-boot-mkinitcpio-compose-test.sh | 2 +- test/integration/mac-boot-provider-test.sh | 4 ++-- .../mac-update-boot-verify-test.sh | 8 ++++---- .../menu-keybindings-fkeys-test.sh | 9 ++++----- test/integration/provision-owner-luks-test.sh | 2 +- test/integration/runtime-test.sh | 15 ++++++++++++++ test/integration/snapshot-restore-mac-test.sh | 20 +++++++++---------- test/integration/speaker-owner-test.sh | 3 ++- 13 files changed, 59 insertions(+), 30 deletions(-) diff --git a/test/integration/apple-platform-hooks-test.sh b/test/integration/apple-platform-hooks-test.sh index 37ca868..74f1267 100644 --- a/test/integration/apple-platform-hooks-test.sh +++ b/test/integration/apple-platform-hooks-test.sh @@ -15,8 +15,10 @@ runtime=${OMARCHY_TEST_RUNTIME:-$ROOT} platform_root=$tmpdir/pkg/usr/share/omarchy-platform mkdir -p "$tmpdir/apple-bin" -printf '#!/bin/sh\nexit 0\n' >"$tmpdir/apple-bin/omarchy-hw-apple-silicon" -chmod +x "$tmpdir/apple-bin/omarchy-hw-apple-silicon" +for predicate in omarchy-hw-aarch64-apple omarchy-hw-apple-silicon; do + printf '#!/bin/sh\nexit 0\n' >"$tmpdir/apple-bin/$predicate" + chmod +x "$tmpdir/apple-bin/$predicate" +done [[ ! -e $platform_root/hypr ]] || fail "omarchy-mac ships no Hyprland files; Omarchy's own config carries the Mac's binds" diff --git a/test/integration/base-test.sh b/test/integration/base-test.sh index 11a00f9..a7f66ff 100644 --- a/test/integration/base-test.sh +++ b/test/integration/base-test.sh @@ -13,3 +13,15 @@ requires_runtime() { return 1 fi } +# The runtime's Apple predicate over a stubbed detector, which names a Mac +# aarch64-apple, or apple-silicon on a runtime from before the platform rename. +stub_apple_predicate() { + cat >"$1/omarchy-hw-apple-silicon" <<'STUB' +#!/bin/bash +case $(omarchy-hw-platform) in + aarch64-apple | apple-silicon) exit 0 ;; + *) exit 1 ;; +esac +STUB + chmod +x "$1/omarchy-hw-apple-silicon" +} diff --git a/test/integration/electron-apple-gl-test.sh b/test/integration/electron-apple-gl-test.sh index 908c398..74ed45c 100644 --- a/test/integration/electron-apple-gl-test.sh +++ b/test/integration/electron-apple-gl-test.sh @@ -31,7 +31,7 @@ cat >"$apple_stub/omarchy-hw-apple-silicon" <<'SH' SH cat >"$apple_stub/omarchy-hw-platform" <<'SH' #!/bin/bash -if omarchy-hw-apple-silicon; then echo apple-silicon; else echo generic; fi +if omarchy-hw-apple-silicon; then echo aarch64-apple; else echo x86; fi SH chmod +x "$apple_stub/omarchy-hw-apple-silicon" "$apple_stub/omarchy-hw-platform" diff --git a/test/integration/electron-desktop-repair-test.sh b/test/integration/electron-desktop-repair-test.sh index 00fe08d..fb6a284 100644 --- a/test/integration/electron-desktop-repair-test.sh +++ b/test/integration/electron-desktop-repair-test.sh @@ -41,7 +41,7 @@ Exec=env SPECIAL=yes chromium %U apple.write_text('#!/bin/bash\nexit 0\n') apple.chmod(0o755) platform = bind / 'omarchy-hw-platform' - platform.write_text('#!/bin/bash\necho apple-silicon\n') + platform.write_text('#!/bin/bash\necho aarch64-apple\n') platform.chmod(0o755) sentinel = tmp / 'forbidden' for name in ('sudo', 'pkexec', 'curl'): diff --git a/test/integration/factory-reset-luks-test.sh b/test/integration/factory-reset-luks-test.sh index eb22fdb..33a3b8f 100644 --- a/test/integration/factory-reset-luks-test.sh +++ b/test/integration/factory-reset-luks-test.sh @@ -16,8 +16,8 @@ require_platform_fixtures "factory reset through lifecycle dispatch" tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT -fake_platform "$tmp/apple" apple-silicon -fake_platform "$tmp/x86" generic +fake_platform "$tmp/apple" "$(runtime_platform aarch64-apple)" +fake_platform "$tmp/x86" "$(runtime_platform x86)" real_cryptsetup=$(command -v cryptsetup || true) stub_bin=$tmp/bin calls=$tmp/calls diff --git a/test/integration/mac-boot-mkinitcpio-compose-test.sh b/test/integration/mac-boot-mkinitcpio-compose-test.sh index 47ba5ab..5c6276f 100644 --- a/test/integration/mac-boot-mkinitcpio-compose-test.sh +++ b/test/integration/mac-boot-mkinitcpio-compose-test.sh @@ -12,7 +12,7 @@ require_platform_fixtures "the Apple boot drop-ins on the platform baseline" tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT -fake_platform "$tmp/platform" apple-silicon +fake_platform "$tmp/platform" "$(runtime_platform aarch64-apple)" mkdir -p "$tmp/bin" # No kernel modules here: the HID drop-in adds only what modinfo finds. printf '#!/bin/bash\nexit 1\n' >"$tmp/bin/modinfo" diff --git a/test/integration/mac-boot-provider-test.sh b/test/integration/mac-boot-provider-test.sh index d541170..63aa176 100644 --- a/test/integration/mac-boot-provider-test.sh +++ b/test/integration/mac-boot-provider-test.sh @@ -4,7 +4,7 @@ source "$(dirname -- "${BASH_SOURCE[0]}")/runtime-test.sh" work=$(mktemp -d) trap 'rm -rf "$work"' EXIT mkdir -p "$work/stage" -grep -Fxq omarchy-mac-boot "$ROOT/install/omarchy-apple-silicon.packages" || fail "Apple fresh-install inputs carry the boot package" +grep -Fxq omarchy-mac-boot "$ROOT/install/omarchy-$(runtime_platform aarch64-apple).packages" || fail "Apple fresh-install inputs carry the boot package" pass "Apple installs carry the boot package their lifecycles dispatch to" bash "$BOOT/install" "$work/stage" # Owner provisioning and factory reset are upstream's scripts, which run only @@ -19,7 +19,7 @@ pass "owner provisioning parses, and the boot package ships every operation it d # state included. patterns=(/boot/omarchy encrypt.state rd.luks.key /etc/default/grub omarchy-mac-boot omarchy-mac/boot update-grub) for entry in omarchy-provision-owner omarchy-system-factory-reset; do - [[ $entry != omarchy-system-factory-reset ]] || patterns+=(omarchy-hw-apple-silicon mac-first-boot efi/omarchy) + [[ $entry != omarchy-system-factory-reset ]] || patterns+=(omarchy-hw-aarch64-apple omarchy-hw-apple-silicon mac-first-boot efi/omarchy) for pattern in "${patterns[@]}"; do ! grep -Fq -- "$pattern" "$ROOT/bin/$entry" || fail "$entry leaves $pattern to the boot package" "$(grep -Fn -- "$pattern" "$ROOT/bin/$entry")" diff --git a/test/integration/mac-update-boot-verify-test.sh b/test/integration/mac-update-boot-verify-test.sh index 8d4dd44..50e7ca4 100644 --- a/test/integration/mac-update-boot-verify-test.sh +++ b/test/integration/mac-update-boot-verify-test.sh @@ -24,7 +24,7 @@ export OMARCHY_UPDATE_LOGGED=1 tmp=$boundary_tmp/mac-update mkdir -p "$tmp" -fake_platform "$tmp/apple-silicon" apple-silicon +fake_platform "$tmp/aarch64-apple" "$(runtime_platform aarch64-apple)" # omarchy update -y on platform $1, with the boot package's entrypoints in the # lifecycle root $2. The update's PATH is fixed, so uname goes beside the stubs. @@ -66,12 +66,12 @@ mac_boot_package() { limine_mac_init "$tmp/mac" limine_mac mac_boot_package -run_update apple-silicon "$tmp/mac-boot" +run_update aarch64-apple "$tmp/mac-boot" (( status == 0 )) || fail "apple: an update that leaves a coherent boot chain succeeds" "status $status: $(cat "$tmp/out" "$tmp/err")" reboot_offered || fail "apple: a verified update offers the reboot" "$(cat "$SUDO_TEST_LOG")" grep -Fq "running linux-aurora $mac_kver; installed boot files match" "$tmp/out" || fail "apple: the update shows what it verified" "$(cat "$tmp/out")" mac_boot_package 6.16.0-aurora9-ARCH -run_update apple-silicon "$tmp/mac-boot" +run_update aarch64-apple "$tmp/mac-boot" (( status == 0 )) && reboot_offered || fail "apple: an update that installed a new kernel is verified before its reboot" "status $status: $(cat "$tmp/out" "$tmp/err")" pass "apple: an update that leaves a coherent boot chain passes verification and offers the reboot" @@ -80,7 +80,7 @@ pass "apple: an update that leaves a coherent boot chain passes verification and # offer the reboot. Everything else still runs. blocked() { local description=$1 reason=$2 - run_update apple-silicon "$tmp/mac-boot" + run_update aarch64-apple "$tmp/mac-boot" (( status == 1 )) || fail "apple: $description fails the update" "status $status: $(cat "$tmp/err")" ! reboot_offered || fail "apple: $description offers no reboot" ran 'omarchy-update-stay-awake stop' || fail "apple: $description still releases Stay Awake" "$(cat "$SUDO_TEST_LOG")" diff --git a/test/integration/menu-keybindings-fkeys-test.sh b/test/integration/menu-keybindings-fkeys-test.sh index 4154bba..6891475 100644 --- a/test/integration/menu-keybindings-fkeys-test.sh +++ b/test/integration/menu-keybindings-fkeys-test.sh @@ -80,11 +80,10 @@ exit 1 SH chmod +x "$mock_bin/omarchy-cmd-present" -cat >"$mock_bin/omarchy-hw-apple-silicon" <<'SH' -#!/bin/bash -exit 0 -SH -chmod +x "$mock_bin/omarchy-hw-apple-silicon" +for predicate in omarchy-hw-aarch64-apple omarchy-hw-apple-silicon; do + printf '#!/bin/bash\nexit 0\n' >"$mock_bin/$predicate" + chmod +x "$mock_bin/$predicate" +done # Pre-seed the exact cache file that v13 production would read for these # mocked inputs. Cached records use the rendered row as field 1, followed by diff --git a/test/integration/provision-owner-luks-test.sh b/test/integration/provision-owner-luks-test.sh index 85c03b6..4191e4d 100644 --- a/test/integration/provision-owner-luks-test.sh +++ b/test/integration/provision-owner-luks-test.sh @@ -14,7 +14,7 @@ require_platform_fixtures "the Apple Silicon owner provisioning path" tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT -fake_platform "$tmp/apple" apple-silicon +fake_platform "$tmp/apple" "$(runtime_platform aarch64-apple)" stub_bin=$tmp/bin root=$tmp/root calls=$tmp/calls diff --git a/test/integration/runtime-test.sh b/test/integration/runtime-test.sh index 6097484..07a3ed8 100644 --- a/test/integration/runtime-test.sh +++ b/test/integration/runtime-test.sh @@ -4,3 +4,18 @@ source "$(dirname -- "${BASH_SOURCE[0]}")/base-test.sh" requires_runtime "$(basename -- "$0")" || exit 0 source "$OMARCHY_TEST_RUNTIME/test/shell.d/base-test.sh" +# Tests name platforms x86, aarch64 and aarch64-apple. A runtime from before the +# rename (omacom/omarchy 5397950a2 and older) detects them as generic, +# generic-aarch64 and apple-silicon, and names its Apple list after the last. +runtime_platform() { + if [[ -e $ROOT/bin/omarchy-hw-aarch64-apple ]]; then + printf '%s\n' "$1" + else + case $1 in + x86) echo generic ;; + aarch64) echo generic-aarch64 ;; + aarch64-apple) echo apple-silicon ;; + *) fail "runtime_platform knows the platform $1" ;; + esac + fi +} diff --git a/test/integration/snapshot-restore-mac-test.sh b/test/integration/snapshot-restore-mac-test.sh index 01d3d43..bc145aa 100644 --- a/test/integration/snapshot-restore-mac-test.sh +++ b/test/integration/snapshot-restore-mac-test.sh @@ -34,8 +34,8 @@ guarded() { timeout --kill-after=5 60 "$@" } -for platform in apple-silicon generic; do - fake_platform "$tmp/$platform" "$platform" +for platform in aarch64-apple x86; do + fake_platform "$tmp/$platform" "$(runtime_platform "$platform")" done limine_mac_init "$tmp/mac" @@ -149,7 +149,7 @@ run_restore() { # x86: the package's hooks are installed but let the restore through untouched, # and nothing asks whether a Mac boots Limine. limine_mac -run_restore generic limine "$tmp/hooks" +run_restore x86 limine "$tmp/hooks" (( status == 0 )) && [[ $(cat "$tmp/calls") == $'sudo limine-snapper-restore\nrestored' ]] && grep -Fq "Reboot now" "$tmp/out" || fail "x86 restores with limine-snapper-restore through the Mac hooks" "$(cat "$tmp/calls" "$tmp/out" "$tmp/err")" pass "x86 restores as before, without any Mac check" @@ -158,7 +158,7 @@ pass "x86 restores as before, without any Mac check" # Limine, when the Mac booted GRUB: Limine's restore hook says why it can't. limine_mac rm "$mac_root/var/lib/omarchy/limine.enabled" -run_restore apple-silicon limine "$tmp/hooks" +run_restore aarch64-apple limine "$tmp/hooks" (( status != 0 )) && grep -Fxq 'sudo limine-snapper-restore' "$tmp/calls" && ! grep -Fxq restored "$tmp/calls" && grep -Fq "Snapshot 7 was taken before Limine was activated on this Mac" "$tmp/err" || fail "a boot of a snapshot from before Limine is refused by Limine's restore hook" "$(cat "$tmp/calls" "$tmp/err")" @@ -167,7 +167,7 @@ pass "a boot of a snapshot from before Limine is told why it cannot be restored" # A Limine Mac booted into snapshot 7 from the menu: the x86 restore, which the # package's pre hook lets through when the snapshot matches the boot files. limine_mac -run_restore apple-silicon limine "$tmp/hooks" +run_restore aarch64-apple limine "$tmp/hooks" (( status == 0 )) && grep -Fxq 'sudo limine-snapper-restore' "$tmp/calls" && grep -Fxq restored "$tmp/calls" || fail "a Limine Mac restores a matching snapshot with limine-snapper-restore" "$(cat "$tmp/calls" "$tmp/out" "$tmp/err")" grep -Fq "Snapshot 7 matches this Mac's boot files" "$tmp/out" || fail "the restore says the snapshot was checked" "$(cat "$tmp/out")" @@ -176,7 +176,7 @@ pass "a Limine Mac restores a snapshot that matches its boot files through limin # The same, after a kernel update the snapshot predates. limine_mac printf 'linux-aurora kernel 6.18.0-aurora1-ARCH\n' >"$mac_root/boot/vmlinuz-linux-aurora" -run_restore apple-silicon limine "$tmp/hooks" +run_restore aarch64-apple limine "$tmp/hooks" (( status != 0 )) && ! grep -Fxq restored "$tmp/calls" || fail "a snapshot from before a kernel update is not restored" "$(cat "$tmp/calls" "$tmp/err")" grep -Fq "Snapshot 7 does not match this Mac's boot files, so it is not restored" "$tmp/err" && @@ -190,7 +190,7 @@ pass "a Limine Mac refuses a snapshot from before a kernel update, and explains" limine_mac rm -rf "$tmp/state" snapshot_root_tree "$tmp/picked" "linux-aurora kernel 6.16.0-aurora0-ARCH" -LSS_PICK=$tmp/picked run_restore apple-silicon limine "$tmp/hooks" +LSS_PICK=$tmp/picked run_restore aarch64-apple limine "$tmp/hooks" grep -Fxq restored "$tmp/calls" && grep -Fq "Please reboot manually" "$tmp/out" && ! grep -Fq "Reboot now" "$tmp/out" || fail "a mismatched snapshot picked from the list is not offered the reboot" "$(cat "$tmp/calls" "$tmp/out" "$tmp/err")" grep -Fq "The restore put back a root this Mac's boot files do not match" "$tmp/err" && @@ -200,7 +200,7 @@ pass "a snapshot picked from limine-snapper-restore's list is checked after the # Undo it as the message says, from the same boot: the ESP's UKI now carries the # refused root's kernel, which the pre hook's boot check would refuse. -LSS_PICK=$tmp/booted run_restore apple-silicon limine "$tmp/hooks" +LSS_PICK=$tmp/booted run_restore aarch64-apple limine "$tmp/hooks" (( status == 0 )) && grep -Fq "Press l and pick snapshot 13, the backup that restore made." "$tmp/out" && grep -Fq "Reboot now" "$tmp/out" && grep -Fq "The restored root matches this Mac's boot files" "$tmp/out" || fail "the previous root is put back through the hooks and offered the reboot" "$(cat "$tmp/out" "$tmp/err")" @@ -210,7 +210,7 @@ pass "a refused restore is undone through the hooks, as the message says" limine_mac rm -rf "$tmp/state" snapshot_root_tree "$tmp/picked" "linux-aurora kernel $mac_kver" -LSS_PICK=$tmp/picked run_restore apple-silicon limine "$tmp/hooks" +LSS_PICK=$tmp/picked run_restore aarch64-apple limine "$tmp/hooks" (( status == 0 )) && grep -Fq "Reboot now" "$tmp/out" && grep -Fq "The restored root matches this Mac's boot files" "$tmp/out" || fail "a matching snapshot picked from the list is restored and offered the reboot" "$(cat "$tmp/out" "$tmp/err")" pass "a matching snapshot picked from limine-snapper-restore's list is restored" @@ -219,7 +219,7 @@ pass "a matching snapshot picked from limine-snapper-restore's list is restored" # swap, so the pre hook refuses a GRUB Mac without sending it back to one. limine_mac rm "$mac_root/var/lib/omarchy/limine.enabled" -TEST_CMDLINE=$live_cmdline run_restore apple-silicon limine "$tmp/hooks" +TEST_CMDLINE=$live_cmdline run_restore aarch64-apple limine "$tmp/hooks" (( status != 0 )) && ! grep -Fxq restored "$tmp/calls" && grep -Fq "This Mac boots GRUB" "$tmp/err" && ! grep -Fq "omarchy-snapshot restore" "$tmp/err" || fail "a GRUB Mac is refused and not sent back to omarchy-snapshot restore" "$(cat "$tmp/calls" "$tmp/err")" diff --git a/test/integration/speaker-owner-test.sh b/test/integration/speaker-owner-test.sh index 9e6ff50..b9c0525 100755 --- a/test/integration/speaker-owner-test.sh +++ b/test/integration/speaker-owner-test.sh @@ -12,7 +12,8 @@ real_systemctl=$(command -v systemctl) || fail 'systemctl is available' work=$(mktemp -d) trap 'rm -rf "$work"' EXIT mkdir -p "$work/bin" "$work/first-boot-bin" -printf '#!/bin/bash\necho apple-silicon\n' >"$work/bin/omarchy-hw-platform" +printf '#!/bin/bash\necho aarch64-apple\n' >"$work/bin/omarchy-hw-platform" +stub_apple_predicate "$work/bin" printf '#!/bin/bash\necho 14e4:4433\n' >"$work/bin/lspci" # First boot enables units on the live system; here they land in the image root. cat >"$work/first-boot-bin/systemctl" < Date: Sat, 10 Oct 2026 10:42:39 +1000 Subject: [PATCH 4/6] Test against upstream quattro e1b0e5e9b omacom/omarchy#14431 merged with the platform rename. The package-resolution fixtures take the platforms' names and read the renamed Apple list. --- .../package-resolution-fixtures-test.sh | 2 +- test/integration/runtime | 6 ++-- tools/package-resolution/README.md | 2 +- .../platforms/aarch64-apple/platform | 2 +- tools/package-resolution/test/check-test.sh | 34 +++++++++---------- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/test/integration/package-resolution-fixtures-test.sh b/test/integration/package-resolution-fixtures-test.sh index 7ad926b..7aab694 100644 --- a/test/integration/package-resolution-fixtures-test.sh +++ b/test/integration/package-resolution-fixtures-test.sh @@ -4,7 +4,7 @@ set -euo pipefail source "$(dirname -- "${BASH_SOURCE[0]}")/runtime-test.sh" repositories() { grep -o '^\[[^]]*\]' "$1" | tr -d '[]' | grep -vx options | tr '\n' ' '; } -for fixture in "apple:$ROOT/default/pacman/apple-silicon" "generic-aarch64:$ROOT/default/pacman/aarch64"; do +for fixture in "aarch64-apple:$ROOT/default/pacman/$(runtime_platform aarch64-apple)" "aarch64:$ROOT/default/pacman/aarch64"; do [[ $(repositories "$REPO/tools/package-resolution/platforms/${fixture%%:*}/pacman.conf") == \ "$(repositories "${fixture#*:}/pacman-edge.conf")" ]] || fail "the ${fixture%%:*} resolution fixture follows ${fixture#*:}" diff --git a/test/integration/runtime b/test/integration/runtime index 7e477a7..549541a 100644 --- a/test/integration/runtime +++ b/test/integration/runtime @@ -1,4 +1,4 @@ # The Omarchy runtime CI tests the packages against: a repository and a full commit. -# Move it deliberately, like a recipe pin. Today the head of omacom/omarchy#14431; -# upstream omacom/omarchy once it merges. -omacom/omarchy 5397950a21e8839a7c182c9372d56bd6a2808535 +# Move it deliberately, like a recipe pin. Today upstream quattro, where +# omacom/omarchy#14431 merged. +omacom/omarchy e1b0e5e9bb72b15dc494458925655bf32656382b diff --git a/tools/package-resolution/README.md b/tools/package-resolution/README.md index b94cb89..6fad437 100644 --- a/tools/package-resolution/README.md +++ b/tools/package-resolution/README.md @@ -4,7 +4,7 @@ Resolves each aarch64 platform's package set against the live pacman databases i ```bash tools/package-resolution/check # every platform under platforms/ -tools/package-resolution/check generic-aarch64 # one platform +tools/package-resolution/check aarch64 # one platform tools/package-resolution/test/check-test.sh # the checks against synthetic repositories ``` diff --git a/tools/package-resolution/platforms/aarch64-apple/platform b/tools/package-resolution/platforms/aarch64-apple/platform index df2dc37..98b5b8d 100644 --- a/tools/package-resolution/platforms/aarch64-apple/platform +++ b/tools/package-resolution/platforms/aarch64-apple/platform @@ -1,5 +1,5 @@ # Sourced by check. Lists are relative to the repository root. -lists=(install/omarchy-base.packages install/omarchy-aarch64.packages install/omarchy-apple-silicon.packages) +lists=(install/omarchy-base.packages install/omarchy-aarch64.packages install/omarchy-aarch64-apple.packages) # The image's kernel, boot chain and Asahi platform packages. packages=(omarchy omarchy-settings omarchy-mac-boot linux-aurora linux-aurora-headers m1n1-aurora uboot-asahi limine limine-mkinitcpio-hook limine-snapper-sync asahi-alarm-keyring asahi-bless asahi-desktop-meta diff --git a/tools/package-resolution/test/check-test.sh b/tools/package-resolution/test/check-test.sh index f0848af..896de79 100755 --- a/tools/package-resolution/test/check-test.sh +++ b/tools/package-resolution/test/check-test.sh @@ -99,7 +99,7 @@ expect_fail() { pass "$2" } -generic='forbidden_packages=("${mac_only[@]}")' +aarch64='forbidden_packages=("${mac_only[@]}")' package core filesystem 1-1 file=etc/hostname package core linux-aarch64 7.0-1 provides=linux depend=filesystem file=usr/lib/modules/7.0/vmlinuz @@ -124,37 +124,37 @@ package stale stale 2.0-1 file=usr/bin/stale cp "$scratch/stale-1.files" "$scratch/repos/stale/stale.files.tar.gz" legacy_layout core -platform generic "core omarchy" "omarchy omarchy-settings tool" "$generic" 'transitions=(omarchy omarchy-settings)' -expect_pass generic "a generic set that stays generic passes" \ - 'ok generic: linux resolves to core/linux-aarch64' -grep -Fq 'note generic: Mac-only omarchy/linux-aurora still provides linux' <<<"$output" || +platform aarch64 "core omarchy" "omarchy omarchy-settings tool" "$aarch64" 'transitions=(omarchy omarchy-settings)' +expect_pass aarch64 "an aarch64 set without Mac packages passes" \ + 'ok aarch64: linux resolves to core/linux-aarch64' +grep -Fq 'note aarch64: Mac-only omarchy/linux-aurora still provides linux' <<<"$output" || fail "a Mac-only linux provider is reported while it is not selected" "$output" pass "a Mac-only linux provider is reported while it is not selected" -grep -Fq 'ok generic: omarchy 1.0-1: -Su keeps equal and newer installs; -S replaces both; -S --needed skips equal' <<<"$output" || +grep -Fq 'ok aarch64: omarchy 1.0-1: -Su keeps equal and newer installs; -S replaces both; -S --needed skips equal' <<<"$output" || fail "equal-version and locally-newer transitions are checked" "$output" pass "equal-version and locally-newer transitions are checked" -platform apple "asahi-alarm core omarchy" "omarchy omarchy-mac linux-aurora uboot-asahi" 'kernel=linux-aurora' \ +platform aarch64-apple "asahi-alarm core omarchy" "omarchy omarchy-mac linux-aurora uboot-asahi" 'kernel=linux-aurora' \ 'transitions=(omarchy-mac linux-aurora uboot-asahi)' -expect_pass apple "the Apple set resolves with the Asahi repositories" \ - 'ok apple: linux resolves to asahi-alarm/linux-asahi' -grep -Fq 'note apple: with linux-aurora installed, linux resolves to omarchy/linux-aurora' <<<"$output" || +expect_pass aarch64-apple "the Apple set resolves with the Asahi repositories" \ + 'ok aarch64-apple: linux resolves to asahi-alarm/linux-asahi' +grep -Fq 'note aarch64-apple: with linux-aurora installed, linux resolves to omarchy/linux-aurora' <<<"$output" || fail "the linux provider is reported with the Apple kernel installed" "$output" pass "the linux provider is reported with the Apple kernel installed" -platform leak "core omarchy leaky" "omarchy leaky" "$generic" -expect_fail leak "a Mac package in a generic closure fails" 'leak: forbidden packages in the closure: omarchy/omarchy-mac' +platform leak "core omarchy leaky" "omarchy leaky" "$aarch64" +expect_fail leak "a Mac package in an aarch64 closure fails" 'leak: forbidden packages in the closure: omarchy/omarchy-mac' grep -Eq '^FAIL leak: packages depend on Mac-only names' <<<"$output" || - fail "a generic package depending on a Mac package fails" "$output" -pass "a generic package depending on a Mac package fails" + fail "an aarch64 package depending on a Mac package fails" "$output" +pass "an aarch64 package depending on a Mac package fails" platform owners "core omarchy" "omarchy clash" 'transitions=()' expect_fail owners "two packages owning one file fails" 'owners: files owned by more than one package' grep -Eq '/usr/bin/omarchy: (omarchy clash|clash omarchy)' <<<"$output" || fail "the shared path and both owners are named" "$output" pass "the shared path and both owners are named" -platform kernel "kernel-first core" "tool" "$generic" -expect_fail kernel "a generic root that selects the Apple kernel for linux fails" 'kernel: linux resolves to Mac-only kernel-first/linux-aurora' +platform kernel "kernel-first core" "tool" "$aarch64" +expect_fail kernel "an aarch64 root that selects the Apple kernel for linux fails" 'kernel: linux resolves to Mac-only kernel-first/linux-aurora' platform conflicting "core conflicts" "tool rival" expect_fail conflicting "two conflicting packages in one closure fail" 'conflicting: conflicting packages in the closure' @@ -168,7 +168,7 @@ platform versioned "core conflicts" "tool old-rival" expect_pass versioned "a versioned conflict the closure does not meet passes" 'ok versioned: no declared conflicts' platform repos "asahi-alarm core" "tool" "forbidden_repos=('asahi*')" -expect_fail repos "an Asahi repository on a generic platform fails" 'repos: forbidden repositories configured: asahi-alarm' +expect_fail repos "an Asahi repository on the aarch64 platform fails" 'repos: forbidden repositories configured: asahi-alarm' platform missing "core" "tool ghost" 'unpublished=([ghost]="not published yet")' 'transitions=(ghost)' expect_pass missing "an unpublished package with a reason is skipped" 'skip missing: ghost transitions \(not published yet\)' From 90dcbc2c38155e712331e5c2cd1fd9535e002002 Mon Sep 17 00:00:00 2001 From: Marcelo Alcantara Date: Sat, 10 Oct 2026 10:42:39 +1000 Subject: [PATCH 5/6] Name the platforms as the runtime does in the docs --- CONTRIBUTING.md | 8 ++++---- mac-manual/content/11-on-disk.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aef9194..e50e90d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,10 +21,10 @@ Omarchy keeps no Mac code of its own. It knows which platform it runs on and giv **Upstream, in omacom/omarchy:** -- Platform detection: `omarchy-hw-platform` and the `omarchy-hw-apple-silicon` predicate. +- Platform detection: `omarchy-hw-platform`, which names an Apple Silicon Mac `aarch64-apple`, and the `omarchy-hw-aarch64-apple` predicate. The packages here call it by its old name, `omarchy-hw-apple-silicon`, which every runtime they support ships. - The places a platform plugs in: the lifecycle dispatch operations (`setup-boot`, `setup-system`, `setup-user`, provisioning, reset, `update-verify`, `update-takeover`, the app install hooks), the platform root `/usr/share/omarchy-platform` and what Omarchy reads from it, the mkinitcpio HOOKS baseline, and the pacman platform guard. -- The default package lists, the Apple Silicon one included: adding or dropping a package every Mac gets by default is an upstream change to `install/omarchy-apple-silicon.packages`. -- Skipping a PC or Intel Mac quirk that misfires on Apple Silicon, behind `omarchy-hw-apple-silicon`. +- The default package lists, the Apple Silicon one included: adding or dropping a package every Mac gets by default is an upstream change to `install/omarchy-aarch64-apple.packages`. +- Skipping a PC or Intel Mac quirk that misfires on Apple Silicon, behind `omarchy-hw-aarch64-apple`. - Fixes found during Mac work that help every machine, such as the battery, LUKS and keyboard-layout fixes in [#14431](https://github.com/omacom/omarchy/pull/14431), which superseded #13362. **Here, in the packages:** @@ -40,7 +40,7 @@ Omarchy keeps no Mac code of its own. It knows which platform it runs on and giv | A bind or gesture behaves wrongly | Upstream, the same on every machine (the Apple SMC lid switch is the one Apple bind core keeps) | | Wi-Fi drops after resume on one Broadcom chip | `omarchy-mac` | | A new default package for every Mac | Upstream, in the Apple Silicon package list | -| A PC-only quirk also fires on Macs | Upstream, skipped behind `omarchy-hw-apple-silicon` | +| A PC-only quirk also fires on Macs | Upstream, skipped behind `omarchy-hw-aarch64-apple` | | Encrypted first boot fails on every machine, Macs included | Upstream | | The Mac's boot chain needs checking after an update | `omarchy-mac-boot`, in its `update-verify` entrypoint | | The Mac needs to act at a moment Omarchy has no hook for | Both: see below | diff --git a/mac-manual/content/11-on-disk.md b/mac-manual/content/11-on-disk.md index d10d38b..8302c2e 100644 --- a/mac-manual/content/11-on-disk.md +++ b/mac-manual/content/11-on-disk.md @@ -23,7 +23,7 @@ Package lists are composed from a base, an architecture and a platform. Only the ## Mac code stays on Macs -One detector, `omarchy-hw-platform`, answers `apple-silicon`, `generic-aarch64` or `generic`; a Snapdragon laptop is `generic-aarch64`. It reads the device-tree identity, falls back to what the kernel reports, and fails rather than guess when the evidence contradicts itself. Every Mac-only step asks it, and Mac services check again when they start, so nothing Apple-specific runs on x86 or on another ARM machine such as a Snapdragon laptop. +One detector, `omarchy-hw-platform`, answers `aarch64-apple`, `aarch64` or `x86`; a Snapdragon laptop is `aarch64`. It reads the device-tree identity, falls back to what the kernel reports, and fails rather than guess when the evidence contradicts itself. Every Mac-only step asks it, through its Apple predicate, and Mac services check again when they start, so nothing Apple-specific runs on x86 or on another ARM machine such as a Snapdragon laptop. A pacman hook in `omarchy-settings` refuses a transaction that would install a package tagged for another platform. Image builds declare their target platform in a manifest rather than reading the build machine, and live system changes ignore environment overrides. From 53df3cd0ac552d706dcb1d12e1024299fe27063e Mon Sep 17 00:00:00 2001 From: Marcelo Alcantara Date: Sat, 10 Oct 2026 11:01:19 +1000 Subject: [PATCH 6/6] Send Apple Silicon desktop work upstream now that #14431 merged --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e50e90d..3d50b37 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ | A new Mac-only package | Here: open an issue first, then a pull request that meets the package contract | | The Mac manual | Here, in the same pull request as the behaviour it describes | | Release, acceptance or package-resolution tooling | Here, in `tools/` | -| The desktop, shell, bindings or shared helpers | [omacom/omarchy](https://github.com/omacom/omarchy). Apple Silicon desktop work that builds on [#14431](https://github.com/omacom/omarchy/pull/14431) goes to that pull request while it is open. omarchy-mac's `quattro-upstream` is frozen. | +| The desktop, shell, bindings or shared helpers | [omacom/omarchy](https://github.com/omacom/omarchy). Apple Silicon desktop work goes there too, now that [#14431](https://github.com/omacom/omarchy/pull/14431) has merged it. omarchy-mac's `quattro-upstream` is frozen. | | Package recipes, signing and publication | [omacom/omarchy-pkgs](https://github.com/omacom/omarchy-pkgs) | | The macOS app, the Linux image or anything that runs once to install | [omacom/omarchy-mac-installer](https://github.com/omacom/omarchy-mac-installer) | | A hardware test report | [omarchy-m-testing.org](https://omarchy-m-testing.org) |