From: Elan Ruusamäe Date: Mon, 3 Nov 2008 21:16:04 +0000 (+0000) Subject: - php fastcgi process manager patches from http://php-fpm.anight.org/ X-Git-Tag: auto/th/php-5_2_6-14~1 X-Git-Url: https://git.pld-linux.org/?a=commitdiff_plain;h=5473c982e684e7db25b5200a54cc356fcbb74a32;p=packages%2Fphp.git - php fastcgi process manager patches from http://php-fpm.anight.org/ fpm itself is unusable due ZTS but other features are nice Changed files: php.spec -> 1.740 --- diff --git a/php.spec b/php.spec index 15949fb..d4ce29d 100644 --- a/php.spec +++ b/php.spec @@ -47,6 +47,7 @@ %bcond_without apache2 # disable building apache 2.x module %bcond_without fcgi # disable building FCGI SAPI %bcond_without zts # disable experimental-zts +%bcond_without fpm # fpm patches from http://php-fpm.anight.org/ %bcond_with system_xmlrpc_epi # use system xmlrpc-epi library (broken on 64bit arches, see http://bugs.php.net/41611) %bcond_with tests # default off; test process very often hangs on builders; perform "make test" %bcond_with versioning # build with experimental versioning (to load php4/php5 into same apache) @@ -143,6 +144,8 @@ Patch40: %{name}-mysqli-charsetphpini.patch Patch41: %{name}-pdo_mysql-charsetphpini.patch Patch42: %{name}-ini-charsetphpini.patch Patch43: %{name}-use-prog_sendmail.patch +Patch44: %{name}-fpm.patch +Patch45: %{name}-fpm-zts.patch URL: http://www.php.net/ # Requires review: # http://securitytracker.com/alerts/2008/Oct/1020995.html @@ -217,6 +220,10 @@ BuildRequires: apache-devel >= 2.0.52-2 BuildRequires: apr-devel >= 1:1.0.0 BuildRequires: apr-util-devel >= 1:1.0.0 %endif +%if %{with fpm} +BuildRequires: judy-devel +BuildRequires: libevent-devel >= 1.2 +%endif BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define php_sysconfdir /etc/php @@ -1615,7 +1622,7 @@ done %patch30 -p1 %patch31 -p1 %patch32 -p1 -%patch33 -p1 +#%patch33 -p1 %patch34 -p1 %patch35 -p1 %patch36 -p1 @@ -1630,6 +1637,11 @@ done %patch43 -p1 +%if %{with fpm} +%patch44 -p1 +%patch45 -p1 +%endif + # conflict seems to be resolved by recode patches rm -f ext/recode/config9.m4 @@ -1680,7 +1692,7 @@ fi export EXTENSION_DIR="%{php_extensiondir}" if [ ! -f _built-conf ]; then # configure once (for faster debugging purposes) - rm -f Makefile.{fcgi,cgi,cli,apxs{1,2}} # now remove Makefile copies + rm -f Makefile.{fcgi,fpm,cgi,cli,apxs{1,2}} # now remove Makefile copies %{__libtoolize} %{__aclocal} cp -f /usr/share/automake/config.* . @@ -1693,6 +1705,9 @@ sapis=" %if %{with fcgi} fcgi %endif +%if %{with fpm} +fpm +%endif cgi cli %if %{with apache1} apxs1 @@ -1716,6 +1731,9 @@ for sapi in $sapis; do fcgi) sapi_args='--enable-fastcgi --with-fastcgi=/usr --enable-force-cgi-redirect' ;; + fpm) + sapi_args='--enable-fastcgi --with-fastcgi=/usr --enable-force-cgi-redirect --enable-fpm' + ;; apxs1) ver=$(rpm -q --qf '%{V}' apache1-devel) sapi_args="--with-apxs=%{apxs1} --with-apache-version=$ver" @@ -1759,6 +1777,11 @@ for sapi in $sapis; do --enable-json=shared \ --enable-hash=shared \ --enable-xmlwriter=shared \ +%if %{with fpm} + --with-fpm-conf=%{_sysconfdir}/fpm.conf \ + --with-fpm-log=/var/log/fpm.log \ + --with-fpm-pid=/var/run/php/fpm.pid \ +%endif %if %{with mssql} || %{with sybase} || %{with sybase_ct} --with-pdo-dblib=shared \ %endif @@ -1862,15 +1885,6 @@ done %{__make} libtool-sapi LIBTOOL_SAPI=sapi/apache2handler/libphp5.la -f Makefile.apxs2 %endif -# FCGI -%if %{with fcgi} -cp -af php_config.h.fcgi main/php_config.h -rm -rf sapi/cgi/.libs sapi/cgi/*.lo -%{__make} sapi/cgi/php-cgi -f Makefile.fcgi -cp -r sapi/cgi sapi/fcgi -[ "$(echo '