Skip to content

omarchy-mac-migrate: drop aurora-sep's pin block instead of refusing (#778) - #784

Open
joshuaswarren wants to merge 2 commits into
omacom:mac/migrate-standalonefrom
joshuaswarren:mac/migrate-aurora-sep-pin
Open

joshuaswarren wants to merge 2 commits into
omacom:mac/migrate-standalonefrom
joshuaswarren:mac/migrate-aurora-sep-pin

Conversation

@joshuaswarren

Copy link
Copy Markdown
Collaborator

Fixes #778. Stacked on #690 (base mac/migrate-standalone, parent 2976e70d).

Problem. A Mac with Touch ID through aurora-sep has the installer's own block in [options]:

# >>> aurora-sep pin (remove with: install-aurora-sep.sh --uninstall)
IgnorePkg = linux-aurora linux-aurora-headers libfprint m1n1-aurora
# <<< aurora-sep pin

Preflight reads it as an administrator hold on packages the migration changes and refuses. The way out the block names does not work on such a Mac (details in #778).

Change. admin_options now reads its input through a new aurora_sep_pin_dropped, which removes a block opened by # >>> aurora-sep pin and closed by # <<< aurora-sep pin inside [options]. That is one place, so the new pacman.conf and the pinned-target check agree: the block is not carried over and is not reported as a hold. Kept as written, and still refused:

  • a block that never closes inside its section (end of file, or the next section header comes first)
  • a hand-written IgnorePkg on the same packages outside the block

An administrator's own IgnorePkg stays. A failed pre-switch run restores the original pacman.conf, block included, through the existing backup.

Tests (mac-migrate-legacy-test.sh, +3 cases):

  1. A legacy Mac with the block plus IgnorePkg = firefox runs to its reboot and finishes. The block is gone, firefox is the only IgnorePkg left, and linux-aurora and m1n1-aurora are replaced.
  2. An unclosed block, and the same hold written by hand, still refuse with "holds back linux-aurora, which the migration changes" and change nothing.
  3. Direct cases on the function: an open marker at end of file, and a close marker in a different section, keep their lines. A closed block goes and its neighbours stay.

Observed RED before the change: case 1 refused with the two reasons from the issue. Two mutants (no end-of-file flush, no section-header flush) were each killed by case 3. Full suites on this branch: legacy 27, core 48, mx 28, move 4, all passing; migrate/build --check clean. bin/omarchy-mac-migrate and the README checksum are rebuilt.

Limits, please read.

Written with an AI coding agent (GLM 5.3 and Sonnet routed by the operator); reviewed against the diff and test output above, not by a human maintainer yet.

Why: a Mac with Touch ID through aurora-sep carries the installer's own
IgnorePkg block (linux-aurora, linux-aurora-headers, libfprint, m1n1-aurora).
Preflight read it as an administrator hold on packages the migration changes
and refused, and the way out the block names (install-aurora-sep.sh
--uninstall) does not work on such a Mac. See omacom#778.

What: admin_options now reads its input through aurora_sep_pin_dropped, which
removes a block opened by "# >>> aurora-sep pin" and closed by
"# <<< aurora-sep pin" inside [options]. One place, so the future pacman.conf
and the pinned-target check agree: the block is not carried into the new
configuration and is not reported as a hold. A block that never closes inside
its section, and a hand-written IgnorePkg on the same packages, are kept as
written and still refuse. An administrator's own IgnorePkg stays.

How proven: three new cases in mac-migrate-legacy-test.sh. The migration of a
Mac with the block was refused before the change (observed RED, same
"holds back linux-aurora / m1n1-aurora" reasons as the issue); it now reaches
its reboot, finishes, keeps "IgnorePkg = firefox" as the only IgnorePkg and
replaces linux-aurora and m1n1-aurora. Two direct cases pin the edge rules
(open marker at end of file, close marker in another section); a mutant that
drops either flush fails them. Full legacy (27), core (48), mx (28) and move
(4) suites pass; migrate/build --check is clean.

Not done: aurora-sep's other leftovers (aurora-touchid units, its GRUB entry,
/var/lib/aurora-sep state) are untouched, and the enclave files stay. The
marker text comes from the report in omacom#778, not from the installer source,
which I could not find. tool_version is left at 1 like its siblings.
@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable new issue was established.

Summary

The PR drops closed aurora-sep pin blocks during migration while keeping unfinished blocks and separately written package holds.

  • Mac migration drops the closed aurora-sep pin block.
  • Apple Silicon updates get only Hyprland from edge.

Reviews (2) · Last reviewed commit: "Select only hyprland from the aarch64 ed..." · Reviewed by Greptile

@joshuaswarren

Copy link
Copy Markdown
Collaborator Author

Maintainer request: please re-run the failed install.sh on Arch Linux ARM job on this PR (head a69c2aa9). I can't re-run workflows from my account.

The job fails with error: target not found: hyprtoolkit and error: target not found: hyprland-guiutils, which comes from the live package repositories, not from migrate/*. This PR touches only migrate/src/target.sh, bin/omarchy-mac-migrate, the README checksum line and test/shell.d/mac-migrate-legacy-test.sh, none of which install.sh runs.

Evidence it is not specific to this branch: run 41294563185 (codex/windows-venus-graphics, 2026-11-01) failed with the same two target not found lines, and a later run on that branch (41317880206) passed. I have not re-run it, so "unrelated" is likely, not proven, until the rerun is green. A different earlier failure (run 41307038302) did not show this error, so not every failure of this job has this cause.

The other checks pass on this head: Syntax + shellcheck, test/all, tests/all, Greptile.

@joshuaswarren

Copy link
Copy Markdown
Collaborator Author

[Joshua's agent] Source review of the head a69c2aa9595ebdabb8f95a1521bdf7a44c5cac79 against quattro ba546a61. I read the diff and the head files; I also ran the new aurora_sep_pin_dropped function directly on two edge inputs (below). I did not run the migration or its suites, and this is not an approval.

Confirmed sound. The write path and the refusal check agree because both read through admin_options: future_pacman_conf builds the post-switch conf from admin_options (migrate/src/target.sh:289-291), pinned_targets derives the "holds back ... which the migration changes" refusals from the same function (target.sh:317-331), and the in-transaction guard wraps the future conf, not the old one (bin/omarchy-mac-migrate:824), so the block is absent at every stage. The built and source copies of aurora_sep_pin_dropped are byte-identical at this head (I compared them), and migrate/build --check plus the README checksum cover drift. The two direct tests (open at EOF, close in another section) match the awk's behaviour.

Findings, with line refs:

  1. migrate/src/target.sh:246-248 — the markers must start at column 1 (index($0, marker) == 1). I ran it: with an indented # <<< aurora-sep pin the block never closes and every line is kept, so the migration still refuses on the hold. That is the safe direction, but the comment at target.sh:239-241 ("inside [options]") does not mention the column-1 requirement. One comment line, no change needed.
  2. migrate/src/target.sh:244-252 — two open markers before one close drop everything from the first open to the close, including a hand-written IgnorePkg written between them (I ran it: with # >>> ... / IgnorePkg = a / # >>> ... / IgnorePkg = firefox / # <<< ... the firefox line is dropped too). Pathological input, and the refusal path cannot catch what the filter already removed. A holding && index($0, open) == 1 case that refuses a second open marker would close it; optional.
  3. Behaviour to confirm on Touch ID hardware, not a defect in this code: dropping the block also drops the libfprint hold, which pinned_targets never names because libfprint is not in the changed set. The switch transaction may then upgrade libfprint. The only evidence Touch ID survives is the omarchy-mac-migrate refuses every Mac with Aurora Touch ID (aurora-sep pin), and leaves aurora-sep behind #778 reporter's hand-removal, which this PR already cites. Worth one line from @patatman after a real run.

The stack on #690 is why CI shows no useful run here; I did not evaluate that parent.

@patatman

patatman commented Nov 3, 2026

Copy link
Copy Markdown

Confirming the libfprint point on real hardware (MacBook Pro 14" M2 Pro, j414s, Touch ID through aurora-sep, migrated 2026-10-29 as described in #778 / #690):

  • With the pin block removed by hand, the switch transaction did upgrade libfprint: it is now 1:1.94.100.r10.g6f9479c-5 from the official Omarchy packages (installed 2026-10-29).
  • Touch ID kept working after the migration and reboot on linux-aurora 7.2.11-10-1-ARCH. I re-enrolled my fingerprint afterwards to be safe, and that works too.

So dropping the whole block, including the libfprint hold, matches what I saw. Note that I ran the migration before this PR existed, with the block removed manually, not with #784's code itself.

@joshuaswarren

Copy link
Copy Markdown
Collaborator Author

[Joshua's agent] Thank you, @patatman. That settles my third finding, and the source says why your result is the expected one rather than luck.

The package your migration moved to, libfprint 1:1.94.100.r10.g6f9479c-5, is omarchy-pkgs/pkgbuilds/libfprint-git (pkgver 1.94.100.r10.g6f9479c, pkgrel 5, provides=libfprint, conflicts=libfprint). On aarch64 it applies aurora-apple-sep.patch (Chris Kearney's Apple Touch ID driver, in that recipe since 2026-10-05) plus the two aurora Touch ID follow-ups (aurora-touchid-lid-switch.patch, aurora-touchid-retry.patch). So the official package carries the same SEP driver that aurora-sep's own libfprint-1.94.100-1.1 did, which is why Touch ID survived the upgrade and re-enrolment works.

What that changes in my review: the libfprint hold was there to stop a stock libfprint without the SEP driver replacing aurora-sep's build (install-aurora-sep.sh, PINNED= at line 295 of the 2026.10.17.20 release). Once the target channel's libfprint is the SEP-patched build, that reason no longer applies, and dropping the whole block is correct, not only for the kernel and m1n1 packages the migration names. Finding 3 is closed. Findings 1 and 2 (column-1 markers; a doubled open marker dropping lines up to the first close) stand as written: both are safe-direction or pathological, neither blocks.

One caveat for the maintainers, stated as a limit rather than a request: this holds while the channel's libfprint is libfprint-git with the SEP patch. If a channel ever ships a stock libfprint for aarch64, the dropped hold would let it replace the SEP build. A one-line check in pinned_targets that the target's libfprint provides the SEP driver is possible, but it is beyond this PR's scope and I am not asking for it here. Your run used the block removed by hand, not #784's code; the code path is the same admin_options filter, so the result transfers, but a run with #784 itself would close that last gap.

The edge repository publishes hyprland for aarch64 and does not carry hyprtoolkit or hyprland-guiutils, so naming them as omarchy/ targets made every update and install fail with "target not found" (omacom#741). Only omarchy/hyprland is selected from edge now; the other two come from the regular repositories. The pacman fixture models the real edge repository (hyprland only), the target and ignore-list expectations in the other tests follow, and the Install VM check now expects hyprland from edge and hyprtoolkit, hyprland-guiutils and aquamarine from extra.
@joshuaswarren

Copy link
Copy Markdown
Collaborator Author

Found the cause of the failing install.sh on Arch Linux ARM check and fixed it on this branch (new head 5030a3bc).

The edge repository (https://pkgs.omarchy.org/edge/aarch64) stopped publishing hyprtoolkit and hyprland-guiutils, so naming them as omarchy/ targets fails with target not found. That is issue #741, fixed upstream in #787 (commit b6227414), which landed on quattro after this branch's base mac/migrate-standalone was cut. The check runs against this PR's merge ref, so the stale base is what failed the job — nothing in the aurora-sep change itself.

The base branch lives upstream and is not mine to update, so I cherry-picked the upstream commit b6227414 onto this branch. The merge ref now carries the same install, VM-harness and docs content that passed the Install VM job upstream, the five affected suites (arm-package-sources, arm-package-transaction, arm-package-recovery, update-file-conflict, update-package-conflict) pass locally, and a trial merge with quattro is content-identical to what #787 already landed, so the later stack merge stays clean.

@joshuaswarren

Copy link
Copy Markdown
Collaborator Author

[Joshua's agent] Review at head 5030a3bc, the one commit after a69c2aa9.

  • The change is the package selection only: omarchy_arm_package_targets now prints omarchy/hyprland alone, because the edge repository no longer carries hyprtoolkit or hyprland-guiutils. The shell tests were updated to match, and they now assert that both companions are taken from the regular repository.
  • The aurora_sep_pin_dropped logic reviewed at a69c2aa9 is unchanged in this commit.
  • CI on this head: install.sh on Arch Linux ARM, tests/all, test/all and Syntax + shellcheck all succeeded at 2026-11-04 21:59 UTC. The branch is mergeable with no conflict.

Merging this into the mac/migrate-standalone stack now. The Touch ID behavior itself stays with the maintainers and the hardware confirmation already given in #778.

@joshuaswarren

Copy link
Copy Markdown
Collaborator Author

GREEN at 5030a3b

[Joshua's agent] Reviewed the full 13-file diff against stacked base 2976e70, including the bundled ARM package-source adjustments rather than just the aurora-sep filter.

The pin filter buffers a managed block until its close marker, flushes it unchanged at a section boundary or EOF, and is shared by the administrator-option read path so preflight and generated configuration agree. Direct checks pass for closed-block removal with neighboring options retained, unterminated EOF preservation and a closing marker in another section. The generated standalone script matches its sources and README checksum (d552e8ad…); migrate/build --check and shell syntax pass.

The package-source adjustment restricts explicit edge selection to Hyprland while its companion libraries use the regular repository. Package-source, recovery, file-conflict and package-conflict shell tests all pass. The real pacman temporary-database transaction test also passes its unchanged/upgrade/downgrade cases. No packages were installed on the review host.

Test limit: the full legacy migration suite hit a 240-second deadline after its first five passing cases; the later core/mx suites in that command were not reached. I did not rerun that long batch or claim the PR's full-suite counts as my own. The new filter boundary cases were checked separately as above.

No blocking findings. No Touch ID hardware, firmware/boot changes, live repository installation or complete migration run. The marker spelling and claimed hardware recovery remain based on the issue evidence, not a fresh reproduction here. Merge with the prerequisite stack and required CI, not as an independently qualified hardware change.

Reviewer: Codex GPT-6.1 Sol as routed by Main (model id unverifiable); implementer model unverified.

This branch has not been deployed

No deployments
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.

2 participants