I am building and installing custom RPMs on Centos/RHEL 6. When deploying on containers and VMs everything works as expected, however, on the production box we have extra, internal repositories. yum install my.rpm
leads to a conflict with php70w-*
:
Error: php70w-common conflicts with php-common-5.3.3-46.el6_7.1.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
The php version chosen should be the 5.3.3 because of the RPM's requirements. php-gd
is listed in the .spec
which enforces that:
---> Package php-gd.x86_64 0:5.3.3-46.el6_7.1 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-46.el6_7.1 for package: php-gd-5.3.3-46.el6_7.1.x86_64
The interesting thing is that if I install all php-*
packages by hand (exactly as listed in the .spec
file) and then install the package everything works. (This verifies that the conflict has nothing to do with the rest/non-php dependencies). Note that I have AutoReqProv: no
in the spec...
Questions:
- I would assume that yum will choose php 5.3.3 because all dependencies are satisfied without conflicts... why isn't doing that?
- How can I prevent that behavior for
my.rpm
installation only?
The solutions I have considered are:
Explicitly state version
<=5.4
in all php requirements. However, since I don't know what makes yum pick version 7, I am not sure this will work. Also, I prefer to keep dependencies version-less if possible. Once all required php modules are available in php 7 or once our software changes and we dropphp-gd
, it would be nice to port to php 7 without changing all versions in specs.In the repository definition on the host I can exclude the package. I would like to avoid this - I control the RPM spec but the repositories are set by sysadmins (using puppet)
- Instruct puppet to install all php dependencies first and then deploy
my.rpm
. A solution I don't like because we are splitting the installation in two steps and two different systems: puppet and rpm.
Any help and/or ideas would be appreciated