Get, Install and Configure

Install

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

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 for sparc/i386 from http://mirror.opencsw.org/testing.html.

Install (sparc used in the example):

# gunzip pkgutil-1.4,REV=2009.01.19-SunOS5.8-sparc-CSW.pkg.gz
# pkgadd -d pkgutil-1.4,REV=2009.01.19-SunOS5.8-sparc-CSW.pkg

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

Manually get it from the mirrors

If you don't want to install a beta version from testing and you don't have pkg-get you can always manually add it directly from the mirrors. Browse one of the mirror sites to look for it in the root directory. In the example we use http://ftp.math.purdue.edu/mirrors/opencsw.org. Replace sparc with i386 if needed.

# wget http://ftp.math.purdue.edu/mirrors/opencsw.org/pkgutil-sparc.pkg
# pkgadd -d pkgutil-sparc.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

Upgrade

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

# pkgutil -u pkgutil

Basic usage

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

# pkgutil -i bash
Parsing catalog, may take a while...
New packages: CSWggettext CSWbash
Current packages: CSWcommon CSWexpat CSWiconv
Total size:   2.4 MB
2 packages to fetch. Do you want to continue? [Y,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.4, install Solaris packages the easy way.

Usage: pkgutil [option]... [package]...

  -i, --install         Install package
  -u, --upgrade         Upgrade package
  -r, --remove          Remove package
  -d, --download        Download only
  -a, --available       Show available packages
  -c, --compare         Compare installed packages to current
  -U, --catalog         Update catalog
  -e, --email=address   Send e-mail with available updates
  -t, --temp=site       Temporarily use this site as primary for download
  -s, --stream          Build a package stream
  -T, --target=arch:rel Specify architecture and OS release for stream
  -o, --output=file     File name for package stream (used with -s)
  -x, --exclude=package Package to exclude
  -W, --workdir=path    Path to use for downloads
  -y, --yes             Answer yes on all prompts
  -n, --nomod           No modifications are made to the system
  -D, --debug           Debug mode
  -h, --help            Show this help
  -v, --version         Show version
  -V, --syscheck        System check

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.

# Configuration file for pkgutil
#
# Nothing below is mandatory to change, pkgutil will use the default values
# noted below for each option unless something is uncommented

# Mirror to use for downloads
# See http://www.opencsw.org/mirrors for alternative mirrors
# Default: http://ibiblio.org/pub/packages/solaris/opencsw/unstable
#mirror=http://ibiblio.org/pub/packages/solaris/opencsw/unstable

# Solaris 10: If you wish to limit pkgutil to installing packages
# only to the global zone, then uncomment this line
# WARNING: do not modify this unless you know what you're doing
# Default: blank
#pkgaddopts=-G

# Flags for use with wget, e.g. "-nv" for less verbose or "-q" for quiet
# WARNING: do not modify this unless you know what you're doing
# Default: blank
#wgetopts=-q

# To enable use of gpg or md5, uncomment these
# NOTE: it doesn't make sense to use md5 but not gpg so your options should be:
#       1. both disabled, 2. gpg enabled, 3. both enabled.
# Default: false, false
#use_gpg=true
#use_md5=true

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.

Page tags: configure install
page_revision: 23, last_edited: 1255249157|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License