Creates interim fix packages that can be installed by the interim fix manager, emgr.
epkg [ -w WorkDirectory ] [ -a APARrefFile ] [ -p PrerequisiteFile ] [ -d DescriptionFile ] [ -e interim fixControlFile ] [ -g PrerequisiteFile ] [ -l LockFile ] [ -S SupersedeFile ] [ -u {y|n} ] ] [ -r {y|n|o} ] [ -s ] [ -T {y|n} ] [ -X ] [ -v ] interim fixLabel
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 will be saved. If you start a new session with the same interim fix label, you will be 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 subcommands. Also, the epkg command remembers the previous answer 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
You can create interim fix packages noninteractively by using an interim fix control file as a template. The following 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=.
DESCRIPTION=/tmp/description
EFIX_FILES=2
APARREF=/tmp/aparref
EFIX_FILE:
EFIX_FILE_NUM=1
SHIP_FILE=/home/test/ls
TARGET_FILE=/usr/bin/ls
TYPE= 1
INSTALLER= 1
ACL= DEFAULT
AR_MEM=.
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
The interim fix control file values, are as follows:
ACL= root:system:555
TYPE=2
SHIP_FILE=/home/myshr.o
TARGET_FILE=/usr/ccs/lib/libc.a
AR_MEM=shr.o
Support for Superseding
epkg -S /tmp/superseded.epkg myefix
Enter the location for the supersede file or "." to skip.
-> /tmp/superseded.epkg
SUPERSEDE=/tmp/superseded.epkg
# Requisites for efix myefix3
myefix1
myefix2
Support for prereqs and xreqs
The packager can specify a file containing the interim fix label names of interim fixes that are requisites to the interim fix package being installed. This will cause the emgr command to check if the interim fix label is installed (PREREQ). If the requisite is not installed, the emgr command will abort installation of the interim fix package. The user can also specify an XREQ interim fix label. This will cause the emgr command not to install the interim fix if the named xreq interim fix is installed.
epkg -g /tmp/efixprereq.epkg myefix
Enter the location for the efix prerequisite file or "." to skip.
-> /tmp/efixprereq.epkg
E2E_PREREQ=/tmp/efixprereq.epkg
EfixLabel RequisiteType: PREREQ/XREQ
oldefix1 PREREQ # Make sure oldefix1 is already installed
oldefix4 XREQ # Make sure oldefix4 is NOT installed
The maximum number of supported interim fix prerequisites is 32.
Support for enabling automatic interim fix removal by installp
The packager can specify an APAR reference file containing APAR reference numbers. An APAR reference number will allow installp to map an interim fix back to the APARs for all the Technology Levels where the fix was shipped. If installp determines that the interim fix is contained in the Technology Level, Service Pack, or PTF being applied, installp will automatically remove the interim fix prior to applying the updates.
Output and Topology
The emgr -d flag displays the contents and topology of the interim fix package. The -d option will work with the -v verbose option. Valid levels of verbosity are 1-3.
emgr -d test.102403.epkg.Z
emgr -v3 -d test.102403.epkg.Z
Support for Additional Package Locking
epkg -l /tmp/pkglock.epkg myefix
Enter the location for the package locks file or "." to skip.
-> /tmp/pkglock.epkg
PKGLOCKS=/tmp/pkglock.epkg
PackageName PackageAction PackageType
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. |
PackageType is installp (default), rpm, ISMP, other.
The maximum number of supported package lock entries is 32.
bos.rte.lvm ALWAYS installp
bos.games IFINST installp
In the above example, the emgr command will always attempt to lock bos.rte.lvm during installation and will unlock it on removal. The emgr command will lock bos.games if, and only if, it is installed, and will unlock it on removal (if locked).
Support for the bosboot Option
The epkg command reboot options include rebooting without rebuilding the boot image.
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.
Item | Description |
---|---|
REBOOT=no & BUILD_BOOT_IMAGE=no | Reboot is NOT required. |
REBOOT=yes & BUILD_BOOT_IMAGE=yes | Reboot is required. The boot image will be rebuilt. |
REBOOT=yes & BUILD_BOOT_IMAGE=no | Reboot is required. The boot image will not be rebuilt. |
Item | Description |
---|---|
-a APARrefFile | Specifies the file containing APAR reference number(s). |
-d DescriptionFile | Specifies the file containing the interim fix description. |
-e interim fixControlFile | 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 containing 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 instructing 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 should 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 regarding scripts and the prerequisite file. |
-T | Specifies whether this interim fix was tested. Allowable values are yes or no. The default is no. |
-u {yes|no} | Specifies whether you will use an existing interim fix control file. |
-v | Causes the epkg command to ask more questions for extended options. This includes asking you to specify permissions on all interim fix files. |
-w WorkDirectory | Specifies the alternate work directory that the epkg command will use. 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. |
epkg myfix
epkg -e /tmp/ecfile myfix
epkg -v -p /tmp/prereq -d /tmp/description myfix
Item | Description |
---|---|
/usr/sbin/epkg | Contains the epkg command. |