IBM Support

Creating Test iFix for a Standard File Change

Question & Answer


Question

Creating Test iFix for a Standard File Change

Answer

Create Test iFix for a Standard File Change

The epkg tool is used to create an interim Fix (iFix) package.

By default, the command runs in interactive mode.

Below are examples for both modes: non-interactive and interactive.

Before we get started with the examples, below is information that will be needed
when creating an iFix package.
------------------------------------------------------------------
1). Working directory for all the ifix package files.
2). The number of files that you will be delivering.
3). The full path names of the file or files that are being delivered.
4). The minimum and maximum AIX levels that the file changes will be

    targeted for.
5). The fileset name or names that contain the file or files changes?
6). Is an action required before or after installing the iFix ?
7). Is an action required before or after removing an iFix?
8). Select an iFix label name
** End of information **

In the examples below, we are making changes to the file /usr/sbin/nimsh

Here are the steps to creating a test iFix package:
-- Create a working directory to contain all the iFix package files.
    mkdir /tmp/tst_ifix
-- Copy the file or files where changes are being made to the working directory
    cp /usr/sbin/nimsh /tmp/tst_ifix/nimsh_modified
-- Make changes to the copy file or files in the working directory
    vi /tmp/tst_ifix/nimsh_modified
-- Create a prereq file and populate the file in the working directory. Add the fileset
    name and the min/max AIX levels where iFix can be installed.

    For the examples below, the PREREQ file name is prereq_file.
    $ vi /tmp/tst_ifix/prereq_file
      bos.sysmgt.nim.client 7.1.4.1 7.1.4.1
-- Create pre_install, post_install, pre_remove and post_remove files.

    In the examples below, here are the file names that are being used:
    Pre_install file name is preinst_file.
    Post_install file name is postinst_file.
    Pre_remove file name is prerm_file.
    Post_remove file name is postrm_file.
-- Populate the files with the action for that specific event.
    Here are the actions that we will be performing in the examples below.

    For the pre and post install files:
    - Stop the nimsh daemon before installing the iFix
    - Restart the nimsh daemon after the iFix is installed.

    For the pre and post remove files:
    - Stop the nimsh daemon before removing.
    - Restart the nimsh daemon after removing the iFix.
-- For the examples below, two other files are also created.
    The description and the aparref files.

    The description file is being called desc_file. Populate the file with a short description of the interim fix package.
      Example:
          This is a test iFix for nimsh on AIX 7.1.4.1 PMR xxxxx,xxx,xxx

    The aparref file is being called aparref_file. Populate the file with APAR reference number or numbers associated with interim fix. If there is no APAR number associated with the interim fix then add the word 'none' to the file.
      Example:
            none
-- Select an iFix label name.
      For the examples below, the iFix label name is TF_0000
-- Select non-interactive or interactive mode to create the iFix package file.



    Non-Interactive Mode

    To run the command in an non-interactive mode you will need a control file to be used as a template.
    • Below is an sample of the attributes defined in a control file for a standard file.
      Example 1: Control file for a standard file.

      # interim fix control file
      ABSTRACT=Test iFix
      PRE_INSTALL=preinst_script
      POST_INSTALL=post_script
      PRE_REMOVE=prerem_script
      POST_REMOVE=postrem_script
      REBOOT=no
      BUILD_BOOT_IMAGE=no
      PREREQ=prereq_file
      DESCRIPTION=desc_file
      EFIX_FILES=1
      APARREF=aparref_file

      EFIX_FILE:
      EFIX_FILE_NUM=1
      SHIP_FILE=nimsh_modified
      TARGET_FILE=/usr/sbin/nimsh
      TYPE= 1
      INSTALLER= 1
      ACL= root:system:550
      AR_MEM=.
    • Select file name for control file and populate the file with attributes listed above

    • For this example, the control file name is ecfile.
    • Before executing the epkg command make sure you are in the working directory.
    • Execute the epkg command with the following flags along with the iFix label name


    • -e flag to indicate the control file name.
      -w flag to indicate the working directory.

      Example:
            epkg -w . -e ecfile TF_0000
            Creating efix directory /tmp/tst_ifix/TF_0000.
            Processing efix control file ...
            Verifying efix control file ...
            Verifying prerequisite file ...
            Populating efix directory ...
            Packing efix package file ...
            Package file is: /tmp/tst_ifix/TF_0000/TF_0000.161110.epkg.Z
          *** End of Non-Interactive Mode ***




    Interactive Mode:
      • Before executing the epkg command make sure you are in the working directory.
      • Execute the epkg command along with the extra files that were created above and the iFix label name.
        Example:
            epkg -w . -a aparref_file -d desc_file -p prereq_file TF_0000
        Creating efix directory /tmp/tst_ifix/TF_0000.
        ** For help, enter "h!" at any question prompt. **

        Enter efix abstract [38 bytes maximum]:
        -> Test iFix for nimsh

        Does this efix deliver one or more files ? (yes/no):
        -> yes

        Enter the ship file location for efix file number 1:
        -> ./nimsh_modified

        Enter target file location or archive for efix file number 1:
        -> /usr/sbin/nimsh

        Select file type for efix file number 1:
        1) Standard (file or executable)
        2) Archive/Library Member
        -> 1

        Select the installer which tracks the file that is being fixed by efix
        file number 1:
        1) Currently tracked by installp.
        2) Currently tracked by RPM.
        3) Currently tracked by ISMP.
        4) Currently NOT tracked -OR- tracked by another installer.
        5) NEW file that will be tracked by installp.
        6) NEW file that will be tracked by RPM.
        7) NEW file that will be tracked by ISMP.
        8) NEW file that will be tracked by another installer.
        9) NEW file that will NOT be tracked.
        -> 1

        Are there more efix files ? (yes/no):
        -> no

        Enter the location for the pre-install script or "." to skip.
        -> ./preinst_script

        Enter the location for the post-install script or "." to skip.
        -> ./postinst_script

        Enter the location for the pre-remove script or "." to skip.
        -> ./prerm_script

        Enter the location for the post-remove script or "." to skip.
        -> ./postrm_script

        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.
        4) Reboot is NOT required. The boot image will be rebuilt.
        -> 1

        Verifying efix control file ...
        Verifying prerequisite file ...
        Populating efix directory ...
        Packing efix package file ...
        Package file is: /tmp/tst_ifix/TF_0000/TF_0000.161110.epkg.Z


        *** End of Interactive mode ***

    • The test iFix package will be created in the directory called TF_0000 under the working directory.
    • To install the iFix package used the 'emgr -e' command along with the iFix package name:
      • Example: emgr -e iFix_package_name
    • To remove the iFix package use the 'emgr -r -L' command along with the iFix label name:
      • Example: emgr -r -L TF_0000

    Related Information

    [{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Support information","Platform":[{"code":"PF002","label":"AIX"}],"Version":"6.1;7.1;7.2","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

    Document Information

    Modified date:
    17 June 2018

    UID

    isg3T1024454