5

I'm writing a spec file for software that depends on php-mcrypt. My target OS is CentOS 6.5 php-mcrypt isn't in the CentOS repositories, but it is in EPEL. Is there a better way to satisfy this dependency on the Requires: line rather than manually installing EPEL in %pre? I really don't like the idea of forcing the install of another repo in an RPM, but I also don't like it when RPMs fail to install over a dependency that doesn't seem to exist until someone gets clever enough to start searching through various foreign repos.

What's the best way to handle this?

Etan Reisner
  • 77,877
  • 8
  • 106
  • 148
John Oliver
  • 325
  • 2
  • 4
  • 11
  • How did you "manually install EPEL in %pre"? Because afaik %pre gets only executed if there are no unresolved dependencies. So in your (and my) case, it would not execute the installation of EPEL, because it cannot find the requirements (which, in turn, require EPEL to already be installed). I'm facing a similar problem here and if this worked, it would be great (even though it's a bit hacky). – hunger May 25 '16 at 14:21

1 Answers1

1

I don't know of a better way to indicate this specific detail on the Requires line.

The only thing you could do, other than your suggestions, would be to also depend on the epel-release package which would at least give them a more specific hint in the correct direction. The only problem/downside to this is that you then depend on their having installed that package/repo instead of just having installed the EPEL php-mcrypt package on their own/etc.

Etan Reisner
  • 77,877
  • 8
  • 106
  • 148