fpkg2swpkg(1M) — Hewlett-Packard Company
NAME
fpkg2swpkg − Translate fpkg network media or Product Specification Files (PSFs) to SD swpackage PSFs.
SYNOPSIS
fpkg2swpkg [-m media_type] [-d destination] fpkg_pathname
DESCRIPTION
The fpkg2swpkg command provides a way to translate existing fpkg Product Specification Files (PSFs) and fpkg -format network media into skeleton SD swpackage PSFs. fpkg keywords are converted to swpackage counterparts when available. swpackage keywords with no fpkg counterpart are included but commented out in the swpackage PSF. Manual edits and use of the swpackage(1M) command complete the process of generating a swpackage -format depot from the fpkg information.
Options
fpkg2swpkg supports the following options:
-m media_type
Defines which fpkg media type to convert. Default media_type is psf. The supported media types are:
psf Translate from an fpkg PSF.
network Translate from an fpkg - format network media (netdist server).
Note: the -m option requires the presence of the fpkg command which is only supported on HP-UX systems prior to 10.0.
-d destination
Defines the pathname of the new swpackage PSF. The default destination is ./swpackage.psf.
Operands
The fpkg2swpkg command supports the following syntaxes for fpkg_pathname:
[relative_or_absolute_directory_path/]fpkg_PSF_filename
Example: ./my_psf
/absolute_directory_path/fpkg_netdist_directory_name
Example: /netdist/700
The fpkg source type (file or directory) specified for fpkg_pathname overrides the media_type option. When the fpkg source is a file, fpkg2swpkg performs as described for PSF translation. When the fpkg source is a directory, fpkg2swpkg performs as described for network media translation.
EXTERNAL INFLUENCES
Environment Variables
None
Signals
The fpkg2swpkg command catches the signals SIGQUIT and SIGINIT during initialization and parsing. If these signals are received, fpkg2swpkg prints a WARNING message and exits. All signals are ignored while the swpackage PSF is being built to ensure the integrity of the new PSF.
OPERATION
PSF translation
When the fpkg source is a PSF, fpkg2swpkg performs a line-by-line translation of the fpkg PSF.
Network media translation
When the fpkg source is a directory, fpkg2swpkg first calls fpkg -r to create an fpkg PSF from the indicated fpkg -format network media. The command then performs a line-by-line translation of the newly generated fpkg PSF.
Keyword Mappings
The following table summarizes fpkg keywords and their swpackage counterparts. Comments regarding keyword translation are included where necessary.
| fpkg Keyword | Description | swpackage Keyword | Level |
| pn, partition_name | name given to a logical grouping of filesets | tag | subproduct |
| pd, partition_description | partition/subproduct description | title | subproduct |
| fn, fileset_name | fileset name | tag | fileset |
| fd, fileset_description | fileset description | title | fileset |
| fv, fileset_version | fileset revision level | revision | fileset |
| ff, fileset_flags: | |||
| B | kernel fileset | is_kernel, is_reboot | fileset |
| C | fileset is not locatable | is_locatable (set to TRUE when no fileset in the partition has a "C" flag) | fileset |
| Y | run rmfn before loading a fileset with the same name | not avail. in SD | |
| D | run the fileset’s customize script after all filesets are loaded | not available in SD | |
| H | fileset is compatible only with HPPA-RISC architecture machines | assumed - no swpackage keyword | |
| M | fileset is compatible only with MC-680x0 [Series300/400] machines | not applicable - SD runs on Series 700/800 machines only | |
| dep, fileset_dependency | fileset(s) on which this fileset has a run-time dependency | corequisite (includes the product name) | fileset |
| copyright | path to fileset copyright file stored at the swpackage product level | copyright | product |
| customize | path to fileset configuration script | configure (not guaranteed to work) | fileset |
| decustomize with the check option | path to fileset unconfiguration script, prevent removal option | checkremove (not guaranteed to work) | fileset |
| decustomize | path to fileset unconfiguration script | unconfigure (not guaranteed to work) | fileset |
| ffperm, fileset_file_permission | permissions for all files in the fileset | file_permissions | fileset |
| pr, pseudo_root | directory where source files are located | directory | fileset |
| F, Files | file name(s): recursive (*) or individual <name> | file [* or <name>] | fileset |
The following fpkg keywords do not have swpackage counterparts. The fpkg2swpkg command issues a warning to indicate that the fpkg keyword is ignored.
| fpkg Keyword | Description |
| sys, system_architecture_type | system architecture type |
| is, instruction_set | instruction set |
| fdperm, fileset_directory_permission | fileset directory permission |
| CDFinfo | control_file for CDF clusters |
| systemfile | control_file to locate system files |
| media_format | media format version |
| media_order order | filesets are written to tape |
The following swpackage keywords have default settings. These defaults cannot be changed within fpkg2swpkg but can be edited manually in the new PSF.
| SD Level.Keyword | Default Setting | Description |
| vendor.tag | HP | short vendor identifier |
| vendor.title | "Hewlett-Packard Company" | full vendor name |
| product.tag | HP-UX10 | short product identifier |
| product.title | "HP-UX update(1M) translated fileset" | full product name |
| product.architecture | HP-UX_B.10.00_700/800 | supported hardware and operating systems |
| product.machine_type | 9000/[678]?? | supported machine types (uname -m) |
| product.os_name | HP-UX | supported operating systems (uname -s) |
| product.os_release | ?.10.* | supported operating system releases (uname -r) |
Fileset Dependencies
All update(1M) dependencies translate to Software Distributor (SD) corequisites. The swpackage corequisite keyword contains the fully-qualified software specification including the product revision number. The fileset revision number, which was used in update, is not included. The revision number can be changed manually if necessary.
update Script Handling
The fpkg2swpackage command writes SD control scripts which are wrappers calling the update customize and decustomize scripts. This method of script conversion is not preferred and is not guaranteed to work. Nothing but the most trivial scripts will execute correctly in SD environments without manual conversion.
The pathname to the update script, used by the SD control script, varies with the type of the fpkg source specified and is one of the following:
[directory_path/]customize
This is the pathname given in the fpkg PSF. It is used when the fpkg source is a PSF.
fpkg_pathname + <fileset_name>/product/system/<fileset>/(de)customize
This is the pathname created while parsing the network media. It is used when the fpkg source is a directory.
The following table summarizes the wrappers written by the fpkg2swpkg command.
| update script name | SD script name | SD script contents |
| customize | configure | "customize"_pathname HP-PA exit $? |
| decustomize with the check option | checkremove | "decustomize"_pathname HP-PA check exit $? |
| decustomize | unconfigure | "decustomize"_pathname HP-PA exit $? |
HARDWARE REQUIREMENTS
Supported on HP-UX 9.X and 10.0, Series 700 and Series 800.
SOFTWARE REQUIREMENTS
Supported on HP-UX 9.X and 10.0, Series 700 and Series 800.
The fpkg command must be on the system to run the fpkg2swpkg command when the fpkg source is a directory.
PROCEDURES
Initial Translation
Execute the fpkg2swpkg command as shown in "EXAMPLES" below.
Product Script Conversion
Edit/create scripts for compatibility in SD environments.
swpackage PSF Completion
Manually edit the generated swpackage PSF to change default settings and supply information not provided by the fpkg PSF.
SD Depot Creation
Execute the swpackage(1M) command to build an SD depot. If the default swpackage PSF destination was used when fpkg2swpkg was invoked, type:
swpackage -s ./swpackage.psf
RETURN VALUES
The fpkg2swpkg command returns:
0 Success
1 Failure
2 Warning (interrupt warning)
LIMITATIONS
Subproducts
Subproduct definitions are specific to the command instance. Separate invocations of fpkg2swpkg may place the same filesets in subproducts with different names. To avoid this problem, run the tool on an entire partition, not just on a fileset. To fix this problem after running fpkg2swpkg, alter the subproduct contents line of the swpackage PSF to show all filesets which SHOULD be in the subproduct even though they didn’t show up in this instance.
CDFinfo Keyword
SD does not support CDFs. fpkg2swpkg ignores the existence of CDFs. Any actions in customize and decustomize scripts that use or create CDFs must be manually removed.
Systemfile Keyword
Files identified by the systemfile keyword are not automatically included in the swpackage PSF and must be manually added with the swpackage file keyword if they are needed by a wrapped customize or decustomize script. If the calling script is not updated for SD, the systemfile may be delivered under /system/<fileset>/ as is the case for update. If the calling script is rewritten for SD environments, the systemfile should also be rewritten and delivered via the swpackage control_file keyword.
Scripts
fpkg2swpkg does not translate the functionality of update customize and decustomize scripts. Scripts must be tested for 10.0 compatibility by the developer. In particular, scripts which contain DUX-specific commands and paths will not work.
Dependency Revision
swpackage dependencies are based on product revision numbers, not fileset revision numbers as was the case with fpkg.
EXAMPLES
Command Line
Write a swpackage PSF named ./swpackage.psf from an fpkg PSF for the Pascal product:
fpkg2swpkg /build/prog_lang/pascal.psf
Write a swpackage PSF named /sw_build/pascal.sw_psf from an fpkg PSF for the Pascal product:
fpkg2swpkg -d /sw_build/pascal.sw_psf /build/prog_lang/ pascal.psf
Write a swpackage PSF named ./swpackage.psf from an fpkg network media named prog_lang:
fpkg2swpkg -m network /build/prog_lang
Write a swpackage PSF named /sw_build/prog_lang.sw_psf from an fpkg network media named prog_lang:
fpkg2swpkg -m network -d sw_build/prog_lang.sw_psf / build/prog_lang
PSF
The first file listing below is an fpkg PSF. The second file shown is its swpackage counterpart after being translated by with the fpkg2swpkg command. Note that the swpackage PSF would benefit from manual editing before being packaged for SD environments.
Sample fpkg PSF
#fpkg PSF file for an update 9.0 set of filesets with one partition
#Partition specification
pn Manager
pd Manager Subset of SD
#Fileset specifications
fn Controllers
fd SD Executable Commands
fv A.B10.01.0A
ff B
is PA_RISC_1_0
sys S600,S700,S800
dep Controllrs-man A.B.10.01.0A
copyright /build/s700/mfg/data/sdu.copyright
customize /build/s700/mfg/scripts/customize
decustomize /build/s700/mfg/scripts/decustomize
ffperm bin bin 0555
pr /build/s700/mfg=/opt/sw
Files
bin/swinstall
bin/swcopy
data/install.defs newconfig/defaults/swinstall
data/install.defs /var/adm/sw/defaults/swinstall
fn Controllers-man
fd SD Executables Manual Pages
fv A.B10.01.0A
pr /build/s700/mfg/man=/opt/sw/man
Files *
Sample swpackage PSF
# Purpose: swpackage PSF file translated from your fpkg PSF file
# Description: This file is a functional PSF translated from your fpkg
# PSF. All possible keywords are given. The keywords
# that did not have a counterpart in your fpkg PSF are
# commented (with minor exceptions). For the following
# exceptions, the keywords are filled in with defaults:
# vendor.tag, vendor.title, product.tag, product.title,
# product.architecture, product.machine_type,
# product.os_name, product.os_release.
# In general:
# * a PSF can define 0 or more attributes for the
# target depot.
# * a PSF can define 1 or more products.
# * a product can contain 0 or more subproducts.
# * a product can contain 1 or more filesets.
# * a fileset can contain 0 or more files.
# Depot definition:
# All depot attributes are OPTIONAL, except for the products which
# must be contained within it. The other attributes are intended
# for depots being distributed on CD-ROM or tape.
depot
# tag depot_ID # An identifier for the depot
# title "short description" # A name for the depot
# number "depot_partnumber" # The part number for the depot
# description "the in-line description of the depot"
# A multi-line desc. of the depot
# copyright <copyright_file # A file containing a multi-line
# copyright for the depot
# Vendor specification:
# A vendor definition here applies to all subsequently defined products.
# A vendor definition is OPTIONAL. If the product includes its own
# vendor definition, it overrides this one.
vendor
tag HP # The identifier for the vendor
title Hewlett-Packard Company # The name of the vendor
# description <vendor_description_file # A file containing a multi-line
# description of the vendor
end # end of vendor
# Product specification
# All product attributes are OPTIONAL, except for the tag and the
# filesets which must be contained within it.
product
tag HP-UX10 # The identifier for the product
title "HP-UX update (1M)translated filesets"
# The name of the product
# revision product_revision # The rev. number for the product
# description product_description_file #A file containing a multi-line
# description of the product
# readme <readme_file # A multi-page README
architecture HP-UX_B.10.00_700/800 # Summary of hardware/OS’s supported
machine_type 9000/[678]?? # Machines supported (uname -m)
os_name HP-UX # OS’es supported (uname -s)
# os_release ?.10.* # OS releases supported (uname -r)
# os_version OS_version # OS versions supported (uname -v)
# number product_partnumber # Product order/part number
# category product_category # Type of software
# category_title product_category_title # Longer name for type of sw
# directory / # Root directory for the product
copyright /build/s700/mfg/data/sdu.copyright
# A file containing a multi-line
# copyright for the product
is_locatable TRUE # If TRUE, users can install
# into any directory they specify
# share_link . # Highest directory for sharing the
# product across a mount point
# Subproduct specifications
# Subproducts are OPTIONAL. If defined, then they group/partition
# the product’s filesets into logical sets. If defined, then the
# tag and contents are required.
subproduct
tag Manager # Identifier for the subproduct
title Manager Subset of SD
# Name of the subproduct
# description <subproduct_description_file
# A file containing a multi-line
# description of the subproduct
contents Controllrs Controllrs-man # List of filesets in subproduct
end # end of subproduct
# Fileset specifications
# Filesets are not OPTIONAL. All fileset attributes are OPTIONAL, except
# for the tag.
fileset
tag Controllrs # Identifier for the fileset
title SD Executable Commands # Name of the fileset
revision A.B10.01.0A # Revision number for the fileset
# description <fileset_description_file # File containing a multi-line
# description of the fileset
# ancestor old_revisions # Fileset with the same functionality
# but a different name in a previous
# software product revision
is_kernel TRUE # Only defined if the fileset
# contains OS kernel files
is_reboot TRUE # Only defined if the fileset
# requires a system reboot after
# installation
# is_secure TRUE # Only defined if the fileset
# requires encryption
# prerequisite software_spec # The software must be installed
# before this fileset can be
# installed (Install-time dependency)
corequisite HP-UX10.Controllrs-man # Software must be installed before
# this fileset can operate
# correctly (Run-time dependency)
# checkinstall path # Install check script
# preinstall path # Install pre-load script
# postinstall path # Install post-load script
configure /build/s700/mfg/scripts/configure.Controllrs
# Configure for use script
checkremove /build/s700/mfg/scripts/checkremove.Controllrs
# Remove check script
unconfigure /build/s700/mfg/scripts/unconfigure.Controllrs
# Configure undo script
# preremove path # Remove pre-remove script
# postremove path # Remove post-remove script
# verify path # Verify integrity script
# control_file path # Additional (sub)script
# or control data
file_permissions -o bin -g bin -m 0555
directory /build/s700/mfg=/opt/sw
file /build/s700/mfg/scripts/customize
file /build/s700/mfg/scripts/decustomize
file bin/swinstall
file bin/swcopy
file data/install.defs newconfig/defaults/swinstall
file data/install.defs /var/adm/sw/defaults/swinstall
end # end of fileset
# Fileset specifications
# Filesets are not OPTIONAL. All fileset attributes are OPTIONAL, except
# for the tag.
fileset
tag Controllrs-man # Identifier for the fileset
title SD Executables Manual Pages # Name of the fileset
revision A.B10.01.0A # Revision number for the fileset
# description <fileset_description_file # File containing a multi-line
# description of the fileset
is_kernel FALSE # Only defined if the fileset
# contains OS kernel files
is_reboot FALSE # Only defined if the fileset
# requires a system reboot
# after installation
# prerequisite software_spec # The software must be installed
# before this fileset can be
# installed (Install-time dependency)
# corequisite software_spec # The software must be installed
# before this fileset can operate
# correctly (Run-time dependency)
# checkinstall path # Install check script
# preinstall path # Install pre-load script
# postinstall path # Install post-load script
# configure path # Configure for use script
# unconfigure path # Configure undo script
# checkremove path # Remove check script
# preremove path # Remove pre-remove script
# postremove path # Remove post-remove script
# verify path # Verify integrity script
# control_file path # Additional (sub)script
# or control data
# file_permissions -o xxx -g xxx -m 0xxx
directory /build/s700/mfg/man=/opt/sw/man
file *
end # end of fileset
end # end of product
end # end of depot
FILES
./fpkg.psf Contains the fpkg PSF generated when the fpkg source is a directory. Removed after successful completion.
./swpackage.psf The default name for the finished swpackage PSF.
/tmp/fpkg2swpkg.log Contains the session logfile.
AUTHOR
fpkg2swpkg was developed by the Hewlett-Packard Company.
SEE ALSO
swreg(1M), swpackage(1M), swpackage(4), sd(4), sd(5), and the Managing HP-UX Software with SD-UX manual (HP Part Number B2355-90054).
Hewlett-Packard Company — HP-UX Release 10.20: July 1996