Bug 247339 - RFE : add PHP ABI check in rrdtool-php
RFE : add PHP ABI check in rrdtool-php
Product: Fedora
Classification: Fedora
Component: rrdtool (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Jarod Wilson
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-07-07 04:33 EDT by Remi Collet
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 1.2.23-6.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-07-11 11:24:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Remi Collet 2007-07-07 04:33:55 EDT
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)

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

Comment 1 Jarod Wilson 2007-07-09 10:28:58 EDT
Hrm... I see:

A PECL package MUST have:

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

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).

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 11:36:43 EDT
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 18:07:04 EDT
Ah, yes, okay, that makes sense then. Thank you! I'll get that added shortly...
Comment 4 Fedora Update System 2007-07-11 11:24:26 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.