From 23dd9d8ca838e981ffbbe87be7b98418efab4218 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 18 Jul 2017 11:55:55 +0200 Subject: [PATCH] disable httpd MPM check --- php-7.1.7-httpd.patch | 28 ++++++++++++++++++++++++++++ php.spec | 10 ++++++---- 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 php-7.1.7-httpd.patch diff --git a/php-7.1.7-httpd.patch b/php-7.1.7-httpd.patch new file mode 100644 index 0000000..acb3d2c --- /dev/null +++ b/php-7.1.7-httpd.patch @@ -0,0 +1,28 @@ +Disable MPM detection + +mod_php is build twice +- as NTS without option +- as ZTS using --enable-maintainer-zts + +diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4 +index 2e64b21..ec4799f 100644 +--- a/sapi/apache2handler/config.m4 ++++ b/sapi/apache2handler/config.m4 +@@ -116,17 +116,6 @@ if test "$PHP_APXS2" != "no"; then + ;; + esac + +- if test "$APACHE_VERSION" -lt 2004001; then +- APXS_MPM=`$APXS -q MPM_NAME` +- if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test "$APXS_MPM" != "itk"; then +- PHP_BUILD_THREAD_SAFE +- fi +- else +- APACHE_THREADED_MPM=`$APXS_HTTPD -V | grep 'threaded:.*yes'` +- if test -n "$APACHE_THREADED_MPM"; then +- PHP_BUILD_THREAD_SAFE +- fi +- fi + AC_MSG_RESULT(yes) + PHP_SUBST(APXS) + else diff --git a/php.spec b/php.spec index 07399fb..c73dc9b 100644 --- a/php.spec +++ b/php.spec @@ -67,7 +67,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: php Version: %{upver}%{?rcver:~%{rcver}} -Release: 1%{?dist} +Release: 2%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -94,6 +94,7 @@ Source50: 10-opcache.ini Source51: opcache-default.blacklist # Build fixes +Patch1: php-7.1.7-httpd.patch Patch5: php-7.0.0-includedir.patch Patch6: php-5.6.3-embed.patch Patch7: php-5.3.0-recode.patch @@ -703,9 +704,7 @@ support for JavaScript Object Notation (JSON) to PHP. %prep %setup -q -n php-%{upver}%{?rcver} -# ensure than current httpd use prefork MPM. -httpd -V | grep -q 'threaded:.*yes' && exit 1 - +%patch1 -p1 -b .mpmcheck %patch5 -p1 -b .includedir %patch6 -p1 -b .embed %patch7 -p1 -b .recode @@ -1506,6 +1505,9 @@ rm -f README.{Zeus,QNX,CVS-RULES} %changelog +* Tue Jul 18 2017 Remi Collet - 7.1.7-2 +- disable httpd MPM check + * Thu Jul 6 2017 Remi Collet - 7.1.7-1 - Update to 7.1.7 - http://www.php.net/releases/7_1_7.php