Java Tools For Packaging

Packages are configured, built and installed by means of Java classes located in the directory /hsphere/local/home/cpanel/shiva/psoft/hsp/tools/:

Package Configurator

Package Configurator (PkgConfigurator) is a tool to configure directory structure for assembling Parallels H-Sphere packages. PkgConfigurator creates the package directory skeleton and populates it with files used by the package. The parameters specify the types of the files and where they must be copied from. The source locations must have the correct directory structure. If the path parameter is omitted, the directory skeleton is created empty, and the files will have to be copied manually.

java psoft.hsp.tools.PkgConfigurator

--with-prefix[=/path/to/directory]

[ --with-templates[=/path/to/directory] ]

[ --with-images[=/path/to/directory] ]

[ --with-properties[=/path/to/directory] ]

[ --with-xmls[=/path/to/directory] ]

[ --with-classes[=/path/to/directory] ]

[ --with-scripts[=/path/to/directory] | --with-scripts-advanced[=/path/to/directory] ]

[ --with-scripts-advanced ]

[ --with-lang-bundle[=/path/to/directory] ]

[ --with-preinstall[=/path/to/file] ]

[ --with-postinstall[=/path/to/file] ]

[ --with-preupgrade[=/path/to/file] ]

[ --with-postupgrade[=/path/to/file] ]

[ --with-preuninstall[=/path/to/file] ]

[ --with-postuninstall[=/path/to/file] ]

[ --with-jars[=/path/to/directory] ]

[ --with-rpms ]

[ --with-tarballs ]

[ --with-sql[=/path/to/file] ]

[ --with-sql-uninstall[=/path/to/file] ]

[ --with-sql-upgrade[=/path/to/file] ]

[ --with-uninstall-sql[=/path/to/file] ]

[ - l log_file [ -dl ] ]

Allowed parameters:

Example:

java psoft.hsp.tools.PkgConfigurator --with-prefix=./SuperPKG --with-templates --with-classes --with-scripts --with-properties -l conf.log -dl

The package source files consisting of templates, Java classes, system scripts and the custom properties file will be copied to the SuperPKG subdirectory of the current directory.

Package Builder

Package builder is a tool to build a package as one jar file after the package is pre-configured by package configurator and all required tuning is performed. Package builder checks if all required files in the package source directory are present, checks the config file and the package properties file if they are present, forms one jar file from Java classes if they are present and makes a package as one jar file with .hsp extension.

java psoft.hsp.tools.PkgBuilder --with-source=/path/to/package/source

Example:

java psoft.hsp.tools.PkgBuilder --with-source=./SuperPKG

Package Installer

java psoft.hsp.tools.PkgInstaller --package=/path/to/package/file [--upgrade] [--check-only] [--force]

Options:

[--upgrade]

Use this option if you upgrade the package already installed on your Parallels H-Sphere. With this option, you can easily upgrade the package without uninstallation of the older package and restarting Parallels H-Sphere after the uninstallation.

Package Uninstaller

java psoft.hsp.tools.PkgUnInstaller --pkg-name=PACKAGE_NAME [--force]

Options:

Package Checker

Scripts, tarballs, and rpms included into Parallels H-Sphere packages are copied to the ~cpanel/shiva/packages/PACKAGE_NAME directory on the CP server. If needed, use java psoft.hsp.tools.PkgRecheck to check package integrity and reinstall the missing files from the *.hsp file.

This is true only for new Parallels H-Sphere packages. You will need to copy *.hsp packages already installed on your boxes to the corresponding ~cpanel/shiva/packages/PACKAGE_NAME directories on the CP server.

java psoft.hsp.tools.PkgRecheck [--pkg-name=PACKAGE_NAME] [--force]

Options: