Using Solaris Packages
Dave Zwieback
Table 1 | Table
2
There are many ways of distributing software to systems, the most commonly
used way is via NFS (often in combination with the automounter). However, there
are situations when particular software must be physically installed on systems,
and this is usually accomplished with tar files. This method has a number
of shortcomings that become especially apparent in large installations of complex
software. In such situations, Solaris packages clearly emerge as the preferred
way of distributing software, specifically due to the following features:
- Uniform package installation and removal interfaces (pkgadd and
pkgrm)
- Ability to see exactly which (versions of) packages are installed on the
system (pkginfo)
- Ability to verify the integrity of the contents of the package (pkgchk)
- Ability to specify package dependencies and/or incompatibilities (depend,
compver)
- Ability to specify additional space requirements for the package (space)
- Ability to create custom, dynamic package installation and removal scripts
(request, checkinstall, preinstall, postinstall;
preremove, postremove, and Class Action scripts)
I will not go into exhaustive detail about all of the powerful features of
Solaris packages, which can be found in their full glory in the Application
Packaging Developer's Guide. This article is intended as a primer that will
allow you to start building functional packages right away.
Contents of a Package
Besides containing the installation files and directories (package
objects), a package must also contain two information files:
pkginfo(4) and prototype(4).
|