Issue
One of the interesting features of RPM is that it will look at shared objects, find out what they're linked against, find out what packages provide those linked shared libraries, and automatically install those dependent libraries as part of the installation of the compiled shared library.
If libnaftuli is linked against libbz2, for instance, rpm-build will specify the dependency in the libnaftuli RPM without my having to declare it in my .spec file.
Should I still declare those dependencies in my spec file then? I suppose that I should declare ambiguous dependencies, but otherwise should I still manually figure out what my libraries link against and specify their requires clauses, or just let rpm-build be smart?
Solution
The automatic dependencies added by rpmbuild
are helpful, but they do not do everything. Explicit Requires
tags can do these extra things:
- tell
rpm
that it is okay to install your package with specific versions (including a range of versions) of a given dependency. - tell
rpm
that the package depends upon a virtual package, e.g., a package which provides the "same" functionality but under different names (such as saying any Java package).
Further reading:
- Manual Dependencies (Maximum RPM)
- How can I make an RPM depend on package a OR package b?
- Creating a Virtual Java RPM
Answered By - Thomas Dickey Answer Checked By - Gilberto Lyons (WPSolving Admin)