From 140b6cd9fbb7f7f574e90fac3134b1ee158b39ef Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 7 Oct 2019 13:42:32 +0200 Subject: ensure all shared extensions can be loaded --- php74.spec | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/php74.spec b/php74.spec index 4c14ce5..77fa986 100644 --- a/php74.spec +++ b/php74.spec @@ -103,7 +103,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: php Version: %{upver}%{?rcver:~%{lower}} -Release: 6%{?dist} +Release: 7%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -1784,40 +1784,57 @@ install -D -m 644 %{SOURCE13} _fpmdoc/nginx-fpm.conf install -D -m 644 %{SOURCE14} _fpmdoc/nginx-php.conf %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 imap json \ - mysqlnd mysqli pdo_mysql \ - mbstring gd dom xsl soap bcmath dba xmlreader xmlwriter \ +for mod in pgsql odbc ldap snmp imap json \ + mysqlnd mysqli \ + 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_zip} zip \ %endif + sqlite3 \ + enchant phar fileinfo intl \ + ffi \ + tidy pspell curl \ + sodium \ + posix shmop sysvshm sysvsem sysvmsg xml \ + pdo_mysql pdo_pgsql pdo_odbc pdo_sqlite pdo_dblib \ %if %{with_oci8} oci8 pdo_oci \ %endif %if %{with_firebird} pdo_firebird \ %endif - sqlite3 \ - enchant phar fileinfo intl \ - ffi \ - tidy pdo_dblib pspell curl \ - sodium \ - posix shmop sysvshm sysvsem sysvmsg xml \ - ; do + xmlrpc xmlreader xmlwriter +do 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;; *) # Extensions with no dependency + TESTCMD="$TESTCMD --define extension=$mod" 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} @@ -2136,6 +2153,9 @@ fi %changelog +* Mon Oct 7 2019 Remi Collet - 7.4.0~RC3-7 +- ensure all shared extensions can be loaded + * Fri Oct 4 2019 Remi Collet - 7.4.0~RC3-6 - fix broken intl extension on EL-7 -- cgit