|
Reformatting page. Please Wait... done
Maintenance Commands PKG-GET(1m)
NAME
pkg-get 3.x - automatic install and upgrade of packages over
the network
SYNOPSIS
pkg-get [modifiers] {-i|install} {pkgname [...]|all}
pkg-get [modifiers] {-d|download} {pkgname [...]|all}
pkg-get [modifiers] {-u|upgrade} [pkgname...]
pkg-get [modifiers] {-c|compare} | {-a|available}
pkg-get [modifiers] -D [regexp to search for]
pkg-get {-l|list}
MODIFIERS
-U|updatecatalog
-s url://temp.site/path
-S|sync
-f
DESCRIPTION
pkg-get is similar to Debian Linux "apt-get". Its most basic
use is that you tell it the name of a software package, and
it automatically goes and grabs it from the net, then
installs it on your system. It also has an upgrade mode that
installs newer versions of software you have installed, if
available.
In version 2.0, optional checksum support has been added. If
the remote site has md5 hashes for files, and you have
either md5 or gmd5sum in your PATH, downloaded files will be
checked against the catalog's hash. Additionally, if you
try to re-download a file you already have, and it matches
the checksum, it will skip the download of that specific
file as unneccessary.
MODES
pkg-get available
will show you a list of freeware packages available to
install
pkg-get describe {pkgname, or partial name}
will show you descriptions of one, or all, packages
available
pkg-get install {pkgname [pkgname...] | all}
Phil's Software Last change: September 9th, 2007 1
Maintenance Commands PKG-GET(1m)
will install listed packages. If 'all' is specified,
will install all packages available, at the latest ver-
sion.
pkg-get upgrade [pkgname [pkgname...]]
will automatically upgrade the listed packages to the
latest version. If no arguments, will upgrade all
packages that are already installed.
The upgrade option will remove any older versions of
packages for you. It will also automatically choose the
highest revision of a package to download, if there are
multiple available.
OPTIONS
-U|updatecatalog
Grabs the latest catalog from the site before doing
anything else. May be used as a command by itself. All
"compare versions" operations are done on the locally
cached copy of the catalog. pkg-get will automatically
update the catalog if it is older than a month.
-d|download
Downloads the pkg file, and does NOT install. Useful if
you're trying to create a local archive of pkg files
-v This is only meaningful for the 'install' option,
without arguments. It adds "verbose" mode, to tell you
what would be upgraded.
BUT... it stops the program actually downloading any
newer files!
-i|install [softwarename]
Looks through all packages you have installs, and com-
pares them to the latest available on the site. If the
site has newer versions, it will download and install
all newer versions of software you already have. It
will NOT install packages you do not already have
installed.
If you specify a particular software name, it will
first look up the specific software name in the local
contents cache. If you already have the same version
installed, says so and quits. Otherwise, if it is
available, pkg-get will download and install it.
-u|upgrade
Attempts to upgrade any installed packages that have
newer versions available on the site.
Phil's Software Last change: September 9th, 2007 2
Maintenance Commands PKG-GET(1m)
-S|sync
When in upgrade mode, tells pkg-get to sync pacakges to
the version of the package on the software site,
reguardless of whether it is newer or older, than what
is installed. Warning: This may not always work
cleanly, if dependancies in the locally installed pack-
age are radically different from ones for the older
version on the software site. But generally speaking,
it should work well as a "revert to earlier state"
tool.
-a|available
This just prints out the software name and revision of
all packages available for download. It is automati-
cally piped to "more" or similar pager.
-D|describe
Prints out longer descriptions of software, if avail-
able. Can take a regular expression as an argument, to
only print out lines that match the regular expression.
-c|compare
Display a comparision of versions between installed
packages, and what is available on the site. If you do
not have a package installed, it will show "not
installed" for the local version stamp.
-l|list
Print out a software-name based list of all installed
packages that pkg-get recognizes from the current cata-
log. This is useful if you want to duplicate the same
installed packages on a first machine, to another
machine, via pkg-get install `cat list`
-f Force default action on pkg add or remove; Dont ask
questions. This may mean that it will refuse to
install some packages, depending on what the pkgadd
defaults are, whether there are conflicts, etc. The
'normal' defaults are specified in
/var/sadm/install/admin/default. See the "MORE AUTOMA-
TION" section at the bottom of this manpage.
-r|remove
This option was added by request. However, it is
inherently not as bulletproof as the other options,
because nothing in the site catalog says that the pkg
version and the software version have to match. How-
ever, it should work as expected 95% of the time. And
worst case, it will ONLY remove packages that are on
the remote site catalog; It should not remove Solaris
packages.
Phil's Software Last change: September 9th, 2007 3
Maintenance Commands PKG-GET(1m)
PROXIES
See /opt/csw/etc/pkg-get.conf for comments on how to use
wget behind a proxy. Basically, just export the environment
variables http_proxy and ftp_proxy. The conf file lets you
do that without messing with users' environments directly.
MORE AUTOMATION
If you dont like answering pkgadd prompts, you can create an
'admin' file, as /var/pkg-get/admin
A sample 100% hands-off admin file is provided, as
/var/pkg-get/admin-fullauto. It will no longer give you
warnings about setuid installscripts, conflicts, and other
issues. However, it may still ask you in some instances,
"Do you want to install/remove this package", unless you use
the -f option to pkg-get. Contrariwise, if you use -f
without overriding the defaults, pkg-get will not install a
non-trivial amount of packages.
For full details of the format of the admin file, man -s4
admin.
FILES
/etc/opt/csw/pkg-get.conf
/opt/csw/etc/pkg-get.conf
/var/pkg-get/catalog-sitename
/var/pkg-get/admin
/var/pkg-get/admin-fullauto
BUGS
I wouldn't be surprised if there are one or two bugs to be
worked out. If so, please email me about them!
SEE ALSO
If you are interested in setting up your own local freeware
server,
http://www.bolthole.com/solaris/makecontents
is the tool needed to automatically generate the catalog for
each directory.
AUTHOR
Philip Brown
phil@bolthole.com
http://www.bolthole.com/solaris/
Phil's Software Last change: September 9th, 2007 4
Maintenance Commands PKG-GET(1m)
Phil's Software Last change: September 9th, 2007 5
|