PackagingDrafts/PHP

From FedoraProject

< PackagingDrafts(Difference between revisions)
Jump to: navigation, search
(drop /usr/bin/php-zts subfolder for better FHS respect)
Line 18: Line 18:
 
== Macros and scriptlets ==
 
== Macros and scriptlets ==
  
=== PHP extension ===
+
=== PHP ZTS extension ===
 +
 
 +
When apache run in worker mode (instead of prefork mode), the ZTS (Zend Thread Safe) version of PHP is used.
 +
 
 +
If an extension maintainer want to provides a ZTS version of this extension, he must ensure that
 +
- the extension is thread safe
 +
- the libraries used by the extension are thread safe
  
 
The php-devel package in fedora >= 17 (5.4.0) provides the necessary files to build ZTS modules and provides several new macros:
 
The php-devel package in fedora >= 17 (5.4.0) provides the necessary files to build ZTS modules and provides several new macros:
Line 28: Line 34:
 
%{php_inidir}    %{_sysconfdir}/php.d
 
%{php_inidir}    %{_sysconfdir}/php.d
 
%{php_incldir    %{_includedir}/php
 
%{php_incldir    %{_includedir}/php
%{php_bindir}    %{_bindir}
 
 
</pre>
 
</pre>
  
 
For ZTS extensions
 
For ZTS extensions
 
<pre>
 
<pre>
 +
%{__ztsphp}      %{_bindir}/php-zts
 
%{php_ztsextdir}  %{_libdir}/php-zts/modules
 
%{php_ztsextdir}  %{_libdir}/php-zts/modules
 
%{php_ztsinidir}  %{_sysconfdir}/php-zts.d
 
%{php_ztsinidir}  %{_sysconfdir}/php-zts.d
 
%{php_ztsincldir  %{_includedir}/php-zts/php
 
%{php_ztsincldir  %{_includedir}/php-zts/php
%{php_ztsbindir}  %{_bindir}/php-zts
 
 
</pre>
 
</pre>
  
%{php_ztsbindir} contains the executables needed during the build of a ZTS extension, which are:
+
php-devel provides the executables needed during the build of a ZTS extension, which are:
* phpize
+
* phpize-zts
* php-config
+
* php-config-zts
* php (which is only useful to run test suite during build)
+
* php-zts (which is only useful to run test suite during build)
  
  
 
[[Category:Packaging guidelines drafts]]
 
[[Category:Packaging guidelines drafts]]

Revision as of 21:09, 25 January 2012

[[TableOfContents(3)]

Contents

Proposed Changes to PHP Guidelines

Synopsis

This page describes items that need to be changed in the PHP Guidelines or other items that need to be reviewed or ratified by the Fedora Packaging Comittee and FESCo .


Actual Guidelines

Macros and scriptlets

No information on macro provided by php-devel

Change proposal

Macros and scriptlets

PHP ZTS extension

When apache run in worker mode (instead of prefork mode), the ZTS (Zend Thread Safe) version of PHP is used.

If an extension maintainer want to provides a ZTS version of this extension, he must ensure that - the extension is thread safe - the libraries used by the extension are thread safe

The php-devel package in fedora >= 17 (5.4.0) provides the necessary files to build ZTS modules and provides several new macros:

For standard (NTS) extensions

%{__php}          %{_bindir}/php
%{php_extdir}     %{_libdir}/php/modules
%{php_inidir}     %{_sysconfdir}/php.d
%{php_incldir     %{_includedir}/php

For ZTS extensions

%{__ztsphp}       %{_bindir}/php-zts
%{php_ztsextdir}  %{_libdir}/php-zts/modules
%{php_ztsinidir}  %{_sysconfdir}/php-zts.d
%{php_ztsincldir  %{_includedir}/php-zts/php

php-devel provides the executables needed during the build of a ZTS extension, which are:

  • phpize-zts
  • php-config-zts
  • php-zts (which is only useful to run test suite during build)