Use > Software management > Package type reference > Solaris packages (prior to Solaris 11)

Solaris packages (prior to Solaris 11)

See also Solaris 11 packages.

Solaris packages are the container packages for Solaris. Solaris packages have the following characteristics:

  • A Solaris package contains one or more package instances.
  • When a Solaris package contains multiple instances, frequently only a subset of those instances will be installed because users might want to install only certain instances.
  • Solaris packages have two basic formats:
    • File system format: The format for packages stored in a directory structure.
    • Data stream format: The format for standalone package files. This format is required for uploading Solaris packages into SA.

The basic unit of Solaris packages is the package instance. Package instances have the following characteristics:

  • Package instances are versioned.
  • Platform assignment of Solaris packages is immutable.
  • Users add package instances to a software policy. SA adds package instances to and removes package instances from servers by using the remediate function. See Remediate and install software for more information about remediate.

In the SA Client, you can upload, view, download, and delete Solaris packages, and you can view, deprecate, and attach instances to policies.

SA supports Solaris packages in the following ways:

  • Users upload Solaris packages in the uncompressed data stream file format.
  • SA can install interactive and non-interactive Solaris package instances. Interactive Solaris package instances require response files.
  • SA displays the name and version number for Solaris packages in the following way:
  • SUNW125f-1.0,REV=2001.03.21.17.00
  • SUNW1394h-11.9.0,REV=2002.04.06.15.27
  • The Solaris utilities (such as pkgadd) use an admin file. The admin file stores settings regarding how the utilities should work. Each Agent on managed servers includes its own admin file that it uses when installing Solaris package instances. The admin file that the Agent uses is only used by SA and does not set defaults for other applications using pkgadd.
  • In some instances, a Solaris package might only get partially installed. A partial installation generally occurs when a package contains an installation script (other than the checkinstall script - for example, a preinstall or postinstall script) and that script exits with a non-zero exit code during package installation. A partially installed Solaris package can be removed as if it were installed as a full package by removing it, or by overwriting it with a new package.

For more information on pkginfo, pkgadd, and pkgrm, see the man pages.

Response files are text files. The entries in a response file occur as name = value pairs; for example, BASEDIR="/opt/SUNWexplorer" is a valid entry.

SA supports response files in the following ways:

  • Users create response files outside of SA by using the pkgask Solaris utility.
  • By using the Solaris Instance Package Properties page in the SA Client users upload and overwrite the response files that are associated with Solaris package instances.
  • Each response file is accessible only in the context of the Solaris package instance to which it belongs.
  • Each Solaris package instance can have zero or one response file. Response files are not shared by different Solaris package instances.
  • Attaching an interactive package to a policy includes the response file because SA stores the response file with the package. You do not need to attach the response file to the software policy.
  • After a Solaris package instance has a response file, SA uses that response file whenever the Solaris package instance is installed.
  • If a Solaris package instance requires a response file and that file is missing in the SA Client, SA might report an error when any server is remediated with that Solaris package instance.

When a user uploads a Solaris package, SA performs the following actions:

  • Opens the package and parses its metadata.
  • Automatically creates entries in the list of packages for the package instances in the package and registers them as installable.
  • Registers the Solaris package as uninstallable.

Solaris metadata

SA uses the metadata contained in Solaris packages when creating the package entries in the list of packages. A Solaris package contains the following metadata - the name, version, and description of each package instance in the package.

Prerequisites to Solaris package management

The Solaris package must be in data stream format before you can upload it to the SA Software Repository. If it is in file system format, you can convert it by using the pkgtrans command:

pkgtrans -s <location of package> <new package> all