[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4


ptfpkg command

Purpose

Creates a PTF image for each PTF listed in the input ptf_pkg.$BLDCYCLE file.

Syntax

ptfpkg -c -b [ -m PtfType ] [ -d OutputDirectory ]

Description

The output image can be installed using the installp command. The ptfpkg command uses the following files and directories to generate AIX Version 4 PTFs:

*CUMSLIST $TOP/UPDATE/$OPTION/cumsList
INSLIST $TOP/UPDATE/$OPTION/option.il.$BLDCYCLE
LPFILE $TOP/UPDATE/$OPTION/option.lp.$BLDCYCLE
LPPINFO $TOP/UPDATE/$OPTION/lpp_info.$BLDCYCLE
LPPLIST $TOP/UPDATE/lpplist.$BLDCYCLE
PTF_PKG $TOP/UPDATE/$LPP/ptf_pkg.$BLDCYCLE
PTFDIR $TOP/UPDATE/$OPTION/$PTFNUMBER
*PTFSLIST $TOP/UPDATE/$OPTION/ptfsList
USRLIBLPPA $TOP/UPDATE/$OPTION/usr.liblpp.a.$BLDCYCLE
ROOTLIBLPPA $TOP/UPDATE/$OPTION/root.liblpp.a.$BLDCYCLE
DATALIBLPPA $TOP/UPDATE/$OPTION/data.liblpp.a.$BLDCYCLE

Note: * These files are generated and maintained by the ptfpkg command and are not provided by the user.

The ptfpkg command calculates a new version.release.mod.fix (VRMF) level for each PTF. Each fileset PTF increments the fix level value by 1. Each cum_ptf increments the mod level value by one and resets the fix level to 0.

To override the default VRMF, the fileset field of the PTF_PKG file can be modified to include a new VRMF value. This is typically only used for generating a cum_ptf with a non-zero fix level. The fileset field of the PTF_PKG would contain the following format:

FilesetName:v.r.m.f

where the fileset field is the fourth field of each line in the PTF_PKG file.

The ptfpkg command processes PTFs by LPP. The ptfpkg command reads the LPPLIST file for each build cycle. Each LPP in this file has a PTF_PKG file. The ptfpkg command reads the PTF_PKG file for each LPP and generates a AIX Version 4 update image for each PTF in the PTF_PKG file.

All regular fileset PTFs are packaged in the $TOP/UPDATE/$OPTION/$PTF directory. The ptfpkg command creates the liblpp.a files appropriate for the update, generates the lpp_name file, and generates a backup format file (bff) or ccss image containing all files listed in the PTF_PKG file.

The packaging directory for special PTFs is $TOP/UPDATE/$LPP/$PTF. Special PTFs are indicated by a file name of pkg_ptf, pmp_ptf, enh_ptf, C_ptf, or opp_ptf. These types of updates are enabled at a later date.

Once a PTF is created, the ptfpkg command can repackage the PTF only if one of the following conditions is satisfied:

Each time a PTF is successfully built it is added to the PTFSLIST file if it is a fileset PTF or to the CUMSLIST file if it is a cumulative PTF. If the $TOP/PTF/$BLDCYCLE/defectapars information exists, the PTF is also added to the ptfapardef.master file.

Implementation Specifics (pseudocode)

for each LPP listed in lpplist.$BLDCYCLE
          for each PTF listed in the ptf_pkg.$BLDCYCLE
               if PTFDIR exists then repackage
               call getvrmf command to calculate new VRMF value and generate internal VRMF table
               call updatefixdata command to update the fixdata database
               call processPtf command to generate PTF list files and option.prereq file
               call lookupfixdata command to generate option.fixdata file
               call ptfins command to generate inslist file for update
               call adeinv command to generate .inventory, .al, .tcb and .size files
               call adelppname command to generate lpp_name file
               call adepackage command to create bff image
               if -c option used to generate ccss image
                    call gen_toc_entry to generate toc file
                    call gen_infofile to generate infofile
                    call ccss_pack to generate ccss image
               fi
               update $TOP/HISTORY/ptfoptions file to include PTF, fileset and vrmf information
               create ptfapardef.master file from $TOP/PTF/*/defectapars files if they exist
          done
     done

Flags


-b Specifies that the bff images are not deleted.
-c Creates PTF images in ccss format.
-d OutputDirectory Specifies a directory where the bff or ccss images are copied.
-m PtfType Specifies the PTF type. Use this flag to override the default type value calculated by the ptfpkg command. If the -m flag is not specified, the ptfpkg command calculates the PTF type based on the file name field of the ptf_pkg file as indicated:
  • If the file name is pkg_ptf, the package type is M (maintenance level packaging PTF).
  • If the file name is pmp_ptf, the package type is P (packaging PTF).
  • If the file name is opp_ptf or C_ptf, the package type is MC (cumulative maintenance packaging PTF).
  • If the file name is enh_ptf, the package type is ME (enhancement packaging PTF).
  • If the file name is /usr/sbin/installp, the package type is SF (fileset PTF required to install first).
  • If none of the above conditions is met and the user has not overridden the PTF type with the -n option, the PTF type defaults to S for single PTF or fileset update.

Note: One or both of the -b and -c options is required.

Environment Variables

The following environment variables are required for running the ptfpkg command:

BLDCYCLE Specifies the current build cycle. The build-cycle identifier identifies the build in which the PTF was created.
BUILD_TYPE Specifies the type of environment this build is occurring in. Valid values are production, area, and sandbox, where sandbox builds are development level builds. The ptfpkg command requires valid APAR text in the $TOP/HISTORY/abstracts file for each APAR if the build type is production.
ODE_TOOLS Specifies the path to the build tools. The tools are located in the usr/bin directory relative to the location specified by $ODE_TOOLS. The PATH environment variable includes $ODE_TOOLS/usr/bin.
SHIP_PATH Specifies the colon-separated list of paths to ship trees. Ship trees are searched in the order specified.
TOP Specifies the full pathname of the top of the tree from which the build is initiated. The HISTORY, UPDATE, and PTF trees exist relative to $TOP.

Warnings

Warning messages are informational and do not affect the return code of ptfpkg.

Errors

Error messages are produced when ptfpkg encounters an error during processing. Work is stopped on the current LPP or PTF, and processing of the next LPP or PTF is started. Return codes are not affected. The PTFs that had an error are left in the ptf_pkg file so the PTF can be packaged after the errors are corrected.

Fatal Errors

Fatal Error messages are produced when ptfpkg encounters an error that cannot be recovered from. Processing terminates with a non-zero return code.

Examples

  1. To call ptfpkg with no arguments, media type defaulting to single update S, and shipping the resulting bff images into the $TOP/update.bff.images directory, type:

    ptfpkg -d $TOP/update.bff.images
    
  2. To call ptfpkg setting the media type to packaging update P, generating ccss images instead of bff images, and placing them in the $TOP/ptf.images directory, type:

    ptfpkg -m P -c -d $TOP/ptf.images
    

User-Provided Input Files


data.liblpp.a.$BLDCYCLE Specifies that if this file exists in the option directory, the ptfpkg command assumes the fileset is a share data fileset. If the data.liblpp.a.$BLDCYCLE file does not exist in the option directory, then ptfpkg looks for the data.liblpp.a file. It makes a copy of the file adding the build-cycle suffix. This file is an archive containing any odm scripts or config scripts for the update. The mkodmupdt command can be used to generate the odm scripts if applicable.
lpp_info Contains the FORMAT, PLATFORM, and PRODNAME. FORMAT is the update format type, usually 4 for AIX Version 4 updates. PLATFORM is R for RS/6000. PRODNAME is the product name of the package of which the fileset is a member. If the lpp_info.$BLDCYCLE file does not exist in the option directory, then ptfpkg looks for the usr.liblpp.a file. It makes a copy of the file adding the build-cycle suffix.
lpplist.$BLDCYCLE Contains the list of LPPs that has ptf_pkg files for the current build cycle. The format of this file is one LPP name per line.
option.il.$BLDCYCLE Specifies the file used by the ptfins command to generate the inslist information for each file that is shipped with the update. If the option.il.$BLDCYCLE file does not exist in the option directory, then ptfpkg looks for the option.il file. It makes a copy of the file adding the build-cycle suffix.
option.lp.$BLDCYCLE Specifies the file containing the default BOOT, CONTENT, and LANG information for the option. If the option.lp.$BLDCYCLE file does not exist in the option directory, then ptfpkg looks for the option.lp file. It makes a copy of the file adding the build-cycle suffix.
ptf_pkg.$BLDCYCLE Contains the packaging information for all PTFs and filesets associated with the LPP. If a single fileset PTF ships multiple files, then the ptf_pkg file contains one line for each fileset. The format of the ptf_pkg file is:

ptf | apars list | filename | fileset | ifreqs | coreqs | prereqs
root.liblpp.a.$BLDCYCLE Specifies that if this file exists in the option directory, the ptfpkg command assumes the fileset contains a root part. This file exists for options with a root part even if it is an archive file with no members. If the root liblpp.a file for the update contains no members after processing is completed, then ptfpkg sets the CONTENT value back to U (usr only). If the root.liblpp.a.$BLDCYCLE file does not exist in the option directory, then ptfpkg looks for the root.liblpp.a file. It makes a copy of the file adding the build-cycle suffix. This file is an archive containing any odm scripts or config scripts for the update. The mkodmupdt command can be used to generate the odm scripts if applicable.
usr.liblpp.a.$BLDCYCLE Specifies that if this file exists in the option directory, the ptfpkg command assumes the fileset contains a usr part. If the data.liblpp.a file does not exist for the option, then the usr.liblpp.a file is required to exist. If the usr.liblpp.a.$BLDCYCLE file does not exist in the option directory, then ptfpkg looks for the usr.liblpp.a file. It makes a copy of the file adding the build-cycle suffix. This file is an archive containing any odm scripts or config scripts for the update. The mkodmupdt command can be used to generate the odm scripts if applicable.

Related Information

The adeinv command, adelppname command, adepackage command, getvrmf command, installp command, lookupfixdata command, mkodmupdt command, processPtf command, ptfins command, updatefixdata command.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]