swpackage.4 (2010 09)

s
swpackage(4) swpackage(4)
Environment Variables for Scripts
The following environment variables affect scripts:
SW_CATALOG
Holds the path to the Installed Products Database (IPD), relative to the path in the
SW_ROOT_DIRECTORY
environment variable. Note that you can specify a path for the IPD
using the
installed_software_catalog
default option.
SW_CONTROL_DIRECTORY
Defines the current directory of the script being executed, either a temporary catalog directory,
or a directory within in the Installed Products Database (IPD). This variable tells scripts
where other control scripts for the software are located (for example, subscripts).
SW_CONTROL_TAG
Holds the tag name of the control_file being executed. When packaging software, you can
define a physical name and path for a control file in a depot. This lets you define the
control_file with a name other than its tag and lets you use multiple control file definitions to
point to the same file. A control_file can query the
SW_CONTROL_TAG
variable to determine
which tag is being executed.
SW_LOCATION
Defines the location of the product, which may have been changed from the default product
directory. When combined with the
SW_ROOT_DIRECTORY
, this variable tells scripts where
the product files are located.
SW_PATH
A PATH variable which defines a minimum set of commands available for use in a control
script (for example, /sbin:/usr/bin
).
SW_ROOT_DIRECTORY
Defines the root directory in which the session is operating, either / or an alternate root direc-
tory. This variable tells control scripts the root directory in which the products are installed.
A script must use this directory as a prefix to SW_LOCATION to locate the product’s installed
files. The configure script is only run when SW_ROOT_DIRECTORY
is /.
SW_SESSION_OPTIONS
Contains the pathname of a file containing the value of every option for a particular command,
including software and target selections. This lets scripts retrieve any command options and
values other than the ones provided explicitly by other environment variables. For example,
when the file pointed to by SW_SESSIONS_OPTIONS
is made available to a request script,
the targets option contains a list of software_collection_specs for all targets specified for the
command. When the file pointed to by
SW_SESSIONS_OPTIONS
is made available to other
scripts, the targets option contains the single software_collection_spec for the targets on which
the script is being executed.
SW_SOFTWARE_SPEC
This variable contains the fully qualified software specification of the current product or
fileset. The software specification allows the product or fileset to be uniquely identified.
File Specification
Within a fileset specification, the user can specify the following file types to be packaged into the fileset by
swpackage:
control file
directory
hard link
regular file
symbolic link
An error results if you specify a recognized but unpackageable type or an unrecognized type.
The
swpackage command supports these mechanisms for specifying the files contained in a fileset:
Default permission specification
For some or all of the files and directories in the fileset, the user can define a default set of per-
missions.
Directory mapping
The user can point
swpackage at a source directory in which the fileset’s files are located.
20 Hewlett-Packard Company 20 HP-UX 11i Version 3: September 2010