summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-10-18 10:53:17 +0200
committerRemi Collet <fedora@famillecollet.com>2012-10-18 10:53:17 +0200
commitd00de60443f8d5571aa261198c546e8b74d9d803 (patch)
treecc0b8e43399fa07661d1ca4fef5e8422eeabc42b
parent77247072a4397f241117b8e9a2c23a5aeff41db8 (diff)
update to 5.4.8
-rw-r--r--php-5.4.8-libxml.patch50
-rw-r--r--php-fpm-www.conf3
-rw-r--r--php54.spec22
3 files changed, 72 insertions, 3 deletions
diff --git a/php-5.4.8-libxml.patch b/php-5.4.8-libxml.patch
new file mode 100644
index 0000000..d9e92e9
--- /dev/null
+++ b/php-5.4.8-libxml.patch
@@ -0,0 +1,50 @@
+From 100bb87f5517484d75191ff4cdbbc1fdf579791d Mon Sep 17 00:00:00 2001
+From: jjacky <i.am.jack.mail@gmail.com>
+Date: Fri, 11 May 2012 22:38:05 +0200
+Subject: [PATCH] CGI/FPM process could crash when using libxml, fixes #61557
+
+Since d8bddb9665637d96f20dc4a2ae5668ba376f3b17 some SAPI would only setup/reset
+callbacks to libxml once, instead of for each request processed. However, this
+also included a callback for structured errors, which should remain per request
+(as it can be defined through PHP's libxml_use_internal_errors).
+
+As a result, after the internal handler was set in a request, processing another
+request would result in the handler being triggered while the memory associated
+with it (LIBXML(error_list)) had been free-d/reset, leading to the process
+segfaulting.
+
+This reset the handler for structured errors after each request.
+
+(see #61325 also possibly the same bug)
+---
+ ext/libxml/libxml.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
+index e42d845..92c1099 100644
+--- a/ext/libxml/libxml.c
++++ b/ext/libxml/libxml.c
+@@ -851,7 +851,6 @@ static PHP_MSHUTDOWN_FUNCTION(libxml)
+ {
+ if (!_php_libxml_per_request_initialization) {
+ xmlSetGenericErrorFunc(NULL, NULL);
+- xmlSetStructuredErrorFunc(NULL, NULL);
+
+ xmlParserInputBufferCreateFilenameDefault(NULL);
+ xmlOutputBufferCreateFilenameDefault(NULL);
+@@ -867,11 +866,11 @@ static int php_libxml_post_deactivate()
+ /* reset libxml generic error handling */
+ if (_php_libxml_per_request_initialization) {
+ xmlSetGenericErrorFunc(NULL, NULL);
+- xmlSetStructuredErrorFunc(NULL, NULL);
+
+ xmlParserInputBufferCreateFilenameDefault(NULL);
+ xmlOutputBufferCreateFilenameDefault(NULL);
+ }
++ xmlSetStructuredErrorFunc(NULL, NULL);
+
+ if (LIBXML(stream_context)) {
+ /* the steam_context resource will be released by resource list destructor */
+--
+1.7.10.1
+
diff --git a/php-fpm-www.conf b/php-fpm-www.conf
index a5b8a13..9cdbb4f 100644
--- a/php-fpm-www.conf
+++ b/php-fpm-www.conf
@@ -221,5 +221,6 @@ php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 128M
; Set session path to a directory owned by process user
-php_admin_value[session.save_path] = /var/lib/php/session
+php_value[session.save_handler] = files
+php_value[session.save_path] = /var/lib/php/session
diff --git a/php54.spec b/php54.spec
index ba58639..ba07547 100644
--- a/php54.spec
+++ b/php54.spec
@@ -26,7 +26,7 @@
%global mysql_config %{_libdir}/mysql/mysql_config
#global snapdate 201201041830
-%global rcver RC1
+#global rcver RC1
# Optional components; pass "--with mssql" etc to rpmbuild.
%global with_oci8 %{?_with_oci8:1}%{!?_with_oci8:0}
@@ -65,7 +65,7 @@ Version: 5.4.8
%if 0%{?snapdate:1}%{?rcver:1}
Release: 0.3.%{?snapdate}%{?rcver}%{?dist}
%else
-Release: 1%{?dist}
+Release: 1%{?dist}.1
%endif
License: PHP
Group: Development/Languages
@@ -100,6 +100,8 @@ Patch20: php-5.4.7-imap.patch
Patch21: php-5.4.7-odbctimer.patch
# https://bugs.php.net/63149 check sqlite3_column_table_name
Patch22: php-5.4.7-sqlite.patch
+# https://bugs.php.net/61557 crash in libxml
+Patch23: php-5.4.8-libxml.patch
# Functional changes
Patch40: php-5.4.0-dlopen.patch
@@ -192,6 +194,7 @@ 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(pre): /usr/sbin/useradd
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
BuildRequires: systemd-units
Requires: systemd-units
@@ -685,6 +688,7 @@ httpd -V | grep -q 'threaded:.*yes' && exit 1
%patch20 -p1 -b .imap
%patch21 -p1 -b .odbctimer
%patch22 -p1 -b .tablename
+%patch23 -p1 -b .libxmlcrash
%patch40 -p1 -b .dlopen
%patch41 -p1 -b .easter
@@ -1317,6 +1321,15 @@ echo -e "You should consider upgrading to a supported release.\n"
%if %{with_fpm}
+%pre fpm
+# Add the "apache" user as we don't require httpd
+getent group apache >/dev/null || \
+ groupadd -g 48 -r apache
+getent passwd apache >/dev/null || \
+ useradd -r -u 48 -g apache -s /sbin/nologin \
+ -d %{contentdir} -c "Apache" apache
+exit 0
+
%post fpm
%if 0%{?systemd_post:1}
%systemd_post php-fpm.service
@@ -1499,6 +1512,11 @@ fi
%changelog
+* Thu Oct 18 2012 Remi Collet <remi@fedoraproject.org> 5.4.8-1
+- update to 5.4.8
+- improve comments for session path
+- php-fpm: create apache user if needed
+
* Fri Oct 5 2012 Remi Collet <remi@fedoraproject.org> 5.4.8-0.3.RC1
- provides php-phar