diff --git a/phpMyAdmin.changes b/phpMyAdmin.changes index 8e75fe4..5ecfade 100644 --- a/phpMyAdmin.changes +++ b/phpMyAdmin.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sun Nov 26 18:14:24 UTC 2017 - suse+build@de-korte.org + +- fix for boo#1057661 + * no longer require php_mod_any (recommend it instead) + * only enable php5 / php7 if running Apache prefork MPM +- fix %post + * use sed instead of grep/awk to determine PHP version + ------------------------------------------------------------------- Tue Oct 24 07:40:37 UTC 2017 - ecsos@opensuse.org diff --git a/phpMyAdmin.spec b/phpMyAdmin.spec index dd29633..45af3b1 100644 --- a/phpMyAdmin.spec +++ b/phpMyAdmin.spec @@ -50,7 +50,6 @@ BuildRequires: apache2-devel BuildRequires: python-devel BuildRequires: xz # -Requires: mod_php_any >= 5.5 Requires: php-bz2 Requires: php-gd Requires: php-gettext @@ -66,6 +65,7 @@ PreReq: coreutils PreReq: grep PreReq: pwgen PreReq: sed +Recommends: mod_php_any >= 5.5 Recommends: php-curl Recommends: php-zip ### will be removed with php >= 7.2 @@ -169,11 +169,11 @@ sed -i -e "s,@FQDN@,$(cat %{_sysconfdir}/HOSTNAME)," \ -e "s/\\\$cfg\['blowfish_secret'\] = ''/\$cfg['blowfish_secret'] = '`pwgen -s -1 46`'/" %{pma_config} # enable required apache modules if [ -x /usr/sbin/a2enmod ]; then + a2enmod -q version || a2enmod version # get installed php_version (5 or 7) - php_version=$(php -v | grep '(cli)' | awk '{print $2}' | awk -F'.' '{print $1}') - if [[ -n ${php_version} ]]; then - a2enmod -q php${php_version} || a2enmod php${php_version} - a2enmod -q version || a2enmod version + php_version=$(php -v | sed -n 's/^PHP\ \([[:digit:]]\+\)\..*$/\1/p') + if [[ -n ${php_version} ]] && start_apache2 -V | grep -q prefork; then + a2enmod -q "php${php_version}" || a2enmod "php${php_version}" fi fi %if 0%{?suse_version} < 1310