2573N/A.. CDDL HEADER START
2573N/A
2573N/A.. The contents of this file are subject to the terms of the
2573N/A Common Development and Distribution License (the "License").
2573N/A You may not use this file except in compliance with the License.
2573N/A
2573N/A.. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2573N/A or http://www.opensolaris.org/os/licensing.
2573N/A See the License for the specific language governing permissions
2573N/A and limitations under the License.
2573N/A
2573N/A.. When distributing Covered Code, include this CDDL HEADER in each
2573N/A file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2573N/A If applicable, add the following below this CDDL HEADER, with the
2573N/A fields enclosed by brackets "[]" replaced with your own identifying
2573N/A information: Portions Copyright [yyyy] [name of copyright owner]
2573N/A
2573N/A.. CDDL HEADER END
2573N/A
2573N/A.. Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2573N/A
2573N/AChapter 3
2573N/A---------
2573N/A
2573N/ABasic Terminology
2573N/A.................
2525N/A
2585N/AThis chapter defines IPS terms and describes the IPS components.
2525N/A
2525N/AImage
2573N/A~~~~~
2525N/A
2585N/AIPS is designed to install packages in an image. An image is a directory
2525N/Atree, and can be mounted in a variety of locations as needed. Images
2525N/Aare of three types:
2525N/A
2573N/A Full
2573N/A in a full image, all dependencies are resolved within the
2525N/A image itself and IPS maintains the dependencies in a consistent
2585N/A manner;
2525N/A
2573N/A Zone
2573N/A in a zone image, IPS maintains the zone consistent with its
2585N/A global zone as defined by dependencies in the packages;
2525N/A
2573N/A User
2585N/A not yet fully functional for Oracle Solaris.
2525N/A
2585N/AIn general, images are created or cloned by other software (installers,
2585N/A|beadm|, |zonecfg|, etc) rather than directly by the user.
2525N/A
2525N/APackage
2573N/A~~~~~~~
2525N/A
2525N/AIPS deals with all software installed on a system in the granularity of
2585N/Apackages. Every package is represented by a *fault management resource
2585N/Aidentifier* (FMRI), consisting of a publisher, a name, and a version, with
2585N/Athe scheme ‘``pkg``’. For example::
2585N/A
2585N/A pkg://solaris/system/library@0.5.11,5.11-0.175.0.0.0.2.1:20111019T082311Z
2585N/A
2585N/AHere, ‘``solaris``’ is the publisher, ‘``system/library``’ is the package
2585N/Aname, and ‘``0.5.11,5.11-0.175.0.0.0.2.1:20111019T082311Z``’ is the version.
2525N/A
2585N/APackage names are hierarchical with an arbitrary number of components
2585N/Aseparated by forward slash (‘``/``’) characters. Package names form a
2585N/Asingle namespace across publishers; packages with the same name and
2585N/Aversion but different publishers are assumed to be interchangeable in terms
2585N/Aof external dependencies and interfaces. Package name components are case
2585N/Asensitive and must start with a letter or number, but can include
2585N/Aunderscores (‘``_``’), dashes (‘``-``’), periods (‘``.``’), and plus signs
2585N/A(‘``+``’) in later positions.
2525N/A
2585N/AFMRIs can appear and can be referred to in abbreviated form. The scheme
2585N/Ais typically unnecessary, leaving the FMRI to start with either a double
2585N/Aslash (‘``//``’) or a single slash (‘``/``’). When the first slash is
2585N/Adoubled, the first word following the slash is the publisher name. When
2585N/Athere is only a single leading slash, no publisher name is present, and the
2585N/Apackage name is considered complete, or ‘rooted’.
2525N/A
2585N/AFurther abbreviation is possible by eliding leading components of package
2585N/Anames. For instance, ``/driver/network/ethernet/e1000g`` can be reduced to
2585N/A``network/ethernet/e1000g``, ``ethernet/e1000g``, or even simply
2585N/A``e1000g``. Note that such abbreviation mighy cause the packaging client to
2585N/Acomplain about ambiguous package names, in which case disambiguation can
2585N/Aalways be achieved by specifying the full, rooted name. Typically package
2585N/Anames are chosen to reduce possible ambiguities, even when referred to
2585N/Asolely by their last component. Some trailing components are common,
2585N/Ahowever; in such cases, the last two components should be unambiguous.
2585N/AScripts should generally refer to packages by their full, rooted names.
2525N/A
2585N/AIt is not possible to construct an abbreviated FMRI that contains a
2585N/Apublisher name and only trailing package name components.
2585N/A
2585N/AThe version is also often unnecessary; packages referred to without version
2585N/Awill generally resolve to the latest version of the package that can be
2585N/Ainstalled. As explained below, versions themselves need not be complete.
2525N/A
2585N/AFMRIs can also be referred to with patterns, where an asterisk (‘``*``’)
2585N/Acan match any portion of a package name. Thus ``/driver/*/e1000g`` will
2585N/Aexpand to ``/driver/network/ethernet/e1000g``, as will ``/dri*00g``.
2585N/A
2585N/A
2585N/AVersion
2585N/A```````
2525N/A
2525N/AA package version consists of four sequences of integer numbers,
2525N/Aseparated by punctuation. The elements in the first three sequences
2525N/Aare separated by dots, and the sequences are arbitrarily long.
2585N/ALeading zeros in version components (e.g. ‘``01.1``’ or ‘``1.01``’) are
2585N/Aforbidden, to allow for unambiguous sorting by package version.
2585N/A
2585N/AAn example version is::
2585N/A
2585N/A 0.5.11,5.11-0.175.0.0.0.2.1:20111019T082311Z
2525N/A
2525N/AThe first part is the component version. For components that are
2585N/Aare developed as part of Oracle Solaris, this will represent the point
2525N/Ain the release when this package last changed. For a component with its
2585N/Aown development life cycle, this sequence is the dotted release
2585N/Anumber, such as ‘``2.4.10``’.
2525N/A
2525N/AThe second part, which if present must follow a comma, is the build
2585N/Aversion. Oracle Solaris uses this to denote the release of the OS for
2585N/Awhich the package was compiled.
2525N/A
2585N/AThe third part, which if present must follow a dash, is the branch version,
2585N/Aproviding vendor-specific information. This can be incremented when the
2585N/Apackaging metadata is changed, independently of the component; can contain
2585N/Aa build number; or provide some other information.
2525N/A
2525N/AThe fourth part, which if present must follow a colon, is a timestamp.
2585N/AIt represents when the package was published in the GMT timezone, and is
2585N/Aautomatically updated when the package is published.
2525N/A
2525N/AThe package versions are ordered using left-to-right precedence; thus
2525N/Athe timestamp is the least significant part of the version space; the
2585N/Anumber immediately after the ‘``@``’ is the most significant.
2585N/A
2585N/AIf required, ``pkg.human-version`` can be used to hold a human-readable
2585N/Aversion string, however the versioning scheme described above must
2585N/Aalso be present. The human-readable version string is only used for
2585N/Adisplay purposes, and is documented later in this chapter.
2585N/A
2585N/ABy allowing arbitrary version lengths, IPS can accommodate a variety
2585N/Aof different models for supporting software. Within the confines
2585N/Aof a given component version, a package author can use the build or branch
2585N/Aversions and assign one portion of the versioning scheme to security
2585N/Aupdates, another for paid vs. unpaid support updates, another for minor bug
2585N/Afixes, etc.
2585N/A
2585N/AA version can also be the token ‘``latest``’, which is substituted for the
2585N/Alatest version known.
2585N/A
2585N/AWe discuss how Oracle Solaris implements versioning in *Chapter 13*.
2525N/A
2525N/APublisher
2573N/A~~~~~~~~~
2525N/A
2585N/AA publisher is an entity that develops and constructs packages. A
2585N/Apublisher name, or prefix, is used to identify this source in a unique
2585N/Amanner. The use of Internet domains or registered trademarks is
2585N/Aencouraged, since it provides a natural namespace partitioning.
2525N/A
2585N/APackage clients combine all specified sources of packages for a given
2585N/Apublisher when computing packaging solutions. Publisher names can
2585N/Ainclude upper and lower case letters, numbers, dashes and periods; the same
2585N/Acharacters as a valid hostname.
2525N/A
2573N/A.. raw:: pdf
2573N/A
2573N/A PageBreak
2573N/A
2585N/AAction
2585N/A~~~~~~
2585N/A
2585N/AActions are used to define the software that comprises a package; they
2585N/Adefine the data needed to create this software component. When creating
2585N/Apackages, the developer expresses the package contents as a set of actions
2585N/Athen saves those to a *package manifest* file.
2585N/A
2585N/AActions look like this:
2585N/A
2585N/A.. parsed-literal::
2585N/A
2585N/A *action_name* *attribute1*\=\ *value1* *attribute2*\=\ *value2* ...
2585N/A
2585N/AAs a concrete example::
2585N/A
2585N/A dir path=a/b/c group=sys mode=0755 owner=root
2585N/A
2585N/AThe first field identifies this as a ``dir`` (or directory) action; the
2585N/A``name=value`` attributes describe the familiar properties of that
2585N/Adirectory. In the cases where the action has data associated with it,
2585N/Asuch as a file, the action looks like this::
2585N/A
2585N/A file 11dfc625cf4b266aaa9a77a73c23f5525220a0ef path=etc/release owner=root \
2585N/A group=sys mode=0444 chash=099953b6a315dc44f33bca742619c636cdac3ed6 \
2585N/A pkg.csize=139 pkg.size=189 variant.arch=i386
2585N/A
2585N/AHere the second attribute (without a ``name=`` prefix), called the
2585N/Apayload, is the SHA-1 hash of the file. This attribute can alternatively
2585N/Aappear as a regular attribute with the name ``hash``; if both forms are
2585N/Apresent they must have the same value.
2585N/A
2585N/AAction metadata is freely extensible; additional attributes can be
2585N/Aadded to actions as desired. Attribute names cannot include spaces,
2585N/Aquotes, or equals signs (‘``=``’). Attribute values can have all of those,
2585N/Aalthough values with spaces must be enclosed in single or double quotes. Single
2585N/Aquotes need not be escaped inside of a double-quoted string, and vice
2585N/Aversa, though a quote can be prefixed with a backslash (‘``\``’) so as not
2585N/Ato terminate the quoted string. Backslashes can be escaped with
2585N/Abackslashes. It is recommended that custom attributes use a reverse
2585N/Adomain name or similar unique prefix to prevent accidental namespace
2585N/Aoverlap.
2585N/A
2585N/AMultiple attributes with the same name can be present and are
2585N/Atreated as unordered lists.
2585N/A
2585N/ANote that manifests are largely created using programs; it is not
2585N/Aexpected that that developers produce complete manifests by hand, but
2585N/Arather create skeletons with the minimal non-redundant information, and
2585N/Ahave the rest filled in with tools such as |pkgmogrify| and |pkgdepend|.
2585N/A
2585N/AMost actions have key attributes; this attribute is what makes this
2585N/Aaction unique from all others in the image. For file system
2585N/Aobjects, this is the path for that object.
2585N/A
2585N/A
2585N/ATypes of Actions
2573N/A~~~~~~~~~~~~~~~~
2525N/A
2525N/AThere are currently twelve action types in IPS. The following
2585N/Asections describe each action type, and the attributes that
2585N/Adefine these actions. The action types are detailed in the |pkg5| man
2585N/Apage, and are repeated here for reference.
2585N/A
2585N/AEach section contains an example action, as it would appear in a manifest
2585N/Aduring package creation. Other attributes might be automatically added
2585N/Ato the action during publication.
2525N/A
2573N/AFile Actions
2573N/A````````````
2573N/A The ``file`` action is by far the most common action, and represents an
2585N/A ‘ordinary file’. The file action references a payload, and has four
2585N/A standard attributes:
2525N/A
2573N/A path
2585N/A The file system path where the file is installed.
2585N/A This is a file action's key attribute. These are relative
2585N/A to the root of the image.
2525N/A
2573N/A mode
2585N/A The access permissions (in numeric form) of the
2585N/A file. These are simple permissions only, not ACLs.
2525N/A
2573N/A owner
2585N/A The name of the user that owns the file.
2525N/A
2573N/A group
2585N/A The name of the group that owns the file.
2525N/A
2585N/A The payload is a positional attribute in that it is not
2585N/A named. It is the first word after the action name. In a published
2585N/A manifest, it is the SHA-1 hash of the file contents.
2585N/A If present in a manifest that has yet to be published, it
2585N/A represents the path where the payload can be found. See
2585N/A |pkgsend|. The ``hash`` attribute can be used instead of the
2585N/A positional attribute, should the value include an equals
2585N/A sign. Both can be used in the same action. However, the
2585N/A hashes must be identical.
2585N/A
2525N/A
2525N/A Other attributes include:
2525N/A
2573N/A preserve
2585N/A This specifies that the file's contents should
2585N/A not be overwritten on upgrade if the contents
2585N/A are determined to have changed since the file
2585N/A was installed or last upgraded. On initial
2585N/A installs, if an existing file is found, the file
2585N/A is salvaged (stored in ``/var/pkg/lost+found``).
2525N/A
2585N/A * If the value of ``preserve`` is ``renameold``, then the
2585N/A existing file is renamed with the extension
2585N/A ``.old``, and the new file is put in its place.
2525N/A
2585N/A * If the value of ``preserve`` is ``renamenew``, then the
2585N/A existing file is left alone, and the new file is
2585N/A installed with the extension ``.new``.
2525N/A
2585N/A * If the value of ``preserve`` is ``legacy``, then this
2585N/A file is not installed for initial package
2585N/A installs. On upgrades, any existing file is
2585N/A renamed with the extension ``.legacy``, and then the
2585N/A new file is put in its place.
2525N/A
2585N/A * If the value of ``preserve`` is ``true`` (or a value not
2585N/A listed above, such as ``strawberry``), then the
2585N/A existing file is left alone, and the new file is
2585N/A not installed. Other values with specific meanings might
2585N/A be added in future, so using ``true`` should be used if
2585N/A this functionality is required.
2525N/A
2573N/A overlay
2585N/A This specifies whether the action allows other
2585N/A packages to deliver a file at the same location
2585N/A or whether it delivers a file intended to overlay
2585N/A another. This functionality is intended for
2585N/A use with configuration files that do not participate
2585N/A in any self-assembly (for example,
2585N/A ``/etc/motd``) and that can be safely overwritten.
2585N/A
2585N/A * If ``overlay`` is not specified, multiple packages
2585N/A cannot deliver files to the same location.
2525N/A
2585N/A * If the value of ``overlay`` is ``allow``, one other
2585N/A package is allowed to deliver a file to the same
2585N/A location. This value has no effect unless the
2585N/A ``preserve`` attribute is also set.
2585N/A
2585N/A * If the value of ``overlay`` is ``true``, the file
2585N/A delivered by the action overwrites any other
2585N/A action that has specified ``allow``.
2525N/A
2585N/A Changes to the installed file are preserved based on the
2585N/A value of the ``preserve`` attribute of the overlaying
2585N/A file. On removal, the contents of the file are
2585N/A preserved if the action being overlaid is still
2585N/A installed, regardless of whether the ``preserve``
2585N/A attribute was specified. Only one action can
2585N/A overlay another, and the ``mode``, ``owner``, and ``group``
2585N/A attributes must match.
2525N/A
2585N/A original_name
2585N/A This attribute is used to handle editable
2585N/A files moving from package to package or
2585N/A from place to place, or both. The form this
2585N/A takes is the name of the originating package,
2585N/A followed by a colon and the original
2585N/A path to the file. Any file being deleted is
2585N/A recorded either with its package and path,
2585N/A or with the value of the ``original_name``
2585N/A attribute if specified. Any editable file
2585N/A being installed that has the ``original_name``
2585N/A attribute set uses the file of that name if
2585N/A it is deleted as part of the same packaging
2585N/A operation.
2525N/A
2585N/A Note that once set, this attribute should never
2585N/A change even if the package or file are repeatedly renamed;
2585N/A this will permit upgrade to occur from all previous versions.
2585N/A
2585N/A revert-tag
2585N/A This attribute is used to tag editable
2585N/A files that should be reverted as a set.
2585N/A Multiple ``revert-tag`` values can be specified
2585N/A The file reverts to its manifest-defined
2585N/A state when ``pkg revert`` is invoked
2585N/A with any of those tags specified. See
2585N/A |pkg|.
2585N/A
2585N/A Specific types of file can have additional attributes. For ELF files,
2585N/A the following attributes are recognized:
2525N/A
2573N/A elfarch
2585N/A The architecture of the ELF file. This will is the output of
2573N/A ``uname -p`` on the architecture for which the file is built.
2525N/A
2573N/A elfbits
2585N/A This is ``32`` or ``64``.
2525N/A
2573N/A elfhash
2585N/A This is the hash of the ‘interesting’ ELF
2585N/A sections in the file. These are the sections
2585N/A that are mapped into memory when the binary is loaded.
2525N/A
2585N/A These are the only sections necessary to consider when
2585N/A determining whether the executable behavior of two binaries
2585N/A will differ.
2525N/A
2585N/A An example ``file`` action is::
2585N/A
2585N/A file path=usr/bin/pkg owner=root group=bin mode=0755
2585N/A
2525N/A
2573N/ADirectory Actions
2573N/A`````````````````
2573N/A
2585N/A The ``dir`` action is like the ``file`` action in that it represents
2585N/A a file system object, except that it represents a directory
2585N/A instead of an ordinary file. The ``dir`` action has the same
2585N/A four standard attributes as the ``file`` action (``path``, ``owner``,
2585N/A ``group`` and ``mode``), and ``path`` is the key attribute.
2525N/A
2585N/A Directories are reference counted in IPS. When the last
2585N/A package that either explicitly or implicitly references a
2585N/A directory no longer does so, that directory is removed. If
2585N/A that directory contains unpackaged file system objects,
2585N/A those items are moved into ``/var/pkg/lost+found``.
2525N/A
2585N/A To move unpackaged contents into a new directory, the following
2585N/A attribute might be useful:
2525N/A
2573N/A salvage-from
2585N/A This names a directory of salvaged items. A
2585N/A directory with such an attribute inherits on
2585N/A creation the salvaged directory contents if
2585N/A they exist.
2525N/A
2585N/A During installation, |pkg| will check that all instances of a given
2573N/A directory action on the system have the same owner, group and mode
2573N/A attributes, and will not install the action if conflicting actions
2585N/A will exist on the system as a result of the operation.
2585N/A
2585N/A An example of a ``dir`` action is::
2585N/A
2585N/A dir path=usr/share/lib owner=root group=sys mode=0755
2525N/A
2573N/ALink Actions
2573N/A````````````
2573N/A
2585N/A The ``link`` action represents a symbolic link. The ``link`` action
2585N/A has the following standard attributes:
2525N/A
2525N/A path
2585N/A The file system path where the symbolic link is
2585N/A installed. This is a ``link`` action's key attribute.
2525N/A
2525N/A target
2585N/A The target of the symbolic link. The file system object
2585N/A to which the link resolves.
2525N/A
2573N/A The ``link`` action also takes attributes that allow for multiple
2585N/A versions or implementations of a given piece of software to be
2585N/A installed on the system at the same time. Such links are *mediated*,
2585N/A and allow administrators to easily toggle which links point to which
2585N/A version or implementation as desired. These *mediated links* are
2573N/A discussed in *Chapter 10*.
2525N/A
2585N/A An example of a ``link`` action is::
2585N/A
2585N/A link path=usr/lib/libpython2.6.so target=libpython2.6.so.1.0
2585N/A
2585N/AHardlink Actions
2573N/A````````````````
2525N/A
2573N/A The ``hardlink`` action represents a hard link. It has the same
2573N/A attributes as the link action, and ``path`` is also its key attribute.
2525N/A
2585N/A An example of a ``hardlink`` action is::
2585N/A
2585N/A hardlink path=opt/myapplication/hardlink target=foo
2525N/A
2585N/ASet Actions
2585N/A```````````
2585N/A
2585N/A The ``set`` action represents a package-level attribute, or metadata,
2585N/A such as the package description.
2585N/A
2585N/A The following attributes are recognized:
2525N/A
2573N/A name
2585N/A The name of the attribute.
2585N/A
2585N/A value
2585N/A The value given to the attribute.
2585N/A
2585N/A The ``set`` action can deliver any metadata the package author chooses.
2585N/A However, there are a number of well-defined attribute names that have
2585N/A specific meaning to the packaging system.
2585N/A
2585N/A
2585N/A pkg.fmri
2585N/A The name and version of the containing package.
2585N/A
2585N/A info.classification
2585N/A One or more tokens that a |pkg5| client can use
2585N/A to classify the package. The value should have
2585N/A a scheme (such as ``org.opensolaris.category.2008``
2585N/A or ``org.acm.class.1998``) and the actual
2585N/A classification, such as ``Applications/Games``,
2585N/A separated by a colon (‘``:``’). The scheme is
2585N/A used by the |packagemanager| GUI. A set of
2585N/A ``info.classification`` values is included in
2585N/A *Appendix A*.
2585N/A
2585N/A pkg.summary
2585N/A A brief synopsis of the description. This is
2585N/A output with ``pkg list -s`` at the end of each
2585N/A line, as well as in one line of the output of
2585N/A ``pkg info``, so it should be no longer than
2585N/A sixty characters. It should describe *what* a
2585N/A package is, and should refrain from repeating
2585N/A the name or version of the package.
2585N/A
2585N/A pkg.description
2585N/A A detailed description of the contents and
2585N/A functionality of the package, typically a
2585N/A paragraph or so in length. It should describe
2585N/A *why* someone might want to install the package.
2585N/A
2585N/A pkg.obsolete
2585N/A When ``true``, the package is marked obsolete. An
2585N/A obsolete package can have no actions other than
2585N/A more ``set`` actions, and must not be marked renamed.
2585N/A Package obsoletion is covered in *Chapter 10*
2585N/A
2585N/A pkg.renamed
2585N/A When ``true``, the package has been renamed.
2585N/A There must be one or more ``depend`` actions in
2585N/A the package as well which point to the package
2585N/A versions to which this package has been renamed.
2585N/A A package cannot be marked both renamed and
2585N/A obsolete, but otherwise can have any number of
2585N/A ``set`` actions. Package renaming is covered in
2585N/A *Chapter 10*.
2585N/A
2585N/A pkg.human-version
2585N/A The version scheme used by IPS is strict, and
2585N/A does not allow for letters or words in the
2585N/A ``pkg.fmri`` version field. If there is a commonly
2585N/A used human-readable version available for a given
2585N/A package, that can be set here, and is displayed
2585N/A by IPS tools. It does not get used as a basis for
2585N/A version comparison and cannot be used in place of
2585N/A the ``pkg.fmri`` version.
2585N/A
2585N/A Some additional informational attributes, as well as some used by
2585N/A Oracle Solaris are described in *Chapter 13*.
2585N/A
2585N/A An example of a ``set`` action is::
2585N/A
2585N/A set name=pkg.summary value="Image Packaging System"
2585N/A
2585N/A.. raw:: pdf
2585N/A
2585N/A PageBreak
2585N/A
2585N/ADriver Actions
2585N/A``````````````
2585N/A
2585N/A The driver action represents a device driver. The driver
2585N/A action does not reference a payload. The driver files themselves
2585N/A must be installed as ``file`` actions. The following
2585N/A attributes are recognized (see ``add_drv(1M)`` for more information):
2585N/A
2585N/A name
2585N/A The name of the driver. This is usually, but
2585N/A not always, the file name of the driver
2585N/A binary. This is the ``driver`` action's key
2585N/A attribute.
2525N/A
2573N/A alias
2585N/A This represents an alias for the driver. A
2585N/A given driver can have more than one ``alias``
2585N/A attribute. No special quoting rules are
2585N/A necessary.
2525N/A
2573N/A class
2585N/A This represents a driver class. A given
2585N/A driver can have more than one ``class`` attribute.
2525N/A
2573N/A perms
2585N/A This represents the file system permissions
2585N/A for the driver's device nodes.
2525N/A
2573N/A clone_perms
2585N/A This represents the file system permissions
2585N/A for the clone driver's minor nodes for this
2585N/A driver.
2525N/A
2573N/A policy
2585N/A This specifies additional security policy for
2585N/A the device. A given driver can have more than
2585N/A one ``policy`` attribute, but no minor device
2585N/A specification can be present in more than one
2585N/A attribute.
2525N/A
2573N/A privs
2585N/A This specifies privileges used by the driver.
2585N/A A given driver can have more than one ``privs``
2585N/A attribute.
2525N/A
2573N/A devlink
2585N/A This specifies an entry in ``/etc/devlink.tab``.
2585N/A The value is the exact line to go into the
2585N/A file, with tabs denoted by ‘``\t``’. See
2585N/A ``devlinks(1M)`` for more information. A given
2585N/A driver can have more than one ``devlink``
2585N/A attribute.
2525N/A
2585N/A An example of a driver action is::
2585N/A
2585N/A driver name=vgatext \
2585N/A alias=pciclass,000100 \
2585N/A alias=pciclass,030000 \
2585N/A alias=pciclass,030001 \
2585N/A alias=pnpPNP,900 variant.arch=i386 variant.opensolaris.zone=global
2585N/A
2585N/ADepend Actions
2573N/A``````````````
2573N/A
2573N/A The ``depend`` action represents an inter-package dependency. A package
2585N/A can depend on another package because the first requires functionality
2525N/A in the second for the functionality in the first to work, or even to
2573N/A install. Dependencies are covered in more detail in *Chapter 6*.
2525N/A
2525N/A The following attributes are recognized:
2525N/A
2585N/A fmri
2585N/A The FMRI representing the target of the dependency. This is the
2585N/A dependency action’s key attribute. The FMRI value must not
2585N/A include the publisher. The package name is assumed to be
2585N/A complete (that is, rooted), even if it does not begin with a forward
2585N/A slash (‘``/``’).
2585N/A Dependencies of type ``require-any`` can have multiple ``fmri``
2585N/A attributes. A version is optional on the ``fmri`` value, though
2585N/A for some types of dependencies, an FMRI with no version has no
2585N/A meaning.
2585N/A
2585N/A The FMRI value cannot use asterisks, and cannot use the
2585N/A ``latest`` token for a version.
2585N/A
2573N/A type
2573N/A The type of the dependency.
2525N/A
2585N/A * If the value is ``require``, then the target package
2585N/A is required and must have a version equal to
2585N/A or greater than the version specified in the
2585N/A ``fmri`` attribute. If the version is not specified,
2585N/A any version satisfies the dependency. A
2585N/A package cannot be installed if any of its
2585N/A required dependencies cannot be satisfied.
2573N/A
2585N/A * If the value is ``optional``, then the target, if present, must
2573N/A be at the specified version level or greater.
2525N/A
2573N/A * If the value is ``exclude``, then the containing package cannot
2585N/A be installed if the target is present at the specified
2585N/A version level or greater. If no version is specified, the
2585N/A target package cannot be installed concurrently with the
2585N/A package specifying the dependency.
2525N/A
2573N/A * If the value is ``incorporate``, then the dependency is
2585N/A optional, but the version of the target package is
2585N/A constrained. See *Chapter 6* for a discussion of
2585N/A constraints and freezing.
2525N/A
2585N/A * If the value is ``require-any``, then any one of multiple target
2585N/A packages as specified by multiple ``fmri`` attributes can satisfy
2585N/A the dependency, following the same rules as the ``require``
2585N/A dependency type.
2525N/A
2585N/A * If the value is ``conditional``, the target is required
2585N/A only if the package defined by the ``predicate`` attribute is present
2573N/A on the system.
2525N/A
2585N/A * If the value is ``origin``, the target must, if present,
2573N/A be at the specified value or better on the image to be modified
2573N/A prior to installation. If the value of the ``root-image`` attribute
2585N/A is ``true``, the target must be present on the image rooted at
2585N/A ‘``/``’ in order to install this package.
2525N/A
2585N/A * If the value is ``group``, the target is required unless the
2573N/A package is on the image avoid list. Note that obsolete packages
2585N/A silently satisfy the ``group`` dependency. See the ``avoid``
2585N/A subcommand in the |pkg| man page.
2525N/A
2573N/A * If the value is ``parent``, then the dependency is ignored if
2585N/A the image is not a child image, such as a zone. If the image
2585N/A is a child image then the target is required to be present
2585N/A in the parent image. The version matching for a ``parent``
2585N/A dependency is the same as that used for ``incorporate``
2573N/A dependencies.
2525N/A
2573N/A predicate
2573N/A The FMRI representing the predicate for ``conditional``
2525N/A dependencies.
2525N/A
2573N/A root-image
2573N/A Has an effect only for ``origin`` dependencies as mentioned above.
2525N/A
2585N/A An example of a ``depend`` action is::
2585N/A
2585N/A depend fmri=crypto/ca-certificates type=require
2585N/A
2585N/A
2585N/ALicense Actions
2573N/A```````````````
2573N/A
2573N/A The ``license`` action represents a license or other informational
2585N/A file associated with the package contents. A package can deliver
2525N/A licenses, disclaimers, or other guidance to the package installer
2525N/A through the use of the license action.
2585N/A
2585N/A The payload of the license action is delivered into the image
2525N/A metadata directory related to the package, and should only contain
2585N/A human-readable text data. It should not contain HTML or any
2585N/A other form of markup. Through attributes, license actions can
2525N/A indicate to clients that the related payload must be displayed
2585N/A and/or require acceptance of it. The method of display and/or
2585N/A acceptance is at the discretion of clients.
2585N/A
2525N/A
2525N/A The following attributes are recognized:
2525N/A
2573N/A license
2573N/A This attribute provides a meaningful description
2525N/A for the license to assist users in determining
2525N/A the contents without reading the license text
2585N/A itself. Some example values include:
2525N/A
2585N/A * ABC Co. Copyright Notice
2585N/A * ABC Co. Custom License
2585N/A * Common Development and Distribution License 1.0 (CDDL)
2585N/A * GNU General Public License 2.0 (GPL)
2585N/A * GNU General Public License 2.0 (GPL) Only
2585N/A * MIT License
2585N/A * Mozilla Public License 1.1 (MPL)
2585N/A * Simplified BSD License
2525N/A
2525N/A Wherever possible, including the version of the
2525N/A license in the description is recommended as shown
2585N/A above. The license value must be unique within a package.
2573N/A must-accept
2573N/A When ``true``, this license must be accepted by a
2525N/A user before the related package can be installed
2585N/A or updated. Omission of this attribute is
2585N/A equivalent to ``false``. The method of
2585N/A acceptance (interactive or configuration-based,
2585N/A for example) is at the discretion of clients.
2525N/A
2573N/A must-display
2573N/A When ``true``, the action's payload must be displayed
2525N/A by clients during packaging operations. Omission of
2573N/A this value is considered equivalent to ``false``.
2525N/A This attribute should not be used for copyright
2525N/A notices, only actual licenses or other material
2525N/A that must be displayed during operations. The
2525N/A method of display is at the discretion of
2525N/A clients.
2525N/A
2573N/A The ``license`` attribute is the key attribute for the license action.
2525N/A
2585N/A An example of a ``license`` action is::
2585N/A
2585N/A license license="Apache v2.0"
2585N/A
2585N/ALegacy Actions
2573N/A``````````````
2573N/A
2585N/A The ``legacy`` action represents package data used by the legacy SVR4
2525N/A packaging system. The attributes associated with this action are
2585N/A added into the legacy system’s databases so that the tools
2585N/A querying those databases can operate as if the legacy package were
2525N/A actually installed. In particular, this should be sufficient to
2585N/A convince the legacy system that the package named by the ``pkg``
2585N/A attribute is installed on the system, so that the package can be used to
2585N/A satisfy SVR4 dependencies.
2525N/A
2585N/A The following attributes, named in accordance with the parameters in
2585N/A |pkginfo|, are recognized:
2525N/A
2573N/A category
2573N/A The value for the CATEGORY parameter. The default value
2573N/A is ``system``.
2525N/A
2573N/A desc
2573N/A The value for the DESC parameter.
2525N/A
2573N/A hotline
2573N/A The value for the HOTLINE parameter.
2525N/A
2573N/A name
2573N/A The value for the NAME parameter. The default value is
2585N/A ‘``none provided``’.
2525N/A
2573N/A pkg
2573N/A The abbreviation for the package being installed. The
2585N/A default value is the name from the FMRI of the package.
2525N/A
2573N/A vendor
2573N/A The value for the VENDOR parameter.
2525N/A
2573N/A version
2573N/A The value for the VERSION parameter. The default value is
2585N/A the version from the FMRI of the package.
2525N/A
2573N/A The ``pkg`` attribute is the key attribute for the legacy action.
2525N/A
2585N/A An example of a ``legacy`` action is::
2585N/A
2585N/A legacy pkg=SUNWcsu arch=i386 category=system \
2585N/A desc="core software for a specific instruction-set architecture" \
2585N/A hotline="Please contact your local service provider" \
2585N/A name="Core Solaris, (Usr)" vendor="Oracle Corporation" \
2585N/A version=11.11,REV=2009.11.11 variant.arch=i386
2573N/A
2585N/ASignature Actions
2585N/A`````````````````
2585N/A Signature actions are used as part of the support for package signing in
2585N/A IPS. They are covered in detail in *Chapter 11*.
2585N/A
2585N/A
2585N/AUser Actions
2585N/A````````````
2585N/A
2585N/A The user action defines a UNIX user as defined in ``/etc/passwd``,
2585N/A ``/etc/shadow``, ``/etc/group``, and ``/etc/ftpd/ftpusers`` files.
2585N/A Users defined with this action have entries added to the
2585N/A appropriate files.
2525N/A
2525N/A The following attributes are recognized:
2525N/A
2585N/A username
2585N/A The unique name of the user.
2585N/A
2585N/A password
2585N/A The encrypted password of the user. The default
2585N/A value is ‘``*LK*``’.
2585N/A
2585N/A uid
2585N/A The unique numeric ID of the user. The default value
2585N/A is the first free value under 100.
2585N/A
2585N/A group
2585N/A The name of the user's primary group. This must be
2585N/A found in ``/etc/group``.
2585N/A
2585N/A gcos-field
2585N/A The real name of the user, as represented in the GECOS
2585N/A field in ``/etc/passwd``. The default value is the
2585N/A value of the ``username`` attribute.
2585N/A
2585N/A home-dir
2585N/A The user's home directory. The default value is
2585N/A ‘``/``’.
2585N/A
2585N/A login-shell
2585N/A The user's default shell. The default value is
2585N/A empty.
2585N/A
2585N/A group-list
2585N/A Secondary groups to which the user belongs.
2585N/A See ``group(4)``.
2585N/A
2585N/A ftpuser
2585N/A Can be set to ``true`` or ``false``. The default
2585N/A value of ``true`` indicates that the user is
2585N/A permitted to login via FTP. See ``ftpusers(4)``.
2525N/A
2585N/A lastchg
2585N/A The number of days between January 1, 1970,
2585N/A and the date that the password was last modified.
2585N/A The default value is empty.
2585N/A
2585N/A min
2585N/A The minimum number of days required between
2585N/A password changes. This field must be set to 0
2585N/A or above to enable password aging. The default
2585N/A value is empty.
2585N/A
2585N/A max
2585N/A The maximum number of days the password is
2585N/A valid. The default value is empty. See ``shadow(4)``.
2585N/A
2585N/A warn
2585N/A The number of days before password expires
2585N/A that the user is warned.
2525N/A
2585N/A inactive
2585N/A The number of days of inactivity allowed for
2585N/A that user. This is counted on a per-machine
2585N/A basis. The information about the last login
2585N/A is taken from the machine's lastlog file.
2585N/A
2585N/A expire
2585N/A An absolute date expressed as the number of
2585N/A days since the UNIX Epoch (January 1, 1970).
2585N/A When this number is reached, the login can no
2585N/A longer be used. For example, an ``expire`` value
2585N/A of 13514 specifies a login expiration of
2585N/A January 1, 2007.
2585N/A
2585N/A flag
2585N/A Set to empty.
2585N/A
2585N/A For more information on the values of these attributes, see
2585N/A the ``shadow(4)`` man page.
2585N/A
2585N/A A example of a user action is::
2585N/A
2585N/A user gcos-field="pkg(5) server UID" group=pkg5srv uid=97 username=pkg5srv
2525N/A
2525N/A
2585N/AGroup Actions
2573N/A`````````````
2573N/A
2585N/A The group action defines a UNIX group as defined in
2585N/A ``group(4)``. No support is present for group passwords. Groups
2585N/A defined with this action initially have no user list. Users
2585N/A can be added with the user action. The following attributes
2585N/A are recognized:
2573N/A
2585N/A groupname
2585N/A The value for the name of the group.
2585N/A
2585N/A gid
2585N/A The group's unique numeric id. The default
2585N/A value is the first free group under 100.
2585N/A
2585N/A An example of a group action is::
2585N/A
2585N/A group groupname=pkg5srv gid=97
2525N/A
2525N/ARepository
2573N/A~~~~~~~~~~
2525N/A
2525N/AA software repository contains packages for one or more publishers.
2525N/ARepositories can be configured for access in a variety of different
2585N/Aways: HTTP, HTTPS, file (on local storage or via NFS or SMB) and as a
2585N/Aself-contained package archive file, usually with the ``.p5p`` extension.
2585N/A
2585N/APackage archives allow for convenient distribution of IPS packages,
2585N/Aand are discussed further in *Chapter 4*.
2525N/A
2585N/AA repository accessed via HTTP or HTTPS has a server process (|pkg.depotd|)
2585N/Aassociated with it; in the case of file repositories, the repository
2585N/Asoftware runs as part of the accessing client.
2525N/A
2585N/ARepositories are created with the |pkgrepo| command, and package archives
2585N/Aare created with the |pkgrecv| command.
2525N/A