# - update imap myrights patch (needs api porting)
# --with-libmbfl=DIR MBSTRING: Use external libmbfl. DIR is the libmbfl base install directory BUNDLED
# --with-onig=DIR MBSTRING: Use external oniguruma. DIR is the oniguruma install prefix.
-# UNPACKAGED EXTENSION NOTES:
-# - com_dotnet is Win32-only
# TODO:
# - fileinfo extension bundles magic db in library: data_file.c (dump of magic.mgc) is 14M
# - 2.3M fileinfo.so php54-fileinfo-5.4.6-0.15.x86_64
%bcond_with systemtap # systemtap/DTrace support
%bcond_with tests # default off; test process very often hangs on builders, approx run time 45m; perform "make test"
%bcond_with zts # Zend Thread Safety
+%bcond_with debug # Zend Debug Build
# - SAPI
%bcond_without apache1 # disable building Apache 1.3.x SAPI
%bcond_without apache2 # disable building Apache 2.x SAPI
%bcond_without mhash # without mhash extension (supported by hash extension)
%bcond_without mssql # without MS SQL extension module
%bcond_without mysql # without ext/mysql support
-%bcond_without mysqli # without mysqli support (Requires mysql > 4.1)
+%bcond_without mysqli # without mysqli support (Requires mysql >= 4.1)
%bcond_without mysqlnd # without mysqlnd support in mysql related extensions
%bcond_with oci # with Oracle oci8 extension module (BR: proprietary libs)
%bcond_without odbc # without ODBC extension module
%undefine with_filter
%endif
-%define rel 1
+%define rel 19
%define orgname php
%define ver_suffix 56
%define php_suffix %{!?with_default_php:%{ver_suffix}}
Summary(ru.UTF-8): PHP Версии 5 - язык препроцессирования HTML-файлов, выполняемый на сервере
Summary(uk.UTF-8): PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері
Name: %{orgname}%{php_suffix}
-Version: 5.6.29
+Version: 5.6.40
Release: %{rel}
Epoch: 4
# All files licensed under PHP version 3.01, except
License: PHP 3.01 and Zend and BSD
Group: Libraries
Source0: http://www.php.net/distributions/%{orgname}-%{version}.tar.xz
-# Source0-md5: 190bf5b52d1fc68d5500a8cdc7e33164
+# Source0-md5: c7dde3afb16ce7b761abf2805125d372
Source2: %{orgname}-mod_%{orgname}.conf
Source3: %{orgname}-cgi-fcgi.ini
Source4: %{orgname}-apache.ini
Patch9: libtool-tag.patch
Patch10: %{orgname}-ini.patch
Patch11: embed.patch
+Patch12: openssl.patch
Patch14: %{orgname}-no_pear_install.patch
Patch17: %{orgname}-readline.patch
Patch18: %{orgname}-nohttpd.patch
Patch65: system-libzip.patch
Patch66: php-db.patch
Patch67: mysql-lib-ver-mismatch.patch
-
+Patch68: CVE-2019-11043.patch
Patch69: fpm-conf-split.patch
Patch70: mysqlnd-ssl.patch
Patch72: phar-hash-shared.patch
-URL: http://php.net/
+Patch73: php-pdo-ssl.patch
+Patch74: php-icu64.patch
+Patch75: icu69.patch
+Patch76: icu70.patch
+URL: https://www.php.net/
%{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}}
%{?with_pspell:BuildRequires: aspell-devel >= 2:0.50.0}
BuildRequires: autoconf >= 2.59
%define phpdbgver 0.4.0
%define _zend_zts %{!?with_zts:0}%{?with_zts:1}
-%define php_debug %{!?debug:0}%{?debug:1}
+%define php_debug %{!?with_debug:0}%{?with_debug:1}
%if %{with gcov}
%undefine with_ccache
PHP jako moduł DSO (Dynamic Shared Object) dla Apache 1.3.x.
%package -n apache-mod_%{name}
-Summary: PHP DSO module for Apache 2.x
-Summary(pl.UTF-8): Moduł DSO (Dynamic Shared Object) PHP dla Apache 2.x
+Summary: PHP support for Apache 2.x
+Summary(pl.UTF-8): Wsparcie PHP dla Apache 2.x
Group: Development/Languages/PHP
+Requires: apache-mod_%{name}-core = %{epoch}:%{version}-%{release}
Requires: %{name}-common = %{epoch}:%{version}-%{release}
-Requires: apache(modules-api) = %{apache_modules_api}
-Requires: apache-mod_mime
Provides: webserver(php) = %{version}
Obsoletes: apache-mod_php < 4:5.3.28-7
Obsoletes: phpfi
%description -n apache-mod_%{name}
-PHP as DSO module for Apache 2.x.
+PHP support for Apache 2.x.
%description -n apache-mod_%{name} -l pl.UTF-8
+Wsparcie PHP dla Apache 2.x.
+
+%package -n apache-mod_%{name}-core
+Summary: PHP DSO module for Apache 2.x
+Summary(pl.UTF-8): Moduł DSO (Dynamic Shared Object) PHP dla Apache 2.x
+Group: Development/Languages/PHP
+Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Requires: apache(modules-api) = %{apache_modules_api}
+Requires: apache-mod_mime
+
+%description -n apache-mod_%{name}-core
+PHP as DSO module for Apache 2.x.
+
+%description -n apache-mod_%{name}-core -l pl.UTF-8
PHP jako moduł DSO (Dynamic Shared Object) dla Apache 2.x.
%package litespeed
Summary(pl.UTF-8): Dowiązanie symboliczne /usr/bin/php
Group: Development/Languages/PHP
Requires: %{name}-cli = %{epoch}:%{version}-%{release}
-Obsoletes: /usr/bin/php
Obsoletes: php-program < 4:5.3.28-7
+Obsoletes: php4-program < 3:5
+Obsoletes: php52-program < 4:5.3
+Obsoletes: php53-program < 4:5.4
+Obsoletes: php54-program < 4:5.5
+Obsoletes: php55-program < 4:5.6
+Obsoletes: php70-program < 4:7.1
+Obsoletes: php71-program < 4:7.2
+Obsoletes: php72-program < 4:7.3
+Obsoletes: php73-program < 4:7.4
+Obsoletes: php74-program < 4:8
+Obsoletes: php80-program < 4:8.1
+Obsoletes: php81-program < 4:8.2
+Obsoletes: php82-program < 4:8.3
%description program
Package providing /usr/bin/php symlink to PHP CLI.
%{?with_pcre:%requires_ge_to pcre pcre-devel}
Suggests: browscap
Obsoletes: php-common < 4:5.3.28-7
+# withdrawn modules
+Obsoletes: php-filepro < 4:5.2.0
+Obsoletes: php-hwapi < 4:5.2.0
+Obsoletes: php-hyperwave < 3:5.0.0
+Obsoletes: php-java < 3:5.0.0
+Obsoletes: php-mcal < 3:5.0.0
Obsoletes: php-pecl-domxml
+Obsoletes: php-qtdom < 3:5.0.0
Conflicts: php4-common < 3:4.4.4-8
Conflicts: php55-common < 4:5.5.10-4
Conflicts: rpm < 4.4.2-0.2
Requires: shtool
Provides: php-devel = %{epoch}:%{version}-%{release}
Obsoletes: php-devel
-Obsoletes: php-pear-devel
-Obsoletes: php4-devel
-Obsoletes: php52-devel
-Obsoletes: php53-devel
-Obsoletes: php54-devel
-Obsoletes: php55-devel
-Obsoletes: php70-devel
-Obsoletes: php71-devel
+Obsoletes: php-pear-devel < 3:4.3.0-1
+Obsoletes: php4-devel < 3:5
+Obsoletes: php52-devel < 4:5.3
+Obsoletes: php53-devel < 4:5.4
+Obsoletes: php54-devel < 4:5.5
+Obsoletes: php55-devel < 4:5.6
+Obsoletes: php70-devel < 4:7.1
+Obsoletes: php71-devel < 4:7.2
+Obsoletes: php72-devel < 4:7.3
+Obsoletes: php73-devel < 4:7.4
+Obsoletes: php74-devel < 4:8
+Obsoletes: php80-devel < 4:8.1
+Obsoletes: php81-devel < 4:8.2
+Obsoletes: php82-devel < 4:8.3
%description devel
The php-devel package lets you compile dynamic extensions to PHP.
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(dba)
Obsoletes: php-dba < 4:5.3.28-7
+# withdrawn module of similar functionality but different API
+Obsoletes: php-db < 3:5.0.0
%description dba
This is a dynamic shared object (DSO) for PHP that will add flat-file
Requires: %{name}-pcre = %{epoch}:%{version}-%{release}
Provides: php(filter)
Obsoletes: php-filter < 4:5.3.28-7
-Obsoletes: php-pecl-filter
+Obsoletes: php-pecl-filter < 0.12
%description filter
We all know that you should always check input variables, but PHP does
%{?requires_php_extension}
Provides: php(oci8)
Obsoletes: php-oci8 < 4:5.3.28-7
+# withdrawn module of similar functionality but different API
+Obsoletes: php-oracle < 4:5.1.0
%description oci8
This is a dynamic shared object (DSO) for PHP that will add Oracle 7,
Provides: %{name}(PDO_API) = %{php_pdo_api_version}
Provides: php(pdo)
Obsoletes: php-pdo < 4:5.3.28-7
-Obsoletes: php-pecl-PDO
+Obsoletes: php-pecl-PDO < 1.1
%description pdo
This is a dynamic shared object (DSO) for PHP that will add PDO
Provides: php(pdo-firebird)
Provides: php(pdo_firebird)
Obsoletes: php-pdo-firebird < 4:5.3.28-7
-Obsoletes: php-pecl-PDO_FIREBIRD
+Obsoletes: php-pecl-PDO_FIREBIRD < 0.3
%description pdo-firebird
This is a dynamic shared object (DSO) for PHP that will add PDO
Provides: php(pdo-mysql)
Provides: php(pdo_mysql)
Obsoletes: php-pdo-mysql < 4:5.3.28-7
-Obsoletes: php-pecl-PDO_MYSQL
+Obsoletes: php-pecl-PDO_MYSQL < 1.1
%description pdo-mysql
This is a dynamic shared object (DSO) for PHP that will add PDO MySQL
Provides: php(pdo-oci)
Provides: php(pdo_oci)
Obsoletes: php-pdo-oci < 4:5.3.28-7
-Obsoletes: php-pecl-PDO_OCI
+Obsoletes: php-pecl-PDO_OCI < 1.1
%description pdo-oci
This is a dynamic shared object (DSO) for PHP that will add PDO Oracle
Provides: php(pdo-odbc)
Provides: php(pdo_odbc)
Obsoletes: php-pdo-odbc < 4:5.3.28-7
-Obsoletes: php-pecl-PDO_ODBC
+Obsoletes: php-pecl-PDO_ODBC < 1.1
%description pdo-odbc
This is a dynamic shared object (DSO) for PHP that will add PDO ODBC
Requires: %{name}-pdo = %{epoch}:%{version}-%{release}
Provides: php(pdo-pgsql)
Provides: php(pdo_pgsql)
-Provides: php-pecl-PDO_PGSQL = 4:5.3.28-7
Obsoletes: php-pdo-pgsql < 4:5.3.28-7
Obsoletes: php-pecl-PDO_PGSQL < 4:5.2.1-2
Provides: php(pdo-sqlite)
Provides: php(pdo_sqlite)
Obsoletes: php-pdo-sqlite < 4:5.3.28-7
-Obsoletes: php-pecl-PDO_SQLITE
+Obsoletes: php-pecl-PDO_SQLITE < 1.1
%description pdo-sqlite
This is a dynamic shared object (DSO) for PHP that will add PDO SQLite
URL: http://php.net/manual/en/book.xmlwriter.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(xmlwriter)
-Obsoletes: php-pecl-xmlwriter
+Obsoletes: php-pecl-xmlwriter < 2.1
Obsoletes: php-xmlwriter < 4:5.3.28-7
%description xmlwriter
%{?with_milter:%patch8 -p1}
%patch9 -p1
%patch10 -p1
+
+%patch12 -p1
+
%patch14 -p1
%patch17 -p1
%patch18 -p1
%{?with_system_libzip:%patch65 -p1}
%patch66 -p1
%patch67 -p1
-
+%patch68 -p1
%patch70 -p1
%patch72 -p1
+%patch73 -p1
+%patch74 -p1
+%patch75 -p1
+%patch76 -p1
+
+sed -E -i -e '1s,#!\s*/usr/bin/env\s+(.*),#!%{__bindir}\1,' \
+ run-tests.php
%{__sed} -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
# cleanup backups after patching
find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
+# com_dotnet is Win32-only
+%{__rm} -r ext/com_dotnet
+
# conflict seems to be resolved by recode patches
%{__rm} ext/recode/config9.m4
%{__rm} -r ext/sqlite3/tests
%endif
+# ----- Manage known as failed test -------
+# affected by systzdata patch
+%{__rm} ext/date/tests/timezone_location_get.phpt
+%{__rm} ext/date/tests/timezone_version_get.phpt
+%{__rm} ext/date/tests/timezone_version_get_basic1.phpt
+# Should be skipped but fails sometime
+%{__rm} ext/standard/tests/file/file_get_contents_error001.phpt
+# fails sometimes
+%{__rm} ext/sockets/tests/mcast_ipv?_recv.phpt
+# causes stack exhausion
+%{__rm} Zend/tests/bug54268.phpt
+
+# avoid issues when two builds run simultaneously
+%ifarch %{x8664}
+sed -e 's/64321/64322/' -i ext/openssl/tests/*.phpt
+%endif
+
# skip XFAILs
# no point testing stuff that is knowingly broken
-find -name '*.phpt' | xargs grep XFAIL -l | xargs rm -v
+find -name '*.phpt' | xargs grep '^--XFAIL--' -l | xargs rm -v
env \
%ifarch %{ix86}
-ix86= x8664=:
+ix86= x8664=: \
%endif
%ifarch %{x8664}
ix86=: x8664= \
touch _built-conf
fi
export PROG_SENDMAIL="/usr/lib/sendmail"
-export CPPFLAGS="-DDEBUG_FASTCGI -DHAVE_STRNDUP %{rpmcppflags} \
+export CPPFLAGS="-DDEBUG_FASTCGI -DHAVE_STRNDUP -DOPENSSL_NO_SSL2 %{rpmcppflags} \
-I%{_includedir}/xmlrpc-epi"
sapis="
--with-config-file-path=%{_sysconfdir} \
--with-config-file-scan-dir=%{_sysconfdir}/conf.d \
--with-system-tzdata \
- --%{!?debug:dis}%{?debug:en}able-debug \
+ --%{!?with_debug:dis}%{?with_debug:en}able-debug \
%{?with_zts:--enable-maintainer-zts} \
--enable-inline-optimization \
%{__enable_disable bcmath bcmath shared} \
cat <<'EOF' > run-tests.sh
#!/bin/sh
export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
+export SKIP_ONLINE_TESTS=1
unset TZ LANG LC_ALL || :
%{__make} test \
EXTENSION_DIR=modules \
%endif
%{__sed} -i -e '
- s#/usr/lib/php#%{php_extensiondir}#
- s#/etc/php#%{_sysconfdir}#
+ s#/usr/lib/php#%{php_extensiondir}#g
+ s#/etc/php/#%{_sysconfdir}/#g
s#@processname@#%{name}-fpm#g
' $RPM_BUILD_ROOT{/etc/{rc.d/init.d/%{name}-fpm,logrotate.d/%{name}-fpm},%{_sysconfdir}/php-fpm.conf,%{_sysconfdir}/fpm.d/www.conf}
%endif
# ensure that paths are correct for current php version and arch
grep -El '/etc/php/|/usr/lib/php/' $RPM_BUILD_ROOT%{_sysconfdir}/*.ini | xargs -r \
%{__sed} -i -e '
- s#/usr/lib/php#%{php_extensiondir}#
- s#/etc/php#%{_sysconfdir}#
+ s#/usr/lib/php#%{php_extensiondir}#g
+ s#/etc/php/#%{_sysconfdir}/#g
'
install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
[ ! -f /etc/httpd/conf.d/??_mod_php.conf ] || %service -q httpd restart
-%triggerpostun common -- php-common < 4:5.3.28-7
+%triggerpostun common -- %{name}-common < 4:5.6.4-2, php-common < 4:5.6.4-2
# migrate configs /etc/php/conf.d -> /etc/phpXY/conf.d/
# do config migration in php-common trigger, as the trigger is ran after all packages are upgraded
# this way we can stick to one trigger, instead of attaching one for each (sub)package!
s#/etc/php#%{_sysconfdir}#
' $nf
done
-
-%triggerpostun common -- %{name}-common < 4:5.6.4-2, php-common < 4:5.6.4-2
# switch to browscap package if the ini file has original value
%{__sed} -i -e 's#%{_sysconfdir}/browscap.ini#/usr/share/browscap/php_browscap.ini#' %{_sysconfdir}/php.ini
# disable browscap, if optional package not present
%files -n apache-mod_%{name}
%defattr(644,root,root,755)
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/httpd/conf.d/*_mod_php.conf
+%attr(755,root,root) %{_libdir}/apache/mod_php.so
+
+%files -n apache-mod_%{name}-core
+%defattr(644,root,root,755)
%dir %{_sysconfdir}/apache2handler.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache2handler.ini
-%attr(755,root,root) %{_libdir}/apache/mod_php.so
%attr(755,root,root) %{_libdir}/apache/libphp5-*.*.so
%endif
%files common
%defattr(644,root,root,755)
-%doc CREDITS EXTENSIONS LICENSE NEWS README.namespaces UPGRADING* Zend/{LICENSE.Zend,ZEND_CHANGES} php.ini-*
+%doc CREDITS EXTENSIONS LICENSE NEWS README.namespaces UPGRADING* Zend/{LICENSE.Zend,ZEND_CHANGES} php.ini-* .gdbinit
%dir %{_sysconfdir}
%dir %{_sysconfdir}/conf.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini