[TriLUG] RHEL packages and their RPMs

Steve Holton sph0lt0n at gmail.com
Fri Jun 10 14:16:33 EDT 2011


This from memory, years ago. Things hopefully have gotten better since.

For any given package you *know* you need, you can ask the package
itself what it depends on using a command like:

rpm -q --requires <package>

This will return a list of other packages which <package> needs in
order to work properly.
In some cases, the required package will be one already on your
"*know* you need" list, in other cases it will need to be added to
your list, which means you'll need to also ask
/that package/ what other packages it needs.

In theory, you eventually wind up with the complete dependency tree
for a package listing only those packages which are absolutely
necessary.

In practice, this *never* works because:
a) the dependency list in the Red Hat package manager (rpm) is
manually managed, meaning it lists only those packages the packager
thought to include in the dependency tree. If the packager missed
something, your tree will be missing something.
b) the dependency tree is technically not based on required packages
but rather on required capabilities. Since there can be many different
packages which provide the same capability, the 'requires' list only
really shows one of the packages which might suffice.
c) at the very base level, you tend to get below the point where the
rpm package manager itself is needed. For example, you can build a
host for a linux kernel with little more than init strapped onto a
filesystem. If you are expecting to manage the *install* of your
custom application stack using rpm, you'll build a fairly large
dependency tree on top of this before you can even install RPM. And (I
suppose) technically the dependency tree for installing an application
could be different from the dependency tree for *running* that
application.

It's an excellent exercise to increase your understanding of the
complexities of packaging (which is at least as complex as
programming) but if you're just looking to "get 'r done" then start
with a base distro somebody else has already put together (a LAMP
stack will be pretty common) and focus on the things you really need
to customize.

-- 
Steve Holton
sph0lt0n at gmail.com



More information about the TriLUG mailing list