--On Friday, June 05, 2020 1:39 PM -0700 John Pierce jhn.pierce@gmail.com wrote:
don't most packages create a .rpmnew file if you've modified the previous package file ?
That file is created AFTER you've made edits, and reflects only the state of the file in the latest package. So it's not clear what changed from the original package that needs to be migrated into one's current settings.
As a rule I try to copy the original files to xxx.original so I can compare that to both the .rpmnew file and my working file. But I or another admin might forget to save the original. So I end up going the cpio route to extract the original files to a temp tree to do the 3-way comparison between the original, my modifications, and the latest package's modifications.
I do something similar. Before editing any config file, I create a copy of it named xxx.orig. If I once forgot to do it in time, I have a helper script 'mkorig [file]' which extracts the file from the corresponding RPM. Now when doing upgrades with our package managing tool, this will upgrade using YUM/DNF and after this it's merging all config files. This goes well in ~95% of the cases. For the cases where merging wasn't possible, it produces the .rej files so one can merge by hand.
Simon