From b2000c34cd028c93c30bed3c76079bd05b2cfa31 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 20 Dec 2022 18:00:55 +0100 Subject: [PATCH 01/11] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 7584378..ec35eca 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "A free, federated social networking server built on ActivityPub open protocol. Derivate of Pleroma.", "fr": "Un serveur de réseautage social fédéré et gratuit basé sur le protocole ouvert ActivityPub. Derivé de Pleroma." }, - "version": "3.5.0~ynh1", + "version": "3.5.0~ynh2", "url": "https://akkoma.social/", "upstream": { "license": "AGPL-3.0-only", From d8caec0982dffb48b8f2675b30bf34ec7c67245a Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 20 Dec 2022 17:00:59 +0000 Subject: [PATCH 02/11] 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 74ef064..e374982 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Akkoma is a microblogging server software that can federate (= exchange messages -**Shipped version:** 3.5.0~ynh1 +**Shipped version:** 3.5.0~ynh2 **Demo:** https://otp.akkoma.dev diff --git a/README_fr.md b/README_fr.md index 34fe2f7..fa46adc 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Akkoma is a microblogging server software that can federate (= exchange messages -**Version incluse :** 3.5.0~ynh1 +**Version incluse :** 3.5.0~ynh2 **Démo :** https://otp.akkoma.dev From 77a2794aff43c6925e17fd8524ba05b5510f821f Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 20 Dec 2022 18:22:14 +0100 Subject: [PATCH 03/11] use pleroma as binary name --- conf/systemd.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index e2e2985..587b174 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -19,8 +19,8 @@ Environment="HOME=__FINALPATH__/live/" ; Path to the folder containing the Pleroma installation. WorkingDirectory=__FINALPATH__/live/ ; Path to the Pleroma binary. -ExecStart=__FINALPATH__/live/bin/akkoma start -ExecStop=__FINALPATH__/live/bin/akkoma stop +ExecStart=__FINALPATH__/live/bin/pleroma start +ExecStop=__FINALPATH__/live/bin/pleroma stop ; Some security directives. ; Use private /tmp and /var/tmp folders inside a new file system namespace, which are discarded after the process stops. From 28b7885c490565b2cd2ae9e8da04f9844f90f1cc Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 20 Dec 2022 21:38:04 +0100 Subject: [PATCH 04/11] naming --- conf/systemd.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 587b174..6251e68 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,10 +7,10 @@ ExecReload=/bin/kill $MAINPID KillMode=process Restart=on-failure -; Name of the user that runs the Pleroma service. +; Name of the user that runs the Akkoma service. User=__APP__ Group=__APP__ -; Declares that Pleroma runs in production mode. +; Declares that Akkoma runs in production mode. Environment="MIX_ENV=prod" ; Make sure that all paths fit your installation. From d77320348d4e51ba12b452972cf017e907eed1fd Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 20 Dec 2022 21:40:17 +0100 Subject: [PATCH 05/11] fix naming issues --- scripts/install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install b/scripts/install index 7015e39..41dfea6 100644 --- a/scripts/install +++ b/scripts/install @@ -171,6 +171,9 @@ chown $app:$app /etc/$app #================================================= # SETUP SYSTEMD #================================================= +### fake akkoma executable +ln -s "$final_path/live/bin/pleroma" "$final_path/live/bin/akkoma" + ynh_script_progression --message="Configuring a systemd service..." --weight=1 # Create a dedicated systemd config From 3a3a31a538c719bdb667329a1aa4f558a8eb26ed Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 20 Dec 2022 22:24:00 +0100 Subject: [PATCH 06/11] pleroma -> akkoma --- conf/ldap.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/ldap.exs b/conf/ldap.exs index b7e3272..f4c60f3 100644 --- a/conf/ldap.exs +++ b/conf/ldap.exs @@ -1,5 +1,5 @@ -config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.LDAPAuthenticator -config :pleroma, :ldap, +config :akkoma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.LDAPAuthenticator +config :akkoma, :ldap, enabled: true, host: "localhost", port: 389, @@ -8,4 +8,4 @@ config :pleroma, :ldap, tls: false, # tlsopts: [], base: "ou=users,dc=yunohost,dc=org", - uid: "uid" \ No newline at end of file + uid: "uid" From f883a69c0e98152ba2af0602260a749fb00a54b9 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 20 Dec 2022 22:24:17 +0100 Subject: [PATCH 07/11] for real --- conf/ldap.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/ldap.exs b/conf/ldap.exs index f4c60f3..757671f 100644 --- a/conf/ldap.exs +++ b/conf/ldap.exs @@ -1,4 +1,4 @@ -config :akkoma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.LDAPAuthenticator +config :akkoma, Akkoma.Web.Auth.Authenticator, Akkoma.Web.Auth.LDAPAuthenticator config :akkoma, :ldap, enabled: true, host: "localhost", From 7740630238ab96ecb60f10f0fef42a87d1370900 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 20 Dec 2022 22:49:24 +0100 Subject: [PATCH 08/11] Correct service name succes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For some reason it call itself Pleroma… --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 41dfea6..e8636ba 100644 --- a/scripts/install +++ b/scripts/install @@ -218,7 +218,7 @@ ynh_replace_string --match_string="registrations_open: true" --replace_string="r pushd $final_path/live ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl migrate" - ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access akkoma.Web.Endpoint" + ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access Pleroma.Web.Endpoint" # Add user ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl user new $admin $admin_email --password $password --moderator --admin -y" @@ -257,7 +257,7 @@ yunohost service add $app --description="$app daemon for akkoma" ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access akkoma.Web.Endpoint" +ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access Pleroma.Web.Endpoint" #================================================= # SETUP SSOWAT From b3625c0fe08e068a4b6f04a2726115c547268109 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 20 Dec 2022 22:50:33 +0100 Subject: [PATCH 09/11] Pleroma -> Akkoma --- conf/systemd.service | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 6251e68..b9f0fb3 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -14,11 +14,11 @@ Group=__APP__ Environment="MIX_ENV=prod" ; Make sure that all paths fit your installation. -; Path to the home directory of the user running the Pleroma service. +; Path to the home directory of the user running the Akkoma service. Environment="HOME=__FINALPATH__/live/" -; Path to the folder containing the Pleroma installation. +; Path to the folder containing the Akkoma installation. WorkingDirectory=__FINALPATH__/live/ -; Path to the Pleroma binary. +; Path to the Pleroma binary. ; It has to be Pleroma not Akkoma ExecStart=__FINALPATH__/live/bin/pleroma start ExecStop=__FINALPATH__/live/bin/pleroma stop From eca02fc7b0bbd6e2d5a434106b09b513c631de7c Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 20 Dec 2022 22:56:22 +0100 Subject: [PATCH 10/11] Frontend installation fails - postpone it ``` sudo -u akkoma -s /bin/bash -lc '/var/www/akkoma/live/bin/pleroma_ctl frontend install pleroma-fe --ref stable' --rpc-eval : RPC failed with reason :nodedown ``` --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index e8636ba..6f3a5a9 100644 --- a/scripts/install +++ b/scripts/install @@ -237,10 +237,10 @@ chown $app:$app "$config" #================================================= # Pleroma Front-End -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install pleroma-fe --ref stable" +#ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install pleroma-fe --ref stable" # Admin Front-End -ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install admin-fe --ref stable" +#ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install admin-fe --ref stable" #================================================= # GENERIC FINALIZATION From 0c6b65a88d1e176d05f454993bdf0ad78a921d44 Mon Sep 17 00:00:00 2001 From: lapineige Date: Tue, 20 Dec 2022 23:41:57 +0100 Subject: [PATCH 11/11] frontends --- scripts/install | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index 6f3a5a9..1032059 100644 --- a/scripts/install +++ b/scripts/install @@ -232,16 +232,6 @@ ynh_store_file_checksum --file="$config" chmod 400 "$config" chown $app:$app "$config" -#================================================= -# INSTALL BASIC FRONTENDS -#================================================= - -# Pleroma Front-End -#ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install pleroma-fe --ref stable" - -# Admin Front-End -#ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install admin-fe --ref stable" - #================================================= # GENERIC FINALIZATION #================================================= @@ -284,6 +274,19 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload +#================================================= +# INSTALL BASIC FRONTENDS +#================================================= +#### Fontends need Akkoma to be already running, so they are installed at the very end + +# Pleroma Front-End +ynh_script_progression --message="Installing Pleroma FrontEnd..." --weight=1 +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install pleroma-fe --ref stable" + +# Admin Front-End +ynh_script_progression --message="Installing Admin FrontEnd..." --weight=1 +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install admin-fe --ref stable" + #================================================= # END OF SCRIPT #=================================================