return list of files not owned by any package
I’m sure you’ve done this before. You add a file onto a system outside of any package and maybe outside of your config mgmt system and then you forget about it and when things go sideways you can’t find it and things get $bad.
Right, so this is a first version of a simple script to report the files which are on the system which are not owned by a package:
http://skvidal.fedorapeople.org/misc/return_unowned_files.py
run it like:
return_unowned_files.py /etc /usr
and it will return the files in those dirs that are not owned by a package.
A couple of things it does – it ignores ~ and .bak files it also ignores .pp files (b/c those are selinux policy compilations) and it will skip over symlinks.
Give it a try – you might be shocked as to how much crap there is in /etc, I know I was.
I’ll have another version before long that combines this with looking into puppet manifests to see if the file is controlled by puppet.