Files and Their Locations

Team-Fly    

Solaris™ Operating Environment Boot Camp
By David Rhodes, Dominic Butler
Table of Contents
Chapter 9.  Patching the System


The patch locations may vary, depending on the version of the operating system you are using. Let's first take a brief look at the two mechanisms that you may see.

Progressive versus Direct Instance Patching

Prior to Solaris 2.5, a mechanism known as "Progressive Instance Patching" was used to apply patches. For this, a new instance of a package was created whenever any patches were being applied that affected the package.

For example, if 101580-09 patched the package SUNWcsr, then after it had been applied we would find that there were two instances of the package. The first (and original) would be found in /var/sadm/pkg/SUNWcsr, while the second (patched) version would be found in /var/sadm/pkg/SUNWcsr.2.

The ancillary patch files would be located in /var/sadm/patch/101580-09. This would also contain all the patch backout information, which was stored as a cpio-formatted file under /var/sadm/patch/101580-09/save.

Since Solaris 2.5, Direct Instance Patching has been the norm. In this case, the original installed package is modified. The ancillary patch files are still located under /var/sadm/patch/101580-09, but now the backout information is stored with the package directory as a package stream. For our example patch, it would be found in /var/sadm/pkg/SUNWcsr/save/101580-09/undo.Z.

All Direct Instance Patches include a file named .diPatch with their distribution, which is used to inform system utilities such as installpatch that they are dealing with a Direct Instance Patch. The file doesn't contain any important information; installpatch simply checks for its existence. In fact, if we look at the file we will normally see it contains something similar to the following:

 hydrogen# cd /tmp/101580-09 hydrogen# cat .diPatch This file tells installpatch that this is a direct instance patch DO NOT DELETE hydrogen# 

Since Direct Instance Patching is now the norm, we will assume that this mechanism is being used for the remainder of this chapter, which means there are two main locations for patches and the packages that they affect.

/Var/sadm/patch

This is used to store information relating to the patch itself, and will generally include the following files:

  • backoutpatch

  • log

  • README.<patch id>

The backoutpatch file is essentially a copy of the patchrm script and is used to remove the patch from the system. The log file is a copy of the patch installation, while the README file contains information about the patch itself.

Whenever a patch is added to the system a directory, named after the patch, is created for it in /var/sadm/patch. For example, in the case of 101580-09, we would find a directory named /var/sadm/patch/101580-09 with the following contents:

 hydrogen# ls /var/sadm/patch/101580-09 backoutpatch    log    README.101580-09 hydrogen# 

/Var/sadm/pkg

This is the location where any package information will be found on the system. It is explained in depth in Chapter 8, "Administering Packages."

When patches are added, copies of the files that are being replaced are (optionally) stored in an area within the package itself. This is the backout information, and in our example, patchadd would create a "save" file named /var/sadm/pkg/SUNWcsr/save/101580-09/undo.Z. (Note that the file is compressed in this case.)

We mentioned earlier that the backout files are stored as a package stream, which we can confirm by running the following commands:

 hydrogen# cd /var/sadm/pkg/SUNWcsr/save/101580-09 hydrogen# ls -l undo* -rw-r-r--  1  root  other 1345638  Dec 24 10:40 undo.Z hydrogen# 

If the file is compressed, first uncompress it:

 hydrogen# uncompress undo.Z hydrogen# pkginfo -l -d ./undo    PKGINST:  SUNWcsr       NAME:  Core Solaris, (Root)   CATEGORY:  system       ARCH:  sparc    VERSION:  11.6.0,REV=1997.07.15.21.46    BASEDIR:  /     VENDOR:  Sun Microsystems, Inc.       DESC:  core software for a specific instruction-set architecture     PSTAMP:  on297-patchm06153920    HOTLINE:  Please contact your local service provider     STATUS:  spooled      FILES:     14 spooled pathnames                 10 executables                  4 package information files               2979 blocks used (approx) hydrogen# 

The above output confirms the file is indeed using the package format. Now recompress the file if it was originally compressed:

 hydrogen# compress undo hydrogen# 

Disk Space

One important thing we can see from the above descriptions is that /var/sadm contains the patch and package administration files. It is very important that there is always enough space in this area, otherwise numerous problems could be seen and patch installations may fail.


    Team-Fly    
    Top
     



    Solaris Operating Environment Boot Camp
    Solaris Operating Environment Boot Camp
    ISBN: 0130342874
    EAN: 2147483647
    Year: 2002
    Pages: 301

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net