I'm trying to write a puppet module that writes a templated config out but onlyif it's the stock config from the RPM (so as to not screw with any formatting they have going on). The rest of config management is done through augeas. Previously this worked but for some reason rpm -Vf isn't printing that smb.conf does indeed vary from when it was first installed. For example, I've made heavy changes to it and its timestamp yet:[root@vlmat ~]# rpm -Vf /etc/samba/smb.conf[root@vlmat ~]# echo $?0Doesn't reflect that the md5sum as changed at all nor does it change the return code. And smb.conf is in the rpm database but verifying the whole package doesn't yield anything:[root@vlmat ~]# rpm -qf /etc/samba/smb.confsamba-common-3.6.23-35.el6_8.x86_64[root@vlmat ~]# rpm -V samba-common[root@vlmat ~]#After editing another config file in that rpm:[root@vlmat ~]# rpm -V samba-commonS.5....T.  c /etc/sysconfig/sambaThe SHA256 sum does differ from what the database has:[root@vlmat ~]# rpm -ql --dump samba-common | grep smb/etc/samba/smb.conf 9778 1461617087 2474992be3adf11ef60aa754151f19b5756aaf9919cd6eacbd3f6b75c303dbb1 0100644 root root 1 0 0 X[...snip..][root@vlmat ~]# sha256sum /etc/samba/smb.conf270cd0ca5bce64448c31dc6c8e01d12f3d1217b8c208008a1dd1ddc976714774  /etc/samba/smb.confI seem to remember this method working before, but not sure what could have changed.EDIT:I've worked around the issue by having a bash script copy the template over if the sha256 checksum on the file and in the DB are the same but I'd like an explanation/workaround for the above method since I think it should work. Why does it see the change to one config file but not the one I was looking at?
rpm -Vf doesn't report a changed file
centos;rpm
The creator of an rpm spec file can override the default things to check for the verification of a given file. For example,%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/samba/smb.confmeans do not check the file's md5sum (size or mtime). These are still recorded in the database, but variation will be suppressed during a -V operation. You can still list all the verifications by adding -v to your -V  (though my rpm shows an md5 difference if there is one without this). $ rpm -Vvf /etc/samba/smb.conf | grep /etc/samba/smb.conf .........  c /etc/samba/smb.conf