Skip to content

Fix zram, DNS, and keyring gaps in the Apple Silicon install - #229

Merged
malik-na merged 5 commits into
omacom:quattrofrom
dl-alexandre:fix/fresh-install-zram
Aug 26, 2026
Merged

malik-na merged 5 commits into
omacom:quattrofrom
dl-alexandre:fix/fresh-install-zram

Conversation

@dl-alexandre

Copy link
Copy Markdown

Summary

  • add zram-generator to the default package set consumed by the fresh Mac installer
  • add a migration for existing installs that missed the package, reloads systemd, and starts the generated zram unit
  • add regression coverage for both fresh-install packaging and migration idempotence

Fixes #218

Validation

  • Apple Silicon/Asahi focused tests in Apple Container: passed
  • 141 Mac setup checks: passed
  • Bash syntax and error-level ShellCheck: passed
  • ARM64 Ubuntu container: migration repair and idempotence tests passed

@scottjones scottjones left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

The zram fix matches issue #218: zram-generator is in Arch Linux ARM extra (so not an unavailable-list candidate), lives only in omarchy-other.packages today, and is not consumed by the Mac installer, while install.sh installs omarchy-base.packages before system setup. Fresh installs stamp every migration via omarchy-provision-user --first-install without running them — this machine's 1773113401.sh marker is a 0-byte stamp — so a new migration is the right repair for existing installs. omarchy-pkg-missing / omarchy-pkg-add plus sudo systemctl matches sibling migrations and the privilege-escalation rule (migrate has a TTY). [email protected] is the correct unit: after daemon-reload the generator drop-in BindsTo=dev-zram0.swap, so starting setup also activates swap. The network.sh change is a separate live-install DNS fix (later hardware leaves such as apple/audio.sh call omarchy-pkg-add); it is justified, but the NetworkManager fallback is written to disk and never retargeted at the resolved stub on reboot.

Issue counts by severity

  • bugs: 0
  • suggestions: 2
  • nits: 1

Comment thread install/hardware/network.sh Resolved
Comment thread test/shell.d/zram-package-test.sh Resolved
Comment thread migrations/1787669934.sh Resolved
@dl-alexandre

Copy link
Copy Markdown
Author

Beta-test result on Apple Silicon host: the pushed fix (354086b) was exercised in a disposable UTM QEMU ARM64 VM (6 vCPU, 12 GB RAM, 64 GB disk) using an Arch ARM boot image. After the base Arch ARM builder keyring prerequisite was initialized, the installer refreshed the omarchy-aarch64 and asahi-alarm sources without the missing-database failure, installed the Omarchy package set, booted from the installed disk, rendered the Omarchy desktop, and opened the launcher with Super+Space. The guest remains running for further testing.

@scottjones

Copy link
Copy Markdown
Collaborator

Thanks for the VM run — finding the keyring gap by actually installing from scratch is the kind of testing that catches what review can't.

Two things before this lands.

The title now undersells it. Four commits in, this fixes zram, DNS during the live install, and Asahi keyring trust — and someone grepping the history for keyring work would never find it under "missing zram". I checked the fingerprint you import, 12CE6799A94A3F1B5DDFFE88F576553597FB8FEB, against the asahi-alarm-keyring package on an M2 Pro: it is the first of the two keys that keyring ships, and receiving by full fingerprint rather than a short id is the right way to do it. The change is sound, it just deserves a title that names it:

Fix zram, DNS, and keyring gaps in the Apple Silicon install

Splitting the keyring and DNS commits into their own PR would work too, and would let the zram half merge now rather than waiting on review of package-trust changes. Your call — either is fine, but the current title isn't.

The ordering assertion. The migration itself is correct: daemon-reload before start. My earlier note was about the test rather than the code — zram-package-test.sh greps for both calls independently, so it passes just as happily if they are swapped, and a swap is a real bug (the generator's drop-in BindsTo=dev-zram0.swap, so starting before the reload starts a unit the manager has not read yet). Comparing the two line numbers in $calls would pin it, the way test/shell.d/sddm-autologin-migration-test.sh and the upgrade-ref test pin their orderings.

Also still open from the earlier pass: migrations/1787669934.sh keeps its #!/bin/bash, and agents/skills/migrations.md says migrations start with the echo (the runner is already bash -euo pipefail).

One smaller thing on the new commit: sudo pacman -Sy --needed --noconfirm asahi-alarm-keyring is a partial sync followed by a single-package install. A full install pass follows immediately so it is unlikely to bite, but the same shape is now in two places.

@malik-na malik-na left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The zram half is the #218 fix and is ready: zram-generator belongs in omarchy-base.packages (the Mac installer never reads omarchy-other.packages), and the migration is the right repair because --first-install stamps migrations without running them.

Agree with Scott's remaining notes — none of them are “wrong code”, they are “this PR is now three fixes”:

  1. Title. This also bootstraps the Asahi Alarm keyring (fingerprint 12CE6799A94A3F1B5DDFFE88F576553597FB8FEB is the right master key, full fingerprint not a short id) and stops the live-install DNS outage. Rename to something like “Fix zram, DNS, and keyring gaps in the Apple Silicon install”, or split the keyring/DNS commits. The current title hides the trust change.
  2. Test ordering. zram-package-test.sh greps daemon-reload and start independently, so a swap still passes. Pin the line numbers in $calls the way sddm-autologin-migration-test.sh does. Starting the unit before the generator drop-in is loaded is a real bug.
  3. Migration shebang. agents/skills/migrations.md says migrations start with the echo; the runner is already bash -euo pipefail. Drop #!/bin/bash from 1787669934.sh.

Rebase onto #233 + #234 — both touch install.sh.

@dl-alexandre dl-alexandre changed the title Fix missing zram on fresh and existing Apple Silicon installs Fix zram, DNS, and keyring gaps in the Apple Silicon install Aug 26, 2026
@dl-alexandre
dl-alexandre force-pushed the fix/fresh-install-zram branch from 354086b to 2130200 Compare August 26, 2026 11:25
@dl-alexandre

Copy link
Copy Markdown
Author

Addressed the review notes in the updated branch:

Focused zram, installer, and network tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fresh installs get no zram: the migration is stamped without running, and zram-generator is not in the base package list

3 participants