Commit 3e880f6f authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm prescription: rewrite all php install scripts

parent da286107
......@@ -2,16 +2,13 @@
[ "$1" != "--run" ] && echo "Install php7 (or upgrade from php5)" && exit
distro="$($DISTRVENDOR -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; }
distrbase="$($DISTRVENDOR -s)" ; [ "$distrbase" = "alt" ] || { echo "Only ALTLinux is supported as for now" ; exit 1 ; }
if epmqp --quiet php5- ; then
# Upgrade if was installed php5
epmqp php5 --short | grep -E -v "(php5-mysql|suhosin|timezonedb|zend-optimizer|mongo|xdebug|openid)" | sed -e "s|php5|php7|" | epmi --auto
# Upgrade all installed php5
epmi $(epmqp php5 --short | grep -E -v "php5-(mysql|suhosin|timezonedb|zend-optimizer|mongo|xdebug|openid)" | sed -e "s|php5|php7|" ) #"
# (потребовалось для обновления, добавил в зависимости)
epmi php7-fileinfo
epme php5-libs
else
# Install all packages
epmi php7 php7-mbstring php7-pdo php7-curl php7-fileinfo php7-dom php7-exif php7-pdo_mysql php7-mysqli php7-pcntl php7-openssl php7-mcrypt php7-gd2 php7-xmlreader php7-memcached php7-xsl php7-zip php7-redis php7-opcache
......
#!/bin/sh
[ "$1" != "--run" ] && echo "Install php8.0 (or upgrade from php7)" && exit
[ "$1" != "--run" ] && echo "Install php8.1 (or upgrade from a previous version)" && exit
distro="$($DISTRVENDOR -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; }
# TODO: check for apache2-mod_php7
distrbase="$($DISTRVENDOR -s)" ; [ "$distrbase" = "alt" ] || { echo "Only ALTLinux is supported as for now" ; exit 1 ; }
if epmqp --quiet php7- ; then
# Upgrade if was installed php7
epmqp php7 --short | grep -v "rpm-build-php" | sed -e "s|php7-http||" -e "s|php7-xmlrpc||" -e "s|php7-krb5||" -e "s|php7-raphf||" -e "s|php7-propro||" -e "s|php7-memcache$||" -e "s|php7-apcu_bc$||" -e "s|php7-enchant||" -e "s|php7-pdo_sqlsrv$||" -e "s|php7-sqlsrv$||" -e "s|php7-geoip||" -e "s|php7|php8.0.1|" | epmi --auto
epme php7-libs
# Upgrade all installed php7
epmi $(epmqp php7 --short | grep -v "rpm-build-php"| grep -E -v "php7-(http|xmlrpc|krb5|raphf|propro|enchant|geioip)" | sed -e "s|php7-apcu_bc$||" -e "s|php7-pdo_sqlsrv$||" -e "s|php7-sqlsrv$||" -e "s|php7|php8.0|") #"
else
# Install all packages
epmi php8.0 php8.0-mbstring php8.0-pdo php8.0-curl php8.0-fileinfo php8.0-dom php8.0-exif php8.0-pdo_mysql php8.0-mysqli php8.0-pcntl php8.0-openssl php8.0-mcrypt php8.0-gd2 php8.0-xmlreader php8.0-memcached php8.0-xsl php8.0-zip php8.0-redis php8.0-opcache
......
#!/bin/sh
[ "$1" != "--run" ] && echo "Install php8.1 (or upgrade from php7)" && exit
[ "$1" != "--run" ] && echo "Install php8.1 (or upgrade from a previous version)" && exit
distro="$($DISTRVENDOR -d)" ; [ "$distro" = "ALTLinux" ] || [ "$distro" = "ALTServer" ] || { echo "Only ALTLinux is supported" ; exit 1 ; }
# TODO: check for apache2-mod_php7
distrbase="$($DISTRVENDOR -s)" ; [ "$distrbase" = "alt" ] || { echo "Only ALTLinux is supported as for now" ; exit 1 ; }
if epmqp --quiet php7- ; then
# Upgrade if was installed php7
epmqp php7 --short | grep -v "rpm-build-php" | sed -e "s|php7-http||" -e "s|php7-xmlrpc||" -e "s|php7-krb5||" -e "s|php7-raphf||" -e "s|php7-propro||" -e "s|php7-memcache$||" -e "s|php7-apcu_bc$||" -e "s|php7-enchant||" -e "s|php7-pdo_sqlsrv$||" -e "s|php7-sqlsrv$||" -e "s|php7-geoip||" -e "s|php7|php8.1.1|" | epmi --auto
epme php7-libs
# Upgrade all installed php7
epmi $(epmqp php7 --short | grep -v "rpm-build-php"| grep -E -v "php7-(http|xmlrpc|krb5|raphf|propro|enchant|geioip)" | sed -e "s|php7-apcu_bc$||" -e "s|php7-pdo_sqlsrv$||" -e "s|php7-sqlsrv$||" -e "s|php7|php8.1|") #"
else
# Install all packages
epmi php8.1 php8.1-mbstring php8.1-pdo php8.1-curl php8.1-fileinfo php8.1-dom php8.1-exif php8.1-pdo_mysql php8.1-mysqli php8.1-pcntl php8.1-openssl php8.1-mcrypt php8.1-gd2 php8.1-xmlreader php8.1-memcached php8.1-xsl php8.1-zip php8.1-redis php8.1-opcache
......
#!/bin/sh
[ "$1" != "--run" ] && echo "Install php8.2 (or upgrade from a previous version)" && exit
distrbase="$($DISTRVENDOR -s)" ; [ "$distrbase" = "alt" ] || { echo "Only ALTLinux is supported as for now" ; exit 1 ; }
# TODO: check for apache2-mod_php7
if epmqp --quiet php7- ; then
# Upgrade all installed php7
epmi $(epmqp php7 --short | grep -v "rpm-build-php"| grep -E -v "php7-(http|xmlrpc|krb5|raphf|propro|enchant|geioip)" | sed -e "s|php7-apcu_bc$||" -e "s|php7-pdo_sqlsrv$||" -e "s|php7-sqlsrv$||" -e "s|php7|php8.2|") #"
else
# Install all packages
epmi php8.2 php8.2-mbstring php8.2-pdo php8.2-curl php8.2-fileinfo php8.2-dom php8.2-exif php8.2-pdo_mysql php8.2-mysqli php8.2-pcntl php8.2-openssl php8.2-mcrypt php8.2-gd2 php8.2-xmlreader php8.2-memcached php8.2-xsl php8.2-zip php8.2-redis php8.2-opcache
#echo "Think twice about php8.2-imagick. See https://bugzilla.altlinux.org/show_bug.cgi?id=39033"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment