X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=php.spec;h=32180713b674d3ba056097625eb5fc7dd9cc9660;hb=3d361464c42b23da98b3c8fac15757482b8b2fb6;hp=f3a22791c44e23cb6ccc7d20c3dc5db7442acb06;hpb=390923c4bf2abed4ad72b4b2046bbe9e4ff7ada5;p=packages%2Fphp.git diff --git a/php.spec b/php.spec index f3a2279..3218071 100644 --- a/php.spec +++ b/php.spec @@ -31,10 +31,10 @@ %bcond_without embed # disable building Embedded API %bcond_with gcov # Enable Code coverage reporting %bcond_without kerberos5 # without Kerberos5 support -%bcond_with suhosin # with suhosin patch, has little point in PHP>=5.3, see https://github.com/stefanesser/suhosin/issues/42#issuecomment-41728178 %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 apache2 # disable building Apache 2.x SAPI %bcond_without cgi # disable CGI/FCGI SAPI @@ -150,16 +150,16 @@ Summary(pt_BR.UTF-8): A linguagem de script PHP Summary(ru.UTF-8): PHP Версии 7 - язык препроцессирования HTML-файлов, выполняемый на сервере Summary(uk.UTF-8): PHP Версії 7 - мова препроцесування HTML-файлів, виконувана на сервері Name: %{orgname}%{php_suffix} -Version: 7.1.1 -Release: 2 +Version: 7.1.33 +Release: 6 Epoch: 4 # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD License: PHP 3.01 and Zend and BSD Group: Libraries -Source0: http://php.net/distributions/%{orgname}-%{version}.tar.xz -# Source0-md5: 65eef256f6e7104a05361939f5e23ada +Source0: https://php.net/distributions/%{orgname}-%{version}.tar.xz +# Source0-md5: b27bb5ce72995bc0ea56276e156be889 Source2: %{orgname}-mod_php.conf Source3: %{orgname}-cgi-fcgi.ini Source4: %{orgname}-apache.ini @@ -194,9 +194,6 @@ Patch27: %{orgname}-config-dir.patch Patch29: %{orgname}-fcgi-graceful.patch Patch31: %{orgname}-fcgi-error_log-no-newlines.patch Patch34: %{orgname}-libtool.patch -#Patch36: %{orgname}-mysql-charsetphpini.patch -#Patch37: %{orgname}-mysqli-charsetphpini.patch -#Patch38: %{orgname}-pdo_mysql-charsetphpini.patch Patch39: %{orgname}-use-prog_sendmail.patch Patch41: %{orgname}-fpm-config.patch Patch42: %{orgname}-fpm-shared.patch @@ -204,7 +201,6 @@ Patch43: %{orgname}-silent-session-cleanup.patch Patch44: %{orgname}-include_path.patch Patch45: %{orgname}-imap-annotations.patch Patch46: %{orgname}-imap-myrights.patch -Patch47: suhosin.patch Patch50: extension-shared-optional-dep.patch Patch51: spl-shared.patch Patch52: pcre-shared.patch @@ -218,11 +214,11 @@ Patch66: php-db.patch Patch67: mysql-lib-ver-mismatch.patch # https://bugs.php.net/bug.php?id=68344 Patch68: php-mysql-ssl-context.patch -Patch69: fpm-conf-split.patch Patch70: mysqlnd-ssl.patch Patch71: libdb-info.patch Patch72: phar-hash-shared.patch -Patch73: php-pdo-ssl.patch +Patch73: icu69.patch +Patch74: openssl.patch URL: http://php.net/ %{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}} %{?with_pspell:BuildRequires: aspell-devel >= 2:0.50.0} @@ -265,8 +261,8 @@ BuildRequires: libxslt-devel >= 1.1.0 %{?with_system_libzip:BuildRequires: libzip-devel >= 0.10.1-2} %{?with_snmp:%{?with_tests:BuildRequires: mibs-net-snmp}} %{?with_mm:BuildRequires: mm-devel >= 1.3.0} -%{!?with_pdo_mysql:BuildRequires: mysql-devel} %{!?with_mysqli:BuildRequires: mysql-devel >= 4.1.13} +%{!?with_pdo_mysql:BuildRequires: mysql-devel} %{?with_snmp:BuildRequires: net-snmp-devel >= 5.3} %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} %if %{with openssl} || %{with ldap} @@ -313,18 +309,18 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # Extension versions %define bz2ver 1.0 -%define enchantver 1.1.0 +%define enchantver %{version} %define fileinfover 1.0.5 %define hashver 1.0 %define intlver 1.1.0 %define jsonver 1.5.0 %define pharver 2.0.2 -%define sqlite3ver 0.7-dev +%define sqlite3ver %{version} %define zipver 1.13.5 %define phpdbgver 0.5.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 @@ -389,20 +385,33 @@ PHP - це мова написання скриптів, що вбудовуют використання PHP - заміна для CGI скриптів. %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: %{name}-common = %{epoch}:%{version}-%{release} -Requires: apache(modules-api) = %{apache_modules_api} -Requires: apache-mod_mime +Requires: apache-mod_%{name}-core = %{epoch}:%{version}-%{release} 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 @@ -471,8 +480,18 @@ Summary: /usr/bin/php symlink 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 +Obsoletes: php52-program +Obsoletes: php53-program +Obsoletes: php54-program +Obsoletes: php55-program +Obsoletes: php56-program +Obsoletes: php70-program +Obsoletes: php72-program +Obsoletes: php73-program +Obsoletes: php74-program +Obsoletes: php80-program %description program Package providing /usr/bin/php symlink to PHP CLI. @@ -618,6 +637,8 @@ Obsoletes: php54-devel Obsoletes: php55-devel Obsoletes: php56-devel Obsoletes: php70-devel +Obsoletes: php72-devel +Obsoletes: php73-devel %description devel The php-devel package lets you compile dynamic extensions to PHP. @@ -1969,7 +1990,7 @@ Moduł PHP umożliwiający używanie kompresji zlib. cp -p php.ini-production php.ini %patch0 -p1 %patch1 -p1 -#%patch2 -p1 NEEDS PORTING +%patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 @@ -1993,35 +2014,13 @@ cp -p php.ini-production php.ini %if "%{pld_release}" != "ac" %patch34 -p1 %endif -#%patch36 -p1 -#%patch37 -p1 -#%patch38 -p1 %patch39 -p1 -%if %{with fpm} -%if 0 -# create split php-fpm.conf patch. review (restore other diffs) and commit -cp sapi/fpm/php-fpm.conf.in{,.orig} -%{__sed} -n -e '/; Start a new pool named/,$p' sapi/fpm/php-fpm.conf.in > sapi/fpm/php-fpm.conf-d.in -%{__sed} -i -e '/; Include one or more files/,/include=etc\/fpm\.d/d' sapi/fpm/php-fpm.conf.in -%{__sed} -i -e '/; Start a new pool named/,$d' sapi/fpm/php-fpm.conf.in -set +e -cd .. -diff -u %{orgname}-%{version}/sapi/fpm/php-fpm.conf.in{.orig,} > %{PATCH69} -diff -u /dev/null %{orgname}-%{version}/sapi/fpm/php-fpm.conf-d.in >> %{PATCH69} -exit 1 -%else -#%patch69 -p1 -%endif %patch41 -p1 %patch42 -p1 -%endif %patch43 -p1 %patch44 -p1 #%patch45 -p1 # imap annotations. fixme #%patch46 -p1 # imap myrights. fixme -%if %{with suhosin} -%patch47 -p1 -%endif %patch50 -p1 %patch51 -p1 %patch52 -p1 @@ -2039,6 +2038,10 @@ exit 1 %patch71 -p1 %patch72 -p1 %patch73 -p1 +%patch74 -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 @@ -2179,8 +2182,8 @@ if test "$ver" != "%{pharver}"; then : Update the pharver macro and rebuild. exit 1 fi -ver=$(sed -n '/#define PHP_SQLITE3_VERSION/{s/.* "//;s/".*$//;p}' ext/sqlite3/php_sqlite3.h) -if test "$ver" != "%{sqlite3ver}"; then +ver=$(awk '/#define PHP_SQLITE3_VERSION/ {print $3}' ext/sqlite3/php_sqlite3.h | xargs) +if test "$ver" != "PHP_VERSION"; then : Error: Upstream Sqlite3 version is now ${ver}, expecting %{sqlite3ver}. : Update the sqlite3ver macro and rebuild. exit 1 @@ -2209,10 +2212,8 @@ if test "$ver" != "%{bz2ver}"; then : Update the bz2ver macro and rebuild. exit 1 fi -ver=$(sed -n '/#define PHP_ENCHANT_VERSION /{s/.* "//;s/".*$//;p}' ext/enchant/php_enchant.h) -if test "$ver" != "%{enchantver}"; then - : Error: Upstream Enchant version is now ${ver}, expecting %{enchantver}. - : Update the enchantver macro and rebuild. +ver=$(awk '/#define PHP_ENCHANT_VERSION/ {print $3}' ext/enchant/php_enchant.h | xargs) +if test "$ver" != "PHP_VERSION"; then exit 1 fi ver=$(awk '/#define PHP_HASH_VERSION/ {print $3}' ext/hash/php_hash.h | xargs) @@ -2242,6 +2243,10 @@ fi export PROG_SENDMAIL="/usr/lib/sendmail" export CPPFLAGS="-DDEBUG_FASTCGI -DHAVE_STRNDUP %{rpmcppflags} \ -I%{_includedir}/xmlrpc-epi" +%if %{with intl} +# icu 59+ C++ API requires C++ >= 11 +CXXFLAGS="%{rpmcxxflags} -std=c++11" +%endif sapis=" cli @@ -2314,7 +2319,7 @@ for sapi in $sapis; do --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} \ @@ -2493,6 +2498,8 @@ generate_inifiles() { [ "$mod" = "spl" ] && conf="SPL.ini" # session needs to be loaded before php-pecl-http, php-pecl-memcache, php-pecl-session_mysql [ "$mod" = "session" ] && conf="Session.ini" + # hash needs to be loaded before mysqlnd + [ "$mod" = "hash" ] && conf="Hash.ini" # mysqlnd needs to be loaded before mysqli,pdo_mysqli [ "$mod" = "mysqlnd" ] && conf="MySQLND.ini" echo "+ $conf" @@ -2781,7 +2788,7 @@ fi [ ! -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! @@ -2801,8 +2808,6 @@ for f in /etc/php/*.ini.rpmsave /etc/php/*.d/*.ini.rpmsave; do 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 @@ -2921,9 +2926,12 @@ fi %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/libphp7-*.*.so %endif @@ -2991,7 +2999,7 @@ fi %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 @@ -3136,7 +3144,7 @@ fi %files hash %defattr(644,root,root,755) %doc ext/hash/{CREDITS,README} -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/hash.ini +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/Hash.ini %attr(755,root,root) %{php_extensiondir}/hash.so %endif