Reputation: 1163
I have an RPM package mypackge
and recent changes my software have required me to add OpenSSL v1.0.2 as a dependency.
Initially the RPM spec contained the following requires line:
Requires: openssl policycoreutils-python python2-pip ...
I have updated this line to:
Requires: openssl >= 1.0.2 policycoreutils-python python2-pip ...
This seems to work perfectly for new installs, the new dependency is resolved and installed as expected. The problem comes when I try to update an existing installation...
[root@vm]# yum install mypackage-1.2.1.4-1.x86_64.rpm
Loaded plugins: fastestmirror
Examining mypackage-1.2.1.4-1.x86_64.rpm: mypackage-1.2.1.4-1.x86_64
Marking mypackage-1.2.1.4-1.x86_64.rpm as an update to mypackage-1.2.1.3-1.x86_64
Resolving Dependencies
--> Running transaction check
---> Package mypackage-1.2.1.3-1 will be updated
---> Package mypackage-1.2.1.4-1 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================
Package Arch Version Repository Size
===========================================================================
Updating:
mypackage x86_64 1.2.1.4-1 /mypackage-1.2.1.4-1.x86_64.rpm 5.0 M
Transaction Summary
===========================================================================
Upgrade 1 Package
For some reason the new OpenSSL dependency is not resolved or installed, is this expected behavior and if so how should I go about adding additional dependencies to existing software packages?
Thanks in advance!
Upvotes: 2
Views: 1120
Reputation: 37832
The problem is linked to epoch numbering. Your version requires openssl >= 1.0.2
. However the openssl package provides 1:1.0.1
. The epoch number is the most important number. In fact rpm read your requirement openssl >= 1.0.2
as openssl >= 0:1.0.2
.
Your problem will be solved if you say:
Requires: openssl >= 1:1.0.2
NOTE : when you make a clean install and openssl was not yet installed; yum takes the latest version by default; which tricked you into thinking that your requirement worked.
for further reading; look here
Upvotes: 3