Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Application Packaging Developer's Guide
Previous Next

Package Components

The components of a package fall into two categories.

  • package objects are the application files to be installed.

  • control files control how, where, and if the package is installed.

The control files are also divided into two categories: information files and installation scripts. Some control files are required. Some control files are optional.

To package your applications, you must first create the required components, and any optional components, that make up your package. You can then build the package by using the pkgmk command.

To build a package, you must provide the following:

  • Package objects (the application software's files and directories)

  • Two required information files (the pkginfo and prototype files)

  • Optional information files

  • Optional installation scripts

The following figure describes the contents of a package.

Figure 1-1 The Contents of a Package
The preceding context and the following context describe the graphic.

Required Package Components

You must create the following components before you build your package:

  • Package objects

    These components make up the application. They can consist of the following items:

    • Files (executable files or data files)

    • Directories

    • Named pipes

    • Links

    • Devices

  • The pkginfo file

    The pkginfo file is a required package information file that defines parameter values. Parameter values include the package abbreviation, the full package name, and the package architecture. For more information, see Creating a pkginfo File and the pkginfo(4) man page.


    Note - There are two pkginfo(1) man pages. The first man page describes a section 1 command that displays information about installed packages. The second man page describes a section 4 file that describes the characteristics of a package. When accessing the man pages, be sure to specify the applicable man page section. For example: man -s 4 pkginfo.


  • The prototype file

    The prototype file is a required package information file that lists the components of the package. One entry exists for each package object, information file, and installation script. An entry consists of several fields of information that describe each component, including its location, attributes, and file type. For more information, see Creating a prototype File and the prototype(4) man page.

Optional Package Components

Package Information Files

You can include four optional package information files in your package:

  • The compver file

    Defines previous versions of the package that are compatible with this version of your package.

  • The depend file

    Indicates other packages that have a special relationship with your package.

  • The space file

    Defines disk space requirements for the target environment, beyond what is required by the objects defined in the prototype file. For example, additional space might be needed for files that are dynamically created at installation time.

  • The copyright file

    Defines the text for a copyright message that displays at the time of package installation.

Each package information file should have an entry in the prototype file. See Creating Information Files for more information on creating these files.

Package Installation Scripts

Installation scripts are not required. However, you can provide scripts that perform customized actions during the installation of your package. An installation script has the following characteristics:

  • The script is composed of Bourne shell commands.

  • The script's file permissions should be set to 0644.

  • The script does not need to contain the shell identifier (#! /bin/sh).

The four script types are as follows:

  • The request script

    The request script requests input from the administrator who is installing the package.

  • The checkinstall script

    The checkinstall script performs special file system verification.


    Note - The checkinstall script is only available with the SolarisTM 2.5 release and compatible releases.


  • Procedure scripts

    Procedure scripts define actions that occur at particular points during package installation and removal. You can create four procedure scripts with these predefined names: preinstall, postinstall, preremove, and postremove.

  • Class action scripts

    Class action scripts define a set of actions to be performed on a group of objects.

See Creating Installation Scripts for a more information on installation scripts.

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire