How to generalize a 3rd party dependency package version with an RPM spec file?

I am distributing my product as RPM and would like to use a tag Requires

to enforce dependencies.

How do I generalize the version of the dependency package to support the different OS versions my users may have (which affects how the dependency package is built)?

For example, openssl packages can be one of the following, depending on the CentOS

user's version :

openssl-0.9.8e-31.el5_11.<arch>.rpm (CentOS-5.11)
openssl-1.0.1e-30.el6_6.2.<arch>.rpm (CentOS-6.6)
openssl-1.0.1e-34.el7_0.6.<arch>.rpm (CentOS-7.0.1406)

      

+3


source to share


1 answer


Requires: openssl

will cause your package to have a non-specific requirement openssl

.

This, however, won't help you if your packages link against the openssl libraries (as opposed to just using a command line tool openssl

, etc.) because it rpm

picks up its own libraries and includes them (by version / etc.) according to the requirements of your package.



You can disable this feature by turning off automatic claim handling (but on CentOS 5, which is an all-or-nothing proposition), but that still doesn't help anything on all versions of CentOS. To do this, you need to include three different versions of the library / binary. They each link to every openssl version from every CentOS version (although maybe only for CentOS 6 and CentOS 7 as they are both on 1.0.1

).

+2


source







All Articles