Face unlock: Python, OpenCV and numpy from a root-owned pixi environment
CI / test (push) Successful in 2m41s
CI / test (push) Successful in 2m41s
- face/pixi.toml + pixi.lock (python 3.12, numpy, opencv-python-headless). `just install-face` passes the pixi on your PATH; install.py runs `pixi install --frozen` as root into /usr/local/lib/chandra/face-env (not the checkout's .pixi: the PAM module runs this Python as root, so it must not be user-writable), writes the helper's shebang for it and builds the PAM module with it as the default python. No python3-opencv needed; uninstall removes the env. - The PAM module now also refuses a Python that isn't root's; group-writable is accepted only for group root (conda/pixi files are 0775 root:root), in the module and chandra-face's checks. - Elevation re-runs on the same interpreter (sys.executable). "OpenCV is missing: run just install-face" instead of naming the distro package. Dropped a stray __pycache__. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hhiJfJNAYqWzQiuKMf
This commit is contained in:
10 files changed
+1105
-26
No files matched your search
@@ -104,11 +104,11 @@ test "Settings > Session: face unlock lists faces, adds one, turns it on, remove
|
||||
test "face unlock status lines" {
|
||||
let f = @shell.FaceUnlock::new()
|
||||
f.apply_status([
|
||||
"backend opencv", "device /dev/video0", "problem python3-opencv is not installed", "pam polkit-1,sudo",
|
||||
"backend opencv", "device /dev/video0", "problem OpenCV is missing: run just install-face", "pam polkit-1,sudo",
|
||||
"howdy login,gdm-password", "face 3\tGlasses\t2026-11-01",
|
||||
])
|
||||
assert_true(f.installed)
|
||||
assert_eq(f.problem, "python3-opencv is not installed")
|
||||
assert_eq(f.problem, "OpenCV is missing: run just install-face")
|
||||
assert_true(f.in_use())
|
||||
assert_eq(f.howdy, "login, gdm-password")
|
||||
assert_eq(f.faces, [("3", "Glasses", "2026-11-01")])
|
||||
|
||||
Reference in new issue
Block a user