SLES shell script to check required os packages according to documentation before starting oracle forms and reports installation

Posted by Torsten Kleiber on September 09, 2015 / updated on December 1, 2022 Tags: Oracle Forms Reports Linux SLES 64bit

If you try to install Oracle Forms & Reports 11.1.2.2 on SLES 11.3 than despite all installer checks are passed maybe you get a error message.

Error in invoking target 'install' of makefile '<FR_HOME>/sqlplus/lib/ins_sqlplus.mk'.

The reuirement check of the installer shows only missing openmotif classes which are not really required on SLES (see Doc ID 1567715.1), but no problems with a compiler or something similar.

Checking for binutils-2.19-11.28; found binutils-2.23.1-0.23.15-x86_64. Passed
Checking for gcc-4.3-62.198; found gcc-4.3-62.200.2-x86_64. Passed
Checking for gcc-c++-4.3-62.198; found gcc-c++-4.3-62.200.2-x86_64. Passed
Checking for glibc-2.9-13.2; found glibc-2.11.3-17.87.3-x86_64. Passed
Checking for glibc-32bit-2.9-13.2; found glibc-32bit-2.11.3-17.87.3-x86_64. Passed
Checking for glibc-devel-2.9; found glibc-devel-2.11.3-17.87.3-x86_64. Passed
Checking for glibc-devel-32bit-2.9-13.2; found glibc-devel-32bit-2.11.3-17.87.3-x86_64. Passed
Checking for libaio-0.3.104-140.22; found libaio-0.3.109-0.1.46-x86_64. Passed
Checking for libaio-devel-0.3.104-140.22; found libaio-devel-0.3.109-0.1.46-x86_64. Passed
Checking for libgcc43-4.3.3_20081022; found libgcc43-4.6.9-0.13.22-x86_64. Passed
Checking for libstdc++43-4.3.3_20081022-11.18; found libstdc++43-4.6.9-0.13.22-x86_64. Passed
Checking for libstdc++43-devel-4.3.3_20081022-11.18; found libstdc++43-devel-4.3.4_20091019-0.37.30-x86_64. Passed
Checking for make-3.81; found make-3.81-128.20-x86_64. Passed
Checking for sysstat-8.1.5-7.8; found sysstat-8.1.5-7.47.1-x86_64. Passed
Checking for openmotif22-2.2.3; Not found. Failed <<<<
Checking for openmotif-2.2.3; found openmotif-2.3.1-3.15.1-x86_64. Passed
Check complete. The overall result of this check is: Failed <<<<

The problem here is, that sometime not all checks for os packages are really implemented in the installer. I have a SR to open a bug for this.

In the meantime I have implemented a bash shell script to check against the required os packages in the documentation. For my problem these are listed here. You can simple copy the required packages at the top of the script in the array sections.

The magic contains some bash substring modifications an using the version compare option of zipper.

#!/bin/bash

array=(
binutils-2.19-11.28
gcc-4.3-62.198
gcc-c++-4.3-62.198
gcc-32bit-4.3
glibc-2.9-13.2
glibc-32bit-2.9-13.2
glibc-devel-2.9
glibc-devel-32bit-2.9-13.2
ksh-93t
libaio-0.3.104-140.22
libaio-devel-0.3.104-140.22
libaio-32bit-0.3.104
libaio-devel-32bit-0.3.104
libgcc43-4.3.3_20081022
libstdc++43-4.3.3_20081022-11.18
libstdc++43-devel-4.3.3_20081022-11.18
libstdc++33-3.3.3
libstdc++33-32bit-3.3.3
libstdc++43-32bit-4.3.3_20081022
libstdc++43-devel-32bit-4.3.3_20081022
libstdc++-devel-4.3
make-3.81
openmotif-2.3.1-3.13
openmotif-devel-32bit-2.3.1-3.13
openmotif22-libs-32bit-2.2.4-138.17
openmotif-libs-2.3.1-3.13
openmotif-devel-2.3.1-3.13
openmotif-libs-32bit-2.3.1-3.13
openmotif21-libs-32bit-2.1.30MLI4-143.2
openmotif22-libs-2.2.4-138.17
sysstat-8.1.5-7.8
)

len=${#array[*]}
i=0

while [[ $i -lt $len ]]; do

  required_package_name=$(echo "${array[$i]}" | sed -E 's/(-[0-9]{1,}[-.].*)//')
  required_package_version="${array[$i]/"${required_package_name}"-/}"

  installed_package_version=$(rpm -q "${required_package_name}" --queryformat "%{version}-%{release}-%{arch}")

  RETCODE=$?
  if [ $RETCODE -eq 0 ]; then
    compare=$(zypper --terse versioncmp "${required_package_version}" "${installed_package_version}")
    if [ "${compare}" -eq 1 ]; then
      echo "[fail] ${required_package_name} Required : ${required_package_version} Installed: ${installed_package_version}"
    else
      echo "[pass] ${required_package_name} Required : ${required_package_version} Installed: ${installed_package_version}"
    fi
  else
    echo "[fail]" "${installed_package_version}"
  fi

  ((i++));
done

If you run this script you can see the failing packages on your platform:

[pass] binutils Reqired : 2.19-11.28 Installed: 2.23.1-0.23.15
[pass] gcc Reqired : 4.3-62.198 Installed: 4.3-62.200.2
[pass] gcc-c++ Reqired : 4.3-62.198 Installed: 4.3-62.200.2
[fail] package gcc-32bit is not installed (1)
[pass] glibc Reqired : 2.9-13.2 Installed: 2.11.3-17.84.1
[pass] glibc-32bit Reqired : 2.9-13.2 Installed: 2.11.3-17.84.1
[pass] glibc-devel Reqired : 2.9 Installed: 2.11.3-17.84.1
[pass] glibc-devel-32bit Reqired : 2.9-13.2 Installed: 2.11.3-17.87.3
[pass] ksh Reqired : 93t Installed: 93u-0.26.1
[pass] libaio Reqired : 0.3.104-140.22 Installed: 0.3.109-0.1.46
[pass] libaio-devel Reqired : 0.3.104-140.22 Installed: 0.3.109-0.1.46
[pass] libaio-32bit Reqired : 0.3.104 Installed: 0.3.109-0.1.46
[fail] package libaio-devel-32bit is not installed (2)
[pass] libgcc43 Reqired : 4.3.3_20081022 Installed: 4.6.9-0.13.22
[pass] libstdc++43 Reqired : 4.3.3_20081022-11.18 Installed: 4.6.9-0.13.22
[pass] libstdc++43-devel Reqired : 4.3.3_20081022-11.18 Installed: 4.3.4_20091019-0.37.30
[pass] libstdc++33 Reqired : 3.3.3 Installed: 3.3.3-11.9
[pass] libstdc++33-32bit Reqired : 3.3.3 Installed: 3.3.3-11.9
[pass] libstdc++43-32bit Reqired : 4.3.3_20081022 Installed: 4.6.9-0.13.22
[fail] package libstdc++43-devel-32bit is not installed
[pass] libstdc++-devel Reqired : 4.3 Installed: 4.3-62.200.2
[pass] make Reqired : 3.81 Installed: 3.81-128.20
[pass] openmotif Reqired : 2.3.1-3.13 Installed: 2.3.1-3.15.1
[fail] package openmotif-devel-32bit is not installed
[fail] package openmotif22-libs-32bit is not installed
[pass] openmotif-libs Reqired : 2.3.1-3.13 Installed: 2.3.1-3.15.1
[pass] openmotif-devel Reqired : 2.3.1-3.13 Installed: 2.3.1-3.15.1
[fail] package openmotif-libs-32bit is not installed
[fail] package openmotif21-libs-32bit is not installed
[pass] openmotif22-libs Reqired : 2.2.4-138.17 Installed: 2.2.4-193.1
[pass] sysstat Reqired : 8.1.5-7.8 Installed: 8.1.5-7.47.1
1 This and
2 this error are the route cause for the error message in the installer, because 32bit Compiler is required for making sql plus despite this forms and reports installation is 64bit version.

Maybe you can use this script with little modification in other environments.

That’s it!