diff --git a/check_process b/check_process index 64e988f2..ed1eab47 100644 --- a/check_process +++ b/check_process @@ -11,9 +11,9 @@ setup_public=1 upgrade=1 # 0.10.6 - upgrade=1 from_commit=605a47aac7553fdcc6012531ee67add8dbe37b97 + # upgrade=1 from_commit=605a47aac7553fdcc6012531ee67add8dbe37b97 # 0.10.7 - upgrade=1 from_commit=7fa86c3e6e6db6668be0a165213d554850b9fce8 + # upgrade=1 from_commit=7fa86c3e6e6db6668be0a165213d554850b9fce8 backup_restore=1 multi_instance=1 # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. diff --git a/scripts/_common.sh b/scripts/_common.sh index 062da75e..4e3718f7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ # dependencies used by the app pkg_dependencies="postgresql redis-server \ -libfreetype6 libjpeg62-turbo libpng16-16 libxpm4 libvpx4 libmagickwand-6.q16-3 libwebp6 \ +libfreetype6 libjpeg62-turbo libpng16-16 libxpm4 libvpx4|libvpx5 libmagickwand-6.q16-3|libmagickwand-6.q16-6 libwebp6 \ pngquant jpegoptim gifsicle" extra_pkg_dependencies="php7.3-bcmath php7.3-cli php7.3-curl php7.3-exif php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-pgsql php7.3-simplexml php7.3-xml php7.3-zip php7.3-intl" diff --git a/scripts/install b/scripts/install index 31f84af6..ec93df8a 100644 --- a/scripts/install +++ b/scripts/install @@ -56,6 +56,17 @@ ynh_app_setting_set --app="$app" --key=app_key --value="$app_key" #================================================= # STANDARD MODIFICATIONS +#================================================= +# INSTALL PHP7.3 +#================================================= + +if [ "$(lsb_release --codename --short)" = "buster" ]; then + pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies" +else + ynh_print_info --message="Installing php7.3..." + ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies" +fi + #================================================= # INSTALL DEPENDENCIES #================================================= @@ -63,13 +74,6 @@ ynh_print_info --message="Installing dependencies..." ynh_install_app_dependencies "$pkg_dependencies" -#================================================= -# INSTALL PHP -#================================================= -ynh_print_info --message="Installing php..." - -ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies" - #================================================= # CREATE A POSTGRESQL DATABASE #================================================= @@ -128,11 +132,6 @@ chown -R "$app": "$final_path" ynh_install_composer --phpversion="7.3" --workdir="$final_path" -# Fix Google Recaptcha removal -ynh_secure_remove --file="$final_path/bootstrap/cache" -mkdir -p "$final_path/bootstrap/cache" -ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="dump-autoload" - #================================================= # SPECIFIC SETUP #================================================= diff --git a/scripts/remove b/scripts/remove index 7d0d102e..cced37cf 100644 --- a/scripts/remove +++ b/scripts/remove @@ -58,7 +58,9 @@ ynh_print_info --message="Removing dependencies..." # Remove metapackage and its dependencies ynh_remove_app_dependencies -ynh_remove_php +if [ "$(lsb_release --codename --short)" != "buster" ]; then + ynh_remove_php +fi #================================================= # REMOVE APP MAIN DIR diff --git a/scripts/restore b/scripts/restore index 967755ef..19b2e1fe 100644 --- a/scripts/restore +++ b/scripts/restore @@ -77,11 +77,15 @@ ynh_print_info --message="Restoring user rights..." chown -R "$app": "$final_path" #================================================= -# INSTALL PHP +# INSTALL PHP7.3 #================================================= -ynh_print_info --message="Installing php..." -ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies" +if [ "$(lsb_release --codename --short)" = "buster" ]; then + pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies" +else + ynh_print_info --message="Installing php7.3..." + ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies" +fi #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index e6f6137d..dcf158a2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -113,6 +113,17 @@ ynh_print_info --message="Upgrading nginx web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config +#================================================= +# UPGRADE PHP7.3 +#================================================= + +if [ "$(lsb_release --codename --short)" = "buster" ]; then + pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies" +else + ynh_print_info --message="Upgrading php7.3..." + ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies" +fi + #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -120,14 +131,6 @@ ynh_print_info --message="Upgrading dependencies..." ynh_install_app_dependencies "$pkg_dependencies" -#================================================= -# UPGRADE PHP -#================================================= -ynh_print_info --message="Upgrading php..." - -ynh_remove_php -ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies" - #================================================= # CREATE DEDICATED USER #================================================= @@ -153,11 +156,6 @@ ynh_print_info --message="Updating php dependencies..." chown -R "$app": "$final_path" -# Fix Google Recaptcha removal -ynh_secure_remove --file="$final_path/bootstrap/cache" -mkdir -p "$final_path/bootstrap/cache" -ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="dump-autoload" - ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="update" #=================================================