From 57fd20580655c6262f44d4ab84a7de87d0e91fb4 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 7 Oct 2019 13:30:12 +0200 Subject: ensure all shared extensions can be loaded --- php.spec | 50 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/php.spec b/php.spec index 6e64c58..4f11258 100644 --- a/php.spec +++ b/php.spec @@ -108,7 +108,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: %{?scl_prefix}php Version: %{upver}%{?lower:~%{lower}}%{?gh_date:.%{gh_date}} -Release: 24%{?dist} +Release: 25%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -1462,26 +1462,29 @@ ln -s %{_bindir}/lsphp $RPM_BUILD_ROOT%{_root_bindir}/ls%{scl} %endif %endif +TESTCMD="$RPM_BUILD_ROOT%{_bindir}/php --no-php-ini" +# Ensure all provided extensions are really there +for mod in core date filter hash libxml openssl pcntl pcre readline reflection session spl standard zlib +do + $TESTCMD --modules | grep -qi $mod +done + +TESTCMD="$TESTCMD --define extension_dir=$RPM_BUILD_ROOT%{_libdir}/php/modules" + # Generate files lists and stub .ini files for each subpackage -for mod in pgsql odbc ldap snmp xmlrpc \ - mysqlnd mysqli pdo_mysql \ +for mod in pgsql odbc ldap snmp \ + mysqlnd mysqli \ json \ %if %{with_imap} imap \ %endif - mbstring gd dom xsl soap bcmath dba xmlreader xmlwriter \ + mbstring gd dom xsl soap bcmath dba \ simplexml bz2 calendar ctype exif ftp gettext gmp iconv \ sockets tokenizer opcache \ - pdo pdo_pgsql pdo_odbc pdo_sqlite \ + pdo \ %if %{with_sqlite3} sqlite3 \ %endif -%if %{with_oci8} - oci8 pdo_oci \ -%endif -%if %{with_interbase} - pdo_firebird \ -%endif %if %{with_enchant} enchant \ %endif @@ -1490,28 +1493,42 @@ for mod in pgsql odbc ldap snmp xmlrpc \ %if %{with_tidy} tidy \ %endif -%if %{with_freetds} - pdo_dblib \ -%endif %if %{with_zip} zip \ %endif sodium \ pspell curl xml \ - posix shmop sysvshm sysvsem sysvmsg + posix shmop sysvshm sysvsem sysvmsg \ + pdo_mysql pdo_pgsql pdo_odbc pdo_sqlite \ +%if %{with_oci8} + oci8 pdo_oci \ +%endif +%if %{with_interbase} + pdo_firebird \ +%endif +%if %{with_freetds} + pdo_dblib \ +%endif + xmlrpc xmlreader xmlwriter do # for extension load order case $mod in opcache) # Zend extensions + TESTCMD="$TESTCMD --define zend_extension=$mod" ini=10-${mod}.ini;; pdo_*|mysqli|xmlreader|xmlrpc) # Extensions with dependencies on 20-* + TESTCMD="$TESTCMD --define extension=$mod" ini=30-${mod}.ini;; *) + TESTCMD="$TESTCMD --define extension=$mod" # Extensions with no dependency ini=20-${mod}.ini;; esac + + $TESTCMD --modules | grep -qi $mod + # some extensions have their own config file if [ -f ${ini} ]; then cp -p ${ini} $RPM_BUILD_ROOT%{_sysconfdir}/php.d/${ini} @@ -1789,6 +1806,9 @@ fi %changelog +* Mon Oct 7 2019 Remi Collet - 7.4.0~rc3-25 +- ensure all shared extensions can be loaded + * Fri Oct 4 2019 Remi Collet - 7.4.0~rc3-24 - fix broken intl extension on EL-7 -- cgit