Administer > Content utilities > IDK commands > ISMTool build commands

ISMTool build commands

This section describes the ISMTool commands that build and modify an ISM.

--verbose

Display extra debugging information.

--banner

Suppress the display of the output banner.

--clean

Clean up all files generated as a result of a build. This removes temporary files and all build products.

--build

Builds the ISM, creating the packages in the pkg subdirectory.

The primary purpose of the build command is to create the packages contained in the ISM. Optionally, the build command may invoke source compilation and run pre-build and post-build scripts.

--upgrade

Upgrade the ISM to match the currently installed version of the ISMTool.

New releases of the ISMTool may fix defects or modify how it operates on an extracted ISMDIR. If the version of the currently installed ISMTool is different from the version of the ISMTool that created the ISM, the developer may need to perform certain actions. Note that minor and major downgrades are not allowed. For example, if version 2.0.0 of the ISMTool created the ISM, then version 1.0.0 of the ISMTool cannot process the ISM. The following table lists the developer actions if the currently installed and previous versions of ISMTool are not the same.

ISMTool upgrade actions

ISMTool
version
currently
installed

ISMTool
version
used to
create
the ISM

Developer action

1.0.1

1.0.0

PATCH increment. Developer action is not needed. This is considered a simple automatic upgrade which is forward AND backward compatible.

1.0.0

1.0.1

PATCH decrement. Automatic downgrade. No action needed.

1.1.0

1.0.0

MINOR increment. The developer must apply the --upgrade command to the ISM. There may be small operational differences or enhanced capability. Warning: This operation is not reversible. Minor upgrades are designed to be as transparent as possible.

2.0.0

1.0.0

MAJOR increment. The developer must apply the --upgrade command to the ISM. There may be large operational differences. The developer will probably need to perform other actions specified in release notes.

1.0.0

2.0.0
or 1.1.0

MAJOR or MINOR decrement. This downgrade path is not allowed. The ISM cannot be processed with the installed version of the ISMTool.

--name STRING

Change the internal name of the ISM to STRING. The ISMDIR, the top level directory of an extracted ISM, can have a different name than the internal name of the ISM. To change both names, use the ISMTool --name command to change the internal name and a file system command to change the directory name. If the STRING format is not valid for the native packaging engine, the problem will not be found until a --build is issued and the packaging engine throws an error.

--version STRING

Change the internal version field of the ISM. The STRING cannot contain spaces. The --version command performs no other checks on the STRING format. If the STRING format is not valid for the native packaging engine, the problem will not be found until a --build is issued and the packaging engine throws an error.

--prefix PATH

Change the install prefix of an ISM. The PATH is used by the build-from-source feature of the ISMTool and also by the drivers for the packaging engines. During installation on a managed server, the application files packaged in the ISM are installed in the location relative to the PATH. In the SA Client, the PATH appears in the Install Path field in the package’s properties. In the following Unix example, the developer begins with this .tar file:

% tar tvf ntp/bar/ntp.tar
-rw-r--r-- root/root 1808 2002-11-22 09:20:36 etc/ntp.conf
drwxr-xr-x ntp/ntp 0 2003-07-08 16:22:38 etc/ntp/
-rw-r--r-- root/root 22 2002-11-22 09:22:08 etc/ntp/step-tickers
-rw-r--r-- ntp/ntp 7 2003-07-08 16:22:38 etc/ntp/drift
-rw------- root/root 266 2001-09-05 03:54:42 etc/ntp/keys
-rwxr-xr-x root/root 252044 2001-09-05 03:54:43 usr/sbin/ntpd
-rwxr-xr-x root/root 40460 2001-09-05 03:54:43 usr/sbin/ntpdate
-rwxr-xr-x root/root 70284 2001-09-05 03:54:43 usr/sbin/ntpdc
-rwxr-xr-x root/root 40908 2001-09-05 03:54:43 usr/sbin/ntp-genkeys
-rwxr-xr-x root/root 66892 2001-09-05 03:54:43 usr/sbin/ntpq
-rwxr-xr-x root/root 12012 2001-09-05 03:54:43 usr/sbin/ntptime
-rwxr-xr-x root/root 40908 2001-09-05 03:54:43 usr/sbin/ntptimeset
-rwxr-xr-x root/root 19244 2001-09-05 03:54:43 usr/sbin/ntptrace
-rwxr-xr-x root/root 1019 2001-09-05 03:54:39 usr/sbin/ntp-wait

In this example, a --prefix of '/' would build an application package such that all the files would be installed relative to the file system root.

% ismtool --build --prefix '/' --pkgengine rpm4 ntp
.
.
.
% rpm -qlpv ntp/pkg/ntp-1.0.0-1.i386.rpm
drwxr-xr-x 2 ntp ntp 0 Jul 8 16:22 /etc/ntp
-rw-r--r-- 1 root root 1808 Nov 22 2002 /etc/ntp.conf
-rw-r--r-- 1 ntp ntp 7 Jul 8 16:22 /etc/ntp/drift
-rw------- 1 root root 266 Sep 5 2001 /etc/ntp/keys
-rw-r--r-- 1 root root 22 Nov 22 2002 /etc/ntp/step-tickers
-rwxr-xr-x 1 root root 40908 Sep 5 2001 /usr/sbin/ntp-genkeys
-rwxr-xr-x 1 root root 1019 Sep 5 2001 /usr/sbin/ntp-wait
-rwxr-xr-x 1 root root 252044 Sep 5 2001 /usr/sbin/ntpd
-rwxr-xr-x 1 root root 40460 Sep 5 2001 /usr/sbin/ntpdate
-rwxr-xr-x 1 root root 70284 Sep 5 2001 /usr/sbin/ntpdc
-rwxr-xr-x 1 root root 66892 Sep 5 2001 /usr/sbin/ntpq
-rwxr-xr-x 1 root root 12012 Sep 5 2001 /usr/sbin/ntptime
-rwxr-xr-x 1 root root 40908 Sep 5 2001 /usr/sbin/ntptimeset

It is easy to change the install prefix to '/usr/local':

% ismtool --build --prefix '/usr/local' ntp
.
.
.
% rpm -qlpv ntp/pkg/ntp-1.0.0-2.i386.rpm
drwxr-xr-x 2 ntp ntp 0 Jul 8 16:22 /usr/local/etc/ntp
-rw-r--r-- 1 root root 1808 Nov 22 2002 /usr/local/etc/ntp.conf
-rw-r--r-- 1 ntp ntp 7 Jul 8 16:22 /usr/local/etc/ntp/drift
-rw------- 1 root root 266 Sep 5 2001 /usr/local/etc/ntp/keys
-rw-r--r-- 1 root root 22 Nov 22 2002 /usr/local/etc/ntp/steptickers
-rwxr-xr-x 1 root root 40908 Sep 5 2001 /usr/local/usr/sbin/ntpgenkeys
-rwxr-xr-x 1 root root 1019 Sep 5 2001 /usr/local/usr/sbin/ntp-wait
-rwxr-xr-x 1 root root 252044 Sep 5 2001 /usr/local/usr/sbin/ntpd
-rwxr-xr-x 1 root root 40460 Sep 5 2001 /usr/local/usr/sbin/ntpdate
-rwxr-xr-x 1 root root 70284 Sep 5 2001 /usr/local/usr/sbin/ntpdc
-rwxr-xr-x 1 root root 66892 Sep 5 2001 /usr/local/usr/sbin/ntpq
-rwxr-xr-x 1 root root 12012 Sep 5 2001 /usr/local/usr/sbin/ntptime
-rwxr-xr-x 1 root root 40908 Sep 5 2001 /usr/local/usr/sbin/
ntptimeset
-rwxr-xr-x 1 root root 19244 Sep 5 2001 /usr/local/usr/sbin/ntptrace

On Windows, there is no standard way to tell an MSI where to install itself. Therefore, application packages built from MSI files found in the bar directory will ignore the --prefix setting. However, for Windows application packages built from ZIP files, the ISMTool will use the --prefix setting. On Windows the prefix must be in this form: driveletter:\directoryname (for example, D:\mydir). On Windows NT4, --prefix is required and cannot contain variables.

On Unix, the default value of PATH is /usr/local. However, on Solaris 11, the default value is /usr/app.

--ctlprefix PATH

Change the install prefix of the control files. Note that this command is not recommended and that you should instead rely on the default values. During installation on a managed server, the control files packaged in the ISM are installed in the location relative to the PATH. In the SA Client, the PATH appears in the Install Path field in the package’s properties. On Windows the prefix must be in this form: driveletter:\directoryname (for example, D:\mydir). On Windows NT4, --ctlprefix is required and cannot contain variables.

The default value for PATH follows:

Unix:

/var/opt/OPSWism

Windows:

%ProgramFiles%\OPSWism

On Solaris, if you specify --ctlprefix on Solaris, you will be prompted for the name of the shared run-time package.

--user STRING (Unix only)

Change the Unix user owner of the files in the application package to STRING. When the files in the package are installed on the managed server, they will be owned by the specified Unix user.

--group STRING (Unix only)

Change the Unix group owner of the files in the application package STRING.

--ctluser STRING (Unix only)

Change the Unix user owner of the files in the control package to STRING. The default value is root. When the files in the package are installed on the managed server, they will be owned by the specified Unix user.

--ctlgroup STRING (Unix only)

Change the Unix group owner of the files in the control package to STRING. The default value is bin.

--pkgengine STRING (Unix only)

Change the native packaging engine. On systems that have multiple packaging engines available, use this command to switch between them. To view the available engines, issue the --help or --env commands.

Note that if you change the native packaging engine, no packages will be added to the software policy during the --upload operation.

--ignoreAbsolutePaths BOOL (Unix only)

Ignore the absolute paths in the archive. For example, the following is a binary archive with absolute paths:

% tar tvf test/bar/foo.tar
rw-r--r-- root/root 1808 2002-11-22 09:20:36 /foo/bar/baz.conf

If the --prefix is set to /usr/local then the install path is ambiguous: Should ISMTool install baz.conf as /foo/bar/baz.conf or /usr/local/foo/bar/baz.conf? If the answer is /foo/bar/baz.conf, then the developer must set the --prefix of the ISM to '/'. However, if the answer is /usr/local/foo/bar/baz.conf, then the developer must specify the --ignoreAbsolutePaths command.

--addCurrentPlatform (Unix only)

Add the current platform to the ISM's supported list. Note: This command does not make the ISM cross-platform. ISMs can be constructed on different SA-supported platforms. A platform is the combination of OS type and version. Example platforms are: Redhat-Linux-7.2, SunOS-5.9, Windows-2000. To view the currently supported platforms for an ISM use the --info command.

--removeCurrentPlatform (Unix only)

Removes the current platform from the ISM's supported platform list.

--addPlatform TEXT (Unix only)

Add to the ISM's supported platform list the platform specified by the TEXT. Because platform support and identification are dynamic, no error checking is done for --addPlatform. For this reason, the recommendation is to use --addCurrentPlatform instead of --addPlatform.

--removePlatform TEXT (Unix only)

Removes from the ISM's supported platform list the platform specified by the TEXT.

--target STRING (Unix only)

Warning: This command should only be used by experts.

Allow cross-platform packaging of the application package for the RPM packaging engine. The --target command must be used with --skipControlPkg. The format of the STRING is <arch-os>, for example, i686-linux or sparc-solaris2.7.

--skipControlPkg BOOL

Prevent the building of the control package. This command allows the ISMTool to support the packaging of files that have no need for a structured application control package.

--skipApplicationPkg BOOL

Prevent the building of the application package. This command allows the ISMTool to support the creation of a control-only ISM package. This feature can be used to build a controller for an application that is not installed or packaged with the ISMTool. Examples are controllers for core operating system functions, currently running applications that cannot be packaged, and specialized hardware.

--chunksize BYTES (Unix only)

Limits the number of bytes that will be inserted into an application package. (Heuristics are used to compensate for compression factors.) The binary archive (bar) directory may contain many archives from which to build the application package. If the chunksize is exceeded, then the application archives are grouped into several bins and each bin is turned into a-sub application package. The algorithm is a standard bin-packing heuristic. The movable units are binary archives within the bar directory.

For example, suppose that the output package format is an RPM and has five binary archives: a.tgz (100M), b.tgz(100M), c.tgz (200M), d.tgz (300M), and e.tgz(50M). If the chunksize is set to 314572800 (300M) then the output application bins will be:

part1( a.tgz, b.tgz, e.tgz ) == 250M
part2( c.tgz ) == 200M
part3( d.tgz ) == 300M

This would result in three application packages:

foobar-part0-1.0.0.i386.rpm
foobar-part1-1.0.0.i386.rpm
foobar-part2-1.0.0.i386.rpm

In general, the chunksize is not a problem unless the application package is almost a gigabyte in size. At that point, some package engines start breaking. The default chunksize is one gigabyte (2 ^30 bytes).

--solpkgMangle BOOL (SunOS only)

Prevent the ISMTool from changing the name of the application package to conform to Solaris requirements. For more information, see Solaris differences.

When creating a Solaris package, ISMTool must use a package name that conforms to the 9-character limit. However, it may be desirable to prevent ISMTool from changing (“mangling”) the package name during the --build process. When --solpkgMangle false is specified, ISMTool will use the ISM name when creating the application package. The control package name will continue to be mangled. Note that when --solpkgMangle is false, the ISM name must be 9 characters or less and there cannot be multiple application packages.

--embedPkgScripts BOOL

Embed the contents of the ISM packaging scripts (installation hooks) in the application package. This option must be used with --skipControlPkg and --skipRunTimePkg.

By default, the application package is built to call out to the ISM packaging scripts installed by the control package. The --embedPkgScripts option overrides this behavior by embedding the contents of the scripts found in the ism/pkg directory inside the application package. These scripts are invoked during the pre and post phases of the application package install and uninstall.

If one or more of the scripts in the ism/pkg directory are not needed, delete the scripts before the --build process. Note that RPM and LPP packaging engines do not have a checkinstall phase so the ism_check_install file is ignored when building RPMs and LPPs.

--skipRuntimePkg BOOL

Specify whether to build runtime packages during subsequent --build operations.

A runtime package is built by default. If --skipRuntimePkg true is specified, the runtime package will not be built during subsequent operations until
--skipRuntimePkg
false is specified. ISM utilities such as the parameters interface will fail if the runtime package cannot be located. Do not specify --skipRuntimePkg true unless you are sure the runtime package already exists on the managed server on which you’ll install the ISM.