JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Adding and Updating Oracle Solaris 11 Software Packages     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information

Preface

1.  Introduction to the Image Packaging System

2.  IPS Graphical User Interfaces

3.  Getting Information About Software Packages

4.  Installing and Updating Software Packages

5.  Configuring Installed Images

Configuring Publishers

Displaying Publisher Information

Adding, Modifying, or Removing Package Publishers

Locking Packages to a Specified Version

Marking Packages To Be Avoided

Controlling Installation of Optional Components

Displaying a Variant

Changing a Variant

Displaying a Facet

Changing a Facet

Updating an Image

Configuring Image and Publisher Properties

Boot Environment Policy Image Properties

Properties For Signing Packages

Image Properties for Signed Packages

Publisher Properties for Signed Packages

Configuring Package Signature Properties

Additional Image Properties

Setting Image Properties

Displaying the Values of Image Properties

Setting the Value of an Image Property

Resetting the Value of an Image Property

Creating an Image

Viewing Operation History

Controlling Installation of Optional Components

Software can have components that are optional and components that are mutually exclusive. Examples of optional components include locales and documentation. Examples of mutually exclusive components include SPARC or x86 and debug or non-debug binaries. In IPS, optional components are called facets and mutually exclusive components are called variants.

Facets and variants are special properties of the image and cannot be set on individual packages. To view the current values of the facets and variants set on the image, use the pkg facet and pkg variant commands. To modify the values of the facets and variants set on the image, use the pkg change-facet and pkg change-variant commands. See the pkg(1) man page and the examples below.

Facets and variants are specified as tags on package actions. Each facet and variant tag has a name and a value. A single action can have multiple facet and variant tags. An example of a component with multiple facet and variant tags is an architecture-specific header file that is used by developers, or a component that is only for a SPARC global zone.

An example of a variant tag is variant.arch=sparc. An example of a facet tag is facet.devel=true. Facets and variants are often referred to without the leading facet. and variant..

Facets are boolean: They can be set only to true (enabled) or false (disabled). By default, all facets are considered to be set to true in the image. A facet tag on an action should only have the value true; other values have undefined behavior. A facet set on the image can be a full facet such as doc.man or a pattern such as locale.*. This is useful when you want to disable a portion of the facet namespace, and only enable individual facets within it. For example, you could disable all locales and then only enable one or two specific locales, as shown in the following example:

# pkg change-facet locale.*=false
[output about packages being updated]
# pkg change-facet locale.en_US=true
[output about packages being updated]

Most variants can have any number of values. For example, the arch variant can be set to i386, sparc, ppc, arm, or whatever architectures the distribution supports. (Only i386 and sparc are used in Oracle Solaris.) The exception are the debug variants. The debug variants can only be set to true or false; other values have undefined behavior. If a file action has both non-debug and debug versions, both versions must have the applicable debug variant explicitly set, as shown in the following example:

file group=sys mode=0644 overlay=allow owner=root \
  path=etc/motd pkg.csize=115 pkg.size=103 preserve=true \
  variant.debug.osnet=true

file group=sys mode=0644 overlay=allow owner=root \
  path=etc/motd pkg.csize=68 pkg.size=48 preserve=true \
  variant.debug.osnet=false 

The variant value must be set on the image in order for a package using the variant to be installed. The arch and zone variants are set by the program that creates the image and installs its initial contents. The debug.* variants are false in the image by default.

The facets and variants set on the image affect whether a particular action is installed.

You can create your own facet and variant tags. The following tags are in common use in Oracle Solaris.

Variant Name
Possible Values
variant.arch
sparc, i386
variant.opensolaris.zone
global, nonglobal
variant.debug.*
true, false

The following list shows a small sample of the facet tags that are used in Oracle Solaris:

facet.devel             facet.doc
facet.doc.html          facet.doc.info
facet.doc.man           facet.doc.pdf
facet.locale.de         facet.locale.en_GB
facet.locale.en_US      facet.locale.fr
facet.locale.ja_JP      facet.locale.zh_CN

You can display the values of variants and facets that are set on the current image, and you can change variants and facets in the current image. Changing variants and facets might update a large number of packages and might require a new BE. Use -nv to review what changes will be made before you make any changes.

Displaying a Variant

Use the pkg variant command to display the values of variants that are set.

/usr/bin/pkg variant [-H] [variant_spec ...]
$ pkg variant
VARIANT                  VALUE
variant.opensolaris.zone global
variant.arch             i386
$ pkg variant -H variant.arch
variant.arch i386

Changing a Variant

Use the pkg change-variant command to change the value of a variant.

/usr/bin/pkg change-variant [-nvq] [-g path_or_uri ...]
    [--accept] [--licenses] [--no-be-activate]
    [--no-backup-be | --require-backup-be] [--backup-be-name name]
    [--deny-new-be | --require-new-be] [--be-name name]
    variant_spec=instance ...

The following command produces a large amount of output since so many packages would be affected. Notice that a new BE would not be created by default, but a backup BE would be created. See Boot Environment Policy Image Properties for information about when BEs are created.

Use the -n option to see what would change if you performed the operation without -n, but make no actual changes.

# pkg change-variant -nv --accept variant.debug.*=true
            Packages to update:       831
     Variants/Facets to change:         4
     Estimated space available: 112.19 GB
Estimated space to be consumed: 220.76 MB
       Create boot environment:        No
Create backup boot environment:       Yes
          Rebuild boot archive:        No
Changed variants/facets:
  variant variant.debug.*: true
    facet facet.locale.en_US: None
    facet facet.locale.en: None
    facet facet.locale.*: None
Changed packages:
solaris
  ...

Displaying a Facet

Use the pkg facet command to display the values of facets that are set.

/usr/bin/pkg facet [-H] [facet_spec ...]
$ pkg facet
FACETS             VALUE
facet.locale.en_US True
facet.locale.en    True
facet.locale.*     False
$ pkg facet -H facet.locale.*
facet.locale.* False

Changing a Facet

Use the pkg change-facet command to change the value of a facet.

/usr/bin/pkg change-facet [-nvq] [-g path_or_uri ...]
    [--accept] [--licenses] [--no-be-activate]
    [--no-backup-be | --require-backup-be] [--backup-be-name name]
    [--deny-new-be | --require-new-be] [--be-name name] 
    facet_spec=[True|False|None] ...

Use the -n option to see what would change if you performed the operation without -n, but make no actual changes.

If the facet value is set to None, the facet specification is removed from the current image.

The following command produces a large amount of output since so many packages would be affected. Notice the amount of additional space that would be used is in gigabytes, not megabytes. This operation might require a large amount of time and cause a large amount of network traffic between this image and the package repository. Notice that a new BE would not be created by default, but a backup BE would be created. See Boot Environment Policy Image Properties for information about when BEs are created.

# pkg change-facet -nv facet.locale.*=true
            Packages to update:       831
     Variants/Facets to change:         1
     Estimated space available: 112.19 GB
Estimated space to be consumed:   2.96 GB
       Create boot environment:        No
Create backup boot environment:       Yes
          Rebuild boot archive:        No
Changed variants/facets:
    facet facet.locale.*: True
Changed packages:
solaris
  ...