Terkadang, setelah kita mengunduh paket rpm secara manual, kita perlu memeriksa integritas paket sha1 (md5) atau tanda tangan untuk menghindari masalah setelah diinstal atau selama instalasi. Juga, kita mungkin perlu mencari informasi paket lain seperti vendor, deskripsi, ringkasan. Posting ini menjelaskan cara untuk memeriksa integritas paket rpm serta informasi paket.
Memeriksa integritas paket rpm
Gunakan perintah “rpm -K –nosignature [rpm-file] “. Misalnya:
# rpm --checksig sendmail-8.14.7-5.el7.x86_64.rpm sendmail-8.14.7-5.el7.x86_64.rpm: rsa sha1 (md5) pgp md5 OK <<
Pesan "md5 OK" yang ditampilkan berarti file tidak rusak karena unduhan. Juga, Untuk melihat pesan yang lebih bertele-tele, ganti -K dengan -Kvv dalam perintah. Misalnya:
# rpm -Kvv --nosignature rhn-client-tools-1.0.0.1-45.0.3.el6.noarch.rpm D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key D: loading keyring from rpmdb D: opening db environment /var/lib/rpm cdb:mpool:joinenv D: opening db index /var/lib/rpm/Packages rdonly mode=0x0 D: locked db index /var/lib/rpm/Packages D: opening db index /var/lib/rpm/Name rdonly mode=0x0 D: read h# 246 Header sanity check: OK D: added key gpg-pubkey-ec551f03-53619141 to keyring D: Using legacy gpg-pubkey(s) from rpmdb D: Expected size: 521888 = lead(96)+sigs(772)+pad(4)+data(521016) D: Actual size: 521888 rhn-client-tools-1.0.0.1-45.0.3.el6.noarch.rpm: Header SHA1 digest: OK (97188088ec13fe00b4845fe3ec9bf733cdb4f132) MD5 digest: OK (96ed25287226d30545906749b5d63901) D: closed db index /var/lib/rpm/Name D: closed db index /var/lib/rpm/Packages D: closed db environment /var/lib/rpm
Melihat informasi paket rpm
Untuk menampilkan informasi tentangnya, gunakan perintah berikut "rpm -qip [rpm-file] ". Misalnya:
# rpm -qip rhn-client-tools-1.0.0.1-45.0.3.el6.noarch.rpm Name : rhn-client-tools Relocations: (not relocatable) Version : 1.0.0.1 Vendor: Oracle America Release : 45.0.3.el6 Build Date: Mon 01 Oct 2018 10:53:34 AM EDT Install Date: (not installed) Build Host: x86-ol6-builder-04.us.oracle.com Group : System Environment/Base Source RPM: rhn-client-tools-1.0.0.1-45.0.3.el6.src.rpm Size : 2837189 License: GPLv2 Signature : RSA/8, Mon 01 Oct 2018 10:53:51 AM EDT, Key ID 72f97b74ec551f03 URL : https://fedorahosted.org/spacewalk Summary : Support programs and libraries for Unbreakable Linux Network Description : Unbreakable Linux Network Client Tools provides programs and libraries to allow your system to receive software updates from Unbreakable Linux Network.
Untuk menampilkan informasi yang sama untuk paket yang sudah terinstal, gunakan perintah "rpm -qi [rpm-file] ". Misalnya:
# rpm -qi rhn-client-tools Name : rhn-client-tools Relocations: (not relocatable) Version : 1.0.0.1 Vendor: Oracle America Release : 45.0.5.el6 Build Date: Wed 09 Jan 2019 09:35:26 AM EST Install Date: Tue 26 Feb 2019 10:40:04 AM EST Build Host: x86-ol6-builder-05.us.oracle.com Group : System Environment/Base Source RPM: rhn-client-tools-1.0.0.1-45.0.5.el6.src.rpm Size : 2827020 License: GPLv2 Signature : RSA/8, Wed 09 Jan 2019 09:36:17 AM EST, Key ID 72f97b74ec551f03 URL : https://fedorahosted.org/spacewalk Summary : Support programs and libraries for Unbreakable Linux Network Description : Unbreakable Linux Network Client Tools provides programs and libraries to allow your system to receive software updates from Unbreakable Linux Network.