From 8e9c387d70704580734908d434cc48569748db85 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 7 Jan 2022 21:06:28 +0100 Subject: [PATCH 1/4] Apply last example_ynh --- check_process | 10 +++++----- conf/nginx.conf | 6 ------ doc/DESCRIPTION.md | 5 +++++ manifest.json | 8 +++----- scripts/backup | 2 +- scripts/install | 9 ++++----- scripts/remove | 16 ++++++++-------- scripts/restore | 2 +- scripts/upgrade | 3 +-- scripts/ynh_detect_arch__2 | 25 ------------------------- 10 files changed, 28 insertions(+), 58 deletions(-) create mode 100644 doc/DESCRIPTION.md delete mode 100644 scripts/ynh_detect_arch__2 diff --git a/check_process b/check_process index e997daa..657a9e1 100644 --- a/check_process +++ b/check_process @@ -17,15 +17,15 @@ setup_public=1 upgrade=1 # 2.2.0~ynh1 - upgrade=1 from_commit=059ddc457aabe6962f5960612ed2dc1db53daeeb + # upgrade=1 from_commit=059ddc457aabe6962f5960612ed2dc1db53daeeb # 2.2.2~ynh1 - upgrade=1 from_commit=63723f18af5b035a41e967078cc3128423b1f9ae + # upgrade=1 from_commit=63723f18af5b035a41e967078cc3128423b1f9ae # 2.3.0~ynh1 - upgrade=1 from_commit=9f5c0970d2bf8bb6111785184b1d3762228b04ec + # upgrade=1 from_commit=9f5c0970d2bf8bb6111785184b1d3762228b04ec # 2.3.0~ynh2 - upgrade=1 from_commit=4757df265b0c3e8d1fc5280190ccfe5705dcb691 + # upgrade=1 from_commit=4757df265b0c3e8d1fc5280190ccfe5705dcb691 # 2.3.0~ynh3 - upgrade=1 from_commit=28ed2fd7ab7b5e55154991c990d8e780560a56db + # upgrade=1 from_commit=28ed2fd7ab7b5e55154991c990d8e780560a56db # 2.4.0~ynh1 upgrade=1 from_commit=2c4a57afdc92a6428ccfea3ccb74c7e33dc9b9ff backup_restore=1 diff --git a/conf/nginx.conf b/conf/nginx.conf index c0bdf8f..fa8dfb4 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,11 +1,5 @@ location / { - # if you do not want remote frontends to be able to access your Pleroma backend - # server, remove these lines. - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - # Standard nginx configuration proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..943c97b --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,5 @@ +Pleroma is a microblogging server software that can federate (= exchange messages with) other servers that support ActivityPub. What that means is that you can host a server for yourself or your friends and stay in control of your online identity, but still exchange messages with people on larger servers. Pleroma will federate with all servers that implement ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed. + +For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post/what-is-pleroma/) + +**Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web diff --git a/manifest.json b/manifest.json index 368ab21..8179c4c 100644 --- a/manifest.json +++ b/manifest.json @@ -25,7 +25,7 @@ "name": "yalh76" }], "requirements": { - "yunohost": ">= 4.1.7.3" + "yunohost": ">= 4.3.1.8" }, "multi_instance": false, "services": [ @@ -35,13 +35,11 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "is_public", diff --git a/scripts/backup b/scripts/backup index b833944..7496400 100755 --- a/scripts/backup +++ b/scripts/backup @@ -73,7 +73,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" # BACKUP VARIOUS FILES #================================================= -ynh_backup --src_path="/etc/$app/config.exs" +ynh_backup --src_path="/etc/$app/" #================================================= # BACKUP THE POSTGRESQL DATABASE diff --git a/scripts/install b/scripts/install index bea78bc..576bc11 100755 --- a/scripts/install +++ b/scripts/install @@ -7,7 +7,6 @@ #================================================= source _common.sh -source ynh_detect_arch__2 source /usr/share/yunohost/helpers #================================================= @@ -121,7 +120,7 @@ ynh_script_progression --message="Setting up source files..." ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -architecture=$(ynh_detect_arch) +architecture=$YNH_ARCH ynh_setup_source --dest_dir="$final_path/$app" --source_id=$architecture chmod 750 "$final_path" @@ -170,11 +169,11 @@ chown -R $app:$app "$datadir" #================================================= ynh_script_progression --message="Adding a configuration file..." -mkdir -p /etc/$app -chown -R $app /etc/$app - config="/etc/$app/config.exs" +mkdir -p /etc/$app +chown $app:$app /etc/$app + #================================================= # SETUP SYSTEMD #================================================= diff --git a/scripts/remove b/scripts/remove index d337e43..f1ec2a2 100755 --- a/scripts/remove +++ b/scripts/remove @@ -55,14 +55,6 @@ ynh_script_progression --message="Removing the PostgreSQL database..." # Remove a database if it exists, along with the associated user ynh_psql_remove_db --db_user=$db_user --db_name=$db_name -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -80,6 +72,14 @@ ynh_script_progression --message="Removing NGINX web server configuration..." ynh_remove_nginx_config ynh_secure_remove --file="/etc/nginx/conf.d/$app-cache.conf" +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # CLOSE A PORT #================================================= diff --git a/scripts/restore b/scripts/restore index f310611..82a9cc8 100755 --- a/scripts/restore +++ b/scripts/restore @@ -125,7 +125,7 @@ ynh_psql_execute_file_as_root --file="./db.sql" --database="$db_name" #================================================= ynh_script_progression --message="Restoring various files..." -ynh_restore_file --origin_path="/etc/$app/config.exs" +ynh_restore_file --origin_path="/etc/$app/" chmod 400 "/etc/$app/config.exs" chown $app:$app "/etc/$app/config.exs" diff --git a/scripts/upgrade b/scripts/upgrade index c31144e..a92578f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -8,7 +8,6 @@ source _common.sh source ynh_package_version -source ynh_detect_arch__2 source /usr/share/yunohost/helpers #================================================= @@ -184,7 +183,7 @@ then ynh_script_progression --message="Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src - architecture=$(ynh_detect_arch) + architecture=$YNH_ARCH ynh_setup_source --dest_dir="$final_path/$app" --source_id=$architecture fi diff --git a/scripts/ynh_detect_arch__2 b/scripts/ynh_detect_arch__2 deleted file mode 100644 index b1c7375..0000000 --- a/scripts/ynh_detect_arch__2 +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Check the architecture -# -# example: architecture=$(ynh_detect_arch) -# -# usage: ynh_detect_arch -# -# Requires YunoHost version 2.2.4 or higher. - -ynh_detect_arch(){ - local architecture - if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then - architecture="arm64" - elif [ -n "$(uname -m | grep 64)" ]; then - architecture="x86-64" - elif [ -n "$(uname -m | grep 86)" ]; then - architecture="i386" - elif [ -n "$(uname -m | grep arm)" ]; then - architecture="arm" - else - architecture="unknown" - fi - echo $architecture -} From c441c27407ed63c7df7d6233b2a8eab9456d0f5a Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 7 Jan 2022 20:06:33 +0000 Subject: [PATCH 2/4] Auto-update README --- README.md | 7 ++++++- README_fr.md | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0db7934..34c7716 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,12 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -A free, federated social networking server built on open protocols. +Pleroma is a microblogging server software that can federate (= exchange messages with) other servers that support ActivityPub. What that means is that you can host a server for yourself or your friends and stay in control of your online identity, but still exchange messages with people on larger servers. Pleroma will federate with all servers that implement ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed. + +For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post/what-is-pleroma/) + +**Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web + **Shipped version:** 2.4.1~ynh1 diff --git a/README_fr.md b/README_fr.md index 391a5ec..cebf735 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,12 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Un serveur de réseautage social fédéré et gratuit basé sur des protocoles ouverts. +Pleroma is a microblogging server software that can federate (= exchange messages with) other servers that support ActivityPub. What that means is that you can host a server for yourself or your friends and stay in control of your online identity, but still exchange messages with people on larger servers. Pleroma will federate with all servers that implement ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Peertube, and Pixelfed. + +For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post/what-is-pleroma/) + +**Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web + **Version incluse :** 2.4.1~ynh1 From 4cc61862da28312a986d694e1d7b8ba1c0f9ef13 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 10 Jan 2022 21:48:15 +0100 Subject: [PATCH 3/4] Fixing sources --- conf/{x86-64.src => amd64.src} | 0 conf/{arm.src => armhf.src} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename conf/{x86-64.src => amd64.src} (100%) rename conf/{arm.src => armhf.src} (100%) diff --git a/conf/x86-64.src b/conf/amd64.src similarity index 100% rename from conf/x86-64.src rename to conf/amd64.src diff --git a/conf/arm.src b/conf/armhf.src similarity index 100% rename from conf/arm.src rename to conf/armhf.src From ced14936955aabcc9f7cf43d8556fa08cd395940 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 13 Jan 2022 21:03:11 +0100 Subject: [PATCH 4/4] Upgrade to 2.4.2~ynh1 --- README.md | 2 +- README_fr.md | 2 +- check_process | 4 ++++ conf/amd64.src | 6 +++--- conf/arm64.src | 6 +++--- conf/armhf.src | 6 +++--- manifest.json | 2 +- 7 files changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 34c7716..75d9528 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post **Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web -**Shipped version:** 2.4.1~ynh1 +**Shipped version:** 2.4.2~ynh1 **Demo:** http://distsn.org/pleroma-instances.html diff --git a/README_fr.md b/README_fr.md index cebf735..4f36201 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post **Mastodon web front-end for Pleroma:** Add **/web** in front of your Pleroma domain, eg. pleroma.domain.tld/web -**Version incluse :** 2.4.1~ynh1 +**Version incluse :** 2.4.2~ynh1 **Démo :** http://distsn.org/pleroma-instances.html diff --git a/check_process b/check_process index 657a9e1..a3fe026 100644 --- a/check_process +++ b/check_process @@ -28,6 +28,8 @@ # upgrade=1 from_commit=28ed2fd7ab7b5e55154991c990d8e780560a56db # 2.4.0~ynh1 upgrade=1 from_commit=2c4a57afdc92a6428ccfea3ccb74c7e33dc9b9ff + # 2.4.1~ynh1 + upgrade=1 from_commit=e6d9935af254018baf326281662c55407170694d backup_restore=1 multi_instance=0 port_already_use=0 @@ -48,3 +50,5 @@ Notification=yes name=2.3.0~ynh3 ; commit=2c4a57afdc92a6428ccfea3ccb74c7e33dc9b9ff name=2.4.0~ynh1 + ; commit=e6d9935af254018baf326281662c55407170694d + name=2.4.1~ynh1 diff --git a/conf/amd64.src b/conf/amd64.src index 99554ca..2c2bb76 100644 --- a/conf/amd64.src +++ b/conf/amd64.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/195485/artifacts/download?file_type=archive -SOURCE_SUM=70f4a57a6300ac2ff0564f5d7f60e1c062f9be25821a881bce0ef34167e5f340 +SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/202821/artifacts/download?file_type=archive +SOURCE_SUM=fcb80c073379f8b1f3f7424c546bec1909fd5f7975ded7d596e581470af14a65 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=pleroma-v2.4.1-x86-64.zip +SOURCE_FILENAME=pleroma-v2.4.2-x86-64.zip diff --git a/conf/arm64.src b/conf/arm64.src index 256edc2..fdb1560 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/195489/artifacts/download?file_type=archive -SOURCE_SUM=953dc73b49c0f9d40967974f55a64dc8686dfad98a390c5ea7061796a04be1ca +SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/202825/artifacts/download?file_type=archive +SOURCE_SUM=2dae9744caecb071c146de18d4c37f3bdb985afc85ba2df4509b5cc6cf0c27a2 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=pleroma-v2.4.1-arm64.zip +SOURCE_FILENAME=pleroma-v2.4.2-arm64.zip diff --git a/conf/armhf.src b/conf/armhf.src index a70381b..dc42c59 100644 --- a/conf/armhf.src +++ b/conf/armhf.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/195487/artifacts/download?file_type=archive -SOURCE_SUM=d3de305d8bfe0fd11a973aeeb58f1927fa70d87bfc16b31076e37b1ae98d3eb6 +SOURCE_URL=https://git.pleroma.social/pleroma/pleroma/-/jobs/202823/artifacts/download?file_type=archive +SOURCE_SUM=de4c7b05527c539ef933278bbccc746c8a72fc48d0b91d206c09b68d319be6bd SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=pleroma-v2.4.1-arm.zip +SOURCE_FILENAME=pleroma-v2.4.2-arm.zip diff --git a/manifest.json b/manifest.json index 8179c4c..1874a18 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.4.1~ynh1", + "version": "2.4.2~ynh1", "url": "https://pleroma.social/", "upstream": { "license": "AGPL-3.0-only",