From b280a53d8663522a5537639617a541abd73b8d1e Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Thu, 20 Jan 2022 22:08:59 +0300 Subject: [PATCH] package php7 alongside php 5 in rosa2019.05 (zabbix 5.0 web UI needs php 7) --- php7.spec | 98 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 82 insertions(+), 16 deletions(-) diff --git a/php7.spec b/php7.spec index d9a30ca..5827ed3 100644 --- a/php7.spec +++ b/php7.spec @@ -24,10 +24,16 @@ %define zendver 20190902 %define pdover 20170320 +# php5 is still the main php version in rosa2019.05 +%define conflict_with_php5() %{expand:\ +Conflicts: php-%{1} < %{EVRD} \ +Conflicts: php5-%{1} < %{EVRD} \ +} + Summary: The PHP7 scripting language -Name: php +Name: php7 Version: 7.4.26 -Release: 3 +Release: 1 Source0: http://ch1.php.net/distributions/php-%{version}.tar.xz Source1: macros.php Group: Development/PHP @@ -185,7 +191,7 @@ Requires: %{name}-xmlwriter >= %{EVRD} Requires: %{name}-zlib >= %{EVRD} Requires: %{name}-xml >= %{EVRD} Provides: %{name} = %{EVRD} -Provides: /usr/bin/php +%conflict_with_php5 cli %description cli PHP7 is an HTML-embeddable scripting language. PHP7 offers built-in database @@ -220,6 +226,7 @@ Requires: %{name}-xmlwriter >= %{EVRD} Requires: %{name}-zlib >= %{EVRD} Requires: %{name}-xml >= %{EVRD} Provides: %{name} = %{EVRD} +%conflict_with_php5 dbg %description dbg PHP7 is an HTML-embeddable scripting language. PHP7 offers built-in database @@ -255,7 +262,7 @@ Requires: %{name}-zlib >= %{EVRD} Requires: %{name}-xml >= %{EVRD} Provides: %{name} = %{EVRD} Provides: %{name}-fcgi = %{EVRD} -Obsoletes: %{name}-fcgi < %{EVRD} +%conflict_with_php5 cgi %description cgi PHP7 is an HTML-embeddable scripting language. PHP7 offers built-in database @@ -302,7 +309,7 @@ Requires: pkgconfig(libpcre) Requires: pkgconfig(libxml-2.0) Requires: pkgconfig(libxslt) Requires: pkgconfig(openssl) - +%conflict_with_php5 devel %description devel The php-devel package lets you compile dynamic extensions to PHP7. Included @@ -315,6 +322,7 @@ SELF-CONTAINED-EXTENSIONS. Summary: OpenSSL extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 openssl %description openssl This is a dynamic shared object (DSO) for PHP that will add OpenSSL support. @@ -323,6 +331,7 @@ This is a dynamic shared object (DSO) for PHP that will add OpenSSL support. Summary: Zlib extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 zlib %description zlib This is a dynamic shared object (DSO) for PHP that will add zlib compression @@ -331,6 +340,7 @@ support to PHP. %package doc Summary: Documentation for PHP Group: Development/PHP +%conflict_with_php5 doc %description doc Documentation for php. @@ -339,6 +349,7 @@ Documentation for php. Summary: The bcmath module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 bcmath %description bcmath This is a dynamic shared object (DSO) for PHP that will add bc style precision @@ -351,6 +362,7 @@ supports numbers of any size and precision, represented as strings. Summary: Bzip2 extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 bz2 %description bz2 This is a dynamic shared object (DSO) for PHP that will add bzip2 compression @@ -363,6 +375,7 @@ compressed files. Summary: Calendar extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 calendar %description calendar This is a dynamic shared object (DSO) for PHP that will add calendar support. @@ -382,6 +395,7 @@ included in these instructions, and are in quotes. Summary: Ctype extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 ctype %description ctype This is a dynamic shared object (DSO) for PHP that will add ctype support. @@ -394,6 +408,7 @@ setlocale()). Summary: Curl extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 curl %description curl This is a dynamic shared object (DSO) for PHP that will add curl support. @@ -410,6 +425,7 @@ user+password authentication. Summary: DBA extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 dba %description dba This is a dynamic shared object (DSO) for PHP that will add flat-file databases @@ -426,6 +442,7 @@ IBM's DB2 software, which is supported through the ODBC functions.) Summary: Dom extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 dom %description dom This is a dynamic shared object (DSO) for PHP that will add dom support. @@ -440,6 +457,7 @@ The extension allows you to operate on an XML document with the DOM API. Summary: Libenchant binder, support near all spelling tools Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 enchant %description enchant Enchant is a binder for libenchant. Libenchant provides a common API for many @@ -458,6 +476,7 @@ Summary: EXIF extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} Requires: %{name}-mbstring >= %{EVRD} +%conflict_with_php5 exif %description exif This is a dynamic shared object (DSO) for PHP that will add EXIF tags support @@ -472,6 +491,7 @@ images. Summary: Fileinfo extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 fileinfo %description fileinfo This extension allows retrieval of information regarding vast majority of file. @@ -484,6 +504,7 @@ file and for text files proper language encoding. Summary: Extension for safely dealing with input parameters Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 filter %description filter The Input Filter extension is meant to address this issue by implementing a set @@ -493,6 +514,7 @@ of filters and mechanisms that users can use to safely access their input data. Summary: FTP extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 ftp %description ftp This is a dynamic shared object (DSO) for PHP that will add FTP support. @@ -509,6 +531,7 @@ intuitive interface. Summary: GD extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 gd %description gd This is a dynamic shared object (DSO) for PHP that will add GD support, @@ -528,6 +551,7 @@ TIFF and JPEG2000 images. Summary: Gettext extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 gettext %description gettext This is a dynamic shared object (DSO) for PHP that will add gettext support. @@ -541,6 +565,7 @@ view the docs at http://www.gnu.org/software/gettext/manual/gettext.html. Summary: Gmp extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 gmp %description gmp This is a dynamic shared object (DSO) for PHP that will add arbitrary length @@ -550,6 +575,7 @@ number support using the GNU MP library. Summary: HASH Message Digest Framework Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 hash %description hash Native implementations of common message digest algorithms using a generic @@ -562,6 +588,7 @@ arbitrary length messages using a variety of hashing algorithms. Summary: Iconv extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 iconv %description iconv This is a dynamic shared object (DSO) for PHP that will add iconv support. @@ -578,6 +605,7 @@ It will most likely end up with more consistent results. Summary: IMAP extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 imap %description imap This is a dynamic shared object (DSO) for PHP that will add IMAP support. @@ -590,6 +618,7 @@ methods. Summary: Internationalization extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 intl %description intl This is a dynamic shared object (DSO) for PHP that will add @@ -601,6 +630,7 @@ Internationalization extension implements ICU library functionality in PHP. Summary: JavaScript Object Notation Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 json %description json Support for JSON (JavaScript Object Notation) serialization. @@ -609,6 +639,7 @@ Support for JSON (JavaScript Object Notation) serialization. Summary: LDAP extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 ldap %description ldap This is a dynamic shared object (DSO) for PHP that will add LDAP support. @@ -629,6 +660,7 @@ Group: Development/PHP Requires: %{libname} >= %{EVRD} # To make it easier to find for e.g. Roundcube requesting php-multibyte Provides: %{name}-multibyte = %{EVRD} +%conflict_with_php5 mbstring %description mbstring This is a dynamic shared object (DSO) for PHP that will add multibyte string @@ -647,7 +679,7 @@ Requires: %{libname} >= %{EVRD} # mysqlnd must be loaded before mysqli (undefined symbol: mysqlnd_global_stats) Requires: %{name}-mysqlnd = %{EVRD} Provides: %{name}-mysql = %{EVRD} -Obsoletes: %{name}-mysql < %{EVRD} +%conflict_with_php5 mysqli %description mysqli This is a dynamic shared object (DSO) for PHP that will add MySQL database @@ -670,6 +702,7 @@ Documentation for MySQLi can be found at http://www.php.net/manual/en/mysqli.ove Summary: MySQL native database module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 mysqlnd %description mysqlnd This is a dynamic shared object (DSO) for PHP that will add MySQL native @@ -684,6 +717,7 @@ Documentation for MySQL can be found at http://dev.mysql.com/doc/. Summary: ODBC extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 odbc %description odbc This is a dynamic shared object (DSO) for PHP that will add ODBC support. @@ -698,6 +732,7 @@ ODBC functions. Summary: Opcode cache for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 opcache %description opcache Opcode cache for PHP @@ -706,6 +741,7 @@ Opcode cache for PHP Summary: Process Control extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 pcntl %description pcntl This is a dynamic shared object (DSO) for PHP that will add process spawning @@ -724,6 +760,7 @@ Group: Development/PHP Requires: %{libname} >= %{EVRD} Provides: %{name}-pdo-abi = %{pdover} Provides: php(pdo-abi) = %{pdover} +%conflict_with_php5 pdo %description pdo PDO provides a uniform data access interface, sporting advanced features such @@ -739,6 +776,7 @@ Group: Development/PHP Requires: freetds >= 0.63 Requires: %{name}-pdo >= %{EVRD} Requires: %{libname} >= %{EVRD} +%conflict_with_php5 pdo_dblib %description pdo_dblib PDO_DBLIB is a driver that implements the PHP Data Objects (PDO) interface to @@ -750,6 +788,7 @@ Summary: MySQL Interface driver for PDO Group: Development/PHP Requires: %{name}-pdo >= %{EVRD} Requires: %{libname} >= %{EVRD} +%conflict_with_php5 pdo_mysql %description pdo_mysql PDO_MYSQL is a driver that implements the PHP Data Objects (PDO) interface to @@ -764,6 +803,7 @@ Summary: ODBC v3 Interface driver for PDO Group: Development/PHP Requires: %{name}-pdo >= %{EVRD} Requires: %{libname} >= %{EVRD} +%conflict_with_php5 pdo_odbc %description pdo_odbc PDO_ODBC is a driver that implements the PHP Data Objects (PDO) interface to @@ -786,6 +826,7 @@ Group: Development/PHP Requires: %{name}-pdo >= %{EVRD} Requires: %{libname} >= %{EVRD} Requires: postgresql-libs >= %{postgresql_version} +%conflict_with_php5 pdo_pgsql %description pdo_pgsql PDO_PGSQL is a driver that implements the PHP Data Objects (PDO) interface to @@ -796,6 +837,7 @@ Summary: SQLite v3 Interface driver for PDO Group: Development/PHP Requires: %{name}-pdo >= %{EVRD} Requires: %{libname} >= %{EVRD} +%conflict_with_php5 pdo_sqlite %description pdo_sqlite PDO_SQLITE is a driver that implements the PHP Data Objects (PDO) interface to @@ -811,6 +853,7 @@ Summary: PostgreSQL database module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} Requires: postgresql-libs >= %{postgresql_version} +%conflict_with_php5 pgsql %description pgsql This is a dynamic shared object (DSO) for PHP that will add PostgreSQL database @@ -828,6 +871,7 @@ Summary: Allows running of complete applications out of .phar files Group: Development/PHP Requires: %{libname} >= %{EVRD} Requires: %{name}-bz2 +%conflict_with_php5 phar %description phar This is the extension version of PEAR's PHP_Archive package. Support for @@ -850,6 +894,7 @@ well. Summary: POSIX extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 posix %description posix This is a dynamic shared object (DSO) for PHP that will add POSIX functions @@ -866,6 +911,7 @@ module tries to remedy this by providing easy access to these functions. Summary: Pspell extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 pspell %description pspell This is a dynamic shared object (DSO) for PHP that will add pspell support to @@ -878,6 +924,7 @@ suggestions. Summary: Readline extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 readline %description readline This PHP module adds support for readline functions (only for cli and cgi @@ -894,6 +941,7 @@ writing scripts used from a command line. Summary: Recode extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 recode %description recode This is a dynamic shared object (DSO) for PHP that will add recode support @@ -912,6 +960,7 @@ Group: Development/PHP Requires(pre): user(apache) Requires(pre): group(apache) Requires: %{libname} >= %{EVRD} +%conflict_with_php5 session %description session This is a dynamic shared object (DSO) for PHP that will add session support. @@ -928,6 +977,7 @@ in the URL. Summary: Shared Memory Operations extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 shmop %description shmop This is a dynamic shared object (DSO) for PHP that will add Shared Memory @@ -941,6 +991,7 @@ Summary: NET-SNMP extension module for PHP Group: Development/PHP Requires: net-snmp-mibs Requires: %{libname} >= %{EVRD} +%conflict_with_php5 snmp %description snmp This is a dynamic shared object (DSO) for PHP that will add SNMP support using @@ -952,6 +1003,7 @@ In order to use the SNMP functions you need to install the NET-SNMP package. Summary: Soap extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 soap %description soap This is a dynamic shared object (DSO) for PHP that will add soap support. @@ -976,7 +1028,7 @@ Summary: SQLite database bindings for PHP Group: Development/PHP Requires: %{name}-pdo >= %{EVRD} Requires: %{libname} >= %{EVRD} -Obsoletes: %name-sqlite < %{EVRD} +%conflict_with_php5 sqlite3 %description sqlite3 This is an extension for the SQLite Embeddable SQL Database Engine. SQLite is a @@ -992,6 +1044,7 @@ database files on disk. Summary: SysV msg extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 sysvmsg %description sysvmsg This is a dynamic shared object (DSO) for PHP that will add SysV message queues @@ -1001,6 +1054,7 @@ support. Summary: SysV sem extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 sysvsem %description sysvsem This is a dynamic shared object (DSO) for PHP that will add SysV semaphores @@ -1010,6 +1064,7 @@ support. Summary: SysV shm extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 sysvshm %description sysvshm This is a dynamic shared object (DSO) for PHP that will add SysV Shared Memory @@ -1019,6 +1074,7 @@ support. Summary: Tidy HTML Repairing and Parsing for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 tidy %description tidy Tidy is a binding for the Tidy HTML clean and repair utility which allows you @@ -1029,6 +1085,7 @@ the document tree using the Zend Engine 2 OO semantics. Summary: Tokenizer extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 tokenizers %description tokenizer This is a dynamic shared object (DSO) for PHP that will add Tokenizer support. @@ -1042,6 +1099,7 @@ specification at the lexical level. Summary: XML extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 xml %description xml This is a dynamic shared object (DSO) for PHP that will add XML support. This @@ -1053,6 +1111,7 @@ Summary: Xmlreader extension module for PHP Group: Development/PHP Requires: %{name}-dom Requires: %{libname} >= %{EVRD} +%conflict_with_php5 xmlreader %description xmlreader XMLReader represents a reader that provides non-cached, forward-only access to @@ -1062,6 +1121,7 @@ XML data. It is based upon the xmlTextReader api from libxml Summary: Xmlrpc extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 xmlrpc %description xmlrpc This is a dynamic shared object (DSO) for PHP that will add XMLRPC support. @@ -1075,6 +1135,7 @@ http://xmlrpc-epi.sourceforge.net/. Summary: Provides fast, non-cached, forward-only means to write XML data Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 xmlwriter %description xmlwriter This extension wraps the libxml xmlWriter API. Represents a writer that @@ -1085,6 +1146,7 @@ containing XML data. Summary: Xsl extension module for PHP Group: Development/PHP Requires: %{libname} >= %{EVRD} +%conflict_with_php5 xsl %description xsl This is a dynamic shared object (DSO) for PHP that will add xsl support. @@ -1095,6 +1157,7 @@ using the libxslt library %package zip Summary: A zip management extension for PHP Group: Development/PHP +%conflict_with_php5 zip %description zip This is a dynamic shared object (DSO) for PHP that will add zip support to @@ -1126,6 +1189,7 @@ Requires(pre): user(apache) Requires(pre): group(apache) Requires(post): /bin/systemd-tmpfiles Provides: %{name} = %{EVRD} +%conflict_with_php5 fpm %description fpm PHP7 is an HTML-embeddable scripting language. PHP7 offers built-in database @@ -1136,7 +1200,7 @@ most common use of PHP7 coding is probably as a replacement for CGI scripts. This package contains the FastCGI Process Manager. You must also install libphp7_common. -%package -n apache-mod_php +%package apache-mod_php Summary: The PHP HTML-embedded scripting language for use with apache Group: System/Servers Requires: %{libname} = %{EVRD} @@ -1166,10 +1230,12 @@ Conflicts: apache-mpm-worker >= 2.4.0 # mod_php with the event mpm is not an recommended by php devs, but # is (at least somewhat) working. Let's not do a hard conflict. # Conflicts: apache-mpm-event >= 2.4.0 -Provides: mod_php = %{EVRD} +#Provides: mod_php = %{EVRD} BuildRequires: dos2unix +# main php 5 package in rosa2019.05 names this subpackage as "-n apache-mod_php" +Conflicts: apache-mod_php < %{EVRD} -%description -n apache-mod_php +%description apache-mod_php PHP7 is an HTML-embedded scripting language. PHP7 attempts to make it easy for developers to write dynamically generated web pages. PHP7 also offers built-in database integration for several commercial and non-commercial database @@ -1182,12 +1248,12 @@ This package contains PHP version 7. You'll also need to install the apache web server. -%package -n php-ini +%package php-ini Summary: INI files for PHP Group: Development/Other -%description -n php-ini -The php-ini package contains the ini file required for PHP. +%description php-ini +The php7-ini package contains the ini file required for PHP 7. %prep @@ -1195,7 +1261,7 @@ export LC_ALL=en_US.utf-8 export LANG=en_US.utf-8 export LANGUAGE=en_US.utf-8 export LANGUAGES=en_US.utf-8 -%setup -qn %{name}-%{version} +%setup -q -n php-%{version} # Safety check for API version change. vapi=`sed -n '/#define PHP_API_VERSION/{s/.* //;p}' main/php.h` @@ -2124,11 +2190,11 @@ TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php -n -c ./php-test.ini run-tests.php %attr(0711,apache,apache) %dir /run/php-fpm %{_tmpfilesdir}/php-fpm.conf -%files -n apache-mod_php +%files apache-mod_php %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/*.conf %attr(0755,root,root) %{_libdir}/apache/*.so -%files -n php-ini +%files php-ini %config(noreplace) %{_sysconfdir}/php.ini %config(noreplace) %{_sysconfdir}/php-cgi-fcgi.ini %dir %{_sysconfdir}/php.d