rpmrpmbuild

Should I still declare Requires dependencies for other shared objects?


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:

    Further reading: