From 97965c16ff27bb02b94f02d0bc0f8fe36de5dba5 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 12:49:49 +0100 Subject: [PATCH 1/4] Fix sources and bump version --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index cab1186..075f1a0 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/key-networks/ztncui/archive/master.zip -SOURCE_SUM=78947FA9F332E76563C666D3348E4AD91BD270C1A9C03ABDCE915E9058F51048 +SOURCE_URL=https://github.com/key-networks/ztncui/archive/d966c51e38f98ade21d1e1de3ff5013e05285898.zip +SOURCE_SUM=D1E860CB3C712F537BFACAAE8DA5BF4852C8288C4277B27344C06E1F9057B087 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 8591b36..7ad7a51 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "ZeroTier network controller user interface", "fr": "Interface utilisateur pour le contrôleur de réseau ZeroTier" }, - "version": "0.5.8~ynh2", + "version": "20210310~ynh1", "url": "https://key-networks.com/ztncui", "license": "GPL-3.0-only", "maintainer": { From 0f51aec95cfe91a46aac7a9c09ab468bb8766df3 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 12:53:01 +0100 Subject: [PATCH 2/4] Fix linter warnings --- manifest.json | 18 +----------------- scripts/upgrade | 8 +++++++- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/manifest.json b/manifest.json index 7ad7a51..e8ad688 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "tituspijean@outlook.com" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.2" }, "services": [], "multi_instance": false, @@ -23,10 +23,6 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for ztncui", - "fr": "Choisissez un nom de domaine pour ztncui" - }, "help": { "en": "REMINDER: ztncui needs the ZeroTier app to be already installed.", "fr": "RAPPEL: ztncui nécessite que l'app ZeroTier soit déjà installée." @@ -36,10 +32,6 @@ { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "help": { "en": "Ztncui has its own login system, but setting it as private is advised.", "fr": "Ztncui a son propre système de connexion, mais la rendre privée est conseillé." @@ -49,19 +41,11 @@ { "name": "admin", "type": "user", - "ask": { - "en": "Choose an admin user", - "fr": "Choisissez l’administrateur" - }, "example": "johndoe" }, { "name": "password", "type": "password", - "ask": { - "en": "Set the administrator password", - "fr": "Définissez le mot de passe administrateur" - }, "help": { "en": "It will always be asked by Ztncui, in addition to your YunoHost credentials if set to private.", "fr": "Il sera toujours demandé par Ztncui, en plus des identifiants YunoHost si l'app est privée." diff --git a/scripts/upgrade b/scripts/upgrade index 1b72274..5fe72d8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,7 +18,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) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) admin=$(ynh_app_setting_get --app=$app --key=admin) @@ -47,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 + # If admin or password do not exist, assign the standard ones and have them replaced upon first login if [ -z "$admin" ] || [ -z "$hashedpassword" ]; then admin="admin" From b31f73762d205106fee0cdb078ca4636c1cb6686 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 12:56:38 +0100 Subject: [PATCH 3/4] Improve manifest --- manifest.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index e8ad688..df9d23d 100644 --- a/manifest.json +++ b/manifest.json @@ -20,12 +20,20 @@ "multi_instance": false, "arguments": { "install": [ + { + "name": "warning", + "type": "display_text", + "ask": { + "en": "REMINDER: ztncui needs the ZeroTier app to be already installed.", + "fr": "RAPPEL: ztncui nécessite que l'app ZeroTier soit déjà installée." + } + }, { "name": "domain", "type": "domain", "help": { - "en": "REMINDER: ztncui needs the ZeroTier app to be already installed.", - "fr": "RAPPEL: ztncui nécessite que l'app ZeroTier soit déjà installée." + "en": "Ztncui can only be installed at the root of a domain.", + "fr": "Ztncui ne peut être installée qu'à la racine d'un domaine." }, "example": "zt.example.com" }, From ee21d7481f1d570246c66afd71b2b7ca713fff32 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 17:47:48 +0100 Subject: [PATCH 4/4] Drop is_public/SSO handling in upgrade --- scripts/upgrade | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5fe72d8..c4a582e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -200,18 +200,6 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 yunohost service add $app --description "ZeroTier network controller user interface" --log "/var/log/$app/$app.log" -#================================================= -# 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 - #================================================= # START SYSTEMD SERVICE #=================================================