Main Menu

Search

Showing posts with label rpm command. Show all posts
Showing posts with label rpm command. Show all posts

LINUX: How To List Changelog Which Lists All the Changes Which Went Into RPM Package in Linux? ("rpm" command) (How To Doc)

Below command can be used to check to list changelog which lists all the changes which went into RPM package in Linux.
rpm -q --changelog <rpm package name>

Below is example snippet of above command which lists changelog of openssl rpm package.



# rpm -q --changelog openssl
* Tue Mar 12 2019 Kevin Lyons <kevin.x.lyons@oracle.com> 1.0.2k-16.0.1.el7_6.1
- Bump release for rebuild.

* Wed Feb 06 2019 Tomáš Mráz <tmraz@redhat.com> 1.0.2k-16.1

- use SHA-256 in FIPS RSA pairwise key check
- fix CVE-2018-5407 - EC signature local timing side-channel key extraction

* Tue Aug 14 2018 Tomáš Mráz <tmraz@redhat.com> 1.0.2k-16

- fix CVE-2018-0495 - ROHNP - Key Extraction Side Channel on DSA, ECDSA
- fix incorrect error message on FIPS DSA parameter generation (#1603597)

* Tue Jun 19 2018 Tomáš Mráz <tmraz@redhat.com> 1.0.2k-14

- ppc64le is not multilib architecture (#1585004)

* Mon Jun 18 2018 Tomáš Mráz <tmraz@redhat.com> 1.0.2k-13

- add S390x assembler updates
- make CA name list comparison function case sensitive (#1548401)
- fix CVE-2017-3735 - possible one byte overread with X.509 IPAdressFamily
- fix CVE-2018-0732 - large prime DH DoS of TLS client
- fix CVE-2018-0737 - RSA key generation cache timing vulnerability
- fix CVE-2018-0739 - stack overflow parsing recursive ASN.1 structure

Products to which Article Applies


All Linux Environments

Additional References
https://www.centos.org/forums/viewtopic.php?t=51443


LINUX: How To Check List of Security Vulnerabilities (CVE) Fixes In Particular RPM Package On Linux? ("rpm" command)

Below command can be used to check of list of security vulnerability fixes (CVE fixes) in particular rpm package version on Linux.
rpm -q --changelog <rpm package name> | grep -i cve

Below is example snippet of above command which lists vulnerability fixes on openssl rpm package.


# rpm -q --changelog openssl | grep -i cve
- fix CVE-2018-5407 - EC signature local timing side-channel key extraction
- fix CVE-2018-0495 - ROHNP - Key Extraction Side Channel on DSA, ECDSA
- fix CVE-2017-3735 - possible one byte overread with X.509 IPAdressFamily
- fix CVE-2018-0732 - large prime DH DoS of TLS client
- fix CVE-2018-0737 - RSA key generation cache timing vulnerability
- fix CVE-2018-0739 - stack overflow parsing recursive ASN.1 structure
- fix CVE-2017-3737 - incorrect handling of fatal error state
- fix CVE-2017-3738 - AVX2 Montgomery multiplication bug with 1024 bit modulus
- fix CVE-2017-3736 - carry propagation bug in Montgomery multiplication

Products to which Article Applies


All Linux Environments

Additional References
https://www.centos.org/forums/viewtopic.php?t=51443


LINUX: Command To Find RPM Version And Its Architecture? ("rpm command")

Below command can be used for finding the rpm package version and its architecture.

rpm -qa --queryformat '%{NAME}-%{VERSION}-%{RELEASE} %{ARCH}\n' | grep -i <rpm name>


Below example output of above command. As seen below command shows httpd rpm version and its architecture.


#rpm -qa --queryformat '%{NAME}-%{VERSION}-%{RELEASE} %{ARCH}\n' | grep -i httpd
httpd-tools-2.2.15-60.0.1.el6_9.5 x86_64
httpd-manual-2.2.15-60.0.1.el6_9.5 noarch
httpd-2.2.15-60.0.1.el6_9.5 x86_64

Alternatively below command can also be used for better formatting of the output.


rpm -q <rpm name> --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n'

Below is example output of above command.

# rpm -q httpd --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n'
httpd-2.2.15-60.0.1.el6_9.5 (x86_64)

Products to which Article Applies

All Linux Environments

Additional References


https://rpm.org/user_doc/query_format.html


LINUX: How To Find Exact Date/Time Stamp When RPM Was Modified In Linux? ("rpm" command)

Below command can be used to find exact date/timestamp when rpm was modified in Linux.

rpm -qa --last <rpm name>


Below is example snippet of above command which list last modified date/time stamps of all kernel packages.

# rpm -qa --last kernel*
kernel-headers-2.6.32-696.20.1.el6.x86_64     Wed 31 Jan 2018 02:10:30 PM PST
kernel-devel-2.6.32-696.20.1.el6.x86_64       Wed 31 Jan 2018 02:10:11 PM PST
kernel-uek-devel-4.1.12-112.14.13.el6uek.x86_64 Wed 31 Jan 2018 02:09:52 PM PST
kernel-uek-4.1.12-112.14.13.el6uek.x86_64     Wed 31 Jan 2018 02:09:45 PM PST
kernel-uek-firmware-4.1.12-112.14.13.el6uek.noarch Wed 31 Jan 2018 02:09:36 PM PST
kernel-uek-headers-1-4.el6.x86_64             Fri 08 Sep 2017 10:21:08 AM PDT
kernel-transition-2.6.32-0.0.0.3.el6.x86_64   Fri 08 Sep 2017 09:35:38 AM PDT

If you want the output more formatted with last modified date/time and just the package name without versions, below command can be used.


rpm -qa --queryformat '(%{installtime:date}) %{name}\n' <rpm name>

Below is example output of above command.
# rpm -qa --queryformat '(%{installtime:date}) %{name}
(Wed 31 Jan 2018 02:10:30 PM PST) kernel-headers
(Wed 31 Jan 2018 02:09:45 PM PST) kernel-uek
(Wed 31 Jan 2018 02:09:52 PM PST) kernel-uek-devel
(Fri 08 Sep 2017 09:35:38 AM PDT) kernel-transition
(Wed 31 Jan 2018 02:10:11 PM PST) kernel-devel
(Fri 08 Sep 2017 10:21:08 AM PDT) kernel-uek-headers
(Wed 31 Jan 2018 02:09:36 PM PST) kernel-uek-firmware

Products to which Article Applies

All Linux Environments

Additional References

https://www.thegeekdiary.com/centos-rhel-how-to-find-when-was-the-rpm-installed/


LINUX: How To Check Which RPM Does Particular Module File Belong To In Linux ("rpm" command)?

Below rpm command can be used to check which rpm the module file belongs to.
rpm -qf <module filename>


Below is example snippet of above command.



# rpm -qf veth.ko
kernel-uek-4.1.12-112.14.13.el6uek.x86_64

Products to which Article Applies
All Linux Environments

Additional References

LINUX: How to Check To Which RPM A File Belongs To On Linux Hosts ("rpm" Command)?

In Linux Environments there may be usecases where you want to check a file and see which rpm it belongs to. Below rpm command can be used to check which rpm a particular file belongs to.

rpm -qi --whatprovides <filename>

Below is example snippet of above command. In this case we are checking the /usr/sbin/httpd.event file. As seen in the output it corresponds to httpd rpm.


# rpm -qi --whatprovides /usr/sbin/httpd
Name        : httpd                        Relocations: (not relocatable)
Version     : 2.2.15                            Vendor: Oracle America
Release     : 60.0.1.el6_9.5                Build Date: Tue 15 Aug 2017 03:13:36 PM PDT
Install Date: Fri 08 Sep 2017 09:35:17 AM PDT      Build Host: x86-ol6-builder-06.us.oracle.com
Group       : System Environment/Daemons    Source RPM: httpd-2.2.15-60.0.1.el6_9.5.src.rpm
Size        : 3169092                          License: ASL 2.0
Signature   : RSA/8, Tue 15 Aug 2017 03:13:54 PM PDT, Key ID 72f97b74ec551f03
URL         : http://httpd.apache.org/
Summary     : Apache HTTP Server
Description :
The Apache HTTP Server is a powerful, efficient, and extensible
web server.

Products to which Article Applies
All Linux Environments

Additional References

https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch05s02s05.html

 

Linux: How to Check Dependencies of Package Using "rpm" Command In Linux?

Below rpm command can be used to check dependencies of package(s).

rpm -qR <Package Name>

Below is snippet of above command. As you can see it lists all the dependencies.

# rpm -qR httpd-2.2.15-60.0.1.el6_9.5.x86_64
/bin/bash
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/etc/mime.types
/usr/sbin/useradd
apr-util-ldap
chkconfig
config(httpd) = 2.2.15-60.0.1.el6_9.5
httpd-tools = 2.2.15-60.0.1.el6_9.5
initscripts >= 8.36
libapr-1.so.0()(64bit)
libaprutil-1.so.0()(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libcrypt.so.1()(64bit)
libdb-4.7.so()(64bit)
libexpat.so.1()(64bit)
liblber-2.4.so.2()(64bit)
libldap-2.4.so.2()(64bit)
libm.so.6()(64bit)
libpcre.so.0()(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libselinux.so.1()(64bit)
libz.so.1()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1
rtld(GNU_HASH)
system-logos >= 7.92.1-1
rpmlib(PayloadIsXz) <= 5.2-1

Products to which Article Applies

All Linux Environments

Additional References

https://www.thegeekstuff.com/2010/07/rpm-command-examples


Linux: How To Uninstall / Remove rpm package(s) On Linux Hosts? ("rpm" command)

Below "rpm" command can be used to uninstall / remove .rpm rpm package(s) on Linux hosts.
rpm -ev <rpm name>.rpm

If you want to force uninstall / remove the rpm package below command can be used.

rpm -ev --force <rpm name>.rpm


Products to which Article Applies

All Linux Environments

Additional References

https://www.thegeekstuff.com/2010/07/rpm-command-examples


Linux: How To Install rpm package(s) On Linux Hosts? ("rpm" command)

Below "rpm" command can be used to install .rpm rpm package(s) on Linux hosts.


rpm -ivh <rpm name>.rpm

If you want to force install the rpm package below command can be used.


rpm -ivh --force <rpm name>.rpm


Products to which Article Applies

All Linux Environments

Additional References