Friday, May 26, 2006

Creating a Solaris package

This example shows how to create a Solaris package - useful for packaging files and scripts for deployment with the custom module of JET.

This will use the Dtrace scripts installed in /opt/DTT as an example.

1. Create the prototype file:

# cd /opt/DTT
# find . -print | pkgproto > prototype
# echo "i pkginfo=./pkginfo" >> prototype

2. Create the pkginfo file:

# cat > pkginfo
NAME="Dtrace scripts"
DESC="Dtrace scripts used for debugging applications and kernel operations"
ARCH="sparc,x86"
VERSION="1.00"
CATEGORY="application"
BASEDIR="/opt/DTT"
CLASSES="none"

3. Create the package:

# pkgmk `pwd`

This creates the package in /var/spool/pkg

4. Transform the package:

# pkgtrans -s /var/spool/pkg /u01/software/dtrace/dttrace.pkg

We can then use the copy_custom_product utility to populate the jumpstart directory.

No comments: