Reputation: 737
I distribute my product as an RPM, and would like to use Requires
tag for dependencies enforcement.
How do I generalize the dependency package version, in order to support different OS versions my users might have (which affects the dependency package build)?
For example, openssl packages might be one of the following, depends on the user CentOS
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)
Upvotes: 3
Views: 219
Reputation: 80931
Requires: openssl
will cause your package to have an unspecific openssl
requirement.
That, however, will not help you if your package links against the openssl libraries (as opposed to just using the openssl
command line tool, etc.) because rpm
will pick up the shared library dependencies itself and include them (by version/etc.) in the requirements of your package.
You can turn that off by disabling automatic requirements processing (but in CentOS 5 that is an all-or-nothing proposition) but that still won't help anything actually run on all the CentOS versions. For that you'd need to include three different versions of the library/binary. One each that links against each version of openssl from each version of CentOS (though possibly just one for CentOS 6 and CentOS 7 since they are both on 1.0.1
).
Upvotes: 2