From 4ae7c13f7d60f4beeb5088320689547607acd849 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 12:49:49 +0100 Subject: [PATCH 1/5] 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 9b45f33b7b2a5ecdad52c08b0f89ac95054d07d8 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 12:53:01 +0100 Subject: [PATCH 2/5] 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 7aa519dba82b8e4b87e97eb0779adcf810dc922e Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 12:56:38 +0100 Subject: [PATCH 3/5] 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 d3df536e456a7dd0c36f7898c1d4d695120bd4fc Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 22 Mar 2021 17:47:48 +0100 Subject: [PATCH 4/5] 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 #================================================= From 4c426ae15d0d26e7bd510170df61c057a6b3819f Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Thu, 13 May 2021 17:54:38 +0200 Subject: [PATCH 5/5] [autopatch] Update issue and PR templates --- .github/ISSUE_TEMPLATE.md | 55 ++++++++++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++++ 2 files changed, 71 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..2729a6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,55 @@ +--- +name: Bug report +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. + +--- + +**How to post a meaningful bug report** +1. *Read this whole template first.* +2. *Determine if you are on the right place:* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* +--- + +### Describe the bug + +*A clear and concise description of what the bug is.* + +### Context + +- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* +- YunoHost version: x.x.x +- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* + - If yes, please explain: +- Using, or trying to install package version/branch: +- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* + +### Steps to reproduce + +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + sudo yunohost app install the_app + ``` +- *If you used the webadmin, please perform the equivalent command from the CLI first.* +- *If the error occurs in your browser, explain what you did:* + 1. *Go to '...'* + 2. *Click on '...'* + 3. *Scroll down to '...'* + 4. *See error* + +### Expected behavior + +*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* + +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + +*If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)