PHP and Arch specific Requires/Provides
+
Par Remi le jeudi 24 février 2011, 19:12 - HowTo - Lien permanent
This entry explain the recent changes in PHP packages available in rawhide (and soon in fedora 15) about Arch specific Provides and Requires.
1. Package dependencies
All sub-packages automatically have 2 provides (for a while).
For example : php-mysql and php-mysql(x86-64)
All virtual provides from php have been fixed to also provides both
For example : php-mysql provides php-mysqli and php-mysqli(x86-64)So a web application or a pear package (which are noarch) will still use
Requires: php-mysql
But a C extension could use
Requires: php-mysql%{?_isa}
Of course all dependencies between sub-packages of php, already use Arch requires :
For example : php-mysql requires php-common(x86-64)
2. ABI compatibility check
The old provides are still present
php(api) = 20090626
php(zend-abi) = 20090626
php-pdo-abi = 20080721
But new Arch specific provides are available and used by default when a package is build
php(api) = 20090626-x86-64
php(zend-abi) = 20090626-x86-64
php-pdo-abi = 20080721-x86-64
So, there is no need to change the PHP Guidelines, packages which use
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
will works with old provides (so there is no need to rebuild any package now).
When a package is rebuilt, it will use the new Arch specific ones.
The old provides will be removed when a new ABI will hit rawhide (php 5.4.0 ?), so when a rebuild will be mandatory.
Note : in the same way, php requires httpd-mmn = 20051115-x86-64 which is provided by httpd
3. Target version
This changes are only planned for fedora >= 15 (php-5.3.5-3)
So, if you need to add a %{_isa} to your package, this must be fedora >= 15 only. But in all cases, you will have to maintain 2 versions of your spec, or a conditional requires, because of EPEL (and git is your friend).
This have been discussed on the fedora-php-devel mailing list.
Comments are welcome.
Commentaires
Hi, je suis tombé ici par hasard et je suis plutot content de ce hasard. Déjà le thème est vraiment bien réalisé, mais je vais passer sur ce sujet, en effet, les articles sont pratiquement tous passionnant et le style que vous avez m'a beaucoup plus. Je me suis inscris au flux RSS sans attendre! A bientôt.