From d3e5c5aaee9e4dbef311c6a8ab80422311b0e7f8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 29 Apr 2020 15:46:58 +0200 Subject: [PATCH 1/4] Fix upgrade from previous versions --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 60f1105..bd90dc8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -164,6 +164,8 @@ if ynh_version_gt "1.1.1~ynh1" "${previous_version}" ; then config="/etc/$app/config.exs" mv $final_path/$app/config/prod.secret.exs $config ynh_replace_string --match_string="use Mix.Config" --replace_string="import Config" --target_file="$config" + echo "config :pleroma, :instance, static_dir: \"/home/yunohost.app/$app/static\"" >> $config + echo "config :pleroma, Pleroma.Uploaders.Local, uploads: \"/home/yunohost.app/$app/uploads\"" >> $config ynh_backup_if_checksum_is_different --file="$config" From 42ebd835a05bca2f5cf0e3eee408283cea2e1862 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 27 May 2020 04:43:32 +0200 Subject: [PATCH 2/4] Upgrade to 2.0.5 --- README.md | 2 +- check_process | 29 +++++++++++++++++++++++++++++ conf/arm.src | 6 +++--- conf/arm64.src | 6 +++--- conf/x86-64.src | 6 +++--- manifest.json | 2 +- 6 files changed, 40 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 2670837..ffa042d 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post - Tootdon (Android + iOS) - Tootle (iOS) -**Shipped version:** 2.0.2 +**Shipped version:** 2.0.5 ## Important points to read before installing diff --git a/check_process b/check_process index cb9a758..c13fe25 100755 --- a/check_process +++ b/check_process @@ -29,6 +29,16 @@ upgrade=1 from_commit=0a839da33898b7a58f12a27b5b51799694021353 # 1.1.9 upgrade=1 from_commit=eedad6977760c31d7fb94ced247b9136824da580 + # 2.0.0 + upgrade=1 from_commit=0693dd5efd5ab2a06267993cc7106ed2efc26ea2 + # 2.0.1~ynh1 + upgrade=1 from_commit=7c3680c82b9c3f2449c6dbb346a5729a18636ac1 + # 2.0.1~ynh2 + upgrade=1 from_commit=723df4423d80baa31e9717628bc5b5fd50114bc8 + # 2.0.2~ynh1 + upgrade=1 from_commit=8f418ba020cee267f76bb781b03a41d384707a5b + # 2.0.2~ynh2 + upgrade=1 from_commit=251a08383f59be006803fd12013baa92b03c1ef7 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. @@ -41,3 +51,22 @@ ;;; Options Email=anmol@datamol.org;yalh@yahoo.com Notification=yes +;;; Upgrade options + ; commit=9ec87c36793780f74365d3059d7b9d12885fbfcb + name=0.9.99999 + ; commit=3e88dd59d8e5593fb60a86ab955aafde76abdf2e + name=1.1.7 + ; commit=0a839da33898b7a58f12a27b5b51799694021353 + name=1.1.8 + ; commit=eedad6977760c31d7fb94ced247b9136824da580 + name=1.1.9 + ; commit=0693dd5efd5ab2a06267993cc7106ed2efc26ea2 + name=2.0.0 + ; commit=7c3680c82b9c3f2449c6dbb346a5729a18636ac1 + name=2.0.1~ynh1 + ; commit=723df4423d80baa31e9717628bc5b5fd50114bc8 + name=2.0.1~ynh2 + ; commit=8f418ba020cee267f76bb781b03a41d384707a5b + name=2.0.2~ynh1 + ; commit=251a08383f59be006803fd12013baa92b03c1ef7 + name=2.0.2~ynh2 diff --git a/conf/arm.src b/conf/arm.src index be12057..8169ad1 100644 --- a/conf/arm.src +++ b/conf/arm.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/105552/artifacts/download -SOURCE_SUM=3522ed2780b40a1d0cd0b34b104c9750435fdea14e17fea006fd52963c0c62c8 +SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/116116/artifacts/download +SOURCE_SUM=e736a37744aa42760e3c3db64208461854d6ce1224625e8dc9c0c3482a222a35 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=pleroma-v2.0.2-arm.zip +SOURCE_FILENAME=pleroma-v2.0.5-arm.zip diff --git a/conf/arm64.src b/conf/arm64.src index abee7d7..6911607 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/105554/artifacts/download -SOURCE_SUM=2312185fbfe6ab11747201c3801ad1a7c6f3e6167c8a3d731e6536ee37e33801 +SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/116118/artifacts/download +SOURCE_SUM=99834c52f5baed56b4ca8c821b6d39b965d41b6ae7572c2a483f659fa3e99947 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=pleroma-v2.0.2-arm64.zip +SOURCE_FILENAME=pleroma-v2.0.5-arm64.zip diff --git a/conf/x86-64.src b/conf/x86-64.src index f3e2ef6..963093f 100644 --- a/conf/x86-64.src +++ b/conf/x86-64.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/105550/artifacts/download -SOURCE_SUM=080ee0dc10e0c4fb2e183455eb253be0c2f8a6176418463ecc421d6d86855904 +SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/116114/artifacts/download +SOURCE_SUM=4a285a240c305e311fbd5834d37af1697ce2779b98c6058e94fa1d9a623d2569 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=pleroma-v2.0.2-x86-64.zip +SOURCE_FILENAME=pleroma-v2.0.5-x86-64.zip diff --git a/manifest.json b/manifest.json index b576de6..4e33892 100755 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Pleroma is an OStatus-compatible social networking server written in Elixir, compatible with GNU Social and Mastodon", "fr": "Pleroma est un réseau social écrit en Elixir, compatible avec OStatus, GNU Social et Mastodon" }, - "version": "2.0.2~ynh2", + "version": "2.0.5~ynh1", "url": "https://git.pleroma.social/pleroma/pleroma", "license": "AGPL-3.0-only", "maintainer": [ From b4c06bc4a87691ebbdc3327034b4dd6747b0ed58 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 27 May 2020 04:44:43 +0200 Subject: [PATCH 3/4] Create issue_template.md --- issue_template.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 issue_template.md diff --git a/issue_template.md b/issue_template.md new file mode 100644 index 0000000..2fd2c35 --- /dev/null +++ b/issue_template.md @@ -0,0 +1,46 @@ +--- +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. + +--- + +**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 pleroma 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.* +--- + +**Describe the bug** +*A clear and concise description of what the bug is.* + +**Versions** +- 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`* + +**To Reproduce** +*Steps to reproduce the behavior.* +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + sudo yunohost app install pleroma + ``` +- *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** +*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.* +*If applicable and useful, add screenshots to help explain your problem.* From 53cd71521d7165e99f75de3be8ee67102279911b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 27 May 2020 04:48:48 +0200 Subject: [PATCH 4/4] Appy last example_ynh --- scripts/backup | 52 ++++++++++++++++---------------------------------- 1 file changed, 16 insertions(+), 36 deletions(-) diff --git a/scripts/backup b/scripts/backup index ceaafea..74f86b2 100755 --- a/scripts/backup +++ b/scripts/backup @@ -35,27 +35,19 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) cache=$(ynh_app_setting_get --app=$app --key=cache) #================================================= -# STANDARD BACKUP STEPS +# DECLARE DATA AND CONF FILES TO BACKUP #================================================= -# STOP SYSTEMD SERVICE -#================================================= -ynh_print_info --message="Stopping a systemd service..." - -ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd --line_match="Stopped $app" - -pkill -u $app +ynh_print_info --message="Declaring files to be backed up..." #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_print_info --message="Backing up the main app directory..." ynh_backup --src_path="$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_print_info --message="Backing up nginx web server configuration..." ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -64,6 +56,20 @@ then ynh_backup --src_path="/etc/nginx/conf.d/$app-cache.conf" fi +#================================================= +# SPECIFIC BACKUP +#================================================= +# BACKUP CONFIG FILE +#================================================= + +ynh_backup --src_path="/etc/$app/config.exs" + +#================================================= +# BACKUP SYSTEMD +#================================================= + +ynh_backup --src_path="/etc/systemd/system/$app.service" + #================================================= # BACKUP THE POSTGRESQL DATABASE #================================================= @@ -71,32 +77,6 @@ ynh_print_info --message="Backing up the PostgreSQL database..." ynh_psql_dump_db --database="$db_name" > db.sql -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP CONFIG FILE -#================================================= -ynh_print_info --message="Backing up configuration file..." - -ynh_backup --src_path="/etc/$app/config.exs" - -#================================================= -# BACKUP SYSTEMD -#================================================= -ynh_print_info --message="Backing up systemd configuration..." - -ynh_backup --src_path="/etc/systemd/system/$app.service" - -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_print_info --message="Starting 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 - sleep 60 -fi - #================================================= # END OF SCRIPT #=================================================