swpackage(1M)swpackage(1M)NAMEswpackage - package software products into a target depot or tape
SYNOPSIS
session_file] directory|device] software_file] product_specifica‐
tion_file|directory] session_file] option=value] option_file]
[software_selections] directory|device]
Remarks
· For a description of the Product Specification File (PSF) used as
input to the command, see the swpackage(4) man page by typing on the
command line.
· For an overview of all SD commands, see the sd(5) man page by typing
on the command line.
· For descriptions of all SD objects, attributes and data formats, see
the sd(4) man page by typing on the command line.
DESCRIPTION
The command is not distributed; it only operates on the local host. It
packages software products into:
· a distribution directory (which can be accessed directly or copied
onto a CD-ROM),
· a distribution tape, such as DDS, nine-track or cartridge tapes.
NOTE: treats everything following and as the path to the direc‐
tory|device. If
or
is entered, will not treat as if it is a hostname as other Software
Distributor commands do. is treated as part of the path.
A software product is organized into a three-level hierarchy: products,
subproducts, and filesets. The actual files that make up a product are
packaged into filesets. Subproducts can be used to partition or subset
the filesets into logical groupings. (Subproducts are optional.) A
product, subproduct, and fileset also have attributes associated with
them.
Both directory and tape distributions use the same format. The com‐
mand:
· Organizes the software to be packaged into products, subproducts,
and filesets,
· Provides flexible mechanisms to package source files into filesets,
· Modifies existing products in a distribution directory,
· Copies products in a distribution directory to a distribution tape.
Both the and commands create or modify a target depot. The differences
between these commands are:
· The command copies products from an existing depot to another depot.
The command creates products based on the user's specification, and
packages these products into a depot.
· can be used to re-package software_selections from an existing dis‐
tribution directory to a distribution tape.
· The command can copy from a local or remote source to a set of local
or remote targets. The command packages source files from the local
filesystem into a product, for insertion into a local distribution
directory or tape.
· After creating a target depot, registers that directory with the
local so that it can be found by etc. With the depot is not regis‐
tered; the user must explicitly invoke the command.
Layout Version
By default, SD object and attribute syntax conforms to the specifica‐
tion of the standard. SD commands still accept the keyword names asso‐
ciated with the older but you should use the older version only to cre‐
ate distributions readable by older versions of SD.
Which the SD commands write is controlled by the option or by specify‐
ing the attribute in the file.
See sd(4), the description of the option in the following section and
in sd(5) for more information. See sd(4) for more information on
files.
Options
supports the following options:
Previews a package session without actually creating or modify‐
ing the
distribution tape.
Turns on verbose output to stdout. Verbose output is enabled by
default, see the option below.
List the data model revision that
supports. By default, always packages using the lat‐
est data model revision.
Save the current options and operands only to the
session_file. You can enter a relative or absolute
path with the file name. The default directory for
session files is Without this option, by default, the
session file is saved only in the default directory
You can recall a session file with the option.
(Obsolete but allowed for backward compatibility. Use the
operand instead.)
If creating a distribution directory, this option
defines the pathname of the directory. If creating a
distribution tape, this option defines the device file
on which to write the distribution. When creating a
distribution tape, the tape device (file) must exist,
and the option must be specified (see below).
You can also specify that the output be "piped" to an
external command using:
The symbol and command must be quoted because it is
interpreted by and not the shell.
Read the list of
software_selections from software_file instead of (or
in addition to) the command line.
The source PSF describes the product, subproduct, fileset, and
file
definitions used to build a software product from a
set of source files.
The source can also be an existing directory depot
(which already contains products).
Execute based on the options and operands saved from a previ‐
ous session, as defined in session_file. You can save
session information to a file with the option.
Set the session
option to value and override the default value (or a
value in an alternate options_file specified with the
option). Multiple options can be specified.
Read the session options and behaviors from
options_file.
Software Selections
If specified, the software selections cause to only (re)package those
software selections from the full set defined in the source prod‐
uct_specification_file. If no software_selections are specified, then
will (re)package all the products defined in the source product_speci‐
fication_file.
The command supports the following syntax for each software_selection:
· You can specify selections with the following shell wildcard
and pattern-matching notations:
· Bundles and subproducts are recursive. Bundles can contain
other bundles and subproducts can contain other subproducts.
· The software specification selects all products. Use this
specification with caution.
The component has the form:
· location applies only to installed software and refers to
software installed to a location other than the default prod‐
uct directory.
· and apply only to filesets.
· , , , , and apply only to bundles and products. They are
applied to the leftmost bundle or product in a software spec‐
ification.
· The <op> (relational operator) component can be of the form:
or
which performs individual comparisons on dot-separated
fields.
For example, chooses all revisions greater than or equal to
The system compares each dot-separated field to find matches.
· The (equals) relational operator lets you specify selections
with the shell wildcard and pattern-matching notations:
For example, the expression returns any revision in version
10 or version 11.
· All version components are repeatable within a single speci‐
fication (for example, If multiple components are used, the
selection must match all components.
· Fully qualified software specs include the and version compo‐
nents even if they contain empty strings. For installed
software, is also included.
· No space or tab characters are allowed in a software selec‐
tion.
· The software can take the place of the version component. It
has the form:
[instance_id]
within the context of an exported catalog, where is an inte‐
ger that distinguishes versions of products and bundles with
the same tag.
Target Selections
The command supports the following syntax for a directory|device:
If creating a distribution directory, this option defines the path to
the directory. If creating a distribution tape, this option defines
the path to the device file on which to write the distribution. When
creating a distribution tape, the tape device (file) must exist, and
the option must be specified (see below).
EXTERNAL INFLUENCES
Default Options
In addition to the standard options, several SD behaviors and policy
options can be changed by editing the default values found in:
the system-wide default values.
the user-specific default values.
Values must be specified in the defaults file using this syntax:
The optional prefix denotes one of the SD commands.
You can also override default values from the command line with the or
options:
The following section lists all of the keywords supported by and If a
default value exists, it is listed after the The commands that this
option applies to are also specified.
The location for SD logfiles and the default par‐
ent directory for the
installed software catalog. The default
value is for normal SD operations. When
SD operates in nonprivileged mode (that
is, when the default option is set to
· The default value is forced to
· The path element is replaced with the
name of the invoking user, which SD
reads from the system password file.
· If you set the value of this option
to path, SD replaces with the invok‐
ing user's home directory (from the
system password file) and resolves
path relative to that directory. For
example, resolves to the directory in
your home directory.
SD's nonprivileged mode is intended only
for managing applications that are spe‐
cially designed and packaged. This mode
cannot be used to manage the HP-UX oper‐
ating system or patches to it. For a
full explanation of nonprivileged SD,
see the available at the web site.
See also the option.
Determines whether packaging of files with a size
greater
than or equal to 2 gigabytes is allowed.
In the default state of this option
tells to not allow files with a size
greater than or equal to 2 gigabytes to
be packaged.
When set to this option tells to permit
files with a size greater than or equal
to 2 gigabytes to be packaged. The
depot can only be used by the December
2005 OEUR (HP-UX 11i v2) version of SD
and newer versions of SD on HP-UX 11i
v1, HP-UX 11i v2, and future releases.
This version of SD supports a large file
up to 2 terabytes (2048 gigabytes)
Determines whether a serial depot can be created
larger than
2 gigabytes. In the default state of
this option tells to limit the size of
the depot to 2 gigabytes.
When set to this option tells to permit
the creation of a serial depot greater
than 2 gigabytes. The depot is only
usable by SD in the HP-UX 11i v1 (11.11)
December 2004 OEUR, HP-UX 11i v2 (11.23)
March 2005 OEUR and newer releases.
Determines whether to process partial bundles
without WARNINGs and
NOTEs. In the default state of this
option tells to package what is avail‐
able in the PSF. Missing or ambiguous
bundle contents are ignored and no WARN‐
INGs and NOTEs are issued.
When set to this option tells to expect
all the bundle contents to be present
and unique in the PSF. Objects that are
ambiguous or missing generates a NOTE
and every bundle with missing or ambigu‐
ous content generates a WARNING. (Note
that succeeds even if NOTEs and WARNINGS
occur.)
Defines the command called to compress files
before installing, copying or packaging.
If the option is set to other than or
this path must be changed.
If set to uncompressed files are compressed before
transfer from a source. This enhances
performance on slower networks for and
and results in smaller depots for and
unless the option is also set to
Determines whether SD commands create compressed
INDEX and INFO
catalog files when writing to target
depots or roots. The default of does
not create compressed files. When set
to SD creates compressed and uncom‐
pressed INDEX and INFO files. The com‐
pressed files are named and and reside
in the same directories as the uncom‐
pressed files.
Compressed files can enhance performance
on slower networks, although they may
increase disk space usage due to a
larger Installed Products Database and
depot catalog. SD controllers and tar‐
get agents for HP-UX 11.01 and higher
automatically load the compressed INDEX
and INFO files from the source agent
when:
· The source agent supports this fea‐
ture.
· or exist on the source depot.
· or are not older than the correspond‐
ing uncompressed INDEX or INFO files.
The uncompressed INDEX or INFO file is
accessed by the source agent if any
problem occurs when accessing, transfer‐
ring, or uncompressing the or file.
Defines the default compression type used by the
agent when it compresses
files during or after transmission. If
is set to false, the is recorded for
each file compressed so that the correct
uncompression can later be applied dur‐
ing a or a with set to true. The speci‐
fied must produce files with the speci‐
fied. The must be able to process files
of the specified unless the format is
which is uncompressed by the internal
uncompressor
If creating a target depot,
will create Access Control Lists (ACLs)
for the depot (if it is new) and all
products being packaged into it. If set
to and if the user is the superuser,
will not create ACLs. (The command
never creates ACLs when software is
packaged on to a distribution tape.)
Defines the default location of the source depot
(when the
is directory). You can also use the
syntax. The option overrides this
default.
Defines the default distribution directory of the
target depot.
The directory|device operand overrides
this default.
Defines the default location of the target tape
device file.
The directory|device operand overrides
this default.
Prevents a command from proceeding past the analy‐
sis phase if the disk
space required is beyond the available
free space of the impacted file systems.
If set to then the install, copy, or
package operation will use the file sys‐
tems' minfree space and may fail because
it reaches the file system's absolute
limit.
Do not follow symbolic links in the package source
files, but include
the symbolic links in the packaged prod‐
ucts. A value of for this keyword
causes to follow symbolic links in the
package source files and include the
files they reference in the packaged
products.
Do not include each source file's revision
attribute in the products being packaged.
Because this operation is time consum‐
ing, by default the revision attributes
are not included. If set to will exe‐
cute and possibly (in that order) to try
to determine a file's revision
attribute.
Specifies the POSIX
to which the SD commands conform when
writing distributions and output. Sup‐
ported values are "1.0" (default) and
"0.8".
SD object and attribute syntax conforms
to the specification of the standard.
SD commands still accept the keyword
names associated with the older layout
version, but you should use only to cre‐
ate distributions readable by older ver‐
sions of SD.
See the description of the option in for
more information.
Adds numeric identification numbers at the begin‐
ning of SD logfile
messages:
(default) No identifiers are attached
to messages.
Adds identifiers to ERROR messages only.
Adds identifiers to ERROR and WARNING
messages.
Adds identifiers to ERROR, WARNING, and
NOTE messages.
Adds identifiers to ERROR, WARNING,
NOTE, and certain other
informational messages.
Controls the handling of corequisites in determin‐
ing the order in
which filesets are loaded.
If promotes the corequisite of a prereq‐
uisite to prerequisite. If corequisites
are not used in determining load order.
The option controls the amount of detail
written to the log file. When set to
this option adds detailed task informa‐
tion (such as options specified,
progress statements, and additional sum‐
mary information) to the log file. This
information is in addition to log infor‐
mation controlled by the option.
Defines the default log file for the swpackage
command.
Controls the log level for the events logged to
the command logfile, the
target agent logfile, and the source
agent logfile. This information is in
addition to the detail controlled by the
option. See for more information.
A value of:
provides no information to the log
files.
enables verbose logging to the log
files.
enables very verbose logging to the log
files.
Controls the time in minutes to cache and re-use
the results of hostname
or IP address resolution lookups. A
value of 0 disables the facility to
cache and re-use lookup results. The
maximum value allowed is 10080 minutes,
which is one week.
A value of:
disables the lookup caching mechanism.
is the maximum value allowed.
If creating a distribution tape or multiple-direc‐
tory media such as a
CD-ROM, this keyword specifies the
capacity of the tape in one million byte
units (not Mbytes). This option is
required if the media is not a DDS tape
or a disk file. Without this option,
sets the size to the default of 1,330
Mbytes for tape or to the amount of free
space on the disk up to for a disk file.
SD uses the same format across multiple
directory media as it does for multiple
serial media, including calculations of
the correct size based partitioning of
filesets and setting of the attributes.
Defines the type of distribution to create. The
recognized types are
and
If set to does not put the files that make up a
product in the target depot. Instead,
inserts references to the original
source files, saving disk space.
Controls whether
automatically removes obsolete filesets
from target products in the target
depot. If set to removes obsolete file‐
sets from the target products that were
written to during the package process.
Removal occurs after the packaging is
complete. Filesets are defined as obso‐
lete if they were not part of the most
recent packaging of the product into the
depot or during the current packaging of
the product defined in the source psf.
Controls the overwriting of files, which may
enhance performance on
slow networks or disks. At the default
value of false, SD compares each file in
a source fileset to corresponding files
on the target system. SD compares the
files based on size, timestamp, and
(optionally) the checksum (see If the
files are identical the files on the
target system are not overwritten.
When set to true, SD does not compare
files and overwrites any identical files
on the target.
Controls the use of checksum comparisons when the
option is set to false. At the default
value of true, this option causes SD to
compute and compare checksums to deter‐
mine if a new file should overwrite an
old file. Use of checksums slows the
comparison but is a more robust check
for equivalency than size and time
stamp.
If set to false, SD does not compute
checksums and compares files only by
size and timestamp.
This option controls SD's nonprivileged mode.
This option is ignored
(treated as true) when the invoking user
is super-user.
When set to the default value of true,
SD operations are performed normally,
with permissions for operations either
granted to a local super-user or set by
SD ACLs. (See swacl(1M) for details on
ACLs.)
When set to false and the invoking user
is local and is not super-user, nonpriv‐
ileged mode is invoked:
· Permissions for operations are based
on the user's file system permis‐
sions.
· SD ACLs are ignored.
· Files created by SD have the uid and
gid of the invoking user, and the
mode of created files is set accord‐
ing to the invoking user's umask.
SD's nonprivileged mode is intended only
for managing applications that are spe‐
cially designed and packaged. This mode
cannot be used to manage the HP-UX oper‐
ating system or patches to it. For a
full explanation of nonprivileged SD,
see the available at the web site.
See also the option.
Defines the default
software_selections. There is no sup‐
plied default. If there is more than
one software selection, they must be
separated by spaces. Software is usu‐
ally specified in a software input file,
as operands on the command line, or in
the GUI.
Defines the default location of the source product
specification file
(PSF). The syntax is not allowed, only
a valid can be specified. The option
overrides this value.
Defines the default source type:
or The source type derived from the
option overrides this value.
Defines the default
target_selections. There is no supplied
default. If there is more than one tar‐
get selection, they must be separated by
spaces. Targets are usually specified
in a target input file, as operands on
the command line, or in the GUI.
Defines the command to uncompress files
when installing, copying, or packaging.
This command processes files which were
stored on the media in a compressed for‐
mat. If the of the file is then the
internal uncompression is used instead
of the external
Controls the verbosity of a non-interactive com‐
mand's output:
disables output to stdout. (Error and
warning messages
are always written to stderr).
enables verbose messaging to stdout.
for and enables very verbose messaging
to stdout.
The option overrides this default if it
is set to 0. Applies to all commands.
Prevents file operations on remote (NFS) file sys‐
tems. All files
destined for packaging on targets on a
remote (NFS) file systems are skipped.
If set to true and if the superuser has
write permission on the remote file sys‐
tem, the remote files are not skipped.
Session File
Each invocation of the command defines a packaging ses‐
sion. The invocation options, source information, soft‐
ware selections, and target hosts are saved before the
installation or copy task actually commences. This lets
you re-execute the command even if the session ends
before proper completion.
Each session is saved to the file This file is overwrit‐
ten by each invocation of
You can also save session information to a specific file
by executing with the session_file option.
A session file uses the same syntax as the defaults
files. You can specify an absolute path for the session
file. If you do not specify a directory, the default
location for a session file is
To re-execute a session file, specify the session file as
the argument for the session_file option of
Note that when you re-execute a session file, the values
in the session file take precedence over values in the
system defaults file. Likewise, any command line options
or parameters that you specify when you invoke take
precedence over the values in the session file.
Environment Variables
The environment variable that affects is:
Determines the language in which messages are dis‐
played.
If is not specified or is set to the
empty string, a default value of is
used. See the lang(5) man page by
typing for more information.
NOTE: The language in which the SD
agent and daemon log messages are
displayed is set by the system con‐
figuration variable script, For exam‐
ple, must be set to or to make the
agent and daemon log messages display
in Japanese.
Determines the locale to be used to override any
values for locale
categories specified by the settings
of or any environment variables
beginning with
Determines the interpretation of sequences of
bytes of text data as
characters (for example, single ver‐
sus multibyte characters in values
for vendor-defined attributes).
Determines the language in which messages should
be written.
Determines the format of dates
(create_date and mod_date) when dis‐
played by Used by all utilities when
displaying dates and times in and
Determines the time zone for use when displaying
dates and times.
Signals
The command catches the signals SIGQUIT and SIGINT. If
these signals are received, the command prints a message,
sends a Remote Procedure Call (RPC) to the agents to wrap
up, and then exits.
The agent ignores SIGHUP, SIGINT, and SIGQUIT. It imme‐
diately exits gracefully after receiving SIGTERM,
SIGUSR1, or SIGUSR2. Killing the agent may leave corrupt
software on the system, and thus should only be done if
absolutely necessary. Note that when an SD command is
killed, the agent does not terminate until completing the
task in progress.
The daemon ignores SIGHUP, SIGINT and SIGQUIT. It imme‐
diately exits gracefully after receiving SIGTERM and
SIGUSR2. After receiving SIGUSR1, it waits for comple‐
tion of a copy or remove from a depot session before
exiting, so that it can register or unregister depots if
necessary. Requests to start new sessions are refused
during this wait.
Locking
SD commands use a common locking mechanism for reading
and modifying both root directories and software depots.
This mechanism allows multiple readers but only one
writer on a root or depot.
The SD commands which modify software in an (alternate)
root directory are restricted from simultaneous modifica‐
tion using locking on the file
relative to the root directory (for example,
The SD commands which modify software in a depot are
restricted from simultaneous modification using locking
on the file
relative to the depot directory (for example,
All commands set read locks on roots and depots using the
file mentioned above. When a read lock is set, it pre‐
vents other SD commands from performing modifications
(that is, from setting write locks).
PRODUCT SPECIFICATION FILE
This section summarizes the product_specification_file
(PSF) which drives the session. See swpackage(4) for a
detailed description of PSF syntax and semantics.
A PSF is structured as follows:
[depot specification]
[vendor specification]
[category specification]
[bundle specification]
[product specification]
[control script specification]
[subproduct specification]
[fileset specification]
[control script specification]
[file specification]
[fileset specification]
...
[product specification]
...
If errors encountered while parsing the PSF result in no
valid product definitions, terminates. All errors are
logged to both stderr and the logfile. In summary, the
user can:
· Specify one or more products;
· For each product, specify one or more filesets.
· For each fileset, specify one or more files.
· (optional) Specify attributes for the target
depot/tape;
· (optional) Specify one or more bundles, defin‐
ing the bundle contents;
· (optional) Specify vendor information for prod‐
ucts and bundles;
· (optional) Specify category information for
products, bundles and patches.
· (optional) For each product, specify one or
more subproducts, defining the subproduct con‐
tents;
· (optional) For each product or fileset, specify
one or more control scripts.
RETURN VALUES
The command returns:
The products specified in the
product_specification_file were success‐
fully packaged into the target depot/tape.
An error occurred during the
session (for example, bad syntax in the
product_specification_file.) Review stderr
or the log file for details.
DIAGNOSTICS
The command writes to stdout, stderr, and to the logfile.
Standard Output
The command writes messages for significant events.
These include:
· a begin and end session message,
· selection, analysis, packaging, and tape cre‐
ation messages.
Standard Error
The command writes messages for all WARNING and ERROR
conditions to stderr.
Logfile
The command logs detailed events to the log file The user
can specify a different logfile by modifying the option.
EXAMPLES
Package the products defined in the PSF products into the
default target depot:
Preview the same operation (do not create the target
depot), and generate very verbose output:
Package the products into the target depot no_files,
insert references to the source files instead of copying
them into the depot:
Re-package a specific fileset:
Re-package the entire contents of the depot onto the tape
at
FILES
The default location of a source and target tape. (Note
that SD can
read both and tape depots.)
Contains the user-specific default values for some or all
SD options.
Contains session files automatically saved by the SD com‐
mands, or
explicitly saved by the user.
Contains the master list of current SD options with their
default values.
The directory which contains all of the configurable
and non-configurable data for SD. This directory
is also the default location of logfiles.
Contains the active system-wide default values for some
or all SD options.
The default location of a source and target software
depot.
AUTHOR
was developed by the Hewlett-Packard Company and Mark H.
Colburn (see pax(1)).
SEE ALSOsd(4), swpackage(4), sd(5).
available at
SD customer web site at
swpackage(1M)