I'm trying to create a RPM for a specific nginx module. My spec file build the modules and create the package successfully but I cannot make it depends on the right of the nginx package against which my module was build on.
In my spec file I tried to use:
Requires: nginx == 1.12.2-1.el7_4.ngx
Ben then when I try to install my module, yum fail with the following message:
Error: Package: 1:nginx-headers-more-1.12.2-0.33-2.el7_4.x86_64 (custom)
Requires: nginx = 1.12.2-1.el7_4.ngx
Available: 1:nginx-1.8.0-1.el7.ngx.x86_64 (nginx)
nginx = 1:1.8.0-1.el7.ngx
Available: 1:nginx-1.8.1-1.el7.ngx.x86_64 (nginx)
nginx = 1:1.8.1-1.el7.ngx
Available: 1:nginx-1.10.0-1.el7.ngx.x86_64 (nginx)
nginx = 1:1.10.0-1.el7.ngx
Available: 1:nginx-1.10.1-1.el7.ngx.x86_64 (nginx)
nginx = 1:1.10.1-1.el7.ngx
Available: 1:nginx-1.10.2-1.el7.ngx.x86_64 (nginx)
nginx = 1:1.10.2-1.el7.ngx
Available: 1:nginx-1.10.3-1.el7.ngx.x86_64 (nginx)
nginx = 1:1.10.3-1.el7.ngx
Available: 1:nginx-1.12.0-1.el7.ngx.x86_64 (nginx)
nginx = 1:1.12.0-1.el7.ngx
Available: 1:nginx-1.12.1-1.el7.ngx.x86_64 (nginx)
nginx = 1:1.12.1-1.el7.ngx
Installing: 1:nginx-1.12.2-1.el7_4.ngx.x86_64 (nginx)
nginx = 1:1.12.2-1.el7_4.ngx
Available: 1:nginx-1.14.0-1.el7_4.ngx.x86_64 (nginx)
nginx = 1:1.14.0-1.el7_4.ngx
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Where am I wrong?
For posterity,
The issue is that nginx version his packages with the epoch see rpm doc here (ie the 1: in the begining of 1:1.12.2-1.el7_4.ngx)
So changing :
Requires: nginx == 1.12.2-1.el7_4.ngx
to:
Requires: nginx == 1:1.12.2-1.el7_4.ngx
fixed my issue.