On 23.07.2013 21:26, Andrew Daugherity wrote:
While updating XCache to a new major version to gain PHP 5.4 support, etc.[1] I encountered problems building it for some SLES versions. I added an SLE_11_SP3 repo to my branch project to test building for SP3 (SLE 11 SP2 PHP extensions packages are no good for SP3, see [2]), and the build failed with "nothing provides php5-devel".
Indeed, the php53-devel package in SP3 (also SP2) provides php-devel and php53-devel but not php5-devel. Unlike SP2, there is no more php5-devel package (which was 5.2.x in <= SP2).
Which was the wrong one anyway.
I had previously made a 'php53-dummy-deps' RPM that depends on php53-devel and provides php5-devel in order to more easily do local builds of packages like this against php53-devel from SP2, but that's probably not a workable solution for the OBS. In any case I decided to upload it to my home project now in case it might be useful to others [3]. Indeed it is useful.
Back to xcache... I tried changing its BuildRequires from php5-devel to 'php-devel', since that's provided by every distro. That worked everywhere except for SLE_11_SP2, where it failed with "unresolvable: have choice for php-devel", because that's provided by *both* php5-devel and php53-devel. Ugh. I solved this by adding a Prefer: php5-devel line to my meta prjconf à la [4] but I don't know how that would translate to the OBS server:php:extensions repo. Also, all the extensions there have BuildRequires: php5-devel to every single one would have to be changed to php-devel... what a mess!
You can resolve the choice in prjconf. Add a line: Prefer: php53-devel I agree that the SP2 php53 thing was not a painless move. Anyway, php 5.2 is history and php53 is in "security fix mode". But that's a different can of little animals.
This would've been much easier if Novell/SUSE made php53-devel provide 'php5-devel' but I guess they had their reasons, maybe to avoid the ambiguous provides issue in SP2.
Perhaps there's a better solution with osc meta (or similar) to work around this? prjconf Substitute looks promising but the %sles_version macro not changing with different SPs makes that problematic. you can always default to php53 as long as SUSE doesn't ship any SLES version where php53 does exist AND is the worse option.
-- Ralf Lang Linux Consultant / Developer Tel.: +49-170-6381563 Mail: lang@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537