X-Git-Url: http://git.pld-linux.org/?p=packages%2Fphp.git;a=blobdiff_plain;f=php.spec;h=5ac19d5ca5513b353dbf64547cd850ddae7db408;hp=c7f52bbea5ab42b56c4050527bd9dac6bbb468bf;hb=95aa0e1;hpb=0e0c60b80d4a1df0b6a0cc4755a720ffa0508c37 diff --git a/php.spec b/php.spec index c7f52bb..5ac19d5 100644 --- a/php.spec +++ b/php.spec @@ -28,7 +28,8 @@ # Conditional build: %bcond_with fdf # with FDF (PDF forms) module (BR: proprietary lib) %bcond_with interbase_inst # use InterBase install., not Firebird (BR: proprietary libs) -%bcond_with oci8 # with Oracle oci8 extension module (BR: proprietary libs) +%bcond_with oci # with Oracle oci8 extension module (BR: proprietary libs) +%bcond_without instantclient # build Oracle oci8 extension module against oracle-instantclient package %bcond_with system_gd # with system gd (we prefer internal since it enables few more features) %bcond_with system_libzip # with system libzip (reported broken: https://bugs.php.net/bug.php?id=60100) %bcond_with gd_jis_conv # causes imagettfbbox(): any2eucjp(): invalid code in input string when internal gd used @@ -76,7 +77,7 @@ %undefine with_mm %endif -%ifnarch %{ix86} %{x8664} sparc sparcv9 alpha ppc +%ifnarch %{ix86} %{x8664} x32 sparc sparcv9 alpha ppc %undefine with_interbase %endif %if "%{pld_release}" == "th" @@ -86,7 +87,7 @@ %endif %endif -%ifnarch %{ix86} %{x8664} +%ifnarch %{ix86} %{x8664} x32 # unsupported, see sapi/cgi/fpm/fpm_atomic.h %undefine with_fpm %endif @@ -103,15 +104,15 @@ ERROR: You need to select at least one Apache SAPI to build shared modules. %if "%{pld_release}" == "ac" %define magic_mime /usr/share/file/magic.mime %define _noautoreqdep libphp_common.* -# if commandline --without was given. respect that -%if 0%{!?_without_default_php:1} -%define with_default_php 1 +# if commandline --with was given. respect that +%if 0%{!?_with_default_php:1} +%undefine with_default_php %endif %else %define magic_mime /usr/share/misc/magic.mime %endif -%define rel 3 +%define rel 12 %define orgname php %define ver_suffix 52 %define php_suffix %{!?with_default_php:%{ver_suffix}} @@ -126,7 +127,10 @@ Name: %{orgname}%{php_suffix} Version: 5.2.17 Release: %{backport_date}.%{rel} Epoch: 4 -License: PHP +# 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://www.php.net/distributions/%{orgname}-%{version}.tar.bz2 # Source0-md5: b27947f3045220faf16e4d9158cbfe13 @@ -135,8 +139,6 @@ Source3: %{orgname}-cgi-fcgi.ini Source4: %{orgname}-cgi.ini Source5: %{orgname}-apache.ini Source6: %{orgname}-cli.ini -# Taken from: http://browsers.garykeith.com/downloads.asp -Source8: %{orgname}_browscap.ini # lynx -dump ftp://distfiles.gentoo.org/pub/gentoo/distfiles/|grep -o ftp://.*php-patchset.*tar.bz2 #Source9: ftp://distfiles.gentoo.org/pub/gentoo/distfiles/%{orgname}-patchset-%{version}-r1.tar.bz2 ## Source9-md5: d67f23f5e69664e06fce89b064d5bbab @@ -215,6 +217,11 @@ Patch69: bug-50563.patch Patch70: php-crypt-null.patch Patch71: php-apache24.patch Patch72: exif-crash-bug-36.patch +Patch73: CVE-2013-6420.patch +Patch74: CVE-2013-4073.patch +Patch75: php-secbug-67498.patch +Patch76: CVE-2015-0232.patch +Patch77: x32.patch # CENTALT patches # Backport from 5.3.6 Patch311: php-5.3.6-bug-47435.patch @@ -267,17 +274,18 @@ BuildRequires: libwrap-devel BuildRequires: libxml2-devel >= 1:2.7.6-4 BuildRequires: libxslt-devel >= 1.1.0 %{?with_mhash:BuildRequires: mhash-devel} +%{?with_snmp:%{?with_tests:BuildRequires: mibs-net-snmp}} %{?with_ming:BuildRequires: ming-devel >= 0.3} %{?with_mm:BuildRequires: mm-devel >= 1.3.0} BuildRequires: mysql-devel >= 4.0.0 %{?with_mysqli:BuildRequires: mysql-devel >= 4.1} BuildRequires: ncurses-ext-devel +%{?with_snmp:BuildRequires: net-snmp-devel >= 5.0.7} %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} %if %{with openssl} || %{with ldap} BuildRequires: openssl-devel >= 0.9.7d %endif -%{?with_snmp:BuildRequires: net-snmp-devel >= 5.0.7} -%{?with_snmp:%{?with_tests:mibs-net-snmp}} +%{?with_oci:%{?with_instantclient:BuildRequires: oracle-instantclient-devel}} BuildRequires: pam-devel %{?with_pcre:BuildRequires: pcre-devel >= 6.6} BuildRequires: pkgconfig @@ -319,7 +327,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define zend_zts %{!?with_zts:0}%{?with_zts:1} %define php_debug %{!?debug:0}%{?debug:1} -%if %{with oci8} +%if %{with oci} # ORACLE_HOME is required for oci8 ext to build %define _preserve_env %_preserve_env_base ORACLE_HOME %endif @@ -534,6 +542,7 @@ Requires: %{name}-spl = %{epoch}:%{version}-%{release} %endif %{!?with_mysqlnd:Obsoletes: php-mysqlnd} %{?with_pcre:%requires_ge_to pcre pcre-devel} +Suggests: browscap Obsoletes: php-pecl-domxml Conflicts: php-pecl-memcache < 3.0.4-2 Conflicts: php4-common < 3:4.4.4-8 @@ -575,6 +584,9 @@ Obsoletes: php-pear-devel Obsoletes: php4-devel Obsoletes: php53-devel Obsoletes: php54-devel +Obsoletes: php55-devel +Obsoletes: php56-devel +Obsoletes: php70-devel %description devel The php-devel package lets you compile dynamic extensions to PHP. @@ -1930,6 +1942,11 @@ done %patch70 -p1 %patch71 -p1 %patch72 -p1 +%patch73 -p1 +%patch74 -p1 +%patch75 -p1 +%patch76 -p1 +%patch77 -p1 # Bugfix backport from 5.3.6 %patch311 -p1 -b .bug-47435 @@ -2095,7 +2112,7 @@ for sapi in $sapis; do --with-pdo-firebird=shared,/usr \ %endif --with-pdo-mysql=shared \ - %{?with_oci8:--with-pdo-oci=shared} \ + %{?with_oci:--with-pdo-oci=shared%{?with_instantclient:,instantclient,%{_libdir}}} \ %{?with_odbc:--with-pdo-odbc=shared,unixODBC,/usr} \ %{?with_pgsql:--with-pdo-pgsql=shared} \ %{?with_sqlite:--with-pdo-sqlite=shared,/usr} \ @@ -2143,7 +2160,7 @@ for sapi in $sapis; do --with-mysql-sock=/var/lib/mysql/mysql.sock \ %{?with_mysqli:--with-mysqli=shared} \ --with-ncurses=shared \ - %{?with_oci8:--with-oci8=shared} \ + %{?with_oci:--with-oci8=shared%{?with_instantclient:,instantclient,%{_libdir}}} \ %{?with_openssl:--with-openssl=shared} \ --with-kerberos \ %{!?with_pcre:--without-pcre-regex}%{?with_pcre:--with-pcre-regex=shared,/usr} \ @@ -2294,7 +2311,7 @@ install -d $RPM_BUILD_ROOT{%{_libdir}/{php,apache{,1}},%{_sysconfdir}/{apache,cg $RPM_BUILD_ROOT%{_mandir}/man1 \ # install the Apache modules' files -%{__make} install-headers install-build install-modules install-programs \ +%{__make} -j1 install-headers install-build install-modules install-programs \ phpbuilddir=%{_libdir}/%{name}/build \ INSTALL_ROOT=$RPM_BUILD_ROOT @@ -2362,7 +2379,6 @@ install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/php-cgi-fcgi.ini %endif install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/php-cgi.ini install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini -install %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/browscap.ini %if %{with apache1} install %{SOURCE2} $RPM_BUILD_ROOT/etc/apache/conf.d/70_mod_php.conf @@ -2393,17 +2409,19 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cgi,cli,cgi-fcgi,apache,apache2handler mv $RPM_BUILD_ROOT%{_sysconfdir}/{conf.d/{ncurses,readline}.ini,cli.d} # use system automake and {lib,sh}tool -%if "%{pld_release}" != "ac" - ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_libdir}/%{name}/build - for i in libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4; do - ln -snf %{_aclocaldir}/${i} $RPM_BUILD_ROOT%{_libdir}/%{name}/build - done - ln -snf %{_datadir}/libtool/config/ltmain.sh $RPM_BUILD_ROOT%{_libdir}/%{name}/build -%else - ln -snf %{_aclocaldir}/libtool.m4 $RPM_BUILD_ROOT%{_libdir}/%{name}/build - ln -snf %{_datadir}/libtool/ltmain.sh $RPM_BUILD_ROOT%{_libdir}/%{name}/build -%endif +ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_libdir}/%{name}/build ln -snf %{_bindir}/shtool $RPM_BUILD_ROOT%{_libdir}/%{name}/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 +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 + break +done sed -i -e '/^phpdir/ s,/php/build,/%{name}/build,' $RPM_BUILD_ROOT%{_bindir}/phpize # as a result of ext/pcre/pcrelib removal in %%prep, ext/pcre/php_pcre.h @@ -2483,6 +2501,14 @@ 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 -- %{name}-common < 4:5.2.17-20130717.9, php-common < 4:5.2.17-20130717.9 +# 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 +if [ ! -e /usr/share/browscap/php_browscap.ini ]; then + %{__sed} -i -e 's#^browscap = /usr/share/browscap/php_browscap.ini#;&#' %{_sysconfdir}/php.ini +fi + # common macros called at extension post/postun scriptlet %define extension_scripts() \ %post %1 \ @@ -2633,7 +2659,6 @@ fi %dir %{_sysconfdir} %dir %{_sysconfdir}/conf.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/browscap.ini %attr(755,root,root) %{_libdir}/libphp_common-*.so %dir %{php_extensiondir} @@ -2827,7 +2852,7 @@ fi %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cli.d/ncurses.ini %attr(755,root,root) %{php_extensiondir}/ncurses.so -%if %{with oci8} +%if %{with oci} %files oci8 %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/oci8.ini @@ -2884,7 +2909,7 @@ fi %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/pdo_mysql.ini %attr(755,root,root) %{php_extensiondir}/pdo_mysql.so -%if %{with oci8} +%if %{with oci} %files pdo-oci %defattr(644,root,root,755) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/pdo_oci.ini