From 1a4410a68980d6e9aecb46b1e61a8bd7793dda75 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Mar 2021 22:07:11 +0100 Subject: [PATCH 1/4] Fix linter warnings --- README.md | 2 +- check_process | 3 --- manifest.json | 18 +++--------------- scripts/install | 6 ++---- scripts/upgrade | 29 +++++++---------------------- 5 files changed, 13 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 2fc83c9..a1f369e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Cachet for YunoHost [![Integration level](https://dash.yunohost.org/integration/cachet.svg)](https://dash.yunohost.org/appci/app/cachet) ![](https://ci-apps.yunohost.org/ci/badges/cachet.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cachet.maintain.svg) -[![Install cachet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=cachet) +[![Install cachet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cachet) > *This package allows you to install Cachet quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* diff --git a/check_process b/check_process index 787ad0e..b92cd43 100644 --- a/check_process +++ b/check_process @@ -16,11 +16,8 @@ upgrade=1 from_commit=7497ea8b6915b725358db0d4a1210f999961cfee backup_restore=1 multi_instance=1 - incorrect_path=0 port_already_use=0 change_url=1 -;;; Levels - Level 5=auto ;;; Options Email= Notification=none diff --git a/manifest.json b/manifest.json index 287e811..6e400a0 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source status page system", "fr": "Système de page de statut open source" }, - "version": "2.4.0-dev-7897744356bf81a2bcbc734f132eb5daafa889611c9c72fb2501afb3e9007cac~ynh2", + "version": "2.3.18~ynh2", "url": "https://cachethq.io/", "license": "BSD-3-Clause", "maintainer": { @@ -14,12 +14,12 @@ "email": "jimmy@monin.net" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ "nginx", - "php7.0-fpm", + "php7.3-fpm", "mysql" ], "arguments": { @@ -27,19 +27,11 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for Cachet", - "fr": "Choisissez un domaine pour Cachet" - }, "example": "domain.org" }, { "name": "admin", "type": "user", - "ask": { - "en": "Choose the only allowed admin user", - "fr": "Choisissez l'unique utilisateur autorisé" - }, "example": "johndoe" }, { @@ -55,10 +47,6 @@ { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "default": true }, { diff --git a/scripts/install b/scripts/install index bab2e5a..1ecbab6 100644 --- a/scripts/install +++ b/scripts/install @@ -54,7 +54,6 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=admin_password --value=$admin_password -ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=language --value=$language #================================================= @@ -187,13 +186,12 @@ chown -R $app: "${final_path}/.env" "${final_path}/storage/" "${final_path}/boot #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=2 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] then - # unprotected_uris allows SSO credentials to be passed anyway. - ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" + ynh_permission_update --permission="main" --add="visitors" fi #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 67ab5bc..49a727c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) db_name=$(ynh_app_setting_get --app=$app --key=db_name) @@ -35,15 +34,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid --db_name=$app) @@ -56,6 +46,13 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -163,18 +160,6 @@ ynh_secure_remove --file=bootstrap/cache/* chown -R root: $final_path chown -R $app: "${final_path}/.env" "${final_path}/storage/" "${final_path}/bootstrap/" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1 - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - # unprotected_uris allows SSO credentials to be passed anyway - ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" -fi - #================================================= # SET MAINTENANCE MODE OFF #================================================= From 4a7194f47c2ed59da90b97717579298fa7495d63 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Mar 2021 22:09:32 +0100 Subject: [PATCH 2/4] Update upgrade --- scripts/upgrade | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 49a727c..f5c4674 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -67,13 +67,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -path_url=$(ynh_normalize_url_path --path_url=$path_url) - #================================================= # STANDARD UPGRADE STEPS #================================================= From 6a579cb980aaafe7f6860a39093abc135119e328 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 26 Mar 2021 22:46:16 +0100 Subject: [PATCH 3/4] Update check_process --- check_process | 1 - 1 file changed, 1 deletion(-) diff --git a/check_process b/check_process index b92cd43..5598173 100644 --- a/check_process +++ b/check_process @@ -16,7 +16,6 @@ upgrade=1 from_commit=7497ea8b6915b725358db0d4a1210f999961cfee backup_restore=1 multi_instance=1 - port_already_use=0 change_url=1 ;;; Options Email= From 3d8df61b69e8bc72a62b5aeb1e3b3370eb08431d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 5 Apr 2021 09:39:32 +0200 Subject: [PATCH 4/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a1f369e..ee60266 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,8 @@ Totally configurable through the Cachet application dashboard. #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/cachet%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/cachet/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/cachet%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/cachet/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/cachet.svg)](https://ci-apps.yunohost.org/ci/apps/cachet/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/cachet.svg)](https://ci-apps-arm.yunohost.org/ci/apps/cachet/) ## Limitations