From 87cb5be48a8902e347bfc9b020905986980050df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 5 Jan 2021 23:49:01 +0100 Subject: [PATCH 1/5] Set badge to SVG --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df3070f..1b079b5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Distbin for YunoHost [![Integration level](https://dash.yunohost.org/integration/distbin.svg)](https://dash.yunohost.org/appci/app/distbin) ![](https://ci-apps.yunohost.org/ci/badges/distbin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/distbin.maintain.svg) -[![Install distbin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=distbin) +[![Install distbin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=distbin) > *This package allows you to install distbin quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* From ae8c157604e68eb9835a0229a2e15656168e4af9 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 9 Jan 2021 22:35:46 +0100 Subject: [PATCH 2/5] Finding an available port --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 6bad382..c5d7979 100644 --- a/scripts/install +++ b/scripts/install @@ -55,7 +55,7 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Configuring firewall..." +ynh_script_progression --message="Finding an available port..." # Find an available port port=$(ynh_find_port --port=8095) From c18d7428955220173470cbb935e02edcc3e87afb Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 23 Jan 2021 09:45:50 +0100 Subject: [PATCH 3/5] Fix linter warnings --- issue_template.md | 2 +- manifest.json | 2 +- pull_request_template.md | 4 +--- scripts/install | 7 ++++--- scripts/restore | 2 +- scripts/upgrade | 16 ++-------------- 6 files changed, 10 insertions(+), 23 deletions(-) diff --git a/issue_template.md b/issue_template.md index c5d9a86..7b44bc9 100644 --- a/issue_template.md +++ b/issue_template.md @@ -8,7 +8,7 @@ about: Create a report to help us debug, it would be nice to fill the template a 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 distbin itself. Refer to its documentation or repository for help.* + - *Otherwise, the issue may be due to Distbin itself. Refer to its documentation or repository for help.* - *If you have a doubt, post here, we will figure it out together.* 3. *Delete the italic comments as you write over them below, and remove this guide.* --- diff --git a/manifest.json b/manifest.json index 2b1cc4c..b99914e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Distributed pastebin with ActivityPub.", "fr": "Pastebin distribué utilisant le protocole ActivityPub." }, - "version": "1.3.0~ynh5", + "version": "1.3.0~ynh6", "url": "https://distbin.com/", "license": "Apache-2.0", "maintainer": { diff --git a/pull_request_template.md b/pull_request_template.md index 166771a..6c28fc5 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -13,6 +13,4 @@ ## Package_check results --- -*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* - -[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/distbin_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/distbin_ynh%20PR-NUM-%20(USERNAME)/) +* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/install b/scripts/install index c5d7979..c71c23d 100644 --- a/scripts/install +++ b/scripts/install @@ -169,7 +169,7 @@ ynh_use_logrotate #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description="$app daemon for distbin" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Distributed pastebin" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE @@ -190,8 +190,9 @@ ynh_script_progression --message="Configuring SSOwat..." # 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="/" + # Everyone can access the app. + # The "main" permission is automatically created before the install script. + ynh_permission_update --permission="main" --add="visitors" fi #================================================= diff --git a/scripts/restore b/scripts/restore index fdd5d88..bd3bd9e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -105,7 +105,7 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description="$app daemon for distbin" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Distributed pastebin" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 94c61d5..310e92c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -119,7 +119,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path ynh_script_progression --message="Creating log folder..." mkdir -p "/var/log/$app" -chown -R "$app":"$app" "/var/log/$app" +chown -R $app:$app "/var/log/$app" #================================================= # CREATE STORAGE FOLDER @@ -188,7 +188,7 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description="$app daemon for distbin" --log="/var/log/$app/$app.log" +yunohost service add $app --description="Distributed pastebin" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE @@ -200,18 +200,6 @@ if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then sleep 60 fi -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." - -# 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 - #================================================= # RELOAD NGINX #================================================= From 67b46dc2a7a5890796643281db88e50031dbaa12 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 23 Jan 2021 09:49:58 +0100 Subject: [PATCH 4/5] Small typos --- README.md | 2 +- issue_template.md | 8 ++++---- manifest.json | 8 ++++---- scripts/restore | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1b079b5..f2b90e4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Integration level](https://dash.yunohost.org/integration/distbin.svg)](https://dash.yunohost.org/appci/app/distbin) ![](https://ci-apps.yunohost.org/ci/badges/distbin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/distbin.maintain.svg) [![Install distbin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=distbin) -> *This package allows you to install distbin quickly and simply on a YunoHost server. +> *This package allows you to install Distbin quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview diff --git a/issue_template.md b/issue_template.md index 7b44bc9..e62f591 100644 --- a/issue_template.md +++ b/issue_template.md @@ -7,7 +7,7 @@ about: Create a report to help us debug, it would be nice to fill the template a **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!* + - *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 Distbin itself. Refer to its documentation or repository for help.* - *If you have a doubt, post here, we will figure it out together.* 3. *Delete the italic comments as you write over them below, and remove this guide.* @@ -20,7 +20,7 @@ about: Create a report to help us debug, it would be nice to fill the template a - 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* +- 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`* @@ -34,8 +34,8 @@ about: Create a report to help us debug, it would be nice to fill the template a - *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 '....'* + 2. *Click on '...'* + 3. *Scroll down to '...'* 4. *See error* **Expected behavior** diff --git a/manifest.json b/manifest.json index b99914e..0be64ba 100644 --- a/manifest.json +++ b/manifest.json @@ -25,8 +25,8 @@ "name": "domain", "type": "domain", "ask": { - "en": "Choose a domain name for distbin", - "fr": "Choisissez un nom de domaine pour distbin" + "en": "Choose a domain name for Distbin", + "fr": "Choisissez un nom de domaine pour Distbin" }, "example": "distbin.example.com" }, @@ -34,8 +34,8 @@ "name": "path", "type": "path", "ask": { - "en": "Choose a path for distbin", - "fr": "Choisissez un chemin pour distbin" + "en": "Choose a path for Distbin", + "fr": "Choisissez un chemin pour Distbin" }, "example": "/distbin", "default": "/distbin" diff --git a/scripts/restore b/scripts/restore index bd3bd9e..3556fb1 100644 --- a/scripts/restore +++ b/scripts/restore @@ -71,7 +71,7 @@ ynh_system_user_create --username=$app --home_dir=$final_path ynh_script_progression --message="Restoring user rights..." # Restore permissions on app files -chown -R "$app":"$app" "$final_path" +chown -R $app:$app "$final_path" #================================================= # CREATE LOG FOLDER @@ -79,7 +79,7 @@ chown -R "$app":"$app" "$final_path" ynh_script_progression --message="Creating log folder..." mkdir -p "/var/log/$app" -chown -R "$app":"$app" "/var/log/$app" +chown -R $app:$app "/var/log/$app" #================================================= # SPECIFIC RESTORATION From 331977152a08a794ba9141686b52be82cad68b82 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 26 Jan 2021 21:53:17 +0100 Subject: [PATCH 5/5] Update check_process --- check_process | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/check_process b/check_process index 4725ec0..86c6e14 100644 --- a/check_process +++ b/check_process @@ -20,6 +20,8 @@ upgrade=1 from_commit=b01da8e6f8d621a1b9c7aec4b82bbe96c0e7cc03 # 1.3.0~ynh4 upgrade=1 from_commit=0dda384e84bbe2513cb67cfd1eef15d667e50354 + # 1.3.0~ynh5 + upgrade=1 from_commit=f7bc083d037eb771afeddc2237a24505a5ef1c68 backup_restore=1 multi_instance=1 port_already_use=0 @@ -32,3 +34,5 @@ Notification=all name=1.2.0~ynh3 ; commit=0dda384e84bbe2513cb67cfd1eef15d667e50354 name=1.3.0~ynh4 + ; commit=f7bc083d037eb771afeddc2237a24505a5ef1c68 + name=1.3.0~ynh5