X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=php.spec;h=2471a40f67bf8c8b3ebc5bd78c31a7e2d151b129;hb=3afe3f8ce15764072577e63e758c9faf5fb63a5e;hp=1c8fefa605e536b7dc2169439c1f4871da029f68;hpb=3f3d696952c5ab61efe3f4e80c37a1d88a1fc0d5;p=packages%2Fphp.git diff --git a/php.spec b/php.spec index 1c8fefa..2471a40 100644 --- a/php.spec +++ b/php.spec @@ -1,14 +1,13 @@ +# NOTES +# - mysqlnd driver doesn't support reconnect: https://bugs.php.net/bug.php?id=52561 # TODO 7.2: -# - https://github.com/php/php-src/blob/php-7.2.0alpha3/UPGRADING -# - --with-password-argon2 https://wiki.php.net/rfc/argon2_password_hash +# - https://github.com/php/php-src/blob/php-7.2.0/UPGRADING # TODO 5.6: # - enable --with-fpm-systemd, but ensure it checks for sd_booted() -# - build with system libgd 2.1, see 73c5128 # TODO 5.4: # - update imap annotations patch (needs api porting) # - 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. # 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 @@ -37,6 +36,7 @@ %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 @@ -97,10 +97,11 @@ %bcond_without xmlrpc # without XML-RPC extension module %bcond_without xsl # without xsl extension module # extensions options +%bcond_without argon2 # argon2 password hashing %bcond_without instantclient # build Oracle oci8 extension module against oracle-instantclient package %bcond_with interbase_inst # use InterBase install., not Firebird (BR: proprietary libs) %bcond_with mm # without mm support for session storage -%bcond_with system_gd # with system gd (imageantialias function is missing then) +%bcond_without system_gd # system gd %bcond_without system_libzip # system libzip %bcond_without webp # Without WebP support in GD extension (imagecreatefromwebp) @@ -143,7 +144,6 @@ %undefine with_filter %endif -%define subver beta3 %define orgname php %define ver_suffix 72 %define php_suffix %{!?with_default_php:%{ver_suffix}} @@ -154,17 +154,17 @@ 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.2.0 -Release: 0.13 +Version: 7.2.13 +Release: 1 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: https://php.net/distributions/%{orgname}-%{version}.tar.xz -Source0: https://downloads.php.net/~remi/php-%{version}%{subver}.tar.xz -# Source0-md5: fb658ee432cff906bd16aabc682caf27 +Source0: https://php.net/distributions/%{orgname}-%{version}.tar.xz +# Source0-md5: 777c170cc2a96a272b11e4c00365e4bc +Source1: opcache.ini Source2: %{orgname}-mod_php.conf Source3: %{orgname}-cgi-fcgi.ini Source4: %{orgname}-apache.ini @@ -233,6 +233,7 @@ BuildRequires: db-devel >= 4.0 BuildRequires: elfutils-devel %{?with_enchant:BuildRequires: enchant-devel >= 1.1.3} %{?with_kerberos5:BuildRequires: heimdal-devel} +%{?with_argon2:BuildRequires: libargon2-devel >= 20161029} %{?with_sodium:BuildRequires: libsodium-devel >= 1.0.8} %if %{with pdo_dblib} BuildRequires: freetds-devel >= 0.82 @@ -259,12 +260,13 @@ BuildRequires: libtool >= 1.4.3 %endif BuildRequires: libxml2-devel >= 1:2.7.6-4 %{?with_xsl:BuildRequires: libxslt-devel >= 1.1.0} -%{?with_system_libzip:BuildRequires: libzip-devel >= 1.2.0} +%{?with_system_libzip:BuildRequires: libzip-devel >= 1.3.1} %{?with_snmp:%{?with_tests:BuildRequires: mibs-net-snmp}} %{?with_mm:BuildRequires: mm-devel >= 1.3.0} %{!?with_mysqli:BuildRequires: mysql-devel >= 4.1.13} %{!?with_pdo_mysql:BuildRequires: mysql-devel} %{?with_snmp:BuildRequires: net-snmp-devel >= 5.3} +BuildRequires: oniguruma-devel %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} %if %{with openssl} || %{with ldap} BuildRequires: openssl-devel >= 1.0.1 @@ -310,19 +312,19 @@ 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.6.0 %define pharver 2.0.2 %define sqlite3ver %{version} -%define zipver 1.15.1 +%define zipver 1.15.4 %define phpdbgver 0.5.0 %define sodiumver %{version} %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 @@ -629,6 +631,8 @@ Obsoletes: php54-devel Obsoletes: php55-devel Obsoletes: php56-devel Obsoletes: php70-devel +Obsoletes: php71-devel +Obsoletes: php73-devel %description devel The php-devel package lets you compile dynamic extensions to PHP. @@ -1940,7 +1944,7 @@ Summary(pl.UTF-8): Zarządzanie archiwami zip Group: Libraries URL: http://php.net/manual/en/book.zip.php Requires: %{name}-common = %{epoch}:%{version}-%{release} -%{?with_system_libzip:Requires: libzip >= 1.2.0} +%{?with_system_libzip:Requires: libzip >= 1.3.1} Provides: php(zip) = %{zipver} Obsoletes: php-pecl-zip < %{zipver} Obsoletes: php-zip < 4:5.3.28-7 @@ -1973,7 +1977,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 @@ -2005,19 +2009,21 @@ cp -p php.ini-production php.ini #%patch45 -p1 # imap annotations. fixme #%patch46 -p1 # imap myrights. fixme %patch50 -p1 -%patch51 -p1 +%patch51 -p1 -b .spl-shared %patch52 -p1 -b .pcre-shared %patch53 -p1 %undos ext/spl/tests/SplFileInfo_getInode_basic.phpt %patch55 -p1 -%patch59 -p1 -%patch60 -p1 +%patch59 -p1 -b .systzdata +%if %{with instantclient} +%patch60 -p1 -b .instantclient +%endif %patch66 -p1 %patch67 -p1 #%patch68 -p1 DROP or update to 7.0 APIs %patch70 -p1 %patch71 -p1 -%patch72 -p1 +%patch72 -p1 -b .phar-shared %{__sed} -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4 @@ -2040,7 +2046,7 @@ find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f #%{__rm} -r ext/dba/libinifile #%{__rm} -r ext/gd/libgd #%{__rm} -r ext/mbstring/libmbfl -#%{__rm} -r ext/mbstring/oniguruma +%{__rm} -r ext/mbstring/oniguruma %{__rm} -r ext/pcre/pcrelib #%{__rm} -r ext/soap/interop %{__rm} -r ext/xmlrpc/libxmlrpc @@ -2192,10 +2198,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) @@ -2301,7 +2305,8 @@ 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_argon2:--with-password-argon2} \ + --%{!?with_debug:dis}%{?with_debug:en}able-debug \ %{?with_zts:--enable-maintainer-zts} \ --enable-inline-optimization \ %{__enable_disable bcmath bcmath shared} \ @@ -2316,6 +2321,7 @@ for sapi in $sapis; do %{?with_intl:--enable-intl=shared} \ --enable-libxml \ %{__enable_disable mbstring mbstring shared,all} \ + --with-onig=/usr \ --enable-mbregex \ %{__enable_disable pcntl pcntl shared} \ %{__enable_disable pdo pdo shared} \ @@ -2479,6 +2485,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" @@ -2489,6 +2497,7 @@ generate_inifiles() { done } generate_inifiles +cp -p %{_sourcedir}/opcache.ini conf.d # Check that the module inner-dependencies are intact PHP=./sapi/cli/php EXTENSION_DIR=modules CONFIG_DIR=conf.d ./dep-tests.sh > dep-tests.log @@ -2980,7 +2989,7 @@ fi %files common %defattr(644,root,root,755) -%doc CREDITS EXTENSIONS LICENSE NEWS UPGRADING* Zend/{LICENSE.Zend,README*} php.ini-* +%doc CREDITS EXTENSIONS LICENSE NEWS UPGRADING* Zend/{LICENSE.Zend,README*} php.ini-* .gdbinit %dir %{_sysconfdir} %dir %{_sysconfdir}/conf.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini @@ -3125,7 +3134,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