Mkpcadir

A simple script to compile Sun Solaris EIS patch set DVDs into flat patch repositories for use with PCA.

I wanted to continue using Martin Paul's excellent Patch Check Advanced in a particularly strict change-controlled environment that required application of patches according to EIS patch set DVDs, as distributed by Sun. The environment was also isolated from the Internet, making fetching patches from SunSolve a headache, if not downright impossible.

This script, mkpcadir, flattens out the directory hierarchy found on EIS patch DVDs, by filtering the supplied patchdiag.xref file according to patches found on the DVD and then copying only patches referenced in the patchdiag.xref file into the destination directory.

The resulting directory can then be served to clients via NFS, FTP or HTTP according to preference, and pca can be used to download and install patches, all in accordance with Sun's patch base-lines.

Documentation

usage: mkpcadir [ -q ] [ -t <temporary directory> ] <patchdiag.xref> \
       <source directory> <destination directory>

       -q    be quiet, but not silent
       -t    directory in which to unpack compressed sets, defaults to /tmp

A Solaris EIS patch DVD is assumed to be mounted at <source directory>. The <patchdiag.xref> file supplied is filtered so that it only references patches that are found on the DVD. The resulting xref file, along with all of the patches found under <source directory> are copied to <destination directory>, which may then be NFS exported or served over FTP or HTTP according to preference, to Solaris clients running pca.

Mkpcadir requires scratch space in which to unpack various *_Recommended patch sets, and then individually compress the patches found inside. Currently, the required space exceeds 1GiB. The default of /tmp may not be suitable on smaller servers.

When not invoked in quiet mode, mkpcadir may complain about differing duplicate files. Duplicate filenames at different paths are assumed to be the same file, to resolve the many duplicates found on the EIS DVDs. Files like "README" are NOT likely to be the same and you can safely ignore them if you see them in the list of differing files that mkpcadir produces. Files like 123456-78.zip ARE likely to be the same, and should not appear in the list of differing files. Please check that the list does not include any file that looks like a patch.

Example: Install May 2007 EIS DVD in /export/patches/htdocs/2007-05

mkpcadir /cdrom/patchdvd-22may07/sun/patch/etc/patchdiag.xref \
  /cdrom/patchdvd-22may07/sun/patch /export/patches/htdocs/2007-05

The result will be a 2007-05 directory containing some 3GiB of patches and a single patchdiag.xref file. If this directory is published via HTTP, for example, pca might then be called like so:

pca --xrefurl=http://webserver/patches/2007-05/ \
   --patchurl=http://webserver/patches/2007-05/ missingrs

Downloads

Mkpcadir is available under the terms of the GNU General Public License and can be downloaded here:

  • mkpcadir - MD5 (mkpcadir) = f09f9d2e48c11ff38170a0130c823c4b

Changes

Mkpcadir is currently at revision 1.7, dated 2007/09/05 09:45:07. A changelog is available.

Disclaimer

This script is provided in good faith. The author accepts no responsibility for any mishaps, snafus, fubars or whatnots. Seriously.

Bugs

This script is very rough and ready at the moment. There may be bugs. This may not be particularly good idea, or even a practicable idea. If you find a bug that you're confident is down to mkpcadir, or if you have an opinion as to why this might not be a good idea, please contact me. When reporting a bug, please include as much detail as possible, including:

  • output from perl -V
  • output from uname -a
  • mkpcadir's non-quiet output, including the error messages received, if any