Some unknown changes were made to my baseline (java/ C++) and installed in a new rpm. I would like a way to compare the content of this rpm with an old one to see the changes made. Is this possible?
If there is no easy way to do this, is there a way to get a content list of rpm file names within it organized by date?
If you just want to get the list of files in the package with dates, you can run rpm -qlv mypackage . Drop the extension . rpm . The command should be rpm -qlv myRPM , or whatever the whole package name was displayed when grepping for myRPM .
RPM stands for Red Hat Package Manager. It was developed by Red Hat and is primarily used on Red Hat-based Linux operating systems (Fedora, CentOS, RHEL, etc.). An RPM package uses the . rpm extension and is a bundle (a collection) of different files.
To view all the files of an installed rpm packages, use the -ql (query list) with rpm command.
The RPM Package Manager (RPM) is a package management system that runs on RHEL, CentOS, and Fedora. You can use RPM to distribute, manage, and update software that you create for any of the operating systems mentioned above.
Try pkgdiff to visualize differences between RPM packages:
pkgdiff PKG-0.rpm PKG-1.rpm
If you compare SRC.RPM then the tool will extract and compare the internal tarball too (unless the -skip-subarchives option is defined).
To rigorously compare two rpm files (let's call them one.rpm and another.rpm), you'll want to check the digests of the constituent files as well as check the pre- and post-[un]install scripts (because these scripts might modify the system state):
$ diff <(rpm -q --dump --scripts -p one.rpm) <(rpm -q --dump --scripts -p another.rpm)
You might also want to compare the signatories (if there are any):
$ diff <(rpm -q --qf '%{SIGPGP:pgpsig}\n%{SIGPGP:armor}\n' -p one.rpm) <(rpm -q --qf '%{SIGPGP:pgpsig}\n%{SIGPGP:armor}\n' -p another.rpm)
(or, if you're especially pedantic:
$ diff <(rpm -q --qf '%{DSAHEADER:pgpsig}\n%{DSAHEADER:armor}\n%{RSAHEADER:pgpsig}\n%{DSAHEADER:armor}\n%{SIGGPG:pgpsig}\n%{SIGGPG:armor}\n%{SIGPGP:pgpsig}\n%{SIGPGP:armor}\n' -p one.rpm) <(rpm -q --qf '%{DSAHEADER:pgpsig}\n%{DSAHEADER:armor}\n%{RSAHEADER:pgpsig}\n%{DSAHEADER:armor}\n%{SIGGPG:pgpsig}\n%{SIGGPG:armor}\n%{SIGPGP:pgpsig}\n%{SIGPGP:armor}\n' -p another.rpm)
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With