]> git.pld-linux.org Git - packages/php.git/blobdiff - php.spec
set default php on for ac on this branch
[packages/php.git] / php.spec
index 2abb5c98d1153f215caf38690389c48b874eed88..7418199bdc9fc695b89fc167ac46a24ceb502d1a 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -1,4 +1,3 @@
-# NOTE: mysqlnd does not support ssl or compression (see FAQ at http://dev.mysql.com/downloads/connector/php-mysqlnd/)
 # UNPACKAGED EXTENSION NOTES:
 # - com_dotnet is Win32-only
 # TODO:
@@ -28,8 +27,8 @@
 #
 # Conditional build:
 %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    instantclient   # build Oracle oci8 extension module against oracle-instantclient package
+%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 currently)
 %bcond_with    default_php     # use this PHP as default PHP in distro
@@ -42,9 +41,8 @@
 %bcond_without litespeed       # build litespeed module
 %bcond_without ldap            # without LDAP extension module
 %bcond_without mhash           # without mhash extension (supported by hash extension)
-%bcond_without mm              # without mm support for session storage
+%bcond_with    mm              # without mm support for session storage
 %bcond_without mssql           # without MS SQL extension module
-# don't turn it on by default; see TODO item for mysqlnd in this spec
 %bcond_with    mysqlnd         # with mysqlnd support in mysql related extensions
 %bcond_without mysqli          # without mysqli support (Requires mysql > 4.1)
 %bcond_without odbc            # without ODBC extension module
@@ -68,7 +66,7 @@
 %bcond_without cgi             # disable CGI/FCGI SAPI
 %bcond_without fpm             # disable FPM
 %bcond_without embed           # disable Embedded API
-%bcond_without suhosin         # with suhosin patch
+%bcond_with    suhosin         # with suhosin patch
 %bcond_with    tests           # default off; test process very often hangs on builders, approx run time 45m; perform "make test"
 %bcond_with    gcov            # Enable Code coverage reporting
 %bcond_with    type_hints      # experimental support for strict typing/casting
 %undefine      with_mm
 %endif
 
-%ifnarch %{ix86} %{x8664} sparc sparcv9 alpha
+%ifnarch %{ix86} %{x8664} x32 sparc sparcv9 alpha
 # ppc disabled (broken on th-ppc)
 %undefine      with_interbase
 %endif
 
-%ifnarch %{ix86} %{x8664}
+%ifnarch %{ix86} %{x8664} x32
 # unsupported, see sapi/cgi/fpm/fpm_atomic.h
 %undefine      with_fpm
 %endif
@@ -113,13 +111,13 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
 
 %if "%{pld_release}" == "ac"
 %define                _noautoreqdep libphp_common.*
-# if commandline --with was given. respect that
-%if 0%{!?_with_default_php:1}
-%undefine      with_default_php
+# if commandline --without was given. respect that
+%if 0%{!?_without_default_php:1}
+%define                with_default_php        1
 %endif
 %endif
 
-%define                rel     11
+%define                rel     18
 %define                orgname php
 %define                ver_suffix 53
 %define                php_suffix %{!?with_default_php:%{ver_suffix}}
@@ -130,19 +128,20 @@ Summary(pt_BR.UTF-8):     A linguagem de script PHP
 Summary(ru.UTF-8):     PHP Версии 5 - язык препроцессирования HTML-файлов, выполняемый на сервере
 Summary(uk.UTF-8):     PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері
 Name:          %{orgname}%{php_suffix}
-Version:       5.3.28
+Version:       5.3.29
 Release:       %{rel}%{?with_type_hints:.th}%{?with_oci8:.oci}
 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: 56ff88934e068d142d6c0deefd1f396b
+# Source0-md5: 9469e240cbe6ac865aeaec89b253dd30
 Source2:       %{orgname}-mod_%{orgname}.conf
 Source3:       %{orgname}-cgi-fcgi.ini
 Source4:       %{orgname}-apache.ini
 Source5:       %{orgname}-cli.ini
-# Taken from: http://browsers.garykeith.com/downloads.asp
-Source9:       %{orgname}_browscap.ini
 Source10:      %{orgname}-fpm.init
 Source11:      %{orgname}-fpm.logrotate
 Source12:      %{orgname}-branch.sh
@@ -165,6 +164,7 @@ Patch11:    embed.patch
 %if %{with type_hints}
 Patch12:       http://ilia.ws/patch/type_hint_53_v2.txt
 %endif
+Patch13:       bug-test-pcntl-55479.patch
 Patch14:       %{orgname}-no_pear_install.patch
 Patch15:       %{orgname}-zlib.patch
 Patch17:       %{orgname}-readline.patch
@@ -208,8 +208,34 @@ Patch64:   %{orgname}-m4.patch
 Patch65:       system-libzip.patch
 Patch66:       %{orgname}-db.patch
 Patch67:       php-litespeed.patch
-Patch68:       mysql-lib-ver-mismatch.patch
+Patch68:       x32.patch
 Patch69:       fpm-conf-split.patch
+Patch70:       mysql-lib-ver-mismatch.patch
+# git clone git://github.com/php/php-src.git && git checkout PHP_5_6
+# git diff php-5.3.29..PHP-5.6 ./ext/fileinfo/libmagic > ~/rpm/packages/php/php-fileinfo.patch
+# git diff php-5.3.29..PHP-5.6 ./ext/fileinfo/config.m4 >> ~/rpm/packages/php/php-fileinfo.patch
+# git diff php-5.3.29..PHP-5.6 ./ext/fileinfo/Makefile.frag >> ~/rpm/packages/php/php-fileinfo.patch
+# git diff php-5.3.29..PHP-5.6 ./ext/fileinfo/data_file.c >> ~/rpm/packages/php/php-fileinfo.patch
+Patch71:       php-fileinfo.patch
+Patch72:       x32-suhosin.patch
+# Patch71-md5: 771e4934132c5f5c968248c954d1ef6e
+# Fixes for security bugs
+# https://repo.webtatic.com/yum/centos/5/SRPMS/repoview/php.html
+# also from RHEL6/CentOS7
+Patch220:      php-5.3.3-CVE-2011-4153.patch
+
+Patch247:      php-5.3.3-CVE-2014-2497.patch
+
+Patch249:      php-5.3.29-CVE-2014-3597.patch
+Patch250:      php-5.3.3-CVE-2014-4698.patch
+Patch251:      php-5.3.3-CVE-2014-4670.patch
+Patch252:      php-5.3.3-CVE-2014-3668.patch
+Patch253:      php-5.3.3-CVE-2014-3669.patch
+Patch254:      php-5.3.3-CVE-2014-3670.patch
+
+Patch256:      php-5.3.29-CVE-2014-8142.patch
+Patch257:      php-5.3.29-CVE-2015-0231.patch
+Patch258:      php-5.3.29-CVE-2015-0232.patch
 URL:           http://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}
@@ -222,7 +248,6 @@ BuildRequires:      cyrus-sasl-devel
 BuildRequires: db-devel >= 4.0
 BuildRequires: elfutils-devel
 %{?with_enchant:BuildRequires: enchant-devel >= 1.1.3}
-#BuildRequires:        fcgi-devel
 BuildRequires: file
 %{?with_kerberos5:BuildRequires:       heimdal-devel}
 %{?with_system_libzip:BuildRequires:   libzip-devel >= 0.10-3}
@@ -245,13 +270,11 @@ BuildRequires:    libjpeg-devel
 BuildRequires: libltdl-devel >= 1.4
 BuildRequires: libmcrypt-devel >= 2.4.4
 BuildRequires: libpng-devel >= 1.0.8
-#BuildRequires:        libtiff-devel
 %if "%{pld_release}" != "ac"
 BuildRequires: libtool >= 2:2.2
 %else
 BuildRequires: libtool >= 1.4.3
 %endif
-#BuildRequires:        libwrap-devel
 BuildRequires: libxml2-devel >= 1:2.7.6-4
 BuildRequires: libxslt-devel >= 1.1.0
 %{?with_mm:BuildRequires:      mm-devel >= 1.3.0}
@@ -262,7 +285,7 @@ BuildRequires:      openssl-devel >= 0.9.7d
 %{?with_gcov:BuildRequires:    lcov}
 %{?with_snmp:%{?with_tests:BuildRequires:      mibs-net-snmp}}
 %{?with_snmp:BuildRequires:    net-snmp-devel >= 5.0.7}
-%{?with_instantclient:BuildRequires:   oracle-instantclient-devel}
+%{?with_oci:%{?with_instantclient:BuildRequires:       oracle-instantclient-devel}}
 BuildRequires: pam-devel
 %{?with_pcre:BuildRequires:    pcre-devel >= 8.10}
 BuildRequires: pkgconfig
@@ -290,9 +313,6 @@ BuildRequires:      apache-devel >= 2.0.52-2
 BuildRequires: apr-devel >= 1:1.0.0
 BuildRequires: apr-util-devel >= 1:1.0.0
 %endif
-%if %{with fpm}
-#BuildRequires:        judy-devel
-%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                php_sysconfdir          /etc/%{name}
@@ -323,7 +343,7 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %undefine      with_ccache
 %endif
 
-%if %{with oci8}
+%if %{with oci}
 # ORACLE_HOME is required for oci8 ext to build
 %define _preserve_env %_preserve_env_base ORACLE_HOME
 %endif
@@ -442,9 +462,6 @@ Provides:   php(fcgi)
 Provides:      webserver(php) = %{version}
 Obsoletes:     php-cgi < 4:5.3.28-7
 Obsoletes:     php-fcgi < 4:5.3.0
-%if "%{pld_release}" != "ac"
-Conflicts:     logrotate < 3.8.0
-%endif
 
 %description cgi
 PHP as CGI or FastCGI program.
@@ -505,10 +522,14 @@ Requires(pre):    /bin/id
 Requires(pre): /usr/sbin/useradd
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      rc-scripts
+Provides:      php(fcgi)
 Provides:      php(fpm)
 Provides:      user(http)
 Provides:      webserver(php) = %{version}
 Obsoletes:     php-fpm < 4:5.3.28-7
+%if "%{pld_release}" != "ac"
+Conflicts:     logrotate < 3.8.0
+%endif
 
 %description fpm
 PHP FastCGI Process Manager.
@@ -551,6 +572,7 @@ Provides:   php(reflection)
 Provides:      php(standard)
 %{!?with_mysqlnd:Obsoletes:    php-mysqlnd}
 %{?with_pcre:%requires_ge_to   pcre pcre-devel}
+Suggests:      browscap
 Obsoletes:     php-common < 4:5.3.28-7
 Obsoletes:     php-pecl-domxml
 Conflicts:     php4-common < 3:4.4.4-8
@@ -594,6 +616,7 @@ Obsoletes:  php4-devel
 Obsoletes:     php52-devel
 Obsoletes:     php54-devel
 Obsoletes:     php55-devel
+Obsoletes:     php56-devel
 
 %description devel
 The php-devel package lets you compile dynamic extensions to PHP.
@@ -1999,6 +2022,7 @@ cp -p php.ini-production php.ini
 %if %{with type_hints}
 %patch12 -p0
 %endif
+%patch13 -p1
 %patch14 -p1
 %patch15 -p1
 %patch17 -p1
@@ -2025,6 +2049,7 @@ cp -p php.ini-production php.ini
 %patch38 -p1
 %patch39 -p1
 %if %{with fpm}
+%patch69 -p1
 %patch41 -p1
 %patch42 -p1
 %endif
@@ -2034,7 +2059,9 @@ cp -p php.ini-production php.ini
 %patch46 -p1
 %if %{with suhosin}
 %patch47 -p1
+%patch72 -p1
 %endif
+%patch68 -p1
 %patch48 -p1
 %patch49 -p1
 %patch50 -p1
@@ -2052,8 +2079,23 @@ cp -p php.ini-production php.ini
 %{__rm} -r sapi/litespeed
 gzip -dc %{SOURCE15} | tar xf - -C sapi/
 %patch67 -p1
-%patch68 -p1
-%patch69 -p1
+%patch70 -p1
+%patch71 -p1
+
+%patch220 -p1
+
+%patch247 -p1
+
+%patch249 -p1
+%patch250 -p1
+%patch251 -p1
+%patch252 -p1
+%patch253 -p1
+%patch254 -p1
+
+%patch256 -p1
+%patch257 -p1
+%patch258 -p1
 
 sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
 
@@ -2296,7 +2338,7 @@ for sapi in $sapis; do
        %{?with_mhash:--with-mhash=yes} \
        --with-mysql-sock=/var/lib/mysql/mysql.sock \
        --with-pdo-mysql=shared%{?with_mysqlnd:,mysqlnd} \
-       %{?with_oci8:--with-pdo-oci=shared%{?with_instantclient:,instantclient,%{_libdir}}} \
+       %{?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_pdo_sqlite:--with-pdo-sqlite=shared,/usr} \
@@ -2334,10 +2376,10 @@ for sapi in $sapis; do
        --with-mcrypt=shared \
        %{?with_mm:--with-mm} \
        %{?with_mssql:--with-mssql=shared} \
-       %{?with_mysqlnd:--with-mysqlnd=shared} \
+       %{?with_mysqlnd:--enable-mysqlnd=shared} \
        --with-mysql=shared%{?with_mysqlnd:,mysqlnd} \
        %{?with_mysqli:--with-mysqli=shared%{?with_mysqlnd:,mysqlnd}} \
-       %{?with_oci8:--with-oci8=shared%{?with_instantclient:,instantclient,%{_libdir}}} \
+       %{?with_oci:--with-oci8=shared%{?with_instantclient:,instantclient,%{_libdir}}} \
        %{?with_openssl:--with-openssl=shared} \
        %{?with_kerberos5:--with-kerberos} \
        %{__with_without pcre pcre-regex /usr} \
@@ -2578,9 +2620,7 @@ ln -s php%{ver_suffix} $RPM_BUILD_ROOT%{_bindir}/php.cli
 %endif
 
 cp -p php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
-
 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/php-cli.ini
-cp -p %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/browscap.ini
 
 %if %{with apache1}
 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/apache/conf.d/70_mod_php.conf
@@ -2611,17 +2651,19 @@ 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
-%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
 
 # for php-pecl-mailparse
@@ -2673,7 +2715,7 @@ fi
 %service %{name}-fpm restart
 
 %preun fpm
-if [ "$1" = 0 ]; then
+if [ "$1" = "0" ]; then
        %service %{name}-fpm stop
        /sbin/chkconfig --del %{name}-fpm
 fi
@@ -2723,14 +2765,22 @@ for f in /etc/php/*.ini.rpmsave /etc/php/*.d/*.ini.rpmsave; do
        fn=${fn%.rpmsave}
        nf=%{_sysconfdir}/$dn/$fn
        test -f "$nf" || continue
-       cp -vf $nf{,.rpmnew}
-       mv -vf $f $nf
+       cp -vfb $nf{,.rpmnew}
+       cp -vfb $f $nf
        %{__sed} -i -e '
                s#%{_libdir}/php#%{_libdir}/%{name}#
                s#/etc/php#%{_sysconfdir}#
        ' $nf
 done
 
+%triggerpostun common -- %{name}-common < 4:5.3.29-7, php-common < 4:5.3.29-7
+# 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 \
@@ -2894,7 +2944,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}
 
@@ -3102,7 +3151,7 @@ fi
 %attr(755,root,root) %{php_extensiondir}/mysqlnd.so
 %endif
 
-%if %{with oci8}
+%if %{with oci}
 %files oci8
 %defattr(644,root,root,755)
 %doc ext/oci8/{CREDITS,README}
@@ -3168,7 +3217,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)
 %doc ext/pdo_oci/CREDITS
This page took 0.050609 seconds and 4 git commands to generate.