Reputation: 49
I would like to find difference between installed xyz-1.0.rpm & latest available xyz-1.1.rpm on repository. Also would like to find out any file change happened in new rpm. How can I do that?
please help. Thanks
Upvotes: 1
Views: 3131
Reputation: 8118
You check the latest version of the as mentioned above using yum check-update
and check the version of the installed rpm: rpm -qa | grep mypackage
.
Next obtain the a copy of the current rpm and new rpm using yumdownloader
(you may need to use sudo as some TLS certs may only be accessible to root) e.g:
sudo yumdownloader mypackage-current.version
sudo yumdownloader mypackage-latest.version
Then install pkgdiff
: sudo yum install pkgdiff
and run it to generate an HTML report on the differences:
pkgdiff mypackage-current.version mypackage-latest.version
Upvotes: 0
Reputation: 306
You can check the changelog file:
make sure that you have the package yum-plugin-changelog
and then you can use this command to print the last (most recent) changelog message for the xyz
package
# yum changelog 1 xyz | less
otherwise you can use rpm:
# rpm -q --changelog -p xyz-1.0.rpm | less
# rpm -q --changelog -p http://mirror.centos.org/centos/6/os/x86_64/Packages/xyz-1.1.rpm | less
to List Files inside the rpm:
Download xyz-1.1.rpm
and list files in xyz-1.1.txt
# rpm -qlp xyz-1.1.rpm > xyz-1.1.txt
then list file of the installed package xyz-1.0.rpm
# rpm -ql xyz > xyz-1.0.txt
and finally:
# diff xyz-1.0.txt xyz-1.1.txt
;)
Upvotes: 3
Reputation: 155
yum check-update
This command allows you to determine whether any updates are available for your installed packages. yum returns a list of all package updates from all repositories if any are available.
https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s1-yum-useful-commands.html
Upvotes: 0