From 264dc5e343227f6a204a04b0e9f61943b71cbf02 Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 14 Apr 2023 19:42:57 +0200 Subject: [PATCH 01/11] v2023.04 / OTP 25.2.2 https://meta.akkoma.dev/t/akkoma-stable-2023-04-switchable-front-timeline-visibility-hehe/429 --- conf/amd64.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/amd64.src b/conf/amd64.src index 66bb4fb..7c0623e 100644 --- a/conf/amd64.src +++ b/conf/amd64.src @@ -1,5 +1,5 @@ SOURCE_URL=https://akkoma-updates.s3-website.fr-par.scw.cloud/stable/akkoma-amd64.zip -SOURCE_SUM=ea4f31b88b4de78f4c5bfb72e6969927b509012dc25b42d064c8dbc3be2cacbf +SOURCE_SUM=959fdfcced0783f73d0038e1e7fd5c1089f2400ccbb7375cc6fa04fca4600ee8 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true From dc021b0b8f62c997355cd8fc9993a95198a06b01 Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 14 Apr 2023 19:44:24 +0200 Subject: [PATCH 02/11] v2023.04 / OTP 25.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Still don't know how to name these… --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index bc8e11a..599670c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Federated social networking server built on ActivityPub open protocol", "fr": "Serveur de réseautage social fédéré basé sur le protocole ouvert ActivityPub" }, - "version": "3.7.1~ynh1", + "version": "3.7.1~ynh2", "url": "https://akkoma.social/", "upstream": { "license": "AGPL-3.0-only", From a5ff0629631466e87a71d801d260d7f1b19242f2 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 14 Apr 2023 17:44:27 +0000 Subject: [PATCH 03/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 02c7336..9edb09e 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Akkoma 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 decentrilized and federated network. Akkoma will federate with all servers that implement ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Pleroma, Peertube, or Pixelfed. -**Shipped version:** 3.7.1~ynh1 +**Shipped version:** 3.7.1~ynh2 **Demo:** https://otp.akkoma.dev diff --git a/README_fr.md b/README_fr.md index 08806f6..77301fc 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Akkoma 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 decentrilized and federated network. Akkoma will federate with all servers that implement ActivityPub, like Friendica, GNU Social, Hubzilla, Mastodon, Misskey, Pleroma, Peertube, or Pixelfed. -**Version incluse :** 3.7.1~ynh1 +**Version incluse :** 3.7.1~ynh2 **Démo :** https://otp.akkoma.dev From 9b348870cd07bd4496619cd732161e779846c153 Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 14 Apr 2023 23:09:10 +0200 Subject: [PATCH 04/11] Create frontend_switcher.exs --- conf/frontend_switcher.exs | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 conf/frontend_switcher.exs diff --git a/conf/frontend_switcher.exs b/conf/frontend_switcher.exs new file mode 100644 index 0000000..b5e1e1c --- /dev/null +++ b/conf/frontend_switcher.exs @@ -0,0 +1,3 @@ +config :pleroma, :frontends, :pickable + "pleroma-fe/stable", + "mangane/dist" From b82dc27e73c16636c4a3d0db179be30bdf780193 Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 14 Apr 2023 23:22:30 +0200 Subject: [PATCH 05/11] Configure frontend switcher --- scripts/install | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install b/scripts/install index 6f59708..d1585f8 100644 --- a/scripts/install +++ b/scripts/install @@ -310,6 +310,10 @@ ynh_script_progression --message="Installing Mangane FrontEnd..." --weight=1 ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install mangane --ref dist --build-url https://github.com/BDX-town/Mangane/releases/latest/download/static.zip" # Not activated, users need to change the "primary" frontend in the admin UI (use 'mangane' and 'dist'). +# setup frontend switcher +# available here : domain.tld/akkoma/frontend +cat "../conf/frontend_switcher.exs" >> "$config" + #================================================= # END OF SCRIPT #================================================= From 3324f30ebbafbc06211b3b18918d4db95a486d8f Mon Sep 17 00:00:00 2001 From: lapineige Date: Fri, 14 Apr 2023 23:25:40 +0200 Subject: [PATCH 06/11] fix syntax --- conf/frontend_switcher.exs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/conf/frontend_switcher.exs b/conf/frontend_switcher.exs index b5e1e1c..42eda64 100644 --- a/conf/frontend_switcher.exs +++ b/conf/frontend_switcher.exs @@ -1,3 +1,5 @@ -config :pleroma, :frontends, :pickable - "pleroma-fe/stable", - "mangane/dist" +config :pleroma, :frontends, + pickable: [ + "pleroma-fe/stable", + "mangane/dist" + ] From 866142c50c2297f08dd1b95d6a123ccd052e0b87 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 15 Apr 2023 11:35:20 +0200 Subject: [PATCH 07/11] Add frontend switcher --- scripts/upgrade | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 37522e8..e4f0d3f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -196,6 +196,16 @@ if ynh_version_gt "2.4.4~ynh2" "${previous_version}"; then ynh_replace_string --match_string='registrations_open: true' --replace_string="registrations_open: $registration_bool_value" --target_file="$config" fi +# Add frontend switcher if needed + +if grep -q ':pleroma, :frontends, :pickable' $config # This is not resilient to any spacing change, to be refined +then + ynh_script_progression --message="Frontend switcher config already existing, nothing to do about it." --weight=0 +else + ynh_script_progression --message="Adding frontend switcher config." --weight=0 + cat "../conf/frontend_switcher.exs" >> "$config" +fi + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= From 61461727270c9b6bc3893b1d2fca1f59191f7714 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 15 Apr 2023 15:13:49 +0200 Subject: [PATCH 08/11] Upgrade frontends Including admin-fe, should fix bugs such as reported in https://github.com/YunoHost-Apps/akkoma_ynh/issues/23 --- scripts/upgrade | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index e4f0d3f..a253277 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -292,6 +292,27 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Access akkoma.Web.Endpoint" +#================================================= +# INSTALL BASIC FRONTENDS (Upgrade them) +#================================================= +#### Fontends need Akkoma to be already running, so they are installed at the very end + +# Pleroma Front-End +ynh_script_progression --message="Upgrading 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="Upgrading 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" + +#================================================= +# INSTALL MANGANE FRONTEND (Upgrade it) +#================================================= +# Mangane alternative Front-End will be built in, ready to enable +ynh_script_progression --message="Upgrading Mangane FrontEnd..." --weight=1 +ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install mangane --ref dist --build-url https://github.com/BDX-town/Mangane/releases/latest/download/static.zip" +# Not activated, users need to change the "primary" frontend in the admin UI (use 'mangane' and 'dist'). + #================================================= # RELOAD NGINX #================================================= From c75af95ce661978cacae8119f8694c822e6f8bbd Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 15 Apr 2023 16:09:06 +0200 Subject: [PATCH 09/11] Create static_and_modules_dir.exs --- conf/static_and_modules_dir.exs | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 conf/static_and_modules_dir.exs diff --git a/conf/static_and_modules_dir.exs b/conf/static_and_modules_dir.exs new file mode 100644 index 0000000..6690ca2 --- /dev/null +++ b/conf/static_and_modules_dir.exs @@ -0,0 +1,5 @@ +# Static directory needs to be adapted for Yunohost specific setup +config : pleroma, :instance, static_dir: "/home/yunohost.app/akkoma/static" +config : pleroma, Pleroma.Uploaders.Local, uploads: "/home/yunohost.app/akkoma/uploads" +# Module directory needs to be adapted for Yunohost specific setup +config :pleroma, :modules, runtime_dir: "/home/yunohost.app/akkoma/modules" From 83bdd329ad1702973efe9fb77c3460cec657a038 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 15 Apr 2023 16:10:38 +0200 Subject: [PATCH 10/11] Static dir + Modules dir + reordering --- scripts/install | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index d1585f8..86d8491 100644 --- a/scripts/install +++ b/scripts/install @@ -213,6 +213,14 @@ popd cat "../conf/ldap.exs" >> "$config" +# Configure proper static & module directories +cat "../conf/static_and_modules_dir.exs" >> "$config" + +# Setup frontend switcher +# Available here : domain.tld/akkoma/frontend +# It is probably needed to do it before changing "configurable_from_database" as the config file will no longer be used ? +cat "../conf/frontend_switcher.exs" >> "$config" + ynh_replace_string --match_string="config :akkoma, configurable_from_database: false" --replace_string="config :akkoma, 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" @@ -310,10 +318,6 @@ ynh_script_progression --message="Installing Mangane FrontEnd..." --weight=1 ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl frontend install mangane --ref dist --build-url https://github.com/BDX-town/Mangane/releases/latest/download/static.zip" # Not activated, users need to change the "primary" frontend in the admin UI (use 'mangane' and 'dist'). -# setup frontend switcher -# available here : domain.tld/akkoma/frontend -cat "../conf/frontend_switcher.exs" >> "$config" - #================================================= # END OF SCRIPT #================================================= From f724ac0ae5db2f003a28526e51c4221a113d7354 Mon Sep 17 00:00:00 2001 From: lapineige Date: Sat, 15 Apr 2023 16:52:59 +0200 Subject: [PATCH 11/11] fix typo --- conf/static_and_modules_dir.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/static_and_modules_dir.exs b/conf/static_and_modules_dir.exs index 6690ca2..27634d3 100644 --- a/conf/static_and_modules_dir.exs +++ b/conf/static_and_modules_dir.exs @@ -1,5 +1,5 @@ # Static directory needs to be adapted for Yunohost specific setup -config : pleroma, :instance, static_dir: "/home/yunohost.app/akkoma/static" -config : pleroma, Pleroma.Uploaders.Local, uploads: "/home/yunohost.app/akkoma/uploads" +config :pleroma, :instance, static_dir: "/home/yunohost.app/akkoma/static" +config :pleroma, Pleroma.Uploaders.Local, uploads: "/home/yunohost.app/akkoma/uploads" # Module directory needs to be adapted for Yunohost specific setup config :pleroma, :modules, runtime_dir: "/home/yunohost.app/akkoma/modules"