Toolserver:Admin:pkgbuild

pkgbuild is a tool from Sun which builds Solaris packages from RPM spec files. We use pkgbuild to build the TS-local software packages.

If you want to update a package, you have to remove it on hemlock first, update the version-number in the .spec-file and re-install it (see Creating a new package).

Creating a new package

 * Note: You must do this on hemlock, or another administrative system, not a login server.

First, check out the ts-specs repo:

For a trivial program (one that is not a library or a daemon, and doesn't need a 64-bit version), copy an existing spec file (e.g. ) to a new spec in the appropriate category. Edit it and make any necessary customisations. Most things should be fairly obvious.

Then build it:. If the build succeeds, install it on the current system:, and make sure it works.

Once the package is ready, upload it to the Puppet package repository: % ./upload whatever/TSmyprog.spec

After uploading the package, use Puppet to install it on all hosts.

Once you're done, commit the package back to SVN.

Library packages
Packages which deliver libraries should be compiled for both 32- and 64-bit systems. This means that all programs can link against the library.

To build both easily, you need two spec files: the base spec, and the master spec. The base spec understands how to build the software, but doesn't know anything about packaging it. There are examples of base specs in the  directory that should work for most libraries.

The master spec uses the base spec to build both 32- and 64-bit versions of the package. See  for an example of a library master spec.

Daemons
Daemon programs should deliver an SMF manifest to allow the program to be started. See  for an example of a package that delivers an SMF manifest and method file from.

Category:Admin:Software