Skip to content

Build libfprint-git for aarch64 with the Apple Touch ID driver - #806

Merged
maralcbr merged 1 commit into
omacom:masterfrom
scottjones:touchid/libfprint-package
Oct 5, 2026
Merged

maralcbr merged 1 commit into
omacom:masterfrom
scottjones:touchid/libfprint-package

Conversation

@scottjones

Copy link
Copy Markdown
Contributor

Summary

Omarchy's fingerprint setup installs libfprint-git, which built for x86_64 only, so Apple Silicon Macs had no Omarchy libfprint. It now builds for aarch64 too, and there it carries @iconidentify (Chris Kearney)'s aurora driver for Touch ID, which the aurora kernel's Secure Enclave driver exposes as /dev/sep-bio. The x86_64 build applies nothing new.

-arch=(x86_64)
+arch=(x86_64 aarch64)
-provides=(libfprint libfprint-2.so)
+provides=("libfprint=$pkgver" libfprint-2.so)   # aurora-touchid requires libfprint>=1.94.100-1.1
+source_aarch64=("aurora-apple-sep.patch")        # applied in prepare() on aarch64 only

The patch is Chris's libfprint-1.94.100-apple-sep.patch (iconidentify/aurora-linux sep-7.1.12.aurora2-11.35), less its tests/meson.build hunk: libfprint 3f1e2817, already in this pin, made the same fix. Besides the driver it adds 58 lines to libfprint's core, a generic "reader behind a kernel misc device" lookup that only a driver asking for it uses.

Evidence

Built on an M2 Max: 131 libfprint tests pass, 0 fail. Installed in place of Chris's own build, fprintd-verify matches with the existing enrollment. Part of making Touch ID work out of the box with omacom/omarchy-mac#694 and omacom/omarchy-mac-pkgs#12.

Merge Danger

Door: two-way

Blast Radius: aarch64 (new); x86_64 rebuild with only a versioned provide

🤖 Generated with Claude Code

Omarchy's fingerprint setup installs libfprint-git, which built for x86_64
only, so an Apple Silicon Mac had no Omarchy libfprint at all. It now builds
for aarch64 too, and there it carries Chris Kearney's aurora driver for
Touch ID, which the aurora kernel's Secure Enclave driver exposes as
/dev/sep-bio. The x86_64 build applies nothing new.

The patch is his libfprint-1.94.100-apple-sep.patch from
iconidentify/aurora-linux sep-7.1.12.aurora2-11.35, less its
tests/meson.build hunk: libfprint 3f1e2817, already in this pin, made the
same fix. The libfprint provide is now versioned, so aurora-touchid's
libfprint>=1.94.100-1.1 still resolves when this replaces his build.

Built on an M2 Max: 131 libfprint tests pass, none fail.

Co-authored-by: Chris Kearney <303316+iconidentify@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@scottjones

Copy link
Copy Markdown
Contributor Author

@ryanrhughes @powderluv could one of you review this? You've both worked on the libfprint-git recipe. It adds the aarch64 build with the Touch ID driver; x86_64 only gains the versioned provide.

scottjones added a commit to omacom/omarchy-mac that referenced this pull request Oct 5, 2026
The setup kept a platform's own libfprint because no Omarchy libfprint
carried a Mac's Touch ID driver. omarchy-pkgs' libfprint-git now builds for
aarch64 with that driver (omacom/omarchy-pkgs#806), so the setup's
libfprint-git is the right library on a Mac too, and this change only
teaches omarchy-hw-fingerprint the platform's readers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@maralcbr

maralcbr commented Oct 5, 2026

Copy link
Copy Markdown
Member

@scottjones reviewed at 6be6e98. The approach is right: x86_64 only gains the versioned provide, the patch applies on aarch64 only, and the new core hook is opt-in (only a driver that asks for a misc node uses it).

CI never built it. Both build jobs died in the builder image on pacman-key --recv-keys … --keyserver keys.openpgp.org ("Remote key not fetched correctly"), before makepkg. So the patch hasn't been applied to this pin, compiled or run through check() on either arch yet. Please re-run once the keyserver answers.

The versioned provide is fine: vercmp 1.94.100.r10.g6f9479c 1.94.100-1.1 is 1 in an Arch container, so aurora-touchid's libfprint>=1.94.100-1.1 is satisfied, and fprintd's unversioned dependency still resolves.

Before merge:

  • Licence notices. aurora-bio.h carries both GPL-2.0-only OR MIT and LGPL-2.1-or-later (and "Copyright 2026 Dj"), and aurora.c has no copyright line. Please settle the header on one licence (MIT if that's the intent; GPL-2.0-only alone wouldn't combine with libfprint's OpenSSL link) and give the driver its copyright, keeping Chris's credit.
  • prepare() guard. It skips the patch whenever drivers/aurora/aurora.c exists, a file the patch itself creates. If a later hunk fails, a rebuild in the same src/ compiles a half-patched tree. Checking for the core change (as the FocalTech guard checks content), or patch -R --dry-run, would close that.
  • /dev/sep-bio permissions. The interface has DELETE_ALL and the list path turns the enclave label into the print's user. If the node is readable/writable by anyone, any local user can wipe or relabel enrolments. Please confirm its mode on hardware and ship a root-only MODE rule if the kernel doesn't set one.
  • Late node / not-ready probe. libfprint queries misc at enumerate but doesn't watch it, and a probe that finds the sensor not ready fails permanently until fprintd re-enumerates. fprintd's idle exit softens this; worth checking a apple-sep load after fprintd has started and across sleep.

Nits: the patch has b2sums_aarch64=('SKIP') (same as the FocalTech patch); #include <pwd.h> is unused; probe requires interface version 4 exactly, so a kernel interface bump turns Touch ID off until this is rebuilt — worth noting next to the kernel pin.

Order across the three: this one first, once it builds and is published for aarch64; omacom/omarchy-mac#694 can land alongside; omacom/omarchy-mac-pkgs#12 last.

@maralcbr

maralcbr commented Oct 5, 2026

Copy link
Copy Markdown
Member

Follow-up after a second review at 6be6e98, on top of my earlier comment.

Builds on aarch64. makepkg -sf in the aarch64 builder image: the patch applies cleanly, check() passes 130 / 0, and the aurora driver is in libfprint-2.so. I've re-run the CI build jobs now that keys.openpgp.org is back.

Three new points:

  • Unmatched misc devices are leaked on every enumerate. misc_devices is a g_autoptr(GList), which frees only the list. Upstream releases the leftover devices with g_list_foreach (spidev_devices, (GFunc) g_object_unref, NULL) and the same for hidraw (fp-context.c:558-559 at the pinned commit). The patch adds no equivalent for misc_devices, so every misc node except sep-bio leaks a GUdevDevice each time fprintd enumerates. Fix: one g_list_foreach (misc_devices, (GFunc) g_object_unref, NULL); beside the other two.
  • Cancel never completes the action. aurora_cancel only sends AURORA_BIO_CANCEL. The poll watch stays armed and never checks fpi_device_action_is_cancelled(), so a late DONE still runs fpi_device_verify_report(MATCH_SUCCESS / FAIL) and completes the task as a match or no-match instead of cancelled. The device also stays busy until that poll. I checked whether this could unlock a dismissed prompt: it can't, because pam_fprintd has already left its wait loop and sent VerifyStop. So it's a correctness bug, not a security one. Completing as cancelled in the poll (or in cancel, after stopping the watch) fixes both.
  • Nit: aurora_match_start sets print and never reads it.

@maralcbr
maralcbr merged commit 049d767 into omacom:master Oct 5, 2026
8 of 11 checks passed
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Publish succeeded → live

Packages: libfprint-git (x86_64, PR artifact); libfprint-git (aarch64, PR artifact)

  • edge/x86_64: libfprint-git-1:1.94.100.r10.g6f9479c-2-x86_64
  • edge/aarch64: libfprint-git-1:1.94.100.r10.g6f9479c-2-aarch64

Commit 049d767 · run

scottjones added a commit to omacom/omarchy-mac that referenced this pull request Oct 5, 2026
…e it

Marcelo's review: the docs said a file must read "exactly" its value, but
the comparison drops trailing newlines, a space splits a line's fields and
the file is read as the session user; they now say so. A platform file that
matches nothing must never hide a USB reader, so the test now pairs one with
a real USB reader both ways. lifecycle-dispatch.md lists the file with the
others, and file-layout.md no longer says aarch64 libfprint-git carries the
Touch ID driver before omacom/omarchy-pkgs#806 publishes it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@scottjones

Copy link
Copy Markdown
Contributor Author

Thanks. In dcc5d858:

  • Guard: prepare() skips the patch only when patch -R --dry-run says every hunk is in. Tested on a fresh tree (applies), a patched one (skips) and a half-patched one (prepare() fails).
  • Checksum: real b2sum for the patch.
  • Interface version: comment that the driver accepts only /dev/sep-bio version 4, so kernel and patch move together.
  • Permissions: /dev/sep-bio is crw------- root root on the M2 Max, so no extra MODE rule.
  • Late node: aurora-touchid's fprintd drop-in waits up to 15 s for /dev/sep-bio, fprintd exits when idle, and its sleep hook restarts it; unlocking after 2 min, 3½ min and 1 h 15 min sleeps all worked. Not yet tested: apple-sep loading after fprintd has started.
  • Licence headers and pwd.h: that's Chris's and DjDeveloperr's code, so we'll ask them to settle the headers upstream and this patch will follow.

Also confirmed on hardware: installed in place of Chris's own build, this package enrolls and verifies. Pushing re-runs the build the keyserver killed.

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