pal/installer/InstallBuilder
Saroj Patra 11b90beabf Fixing SUSE 12 PPC pal test build issue 2018-10-09 09:39:49 +01:00
..
tools/bin Remove .tpattributes files, set execute bit via git 2015-11-23 13:11:21 -08:00
unittests Fixing SUSE 12 PPC pal test build issue 2018-10-09 09:39:49 +01:00
README New install builder, data driven, minus Solaris 5.11 IPS 2013-08-26 16:24:16 -07:00
aixlpp.py Add a newline (\n) to package_filename file 2016-01-04 17:45:12 -08:00
datafileparser.py Fix Python 3 syntax errors 2017-11-03 13:46:43 +01:00
hpuxpackage.py Add a newline (\n) to package_filename file 2016-01-04 17:45:12 -08:00
installbuilder.py New install builder, data driven, minus Solaris 5.11 IPS 2013-08-26 16:24:16 -07:00
linuxdpkg.py Security fix for DEB packages (scripts not owned by root) 2016-01-13 16:12:57 -08:00
linuxrpm.py Allow PPC builds to be identified as REDHAT, not ULINUX 2016-11-21 14:41:20 -08:00
scxutil.py Fix Python 3 syntax errors 2017-11-03 13:46:43 +01:00
sunospkg.py Add a newline (\n) to package_filename file 2016-01-04 17:45:12 -08:00

README

Description:

The install builder is written with the intention of being able to produce native packages for all of the SCX platforms (Linux{RPM/DPKG}, AIX, SunOS, and HPUX) given a set of input datafiles which describe the package.

Datafiles:

Datafiles are input to the install builder as a list of files at the command line.

A section is the most fundamental part of a datafile, and is denoted by a line that begins with a '%'.  Basic sections are:

Variables
Defines
Files
Directories
Links
Dependencies
Preinstall_*N*
Postinstall_*N*
Preuninstall_*N*
Postuninstall_*N*
iConfig_*N*
rConfig_*N*

(Where _*N* denotes any number of underscores followed by any number of digits)

Script sections are those which contain a "_*N*" at the end.  These sections are the building blocks of the scripts associated with their names that the native packages will run at the appropriate times.  The digits at the end of each script section specify the relative location to include the code that is in that section with respect to the other script sections that share the same name, but with a different set of digits.  These sections are sorted numerically.  For example, the sections below will combine into a single Preinstall script:
---------------------------------------------------------------------------
%Preinstall_10
echo "hello"
%Preinstall_5
echo "First!"
%Preinstall_300
echo "Last!"
---------------------------------------------------------------------------

These will be combined into the 3 lines below for the Preinstall script:

echo "First!"
echo "hello"
echo "Last!"


A section can have any name.  For example, "%UsefulFunctionsToBeIncluded" is a valid section name, and can be included by any other section.  The act of including (#include SECTION) simply inserts every line from the section to be included into the section that is including.  Sections other than those specified in the "Basic sections" above will have no other function other than being available for includes in other sections.


===========================================================================
Section Grammar and Notes
===========================================================================

Variables:

VARIABLE_NAME: 'VALUE'

---------------------------------------------------------------------------

Defines:

DEFINE_NAME

---------------------------------------------------------------------------

Files:

STAGED_LOCATION; SOURCE_LOCATION; PERMISSIONS; USER; GROUP(; conffile)
or
COMMAND

 Notes:
 1. The parenthesis around the "; conffile" denote that this field is optional.
 2. Including the '; conffile' at the end will inform the package managers that this file is a configuration file,
    which means that on upgrades the file will be preserved.

---------------------------------------------------------------------------

Directories:

STAGED_DIRECTORY; PERMISSIONS; USER; GROUP(; sysdir)
or
COMMAND

 Notes:
 1. The parenthesis around the "; sysdir" denote that this field is optional.
 2. Including the '; sysdir' at the end will inform the package managers that this directory is a system directory,
    which means that it will only create the directory when staging to build the package, but will not attempt to
    create the directory when installing the package.

---------------------------------------------------------------------------

Links:

STAGED_LINK; LINK_POINTS_TO_THIS_LOCATION; PERMISSIONS; USER; GROUP
or
COMMAND

---------------------------------------------------------------------------

Dependencies:

PACKAGE_SYSTEM_SPECIFIC_DEPENDENCY_ENTRY
or
COMMAND

---------------------------------------------------------------------------

Preinstall_*N*/Postinstall_*N*/Preuninstall_*N*/Postuninstall_*N*/iConfig_*N*/rConfig_*N*:

PLAINTEXT
or
COMMAND

 Notes:
 1. PLAINTEXT is just simply plaintext that gets included into the scripts associated with the section names.

---------------------------------------------------------------------------

COMMAND:

#ifdef VAR
or
#ifndef VAR
or
#elseifdef VAR
or
#elseifndef VAR
or
#if VAR OPERATION VALUE
or
#elseif VAR OPERATION VALUE
or
#endif
or
#include SECTION

 Notes:
 1. Conditionals (#if*/#else*/#endif) will determine if the lines within the conditional block are included/evaluated.
 2. Includes (#include) will insert another section in place of the #include line.

---------------------------------------------------------------------------

OPERATION:

==
or
!=
or
>
or
<
or
>=
or
<=

 Notes:
 1. Equality comparisons are string comparisons, and inequality comparisons are floating point comparisons.

---------------------------------------------------------------------------