Bug 247339

Summary: RFE : add PHP ABI check in rrdtool-php
Product: [Fedora] Fedora Reporter: Remi Collet <fedora>
Component: rrdtoolAssignee: Jarod Wilson <jarod>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.2.23-6.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-11 15:24:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Remi Collet 2007-07-07 08:33:55 UTC
php package provides a php(zend-abi) which sould be used to ensure compatibility
betwen extension and php.

Even if rrdtool-php is not a true "pecl" extension, it works as one.

For more information, read the PHP Guidelines (recently updated)
http://fedoraproject.org/wiki/Packaging/PHP#head-435fc0b2b6fa2e807e89b72025848db84fea9d1c

This will detect ABI breaks when a new php version comes to rawhide.

Regards.

Comment 1 Jarod Wilson 2007-07-09 14:28:58 UTC
Hrm... I see:

----8<----
A PECL package MUST have:

%if %{?php_zend_api}0
Requires:     php(zend-abi) = %{php_zend_api}
Requires:     php(api) = %{php_core_api}
%else
Requires:     php-api = %{php_apiver}
%endif

Provides:     php-pecl(foo)

Other Packages

PHP addons which are neither PEAR nor PECL should require what makes sense
(either a base PHP version or a php-api as necessary).
----8<----

Wouldn't just the following be sufficient for detecting api breakage and comply
with the guidelines?:

Requires:     php(api) = %{php_core_api}

(I honestly have no clue here, just asking, since as you say, its not a true
pecl extension).

Comment 2 Remi Collet 2007-07-09 15:36:43 UTC
php(api) doesn't change with PHP version (still the same, 20041225, for years)

php(zend-api) is the value checked on runtime by PHP. That why we add it to php.

For example, if i used rrdtool-php from FC6 (build with php-5.1.6) on F7 (php-5.2.2)

1/ Install is possible (that's what we want to make impossible)
2/ Use is not

# php -v
PHP Warning:  PHP Startup: rrdtool: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP    compiled with module API=20060613, debug=0, thread-safety=0
These options need to match

So the Requires must be make on php(zend-abi) :
php-common-5.1.6 provides php(zend-abi) = 20050922
php-common_5.2.2 provides php(zend-abi) = 20060613

Is it clearer for you ?

Comment 3 Jarod Wilson 2007-07-10 22:07:04 UTC
Ah, yes, okay, that makes sense then. Thank you! I'll get that added shortly...

Comment 4 Fedora Update System 2007-07-11 15:24:26 UTC
rrdtool-1.2.23-6.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.