Record GPU/TPU host changes in the change journal

Seven gpu_tpu scripts now write through the journal for host changes only — driver and package installs, vfio binding, modprobe.d, /etc/modules, GRUB and udev — while VM and LXC configuration stays out; add_gpu_vm and install_coral_lxc journal only their host writes. amd_gpu_tools records its install, and pmx_journal.sh gains pmx_record_uninstall while changes_journal.py retires an installed package when ProxMenux removes it. What each function writes is byte-identical to before, verified by tests/journal/verify_journal_migration.py.
This commit is contained in:
MacRimi
2026-09-11 21:08:35 +02:00
parent 9c930de186
commit 2a672889bf
10 changed files with 373 additions and 117 deletions
+12
View File
@@ -419,6 +419,18 @@ pmx_record_install() {
"capture=created" "revert=purge" "exactness=none"
}
# Records that ProxMenux removed a package. On ingest this retires the
# package's installation entry, so a package installed and later removed no
# longer shows as present — the journal reflects the current state.
pmx_record_uninstall() {
local packages="$1" version="${2:-1.0}"
local -a fields
mapfile -t fields < <(_pmx_journal_common)
_pmx_journal_record "${fields[@]}" \
"class=installation" "operation=uninstall_package" "target=$packages" \
"function_version=$version" "capture=none" "revert=none" "exactness=none"
}
pmx_record_applied() {
local tool="$1" version="$2" state="${3:-applied}"
local -a fields