Skip to content

Migrate mx-mac Macs in place (ticket 43) - #571

Merged
maralcbr merged 11 commits into
quattro-upstreamfrom
mac/43-mx-mac-adapter
Sep 26, 2026
Merged

maralcbr merged 11 commits into
quattro-upstreamfrom
mac/43-mx-mac-adapter

Conversation

@maralcbr

@maralcbr maralcbr commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Ticket 43: the mx-mac cohort adapter for omarchy-mac-migrate, verified by migrating the M1 Pro in place.

What changed

  • lib/migrate-mx-mac.sh: an mx-mac Mac (the fork's omarchy-dev pair, told by its updaters or their records) takes the Mac packages and every target package it has from the target in one transaction. Every other fork build (bundle packages, anything installed at the version the fork's [omarchy] or [omarchy-aurora] lists) moves to the official build of its own name, else to its renamed counterpart (omarchy-dev → omarchy, quickshell-git → quickshell, mise/.NET → -bin), removed by name after the install where the counterpart's conflict misses it. What nothing official carries is kept and listed. The switch drops [omarchy-aurora] and the fork's [omarchy] and deletes the fork's package and release keys. Retire moves the bundle and channel updaters' records into the backup.
  • Engine (built on Convert legacy omarchy-mac installs to official packages and trust #564's hooks, merged in):
    • a stale .db.sig beside a replaced database is removed. pacman rejects the official omarchy.db beside the fork's signature.
    • the transaction goes back to rehearse when pacman.conf or a retired key comes back after the switch (the fork's own omarchy update).
    • planned removals are matched by exact name (pacman -Q resolves provides).
    • planned removals stay out of the upgrade (--ignore) in resolve, download, rehearsal and transaction. Once omacom's omarchy-dev (which provides omarchy) is newer than the frozen fork's, pacman would otherwise drop the omarchy target. The rehearsal must also end with every target installed.
    • a test interrupt point in the Limine loader branch.
  • README: the mx-mac cohort, and what its activation (ticket 53) must do. omarchy-dev owns five commands omarchy-mac-boot ships, so the package cannot be installed on its own on an mx-mac Mac.

Tests

  • test/mac-migrate-mx-test.sh covers:
    • the whole transition.
    • kill -9 after, during and in the middle of every journal step and of the adapter's retire.
    • the fork's update, a rewritten pacman.conf or a fork key between steps.
    • refusals that leave the fixture byte-identical.
    • GRUB and repository-target mx Macs, and an official build of the fork build's own name.
  • The fake pacman now rejects a mismatched db signature, answers -Q through provides, honours --ignore and drops a target that conflicts with a package providing it. Each fix was checked to fail its test when reverted.
  • Full boot suite: 229 ok on aarch64. The package check() passed at the M1 build.

M1 Pro run (mx-mac → candidate set, in place)

  • Set apple-test-43-2060cf8ce1ef-20260926: Signed test candidate set for quattro-upstream 99ace4070 #555's set with omarchy-mac-boot 20260926-1.45 built from 2060cf8. It was signed only with the local test-lane key and never published.
  • Before any change: snapper pre-migration snapshot; /boot, ESP and LUKS header copied off the Mac; boot check passed.
  • Engine delivered with pacman -U --overwrite on the five shared paths.
  • Two earlier attempts stopped at prefetch, before the switch, on the bugs fixed here: provides-matched removals, and omacom's quickshell-git.
  • Final run:
    • kill -9 during prefetch.
    • kill -9 right after repositories done.
    • resume.
    • one unattended reboot, back in 36 s. The verify unit completed the migration at boot.
  • Result:
    • Aurora 7.1.12.aurora2-10 through the packaged Limine.
    • No fork repository, signature, key, TrustAll or updater state.
    • LUKS header byte-identical. crypttab, cmdline, lab unlock, /etc/default/limine, fstab and snapper config unchanged. Snapshots kept.
    • Hardware check: 14 pass, 0 fail. The one warning is the 42 quattro upstream migrations still pending.
  • Later commits: 55e3ff9 (preflight refusal only), a quattro-upstream merge, and 51b2f9f (--ignore of planned removals and the installed-targets check). None changes the steps the M1 ran; the ignore matters only once omacom's omarchy-dev outversions the fork's.

Follow-ups (not here)

  • Ticket 53: deliver the engine to mx-mac Macs (the five shared commands).
  • The M1's 99ace runtime predates Convert legacy omarchy-mac installs to official packages and trust #564's 1788200000 journal guard. Don't run omarchy update there until a runtime with it is installed.
  • Engine: prefetch trusts same-named files in the live cache. No collisions on the M1.
  • Ticket 53: an omacom dev-channel Mac (omacom's own omarchy-dev) is refused rather than skipped, which keeps its upstream migration pending. Decide before activation.

Second review: three rounds; every verified finding fixed (the last one, omacom's omarchy-dev, in 51b2f9f).

…rk's updaters

The mx-mac adapter names the Mac packages from the target and moves every
fork build an official repository carries to that build in one transaction,
drops [omarchy-aurora], the fork's [omarchy] and its keys, and moves the bundle
and channel updaters' records into the backup. The engine now removes a
signature left beside a replaced database, which pacman would reject, and goes
back to rehearse when pacman.conf or a retired key comes back before the
transaction.
The official repositories carry mise and the .NET host and runtime only as
their -bin builds, which conflict with the fork's, so an mx-mac Mac would
otherwise keep fork builds nothing updates.
… coming back

Review fixes: the adapter names the target's packages (the Mac packages, and
any the Mac has or that replace a fork build) instead of a fixed list, refuses
a target without the runtime pair, allows omarchy-settings-asahi's removal as
the tester does, and the restart message says what changed. Tests cover a fork
key trusted again on its own, the bundle's pending release record, and a
target package the Mac never had.
…isses by name

The mx-mac adapter refuses a target without the runtime pair in preflight and
lists the fork builds replaced under another name as planned removals, so a
fork dotnet-runtime that dotnet-runtime-bin's versioned conflict does not catch
is removed after the install instead of staying beside it.
pacman -Q NAME answers with a package that provides NAME, so a fork build its
official counterpart replaced (mise, by mise-bin) was still listed and pacman -R
refused it, failing the rehearsal. Found on the M1 Pro run; the fake pacman now
answers -Q through provides as pacman does.
omacom edge carries quickshell-git itself, so naming quickshell for the fork's
quickshell-git lost to the upgrade of quickshell-git and left a removal that
broke omarchy's dependency. Found on the M1 Pro run.
omacom edge carries an omarchy-dev of its own, so the engine's cohort guess by
package name could take an official dev-channel Mac for mx-mac. The adapter
now requires the fork's updaters or their records.
…talled

omacom's own omarchy-dev provides omarchy. Once it is newer than the frozen
fork's, -Su would take it and pacman would drop the omarchy target it conflicts
with, as it dropped quickshell for quickshell-git on the M1 Pro. The planned
removals are ignored in the resolve, download, rehearsal and transaction, and
the rehearsal must end with every target installed. The fake pacman now drops a
target that conflicts with a package providing it, as pacman does.
@maralcbr
maralcbr merged commit 7f86a2f into quattro-upstream Sep 26, 2026
5 checks passed
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