From e8a26ea1154766a1dbd1ad1c259c9f590bf9c8d0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 14 Mar 2020 22:28:57 +0000 Subject: [PATCH 01/11] libvpx4 -> libvpx5, and libmagickwand-6.q16-3 -> .q16-6 --- scripts/_common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 062da75e..b83524bc 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,9 +5,9 @@ #================================================= # dependencies used by the app -pkg_dependencies="postgresql redis-server \ -libfreetype6 libjpeg62-turbo libpng16-16 libxpm4 libvpx4 libmagickwand-6.q16-3 libwebp6 \ -pngquant jpegoptim gifsicle" +pkg_dependencies="postgresql redis-server 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" From c2f96cf3dc743ad1963926d8cd84981d59e5b816 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 14 Mar 2020 22:30:27 +0000 Subject: [PATCH 02/11] Do not install php7.3 if on Buster, it's already there --- scripts/install | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index 31f84af6..5b094051 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 when on Stretch +#================================================= + +if [ "$(lsb_release --codename --short)" = "stretch" ]; then + ynh_print_info --message="Installing php7.3..." + ynh_install_php --phpversion="7.3" --package="$extra_pkg_dependencies" +else + pkg_dependencies="$pkg_dependencies $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 #================================================= From 963a0d0fc9219b0dc0121e3fd71749cb625c643e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 24 Mar 2020 19:53:44 +0100 Subject: [PATCH 03/11] reordering dependencies to keep them like upstream app --- scripts/_common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b83524bc..4e3718f7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,9 +5,9 @@ #================================================= # dependencies used by the app -pkg_dependencies="postgresql redis-server libfreetype6 libjpeg62-turbo \ -libpng16-16 libxpm4 libvpx4|libvpx5 libmagickwand-6.q16-3|libmagickwand-6.q16-6 \ -libwebp6 pngquant jpegoptim gifsicle" +pkg_dependencies="postgresql redis-server \ +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" From fa276165c9a73a62e917d8518bc37a2aafd5f877 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 24 Mar 2020 20:04:42 +0100 Subject: [PATCH 04/11] reordering PHP7.3 during install --- scripts/install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 5b094051..1b77d336 100644 --- a/scripts/install +++ b/scripts/install @@ -57,14 +57,14 @@ ynh_app_setting_set --app="$app" --key=app_key --value="$app_key" #================================================= # STANDARD MODIFICATIONS #================================================= -# INSTALL PHP7.3 when on Stretch +# INSTALL PHP7.3 #================================================= -if [ "$(lsb_release --codename --short)" = "stretch" ]; then +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" -else - pkg_dependencies="$pkg_dependencies $extra_pkg_dependencies" fi #================================================= From 262b63c1ac0344be018e9c2be31ff743d04740a8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 24 Mar 2020 20:04:56 +0100 Subject: [PATCH 05/11] manage buster during restore --- scripts/restore | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 From 03b9e54dc2f9f4eb8896fe553963b40796416318 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 24 Mar 2020 20:08:01 +0100 Subject: [PATCH 06/11] manage buster during upgrade --- scripts/upgrade | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e6f6137d..e2a8f498 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 #================================================= From 19457af216ae9aaaf1080e26e84f7957610fa8c7 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 25 Mar 2020 03:12:37 +0100 Subject: [PATCH 07/11] Bypass composer issue and GitHub Rate Limit https://developer.github.com/v3/#rate-limiting --- scripts/upgrade | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index e2a8f498..2756894e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -156,6 +156,11 @@ ynh_print_info --message="Updating php dependencies..." chown -R "$app": "$final_path" +# Bypass composer issue and GitHub Rate Limit https://developer.github.com/v3/#rate-limiting +if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then + sleep 3600 +fi + # Fix Google Recaptcha removal ynh_secure_remove --file="$final_path/bootstrap/cache" mkdir -p "$final_path/bootstrap/cache" From 8268225a04fda03009dc225a4c2ae5602ef8f3d8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 25 Mar 2020 10:08:12 +0100 Subject: [PATCH 08/11] Disable check from previous version As they can't be installed for buster --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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. From 86983aaaef8e2e0ca811494e622e1942915519d9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 25 Mar 2020 20:13:25 +0100 Subject: [PATCH 09/11] remove Google Recaptcha removal --- scripts/install | 5 ----- scripts/upgrade | 5 ----- 2 files changed, 10 deletions(-) diff --git a/scripts/install b/scripts/install index 1b77d336..ec93df8a 100644 --- a/scripts/install +++ b/scripts/install @@ -132,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/upgrade b/scripts/upgrade index 2756894e..9dc12b25 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -161,11 +161,6 @@ if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then sleep 3600 fi -# 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" #================================================= From dd490106684ed48e3a54b6a6ca94c81fb2b49a74 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 26 Mar 2020 22:29:30 +0100 Subject: [PATCH 10/11] without sleep during upgrade --- scripts/upgrade | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9dc12b25..dcf158a2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -156,11 +156,6 @@ ynh_print_info --message="Updating php dependencies..." chown -R "$app": "$final_path" -# Bypass composer issue and GitHub Rate Limit https://developer.github.com/v3/#rate-limiting -if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then - sleep 3600 -fi - ynh_composer_exec --phpversion="7.3" --workdir="$final_path" --commands="update" #================================================= From 1de3d4e1d751da57b5170787d92a9a62ba4c8664 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 27 Mar 2020 14:51:42 +0100 Subject: [PATCH 11/11] only removing PHP when not buster --- scripts/remove | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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