[packaging] 30 commits - .gitignore php-5.3.0-phpize64.patch php-5.3.3-aconf26x.patch php-5.3.3-gnusrc.patch php-5.3.4-phpize.patch php-5.3.7-gnusrc.patch php-5.3.8-aconf259.patch php-5.3.8-isa.patch php-5.3.8-mysqlnd.patch php-fpm.conf php-fpm.logrotate php-fpm.service php-fpm-www.conf php.spec sources

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Tue Feb 28 11:31:22 CET 2012


 .gitignore               |    4 
 php-5.3.0-phpize64.patch |   24 --
 php-5.3.3-aconf26x.patch |   79 ------
 php-5.3.3-gnusrc.patch   |  114 ---------
 php-5.3.4-phpize.patch   |   34 ++
 php-5.3.7-gnusrc.patch   |  115 ++++++++++
 php-5.3.8-aconf259.patch |  195 +++++++++++++++++
 php-5.3.8-isa.patch      |   45 +++
 php-5.3.8-mysqlnd.patch  |   77 ++++++
 php-fpm-www.conf         |  213 ++++++++++++++++++
 php-fpm.conf             |   60 +++++
 php-fpm.logrotate        |    9 
 php-fpm.service          |   14 +
 php.spec                 |  537 +++++++++++++++++++++++++++++++++++++++--------
 sources                  |    2 
 15 files changed, 1214 insertions(+), 308 deletions(-)

New commits:
commit 4105e18964210282ce074913b8735e3384b856d0
Author: remi <fedora at famillecollet.com>
Date:   Mon Dec 12 17:50:28 2011 +0100

    fix date in changelog

diff --git a/php.spec b/php.spec
index b333c0a..a7f59cf 100644
--- a/php.spec
+++ b/php.spec
@@ -1139,7 +1139,7 @@ fi
 
 
 %changelog
-* Wed Sep 28 2011 Remi Collet <remi at fedoraproject.org> 5.3.8-4.3
+* Mon Dec 12 2011 Remi Collet <remi at fedoraproject.org> 5.3.8-4.3
 - switch to systemd
 
 * Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 5.3.8-4.2


commit dc06a7ec6f1cf83a9af0890138dcb385641815f2
Author: remi <fedora at famillecollet.com>
Date:   Mon Dec 12 17:49:50 2011 +0100

    swict to systemd

diff --git a/php-fpm.init b/php-fpm.init
deleted file mode 100755
index a23441c..0000000
--- a/php-fpm.init
+++ /dev/null
@@ -1,87 +0,0 @@
-#! /bin/sh
-#
-# chkconfig: - 84 16
-# description:	PHP FastCGI Process Manager
-# processname: php-fpm
-# config: /etc/php-fpm.conf
-# pidfile: /var/run/php-fpm/php-fpm.pid
-
-# Standard LSB functions
-#. /lib/lsb/init-functions
-
-# Source function library.
-. /etc/init.d/functions
-
-# Check that networking is up.
-. /etc/sysconfig/network
-
-if [ "$NETWORKING" = "no" ]
-then
-	exit 0
-fi
-
-RETVAL=0
-prog="php-fpm"
-pidfile=${PIDFILE-/var/run/php-fpm/php-fpm.pid}
-lockfile=${LOCKFILE-/var/lock/subsys/php-fpm}
-
-start () {
-	echo -n $"Starting $prog: "
-	dir=$(dirname ${pidfile})
-	[ -d $dir ] || mkdir $dir
-	daemon --pidfile ${pidfile} php-fpm
-	RETVAL=$?
-	echo
-	[ $RETVAL -eq 0 ] && touch ${lockfile}
-}
-stop () {
-	echo -n $"Stopping $prog: "
-	killproc -p ${pidfile} php-fpm
-	RETVAL=$?
-	echo
-	if [ $RETVAL -eq 0 ] ; then
-		rm -f ${lockfile} ${pidfile}
-	fi
-}
-
-restart () {
-        stop
-        start
-}
-
-reload () {
-	echo -n $"Reloading $prog: "
-	killproc -p ${pidfile} php-fpm -USR2
-	RETVAL=$?
-	echo
-}
-
-
-# See how we were called.
-case "$1" in
-  start)
-	start
-	;;
-  stop)
-	stop
-	;;
-  status)
-	status -p ${pidfile} php-fpm
-	RETVAL=$?
-	;;
-  restart)
-	restart
-	;;
-  reload|force-reload)
-	reload
-	;;
-  condrestart|try-restart)
-	[ -f ${lockfile} ] && restart || :
-	;;
-  *)
-	echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|try-restart}"
-	RETVAL=2
-        ;;
-esac
-
-exit $RETVAL
diff --git a/php-fpm.service b/php-fpm.service
new file mode 100644
index 0000000..e6a8468
--- /dev/null
+++ b/php-fpm.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=The PHP FastCGI Process Manager
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/php-fpm/php-fpm.pid
+ExecStart=/usr/sbin/php-fpm
+ExecReload=/bin/kill -USR2 $MAINPID
+ExecStop=/usr/sbin/httpd $OPTIONS -k stop
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/php.spec b/php.spec
index 726eaba..b333c0a 100644
--- a/php.spec
+++ b/php.spec
@@ -37,7 +37,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.8
-Release: 4%{?dist}.2
+Release: 4%{?dist}.3
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -48,7 +48,7 @@ Source2: php.ini
 Source3: macros.php
 Source4: php-fpm.conf
 Source5: php-fpm-www.conf
-Source6: php-fpm.init
+Source6: php-fpm.service
 Source7: php-fpm.logrotate
 
 # Build fixes
@@ -139,8 +139,16 @@ executing PHP scripts, /usr/bin/php, and the CGI interface.
 Group: Development/Languages
 Summary: PHP FastCGI Process Manager
 Requires: php-common%{?_isa} = %{version}-%{release}
-Requires: systemd-units
 BuildRequires: libevent-devel >= 1.4.11
+BuildRequires: systemd-units
+Requires: systemd-units
+Requires(post): systemd-units
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+# This is actually needed for the %%triggerun script but Requires(triggerun)
+# is not valid.  We can use %%post because this particular %%triggerun script
+# should fire just after this package is installed.
+Requires(post): systemd-sysv
 
 %description fpm
 PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI
@@ -911,9 +919,9 @@ install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d
 install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf
 install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d/www.conf
 mv $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf.default .
-# Service
-install -m 755 -d $RPM_BUILD_ROOT%{_initrddir}
-install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_initrddir}/php-fpm
+# install systemd unit files and scripts for handling server startup
+install -m 755 -d $RPM_BUILD_ROOT%{_unitdir}
+install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_unitdir}/
 # LogRotate
 install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
 install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm
@@ -999,12 +1007,38 @@ rm files.* macros.php
 
 %if %{with_fpm}
 %post fpm
-/sbin/chkconfig --add php-fpm
+if [ $1 = 1 ]; then
+    # Initial installation
+    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
 
 %preun fpm
-if [ "$1" = 0 ] ; then
-    /sbin/service php-fpm stop >/dev/null 2>&1
-    /sbin/chkconfig --del php-fpm
+if [ $1 = 0 ]; then
+    # Package removal, not upgrade
+    /bin/systemctl --no-reload disable php-fpm.service >/dev/null 2>&1 || :
+    /bin/systemctl stop php-fpm.service >/dev/null 2>&1 || :
+fi
+
+%postun fpm
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ]; then
+    # Package upgrade, not uninstall
+    /bin/systemctl try-restart php-fpm.service >/dev/null 2>&1 || :
+fi
+
+# Handle upgrading from SysV initscript to native systemd unit.
+# We can tell if a SysV version of php-fpm was previously installed by
+# checking to see if the initscript is present.
+%triggerun fpm -- php-fpm
+if [ -f /etc/rc.d/init.d/php-fpm ]; then
+    # Save the current service runlevel info
+    # User must manually run systemd-sysv-convert --apply php-fpm
+    # to migrate them to systemd targets
+    /usr/bin/systemd-sysv-convert --save php-fpm >/dev/null 2>&1 || :
+
+    # Run these because the SysV package being removed won't do them
+    /sbin/chkconfig --del php-fpm >/dev/null 2>&1 || :
+    /bin/systemctl try-restart php-fpm.service >/dev/null 2>&1 || :
 fi
 %endif
 
@@ -1055,7 +1089,7 @@ fi
 %config(noreplace) %{_sysconfdir}/logrotate.d/php-fpm
 %config(noreplace) %{_sysconfdir}/tmpfiles.d/php-fpm.conf
 %{_sbindir}/php-fpm
-%{_initrddir}/php-fpm
+%{_unitdir}/php-fpm.service
 %dir %{_sysconfdir}/php-fpm.d
 # log owned by apache for log
 %attr(770,apache,apache) %dir %{_localstatedir}/log/php-fpm
@@ -1105,6 +1139,9 @@ fi
 
 
 %changelog
+* Wed Sep 28 2011 Remi Collet <remi at fedoraproject.org> 5.3.8-4.3
+- switch to systemd
+
 * Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 5.3.8-4.2
 - Rebuild for new libpng
 


commit a30c822dd884fdfaae6075314016320f6fcb864d
Author: Adam Jackson <ajax at redhat.com>
Date:   Tue Dec 6 00:45:19 2011 -0500

    Rebuild for new libpng

diff --git a/php.spec b/php.spec
index f963577..726eaba 100644
--- a/php.spec
+++ b/php.spec
@@ -37,7 +37,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.8
-Release: 3%{?dist}.2
+Release: 4%{?dist}.2
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -1105,6 +1105,9 @@ fi
 
 
 %changelog
+* Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 5.3.8-4.2
+- Rebuild for new libpng
+
 * Wed Oct 26 2011 Marcela Mašláňová <mmaslano at redhat.com> - 5.3.8-3.2
 - rebuild with new gmp without compat lib
 


commit 093656a0976f77ac5b2fd43847c3f629db71131b
Author: Marcela Mašláňová <mmaslano at redhat.com>
Date:   Wed Oct 26 14:05:02 2011 +0200

    rebuild with new gmp without compat lib

diff --git a/php.spec b/php.spec
index adf5ab3..f963577 100644
--- a/php.spec
+++ b/php.spec
@@ -37,7 +37,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.8
-Release: 3%{?dist}.1
+Release: 3%{?dist}.2
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -1105,6 +1105,9 @@ fi
 
 
 %changelog
+* Wed Oct 26 2011 Marcela Mašláňová <mmaslano at redhat.com> - 5.3.8-3.2
+- rebuild with new gmp without compat lib
+
 * Wed Oct 12 2011 Peter Schiffer <pschiffe at redhat.com> - 5.3.8-3.1
 - rebuild with new gmp
 


commit 9562da7c45ad75d424dca6fa58991febfb70e3ac
Author: Marcela Mašláňová <mmaslano at redhat.com>
Date:   Wed Oct 12 06:33:06 2011 +0200

    rebuild with new gmp

diff --git a/php.spec b/php.spec
index 431dd19..adf5ab3 100644
--- a/php.spec
+++ b/php.spec
@@ -37,7 +37,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.8
-Release: 3%{?dist}
+Release: 3%{?dist}.1
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -1105,6 +1105,9 @@ fi
 
 
 %changelog
+* Wed Oct 12 2011 Peter Schiffer <pschiffe at redhat.com> - 5.3.8-3.1
+- rebuild with new gmp
+
 * Wed Sep 28 2011 Remi Collet <remi at fedoraproject.org> 5.3.8-3
 - revert is_a() to php <= 5.3.6 behavior (from upstream)
   with new option (allow_string) for new behavior


commit ed831a316ddf07c9e7013d4fe7fb9f50da68a542
Author: remi <fedora at famillecollet.com>
Date:   Wed Sep 28 17:15:43 2011 +0200

    apply the new patch...

diff --git a/php.spec b/php.spec
index b040c00..431dd19 100644
--- a/php.spec
+++ b/php.spec
@@ -563,6 +563,7 @@ support for using the enchant library to PHP.
 %patch41 -p1 -b .easter
 %patch42 -p1 -b .systzdata
 %patch43 -p0 -b .headers
+%patch44 -p4 -b .isa
 
 %patch61 -p1 -b .tests-wddx
 


commit d0c66301cb39c804f088994fde2a6ab227112f3a
Author: remi <fedora at famillecollet.com>
Date:   Wed Sep 28 17:04:11 2011 +0200

    revert is_a() to php <= 5.3.6 behavior (from upstream) with new option (allow_string) for new behavior

diff --git a/php-5.3.8-isa.patch b/php-5.3.8-isa.patch
new file mode 100644
index 0000000..93de48c
--- /dev/null
+++ b/php-5.3.8-isa.patch
@@ -0,0 +1,45 @@
+--- php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c	2011/09/23 09:29:27	317182
++++ php/php-src/branches/PHP_5_3/Zend/zend_builtin_functions.c	2011/09/23 09:52:09	317183
+@@ -816,13 +816,19 @@
+ 	int class_name_len;
+ 	zend_class_entry *instance_ce;
+ 	zend_class_entry **ce;
++	zend_bool allow_string = only_subclass;
+ 	zend_bool retval;
+ 
+-	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs", &obj, &class_name, &class_name_len) == FAILURE) {
++	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zs|b", &obj, &class_name, &class_name_len, &allow_string) == FAILURE) {
+ 		return;
+ 	}
+-	
+-	if (Z_TYPE_P(obj) == IS_STRING) {
++	/*
++	   allow_string - is_a default is no, is_subclass_of is yes. 
++	   if it's allowed, then the autoloader will be called if the class does not exist.
++	   default behaviour is different, as 'is_a' usage is normally to test mixed return values 
++	*/
++
++	if (allow_string && Z_TYPE_P(obj) == IS_STRING) {
+ 		zend_class_entry **the_ce;
+ 		if (zend_lookup_class(Z_STRVAL_P(obj), Z_STRLEN_P(obj), &the_ce TSRMLS_CC) == FAILURE) {
+ 			RETURN_FALSE;
+@@ -848,7 +854,7 @@
+ }
+ 
+ 
+-/* {{{ proto bool is_subclass_of(object object, string class_name)
++/* {{{ proto bool is_subclass_of(mixed object_or_string, string class_name [, bool allow_string=true])
+    Returns true if the object has this class as one of its parents */
+ ZEND_FUNCTION(is_subclass_of)
+ {
+@@ -857,8 +863,8 @@
+ /* }}} */
+ 
+ 
+-/* {{{ proto bool is_a(object object, string class_name)
+-   Returns true if the object is of this class or has this class as one of its parents */
++/* {{{ proto bool is_a(mixed object_or_string, string class_name [, bool allow_string=false])
++   Returns true if the first argument is an object and is this class or has this class as one of its parents, */
+ ZEND_FUNCTION(is_a)
+ {
+ 	is_a_impl(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
diff --git a/php.spec b/php.spec
index 8a88191..b040c00 100644
--- a/php.spec
+++ b/php.spec
@@ -37,7 +37,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.8
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -75,6 +75,8 @@ Patch41: php-5.3.0-easter.patch
 Patch42: php-5.3.1-systzdata-v7.patch
 # See http://bugs.php.net/53436
 Patch43: php-5.3.4-phpize.patch
+# http://svn.php.net/viewvc?view=revision&revision=317183
+Patch44: php-5.3.8-isa.patch
 
 # Fixes for tests
 Patch61: php-5.0.4-tests-wddx.patch
@@ -1102,6 +1104,10 @@ fi
 
 
 %changelog
+* Wed Sep 28 2011 Remi Collet <remi at fedoraproject.org> 5.3.8-3
+- revert is_a() to php <= 5.3.6 behavior (from upstream)
+  with new option (allow_string) for new behavior
+
 * Tue Sep 13 2011 Remi Collet <remi at fedoraproject.org> 5.3.8-2
 - add mysqlnd sub-package
 - drop patch4, use --libdir to use /usr/lib*/php/build


commit 8863ec23721350be4ad0125b4b0d908c3482397b
Author: remi <fedora at famillecollet.com>
Date:   Tue Sep 13 18:47:06 2011 +0200

    add php-mysqlnd subpackage

diff --git a/php-5.3.0-phpize64.patch b/php-5.3.0-phpize64.patch
deleted file mode 100644
index c4dd1b9..0000000
--- a/php-5.3.0-phpize64.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -up php5.3-200812131330/scripts/Makefile.frag.phpize64 php5.3-200812131330/scripts/Makefile.frag
---- php5.3-200812131330/scripts/Makefile.frag.phpize64	2005-11-22 00:08:02.000000000 +0100
-+++ php5.3-200812131330/scripts/Makefile.frag	2008-12-13 16:21:42.000000000 +0100
-@@ -4,7 +4,7 @@
- #
- 
- phpincludedir = $(includedir)/php
--phpbuilddir = $(libdir)/build
-+phpbuilddir = $(libdir)/php/build
- 
- BUILD_FILES = \
- 	scripts/phpize.m4 \
-diff -up php5.3-200812131330/scripts/phpize.in.phpize64 php5.3-200812131330/scripts/phpize.in
---- php5.3-200812131330/scripts/phpize.in.phpize64	2007-06-29 03:10:35.000000000 +0200
-+++ php5.3-200812131330/scripts/phpize.in	2008-12-13 16:24:27.000000000 +0100
-@@ -3,7 +3,7 @@
- # Variable declaration
- prefix='@prefix@'
- exec_prefix="`eval echo @exec_prefix@`"
--phpdir="`eval echo @libdir@`/build"
-+phpdir="@libdir@/php/build"
- includedir="`eval echo @includedir@`/php"
- builddir="`pwd`"
- SED="@SED@"
diff --git a/php-5.3.8-aconf259.patch b/php-5.3.8-aconf259.patch
index b135fc4..1d9696b 100644
--- a/php-5.3.8-aconf259.patch
+++ b/php-5.3.8-aconf259.patch
@@ -1,6 +1,6 @@
 diff -up php-5.3.8/build/buildcheck.sh.aconf259 php-5.3.8/build/buildcheck.sh
 --- php-5.3.8/build/buildcheck.sh.aconf259	2011-05-18 21:55:34.000000000 +0200
-+++ php-5.3.8/build/buildcheck.sh	2011-08-23 13:43:08.977271533 +0200
++++ php-5.3.8/build/buildcheck.sh	2011-09-12 17:42:17.016672712 +0200
 @@ -28,33 +28,23 @@ if test -z "$PHP_AUTOCONF"; then
    PHP_AUTOCONF='autoconf'
  fi
@@ -41,8 +41,8 @@ diff -up php-5.3.8/build/buildcheck.sh.aconf259 php-5.3.8/build/buildcheck.sh
  if test "$1" = "2" -a "$2" -ge "50"; then
    ./vcsclean
 diff -up php-5.3.8/configure.in.aconf259 php-5.3.8/configure.in
---- php-5.3.8/configure.in.aconf259	2011-08-23 13:43:08.971271521 +0200
-+++ php-5.3.8/configure.in	2011-08-23 13:43:34.264326174 +0200
+--- php-5.3.8/configure.in.aconf259	2011-09-12 17:42:17.008672708 +0200
++++ php-5.3.8/configure.in	2011-09-12 17:42:17.017672713 +0200
 @@ -1,28 +1,6 @@
  ## $Id: configure.in 315343 2011-08-23 08:56:29Z johannes $ -*- autoconf -*-
  dnl ## Process this file with autoconf to produce a configure script.
@@ -138,7 +138,7 @@ diff -up php-5.3.8/configure.in.aconf259 php-5.3.8/configure.in
  
 diff -up php-5.3.8/ext/standard/config.m4.aconf259 php-5.3.8/ext/standard/config.m4
 --- php-5.3.8/ext/standard/config.m4.aconf259	2010-06-17 12:22:03.000000000 +0200
-+++ php-5.3.8/ext/standard/config.m4	2011-08-23 13:43:08.979271537 +0200
++++ php-5.3.8/ext/standard/config.m4	2011-09-12 17:42:17.018672714 +0200
 @@ -1,7 +1,5 @@
  dnl $Id: config.m4 300511 2010-06-17 10:22:03Z pajoye $ -*- autoconf -*-
  
@@ -158,7 +158,7 @@ diff -up php-5.3.8/ext/standard/config.m4.aconf259 php-5.3.8/ext/standard/config
  dnl and defining which handles it receives
 diff -up php-5.3.8/scripts/php-config.in.aconf259 php-5.3.8/scripts/php-config.in
 --- php-5.3.8/scripts/php-config.in.aconf259	2011-04-18 13:13:37.000000000 +0200
-+++ php-5.3.8/scripts/php-config.in	2011-08-23 13:43:08.980271540 +0200
++++ php-5.3.8/scripts/php-config.in	2011-09-12 17:42:17.019672714 +0200
 @@ -2,6 +2,7 @@
  
  SED="@SED@"
@@ -168,19 +168,19 @@ diff -up php-5.3.8/scripts/php-config.in.aconf259 php-5.3.8/scripts/php-config.i
  version="@PHP_VERSION@"
  vernum="@PHP_VERSION_ID@"
 diff -up php-5.3.8/scripts/phpize.in.aconf259 php-5.3.8/scripts/phpize.in
---- php-5.3.8/scripts/phpize.in.aconf259	2011-08-23 13:43:08.968271513 +0200
-+++ php-5.3.8/scripts/phpize.in	2011-08-23 13:43:08.981271543 +0200
+--- php-5.3.8/scripts/phpize.in.aconf259	2009-06-24 09:42:33.000000000 +0200
++++ php-5.3.8/scripts/phpize.in	2011-09-12 17:43:12.706714796 +0200
 @@ -2,6 +2,7 @@
  
  # Variable declaration
  prefix='@prefix@'
 +datarootdir='@datarootdir@'
  exec_prefix="`eval echo @exec_prefix@`"
- phpdir="@libdir@/php/build"
+ phpdir="`eval echo @libdir@`/build"
  includedir="`eval echo @includedir@`/php"
 diff -up php-5.3.8/scripts/phpize.m4.aconf259 php-5.3.8/scripts/phpize.m4
 --- php-5.3.8/scripts/phpize.m4.aconf259	2010-11-02 10:58:08.000000000 +0100
-+++ php-5.3.8/scripts/phpize.m4	2011-08-23 13:43:08.982271545 +0200
++++ php-5.3.8/scripts/phpize.m4	2011-09-12 17:42:17.020672715 +0200
 @@ -1,9 +1,8 @@
  dnl This file becomes configure.in for self-contained extensions.
  
diff --git a/php-5.3.8-mysqlnd.patch b/php-5.3.8-mysqlnd.patch
new file mode 100644
index 0000000..7849784
--- /dev/null
+++ b/php-5.3.8-mysqlnd.patch
@@ -0,0 +1,77 @@
+diff -up php-5.3.8/ext/mysqlnd/config9.m4.mysqlnd php-5.3.8/ext/mysqlnd/config9.m4
+--- php-5.3.8/ext/mysqlnd/config9.m4.mysqlnd	2011-03-23 18:14:28.000000000 +0100
++++ php-5.3.8/ext/mysqlnd/config9.m4	2011-09-12 17:44:54.403846592 +0200
+@@ -3,6 +3,10 @@ dnl $Id: config9.m4 309609 2011-03-23 17
+ dnl config.m4 for mysqlnd driver
+ 
+ 
++PHP_ARG_ENABLE(mysqlnd, whether to enable mysqlnd,
++  [  --enable-mysqlnd       Enable mysqlnd expliciely, will be done implicitly
++                         when required by other extensions], no, yes)
++
+ PHP_ARG_ENABLE(mysqlnd_compression_support, whether to enable compressed protocol support in mysqlnd,
+ [  --disable-mysqlnd-compression-support
+                             Disable support for the MySQL compressed protocol in mysqlnd], yes, no)
+@@ -13,7 +17,7 @@ if test -z "$PHP_ZLIB_DIR"; then
+ fi
+ 
+ dnl If some extension uses mysqlnd it will get compiled in PHP core
+-if test "$PHP_MYSQLND_ENABLED" = "yes"; then
++if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
+   mysqlnd_ps_sources="mysqlnd_ps.c mysqlnd_ps_codec.c"
+   mysqlnd_base_sources="mysqlnd.c mysqlnd_charset.c mysqlnd_wireprotocol.c \
+                    mysqlnd_loaddata.c mysqlnd_net.c mysqlnd_statistics.c \
+@@ -27,12 +31,12 @@ if test "$PHP_MYSQLND_ENABLED" = "yes"; 
+   AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable SSL support])
+ 
+   mysqlnd_sources="$mysqlnd_base_sources $mysqlnd_ps_sources"
+-  PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, no)
++  PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, $ext_shared)
+   PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
+   PHP_INSTALL_HEADERS([ext/mysqlnd/])
+ fi
+ 
+-if test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then
++if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then
+   PHP_ADD_BUILD_DIR([ext/mysqlnd], 1)
+ 
+   dnl This creates a file so it has to be after above macros
+diff -up php-5.3.8/ext/mysqlnd/mysqlnd.c.mysqlnd php-5.3.8/ext/mysqlnd/mysqlnd.c
+--- php-5.3.8/ext/mysqlnd/mysqlnd.c.mysqlnd	2011-09-12 17:50:37.676119503 +0200
++++ php-5.3.8/ext/mysqlnd/mysqlnd.c	2011-09-12 17:50:41.695136669 +0200
+@@ -620,7 +620,7 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MY
+ 		if (host_len == sizeof("localhost") - 1 && !strncasecmp(host, "localhost", host_len)) {
+ 			DBG_INF_FMT("socket=%s", socket_or_pipe? socket_or_pipe:"n/a");
+ 			if (!socket_or_pipe) {
+-				socket_or_pipe = "/tmp/mysql.sock";
++				socket_or_pipe = "/var/lib/mysql/mysql.sock";
+ 			}
+ 			transport_len = spprintf(&transport, 0, "unix://%s", socket_or_pipe);
+ 			unix_socket = TRUE;
+diff -up php-5.3.8/ext/mysqlnd/php_mysqlnd.c.mysqlnd php-5.3.8/ext/mysqlnd/php_mysqlnd.c
+--- php-5.3.8/ext/mysqlnd/php_mysqlnd.c.mysqlnd	2011-08-06 16:47:44.000000000 +0200
++++ php-5.3.8/ext/mysqlnd/php_mysqlnd.c	2011-09-12 17:44:54.404846593 +0200
+@@ -299,6 +299,11 @@ zend_module_entry mysqlnd_module_entry =
+ };
+ /* }}} */
+ 
++/* {{{ COMPILE_DL_MYSQLND */
++#ifdef COMPILE_DL_MYSQLND
++ZEND_GET_MODULE(mysqlnd)
++#endif
++/* }}} */
+ 
+ /*
+  * Local variables:
+diff -up php-5.3.8/ext/pdo_mysql/pdo_mysql.c.mysqlnd php-5.3.8/ext/pdo_mysql/pdo_mysql.c
+--- php-5.3.8/ext/pdo_mysql/pdo_mysql.c.mysqlnd	2011-09-12 17:49:24.769799256 +0200
++++ php-5.3.8/ext/pdo_mysql/pdo_mysql.c	2011-09-12 17:49:31.216828314 +0200
+@@ -42,7 +42,7 @@ ZEND_DECLARE_MODULE_GLOBALS(pdo_mysql);
+ #  ifdef PHP_MYSQL_UNIX_SOCK_ADDR
+ #   define PDO_MYSQL_UNIX_ADDR PHP_MYSQL_UNIX_SOCK_ADDR
+ #  else
+-#   define PDO_MYSQL_UNIX_ADDR "/tmp/mysql.sock"
++#   define PDO_MYSQL_UNIX_ADDR "/var/lib/mysql/mysql.sock"
+ #  endif
+ # endif
+ #endif
diff --git a/php.spec b/php.spec
index 0634e74..8a88191 100644
--- a/php.spec
+++ b/php.spec
@@ -37,7 +37,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.8
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -55,13 +55,15 @@ Source7: php-fpm.logrotate
 Patch1: php-5.3.7-gnusrc.patch
 Patch2: php-5.3.0-install.patch
 Patch3: php-5.2.4-norpath.patch
-Patch4: php-5.3.0-phpize64.patch
 Patch5: php-5.2.0-includedir.patch
 Patch6: php-5.2.4-embed.patch
 Patch7: php-5.3.0-recode.patch
 # from http://svn.php.net/viewvc?view=revision&revision=311042
 # and  http://svn.php.net/viewvc?view=revision&revision=311908
 Patch8: php-5.3.8-aconf259.patch
+# from http://svn.php.net/viewvc?view=revision&revision=316281
+# + fix harcoded mysql.sock path
+Patch9: php-5.3.8-mysqlnd.patch
 
 # Fixes for extension modules
 Patch20: php-4.3.11-shutdown.patch
@@ -263,10 +265,12 @@ Summary: A module for PHP applications that use MySQL databases
 Group: Development/Languages
 Requires: php-pdo%{?_isa} = %{version}-%{release}
 Provides: php_database
-Provides: php-mysqli, php-mysqli%{?_isa}
+Provides: php-mysqli = %{version}-%{release}
+Provides: php-mysqli%{?_isa} = %{version}-%{release}
 Provides: php-pdo_mysql, php-pdo_mysql%{?_isa}
 Obsoletes: mod_php3-mysql, stronghold-php-mysql
 BuildRequires: mysql-devel >= 4.1.0
+Conflicts: php-mysqlnd
 
 %description mysql
 The php-mysql package contains a dynamic shared object that will add
@@ -275,6 +279,26 @@ management system. PHP is an HTML-embeddable scripting language. If
 you need MySQL support for PHP applications, you will need to install
 this package and the php package.
 
+%package mysqlnd
+Summary: A module for PHP applications that use MySQL databases
+Group: Development/Languages
+Requires: php-pdo%{?_isa} = %{version}-%{release}
+Provides: php_database
+Provides: php-mysql = %{version}-%{release}
+Provides: php-mysql%{?_isa} = %{version}-%{release}
+Provides: php-mysqli = %{version}-%{release}
+Provides: php-mysqli%{?_isa} = %{version}-%{release}
+Provides: php-pdo_mysql, php-pdo_mysql%{?_isa}
+
+%description mysqlnd
+The php-mysqlnd package contains a dynamic shared object that will add
+MySQL database support to PHP. MySQL is an object-relational database
+management system. PHP is an HTML-embeddable scripting language. If
+you need MySQL support for PHP applications, you will need to install
+this package and the php package.
+
+This package use the MySQL Native Driver
+
 %package pgsql
 Summary: A PostgreSQL database module for PHP
 Group: Development/Languages
@@ -524,11 +548,11 @@ support for using the enchant library to PHP.
 %patch1 -p1 -b .gnusrc
 %patch2 -p1 -b .install
 %patch3 -p1 -b .norpath
-%patch4 -p1 -b .phpize64
 %patch5 -p1 -b .includedir
 %patch6 -p1 -b .embed
 %patch7 -p1 -b .recode
 %patch8 -p1 -b .aconf26x
+%patch9 -p1 -b .mysqlnd
 
 %patch20 -p1 -b .shutdown
 %patch21 -p1 -b .macropen
@@ -698,6 +722,7 @@ make %{?_smp_mflags}
 # Build /usr/bin/php-cgi with the CGI SAPI, and all the shared extensions
 pushd build-cgi
 build --enable-force-cgi-redirect \
+      --libdir=%{_libdir}/php \
       --enable-pcntl \
       --with-imap=shared --with-imap-ssl \
       --enable-mbstring=shared \
@@ -707,8 +732,9 @@ build --enable-force-cgi-redirect \
       --enable-dba=shared --with-db4=%{_prefix} \
       --with-xmlrpc=shared \
       --with-ldap=shared --with-ldap-sasl \
-      --with-mysql=shared,%{_prefix} \
-      --with-mysqli=shared,%{mysql_config} \
+      --enable-mysqlnd=shared \
+      --with-mysql=shared,mysqlnd \
+      --with-mysqli=shared,mysqlnd \
       --with-interbase=shared,%{_libdir}/firebird \
       --with-pdo-firebird=shared,%{_libdir}/firebird \
       --enable-dom=shared \
@@ -722,7 +748,7 @@ build --enable-force-cgi-redirect \
       --enable-fastcgi \
       --enable-pdo=shared \
       --with-pdo-odbc=shared,unixODBC,%{_prefix} \
-      --with-pdo-mysql=shared,%{mysql_config} \
+      --with-pdo-mysql=shared,mysqlnd \
       --with-pdo-pgsql=shared,%{_prefix} \
       --with-pdo-sqlite=shared,%{_prefix} \
       --with-pdo-dblib=shared,%{_prefix} \
@@ -748,9 +774,9 @@ build --enable-force-cgi-redirect \
       --with-recode=shared,%{_prefix}
 popd
 
-without_shared="--without-mysql --without-gd \
+without_shared="--without-gd \
       --disable-dom --disable-dba --without-unixODBC \
-      --disable-pdo --disable-xmlreader --disable-xmlwriter \
+      --disable-xmlreader --disable-xmlwriter \
       --without-sqlite3 --disable-phar --disable-fileinfo \
       --disable-json --without-pspell --disable-wddx \
       --without-curl --disable-posix \
@@ -758,26 +784,40 @@ without_shared="--without-mysql --without-gd \
 
 # Build Apache module, and the CLI SAPI, /usr/bin/php
 pushd build-apache
-build --with-apxs2=%{_sbindir}/apxs ${without_shared}
+build --with-apxs2=%{_sbindir}/apxs \
+      --libdir=%{_libdir}/php \
+      --enable-pdo=shared \
+      --with-mysql=shared,%{_prefix} \
+      --with-mysqli=shared,%{mysql_config} \
+      --with-pdo-mysql=shared,%{mysql_config} \
+      --with-pdo-sqlite=shared,%{_prefix} \
+      ${without_shared}
 popd
 
 %if %{with_fpm}
 # Build php-fpm
 pushd build-fpm
-build --enable-fpm ${without_shared}
+build --enable-fpm \
+      --libdir=%{_libdir}/php \
+      --without-mysql --disable-pdo \
+      ${without_shared}
 popd
 %endif
 
 # Build for inclusion as embedded script language into applications,
 # /usr/lib[64]/libphp5.so
 pushd build-embedded
-build --enable-embed ${without_shared}
+build --enable-embed \
+      --without-mysql --disable-pdo \
+      ${without_shared}
 popd
 
 # Build a special thread-safe Apache SAPI
 pushd build-zts
-EXTENSION_DIR=%{_libdir}/php/modules-zts
+EXTENSION_DIR=%{_libdir}/php-zts/modules
 build --with-apxs2=%{_sbindir}/apxs ${without_shared} \
+      --libdir=%{_libdir}/php-zts \
+      --without-mysql --disable-pdo \
       --enable-maintainer-zts \
       --with-config-file-scan-dir=%{_sysconfdir}/php-zts.d
 popd
@@ -812,11 +852,25 @@ make -C build-embedded install-sapi install-headers INSTALL_ROOT=$RPM_BUILD_ROOT
 
 %if %{with_fpm}
 # Install the php-fpm binary
-make -C build-fpm install-fpm INSTALL_ROOT=$RPM_BUILD_ROOT 
+make -C build-fpm install-fpm \
+     INSTALL_ROOT=$RPM_BUILD_ROOT
 %endif
 
 # Install everything from the CGI SAPI build
-make -C build-cgi install INSTALL_ROOT=$RPM_BUILD_ROOT 
+make -C build-cgi install \
+     INSTALL_ROOT=$RPM_BUILD_ROOT
+
+# rename extensions build with mysqlnd
+mv $RPM_BUILD_ROOT%{_libdir}/php/modules/mysql.so \
+   $RPM_BUILD_ROOT%{_libdir}/php/modules/mysqlnd_mysql.so
+mv $RPM_BUILD_ROOT%{_libdir}/php/modules/mysqli.so \
+   $RPM_BUILD_ROOT%{_libdir}/php/modules/mysqlnd_mysqli.so
+mv $RPM_BUILD_ROOT%{_libdir}/php/modules/pdo_mysql.so \
+   $RPM_BUILD_ROOT%{_libdir}/php/modules/pdo_mysqlnd.so
+
+# Install the mysql extension build with libmysql
+make -C build-apache install-modules \
+     INSTALL_ROOT=$RPM_BUILD_ROOT
 
 # Install the default configuration file and icons
 install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/
@@ -870,6 +924,7 @@ install -m 644 php-fpm.tmpfiles $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/php-fpm
 
 # Generate files lists and stub .ini files for each subpackage
 for mod in pgsql mysql mysqli odbc ldap snmp xmlrpc imap \
+    mysqlnd mysqlnd_mysql mysqlnd_mysqli pdo_mysqlnd \
     mbstring gd dom xsl soap bcmath dba xmlreader xmlwriter \
     pdo pdo_mysql pdo_pgsql pdo_odbc pdo_sqlite json %{zipmod} \
     sqlite3 enchant phar fileinfo intl \
@@ -890,6 +945,11 @@ cat files.dom files.xsl files.xml{reader,writer} files.wddx > files.xml
 
 # The mysql and mysqli modules are both packaged in php-mysql
 cat files.mysqli >> files.mysql
+# mysqlnd
+cat files.mysqlnd_mysql \
+    files.mysqlnd_mysqli \
+    files.pdo_mysqlnd \
+    >> files.mysqlnd
 
 # Split out the PDO modules
 cat files.pdo_dblib >> files.mssql
@@ -966,7 +1026,7 @@ fi
 #dir %{_sysconfdir}/php-zts.d
 %dir %{_libdir}/php
 %dir %{_libdir}/php/modules
-#dir %{_libdir}/php/modules-zts
+#dir %{_libdir}/php-zts/modules
 %dir %{_localstatedir}/lib/php
 %dir %{_libdir}/php/pear
 %dir %{_datadir}/php
@@ -1038,9 +1098,15 @@ fi
 %files recode -f files.recode
 %files interbase -f files.interbase
 %files enchant -f files.enchant
+%files mysqlnd -f files.mysqlnd
 
 
 %changelog
+* Tue Sep 13 2011 Remi Collet <remi at fedoraproject.org> 5.3.8-2
+- add mysqlnd sub-package
+- drop patch4, use --libdir to use /usr/lib*/php/build
+- add patch to redirect mysql.sock (in mysqlnd)
+
 * Tue Aug 23 2011 Remi Collet <remi at fedoraproject.org> 5.3.8-1
 - update to 5.3.8
   http://www.php.net/ChangeLog-5.php#5.3.8


commit e2cd48206908a7fd3b445c466eb3cd0e9e0bfe9c
Author: remi <fedora at famillecollet.com>
Date:   Tue Aug 23 18:24:50 2011 +0200

    update to 5.3.8

diff --git a/.gitignore b/.gitignore
index 76e8fb5..7f79b85 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 php.spec~
 /php-5.3.7.tar.bz2
+/php-5.3.8.tar.bz2
diff --git a/php-5.3.7-aconf259.patch b/php-5.3.7-aconf259.patch
deleted file mode 100644
index 2e94d28..0000000
--- a/php-5.3.7-aconf259.patch
+++ /dev/null
@@ -1,195 +0,0 @@
-diff -up php-5.3.7/build/buildcheck.sh.aconf259 php-5.3.7/build/buildcheck.sh
---- php-5.3.7/build/buildcheck.sh.aconf259	2011-05-18 21:55:34.000000000 +0200
-+++ php-5.3.7/build/buildcheck.sh	2011-08-18 18:05:07.401955101 +0200
-@@ -28,33 +28,23 @@ if test -z "$PHP_AUTOCONF"; then
-   PHP_AUTOCONF='autoconf'
- fi
- 
--# autoconf 2.13 or newer
-+# autoconf 2.59 or newer
- ac_version=`$PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
- if test -z "$ac_version"; then
- echo "buildconf: autoconf not found."
--echo "           You need autoconf version 2.13 or newer installed"
-+echo "           You need autoconf version 2.59 or newer installed"
- echo "           to build PHP from SVN."
- exit 1
- fi
- IFS=.; set $ac_version; IFS=' '
--if test "$1" = "2" -a "$2" -lt "13" || test "$1" -lt "2"; then
-+if test "$1" = "2" -a "$2" -lt "59" || test "$1" -lt "2"; then
- echo "buildconf: autoconf version $ac_version found."
--echo "           You need autoconf version 2.13 or newer installed"
-+echo "           You need autoconf version 2.59 or newer installed"
- echo "           to build PHP from SVN."
- exit 1
- fi
- 
--if test "$1" = "2" -a "$2" -gt "59"; then
--  echo "buildconf: You need autoconf 2.59 or lower to build this version of PHP."
--  echo "           You are currently trying to use $ac_version"
--  echo "           Most distros have separate autoconf 2.13 or 2.59 packages."
--  echo "           On Debian/Ubuntu both autoconf2.13 and autoconf2.59 packages exist."
--  echo "           Install autoconf2.13 and set the PHP_AUTOCONF env var to "
--  echo "           autoconf2.13 and try again."
--  exit 1
--else
--  echo "buildconf: autoconf version $ac_version (ok)"
--fi
-+echo "buildconf: autoconf version $ac_version (ok)"
- 
- if test "$1" = "2" -a "$2" -ge "50"; then
-   ./vcsclean
-diff -up php-5.3.7/configure.in.aconf259 php-5.3.7/configure.in
---- php-5.3.7/configure.in.aconf259	2011-08-18 18:05:07.393955075 +0200
-+++ php-5.3.7/configure.in	2011-08-18 18:05:43.766072484 +0200
-@@ -1,28 +1,6 @@
- ## $Id: configure.in 315066 2011-08-17 13:30:04Z iliaa $ -*- autoconf -*-
- dnl ## Process this file with autoconf to produce a configure script.
- 
--divert(1)
--
--dnl ## Diversion 1 is the autoconf + automake setup phase. We also
--dnl ## set the PHP version, deal with platform-specific compile
--dnl ## options and check for the basic compile tools.
--
--dnl ## Diversion 2 is the initial checking of OS features, programs,
--dnl ## libraries and so on.
--
--dnl ## In diversion 3 we check for compile-time options to the PHP
--dnl ## core and how to deal with different system dependencies. 
--dnl ## This includes whether debugging or short tags are enabled
--dnl ## and the default behaviour of php.ini options.
--dnl ## This is also where an SAPI interface is selected (choosing between
--dnl ## Apache module, CGI etc.)
--
--dnl ## In diversion 4 we check user-configurable general settings.
--
--dnl ## In diversion 5 we check which extensions should be compiled.
--dnl ## All of these are normally in the extension directories.
--dnl ## Diversion 5 is the last one.  Here we generate files and clean up.
--
- dnl include Zend specific macro definitions first
- dnl -------------------------------------------------------------------------
- sinclude(Zend/acinclude.m4)
-@@ -30,8 +8,10 @@ sinclude(Zend/acinclude.m4)
- dnl Basic autoconf + automake initialization, generation of config.nice.
- dnl -------------------------------------------------------------------------
- 
--AC_PREREQ(2.13)
-+AC_PREREQ(2.59)
- AC_INIT(README.SVN-RULES)
-+ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
-+
- 
- PHP_CONFIG_NICE(config.nice)
- 
-@@ -292,14 +272,6 @@ sinclude(TSRM/threads.m4)
- sinclude(TSRM/tsrm.m4)
- 
- 
--divert(2)
--
--dnl ## Diversion 2 is where we set PHP-specific options and come up
--dnl ## with reasonable default values for them. We check for pthreads here
--dnl ## because the information is needed by the SAPI configuration.
--dnl ## This is also where an SAPI interface is selected (choosing between
--dnl ## Apache module, CGI etc.)
--
- dnl .
- dnl -------------------------------------------------------------------------
- 
-@@ -331,13 +303,6 @@ if test "$enable_maintainer_zts" = "yes"
-   PTHREADS_FLAGS
- fi
- 
--divert(3)
--
--dnl ## In diversion 3 we check for compile-time options to the PHP
--dnl ## core and how to deal with different system dependencies. 
--dnl ## This includes whether debugging or short tags are enabled
--dnl ## and the default behaviour of php.ini options.
--
- dnl Starting system checks.
- dnl -------------------------------------------------------------------------
- 
-@@ -677,10 +642,6 @@ if test "x$php_crypt_r" = "x1"; then
-   PHP_CRYPT_R_STYLE
- fi
- 
--divert(4)
--
--dnl ## In diversion 4 we check user-configurable general settings.
--
- dnl General settings.
- dnl -------------------------------------------------------------------------
- PHP_CONFIGURE_PART(General settings)
-@@ -918,11 +879,6 @@ else
-   AC_MSG_RESULT([using system default])
- fi
- 
--divert(5)
--
--dnl ## In diversion 5 we check which extensions should be compiled.
--dnl ## All of these are normally in the extension directories.
--
- dnl Extension configuration.
- dnl -------------------------------------------------------------------------
- 
-diff -up php-5.3.7/ext/standard/config.m4.aconf259 php-5.3.7/ext/standard/config.m4
---- php-5.3.7/ext/standard/config.m4.aconf259	2010-06-17 12:22:03.000000000 +0200
-+++ php-5.3.7/ext/standard/config.m4	2011-08-18 18:05:07.403955107 +0200
-@@ -1,7 +1,5 @@
- dnl $Id: config.m4 300511 2010-06-17 10:22:03Z pajoye $ -*- autoconf -*-
- 
--divert(3)dnl
--
- dnl
- dnl Check if flush should be called explicitly after buffered io
- dnl
-@@ -342,8 +340,6 @@ dnl
- AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy)
- AC_FUNC_FNMATCH	
- 
--divert(5)dnl
--
- dnl
- dnl Check if there is a support means of creating a new process
- dnl and defining which handles it receives
-diff -up php-5.3.7/scripts/php-config.in.aconf259 php-5.3.7/scripts/php-config.in
---- php-5.3.7/scripts/php-config.in.aconf259	2011-04-18 13:13:37.000000000 +0200
-+++ php-5.3.7/scripts/php-config.in	2011-08-18 18:05:07.404955110 +0200
-@@ -2,6 +2,7 @@
- 
- SED="@SED@"
- prefix="@prefix@"
-+datarootdir="@datarootdir@"
- exec_prefix="@exec_prefix@"
- version="@PHP_VERSION@"
- vernum="@PHP_VERSION_ID@"
-diff -up php-5.3.7/scripts/phpize.in.aconf259 php-5.3.7/scripts/phpize.in
---- php-5.3.7/scripts/phpize.in.aconf259	2011-08-18 18:05:07.390955065 +0200
-+++ php-5.3.7/scripts/phpize.in	2011-08-18 18:05:07.405955113 +0200
-@@ -2,6 +2,7 @@
- 
- # Variable declaration
- prefix='@prefix@'
-+datarootdir='@datarootdir@'
- exec_prefix="`eval echo @exec_prefix@`"
- phpdir="@libdir@/php/build"
- includedir="`eval echo @includedir@`/php"
-diff -up php-5.3.7/scripts/phpize.m4.aconf259 php-5.3.7/scripts/phpize.m4
---- php-5.3.7/scripts/phpize.m4.aconf259	2010-11-02 10:58:08.000000000 +0100
-+++ php-5.3.7/scripts/phpize.m4	2011-08-18 18:05:07.406955117 +0200
-@@ -1,9 +1,8 @@
- dnl This file becomes configure.in for self-contained extensions.
- 
--divert(1)
--
--AC_PREREQ(2.13)
-+AC_PREREQ(2.59)
- AC_INIT(config.m4)
-+ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
- 
- PHP_CONFIG_NICE(config.nice)
- 
diff --git a/php-5.3.8-aconf259.patch b/php-5.3.8-aconf259.patch
new file mode 100644
index 0000000..b135fc4
--- /dev/null
+++ b/php-5.3.8-aconf259.patch
@@ -0,0 +1,195 @@
+diff -up php-5.3.8/build/buildcheck.sh.aconf259 php-5.3.8/build/buildcheck.sh
+--- php-5.3.8/build/buildcheck.sh.aconf259	2011-05-18 21:55:34.000000000 +0200
++++ php-5.3.8/build/buildcheck.sh	2011-08-23 13:43:08.977271533 +0200
+@@ -28,33 +28,23 @@ if test -z "$PHP_AUTOCONF"; then
+   PHP_AUTOCONF='autoconf'
+ fi
+ 
+-# autoconf 2.13 or newer
++# autoconf 2.59 or newer
+ ac_version=`$PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
+ if test -z "$ac_version"; then
+ echo "buildconf: autoconf not found."
+-echo "           You need autoconf version 2.13 or newer installed"
++echo "           You need autoconf version 2.59 or newer installed"
+ echo "           to build PHP from SVN."
+ exit 1
+ fi
+ IFS=.; set $ac_version; IFS=' '
+-if test "$1" = "2" -a "$2" -lt "13" || test "$1" -lt "2"; then
++if test "$1" = "2" -a "$2" -lt "59" || test "$1" -lt "2"; then
+ echo "buildconf: autoconf version $ac_version found."
+-echo "           You need autoconf version 2.13 or newer installed"
++echo "           You need autoconf version 2.59 or newer installed"
+ echo "           to build PHP from SVN."
+ exit 1
+ fi
+ 
+-if test "$1" = "2" -a "$2" -gt "59"; then
+-  echo "buildconf: You need autoconf 2.59 or lower to build this version of PHP."
+-  echo "           You are currently trying to use $ac_version"
+-  echo "           Most distros have separate autoconf 2.13 or 2.59 packages."
+-  echo "           On Debian/Ubuntu both autoconf2.13 and autoconf2.59 packages exist."
+-  echo "           Install autoconf2.13 and set the PHP_AUTOCONF env var to "
+-  echo "           autoconf2.13 and try again."
+-  exit 1
+-else
+-  echo "buildconf: autoconf version $ac_version (ok)"
+-fi
++echo "buildconf: autoconf version $ac_version (ok)"
+ 
+ if test "$1" = "2" -a "$2" -ge "50"; then
+   ./vcsclean
+diff -up php-5.3.8/configure.in.aconf259 php-5.3.8/configure.in
+--- php-5.3.8/configure.in.aconf259	2011-08-23 13:43:08.971271521 +0200
++++ php-5.3.8/configure.in	2011-08-23 13:43:34.264326174 +0200
+@@ -1,28 +1,6 @@
+ ## $Id: configure.in 315343 2011-08-23 08:56:29Z johannes $ -*- autoconf -*-
+ dnl ## Process this file with autoconf to produce a configure script.
+ 
+-divert(1)
+-
+-dnl ## Diversion 1 is the autoconf + automake setup phase. We also
+-dnl ## set the PHP version, deal with platform-specific compile
+-dnl ## options and check for the basic compile tools.
+-
+-dnl ## Diversion 2 is the initial checking of OS features, programs,
+-dnl ## libraries and so on.
+-
+-dnl ## In diversion 3 we check for compile-time options to the PHP
+-dnl ## core and how to deal with different system dependencies. 
+-dnl ## This includes whether debugging or short tags are enabled
+-dnl ## and the default behaviour of php.ini options.
+-dnl ## This is also where an SAPI interface is selected (choosing between
+-dnl ## Apache module, CGI etc.)
+-
+-dnl ## In diversion 4 we check user-configurable general settings.
+-
+-dnl ## In diversion 5 we check which extensions should be compiled.
+-dnl ## All of these are normally in the extension directories.
+-dnl ## Diversion 5 is the last one.  Here we generate files and clean up.
+-
+ dnl include Zend specific macro definitions first
+ dnl -------------------------------------------------------------------------
+ sinclude(Zend/acinclude.m4)
+@@ -30,8 +8,10 @@ sinclude(Zend/acinclude.m4)
+ dnl Basic autoconf + automake initialization, generation of config.nice.
+ dnl -------------------------------------------------------------------------
+ 
+-AC_PREREQ(2.13)
++AC_PREREQ(2.59)
+ AC_INIT(README.SVN-RULES)
++ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
++
+ 
+ PHP_CONFIG_NICE(config.nice)
+ 
+@@ -292,14 +272,6 @@ sinclude(TSRM/threads.m4)
+ sinclude(TSRM/tsrm.m4)
+ 
+ 
+-divert(2)
+-
+-dnl ## Diversion 2 is where we set PHP-specific options and come up
+-dnl ## with reasonable default values for them. We check for pthreads here
+-dnl ## because the information is needed by the SAPI configuration.
+-dnl ## This is also where an SAPI interface is selected (choosing between
+-dnl ## Apache module, CGI etc.)
+-
+ dnl .
+ dnl -------------------------------------------------------------------------
+ 
+@@ -331,13 +303,6 @@ if test "$enable_maintainer_zts" = "yes"
+   PTHREADS_FLAGS
+ fi
+ 
+-divert(3)
+-
+-dnl ## In diversion 3 we check for compile-time options to the PHP
+-dnl ## core and how to deal with different system dependencies. 
+-dnl ## This includes whether debugging or short tags are enabled
+-dnl ## and the default behaviour of php.ini options.
+-
+ dnl Starting system checks.
+ dnl -------------------------------------------------------------------------
+ 
+@@ -677,10 +642,6 @@ if test "x$php_crypt_r" = "x1"; then
+   PHP_CRYPT_R_STYLE
+ fi
+ 
+-divert(4)
+-
+-dnl ## In diversion 4 we check user-configurable general settings.
+-
+ dnl General settings.
+ dnl -------------------------------------------------------------------------
+ PHP_CONFIGURE_PART(General settings)
+@@ -918,11 +879,6 @@ else
+   AC_MSG_RESULT([using system default])
+ fi
+ 
+-divert(5)
+-
+-dnl ## In diversion 5 we check which extensions should be compiled.
+-dnl ## All of these are normally in the extension directories.
+-
+ dnl Extension configuration.
+ dnl -------------------------------------------------------------------------
+ 
+diff -up php-5.3.8/ext/standard/config.m4.aconf259 php-5.3.8/ext/standard/config.m4
+--- php-5.3.8/ext/standard/config.m4.aconf259	2010-06-17 12:22:03.000000000 +0200
++++ php-5.3.8/ext/standard/config.m4	2011-08-23 13:43:08.979271537 +0200
+@@ -1,7 +1,5 @@
+ dnl $Id: config.m4 300511 2010-06-17 10:22:03Z pajoye $ -*- autoconf -*-
+ 
+-divert(3)dnl
+-
+ dnl
+ dnl Check if flush should be called explicitly after buffered io
+ dnl
+@@ -342,8 +340,6 @@ dnl
+ AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy)
+ AC_FUNC_FNMATCH	
+ 
+-divert(5)dnl
+-
+ dnl
+ dnl Check if there is a support means of creating a new process
+ dnl and defining which handles it receives
+diff -up php-5.3.8/scripts/php-config.in.aconf259 php-5.3.8/scripts/php-config.in
+--- php-5.3.8/scripts/php-config.in.aconf259	2011-04-18 13:13:37.000000000 +0200
++++ php-5.3.8/scripts/php-config.in	2011-08-23 13:43:08.980271540 +0200
+@@ -2,6 +2,7 @@
+ 
+ SED="@SED@"
+ prefix="@prefix@"
++datarootdir="@datarootdir@"
+ exec_prefix="@exec_prefix@"
+ version="@PHP_VERSION@"
+ vernum="@PHP_VERSION_ID@"
+diff -up php-5.3.8/scripts/phpize.in.aconf259 php-5.3.8/scripts/phpize.in
+--- php-5.3.8/scripts/phpize.in.aconf259	2011-08-23 13:43:08.968271513 +0200
++++ php-5.3.8/scripts/phpize.in	2011-08-23 13:43:08.981271543 +0200
+@@ -2,6 +2,7 @@
+ 
+ # Variable declaration
+ prefix='@prefix@'
++datarootdir='@datarootdir@'
+ exec_prefix="`eval echo @exec_prefix@`"
+ phpdir="@libdir@/php/build"
+ includedir="`eval echo @includedir@`/php"
+diff -up php-5.3.8/scripts/phpize.m4.aconf259 php-5.3.8/scripts/phpize.m4
+--- php-5.3.8/scripts/phpize.m4.aconf259	2010-11-02 10:58:08.000000000 +0100
++++ php-5.3.8/scripts/phpize.m4	2011-08-23 13:43:08.982271545 +0200
+@@ -1,9 +1,8 @@
+ dnl This file becomes configure.in for self-contained extensions.
+ 
+-divert(1)
+-
+-AC_PREREQ(2.13)
++AC_PREREQ(2.59)
+ AC_INIT(config.m4)
++ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
+ 
+ PHP_CONFIG_NICE(config.nice)
+ 
diff --git a/php.spec b/php.spec
index a71a2f5..0634e74 100644
--- a/php.spec
+++ b/php.spec
@@ -36,7 +36,7 @@
 
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
-Version: 5.3.7
+Version: 5.3.8
 Release: 1%{?dist}
 License: PHP
 Group: Development/Languages
@@ -61,7 +61,7 @@ Patch6: php-5.2.4-embed.patch
 Patch7: php-5.3.0-recode.patch
 # from http://svn.php.net/viewvc?view=revision&revision=311042
 # and  http://svn.php.net/viewvc?view=revision&revision=311908
-Patch8: php-5.3.7-aconf259.patch
+Patch8: php-5.3.8-aconf259.patch
 
 # Fixes for extension modules
 Patch20: php-4.3.11-shutdown.patch
@@ -1041,6 +1041,10 @@ fi
 
 
 %changelog
+* Tue Aug 23 2011 Remi Collet <remi at fedoraproject.org> 5.3.8-1
+- update to 5.3.8
+  http://www.php.net/ChangeLog-5.php#5.3.8
+
 * Thu Aug 18 2011 Remi Collet <remi at fedoraproject.org> 5.3.7-1
 - update to 5.3.7
   http://www.php.net/ChangeLog-5.php#5.3.7
diff --git a/sources b/sources
index 8312139..1281f44 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-2d47d003c96de4e88863ff38da61af33  php-5.3.7.tar.bz2
+704cd414a0565d905e1074ffdc1fadfb  php-5.3.8.tar.bz2


commit 49d95f97cbe262641d920e1f7844d6a07f4ba4a7
Author: remi <fedora at famillecollet.com>
Date:   Thu Aug 18 20:33:23 2011 +0200

    PHP 5.3.7

diff --git a/.gitignore b/.gitignore
index 7bb4718..76e8fb5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,2 @@
-php-5.3.3.tar.bz2
-/php-5.3.4.tar.bz2
-/php-5.3.5.tar.bz2
-/php-5.3.6.tar.bz2
+php.spec~
+/php-5.3.7.tar.bz2
diff --git a/php-5.3.6-aconf26x.patch b/php-5.3.6-aconf26x.patch
deleted file mode 100644
index 2e55b05..0000000
--- a/php-5.3.6-aconf26x.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff -up php-5.3.6/configure.in.aconf26x php-5.3.6/configure.in
---- php-5.3.6/configure.in.aconf26x	2011-03-17 17:53:52.309552690 +0100
-+++ php-5.3.6/configure.in	2011-03-17 17:55:00.223777508 +0100
-@@ -1,7 +1,7 @@
- ## $Id: configure.in 309329 2011-03-17 07:48:29Z johannes $ -*- autoconf -*-
- dnl ## Process this file with autoconf to produce a configure script.
- 
--divert(1)
-+divert(1001)
- 
- dnl ## Diversion 1 is the autoconf + automake setup phase. We also
- dnl ## set the PHP version, deal with platform-specific compile
-@@ -292,7 +292,7 @@ sinclude(TSRM/threads.m4)
- sinclude(TSRM/tsrm.m4)
- 
- 
--divert(2)
-+divert(1002)
- 
- dnl ## Diversion 2 is where we set PHP-specific options and come up
- dnl ## with reasonable default values for them. We check for pthreads here
-@@ -331,7 +331,7 @@ if test "$enable_maintainer_zts" = "yes"
-   PTHREADS_FLAGS
- fi
- 
--divert(3)
-+divert(1003)
- 
- dnl ## In diversion 3 we check for compile-time options to the PHP
- dnl ## core and how to deal with different system dependencies. 
-@@ -677,7 +677,7 @@ if test "x$php_crypt_r" = "x1"; then
-   PHP_CRYPT_R_STYLE
- fi
- 
--divert(4)
-+divert(1004)
- 
- dnl ## In diversion 4 we check user-configurable general settings.
- 
-@@ -918,7 +918,7 @@ else
-   AC_MSG_RESULT([using system default])
- fi
- 
--divert(5)
-+divert(1005)
- 
- dnl ## In diversion 5 we check which extensions should be compiled.
- dnl ## All of these are normally in the extension directories.
-diff -up php-5.3.6/ext/standard/config.m4.aconf26x php-5.3.6/ext/standard/config.m4
---- php-5.3.6/ext/standard/config.m4.aconf26x	2010-06-17 12:22:03.000000000 +0200
-+++ php-5.3.6/ext/standard/config.m4	2011-03-17 17:52:45.793450887 +0100
-@@ -1,6 +1,6 @@
- dnl $Id: config.m4 300511 2010-06-17 10:22:03Z pajoye $ -*- autoconf -*-
- 
--divert(3)dnl
-+divert(1003)dnl
- 
- dnl
- dnl Check if flush should be called explicitly after buffered io
-@@ -342,7 +342,7 @@ dnl
- AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy)
- AC_FUNC_FNMATCH	
- 
--divert(5)dnl
-+divert(1005)dnl
- 
- dnl
- dnl Check if there is a support means of creating a new process
-diff -up php-5.3.6/scripts/phpize.m4.aconf26x php-5.3.6/scripts/phpize.m4
---- php-5.3.6/scripts/phpize.m4.aconf26x	2010-11-02 10:58:08.000000000 +0100
-+++ php-5.3.6/scripts/phpize.m4	2011-03-17 17:52:45.793450887 +0100
-@@ -1,6 +1,6 @@
- dnl This file becomes configure.in for self-contained extensions.
- 
--divert(1)
-+divert(1001)
- 
- AC_PREREQ(2.13)
- AC_INIT(config.m4)
diff --git a/php-5.3.6-gnusrc.patch b/php-5.3.6-gnusrc.patch
deleted file mode 100644
index 1b0984e..0000000
--- a/php-5.3.6-gnusrc.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-diff -up php-5.3.6RC1/configure.in.gnusrc php-5.3.6RC1/configure.in
---- php-5.3.6RC1/configure.in.gnusrc	2011-02-16 21:20:33.000000000 +0100
-+++ php-5.3.6RC1/configure.in	2011-02-17 16:25:13.602809269 +0100
-@@ -58,6 +58,8 @@ AC_DEFUN([PHP_EXT_DIR],[ext/$1])dnl
- AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/ext/$1])dnl
- AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl
- 
-+AC_DEFINE([_GNU_SOURCE], 1, [Define to enable GNU C Library extensions])
-+
- dnl Setting up the PHP version based on the information above.
- dnl -------------------------------------------------------------------------
- 
-diff -up php-5.3.6RC1/ext/interbase/interbase.c.gnusrc php-5.3.6RC1/ext/interbase/interbase.c
---- php-5.3.6RC1/ext/interbase/interbase.c.gnusrc	2011-01-01 03:19:59.000000000 +0100
-+++ php-5.3.6RC1/ext/interbase/interbase.c	2011-02-17 16:25:13.603809213 +0100
-@@ -24,7 +24,6 @@
- #include "config.h"
- #endif
- 
--#define _GNU_SOURCE
- 
- #include "php.h"
- 
-diff -up php-5.3.6RC1/ext/pdo_firebird/firebird_driver.c.gnusrc php-5.3.6RC1/ext/pdo_firebird/firebird_driver.c
---- php-5.3.6RC1/ext/pdo_firebird/firebird_driver.c.gnusrc	2011-01-01 03:19:59.000000000 +0100
-+++ php-5.3.6RC1/ext/pdo_firebird/firebird_driver.c	2011-02-17 16:25:13.604809156 +0100
-@@ -22,7 +22,6 @@
- #include "config.h"
- #endif
- 
--#define _GNU_SOURCE
- 
- #include "php.h"
- #ifdef ZEND_ENGINE_2
-diff -up php-5.3.6RC1/ext/standard/file.c.gnusrc php-5.3.6RC1/ext/standard/file.c
---- php-5.3.6RC1/ext/standard/file.c.gnusrc	2011-01-01 03:19:59.000000000 +0100
-+++ php-5.3.6RC1/ext/standard/file.c	2011-02-17 16:25:13.605809100 +0100
-@@ -113,9 +113,6 @@ php_file_globals file_globals;
- #endif
- 
- #if defined(HAVE_FNMATCH) && !defined(PHP_WIN32)
--# ifndef _GNU_SOURCE
--#  define _GNU_SOURCE
--# endif
- # include <fnmatch.h>
- #endif
- 
-diff -up php-5.3.6RC1/ext/zlib/zlib_fopen_wrapper.c.gnusrc php-5.3.6RC1/ext/zlib/zlib_fopen_wrapper.c
---- php-5.3.6RC1/ext/zlib/zlib_fopen_wrapper.c.gnusrc	2011-01-01 03:19:59.000000000 +0100
-+++ php-5.3.6RC1/ext/zlib/zlib_fopen_wrapper.c	2011-02-17 16:26:19.531428121 +0100
-@@ -19,8 +19,6 @@
- 
- /* $Id: zlib_fopen_wrapper.c 306939 2011-01-01 02:19:59Z felipe $ */
- 
--#define _GNU_SOURCE
--
- #include "php.h"
- #include "php_zlib.h"
- #include "fopen_wrappers.h"
-diff -up php-5.3.6RC1/main/php.h.gnusrc php-5.3.6RC1/main/php.h
---- php-5.3.6RC1/main/php.h.gnusrc	2011-01-01 03:19:59.000000000 +0100
-+++ php-5.3.6RC1/main/php.h	2011-02-17 16:25:13.606809044 +0100
-@@ -30,6 +30,7 @@
- #define PHP_HAVE_STREAMS
- #define YYDEBUG 0
- 
-+#include "php_config.h"
- #include "php_version.h"
- #include "zend.h"
- #include "zend_qsort.h"
-diff -up php-5.3.6RC1/main/streams/cast.c.gnusrc php-5.3.6RC1/main/streams/cast.c
---- php-5.3.6RC1/main/streams/cast.c.gnusrc	2011-01-20 07:32:59.000000000 +0100
-+++ php-5.3.6RC1/main/streams/cast.c	2011-02-17 16:26:47.495972650 +0100
-@@ -18,7 +18,6 @@
- 
- /* $Id: cast.c 307611 2011-01-20 06:32:59Z pajoye $ */
- 
--#define _GNU_SOURCE
- #include "php.h"
- #include "php_globals.h"
- #include "php_network.h"
-diff -up php-5.3.6RC1/main/streams/memory.c.gnusrc php-5.3.6RC1/main/streams/memory.c
---- php-5.3.6RC1/main/streams/memory.c.gnusrc	2011-01-01 03:19:59.000000000 +0100
-+++ php-5.3.6RC1/main/streams/memory.c	2011-02-17 16:25:56.276628691 +0100
-@@ -18,7 +18,6 @@
- 
- /* $Id: memory.c 306939 2011-01-01 02:19:59Z felipe $ */
- 
--#define _GNU_SOURCE
- #include "php.h"
- 
- PHPAPI int php_url_decode(char *str, int len);
-diff -up php-5.3.6RC1/main/streams/streams.c.gnusrc php-5.3.6RC1/main/streams/streams.c
---- php-5.3.6RC1/main/streams/streams.c.gnusrc	2011-02-01 19:10:35.000000000 +0100
-+++ php-5.3.6RC1/main/streams/streams.c	2011-02-17 16:27:06.428980279 +0100
-@@ -21,7 +21,6 @@
- 
- /* $Id: streams.c 307922 2011-02-01 18:10:35Z cataphract $ */
- 
--#define _GNU_SOURCE
- #include "php.h"
- #include "php_globals.h"
- #include "php_network.h"
-diff -up php-5.3.6RC1/Zend/zend_language_parser.c.gnusrc php-5.3.6RC1/Zend/zend_language_parser.c
---- php-5.3.6RC1/Zend/zend_language_parser.c.gnusrc	2011-02-16 21:30:44.000000000 +0100
-+++ php-5.3.6RC1/Zend/zend_language_parser.c	2011-02-17 16:25:13.608808931 +0100
-@@ -366,6 +366,8 @@
- #include "zend_API.h"
- #include "zend_constants.h"
- 
-+#include <string.h>
-+
- 
- #define YYERROR_VERBOSE
- #define YYSTYPE znode
diff --git a/php-5.3.7-aconf259.patch b/php-5.3.7-aconf259.patch
new file mode 100644
index 0000000..2e94d28
--- /dev/null
+++ b/php-5.3.7-aconf259.patch
@@ -0,0 +1,195 @@
+diff -up php-5.3.7/build/buildcheck.sh.aconf259 php-5.3.7/build/buildcheck.sh
+--- php-5.3.7/build/buildcheck.sh.aconf259	2011-05-18 21:55:34.000000000 +0200
++++ php-5.3.7/build/buildcheck.sh	2011-08-18 18:05:07.401955101 +0200
+@@ -28,33 +28,23 @@ if test -z "$PHP_AUTOCONF"; then
+   PHP_AUTOCONF='autoconf'
+ fi
+ 
+-# autoconf 2.13 or newer
++# autoconf 2.59 or newer
+ ac_version=`$PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
+ if test -z "$ac_version"; then
+ echo "buildconf: autoconf not found."
+-echo "           You need autoconf version 2.13 or newer installed"
++echo "           You need autoconf version 2.59 or newer installed"
+ echo "           to build PHP from SVN."
+ exit 1
+ fi
+ IFS=.; set $ac_version; IFS=' '
+-if test "$1" = "2" -a "$2" -lt "13" || test "$1" -lt "2"; then
++if test "$1" = "2" -a "$2" -lt "59" || test "$1" -lt "2"; then
+ echo "buildconf: autoconf version $ac_version found."
+-echo "           You need autoconf version 2.13 or newer installed"
++echo "           You need autoconf version 2.59 or newer installed"
+ echo "           to build PHP from SVN."
+ exit 1
+ fi
+ 
+-if test "$1" = "2" -a "$2" -gt "59"; then
+-  echo "buildconf: You need autoconf 2.59 or lower to build this version of PHP."
+-  echo "           You are currently trying to use $ac_version"
+-  echo "           Most distros have separate autoconf 2.13 or 2.59 packages."
+-  echo "           On Debian/Ubuntu both autoconf2.13 and autoconf2.59 packages exist."
+-  echo "           Install autoconf2.13 and set the PHP_AUTOCONF env var to "
+-  echo "           autoconf2.13 and try again."
+-  exit 1
+-else
+-  echo "buildconf: autoconf version $ac_version (ok)"
+-fi
++echo "buildconf: autoconf version $ac_version (ok)"
+ 
+ if test "$1" = "2" -a "$2" -ge "50"; then
+   ./vcsclean
+diff -up php-5.3.7/configure.in.aconf259 php-5.3.7/configure.in
+--- php-5.3.7/configure.in.aconf259	2011-08-18 18:05:07.393955075 +0200
++++ php-5.3.7/configure.in	2011-08-18 18:05:43.766072484 +0200
+@@ -1,28 +1,6 @@
+ ## $Id: configure.in 315066 2011-08-17 13:30:04Z iliaa $ -*- autoconf -*-
+ dnl ## Process this file with autoconf to produce a configure script.
+ 
+-divert(1)
+-
+-dnl ## Diversion 1 is the autoconf + automake setup phase. We also
+-dnl ## set the PHP version, deal with platform-specific compile
+-dnl ## options and check for the basic compile tools.
+-
+-dnl ## Diversion 2 is the initial checking of OS features, programs,
+-dnl ## libraries and so on.
+-
+-dnl ## In diversion 3 we check for compile-time options to the PHP
+-dnl ## core and how to deal with different system dependencies. 
+-dnl ## This includes whether debugging or short tags are enabled
+-dnl ## and the default behaviour of php.ini options.
+-dnl ## This is also where an SAPI interface is selected (choosing between
+-dnl ## Apache module, CGI etc.)
+-
+-dnl ## In diversion 4 we check user-configurable general settings.
+-
+-dnl ## In diversion 5 we check which extensions should be compiled.
+-dnl ## All of these are normally in the extension directories.
+-dnl ## Diversion 5 is the last one.  Here we generate files and clean up.
+-
+ dnl include Zend specific macro definitions first
+ dnl -------------------------------------------------------------------------
+ sinclude(Zend/acinclude.m4)
+@@ -30,8 +8,10 @@ sinclude(Zend/acinclude.m4)
+ dnl Basic autoconf + automake initialization, generation of config.nice.
+ dnl -------------------------------------------------------------------------
+ 
+-AC_PREREQ(2.13)
++AC_PREREQ(2.59)
+ AC_INIT(README.SVN-RULES)
++ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
++
+ 
+ PHP_CONFIG_NICE(config.nice)
+ 
+@@ -292,14 +272,6 @@ sinclude(TSRM/threads.m4)
+ sinclude(TSRM/tsrm.m4)
+ 
+ 
+-divert(2)
+-
+-dnl ## Diversion 2 is where we set PHP-specific options and come up
+-dnl ## with reasonable default values for them. We check for pthreads here
+-dnl ## because the information is needed by the SAPI configuration.
+-dnl ## This is also where an SAPI interface is selected (choosing between
+-dnl ## Apache module, CGI etc.)
+-
+ dnl .
+ dnl -------------------------------------------------------------------------
+ 
+@@ -331,13 +303,6 @@ if test "$enable_maintainer_zts" = "yes"
+   PTHREADS_FLAGS
+ fi
+ 
+-divert(3)
+-
+-dnl ## In diversion 3 we check for compile-time options to the PHP
+-dnl ## core and how to deal with different system dependencies. 
+-dnl ## This includes whether debugging or short tags are enabled
+-dnl ## and the default behaviour of php.ini options.
+-
+ dnl Starting system checks.
+ dnl -------------------------------------------------------------------------
+ 
+@@ -677,10 +642,6 @@ if test "x$php_crypt_r" = "x1"; then
+   PHP_CRYPT_R_STYLE
+ fi
+ 
+-divert(4)
+-
+-dnl ## In diversion 4 we check user-configurable general settings.
+-
+ dnl General settings.
+ dnl -------------------------------------------------------------------------
+ PHP_CONFIGURE_PART(General settings)
+@@ -918,11 +879,6 @@ else
+   AC_MSG_RESULT([using system default])
+ fi
+ 
+-divert(5)
+-
+-dnl ## In diversion 5 we check which extensions should be compiled.
+-dnl ## All of these are normally in the extension directories.
+-
+ dnl Extension configuration.
+ dnl -------------------------------------------------------------------------
+ 
+diff -up php-5.3.7/ext/standard/config.m4.aconf259 php-5.3.7/ext/standard/config.m4
+--- php-5.3.7/ext/standard/config.m4.aconf259	2010-06-17 12:22:03.000000000 +0200
++++ php-5.3.7/ext/standard/config.m4	2011-08-18 18:05:07.403955107 +0200
+@@ -1,7 +1,5 @@
+ dnl $Id: config.m4 300511 2010-06-17 10:22:03Z pajoye $ -*- autoconf -*-
+ 
+-divert(3)dnl
+-
+ dnl
+ dnl Check if flush should be called explicitly after buffered io
+ dnl
+@@ -342,8 +340,6 @@ dnl
+ AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy)
+ AC_FUNC_FNMATCH	
+ 
+-divert(5)dnl
+-
+ dnl
+ dnl Check if there is a support means of creating a new process
+ dnl and defining which handles it receives
+diff -up php-5.3.7/scripts/php-config.in.aconf259 php-5.3.7/scripts/php-config.in
+--- php-5.3.7/scripts/php-config.in.aconf259	2011-04-18 13:13:37.000000000 +0200
++++ php-5.3.7/scripts/php-config.in	2011-08-18 18:05:07.404955110 +0200
+@@ -2,6 +2,7 @@
+ 
+ SED="@SED@"
+ prefix="@prefix@"
++datarootdir="@datarootdir@"
+ exec_prefix="@exec_prefix@"
+ version="@PHP_VERSION@"
+ vernum="@PHP_VERSION_ID@"
+diff -up php-5.3.7/scripts/phpize.in.aconf259 php-5.3.7/scripts/phpize.in
+--- php-5.3.7/scripts/phpize.in.aconf259	2011-08-18 18:05:07.390955065 +0200
++++ php-5.3.7/scripts/phpize.in	2011-08-18 18:05:07.405955113 +0200
+@@ -2,6 +2,7 @@
+ 
+ # Variable declaration
+ prefix='@prefix@'
++datarootdir='@datarootdir@'
+ exec_prefix="`eval echo @exec_prefix@`"
+ phpdir="@libdir@/php/build"
+ includedir="`eval echo @includedir@`/php"
+diff -up php-5.3.7/scripts/phpize.m4.aconf259 php-5.3.7/scripts/phpize.m4
+--- php-5.3.7/scripts/phpize.m4.aconf259	2010-11-02 10:58:08.000000000 +0100
++++ php-5.3.7/scripts/phpize.m4	2011-08-18 18:05:07.406955117 +0200
+@@ -1,9 +1,8 @@
+ dnl This file becomes configure.in for self-contained extensions.
+ 
+-divert(1)
+-
+-AC_PREREQ(2.13)
++AC_PREREQ(2.59)
+ AC_INIT(config.m4)
++ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
+ 
+ PHP_CONFIG_NICE(config.nice)
+ 
diff --git a/php-5.3.7-gnusrc.patch b/php-5.3.7-gnusrc.patch
new file mode 100644
index 0000000..41e4d11
--- /dev/null
+++ b/php-5.3.7-gnusrc.patch
@@ -0,0 +1,115 @@
+diff -up php-5.3.7RC3/configure.in.gnusrc php-5.3.7RC3/configure.in
+--- php-5.3.7RC3/configure.in.gnusrc	2011-07-14 14:01:37.000000000 +0200
++++ php-5.3.7RC3/configure.in	2011-07-15 17:46:36.118082437 +0200
+@@ -58,6 +58,8 @@ AC_DEFUN([PHP_EXT_DIR],[ext/$1])dnl
+ AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/ext/$1])dnl
+ AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl
+ 
++AC_DEFINE([_GNU_SOURCE], 1, [Define to enable GNU C Library extensions])
++
+ dnl Setting up the PHP version based on the information above.
+ dnl -------------------------------------------------------------------------
+ 
+diff -up php-5.3.7RC3/ext/interbase/interbase.c.gnusrc php-5.3.7RC3/ext/interbase/interbase.c
+--- php-5.3.7RC3/ext/interbase/interbase.c.gnusrc	2011-02-24 03:42:38.000000000 +0100
++++ php-5.3.7RC3/ext/interbase/interbase.c	2011-07-15 17:46:36.119082439 +0200
+@@ -24,7 +24,6 @@
+ #include "config.h"
+ #endif
+ 
+-#define _GNU_SOURCE
+ 
+ #include "php.h"
+ 
+diff -up php-5.3.7RC3/ext/pdo_firebird/firebird_driver.c.gnusrc php-5.3.7RC3/ext/pdo_firebird/firebird_driver.c
+--- php-5.3.7RC3/ext/pdo_firebird/firebird_driver.c.gnusrc	2011-06-17 04:00:20.000000000 +0200
++++ php-5.3.7RC3/ext/pdo_firebird/firebird_driver.c	2011-07-15 17:46:36.119082439 +0200
+@@ -22,7 +22,6 @@
+ #include "config.h"
+ #endif
+ 
+-#define _GNU_SOURCE
+ 
+ #include "php.h"
+ #ifdef ZEND_ENGINE_2
+diff -up php-5.3.7RC3/ext/standard/file.c.gnusrc php-5.3.7RC3/ext/standard/file.c
+--- php-5.3.7RC3/ext/standard/file.c.gnusrc	2011-06-19 16:50:44.000000000 +0200
++++ php-5.3.7RC3/ext/standard/file.c	2011-07-15 17:46:36.120082441 +0200
+@@ -113,9 +113,6 @@ php_file_globals file_globals;
+ #endif
+ 
+ #if defined(HAVE_FNMATCH) && !defined(PHP_WIN32)
+-# ifndef _GNU_SOURCE
+-#  define _GNU_SOURCE
+-# endif
+ # include <fnmatch.h>
+ #endif
+ 
+diff -up php-5.3.7RC3/ext/zlib/zlib_fopen_wrapper.c.gnusrc php-5.3.7RC3/ext/zlib/zlib_fopen_wrapper.c
+--- php-5.3.7RC3/ext/zlib/zlib_fopen_wrapper.c.gnusrc	2011-01-01 03:19:59.000000000 +0100
++++ php-5.3.7RC3/ext/zlib/zlib_fopen_wrapper.c	2011-07-15 17:46:36.121082444 +0200
+@@ -19,8 +19,6 @@
+ 
+ /* $Id: zlib_fopen_wrapper.c 306939 2011-01-01 02:19:59Z felipe $ */
+ 
+-#define _GNU_SOURCE
+-
+ #include "php.h"
+ #include "php_zlib.h"
+ #include "fopen_wrappers.h"
+diff -up php-5.3.7RC3/main/php.h.gnusrc php-5.3.7RC3/main/php.h
+--- php-5.3.7RC3/main/php.h.gnusrc	2011-01-01 03:19:59.000000000 +0100
++++ php-5.3.7RC3/main/php.h	2011-07-15 17:46:36.122082447 +0200
+@@ -30,6 +30,7 @@
+ #define PHP_HAVE_STREAMS
+ #define YYDEBUG 0
+ 
++#include "php_config.h"
+ #include "php_version.h"
+ #include "zend.h"
+ #include "zend_qsort.h"
+diff -up php-5.3.7RC3/main/streams/cast.c.gnusrc php-5.3.7RC3/main/streams/cast.c
+--- php-5.3.7RC3/main/streams/cast.c.gnusrc	2011-01-20 07:32:59.000000000 +0100
++++ php-5.3.7RC3/main/streams/cast.c	2011-07-15 17:46:36.122082447 +0200
+@@ -18,7 +18,6 @@
+ 
+ /* $Id: cast.c 307611 2011-01-20 06:32:59Z pajoye $ */
+ 
+-#define _GNU_SOURCE
+ #include "php.h"
+ #include "php_globals.h"
+ #include "php_network.h"
+diff -up php-5.3.7RC3/main/streams/memory.c.gnusrc php-5.3.7RC3/main/streams/memory.c
+--- php-5.3.7RC3/main/streams/memory.c.gnusrc	2011-01-01 03:19:59.000000000 +0100
++++ php-5.3.7RC3/main/streams/memory.c	2011-07-15 17:46:36.123082450 +0200
+@@ -18,7 +18,6 @@
+ 
+ /* $Id: memory.c 306939 2011-01-01 02:19:59Z felipe $ */
+ 
+-#define _GNU_SOURCE
+ #include "php.h"
+ 
+ PHPAPI int php_url_decode(char *str, int len);
+diff -up php-5.3.7RC3/main/streams/streams.c.gnusrc php-5.3.7RC3/main/streams/streams.c
+--- php-5.3.7RC3/main/streams/streams.c.gnusrc	2011-07-15 17:47:00.053139110 +0200
++++ php-5.3.7RC3/main/streams/streams.c	2011-07-15 17:47:03.960148477 +0200
+@@ -21,7 +21,6 @@
+ 
+ /* $Id: streams.c 312937 2011-07-05 16:09:06Z cataphract $ */
+ 
+-#define _GNU_SOURCE
+ #include "php.h"
+ #include "php_globals.h"
+ #include "php_network.h"
+diff -up php-5.3.7RC3/Zend/zend_language_parser.c.gnusrc php-5.3.7RC3/Zend/zend_language_parser.c
+--- php-5.3.7RC3/Zend/zend_language_parser.c.gnusrc	2011-07-14 10:39:30.000000000 +0200
++++ php-5.3.7RC3/Zend/zend_language_parser.c	2011-07-15 17:46:36.126082456 +0200
+@@ -112,6 +112,8 @@
+ #include "zend_API.h"
+ #include "zend_constants.h"
+ 
++#include <string.h>
++
+ 
+ #define YYERROR_VERBOSE
+ #define YYSTYPE znode
diff --git a/php.spec b/php.spec
index 9a00c69..a71a2f5 100644
--- a/php.spec
+++ b/php.spec
@@ -36,8 +36,8 @@
 
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
-Version: 5.3.6
-Release: 4%{?dist}
+Version: 5.3.7
+Release: 1%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -52,14 +52,16 @@ Source6: php-fpm.init
 Source7: php-fpm.logrotate
 
 # Build fixes
-Patch1: php-5.3.6-gnusrc.patch
+Patch1: php-5.3.7-gnusrc.patch
 Patch2: php-5.3.0-install.patch
 Patch3: php-5.2.4-norpath.patch
 Patch4: php-5.3.0-phpize64.patch
 Patch5: php-5.2.0-includedir.patch
 Patch6: php-5.2.4-embed.patch
 Patch7: php-5.3.0-recode.patch
-Patch8: php-5.3.6-aconf26x.patch
+# from http://svn.php.net/viewvc?view=revision&revision=311042
+# and  http://svn.php.net/viewvc?view=revision&revision=311908
+Patch8: php-5.3.7-aconf259.patch
 
 # Fixes for extension modules
 Patch20: php-4.3.11-shutdown.patch
@@ -82,7 +84,12 @@ BuildRequires: httpd-devel >= 2.0.46-1, pam-devel
 BuildRequires: libstdc++-devel, openssl-devel, sqlite-devel >= 3.6.0
 BuildRequires: zlib-devel, pcre-devel >= 6.6, smtpdaemon, libedit-devel
 BuildRequires: bzip2, perl, libtool >= 1.4.3, gcc-c++
-Obsoletes: php-dbg, php3, phpfi, stronghold-php
+BuildRequires: libtool-ltdl-devel
+
+Obsoletes: php-dbg, php3, phpfi, stronghold-php, php-zts < 5.3.7
+Provides: php-zts = %{version}-%{release}
+Provides: php-zts%{?_isa} = %{version}-%{release}
+
 Requires: httpd-mmn = %{httpd_mmn}
 Provides: mod_php = %{version}-%{release}
 Requires: php-common%{?_isa} = %{version}-%{release}
@@ -93,10 +100,11 @@ Requires(pre): httpd
 
 
 # Don't provides extensions, which are not shared library, as .so
-%{?filter_setup:
-%filter_provides_in %{_libdir}/php/modules/.*\.so$
-%filter_setup
-}
+# RPM 4.8
+%{?filter_provides_in: %filter_provides_in %{_libdir}/php/modules/.*\.so$}
+%{?filter_setup}
+# RPM 4.9
+%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{_libdir}/php/modules/.*\\.so$
 
 
 %description
@@ -122,17 +130,6 @@ Provides: php-readline, php-readline%{?_isa}
 The php-cli package contains the command-line interface 
 executing PHP scripts, /usr/bin/php, and the CGI interface.
 
-%package zts
-Group: Development/Languages
-Summary: Thread-safe PHP interpreter for use with the Apache HTTP Server
-Requires: php-common%{?_isa} = %{version}-%{release}
-Requires: httpd-mmn = %{httpd_mmn}
-BuildRequires: libtool-ltdl-devel
-
-%description zts
-The php-zts package contains a module for use with the Apache HTTP
-Server which can operate under a threaded server processing model.
-
 %if %{with_fpm}
 %package fpm
 Group: Development/Languages
@@ -954,6 +951,7 @@ fi
 %files
 %defattr(-,root,root)
 %{_libdir}/httpd/modules/libphp5.so
+%{_libdir}/httpd/modules/libphp5-zts.so
 %attr(0770,root,apache) %dir %{_localstatedir}/lib/php/session
 %config(noreplace) %{_sysconfdir}/httpd/conf.d/php.conf
 %{contentdir}/icons/php.gif
@@ -985,10 +983,6 @@ fi
 %{_mandir}/man1/phpize.1*
 %doc sapi/cgi/README* sapi/cli/README
 
-%files zts
-%defattr(-,root,root)
-%{_libdir}/httpd/modules/libphp5-zts.so
-
 %if %{with_fpm}
 %files fpm
 %defattr(-,root,root)
@@ -1045,7 +1039,13 @@ fi
 %files interbase -f files.interbase
 %files enchant -f files.enchant
 
+
 %changelog
+* Thu Aug 18 2011 Remi Collet <remi at fedoraproject.org> 5.3.7-1
+- update to 5.3.7
+  http://www.php.net/ChangeLog-5.php#5.3.7
+- merge php-zts into php (#698084)
+
 * Tue Jul 12 2011 Joe Orton <jorton at redhat.com> - 5.3.6-4
 - rebuild for net-snmp SONAME bump
 
diff --git a/sources b/sources
index fccaddf..8312139 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-2286f5a82a6e8397955a0025c1c2ad98  php-5.3.6.tar.bz2
+2d47d003c96de4e88863ff38da61af33  php-5.3.7.tar.bz2


commit 99e70e5395b49109e37893ca0228ade176915dab
Author: Joe Orton <jorton at redhat.com>
Date:   Tue Jul 12 09:04:29 2011 +0100

    rebuild for net-snmp SONAME bump

diff --git a/php.spec b/php.spec
index 3aefc8b..9a00c69 100644
--- a/php.spec
+++ b/php.spec
@@ -37,7 +37,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.6
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -1046,6 +1046,9 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Tue Jul 12 2011 Joe Orton <jorton at redhat.com> - 5.3.6-4
+- rebuild for net-snmp SONAME bump
+
 * Mon Apr  4 2011 Remi Collet <Fedora at famillecollet.com> 5.3.6-3
 - enable mhash extension (emulated by hash extension)
 


commit 29a379567c9701452f63578f43c15d02109f7bbb
Author: remi <fedora at famillecollet.com>
Date:   Sun Apr 17 11:42:37 2011 +0200

    minor fix in macro usage

diff --git a/php.spec b/php.spec
index eafc97e..3aefc8b 100644
--- a/php.spec
+++ b/php.spec
@@ -24,7 +24,7 @@
 %global with_fpm 0
 %endif
 
-%if %{?__isa:1}
+%if 0%{?__isa:1}
 %global isasuffix -%{__isa}
 %else
 %global isasuffix %nil


commit 0840829834a0cacb6cc910bbc64a584c5a7e1753
Author: remi <fedora at famillecollet.com>
Date:   Mon Apr 4 18:39:03 2011 +0200

    enable mhash extension (emulated by hash extension)

diff --git a/php.spec b/php.spec
index eb58375..eafc97e 100644
--- a/php.spec
+++ b/php.spec
@@ -37,7 +37,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.6
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -170,6 +170,7 @@ Provides: php-ftp, php-ftp%{?_isa}
 Provides: php-gettext, php-gettext%{?_isa}
 Provides: php-gmp, php-gmp%{?_isa}
 Provides: php-hash, php-hash%{?_isa}
+Provides: php-mhash = %{version}, php-mhash%{?_isa} = %{version}
 Provides: php-iconv, php-iconv%{?_isa}
 Provides: php-json, php-json%{?_isa}
 Provides: php-pecl-json = %{jsonver}, php-pecl-json%{?_isa} = %{jsonver}
@@ -194,6 +195,7 @@ Obsoletes: php-pecl-zip
 %endif
 Provides: php-zlib, php-zlib%{?_isa}
 Obsoletes: php-openssl, php-pecl-json, php-json, php-pecl-phar, php-pecl-Fileinfo
+Obsoletes: php-mhash < 5.3.0
 
 %description common
 The php-common package contains files used by both the php
@@ -685,6 +687,7 @@ ln -sf ../configure
         --with-libxml-dir=%{_prefix} \
 	--enable-xml \
         --with-system-tzdata \
+        --with-mhash \
 	$* 
 if test $? != 0; then 
   tail -500 config.log
@@ -1043,6 +1046,9 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Mon Apr  4 2011 Remi Collet <Fedora at famillecollet.com> 5.3.6-3
+- enable mhash extension (emulated by hash extension)
+
 * Wed Mar 23 2011 Remi Collet <Fedora at famillecollet.com> 5.3.6-2
 - rebuild for new MySQL client library
 


commit cc58741ad236ced9c8cf97471441750388640bab
Author: remi <fedora at famillecollet.com>
Date:   Wed Mar 23 13:41:21 2011 +0100

    rebuild for new MySQL client library

diff --git a/php.spec b/php.spec
index 57b7cd7..eb58375 100644
--- a/php.spec
+++ b/php.spec
@@ -37,7 +37,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.6
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -1043,6 +1043,9 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Wed Mar 23 2011 Remi Collet <Fedora at famillecollet.com> 5.3.6-2
+- rebuild for new MySQL client library
+
 * Thu Mar 17 2011 Remi Collet <Fedora at famillecollet.com> 5.3.6-1
 - update to 5.3.6
   http://www.php.net/ChangeLog-5.php#5.3.6


commit f47a10f1b68c6b885580add98120832cae3a271a
Author: remi <fedora at famillecollet.com>
Date:   Thu Mar 17 19:25:10 2011 +0100

    update to 5.3.6

diff --git a/.gitignore b/.gitignore
index 3a91bfe..7bb4718 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 php-5.3.3.tar.bz2
 /php-5.3.4.tar.bz2
 /php-5.3.5.tar.bz2
+/php-5.3.6.tar.bz2
diff --git a/php-5.3.4-cve.patch b/php-5.3.4-cve.patch
deleted file mode 100644
index 70643b0..0000000
--- a/php-5.3.4-cve.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- php/php-src/branches/PHP_5_3/ext/intl/formatter/formatter_attr.c	2010/12/10 00:37:31	306153
-+++ php/php-src/branches/PHP_5_3/ext/intl/formatter/formatter_attr.c	2010/12/10 00:47:51	306154
-@@ -311,6 +311,11 @@
- 
- 		RETURN_FALSE;
- 	}
-+	
-+	if (symbol >= UNUM_FORMAT_SYMBOL_COUNT || symbol < 0) {
-+		intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,	"numfmt_set_symbol: invalid symbol value", 0 TSRMLS_CC );
-+		RETURN_FALSE;
-+	}
- 
- 	/* Fetch the object. */
- 	FORMATTER_METHOD_FETCH_OBJECT;
diff --git a/php-5.3.4-gnusrc.patch b/php-5.3.4-gnusrc.patch
deleted file mode 100644
index f23ea28..0000000
--- a/php-5.3.4-gnusrc.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-diff -up php5.3-201004081030/configure.in.gnusrc php5.3-201004081030/configure.in
---- php5.3-201004081030/configure.in.gnusrc	2010-03-19 00:36:53.000000000 +0100
-+++ php5.3-201004081030/configure.in	2010-04-08 14:32:20.000000000 +0200
-@@ -58,6 +58,8 @@ AC_DEFUN([PHP_EXT_DIR],[ext/$1])dnl
- AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/ext/$1])dnl
- AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl
- 
-+AC_DEFINE([_GNU_SOURCE], 1, [Define to enable GNU C Library extensions])
-+
- dnl Setting up the PHP version based on the information above.
- dnl -------------------------------------------------------------------------
- 
-diff -up php5.3-201004081030/ext/interbase/interbase.c.gnusrc php5.3-201004081030/ext/interbase/interbase.c
---- php5.3-201004081030/ext/interbase/interbase.c.gnusrc	2010-01-03 10:36:55.000000000 +0100
-+++ php5.3-201004081030/ext/interbase/interbase.c	2010-04-08 14:32:20.000000000 +0200
-@@ -24,7 +24,6 @@
- #include "config.h"
- #endif
- 
--#define _GNU_SOURCE
- 
- #include "php.h"
- 
-diff -up php5.3-201004081030/ext/pdo_firebird/firebird_driver.c.gnusrc php5.3-201004081030/ext/pdo_firebird/firebird_driver.c
---- php5.3-201004081030/ext/pdo_firebird/firebird_driver.c.gnusrc	2010-01-12 14:36:12.000000000 +0100
-+++ php5.3-201004081030/ext/pdo_firebird/firebird_driver.c	2010-04-08 14:32:20.000000000 +0200
-@@ -22,7 +22,6 @@
- #include "config.h"
- #endif
- 
--#define _GNU_SOURCE
- 
- #include "php.h"
- #ifdef ZEND_ENGINE_2
-diff -up php5.3-201004081030/ext/standard/file.c.gnusrc php5.3-201004081030/ext/standard/file.c
---- php5.3-201004081030/ext/standard/file.c.gnusrc	2010-03-19 00:36:53.000000000 +0100
-+++ php5.3-201004081030/ext/standard/file.c	2010-04-08 14:32:20.000000000 +0200
-@@ -113,9 +113,6 @@ php_file_globals file_globals;
- #endif
- 
- #if defined(HAVE_FNMATCH) && !defined(PHP_WIN32)
--# ifndef _GNU_SOURCE
--#  define _GNU_SOURCE
--# endif
- # include <fnmatch.h>
- #endif
- 
-diff -up php5.3-201004081030/main/php.h.gnusrc php5.3-201004081030/main/php.h
---- php5.3-201004081030/main/php.h.gnusrc	2010-03-12 12:36:33.000000000 +0100
-+++ php5.3-201004081030/main/php.h	2010-04-08 14:32:20.000000000 +0200
-@@ -30,6 +30,7 @@
- #define PHP_HAVE_STREAMS
- #define YYDEBUG 0
- 
-+#include "php_config.h"
- #include "php_version.h"
- #include "zend.h"
- #include "zend_qsort.h"
-diff -up php5.3-201004081030/main/streams/memory.c.gnusrc php5.3-201004081030/main/streams/memory.c
---- php5.3-201004081030/main/streams/memory.c.gnusrc	2010-01-03 10:36:58.000000000 +0100
-+++ php5.3-201004081030/main/streams/memory.c	2010-04-08 14:32:20.000000000 +0200
-@@ -18,7 +18,6 @@
- 
- /* $Id: memory.c 293036 2010-01-03 09:23:27Z sebastian $ */
- 
--#define _GNU_SOURCE
- #include "php.h"
- 
- PHPAPI int php_url_decode(char *str, int len);
-diff -up php5.3-201004081030/Zend/zend_language_parser.c.gnusrc php5.3-201004081030/Zend/zend_language_parser.c
---- php5.3-201004081030/Zend/zend_language_parser.c.gnusrc	2010-04-08 12:41:33.000000000 +0200
-+++ php5.3-201004081030/Zend/zend_language_parser.c	2010-04-08 14:32:20.000000000 +0200
-@@ -366,6 +366,8 @@
- #include "zend_API.h"
- #include "zend_constants.h"
- 
-+#include <string.h>
-+
- 
- #define YYERROR_VERBOSE
- #define YYSTYPE znode
---- php5.3-201009271630/ext/zlib/zlib_fopen_wrapper.c.gnusrc	2010-09-27 00:34:59.000000000 +0200
-+++ php5.3-201009271630/ext/zlib/zlib_fopen_wrapper.c	2010-09-27 19:30:28.542859456 +0200
-@@ -19,8 +19,6 @@
- 
- /* $Id: zlib_fopen_wrapper.c 303772 2010-09-26 20:46:54Z pajoye $ */
- 
--#define _GNU_SOURCE
--
- #include "php.h"
- #include "php_zlib.h"
- #include "fopen_wrappers.h"
---- php5.3-201011110530/main/streams/cast.c.gnusrc	2010-11-05 20:36:08.000000000 +0100
-+++ php5.3-201011110530/main/streams/cast.c	2010-11-11 07:52:00.335566018 +0100
-@@ -18,7 +18,6 @@
- 
- /* $Id: cast.c 305108 2010-11-05 18:53:48Z cataphract $ */
- 
--#define _GNU_SOURCE
- #include "php.h"
- #include "php_globals.h"
- #include "php_network.h"
---- php5.3-201011270530/main/streams/streams.c.gnusrc	2010-11-15 20:35:42.000000000 +0100
-+++ php5.3-201011270530/main/streams/streams.c	2010-11-27 08:26:48.836691759 +0100
-@@ -21,7 +21,6 @@
- 
- /* $Id: streams.c 305379 2010-11-15 18:22:52Z cataphract $ */
- 
--#define _GNU_SOURCE
- #include "php.h"
- #include "php_globals.h"
- #include "php_network.h"
diff --git a/php-5.3.5-aconf26x.patch b/php-5.3.5-aconf26x.patch
deleted file mode 100644
index 4eaa177..0000000
--- a/php-5.3.5-aconf26x.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff -up php-5.3.5/configure.in.aconf26x php-5.3.5/configure.in
---- php-5.3.5/configure.in.aconf26x	2011-01-07 18:10:08.377183393 +0100
-+++ php-5.3.5/configure.in	2011-01-07 18:10:14.204214101 +0100
-@@ -1,7 +1,7 @@
- ## $Id: configure.in 307133 2011-01-05 16:35:33Z johannes $ -*- autoconf -*-
- dnl ## Process this file with autoconf to produce a configure script.
- 
--divert(1)
-+divert(1001)
- 
- dnl ## Diversion 1 is the autoconf + automake setup phase. We also
- dnl ## set the PHP version, deal with platform-specific compile
-@@ -292,7 +292,7 @@ sinclude(TSRM/threads.m4)
- sinclude(TSRM/tsrm.m4)
- 
- 
--divert(2)
-+divert(1002)
- 
- dnl ## Diversion 2 is where we set PHP-specific options and come up
- dnl ## with reasonable default values for them. We check for pthreads here
-@@ -331,7 +331,7 @@ if test "$enable_maintainer_zts" = "yes"
-   PTHREADS_FLAGS
- fi
- 
--divert(3)
-+divert(1003)
- 
- dnl ## In diversion 3 we check for compile-time options to the PHP
- dnl ## core and how to deal with different system dependencies. 
-@@ -677,7 +677,7 @@ if test "x$php_crypt_r" = "x1"; then
-   PHP_CRYPT_R_STYLE
- fi
- 
--divert(4)
-+divert(1004)
- 
- dnl ## In diversion 4 we check user-configurable general settings.
- 
-@@ -918,7 +918,7 @@ else
-   AC_MSG_RESULT([using system default])
- fi
- 
--divert(5)
-+divert(1005)
- 
- dnl ## In diversion 5 we check which extensions should be compiled.
- dnl ## All of these are normally in the extension directories.
-diff -up php-5.3.5/ext/standard/config.m4.aconf26x php-5.3.5/ext/standard/config.m4
---- php-5.3.5/ext/standard/config.m4.aconf26x	2010-06-17 12:22:03.000000000 +0200
-+++ php-5.3.5/ext/standard/config.m4	2011-01-07 18:09:09.790922608 +0100
-@@ -1,6 +1,6 @@
- dnl $Id: config.m4 300511 2010-06-17 10:22:03Z pajoye $ -*- autoconf -*-
- 
--divert(3)dnl
-+divert(1003)dnl
- 
- dnl
- dnl Check if flush should be called explicitly after buffered io
-@@ -342,7 +342,7 @@ dnl
- AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy)
- AC_FUNC_FNMATCH	
- 
--divert(5)dnl
-+divert(1005)dnl
- 
- dnl
- dnl Check if there is a support means of creating a new process
-diff -up php-5.3.5/scripts/phpize.m4.aconf26x php-5.3.5/scripts/phpize.m4
---- php-5.3.5/scripts/phpize.m4.aconf26x	2010-11-02 10:58:08.000000000 +0100
-+++ php-5.3.5/scripts/phpize.m4	2011-01-07 18:09:09.791922611 +0100
-@@ -1,6 +1,6 @@
- dnl This file becomes configure.in for self-contained extensions.
- 
--divert(1)
-+divert(1001)
- 
- AC_PREREQ(2.13)
- AC_INIT(config.m4)
diff --git a/php-5.3.6-aconf26x.patch b/php-5.3.6-aconf26x.patch
new file mode 100644
index 0000000..2e55b05
--- /dev/null
+++ b/php-5.3.6-aconf26x.patch
@@ -0,0 +1,79 @@
+diff -up php-5.3.6/configure.in.aconf26x php-5.3.6/configure.in
+--- php-5.3.6/configure.in.aconf26x	2011-03-17 17:53:52.309552690 +0100
++++ php-5.3.6/configure.in	2011-03-17 17:55:00.223777508 +0100
+@@ -1,7 +1,7 @@
+ ## $Id: configure.in 309329 2011-03-17 07:48:29Z johannes $ -*- autoconf -*-
+ dnl ## Process this file with autoconf to produce a configure script.
+ 
+-divert(1)
++divert(1001)
+ 
+ dnl ## Diversion 1 is the autoconf + automake setup phase. We also
+ dnl ## set the PHP version, deal with platform-specific compile
+@@ -292,7 +292,7 @@ sinclude(TSRM/threads.m4)
+ sinclude(TSRM/tsrm.m4)
+ 
+ 
+-divert(2)
++divert(1002)
+ 
+ dnl ## Diversion 2 is where we set PHP-specific options and come up
+ dnl ## with reasonable default values for them. We check for pthreads here
+@@ -331,7 +331,7 @@ if test "$enable_maintainer_zts" = "yes"
+   PTHREADS_FLAGS
+ fi
+ 
+-divert(3)
++divert(1003)
+ 
+ dnl ## In diversion 3 we check for compile-time options to the PHP
+ dnl ## core and how to deal with different system dependencies. 
+@@ -677,7 +677,7 @@ if test "x$php_crypt_r" = "x1"; then
+   PHP_CRYPT_R_STYLE
+ fi
+ 
+-divert(4)
++divert(1004)
+ 
+ dnl ## In diversion 4 we check user-configurable general settings.
+ 
+@@ -918,7 +918,7 @@ else
+   AC_MSG_RESULT([using system default])
+ fi
+ 
+-divert(5)
++divert(1005)
+ 
+ dnl ## In diversion 5 we check which extensions should be compiled.
+ dnl ## All of these are normally in the extension directories.
+diff -up php-5.3.6/ext/standard/config.m4.aconf26x php-5.3.6/ext/standard/config.m4
+--- php-5.3.6/ext/standard/config.m4.aconf26x	2010-06-17 12:22:03.000000000 +0200
++++ php-5.3.6/ext/standard/config.m4	2011-03-17 17:52:45.793450887 +0100
+@@ -1,6 +1,6 @@
+ dnl $Id: config.m4 300511 2010-06-17 10:22:03Z pajoye $ -*- autoconf -*-
+ 
+-divert(3)dnl
++divert(1003)dnl
+ 
+ dnl
+ dnl Check if flush should be called explicitly after buffered io
+@@ -342,7 +342,7 @@ dnl
+ AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy)
+ AC_FUNC_FNMATCH	
+ 
+-divert(5)dnl
++divert(1005)dnl
+ 
+ dnl
+ dnl Check if there is a support means of creating a new process
+diff -up php-5.3.6/scripts/phpize.m4.aconf26x php-5.3.6/scripts/phpize.m4
+--- php-5.3.6/scripts/phpize.m4.aconf26x	2010-11-02 10:58:08.000000000 +0100
++++ php-5.3.6/scripts/phpize.m4	2011-03-17 17:52:45.793450887 +0100
+@@ -1,6 +1,6 @@
+ dnl This file becomes configure.in for self-contained extensions.
+ 
+-divert(1)
++divert(1001)
+ 
+ AC_PREREQ(2.13)
+ AC_INIT(config.m4)
diff --git a/php-5.3.6-gnusrc.patch b/php-5.3.6-gnusrc.patch
new file mode 100644
index 0000000..1b0984e
--- /dev/null
+++ b/php-5.3.6-gnusrc.patch
@@ -0,0 +1,115 @@
+diff -up php-5.3.6RC1/configure.in.gnusrc php-5.3.6RC1/configure.in
+--- php-5.3.6RC1/configure.in.gnusrc	2011-02-16 21:20:33.000000000 +0100
++++ php-5.3.6RC1/configure.in	2011-02-17 16:25:13.602809269 +0100
+@@ -58,6 +58,8 @@ AC_DEFUN([PHP_EXT_DIR],[ext/$1])dnl
+ AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/ext/$1])dnl
+ AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl
+ 
++AC_DEFINE([_GNU_SOURCE], 1, [Define to enable GNU C Library extensions])
++
+ dnl Setting up the PHP version based on the information above.
+ dnl -------------------------------------------------------------------------
+ 
+diff -up php-5.3.6RC1/ext/interbase/interbase.c.gnusrc php-5.3.6RC1/ext/interbase/interbase.c
+--- php-5.3.6RC1/ext/interbase/interbase.c.gnusrc	2011-01-01 03:19:59.000000000 +0100
++++ php-5.3.6RC1/ext/interbase/interbase.c	2011-02-17 16:25:13.603809213 +0100
+@@ -24,7 +24,6 @@
+ #include "config.h"
+ #endif
+ 
+-#define _GNU_SOURCE
+ 
+ #include "php.h"
+ 
+diff -up php-5.3.6RC1/ext/pdo_firebird/firebird_driver.c.gnusrc php-5.3.6RC1/ext/pdo_firebird/firebird_driver.c
+--- php-5.3.6RC1/ext/pdo_firebird/firebird_driver.c.gnusrc	2011-01-01 03:19:59.000000000 +0100
++++ php-5.3.6RC1/ext/pdo_firebird/firebird_driver.c	2011-02-17 16:25:13.604809156 +0100
+@@ -22,7 +22,6 @@
+ #include "config.h"
+ #endif
+ 
+-#define _GNU_SOURCE
+ 
+ #include "php.h"
+ #ifdef ZEND_ENGINE_2
+diff -up php-5.3.6RC1/ext/standard/file.c.gnusrc php-5.3.6RC1/ext/standard/file.c
+--- php-5.3.6RC1/ext/standard/file.c.gnusrc	2011-01-01 03:19:59.000000000 +0100
++++ php-5.3.6RC1/ext/standard/file.c	2011-02-17 16:25:13.605809100 +0100
+@@ -113,9 +113,6 @@ php_file_globals file_globals;
+ #endif
+ 
+ #if defined(HAVE_FNMATCH) && !defined(PHP_WIN32)
+-# ifndef _GNU_SOURCE
+-#  define _GNU_SOURCE
+-# endif
+ # include <fnmatch.h>
+ #endif
+ 
+diff -up php-5.3.6RC1/ext/zlib/zlib_fopen_wrapper.c.gnusrc php-5.3.6RC1/ext/zlib/zlib_fopen_wrapper.c
+--- php-5.3.6RC1/ext/zlib/zlib_fopen_wrapper.c.gnusrc	2011-01-01 03:19:59.000000000 +0100
++++ php-5.3.6RC1/ext/zlib/zlib_fopen_wrapper.c	2011-02-17 16:26:19.531428121 +0100
+@@ -19,8 +19,6 @@
+ 
+ /* $Id: zlib_fopen_wrapper.c 306939 2011-01-01 02:19:59Z felipe $ */
+ 
+-#define _GNU_SOURCE
+-
+ #include "php.h"
+ #include "php_zlib.h"
+ #include "fopen_wrappers.h"
+diff -up php-5.3.6RC1/main/php.h.gnusrc php-5.3.6RC1/main/php.h
+--- php-5.3.6RC1/main/php.h.gnusrc	2011-01-01 03:19:59.000000000 +0100
++++ php-5.3.6RC1/main/php.h	2011-02-17 16:25:13.606809044 +0100
+@@ -30,6 +30,7 @@
+ #define PHP_HAVE_STREAMS
+ #define YYDEBUG 0
+ 
++#include "php_config.h"
+ #include "php_version.h"
+ #include "zend.h"
+ #include "zend_qsort.h"
+diff -up php-5.3.6RC1/main/streams/cast.c.gnusrc php-5.3.6RC1/main/streams/cast.c
+--- php-5.3.6RC1/main/streams/cast.c.gnusrc	2011-01-20 07:32:59.000000000 +0100
++++ php-5.3.6RC1/main/streams/cast.c	2011-02-17 16:26:47.495972650 +0100
+@@ -18,7 +18,6 @@
+ 
+ /* $Id: cast.c 307611 2011-01-20 06:32:59Z pajoye $ */
+ 
+-#define _GNU_SOURCE
+ #include "php.h"
+ #include "php_globals.h"
+ #include "php_network.h"
+diff -up php-5.3.6RC1/main/streams/memory.c.gnusrc php-5.3.6RC1/main/streams/memory.c
+--- php-5.3.6RC1/main/streams/memory.c.gnusrc	2011-01-01 03:19:59.000000000 +0100
++++ php-5.3.6RC1/main/streams/memory.c	2011-02-17 16:25:56.276628691 +0100
+@@ -18,7 +18,6 @@
+ 
+ /* $Id: memory.c 306939 2011-01-01 02:19:59Z felipe $ */
+ 
+-#define _GNU_SOURCE
+ #include "php.h"
+ 
+ PHPAPI int php_url_decode(char *str, int len);
+diff -up php-5.3.6RC1/main/streams/streams.c.gnusrc php-5.3.6RC1/main/streams/streams.c
+--- php-5.3.6RC1/main/streams/streams.c.gnusrc	2011-02-01 19:10:35.000000000 +0100
++++ php-5.3.6RC1/main/streams/streams.c	2011-02-17 16:27:06.428980279 +0100
+@@ -21,7 +21,6 @@
+ 
+ /* $Id: streams.c 307922 2011-02-01 18:10:35Z cataphract $ */
+ 
+-#define _GNU_SOURCE
+ #include "php.h"
+ #include "php_globals.h"
+ #include "php_network.h"
+diff -up php-5.3.6RC1/Zend/zend_language_parser.c.gnusrc php-5.3.6RC1/Zend/zend_language_parser.c
+--- php-5.3.6RC1/Zend/zend_language_parser.c.gnusrc	2011-02-16 21:30:44.000000000 +0100
++++ php-5.3.6RC1/Zend/zend_language_parser.c	2011-02-17 16:25:13.608808931 +0100
+@@ -366,6 +366,8 @@
+ #include "zend_API.h"
+ #include "zend_constants.h"
+ 
++#include <string.h>
++
+ 
+ #define YYERROR_VERBOSE
+ #define YYSTYPE znode
diff --git a/php.spec b/php.spec
index d945496..57b7cd7 100644
--- a/php.spec
+++ b/php.spec
@@ -36,8 +36,8 @@
 
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
-Version: 5.3.5
-Release: 6%{?dist}
+Version: 5.3.6
+Release: 1%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -52,14 +52,14 @@ Source6: php-fpm.init
 Source7: php-fpm.logrotate
 
 # Build fixes
-Patch1: php-5.3.4-gnusrc.patch
+Patch1: php-5.3.6-gnusrc.patch
 Patch2: php-5.3.0-install.patch
 Patch3: php-5.2.4-norpath.patch
 Patch4: php-5.3.0-phpize64.patch
 Patch5: php-5.2.0-includedir.patch
 Patch6: php-5.2.4-embed.patch
 Patch7: php-5.3.0-recode.patch
-Patch8: php-5.3.5-aconf26x.patch
+Patch8: php-5.3.6-aconf26x.patch
 
 # Fixes for extension modules
 Patch20: php-4.3.11-shutdown.patch
@@ -72,10 +72,6 @@ Patch42: php-5.3.1-systzdata-v7.patch
 # See http://bugs.php.net/53436
 Patch43: php-5.3.4-phpize.patch
 
-# Security patch from upstream SVN
-# http://svn.php.net/viewvc?view=revision&revision=306154
-Patch50: php-5.3.4-cve.patch
-
 # Fixes for tests
 Patch61: php-5.0.4-tests-wddx.patch
 
@@ -266,7 +262,7 @@ databases.
 %package mysql
 Summary: A module for PHP applications that use MySQL databases
 Group: Development/Languages
-Requires: php-common%{?_isa} = %{version}-%{release}, php-pdo%{?_isa}
+Requires: php-pdo%{?_isa} = %{version}-%{release}
 Provides: php_database
 Provides: php-mysqli, php-mysqli%{?_isa}
 Provides: php-pdo_mysql, php-pdo_mysql%{?_isa}
@@ -283,7 +279,7 @@ this package and the php package.
 %package pgsql
 Summary: A PostgreSQL database module for PHP
 Group: Development/Languages
-Requires: php-common%{?_isa} = %{version}-%{release}, php-pdo
+Requires: php-pdo%{?_isa} = %{version}-%{release}
 Provides: php_database
 Provides: php-pdo_pgsql, php-pdo_pgsql%{?_isa}
 Obsoletes: mod_php3-pgsql, stronghold-php-pgsql
@@ -314,7 +310,7 @@ communication.
 
 %package odbc
 Group: Development/Languages
-Requires: php-common%{?_isa} = %{version}-%{release}, php-pdo
+Requires: php-pdo%{?_isa} = %{version}-%{release}
 Summary: A module for PHP applications that use ODBC databases
 Provides: php_database
 Provides: php-pdo_odbc, php-pdo_odbc%{?_isa}
@@ -344,7 +340,7 @@ support to PHP for using the SOAP web services protocol.
 Summary: 	A module for PHP applications that use Interbase/Firebird databases
 Group: 		Development/Languages
 BuildRequires:  firebird-devel
-Requires: 	php-common%{?_isa} = %{version}-%{release}, php-pdo
+Requires: 	php-pdo%{?_isa} = %{version}-%{release}
 Provides: 	php_database
 Provides: 	php-firebird, php-firebird%{?_isa}
 Provides: 	php-pdo_firebird, php-pdo_firebird%{?_isa}
@@ -461,7 +457,7 @@ support for using the tidy library to PHP.
 %package mssql
 Summary: MSSQL database module for PHP
 Group: Development/Languages
-Requires: php-common%{?_isa} = %{version}-%{release}, php-pdo
+Requires: php-pdo%{?_isa} = %{version}-%{release}
 BuildRequires: freetds-devel
 Provides: php-pdo_dblib, php-pdo_dblib%{?_isa}
 
@@ -543,8 +539,6 @@ support for using the enchant library to PHP.
 %patch42 -p1 -b .systzdata
 %patch43 -p0 -b .headers
 
-%patch50 -p4 -b .cve
-
 %patch61 -p1 -b .tests-wddx
 
 # Prevent %%doc confusion over LICENSE files
@@ -1049,6 +1043,11 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Thu Mar 17 2011 Remi Collet <Fedora at famillecollet.com> 5.3.6-1
+- update to 5.3.6
+  http://www.php.net/ChangeLog-5.php#5.3.6
+- fix php-pdo arch specific requires
+
 * Tue Mar 15 2011 Joe Orton <jorton at redhat.com> - 5.3.5-6
 - disable zip extension per "No Bundled Libraries" policy (#551513)
 
diff --git a/sources b/sources
index 18fafc2..fccaddf 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-8aaf20c95e91f25c5b6a591e5d6d61b9  php-5.3.5.tar.bz2
+2286f5a82a6e8397955a0025c1c2ad98  php-5.3.6.tar.bz2


commit 34628d1ab89914158c11eebb7c8515eb7767a691
Author: Joe Orton <jorton at redhat.com>
Date:   Tue Mar 15 10:22:17 2011 +0000

    disable zip extension per "No Bundled Libraries" policy (#551513)

diff --git a/php.spec b/php.spec
index 7173968..d945496 100644
--- a/php.spec
+++ b/php.spec
@@ -30,10 +30,14 @@
 %global isasuffix %nil
 %endif
 
+# Flip these to 1 and zip respectively to enable zip support again
+%global with_zip 0
+%global zipmod %nil
+
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.5
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -186,11 +190,14 @@ Provides: php-simplexml, php-simplexml%{?_isa}
 Provides: php-sockets, php-sockets%{?_isa}
 Provides: php-spl, php-spl%{?_isa}
 Provides: php-tokenizer, php-tokenizer%{?_isa}
+%if %{with_zip}
 Provides: php-zip, php-zip%{?_isa}
 Provides: php-pecl-zip = %{zipver}, php-pecl-zip%{?_isa} = %{zipver}
 Provides: php-pecl(zip) = %{zipver}, php-pecl(zip)%{?_isa} = %{zipver}
+Obsoletes: php-pecl-zip
+%endif
 Provides: php-zlib, php-zlib%{?_isa}
-Obsoletes: php-openssl, php-pecl-zip, php-pecl-json, php-json, php-pecl-phar, php-pecl-Fileinfo
+Obsoletes: php-openssl, php-pecl-json, php-json, php-pecl-phar, php-pecl-Fileinfo
 
 %description common
 The php-common package contains files used by both the php
@@ -727,7 +734,9 @@ build --enable-force-cgi-redirect \
       --with-pdo-dblib=shared,%{_prefix} \
       --with-sqlite3=shared,%{_prefix} \
       --enable-json=shared \
+%if %{with_zip}
       --enable-zip=shared \
+%endif
       --without-readline \
       --with-libedit \
       --with-pspell=shared \
@@ -868,7 +877,7 @@ install -m 644 php-fpm.tmpfiles $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/php-fpm
 # Generate files lists and stub .ini files for each subpackage
 for mod in pgsql mysql mysqli odbc ldap snmp xmlrpc imap \
     mbstring gd dom xsl soap bcmath dba xmlreader xmlwriter \
-    pdo pdo_mysql pdo_pgsql pdo_odbc pdo_sqlite json zip \
+    pdo pdo_mysql pdo_pgsql pdo_odbc pdo_sqlite json %{zipmod} \
     sqlite3 enchant phar fileinfo intl \
     mcrypt tidy pdo_dblib mssql pspell curl wddx \
     posix sysvshm sysvsem sysvmsg recode interbase pdo_firebird; do
@@ -904,7 +913,10 @@ cat files.pdo_sqlite >> files.pdo
 cat files.sqlite3 >> files.pdo
 
 # Package json, zip, curl, phar and fileinfo in -common.
-cat files.json files.zip files.curl files.phar files.fileinfo > files.common
+cat files.json files.curl files.phar files.fileinfo > files.common
+%if %{with_zip}
+cat files.zip >> files.common
+%endif
 
 # Install the macros file:
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm
@@ -1037,6 +1049,9 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Tue Mar 15 2011 Joe Orton <jorton at redhat.com> - 5.3.5-6
+- disable zip extension per "No Bundled Libraries" policy (#551513)
+
 * Mon Mar 07 2011 Caolán McNamara <caolanm at redhat.com> 5.3.5-5
 - rebuild for icu 4.6
 


commit e1e83add97ae114bd67e8e4c0118ab8cb1ce3cdf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 7 15:22:16 2011 +0000

    rebuild for icu 4.6

diff --git a/php.spec b/php.spec
index 90c1d70..7173968 100644
--- a/php.spec
+++ b/php.spec
@@ -33,7 +33,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.5
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -1037,6 +1037,9 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Mon Mar 07 2011 Caolán McNamara <caolanm at redhat.com> 5.3.5-5
+- rebuild for icu 4.6
+
 * Mon Feb 28 2011 Remi Collet <Fedora at famillecollet.com> 5.3.5-4
 - fix systemd-units requires
 


commit 02acb44ef1dd518253816cf26cbf95186e90ec19
Author: remi <fedora at famillecollet.com>
Date:   Mon Feb 28 16:38:27 2011 +0100

    fix requires requires for systemd-units (I shoul have read "all" other commits...)

diff --git a/php.spec b/php.spec
index 1728870..90c1d70 100644
--- a/php.spec
+++ b/php.spec
@@ -33,7 +33,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.5
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -138,7 +138,7 @@ Server which can operate under a threaded server processing model.
 Group: Development/Languages
 Summary: PHP FastCGI Process Manager
 Requires: php-common%{?_isa} = %{version}-%{release}
-Requires: systemd-utils
+Requires: systemd-units
 BuildRequires: libevent-devel >= 1.4.11
 
 %description fpm
@@ -1037,6 +1037,9 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Mon Feb 28 2011 Remi Collet <Fedora at famillecollet.com> 5.3.5-4
+- fix systemd-units requires
+
 * Thu Feb 24 2011 Remi Collet <Fedora at famillecollet.com> 5.3.5-3
 - add tmpfiles.d configuration for php-fpm
 - add Arch specific requires/provides


commit 5e1621094f91fbd550e422ae310c981d3bc8eba0
Author: remi <fedora at famillecollet.com>
Date:   Thu Feb 24 11:18:25 2011 +0100

    add Arch specific requires/provides

diff --git a/php.spec b/php.spec
index 7182636..1728870 100644
--- a/php.spec
+++ b/php.spec
@@ -16,7 +16,7 @@
 
 # Use the arch-specific mysql_config binary to avoid mismatch with the
 # arch detection heuristic used by bindir/mysql_config.
-%define mysql_config %{_libdir}/mysql/mysql_config
+%global mysql_config %{_libdir}/mysql/mysql_config
 
 %ifarch %{ix86} x86_64
 %global with_fpm 1
@@ -24,6 +24,12 @@
 %global with_fpm 0
 %endif
 
+%if %{?__isa:1}
+%global isasuffix -%{__isa}
+%else
+%global isasuffix %nil
+%endif
+
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.5
@@ -79,9 +85,9 @@ BuildRequires: bzip2, perl, libtool >= 1.4.3, gcc-c++
 Obsoletes: php-dbg, php3, phpfi, stronghold-php
 Requires: httpd-mmn = %{httpd_mmn}
 Provides: mod_php = %{version}-%{release}
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 # For backwards-compatibility, require php-cli for the time being:
-Requires: php-cli = %{version}-%{release}
+Requires: php-cli%{?_isa} = %{version}-%{release}
 # To ensure correct /var/lib/php/session ownership:
 Requires(pre): httpd
 
@@ -107,9 +113,10 @@ language to Apache HTTP Server.
 %package cli
 Group: Development/Languages
 Summary: Command-line interface for PHP
-Requires: php-common = %{version}-%{release}
-Provides: php-cgi = %{version}-%{release}
-Provides: php-pcntl, php-readline
+Requires: php-common%{?_isa} = %{version}-%{release}
+Provides: php-cgi = %{version}-%{release}, php-cgi%{?_isa} = %{version}-%{release}
+Provides: php-pcntl, php-pcntl%{?_isa}
+Provides: php-readline, php-readline%{?_isa}
 
 %description cli
 The php-cli package contains the command-line interface 
@@ -118,7 +125,7 @@ executing PHP scripts, /usr/bin/php, and the CGI interface.
 %package zts
 Group: Development/Languages
 Summary: Thread-safe PHP interpreter for use with the Apache HTTP Server
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 Requires: httpd-mmn = %{httpd_mmn}
 BuildRequires: libtool-ltdl-devel
 
@@ -130,7 +137,7 @@ Server which can operate under a threaded server processing model.
 %package fpm
 Group: Development/Languages
 Summary: PHP FastCGI Process Manager
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 Requires: systemd-utils
 BuildRequires: libevent-devel >= 1.4.11
 
@@ -143,20 +150,47 @@ any size, especially busier sites.
 %package common
 Group: Development/Languages
 Summary: Common files for PHP
+# Remove this when value change
 Provides: php-api = %{apiver}, php-zend-abi = %{zendver}
 Provides: php(api) = %{apiver}, php(zend-abi) = %{zendver}
-# Provides for all builtin modules:
-Provides: php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif
-Provides: php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-libxml
-Provides: php-reflection, php-session, php-shmop, php-simplexml, php-sockets
-Provides: php-spl, php-tokenizer, php-openssl, php-pcre
-Provides: php-zlib, php-json, php-zip, php-fileinfo
+# New ABI/API check - Arch specific
+Provides: php-api = %{apiver}%{isasuffix}, php-zend-abi = %{zendver}%{isasuffix}
+Provides: php(api) = %{apiver}%{isasuffix}, php(zend-abi) = %{zendver}%{isasuffix}
+# Provides for all builtin/shared modules:
+Provides: php-bz2, php-bz2%{?_isa}
+Provides: php-calendar, php-calendar%{?_isa}
+Provides: php-ctype, php-ctype%{?_isa}
+Provides: php-curl, php-curl%{?_isa}
+Provides: php-date, php-date%{?_isa}
+Provides: php-exif, php-exif%{?_isa}
+Provides: php-fileinfo, php-fileinfo%{?_isa}
+Provides: php-pecl-Fileinfo = %{fileinfover}, php-pecl-Fileinfo%{?_isa} = %{fileinfover}
+Provides: php-pecl(Fileinfo) = %{fileinfover}, php-pecl(Fileinfo)%{?_isa} = %{fileinfover}
+Provides: php-ftp, php-ftp%{?_isa}
+Provides: php-gettext, php-gettext%{?_isa}
+Provides: php-gmp, php-gmp%{?_isa}
+Provides: php-hash, php-hash%{?_isa}
+Provides: php-iconv, php-iconv%{?_isa}
+Provides: php-json, php-json%{?_isa}
+Provides: php-pecl-json = %{jsonver}, php-pecl-json%{?_isa} = %{jsonver}
+Provides: php-pecl(json) = %{jsonver}, php-pecl(json)%{?_isa} = %{jsonver}
+Provides: php-libxml, php-libxml%{?_isa}
+Provides: php-openssl, php-openssl%{?_isa}
+Provides: php-pecl-phar = %{pharver}, php-pecl-phar%{?_isa} = %{pharver}
+Provides: php-pecl(phar) = %{pharver}, php-pecl(phar)%{?_isa} = %{pharver}
+Provides: php-pcre, php-pcre%{?_isa}
+Provides: php-reflection, php-reflection%{?_isa}
+Provides: php-session, php-session%{?_isa}
+Provides: php-shmop, php-shmop%{?_isa}
+Provides: php-simplexml, php-simplexml%{?_isa}
+Provides: php-sockets, php-sockets%{?_isa}
+Provides: php-spl, php-spl%{?_isa}
+Provides: php-tokenizer, php-tokenizer%{?_isa}
+Provides: php-zip, php-zip%{?_isa}
+Provides: php-pecl-zip = %{zipver}, php-pecl-zip%{?_isa} = %{zipver}
+Provides: php-pecl(zip) = %{zipver}, php-pecl(zip)%{?_isa} = %{zipver}
+Provides: php-zlib, php-zlib%{?_isa}
 Obsoletes: php-openssl, php-pecl-zip, php-pecl-json, php-json, php-pecl-phar, php-pecl-Fileinfo
-# For obsoleted pecl extension
-Provides: php-pecl-json = %{jsonver}, php-pecl(json) = %{jsonver}
-Provides: php-pecl-zip = %{zipver}, php-pecl(zip) = %{zipver}
-Provides: php-pecl-phar = %{pharver}, php-pecl(phar) = %{pharver}
-Provides: php-pecl-Fileinfo = %{fileinfover}, php-pecl(Fileinfo) = %{fileinfover}
 
 %description common
 The php-common package contains files used by both the php
@@ -165,7 +199,7 @@ package and the php-cli package.
 %package devel
 Group: Development/Libraries
 Summary: Files needed for building PHP extensions
-Requires: php = %{version}-%{release}, autoconf, automake
+Requires: php%{?_isa} = %{version}-%{release}, autoconf, automake
 Obsoletes: php-pecl-pdo-devel
 
 %description devel
@@ -176,7 +210,7 @@ need to install this package.
 %package imap
 Summary: A module for PHP applications that use IMAP
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 Obsoletes: mod_php3-imap, stronghold-php-imap
 BuildRequires: krb5-devel, openssl-devel, libc-client-devel
 
@@ -192,7 +226,7 @@ and the php package.
 %package ldap
 Summary: A module for PHP applications that use LDAP
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 Obsoletes: mod_php3-ldap, stronghold-php-ldap
 BuildRequires: cyrus-sasl-devel, openldap-devel, openssl-devel
 
@@ -207,10 +241,14 @@ need to install this package in addition to the php package.
 %package pdo
 Summary: A database access abstraction module for PHP applications
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 Obsoletes: php-pecl-pdo-sqlite, php-pecl-pdo
+# Remove this when value change
 Provides: php-pdo-abi = %{pdover}
-Provides: php-sqlite3, php-pdo_sqlite
+# New ABI/API check - Arch specific
+Provides: php-pdo-abi = %{pdover}%{isasuffix}
+Provides: php-sqlite3, php-sqlite3%{?_isa}
+Provides: php-pdo_sqlite, php-pdo_sqlite%{?_isa}
 
 %description pdo
 The php-pdo package contains a dynamic shared object that will add
@@ -221,8 +259,10 @@ databases.
 %package mysql
 Summary: A module for PHP applications that use MySQL databases
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}, php-pdo
-Provides: php_database, php-mysqli, php-pdo_mysql
+Requires: php-common%{?_isa} = %{version}-%{release}, php-pdo%{?_isa}
+Provides: php_database
+Provides: php-mysqli, php-mysqli%{?_isa}
+Provides: php-pdo_mysql, php-pdo_mysql%{?_isa}
 Obsoletes: mod_php3-mysql, stronghold-php-mysql
 BuildRequires: mysql-devel >= 4.1.0
 
@@ -236,8 +276,9 @@ this package and the php package.
 %package pgsql
 Summary: A PostgreSQL database module for PHP
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}, php-pdo
-Provides: php_database, php-pdo_pgsql
+Requires: php-common%{?_isa} = %{version}-%{release}, php-pdo
+Provides: php_database
+Provides: php-pdo_pgsql, php-pdo_pgsql%{?_isa}
 Obsoletes: mod_php3-pgsql, stronghold-php-pgsql
 BuildRequires: krb5-devel, openssl-devel, postgresql-devel
 
@@ -253,8 +294,11 @@ php package.
 %package process
 Summary: Modules for PHP script using system process interfaces
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
-Provides: php-posix, php-sysvsem, php-sysvshm, php-sysvmsg
+Requires: php-common%{?_isa} = %{version}-%{release}
+Provides: php-posix, php-posix%{?_isa}
+Provides: php-sysvsem, php-sysvsem%{?_isa}
+Provides: php-sysvshm, php-sysvshm%{?_isa}
+Provides: php-sysvmsg, php-sysvmsg%{?_isa}
 
 %description process
 The php-process package contains dynamic shared objects which add
@@ -263,9 +307,10 @@ communication.
 
 %package odbc
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}, php-pdo
+Requires: php-common%{?_isa} = %{version}-%{release}, php-pdo
 Summary: A module for PHP applications that use ODBC databases
-Provides: php_database, php-pdo_odbc
+Provides: php_database
+Provides: php-pdo_odbc, php-pdo_odbc%{?_isa}
 Obsoletes: stronghold-php-odbc
 BuildRequires: unixODBC-devel
 
@@ -280,7 +325,7 @@ package.
 
 %package soap
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 Summary: A module for PHP applications that use the SOAP protocol
 BuildRequires: libxml2-devel
 
@@ -292,8 +337,10 @@ support to PHP for using the SOAP web services protocol.
 Summary: 	A module for PHP applications that use Interbase/Firebird databases
 Group: 		Development/Languages
 BuildRequires:  firebird-devel
-Requires: 	php-common = %{version}-%{release}, php-pdo
-Provides: 	php_database, php-firebird, php-pdo_firebird
+Requires: 	php-common%{?_isa} = %{version}-%{release}, php-pdo
+Provides: 	php_database
+Provides: 	php-firebird, php-firebird%{?_isa}
+Provides: 	php-pdo_firebird, php-pdo_firebird%{?_isa}
 
 %description interbase
 The php-interbase package contains a dynamic shared object that will add
@@ -311,7 +358,7 @@ License.
 %package snmp
 Summary: A module for PHP applications that query SNMP-managed devices
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}, net-snmp
+Requires: php-common%{?_isa} = %{version}-%{release}, net-snmp
 BuildRequires: net-snmp-devel
 
 %description snmp
@@ -323,9 +370,12 @@ will need to install this package and the php package.
 %package xml
 Summary: A module for PHP applications which use XML
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 Obsoletes: php-domxml, php-dom
-Provides: php-dom, php-xsl, php-domxml, php-wddx
+Provides: php-dom, php-dom%{?_isa}
+Provides: php-xsl, php-xsl%{?_isa}
+Provides: php-domxml, php-domxml%{?_isa}
+Provides: php-wddx, php-wddx%{?_isa}
 BuildRequires: libxslt-devel >= 1.0.18-1, libxml2-devel >= 2.4.14-1
 
 %description xml
@@ -336,7 +386,7 @@ and performing XSL transformations on XML documents.
 %package xmlrpc
 Summary: A module for PHP applications which use the XML-RPC protocol
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 
 %description xmlrpc
 The php-xmlrpc package contains a dynamic shared object that will add
@@ -345,7 +395,7 @@ support for the XML-RPC protocol to PHP.
 %package mbstring
 Summary: A module for PHP applications which need multi-byte string handling
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 
 %description mbstring
 The php-mbstring package contains a dynamic shared object that will add
@@ -354,7 +404,7 @@ support for multi-byte string handling to PHP.
 %package gd
 Summary: A module for PHP applications for using the gd graphics library
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 # Required to build the bundled GD library
 BuildRequires: libjpeg-devel, libpng-devel, freetype-devel
 BuildRequires: libXpm-devel, t1lib-devel
@@ -366,7 +416,7 @@ support for using the gd graphics library to PHP.
 %package bcmath
 Summary: A module for PHP applications for using the bcmath library
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 
 %description bcmath
 The php-bcmath package contains a dynamic shared object that will add
@@ -375,7 +425,7 @@ support for using the bcmath library to PHP.
 %package dba
 Summary: A database abstraction layer module for PHP applications
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 
 %description dba
 The php-dba package contains a dynamic shared object that will add
@@ -384,7 +434,7 @@ support for using the DBA database abstraction layer to PHP.
 %package mcrypt
 Summary: Standard PHP module provides mcrypt library support
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 BuildRequires: libmcrypt-devel
 
 %description mcrypt
@@ -394,7 +444,7 @@ support for using the mcrypt library to PHP.
 %package tidy
 Summary: Standard PHP module provides tidy library support
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 BuildRequires: libtidy-devel
 
 %description tidy
@@ -404,9 +454,9 @@ support for using the tidy library to PHP.
 %package mssql
 Summary: MSSQL database module for PHP
 Group: Development/Languages
-Requires: php-common = %{version}-%{release}, php-pdo
+Requires: php-common%{?_isa} = %{version}-%{release}, php-pdo
 BuildRequires: freetds-devel
-Provides: php-pdo_dblib
+Provides: php-pdo_dblib, php-pdo_dblib%{?_isa}
 
 %description mssql
 The php-mssql package contains a dynamic shared object that will
@@ -417,9 +467,10 @@ database server which supports TDS can be accessed.
 %package embedded
 Summary: PHP library for embedding in applications
 Group: System Environment/Libraries
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 # doing a real -devel package for just the .so symlink is a bit overkill
 Provides: php-embedded-devel = %{version}-%{release}
+Provides: php-embedded-devel%{?_isa} = %{version}-%{release}
 
 %description embedded
 The php-embedded package contains a library which can be embedded
@@ -428,7 +479,7 @@ into applications to provide PHP scripting language support.
 %package pspell
 Summary: A module for PHP applications for using pspell interfaces
 Group: System Environment/Libraries
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 BuildRequires: aspell-devel >= 0.50.0
 
 %description pspell
@@ -438,7 +489,7 @@ support for using the pspell library to PHP.
 %package recode
 Summary: A module for PHP applications for using the recode library
 Group: System Environment/Libraries
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 BuildRequires: recode-devel
 
 %description recode
@@ -448,7 +499,7 @@ support for using the recode library to PHP.
 %package intl
 Summary: Internationalization extension for PHP applications
 Group: System Environment/Libraries
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 BuildRequires: libicu-devel >= 3.6
 
 %description intl
@@ -458,7 +509,7 @@ support for using the ICU library to PHP.
 %package enchant
 Summary: Human Language and Character Encoding Support
 Group: System Environment/Libraries
-Requires: php-common = %{version}-%{release}
+Requires: php-common%{?_isa} = %{version}-%{release}
 BuildRequires: enchant-devel >= 1.2.4
 
 %description enchant
@@ -857,7 +908,9 @@ cat files.json files.zip files.curl files.phar files.fileinfo > files.common
 
 # Install the macros file:
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm
-sed -e "s/@PHP_APIVER@/%{apiver}/;s/@PHP_ZENDVER@/%{zendver}/;s/@PHP_PDOVER@/%{pdover}/" \
+sed -e "s/@PHP_APIVER@/%{apiver}%{isasuffix}/" \
+    -e "s/@PHP_ZENDVER@/%{zendver}%{isasuffix}/" \
+    -e "s/@PHP_PDOVER@/%{pdover}%{isasuffix}/" \
     < %{SOURCE3} > macros.php
 install -m 644 -c macros.php \
            $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.php
@@ -986,6 +1039,7 @@ fi
 %changelog
 * Thu Feb 24 2011 Remi Collet <Fedora at famillecollet.com> 5.3.5-3
 - add tmpfiles.d configuration for php-fpm
+- add Arch specific requires/provides
 
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 5.3.5-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild


commit a6dede894218dde0b0bfd6de14593e2731c30b77
Author: remi <fedora at famillecollet.com>
Date:   Thu Feb 24 10:25:35 2011 +0100

    add tmpfiles.d configuration for php-fpm

diff --git a/php.spec b/php.spec
index 62a591c..7182636 100644
--- a/php.spec
+++ b/php.spec
@@ -27,7 +27,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.5
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -131,6 +131,7 @@ Server which can operate under a threaded server processing model.
 Group: Development/Languages
 Summary: PHP FastCGI Process Manager
 Requires: php-common = %{version}-%{release}
+Requires: systemd-utils
 BuildRequires: libevent-devel >= 1.4.11
 
 %description fpm
@@ -563,6 +564,10 @@ fi
 find . -name \*.[ch] -exec chmod 644 {} \;
 chmod 644 README.*
 
+# php-fpm configuration files for tmpfiles.d
+echo "d %{_localstatedir}/run/php-fpm 755 root root" >php-fpm.tmpfiles
+
+
 %build
 # aclocal workaround - to be improved
 cat `aclocal --print-ac-dir`/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 >>aclocal.m4
@@ -801,6 +806,9 @@ install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_initrddir}/php-fpm
 # LogRotate
 install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
 install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm
+# tmpfiles.d
+install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d
+install -m 644 php-fpm.tmpfiles $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/php-fpm.conf
 %endif
 
 # Fix the link
@@ -926,12 +934,13 @@ fi
 %config(noreplace) %{_sysconfdir}/php-fpm.conf
 %config(noreplace) %{_sysconfdir}/php-fpm.d/www.conf
 %config(noreplace) %{_sysconfdir}/logrotate.d/php-fpm
+%config(noreplace) %{_sysconfdir}/tmpfiles.d/php-fpm.conf
 %{_sbindir}/php-fpm
 %{_initrddir}/php-fpm
 %dir %{_sysconfdir}/php-fpm.d
 # log owned by apache for log
 %attr(770,apache,apache) %dir %{_localstatedir}/log/php-fpm
-%ghost %dir %{_localstatedir}/run/php-fpm
+%dir %{_localstatedir}/run/php-fpm
 %{_mandir}/man8/php-fpm.8*
 %endif
 
@@ -975,6 +984,9 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Thu Feb 24 2011 Remi Collet <Fedora at famillecollet.com> 5.3.5-3
+- add tmpfiles.d configuration for php-fpm
+
 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 5.3.5-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 


commit 1198f67ff9e7da266b5498281d763e5f5045a7dc
Author: Dennis Gilmore <dennis at ausil.us>
Date:   Wed Feb 9 05:57:40 2011 -0600

    - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

diff --git a/php.spec b/php.spec
index 4cf4afd..62a591c 100644
--- a/php.spec
+++ b/php.spec
@@ -27,7 +27,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.5
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -975,6 +975,9 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 5.3.5-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
 * Fri Jan 07 2011 Remi Collet <Fedora at famillecollet.com> 5.3.5-1
 - update to 5.3.5
   http://www.php.net/ChangeLog-5.php#5.3.5


commit 9c2fc6afe0bc4b8c1e7ddd3047b6fcc63aba45a7
Author: remi <fedora at famillecollet.com>
Date:   Fri Jan 7 18:52:17 2011 +0100

    update to 5.3.5 (security)

diff --git a/.gitignore b/.gitignore
index 5f036b5..3a91bfe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 php-5.3.3.tar.bz2
 /php-5.3.4.tar.bz2
+/php-5.3.5.tar.bz2
diff --git a/php-5.3.4-aconf26x.patch b/php-5.3.4-aconf26x.patch
deleted file mode 100644
index fbd8639..0000000
--- a/php-5.3.4-aconf26x.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff -up php-5.3.4/configure.in.aconf26x php-5.3.4/configure.in
---- php-5.3.4/configure.in.aconf26x	2010-12-11 11:02:33.634975461 +0100
-+++ php-5.3.4/configure.in	2010-12-11 11:03:30.336094172 +0100
-@@ -1,7 +1,7 @@
- ## $Id: configure.in 306090 2010-12-08 21:38:51Z johannes $ -*- autoconf -*-
- dnl ## Process this file with autoconf to produce a configure script.
- 
--divert(1)
-+divert(1001)
- 
- dnl ## Diversion 1 is the autoconf + automake setup phase. We also
- dnl ## set the PHP version, deal with platform-specific compile
-@@ -292,7 +292,7 @@ sinclude(TSRM/threads.m4)
- sinclude(TSRM/tsrm.m4)
- 
- 
--divert(2)
-+divert(1002)
- 
- dnl ## Diversion 2 is where we set PHP-specific options and come up
- dnl ## with reasonable default values for them. We check for pthreads here
-@@ -331,7 +331,7 @@ if test "$enable_maintainer_zts" = "yes"
-   PTHREADS_FLAGS
- fi
- 
--divert(3)
-+divert(1003)
- 
- dnl ## In diversion 3 we check for compile-time options to the PHP
- dnl ## core and how to deal with different system dependencies. 
-@@ -677,7 +677,7 @@ if test "x$php_crypt_r" = "x1"; then
-   PHP_CRYPT_R_STYLE
- fi
- 
--divert(4)
-+divert(1004)
- 
- dnl ## In diversion 4 we check user-configurable general settings.
- 
-@@ -918,7 +918,7 @@ else
-   AC_MSG_RESULT([using system default])
- fi
- 
--divert(5)
-+divert(1005)
- 
- dnl ## In diversion 5 we check which extensions should be compiled.
- dnl ## All of these are normally in the extension directories.
-diff -up php-5.3.4/ext/standard/config.m4.aconf26x php-5.3.4/ext/standard/config.m4
---- php-5.3.4/ext/standard/config.m4.aconf26x	2010-06-17 12:22:03.000000000 +0200
-+++ php-5.3.4/ext/standard/config.m4	2010-12-11 11:02:33.643973734 +0100
-@@ -1,6 +1,6 @@
- dnl $Id: config.m4 300511 2010-06-17 10:22:03Z pajoye $ -*- autoconf -*-
- 
--divert(3)dnl
-+divert(1003)dnl
- 
- dnl
- dnl Check if flush should be called explicitly after buffered io
-@@ -342,7 +342,7 @@ dnl
- AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy)
- AC_FUNC_FNMATCH	
- 
--divert(5)dnl
-+divert(1005)dnl
- 
- dnl
- dnl Check if there is a support means of creating a new process
-diff -up php-5.3.4/scripts/phpize.m4.aconf26x php-5.3.4/scripts/phpize.m4
---- php-5.3.4/scripts/phpize.m4.aconf26x	2010-11-02 10:58:08.000000000 +0100
-+++ php-5.3.4/scripts/phpize.m4	2010-12-11 11:02:33.643973734 +0100
-@@ -1,6 +1,6 @@
- dnl This file becomes configure.in for self-contained extensions.
- 
--divert(1)
-+divert(1001)
- 
- AC_PREREQ(2.13)
- AC_INIT(config.m4)
diff --git a/php-5.3.5-aconf26x.patch b/php-5.3.5-aconf26x.patch
new file mode 100644
index 0000000..4eaa177
--- /dev/null
+++ b/php-5.3.5-aconf26x.patch
@@ -0,0 +1,79 @@
+diff -up php-5.3.5/configure.in.aconf26x php-5.3.5/configure.in
+--- php-5.3.5/configure.in.aconf26x	2011-01-07 18:10:08.377183393 +0100
++++ php-5.3.5/configure.in	2011-01-07 18:10:14.204214101 +0100
+@@ -1,7 +1,7 @@
+ ## $Id: configure.in 307133 2011-01-05 16:35:33Z johannes $ -*- autoconf -*-
+ dnl ## Process this file with autoconf to produce a configure script.
+ 
+-divert(1)
++divert(1001)
+ 
+ dnl ## Diversion 1 is the autoconf + automake setup phase. We also
+ dnl ## set the PHP version, deal with platform-specific compile
+@@ -292,7 +292,7 @@ sinclude(TSRM/threads.m4)
+ sinclude(TSRM/tsrm.m4)
+ 
+ 
+-divert(2)
++divert(1002)
+ 
+ dnl ## Diversion 2 is where we set PHP-specific options and come up
+ dnl ## with reasonable default values for them. We check for pthreads here
+@@ -331,7 +331,7 @@ if test "$enable_maintainer_zts" = "yes"
+   PTHREADS_FLAGS
+ fi
+ 
+-divert(3)
++divert(1003)
+ 
+ dnl ## In diversion 3 we check for compile-time options to the PHP
+ dnl ## core and how to deal with different system dependencies. 
+@@ -677,7 +677,7 @@ if test "x$php_crypt_r" = "x1"; then
+   PHP_CRYPT_R_STYLE
+ fi
+ 
+-divert(4)
++divert(1004)
+ 
+ dnl ## In diversion 4 we check user-configurable general settings.
+ 
+@@ -918,7 +918,7 @@ else
+   AC_MSG_RESULT([using system default])
+ fi
+ 
+-divert(5)
++divert(1005)
+ 
+ dnl ## In diversion 5 we check which extensions should be compiled.
+ dnl ## All of these are normally in the extension directories.
+diff -up php-5.3.5/ext/standard/config.m4.aconf26x php-5.3.5/ext/standard/config.m4
+--- php-5.3.5/ext/standard/config.m4.aconf26x	2010-06-17 12:22:03.000000000 +0200
++++ php-5.3.5/ext/standard/config.m4	2011-01-07 18:09:09.790922608 +0100
+@@ -1,6 +1,6 @@
+ dnl $Id: config.m4 300511 2010-06-17 10:22:03Z pajoye $ -*- autoconf -*-
+ 
+-divert(3)dnl
++divert(1003)dnl
+ 
+ dnl
+ dnl Check if flush should be called explicitly after buffered io
+@@ -342,7 +342,7 @@ dnl
+ AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy)
+ AC_FUNC_FNMATCH	
+ 
+-divert(5)dnl
++divert(1005)dnl
+ 
+ dnl
+ dnl Check if there is a support means of creating a new process
+diff -up php-5.3.5/scripts/phpize.m4.aconf26x php-5.3.5/scripts/phpize.m4
+--- php-5.3.5/scripts/phpize.m4.aconf26x	2010-11-02 10:58:08.000000000 +0100
++++ php-5.3.5/scripts/phpize.m4	2011-01-07 18:09:09.791922611 +0100
+@@ -1,6 +1,6 @@
+ dnl This file becomes configure.in for self-contained extensions.
+ 
+-divert(1)
++divert(1001)
+ 
+ AC_PREREQ(2.13)
+ AC_INIT(config.m4)
diff --git a/php.spec b/php.spec
index abd5f19..4cf4afd 100644
--- a/php.spec
+++ b/php.spec
@@ -26,8 +26,8 @@
 
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
-Version: 5.3.4
-Release: 2%{?dist}
+Version: 5.3.5
+Release: 1%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -49,7 +49,7 @@ Patch4: php-5.3.0-phpize64.patch
 Patch5: php-5.2.0-includedir.patch
 Patch6: php-5.2.4-embed.patch
 Patch7: php-5.3.0-recode.patch
-Patch8: php-5.3.4-aconf26x.patch
+Patch8: php-5.3.5-aconf26x.patch
 
 # Fixes for extension modules
 Patch20: php-4.3.11-shutdown.patch
@@ -620,7 +620,6 @@ ln -sf ../configure
 	--enable-ftp \
 	--enable-magic-quotes \
 	--enable-sockets \
-	--enable-sysvsem --enable-sysvshm --enable-sysvmsg \
 	--with-kerberos \
 	--enable-ucd-snmp-hack \
 	--enable-shmop \
@@ -976,6 +975,11 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Fri Jan 07 2011 Remi Collet <Fedora at famillecollet.com> 5.3.5-1
+- update to 5.3.5
+  http://www.php.net/ChangeLog-5.php#5.3.5
+- clean duplicate configure options
+
 * Tue Dec 28 2010 Remi Collet <rpms at famillecollet.com> 5.3.4-2
 - rebuild against MySQL 5.5.8
 - remove all RPM_SOURCE_DIR
diff --git a/sources b/sources
index eecd6a4..18fafc2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-2c069d8f690933e3bf6a8741ed818150  php-5.3.4.tar.bz2
+8aaf20c95e91f25c5b6a591e5d6d61b9  php-5.3.5.tar.bz2


commit b1fdd022c2370912aab1ee6f996c3fb9a61b36c7
Author: remi <fedora at famillecollet.com>
Date:   Tue Dec 28 16:41:09 2010 +0100

    rebuild for MySQL 5.5.8 + remove $RPM_SOURCE_DIR

diff --git a/php.spec b/php.spec
index dc393a6..abd5f19 100644
--- a/php.spec
+++ b/php.spec
@@ -27,7 +27,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.4
-Release: 1%{?dist}.1
+Release: 2%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -779,7 +779,7 @@ install -m 755 build-zts/libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules
 
 # Apache config fragment
 install -m 755 -d $RPM_BUILD_ROOT/etc/httpd/conf.d
-install -m 644 $RPM_SOURCE_DIR/php.conf $RPM_BUILD_ROOT/etc/httpd/conf.d
+install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/conf.d
 
 install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
 #install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php-zts.d
@@ -851,7 +851,7 @@ cat files.json files.zip files.curl files.phar files.fileinfo > files.common
 # Install the macros file:
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm
 sed -e "s/@PHP_APIVER@/%{apiver}/;s/@PHP_ZENDVER@/%{zendver}/;s/@PHP_PDOVER@/%{pdover}/" \
-    < $RPM_SOURCE_DIR/macros.php > macros.php
+    < %{SOURCE3} > macros.php
 install -m 644 -c macros.php \
            $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.php
 
@@ -976,6 +976,10 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Tue Dec 28 2010 Remi Collet <rpms at famillecollet.com> 5.3.4-2
+- rebuild against MySQL 5.5.8
+- remove all RPM_SOURCE_DIR
+
 * Sun Dec 12 2010 Remi Collet <rpms at famillecollet.com> 5.3.4-1.1
 - security patch from upstream for #660517
 


commit 06b47842368ca7b6dc3f293353ef9b02c876abfa
Author: remi <fedora at famillecollet.com>
Date:   Sun Dec 12 15:57:34 2010 +0100

    security patch from upstream for #660517 (CVE-2010-4409)

diff --git a/php-5.3.4-cve.patch b/php-5.3.4-cve.patch
new file mode 100644
index 0000000..70643b0
--- /dev/null
+++ b/php-5.3.4-cve.patch
@@ -0,0 +1,14 @@
+--- php/php-src/branches/PHP_5_3/ext/intl/formatter/formatter_attr.c	2010/12/10 00:37:31	306153
++++ php/php-src/branches/PHP_5_3/ext/intl/formatter/formatter_attr.c	2010/12/10 00:47:51	306154
+@@ -311,6 +311,11 @@
+ 
+ 		RETURN_FALSE;
+ 	}
++	
++	if (symbol >= UNUM_FORMAT_SYMBOL_COUNT || symbol < 0) {
++		intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,	"numfmt_set_symbol: invalid symbol value", 0 TSRMLS_CC );
++		RETURN_FALSE;
++	}
+ 
+ 	/* Fetch the object. */
+ 	FORMATTER_METHOD_FETCH_OBJECT;
diff --git a/php.spec b/php.spec
index dd512d2..dc393a6 100644
--- a/php.spec
+++ b/php.spec
@@ -27,7 +27,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.4
-Release: 1%{?dist}
+Release: 1%{?dist}.1
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -62,6 +62,10 @@ Patch42: php-5.3.1-systzdata-v7.patch
 # See http://bugs.php.net/53436
 Patch43: php-5.3.4-phpize.patch
 
+# Security patch from upstream SVN
+# http://svn.php.net/viewvc?view=revision&revision=306154
+Patch50: php-5.3.4-cve.patch
+
 # Fixes for tests
 Patch61: php-5.0.4-tests-wddx.patch
 
@@ -480,6 +484,8 @@ support for using the enchant library to PHP.
 %patch42 -p1 -b .systzdata
 %patch43 -p0 -b .headers
 
+%patch50 -p4 -b .cve
+
 %patch61 -p1 -b .tests-wddx
 
 # Prevent %%doc confusion over LICENSE files
@@ -970,6 +976,9 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Sun Dec 12 2010 Remi Collet <rpms at famillecollet.com> 5.3.4-1.1
+- security patch from upstream for #660517
+
 * Sat Dec 11 2010 Remi Collet <Fedora at famillecollet.com> 5.3.4-1
 - update to 5.3.4
   http://www.php.net/ChangeLog-5.php#5.3.4


commit ad1c041018c1a80c2fb5cf42af3b657e1e4cb4e4
Author: remi <fedora at famillecollet.com>
Date:   Sat Dec 11 18:14:46 2010 +0100

    update to 5.3.4

diff --git a/.gitignore b/.gitignore
index 4c6f865..5f036b5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 php-5.3.3.tar.bz2
+/php-5.3.4.tar.bz2
diff --git a/php-5.3.3-aconf26x.patch b/php-5.3.3-aconf26x.patch
deleted file mode 100644
index 9311320..0000000
--- a/php-5.3.3-aconf26x.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff -up php-5.3.3/configure.in.aconf26x php-5.3.3/configure.in
---- php-5.3.3/configure.in.aconf26x	2010-07-22 15:24:35.376051049 +0200
-+++ php-5.3.3/configure.in	2010-07-22 15:25:19.922175093 +0200
-@@ -1,7 +1,7 @@
- ## $Id: configure.in 301439 2010-07-21 10:50:07Z johannes $ -*- autoconf -*-
- dnl ## Process this file with autoconf to produce a configure script.
- 
--divert(1)
-+divert(1001)
- 
- dnl ## Diversion 1 is the autoconf + automake setup phase. We also
- dnl ## set the PHP version, deal with platform-specific compile
-@@ -292,7 +292,7 @@ sinclude(TSRM/threads.m4)
- sinclude(TSRM/tsrm.m4)
- 
- 
--divert(2)
-+divert(1002)
- 
- dnl ## Diversion 2 is where we set PHP-specific options and come up
- dnl ## with reasonable default values for them. We check for pthreads here
-@@ -331,7 +331,7 @@ if test "$enable_maintainer_zts" = "yes"
-   PTHREADS_FLAGS
- fi
- 
--divert(3)
-+divert(1003)
- 
- dnl ## In diversion 3 we check for compile-time options to the PHP
- dnl ## core and how to deal with different system dependencies. 
-@@ -677,7 +677,7 @@ if test "x$php_crypt_r" = "x1"; then
-   PHP_CRYPT_R_STYLE
- fi
- 
--divert(4)
-+divert(1004)
- 
- dnl ## In diversion 4 we check user-configurable general settings.
- 
-@@ -918,7 +918,7 @@ else
-   AC_MSG_RESULT([using system default])
- fi
- 
--divert(5)
-+divert(1005)
- 
- dnl ## In diversion 5 we check which extensions should be compiled.
- dnl ## All of these are normally in the extension directories.
-diff -up php-5.3.3/ext/standard/config.m4.aconf26x php-5.3.3/ext/standard/config.m4
---- php-5.3.3/ext/standard/config.m4.aconf26x	2010-06-17 12:22:03.000000000 +0200
-+++ php-5.3.3/ext/standard/config.m4	2010-07-22 15:24:35.382051000 +0200
-@@ -1,6 +1,6 @@
- dnl $Id: config.m4 300511 2010-06-17 10:22:03Z pajoye $ -*- autoconf -*-
- 
--divert(3)dnl
-+divert(1003)dnl
- 
- dnl
- dnl Check if flush should be called explicitly after buffered io
-@@ -342,7 +342,7 @@ dnl
- AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy)
- AC_FUNC_FNMATCH	
- 
--divert(5)dnl
-+divert(1005)dnl
- 
- dnl
- dnl Check if there is a support means of creating a new process
-diff -up php-5.3.3/scripts/phpize.m4.aconf26x php-5.3.3/scripts/phpize.m4
---- php-5.3.3/scripts/phpize.m4.aconf26x	2009-12-02 18:42:58.000000000 +0100
-+++ php-5.3.3/scripts/phpize.m4	2010-07-22 15:24:35.382051000 +0200
-@@ -1,6 +1,6 @@
- dnl This file becomes configure.in for self-contained extensions.
- 
--divert(1)
-+divert(1001)
- 
- AC_PREREQ(2.13)
- AC_INIT(config.m4)
diff --git a/php-5.3.3-gnusrc.patch b/php-5.3.3-gnusrc.patch
deleted file mode 100644
index 0126b18..0000000
--- a/php-5.3.3-gnusrc.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-diff -up php5.3-201004081030/configure.in.gnusrc php5.3-201004081030/configure.in
---- php5.3-201004081030/configure.in.gnusrc	2010-03-19 00:36:53.000000000 +0100
-+++ php5.3-201004081030/configure.in	2010-04-08 14:32:20.000000000 +0200
-@@ -58,6 +58,8 @@ AC_DEFUN([PHP_EXT_DIR],[ext/$1])dnl
- AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/ext/$1])dnl
- AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl
- 
-+AC_DEFINE([_GNU_SOURCE], 1, [Define to enable GNU C Library extensions])
-+
- dnl Setting up the PHP version based on the information above.
- dnl -------------------------------------------------------------------------
- 
-diff -up php5.3-201004081030/ext/interbase/interbase.c.gnusrc php5.3-201004081030/ext/interbase/interbase.c
---- php5.3-201004081030/ext/interbase/interbase.c.gnusrc	2010-01-03 10:36:55.000000000 +0100
-+++ php5.3-201004081030/ext/interbase/interbase.c	2010-04-08 14:32:20.000000000 +0200
-@@ -24,7 +24,6 @@
- #include "config.h"
- #endif
- 
--#define _GNU_SOURCE
- 
- #include "php.h"
- 
-diff -up php5.3-201004081030/ext/pdo_firebird/firebird_driver.c.gnusrc php5.3-201004081030/ext/pdo_firebird/firebird_driver.c
---- php5.3-201004081030/ext/pdo_firebird/firebird_driver.c.gnusrc	2010-01-12 14:36:12.000000000 +0100
-+++ php5.3-201004081030/ext/pdo_firebird/firebird_driver.c	2010-04-08 14:32:20.000000000 +0200
-@@ -22,7 +22,6 @@
- #include "config.h"
- #endif
- 
--#define _GNU_SOURCE
- 
- #include "php.h"
- #ifdef ZEND_ENGINE_2
-diff -up php5.3-201004081030/ext/standard/file.c.gnusrc php5.3-201004081030/ext/standard/file.c
---- php5.3-201004081030/ext/standard/file.c.gnusrc	2010-03-19 00:36:53.000000000 +0100
-+++ php5.3-201004081030/ext/standard/file.c	2010-04-08 14:32:20.000000000 +0200
-@@ -113,9 +113,6 @@ php_file_globals file_globals;
- #endif
- 
- #if defined(HAVE_FNMATCH) && !defined(PHP_WIN32)
--# ifndef _GNU_SOURCE
--#  define _GNU_SOURCE
--# endif
- # include <fnmatch.h>
- #endif
- 
-diff -up php5.3-201004081030/ext/zlib/zlib_fopen_wrapper.c.gnusrc php5.3-201004081030/ext/zlib/zlib_fopen_wrapper.c
---- php5.3-201004081030/ext/zlib/zlib_fopen_wrapper.c.gnusrc	2010-03-12 12:36:27.000000000 +0100
-+++ php5.3-201004081030/ext/zlib/zlib_fopen_wrapper.c	2010-04-08 14:33:46.000000000 +0200
-@@ -19,8 +19,6 @@
- 
- /* $Id: zlib_fopen_wrapper.c 296107 2010-03-12 10:28:59Z jani $ */
- 
--#define _GNU_SOURCE
--
- #include "php.h"
- #include "php_zlib.h"
- #include "fopen_wrappers.h"
-diff -up php5.3-201004081030/main/php.h.gnusrc php5.3-201004081030/main/php.h
---- php5.3-201004081030/main/php.h.gnusrc	2010-03-12 12:36:33.000000000 +0100
-+++ php5.3-201004081030/main/php.h	2010-04-08 14:32:20.000000000 +0200
-@@ -30,6 +30,7 @@
- #define PHP_HAVE_STREAMS
- #define YYDEBUG 0
- 
-+#include "php_config.h"
- #include "php_version.h"
- #include "zend.h"
- #include "zend_qsort.h"
-diff -up php5.3-201004081030/main/streams/cast.c.gnusrc php5.3-201004081030/main/streams/cast.c
---- php5.3-201004081030/main/streams/cast.c.gnusrc	2010-01-19 16:36:23.000000000 +0100
-+++ php5.3-201004081030/main/streams/cast.c	2010-04-08 14:33:15.000000000 +0200
-@@ -18,7 +18,6 @@
- 
- /* $Id: cast.c 293732 2010-01-19 13:44:08Z jani $ */
- 
--#define _GNU_SOURCE
- #include "php.h"
- #include "php_globals.h"
- #include "php_network.h"
-diff -up php5.3-201004081030/main/streams/memory.c.gnusrc php5.3-201004081030/main/streams/memory.c
---- php5.3-201004081030/main/streams/memory.c.gnusrc	2010-01-03 10:36:58.000000000 +0100
-+++ php5.3-201004081030/main/streams/memory.c	2010-04-08 14:32:20.000000000 +0200
-@@ -18,7 +18,6 @@
- 
- /* $Id: memory.c 293036 2010-01-03 09:23:27Z sebastian $ */
- 
--#define _GNU_SOURCE
- #include "php.h"
- 
- PHPAPI int php_url_decode(char *str, int len);
-diff -up php5.3-201004081030/Zend/zend_language_parser.c.gnusrc php5.3-201004081030/Zend/zend_language_parser.c
---- php5.3-201004081030/Zend/zend_language_parser.c.gnusrc	2010-04-08 12:41:33.000000000 +0200
-+++ php5.3-201004081030/Zend/zend_language_parser.c	2010-04-08 14:32:20.000000000 +0200
-@@ -366,6 +366,8 @@
- #include "zend_API.h"
- #include "zend_constants.h"
- 
-+#include <string.h>
-+
- 
- #define YYERROR_VERBOSE
- #define YYSTYPE znode
---- php5.3-201005241430/main/streams/streams.c.gnusrc	2010-05-18 22:35:37.000000000 +0200
-+++ php5.3-201005241430/main/streams/streams.c	2010-05-24 17:02:08.900419954 +0200
-@@ -21,7 +21,6 @@
- 
- /* $Id: streams.c 299466 2010-05-18 19:39:39Z pajoye $ */
- 
--#define _GNU_SOURCE
- #include "php.h"
- #include "php_globals.h"
- #include "php_network.h"
diff --git a/php-5.3.4-aconf26x.patch b/php-5.3.4-aconf26x.patch
new file mode 100644
index 0000000..fbd8639
--- /dev/null
+++ b/php-5.3.4-aconf26x.patch
@@ -0,0 +1,79 @@
+diff -up php-5.3.4/configure.in.aconf26x php-5.3.4/configure.in
+--- php-5.3.4/configure.in.aconf26x	2010-12-11 11:02:33.634975461 +0100
++++ php-5.3.4/configure.in	2010-12-11 11:03:30.336094172 +0100
+@@ -1,7 +1,7 @@
+ ## $Id: configure.in 306090 2010-12-08 21:38:51Z johannes $ -*- autoconf -*-
+ dnl ## Process this file with autoconf to produce a configure script.
+ 
+-divert(1)
++divert(1001)
+ 
+ dnl ## Diversion 1 is the autoconf + automake setup phase. We also
+ dnl ## set the PHP version, deal with platform-specific compile
+@@ -292,7 +292,7 @@ sinclude(TSRM/threads.m4)
+ sinclude(TSRM/tsrm.m4)
+ 
+ 
+-divert(2)
++divert(1002)
+ 
+ dnl ## Diversion 2 is where we set PHP-specific options and come up
+ dnl ## with reasonable default values for them. We check for pthreads here
+@@ -331,7 +331,7 @@ if test "$enable_maintainer_zts" = "yes"
+   PTHREADS_FLAGS
+ fi
+ 
+-divert(3)
++divert(1003)
+ 
+ dnl ## In diversion 3 we check for compile-time options to the PHP
+ dnl ## core and how to deal with different system dependencies. 
+@@ -677,7 +677,7 @@ if test "x$php_crypt_r" = "x1"; then
+   PHP_CRYPT_R_STYLE
+ fi
+ 
+-divert(4)
++divert(1004)
+ 
+ dnl ## In diversion 4 we check user-configurable general settings.
+ 
+@@ -918,7 +918,7 @@ else
+   AC_MSG_RESULT([using system default])
+ fi
+ 
+-divert(5)
++divert(1005)
+ 
+ dnl ## In diversion 5 we check which extensions should be compiled.
+ dnl ## All of these are normally in the extension directories.
+diff -up php-5.3.4/ext/standard/config.m4.aconf26x php-5.3.4/ext/standard/config.m4
+--- php-5.3.4/ext/standard/config.m4.aconf26x	2010-06-17 12:22:03.000000000 +0200
++++ php-5.3.4/ext/standard/config.m4	2010-12-11 11:02:33.643973734 +0100
+@@ -1,6 +1,6 @@
+ dnl $Id: config.m4 300511 2010-06-17 10:22:03Z pajoye $ -*- autoconf -*-
+ 
+-divert(3)dnl
++divert(1003)dnl
+ 
+ dnl
+ dnl Check if flush should be called explicitly after buffered io
+@@ -342,7 +342,7 @@ dnl
+ AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy)
+ AC_FUNC_FNMATCH	
+ 
+-divert(5)dnl
++divert(1005)dnl
+ 
+ dnl
+ dnl Check if there is a support means of creating a new process
+diff -up php-5.3.4/scripts/phpize.m4.aconf26x php-5.3.4/scripts/phpize.m4
+--- php-5.3.4/scripts/phpize.m4.aconf26x	2010-11-02 10:58:08.000000000 +0100
++++ php-5.3.4/scripts/phpize.m4	2010-12-11 11:02:33.643973734 +0100
+@@ -1,6 +1,6 @@
+ dnl This file becomes configure.in for self-contained extensions.
+ 
+-divert(1)
++divert(1001)
+ 
+ AC_PREREQ(2.13)
+ AC_INIT(config.m4)
diff --git a/php-5.3.4-gnusrc.patch b/php-5.3.4-gnusrc.patch
new file mode 100644
index 0000000..f23ea28
--- /dev/null
+++ b/php-5.3.4-gnusrc.patch
@@ -0,0 +1,112 @@
+diff -up php5.3-201004081030/configure.in.gnusrc php5.3-201004081030/configure.in
+--- php5.3-201004081030/configure.in.gnusrc	2010-03-19 00:36:53.000000000 +0100
++++ php5.3-201004081030/configure.in	2010-04-08 14:32:20.000000000 +0200
+@@ -58,6 +58,8 @@ AC_DEFUN([PHP_EXT_DIR],[ext/$1])dnl
+ AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir/ext/$1])dnl
+ AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl
+ 
++AC_DEFINE([_GNU_SOURCE], 1, [Define to enable GNU C Library extensions])
++
+ dnl Setting up the PHP version based on the information above.
+ dnl -------------------------------------------------------------------------
+ 
+diff -up php5.3-201004081030/ext/interbase/interbase.c.gnusrc php5.3-201004081030/ext/interbase/interbase.c
+--- php5.3-201004081030/ext/interbase/interbase.c.gnusrc	2010-01-03 10:36:55.000000000 +0100
++++ php5.3-201004081030/ext/interbase/interbase.c	2010-04-08 14:32:20.000000000 +0200
+@@ -24,7 +24,6 @@
+ #include "config.h"
+ #endif
+ 
+-#define _GNU_SOURCE
+ 
+ #include "php.h"
+ 
+diff -up php5.3-201004081030/ext/pdo_firebird/firebird_driver.c.gnusrc php5.3-201004081030/ext/pdo_firebird/firebird_driver.c
+--- php5.3-201004081030/ext/pdo_firebird/firebird_driver.c.gnusrc	2010-01-12 14:36:12.000000000 +0100
++++ php5.3-201004081030/ext/pdo_firebird/firebird_driver.c	2010-04-08 14:32:20.000000000 +0200
+@@ -22,7 +22,6 @@
+ #include "config.h"
+ #endif
+ 
+-#define _GNU_SOURCE
+ 
+ #include "php.h"
+ #ifdef ZEND_ENGINE_2
+diff -up php5.3-201004081030/ext/standard/file.c.gnusrc php5.3-201004081030/ext/standard/file.c
+--- php5.3-201004081030/ext/standard/file.c.gnusrc	2010-03-19 00:36:53.000000000 +0100
++++ php5.3-201004081030/ext/standard/file.c	2010-04-08 14:32:20.000000000 +0200
+@@ -113,9 +113,6 @@ php_file_globals file_globals;
+ #endif
+ 
+ #if defined(HAVE_FNMATCH) && !defined(PHP_WIN32)
+-# ifndef _GNU_SOURCE
+-#  define _GNU_SOURCE
+-# endif
+ # include <fnmatch.h>
+ #endif
+ 
+diff -up php5.3-201004081030/main/php.h.gnusrc php5.3-201004081030/main/php.h
+--- php5.3-201004081030/main/php.h.gnusrc	2010-03-12 12:36:33.000000000 +0100
++++ php5.3-201004081030/main/php.h	2010-04-08 14:32:20.000000000 +0200
+@@ -30,6 +30,7 @@
+ #define PHP_HAVE_STREAMS
+ #define YYDEBUG 0
+ 
++#include "php_config.h"
+ #include "php_version.h"
+ #include "zend.h"
+ #include "zend_qsort.h"
+diff -up php5.3-201004081030/main/streams/memory.c.gnusrc php5.3-201004081030/main/streams/memory.c
+--- php5.3-201004081030/main/streams/memory.c.gnusrc	2010-01-03 10:36:58.000000000 +0100
++++ php5.3-201004081030/main/streams/memory.c	2010-04-08 14:32:20.000000000 +0200
+@@ -18,7 +18,6 @@
+ 
+ /* $Id: memory.c 293036 2010-01-03 09:23:27Z sebastian $ */
+ 
+-#define _GNU_SOURCE
+ #include "php.h"
+ 
+ PHPAPI int php_url_decode(char *str, int len);
+diff -up php5.3-201004081030/Zend/zend_language_parser.c.gnusrc php5.3-201004081030/Zend/zend_language_parser.c
+--- php5.3-201004081030/Zend/zend_language_parser.c.gnusrc	2010-04-08 12:41:33.000000000 +0200
++++ php5.3-201004081030/Zend/zend_language_parser.c	2010-04-08 14:32:20.000000000 +0200
+@@ -366,6 +366,8 @@
+ #include "zend_API.h"
+ #include "zend_constants.h"
+ 
++#include <string.h>
++
+ 
+ #define YYERROR_VERBOSE
+ #define YYSTYPE znode
+--- php5.3-201009271630/ext/zlib/zlib_fopen_wrapper.c.gnusrc	2010-09-27 00:34:59.000000000 +0200
++++ php5.3-201009271630/ext/zlib/zlib_fopen_wrapper.c	2010-09-27 19:30:28.542859456 +0200
+@@ -19,8 +19,6 @@
+ 
+ /* $Id: zlib_fopen_wrapper.c 303772 2010-09-26 20:46:54Z pajoye $ */
+ 
+-#define _GNU_SOURCE
+-
+ #include "php.h"
+ #include "php_zlib.h"
+ #include "fopen_wrappers.h"
+--- php5.3-201011110530/main/streams/cast.c.gnusrc	2010-11-05 20:36:08.000000000 +0100
++++ php5.3-201011110530/main/streams/cast.c	2010-11-11 07:52:00.335566018 +0100
+@@ -18,7 +18,6 @@
+ 
+ /* $Id: cast.c 305108 2010-11-05 18:53:48Z cataphract $ */
+ 
+-#define _GNU_SOURCE
+ #include "php.h"
+ #include "php_globals.h"
+ #include "php_network.h"
+--- php5.3-201011270530/main/streams/streams.c.gnusrc	2010-11-15 20:35:42.000000000 +0100
++++ php5.3-201011270530/main/streams/streams.c	2010-11-27 08:26:48.836691759 +0100
+@@ -21,7 +21,6 @@
+ 
+ /* $Id: streams.c 305379 2010-11-15 18:22:52Z cataphract $ */
+ 
+-#define _GNU_SOURCE
+ #include "php.h"
+ #include "php_globals.h"
+ #include "php_network.h"
diff --git a/php-5.3.4-phpize.patch b/php-5.3.4-phpize.patch
new file mode 100644
index 0000000..e0184af
--- /dev/null
+++ b/php-5.3.4-phpize.patch
@@ -0,0 +1,34 @@
+--- scripts/phpize.in.orig	2010-12-01 17:00:27.110013483 +0100
++++ scripts/phpize.in	2010-12-01 17:02:12.555757906 +0100
+@@ -161,6 +161,15 @@
+   $PHP_AUTOHEADER || exit 1
+ }
+ 
++phpize_check_headers()
++{
++  if test ! -f $includedir/main/php.h; then
++    echo "Can't find PHP headers in $includedir"
++    echo "The php-devel package is required for use of this command."
++    exit 1
++  fi
++}
++
+ # Main script
+ 
+ case "$1" in 
+@@ -179,12 +188,15 @@
+ 
+   # Version
+   --version|-v)
++    phpize_check_headers
+     phpize_print_api_numbers
+     exit 0
+   ;;
+ 
+   # Default
+   *)
++     phpize_check_headers
++
+      phpize_check_configm4 0
+ 
+      phpize_check_build_files
diff --git a/php.spec b/php.spec
index 38564d6..dd512d2 100644
--- a/php.spec
+++ b/php.spec
@@ -26,8 +26,8 @@
 
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
-Version: 5.3.3
-Release: 5%{?dist}
+Version: 5.3.4
+Release: 1%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -42,14 +42,14 @@ Source6: php-fpm.init
 Source7: php-fpm.logrotate
 
 # Build fixes
-Patch1: php-5.3.3-gnusrc.patch
+Patch1: php-5.3.4-gnusrc.patch
 Patch2: php-5.3.0-install.patch
 Patch3: php-5.2.4-norpath.patch
 Patch4: php-5.3.0-phpize64.patch
 Patch5: php-5.2.0-includedir.patch
 Patch6: php-5.2.4-embed.patch
 Patch7: php-5.3.0-recode.patch
-Patch8: php-5.3.3-aconf26x.patch
+Patch8: php-5.3.4-aconf26x.patch
 
 # Fixes for extension modules
 Patch20: php-4.3.11-shutdown.patch
@@ -59,6 +59,8 @@ Patch21: php-5.3.3-macropen.patch
 Patch40: php-5.0.4-dlopen.patch
 Patch41: php-5.3.0-easter.patch
 Patch42: php-5.3.1-systzdata-v7.patch
+# See http://bugs.php.net/53436
+Patch43: php-5.3.4-phpize.patch
 
 # Fixes for tests
 Patch61: php-5.0.4-tests-wddx.patch
@@ -89,7 +91,7 @@ Requires(pre): httpd
 
 %description
 PHP is an HTML-embedded scripting language. PHP attempts to make it
-easy for developers to write dynamically generated webpages. PHP also
+easy for developers to write dynamically generated web pages. PHP also
 offers built-in database integration for several commercial and
 non-commercial database management systems, so writing a
 database-enabled webpage with PHP is fairly simple. The most common
@@ -349,7 +351,8 @@ Summary: A module for PHP applications for using the gd graphics library
 Group: Development/Languages
 Requires: php-common = %{version}-%{release}
 # Required to build the bundled GD library
-BuildRequires: libXpm-devel, libjpeg-devel, libpng-devel, freetype-devel, t1lib-devel
+BuildRequires: libjpeg-devel, libpng-devel, freetype-devel
+BuildRequires: libXpm-devel, t1lib-devel
 
 %description gd
 The php-gd package contains a dynamic shared object that will add
@@ -475,6 +478,7 @@ support for using the enchant library to PHP.
 %patch40 -p1 -b .dlopen
 %patch41 -p1 -b .easter
 %patch42 -p1 -b .systzdata
+%patch43 -p0 -b .headers
 
 %patch61 -p1 -b .tests-wddx
 
@@ -900,7 +904,10 @@ fi
 %{_bindir}/php-cgi
 %{_bindir}/phar.phar
 %{_bindir}/phar
+# provides phpize here (not in -devel) for pecl command
+%{_bindir}/phpize
 %{_mandir}/man1/php.1*
+%{_mandir}/man1/phpize.1*
 %doc sapi/cgi/README* sapi/cli/README
 
 %files zts
@@ -920,17 +927,15 @@ fi
 # log owned by apache for log
 %attr(770,apache,apache) %dir %{_localstatedir}/log/php-fpm
 %ghost %dir %{_localstatedir}/run/php-fpm
-%{_mandir}/man1/php-fpm.1*
+%{_mandir}/man8/php-fpm.8*
 %endif
 
 %files devel
 %defattr(-,root,root)
 %{_bindir}/php-config
-%{_bindir}/phpize
 %{_includedir}/php
 %{_libdir}/php/build
 %{_mandir}/man1/php-config.1*
-%{_mandir}/man1/phpize.1*
 %config %{_sysconfdir}/rpm/macros.php
 
 %files embedded
@@ -965,6 +970,11 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Sat Dec 11 2010 Remi Collet <Fedora at famillecollet.com> 5.3.4-1
+- update to 5.3.4
+  http://www.php.net/ChangeLog-5.php#5.3.4
+- move phpize to php-cli (see #657812)
+
 * Wed Dec  1 2010 Remi Collet <Fedora at famillecollet.com> 5.3.3-5
 - ghost /var/run/php-fpm (see #656660)
 - add filter_setup to not provides extensions as .so
diff --git a/sources b/sources
index c52953a..eecd6a4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-21ceeeb232813c10283a5ca1b4c87b48  php-5.3.3.tar.bz2
+2c069d8f690933e3bf6a8741ed818150  php-5.3.4.tar.bz2


commit 9581d4415ce1b173e5cf979f5ee378a7d23fda18
Author: remi <fedora at famillecollet.com>
Date:   Wed Dec 1 17:27:47 2010 +0100

    remove duplicate fix

diff --git a/php.spec b/php.spec
index 8794fb4..38564d6 100644
--- a/php.spec
+++ b/php.spec
@@ -478,10 +478,6 @@ support for using the enchant library to PHP.
 
 %patch61 -p1 -b .tests-wddx
 
-# Make rpmlint happy
-find . -name \*.c -exec chmod -x {} \;
-find . -name \*.h -exec chmod -x {} \;
-
 # Prevent %%doc confusion over LICENSE files
 cp Zend/LICENSE Zend/ZEND_LICENSE
 cp TSRM/LICENSE TSRM_LICENSE
@@ -972,7 +968,6 @@ fi
 * Wed Dec  1 2010 Remi Collet <Fedora at famillecollet.com> 5.3.3-5
 - ghost /var/run/php-fpm (see #656660)
 - add filter_setup to not provides extensions as .so
-- fix perm on .c and .h to make rpmlint happy
 
 * Mon Nov  1 2010 Joe Orton <jorton at redhat.com> - 5.3.3-4
 - use mysql_config in libdir directly to avoid biarch build failures


commit 558fe8dbf4b76846b99bbbaf8104e07f84686f5a
Author: remi <fedora at famillecollet.com>
Date:   Wed Dec 1 17:21:18 2010 +0100

    ghost /var/run/php-fpm (#656660) + fix for rpmlint

diff --git a/php-fpm.init b/php-fpm.init
index a6375ba..a23441c 100755
--- a/php-fpm.init
+++ b/php-fpm.init
@@ -27,6 +27,8 @@ lockfile=${LOCKFILE-/var/lock/subsys/php-fpm}
 
 start () {
 	echo -n $"Starting $prog: "
+	dir=$(dirname ${pidfile})
+	[ -d $dir ] || mkdir $dir
 	daemon --pidfile ${pidfile} php-fpm
 	RETVAL=$?
 	echo
diff --git a/php.spec b/php.spec
index 68d991c..8794fb4 100644
--- a/php.spec
+++ b/php.spec
@@ -27,7 +27,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.3
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -79,6 +79,14 @@ Requires: php-cli = %{version}-%{release}
 # To ensure correct /var/lib/php/session ownership:
 Requires(pre): httpd
 
+
+# Don't provides extensions, which are not shared library, as .so
+%{?filter_setup:
+%filter_provides_in %{_libdir}/php/modules/.*\.so$
+%filter_setup
+}
+
+
 %description
 PHP is an HTML-embedded scripting language. PHP attempts to make it
 easy for developers to write dynamically generated webpages. PHP also
@@ -470,6 +478,10 @@ support for using the enchant library to PHP.
 
 %patch61 -p1 -b .tests-wddx
 
+# Make rpmlint happy
+find . -name \*.c -exec chmod -x {} \;
+find . -name \*.h -exec chmod -x {} \;
+
 # Prevent %%doc confusion over LICENSE files
 cp Zend/LICENSE Zend/ZEND_LICENSE
 cp TSRM/LICENSE TSRM_LICENSE
@@ -911,7 +923,7 @@ fi
 %dir %{_sysconfdir}/php-fpm.d
 # log owned by apache for log
 %attr(770,apache,apache) %dir %{_localstatedir}/log/php-fpm
-%dir %{_localstatedir}/run/php-fpm
+%ghost %dir %{_localstatedir}/run/php-fpm
 %{_mandir}/man1/php-fpm.1*
 %endif
 
@@ -957,6 +969,11 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Wed Dec  1 2010 Remi Collet <Fedora at famillecollet.com> 5.3.3-5
+- ghost /var/run/php-fpm (see #656660)
+- add filter_setup to not provides extensions as .so
+- fix perm on .c and .h to make rpmlint happy
+
 * Mon Nov  1 2010 Joe Orton <jorton at redhat.com> - 5.3.3-4
 - use mysql_config in libdir directly to avoid biarch build failures
 


commit c7b0a2960c67c93955d0d3e4406afd1b9dc2ad15
Author: Joe Orton <jorton at redhat.com>
Date:   Mon Nov 1 09:09:36 2010 +0000

    - use mysql_config in libdir directly to avoid biarch build failures

diff --git a/php.spec b/php.spec
index b3cc5d7..68d991c 100644
--- a/php.spec
+++ b/php.spec
@@ -14,6 +14,10 @@
 # Regression tests take a long time, you can skip 'em with this
 %{!?runselftest: %{expand: %%global runselftest 1}}
 
+# Use the arch-specific mysql_config binary to avoid mismatch with the
+# arch detection heuristic used by bindir/mysql_config.
+%define mysql_config %{_libdir}/mysql/mysql_config
+
 %ifarch %{ix86} x86_64
 %global with_fpm 1
 %else
@@ -23,7 +27,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.3
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -630,7 +634,7 @@ build --enable-force-cgi-redirect \
       --with-xmlrpc=shared \
       --with-ldap=shared --with-ldap-sasl \
       --with-mysql=shared,%{_prefix} \
-      --with-mysqli=shared,%{_bindir}/mysql_config \
+      --with-mysqli=shared,%{mysql_config} \
       --with-interbase=shared,%{_libdir}/firebird \
       --with-pdo-firebird=shared,%{_libdir}/firebird \
       --enable-dom=shared \
@@ -644,7 +648,7 @@ build --enable-force-cgi-redirect \
       --enable-fastcgi \
       --enable-pdo=shared \
       --with-pdo-odbc=shared,unixODBC,%{_prefix} \
-      --with-pdo-mysql=shared,%{_prefix} \
+      --with-pdo-mysql=shared,%{mysql_config} \
       --with-pdo-pgsql=shared,%{_prefix} \
       --with-pdo-sqlite=shared,%{_prefix} \
       --with-pdo-dblib=shared,%{_prefix} \
@@ -953,6 +957,9 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Mon Nov  1 2010 Joe Orton <jorton at redhat.com> - 5.3.3-4
+- use mysql_config in libdir directly to avoid biarch build failures
+
 * Fri Oct 29 2010 Joe Orton <jorton at redhat.com> - 5.3.3-3
 - rebuild for new net-snmp
 


commit 2d7f2ef45938ae8372ef2af7f63b67141e8323c4
Author: Joe Orton <jorton at redhat.com>
Date:   Fri Oct 29 10:29:21 2010 +0100

    - rebuild for new net-snmp

diff --git a/php.spec b/php.spec
index 8ba0873..b3cc5d7 100644
--- a/php.spec
+++ b/php.spec
@@ -23,7 +23,7 @@
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.3
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -953,6 +953,9 @@ fi
 %files enchant -f files.enchant
 
 %changelog
+* Fri Oct 29 2010 Joe Orton <jorton at redhat.com> - 5.3.3-3
+- rebuild for new net-snmp
+
 * Sun Oct 10 2010 Remi Collet <Fedora at famillecollet.com> 5.3.3-2
 - add php-fpm sub-package
 


commit f9d3d476dfc68ea01cbf726879219477f4dcf66e
Author: remi <fedora at famillecollet.com>
Date:   Sun Oct 10 20:19:10 2010 +0200

    enable php-fpm sub-package

diff --git a/php-fpm-www.conf b/php-fpm-www.conf
new file mode 100644
index 0000000..81fca85
--- /dev/null
+++ b/php-fpm-www.conf
@@ -0,0 +1,213 @@
+; Start a new pool named 'www'.
+[www]
+
+; The address on which to accept FastCGI requests.
+; Valid syntaxes are:
+;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific address on
+;                            a specific port;
+;   'port'                 - to listen on a TCP socket to all addresses on a
+;                            specific port;
+;   '/path/to/unix/socket' - to listen on a unix socket.
+; Note: This value is mandatory.
+listen = 127.0.0.1:9000
+
+; Set listen(2) backlog. A value of '-1' means unlimited.
+; Default Value: -1
+;listen.backlog = -1
+ 
+; List of ipv4 addresses of FastCGI clients which are allowed to connect.
+; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
+; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
+; must be separated by a comma. If this value is left blank, connections will be
+; accepted from any ip address.
+; Default Value: any
+listen.allowed_clients = 127.0.0.1
+
+; Set permissions for unix socket, if one is used. In Linux, read/write
+; permissions must be set in order to allow connections from a web server. Many
+; BSD-derived systems allow connections regardless of permissions. 
+; Default Values: user and group are set as the running user
+;                 mode is set to 0666
+;listen.owner = nobody
+;listen.group = nobody
+;listen.mode = 0666
+
+; Unix user/group of processes
+; Note: The user is mandatory. If the group is not set, the default user's group
+;       will be used.
+; RPM: apache Choosed to be able to access some dir as httpd
+user = apache
+; RPM: Keep a group allowed to write in log dir.
+group = apache
+
+; Choose how the process manager will control the number of child processes.
+; Possible Values:
+;   static  - a fixed number (pm.max_children) of child processes;
+;   dynamic - the number of child processes are set dynamically based on the
+;             following directives:
+;             pm.max_children      - the maximum number of children that can
+;                                    be alive at the same time.
+;             pm.start_servers     - the number of children created on startup.
+;             pm.min_spare_servers - the minimum number of children in 'idle'
+;                                    state (waiting to process). If the number
+;                                    of 'idle' processes is less than this
+;                                    number then some children will be created.
+;             pm.max_spare_servers - the maximum number of children in 'idle'
+;                                    state (waiting to process). If the number
+;                                    of 'idle' processes is greater than this
+;                                    number then some children will be killed.
+; Note: This value is mandatory.
+pm = dynamic
+
+; The number of child processes to be created when pm is set to 'static' and the
+; maximum number of child processes to be created when pm is set to 'dynamic'.
+; This value sets the limit on the number of simultaneous requests that will be
+; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
+; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
+; CGI.
+; Note: Used when pm is set to either 'static' or 'dynamic'
+; Note: This value is mandatory.
+pm.max_children = 50
+
+; The number of child processes created on startup.
+; Note: Used only when pm is set to 'dynamic'
+; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
+pm.start_servers = 5
+
+; The desired minimum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.min_spare_servers = 5
+
+; The desired maximum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.max_spare_servers = 35
+ 
+; The number of requests each child process should execute before respawning.
+; This can be useful to work around memory leaks in 3rd party libraries. For
+; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+; Default Value: 0
+;pm.max_requests = 500
+
+; The URI to view the FPM status page. If this value is not set, no URI will be
+; recognized as a status page. By default, the status page shows the following
+; information:
+;   accepted conn    - the number of request accepted by the pool;
+;   pool             - the name of the pool;
+;   process manager  - static or dynamic;
+;   idle processes   - the number of idle processes;
+;   active processes - the number of active processes;
+;   total processes  - the number of idle + active processes.
+; The values of 'idle processes', 'active processes' and 'total processes' are
+; updated each second. The value of 'accepted conn' is updated in real time.
+; Example output:
+;   accepted conn:   12073
+;   pool:             www
+;   process manager:  static
+;   idle processes:   35
+;   active processes: 65
+;   total processes:  100
+; By default the status page output is formatted as text/plain. Passing either
+; 'html' or 'json' as a query string will return the corresponding output
+; syntax. Example:
+;   http://www.foo.bar/status
+;   http://www.foo.bar/status?json
+;   http://www.foo.bar/status?html
+; Note: The value must start with a leading slash (/). The value can be
+;       anything, but it may not be a good idea to use the .php extension or it
+;       may conflict with a real PHP file.
+; Default Value: not set 
+;pm.status_path = /status
+ 
+; The ping URI to call the monitoring page of FPM. If this value is not set, no
+; URI will be recognized as a ping page. This could be used to test from outside
+; that FPM is alive and responding, or to
+; - create a graph of FPM availability (rrd or such);
+; - remove a server from a group if it is not responding (load balancing);
+; - trigger alerts for the operating team (24/7).
+; Note: The value must start with a leading slash (/). The value can be
+;       anything, but it may not be a good idea to use the .php extension or it
+;       may conflict with a real PHP file.
+; Default Value: not set
+;ping.path = /ping
+
+; This directive may be used to customize the response of a ping request. The
+; response is formatted as text/plain with a 200 response code.
+; Default Value: pong
+;ping.response = pong
+ 
+; The timeout for serving a single request after which the worker process will
+; be killed. This option should be used when the 'max_execution_time' ini option
+; does not stop script execution for some reason. A value of '0' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_terminate_timeout = 0
+ 
+; The timeout for serving a single request after which a PHP backtrace will be
+; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_slowlog_timeout = 0
+ 
+; The log file for slow requests
+; Default Value: not set
+; Note: slowlog is mandatory if request_slowlog_timeout is set
+slowlog = /var/log/php-fpm/www-slow.log
+ 
+; Set open file descriptor rlimit.
+; Default Value: system defined value
+;rlimit_files = 1024
+ 
+; Set max core size rlimit.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+ 
+; Chroot to this directory at the start. This value must be defined as an
+; absolute path. When this value is not set, chroot is not used.
+; Note: chrooting is a great security feature and should be used whenever 
+;       possible. However, all PHP paths will be relative to the chroot
+;       (error_log, sessions.save_path, ...).
+; Default Value: not set
+;chroot = 
+ 
+; Chdir to this directory at the start. This value must be an absolute path.
+; Default Value: current directory or / when chroot
+;chdir = /var/www
+ 
+; Redirect worker stdout and stderr into main error log. If not set, stdout and
+; stderr will be redirected to /dev/null according to FastCGI specs.
+; Default Value: no
+;catch_workers_output = yes
+ 
+; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
+; the current environment.
+; Default Value: clean env
+;env[HOSTNAME] = $HOSTNAME
+;env[PATH] = /usr/local/bin:/usr/bin:/bin
+;env[TMP] = /tmp
+;env[TMPDIR] = /tmp
+;env[TEMP] = /tmp
+
+; Additional php.ini defines, specific to this pool of workers. These settings
+; overwrite the values previously defined in the php.ini. The directives are the
+; same as the PHP SAPI:
+;   php_value/php_flag             - you can set classic ini defines which can
+;                                    be overwritten from PHP call 'ini_set'. 
+;   php_admin_value/php_admin_flag - these directives won't be overwritten by
+;                                     PHP call 'ini_set'
+; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
+
+; Defining 'extension' will load the corresponding shared extension from
+; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
+; overwrite previously defined php.ini values, but will append the new value
+; instead.
+
+; Default Value: nothing is defined by default except the values in php.ini and
+;                specified at startup with the -d argument
+;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www at my.domain.com
+;php_flag[display_errors] = off
+php_admin_value[error_log] = /var/log/php-fpm/www-error.log
+php_admin_flag[log_errors] = on
+;php_admin_value[memory_limit] = 32M
diff --git a/php-fpm.conf b/php-fpm.conf
new file mode 100644
index 0000000..a243fa0
--- /dev/null
+++ b/php-fpm.conf
@@ -0,0 +1,60 @@
+;;;;;;;;;;;;;;;;;;;;;
+; FPM Configuration ;
+;;;;;;;;;;;;;;;;;;;;;
+
+; All relative paths in this configuration file are relative to PHP's install
+; prefix.
+
+; Include one or more files. If glob(3) exists, it is used to include a bunch of
+; files from a glob(3) pattern. This directive can be used everywhere in the
+; file.
+include=/etc/php-fpm.d/*.conf
+
+;;;;;;;;;;;;;;;;;;
+; Global Options ;
+;;;;;;;;;;;;;;;;;;
+
+[global]
+; Pid file
+; Default Value: none
+pid = /var/run/php-fpm/php-fpm.pid
+
+; Error log file
+; Default Value: /var/log/php-fpm.log
+error_log = /var/log/php-fpm/error.log
+
+; Log level
+; Possible Values: alert, error, warning, notice, debug
+; Default Value: notice
+;log_level = notice
+
+; If this number of child processes exit with SIGSEGV or SIGBUS within the time
+; interval set by emergency_restart_interval then FPM will restart. A value
+; of '0' means 'Off'.
+; Default Value: 0
+;emergency_restart_threshold = 0
+
+; Interval of time used by emergency_restart_interval to determine when 
+; a graceful restart will be initiated.  This can be useful to work around
+; accidental corruptions in an accelerator's shared memory.
+; Available Units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;emergency_restart_interval = 0
+
+; Time limit for child processes to wait for a reaction on signals from master.
+; Available units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;process_control_timeout = 0
+
+; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
+; Default Value: yes
+;daemonize = yes
+
+;;;;;;;;;;;;;;;;;;;;
+; Pool Definitions ; 
+;;;;;;;;;;;;;;;;;;;;
+
+; See /etc/php-fpm.d/*.conf
+
diff --git a/php-fpm.init b/php-fpm.init
new file mode 100755
index 0000000..a6375ba
--- /dev/null
+++ b/php-fpm.init
@@ -0,0 +1,85 @@
+#! /bin/sh
+#
+# chkconfig: - 84 16
+# description:	PHP FastCGI Process Manager
+# processname: php-fpm
+# config: /etc/php-fpm.conf
+# pidfile: /var/run/php-fpm/php-fpm.pid
+
+# Standard LSB functions
+#. /lib/lsb/init-functions
+
+# Source function library.
+. /etc/init.d/functions
+
+# Check that networking is up.
+. /etc/sysconfig/network
+
+if [ "$NETWORKING" = "no" ]
+then
+	exit 0
+fi
+
+RETVAL=0
+prog="php-fpm"
+pidfile=${PIDFILE-/var/run/php-fpm/php-fpm.pid}
+lockfile=${LOCKFILE-/var/lock/subsys/php-fpm}
+
+start () {
+	echo -n $"Starting $prog: "
+	daemon --pidfile ${pidfile} php-fpm
+	RETVAL=$?
+	echo
+	[ $RETVAL -eq 0 ] && touch ${lockfile}
+}
+stop () {
+	echo -n $"Stopping $prog: "
+	killproc -p ${pidfile} php-fpm
+	RETVAL=$?
+	echo
+	if [ $RETVAL -eq 0 ] ; then
+		rm -f ${lockfile} ${pidfile}
+	fi
+}
+
+restart () {
+        stop
+        start
+}
+
+reload () {
+	echo -n $"Reloading $prog: "
+	killproc -p ${pidfile} php-fpm -USR2
+	RETVAL=$?
+	echo
+}
+
+
+# See how we were called.
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  status)
+	status -p ${pidfile} php-fpm
+	RETVAL=$?
+	;;
+  restart)
+	restart
+	;;
+  reload|force-reload)
+	reload
+	;;
+  condrestart|try-restart)
+	[ -f ${lockfile} ] && restart || :
+	;;
+  *)
+	echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|try-restart}"
+	RETVAL=2
+        ;;
+esac
+
+exit $RETVAL
diff --git a/php-fpm.logrotate b/php-fpm.logrotate
new file mode 100644
index 0000000..a8cfbc8
--- /dev/null
+++ b/php-fpm.logrotate
@@ -0,0 +1,9 @@
+/var/log/php-fpm/*log {
+    missingok
+    notifempty
+    sharedscripts
+    delaycompress
+    postrotate
+	/bin/kill -SIGUSR1 `cat /var/run/php-fpm/php-fpm.pid 2>/dev/null` 2>/dev/null || true
+    endscript
+}
diff --git a/php.spec b/php.spec
index 6003e4d..8ba0873 100644
--- a/php.spec
+++ b/php.spec
@@ -14,10 +14,16 @@
 # Regression tests take a long time, you can skip 'em with this
 %{!?runselftest: %{expand: %%global runselftest 1}}
 
+%ifarch %{ix86} x86_64
+%global with_fpm 1
+%else
+%global with_fpm 0
+%endif
+
 Summary: PHP scripting language for creating dynamic web sites
 Name: php
 Version: 5.3.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: PHP
 Group: Development/Languages
 URL: http://www.php.net/
@@ -26,6 +32,10 @@ Source0: http://www.php.net/distributions/php-%{version}.tar.bz2
 Source1: php.conf
 Source2: php.ini
 Source3: macros.php
+Source4: php-fpm.conf
+Source5: php-fpm-www.conf
+Source6: php-fpm.init
+Source7: php-fpm.logrotate
 
 # Build fixes
 Patch1: php-5.3.3-gnusrc.patch
@@ -98,6 +108,19 @@ BuildRequires: libtool-ltdl-devel
 The php-zts package contains a module for use with the Apache HTTP
 Server which can operate under a threaded server processing model.
 
+%if %{with_fpm}
+%package fpm
+Group: Development/Languages
+Summary: PHP FastCGI Process Manager
+Requires: php-common = %{version}-%{release}
+BuildRequires: libevent-devel >= 1.4.11
+
+%description fpm
+PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI
+implementation with some additional features useful for sites of
+any size, especially busier sites.
+%endif
+
 %package common
 Group: Development/Languages
 Summary: Common files for PHP
@@ -450,7 +473,10 @@ cp ext/ereg/regex/COPYRIGHT regex_COPYRIGHT
 cp ext/gd/libgd/README gd_README
 
 # Multiple builds for multiple SAPIs
-mkdir build-cgi build-apache build-embedded build-zts
+mkdir build-cgi build-apache build-embedded build-zts \
+%if %{with_fpm}
+    build-fpm
+%endif
 
 # Remove bogus test; position of read position after fopen(, "a+")
 # is not defined by C standard, so don't presume anything.
@@ -655,6 +681,13 @@ pushd build-apache
 build --with-apxs2=%{_sbindir}/apxs ${without_shared}
 popd
 
+%if %{with_fpm}
+# Build php-fpm
+pushd build-fpm
+build --enable-fpm ${without_shared}
+popd
+%endif
+
 # Build for inclusion as embedded script language into applications,
 # /usr/lib[64]/libphp5.so
 pushd build-embedded
@@ -697,6 +730,11 @@ unset NO_INTERACTION REPORT_EXIT_STATUS MALLOC_CHECK_
 # Install the version for embedded script language in applications + php_embed.h
 make -C build-embedded install-sapi install-headers INSTALL_ROOT=$RPM_BUILD_ROOT
 
+%if %{with_fpm}
+# Install the php-fpm binary
+make -C build-fpm install-fpm INSTALL_ROOT=$RPM_BUILD_ROOT 
+%endif
+
 # Install everything from the CGI SAPI build
 make -C build-cgi install INSTALL_ROOT=$RPM_BUILD_ROOT 
 
@@ -726,6 +764,24 @@ install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d
 install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php
 install -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php/session
 
+%if %{with_fpm}
+# PHP-FPM stuff
+# Log
+install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/log/php-fpm
+install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/run/php-fpm
+# Config
+install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d
+install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf
+install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.d/www.conf
+mv $RPM_BUILD_ROOT%{_sysconfdir}/php-fpm.conf.default .
+# Service
+install -m 755 -d $RPM_BUILD_ROOT%{_initrddir}
+install -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{_initrddir}/php-fpm
+# LogRotate
+install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
+install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/php-fpm
+%endif
+
 # Fix the link
 (cd $RPM_BUILD_ROOT%{_bindir}; ln -sfn phar.phar phar)
 
@@ -790,6 +846,17 @@ rm -f README.{Zeus,QNX,CVS-RULES}
 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
 rm files.* macros.php
 
+%if %{with_fpm}
+%post fpm
+/sbin/chkconfig --add php-fpm
+
+%preun fpm
+if [ "$1" = 0 ] ; then
+    /sbin/service php-fpm stop >/dev/null 2>&1
+    /sbin/chkconfig --del php-fpm
+fi
+%endif
+
 %post embedded -p /sbin/ldconfig
 %postun embedded -p /sbin/ldconfig
 
@@ -828,6 +895,22 @@ rm files.* macros.php
 %defattr(-,root,root)
 %{_libdir}/httpd/modules/libphp5-zts.so
 
+%if %{with_fpm}
+%files fpm
+%defattr(-,root,root)
+%doc php-fpm.conf.default
+%config(noreplace) %{_sysconfdir}/php-fpm.conf
+%config(noreplace) %{_sysconfdir}/php-fpm.d/www.conf
+%config(noreplace) %{_sysconfdir}/logrotate.d/php-fpm
+%{_sbindir}/php-fpm
+%{_initrddir}/php-fpm
+%dir %{_sysconfdir}/php-fpm.d
+# log owned by apache for log
+%attr(770,apache,apache) %dir %{_localstatedir}/log/php-fpm
+%dir %{_localstatedir}/run/php-fpm
+%{_mandir}/man1/php-fpm.1*
+%endif
+
 %files devel
 %defattr(-,root,root)
 %{_bindir}/php-config
@@ -870,6 +953,9 @@ rm files.* macros.php
 %files enchant -f files.enchant
 
 %changelog
+* Sun Oct 10 2010 Remi Collet <Fedora at famillecollet.com> 5.3.3-2
+- add php-fpm sub-package
+
 * Thu Jul 22 2010 Remi Collet <Fedora at famillecollet.com> 5.3.3-1
 - PHP 5.3.3 released
 




More information about the packaging-commits mailing list