--- rpms/php/sme8/php.spec 2010/02/06 20:36:50 1.1 +++ rpms/php/sme8/php.spec 2011/06/20 19:27:01 1.3 @@ -1,13 +1,25 @@ -%define contentdir /var/www -%define apiver 20041225 -%define zendver 20060613 -%define pdover 20060511 +%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 -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: 1%{?dist}.1 +License: PHP and LGPLv2 and LGPLv2+ Group: Development/Languages URL: http://www.php.net/ @@ -16,41 +28,49 @@ 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 # 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.2-r305570.patch +Patch101: php-5.3.3-r305043.patch + +# Fixes for security bugs +Patch207: php-5.3.2-CVE-2010-3709.patch +Patch208: php-5.3.2-CVE-2010-3870.patch +Patch209: php-5.3.3-CVE-2010-4156.patch +Patch210: php-5.3.3-CVE-2010-3710.patch +Patch211: php-5.3.2-CVE-2010-4645.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} +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 @@ -68,9 +88,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}, php-cli = %{version}-%{release} +Provides: php-pcntl %description cli The php-cli package contains the command-line interface @@ -81,24 +101,28 @@ Group: Development/Languages Summary: Common files for PHP Provides: php-api = %{apiver}, php-zend-abi = %{zendver} Provides: php(api) = %{apiver}, php(zend-abi) = %{zendver} +Conflicts: php-common # 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 +# 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} %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: php-devel = %{version}-%{release} %description devel The php-devel package contains the files needed for building PHP @@ -108,24 +132,17 @@ 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 %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 %description ldap @@ -139,12 +156,12 @@ 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 %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. @@ -152,9 +169,8 @@ 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 %description mysql @@ -167,9 +183,8 @@ 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 %description pgsql @@ -181,12 +196,22 @@ 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 + +%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 %description odbc @@ -200,7 +225,7 @@ 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 @@ -211,7 +236,7 @@ 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 %description snmp @@ -223,9 +248,8 @@ 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 %description xml @@ -236,8 +260,7 @@ 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} %description xmlrpc The php-xmlrpc package contains a dynamic shared object that will add @@ -246,27 +269,18 @@ 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} %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 %description gd The php-gd package contains a dynamic shared object that will add @@ -275,7 +289,7 @@ 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} %description bcmath The php-bcmath package contains a dynamic shared object that will add @@ -284,38 +298,67 @@ 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} %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 + +%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 + +%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 +%patch4 -p1 -b .phpize64 +%patch5 -p1 -b .includedir +%patch8 -p1 -b .aconf26x + +%patch20 -p1 -b .shutdown + +%patch40 -p1 -b .dlopen +%patch41 -p1 -b .easter +%patch42 -p1 -b .systzdata -%patch51 -p1 -b .tests-wddx +%patch61 -p1 -b .tests-wddx +%patch62 -p1 -b .testfail + +%patch100 -p1 -b .r305570 +%patch101 -p1 -b .r305043 + +%patch207 -p1 -b .cve3709 +%patch208 -p1 -b .cve3870 + +%patch209 -p1 -b .cve4156 +%patch210 -p1 -b .cve3710 +%patch211 -p1 -b .cve4645 # 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+") @@ -326,6 +369,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 @@ -349,12 +398,46 @@ 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 {} \; +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" @@ -383,10 +466,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 \ @@ -394,9 +477,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 \ @@ -405,22 +485,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 @@ -437,43 +509,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 @@ -486,7 +568,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 @@ -499,12 +581,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/ @@ -512,26 +591,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 @@ -553,15 +634,18 @@ 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}/" \ < $RPM_SOURCE_DIR/macros.php > macros.php install -m 644 -c macros.php \ @@ -570,7 +654,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} @@ -588,8 +673,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-* %config(noreplace) %{_sysconfdir}/php.ini %dir %{_sysconfdir}/php.d %dir %{_libdir}/php @@ -602,6 +688,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 @@ -624,37 +712,205 @@ 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 +* Wed Jan 19 2011 Joe Orton - 5.3.3-1.1 +- add security fixes for CVE-2010-3710, CVE-2010-4156, + CVE-2010-4645 (#670463) -* Wed Apr 15 2009 Joe Orton 5.2.9-2.el5s2 -- update to r3 of systzdata patch +* 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 Apr 14 2009 Joe Orton 5.2.9-1.el5s2 +* 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 + +* Sat Jun 21 2009 Remi Collet 5.2.10-1 +- update to 5.2.10 +- add interbase sub-package + +* 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) + +* 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 -* Fri May 9 2008 Joe Orton 5.2.6-2.el5s2 +* 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