How to install and configure pkgutil
From Blastwave Wiki
Introduction
Pkgutil, written in Perl and licensed under GPL, is a tool to make installation of packages in Solaris easier. It handles package dependencies so all required packages are installed before the desired package automatically. This is based on functionality present in apt-get (Debian Linux).
The official wiki site for pkgutil is http://pkgutil.wikidot.com/, look there for the latest news regarding pkgutil.
Look for the latest pkgutil package for Blastwave in the testing area: http://www.blastwave.org/testing/. Note that a new version may not always be available from there.
Install (sparc used in the example):
# gunzip pkgutil-1.2,REV=2008.11.12-SunOS5.8-sparc-CSW.pkg.gz # pkgadd -d pkgutil-1.2,REV=2008.11.12-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.
If you already have pkg-get set up you can upgrade like this to get the latest released version of pkgutil:
# pkg-get -i pkgutil # pkgrm CSWpkgget
If you don't have pkg-get installed and want the latest released version of pkgutil you have to manually download it from the mirror sites. Browse one of the mirror sites first to look for the latest release, in the example we use http://blastwave.network.com/csw/unstable/sparc/5.8/, replace sparc with i386 if needed.
# wget http://blastwave.network.com/csw/unstable/sparc/5.8/pkgutil-1.2.1,REV=2008.11.28-SunOS5.8-sparc-CSW.pkg.gz # gunzip pkgutil-1.2.1,REV=2008.11.28-SunOS5.8-sparc-CSW.pkg.gz # pkgadd -d pkgutil-1.2.1,REV=2008.11.28-SunOS5.8-sparc-CSW.pkg
Now you can install packages with all required dependencies with a single command:
# pkgutil -i CSWbash Recursively checking catalog, may take a while... New packages to install: CSWggettext CSWbash Current packages: CSWcommon CSWexpat CSWiconv Download size: 2.4 MB 2 packages to download. 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 force (-f) 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.2, 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 -f, --force 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 /etc/opt/csw/pkgutil.conf. The only thing you normally need to change there is the mirror location. If you have a pkgutil.conf file in /opt/csw/etc it will only be used if there's none in /etc/opt/csw. 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.blastwave.org/mirrors.php for alternative mirrors # Default: http://blastwave.network.com/csw/unstable #mirror=http://blastwave.network.com/csw/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
