X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=php.spec;h=510971195a8d70fe372e00cf95c7d753ed2b94f7;hb=refs%2Fheads%2FPHP_7_2;hp=46a951f87cd5224b2fd11b247b81b99c99b3c570;hpb=5e509f37a251c8d66e5e39a1e506c3d5487c9331;p=packages%2Fphp.git diff --git a/php.spec b/php.spec index 46a951f..5109711 100644 --- a/php.spec +++ b/php.spec @@ -1,39 +1,12 @@ -# 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.0/UPGRADING -# TODO 5.6: -# - enable --with-fpm-systemd, but ensure it checks for sd_booted() -# 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 -# 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 -# - 2.3M fileinfo.so php-fileinfo-5.3.16-1.x86_64 -# - 13K fileinfo.so php-pecl-fileinfo-1.0.4-8.amd64 -# - ttyname_r() misdetected http://bugs.php.net/bug.php?id=48820 -# - wddx: restore session support (not compiled in due DL extension check) -# - modularize standard (output from pure php -m)? -# - some mods should be shared: -#$ php -m -# [PHP Modules] -# Core -# date -# libxml -# Reflection -# standard -# # Conditional build: # - General options: %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 @@ -93,13 +66,13 @@ %bcond_without wddx # without WDDX extension module %bcond_without xmlrpc # without XML-RPC extension module %bcond_without xsl # without xsl extension module +%bcond_without zip # without zip 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_without system_gd # system gd -%bcond_without system_libzip # system libzip %bcond_without webp # Without WebP support in GD extension (imagecreatefromwebp) %define apxs1 /usr/sbin/apxs1 @@ -146,7 +119,7 @@ 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.25 +Version: 7.2.34 Release: 1 Epoch: 4 # All files licensed under PHP version 3.01, except @@ -155,7 +128,7 @@ Epoch: 4 License: PHP 3.01 and Zend and BSD Group: Libraries Source0: http://php.net/distributions/%{orgname}-%{version}.tar.xz -# Source0-md5: 50648a305a247164023f1fbe8e4d58d8 +# Source0-md5: adb64072b9b7e4634844a72512239a34 Source1: opcache.ini Source2: %{orgname}-mod_php.conf Source3: %{orgname}-cgi-fcgi.ini @@ -197,7 +170,6 @@ Patch41: %{orgname}-fpm-config.patch Patch42: %{orgname}-fpm-shared.patch Patch43: %{orgname}-silent-session-cleanup.patch Patch44: %{orgname}-include_path.patch -Patch47: suhosin.patch Patch50: extension-shared-optional-dep.patch Patch51: spl-shared.patch Patch52: pcre-shared.patch @@ -223,8 +195,6 @@ 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 %endif @@ -237,20 +207,22 @@ BuildRequires: gmp-devel >= 4.2 %{?with_imap:BuildRequires: imap-devel >= 1:2007e-2} %{?with_gcov:BuildRequires: lcov} %{?with_fpm:BuildRequires: libapparmor-devel} +%{?with_argon2:BuildRequires: libargon2-devel >= 20161029} %{?with_intl:BuildRequires: libicu-devel >= 4.4} BuildRequires: libjpeg-devel BuildRequires: libltdl-devel >= 1.4 BuildRequires: libpng-devel >= 1.0.8 +%{?with_sodium:BuildRequires: libsodium-devel >= 1.0.8} %{?with_intl:BuildRequires: libstdc++-devel} %{?with_webp:BuildRequires: libwebp-devel} BuildRequires: libtool >= 2:2.4.6 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_zip:BuildRequires: libzip-devel >= 1.3.1} %{?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} BuildRequires: oniguruma-devel %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} @@ -287,7 +259,7 @@ BuildRequires: apr-util-devel >= 1:1.0.0 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define php_sysconfdir /etc/%{name} -%define php_extensiondir %{_libdir}/%{name} +%define php_extensiondir %{_libdir}/php/%{name} %define php_datadir /usr/share/php/%{name} %define _sysconfdir %{php_sysconfdir} @@ -311,7 +283,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %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 @@ -376,21 +348,34 @@ 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 -PHP jako moduł DSO (Dynamic Shared Object) dla Apache 2.x. +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: PHP for litespeed HTTP server @@ -1891,7 +1876,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_zip:Requires: libzip >= 1.3.1} Provides: php(zip) = %{zipver} Obsoletes: php-pecl-zip < %{zipver} Obsoletes: php-zip < 4:5.3.28-7 @@ -1953,9 +1938,6 @@ cp -p php.ini-production php.ini %endif %patch43 -p1 %patch44 -p1 -%if %{with suhosin} -%patch47 -p1 -%endif %patch50 -p1 %patch51 -p1 -b .spl-shared %patch52 -p1 -b .pcre-shared @@ -2172,6 +2154,11 @@ 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="$CXXFLAGS -std=c++11" +%endif + sapis=" cli %if %{with cgi} @@ -2243,7 +2230,7 @@ for sapi in $sapis; do --with-config-file-scan-dir=%{_sysconfdir}/conf.d \ --with-system-tzdata \ %{?with_argon2:--with-password-argon2} \ - --%{!?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} \ @@ -2339,8 +2326,7 @@ for sapi in $sapis; do %{?with_xsl:--with-xsl=shared} \ --with-zlib=shared \ --with-zlib-dir=shared,/usr \ - %{?with_system_libzip:--with-libzip} \ - --enable-zip=shared,/usr \ + %{?with_zip:--enable-zip=shared,/usr --with-libzip} \ # save for debug cp -f Makefile Makefile.$sapi @@ -2422,6 +2408,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" @@ -2493,7 +2481,7 @@ install -d $RPM_BUILD_ROOT{%{_libdir}/{php,apache{,1}},%{_sysconfdir}/{apache,cg cp -pf php_config.h.cli main/php_config.h cp -pf Makefile.cli Makefile %{__make} install \ - phpbuilddir=%{_libdir}/%{name}/build \ + phpbuilddir=%{_libdir}/php/php%{php_suffix}/build \ INSTALL_ROOT=$RPM_BUILD_ROOT # version the .phar files @@ -2618,17 +2606,17 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cgi-fcgi,cli,apache,apache2handler}.d %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/{conf.d/readline.ini,cli.d} # use system automake and {lib,sh}tool -ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_libdir}/%{name}/build -ln -snf %{_bindir}/shtool $RPM_BUILD_ROOT%{_libdir}/%{name}/build +ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_libdir}/php/php%{php_suffix}/build +ln -snf %{_bindir}/shtool $RPM_BUILD_ROOT%{_libdir}/php/php%{php_suffix}/build for fn in libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4; do f=%{_aclocaldir}/$fn test -f $f || continue - ln -snf $f $RPM_BUILD_ROOT%{_libdir}/%{name}/build + ln -snf $f $RPM_BUILD_ROOT%{_libdir}/php/php%{php_suffix}/build done for fn in ltmain.sh config/ltmain.sh build-aux/ltmain.sh; do f=/usr/share/libtool/$fn test -f $f || continue - ln -snf $f $RPM_BUILD_ROOT%{_libdir}/%{name}/build + ln -snf $f $RPM_BUILD_ROOT%{_libdir}/php/php%{php_suffix}/build break done sed -i -e '/^phpdir/ s,/php/build,/%{name}/build,' $RPM_BUILD_ROOT%{_bindir}/phpize%{php_suffix} @@ -2645,7 +2633,7 @@ cp -a tests/* $RPM_BUILD_ROOT%{php_datadir}/tests/php # fix install paths, avoid evil rpaths sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_common%{php_suffix}.la # better solution? -sed -i -e 's|libphp_common.la|$(libdir)/libphp_common%{php_suffix}.la|' $RPM_BUILD_ROOT%{_libdir}/%{name}/build/acinclude.m4 +sed -i -e 's|libphp_common.la|$(libdir)/libphp_common%{php_suffix}.la|' $RPM_BUILD_ROOT%{_libdir}/php/php%{php_suffix}/build/acinclude.m4 %clean rm -rf $RPM_BUILD_ROOT @@ -2869,9 +2857,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/libphp%{php_suffix}.so %endif @@ -2954,7 +2945,7 @@ fi %attr(755,root,root) %{_libdir}/libphp_common%{php_suffix}.so %{_libdir}/libphp_common%{php_suffix}.la %{_includedir}/php/php%{php_suffix} -%{_libdir}/%{name}/build +%{_libdir}/php/php%{php_suffix}/build %{_mandir}/man1/php-config%{php_suffix}.1* %ghost %{_mandir}/man1/php-config.1* %{_mandir}/man1/phpize%{php_suffix}.1* @@ -3482,12 +3473,14 @@ fi %attr(755,root,root) %{php_extensiondir}/xsl.so %endif +%if %{with zip} %files zip %defattr(644,root,root,755) %doc ext/zip/{CREDITS,TODO} %doc ext/zip/examples %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/zip.ini %attr(755,root,root) %{php_extensiondir}/zip.so +%endif %files zlib %defattr(644,root,root,755)