rpmcheck is a Perl based utility that checks RPM packages on a Linux server prior to installation of an Oracle product.

The utility consists of a Perl script called rpmcheck.pl and a set of XML files which specify the packages required by different versions of Oracle products on a number of Linux platforms. In the short to medium term, the plan is to support installations of:

The following platforms will be supported initially on both 32 bit (x86) and 64 bit (x86-64):

The files are supplied in a ZIP file called rpmcheck.zip. To install the utility

  1. Download the zip file and copy it to an empty directory.
  2. Unzip the file
  3. Run the utility using the following syntax:
perl rpmcheck.pl <XMLfilename>

For example

perl rpmcheck.pl Database-11_2-RHEL5-x86_64.xml

rpmcheck lists the minimum (expected) versions of the packages and then lists the actual versions of the packages found by the rpm utility. rpmcheck will output an error message if a required package is either missing or earlier than the minimum version required by the Oracle product.

The following is an example of the output for the Oracle Database on Linux x86_64. Some history and other comments follow

rpmcheck version 2.0
Copyright JulianDyke.com Limited 2010

Processing Database-11_2-RHEL5-x86_64.xml

Product       : Oracle Database
Version       : 11.2
Platform      : RHEL5
Architecture  : x86_64

Expected packages:

Package Name                   Version          Release          Architecture
------------------------------ ---------------- ---------------- ------------
binutils                                          x86_64
compat-libstdc++-33            3.2.3                                   x86_64
compat-libstdc++-33            3.2.3                                     i386
elfutils-libelf                0.125                                   x86_64
elfutils-libelf-devel          0.125                                   x86_64
gcc                            4.1.2                                   x86_64
gcc-c++                        4.1.2                                   x86_64
glibc                          2.5              24                     x86_64
glibc                          2.5              24                       i686
glibc-common                   2.5                                     x86_64
glibc-devel                    2.5                                     x86_64
glibc-devel                    2.5                                       i386
glibc-headers                  2.5                                     x86_64
ksh                            20060214                                x86_64
libaio                         0.3.106                                 x86_64
libaio                         0.3.106                                   i386
libaio-devel                   0.3.106                                 x86_64
libaio-devel                   0.3.106                                   i386
libgcc                         4.1.2                                   x86_64
libgcc                         4.1.2                                     i386
libstdc++                      4.1.2                                   x86_64
libstdc++                      4.1.2                                     i386
libstdc++-devel                4.1.2                                   x86_64
make                           3.81                                    x86_64
sysstat                        7.0.2                                   x86_64
unixODBC                       2.2.11                                  x86_64
unixODBC                       2.2.11                                    i386
unixODBC-devel                 2.2.11                                  x86_64
unixODBC-devel                 2.2.11                                    i386

Actual packages:

Package Name                   Version          Release          Architecture
------------------------------ ---------------- ---------------- ------------
binutils                   12.el5                 x86_64
compat-libstdc++-33            3.2.3            61                     x86_64
compat-libstdc++-33            3.2.3            61                       i386
elfutils-libelf                0.137            3.el5                  x86_64
elfutils-libelf-devel          0.137            3.el5                  x86_64
gcc                            4.1.2            46.el5                 x86_64
gcc-c++                        4.1.2            46.el5                 x86_64
glibc                          2.5              42                     x86_64
glibc                          2.5              42                       i686
glibc-common                   2.5              42                     x86_64
glibc-devel                    2.5              42                     x86_64
glibc-devel                    2.5              42                       i386
glibc-headers                  2.5              42                     x86_64
ksh                            20080202         14.el5                 x86_64
libaio                         0.3.106          3.2                    x86_64
libaio                         0.3.106          3.2                      i386
libaio-devel                   0.3.106          3.2                    x86_64
libaio-devel                   0.3.106          3.2                      i386
libgcc                         4.1.2            46.el5                 x86_64
libgcc                         4.1.2            46.el5                   i386
libstdc++                      4.1.2            46.el5                 x86_64
libstdc++                      4.1.2            46.el5                   i386
libstdc++-devel                4.1.2            46.el5                 x86_64
make                           3.81             3.el5                  x86_64
sysstat                        7.0.2            3.el5                  x86_64
unixODBC                       2.2.11           7.1                    x86_64
unixODBC                       2.2.11           7.1                      i386
unixODBC-devel                 2.2.11           7.1                    x86_64
unixODBC-devel                 2.2.11           7.1                      i386

This section discusses the concepts behind rpmcheck and describes the rationale behind some of the implementation decisions

I decided to write rpmcheck to solve a number of problems

  1. In my day job as a database consultant I regularly have to write reports listing package requirements for Linux installations. I wanted a utility that produced a standard output that I could just cut and paste into a report
  2. Past versions of Oracle documentation have not distinguished between 32-bit and 64-bit RPMs nor have they been very comprehensive. I wanted a definitive list for each platform from a single source
  3. Recent versions Oracle products are now performing much more comprehensive checks for RPMs. The problem is that for larger customers, the team that creates the operating system build is often completely separate from the DBA team that runs the Oracle Installer. The system administrators need the list of RPMs in order to create a certified build that can be passed on to the DBAs; the package checks in the installer do not help in this case

My first attempt was to build an RPM package to perform the validation. I managed to figure out how to use rpmbuild to build an RPM using a spec file containing a list of dependencies. At this point I realized that RPM only supports the native architecture; it is not possible to specify alternate architectures in the dependency list. So creating an RPM for Linux x86-64 would be very complicated. Also the RPM itself might need a change control and root permissions to install. This might not be desirable in some environments. Therefore I decided to write a stand-alone utility

I initially considered writing the utility in C, but subsequently decided to use Perl for a number of reasons. Perl is available in most Linux builds. I have not encountered an Oracle environment that has not supported Perl for a few years now. Perl is human-readable; if security teams are concerned about the functionality of the utility, they can read the script.

For each required package the rpmcheck utility uses RPM to identify whether the package is currently installed and, if so, the architecture, version and release. The version comparison algorithm is based the rpmvercmp function in the RPM source library.

I have used XML for the definition files. Most Oracle users understand XML so the format does not need explaining. I have tried to keep to well-formed documents so they can work with any XML-parser. As the definition files are written in XML I am hoping that users of the utility will send back any new versions / corrections to the XML files which I will add to the library.

The Perl script originally used the Perl XML::Simple package to read the XML file (and was much more elegant). However, this package is not installed on Linux servers by default and has a handful of dependencies. While I was testing version 1.0 of rpmcheck, I realized this was an unacceptable restriction as it required the installation of a new package to determine whether existing packages were valid, possibly requiring a change control. Therefore I decided to implement a custom XML parser in Perl. I am not a professional Perl programmer and therefore my XML parser is only just adequate for the task it was designed for. Do not use it as a template for another application - you will regret it.

The rpmcheck utility is not perfect and the set of XML files is currently incomplete. I am hoping that this project will gain acceptance in the user community and that others will contribute additional XML files they have developed and tested in their own environments. I will add these to the library. The Perl script (rpmcheck.pl) is proprietary - owned by JulianDyke.com Limited - anyone can use this but they cannot claim it as their own work. The XML files are communal - anyone is welcome to contribute and I will try to ensure they are acknowledged on this page.