 |
» |
|
|
 |
SD uses a Product Specification File (PSF) to define the physical
product package. The PSF provides a "road map"
that identifies the product according to its attributes, contents,
compatibilities, dependencies and descriptions.
The PSF drives the swpackage
session. It describes how the product is structured and defines
the attributes that apply to it. The PSF can: Define vendor information (optional)
for groups of products (including all products), or for individual
products. Specify one or more products (required). For each product, define attributes for one or more
subproducts (optional), filesets (required), and files (required). Define attributes for the distribution depot/media
(optional). Specify what computer(s) and operating system(s)
the product supports. Define attributes that describe the software objects.
Product Specification File Examples |  |
Here is a portion of a typical PSF; it describes the SD product:  |
# PSF which defines an example product. depot layout_version 1.0 # Vendor definition: vendor tag HP title Hewlett-Packard Company description < data/description.hp category tag system_mgt title Systems Management Applications description These are the system management applications revision 1.0 end # Product definition: product tag SD revision A.01.00 architecture HP-UX_B.11_32/64 vendor_tag HP is_patch false title HP OpenView Software Distributor number B1991A category_tag system_mgt description < data/descr.sd copyright < data/copyr.sd readme < data/README.sd machine_type * os_name HP-UX os_release ?.11.* os_version ? directory / is_locatable false # Create a product script which executes during the swremove # analysis phase. (This particular script returns an ERROR, # which prevents the removal of the SD product.) checkremove scripts/checkremove.sd # Subproduct definitions: subproduct tag Manager title Management Utilities contents commands agent data man end subproduct tag Agent title Agent component contents agent data man end
|
 |
 |
# Fileset definitions: fileset tag commands title Commands (management utilities) revision 2.42 description < data/descr.commands # Dependencies corequisites SD.data corequisites SD.agent # Control files: configure scripts/configure.commands # Files: directory ./commands=/usr/sbin file swinstall file swcopy . . . directory ./nls=/usr/lib/nls/C file swinstall.cat file swpackage.cat directory ./ui=/var/adm/sw/ui file * . . . end # commands # other filesets . . . fileset tag man title Manual pages for the Software Distributor revision 2.05 directory ./man/man1m=/usr/man/man1m.Z file * directory ./man/man4=/usr/man/man4.Z file * directory ./man/man5=/usr/man/man5.Z file * end #man end #SD |
From the above example, the packager can get all the information
needed to package the product properly into a distribution depot. PSF Syntax |  |
Each
SD object (product, subproduct, filesets, and file) has its own
set of attributes and each attribute has
a keyword that defines it. Most attributes
are optional; they do not all need to be specified in the PSF. Each
attribute has its own specific requirements, but the following rules
apply: All keywords require one or more values, except
as noted. If the keyword is there but the value is missing, a warning
message is generated and the keyword is ignored. Place comments on a line by themselves or after
the keyword-value syntax. Comment lines
are designated by preceding them with #. Use quotes when defining a value (for example, description)
that can span multiple lines. Quotes are not required when defining
a single-line value that contains embedded whitespace. Any errors encountered while reading the PSF cause
swpackage to terminate. Errors
are also logged to both stderr
and the logfile.
The following tables and sections describe the PSF keywords,
the allowable values for each keyword, and the syntax for the objects
you can define in a PSF. Keywords marked with a + apply
to products only. Keywords marked with a - apply to bundles only.
Keywords marked with a * are of the version_component
type, as well as the type indicated in the table. Table 10-1 Keywords
Used in the Product Specification File Keyword | Value | Size (bytes | Example |
|---|
| Distribution Class | | | | distribution layout_version
tag
copyright description
number
title end | revision_string tag_string multi_line_string multi_line_string one_line_string one_line_string
| 64 64 8 k 8
k 64 256
| 1.0 EXAMPLE_DEPOT < data/copyr.depot data/descr.depot
B2358-13601 Example packages
| | Vendor Class | | | | vendor tag
description title
end | tag_string multi_line_string one_line_string
| 64 8 k 256
| HP <data/desc.hp Hewlett-Packard Co.
| | Category Class | | | | category tag description
revision title
end | tag_string multi_line_string revision_string one_line_string
| 64 8k 64 256
| patch_normal
For normal problems 0.0 Category of Patches
| Product Class | | | | product or bundle *tag *architecture category_tag -contents copyright description directory is_locatable is_patch machine_type number os_name os_release os_version +postkernel +readme +revision +share_link title *vendor_tag
end | tag_string one_line_string one_line_string repeatable
list of software specs multi_line_string multi_line_string path_string boolean boolean uname_string one_line_string uname_string uname_string uname_string path_string multi_line_string revision_string one_line_string one_line_string tag_string
| 64 64 256 8
k 8 k 8 k 8 k 1 k 9 9 64 64 64 64 64 255 1
M 64 256 256 64
| SD
HP-UX_B.11.00_32/64 Systems Management pr.fs,r=1.0,a=,v= <data/copyr.sd <data/descr.sd / false false * B1998A HP-UX ?.11.* ? /usr/bin/kernel_build <data/README.sd A.01.00 Software Distributor
HP
| Subproduct Class | | | | subproduct
tag contents description
title
end | tag_string one-line
list of tag string values multi_line_string one_line_string
| 64 8
k 256
| Manager
commands agent data data man <data/desc.mgr Management Utilities
| Fileset Class | | | | fileset
*tag ancestor architecture category_tag corequisite description is_kernel is_patch is_reboot is_sparse machine_type os_name os_release os_version prerequisite *revision supersedes title
end | tag_string repeatable
list of product. fileset revision_string tag_string software_spec multi_line_string boolean boolean boolean boolean uname_string uname_string uname_string uname_string software_spec
revision_string software_spec one_line_string
| 64 80 64 8
k 9 9 9 9 64 64 64 64 64 8192 256
| commands product.oldfileset oldproduct.fileset HP-UX_B.11.00_32/64 patch_normal SD.man.r>=2.0 <data/descr.cmd false false false false- * HP-UX ?.11.* ? SD.agent,r>=2.0 2.42 product.fileset,
fr=revision SD Commands
| control_files
Class | | | | control_files directory exrequisites
file_permissions
file
end | path_mapping_string software_spec permission_string file_specification
| | ./commands=/usr/sbin SD.man.r>=2.0 -u
0222 -o root -g sys -m 04555 bin/swinstall (or) *
|
Table 10-2 Control File
Attributes | Keyword | Type | Size | Example | checkinstall checkremove
configure control_file postinstall postremove preinstall
preremove request unconfigure
unpreinstall unpostinstall verify
| path_string path_string path_string path_string path_string path_string path_string path_string path_string path_string path_string path_string path_string | 1 k 1 k 1 k 1
k 1 k 1 k 1 k 1 k 1
k 1 k 1 k 1 k 1 k | ./scripts/checkinstall ./scripts/checkremove
./scripts/configure ./scripts/subscripts ./scripts/postinstall ./scripts/postremove ./scripts/preinstall ./scripts/preremove ./scripts/request ./scripts/unconfigure ./scripts/unpreinstall ./scriipts/unpostinstall ./scripts/verify
|
Selecting the PSF Layout Version |  |  |  |  | NOTE: PSF syntax conforms to the layout_version=1.0
of the IEEE Standard 1387.2: Software Administration(POSIX). Previous
versions of SD supported the POSIX layout_version=0.8
syntax, which continues to be supported. |  |  |  |  |
You can select the layout version in the depot
definition in the PSF (see “Product Specification File Semantics” below) or with the layout_version
option for swpackage, swmodify,
swcopy, or swlist. Differences between the two layout versions include the following: The vendor is handled differently. For the current standard (layout_version=1.0),
each vendor class definition is
associated only with subsequent products or bundles that contain
a vendor_tag
attribute that matches the tag
attribute within the vendor class definition. For the previous standard (layout_version=0.8)
or if you do not specify a layout_version,
products or bundles are automatically associated with the last vendor
class you defined at the distribution level, or from a vendor that
you define within the product or bundle. Explicitly defined vendor_tag
attributes (with or without a value) take precedence. The corequisites
and prerequisites
have singular titles for layout_version=0.8
(that is, corequisite
and prerequisite).
(See “Dependency Specification ” below.) Category objects and keywords are handled differently. For layout_version=1.0
(current standard): category_tag
is a valid product attribute that replaces the category
and category_title
attributes. You can define category
class objects.
For layout_version=0.8
(previous standard: category
and category_title
are valid product attributes that replace the category_tag
attribute. category
class objects are not recognized.
For a more complete description of PSF requirements for layout_version=0.8,
refer to the swpackage.4 manual page in a
previous version of HP-UX. The values for each attribute keyword in your PSF must be
of a specific type discussed below.  |  |  |  |  | NOTE: PSF syntax conforms to the layout_version=1.0
of the POSIX 1387.2 Software Administration standard. Previous versions
of SD supported the POSIX layout_version=0.8
syntax, which continues to be supported. See “Selecting the PSF Layout Version” above for more information. |  |  |  |  |
Value Parameters - boolean
One of the values "true" or "false".
- file_specification
Explicitly specifies a file or directory to be packaged,
using the format: [-m mode] [-o
[owner[,]] [uid]]
[-g [group[,]][gid]]
[-v][source] [destination] The source and destination can be paths relative
to source and destination directories specified in the path_mapping_string. You can also use * to include
all files below the source directory specified by a directory keyword. Examples: -m 04555 sbin/swinstall
or * (to denote all files and directories)
- multi_line_string
Maximum length: 8 kbyte (1Mbyte for
a readme file) Multi-line strings support all isascii()
characters. They represent one or more paragraphs of text. They
can be specified in-line, surrounded by double-quotes. They can
also be stored in a file, and specified using the syntax: < filename Example: </mfg/sd/description
- one_line_string
Maximum length: 256 bytes One-line strings support a subset of isascii
characters only. No isspace characters, except
for space and tab, are allowed. Examples: Hewlett-Packard Company
- path_mapping_string
A value of the form: source[=destination]
where the source defines the directory
in which subsequently defined files are located. The optional destination
maps the source to a destination directory in which the files will
actually be installed. Examples: /mfg/sd/files/usr = /usr
- path_string
Maximum length: 255 bytes
for tapes, 1024 bytes for depots An absolute or relative path to a file. Many attributes
of this type are restricted to 255 bytes in length. This restriction
is due to the tar(1) command, which requires
a file's basename(1) be
<= 100 bytes, and a file's dirname(1)
to be <= 155 bytes. (Some implementations of tar
enforce < and not <=.) Examples: /usr /mfg/sd/scripts/configure
- permission_string
A value of the form: [-m mode|-u
umask] [-o [owner[,]][uid]]
[-g [group[,]][gid]] where each component defines a default permissions value for
each file and directory defined in a fileset. The default values
can be overridden in each file's specific definition. The
owner and group fields are of type tag_string.
The uid and gid fields are of type unsigned integer. The mode and
umask are unsigned integers, but only supports the octal character
set: "0"-"7". Examples: -u 0222 -o
root -g sys
- revision_string
Revision strings contain zero or more dot-separated
one_line_string (above).
- software_specification
Software specifications are used to specify software
in dependencies, ancestors and other attributes, as well as command
line selections. The SD commands and attributes support the following
syntax for each software_specification: bundle[.product[.subproduct][.fileset]][,version] or product[.subproduct][.fileset][,version] The version component has the form: [,r <op>
revision] [,a <op>
arch] [,v <op>
vendor] [,c <op>
category] [,l=location]
[,fr <op>
revision] [,fa <op>
arch] location
applies only to installed software and refers to software installed
to a location other than the default product directory. fr and fa
apply only to filesets. The <op> (relational
operator) component can be of the form: ==, >=, <=, <
, >, or !=, which perform individual comparisons on dot-separated
fields. For example, r>=B.10.00 chooses all
revisions greater than or equal to B.10.00. The
system compares each dot-separated field to find matches. Shell
patterns are not allowed with these operators. The = (equals) relational operator
lets you specify selections with the shell wildcard and pattern-matching
notations: [ ], * , ?,
and ! For example, the expression r=1[01].*
returns any revision in version 10 or version 11. All version components are repeatable within a single
specification (e.g. r>=A.12, r<A.20).
If multiple components are used, the selection must match all components. Fully qualified software specs include the r=,
a=, and v= version components
even if they contain empty strings. No space or tab characters are allowed in a software
selection. The software instance_id
can take the place of the version component. It has the form: [instance_id]
within the context of an exported catalog, where instance_id is
an integer that distinguishes versions of products and bundles with
the same tag. Examples: SD.agent or SD,r=2.0,a=HP-UX_B.11.00_32
- tag_string
Tag strings support a subset of isascii()
characters only: Requires one or more characters from:
"A-Z", "a-z", "0-9",
including the first character. The isspace() characters are
not allowed. SDU metacharacters not allowed: . , : = Shell metacharacters not allowed: # ; & () {} | < > Shell quoting characters not allowed: " ` ' \ Directory path character not allowed: /
- uname_string
Uname strings containing a subset of isascii()
characters only. No isspace() characters
are allowed. Shell pattern matching notation allowed: [ ] * ?
! Patterns can be "ORed" together
using the separator: | Examples: 9000/7*:*|9000/8*:*,
HP-UX, ?.11.*
Product Specification File SemanticsThe following sections describe how to specify a PSF and defines
keywords. Distribution (Depot) SpecificationDistribution attributes are designed for distribution tapes
and CD-ROMs to allow you to list information about the media (that
is, find out what media it is). The distribution (tape) specification for a PSF looks like
this: distribution layout_version 1.0 tag APPLICATIONS_CD copyright < data/copyright.cd description <data/description.cd number B2358-13601 title HP-UX Applications Software Disk [<vendor specification>] optional <product specification> required [<product specification>] optional . . . end |
Each keyword above defines an attribute of a distribution
depot. The distribution
keyword is always required; all other attributes are optional. Keyword Definition - distribution or depot
Keyword that begins the distribution specification. Each keyword
defines an attribute of the distribution depot or tape itself. All
keywords are optional, even if a distribution specification is included
in a PSF. - layout_version
PSF syntax conforms to the layout_version=1.0
of the POSIX 1387.2 Software Administration standard. Previous versions
of SD supported the POSIX layout_version=0.8
syntax, which continues to be supported. (You can also select the
layout version with the layout_version
option for swpackage, swmodify,
swcopy,
or swlist.)
See “Selecting the PSF Layout Version” for
more information. - tag
The short name of the target depot (tape) being
created/modified by swpackage. - copyright
The text (or a pointer to a filename) for the copyright
information for the depot's contents. - description
The description of the target depot; either the
text itself or a pointer to a filename that contains the text. - number
The part or manufacturing number of the distribution
media (CD or tape depot). - title
The full name of the target depot (tape) being created/modified
by swpackage. - end
Ends the distribution specification, no value is
required. This keyword is optional. If you use it and it is incorrectly
placed, the specification will fail.
The vendor attributes let you add a description to the PSF. The layout_version
defined for the PSF file determines how vendor specifications are
associated with products and bundles. If a layout_version
is not defined or is defined as 1.0, vendor specifications will
be associated with all subsequent products and bundles that define
a matching vendor_tag attribute.
If a layout_version of 0.8 is specified,
all subsequent products and bundles will automatically be assigned
to a vendor_tag from the last vendor
object defined at the distribution level, if any, or from a vendor
object defined within a product or bundle, unless a vendor_tag
is explicitly defined.
The following is an example of a vendor specification:
vendor tag HP description < data/description.hp title Hewlett-Packard Company end
|
Each keyword defines an attribute of a vendor object. If a vendor
specification is included in the PSF, swpackage requires the vendor
and tag keywords. - vendor
Keyword that begins the vendor specification.
- tag
Defines the identifier (short name) for the vendor. - title
Defines the full name (one line description) for
the vendor. - description
Defines the multi-paragraph description of the vendor;
the value is either the text itself (within double-quotes) or a
pointer to the filename containing the text. - end
Ends the vendor specification. This keyword is optional.
A software collection can contain a list of category objects
that are used as a selection mechanism. Category objects are identified
by the keyword "category" and contain additional
information about the category. The category_tag
attribute points to a particular category object and can appear
anywhere within a product, bundle, subproduct, or fileset. All sofware objects with the attribute of is_patch
set to "true" are automatically assigned a category
of "patch." The category specification looks like this: category tag patch_normal title Category of patches description For normal problems revision 0.0 end |
Each keyword defines an attribute of the category object.
If a category specification is included in the PSF, swpackage
requires only the category
and tag keywords. Keyword Definition - category
Keyword that begins the category specification. - tag
The category short name identifier. Associates this
object with a product or bundle. This tag
attribute must match the category_tag
attribute in the product or bundle. - title
A one-line string that defines the full name for
the category. - description
A multi-line description of the category. The description
value can consist of text or a filename for a text file. - revision
The revision information (release number, version).
Determines which category object definition to maintain in a depot
when a definition being installed or copied does not match a definition
already in the depot with the same category tag. - end
An optional keyword that ends the specification.
No value is required. If you place this keyword incorrectly in the
PSF, the specification will fail.
Product or Bundle Specification The product specification is a required class in the PSF.
It lets you identify the product you are packaging. The product specification looks like this: product tag SD architecture HP-UX_B.11.00_32/64 category_tag systems_management - contents prod.fsl,r=1.0,a=,v= copyright </mfg/sd/data/copyright description </mfg/sd/data/description directory /usr is_locatable false is_patch false machine_type * number J2326AA os_name HP-UX os_release ?.11.00.* os_version [A-Z] postkernel /usr/lbin/kernel_build + readme </mfg/sd/data/README revision 2.0 title Software Distributor vendor_tag HP + [<vendor specification>] optional + [<subproduct specification>] optional + <fileset specification> required + [<fileset specification>] optional . . . end |
For each product object specified, swpackage
requires only the product
and tag keywords,
plus one or more contained fileset definitions. For each bundle
specified, swpackage requires the bundle,
tag and contents
keywords. Keyword Definition - product
Required keyword that begins the product specification. - tag
The product's identifier (short name). - architecture
The UNIX target system on which the product or bundle
will run. Provides a human-readable summary of the four uname
attributes (machine_type, os_name,
os_release and os_version),
which define the exact target system(s) the product supports. - bundle
Required keyword that begins the bundle specification. - category_tag
A repeatable tag-based attribute identifying a set
of categories of which the software object is a member.
This is used as a selection mechanism and can be used independent
of patches. The default value is an empty list or patch
if the is_patch attribute is set
to true. Like vendor_tag,
this attribute can be used as a pointer to a category object that
contains additional information about the category (for example,
a one-line title definition and a description of the category).  |  |  |  |  | NOTE: The category tag patch
is reserved. When the is_patch
product attribute is set to true, a built-in
category_tag
attribute of value patch
is automatically included with the product definition. |  |  |  |  |
- contents
The list of fully qualified
(all version distinguishing attributes included) software specs
for the bundle. - copyright
A multi-line description of the product's copyright;
either the text itself (in double quotes) or a pointer to the filename
that contains the text. - description
A multi-paragraph description of the product; either
the text itself (within double-quotes) or a pointer to the filename
that contains the text. - directory
The default, absolute pathname to the directory
in which the product's files will be installed (the root
directory of the product). If not specified, swpackage
assigns a value of /. - is_locatable
Defines whether a product or bundle
can be installed to any product directory, or whether it must be
installed into a specific directory. The attribute can be set to
true or false.
If not defined, swpackage sets
the default attribute to "false." - is_patch
A boolean flag that identifies a software object
as a patch. The default value is false.
When set to true, a built-in category_tag
attribute of value patch
is automatically included with the product definition. - machine_type
The machine type on which the product will run.
If not specified, the keyword is assigned a wildcard value of *,
meaning it will run on all machines. If there are multiple machine
platforms, you must separate each machine designation with a |
(vertical bar). For example, a keyword value of 9000/7*|9000/8*
means the product will run on all HP Series 9000 Model 7XX or all
HP 9000 Series 8XX machines. Alternatively, the value 9000/[78]*
would also work. Other examples: - *
If not concerned with the machine type. - 9000/7??:32*
Series 700, 32-bit capable hardware required. - *:*64
64-bit capable hardware required. - *:32:
32-bit capable harware required. - 9000/7??:*64
Series 700, 64-bit capable hardware required. - 9000/[68]??:32*
Series 800, 32-bit capable hardware required. - 9000/[68]??:*64
Series 800, 64-bit capable hardware required.
The value is matched against a UNIX target's uname -m [: getconf _CS_HW_CPU_SUPP_BITS
result. - number
The part or order number of the product. - os_name
The operating system name on which the product will
run. If not specified, the attribute is assigned a value of *,
meaning it will run on all operating systems. If there are multiple
operating systems, use wildcards or the | symbol to separate
them. The value is matched against a UNIX target's uname -s [: getconf _CS_KERNEL_BITS result. - os_release
The release number of the product's operating system.
If not specified, the attribute is assigned a value of *,
meaning it will run on all operating systems. If there are multiple
operating systems, use wildcards or the | symbol to separate
them. The value is matched against a UNIX target's uname -r
result. - os_version
The version number of the operating system(s) on
which the product will run. If not specified, the attribute is assigned
a value of *,
meaning it runs on any version. If there are multiple operating
systems, use wildcards or the | symbol to separate them.
The value is matched against a UNIX target's uname -v
result. - readme
A text file of the README information for the product.
The value must be a pointer to the filename containing the text - revision
The revision information (release number, version)
for the product or bundle. - title
A one-line string that further identifies the product
or bundle. - vendor_tag
Associates this product or bundle with a vendor
object defined separately in the PSF, if that object has a matching
tag attribute. - end
Ends the product or bundle specification. No value
is required. This keyword is optional. If you use it and it is incorrectly
placed, the specification will fail.
The subproduct specification lets you group filesets within
a larger product specification. Subproducts are optional.
A subproduct specification looks like
this: subproduct tag Manager contents manager agent packager man doc description </mfg/sd/data/manager/description title SD Management Interfaces Subset end |
Each keyword defines an attribute of a subproduct object.
If a subproduct object is specified, swpackage
requires the subproduct, tag,
and contents
keywords. Keyword Definition - subproduct
Keyword that begins a subproduct specification. - tag
The subproduct's identifier (short name). - contents
A whitespace-separated list of the subproduct's
fileset tag values (that is, contents
fileset fileset fileset fileset...). In the PSF, fileset definitions are not contained within subproduct
definitions. The contents keyword is used
to assign filesets to subproducts. This linkage allows a fileset
to be contained in multiple subproducts. - description
A multi-line description of the subproduct; either
the text itself (within double-quotes), or a pointer to the filename
that contains the text. - title
A one-line string that further identifies the subproduct. - end
Ends the subproduct specification. No value is required.
This keyword is optional. If you use it and it is incorrectly placed,
the specification will fail.
The fileset specification is required in the PSF. Use filesets
to group files together. A fileset specification looks like this: fileset tag manB ancestor OLDSD.MAN architecture HP-UX_B.11.00_32/64 category_tag manpg description </mfg/sd/data/man/description is_kernel false is_patch false is_reboot false is_sparse false machine_type * os_name HP-UX os_release ?.11.00.* os_version ? revision 2.40 supersedes product.fileset,fr=revision title Commands (management utilities) [<control script specification>] optional . . . [<dependency specification>] optional . . . <file specification> required [<file specification>] optional . . . end |
Each keyword defines an attribute as a fileset object. For
each fileset object specified, swpackage
requires the fileset
and tag keywords,
plus zero or more file specifications. Keyword Definition - tag
The fileset identifier (short name). - architecture
Describes the target system(s) on which the fileset
will run if filesets for multiple architecture are included in a
single product. Provides a human-readable summary of the four uname(1)
attributes which define the exact target system(s) the product supports.
Many filesets do not include an architecture; only a product architecture
need be defined. - ancestor
A list of filesets that will match the
current fileset when installed on a target system, if the match_target
installation option is specified. Also designates an ancestor fileset
to check for when patch_match_target is defined. - category_tag
A repeatable tag-based attribute identifying a set
of categories of which the software object is a member.
This is used as a selection mechanism and can be used independent
of patches. The default value is an empty list or patch if the is_patch
attribute is set to true.Like vendor_tag,
this attribute can be used as a pointer to a category object that
contains additional information about the category (for example,
a one-line title definition and a description of the category).  |  |  |  |  | NOTE: The category tag patch
is reserved. When the is_patch
file attribute is set to true, a built-in
category_tag
attribute of value patch
is automatically included with the file definition. |  |  |  |  |
- description
Defines the multi-paragraph description of the fileset;
the value is either the text itself (within double-quotes) or a
pointer to the filename containing the text. - is_kernel
A value of true
defines the fileset as being a contributor to the operating system
kernel; the target system(s) kernel build process will be invoked
after the fileset is installed. If this attribute is not specified,
swpackage assumes a default value of false. - is_patch
Identifies a software object as a patch. The default
value is false. When set to true,
a built-in category_tag attribute of value patch
is automatically included. - is_reboot
A value of true
declares that the fileset requires a system reboot after installation.
If this attribute is not specified, swpackage
assumes a default value of false. - is_sparse
Indicates that a fileset contains only a subset
of files in the base (ancestor) fileset and that the contents are
to be merged with the base fileset. The default value is false.
If the is_patch attribute is true,
is_sparse is also set to true
for the fileset, although it can be forced to false. - machine_type
The machine type on which the product will run.
If not specified, the keyword is assigned a wildcard value of *,
meaning it will run on all machines. If there are multiple machine
platforms, you must separate each machine designation with a |
(vertical bar). For example, a keyword value of 9000/7*|9000/8*
means the product will run on all HP Series 9000 Model 7XX or all
HP 9000 Series 8XX machines. Alternatively, the value 9000/[78]*
would also work. Other examples: - *
If not concerned with the machine type. - 9000/7??:32*
Series 700, 32-bit capable hardware required. - *:*64
64-bit capable hardware required. - *:32:
32-bit capable harware required. - 9000/7??:*64
Series 700, 64-bit capable hardware required. - 9000/[68]??:32*
Series 800, 32-bit capable hardware required. - 9000/[68]??:*64
Series 800, 64-bit capable hardware required.
The value is matched against a UNIX target's uname -m [: getconf _CS_HW_CPU_SUPP_BITS
result. - os_name
Defines the operating system(s) on which the files
will run if a fileset architecture has been defined. (If not specified,
swpackage assigns a value of *, meaning the files
run on all operating systems.) If there are multiple operating systems,
use wildcards or use the '|' character
to separate them. This attribute should pattern match to the value
of uname -s [: getconf KERNEL_BITS] on
the supported target system(s). - os_release
Defines the operating system release(s) on which
the files will run. (If not specified, swpackage
assigns a value of *, meaning the files run on all releases.) If
there are multiple operating system releases, use wildcards or use
the '|' character to separate them. This
attribute should pattern match to the value of uname -r
on the supported target system(s). - os_version
Defines the operating system release(s) on which
the files will run. (If not specified, swpackage
assigns a value of *, meaning the files run on all releases.) If
there are multiple operating system releases, use wildcards or use
the '|' character to separate them. This
attribute should pattern match to the value of uname -r
on the supported target system(s). - revision
Defines the revision (release number, version number)
of the fileset. - supersedes
Used when a patch is replaced by (or merged into)
a later patch. The attribute indicates which previous patches are
replaced by the patch being installed or copied. This attribute
value is a list of software specifications of other patches that
this patch supersedes. - title
Defines the full name (one-line description) of
the fileset. - end
Optional keyword to end the fileset specification.
No value is required. If you place this keyword incorrectly, the
file specification will fail.
Control Script Specification SD supports execution of product and fileset control scripts
that allow you to perform additional checks and operations beyond
those supported by SD. The swinstall,
swconfig, swverify,
and swremove commands each
execute one or more vendor supplied scripts. All these scripts are
optional. For a complete description of control scripts and guidelines
for their use, see Chapter 11 “Using Control Scripts ” Within a fileset specification, you
can specify the following file types to be packaged into the fileset
by swpackage: swpackage generates an
error if the PSF contains an unrecognized or unpackageable file
type. The swpackage command
supports specific mechanisms for specifying the files contained
in a fileset: Mechanism Operation - default permission specification
For all or some of the files in the fileset, you
can define a default set of permissions. - directory mapping
You can point swpackage
at a source directory in which the fileset's files are located.
In addition, you can map this source directory to the appropriate
(destination) directory in which this subset of the product's files
will be located. - explicit file specification
For all or some of the files in the fileset, you
can name each source file and destination location. - recursive (implicit) file specification
If directory mapping is active, you can simply tell
swpackage to recursively include
all files in the directory into the fileset.
These mechanisms can all be used in combination with the others. Default Permission SpecificationsBy default, a destination file will inherit the mode, owner,
and group of the source file. You can use the file_permissions
keyword to set a default permission mask, owner, and group for all
the files being packaged into the fileset: file_permissions [-m mode| -u umask] [-o [owner[,]] [uid]]\ [-g [group[,]][gid]] |
 |
Specification Operation - file_permissions
This keyword applies only to the fileset in which it is defined.
You can specify multiple file_permissions;
later definitions replace previous definitions. - -m mode
This option defines a default (octal) mode for all
files. - -u umask
Instead of specifying an octal mode as the default,
you can specify an octal umask (1)
value that gets "subtracted" from an existing
source file's mode to generate the mode of the destination file. By specifying a umask,
you can set a default mode for executable files, non-executable
files, and directories. (A specific mode can be set for any file
using -m.) - -o [owner[,]][uid]
This option defines the destination file's owner name and/or
or uid. See the discussion of the -o
option in “Explicit File Specification ” for
more information. - -g [group[,]][gid]
This option defines the destination file's group name and/or
or gid. See the discussion of the -g
option in “Explicit File Specification ” for
more information. - -t type
Defines files that need not exist before packaging.
The following examples illustrate the use of the file_permission
keyword. Set a read only 444 mode for all file
objects (requires override for every executable file and directory): file_permissions -m 444 Set a read mode for non-executable files, and a
read/execute mode for executable files and directories: file_permissions -u 222 Set the same mode defaults, plus an owner and group: file_permissions -u 222 -o bin -g bin Set the same mode defaults, plus a uid and gid: file_permissions -u 222 -o 2 -g 2 Set the owner write permission in addition to the
above: file_permissions -u 022 -o 2 -g 2 If you do not define file_permissions,
swpackage uses the default
value file_permissions -u 000
for destination file objects based on existing source files. (Meaning
the mode, owner/uid,
group/gid are set based on the source
file, unless specific overrides are specified for a destination
file.)
(Optional) The directory
source [=
destination]
specification defines the source directory under which subsequently
listed files are located. In addition, you can map the source
directory to a destination directory
under which the packaged files will be installed. For example, the definition: directory /build/hpux/mfg/usr = /usr |
causes files from the /build/hpux/mfg/
directory to have the prefix /usr/sbin
when installed. The destination directory must be a superset of
the product's directory
attribute, if defined in the product specification. If the product's
directory is
defined, and the destination is not a superset, swpackage
generates an error. The destination directory must
be an absolute pathname. If not, then swpackage
generates an error. The source directory can be either
an absolute pathname, or a relative pathname. If relative, swpackage
interprets it relative to the current working directory in which
the command was invoked. If the source directory does not
exist, swpackage generates
an error. Explicit File Specification You can explicitly specify the files to be packaged into a
fileset. If you want to recursively include all files and directories,
use the recursive file specification (file *). You can use the directory
keyword to define a source (and destination) for explicitly specified
files. If no directory
keyword is active, then the full source path and the absolute destination
path must be specified for each file. An explicit file specification
overrides or adds to, on a file-by-file basis, the specifications
set by the directory
and/or file_permissions
keywords. An explicit file specification uses this form: file [-v] [-m mode] [-o [owner[,]][uid]] [-g [group[,]][gid]] [-t type] [source] [destination] |
 |
Specification Operation - file
This keyword specifies an existing file (usually
within the currently active source directory) to include in the
fileset. - source
This value defines the path to a file you want to
include in the package. If this is a relative path, swpackage
will search for it relative to the source directory set by the directory
keyword. If no source directory is active, swpackage
will search for it relative to the current working directory in
which the command was invoked. All attributes for the destination file object are taken from
the source file, unless a file_permission
keyword is active, or the -m,
-o, or -g
options are also included in the file specification. - destination
This value defines the destination path at which
the file will be installed. If destination
is a relative path, the active destination directory set by the
directory keyword will be prefixed to it. If it is a relative path,
and no destination directory is active, swpackage
generates an error. If the destination is not specified, then the
source path is used as the destination, with the appropriate mapping
done with the active destination directory (if any). - -m mode
This option defines the (octal) mode for a file
or directory at its destination. - -o [owner[,]][uid]
This option defines the file's owner name and/or
uid at its destination. If only the owner
is specified, then the owner and uid attributes are set for the
destination file based on the packaging host's. If only the uid
is specified, it is set as the destination's uid and no owner name
is assigned. If both are specified, each sets the corresponding
attribute for the file object. During an installation, the owner attribute is used to set
the owner name and uid, unless the owner name is not specified or
is not defined in the UNIX Target system's /etc/passwd.
In this case, the uid attribute is used to set the uid. - -g [group[,]][gid]
This option defines the file's group name and/or
gid at its destination. If only the group
is specified, then the group and gid attributes are set for the
destination file based on the packaging host's /etc/group.
If only the gid specified, it is set as the destination's gid attribute
and no group name is assigned. If both are specified, each sets
the corresponding attribute for the file object. During an installation, the group attribute is used to set
the group name and gid, unless the group name is not specified or
is not defined in the UNIX Target system's /etc/group.
In this case, the gid attribute is used to set the gid. - -t type
Defines a file of type d (directory),
s (symbolic) or h (hard link)
for files that need not exist before packaging. - -v
This option marks the file as volatile, meaning
it can be modified (that is, deleted) after it is installed without
impacting the fileset. Files that may have their attributes (size, last modified
time, etc.) changed through normal use after they are installed
should be specified in the PSF file as volatile (by specifying -v
on the line defining the file). swverify
will not, by default, check file attributes for files that have
the is_volatile
attribute set to "true" (see the check_volatile
option for swverify).
Error Messages When processing existing files in a source directory, swpackage
identifies the following four kinds of errors: Cannot search directory (permission
denied) Cannot read the file (permission denied) Unsupported file type encountered (source file must
be a control script, regular file, directory, hard link or symbolic
link)
Using Directory and File Keywords The following examples illustrate the use of the directory
and file keywords. Include all files under /build/hpux/mfg
to be rooted under /usr: directory /build/hpux/mfg=/usr file * |
Include only certain files under /build/hpux/mfg/,
to be rooted under /usr
and /var/adm/sw: directory /build/hpux/mfg=/usr file sbin/swinstall file sbin/swcopy . . . directory /build/hpux/mfg=/var/adm/sw file nls/swinstall.cat nls/en_US.88591/swinstall.cat file defaults newconfig/defaults file defaults defaults |
Explicitly list files, no directory mapping specified: file /build/hpux/mfg/usr/bin/swinstall /usr/sbin/swinstall file /build/hpux/mfg/usr/bin/swcopy /usr/sbin/swcopy file /build/hpux/mfg/data/nls/swinstall.cat /var/adm/sw/nls/en_US.88591/swinstall.cat file /build/hpux/mfg/data/defaults /var/adm/sw/newconfig/\ defaults file /build/hpux/mfg/data/defaults /var/adm/sw/defaults |
Use all specification types to include files: directory /build/hpux/mfg/usr=/usr file * directory /build/hpux/mfg/data=/var/adm/sw file defaults newconfig/defaults file /build/hpux/mfg/data/defaults=/var/adm/sw/defaults |
Recursive File Specification The
file *
keyword directs swpackage to
include every file (and directory) within the current source directory
in the fileset. swpackage attempts
to include the entire, recursive contents of the source directory
in the fileset. (Partial wildcarding is not supported, e.g. file dm*
to indicate all files starting with "dm".) All attributes for the destination file object are taken from
the source file, unless a file_permission
keyword is active (this keyword is described below). The user can specify multiple directory source[=destination] file * |
pairs to gather all files from different source directories
into a single fileset. If you do not want to recursively include all files and directories,
use the explicit file specification. The directory
keyword must have been previously specified before the file *
specification can be used. If not, swpackage
generates an error. Error Messages When processing the directory recursively, swpackage
encounters the following errors: Cannot search directory (permission
denied) Cannot read the file (permission denied) Unsupported file type encountered
In addition to being able to specify files as a group (with
file *) for general
attributes, the PSF also allows you to "re-specify"
files within that definition to modify individual
attributes. For example, suppose you wanted to specify all the files in
a fileset which contained 100 files. All these files were to be
recursively "discovered" and packaged into the
fileset. Most of them would have the same owner, group, and mode
(and other file attributes). Out of those 100 files, there might be five that are volatile
(that is, you don't care if they get modified or deleted). So, instead
of listing all 100 files individually, and using the -v
option for the five, you could specify all 100 with file *
and then modify the five individually in their own way: directory source = /product file * file -v 1 file -v 2 file -v 3 file -v 4 file -v 5 |
This also works well for permissions. If nearly all the 100
files above had the same permission attributes, but three should
have a different owner and mode, you could specify: directory source = /product file_permissions -o bin -g bin -m 555 file * file_permissions -o root -g other -m -04555 file 1 file 2 file 3 |
Essentially, this capability combines the recursive file specifications
function with explicit file specification (as described above).
|