X-Git-Url: http://git.pld-linux.org/?p=packages%2Fphp.git;a=blobdiff_plain;f=php.spec;h=5b7bad3bf8379ccc464a2919832f31bdbf7e6cbc;hp=a876e1f04fb061fb1a5cbb2a16a47be9ad7f6ad1;hb=23da4bbc2c744a200bcf729fd3fb3c47fbbfd88d;hpb=bde3c0d32dcc51f8ed7a225e727564eda956cf53 diff --git a/php.spec b/php.spec index a876e1f..5b7bad3 100644 --- a/php.spec +++ b/php.spec @@ -28,10 +28,11 @@ # # 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 @@ -41,7 +42,7 @@ %bcond_without litespeed # build litespeed module %bcond_without ldap # without LDAP extension module %bcond_without mhash # without mhash extension (supported by hash extension) -%bcond_without mm # without mm support for session storage +%bcond_with mm # without mm support for session storage %bcond_without mssql # without MS SQL extension module # don't turn it on by default; see TODO item for mysqlnd in this spec %bcond_with mysqlnd # with mysqlnd support in mysql related extensions @@ -89,12 +90,12 @@ %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 @@ -110,14 +111,18 @@ ERROR: You need to select at least one Apache SAPI to build shared modules. %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 14 +%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 @@ -125,19 +130,20 @@ Summary(pt_BR.UTF-8): A linguagem de script PHP Summary(ru.UTF-8): PHP Версии 5 - язык препроцессирования HTML-файлов, выполняемый на сервере Summary(uk.UTF-8): PHP Версії 5 - мова препроцесування HTML-файлів, виконувана на сервері Name: %{orgname}%{php_suffix} -Version: 5.3.21 +Version: 5.3.29 Release: %{rel}%{?with_type_hints:.th}%{?with_oci8:.oci} Epoch: 4 -License: PHP +# All files licensed under PHP version 3.01, except +# Zend is licensed under Zend +# TSRM is licensed under BSD +License: PHP 3.01 and Zend and BSD Group: Libraries Source0: http://www.php.net/distributions/%{orgname}-%{version}.tar.bz2 -# Source0-md5: 1b214fc19bb5f5c0902ba27c74d5f4a2 +# 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 @@ -160,6 +166,7 @@ Patch11: embed.patch %if %{with type_hints} Patch12: http://ilia.ws/patch/type_hint_53_v2.txt %endif +Patch13: bug-test-pcntl-55479.patch Patch14: %{orgname}-no_pear_install.patch Patch15: %{orgname}-zlib.patch Patch17: %{orgname}-readline.patch @@ -188,6 +195,7 @@ Patch44: %{orgname}-include_path.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 @@ -202,7 +210,33 @@ Patch64: %{orgname}-m4.patch Patch65: system-libzip.patch Patch66: %{orgname}-db.patch Patch67: php-litespeed.patch -Patch68: file-magic.patch +Patch68: x32.patch +Patch69: fpm-conf-split.patch +Patch70: mysql-lib-ver-mismatch.patch +# git clone git://github.com/php/php-src.git && git checkout PHP_5_6 +# git diff php-5.3.29..PHP-5.6 ./ext/fileinfo/libmagic > ~/rpm/packages/php/php-fileinfo.patch +# git diff php-5.3.29..PHP-5.6 ./ext/fileinfo/config.m4 >> ~/rpm/packages/php/php-fileinfo.patch +# git diff php-5.3.29..PHP-5.6 ./ext/fileinfo/Makefile.frag >> ~/rpm/packages/php/php-fileinfo.patch +# git diff php-5.3.29..PHP-5.6 ./ext/fileinfo/data_file.c >> ~/rpm/packages/php/php-fileinfo.patch +Patch71: php-fileinfo.patch +# Patch71-md5: 771e4934132c5f5c968248c954d1ef6e +# Fixes for security bugs +# https://repo.webtatic.com/yum/centos/5/SRPMS/repoview/php.html +# also from RHEL6/CentOS7 +Patch220: php-5.3.3-CVE-2011-4153.patch + +Patch247: php-5.3.3-CVE-2014-2497.patch + +Patch249: php-5.3.29-CVE-2014-3597.patch +Patch250: php-5.3.3-CVE-2014-4698.patch +Patch251: php-5.3.3-CVE-2014-4670.patch +Patch252: php-5.3.3-CVE-2014-3668.patch +Patch253: php-5.3.3-CVE-2014-3669.patch +Patch254: php-5.3.3-CVE-2014-3670.patch + +Patch256: php-5.3.29-CVE-2014-8142.patch +Patch257: php-5.3.29-CVE-2015-0231.patch +Patch258: php-5.3.29-CVE-2015-0232.patch URL: http://www.php.net/ %{?with_interbase:%{!?with_interbase_inst:BuildRequires: Firebird-devel >= 1.0.2.908-2}} %{?with_pspell:BuildRequires: aspell-devel >= 2:0.50.0} @@ -215,7 +249,6 @@ BuildRequires: cyrus-sasl-devel BuildRequires: db-devel >= 4.0 BuildRequires: elfutils-devel %{?with_enchant:BuildRequires: enchant-devel >= 1.1.3} -#BuildRequires: fcgi-devel BuildRequires: file %{?with_kerberos5:BuildRequires: heimdal-devel} %{?with_system_libzip:BuildRequires: libzip-devel >= 0.10-3} @@ -238,13 +271,11 @@ BuildRequires: libjpeg-devel BuildRequires: libltdl-devel >= 1.4 BuildRequires: libmcrypt-devel >= 2.4.4 BuildRequires: libpng-devel >= 1.0.8 -#BuildRequires: libtiff-devel %if "%{pld_release}" != "ac" BuildRequires: libtool >= 2:2.2 %else BuildRequires: libtool >= 1.4.3 %endif -#BuildRequires: libwrap-devel BuildRequires: libxml2-devel >= 1:2.7.6-4 BuildRequires: libxslt-devel >= 1.1.0 %{?with_mm:BuildRequires: mm-devel >= 1.3.0} @@ -255,7 +286,7 @@ BuildRequires: openssl-devel >= 0.9.7d %{?with_gcov:BuildRequires: lcov} %{?with_snmp:%{?with_tests:BuildRequires: mibs-net-snmp}} %{?with_snmp:BuildRequires: net-snmp-devel >= 5.0.7} -%{?with_instantclient:BuildRequires: oracle-instantclient-devel} +%{?with_oci:%{?with_instantclient:BuildRequires: oracle-instantclient-devel}} BuildRequires: pam-devel %{?with_pcre:BuildRequires: pcre-devel >= 8.10} BuildRequires: pkgconfig @@ -283,9 +314,6 @@ BuildRequires: apache-devel >= 2.0.52-2 BuildRequires: apr-devel >= 1:1.0.0 BuildRequires: apr-util-devel >= 1:1.0.0 %endif -%if %{with fpm} -#BuildRequires: judy-devel -%endif BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define php_sysconfdir /etc/%{name} @@ -306,6 +334,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %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} @@ -315,7 +344,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %undefine with_ccache %endif -%if %{with oci8} +%if %{with oci} # ORACLE_HOME is required for oci8 ext to build %define _preserve_env %_preserve_env_base ORACLE_HOME %endif @@ -377,12 +406,12 @@ PHP - це мова написання скриптів, що вбудовуют 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} @@ -399,6 +428,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} 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} @@ -412,7 +442,9 @@ Summary: PHP for litespeed HTTP server 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. @@ -429,7 +461,11 @@ Provides: %{name}-fcgi = %{epoch}:%{version}-%{release} Provides: php(cgi) Provides: php(fcgi) Provides: webserver(php) = %{version} +Obsoletes: php-cgi < 4:5.3.28-7 Obsoletes: php-fcgi < 4:5.3.0 +%if "%{pld_release}" != "ac" +Conflicts: logrotate < 3.8.0 +%endif %description cgi PHP as CGI or FastCGI program. @@ -442,6 +478,7 @@ Summary: PHP as CLI interpreter 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. @@ -454,6 +491,7 @@ Summary: PHP library for embedding in applications 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 @@ -469,6 +507,7 @@ Summary(pl.UTF-8): Dowiązanie symboliczne /usr/bin/php 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. @@ -487,8 +526,10 @@ Requires(pre): /bin/id 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. @@ -526,12 +567,13 @@ Provides: %{name}-standard 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 @@ -565,13 +607,16 @@ Requires: libtool >= 2:2.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 +Obsoletes: php56-devel %description devel The php-devel package lets you compile dynamic extensions to PHP. @@ -613,6 +658,7 @@ Group: Libraries 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 @@ -631,6 +677,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} 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} @@ -648,6 +695,7 @@ Group: Libraries 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 @@ -663,6 +711,7 @@ Group: Libraries 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 @@ -678,6 +727,7 @@ Group: Libraries 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 @@ -693,6 +743,7 @@ Group: Libraries 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 @@ -712,6 +763,7 @@ Provides: php(dom) # 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 @@ -728,6 +780,7 @@ Group: Libraries 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 @@ -757,6 +810,7 @@ Group: Libraries 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 @@ -773,6 +827,7 @@ URL: http://www.php.net/manual/en/book.fileinfo.php 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} @@ -799,6 +854,7 @@ URL: http://www.php.net/manual/en/book.filter.php 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 @@ -822,6 +878,7 @@ Group: Libraries 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 @@ -842,6 +899,7 @@ Requires: gd(gif) 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 @@ -858,6 +916,7 @@ Group: Libraries 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 @@ -873,6 +932,7 @@ Group: Libraries 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 @@ -894,6 +954,7 @@ Provides: php(mhash) 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 @@ -913,6 +974,7 @@ Requires: %{_libdir}/gconv 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 @@ -931,6 +993,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} 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 @@ -950,6 +1013,7 @@ URL: http://www.php.net/manual/en/book.ibase.php 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 @@ -965,6 +1029,7 @@ Group: Libraries 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 @@ -986,6 +1051,7 @@ Group: Libraries 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 @@ -1004,6 +1070,7 @@ Group: Libraries 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 @@ -1022,6 +1089,7 @@ Group: Libraries 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 @@ -1037,6 +1105,7 @@ Group: Libraries 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 @@ -1052,6 +1121,7 @@ Group: Libraries 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 @@ -1070,6 +1140,7 @@ URL: http://www.php.net/manual/en/book.mysql.php 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 @@ -1090,6 +1161,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} %{?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 @@ -1108,6 +1180,7 @@ Group: Libraries 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 @@ -1145,6 +1218,7 @@ Group: Libraries 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 @@ -1164,6 +1238,7 @@ URL: http://www.php.net/manual/en/book.uodbc.php 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 @@ -1182,6 +1257,7 @@ Group: Libraries 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 @@ -1197,6 +1273,7 @@ Group: Libraries 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 @@ -1213,6 +1290,7 @@ Summary(pl.UTF-8): Moduł PCRE dla PHP 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 @@ -1230,6 +1308,7 @@ URL: http://www.php.net/manual/en/book.pdo.php 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 @@ -1247,6 +1326,7 @@ URL: http://www.php.net/manual/en/ref.pdo-dblib.php 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 @@ -1264,6 +1344,7 @@ URL: http://www.php.net/manual/en/ref.pdo-firebird.php 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 @@ -1283,6 +1364,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} %{?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 @@ -1301,6 +1383,7 @@ URL: http://www.php.net/manual/en/ref.pdo-oci.php 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 @@ -1319,6 +1402,7 @@ URL: http://www.php.net/manual/en/ref.pdo-odbc.php 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 @@ -1338,6 +1422,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} 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 @@ -1356,6 +1441,7 @@ URL: http://www.php.net/manual/en/ref.pdo-sqlite.php 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 @@ -1373,6 +1459,7 @@ Group: Libraries 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 @@ -1396,6 +1483,7 @@ Suggests: %{name}-cli Suggests: %{name}-zlib 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 @@ -1412,6 +1500,7 @@ Group: Libraries 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 @@ -1427,6 +1516,7 @@ Group: Libraries 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 @@ -1444,6 +1534,7 @@ Group: Libraries 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 @@ -1460,6 +1551,7 @@ URL: http://www.php.net/manual/en/book.recode.php 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 @@ -1476,7 +1568,9 @@ Group: Libraries 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 @@ -1492,6 +1586,7 @@ Group: Libraries 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 @@ -1508,6 +1603,7 @@ URL: http://www.php.net/manual/en/book.simplexml.php 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 @@ -1524,6 +1620,7 @@ URL: http://www.php.net/manual/en/book.snmp.php 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 @@ -1539,6 +1636,7 @@ Group: Libraries 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 @@ -1554,6 +1652,7 @@ Group: Libraries 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 @@ -1571,6 +1670,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} 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 @@ -1589,6 +1689,7 @@ Requires: %{name}-pdo = %{epoch}:%{version}-%{release} 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 @@ -1616,7 +1717,8 @@ Summary(pl.UTF-8): Moduł SQLite3 dla PHP 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 @@ -1646,6 +1748,7 @@ URL: http://www.php.net/manual/en/book.sybase.php 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 @@ -1662,6 +1765,7 @@ Group: Libraries 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 @@ -1677,6 +1781,7 @@ Group: Libraries 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 @@ -1692,6 +1797,7 @@ Group: Libraries 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 @@ -1721,6 +1827,7 @@ URL: http://www.php.net/manual/en/book.tidy.php 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 @@ -1736,6 +1843,7 @@ Group: Libraries 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 @@ -1756,6 +1864,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} #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 @@ -1771,6 +1880,7 @@ Group: Libraries 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 @@ -1788,8 +1898,9 @@ Summary(pl.UTF-8): Moduł XML Reader dla PHP 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 @@ -1810,6 +1921,7 @@ URL: http://www.php.net/manual/en/book.xmlrpc.php 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 @@ -1826,6 +1938,7 @@ URL: http://www.php.net/manual/en/book.xmlwriter.php 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 @@ -1847,6 +1960,7 @@ Requires: %{name}-dom = %{epoch}:%{version}-%{release} 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 @@ -1865,6 +1979,7 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} %{?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. @@ -1880,6 +1995,7 @@ Group: Libraries 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 @@ -1906,6 +2022,7 @@ cp -p php.ini-production php.ini %if %{with type_hints} %patch12 -p0 %endif +%patch13 -p1 %patch14 -p1 %patch15 -p1 %patch17 -p1 @@ -1932,6 +2049,7 @@ cp -p php.ini-production php.ini %patch38 -p1 %patch39 -p1 %if %{with fpm} +%patch69 -p1 %patch41 -p1 %patch42 -p1 %endif @@ -1942,6 +2060,8 @@ cp -p php.ini-production php.ini %if %{with suhosin} %patch47 -p1 %endif +%patch68 -p1 +%patch48 -p1 %patch49 -p1 %patch50 -p1 %patch51 -p1 @@ -1958,13 +2078,25 @@ cp -p php.ini-production php.ini %{__rm} -r sapi/litespeed gzip -dc %{SOURCE15} | tar xf - -C sapi/ %patch67 -p1 -%patch68 -p1 +%patch70 -p1 +%patch71 -p1 -sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4 +%patch220 -p1 + +%patch247 -p1 + +%patch249 -p1 +%patch250 -p1 +%patch251 -p1 +%patch252 -p1 +%patch253 -p1 +%patch254 -p1 -# somewhy php devs have embedded magic database into php extension. yuck! -# rebuild data file for now -mv ext/fileinfo/data_file.c{,.php-src} +%patch256 -p1 +%patch257 -p1 +%patch258 -p1 + +sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4 # cleanup backups after patching find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f @@ -2041,6 +2173,12 @@ if test "$ver" != "%{pharver}"; then : 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}. @@ -2089,6 +2227,8 @@ export EXTENSION_DIR="%{php_extensiondir}" 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.* . @@ -2197,7 +2337,7 @@ for sapi in $sapis; do %{?with_mhash:--with-mhash=yes} \ --with-mysql-sock=/var/lib/mysql/mysql.sock \ --with-pdo-mysql=shared%{?with_mysqlnd:,mysqlnd} \ - %{?with_oci8:--with-pdo-oci=shared%{?with_instantclient:,instantclient,%{_libdir}}} \ + %{?with_oci:--with-pdo-oci=shared%{?with_instantclient:,instantclient,%{_libdir}}} \ %{?with_odbc:--with-pdo-odbc=shared,unixODBC,/usr} \ %{?with_pgsql:--with-pdo-pgsql=shared} \ %{?with_pdo_sqlite:--with-pdo-sqlite=shared,/usr} \ @@ -2238,7 +2378,7 @@ for sapi in $sapis; do %{?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} \ @@ -2397,19 +2537,27 @@ install -d $RPM_BUILD_ROOT{%{_libdir}/{php,apache{,1}},%{_sysconfdir}/{apache,cg 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 @@ -2433,17 +2581,21 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir}/fpm.d,%{_sbindir},%{_datadir}/fpm} 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 @@ -2455,21 +2607,19 @@ cp -p sapi/embed/php_embed.h $RPM_BUILD_ROOT%{_includedir}/php/sapi/embed %endif # install CLI -# without suffix, install as php.cli -%if "%{?php_suffix}" == "" -%define phpfn %{name}.cli -%else -%define phpfn %{name} +# 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 + +# .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 -libtool --mode=install install -p sapi/cli/php $RPM_BUILD_ROOT%{_bindir}/%{phpfn} -cp -p sapi/cli/php.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{phpfn}.1 -echo ".so %{phpfn}.1" >$RPM_BUILD_ROOT%{_mandir}/man1/php.1 -ln -sf %{phpfn} $RPM_BUILD_ROOT%{_bindir}/php 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 @@ -2500,17 +2650,20 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/{cgi-fcgi,cli,apache,apache2handler}.d mv $RPM_BUILD_ROOT%{_sysconfdir}/{conf.d/readline.ini,cli.d} # use system automake and {lib,sh}tool -%if "%{pld_release}" != "ac" - ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_libdir}/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 @@ -2528,7 +2681,7 @@ sed -i -e "s|^libdir=.*|libdir='%{_libdir}'|" $RPM_BUILD_ROOT%{_libdir}/libphp_c 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 @@ -2598,6 +2751,35 @@ fi [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart [ ! -f /etc/httpd/conf.d/??_mod_php.conf ] || %service -q httpd restart +%triggerpostun common -- 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 \ @@ -2689,6 +2871,7 @@ fi %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} @@ -2698,6 +2881,7 @@ fi %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} @@ -2725,8 +2909,13 @@ fi %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}/%{phpfn} -%{_mandir}/man1/%{phpfn}.1* +%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 +%endif %files program %defattr(644,root,root,755) @@ -2739,6 +2928,7 @@ fi %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 @@ -2753,7 +2943,6 @@ fi %dir %{_sysconfdir} %dir %{_sysconfdir}/conf.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php.ini -%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/browscap.ini %attr(755,root,root) %{_libdir}/libphp_common-*.so %dir %{php_extensiondir} @@ -2767,7 +2956,7 @@ fi %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} @@ -2809,6 +2998,7 @@ fi %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 @@ -2960,7 +3150,7 @@ fi %attr(755,root,root) %{php_extensiondir}/mysqlnd.so %endif -%if %{with oci8} +%if %{with oci} %files oci8 %defattr(644,root,root,755) %doc ext/oci8/{CREDITS,README} @@ -3026,7 +3216,7 @@ fi %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/pdo_mysql.ini %attr(755,root,root) %{php_extensiondir}/pdo_mysql.so -%if %{with oci8} +%if %{with oci} %files pdo-oci %defattr(644,root,root,755) %doc ext/pdo_oci/CREDITS