I'm used to using "git diff" and "svn diff" to view changes in my development system. Is there a similar thing that works with changes between a repository package and the installed RPM? Ie. something that shows the changes in /etc hinted at by "rpm -V". I'm already using etckeeper+git but that would combine changes from updates with my own modifications. The only thing I've found so far is a rather manual procedure: <https://serverfault.com/questions/378439/getting-diffs-for-file-changes-detected-by-rpm-v>
On 6/1/20 7:25 PM, Kenneth Porter wrote:> I'm used to using "git diff" and "svn diff" to view changes in my > development system. Is there a similar thing that works with changes > between a repository package and the installed RPM? Ie. something that > shows the changes in /etc hinted at by "rpm -V". I'm already using > etckeeper+git but that would combine changes from updates with my own > modifications. > > The only thing I've found so far is a rather manual procedure: > > <https://serverfault.com/questions/378439/getting-diffs-for-file-changes-detected-by-rpm-v>You COULD diff the directories containing exploded source code .. but I don't think it will help you. These are two totally separate programs and projects. It would be like trying to diff GNOME and KDE because they serve the same function. You could technically do it, but the result would have very little meaning as all the file names inside the code are different. The diff would be a copy of each file from both projects. On an EL8 system, yum is a symlink to dnf. So there is NO difference between yum and dnf on EL8 (they are the exact same file .. /usr/bin/dnf). The files for yum and dnf in /usr/bin/ are python scripts .. but they also import many python libraries .. so they are not totally contained in a single file.
--On Friday, June 05, 2020 9:10 AM -0500 Johnny Hughes <johnny at centos.org> wrote:> These are two totally separate programs and projects.I'm not talking about diff'ing the yum and dnf programs. I'm talking about diffing the RPM packages that "rpm -V" reveals as changed. Such a utility would download the package if it wasn't in the cache, unpack it with cpio into a temp directory, and diff the component files against the copies on disk. yum and dnf would only be involved because they maintain a package cache so they might be the logical place to implement a plugin to do this.