Compare commits

..

No commits in common. "a1be54d7064ac960a29bf2d4f308107b362967ef" and "ee3d0d5f4e8ae3a1b60c4d61c0867fb2f8ebc060" have entirely different histories.

10 changed files with 23 additions and 63 deletions

View file

@ -296,10 +296,6 @@ Please make sure that you've applied all migrations using `pleroma_ctl migrate -
Read more at ['Switch to PGroonga'](#switch-to-pgroonga) and ['Change PGroonga indexing options'](#change-pgroonga-indexing-options). Read more at ['Switch to PGroonga'](#switch-to-pgroonga) and ['Change PGroonga indexing options'](#change-pgroonga-indexing-options).
#### Fails to install Pleroma-FE
This sometimes happens. Try installing again later.
--- ---
## Akkoma ## Akkoma

View file

@ -45,16 +45,3 @@
8. Remove the dependencies that you don't need anymore (see installation guide). Make sure you don't remove packages that are still needed for other software that you have running! 8. Remove the dependencies that you don't need anymore (see installation guide). Make sure you don't remove packages that are still needed for other software that you have running!
[¹]: We assume the database name and user are both "akkoma". If not, you can find the correct name in your config files. [¹]: We assume the database name and user are both "akkoma". If not, you can find the correct name in your config files.
## Docker installations
If running behind Docker, it is required to run the above commands inside of a running database container.
### Example
Running `docker compose run --rm db pg_dump <...>` will fail and return:
```
pg_dump: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?"
```
However, first starting just the database container with `docker compose up db -d`, and then running `docker compose exec db pg_dump -d akkoma --format=custom -f </your/backup/dir/akkoma.pgdump>` will successfully generate a database dump.
Then to make the file accessible on the host system you can run `docker compose cp db:</your/backup/dir/akkoma.pgdump> </your/target/location>` to copy if from the container.

View file

@ -60,7 +60,7 @@ Example of `my-awesome-theme.json` where we add the name "My Awesome Theme"
### Set as default theme ### Set as default theme
Now we can set the new theme as default in the [Pleroma FE configuration](https://docs-fe.akkoma.dev/stable/CONFIGURATION/). Now we can set the new theme as default in the [Pleroma FE configuration](https://docs-fe.akkoma.dev/stable/CONFIGURATION).
Example of adding the new theme in the back-end config files Example of adding the new theme in the back-end config files
```elixir ```elixir

View file

@ -74,7 +74,7 @@ def welcome(user, opts \\ %{}) do
def password_reset_email(user, token) when is_binary(token) do def password_reset_email(user, token) when is_binary(token) do
Gettext.with_locale_or_default user.language do Gettext.with_locale_or_default user.language do
password_reset_url = url(~p[/api/v1/pleroma/password_reset/#{token}]) password_reset_url = ~p[/api/v1/pleroma/password_reset/#{token}]
html_body = html_body =
Gettext.dpgettext( Gettext.dpgettext(
@ -107,7 +107,7 @@ def user_invitation_email(
to_name \\ nil to_name \\ nil
) do ) do
Gettext.with_locale_or_default user.language do Gettext.with_locale_or_default user.language do
registration_url = url(~p[/registration/#{user_invite_token.token}]) registration_url = ~p[/registration/#{user_invite_token.token}]
html_body = html_body =
Gettext.dpgettext( Gettext.dpgettext(
@ -140,7 +140,7 @@ def user_invitation_email(
def account_confirmation_email(user) do def account_confirmation_email(user) do
Gettext.with_locale_or_default user.language do Gettext.with_locale_or_default user.language do
confirmation_url = url(~p[/api/account/confirm_email/#{user.id}/#{user.confirmation_token}]) confirmation_url = ~p[/api/account/confirm_email/#{user.id}/#{user.confirmation_token}]
html_body = html_body =
Gettext.dpgettext( Gettext.dpgettext(
@ -330,7 +330,7 @@ def unsubscribe_url(user, notifications_type) do
|> Pleroma.JWT.generate_and_sign!() |> Pleroma.JWT.generate_and_sign!()
|> Base.encode64() |> Base.encode64()
url(~p[/mailer/unsubscribe/#{token}]) ~p[/mailer/unsubscribe/#{token}]
end end
def backup_is_ready_email(backup, admin_user_id \\ nil) do def backup_is_ready_email(backup, admin_user_id \\ nil) do

View file

@ -61,14 +61,11 @@ def default_cache_control_header, do: @default_cache_control_header
""" """
@inline_content_types [ @inline_content_types [
"image/avif",
"image/gif", "image/gif",
"image/jpeg", "image/jpeg",
"image/jpg", "image/jpg",
"image/jxl",
"image/png", "image/png",
"image/svg+xml", "image/svg+xml",
"image/webp",
"audio/mpeg", "audio/mpeg",
"audio/mp3", "audio/mp3",
"video/webm", "video/webm",

View file

@ -180,7 +180,7 @@ defp deps do
{:remote_ip, "~> 1.1.0"}, {:remote_ip, "~> 1.1.0"},
{:captcha, {:captcha,
git: "https://git.pleroma.social/pleroma/elixir-libraries/elixir-captcha.git", git: "https://git.pleroma.social/pleroma/elixir-libraries/elixir-captcha.git",
ref: "90f6ce7672f70f56708792a98d98bd05176c9176"}, ref: "3bbfa8b5ea13accc1b1c40579a380d8e5cfd6ad2"},
{:restarter, path: "./restarter"}, {:restarter, path: "./restarter"},
{:majic, {:majic,
git: "https://akkoma.dev/AkkomaGang/majic.git", git: "https://akkoma.dev/AkkomaGang/majic.git",

View file

@ -7,7 +7,7 @@
"bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"}, "bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"},
"cachex": {:hex, :cachex, "3.6.0", "14a1bfbeee060dd9bec25a5b6f4e4691e3670ebda28c8ba2884b12fe30b36bf8", [:mix], [{:eternal, "~> 1.2", [hex: :eternal, repo: "hexpm", optional: false]}, {:jumper, "~> 1.0", [hex: :jumper, repo: "hexpm", optional: false]}, {:sleeplocks, "~> 1.1", [hex: :sleeplocks, repo: "hexpm", optional: false]}, {:unsafe, "~> 1.0", [hex: :unsafe, repo: "hexpm", optional: false]}], "hexpm", "ebf24e373883bc8e0c8d894a63bbe102ae13d918f790121f5cfe6e485cc8e2e2"}, "cachex": {:hex, :cachex, "3.6.0", "14a1bfbeee060dd9bec25a5b6f4e4691e3670ebda28c8ba2884b12fe30b36bf8", [:mix], [{:eternal, "~> 1.2", [hex: :eternal, repo: "hexpm", optional: false]}, {:jumper, "~> 1.0", [hex: :jumper, repo: "hexpm", optional: false]}, {:sleeplocks, "~> 1.1", [hex: :sleeplocks, repo: "hexpm", optional: false]}, {:unsafe, "~> 1.0", [hex: :unsafe, repo: "hexpm", optional: false]}], "hexpm", "ebf24e373883bc8e0c8d894a63bbe102ae13d918f790121f5cfe6e485cc8e2e2"},
"calendar": {:hex, :calendar, "1.0.0", "f52073a708528482ec33d0a171954ca610fe2bd28f1e871f247dc7f1565fa807", [:mix], [{:tzdata, "~> 0.1.201603 or ~> 0.5.20 or ~> 1.0", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "990e9581920c82912a5ee50e62ff5ef96da6b15949a2ee4734f935fdef0f0a6f"}, "calendar": {:hex, :calendar, "1.0.0", "f52073a708528482ec33d0a171954ca610fe2bd28f1e871f247dc7f1565fa807", [:mix], [{:tzdata, "~> 0.1.201603 or ~> 0.5.20 or ~> 1.0", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "990e9581920c82912a5ee50e62ff5ef96da6b15949a2ee4734f935fdef0f0a6f"},
"captcha": {:git, "https://git.pleroma.social/pleroma/elixir-libraries/elixir-captcha.git", "90f6ce7672f70f56708792a98d98bd05176c9176", [ref: "90f6ce7672f70f56708792a98d98bd05176c9176"]}, "captcha": {:git, "https://git.pleroma.social/pleroma/elixir-libraries/elixir-captcha.git", "3bbfa8b5ea13accc1b1c40579a380d8e5cfd6ad2", [ref: "3bbfa8b5ea13accc1b1c40579a380d8e5cfd6ad2"]},
"castore": {:hex, :castore, "1.0.3", "7130ba6d24c8424014194676d608cb989f62ef8039efd50ff4b3f33286d06db8", [:mix], [], "hexpm", "680ab01ef5d15b161ed6a95449fac5c6b8f60055677a8e79acf01b27baa4390b"}, "castore": {:hex, :castore, "1.0.3", "7130ba6d24c8424014194676d608cb989f62ef8039efd50ff4b3f33286d06db8", [:mix], [], "hexpm", "680ab01ef5d15b161ed6a95449fac5c6b8f60055677a8e79acf01b27baa4390b"},
"certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"},
"combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"}, "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"},

View file

@ -2,28 +2,21 @@
# XXX: This should be removed when elixir's releases get custom command support # XXX: This should be removed when elixir's releases get custom command support
detect_flavour() { detect_flavour() {
machine_type=$(uname -m) arch="amd64"
if [ ${machine_type} = 'aarch64' ] ; then if getconf GNU_LIBC_VERSION >/dev/null; then
arch='arm64' libc_postfix=""
elif [ ${machine_type} = 'x86_64' ] ; then elif [ "$(ldd 2>&1 | head -c 9)" = "musl libc" ]; then
arch='amd64' libc_postfix="-musl"
if getconf GNU_LIBC_VERSION >/dev/null; then elif [ "$(find /lib/libc.musl* | wc -l)" ]; then
libc_postfix="" libc_postfix="-musl"
elif [ "$(ldd 2>&1 | head -c 9)" = "musl libc" ]; then else
libc_postfix="-musl" echo "Unsupported libc" >&2
elif [ "$(find /lib/libc.musl* | wc -l)" ]; then exit 1
libc_postfix="-musl"
else
echo "Unsupported libc" >&2
exit 1
fi
else
echo "Could not detect your architecture please pass them via --flavour"
exit 1
fi fi
echo "$arch$libc_postfix" echo "$arch$libc_postfix"
} }
detect_branch() { detect_branch() {
version="$(cut -d' ' -f2 <"$RELEASE_ROOT"/releases/start_erl.data)" version="$(cut -d' ' -f2 <"$RELEASE_ROOT"/releases/start_erl.data)"
# Expected format: major.minor.patch_version(-number_of_commits_ahead_of_tag-gcommit_hash).branch # Expected format: major.minor.patch_version(-number_of_commits_ahead_of_tag-gcommit_hash).branch
@ -72,19 +65,6 @@ update() {
esac esac
done done
echo "Warning: This command is NOT supported by BNAkkoma"
echo "Any changes not made in the upstream will be lost!"
echo "Do you want to continue anyway? (y/n)"
read -r proceed_update
case $proceed_update in
[y]* )
echo "Continue."
;;
* )
echo "Exiting..."
exit 1
;;
esac
RELEASE_ROOT=$(dirname "$SCRIPTPATH") RELEASE_ROOT=$(dirname "$SCRIPTPATH")
uri="https://akkoma-updates.s3-website.fr-par.scw.cloud" uri="https://akkoma-updates.s3-website.fr-par.scw.cloud"
project_id="2" project_id="2"

View file

@ -16,7 +16,7 @@ test "build password reset email" do
assert email.from == {config[:name], config[:notify_email]} assert email.from == {config[:name], config[:notify_email]}
assert email.to == [{user.name, user.email}] assert email.to == [{user.name, user.email}]
assert email.subject == "Password reset" assert email.subject == "Password reset"
assert email.html_body =~ url(~p"/api/v1/pleroma/password_reset/test_token") assert email.html_body =~ ~p"/api/v1/pleroma/password_reset/test_token"
end end
test "build user invitation email" do test "build user invitation email" do
@ -28,7 +28,7 @@ test "build user invitation email" do
assert email.subject == "Invitation to Akkoma" assert email.subject == "Invitation to Akkoma"
assert email.to == [{"Jonh", "test@test.com"}] assert email.to == [{"Jonh", "test@test.com"}]
assert email.html_body =~ url(~p[/registration/#{token.token}]) assert email.html_body =~ ~p[/registration/#{token.token}]
end end
test "build account confirmation email" do test "build account confirmation email" do
@ -39,7 +39,7 @@ test "build account confirmation email" do
assert email.to == [{user.name, user.email}] assert email.to == [{user.name, user.email}]
assert email.subject == "#{config[:name]} account confirmation" assert email.subject == "#{config[:name]} account confirmation"
assert email.html_body =~ url(~p[/api/account/confirm_email/#{user.id}/conf-token]) assert email.html_body =~ ~p[/account/confirm_email/#{user.id}/conf-token]
end end
test "build approval pending email" do test "build approval pending email" do

View file

@ -91,7 +91,7 @@ test "updates the user's bio", %{conn: conn} do
assert user_data = json_response_and_validate_schema(conn, 200) assert user_data = json_response_and_validate_schema(conn, 200)
assert user_data["note"] == assert user_data["note"] ==
~s(I drink <a class="hashtag" data-tag="cofe" href="http://localhost:4001/tag/cofe" rel=\"tag ugc\">#cofe</a> with <span class="h-card"><a class="u-url mention" data-user="#{user2.id}" href="#{user2.ap_id}" rel="ugc">@<span>#{user2.nickname}</span></a></span><br/><br/>suya..) ~s(I drink <a class="hashtag" data-tag="cofe" href="http://localhost:4001/tag/cofe">#cofe</a> with <span class="h-card"><a class="u-url mention" data-user="#{user2.id}" href="#{user2.ap_id}" rel="ugc">@<span>#{user2.nickname}</span></a></span><br/><br/>suya..)
assert user_data["source"]["note"] == raw_bio assert user_data["source"]["note"] == raw_bio