Oh, how I knew System V packages...

Back in the bad old days before ON and slim_source had moved to building only IPS packages, one could pkgadd -d SUNW and easily drop their test code on a machine. Now with the move to IPS packages getting the test code to a machine can be much easier but set up is a bit more complicated. There is a tool to do this automatically for ON called onu (see it in action here). However, for slim_source it is pretty easy to do manually -- once you know what you need to do.

Let's pretend everything's happy what do I do?

  1. Make a backup boot environment: beadm create
  2. Set your system-free -- uninstall the entire incorporation: pkg uninstall entire
  3. Add your new repository: pkg set-publisher -P -g file:///path/to/slim_source/pacakge//repo.redist install-nightly
  4. Install the new install consolidation incorporation: pkg install pkg://install-nightly/consolidation/install/install-incorporation
  5. Install you new package! pkg install pkg://install-nightly/install/installadm
Okay, let's not pretend everything's happy...

Okay, so the above is a pretty simple recipe and usually things will just work. However there are some cases were stuff gets a bit twisted up.

What if I have a test system not running the latest build?

With the change to IPS packages a new file was introduced in slim_source to tie the repository nightly(1) builds to a build number. If you are not running at least that build, you'll get a constraint error from IPS. You can change the build number in that file; or you can back-publish an install-incorporation to support the build(s) you need. To back-publish do the following: echo "" | pkgsend -s file:///path/to/slim_source/pacakge//repo.redist publish consolidation/install/install-incorporation-AT-0.5-DOT-11,5.11-

Then on the client may end up with a bit of funkiness. I've had to then use the full FMRI of the install-incorporation I want (e.g. pkg install pkg://install-nightly/consolidation/install/install-incorporation-AT-0.5.11.5-DOT-11,5.11-142:20100714T165848Z) and do manual dependency installation (i.e. IPS would say no package found for pkg://install-nightly/system/library/install and again I would have to install that package by full FMRI).

What if I don't want to use file:// paths?


You can stand-up these nightly(1) generated repositories just the same as any other. If you do not have NFS access on your test system this might work well. All one needs to do is the following: /usr/lib/pkg.depotd -d /path/to/slim_source/pacakge//repo.redist