IBM Support

/usr/lpp/bos/README.MKINSTALLP

  Readme

mkinstallp README

Description

The mkinstallp command is a tool that allows users to create their own
software packages for AIX. Packages created with mkinstallp are in installp
format and can be installed or removed with the installp command.

Files to be packaged by mkinstallp must be in a directory structure such
that the location of the file relative to the root build directory is the
same as the destination of the file after installation. For example, if
/usr/bin/<somecommand> is to be installed via a mkinstallp package,
the file <buildroot>/usr/bin/<somecommand> must exist when mkinstallp
is invoked.

Once the contents of a package are in the correct directory structure,
mkinstallp prompts for basic package data via the command line interface.
This data includes the package name, requisites, descriptions of files to
be packaged, etc. mkinstallp will then generate a template file based on
responses given by the user. Template files can be created and/or edited
directly by the user and passed to the mkinstallp command with the -T flag
to avoid command line prompting.  A subdirectory of the root build directory,
<buildroot>/.info, will be created for mkinstallp to save the template file
and other packaging and configuration files.

Command Syntax

mkinstallp [ -d BaseDirectory ] [ -T TemplateFile ]

Flags

-d BaseDirectory Specifies the root build directory containing the files
to be packaged. If omitted, the current working directory is used.

-T TemplateFile Specifies the full path name of the template file to be
passed to mkinstallp. If omitted, mkinstallp will prompt for package
information and create a new template file based on user responses.

Examples

The following examples show the directory structure and template file for a
variety of packaging scenarios. The root build directory for the following
examples is /tmp/packages. A list of template keywords is defined after
example 4.
There may be additional supported template keywords.  To see them, run
mkinstallp without -T, say yes to every request for a file and look at the
resulting template file.

Ex 1: PkgA - single fileset with no requisites and no ROOT part
Ex 2: PkgB - single fileset with one prerequisite and ROOT part
Ex 3: PkgC - single fileset with License agreement required
Ex 4: PkgD - multiple filesets, one using requisite filename
Ex 5: PkgE - single relocatable fileset with normal and relocatable requisites
files
Ex 6: PkgF - single fileset with an override inventory file
Ex 7: PkgG - single fileset with USRLIBLPPFiles and ROOTLIBLPPFiles
Ex 8: PkgH - single fileset with WPAR attributes
Ex 9: PkgI - single fileset with a copyright file and a pre deinstall script

Ex 1: PkgA - single fileset with no requisites
----------------------------------------------
Directory Structure:

/tmp/packages
/tmp/packages/usr/doc/PkgA/README
/tmp/packages/usr/PkgA/bin/acommand


Template File:

Package Name: PkgA
Package VRMF: 1.0.0.0
Update: N
Fileset
  Fileset Name: PkgA.rte
  Fileset VRMF: 1.0.0.0
  Fileset Description: My runtime fileset
  Bosboot required: N
  License agreement acceptance required: N
  Include license files in this package: N
  Requisites:
  USRFiles
    /usr/doc/PkgA
    /usr/doc/PkgA/README
    /usr/PkgA
    /usr/PkgA/bin
    /usr/PkgA/bin/acommand
  EOUSRFiles
  ROOT Part: N
  ROOTFiles
  EOROOTFiles
EOFileset


Ex 2: PkgB - single fileset with one prerequisite and ROOT part
---------------------------------------------------------------
Directory Structure:

/tmp/packages
/tmp/packages/etc/PkgB/a.cfg
/tmp/packages/usr/doc/PkgB/README
/tmp/packages/usr/PkgB/bin/bcommand


Template File:

Package Name: PkgB
Package VRMF: 1.1.0.0
Update: N
Fileset
  Fileset Name: PkgB.rte
  Fileset VRMF: 1.1.0.0
  Fileset Description: My runtime fileset
  Bosboot required: N
  License agreement acceptance required: N
  Include license files in this package: N
  Requisites: *prereq PkgA.rte 1.0.0.0;
  USRFiles
    /usr/doc/PkgB
    /usr/doc/PkgB/README
    /usr/PkgB
    /usr/PkgB/bin
    /usr/PkgB/bin/bcommand
  EOUSRFiles
  ROOT Part: Y
  ROOTFiles
    /etc/PkgB
    /etc/PkgB/a.cfg
  EOROOTFiles
EOFileset


Ex 3: PkgC - single fileset with License agreement
--------------------------------------------------
Directory Structure:

/tmp/packages
/tmp/packages/usr/doc/PkgC/README
/tmp/packages/usr/PkgC/bin/ccommand


Template File:

Package Name: PkgC
Package VRMF: 1.0.1.0
Update: N
Fileset
  Fileset Name: PkgC.rte
  Fileset VRMF: 1.0.1.0
  Fileset Description: My runtime fileset
  Bosboot required: N
  License agreement acceptance required: Y
  Name of license agreement: LAR/usr/swlag/%L/LUM.la
  Include license files in this package: N
  Requisites:
  USRFiles
    /usr/doc/PkgC
    /usr/doc/PkgC/README
    /usr/PkgC
    /usr/PkgC/bin
    /usr/PkgC/bin/ccommand
  EOUSRFiles
  ROOT Part: N
  ROOTFiles
  EOROOTFiles
EOFileset


Ex 4: PkgD - multiple filesets, one with requisite file
-------------------------------------------------------
Directory Structure:

/tmp/packages
/tmp/packages/etc/PkgD/a.cfg
/tmp/packages/usr/doc/PkgD/README
/tmp/packages/usr/PkgD/bin/acommand
/tmp/packages/usr/PkgD/bin/bcommand


Template File:

Package Name: PkgD
Package VRMF: 1.2.0.0
Update: N
Fileset
  Fileset Name: PkgD.rte
  Fileset VRMF: 1.2.0.0
  Fileset Description: My runtime fileset
  Bosboot required: N
  License agreement acceptance required: N
  Include license files in this package: N
  Requisites: /pkgdata/pkgD.rte/requisites
  USRFiles
    /usr/doc/PkgD
    /usr/doc/PkgD/README
    /usr/PkgD
    /usr/PkgD/bin
    /usr/PkgD/bin/acommand
  EOUSRFiles
  ROOT Part: Y
  ROOTFiles
    /etc/PkgD
    /etc/PkgD/a.cfg
  EOROOTFiles
EOFileset
Fileset
  Fileset Name: PkgD.data
  Fileset VRMF: 1.2.0.0
  Fileset Description: My data fileset
  Bosboot required: N
  License agreement acceptance required: N
  Include license files in this package: N
  Requisites:
  USRFiles
    /usr/PkgD
    /usr/PkgD/bin
    /usr/PkgD/bin/bcommand
  EOUSRFiles
  ROOT Part: N
  ROOTFiles
  EOROOTFiles
EOFileset

Ex 5: PkgE - single relocatable fileset with normal and relocatable requisites
files
------------------------------------------------------------------------
Directory Structure:

/tmp/packages

Template File:

Package Name: PkgE
Package VRMF: 1.0.0.0
Update: N
Fileset
  Fileset Name: PkgE.rte
  Fileset VRMF: 1.0.0.0
  Fileset Description: requisites both files
  Bosboot required: N
  License agreement acceptance required: N
  Include license files in this package: N
  Requisites: /pkgdata/pkgE.rte/requisites
  USRFiles
  EOUSRFiles
  ROOT Part: N
  ROOTFiles
  EOROOTFiles
  Relocatable: Y
  Requisites_r: /pkgdata/pkgE.rte/requisites_r
EOFileset

Ex 6: PkgF - single fileset with an override inventory file
------------------------------------------------------------------------
Directory Structure:

/tmp/packages
/tmp/packages/usr/bin/file1
/tmp/packages/usr/bin/file2

Template File:

Package Name: PkgF
Package VRMF: 1.0.0.0
Update: N
Fileset
  Fileset Name: PkgF.rte
  Fileset VRMF: 1.0.0.0
  Fileset Description: testing with one file in override file
  USRLIBLPPFiles
  EOUSRLIBLPPFiles
  Bosboot required: N
  License agreement acceptance required: N
  Include license files in this package: N
  Requisites:
  USRFiles
    /usr/bin/file1
    /usr/bin/file2
  EOUSRFiles
  ROOT Part: N
  ROOTFiles
  EOROOTFiles
  Relocatable: N
  OVERRIDE_INVENTORY: /tmp/inv1
EOFileset

Ex 7: PkgG - single fileset with USRLIBLPPFiles and ROOTLIBLPPFiles
------------------------------------------------------------------------
Directory Structure:

/tmp/packages
/tmp/file1
/tmp/file2
/tmp/file3
/tmp/file4

Template File:

Package Name: PkgG
Package VRMF: 1.0.0.0
Update: N
Fileset
  Fileset Name: PkgG.rte
  Fileset VRMF: 1.0.0.0
  Fileset Description: single fileset with USRLIBLPPFiles and ROOTLIBLPPFiles
  USRLIBLPPFiles
  Pre-installation Script: /tmp/file1
  Unpre-installation Script: /tmp/file2
  EOUSRLIBLPPFiles
  ROOTLIBLPPFiles
  Configuration Script: /tmp/file3
  Unconfiguration Script: /tmp/file4
  EOROOTLIBLPPFiles
  Bosboot required: N
  License agreement acceptance required: N
  Include license files in this package: N
  Requisites:
  USRFiles
  EOUSRFiles
  ROOT Part: Y
  ROOTFiles
  EOROOTFiles
  Relocatable: N
EOFileset

Ex 8: PkgH - single fileset with WPAR attributes
------------------------------------------------------------------------

Template File:

Package Name: PkgH
Package VRMF: 1.0.0.0
Update: N
Fileset
  Fileset Name: PkgH.rte
  Fileset VRMF: 1.0.0.0
  Fileset Description: single fileset with WPAR attributes
  USRLIBLPPFiles
  EOUSRLIBLPPFiles
  Bosboot required: N
  License agreement acceptance required: N
  Include license files in this package: N
  Requisites:
  USRFiles
  EOUSRFiles
  ROOT Part: N
  ROOTFiles
  EOROOTFiles
  Relocatable: n
  Requisites_r:
  WPAR_sys: y
  WPAR_priv: y
EOFileset

Ex 9: PkgI - single fileset with a copyright file and a pre deinstall script
------------------------------------------------------------------------
Directory Structure:

/tmp/file1
/tmp/file2

Template File:

Package Name: PkgI
Package VRMF: 1.0.0.0
Update: N
Fileset
  Fileset Name: PkgI.rte
  Fileset VRMF: 1.0.0.0
  Fileset Description: Single Fileset with a copyright file and a pre deinstall
script
  Copyright file path: /tmp/file1
  USRLIBLPPFiles
   Pre-deinstall Script: /tmp/file2
  EOUSRLIBLPPFiles
  Bosboot required: N
  License agreement acceptance required: N
  Include license files in this package: N
  Requisites:
  USRFiles
  EOUSRFiles
  ROOT Part: N
  ROOTFiles
  EOROOTFiles
  Relocatable: N
EOFileset

Template File Keywords

Keywords with a * are required, and will cause mkinstallp to fail if left blank
or
omitted in the template file.

Package Name          *- Name of the package
Package VRMF          *- Version, Release, Modification, and Fix level of the
package
Update                *- Is this an update package?
Fileset               *- Start of a new Fileset
  Fileset Name        *- Name of the fileset
  Fileset VRMF        *- VRMF of the fileset
  Fileset Description *- Description of the fileset
  Copyright file path  - Path to the Copyright File
  USRLIBLPPFiles      *- Begining of USR liblpp Files
  Pre-installation Script: /path/to/file
  Unpre-installation Script: /path/to/file
  Post-installation Script: /path/to/file
  Unpost-installation Script: /path/to/file
  Pre_rm Script: /path/to/file
  Configuration Script: /path/to/file
  Unconfiguration Script: /path/to/file
  EOUSRLIBLPPFiles    *- End of the USR liblpp Files
  ROOTLIBLPPFiles      - Begining of ROOT liblpp Files
  Pre-installation Script: /path/to/file
  Unpre-installation Script: /path/to/file
  Post-installation Script: /path/to/file
  Unpost-installation Script: /path/to/file
  Pre-deinstall Script: /path/to/file
  Pre_rm Script: /path/to/file
  Configuration Script: /path/to/file
  Unconfiguration Script: /path/to/file
  EOROOTLIBLPPFiles    - End of the ROOT liblpp Files
  Bosboot required    *- Is a bosboot required when installing this fileset?
  License agreement acceptance required  *- Is license agreement acceptance
required
                                           for this filesest?
  Name of license agreement              - Name of the license agreement (see
Note 1)
  Include license files in this package  *- Are the license files included in
this
                                           package?
  License file path    - Path of the license file(s) (see Note 2)
  Requisites           - co/if/inst/pre-requistes for the fileset (see Note 3)
  USRFiles            *- Start of the USR part files section
    /path/to/file      - File path (see Note 4)
  EOUSRFiles          *- End of the USR part files section
  ROOT Part           *- Is there a ROOT part included in this fileset?
  ROOTFiles           *- Start of the ROOT part files section
    /path/to/file      - File path (see Note 4)
  EOROOTFiles         *- End of the ROOT part files section
  WPAR_sys             - WPAR attribute:  SYSTEM (see Note 8)
  WPAR_priv            - WPAR attribute:  PRIVATE (see Note 8)
  Relocatable          - Relocatable Fileset (see Note 5)
  Requisites_r         - Relocatable Requisites (see Note 6)
  OVERRIDE_INVENTORY   - Override file to specify VOLATILE files (see Note 7)
EOFileset             *- End of the Fileset

Note 1: The Name of license agreement is defined as
LAR/path/to/license/agreement.
        The %L tag can be used in place of a hard coded path to represent the
locale
        of the machine that the package will be installed on. For example, if
PkgC
        is installed in the en_US locale, %L will be converted to en_US.

Note 2: A License file path is defined as LAF/path/to/license/file. A
conditional
        License file path is defined as LAF<lc_LC>/path/to/license/file, where
lc_LC
        is the locale which is associated with the license file. An example
conditional
        License file path is LAF<en_US>/usr/swlag/en_US/prod.la. Either type of
path
        may be specified or both types. Multiple license file paths are
separated by
        semicolons.

Note 3: Requisites are defined as *Type Name VRMF;. Type may be coreq, ifreq,
instreq,
        or prereq. Multiple requisites are separated by semicolons.
        Requisites may also be an absolute pathname of a file specifying
multiple or
        complex requisites.

Note 4: The full path name for each file in the fileset must be listed in the
files
        section. Any custom directories should also be listed in this section.
For
        example, to package /usr/PkgA/myFile, list both /usr/PkgA and
/usr/PkgA/myFile in the
        files section. Each entity in the final package will have the same
attributes
        (owner/group/permissions) that it had at build time. The user must
ensure
        that file attributes in the buildroot are correct prior to running
mkinstallp.
        Files delivered with the software package cannot have names containing
        commas or colons.  Comas and colons are used as delimeters in the
control
        files used during the software installation process.

Note 5: A Relocatable fileset indicates that the given fileset can be installed
in a
        relocatable path; other than the default path.

Note 6: As the user can specify requisites for the fileset to be installed in
the default
        path, the user can specify relocatable requisites needed in the
relocated path
        for a successful installation.
Note 7: The override inventory file needs to have the same structure as a normal
        inventory file.  The path of this file (if it exists) needs to be
specified in the
        OVERRIDE_INVENTORY line in the template as shown in example 6
(/tmp/inv1).
        With this file, we intend to change the value of owner, group, mode,
size and checksum
        fields of a file stanza as it is needed for user configurable files.
        The user can specify any value in owner, group and mode.
        For the size and checksum, the user can set up its value to VOLATILE
only.
        If the user does not set both values (size and checksum) fields with the
VOLATILE value in the override
        inventory file, the system will use the system values for the size
        and checksum fields for a given stanza.
        The user needs to provide stanza like the example below for each file
that needs to be
        modified with the VOLATILE value (/usr/bin/file1, /usr/bin/file2) and
owner, group and
        mode fields (usr/bin/file3):

        /usr/bin/file1:
          owner =
          group =
          mode =
          type =
          class =
          size = VOLATILE
          checksum = VOLATILE

        /usr/bin/file2:
          owner =
          group =
          mode =
          type =
          class =
          size = VOLATILE
          checksum = VOLATILE

        /usr/bin/file3:
          owner = pdadmin
          group = system
          mode = 777
          type =
          class =
          size =
          checksum =
Note 8: There are two WPAR attributes.  The SYSTEM attribute means that the
        fileset should not be separately administrated in a WPAR.
        The PRIVATE attribute means that if the fileset is installed in a
        global environment, the software vital product data will not be
        visible in a WPAR, and any root part will not be installed into a WPAR.
        Both variables can be set, or either one, as needed. For more
        information, please read the Workload Partition documentation.



Document information

More support for: AIX family

Software version: 710

Operating system(s): AIX

Reference #: 710readme961539891

Modified date: 07 August 2010


Translate this page: