From 88a186741715aae44e1b6375704b88c6fb1aa5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 1 Dec 2021 11:58:34 +0100 Subject: [PATCH] Testing (#61) * 4.6.1 --- README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 5 ----- manifest.json | 4 ++-- scripts/_common.sh | 2 +- scripts/install | 9 ++++++++- scripts/remove | 8 ++++++++ scripts/restore | 10 +++++++++- scripts/upgrade | 9 ++++++++- 10 files changed, 40 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 9cf1b77..15ea8c8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Open source analytics platform for measuring Web statistics -**Shipped version:** 4.5.0~ynh1 +**Shipped version:** 4.6.1~ynh1 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index 42a8fd4..22e240c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Plateforme d'analyse open source de mesure de statistiques Web -**Version incluse :** 4.5.0~ynh1 +**Version incluse :** 4.6.1~ynh1 **Démo :** https://demo.matomo.org diff --git a/conf/app.src b/conf/app.src index e7dba63..f1923a8 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://builds.matomo.org/matomo-4.5.0.tar.gz -SOURCE_SUM=3b28ddcd8f84358c4e4d58c32e38f6ba725ba5a18e0c81f623901c9ade391c30 +SOURCE_URL=https://builds.matomo.org/matomo-4.6.1.tar.gz +SOURCE_SUM=995302b5fe4e7f01b218283daeb338160cd2f69e0567601709e359e030ea0149 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index f1da700..5714403 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,6 @@ location ^~ __PATH__/ { # Path to source alias __FINALPATH__/; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - more_set_headers "Referrer-Policy: origin always"; more_set_headers "X-Content-Type-Options: nosniff"; more_set_headers "X-XSS-Protection: 1; mode=block"; diff --git a/manifest.json b/manifest.json index 958cd12..e4cb2e1 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source analytics platform for measuring Web statistics", "fr": "Plateforme d'analyse open source de mesure de statistiques Web" }, - "version": "4.5.0~ynh1", + "version": "4.6.1~ynh1", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", @@ -21,7 +21,7 @@ "email": "anmol@datamol.org" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index e932edf..ac31ed1 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION="7.3" -extra_php_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring" +pkg_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mbstring" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index af0fc07..329a2c9 100755 --- a/scripts/install +++ b/scripts/install @@ -47,6 +47,13 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE A MYSQL DATABASE #================================================= @@ -93,7 +100,7 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." --weight=3 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" +ynh_add_fpm_config --usage=low --footprint=low phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/remove b/scripts/remove index a0d4af7..cfe1f30 100755 --- a/scripts/remove +++ b/scripts/remove @@ -31,6 +31,14 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=1 # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/restore b/scripts/restore index 4c4c94a..842d4de 100755 --- a/scripts/restore +++ b/scripts/restore @@ -76,7 +76,15 @@ ynh_script_progression --message="Restoring PHP-FPM configuration..." --weight=2 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated php-fpm config -ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" +ynh_add_fpm_config --usage=low --footprint=low + +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE THE MYSQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 76f50e9..c608442 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -126,13 +126,20 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # PHP-FPM CONFIGURATION #================================================= ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" +ynh_add_fpm_config --usage=low --footprint=low #================================================= # SETUP A CRON