From 00f840fd44d5c32a975af85ff7e3a0f6f242b903 Mon Sep 17 00:00:00 2001 From: Norm Date: Wed, 14 Sep 2022 10:20:07 +0000 Subject: [PATCH 01/12] Update styles.json path in frontend config doc (#212) Co-authored-by: Francis Dinh Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/212 Co-authored-by: Norm Co-committed-by: Norm --- docs/docs/configuration/howto_theming_your_instance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/howto_theming_your_instance.md b/docs/docs/configuration/howto_theming_your_instance.md index 213afcf13..af417aee4 100644 --- a/docs/docs/configuration/howto_theming_your_instance.md +++ b/docs/docs/configuration/howto_theming_your_instance.md @@ -21,7 +21,7 @@ This will only save the theme for you personally. To make it available to the wh ### Upload the theme to the server -Themes can be found in the [static directory](static_dir.md). Create `STATIC-DIR/static/themes/` if needed and copy your theme there. Next you need to add an entry for your theme to `STATIC-DIR/static/styles.json`. If you use a from source installation, you'll first need to copy the file from `priv/static/static/styles.json`. +Themes can be found in the [static directory](static_dir.md). Create `STATIC-DIR/static/themes/` if needed and copy your theme there. Next you need to add an entry for your theme to `STATIC-DIR/static/styles.json`. If you use a from source installation, you'll first need to copy the file from `STATIC-DIR/frontends/pleroma-fe/REF/static/styles.json` (where `REF` is `stable` or `develop` depending on which ref you decided to install). Example of `styles.json` where we add our own `my-awesome-theme.json` ```json From 77596a302181aaa8617cd08f110586c36d517127 Mon Sep 17 00:00:00 2001 From: a1batross Date: Thu, 15 Sep 2022 22:38:35 +0200 Subject: [PATCH 02/12] User: search: exclude deactivated users from user search This way we don't pollute search results with deactivated and deleted users --- lib/pleroma/user/search.ex | 5 +++++ test/pleroma/user_search_test.exs | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/lib/pleroma/user/search.ex b/lib/pleroma/user/search.ex index a4f6abca2..6b3f58999 100644 --- a/lib/pleroma/user/search.ex +++ b/lib/pleroma/user/search.ex @@ -94,6 +94,7 @@ defmodule Pleroma.User.Search do |> subquery() |> order_by(desc: :search_rank) |> maybe_restrict_local(for_user) + |> filter_deactivated_users() end defp select_top_users(query, top_user_ids) do @@ -166,6 +167,10 @@ defmodule Pleroma.User.Search do from(q in query, where: q.actor_type != "Application") end + defp filter_deactivated_users(query) do + from(q in query, where: q.is_active == true) + end + defp filter_blocked_user(query, %User{} = blocker) do query |> join(:left, [u], b in Pleroma.UserRelationship, diff --git a/test/pleroma/user_search_test.exs b/test/pleroma/user_search_test.exs index 69167bb0c..8634a2e2b 100644 --- a/test/pleroma/user_search_test.exs +++ b/test/pleroma/user_search_test.exs @@ -65,6 +65,14 @@ defmodule Pleroma.UserSearchTest do assert found_user.id == user.id end + test "excludes deactivated users from results" do + user = insert(:user, %{nickname: "john t1000"}) + insert(:user, %{is_active: false, nickname: "john t800"}) + + [found_user] = User.search("john") + assert found_user.id == user.id + end + # Note: as in Mastodon, `is_discoverable` doesn't anyhow relate to user searchability test "includes non-discoverable users in results" do insert(:user, %{nickname: "john 3000", is_discoverable: false}) From 911f8feb0a2d953192f2243f2cc6cee138f9e09e Mon Sep 17 00:00:00 2001 From: floatingghost Date: Fri, 16 Sep 2022 11:53:11 +0000 Subject: [PATCH 03/12] Ensure migrations succeed (#216) Co-authored-by: FloatingGhost Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/216 --- .../migrations/20220718102634_upgrade_oban_to_v11.exs | 5 ++++- .../20220916115149_ensure_mastofe_settings.exs | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs diff --git a/priv/repo/migrations/20220718102634_upgrade_oban_to_v11.exs b/priv/repo/migrations/20220718102634_upgrade_oban_to_v11.exs index eb9c4986c..ba1c849c4 100644 --- a/priv/repo/migrations/20220718102634_upgrade_oban_to_v11.exs +++ b/priv/repo/migrations/20220718102634_upgrade_oban_to_v11.exs @@ -1,7 +1,10 @@ defmodule Pleroma.Repo.Migrations.UpgradeObanToV11 do use Ecto.Migration - def up, do: Oban.Migrations.up(version: 11) + def up do + execute("UPDATE oban_jobs SET priority = 0 WHERE priority IS NULL;") + Oban.Migrations.up(version: 11) + end def down, do: Oban.Migrations.down(version: 11) end diff --git a/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs b/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs new file mode 100644 index 000000000..37880ff99 --- /dev/null +++ b/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs @@ -0,0 +1,9 @@ +defmodule Pleroma.Repo.Migrations.EnsureMastofeSettings do + use Ecto.Migration + + def change do + alter table(:users) do + add_if_not_exists(:mastofe_settings, :map) + end + end +end From ee2eb7752d6a6f3542fa3a883faa02de2ccbbef8 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 16 Sep 2022 13:00:40 +0100 Subject: [PATCH 04/12] Ensure rollback succeeds --- .../migrations/20220916115149_ensure_mastofe_settings.exs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs b/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs index 37880ff99..1d0a6e050 100644 --- a/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs +++ b/priv/repo/migrations/20220916115149_ensure_mastofe_settings.exs @@ -1,9 +1,15 @@ defmodule Pleroma.Repo.Migrations.EnsureMastofeSettings do use Ecto.Migration - def change do + def up do alter table(:users) do add_if_not_exists(:mastofe_settings, :map) end end + + def down do + alter table(:users) do + remove_if_exists(:mastofe_settings, :map) + end + end end From ad1a6d3dc2b431f0d6d5cbe523093a7a3fb0308d Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Fri, 16 Sep 2022 14:23:31 +0100 Subject: [PATCH 05/12] ensure queue_target can't be silly low --- config/config.exs | 1 + 1 file changed, 1 insertion(+) diff --git a/config/config.exs b/config/config.exs index bf7e7db44..8e0b751a0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -48,6 +48,7 @@ config :pleroma, ecto_repos: [Pleroma.Repo] config :pleroma, Pleroma.Repo, telemetry_event: [Pleroma.Repo.Instrumenter], + queue_target: 20_000, migration_lock: nil config :pleroma, Pleroma.Captcha, From 84f8f32ef96c574358f196fd34e5cb64ec07a2a3 Mon Sep 17 00:00:00 2001 From: Norm Date: Sun, 18 Sep 2022 03:21:05 +0000 Subject: [PATCH 06/12] Move remote user interaction changelog entry to correct version That feature was added in 2022.09, not 2022.08. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cd48b07c..73093bc54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - MFM parsing is now done on the backend by a modified version of ilja's parser -> https://akkoma.dev/AkkomaGang/mfm-parser - InlineQuotePolicy is now on by default +- Enable remote users to interact with posts ### Fixed - Compatibility with latest meilisearch @@ -44,7 +45,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - amd64 is built for debian stable. Compatible with ubuntu 20. - ubuntu-jammy is built for... well, ubuntu 22 (LTS) - amd64-musl is built for alpine 3.16 -- Enable remote users to interact with posts ### Fixed - Updated mastoFE path, for the newer version From 8fe59d495df0c7fb999579b214f0b241835211b2 Mon Sep 17 00:00:00 2001 From: lou_de_sel Date: Sun, 18 Sep 2022 07:45:30 +0000 Subject: [PATCH 07/12] Update soapbox base url At some point 'soapbox-pub/soapbox-fe' was moved to 'soapbox-pub/soapbox' and the build url is now updated. --- config/config.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.exs b/config/config.exs index 8e0b751a0..7fbfb9ad2 100644 --- a/config/config.exs +++ b/config/config.exs @@ -753,9 +753,9 @@ config :pleroma, :frontends, }, "soapbox-fe" => %{ "name" => "soapbox-fe", - "git" => "https://gitlab.com/soapbox-pub/soapbox-fe", + "git" => "https://gitlab.com/soapbox-pub/soapbox", "build_url" => - "https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production", + "https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/${ref}/download?job=build-production", "ref" => "v2.0.0", "build_dir" => "static" }, From 561e1f2470d813aa7b894a59779b8bccb91122f0 Mon Sep 17 00:00:00 2001 From: Norm Date: Mon, 19 Sep 2022 17:31:35 +0000 Subject: [PATCH 08/12] Make backups require its own scope (#218) Pulled from https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3721. This makes backups require its own scope (`read:backups`) instead of the `read:accounts` scope. Co-authored-by: Tusooa Zhu Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/218 Co-authored-by: Norm Co-committed-by: Norm --- CHANGELOG.md | 5 +++++ .../web/api_spec/operations/pleroma_backup_operation.ex | 4 ++-- lib/pleroma/web/pleroma_api/controllers/backup_controller.ex | 2 +- .../web/pleroma_api/controllers/backup_controller_test.exs | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cd48b07c..8eb2df1d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## Unreleased + +### Changed +- **Breaking**: `/api/v1/pleroma/backups` endpoints now requires `read:backups` scope instead of `read:accounts` + ## 2022.09 ### Added diff --git a/lib/pleroma/web/api_spec/operations/pleroma_backup_operation.ex b/lib/pleroma/web/api_spec/operations/pleroma_backup_operation.ex index c78e9780f..9af556736 100644 --- a/lib/pleroma/web/api_spec/operations/pleroma_backup_operation.ex +++ b/lib/pleroma/web/api_spec/operations/pleroma_backup_operation.ex @@ -16,7 +16,7 @@ defmodule Pleroma.Web.ApiSpec.PleromaBackupOperation do %Operation{ tags: ["Backups"], summary: "List backups", - security: [%{"oAuth" => ["read:account"]}], + security: [%{"oAuth" => ["read:backups"]}], operationId: "PleromaAPI.BackupController.index", responses: %{ 200 => @@ -37,7 +37,7 @@ defmodule Pleroma.Web.ApiSpec.PleromaBackupOperation do %Operation{ tags: ["Backups"], summary: "Create a backup", - security: [%{"oAuth" => ["read:account"]}], + security: [%{"oAuth" => ["read:backups"]}], operationId: "PleromaAPI.BackupController.create", responses: %{ 200 => diff --git a/lib/pleroma/web/pleroma_api/controllers/backup_controller.ex b/lib/pleroma/web/pleroma_api/controllers/backup_controller.ex index fc5d16771..88f38a911 100644 --- a/lib/pleroma/web/pleroma_api/controllers/backup_controller.ex +++ b/lib/pleroma/web/pleroma_api/controllers/backup_controller.ex @@ -9,7 +9,7 @@ defmodule Pleroma.Web.PleromaAPI.BackupController do alias Pleroma.Web.Plugs.OAuthScopesPlug action_fallback(Pleroma.Web.MastodonAPI.FallbackController) - plug(OAuthScopesPlug, %{scopes: ["read:accounts"]} when action in [:index, :create]) + plug(OAuthScopesPlug, %{scopes: ["read:backups"]} when action in [:index, :create]) plug(Pleroma.Web.ApiSpec.CastAndValidate) defdelegate open_api_operation(action), to: Pleroma.Web.ApiSpec.PleromaBackupOperation diff --git a/test/pleroma/web/pleroma_api/controllers/backup_controller_test.exs b/test/pleroma/web/pleroma_api/controllers/backup_controller_test.exs index ba17636da..2c7264016 100644 --- a/test/pleroma/web/pleroma_api/controllers/backup_controller_test.exs +++ b/test/pleroma/web/pleroma_api/controllers/backup_controller_test.exs @@ -11,7 +11,7 @@ defmodule Pleroma.Web.PleromaAPI.BackupControllerTest do setup do clear_config([Pleroma.Upload, :uploader]) clear_config([Backup, :limit_days]) - oauth_access(["read:accounts"]) + oauth_access(["read:backups"]) end test "GET /api/v1/pleroma/backups", %{user: user, conn: conn} do @@ -85,7 +85,7 @@ defmodule Pleroma.Web.PleromaAPI.BackupControllerTest do test "Backup without email address" do user = Pleroma.Factory.insert(:user, email: nil) - %{conn: conn} = oauth_access(["read:accounts"], user: user) + %{conn: conn} = oauth_access(["read:backups"], user: user) assert is_nil(user.email) From b2aa82cee5b53fd04f6b6aefcb9c2cf6aa46efba Mon Sep 17 00:00:00 2001 From: floatingghost Date: Tue, 20 Sep 2022 10:36:21 +0000 Subject: [PATCH 09/12] Fix false error in meilisearch index (#221) the schema changed https://docs.meilisearch.com/reference/api/documents.html#add-or-update-documents this wasn't breaking anything, it would just report errors that were actually successes Co-authored-by: FloatingGhost Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/221 --- CHANGELOG.md | 3 +++ docs/docs/configuration/search.md | 3 +-- docs/docs/index.md | 15 +++++++++++++++ lib/pleroma/search/meilisearch.ex | 2 +- test/pleroma/search/meilisearch_test.exs | 6 +++--- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be95ceb3c..104164dec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - **Breaking**: `/api/v1/pleroma/backups` endpoints now requires `read:backups` scope instead of `read:accounts` +### Fixed +- prevent false-errors from meilisearch + ## 2022.09 ### Added diff --git a/docs/docs/configuration/search.md b/docs/docs/configuration/search.md index ebb2c6ab7..1e343032f 100644 --- a/docs/docs/configuration/search.md +++ b/docs/docs/configuration/search.md @@ -141,8 +141,7 @@ You then need to set the URL and authentication credentials if relevant. ### Initial indexing -After setting up the configuration, you'll want to index all of your already existsing posts. Only public posts are indexed. You'll only -have to do it one time, but it might take a while, depending on the amount of posts your instance has seen. +After setting up the configuration, you'll want to index all of your already existsing posts. You'll only have to do it one time, but it might take a while, depending on the amount of posts your instance has seen. The sequence of actions is as follows: diff --git a/docs/docs/index.md b/docs/docs/index.md index f9340d5d3..1018e9c2b 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -7,6 +7,20 @@ It actually consists of two components: a backend, named simply Akkoma, and a us It's part of what we call the fediverse, a federated network of instances which speak common protocols and can communicate with each other. One account on an instance is enough to talk to the entire fediverse! +## Community Channels + +### IRC + +For support or general questions, pop over to #akkoma and #akkoma-dev at [irc.akkoma.dev](https://irc.akkoma.dev) (port 6697, SSL) + +### Discourse + +For more general meta-discussion, for example discussion of potential future features, head on over to [meta.akkoma.dev](https://meta.akkoma.dev) + +### Dev diaries and release notifications + +will be posted via [@akkoma@ihba](https://ihatebeinga.live/users/akkoma) + ## How can I use it? Akkoma instances are already widely deployed, a list can be found at and . @@ -26,3 +40,4 @@ Just add a "/web" after your instance url (e.g. The Mastodon interface is from the Glitch-soc fork. For more information on the Mastodon interface you can check the [Mastodon](https://docs.joinmastodon.org/) and [Glitch-soc](https://glitch-soc.github.io/docs/) documentation. Remember, what you see is only the frontend part of Mastodon, the backend is still Akkoma. + diff --git a/lib/pleroma/search/meilisearch.ex b/lib/pleroma/search/meilisearch.ex index 3db65f261..770557858 100644 --- a/lib/pleroma/search/meilisearch.ex +++ b/lib/pleroma/search/meilisearch.ex @@ -153,7 +153,7 @@ defmodule Pleroma.Search.Meilisearch do ) with {:ok, res} <- result, - true <- Map.has_key?(res, "uid") do + true <- Map.has_key?(res, "taskUid") do # Do nothing else _ -> diff --git a/test/pleroma/search/meilisearch_test.exs b/test/pleroma/search/meilisearch_test.exs index 04a2d75d9..fe09c9485 100644 --- a/test/pleroma/search/meilisearch_test.exs +++ b/test/pleroma/search/meilisearch_test.exs @@ -47,7 +47,7 @@ defmodule Pleroma.Search.MeilisearchTest do Jason.decode!(body) ) - json(%{updateId: 1}) + json(%{taskUid: 1}) end) {:ok, activity} = @@ -100,11 +100,11 @@ defmodule Pleroma.Search.MeilisearchTest do Jason.decode!(body) ) - json(%{updateId: 1}) + json(%{taskUid: 1}) %{method: :delete, url: "http://127.0.0.1:7700/indexes/objects/documents/" <> id} -> assert String.length(id) > 1 - json(%{updateId: 2}) + json(%{taskUid: 2}) end) {:ok, activity} = From 5827f7781ff4497dc22b91a628c74546b59b3bc6 Mon Sep 17 00:00:00 2001 From: floatingghost Date: Tue, 20 Sep 2022 11:04:26 +0000 Subject: [PATCH 10/12] Add installation note about flavour, support special cases (#222) Fixes #210 Co-authored-by: FloatingGhost Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/222 --- .woodpecker.yml | 14 ++++++++-- docs/docs/administration/updating.md | 4 +++ docs/docs/installation/otp_en.md | 12 ++++----- rel/files/bin/pleroma_ctl | 38 +++++++++++++--------------- 4 files changed, 39 insertions(+), 29 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 32db2f1c5..cd1285ecc 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -14,6 +14,14 @@ variables: - stable - refs/tags/v* - refs/tags/stable-* + - &on-stable + when: + event: + - push + - tag + branch: + - stable + - refs/tags/stable-* - &on-point-release when: event: @@ -110,6 +118,8 @@ pipeline: - export SOURCE=akkoma-ubuntu-jammy.zip - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-ubuntu-jammy.zip - /bin/sh /entrypoint.sh + - export DEST=scaleway:akkoma-updates/$${CI_COMMIT_TAG:-"$CI_COMMIT_BRANCH"}/akkoma-amd64-ubuntu-jammy.zip + - /bin/sh /entrypoint.sh debian-bullseye: image: elixir:1.13.4 @@ -142,7 +152,7 @@ pipeline: # Canonical amd64-musl musl: image: elixir:1.13.4-alpine - <<: *on-release + <<: *on-stable environment: MIX_ENV: prod commands: @@ -157,7 +167,7 @@ pipeline: release-musl: image: akkoma/releaser - <<: *on-release + <<: *on-stable secrets: *scw-secrets commands: - export SOURCE=akkoma-amd64-musl.zip diff --git a/docs/docs/administration/updating.md b/docs/docs/administration/updating.md index 6f7ffcd63..2d9e77075 100644 --- a/docs/docs/administration/updating.md +++ b/docs/docs/administration/updating.md @@ -14,6 +14,10 @@ su akkoma -s $SHELL -lc "./bin/pleroma_ctl update" su akkoma -s $SHELL -lc "./bin/pleroma_ctl migrate" ``` +If you selected an alternate flavour on installation, +you _may_ need to specify `--flavour`, in the same way as +[when installing](../../installation/otp_en#detecting-flavour). + ## For from source installations (using git) 1. Go to the working directory of Akkoma (default is `/opt/akkoma`) diff --git a/docs/docs/installation/otp_en.md b/docs/docs/installation/otp_en.md index 329afe967..3e00d3262 100644 --- a/docs/docs/installation/otp_en.md +++ b/docs/docs/installation/otp_en.md @@ -19,12 +19,12 @@ This is a little more complex than it used to be (thanks ubuntu) Use the following mapping to figure out your flavour: -| distribution | flavour | -| ------------- | ------------ | -| debian stable | amd64 | -| ubuntu focal | amd64 | -| ubuntu jammy | ubuntu-jammy | -| alpine | amd64-musl | +| distribution | flavour | available branches | +| ------------- | ------------------ | ------------------- | +| debian stable | amd64 | develop, stable | +| ubuntu focal | amd64 | develop, stable | +| ubuntu jammy | amd64-ubuntu-jammy | develop, stable | +| alpine | amd64-musl | stable | Other similar distributions will _probably_ work, but if it is not listed above, there is no official support. diff --git a/rel/files/bin/pleroma_ctl b/rel/files/bin/pleroma_ctl index d2949e8fe..e0e6d1b5a 100755 --- a/rel/files/bin/pleroma_ctl +++ b/rel/files/bin/pleroma_ctl @@ -2,28 +2,24 @@ # XXX: This should be removed when elixir's releases get custom command support detect_flavour() { - arch="$(uname -m)" - if [ "$arch" = "x86_64" ]; then - arch="amd64" - elif [ "$arch" = "aarch64" ]; then - arch="arm64" - else - echo "Unsupported arch: $arch" >&2 - exit 1 - fi + arch="amd64" + # Special cases + if grep -qe "VERSION_CODENAME=jammy" /etc/os-release; then + echo "$arch-ubuntu-jammy" + else + if getconf GNU_LIBC_VERSION >/dev/null; then + libc_postfix="" + elif [ "$(ldd 2>&1 | head -c 9)" = "musl libc" ]; then + libc_postfix="-musl" + elif [ "$(find /lib/libc.musl* | wc -l)" ]; then + libc_postfix="-musl" + else + echo "Unsupported libc" >&2 + exit 1 + fi - if getconf GNU_LIBC_VERSION >/dev/null; then - libc_postfix="" - elif [ "$(ldd 2>&1 | head -c 9)" = "musl libc" ]; then - libc_postfix="-musl" - elif [ "$(find /lib/libc.musl* | wc -l)" ]; then - libc_postfix="-musl" - else - echo "Unsupported libc" >&2 - exit 1 - fi - - echo "$arch$libc_postfix" + echo "$arch$libc_postfix" + fi } detect_branch() { From 69099d6f4487f1a513c7dac7f44621942e32a118 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Tue, 20 Sep 2022 12:20:54 +0100 Subject: [PATCH 11/12] ensure we use the same OTP for all releases --- .woodpecker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index cd1285ecc..c97e3eb4f 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -95,7 +95,7 @@ pipeline: # Canonical amd64 ubuntu22: - image: hexpm/elixir:1.13.4-erlang-25.0.2-ubuntu-jammy-20220428 + image: hexpm/elixir:1.13.4-erlang-24.3.4.5-ubuntu-jammy-20220428 <<: *on-release environment: MIX_ENV: prod @@ -122,7 +122,7 @@ pipeline: - /bin/sh /entrypoint.sh debian-bullseye: - image: elixir:1.13.4 + image: hexpm/elixir:1.13.4-erlang-24.3.4.5-debian-bullseye-20220801 <<: *on-release environment: MIX_ENV: prod @@ -151,7 +151,7 @@ pipeline: # Canonical amd64-musl musl: - image: elixir:1.13.4-alpine + image: hexpm/elixir:1.13.4-erlang-24.3.4.5-alpine-3.15.6 <<: *on-stable environment: MIX_ENV: prod From 47a793f33ec1a7a15763ef8ce992a8ec7a7aaea5 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Tue, 20 Sep 2022 14:40:32 +0100 Subject: [PATCH 12/12] include requirement to enable HTTP tunnel in tor --- docs/docs/configuration/onion_federation.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/docs/configuration/onion_federation.md b/docs/docs/configuration/onion_federation.md index 077c3eb50..499b4a693 100644 --- a/docs/docs/configuration/onion_federation.md +++ b/docs/docs/configuration/onion_federation.md @@ -14,11 +14,12 @@ apt -yq install tor **WARNING:** Onion instances not using a Tor version supporting V3 addresses will not be able to federate with you. -Create the hidden service for your Akkoma instance in `/etc/tor/torrc`: +Create the hidden service for your Akkoma instance in `/etc/tor/torrc`, with an HTTP tunnel: ``` HiddenServiceDir /var/lib/tor/akkoma_hidden_service/ HiddenServicePort 80 127.0.0.1:8099 HiddenServiceVersion 3 # Remove if Tor version is below 0.3 ( tor --version ) +HTTPTunnelPort 9080 ``` Restart Tor to generate an adress: ``` @@ -35,7 +36,7 @@ Next, edit your Akkoma config. If running in prod, navigate to your Akkoma directory, edit `config/prod.secret.exs` and append this line: ``` -config :pleroma, :http, proxy_url: {:socks5, :localhost, 9050} +config :pleroma, :http, proxy_url: "http://localhost:9080" ``` In your Akkoma directory, assuming you're running prod, run the following: