testsAndMisc/linux_configuration/scripts/periodic_background/system-maintenance/bin
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 Split modules, fix tests, fix pre-commit batching 2026-05-22 22:48:28 +02:00
_usage_report_parsing.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
_usage_report_pmon.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
_usage_report_render.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00
_usage_report_types.py fix(usage_report): stop charging atop's HZ field as CPU; bundle since-last-report mode 2026-06-04 18:13:47 +02:00
auto-system-update.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
browser-preexec-wrapper.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
hosts-file-monitor.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
install_usage_monitoring.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
periodic-system-maintenance.sh fix(pacman): wrap makepkg so an orphaned db.lck can't hang makepkg -i 2026-07-17 07:46:31 +02:00
shutdown-timer-monitor.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
usage_report.py feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00