This tool simplifies fetching the latest version of a package from compatible sites to be as simple as
# pkg-get install gcc
This will automatically download the appropriate version for your architecture and OS revision (if available), and install the package. If you have an older version of the package already installed, using 'upgrade' instead of 'install' will replace the older version with a newer one, if available.
If the archive supports dependancies, pkg-get will also download any needed dependancies. For example
pkg-get install mod_phpshould triger an automaticpkg-get install apachewhich in turn should automatically triggerpkg-get install openssl
A site that supports these dependancies is www.blastwave.org. Currently, as of Feb 2003, sunfreeware.com does not support dependancies.
Here's some sample output:
junior# pkg-get compare
software localrev remoterev
aalib [Not installed] 1.2
apache [Not installed] 1.3.9
autoconf [Not installed] 2.13
automake [Not installed] 1.4
bash [Not installed] 2.03
bison [Not installed] 1.28
bzip2 [Not installed] 0.9.0c
cvs [Not installed] 1.10.7
emacs [Not installed] 20.4
enscript [Not installed] 1.6.1
expect [Not installed] 5.32
flex [Not installed] 2.5.4a
gawk [Not installed] 3.0.4
gcc 2.95.2 SAME
gdb [Not installed] 4.18
... ... ...
If you dont want to see the local status of packages, but just see what is available for download, "pkg-get available" will print out just the software name and remote revision available.
With pkg-get v2.0, you can also see a list of software descriptions, for
sites that provide a 'descriptions' file.
Sample output:
$ pkg-get describe # (Descriptions from site ibiblio.org ) aalib - Ascii art graphics library achievo - Project Management tool, in PHP apache - apache webserver with mod_ssl included autoconf - GNU auto-configuration tool automake - GNU makefile autogenerator tool berkeleydb3 - file based pseudo-database library berkeleydb4 - embedded database libraries and utilities binutils - GNU 'binary utilities': gas, gld, gprof, and others bison - GNU yacc parser generator ccache - Compiler Cache caches gcc output files cdrtools - tools for ripping from and recording to CDs and DVDs common - common files and dirs for CSW packages ....
You can even search for things using regular expressions
# ( -D is synonymous with describe ) $ pkg-get -D '^g.. ' # (Descriptions from site ibiblio.org ) gdb - The GNU Debugger gm4 - GNU m4 Unix macro processor gtk - the Gimp ToolKit library, libgtk
To adjust the config file, you may first have to
run 'pkg-get' by itself to generate a default configuration file.
Then edit [basedir]/etc/pkg-get.conf in your favourite editor and
follow the directions in it to tell wget to go thorugh the ftp proxy, if it
is not already configured to do so.
[basedir] will only be meaningful if you have installed pkg-get to
somewhere other than /usr/bin. For example, if pkg-get is in
/opt/csw/bin/pkg-get, then the config file will be in
/opt/csw/etc/pkg-get.conf
To temporarily change the site you connect to,
(if the main site is down or slow, for example)
specify an alternate siite with
pkg-get -s ftp://tmp.site/path/url.
Note that you'll have to first run
to get the catalog for that site, before you can use the 'install' subcommand.pkg-get -s ftp://tmp.site/path/url -U
To make your own software archive for pkg-get, you can use the makecontents script
The older version of pkg-get can be obtained by SHIFT-clicking on:
BOLTpget.pkg v1.9.9 (last update, Dec 6, 2002)
Occasionally, there have been problems downloading the .pkg file.
If you cannot download the .pkg file,
shift-click to download this UU-Encoded Version.
run uudecode BOLTpget.pkg.uue, and you will then have the
BOLTpget.pkg file
Once downloaded, install with
# pkgadd -d BOLTpget.pkgand run '
pkg-get -U' to initialize the local catalog of
available packages, after tweaking the url in pkg-get.conf
Then you're all set to go!
| If you would prefer a more menu-driven approach than pkg-get's pure commandline interface, please try pkgadm. The download page also has a screenshot of what it looks like in comparision. pkg-get has more features, however. |
There are currently over 900 packages available (Jan 2005), with more on the way.
Please visit The CSW package site, www.blastwave.org, to see the latest in binary packages for Solaris.
www.blastwave.org also hosts downloads for pkg-get version 2.
Since no other binary archive site has chosen to support the extra features
for version 2, [like searchable descriptions, gpg signed packages, and others]
pkg-get v2 is
only available from there
Author:Philip Brown
Part of bolthole.com...
Solaris tips ...
ksh tutorial ...
AWK tutorial ...
OO Programming tutorial