π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[Docs] Adapt Polkit policy installation instructions for immutable distros (#10911)
davideb263d9cac23ea014
diff --git a/docs/docs/auth/troubleshooting/linux-system-auth.md b/docs/docs/auth/troubleshooting/linux-system-auth.mdindex 8eeabe2b0d..0b2e1a3339 100644--- a/docs/docs/auth/troubleshooting/linux-system-auth.md+++ b/docs/docs/auth/troubleshooting/linux-system-auth.md@@ -33,6 +33,10 @@ Flatpak apps cannot install host Polkit policies by themselves, and AppImage ormanual builds may also need manual setup. Download the policy from GitHub andverify its SHA-256 checksum before installing it:+The script automatically selects the correct install path: `/usr/share/polkit-1/actions/`+on traditional distros, or `/etc/polkit-1/actions/` on immutable distros (such as+Fedora Atomic, Universal Blue, or similar) where `/usr/share` is read-only.+```shpolicy_url="https://raw.githubusercontent.com/ente-io/ente/main/mobile/apps/auth/assets/polkit/com.ente.auth.policy"policy_sha256="efba0409db9a0a53196fa8a7c9f4d4e874234b48287eb5242cf399f466e4c695"@@ -40,30 +44,41 @@ policy="$(mktemp)"if curl -fsSL "$policy_url" -o "$policy" &&printf "%s %s\n" "$policy_sha256" "$policy" | sha256sum -c -; then- sudo install -D -o root -g root -m 0644 \- "$policy" \- /usr/share/polkit-1/actions/com.ente.auth.policy-- if command -v chcon >/dev/null 2>&1; then- sudo chcon system_u:object_r:usr_t:s0 \- /usr/share/polkit-1/actions/com.ente.auth.policy || true++ # Use /etc on immutable distros (read-only /usr), /usr/share on traditional ones+ if findmnt -n -o OPTIONS --target /usr/share/polkit-1/actions 2>/dev/null | grep -qw ro; then+ install_path="/etc/polkit-1/actions/com.ente.auth.policy"+ else+ install_path="/usr/share/polkit-1/actions/com.ente.auth.policy"fi-++ sudo install -D -o root -g root -m 0644 "$policy" "$install_path"++ if command -v restorecon >/dev/null 2>&1; then+ sudo restorecon -v "$install_path" || true+ fi++ # Give polkit time to pick up the new action via inotify+ sleep 1+pkaction --action-id com.ente.auth.unlock --verboseelseecho "Policy download or checksum verification failed. Not installing."fi-+rm -f "$policy"```### Remove the PolicyIf you manually installed the Polkit policy and no longer want Ente Auth to use-Linux system authentication, remove it:+Linux system authentication, remove it from whichever path was used during install:```shsudo rm -f /usr/share/polkit-1/actions/com.ente.auth.policy+# or, on immutable distros:+sudo rm -f /etc/polkit-1/actions/com.ente.auth.policy+```## Fingerprint Prompts