Solaris Packages
(Please add to this page!)
Getting Package Information
Some commands to help you get package information on Solaris. These are rough equivalents of the
rpm commands that I use every day on Linux.
Linux |
Purpose |
Solaris |
Notes |
rpm -i /path/to/foo rpm -U /path/to/foo |
Install a package by hand |
pkgadd -d /path/to/foo |
|
rpm -qf /usr/bin/foo |
Which package is this file in? |
pkgchk -lp /usr/bin/foo |
However it doesn't complain if a file is in two or more clashing packages! |
rpm -ql foo |
List files in an installed package |
pkgchk -v foo |
|
rpm -qa |
List all the packages |
pkginfo |
|
rpm -qa | grep whatever |
List all the whatever packages |
pkginfo | grep whatever |
|
rpm -qi foo |
Get info about an installed package |
pkginfo -l foo |
|
rpm -q foo |
Get the version number of an installed package |
pkginfo -x foo |
|
Packages, Clusters and Metaclusters
Note that Solaris packages are not quite equivalent to RPMs as Solaris also has the concepts of
clusters and
metaclusters. A cluster is a bundle of packages. A metacluster is a bundle of clusters and packages. Clusters and metaclusters are defined (by Sun) in
/var/sadm/system/admin/.clustertoc
. A word of warning: clusters can come and go, and their contents can change, even if the OS version stays the same (when a patch is applied? when software is installed? when hardware differs?). Furthermore,
even if a cluster's list of constituent packages is changed, the cluster's version number may stay the same as it was before the change.
Solaris Package Companion
This should be worth a look when we think about improving updaterpms/updatepkgs:
http://www.opensolaris.org/os/project/svr4_packaging/package_companion/
The Solaris Package Companion is a small Korn shell script that allows you to ask quite a number of interesting questions about the relationships between Solaris metaclusters, clusters and packages as well as their respective dependencies. Very often, answers to these kinds of questions are essential for the construction of minimized systems as well as more generally for OS golden images.
The goal of the Solaris Package Companion, or SPC for short, is to do all of the hard work so you don't have to. SPC will create a small cache by mining information from the various packaging files and directories to allow you to quickly and easily obtain answers to a variety of questions such as:
- What clusters or packages are contained in a given metacluster?
- What packages are contained in a given cluster?
- What metacluster or cluster contains a given package?
- On what other packages does a given package or cluster depend?
- Which packages depend on a given package?
- … and so on…
--
ChrisCooke - 23 Jan 2007
Topic revision: r5 - 24 Jan 2007 - 11:16:49 -
ChrisCookeDICE.MPUSolarisPackageFolklore moved from DICE.MPUSolarisPackageCommands on 17 Jan 2007 - 12:13 by ChrisCooke -
put it back