You are not logged in.
Pages: 1
There are quite a few specific configuration settings e.g. under "/etc".
I wonder if there is a tool that helps finding changes in my installation with respect to the configuration within the packages?
I did this semi-manually in the following way for example for /etc/pam.d:
As normal user, change to the directory /etc/pam.d as root and run:
for f in *; do pacman -Qo $f; donePut the result into a file named, for this example "~/pam-pkgs.txt".
Create a directory to store the original configuration files, change to that directory and run:
for p in $(cat ~/pam-pkgs.txt | sed 's/.*is owned by//' | sort | uniq | awk '{ print $1 "-" $2 }') ; do tar --zstd -xf /var/cache/pacman/pkg/$p*.pkg.tar.zst etc; doneChange to the etc in the new directory and run as root:
for f in $(find -type f); do diff --brief $f /etc/$f; doneThis produces a list of files that differ with respect to the packages content.
These files can then be compared e.g. with vimdiff.
I guess there is a toll out there that already does all that?
Offline
this gives just the paths:
sudo pacman -Qkk|grep -ioP "/etc/.+(?= \(SHA256)">pathsthis gives package names and paths:
sudo pacman -Qkk|grep -ioP "(?<=backup file: ).+/etc/.+(?= \(SHA256)">names_and_pathslists the files in /etc that are owned by a package and differ from default
Last edited by jonno2002 (2025-08-03 20:43:07)
Offline
Pacman already has such a mechanism, If they are files that are part of the package and they are listed as backup in the pkg, you'll automatically get pacnew files for the files in question if yours differ from the package, which you can check and query with pacdiff. https://wiki.archlinux.org/title/Pacman … nd_Pacsave -- pacman will notify you when it creates these during an update
Offline
you'll automatically get pacnew files for the files in question if yours differ from the package
If yours differs *AND* it changed in the package. I don't think that's what they're looking for.
Offline
Thanks for the hints. I think it is more difficult than I thought. Because my approach does not show files added in /etc with respect to the original packages content. I guess I should have tracked the changes I did in a separate git repository.
Offline
grep -E '^etc/' /var/lib/pacman/local/*/files will get you a list of all pacman controlled files in /etc
Every file under /etc not listed there is foreign (might be created by an install hook, but still)
As suggested by jonno2002, pacman -Qkk will get you a list of deviating files, but for the actual difference you'll have to fetch the original file from the package.
Online
@seth
Ah that's easy.
Thanks.
Offline
Fwwi, you can also "pacman -Qlq"
Online
Pages: 1