Is it possible to post install Requires dependecies in a spec file on Centos /RHEL 7? I tried Requires: somepackage = 1.0.0.0 The problem is that I need to run a script prior to the dependencies being installed. I tried to run that in the %pre section but it appears that it's not executed before the requires' %pre section is run and failing due to a missing license file.
The spec file looks like this:
Name: MyClient
Requires: MyServerPackage = 1.0.0.0
%pre
echo "Write license that is needed by MyServerPackage prior to install" > /tmp/mylicense
The problem is that I get an error: %pre(MyServerPackage) scriptles failed, exit status 1 Because the /tmp/mylicense is not there at the time MyServerPackages %pre script runs. I've also tried to add a package called mylicense and adding a PreReq: mylicense. But no matter what I try I get that error from the check in MyServerPackage %pre.