From 9d80e10f2f472c78b6474c6ab6bb7a20f8a2f06c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 9 Jan 2021 22:46:24 +0100 Subject: [PATCH 1/5] Finding an available port --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 306fdd8..2190d7f 100755 --- a/scripts/install +++ b/scripts/install @@ -78,7 +78,7 @@ ynh_app_setting_set --app=$app --key=signing_salt --value=$signing_salt #================================================= # 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 35af50f27baf6901c8acb2a3a41b757db1210fab Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 17 Feb 2021 20:01:14 +0100 Subject: [PATCH 2/5] Apply last example_ynh --- README.md | 1 - check_process | 5 ----- issue_template.md | 35 ++++++++++++++++++++++------------- manifest.json | 2 +- pull_request_template.md | 4 +--- scripts/change_url | 1 + scripts/install | 10 +++++----- scripts/remove | 4 +--- scripts/restore | 2 +- scripts/upgrade | 36 ++++-------------------------------- 10 files changed, 36 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index 0fd899c..e3a9cea 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,6 @@ The app can be used by multiple users. * App website: https://pleroma.social/ * Upstream app repository https://git.pleroma.social/pleroma/pleroma/ * YunoHost website: https://yunohost.org/ - * Report usage problems with yunohost on [Yunohost Forum](https://forum.yunohost.org/c/support/apps) --- diff --git a/check_process b/check_process index 98254d8..e427e47 100644 --- a/check_process +++ b/check_process @@ -49,13 +49,8 @@ upgrade=1 from_commit=ade89203b611fd178bc9d1cf35804bc08ea3a78b backup_restore=1 multi_instance=0 - # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. - # incorrect_path=1 port_already_use=0 change_url=0 -;;; Levels - # If the level 5 (Package linter) is forced to 1. Please add justifications here. - Level 5=auto ;;; Options Email=anmol@datamol.org;yalh@yahoo.com Notification=yes diff --git a/issue_template.md b/issue_template.md index fbdd93d..72440d9 100644 --- a/issue_template.md +++ b/issue_template.md @@ -1,32 +1,34 @@ --- name: Bug report -about: Create a report to help us debug, it would be nice to fill the template as much as you can to help us, help you and help us all. +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!* + - *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 Pleroma itself. Refer to its documentation or repository for help.* - - *If you have a doubt, post here, we will figure it out together.* + - *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** +### Describe the bug + *A clear and concise description of what the bug is.* -**Versions** +### 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* +- 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`* -**To Reproduce** -*Steps to reproduce the behavior.* +### Steps to reproduce + - *If you performed a command from the CLI, the command itself is enough. For example:* ```sh sudo yunohost app install pleroma @@ -34,13 +36,20 @@ 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** +### 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** -*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.* +### 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/manifest.json b/manifest.json index df13b1f..ca24964 100644 --- a/manifest.json +++ b/manifest.json @@ -18,7 +18,7 @@ "name": "yalh76" }], "requirements": { - "yunohost": ">= 4.0" + "yunohost": ">= 4.1.3" }, "multi_instance": false, "services": [ diff --git a/pull_request_template.md b/pull_request_template.md index a24f41a..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/pleroma_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/pleroma_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/change_url b/scripts/change_url index c0cf702..d1bcc13 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -126,6 +126,7 @@ ynh_store_file_checksum --file="$config" #================================================= ynh_script_progression --message="Starting a systemd service..." +# Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Started $app" if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then diff --git a/scripts/install b/scripts/install index 2190d7f..ef82b9d 100755 --- a/scripts/install +++ b/scripts/install @@ -64,7 +64,6 @@ ynh_script_progression --message="Storing installation settings..." 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=is_public --value=$is_public ynh_app_setting_set --app=$app --key=name --value=$name ynh_app_setting_set --app=$app --key=registration --value=$registration ynh_app_setting_set --app=$app --key=cache --value=$cache @@ -256,18 +255,19 @@ chown -R "$app":"$app" "$final_path" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." -yunohost service add $app --description "$app daemon for Pleroma" +yunohost service add $app --description="$app daemon for Pleroma" #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." +ynh_script_progression --message="Configuring permissions..." # 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/remove b/scripts/remove index 462eacc..b6225d7 100755 --- a/scripts/remove +++ b/scripts/remove @@ -28,12 +28,11 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -ynh_script_progression --message="Removing service integration in YunoHost..." # Remove the service from the list of services known by Yunohost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then - ynh_script_progression --message="Removing $app service..." + ynh_script_progression --message="Removing $app service integration..." yunohost service remove $app fi @@ -90,7 +89,6 @@ ynh_secure_remove --file="/etc/nginx/conf.d/$app-cache.conf" #================================================= # CLOSE A PORT #================================================= -ynh_script_progression --message="Closing a port..." if yunohost firewall list | grep -q "\- $port$" then diff --git a/scripts/restore b/scripts/restore index f8692d7..b369738 100755 --- a/scripts/restore +++ b/scripts/restore @@ -160,7 +160,7 @@ fi #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index 29f3ed9..7fc34d8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,7 +21,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) db_name=$(ynh_app_setting_get --app=$app --key=db_name) admin_email=$(ynh_app_setting_get --app=$app --key=admin_email) @@ -46,27 +45,12 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -# 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 +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all -# If db_name doesn't exist, create it -if [ -z "$db_name" ]; then - db_name=$(ynh_sanitize_dbid --db_name=$app) - ynh_app_setting_set --app=$app --key=db_name --value=$db_name + ynh_app_setting_delete --app=$app --key=is_public fi - -# If final_path doesn't exist, create it -if [ -z "$final_path" ]; then - final_path=/var/www/$app - ynh_app_setting_set --app=$app --key=final_path --value=$final_path -fi - #Switch variables name psql_db=$(ynh_app_setting_get --app=$app --key=psql_db) @@ -301,18 +285,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 f2fe6118f3c8494140aa13c7ab3ad4a1982b00d0 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 17 Feb 2021 20:14:45 +0100 Subject: [PATCH 3/5] Upgrade to 2.2.2 --- README.md | 2 +- check_process | 4 ++++ conf/arm.src | 6 +++--- conf/arm64.src | 6 +++--- conf/x86-64.src | 6 +++--- manifest.json | 2 +- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0fd899c..18f064d 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post - Tootdon (Android + iOS) - Tootle (iOS) -**Shipped version:** 2.2.0 +**Shipped version:** 2.2.2 ## Important points to read before installing diff --git a/check_process b/check_process index 98254d8..cc97cdd 100644 --- a/check_process +++ b/check_process @@ -47,6 +47,8 @@ upgrade=1 from_commit=e13745923a2e06e780e7b9d34ae084f600a9a2a2 # 2.1.2~ynh1 upgrade=1 from_commit=ade89203b611fd178bc9d1cf35804bc08ea3a78b + # 2.2.0~ynh1 + upgrade=1 from_commit=059ddc457aabe6962f5960612ed2dc1db53daeeb backup_restore=1 multi_instance=0 # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. @@ -86,3 +88,5 @@ Notification=yes name=2.0.7~ynh1 ; commit=ade89203b611fd178bc9d1cf35804bc08ea3a78b name=2.1.2~ynh1 + ; commit=059ddc457aabe6962f5960612ed2dc1db53daeeb + name=2.2.0~ynh1 diff --git a/conf/arm.src b/conf/arm.src index ab1b66c..9f2de67 100644 --- a/conf/arm.src +++ b/conf/arm.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/165405/artifacts/download -SOURCE_SUM=1c03dac583605ff8d2d52c93f21b9a70088c0c4ba3c4b2a36b27ea5c54d8e0a4 +SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/175286/artifacts/download +SOURCE_SUM=d0fe56fa2686e1e19ef340077668df898a4c9c4fa8a4a2ff25e62c33825f7df3 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=pleroma-v2.2.0-arm.zip +SOURCE_FILENAME=pleroma-v2.2.2-arm.zip diff --git a/conf/arm64.src b/conf/arm64.src index 77e7ecb..dabd6fc 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/165407/artifacts/download -SOURCE_SUM=2bcb5836d12f46698640039b57d1b9b8917e0c59d273be2d3e2057e5ede84ef9 +SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/175288/artifacts/download +SOURCE_SUM=dc6a210759f099219528a1d2df111110d4fbcf267d7216668f34608e7fb9f380 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=pleroma-v2.2.0-arm64.zip +SOURCE_FILENAME=pleroma-v2.2.2-arm64.zip diff --git a/conf/x86-64.src b/conf/x86-64.src index 59f31a8..f1cf9d5 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/165403/artifacts/download -SOURCE_SUM=4949fb048425e4098094583e7a7cf20403fab8a9edd42d0029e99be8604ba0af +SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/175284/artifacts/download +SOURCE_SUM=356ac1c3a1b6253934afa298166344fe73f364669cfb44447d3126f51e01d4b0 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=pleroma-v2.2.0-x86-64.zip +SOURCE_FILENAME=pleroma-v2.2.2-x86-64.zip diff --git a/manifest.json b/manifest.json index df13b1f..bd97055 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "A free, federated social networking server built on open protocols.", "fr": "Un serveur de réseautage social fédéré et gratuit basé sur des protocoles ouverts." }, - "version": "2.2.0~ynh1", + "version": "2.2.2~ynh1", "url": "https://git.pleroma.social/pleroma/pleroma", "license": "AGPL-3.0-only", "maintainer": [ From 406cdb9741728d64bc08de679eaacd0320dd3603 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 21 Feb 2021 21:35:30 +0100 Subject: [PATCH 4/5] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index cc97cdd..2de1977 100644 --- a/check_process +++ b/check_process @@ -22,7 +22,7 @@ setup_public=1 upgrade=1 # 0.9.99999 - upgrade=1 from_commit=9ec87c36793780f74365d3059d7b9d12885fbfcb + # upgrade=1 from_commit=9ec87c36793780f74365d3059d7b9d12885fbfcb # 1.1.7 # upgrade=1 from_commit=3e88dd59d8e5593fb60a86ab955aafde76abdf2e # 1.1.8 From 5d1845c83597bb60714fad629b2c059757f6db2f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 21 Feb 2021 21:37:15 +0100 Subject: [PATCH 5/5] Update check_process --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index e427e47..048e227 100644 --- a/check_process +++ b/check_process @@ -22,7 +22,7 @@ setup_public=1 upgrade=1 # 0.9.99999 - upgrade=1 from_commit=9ec87c36793780f74365d3059d7b9d12885fbfcb + # upgrade=1 from_commit=9ec87c36793780f74365d3059d7b9d12885fbfcb # 1.1.7 # upgrade=1 from_commit=3e88dd59d8e5593fb60a86ab955aafde76abdf2e # 1.1.8