From 6ad1f63a615e7e7c03a338e5c21f3ec089193491 Mon Sep 17 00:00:00 2001 From: Florent Date: Sat, 3 Dec 2022 22:46:58 +0100 Subject: [PATCH 1/6] Fix registration choice not taken into account --- manifest.json | 2 +- scripts/install | 2 ++ scripts/upgrade | 8 ++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index f25b0b8..830bed3 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.4~ynh1", + "version": "2.4.4~ynh2", "url": "https://pleroma.social/", "upstream": { "license": "AGPL-3.0-only", diff --git a/scripts/install b/scripts/install index a1283c5..8fd5ea0 100755 --- a/scripts/install +++ b/scripts/install @@ -209,6 +209,8 @@ popd cat "../conf/ldap.exs" >> "$config" ynh_replace_string --match_string="config :pleroma, configurable_from_database: false" --replace_string="config :pleroma, configurable_from_database: true" --target_file="$config" +registration_bool_value=`(($registration)) && echo "true" || echo "false"` +ynh_replace_string --match_string="registrations_open: true" --replace_string="registrations_open: $registration_bool_value" --target_file="$config" pushd $final_path/live ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl migrate" diff --git a/scripts/upgrade b/scripts/upgrade index 721cba4..d7c3df7 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -150,6 +150,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" # UPGRADE TO OTP RELEASE #================================================= +config="/etc/$app/config.exs" if ynh_version_gt "1.1.1~ynh1" "${previous_version}" ; then ynh_script_progression --message="Upgrading to OTP release..." --weight=1 @@ -175,7 +176,6 @@ if ynh_version_gt "1.1.1~ynh1" "${previous_version}" ; then mkdir -p /etc/$app chown -R $app /etc/$app - config="/etc/$app/config.exs" mv $final_path/live/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 @@ -187,11 +187,15 @@ if ynh_version_gt "1.1.1~ynh1" "${previous_version}" ; then fi if ynh_version_gt "2.0.5~ynh1" "${previous_version}" ; then - config="/etc/$app/config.exs" cat "../conf/ldap.exs" >> "$config" ynh_replace_string --match_string="config :pleroma, configurable_from_database: false" --replace_string="config :pleroma, configurable_from_database: true" --target_file="$config" fi +if ynh_version_gt "2.4.4~ynh2" "${previous_version}"; then + registration_bool_value=`(($registration)) && echo "true" || echo "false"` + ynh_replace_string --match_string='registrations_open: true' --replace_string="registrations_open: $registration_bool_value" --target_file="$config" +fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= From 0eb448262616d075082038729d8c40a213e37d75 Mon Sep 17 00:00:00 2001 From: Aris Date: Thu, 29 Dec 2022 23:36:04 +0100 Subject: [PATCH 2/6] Correct path to 'static dir' in DB --- scripts/install | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/install b/scripts/install index a1283c5..db93996 100755 --- a/scripts/install +++ b/scripts/install @@ -269,6 +269,14 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload +#================================================= +# POST INSTALL +#================================================= + +# Correct path to 'static dir' in DB +# This must be done when Pleroma is running (i.e. after install and start) +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl config migrate_to_db" + #================================================= # END OF SCRIPT #================================================= From 1c7da2c9b3a19f97496af80c91d557f664b7324b Mon Sep 17 00:00:00 2001 From: Aris Date: Thu, 29 Dec 2022 23:37:57 +0100 Subject: [PATCH 3/6] Correct path to 'static dir' in DB --- scripts/upgrade | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 721cba4..1b8ebc4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -285,6 +285,14 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload +#================================================= +# POST INSTALL +#================================================= + +# Correct path to 'static dir' in DB +# This must be done when Pleroma is running (i.e. after install/upgrade and start) +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl config migrate_to_db" + #================================================= # END OF SCRIPT #================================================= From eebd64af821a914d7a21e8c92a31b5a74595b94f Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 16 Jan 2023 23:29:22 +0000 Subject: [PATCH 4/6] Auto-update README --- README_fr.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README_fr.md b/README_fr.md index d63eeab..24c32e0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,15 @@ It shall NOT be edited by hand. # Pleroma pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/pleroma.svg)](https://dash.yunohost.org/appci/app/pleroma) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/pleroma.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/pleroma.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/pleroma.svg)](https://dash.yunohost.org/appci/app/pleroma) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/pleroma.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/pleroma.maintain.svg) [![Installer Pleroma avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=pleroma) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Pleroma rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer Pleroma rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble 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. @@ -26,9 +26,9 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post **Démo :** http://distsn.org/pleroma-instances.html -## Captures d'écran +## Captures d’écran -![Capture d'écran de Pleroma](./doc/screenshots/screenshot1.png) +![Capture d’écran de Pleroma](./doc/screenshots/screenshot1.png) ## Avertissements / informations importantes @@ -69,9 +69,9 @@ You can make users **moderators**. They will then be able to **delete any post** ## Documentations et ressources -* Site officiel de l'app : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* Site officiel de l’app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -87,4 +87,4 @@ ou sudo yunohost app upgrade pleroma -u https://github.com/YunoHost-Apps/pleroma_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From 862113ab1fae445086fd232c857c280bafc961c7 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 17 Jan 2023 22:11:17 +0100 Subject: [PATCH 5/6] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 5034d53..a64f1fd 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Federated social networking server built on open protocols", "fr": "Serveur de réseautage social fédéré basé sur des protocoles ouverts" }, - "version": "2.4.5~ynh1", + "version": "2.4.5~ynh2", "url": "https://pleroma.social/", "upstream": { "license": "AGPL-3.0-only", From 47bd9c95a8783e534b4a01ee90bb141dd47131b9 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 17 Jan 2023 21:11:23 +0000 Subject: [PATCH 6/6] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47de0ff..a0aa076 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.5~ynh1 +**Shipped version:** 2.4.5~ynh2 **Demo:** http://distsn.org/pleroma-instances.html diff --git a/README_fr.md b/README_fr.md index 24c32e0..439ae32 100644 --- a/README_fr.md +++ b/README_fr.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 -**Version incluse :** 2.4.5~ynh1 +**Version incluse :** 2.4.5~ynh2 **Démo :** http://distsn.org/pleroma-instances.html