summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO33
-rw-r--r--COPYING31
-rw-r--r--PKGBUILD43
-rw-r--r--akkoma.install61
-rw-r--r--akkoma.service38
-rw-r--r--akkoma.sysusers3
-rw-r--r--akkoma.tmpfiles5
7 files changed, 214 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..88d7c75f3e26
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = akkoma-bin
+ pkgdesc = a smallish microblogging platform, aka the cooler pleroma
+ pkgver = 22.12
+ pkgrel = 1
+ url = https://akkoma.social
+ install = akkoma.install
+ arch = x86_64
+ license = AGPL
+ license = CCPL:cc-by-4.0
+ license = CCPL:cc-by-sa-4.0
+ depends = ncurses
+ depends = file
+ depends = libxcrypt-compat
+ depends = openssl-1.1
+ optdepends = postgresql: local postgresql database support
+ optdepends = imagemagick: Pleroma.Upload.Filters.Mogrify, Pleroma.Upload.Filters.Mogrifun support
+ optdepends = ffmpeg: media preview proxy support for videos
+ optdepends = perl-image-exiftool: supporting stripping location (GPS) data from uploaded images with Pleroma.Upload.Filters.Exiftool
+ provides = akkoma
+ conflicts = akkoma
+ backup = etc/akkoma/config.exs
+ source = akkoma.sysusers
+ source = akkoma.tmpfiles
+ source = akkoma.service
+ source = COPYING
+ sha256sums = 0247ee5cc24049ebc37a00634aad8ed9a44d0f9a399a1373284375f5c861a089
+ sha256sums = a65db472aa3b2d384a796bda157e36dff19754400f8f1caca53e7e8d55373837
+ sha256sums = 44181109808ca6ff3e856c0b9800978f9c9dc28b6d98ac71862c06ed354f98e2
+ sha256sums = 1da9737d28754b51adae10a6391c8e83c40fe052dc4b04438a1dd0587a5c9a41
+ source_x86_64 = akkoma-amd64-22.12.zip::https://akkoma-updates.s3-website.fr-par.scw.cloud/stable/akkoma-amd64.zip
+ sha256sums_x86_64 = c892ad17914690185196c75a728f94b639f53e00c42a194e60242fbea09e7320
+
+pkgname = akkoma-bin
diff --git a/COPYING b/COPYING
new file mode 100644
index 000000000000..3df29344cf23
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,31 @@
+Unless otherwise stated this repository is
+Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
+Copyright © 2022 Akkoma Authors <https://akkoma.social/>
+and is distributed under The GNU Affero General Public License Version 3, you
+should have received a copy of the license file as AGPL-3.
+
+---
+
+Files inside docs directory are
+Copyright © 2021-2022 Pleroma Authors <https://pleroma.social/>
+Copyright © 2022 Akkoma Authors <https://akkoma.social/>
+and are distributed under the Creative Commons
+Attribution 4.0 International license, you should have received
+a copy of the license file as CC-BY-4.0.
+
+---
+
+The following files are copyright © 2019 shitposter.club, and are distributed
+under the Creative Commons Attribution-ShareAlike 4.0 International license,
+you should have received a copy of the license file as CC-BY-SA-4.0.
+
+priv/static/images/pleroma-fox-tan-smol.png
+
+---
+
+The following files are copyright © 2017-2020 Pleroma Authors
+<https://pleroma.social/>, and are distributed under the Creative Commons
+Attribution-ShareAlike 4.0 International license, you should have received
+a copy of the license file as CC-BY-SA-4.0.
+
+priv/static/instance/thumbnail.jpeg
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b82cfb9d6ec0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Bjoern Franke <bjo+aur@schafweide.org>
+# based on pleroma-bin PKGBUILD
+# Contributor: gudzpoz <gudzpoz ant live dot com>
+# Contributor: Faye Jackson <justalittleepsilon ant gmail dot com>
+
+pkgname=akkoma-bin
+pkgver=22.12
+pkgrel=1
+pkgdesc='a smallish microblogging platform, aka the cooler pleroma'
+url='https://akkoma.social'
+license=('AGPL' 'CCPL:cc-by-4.0' 'CCPL:cc-by-sa-4.0')
+arch=(x86_64)
+depends=(ncurses file libxcrypt-compat openssl-1.1)
+optdepends=('postgresql: local postgresql database support'
+ 'imagemagick: Pleroma.Upload.Filters.Mogrify, Pleroma.Upload.Filters.Mogrifun support'
+ 'ffmpeg: media preview proxy support for videos'
+ 'perl-image-exiftool: supporting stripping location (GPS) data from uploaded images with Pleroma.Upload.Filters.Exiftool')
+provides=(akkoma)
+conflicts=(akkoma)
+backup=('etc/akkoma/config.exs')
+install=akkoma.install
+source_x86_64=("akkoma-amd64-${pkgver}.zip::https://akkoma-updates.s3-website.fr-par.scw.cloud/stable/akkoma-amd64.zip")
+source=('akkoma.sysusers'
+ 'akkoma.tmpfiles'
+ 'akkoma.service'
+ 'COPYING')
+sha256sums=('0247ee5cc24049ebc37a00634aad8ed9a44d0f9a399a1373284375f5c861a089'
+ 'a65db472aa3b2d384a796bda157e36dff19754400f8f1caca53e7e8d55373837'
+ '44181109808ca6ff3e856c0b9800978f9c9dc28b6d98ac71862c06ed354f98e2'
+ '1da9737d28754b51adae10a6391c8e83c40fe052dc4b04438a1dd0587a5c9a41')
+sha256sums_x86_64=('c892ad17914690185196c75a728f94b639f53e00c42a194e60242fbea09e7320')
+
+package() {
+ cd "$srcdir"
+
+ mkdir -p "${pkgdir}/opt/akkoma"
+ find release -executable -exec chmod a+rx {} \;
+ cp -r release/* "${pkgdir}/opt/akkoma"
+ install -Dm 644 akkoma.sysusers "${pkgdir}/usr/lib/sysusers.d/akkoma.conf"
+ install -Dm 644 akkoma.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/akkoma.conf"
+ install -Dm 644 akkoma.service "${pkgdir}/usr/lib/systemd/system/akkoma.service"
+ install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/akkoma.install b/akkoma.install
new file mode 100644
index 000000000000..c973cf4f84a3
--- /dev/null
+++ b/akkoma.install
@@ -0,0 +1,61 @@
+post_install() {
+ username="akkoma"
+ home_dir="/opt/${username}"
+ uploads_dir="/var/lib/${username}/uploads"
+ static_dir="/var/lib/${username}/static"
+ config_dir="/etc/${username}"
+ tmp_psql="/tmp/setup_otp_db.psql"
+
+ instance_gen_params="instance gen\
+ --output \"${config_dir}/config.exs\"\
+ --output-psql \"$tmp_psql\"\
+ --uploads-dir \"$uploads_dir\"\
+ --static-dir \"$static_dir\"\
+ --dbname \"$username\"\
+ --dbuser \"$username\"\
+"
+
+ printf "\n"
+ printf "A local installation of postgresql is strongly recommended unless you know what you are doing. Use:\n $ sudo pacman -S postgresql\nto install postgresql locally.\n\n"
+ printf "If postgresql is installed locally, the user should run the following commands to initialize akkoma:\n"
+
+ printf ">>> sudo -Hu $username ${home_dir}/bin/pleroma_ctl ${instance_gen_params}\n"
+ printf ">>> sudo -Hu postgres psql -f \"${tmp_psql}\"\n"
+ printf ">>> sudo -Hu $username ${home_dir}/bin/pleroma_ctl migrate\n\n"
+
+ printf "If the user is using a remote postgresql instance, they should ensure \"${tmp_psql}\" be executed remotely after the first command:\n"
+ printf ">>> sudo -Hu $username -s /bin/bash ${home_dir}/bin/pleroma_ctl ${instance_gen_params}\n"
+ printf ">>> # Now execute \"$tmp_psql\" remotely.\n"
+ printf ">>> sudo -Hu $username -s /bin/bash ${home_dir}/bin/pleroma_ctl migrate\n\n"
+
+ printf "After initializing akkoma, you may start it with:\n"
+ printf ">>> sudo systemctl start akkoma\n\n"
+
+ printf "Check https://docs-develop.akkoma.social/backend/installation/otp_en/#post-installation for post-installation steps.\n"
+}
+
+pre_upgrade() {
+ systemctl stop akkoma.service
+}
+
+post_upgrade() {
+ username="akkoma"
+ home_dir="/opt/${username}"
+ migration_needed="false"
+#
+# printf "Procedures to upgrade from version $2 to version $1:\n\n"
+# case "$2" in
+# "2.4.0-1")
+# ;&
+# esac
+
+ if [ "$migration_needed" = "true" ]; then
+ printf "\nYou will need to migrate your database as the above upgrade notes state.\n"
+ printf "Ensure your postgresql database, whether local or remote, is up, and run the following command:\n"
+ printf ">>> cd \"$home_dir\"\n"
+ printf ">>> sudo -Hu \"$username\" ./bin/pleroma_ctl migrate\n"
+ fi
+
+ printf "\nAfter all these, you may start akkoma with:\n"
+ printf ">>> sudo systemctl start akkoma\n"
+}
diff --git a/akkoma.service b/akkoma.service
new file mode 100644
index 000000000000..b479e01382e9
--- /dev/null
+++ b/akkoma.service
@@ -0,0 +1,38 @@
+[Unit]
+Description=Pleroma social network
+Wants=postgresql.service nginx.service
+After=network.target postgresql.service nginx.service
+
+[Service]
+KillMode=process
+Restart=on-failure
+
+; Name of the user that runs the Pleroma service.
+User=akkoma
+
+; Make sure that all paths fit your installation.
+; Path to the home directory of the user running the Pleroma service.
+Environment="PLEROMA_CONFIG_PATH=/etc/akkoma/config.exs"
+Environment="HOME=/opt/akkoma"
+; Path to the folder containing the Pleroma installation.
+WorkingDirectory=/opt/akkoma
+; Path to the Pleroma binary.
+ExecStart=/opt/akkoma/bin/pleroma start
+ExecStop=/opt/akkoma/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.
+PrivateTmp=true
+; The /home, /root, and /run/user folders can not be accessed by this service anymore. If your Pleroma user has its home folder in one of the restricted places, or use one of these folders as its working directory, you have to set this to false.
+ProtectHome=true
+; Mount /usr, /boot, and /etc as read-only for processes invoked by this service.
+ProtectSystem=full
+; Sets up a new /dev mount for the process and only adds API pseudo devices like /dev/null, /dev/zero or /dev/random but not physical devices. Disabled by default because it may not work on devices like the Raspberry Pi.
+PrivateDevices=false
+; Ensures that the service process and all its children can never gain new privileges through execve().
+NoNewPrivileges=true
+; Drops the sysadmin capability from the daemon.
+CapabilityBoundingSet=~CAP_SYS_ADMIN
+
+[Install]
+WantedBy=multi-user.target
diff --git a/akkoma.sysusers b/akkoma.sysusers
new file mode 100644
index 000000000000..00dfc2abca43
--- /dev/null
+++ b/akkoma.sysusers
@@ -0,0 +1,3 @@
+u akkoma - "Akkoma OTP User" /opt/akkoma /bin/false
+g akkoma -
+m akkoma akkoma
diff --git a/akkoma.tmpfiles b/akkoma.tmpfiles
new file mode 100644
index 000000000000..100b2d995252
--- /dev/null
+++ b/akkoma.tmpfiles
@@ -0,0 +1,5 @@
+d /etc/akkoma 0750 akkoma akkoma -
+d /var/lib/akkoma/uploads 0750 akkoma akkoma -
+d /var/lib/akkoma/static 0755 akkoma akkoma -
+d /opt/akkoma/tmp 0750 akkoma akkoma -
+