[Fedora-packaging] Re: [Fedora-php-devel-list] For FPC : Change proposal to PHP Guidelines

Tim Jackson lists at timj.co.uk
Sat Jul 18 09:57:47 UTC 2009

On 14/07/09 17:38, Remi Collet wrote:

> We have some pending minor issues/questions with PHP packaging we should
> make clearer :

Thanks for doing this work Remi.

> 1/ use of /usr/share/php
> =>  1 folder per library

Agreed, but I would change the word "extension" to "software" to avoid 
confusion with binary extensions, and re-word this a bit make the text clearer 
and more specific, for example:

"Non-PEAR PHP software which provides shared libraries should put its PHP 
source files for such shared libraries in a subfolder of /usr/share/php, named 
according to the name of the software. For example, a library called 
"Whizz_Bang" (with a RPM called php-something-Whizz-Bang) would put the PHP 
source files for its shared libraries in /usr/share/php/Whizz_Bang ."

> 2/ conditional in ABI check and in post/postun scriplet
> This conditions are present to maintain compatibility with older PHP
> version (5.1.6 on EL-5) and could be removed if package requires a
> recent version (>  5.2)

I would suggest an easier-to-read introduction:

"To be certain that a binary extension will run correctly with a particular 
version of PHP, it is necessary to check that a particular package has both 
API and ABIs matching the installed version of PHP. The mechanism for doing 
this has evolved over time and is as follows:"

For the second part, I would split the specfile template into three parts as 

For Fedora (all current versions):
BuildRequires: php-devel
Requires:      php(zend-abi) = %{php_zend_api}
Requires:      php(api) = %{php_core_api}

For Fedora EPEL 5:
BuildRequires: php-devel
Requires:      php-api = %{php_apiver}

There is no way of checking the ABI with packages for Fedora EPEL 5.

For a spec file which is compatible with both Fedora and EPEL 5:
BuildRequires: php-devel
%if %{?php_zend_api}0
Requires:     php(zend-abi) = %{php_zend_api}
Requires:     php(api) = %{php_core_api}
Requires:     php-api = %{php_apiver}

No API/ABI dependencies are available for Fedora EPEL 4 packages.

> 3/ ABI check
> Module compiled with module API=20060613
> PHP    compiled with module API=20090626
> It seems clear it should be mandatory for all C extension.



More information about the Fedora-packaging mailing list