This tool simplifies fetching the latest version of a package from compatible sites to be as simple as
# pkg-get install gccThis will automatically download the appropriate version for your architecture and OS revision (if available), and install the package. If you have an older version already installed, using 'upgrade' instead of 'install' will replace the older version with a newer one, if available.
The pkg-get (and pkgadm) utility is configurable, so that if you sent up a local copy of the package archives, you can use THAT server instead of going out to the internet.
Get the architecture-neutral (works for sparc and x86) package by SHIFT-clicking on:
BOLTpget.pkg v1.9.9 (last update, Dec 6, 2002)
Once downloaded, install with
Occasionally, there have been problems downloading the .pkg file. If you cannot download the .pkg file, shift-click to download this UU-Encoded Version. runuudecode BOLTpget.pkg.uue
, and you will then have the BOLTpget.pkg file
# pkgadd -d BOLTpget.pkgand run '
pkg-get -U
' to initialize the local catalog of
available packages. Then you're all set to go!
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 gdb [Not installed] 5.0
The "available" command just prints out the left and right column. Whereas "compare" takes extra time to generate the middle column of what version is installed locally.
To adjust the config file, first
run 'pkg-get
' by itself to generate a default configuration file.
Then edit /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.
And even if you are in the US, sometimes the main site is slow, so you'll prlbably want to change your default site anyway.
After running pkg-get once to create the default config file, /etc/pkg-get.conf, edit that file, and change the url to point to one of the sites mentioned by http://www.sunfreeware.com/ftp.html
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
If you dont have ftp access for some reason, you can now tell pkg-get to use http URLs instead. Here is a partial list of potential sunfreeware.com mirror sites you can access via http:
http://mirrors.xmission.com/sunfreeware | (USA) |
http://www.planetmirror.com/pub/sunfreeware | (Australia) |
http://sunsite.univie.ac.at/pub/solaris/smc | (Austria) |
http://www.imtech.res.in/pub/mirror_sites/sunfree | (India) |
http://mirror.nucba.ac.jp/mirror/solaris-freeware | (Japan) |
http://SunSITE.sut.ac.jp/pub/sun-info/Solaris | (Japan) |
http://ftp.sunet.se/pub/vendor/sun/freeware | (Sweden) |
Just pick the site "closest" to you, and adjust the url line in
/etc/pkg-get.conf
. But you must have
pkg-get from Oct 29, 2001 or newer, to use http as a transport.
("pkginfo -l BOLTpget
" should say VERSION: 1.8
or better.)
Author:Philip Brown
[available for after-hours consulting]
More Solaris stuff
Bolthole Top