On 6/5/2020 12:21 PM, Johnny Hughes wrote:> if you click on the six digit number, for example, e52775 for the > current latest "import 389-ds-base-1.3.10.1-9.el7_8". The result is > every diff of every change for the rpm.That's quite handy! But not what I'm looking for. I'm trying to figure out what edits I made to my config files. My most recent case was trying to figure out what I'd done to my BIND files (/etc/named.*, /etc/logrotate.d/named, /var/named/*). I ended up just tarring them up and erasing and re-installing the bind package, then untarring my old config into a tmp directory and diffing the files individually, reapplying appropriate changes. Some packages make this a bit easier, such as systemd unit files (where my customization never touches a package file) and fail2ban (where customizations go in a .local file that overrides settings in a .conf file. I much prefer this pattern, but it doesn't work with older packages like BIND. Some packages have a hybrid structure with a directory for customizations, like apache.
On Fri, Jun 5, 2020 at 12:35 PM Kenneth Porter <shiva at sewingwitch.com> wrote:> On 6/5/2020 12:21 PM, Johnny Hughes wrote: > > if you click on the six digit number, for example, e52775 for the > > current latest "import 389-ds-base-1.3.10.1-9.el7_8". The result is > > every diff of every change for the rpm. > > That's quite handy! But not what I'm looking for. I'm trying to figure > out what edits I made to my config files. > > >don't most packages create a .rpmnew file if you've modified the previous package file ? -- -john r pierce recycling used bits in santa cruz
--On Friday, June 05, 2020 1:39 PM -0700 John Pierce <jhn.pierce at 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.
On Fri, Jun 05, 2020 at 12:34:07PM -0700, Kenneth Porter wrote:> I'm trying to figure out > what edits I made to my config files. > > My most recent case was trying to figure out what I'd done to my BIND files > (/etc/named.*, /etc/logrotate.d/named, /var/named/*). I ended up just > tarring them up and erasing and re-installing the bind package, then > untarring my old config into a tmp directory and diffing the files > individually, reapplying appropriate changes.Just to mention that 'etckeeper' from EPEL is a great way of tracking changes in /etc. It interfaces nicely with yum, such that installing a package means that it will commit changes to the /etc repo. And there's a daily crontab that commits changes. You can manually commit changes as well. Then you can 'git log -p' to see what changes were made to the file over time. It won't track /var/named/* though. Paddy -- Paddy Doyle Research IT / Trinity Centre for High Performance Computing, Lloyd Building, Trinity College Dublin, Dublin 2, Ireland. Phone: +353-1-896-3725 https://www.tchpc.tcd.ie/
On Mon, Jun 08, 2020 at 04:00:31PM +0100, Paddy Doyle wrote:> Just to mention that 'etckeeper' from EPEL is a great way of trackingAh, I see you mentioned you were using that already in the original post. Sorry for the noise. Paddy
--On Monday, June 08, 2020 5:00 PM +0100 Paddy Doyle <paddy at tchpc.tcd.ie> wrote:> It won't track /var/named/* though.I love etckeeper enough that I started keeping /var/named under git, as well. I do disable etckeeper's nightly commit as I don't want it combining unrelated changes into a single commit if I forget to commit. I have it set to block updates if there's an uncommitted change so I'll fix things when that happens.
On 6/06/20 7:34 am, Kenneth Porter wrote:> That's quite handy! But not what I'm looking for. I'm trying to figure > out what edits I made to my config files.Just mv those files that you changed (as shown by rpm -V packagename) and yum reinstall the package, then you can diff the original files to the ones you moved. Peter