C - List File Reference

This appendix provides a complete reference for the EPM list file and setup types formats.

The EPM List File Format

Each EPM product has an associated list file that describes the files to include with the product. Comment lines begin with the "#" character and are ignored. All other non-blank lines must begin with a letter, dollar sign ("$"), or the percent sign ("%").

List File Directives

The following list describes all of the list file directives supported by EPM:

$name=value
 
Sets the named variable to value. Note: Variables set in the list file are overridden by variables specified on the command-line or in the current environment.
 
%copyright copyright notice
 
Sets the copyright notice for the file.
 
%description description text
 
Adds a line of descriptive text to the distribution. Multiple lines are supported.
 
%format format [... format]
 
Uses following files and directives only if the distribution format is the same as format.
 
%format !format [... format]
 
Uses following files and directives only if the distribution format is not the same as format.
 
%include filename
 
Includes files listed in filename.
 
%incompat product
%incompat filename
 
Indicates that this product is incompatible with the named product or file.
 
%if variable [... variable]
%if !variable [... variable]
%ifdef variable [... variable]
%ifdef !variable [... variable]
%elseif variable [... variable]
%elseif !variable [... variable]
%elseifdef variable [... variable]
%elseifdef !variable [... variable]
%else
%endif
 
Conditionally includes lines in the list file. The %if lines include the lines that follow if the named variables are (not) defined with a value. The %ifdef lines include the lines that follow if the named variables are (not) defined with any value. These conditional lines cannot be nested.
 
%install script or program
 
Specifies a script or program to be run after all files are installed. (This has been obsoleted by the %postinstall directive)
 
%license license file
 
Specifies the file to display as the software license.
 
%packager name of packager
 
Specifies the name of the packager.
 
%patch script or program
 
Specifies a script or program to be run after all files are patched. (This has been obsoleted by the %postpatch directive)
 
%postinstall script or program
%postinstall <scriptfile
%postinstall <<string
 
Specifies a script or program to be run after all files are installed.
 
%postpatch script or program
%postpatch <scriptfile
%postpatch <<string
 
Specifies a script or program to be run after all files are patched.
 
%postremove script or program
%postremove <scriptfile
%postremove <<string
 
Specifies a script or program to be run after removing files.
 
%preinstall script or program
%preinstall <scriptfile
%preinstall <<string
 
Specifies a script or program to be run before all files are installed.
 
%prepatch script or program
%prepatch <scriptfile
%prepatch <<string
 
Specifies a script or program to be run before all files are patched.
 
%preremove script or program
%preremove <scriptfile
%preremove <<string
 
Specifies a script or program to be run before removing files.
 
%product product name
 
Specifies the product name.
 
%provides product name
 
Indicates that this product provides the named dependency.
 
%readme readme file
 
Specifies a README file to be included in the distribution.
 
%remove script or program
 
Specifies a script or program to be run before removing files. (This has been obsoleted by the %preremove directive)
 
%release number
 
Specifies the release or build number of a product (defaults to 0).
 
%replaces product
 
Indicates that this product replaces the named product.
 
%requires product
%requires filename
 
Indicates that this product requires the named product or file.
 
%system system[-release] [... system[-release]]
 
Specifies that the following files should only be used for the specified operating systems and releases.
 
%system !system[-release] [... system[-release]]
 
Specifies that the following files should not be used for the specified operating systems and releases.
 
%system all
 
Specifies that the following files are applicable to all operating systems.
 
%vendor vendor or author name
 
Specifies the vendor or author of the product.
 
%version version number
 
Specifies the version number of the product.
 
c mode user group destination source
C mode user group destination source
 
Specifies a configuration file for installation. The second form specifies that the file has changed or is new and should be included as part of a patch. Configuration files are installed as "destination.N" if the destination already exists.
 
d mode user group destination -
D mode user group destination -
 
Specifies a directory should be created when installing the software. The second form specifies that the directory is new and should be included as part of a patch.
 
f mode user group destination source [nostrip()]
F mode user group destination source [nostrip()]
 
Specifies a file for installation. The second form specifies that the file has changed or is new and should be included as part of a patch. If the "nostrip()" option is included, the file will not be stripped before the installation is created.
 
f mode user group destination source/pattern [nostrip()]
F mode user group destination source/pattern [nostrip()]
 
Specifies one or more files for installation using shell wildcard patterns. The second form specifies that the files have changed or are new and should be included as part of a patch. If the "nostrip()" option is included, the file will not be stripped before the installation is created.
 
i mode user group service-name source ["options"]
I mode user group service-name source ["options"]
 
Specifies an initialization script for installation. The second form specifies that the file has changed or is new and should be included as part of a patch. Initialization scripts are stored in /etc/software/init.d and are linked to the appropriate system-specific directories for run levels 0, 2, 3, and 5. Initialization scripts must accept at least the start and stop commands. The optional options following the source filename can be any of the following:
 
order(string)
Specifies the relative startup order compared to the required and used system functions. Supported values include First, Early, None, Late, and Last (macOS only).
provides(name(s))
Specifies names of system functions that are provided by this startup item (macOS only).
requires(name(s))
Specifies names of system functions that are required by this startup item (macOS only).
runlevels(levels)
Specifies the run levels to use.
start(number)
Specifies the starting sequence number from 00 to 99.
stop(number)
Specifies the ending sequence number from 00 to 99.
uses(name(s))
Specifies names of system functions that are used by this startup item (macOS only).

 
l mode user group destination source
L mode user group destination source
 
Specifies a symbolic link in the installation. The second form specifies that the link has changed or is new and should be included as part of a patch.
 
R mode user group destination
 
Specifies that the file is to be removed upon patching. The user and group fields are ignored. The mode field is only used to determine if a check should be made for a previous version of the file.
 

List Variables

EPM maintains a list of variables and their values which can be used to substitute values in the list file. These variables are imported from the current environment and taken from the command-line and list file as provided. Substitutions occur when the variable name is referenced with the dollar sign ($):

%postinstall <<EOF
echo What is your name:
read $$name
echo Your name is $$name
EOF

f 0555 root sys ${bindir}/foo foo
f 0555 root sys $datadir/foo/foo.dat foo.dat

Variable names can be surrounded by curly brackets (${name}) or alone ($name); without brackets the name is terminated by the first slash (/), dash (-), or whitespace. The dollar sign can be inserted using $$.

The setup.types File

The EPM setup program normally presents the user with a list of software products to install, which is called a "custom" software installation.

If a file called setup.types is present in the package directory, the user will instead be presented with a list of installation types. Each type has an associated product list which determines the products that are installed by default. If a type has no products associated with it, then it is treated as a custom installation and the user is presented with a list of packages to choose from.

The setup.types file is an ASCII text file consisting of type and product lines. Comments can be inserted by starting a line with the pound sign (#). Each installation type is defined by a line starting with the word TYPE. Products are defined by a line starting with the word INSTALL:

# Pre-select the user packages
TYPE Typical End-User Configuration
INSTALL foo
INSTALL foo-help

# Pre-select the developer packages
TYPE Typical Developer Configuration
INSTALL foo
INSTALL foo-help
INSTALL foo-devel
INSTALL foo-examples

# Allow the user to select packages
TYPE Custom Configuration

In the example above, three installation types are defined. Since the last type includes no products, the user will be presented with the full list of products to choose from.