diff --git a/bin/omarchy-remove-security-fingerprint b/bin/omarchy-remove-security-fingerprint index c5355a7b..01295892 100755 --- a/bin/omarchy-remove-security-fingerprint +++ b/bin/omarchy-remove-security-fingerprint @@ -34,6 +34,6 @@ remove_pam_config remove_lock_fingerprint_pam echo "Removing fingerprint packages..." -omarchy-pkg-drop fprintd libfprint-git +omarchy-pkg-drop fprintd libfprint libfprint-git echo -e "\e[32mFingerprint authentication has been completely removed.\e[0m" diff --git a/bin/omarchy-setup-security-fingerprint b/bin/omarchy-setup-security-fingerprint index 07bf5e10..ffdbed34 100755 --- a/bin/omarchy-setup-security-fingerprint +++ b/bin/omarchy-setup-security-fingerprint @@ -74,16 +74,14 @@ fi # Install required packages echo "Installing required packages..." -installed_libfprint=$(pacman -Qq libfprint 2>/dev/null || true) - # libfprint-git provides+conflicts libfprint; pacman -S --noconfirm -# defaults the conflict prompt to N and aborts. Pre-remove the exact -# libfprint package, but not an installed provider like libfprint-git. -if [[ $installed_libfprint == "libfprint" ]]; then - sudo pacman -Rdd --noconfirm libfprint +# defaults the conflict prompt to N and aborts. Pre-remove it (deps-only, +# so an installed fprintd stays put) so stock libfprint installs cleanly. +if pacman -Q libfprint-git &>/dev/null; then + sudo pacman -Rdd --noconfirm libfprint-git fi -omarchy-pkg-add libfprint-git fprintd usbutils +omarchy-pkg-add libfprint fprintd usbutils # Configure PAM setup_pam_config diff --git a/migrations/1785090473.sh b/migrations/1785090473.sh new file mode 100644 index 00000000..1e64b6ee --- /dev/null +++ b/migrations/1785090473.sh @@ -0,0 +1,17 @@ +echo "Switch fingerprint support back to stock libfprint" + +# libfprint-git existed to carry the focaltech_moc driver and the FocalTech +# FT9349 device ID (2808:a97a) before any release shipped them. libfprint +# 1.94.100 has both, so fingerprint setups go back to the stock Arch package. + +# The remove/install pair below isn't one transaction: if the install failed +# on a previous run, libfprint-git is already gone but fprintd is left with +# no libfprint — the elif finishes the job on rerun. +if pacman -Q libfprint-git &>/dev/null; then + # Deps-only removal keeps fprintd installed while its libfprint + # dependency is swapped out underneath it. + sudo pacman -Rdd --noconfirm libfprint-git + omarchy-pkg-add libfprint +elif pacman -Q fprintd &>/dev/null && ! pacman -Q libfprint &>/dev/null; then + omarchy-pkg-add libfprint +fi