testsAndMisc/linux_configuration/tests
Krzysztof kuhy Rudnicki 2a304691cb
Some checks are pending
Pre-commit checks / pre-commit (push) Waiting to run
Python tests / test (push) Waiting to run
fix(pacman): wrap makepkg so an orphaned db.lck can't hang makepkg -i
Vendored makepkg's run_pacman() waits on /var/lib/pacman/db.lck existence
with no timeout BEFORE invoking pacman, so an orphaned lock hangs
`makepkg -i` forever ("Pacman is currently in use, please wait...") and
the pacman wrapper's stale-lock cleanup never gets a turn. Wrap makepkg
(mirroring the pacman-wrapper pattern) to clear an orphaned lock up front.

- Extract stale-lock logic into shared pacman_lock_lib.sh; pacman_wrapper
  sources it after integrity verification and it is in the SHA256 manifest
- makepkg_wrapper: pre-flight clear for -i/--install; bypass on FAKEROOTKEY
  and non-install; FAIL OPEN if the lib is missing (never brick makepkg)
- Cross-user pacman_process_running() pgrep guard: unprivileged makepkg can
  detect a root pacman its own fuser cannot see (avoids removing a live lock)
- Upgrade survival: rewrap hook (Install/Upgrade only) + check_makepkg_wrapper
  drift verifier + both wrappers wired into the hourly periodic driver
- Fix reorg path bugs: stale ~/linux-configuration periodic path,
  $CONFIG_DIR/hosts -> scripts/periodic_background/hosts, test WRAPPER_DIR;
  refresh .orig only when target isn't already our symlink (no exec loop)
- Tests: test_makepkg_wrapper.sh (18) incl. hook Operation validity; add
  lib-integrity coverage to test_pacman_wrapper_security.sh (also path-fixed)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JsCs1GUyiinA7bg68YvAh1
2026-07-17 07:46:31 +02:00
..
__init__.py Harden runtime script deployment and enforce installer safety 2026-05-08 17:44:22 +02:00
conftest.py refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
test_android_guardian_post_fs_data.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
test_android_guardian_service.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
test_fast_count.py refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
test_hosts_file_monitor.sh fix: sync test paths, drop stale assertions, fix coverage gap 2026-05-16 15:46:02 +02:00
test_hosts_guard_pacman_integration.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
test_i3blocks_efficiency.sh feat(digital-wellbeing): time-boxed shutdown overrides + drift-proof i3blocks deploy 2026-07-10 21:57:05 +02:00
test_i3blocks_persist_common.sh feat(digital-wellbeing): time-boxed shutdown overrides + drift-proof i3blocks deploy 2026-07-10 21:57:05 +02:00
test_makepkg_capped.sh fix: sync test paths, drop stale assertions, fix coverage gap 2026-05-16 15:46:02 +02:00
test_makepkg_wrapper.sh fix(pacman): wrap makepkg so an orphaned db.lck can't hang makepkg -i 2026-07-17 07:46:31 +02:00
test_monitor_report.py refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
test_music_parallelism.sh fix: sync test paths, drop stale assertions, fix coverage gap 2026-05-16 15:46:02 +02:00
test_pacman_wrapper_security.sh fix(pacman): wrap makepkg so an orphaned db.lck can't hang makepkg -i 2026-07-17 07:46:31 +02:00
test_security_hardening.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
test_setup_dns_blocker.sh feat: add Pi-hole-like LAN DNS blocking served from the PC (dnsmasq) 2026-07-10 19:02:46 +02:00
test_shutdown_timer_monitor.sh fix: sync test paths, drop stale assertions, fix coverage gap 2026-05-16 15:46:02 +02:00
test_strip_workout_hosts.py refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
test_usage_monitoring_installer_efficiency.sh fix: sync test paths, drop stale assertions, fix coverage gap 2026-05-16 15:46:02 +02:00
test_usage_report_pmon_names.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
test_usage_report_since.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
test_validate_contract.py refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
test_validate_evidence.py refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00