Detect architecture so x86 stays upstream and aarch64 stays Mac - #331
Detect architecture so x86 stays upstream and aarch64 stays Mac#331malik-na wants to merge 13 commits into
Conversation
omarchy-hw-arch prints aarch64 or x86_64. omarchy-hw-aarch64 is the codebase split. omarchy-hw-apple-silicon is aarch64 plus Apple in the device tree, so non-Apple ARM does not take the Asahi path.
x86 keeps Architecture = auto and the upstream [omarchy] repo. ARM configs move to default/pacman/aarch64/. Refresh and install select the tree with omarchy-hw-aarch64.
x86 keeps upstream behavior: a missing package fails the transaction. Arch Linux ARM lacks some packages upstream migrations name, so those skip with a warning instead of failing the install.
The Mac installer moves to install/aarch64/install.sh. Root install.sh runs it on aarch64 and points x86 at the Omarchy ISO when this tree has no ISO pipeline.
Replace live uname and device-tree checks with omarchy-hw-aarch64 or omarchy-hw-apple-silicon. Historical migrations and omarchy-mac-setup keep their original bootstrap checks.
The rc file pointed at the edge repo, and all three channel configs had extra SigLevel lines. Copy the upstream blobs so an x86 refresh stays on the matching Omarchy channel.
Restore omarchy-pkg-add's upstream root pacman path. Write hid_apple fnmode only on Apple Silicon or a loaded module, not because the kernel merely ships hid_apple. ESP and btrfs migrate tools require Apple Silicon, not any aarch64 board.
Assert the aarch64 installer resolves checkout to the repo root, x86 pacman channels keep their upstream URLs, and fnmode does not apply on generic x86 via modinfo.
26fcfd9 to
8eadff3
Compare
scottjones
left a comment
There was a problem hiding this comment.
Thanks for this, Malik. The split itself is sound: the pacman configs come back byte-identical to origin/quattro, the installer move is clean, the detectors are stubbable, and everything you touched passes. Four things need to change before it lands, plus some smaller notes inline.
1. The negated detector calls fail open. Six sites use ! omarchy-hw-aarch64, so a missing command (exit 127) reads as "x86". In fix-brcmfmac-supplicant.sh that means an Apple Silicon machine gets the Intel-Mac feature_disable quirk, which kills Wi-Fi on the M1 family. The old uname test failed closed. Please make the aarch64 check the positive branch, or have the detectors exit non-zero for "unknown" explicitly.
2. Two existing tests break locally. test/shell.d/brcmfmac-supplicant-test.sh (lines 94, 151, 216) and test/shell.d/preinstalls-test.sh (line 44) set PATH without $ROOT/bin, so ./test/shell on a checkout reports:
leaf.sh: line 33: omarchy-hw-aarch64: command not found
not ok - an Apple Silicon Mac is left alone
omarchy-remove-preinstalls: line 35: omarchy-hw-aarch64: command not found
not ok - ARM preinstalls restore the installable Obsidian substitute
CI is green only because main.yml exports PATH="$GITHUB_WORKSPACE/bin:$PATH". The tests you did update use PATH="$stub_bin:$ROOT/bin:$PATH"; these two need the same.
3. The x86 branch of install.sh is dead code. It sources install/packaging/all.sh, which exists in neither this tree nor upstream, and upstream has no install.sh at all (the ISO drives the install). That branch should just be the "install from the ISO" message, and the sentence in docs/file-layout.md describing it should go.
4. fnmode still leaks onto x86. With hid_apple loaded, fix-fkeys.sh writes fnmode=1. Upstream writes fnmode=2 for exactly that case (Lofree, external Apple keyboards, T2). Under "x86 stays upstream" the x86 branch should write fnmode=2, and fix-fkeys-test.sh currently pins the fork behavior.
On the bigger picture, since the description mentions rebasing and PRing upstream: I ran the numbers on this branch against origin/quattro in bin/, install/, default/, config/, shell/, migrations/.
| Count | |
|---|---|
| Upstream-owned files this fork edits (after this PR) | 91 |
| Of those, with no arch or Apple gate at all | 59 |
| Fork-only files in those directories | 95 (44 are migrations) |
The 59 ungated edits change behaviour for every user, not just Macs: media.lua replaces upstream's max/min brightness binds and adds F-key screenshot binds, input.lua flips natural scrolling and tap-to-click, git.sh adds aliases, network.sh rewrites iwd to wpa_supplicant on every install, plus snapper, sddm state, chromium flags, clock panel geometry, shebangs on ~20 install scripts, and the whole default/zsh/ tree. Upstream already accepts gated Apple work (install/hardware/apple/, omarchy-brightness-display-apple, and the ARM mirror scripts are all in origin/quattro), so the realistic path is many small gated PRs plus a decision to gate or drop the fork opinions above. A tree rebase will not get us there, and this PR, good as it is, does not change that. Happy to help carve that list up once this lands.
|
Re-checked the current head (
One correction to my item 3, so you don't go hunting for a bug that isn't there: the branch is guarded by Also useful for sequencing, since this branch is up to date with No rush from my side; flagging only so it doesn't look like it's waiting on me. |
|
@scottjones Addressed the four blockers and inline notes: safe architecture checks, test PATHs, dead installer code/docs, x86 |
Split Omarchy Mac from upstream Omarchy by architecture so this tree can rebase and, later, PR upstream without fighting overwritten shared files.
x86_64 uses upstream pacman configs, package-add behavior, and the ISO install path. aarch64 uses the existing Apple Silicon installer, ARM repos, and skip-unavailable package filter. Apple Silicon is a separate hardware check (
omarchy-hw-apple-silicon) so non-Apple ARM does not get Asahi audio or the notch bar.omarchy-hw-arch/omarchy-hw-aarch64/omarchy-hw-apple-silicondefault/pacman/(upstream) vsdefault/pacman/aarch64/install.shdispatches aarch64 toinstall/aarch64/install.shuname/ device-tree checks in install and runtime go through the detectors.omarchy-mac-setupand historical migrations are unchanged.Not for upstream
basecamp/omarchyyet.