#
# 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
%bcond_without curl # without CURL extension module
%bcond_without filter # without filter extension module
%bcond_without enchant # without Enchant extension module
%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
%undefine with_filter
%endif
-%define orgname php
-%if "%{pld_release}" == "ac_"
-%define php_suffix 53
-%else
-%define php_suffix %{nil}
+%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
+%endif
%endif
-%define rel 1
+%define rel 12
+%define orgname php
+%define ver_suffix 53
+%define php_suffix %{!?with_default_php:%{ver_suffix}}
Summary: PHP: Hypertext Preprocessor
Summary(fr.UTF-8): Le langage de script embarque-HTML PHP
Summary(pl.UTF-8): Język skryptowy PHP
Summary(ru.UTF-8): PHP Версии 5 - язык препроцессирования HTML-файлов, выполняемый на сервере
Summary(uk.UTF-8): PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері
Name: %{orgname}%{php_suffix}
-Version: 5.3.19
+Version: 5.3.29
Release: %{rel}%{?with_type_hints:.th}%{?with_oci8:.oci}
Epoch: 4
License: PHP
Group: Libraries
Source0: http://www.php.net/distributions/%{orgname}-%{version}.tar.bz2
-# Source0-md5: e1d2a3ec7849d4b3032bd1abf1916aa4
+# 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
%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
Patch45: %{orgname}-imap-annotations.patch
Patch46: %{orgname}-imap-myrights.patch
Patch47: suhosin.patch
+Patch48: php-bug-60598.patch
Patch49: %{orgname}-m4-divert.patch
Patch50: extension-shared-optional-dep.patch
Patch51: spl-shared.patch
Patch65: system-libzip.patch
Patch66: %{orgname}-db.patch
Patch67: php-litespeed.patch
-Patch68: php-test.patch
+Patch68: x32.patch
+Patch69: fpm-conf-split.patch
+Patch70: mysql-lib-ver-mismatch.patch
+# 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
+Patch238: php-5.3.3-CVE-2014-2270.patch
+Patch247: php-5.3.3-CVE-2014-2497.patch
+Patch248: php-5.3.3-CVE-2014-3587.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
+Patch255: php-5.3.3-CVE-2014-3710.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}
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}
BuildRequires: mysql-devel
%{?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
%define jsonver 1.2.1
%define pharver 2.0.1
%define sqlitever 2.0-dev
+%define sqlite3ver 0.7-dev
%define zipver 1.11.0
%define zend_zts %{!?with_zts:0}%{?with_zts:1}
%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
Summary: PHP DSO module for Apache 1.3.x
Summary(pl.UTF-8): Moduł DSO (Dynamic Shared Object) PHP dla Apache 1.3.x
Group: Development/Languages/PHP
-Requires(triggerpostun): sed >= 4.0
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: apache1(EAPI) >= 1.3.33-2
Requires: apache1-mod_mime
Provides: webserver(php) = %{version}
Obsoletes: apache-mod_php < 1:4.1.1
+Obsoletes: apache1-mod_php < 4:5.3.28-7
Obsoletes: phpfi
%description -n apache1-mod_%{name}
Requires: apache(modules-api) = %{apache_modules_api}
Requires: apache-mod_mime
Provides: webserver(php) = %{version}
+Obsoletes: apache-mod_php < 4:5.3.28-7
Obsoletes: phpfi
%description -n apache-mod_%{name}
Summary(pl.UTF-8): PHP dla serwera HTTP litespeed
Group: Development/Languages/PHP
Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Provides: php(litespeed)
Provides: webserver(php) = %{version}
+Obsoletes: php-litespeed < 4:5.3.28-7
%description litespeed
PHP for litespeed HTTP server.
Provides: %{name}-fcgi = %{epoch}:%{version}-%{release}
Provides: php(cgi)
Provides: php(fcgi)
-Provides: webserver(php)
+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.
Summary(pl.UTF-8): PHP jako interpreter działający z linii poleceń
Group: Development/Languages/PHP
Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Obsoletes: php-cli < 4:5.3.28-7
%description cli
PHP as CLI interpreter.
Summary(pl.UTF-8): Biblioteka PHP do osadzania w aplikacjach
Group: Libraries
Requires: %{name}-common = %{epoch}:%{version}-%{release}
+Obsoletes: php-embedded < 4:5.3.28-7
%description embedded
The php-embedded package contains a library which can be embedded into
Group: Development/Languages/PHP
Requires: %{name}-cli = %{epoch}:%{version}-%{release}
Obsoletes: /usr/bin/php
+Obsoletes: php-program < 4:5.3.28-7
%description program
Package providing /usr/bin/php symlink to PHP CLI.
Requires(pre): /usr/sbin/useradd
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: rc-scripts
+Provides: php(fpm)
Provides: user(http)
Provides: webserver(php) = %{version}
+Obsoletes: php-fpm < 4:5.3.28-7
%description fpm
PHP FastCGI Process Manager.
Requires(post): sed >= 4.0
# because of dlclose() bugs in glibc <= 2.3.4 causing SEGVs on exit
Requires: glibc >= 6:2.3.5
-Requires: php-dirs
+Requires: php-dirs >= 1.4
Requires: rpm-whiteout >= 1.28
Requires: tzdata
%if "%{pld_release}" == "ac"
Provides: php(core) = %{version}
Provides: php(date)
Provides: php(ereg)
-Provides: php(hash)
Provides: php(libxml)
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
Conflicts: rpm < 4.4.2-0.2
%else
Requires: libtool
%endif
-%{?with_embed:Requires: %{orgname}-embedded = %{epoch}:%{version}-%{release}}
+%{?with_embed:Requires: %{name}-embedded = %{epoch}:%{version}-%{release}}
%{?with_pcre:Requires: pcre-devel >= 8.10}
Requires: shtool
+Obsoletes: php-devel
Obsoletes: php-pear-devel
Obsoletes: php4-devel
Obsoletes: php52-devel
Obsoletes: php54-devel
+Obsoletes: php55-devel
%description devel
The php-devel package lets you compile dynamic extensions to PHP.
URL: http://www.php.net/manual/en/book.bc.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(bcmath)
+Obsoletes: php-bcmath < 4:5.3.28-7
%description bcmath
This is a dynamic shared object (DSO) for PHP that will add bc style
Provides: php(bz2) = %{bz2ver}
Provides: php(bzip2)
Provides: php-bzip2 = %{epoch}:%{version}-%{release}
+Obsoletes: php-bz2 < 4:5.3.28-7
Obsoletes: php-bzip2 < 4:5.2.14-3
Obsoletes: php-pecl-bz2 < %{bz2ver}
URL: http://www.php.net/manual/en/book.calendar.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(calendar)
+Obsoletes: php-calendar < 4:5.3.28-7
%description calendar
This is a dynamic shared object (DSO) for PHP that will add calendar
URL: http://www.php.net/manual/en/book.ctype.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(ctype)
+Obsoletes: php-ctype < 4:5.3.28-7
%description ctype
This is a dynamic shared object (DSO) for PHP that will add ctype
URL: http://www.php.net/manual/en/book.curl.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(curl)
+Obsoletes: php-curl < 4:5.3.28-7
%description curl
This is a dynamic shared object (DSO) for PHP that will add curl
URL: http://www.php.net/manual/en/book.dba.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(dba)
+Obsoletes: php-dba < 4:5.3.28-7
%description dba
This is a dynamic shared object (DSO) for PHP that will add flat-file
# it has some compatibility functions
Provides: %{name}-domxml = %{epoch}:%{version}-%{release}
Provides: php(domxml)
+Obsoletes: php-dom < 4:5.3.28-7
Obsoletes: php-domxml <= 3:4.3.8-1
%description dom
URL: http://www.php.net/manual/en/book.exif.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(enchant) = %{enchantver}
+Obsoletes: php-enchant < 4:5.3.28-7
Obsoletes: php-pecl-enchant < %{enchantver}
%description enchant
URL: http://www.php.net/manual/en/book.exif.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(exif)
+Obsoletes: php-exif < 4:5.3.28-7
%description exif
This is a dynamic shared object (DSO) for PHP that will add EXIF tags
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-pcre = %{epoch}:%{version}-%{release}
Provides: php(fileinfo) = %{fileinfover}
+Obsoletes: php-fileinfo < 4:5.3.28-7
Obsoletes: php-mime_magic
Obsoletes: php-pecl-fileinfo < %{fileinfover}
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-pcre = %{epoch}:%{version}-%{release}
Provides: php(filter)
+Obsoletes: php-filter < 4:5.3.28-7
Obsoletes: php-pecl-filter
%description filter
URL: http://www.php.net/manual/en/book.ftp.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(ftp)
+Obsoletes: php-ftp < 4:5.3.28-7
%description ftp
This is a dynamic shared object (DSO) for PHP that will add FTP
Requires: gd(imagerotate) = 5.2.0
%endif
Provides: php(gd)
+Obsoletes: php-gd < 4:5.3.28-7
%description gd
This is a dynamic shared object (DSO) for PHP that will add GD
URL: http://www.php.net/manual/en/book.gettext.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(gettext)
+Obsoletes: php-gettext < 4:5.3.28-7
%description gettext
This is a dynamic shared object (DSO) for PHP that will add gettext
URL: http://www.php.net/manual/en/book.gmp.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(gmp)
+Obsoletes: php-gmp < 4:5.3.28-7
%description gmp
This is a dynamic shared object (DSO) for PHP that will add arbitrary
Provides: php-mhash = %{epoch}:%{version}-%{release}
Obsoletes: php-mhash < 4:5.3.0
%endif
+Obsoletes: php-hash < 4:5.3.28-7
Obsoletes: php-pecl-hash < %{hashver}
%description hash
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: iconv
Provides: php(iconv)
+Obsoletes: php-iconv < 4:5.3.28-7
%description iconv
This is a dynamic shared object (DSO) for PHP that will add iconv
Requires: %{name}-pcre = %{epoch}:%{version}-%{release}
Requires: imap-lib >= 1:2007e-2
Provides: php(imap)
+Obsoletes: php-imap < 4:5.3.28-7
%description imap
This is a dynamic shared object (DSO) for PHP that will add IMAP
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(interbase)
%{?with_interbase_inst:Autoreq: false}
+Obsoletes: php-interbase < 4:5.3.28-7
%description interbase
This is a dynamic shared object (DSO) for PHP that will add InterBase
URL: http://www.php.net/intl
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(intl) = %{intlver}
+Obsoletes: php-intl < 4:5.3.28-7
Obsoletes: php-pecl-intl < %{intlver}
%description intl
URL: http://www.php.net/manual/en/book.json.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(json) = %{jsonver}
+Obsoletes: php-json < 4:5.3.28-7
Obsoletes: php-pecl-json < %{jsonver}
%description json
URL: http://www.php.net/manual/en/book.ldap.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(ldap)
+Obsoletes: php-ldap < 4:5.3.28-7
%description ldap
This is a dynamic shared object (DSO) for PHP that will add LDAP
URL: http://www.php.net/manual/en/book.mbstring.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(mbstring)
+Obsoletes: php-mbstring < 4:5.3.28-7
%description mbstring
This is a dynamic shared object (DSO) for PHP that will add multibyte
URL: http://www.php.net/manual/en/book.mcrypt.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(mcrypt)
+Obsoletes: php-mcrypt < 4:5.3.28-7
%description mcrypt
This is a dynamic shared object (DSO) for PHP that will add mcrypt
URL: http://www.php.net/manual/en/book.mssql.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(mssql)
+Obsoletes: php-mssql < 4:5.3.28-7
%description mssql
This is a dynamic shared object (DSO) for PHP that will add MS SQL
Requires: %{name}-common = %{epoch}:%{version}-%{release}
%{?with_mysqlnd:Requires: %{name}-mysqlnd = %{epoch}:%{version}-%{release}}
Provides: php(mysql)
+Obsoletes: php-mysql < 4:5.3.28-7
%description mysql
This is a dynamic shared object (DSO) for PHP that will add MySQL
%{?with_mysqlnd:Requires: %{name}-mysqlnd = %{epoch}:%{version}-%{release}}
Requires: %{name}-spl = %{epoch}:%{version}-%{release}
Provides: php(mysqli)
+Obsoletes: php-mysqli < 4:5.3.28-7
%description mysqli
This is a dynamic shared object (DSO) for PHP that will add MySQLi
URL: http://www.php.net/manual/en/book.mysqlnd.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(mysqlnd)
+Obsoletes: php-mysqlnd < 4:5.3.28-7
%description mysqlnd
MySQL Native Driver is a replacement for the MySQL Client Library
URL: http://www.php.net/manual/en/book.oci8.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(oci8)
+Obsoletes: php-oci8 < 4:5.3.28-7
AutoReq: false
%description oci8
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: unixODBC >= 2.1.1-3
Provides: php(odbc)
+Obsoletes: php-odbc < 4:5.3.28-7
%description odbc
This is a dynamic shared object (DSO) for PHP that will add ODBC
URL: http://www.php.net/manual/en/book.openssl.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(openssl)
+Obsoletes: php-openssl < 4:5.3.28-7
%description openssl
This is a dynamic shared object (DSO) for PHP that will add OpenSSL
URL: http://www.php.net/manual/en/book.pcntl.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(pcntl)
+Obsoletes: php-pcntl < 4:5.3.28-7
%description pcntl
This is a dynamic shared object (DSO) for PHP that will add process
Group: Libraries
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(pcre)
+Obsoletes: php-pcre < 4:5.3.28-7
%description pcre
This is a dynamic shared object (DSO) for PHP that will add Perl
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-spl = %{epoch}:%{version}-%{release}
Provides: php(pdo)
+Obsoletes: php-pdo < 4:5.3.28-7
Obsoletes: php-pecl-PDO
%description pdo
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-pdo = %{epoch}:%{version}-%{release}
Provides: php(dblib)
+Obsoletes: php-pdo-dblib < 4:5.3.28-7
%description pdo-dblib
This is a dynamic shared object (DSO) for PHP that will add PDO
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-pdo = %{epoch}:%{version}-%{release}
Provides: php(pdo-firebird)
+Obsoletes: php-pdo-firebird < 4:5.3.28-7
Obsoletes: php-pecl-PDO_FIREBIRD
%description pdo-firebird
%{?with_mysqlnd:Requires: %{name}-mysqlnd = %{epoch}:%{version}-%{release}}
Requires: %{name}-pdo = %{epoch}:%{version}-%{release}
Provides: php(pdo-mysql)
+Obsoletes: php-pdo-mysql < 4:5.3.28-7
Obsoletes: php-pecl-PDO_MYSQL
%description pdo-mysql
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-pdo = %{epoch}:%{version}-%{release}
Provides: php(pdo-oci)
+Obsoletes: php-pdo-oci < 4:5.3.28-7
Obsoletes: php-pecl-PDO_OCI
%description pdo-oci
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-pdo = %{epoch}:%{version}-%{release}
Provides: php(pdo-odbc)
+Obsoletes: php-pdo-odbc < 4:5.3.28-7
Obsoletes: php-pecl-PDO_ODBC
%description pdo-odbc
Requires: %{name}-pdo = %{epoch}:%{version}-%{release}
Provides: php(pdo-pgsql)
Provides: php-pecl-PDO_PGSQL
+Obsoletes: php-pdo-pgsql < 4:5.3.28-7
Obsoletes: php-pecl-PDO_PGSQL < 4:5.2.1-2
%description pdo-pgsql
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-pdo = %{epoch}:%{version}-%{release}
Provides: php(pdo-sqlite)
+Obsoletes: php-pdo-sqlite < 4:5.3.28-7
Obsoletes: php-pecl-PDO_SQLITE
%description pdo-sqlite
URL: http://www.php.net/manual/en/book.pgsql.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(pgsql)
+Obsoletes: php-pgsql < 4:5.3.28-7
%description pgsql
This is a dynamic shared object (DSO) for PHP that will add PostgreSQL
URL: http://www.php.net/manual/en/book.phar.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-spl = %{epoch}:%{version}-%{release}
+Suggests: %{name}-cli
# zlib is required by phar program, but as phar cli is optional should the dep be too
Suggests: %{name}-zlib
-Suggests: php-program
Provides: php(phar) = %{pharver}
Obsoletes: php-pecl-phar < %{pharver}
+Obsoletes: php-phar < 4:5.3.28-7
+Conflicts: php-ioncube < 4.0.9
%description phar
This is a dynamic shared object (DSO) for PHP that will add phar
URL: http://www.php.net/manual/en/book.posix.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(posix)
+Obsoletes: php-posix < 4:5.3.28-7
%description posix
This is a dynamic shared object (DSO) for PHP that will add POSIX
URL: http://www.php.net/manual/en/book.pspell.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(pspell)
+Obsoletes: php-pspell < 4:5.3.28-7
%description pspell
This is a dynamic shared object (DSO) for PHP that will add pspell
URL: http://www.php.net/manual/en/book.readline.php
Requires: %{name}-cli = %{epoch}:%{version}-%{release}
Provides: php(readline)
+Obsoletes: php-readline < 4:5.3.28-7
%description readline
This PHP module adds support for readline functions (only for cli and
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: recode >= 3.5d-3
Provides: php(recode)
+Obsoletes: php-recode < 4:5.3.28-7
%description recode
This is a dynamic shared object (DSO) for PHP that will add recode
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-spl = %{epoch}:%{version}-%{release}
Suggests: %{name}-hash = %{epoch}:%{version}-%{release}
+Suggests: tmpwatch
Provides: php(session)
+Obsoletes: php-session < 4:5.3.28-7
%description session
This is a dynamic shared object (DSO) for PHP that will add session
URL: http://www.php.net/manual/en/book.shmop.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(shmop)
+Obsoletes: php-shmop < 4:5.3.28-7
%description shmop
This is a dynamic shared object (DSO) for PHP that will add Shared
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-spl = %{epoch}:%{version}-%{release}
Provides: php(simplexml)
+Obsoletes: php-simplexml < 4:5.3.28-7
%description simplexml
This is a dynamic shared object (DSO) for PHP that will add Simple XML
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-sockets = %{epoch}:%{version}-%{release}
Provides: php(snmp)
+Obsoletes: php-snmp < 4:5.3.28-7
%description snmp
This is a dynamic shared object (DSO) for PHP that will add SNMP
URL: http://www.php.net/manual/en/book.soap.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(soap)
+Obsoletes: php-soap < 4:5.3.28-7
%description soap
This is a dynamic shared object (DSO) for PHP that will add SOAP/WSDL
URL: http://www.php.net/manual/en/book.sockets.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(sockets)
+Obsoletes: php-sockets < 4:5.3.28-7
%description sockets
This is a dynamic shared object (DSO) for PHP that will add sockets
Requires: %{name}-pcre = %{epoch}:%{version}-%{release}
Requires: %{name}-simplexml = %{epoch}:%{version}-%{release}
Provides: php(spl)
+Obsoletes: php-spl < 4:5.3.28-7
%description spl
This is a dynamic shared object (DSO) for PHP that will add Standard
Requires: %{name}-spl = %{epoch}:%{version}-%{release}
Provides: php(sqlite) = %{sqlitever}
Obsoletes: php-pecl-SQLite < %{sqlitever}
+Obsoletes: php-sqlite < 4:5.3.28-7
%description sqlite
SQLite is a C library that implements an embeddable SQL database
Group: Libraries
URL: http://php.net/manual/en/book.sqlite3.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
-Provides: php(sqlite3)
+Provides: php(sqlite3) = %{sqlite3ver}
+Obsoletes: php-sqlite3 < 4:5.3.28-7
%description sqlite3
SQLite is a C library that implements an embeddable SQL database
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(sybase-ct)
Obsoletes: php-sybase
+Obsoletes: php-sybase-ct < 4:5.3.28-7
%description sybase-ct
This is a dynamic shared object (DSO) for PHP that will add Sybase and
URL: http://www.php.net/manual/en/book.sem.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(sysvmsg)
+Obsoletes: php-sysvmsg < 4:5.3.28-7
%description sysvmsg
This is a dynamic shared object (DSO) for PHP that will add SysV
URL: http://www.php.net/manual/en/book.sem.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(sysvsem)
+Obsoletes: php-sysvsem < 4:5.3.28-7
%description sysvsem
This is a dynamic shared object (DSO) for PHP that will add SysV
URL: http://www.php.net/manual/en/book.shmop.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(sysvshm)
+Obsoletes: php-sysvshm < 4:5.3.28-7
%description sysvshm
This is a dynamic shared object (DSO) for PHP that will add SysV
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: tidy
Provides: php(tidy)
+Obsoletes: php-tidy < 4:5.3.28-7
%description tidy
This is a dynamic shared object (DSO) for PHP that will add Tidy
URL: http://www.php.net/manual/en/book.tokenizer.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(tokenizer)
+Obsoletes: php-tokenizer < 4:5.3.28-7
%description tokenizer
This is a dynamic shared object (DSO) for PHP that will add tokenizer
#Requires: %{name}-session = %{epoch}:%{version}-%{release}
Requires: %{name}-xml = %{epoch}:%{version}-%{release}
Provides: php(wddx)
+Obsoletes: php-wddx < 4:5.3.28-7
%description wddx
This is a dynamic shared object (DSO) for PHP that will add wddx
URL: http://www.php.net/manual/en/book.xml.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(xml)
+Obsoletes: php-xml < 4:5.3.28-7
%description xml
This is a dynamic shared object (DSO) for PHP that will add XML
Group: Libraries
URL: http://www.php.net/manual/en/book.xmlreader.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
-Suggests: %{name}-dom = %{epoch}:%{version}-%{release}
+Requires: %{name}-dom = %{epoch}:%{version}-%{release}
Provides: php(xmlreader)
+Obsoletes: php-xmlreader < 4:5.3.28-7
%description xmlreader
This is a dynamic shared object (DSO) for PHP that will add XML Reader
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-xml = %{epoch}:%{version}-%{release}
Provides: php(xmlrpc)
+Obsoletes: php-xmlrpc < 4:5.3.28-7
%description xmlrpc
This is a dynamic shared object (DSO) for PHP that will add XMLRPC
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(xmlwriter)
Obsoletes: php-pecl-xmlwriter
+Obsoletes: php-xmlwriter < 4:5.3.28-7
%description xmlwriter
This extension wraps the libxml xmlWriter API. Represents a writer
Requires: libxslt >= 1.0.18
# actually not true, functionality is similar, but API differs
Provides: php(xsl)
+Obsoletes: php-xsl < 4:5.3.28-7
Obsoletes: php-xslt <= 3:4.3.8-1
%description xsl
%{?with_system_libzip:Requires: libzip >= 0.10-3}
Provides: php(zip) = %{zipver}
Obsoletes: php-pecl-zip < %{zipver}
+Obsoletes: php-zip < 4:5.3.28-7
%description zip
Zip is an extension to create, modify and read zip files.
URL: http://www.php.net/manual/en/book.zlib.php
Requires: %{name}-common = %{epoch}:%{version}-%{release}
Provides: php(zlib)
+Obsoletes: php-zlib < 4:5.3.28-7
%description zlib
This is a dynamic shared object (DSO) for PHP that will add zlib
%prep
%setup -q -n %{orgname}-%{version}
-# prep for suhosin patch
-%{__sed} -i -e 's,\r$,,' Zend/Zend.dsp Zend/ZendTS.dsp
%patch0 -p1
%patch1 -p1
%patch2 -p1
%if %{with type_hints}
%patch12 -p0
%endif
+%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch17 -p1
%patch38 -p1
%patch39 -p1
%if %{with fpm}
+%patch69 -p1
%patch41 -p1
%patch42 -p1
%endif
%if %{with suhosin}
%patch47 -p1
%endif
+%patch48 -p1
%patch49 -p1
%patch50 -p1
%patch51 -p1
gzip -dc %{SOURCE15} | tar xf - -C sapi/
%patch67 -p1
%patch68 -p1
+%patch70 -p1
+
+%patch220 -p1
+%patch238 -p1
+%patch247 -p1
+%patch248 -p1
+%patch249 -p1
+%patch250 -p1
+%patch251 -p1
+%patch252 -p1
+%patch253 -p1
+%patch254 -p1
+%patch255 -p1
+%patch256 -p1
+%patch257 -p1
+%patch258 -p1
sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
: Update the pharver macro and rebuild.
exit 1
fi
+ver=$(sed -n '/#define PHP_SQLITE3_VERSION/{s/.* "//;s/".*$//;p}' ext/sqlite3/php_sqlite3.h)
+if test "$ver" != "%{sqlite3ver}"; then
+ : Error: Upstream Sqlite3 version is now ${ver}, expecting %{sqlite3ver}.
+ : Update the sqlite3ver 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}.
if [ ! -f _built-conf ]; then
# now remove Makefile copies
rm -f Makefile.{cgi-fcgi,fpm,cli,apxs1,apxs2,litespeed}
+ # force regeneration
+ touch Zend/zend_language_parser.y
%{__libtoolize}
%{__aclocal}
cp -f /usr/share/automake/config.* .
%{?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} \
%{?with_mysqlnd:--with-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} \
cp -pf php_config.h.cli main/php_config.h
cp -pf Makefile.cli Makefile
%{__make} install \
+ phpbuilddir=%{_libdir}/%{name}/build \
INSTALL_ROOT=$RPM_BUILD_ROOT
# make link relative
ln -sfn phar.phar $RPM_BUILD_ROOT%{_bindir}/phar
+# version suffix
+v=$(echo %{version} | cut -d. -f1-2)
+
# install Apache1 DSO module
%if %{with apache1}
libtool --mode=install install -p sapi/apache/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache1
+mv $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5{,-$v}.so
+ln -s libphp5-$v.so $RPM_BUILD_ROOT%{_libdir}/apache1/libphp5.so
%endif
# install Apache2 DSO module
%if %{with apache2}
libtool --mode=install install -p sapi/apache2handler/libphp5.la $RPM_BUILD_ROOT%{_libdir}/apache
+mv $RPM_BUILD_ROOT%{_libdir}/apache/libphp5{,-$v}.so
+ln -s libphp5-$v.so $RPM_BUILD_ROOT%{_libdir}/apache/libphp5.so
%endif
# install litespeed sapi
libtool --mode=install install -p sapi/fpm/php-fpm $RPM_BUILD_ROOT%{_sbindir}/%{name}-fpm
cp -p sapi/fpm/php-fpm.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}-fpm.8
cp -p sapi/fpm/php-fpm.conf $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p sapi/fpm/php-fpm.conf-d $RPM_BUILD_ROOT%{_sysconfdir}/fpm.d/www.conf
cp -p sapi/fpm/status.html $RPM_BUILD_ROOT%{_datadir}/fpm
install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-fpm
install -d $RPM_BUILD_ROOT/etc/logrotate.d
cp -p %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-fpm
+%if "%{pld_release}" == "ac"
+%{__sed} -i -e '/su/d' $RPM_BUILD_ROOT/etc/logrotate.d/%{name}-fpm
+%endif
%{__sed} -i -e '
s#/usr/lib/php#%{php_extensiondir}#
s#/etc/php#%{_sysconfdir}#
s#@processname@#%{name}-fpm#g
-' $RPM_BUILD_ROOT{/etc/{rc.d/init.d/%{name}-fpm,logrotate.d/%{name}-fpm},%{_sysconfdir}/php-fpm.conf}
+' $RPM_BUILD_ROOT{/etc/{rc.d/init.d/%{name}-fpm,logrotate.d/%{name}-fpm},%{_sysconfdir}/php-fpm.conf,%{_sysconfdir}/fpm.d/www.conf}
%endif
# install Embedded API
%endif
# install CLI
-libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php.cli
-cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/php.1
-echo ".so php.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.cli.1
-ln -sf php.cli $RPM_BUILD_ROOT%{_bindir}/php
+# versioned suffix is always installed
+libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/php%{ver_suffix}
+cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/php%{ver_suffix}.1
+echo ".so php%{ver_suffix}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1
+ln -sf php%{ver_suffix} $RPM_BUILD_ROOT%{_bindir}/php
-sed -e 's#%{_prefix}/lib/php#%{_libdir}/php#g' php.ini > $RPM_BUILD_ROOT%{_sysconfdir}/php.ini
+# .cli extension is installed only if default php.spec in distro for legacy purposes
+%if "%{?php_suffix}" == "" && "%{pld_release}" != "ac"
+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
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}/php/build
- for i in libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4; do
- ln -snf %{_aclocaldir}/${i} $RPM_BUILD_ROOT%{_libdir}/php/build
- done
- ln -snf %{_datadir}/libtool/config/ltmain.sh $RPM_BUILD_ROOT%{_libdir}/php/build
-%else
- ln -snf %{_aclocaldir}/libtool.m4 $RPM_BUILD_ROOT%{_libdir}/php/build
- ln -snf %{_datadir}/libtool/ltmain.sh $RPM_BUILD_ROOT%{_libdir}/php/build
-%endif
-ln -snf %{_bindir}/shtool $RPM_BUILD_ROOT%{_libdir}/php/build
+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
install -d $RPM_BUILD_ROOT%{_includedir}/php/ext/mbstring
sed -i -e "/dependency_libs/ s,/[^ ]*/libs/libphp_common.la,%{_libdir}/libphp_common.la," $RPM_BUILD_ROOT%{_libdir}/libphp5.la
%endif
# better solution?
-sed -i -e 's|libphp_common.la|$(libdir)/libphp_common.la|' $RPM_BUILD_ROOT%{_libdir}/php/build/acinclude.m4
+sed -i -e 's|libphp_common.la|$(libdir)/libphp_common.la|' $RPM_BUILD_ROOT%{_libdir}/%{name}/build/acinclude.m4
%clean
rm -rf $RPM_BUILD_ROOT
[ ! -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 -- php-common < 4:5.3.28-7
+# migrate configs /etc/php/conf.d -> /etc/phpXY/conf.d/
+# do config migration in php-common trigger, as the trigger is ran after all packages are upgraded
+# this way we can stick to one trigger, instead of attaching one for each (sub)package!
+for f in /etc/php/*.ini.rpmsave /etc/php/*.d/*.ini.rpmsave; do
+ test -f "$f" || continue
+ bn=${f#/etc/php/}
+ dn=${bn%/*}
+ fn=${bn#*/}
+ test "$dn" = "$fn" && dn=
+ fn=${fn%.rpmsave}
+ nf=%{_sysconfdir}/$dn/$fn
+ test -f "$nf" || continue
+ cp -vf $nf{,.rpmnew}
+ mv -vf $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 \
%dir %{_sysconfdir}/apache.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache.ini
%attr(755,root,root) %{_libdir}/apache1/libphp5.so
+%attr(755,root,root) %{_libdir}/apache1/libphp5-*.*.so
%endif
%if %{with apache2}
%dir %{_sysconfdir}/apache2handler.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-apache2handler.ini
%attr(755,root,root) %{_libdir}/apache/libphp5.so
+%attr(755,root,root) %{_libdir}/apache/libphp5-*.*.so
%endif
%if %{with litespeed}
%defattr(644,root,root,755)
%dir %{_sysconfdir}/cli.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-cli.ini
+%attr(755,root,root) %{_bindir}/php%{ver_suffix}
+%{_mandir}/man1/php%{ver_suffix}.1*
+
+# legacy. do we really need it?
+%if "%{?php_suffix}" == "" && "%{pld_release}" != "ac"
%attr(755,root,root) %{_bindir}/php.cli
-%{_mandir}/man1/php.cli.1*
+%endif
%files program
%defattr(644,root,root,755)
%doc sapi/fpm/{CREDITS,LICENSE}
%dir %{_sysconfdir}/fpm.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php-fpm.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpm.d/www.conf
%attr(755,root,root) %{_sbindir}/%{name}-fpm
%{_mandir}/man8/%{name}-fpm.8*
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}-fpm
%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}
%attr(755,root,root) %{_libdir}/libphp_common.so
%{_libdir}/libphp_common.la
%{_includedir}/php
-%{_libdir}/php/build
+%{_libdir}/%{name}/build
%{_mandir}/man1/php-config.1*
%{_mandir}/man1/phpize.1*
%if %{with embed}
%files dba
%defattr(644,root,root,755)
+%doc ext/dba/{CREDITS,README}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/dba.ini
%attr(755,root,root) %{php_extensiondir}/dba.so
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/dom.ini
%attr(755,root,root) %{php_extensiondir}/dom.so
+%if %{with enchant}
%files enchant
%defattr(644,root,root,755)
%doc ext/enchant/{CREDITS,docs/examples}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/enchant.ini
%attr(755,root,root) %{php_extensiondir}/enchant.so
+%endif
%files exif
%defattr(644,root,root,755)
%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}
%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