From f0dd307e235a6371954b8825aae4b27b0866b8debc917ddca9e6d27c240bfc35 Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Sun, 26 Nov 2017 19:13:36 +0000 Subject: [PATCH] Accepting request 545751 from home:adkorte:branches:server:php:applications - 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 OBS-URL: https://build.opensuse.org/request/show/545751 OBS-URL: https://build.opensuse.org/package/show/server:php:applications/phpMyAdmin?expand=0&rev=299 --- phpMyAdmin.changes | 9 +++++++++ phpMyAdmin.spec | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) 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