SUMMARY Comparing patches on systems

From: Shirley Gruber (shirley@SLAC.Stanford.EDU)
Date: Mon Nov 23 1998 - 15:55:19 CST


MY ORIGINAL QUESTION:

Is there an easy way to compare the patch and release levels on two
Solaris systems to see how they differ? Is there some equivalent of
showrev that lists only the most recent revision of the patch and not all
the replaced patches as well?

Barring this, has anyone written a script that with either
        1) compare two machines to see how the patch levels differ
or 2) compare a given machine against a set list of patches?

SUMMARY OF RESPONSES:

Within a few hours I had more than a dozen responses. Thanks to all.
The following people pointed to the Sun patchdiag utility from SunSolve:

paul@katana.com
kgmcdonald@earthlink.net
gmerin@eurisko.com
blymn@baea.com.au
mwang@tech.cicg.ml.com
rmf@lookhere.com
maraisg@saps.org.za
Olivier.GIRAUD@cedelgroup.com
parkini@bgep.co.uk
jrt@getech.leeds.ac.uk
plaws@enterprise.nssl.noaa.gov
charliem@anchorchips.com
tim.tsao@us.pwcglobal.com
Colin_Melville@mastercard.com
jsturges@gmri.com
cmarble@orion.ac.hmc.edu

Some people referred me to other tools and/or programs they had written
themselves. I include those messages below:

>From aki@barra.com Tue Nov 17 16:31:17 1998

Should be pretty easy.

        /usr/bin/ls -1 /var/sadm/patch

should give you the patches installed.

        echo 123456-78 | awk -F- '{ print $1 }'

should give you the patch number.
and

        echo 123456-78 | awk -F- '{ print $2 }'

should give you the rev number.
(perl works great here but not everyone likes using perl)

So, if you have a flatfile with the names of patches that you want
installed, you can:

#!/bin/sh
tmpfile="/tmp/<filename>"
cd /var/sadm/patch
for i in `cat $tmpfile` ; do
  PATCH=`echo $i | awk -F- '{ print $1 }'`
  REV=` echo $i | awk -F- '{ print $2 }'`
  mypatch=`/usr/bin/ls ${PATCH}-..`
  if [ X"$mypatch" -ne "X" ] ; then
    $MyRev=`echo $mypatch | awk -F- '{ print $2 }'`
    if [ $MyRev -lt $REV ] ; then
      echo "Patch $PATCH not up to date. Get rev $REV"
    fi
  else
    echo "Missing patch $PATCH. Get rev $REV"
  fi
done

I wrote this up in the email so it hasn't been tested for typos...
hope that helps.
aki

==============

>From benoit@Mathematik.Uni-Marburg.de Tue Nov 17 23:55:43 1998

check out PatchReport

 ftp://x86.cs.duke.edu/pub/PatchReport/

Regrads,
Benno

==============

>From mark.baldwin@makesys.com Wed Nov 18 05:26:12 1998

I have written a script that compares the patches on a given machine to
Sun's recommended patch list. This requires that you download Sun's
recommended patch's regularly. Also, the script would require modification
to suit your environment. And finally, I use fastpatch instead of the
traditional installpatch method. However, I would be happy to send you the
script if you want it. Actually there are two scripts. One for 2.5.1 and
one for 2.6.

Regards, Mark...

==============

>From efinch@eos.EAST.HITC.COM Wed Nov 18 10:16:52 1998

I put my Bourne-shell script on my website, http://www.vais.net/~efinch

Best regards,
Ed Finch

==============

>From jdg117@elvis.arl.psu.edu Wed Nov 18 10:40:32 1998

Joe Shamblin's PatchReport is perl script which fetches the Recommende patch
list from SunSolve and reports needed patches, perhaps this is a good place
for your to start. Casper Dik's autoinstall package includes a patch tool
which removes outdated patches.
http://www.cs.duke.edu/~wjs/pr.html
ftp://ftp.wins.uva.nl/pub/comp/solaris/auto-install/
John
groenveld@acm.org

==============



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:53 CDT