swpackage - package distribution
swpackage [-p][-f file][-s psf][-x option=value][-X options_file]
[software_selections][@ targets]
The swpackage utility packages files from the local host into software objects that can be managed by the utilities in this Software Administration specification using the definitions from a PSF. The swpackage utility packages software into distributions that can be installed, copied or otherwise distributed or managed.
The swpackage utility supports the following options. Where there is no description, the description inCommon Definition for Utilities applies.
- -f file
- -p
- -s psf
This option specifies the pathname of the PSF which describes the details of the packages that swpackage operates on.
- -x option=value
- -X options_file
The swpackage utility supports the software_selections and targets operands described inCommon Definition for Utilities with one exception. The utility may support only a single, local distribution target.If no software_selections are provided, all software described by the PSF is selected.
Whether data on an existing target distribution in serial format is overwritten or merged is implementation defined.
SeeCommon Definition for Utilities for descriptions of external influences common to all utilities.Extended Options
The swpackage utility supports the following extended options. The description in
Common Definition for Utilities applies.
- distribution_target_directory=implementation_defined_value
- distribution_target_serial=implementation_defined_value
- enforce_dsa=true
- follow_symlinks=false
- logfile=implementation_defined_value
- loglevel=1
- media_capacity=0
- media_type=directory
- psf_source_file=psf
- reinstall_files=false
- reinstall_files_use_cksum=true
- software=
- verbose=1
Product Specification File
SeeCommon Definition for Utilities .
The swpackage utility consists of three phases:
- Selection Phase
- Analysis Phase
- Execution Phase
Selection Phase
- Specifying Targets
The target selection differs from the general information in
Common Definition for Utilities , in that there may be only one target. If the target is a serial distribution, swpackage sets default tape types and sizes as described in the "extended options" description in this man-page definition.
- Specifying the Source
The source selection differs from the general information in section
Common Definition for Utilities , in that the source is a PSF, instead of a distribution. Hence there are no access control events for accessing the PSF.The selection phase reads (and parses) the PSF to obtain the information from the source PSF.
If the file parsing discovers syntax errors, or missing but required attributes, generate an event.
- The product, subproduct, and fileset structure
- The files contained in each fileset
- The attributes associated with these objects.
[SW_ERROR: SW_SOURCE_ACCESS_ERROR]
- Software Selections
If there are no software selections specified, then all software from the PSF is processed. Otherwise, each selection added to the selected software list must satisfy the following validation checks. If any of these checks result in an error, the selection is not added to the list.
- If the selection is not available from the PSF, generate an event.
[SW_ERROR: SW_SELECTION_NOT_FOUND]
- if a unique version can not be identified, generate an event.
[SW_ERROR: SW_SELECTION_NOT_FOUND_AMBIG]
Analysis Phase
The package analysis phase follows the following steps:
Checks the dependency specifications for irregularities (such as circular prerequisites or missing dependencies).
(SW_WARNING: SW_DEPENDENCY_NOT_MET)
- Before a new storage directory is created, swpackage checks to see if this product version has the same identifying attributes as an existing product version, namely the same tag, revision, architecture, and vendor_tag. If all the identifying attributes match, then the user is repackaging (modifying) an existing version. Note if a fileset within that product is being repackaged by generating an event.
[SW_NOTE: SW_SAME_REVISION_INSTALLED]
- Checks existence and attributes of the control_files and files that the PSF defines. If any are missing, generate an event.
[SW_ERROR: SW_FILE_NOT_FOUND]
- Check that there is enough free disk space on the target file system to package the selected products. If enforce_dsa=true, generate an event.
[SW_ERROR: SW_DSA_OVER_LIMIT]If enforce_dsa=false, generate an event.
[SW_WARNING: SW_DSA_OVER_LIMIT]
Execution Phase
The execution phase packages the source files and information into a product, and create/merge the product into the target distribution.
When creating a serial distribution, an implementation must support one or both of POSIX.1 extended cpio or extended tar archive formats. Whether an implementation supports writing both archive formats or only one, and which format is supported if only one, is implementation defined.
When packaging a product, the storage directory within the target distribution is created/updated directly by swpackage. For each unique version of the product, a directory is created using the defined product.tag attribute and a unique sequence number for all the product versions which use the same tag as specified in
Software Packaging Layout .The swpackage command generates certain attributes as specified in
Software Definition File Format .More complex rules apply when packaging attributes that inherit from the product to the fileset level. The filesets and is_locatable attributes are updated only by swpackage and swmodify. When packaging, the value of the filesets attribute is set to include all the filesets in the PSF, plus any others that exist in the distribution already but are not in the PSF. In the latter case, the user is warned that the PSF is not complete.
If undefined, the product.is_locatable attribute is set by swpackage if any of the filesets in the filesets list are locatable. If none of the filesets are locatable, or if that cannot be determined, then the value of the product.is_locatable attribute is set to false . If defined, the product.is_locatable attribute is used to define the value of the is_locatable attribute for any filesets that do not have is_locatable defined. If the value of the is_locatable attribute is defined at both the product and fileset level, then the fileset definition overrides the product definition.
Certain errors can occur when packaging the files:
- If a file can not be added to the distribution for any reason, generate an event.
[SW_ERROR: SW_FILE_ERROR]
Just as is done for swcopy, swpackage will support the reinstall_files and reinstall_files_use_cksum options. The semantics are the same.
When packaging a sparse fileset, only the files contained within the sparse fileset are included in the package definition. If an ancestor is not defined, then this sparse fileset can be applied to any fileset with the same tag, product tag, architecture, vendor_tag, and with a lower revision.
The swpackage utility returns:
- 0
- The products specified in the PSF were successfully packaged onto the media.
- 1
- An error occurred in parsing the PSF. The media was not modified.
- 2
- An error during the packaging operation. The media has been modified. Review the log file for details.
SeeCommon Definition for Utilities .
Contents | Next section | Index |