Email Address Password
Remember Me

Or Create a (Free) Account.
2004JanFebMarAprMayJunJul Aug Sep Oct Nov Dec
2005 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2006 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Oct Oct

Tue 20th Dec 08:48 2011: Solaris Packaging with Zones

One handy use for Solaris Zones that I have come across recently, is a very quick and easy way to build packages. Rather than "polluting" the main filesystem tree with the software to be packaged, simply create a zone, install the software there, and as a final act, you can even prune unwanted parts of the tree before packaging it up and disposing of the zone.

I had some software to install into /usr/local; the existing tree includes some (non-essential) software already in /usr/local, so I created a full-root zone, cleaned /usr/local within the zone, built the software (configure && make && make install), which was actually Perl, some third-party libraries, and 30 or so modules, and tested it in the zone.

Then to package it up, simply drop back to the global zone:

# cd /tmp/pkg
# echo "i pkginfo" > prototyp
# pkgproto /zones/myzone/root/usr/local=/usr/local >> /tmp/pkg/prototype
# cat - > pkginfo << EOF
NAME=Perl Stuff
# pkgmk

The package is ready in /var/spool/pkg/MYperl. You can use pkgtrans to ocnvert this into a MYperl.pkg file.

Comments for 'Solaris Packaging with Zones'

You could post a comment if you were logged in.

You are logged in as 0

create an account

Steve's urandom blog
Share on Twitter Share on Facebook Share on LinkedIn Share on Share on StumbleUpon
My Shell Scripting Book:
    Shell Scripting, Expert Recipes for Linux, Bash and more
is available online and from all good booksellers: