rpm: the good, the bad, and yum
exercise
rpm (Redhat Package Manager) packages are a delivery mechanism for software to linux systems. Each one contains a certain set of executable, configuration, documentation, and library files constituent to some program, for you to install. Often the set isn't complete as there are things the program needs but the package lacks because the package author assumed these would be present on your system or easily obtainable. When that's not true, the convenience of installing one rpm turns into the inconvenience of hunting for the others it needs.
A good solution to reconciling supply and demand of capabilities among
multiple rpm files is yum. Here, let's explore rpm "supply-and-demand"
to clearly understand the need that yum fills.
rpm economics
There is an "rpm economics" whereby packages have supply and demand. Each package contains certain capabilities (e.g., library files, called "shared objects") which are deployed when the package is installed. On the other hand package contents are usually incomplete, needing
capabilities that don't come with thr rpm in order to function. Some packages are generous, providing more capabilities than they require.
Conversely others are needy, requiring more than they provide.
Obtain the following rpm files:
mozilla-1.7.8-2.i386.rpm
switchdesk-4.0.6-3.noarch.rpm
vim-minimal-6.3.071-3.i386.rpm
Determine for each approximately how many capabilities it provides and how many it requires. For example:
rpm -q --requires -p switchdesk-4.0.6-3.noarch.rpm
shows the capabilities that must be already present for the switchdesk package to be complete. (If not complete, the package contents wouldn't function if installed and rpm refuses to install the package.) Count or estimate the number of capabilities shown,
either manually or by piping the output to linecounter "wc -l". Then replace "requires" with "provides"
in the above command, to
also find out what the switchdesk package provides for other software to utilize.
Remember this syntax and reuse it below.
Of the 3 packages, one tends to be generous, one needy, and one neither. Identify which is which.
Degree of generosity, degree of need
Acquire the following rpm files:
vim-minimal-6.3.071-3.i386.rpm
vim-enhanced-6.3.071-3.i386.rpm
a) Are these in the generous/giver/producer or needy/taker/consumer category?
b) Which of the two is moreso?
A big fat one
Acquire the following rpm file:
mozilla-1.7.8-2.i386.rpm
a) Is it in the generous or needy category?
b) Is it greatly so or slightly so?
Who gives what to whom?
Acquire the following rpm files:
openssh-4.0p1-3.i386.rpm
openssl-0.9.7f-7.i686.rpm
The openssl package provides something that the openssh package requires.
a) What is its name?
To find out, list and compare what openssl provides and openssh requires. The lists are short enough you can do it visually.
b) What does it do?
The name helps a little. You can also get an idea of its function by querying (
rpm -qip <packagefilename> )
for the "descriptive information" of the providing package.
c) What is its function?
openssh isn't the only package that utilizes this library provided by openssl.
d) what other packages installed on your machine employ it?
Use "rpm -q --whatrequires <name>" to find out.
Now that you know about (the limitations of) rpms, auto-location and
reconcilitation of interdependent packages is the job of yum.