diff options
| author | 2026-04-21 01:23:47 +0100 | |
|---|---|---|
| committer | 2026-04-21 01:23:47 +0100 | |
| commit | b8c5fd4dd8bfd09446576f085124b39b73c19521 (patch) | |
| tree | 4b803fe6bb498dda661dea251e93c633f1f1b65c | |
| parent | ab0ae819f9042d4a681e98e431bf3d352a6ee632 (diff) | |
| download | dotfiles-b8c5fd4dd8bfd09446576f085124b39b73c19521.tar.gz dotfiles-b8c5fd4dd8bfd09446576f085124b39b73c19521.tar.bz2 dotfiles-b8c5fd4dd8bfd09446576f085124b39b73c19521.zip | |
fix(etc-drift): match real pacman -Qkk "backup file:" prefix format
Pacman emits lines like "backup file: <pkg>: <path> (<reason>)", not the
"(Modified backup file)" suffix format. Anchor the path extraction to
/etc/ to avoid catching stderr warnings interleaved into a line.
Also extend etc/.ignore with /etc/{passwd,group,shells} — system-managed
identity files that surfaced in the new drift output.
| -rw-r--r-- | etc/.ignore | 7 | ||||
| -rw-r--r-- | justfile | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/etc/.ignore b/etc/.ignore index e27185c..3c1d9d9 100644 --- a/etc/.ignore +++ b/etc/.ignore @@ -13,12 +13,15 @@ # Per-host identity / secrets /etc/ssh/ssh_host_* +/etc/passwd +/etc/passwd- +/etc/group +/etc/group- /etc/shadow /etc/shadow- /etc/gshadow /etc/gshadow- -/etc/passwd- -/etc/group- +/etc/shells # pacman leftovers from removed packages *.pacsave @@ -210,7 +210,7 @@ etc-drift: echo "=== /etc drift ===" echo "--- modified package configs ---" - { pacman -Qkk 2>/dev/null | grep -oP ':\s+\K/\S+(?=\s+\((Modified|Altered) backup file\))' || true; } | sort -u \ + { pacman -Qkk 2>/dev/null | grep -oP '^backup file:\s+[^:]+:\s+\K/etc/\S+' || true; } | sort -u \ | while IFS= read -r p; do keep "$p" && echo " modified: $p"; :; done echo "--- user-created (no owning package) ---" |
