epkg Command
Purpose
Creates interim fix packages that can be installed by the interim fix manager, emgr.
Syntax
epkg [ -w WorkDirectory ] [ -a APARrefFile ] [ -p PrerequisiteFile ] [ -d DescriptionFile ] [ -e interimfixControlFile ] [ -g PrerequisiteFile ] [ -l LockFile ] [ -S SupersedeFile ] [ -u {y|n} ] ] [ -r {y|n|o} ] [ -s ] [ -T {y|n} ] [ -X ] [ -v ] interimfixLabel
Description
The epkg tool can be run in two different modes: interactive and template-based. The interactive mode prompts you with several questions and constructs the interim fix package based on the answers. The template-based mode uses an interim fix control file that is provided with the answers to questions that are asked in interactive mode. The interim fix package is installed by the interim fix manager, which is started with the emgr command.
- Interactive mode
-
The epkg command runs in interactive mode by default. The only required parameter is the interim fix label. If you interrupt an epkg session, the interim fix control file is saved. If you start a new session with the same interim fix label, you are asked whether you want to keep working with the previous interim fix control file. To provide this information before you start the interactive epkg session, run epkg with the -u flag.
The epkg command maintains a record of the question order and allows you to navigate between questions by using the subcommands. Also, the epkg command remembers the previous answer that you provided and sets that answer as the default answer. The epkg subcommands are described in the Subcommands section.
After you answer all the questions, the epkg command verifies the interim fix control file and creates a compressed
tar
package that can be installed with the emgr command. - Using the control file template
-
Create interim fix packages noninteractively by using an interim fix control file as a template. The following file is an example of a completed interim fix control file:
# interim fix control file complete example ABSTRACT=This is a test of epkg. PRE_INSTALL=/tmp/pre_install POST_INSTALL=. PRE_REMOVE=/tmp/pre_remove POST_REMOVE=. REBOOT=yes PREREQ=/efixprereq.epkg DESCRIPTION=/tmp/description EFIX_FILES=2 APARREF=/tmp/aparref LKU_CAPABLE=yes EFIX_FILE: EFIX_FILE_NUM=1 SHIP_FILE=/usr/lib/drivers/random TARGET_FILE=/usr/lib/drivers/random TYPE=1 INSTALLER=1 ACL=DEFAULT AR_MEM=. FILESET_NAME=bos.rte.security EFIX_FILE: EFIX_FILE_NUM=2 SHIP_FILE=/home/test/mystrcat.o TARGET_FILE=/usr/ccs/lib/libc.a TYPE= 2 INSTALLER= 1 ACL= root:system:555 AR_MEM=strcat.o FILESET_NAME=bos.rte.libc
The following fields are included in the interim fix control file:
ABSTRACT
- Briefly describes the interim fix package. The abstract is limited to 38 bytes.
PRE_INSTALL
- Specifies the location of a script that is run after the installation preview and before any interim fix files are installed. Failure in the
PRE_INSTALL
script causes the interim fix package installation to be aborted. This component is optional. POST_INSTALL
- Specifies the location of a script that is run after all interim fix files are successfully installed. This component is optional.
PRE_REMOVE
- Specifies the location of a script that is run after the removal preview and before any interim fix files are removed during a remove operation. This component is optional.
POST_REMOVE
- Specifies the location of a script that is run after interim fix files are removed during a remove operation. This component is optional.
REBOOT
- Specifies whether a reboot is required for this interim fix. The valid values are yes or no. If this value is set to yes, the emgr command makes changes as necessary to the boot image and issue a message that instructs the user to reboot after installation.
PREREQ
- Specifies the location of a file that contains
installp
prerequisites. This component is optional. APARREF
- Specifies the location of a file that contains one or more APAR reference numbers
and abstracts associated with this interim fix. Each line of the file contains an APAR reference
number, an APAR number, and an APAR abstract. The
APARREF
file has the following format:APAR reference|:|APAR number|:|APAR abstract
Not all fields are required to make a valid APARREF file. If a particular field is unknown or not required, specifyNONE
or leave the field blank. The following examples show valid APARREF file formats:-
123456|:|IV12345|:|This is the APAR abstract 789012|:|IV67890|:|This is another APAR abstract
-
123456|:|NONE|:|NONE 789012|:|NONE 345678
-
NONE|:|IV12345|:|This is the APAR abstract
-
NONE
NONE
, the automatic removal feature is not enabled for the interim fix. -
DESCRIPTION
- Specifies the location of a file that contains a detailed description of the interim fix package that is being installed.
EFIX_FILES
- Specifies the total number of files in the interim fix.
EFIX_FILE_NUM
- Specifies the number of the files in the interim fix. Each file in the interim fix must have a unique number, from 1 to 400. The epkg command supports a maximum of 400 files per interim fix.
SHIP_FILE
- Specifies the location of a file that epkg archives into the interim fix package. Specify either an absolute path or a relative path to this file.
TARGET_FILE
- Specifies the location where the
SHIP_FILE
is installed. This location is on the system where the interim fix package is installed. Specify an absolute path to this file. If this file is part of a registered package, such as an RPM Package Manager (RPM) orinstallp
package, you must specify the tracked location. TYPE
- Specifies the type of file that is being installed. The
TYPE
field has the following valid values:- 1
- File (standard or executable)
- 2
- Library or archive member
INSTALLER
- Specifies the type of installer, if any, that tracks the interim fix package. The
INSTALLER
filed has the following valid values:- 1
- Currently tracked by
installp
- 2
- Currently tracked by RPM
- 3
- Currently tracked by ISMP
- 4
- Currently tracked by another installer
- 5
- New files that are tracked by
installp
- 6
- New files that are tracked by RPM
- 7
- New files that are tracked by ISMP
- 8
- New files that are tracked by another installer
- 9
- Not tracked by any installer
ACL
- Specifies the access attributes (mode and ownership) for the file. If this attribute is set to
DEFAULT
, the emgr command maintains the current permissions of the file to be replaced. However, if the target file is a new file or if the user wants to specify permissions with the -v flag, theACL
attribute is entered with the syntax Owner:Group:OctalModes, similar to the following format:ACL= root:system:555
AR_MEM
- Specifies the name of the archive member. This option is only valid if
TYPE=2
. In this case,SHIP_FILE
is the local location of the archive member that is being shipped, TARGET_FILE is the target archive, andACL
applies to the archive member. For example, the following value settings make the local file myshr.o the member shr.o in the target archive /usr/ccs/lib/libc.a:TYPE=2 SHIP_FILE=/home/myshr.o TARGET_FILE=/usr/ccs/lib/libc.a AR_MEM=shr.o
FILESET_NAME
Specifies the fileset of the file that is specified by the
SHIP_FILE
field.BUILD_BOOT_IMAGE
- Specifies whether the boot image needs to be rebuilt. The valid values are
yes or no. A reboot is required if this field is set
to yes. If this field is set to yes and the
REBOOT
field is set to no, epkg returns an error. E2E_PREREQ
- Specifies the location of the interim fix prerequisite file in the interim fix control file.
PKGLOCKS
- Specifies the local file location of the package lock file in the interim fix control file.
SUPERSEDE
- Specifies the local file location of the superseded file in the interim fix control file.
FIXTESTED
- Specifies whether this interim fix is tested. The valid values are yes or no.
LKU_CAPABLE
- Specifies whether this interim fix is compatible with the Live Update operation. The valid values are
yes or no. Ideally, all interim fixes must be marked
as Live Update capable. This
compatibility is needed to install interim fixes as a group. If an interim fix is not suitable for a
Live Update operation, the
LKU_CAPABLE
attribute is set to the value ofno
, however most of the interim fixes have this attribute set to the value ofyes
.
- Support for Superseding
-
The packager can specify a file that contains the interim fix label names that are to be superseded when an
epkg
is installed. This causes the emgr command to remove any interim fix labels that are specified in this file (if they are installed) before the emgr command installs the interim fix package. Failure to remove an installed superseded interim fix aborts the installation of the interim fix package. The maximum supported number of superseded labels is 32. The packager can specify the supersede file with the epkg command in the following ways:- To specify the file location with the -S
supersede_file flag, enter the following command:
epkg -S /tmp/superseded.epkg myefix
- The epkg command prompts for the superseded file if the extended options
-v flag is used in interactive mode.
Enter the location for the supersede file or "." to skip. -> /tmp/superseded.epkg
- Set the
SUPERSEDE
attribute to the local file location of the superseded file in the interim fix control file.SUPERSEDE=/tmp/superseded.epkg
The format of the superseded file is one interim fix label to be superseded per line. Comments beginning with a#
sign and leading white space are ignored.# Requisites for efix myefix3 myefix1 myefix2
- To specify the file location with the -S
supersede_file flag, enter the following command:
- Support for prereqs and xreqs
-
The packager can specify a file that contains the interim fix label names of interim fixes that are requisites for the interim fix package to be installed.
If the requisite type is not mentioned with the interim fix label or is mentioned as NONE in the file of the interim fix prerequisites by using the RequisiteType variable, then the default requisite type is taken as
IFREQ
. However, for legacy interim fixes, the default requisite type isPREREQ
.The
IFREQ
requisite type triggers the emgr command to check whether the interim fix label is installed between the range levels that are specified by the prerequisite entry in the interim fix control file. If the installed interim fix label does not fall within the required range level, the emgr command aborts the installation of the interim fix package. For more information about the components of the interim fix user-specified package, see the Interim fix user-specified package components topic.The
PREREQ
field causes the emgr command to check whether the interim fix label is installed or not. If the requisite is not installed, the emgr command aborts the installation of the interim fix package. The user can also specify an XREQ interim fix label. This causes the emgr command not to install the interim fix if the named xreq interim fix is installed.The packager can specify the interim fix prerequisite file with the epkg command in the following ways:- To specify the file location with the -g
efix_prereq_file flag, enter the following command:
epkg -g /tmp/efixprereq.epkg myefix
- The epkg command prompts for the interim fix prereq file if the extended options
flag (-v) is used in interactive mode.
Enter the location for the efix prerequisite file or "." to skip. -> /tmp/efixprereq.epkg
- Set the E2E_PREREQ attribute to the local file location of the interim fix prerequisite file in the interim fix control
file.
E2E_PREREQ=/tmp/efixprereq.epkg
The following format is the format of the entries in the interim fix prerequisite file:EfixLabel RequisiteType: PREREQ/XREQ
In the following example, the value of the EfixLabel field isoldefix1
and the RequisiteType isPREREQ
:oldefix1 PREREQ # Make sure oldefix1 is already installed
In the following example, the value of the EfixLabel field isoldefix4
and the RequisiteType isXREQ
:oldefix4 XREQ # Make sure oldefix4 is NOT installed
The maximum number of supported interim fix prerequisites is 32.
- To specify the file location with the -g
efix_prereq_file flag, enter the following command:
- Support for enabling automatic interim fix removal by installp
-
The packager can specify an APAR reference file that contains APAR reference numbers. An APAR reference number allows
installp
to map an interim fix back to the APARs for all the Technology Levels where the fix was shipped. Ifinstallp
determines that the interim fix is contained in the Technology Level, Service Pack, or PTF applied,installp
automatically removes the interim fix before it applies the updates. - Output and Topology
-
The emgr -d flag displays the contents and topology of the interim fix package. The -d option works with the -v verbose option. Valid levels of verbosity are 1-3.
The verbosity level 1 (default) displays the following fields:LABEL
EFIX FILES
TARGET LOCATION
The verbosity level 2 displays the following fields:- All level 1 output
ABSTRACT
REBOOT
PRE-REQUISITES
PRE_INSTALL
POST_INSTALL
PRE_REMOVE
POST_REMOVE
FILE TYPE
The verbosity level 3 displays the following fields:- All level 2 output
PACKAGING DATE
VUID
SIZE
ACL
CKSUM
PACKAGE
EFIX DESCRIPTION
CONTENTS OF INSTALL SCRIPTS
(if text files)
- Examples
-
- To get level 1 verbosity output on the interim fix package
test.102403.epkg.Z
, enter the following command:emgr -d test.102403.epkg.Z
- To get level 3 verbosity output on the interim fix package
test.102403.epkg.Z
, enter the following command:emgr -v3 -d test.102403.epkg.Z
- To get level 1 verbosity output on the interim fix package
- Support for Additional Package Locking
-
The packager can specify a file that contains package names that must be locked by the emgr command in addition to those packages that are automatically locked based on file ownership. The packager must specify the name of the package, the installer, and the type of package lock action (ALWAYS/IFINST). The packager can specify the package lock file by using the epkg command in the following ways:
- To specify the file location with the -l
pkg_locks_file flag, enter the following command:
epkg -l /tmp/pkglock.epkg myefix
- The epkg command prompts for the package lock file if the extended options
flag (-v) is used.
Enter the location for the package locks file or "." to skip. -> /tmp/pkglock.epkg
- Set the PKGLOCKS attribute to the local file location of the package lock file in the interim fix control file.
PKGLOCKS=/tmp/pkglock.epkg
The format of the package lock file is as follows:PackageName PackageAction PackageType
Where PackageName is the name of the package to be locked and PackageAction is one of the following options:Table 1. PackageAction Item Description ALWAYS
Always attempt to lock this package. Failure to lock the package results in installation failure. IFINST
Attempt to lock this package only if the package is installed. Failure to lock an installed package results in installation failure. The valid values of PackageType option areinstallp
(default), rpm, ISMP, and other.Note: Theinstallp
locking is only supported.The maximum number of supported package lock entries is 32.
- Example
-
In the following example, the emgr command attempts to lock
bos.rte.lvm
during installation and unlocks it on removal. The emgr command locksbos.games
if, and only if, it is installed, and unlocks it on removal (if locked).bos.rte.lvm ALWAYS installp bos.games IFINST installp
- To specify the file location with the -l
pkg_locks_file flag, enter the following command:
- Support for the bosboot Option
-
The epkg command reboot options include rebooting without rebuilding the boot image.
The user can specify a reboot without bosboot in the following ways:- The
o
argument for the epkg -r flag indicates that only reboot is required, but the emgr command must not rebuild the boot image by using bosboot. - The reboot prompt in interactive mode indicates the following choices:
Select reboot policy for this efix package: 1) Reboot is NOT required. 2) Reboot is required. The boot image will be rebuilt. 3) Reboot is required. The boot image will NOT be rebuilt.
- Set the BUILD_BOOT_IMAGE and REBOOT attribute to yes or
no in the interim fix
control file. The following REBOOT and BUILD_BOOT_IMAGE options are supported:
Table 2. REBOOT and BUILD_BOOT_IMAGE options Item Description REBOOT=no & BUILD_BOOT_IMAGE=no Reboot is NOT required. REBOOT=yes & BUILD_BOOT_IMAGE=yes Reboot is required. The boot image is rebuilt. REBOOT=yes & BUILD_BOOT_IMAGE=no Reboot is required. The boot image is not rebuilt. Note: TheREBOOT=no & BUILD_BOOT_IMAGE=yes
options results in an error from the epkg command.
- The
Flags
Item | Description |
---|---|
-a APARrefFile | Specifies the file that contains the one or more APAR reference number. |
-d DescriptionFile | Specifies the file that contains the interim fix description. |
-e interimfixControlFile | Specifies the interim fix control file that controls how the interim fix is constructed. |
-g PrerequisiteFile | Specifies the location of the interim fix prerequisite file that contains the interim fix label names. These labels are required before an interim fix package is installed. |
-l LockFile | Specifies the location of the locked file that contains the package names. These packages are locked by the emgr command or automatically based on file ownership. |
-p PrerequisiteFile | Specifies the file that contains installp prerequisites. |
-r {y|n|o} | Sets the epkg
REBOOT attribute. This causes the emgr command to make changes
as necessary to the boot image and issue a message that instructs the user to reboot after
installation. The y argument specifies that a reboot and a bosboot are
required. The n argument specifies that a reboot is not required. The
o argument indicates that a reboot is required, but emgr
must not call bosboot. |
-S SupersedeFile | Specifies the location of the interim fix supersede file that contains the interim fix label names. These labels are to be superseded when an epkg is installed. |
-s | Causes the epkg command to skip questions with regards to scripts and the prerequisite file. |
-T | Specifies whether this interim fix was tested. The valid values are yes or no. The default is no. |
-u {yes|no} | Specifies whether you use an existing interim fix control file. |
-v | Causes the epkg command to ask more questions for extended options. This option includes questions to specify permissions on all interim fix files. |
-w WorkDirectory | Specifies the alternate work directory that the epkg command uses. The default work directory is $HOME/epkgwork. |
-X | Causes the emgr command to automatically expand file systems when the interim fix is installed, if space is required and expansion is possible. |
Parameters
- interim fixLabel
- Specifies a string that uniquely identifies this interim fix package. The maximum length of an interim fix label is 100 bytes. Note: The interim fix manager requires each interim fix label on the system to be unique.
Subcommands
- b!
- Returns to the previous question.
- s!
- Shows the status of the current interim fix control file
- q!
- Quits without saving the interim fix control file. (Using the Ctrl+C key sequence causes the epkg command to ask whether you want to save the interim fix control file.)
- h!
- Displays help information for the current question.
Exit Status
0
- The epkg command operations completed successfully.
>0
- An error occurred.
Examples
- To run the epkg command in interactive mode and create an interim fix package with the interim fix label of
myfix
, enter the following command:epkg myfix
- To create an interim fix package with the
interim fix label of
myfix
by using an existing interim fix control file named /tmp/ecfile, enter the following command:epkg -e /tmp/ecfile myfix
- To create an interim fix package with the
interim fix label of
myfix
and to specify the prerequisite file /tmp/prereq, description /tmp/description, and extended options, enter the following command:epkg -v -p /tmp/prereq -d /tmp/description myfix
Files
Item | Description |
---|---|
/usr/sbin/epkg | Contains the epkg command. |