--- rpms/php/sme8/php.spec 2010/03/04 16:31:07 1.2 +++ rpms/php/sme8/php.spec 2013/12/16 10:46:47 1.12 @@ -1,15 +1,27 @@ -# $Id$ +%global contentdir /var/www +# API/ABI check +%global apiver 20090626 +%global zendver 20090626 +%global pdover 20080721 +# Extension version +%global fileinfover 1.0.5-dev +%global pharver 2.0.1 +%global zipver 1.9.1 +%global jsonver 1.2.1 + +%define httpd_mmn %(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel) + +# Use the arch-specific mysql_config binary to avoid mismatch with the +# heuristic used by bindir/mysql_config. +%define mysql_config %{_libdir}/mysql/mysql_config -%define contentdir /var/www -%define apiver 20041225 -%define zendver 20060613 -%define pdover 20060511 +%define _default_patch_fuzz 2 -Summary: The PHP HTML-embedded scripting language +Summary: PHP scripting language for creating dynamic web sites Name: php -Version: 5.2.10 -Release: 1%{?dist} -License: PHP +Version: 5.3.3 +Release: 14%{?dist} +License: PHP and LGPLv2 and LGPLv2+ Group: Development/Languages URL: http://www.php.net/ @@ -18,41 +30,94 @@ Source1: php.conf Source2: php.ini Source3: macros.php -Patch1: php-5.2.4-gnusrc.patch -Patch2: php-4.3.3-install.patch +# Build fixes +Patch1: php-5.3.3-gnusrc.patch +Patch2: php-5.3.0-install.patch Patch3: php-5.2.4-norpath.patch -Patch5: php-5.0.2-phpize64.patch -Patch8: php-5.2.0-includedir.patch -Patch9: php-5.2.4-embed.patch - -# Fixes for extension modules -Patch21: php-5.2.4-odbc.patch -Patch22: php-4.3.11-shutdown.patch -Patch24: php-5.2.3-macropen.patch +Patch4: php-5.3.0-phpize64.patch +Patch5: php-5.2.0-includedir.patch +Patch8: php-5.3.3-aconf26x.patch + +# Fixes for extensions +Patch20: php-4.3.11-shutdown.patch +Patch21: php-5.3.3-zipmemset.patch +Patch22: php-5.3.3-pdo-overflow.patch +Patch23: php-5.3.3-pdo-53551.patch +Patch24: php-5.3.3-fileinfo.patch +Patch25: php-5.3.3-imap.patch +Patch26: php-5.3.3-odbc.patch # Functional changes -Patch30: php-5.0.4-dlopen.patch -Patch31: php-5.2.4-easter.patch -Patch32: php-5.2.5-systzdata.patch +Patch40: php-5.0.4-dlopen.patch +Patch41: php-5.3.0-easter.patch +Patch42: php-5.3.1-systzdata-v7.patch # Fixes for tests -Patch51: php-5.0.4-tests-wddx.patch +Patch61: php-5.0.4-tests-wddx.patch +Patch62: php-5.3.2-testfail.patch + +# Bug fixes +Patch100: php-5.3.3-extrglob.patch +Patch101: php-5.3.3-varnegidx.patch +Patch102: php-5.3.3-setdate.patch +# 103 not needed (no php-fpm) +Patch104: php-5.3.3-zendgc.patch +Patch105: php-5.3.3-r305043.patch +Patch106: php-5.3.3-copy.patch +Patch107: php-5.3.3-errorhandler.patch +Patch108: php-5.3.3-bug54268.patch + +# Fixes for security bugs +Patch200: php-5.3.2-CVE-2010-3709.patch +Patch201: php-5.3.2-CVE-2010-3870.patch +Patch202: php-5.3.3-CVE-2010-3710.patch +Patch203: php-5.3.2-CVE-2010-4645.patch +Patch204: php-5.3.3-CVE-2010-4156.patch +Patch205: php-5.3.3-CVE-2011-0708.patch +Patch206: php-5.3.3-CVE-2011-1148.patch +Patch207: php-5.3.3-CVE-2011-1466.patch +Patch208: php-5.3.3-CVE-2011-1468.patch +Patch209: php-5.3.3-CVE-2011-1469.patch +# 210 not needed (not affected) +Patch211: php-5.3.3-CVE-2011-1471.patch +Patch212: php-5.3.3-CVE-2011-1938.patch +Patch213: php-5.3.3-CVE-2011-2202.patch +Patch214: php-5.3.3-CVE-2011-2483.patch +Patch215: php-5.3.3-CVE-2011-4885.patch +Patch216: php-5.3.3-CVE-2011-4566.patch +Patch217: php-5.3.3-CVE-2012-0830.patch +Patch218: php-5.3.3-CVE-2012-1823.patch +Patch219: php-5.3.3-CVE-2012-2336.patch +Patch220: php-5.3.3-CVE-2011-4153.patch +# 221 not needed (no php-tidy) +Patch222: php-5.3.3-CVE-2012-1172.patch +Patch223: php-5.3.3-CVE-2012-2143.patch +Patch224: php-5.3.3-CVE-2012-2386.patch +Patch225: php-5.3.3-CVE-2012-0057.patch +Patch226: php-5.3.3-CVE-2012-0789.patch +Patch227: php-5.3.3-CVE-2010-2950.patch +Patch228: php-5.3.3-CVE-2012-2688.patch +Patch229: php-5.3.3-CVE-2012-0831.patch +Patch230: php-5.3.3-CVE-2011-1398.patch +Patch231: php-5.3.3-CVE-2013-1643.patch +Patch232: php-5.3.3-CVE-2006-7243.patch +Patch233: php-5.3.3-CVE-2013-4113.patch +Patch234: php-5.3.3-CVE-2013-4248.patch +Patch235: php-5.3.3-CVE-2013-6420.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: bzip2-devel, curl-devel >= 7.9, db4-devel, expat-devel -BuildRequires: gmp-devel, aspell-devel >= 0.50.0 -BuildRequires: httpd-devel >= 2.0.46-1, libjpeg-devel, libpng-devel, pam-devel -BuildRequires: libstdc++-devel, openssl-devel, sqlite-devel >= 3.0.0 -BuildRequires: zlib-devel, pcre-devel >= 6.6, smtpdaemon, readline-devel +BuildRequires: bzip2-devel, curl-devel >= 7.9, db4-devel, gmp-devel +BuildRequires: httpd-devel >= 2.0.46-1, pam-devel +BuildRequires: libstdc++-devel, openssl-devel, sqlite-devel +BuildRequires: zlib-devel, pcre-devel >= 6.6, smtpdaemon BuildRequires: bzip2, perl, libtool >= 1.4.3, gcc-c++ -Obsoletes: php-dbg, php3, phpfi, stronghold-php -# Enforce Apache module ABI compatibility -Requires: httpd-mmn = %(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel) +Requires: httpd-mmn = %{httpd_mmn} Provides: mod_php = %{version}-%{release} -Requires: php-common = %{version}-%{release} +Provides: php53 = %{version}-%{release}, config(php53) = %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} # For backwards-compatibility, require php-cli for the time being: -Requires: php-cli = %{version}-%{release} +Requires: %{name}-cli = %{version}-%{release} # To ensure correct /var/lib/php/session ownership: Requires(pre): httpd @@ -70,9 +135,9 @@ language to Apache HTTP Server. %package cli Group: Development/Languages Summary: Command-line interface for PHP -Requires: php-common = %{version}-%{release} -Provides: php-cgi = %{version}-%{release} -Provides: php-pcntl, php-readline +Requires: %{name}-common = %{version}-%{release} +Provides: php-cgi = %{version}-%{release}, php53-cli = %{version}-%{release} +Provides: php-pcntl %description cli The php-cli package contains the command-line interface @@ -83,24 +148,33 @@ Group: Development/Languages Summary: Common files for PHP Provides: php-api = %{apiver}, php-zend-abi = %{zendver} Provides: php(api) = %{apiver}, php(zend-abi) = %{zendver} +Provides: php(language) = %{version} # Provides for all builtin modules: Provides: php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif Provides: php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-libxml -Provides: php-openssl, php-pcre, php-posix, php-pspell Provides: php-reflection, php-session, php-shmop, php-simplexml, php-sockets -Provides: php-spl, php-sysvsem, php-sysvshm, php-sysvmsg, php-tokenizer -Provides: php-wddx, php-zlib, php-json, php-zip, php-dbase -Obsoletes: php-openssl, php-pecl-zip, php-json, php-dbase +Provides: php-spl, php-tokenizer, php-openssl, php-pcre +Provides: php-zlib, php-json, php-zip, php-fileinfo +Provides: php-core, php-ereg, php-filter, php-phar, php-standard +Provides: php53-common = %{version}-%{release}, config(php53-common) = %{version}-%{release} +Obsoletes: php-pecl-json, php-pecl-zip, php-pecl-phar, php-pecl-Fileinfo +Obsoletes: php-openssl, php-json +# For obsoleted pecl extension +Provides: php-pecl-json = %{jsonver}, php-pecl(json) = %{jsonver} +Provides: php-pecl-zip = %{zipver}, php-pecl(zip) = %{zipver} +Provides: php-pecl-phar = %{pharver}, php-pecl(phar) = %{pharver} +Provides: php-pecl-Fileinfo = %{fileinfover}, php-pecl(Fileinfo) = %{fileinfover} +Obsoletes: php-pecl-json, php-pecl-zip, php-pecl-phar, php-pecl-Fileinfo %description common -The php-common package contains files used by both the php +The %{name}-common package contains files used by both the php package and the php-cli package. %package devel Group: Development/Libraries Summary: Files needed for building PHP extensions -Requires: php = %{version}-%{release}, autoconf, automake -Obsoletes: php-pecl-pdo-devel +Requires: %{name} = %{version}-%{release}, autoconf, automake +Provides: php53-devel = %{version}-%{release}, config(php53-devel) = %{version}-%{release} %description devel The php-devel package contains the files needed for building PHP @@ -110,25 +184,20 @@ need to install this package. %package imap Summary: A module for PHP applications that use IMAP Group: Development/Languages -Requires: php-common = %{version}-%{release} -Obsoletes: mod_php3-imap, stronghold-php-imap +Requires: %{name}-common = %{version}-%{release} BuildRequires: krb5-devel, openssl-devel, libc-client-devel +Provides: php53-imap = %{version}-%{release}, config(php53-imap) = %{version}-%{release} %description imap -The php-imap package contains a dynamic shared object (DSO) for the -Apache Web server. When compiled into Apache, the php-imap module will -add IMAP (Internet Message Access Protocol) support to PHP. IMAP is a -protocol for retrieving and uploading e-mail messages on mail -servers. PHP is an HTML-embedded scripting language. If you need IMAP -support for PHP applications, you will need to install this package -and the php package. +The php-imap package contains a dynamic shared object that will +add support for the IMAP protocol to PHP. %package ldap Summary: A module for PHP applications that use LDAP Group: Development/Languages -Requires: php-common = %{version}-%{release} -Obsoletes: mod_php3-ldap, stronghold-php-ldap +Requires: %{name}-common = %{version}-%{release} BuildRequires: cyrus-sasl-devel, openldap-devel, openssl-devel +Provides: php53-ldap = %{version}-%{release}, config(php53-ldap) = %{version}-%{release} %description ldap The php-ldap package is a dynamic shared object (DSO) for the Apache @@ -141,12 +210,13 @@ need to install this package in addition %package pdo Summary: A database access abstraction module for PHP applications Group: Development/Languages -Requires: php-common = %{version}-%{release} -Obsoletes: php-pecl-pdo-sqlite, php-pecl-pdo +Requires: %{name}-common = %{version}-%{release} Provides: php-pdo-abi = %{pdover} +Provides: php-pdo_sqlite +Provides: php53-pdo = %{version}-%{release}, config(php53-pdo) = %{version}-%{release} %description pdo -The php-pdo package contains a dynamic shared object that will add +The %{name}-pdo package contains a dynamic shared object that will add a database access abstraction layer to PHP. This module provides a common interface for accessing MySQL, PostgreSQL or other databases. @@ -154,10 +224,10 @@ databases. %package mysql Summary: A module for PHP applications that use MySQL databases Group: Development/Languages -Requires: php-common = %{version}-%{release}, php-pdo -Provides: php_database, php-mysqli -Obsoletes: mod_php3-mysql, stronghold-php-mysql +Requires: %{name}-common = %{version}-%{release}, %{name}-pdo +Provides: php_database, php-mysqli, php-pdo_mysql BuildRequires: mysql-devel >= 4.1.0 +Provides: php53-mysql = %{version}-%{release}, config(php53-mysql) = %{version}-%{release} %description mysql The php-mysql package contains a dynamic shared object that will add @@ -169,10 +239,10 @@ this package and the php package. %package pgsql Summary: A PostgreSQL database module for PHP Group: Development/Languages -Requires: php-common = %{version}-%{release}, php-pdo -Provides: php_database -Obsoletes: mod_php3-pgsql, stronghold-php-pgsql +Requires: %{name}-common = %{version}-%{release}, %{name}-pdo +Provides: php_database, php-pdo_pgsql BuildRequires: krb5-devel, openssl-devel, postgresql-devel +Provides: php53-pgsql = %{version}-%{release}, config(php53-pgsql) = %{version}-%{release} %description pgsql The php-pgsql package includes a dynamic shared object (DSO) that can @@ -183,13 +253,25 @@ HTML-embedded scripting language. If you PostgreSQL, you should install this package in addition to the main php package. +%package process +Summary: Modules for PHP script using system process interfaces +Group: Development/Languages +Requires: %{name}-common = %{version}-%{release} +Provides: php-posix, php-sysvsem, php-sysvshm, php-sysvmsg +Provides: php53-process = %{version}-%{release}, config(php53-process) = %{version}-%{release} + +%description process +The php-process package contains dynamic shared objects which add +support to PHP using system interfaces for inter-process +communication. + %package odbc Group: Development/Languages -Requires: php-common = %{version}-%{release}, php-pdo +Requires: %{name}-common = %{version}-%{release}, %{name}-pdo Summary: A module for PHP applications that use ODBC databases -Provides: php_database -Obsoletes: stronghold-php-odbc +Provides: php_database, php-pdo_odbc BuildRequires: unixODBC-devel +Provides: php53-odbc = %{version}-%{release}, config(php53-odbc) = %{version}-%{release} %description odbc The php-odbc package contains a dynamic shared object that will add @@ -202,9 +284,10 @@ package. %package soap Group: Development/Languages -Requires: php-common = %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} Summary: A module for PHP applications that use the SOAP protocol BuildRequires: libxml2-devel +Provides: php53-soap = %{version}-%{release}, config(php53-soap) = %{version}-%{release} %description soap The php-soap package contains a dynamic shared object that will add @@ -213,8 +296,9 @@ support to PHP for using the SOAP web se %package snmp Summary: A module for PHP applications that query SNMP-managed devices Group: Development/Languages -Requires: php-common = %{version}-%{release}, net-snmp +Requires: %{name}-common = %{version}-%{release}, net-snmp BuildRequires: net-snmp-devel +Provides: php53-snmp = %{version}-%{release}, config(php53-snmp) = %{version}-%{release} %description snmp The php-snmp package contains a dynamic shared object that will add @@ -225,10 +309,11 @@ will need to install this package and th %package xml Summary: A module for PHP applications which use XML Group: Development/Languages -Requires: php-common = %{version}-%{release} -Obsoletes: php-domxml, php-dom -Provides: php-dom, php-xsl, php-domxml +Requires: %{name}-common = %{version}-%{release} +Provides: php-dom, php-xsl, php-domxml, php-wddx BuildRequires: libxslt-devel >= 1.0.18-1, libxml2-devel >= 2.4.14-1 +Obsoletes: php-domxml, php-dom +Provides: php53-xml = %{version}-%{release}, config(php53-xml) = %{version}-%{release} %description xml The php-xml package contains dynamic shared objects which add support @@ -238,8 +323,8 @@ and performing XSL transformations on XM %package xmlrpc Summary: A module for PHP applications which use the XML-RPC protocol Group: Development/Languages -Requires: php-common = %{version}-%{release} -BuildRequires: expat-devel +Requires: %{name}-common = %{version}-%{release} +Provides: php53-xmlrpc = %{version}-%{release}, config(php53-xmlrpc) = %{version}-%{release} %description xmlrpc The php-xmlrpc package contains a dynamic shared object that will add @@ -248,27 +333,20 @@ support for the XML-RPC protocol to PHP. %package mbstring Summary: A module for PHP applications which need multi-byte string handling Group: Development/Languages -Requires: php-common = %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} +Provides: php53-mbstring = %{version}-%{release}, config(php53-mbstring) = %{version}-%{release} %description mbstring The php-mbstring package contains a dynamic shared object that will add support for multi-byte string handling to PHP. -%package ncurses -Summary: A module for PHP applications for using ncurses interfaces -Group: Development/Languages -Requires: php-common = %{version}-%{release} -BuildRequires: ncurses-devel - -%description ncurses -The php-ncurses package contains a dynamic shared object that will add -support for using the ncurses terminal output interfaces. - %package gd Summary: A module for PHP applications for using the gd graphics library Group: Development/Languages -Requires: php-common = %{version}-%{release} -BuildRequires: gd-devel, freetype-devel +Requires: %{name}-common = %{version}-%{release} +# Required to build the bundled GD library +BuildRequires: libXpm-devel, libjpeg-devel, libpng-devel, freetype-devel +Provides: php53-gd = %{version}-%{release}, config(php53-gd) = %{version}-%{release} %description gd The php-gd package contains a dynamic shared object that will add @@ -277,7 +355,8 @@ support for using the gd graphics librar %package bcmath Summary: A module for PHP applications for using the bcmath library Group: Development/Languages -Requires: php-common = %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} +Provides: php53-bcmath = %{version}-%{release}, config(php53-bcmath) = %{version}-%{release} %description bcmath The php-bcmath package contains a dynamic shared object that will add @@ -286,38 +365,112 @@ support for using the bcmath library to %package dba Summary: A database abstraction layer module for PHP applications Group: Development/Languages -Requires: php-common = %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} +Provides: php53-dba = %{version}-%{release}, config(php53-dba) = %{version}-%{release} %description dba The php-dba package contains a dynamic shared object that will add support for using the DBA database abstraction layer to PHP. +%package pspell +Summary: A module for PHP applications for using pspell interfaces +Group: System Environment/Libraries +Requires: %{name}-common = %{version}-%{release} +BuildRequires: aspell-devel >= 0.50.0 +Provides: php53-pspell = %{version}-%{release}, config(php53-pspell) = %{version}-%{release} + +%description pspell +The php-pspell package contains a dynamic shared object that will add +support for using the pspell library to PHP. + +%package intl +Summary: Internationalization extension for PHP applications +Group: System Environment/Libraries +Requires: %{name}-common = %{version}-%{release} +BuildRequires: libicu-devel >= 3.6 +Provides: php53-intl = %{version}-%{release}, config(php53-intl) = %{version}-%{release} + +%description intl +The php-intl package contains a dynamic shared object that will add +support for using the ICU library to PHP. + %prep -%setup -q +%setup -q -n php-%{version} %patch1 -p1 -b .gnusrc %patch2 -p1 -b .install %patch3 -p1 -b .norpath -%patch5 -p1 -b .phpize64 -%patch8 -p1 -b .includedir -%patch9 -p1 -b .embed - -%patch21 -p1 -b .odbc -%patch22 -p1 -b .shutdown -%patch24 -p1 -b .macropen - -%patch30 -p1 -b .dlopen -%patch31 -p1 -b .easter -%patch32 -p1 -b .systzdata - -%patch51 -p1 -b .tests-wddx +%patch4 -p1 -b .phpize64 +%patch5 -p1 -b .includedir +%patch8 -p1 -b .aconf26x + +%patch20 -p1 -b .shutdown +%patch21 -p1 -b .zipmemset +%patch22 -p1 -b .pdooverflow +%patch23 -p1 -b .pdo53551 +%patch24 -p1 -b .streams +%patch25 -p1 -b .imapauth +%patch26 -p1 -b .pdoodbc + +%patch40 -p1 -b .dlopen +%patch41 -p1 -b .easter +%patch42 -p1 -b .systzdata + +%patch61 -p1 -b .tests-wddx +%patch62 -p1 -b .testfail + +%patch100 -p1 -b .extrglob +%patch101 -p1 -b .varnegidx +%patch102 -p1 -b .setdate + +%patch104 -p1 -b .zendgc +%patch105 -p1 -b .r305043 +%patch106 -p1 -b .copy +%patch107 -p1 -b .errorhandler +%patch108 -p1 -b .bug54268 + +%patch200 -p1 -b .cve3709 +%patch201 -p1 -b .cve3870 +%patch202 -p1 -b .cve4645 +%patch203 -p1 -b .cve3710 +%patch204 -p1 -b .cve4156 +%patch205 -p1 -b .cve0708 +%patch206 -p1 -b .cve1148 +%patch207 -p1 -b .cve1466 +%patch208 -p1 -b .cve1468 +%patch209 -p1 -b .cve1469 +%patch211 -p1 -b .cve1471 +%patch212 -p1 -b .cve1938 +%patch213 -p1 -b .cve2202 +%patch214 -p1 -b .cve2483 +%patch215 -p1 -b .cve4885 +%patch216 -p1 -b .cve4566 +%patch217 -p1 -b .cve0830 +%patch218 -p1 -b .cve1823 +%patch219 -p1 -b .cve2336 + +%patch220 -p1 -b .cve4153 +%patch222 -p1 -b .cve1172 +%patch223 -p1 -b .cve2143 +%patch224 -p1 -b .cve2386 +%patch225 -p1 -b .cve0057 +%patch226 -p1 -b .cve0789 +%patch227 -p1 -b .cve2950 +%patch228 -p1 -b .cve2688 +%patch229 -p1 -b .cve0831 +%patch230 -p1 -b .cve1398 +%patch231 -p1 -b .cve1643 +%patch232 -p1 -b .cve7243 +%patch233 -p1 -b .cve4113 +%patch234 -p1 -b .cve4248 +%patch235 -p1 -b .cve6420 # Prevent %%doc confusion over LICENSE files -cp Zend/LICENSE Zend/ZEND_LICENSE -cp TSRM/LICENSE TSRM_LICENSE -cp regex/COPYRIGHT regex_COPYRIGHT -cp ext/gd/libgd/README gd_README +cp -p Zend/LICENSE Zend/ZEND_LICENSE +cp -p TSRM/LICENSE TSRM_LICENSE +cp -p ext/ereg/regex/COPYRIGHT regex_COPYRIGHT +cp -p ext/gd/libgd/README gd_README -# Source is built twice: once for /usr/bin/php, once for the Apache DSO. +# Multiple builds for multiple SAPIs mkdir build-cgi build-apache # Remove bogus test; position of read position after fopen(, "a+") @@ -328,6 +481,12 @@ rm -f ext/standard/tests/file/bug21131.p rm -f ext/standard/tests/file/bug22414.phpt \ ext/iconv/tests/bug16069.phpt +# Remove tests which require external network access +rm -f ext/sockets/tests/socket_bind.diff + +# Easter eggs no not shipped +rm -f tests/basic/php_egg_logo_guid.diff + # Safety check for API version change. vapi=`sed -n '/#define PHP_API_VERSION/{s/.* //;p}' main/php.h` if test "x${vapi}" != "x%{apiver}"; then @@ -351,12 +510,47 @@ if test "x${vpdo}" != "x%{pdover}"; then exit 1 fi +# Check for some extension version +ver=$(sed -n '/#define PHP_FILEINFO_VERSION /{s/.* "//;s/".*$//;p}' ext/fileinfo/php_fileinfo.h) +if test "$ver" != "%{fileinfover}"; then + : Error: Upstream FILEINFO version is now ${ver}, expecting %{fileinfover}. + : Update the fileinfover macro and rebuild. + exit 1 +fi +ver=$(sed -n '/#define PHP_PHAR_VERSION /{s/.* "//;s/".*$//;p}' ext/phar/php_phar.h) +if test "$ver" != "%{pharver}"; then + : Error: Upstream PHAR version is now ${ver}, expecting %{pharver}. + : Update the pharver macro and rebuild. + exit 1 +fi +ver=$(sed -n '/#define PHP_ZIP_VERSION_STRING /{s/.* "//;s/".*$//;p}' ext/zip/php_zip.h) +if test "$ver" != "%{zipver}"; then + : Error: Upstream ZIP version is now ${ver}, expecting %{zipver}. + : Update the zipver macro and rebuild. + exit 1 +fi +ver=$(sed -n '/#define PHP_JSON_VERSION /{s/.* "//;s/".*$//;p}' ext/json/php_json.h) +if test "$ver" != "%{jsonver}"; then + : Error: Upstream JSON version is now ${ver}, expecting %{jsonver}. + : Update the jsonver macro and rebuild. + exit 1 +fi + +# Fix some bogus permissions +find . -name \*.[ch] -exec chmod 644 {} \; +find . -name \*.cpp -exec chmod 644 {} \; +chmod 644 README.* + %build +# aclocal workaround - to be improved +cat `aclocal --print-ac-dir`/libtool.m4 >>aclocal.m4 + # Force use of system libtool: libtoolize --force --copy -cat `aclocal --print-ac-dir`/libtool.m4 > build/libtool.m4 +cat `aclocal --print-ac-dir`/libtool.m4 >build/libtool.m4 # Regenerate configure scripts (patches change config.m4's) +touch configure.in ./buildconf --force CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-pointer-sign" @@ -385,10 +579,10 @@ ln -sf ../configure --disable-rpath \ --without-pear \ --with-bz2 \ - --with-curl \ --with-exec-dir=%{_bindir} \ --with-freetype-dir=%{_prefix} \ --with-png-dir=%{_prefix} \ + --with-xpm-dir=%{_prefix} \ --enable-gd-native-ttf \ --without-gdbm \ --with-gettext \ @@ -396,9 +590,6 @@ ln -sf ../configure --with-iconv \ --with-jpeg-dir=%{_prefix} \ --with-openssl \ - --with-png \ - --with-pspell \ - --with-expat-dir=%{_prefix} \ --with-pcre-regex=%{_prefix} \ --with-zlib \ --with-layout=GNU \ @@ -407,22 +598,14 @@ ln -sf ../configure --enable-magic-quotes \ --enable-sockets \ --enable-sysvsem --enable-sysvshm --enable-sysvmsg \ - --enable-track-vars \ - --enable-trans-sid \ - --enable-yp \ - --enable-wddx \ --with-kerberos \ --enable-ucd-snmp-hack \ - --with-unixODBC=shared,%{_prefix} \ - --enable-memory-limit \ --enable-shmop \ --enable-calendar \ - --enable-dbx \ - --enable-dio \ - --without-mime-magic \ --without-sqlite \ + --without-sqlite3 \ --with-libxml-dir=%{_prefix} \ - --with-xml \ + --enable-xml \ --with-system-tzdata \ $* if test $? != 0; then @@ -439,43 +622,53 @@ pushd build-cgi build --enable-force-cgi-redirect \ --enable-pcntl \ --with-imap=shared --with-imap-ssl \ - --enable-mbstring=shared --enable-mbstr-enc-trans \ + --enable-mbstring=shared \ --enable-mbregex \ - --with-ncurses=shared \ --with-gd=shared \ --enable-bcmath=shared \ --enable-dba=shared --with-db4=%{_prefix} \ --with-xmlrpc=shared \ --with-ldap=shared --with-ldap-sasl \ --with-mysql=shared,%{_prefix} \ - --with-mysqli=shared,%{_bindir}/mysql_config \ + --with-mysqli=shared,%{mysql_config} \ --enable-dom=shared \ - --with-dom-xslt=%{_prefix} --with-dom-exslt=%{_prefix} \ --with-pgsql=shared \ + --enable-wddx=shared \ --with-snmp=shared,%{_prefix} \ --enable-soap=shared \ --with-xsl=shared,%{_prefix} \ --enable-xmlreader=shared --enable-xmlwriter=shared \ + --with-curl=shared,%{_prefix} \ --enable-fastcgi \ --enable-pdo=shared \ --with-pdo-odbc=shared,unixODBC,%{_prefix} \ - --with-pdo-mysql=shared,%{_prefix} \ + --with-pdo-mysql=shared,%{mysql_config} \ --with-pdo-pgsql=shared,%{_prefix} \ --with-pdo-sqlite=shared,%{_prefix} \ --enable-json=shared \ --enable-zip=shared \ - --with-readline \ - --enable-dbase=shared + --without-readline \ + --with-pspell=shared \ + --enable-phar=shared \ + --enable-sysvmsg=shared --enable-sysvshm=shared --enable-sysvsem=shared \ + --enable-posix=shared \ + --with-unixODBC=shared,%{_prefix} \ + --enable-fileinfo=shared \ + --enable-intl=shared \ + --with-icu-dir=%{_prefix} popd +without_shared="--without-mysql --without-gd \ + --disable-dom --disable-dba --without-unixODBC \ + --disable-pdo --disable-xmlreader --disable-xmlwriter \ + --without-sqlite3 --disable-phar --disable-fileinfo \ + --disable-json --without-pspell --disable-wddx \ + --without-curl --disable-posix \ + --disable-sysvmsg --disable-sysvshm --disable-sysvsem" + # Build Apache module, and the CLI SAPI, /usr/bin/php pushd build-apache -build --with-apxs2=%{_sbindir}/apxs \ - --without-mysql --without-gd \ - --without-odbc --disable-dom \ - --disable-dba --without-unixODBC \ - --disable-pdo --disable-xmlreader --disable-xmlwriter \ - --disable-json +build --with-apxs2=%{_sbindir}/apxs ${without_shared} popd %check @@ -488,7 +681,7 @@ if ! make test; then for f in `find .. -name \*.diff -type f -print`; do echo "TEST FAILURE: $f --" cat "$f" - echo "-- $f result ends." + echo -e "\n-- $f result ends.\n" done set -x #exit 1 @@ -501,12 +694,9 @@ unset NO_INTERACTION REPORT_EXIT_STATUS # Install everything from the CGI SAPI build make -C build-cgi install INSTALL_ROOT=$RPM_BUILD_ROOT -# Install the Apache module -make -C build-apache install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT - # Install the default configuration file and icons install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/ -install -m 644 $RPM_SOURCE_DIR/php.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.ini +install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/php.ini install -m 755 -d $RPM_BUILD_ROOT%{contentdir}/icons install -m 644 *.gif $RPM_BUILD_ROOT%{contentdir}/icons/ @@ -514,26 +704,28 @@ install -m 644 *.gif $RPM_BUILD_ROOT% install -m 755 -d $RPM_BUILD_ROOT%{_libdir}/php/pear \ $RPM_BUILD_ROOT%{_datadir}/php -# Use correct libdir -sed -i -e 's|%{_prefix}/lib|%{_libdir}|' $RPM_BUILD_ROOT%{_sysconfdir}/php.ini - # install the DSO install -m 755 -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules install -m 755 build-apache/libs/libphp5.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules -# Apache config fragment +# Apache config fragment install -m 755 -d $RPM_BUILD_ROOT/etc/httpd/conf.d +# %{SOURCE1} used here -> install -m 644 $RPM_SOURCE_DIR/php.conf $RPM_BUILD_ROOT/etc/httpd/conf.d install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/php.d install -m 755 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php install -m 700 -d $RPM_BUILD_ROOT%{_localstatedir}/lib/php/session +# Fix the link +(cd $RPM_BUILD_ROOT%{_bindir}; ln -sfn phar.phar phar) + # Generate files lists and stub .ini files for each subpackage for mod in pgsql mysql mysqli odbc ldap snmp xmlrpc imap \ - mbstring ncurses gd dom xsl soap bcmath dba xmlreader xmlwriter \ + mbstring gd dom xsl soap bcmath dba xmlreader xmlwriter \ pdo pdo_mysql pdo_pgsql pdo_odbc pdo_sqlite json zip \ - dbase; do + phar fileinfo intl pspell curl wddx \ + posix sysvshm sysvsem sysvmsg; do cat > $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${mod}.ini < files.xml +cat files.dom files.xsl files.xml{reader,writer} files.wddx > files.xml # The mysql and mysqli modules are both packaged in php-mysql cat files.mysqli >> files.mysql @@ -555,16 +747,20 @@ cat files.pdo_mysql >> files.mysql cat files.pdo_pgsql >> files.pgsql cat files.pdo_odbc >> files.odbc -# Package pdo_sqlite with pdo; isolating the sqlite dependency -# isn't useful at this time since rpm itself requires sqlite. +# sysv* and posix in packaged in php-process +cat files.sysv* files.posix > files.process + +# Package pdo_sqlite with pdo. cat files.pdo_sqlite >> files.pdo -# Package json, dbase and zip in -common. -cat files.json files.dbase files.zip > files.common +# Package json, zip, curl, phar and fileinfo in -common. +cat files.json files.zip files.curl files.phar files.fileinfo > files.common # Install the macros file: install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm +# %{SOURCE3} used here -> sed -e "s/@PHP_APIVER@/%{apiver}/;s/@PHP_ZENDVER@/%{zendver}/;s/@PHP_PDOVER@/%{pdover}/" \ + -e "s/@PHP_VERSION@/%{version}/" \ < $RPM_SOURCE_DIR/macros.php > macros.php install -m 644 -c macros.php \ $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.php @@ -572,7 +768,8 @@ install -m 644 -c macros.php \ # Remove unpackaged files rm -rf $RPM_BUILD_ROOT%{_libdir}/php/modules/*.a \ $RPM_BUILD_ROOT%{_bindir}/{phptar} \ - $RPM_BUILD_ROOT%{_datadir}/pear + $RPM_BUILD_ROOT%{_datadir}/pear \ + $RPM_BUILD_ROOT%{_libdir}/libphp5.la # Remove irrelevant docs rm -f README.{Zeus,QNX,CVS-RULES} @@ -590,8 +787,9 @@ rm files.* macros.php %files common -f files.common %defattr(-,root,root) -%doc CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS README* -%doc Zend/ZEND_* gd_README TSRM_LICENSE regex_COPYRIGHT +%doc CODING_STANDARDS CREDITS INSTALL LICENSE NEWS README* +%doc Zend/ZEND_* TSRM_LICENSE regex_COPYRIGHT +%doc php.ini-production php.ini-development %config(noreplace) %{_sysconfdir}/php.ini %dir %{_sysconfdir}/php.d %dir %{_libdir}/php @@ -604,6 +802,8 @@ rm files.* macros.php %defattr(-,root,root) %{_bindir}/php %{_bindir}/php-cgi +%{_bindir}/phar.phar +%{_bindir}/phar %{_mandir}/man1/php.1* %doc sapi/cgi/README* sapi/cli/README @@ -626,37 +826,270 @@ rm files.* macros.php %files xml -f files.xml %files xmlrpc -f files.xmlrpc %files mbstring -f files.mbstring -%files ncurses -f files.ncurses +%defattr(-,root,root) +%doc ext/mbstring/libmbfl/DISCLAIMER ext/mbstring/libmbfl/LICENSE %files gd -f files.gd +%defattr(-,root,root) +%doc gd_README %files soap -f files.soap %files bcmath -f files.bcmath +%defattr(-,root,root) +%doc ext/bcmath/libbcmath/COPYING.LIB %files dba -f files.dba %files pdo -f files.pdo +%files pspell -f files.pspell +%files intl -f files.intl +%files process -f files.process %changelog -* Mon Aug 10 2009 Joe Orton 5.2.10-1.el5s2 -- update to 5.2.10 +* Mon Dec 16 2013 Daniel Berteaud - 5.3.3-14.sme +- Resync with upstream php53, which include: +- add security fix for CVE-2013-6420 +- add security fix for CVE-2013-4248 +- add upstream reproducer for error_handler (#951075) +- add security fixes for CVE-2006-7243 +- add security fixes for CVE-2012-2688, CVE-2012-0831, + CVE-2011-1398, CVE-2013-1643 +- fix segfault in error_handler with + allow_call_time_pass_reference = Off (#951075) +- fix double free when destroy_zend_class fails (#951076) +- fix possible buffer overflow in pdo_odbc (#869694) +- php script hangs when it exceeds max_execution_time + when inside an ODBC call (#864954) +- fix zend garbage collector (#892695) +- fix transposed memset arguments in libzip (#953818) +- fix possible segfault in pdo_mysql (#869693) +- fix imap_open DISABLE_AUTHENTICATOR param ignores array (#859369) +- fix stream support in fileinfo (#869697) +- fix setDate when DateTime created from timestamp (#869691) +- fix permission on source files (#869688) +- add php(language) and missing provides (#837044) +- +- fix copy doesn't report failure on partial copy (#951413) + +* Mon Jul 15 2013 Shad L. Lords - 5.3.3-13.sme.2 +- Add php53-* provides to provide compatibility +- Obsolete php-domxml and php-dom [SME: 6733] +- Update Obsoletes and Conflicts [SME: 6436] + +* Fri Jul 12 2013 Remi Collet - 5.3.3-13.1 +- add security fix for CVE-2013-4113 + +* Mon Jun 25 2012 Joe Orton - 5.3.3-13 +- add security fix for CVE-2010-2950 + +* Wed Jun 13 2012 Joe Orton - 5.3.3-11 +- fix tests for CVE-2012-2143, CVE-2012-0789 + +* Tue Jun 12 2012 Joe Orton - 5.3.3-10 +- add security fix for CVE-2012-2336 + +* Tue Jun 12 2012 Joe Orton - 5.3.3-9 +- add security fixes for CVE-2011-4153, CVE-2012-0057, CVE-2012-0789, + CVE-2012-1172, CVE-2012-2143, CVE-2012-2386 + +* Thu May 3 2012 Joe Orton - 5.3.3-7 +- correct detection of = in CVE-2012-1823 fix (#818607) + +* Thu May 3 2012 Joe Orton - 5.3.3-6 +- add security fix for CVE-2012-1823 (#818607) + +* Thu Feb 2 2012 Joe Orton - 5.3.3-5 +- add security fix for CVE-2012-0830 (#786758) + +* Wed Jan 04 2012 Vojtech Vitek (V-Teq) - 5.3.3-4 +- remove extra php.ini-prod/devel files caused by %%patch -b + +* Tue Jan 03 2012 Vojtech Vitek (V-Teq) - 5.3.3-3 +- add security fixes for CVE-2011-4885, CVE-2011-4566 (#740734) + +* Fri Oct 28 2011 Joe Orton - 5.3.3-2 +- add php-$subpkg = V-R provides (#717158) +- add security fixes for CVE-2010-3710, CVE-2010-4156, CVE-2010-4645 (#670464) +- add security fixes for CVE-2011-2483, CVE-2011-0708, CVE-2011-1148, + CVE-2011-1466, CVE-2011-1468, CVE-2011-1469, CVE-2011-1471, + CVE-2011-1938, CVE-2011-2202 (#740734) +- fix negative keys with var_export (#700724) + +* Wed Dec 1 2010 Joe Orton - 5.3.3-1 +- update to 5.3.3 (#658315) + +* Mon Nov 22 2010 Joe Orton - 5.3.2-7 +- prevent extract() from clobering $GLOBALS (#655330) + +* Wed Nov 10 2010 Joe Orton - 5.3.2-6 +- add security fixes for CVE-2010-3870 CVE-2010-3709 (#650877) +- provide php-devel from -devel (#642701) + +* Mon Nov 1 2010 Joe Orton - 5.3.2-5 +- use correct mysql_config for pdo-mysql also (#642701) + +* Thu Sep 30 2010 Joe Orton - 5.3.2-4 +- use mysql_config from libdir + +* Tue Sep 7 2010 Joe Orton - 5.3.2-3 +- add defattr for -mbstring and -bcmath + +* Tue Sep 7 2010 Joe Orton - 5.3.2-2 +- add LGPLv2{,+} to License; ship text in -bcmath, -mbstring +- apply phar patch correctly +- fix permissions on sources, README.namespaces +- drop EXTENSIONS from %%doc +- fix Provides for php-cli +- drop inappropriate/obsolete Obsoletes + +* Thu Sep 2 2010 Joe Orton - 5.3.2-1 +- convert to php53 +- remove subpackages: embeded, zts, tidy, recode, enchant + +* Tue Aug 17 2010 Joe Orton - 5.3.2-6 +- add security fixes for CVE-2010-1866, CVE-2010-2094, CVE-2010-1917, + CVE-2010-2531, MOPS-2010-060 (#624469) + +* Fri Aug 13 2010 Joe Orton - 5.3.2-5 +- add security fix for CVE-2010-0397 (#575712) + +* Thu Jun 24 2010 Joe Orton - 5.3.2-4 +- add security fix for CVE-2010-2225 (#605644) + +* Wed May 5 2010 Joe Orton - 5.3.2-3 +- restore -imap (#586050) + +* Fri Mar 26 2010 Joe Orton - 5.3.2-2 +- remove mcrypt support (#459804, #577257) + +* Wed Mar 24 2010 Joe Orton - 5.3.2-1 +- update to 5.3.2 (#575158, #575712) + +* Sat Mar 06 2010 Remi Collet +- PHP 5.3.2 Released! +- remove mime_magic option (now provided by fileinfo, by emu) +- add patch for http://bugs.php.net/50578 +- remove patch for libedit (upstream) + +* Fri Jan 15 2010 Joe Orton - 5.3.1-7 +- add security fix for CVE-2009-4142 (#552268) + +* Fri Dec 18 2009 Joe Orton - 5.3.1-6 +- drop mssql, pdo_dblib + +* Fri Dec 11 2009 Joe Orton - 5.3.1-5 +- drop imap + +* Fri Dec 11 2009 Joe Orton - 5.3.1-4 +- drop t1lib, interbase/firebird support + +* Fri Nov 27 2009 Joe Orton - 5.3.1-3 +- update to v7 of systzdata patch + +* Wed Nov 25 2009 Joe Orton - 5.3.1-2 +- fix build with autoconf 2.6x + +* Fri Nov 20 2009 Remi Collet 5.3.1-1 +- update to 5.3.1 +- remove openssl patch (merged upstream) +- add provides for php-pecl-json +- add prod/devel php.ini in doc + +* Tue Nov 17 2009 Tom "spot" Callaway - 5.3.0-7 +- use libedit instead of readline to resolve licensing issues + +* Tue Aug 25 2009 Tomas Mraz - 5.3.0-6 +- rebuilt with new openssl + +* Sun Jul 26 2009 Fedora Release Engineering - 5.3.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Jul 16 2009 Joe Orton 5.3.0-4 +- rediff systzdata patch + +* Thu Jul 16 2009 Joe Orton 5.3.0-3 +- update to v6 of systzdata patch; various fixes + +* Tue Jul 14 2009 Joe Orton 5.3.0-2 +- update to v5 of systzdata patch; parses zone.tab and extracts + timezone->{country-code,long/lat,comment} mapping table + +* Sun Jul 12 2009 Remi Collet 5.3.0-1 +- update to 5.3.0 +- remove ncurses, dbase, mhash extensions +- add enchant, sqlite3, intl, phar, fileinfo extensions +- raise sqlite version to 3.6.0 (for sqlite3, build with --enable-load-extension) +- sync with upstream "production" php.ini -* Wed Apr 15 2009 Joe Orton 5.2.9-2.el5s2 -- update to r3 of systzdata patch +* Sat Jun 21 2009 Remi Collet 5.2.10-1 +- update to 5.2.10 +- add interbase sub-package -* Tue Apr 14 2009 Joe Orton 5.2.9-1.el5s2 +* Sat Feb 28 2009 Remi Collet - 5.2.9-1 - update to 5.2.9 -* Tue Mar 31 2009 Joe Orton 5.2.6-4.el5s2 -- add security fixes for json_decode() crash (#494530), - and CVE-2008-5658 - including regression fix (#494531) - -* Thu Feb 26 2009 Joe Orton 5.2.6-3.el5s2 -- add security fixes for CVE-2008-3658, CVE-2008-3660, - CVE-2008-5498, CVE-2008-5557, CVE-2008-5814, CVE-2009-0754 - (#487371) +* Thu Feb 26 2009 Fedora Release Engineering - 5.2.8-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Feb 5 2009 Joe Orton 5.2.8-9 +- add recode support, -recode subpackage (#106755) +- add -zts subpackage with ZTS-enabled build of httpd SAPI +- adjust php.conf to use -zts SAPI build for worker MPM + +* Wed Feb 4 2009 Joe Orton 5.2.8-8 +- fix patch fuzz, renumber patches + +* Wed Feb 4 2009 Joe Orton 5.2.8-7 +- drop obsolete configure args +- drop -odbc patch (#483690) -* Fri May 9 2008 Joe Orton 5.2.6-2.el5s2 +* Mon Jan 26 2009 Joe Orton 5.2.8-5 +- split out sysvshm, sysvsem, sysvmsg, posix into php-process + +* Sun Jan 25 2009 Joe Orton 5.2.8-4 +- move wddx to php-xml, build curl shared in -common +- remove BR for expat-devel, bogus configure option + +* Fri Jan 23 2009 Joe Orton 5.2.8-3 +- rebuild for new MySQL + +* Sat Dec 13 2008 Remi Collet 5.2.8-2 +- libtool 2 workaround for phpize (#476004) +- add missing php_embed.h (#457777) + +* Tue Dec 09 2008 Remi Collet 5.2.8-1 +- update to 5.2.8 + +* Sat Dec 06 2008 Remi Collet 5.2.7-1.1 +- libtool 2 workaround + +* Fri Dec 05 2008 Remi Collet 5.2.7-1 +- update to 5.2.7 +- enable pdo_dblib driver in php-mssql + +* Mon Nov 24 2008 Joe Orton 5.2.6-7 +- tweak Summary, thanks to Richard Hughes + +* Tue Nov 4 2008 Joe Orton 5.2.6-6 +- move gd_README to php-gd +- update to r4 of systzdata patch; introduces a default timezone + name of "System/Localtime", which uses /etc/localtime (#469532) + +* Sat Sep 13 2008 Remi Collet 5.2.6-5 +- enable XPM support in php-gd +- Fix BR for php-gd + +* Sun Jul 20 2008 Remi Collet 5.2.6-4 +- enable T1lib support in php-gd + +* Mon Jul 14 2008 Joe Orton 5.2.6-3 - update to 5.2.6 +- sync default php.ini with upstream +- drop extension_dir from default php.ini, rely on hard-coded + default, to make php-common multilib-safe (#455091) +- update to r3 of systzdata patch + +* Thu Apr 24 2008 Joe Orton 5.2.5-7 +- split pspell extension out into php-spell (#443857) -* Wed Feb 20 2008 Joe Orton 5.2.5-1.el5s2 -- rebuild for StackV2 +* Tue Feb 19 2008 Fedora Release Engineering - 5.2.5-6 +- Autorebuild for GCC 4.3 * Fri Jan 11 2008 Joe Orton 5.2.5-5 - ext/date: use system timezone database