Get, Install and Configure

Requirements

  • Solaris 8 or newer
  • Pkgadd patch 110934/110935 for Solaris 8 and 113713/114568 for Solaris 9
  • Perl somewhere in your path (5.5.3 that came with Solaris 8 is ok, CSWperl is recommended)

Install

There's a few alternatives available on how to get and install pkgutil.

Manually get it from the mirrors

If you want to use a ready built package you should get it from an official mirror (list available here: http://www.opencsw.org/get-it/mirrors). Browse one of the mirror sites to look for it in the root directory. In the example we use the master mirror.

# wget http://mirror.opencsw.org/opencsw/pkgutil.pkg
# pkgadd -d pkgutil.pkg

For Solaris 10 you can do this with one command:

# pkgadd -d http://get.opencsw.org/now

It's recommended to add /opt/csw/bin to root's PATH if you haven't done that already. You should also make sure that wget can download files through your proxy if you have one, you should set this personally in ~/.wgetrc or globally in /etc/wgetrc.

Upgrade from pkg-get

If you already have pkg-get set up you can upgrade like this:

# pkg-get -i pkgutil
# pkgrm CSWpkgget

Latest test release (if available)

Note that test releases are not always available. In that case follow the instructions on how to install a stable release.

Download pkgutil from http://mirror.opencsw.org/experimental.html#pkgutil. This is mostly if you need the latest features/fixes.

Install:

# gunzip pkgutil-2.6b1,REV=2011.12.14-SunOS5.9-all-CSW.pkg.gz
# pkgadd -d pkgutil-2.6b1,REV=2011.12.14-SunOS5.9-all-CSW.pkg

Latest development version

If you want to help testing pkgutil you can get the latest files directly from the repository at SourceForge. Note that this is not meant for production!

# svn co https://pkgutil.svn.sourceforge.net/svnroot/pkgutil/trunk

If you have previously checked out all files (with the above command) you can easily update. From the directory containing the files you want to update:

# svn update

Normal upgrade

If you already have an older version of pkgutil you can upgrade it to the latest:

# pkgutil -u pkgutil

Note: make sure to take a look at pkgutil.conf.CSW from the new package, it may contain new options your current pkgutil.conf does not have.

Basic usage

Now you can install packages with all required dependencies with a single command:

# pkgutil -i bash
Parsing catalog, may take a while ...
Install NEW packages:
        CSWbash-4.1.0,REV=2010.01.07
        CSWggettextrt-0.17,REV=2009.02.13
CURRENT packages:
        CSWcommon-1.4.7,REV=2009.09.20
        CSWiconv-1.13.1,REV=2009.07.31
Total size: 2.4 MB
2 packages to fetch. Do you want to continue? [Y,n] n

In the example above you can see that to install CSWbash we also need to install CSWgettext, the other dependencies are already installed and up to date. The download size for the two needed packages is 2.4 MB. A prompt is shown when multiple packages are needed as this might be a surprise sometimes, if the yes (-y) option is used no prompt is shown and the pkgrm/pkgadd operation is also without prompts.

Just type pkgutil with no options or arguments to see a short help text:

# pkgutil
pkgutil 1.10, install Solaris packages the easy way.

Usage: pkgutil [option]... [package](-[version])...

  -i, --install         Install package
  -u, --upgrade         Upgrade package
  -r, --remove          Remove package (experimental)
  -d, --download        Download only
  -U, --catalog         Update catalog
  -a, --available       Show available packages
      --describe        Describe available packages
  -c, --compare         Compare installed packages to current
  -C                    Same as -c but only show different versions
  -e, --email=address   Send e-mail with available updates
  -t, --temp=site       Temporarily use this site as primary for download
  -x, --exclude=package Package to exclude
  -W, --workdir=path    Path to use for downloads
      --config=file     Use this configuration file
  -y, --yes             Answer yes on all prompts
  -f, --force           Force updates (sync with mirror)
  -n, --nomod           No modifications are made to the system
  -N, --nodeps          No dependencies
  -D, --debug           Debug mode
      --trace           Set trace mode (-v) for pkgadd/pkgrm
  -h, --help            Show this help
  -v, --version         Show version
  -V, --syscheck        System check
  -L, --listfile        List files in package
  -F, --findfile        Find files in package
      --extract         Extract package content (use with -d)
  -s, --stream          Build a package stream (use with -d)
  -o, --output=file     File name for package stream (use with -s)
  -T, --target=arch:rel Specify architecture and OS release for download
      --single          Single package check (use with -c)
  -p, --param=opt:val   Override configuration option

Example: pkgutil -i CSWwget (install wget and its dependencies)

Written and maintained by Peter Bonivart.

More documentation can be seen with "perldoc pkgutil" or "man pkgutil".

Configuration

There's a configuration file in /opt/csw/etc/pkgutil.conf. The only thing you normally need to change there is the mirror location. If you have a pkgutil.conf file in /etc/opt/csw it will override the one in /opt/csw/etc on a setting-by-setting basis. If no pkgutil.conf is found in either of those two locations defaults are used.

Version compare method

This is how a compare is done when deciding which packages to update, first match out of four cases:

installed          catalog          result                 example
===================================================================================================
both version strings are the same   same                   1.2.3 vs 1.2.3
                                                           1.4k vs 1.4k
                                                           1.0,REV=2008.09.30 vs 1.0,REV=2008.09.30
---------------------------------------------------------------------------------------------------
no REV-string      REV-string       catalog is newer       1.1 vs 1.1,REV=2008.09.30
---------------------------------------------------------------------------------------------------
REV-string         REV-string       compare REV-strings    2.4,REV=2007.01.02 vs 2.4,REV=2008.09.30
---------------------------------------------------------------------------------------------------
no REV-string      no REV-string    catalog is newer       3.2 vs 3.3
                                                           1.5beta1 vs 1.5rc1
                                                           4.3.2 vs 20090125

Note that the normal version part is never compared which opens up for more free use of it. Today we have to use the "_rev=beta1" notation to keep version purely numeric. That means a package like openssl could change from todays 0.9.8,REV=2008.10.05_rev=i to 0.9.8i,REV=2008.10.05.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License