summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Wang2022-04-28 16:20:28 -0500
committerAnthony Wang2022-04-28 16:20:28 -0500
commitc51dac582d2142c8893206ef3516a63d96f7ca9b (patch)
treeb8c3d2574b9a503bbd9c72e911b524aa3e7ff928
parent16c79bf4d653fc0f4e7ae272d67169878aa214b7 (diff)
downloadaur-c51dac582d2142c8893206ef3516a63d96f7ca9b.tar.gz
Major PKGBUILD overhaul, update to 3.5.1
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD26
-rw-r--r--mastodon.install15
-rw-r--r--mastodon.tmpfiles.d2
4 files changed, 31 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2aa7aaeeb177..8d867b31ea56 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = mastodon
- pkgdesc = Self-hosted social media and network server based on ActivityPub and OStatus
- pkgver = 3.4.6
+ pkgdesc = Your self-hosted, globally interconnected microblogging community
+ pkgver = 3.5.1
pkgrel = 1
- url = https://github.com/tootsuite/mastodon
+ url = https://github.com/mastodon/mastodon
install = mastodon.install
arch = x86_64
license = AGPL3
@@ -21,14 +21,15 @@ pkgbase = mastodon
depends = protobuf
depends = yarn
depends = zlib
+ options = !strip
backup = etc/mastodon.conf
- source = https://github.com/tootsuite/mastodon/archive/v3.4.6.tar.gz
+ source = https://github.com/mastodon/mastodon/archive/v3.5.1.tar.gz
source = mastodon.target
source = mastodon.sysusers.d
source = mastodon.tmpfiles.d
- sha512sums = 83b79e5fddf3190b921aa942c22ba15bdb740c6bb318e468a87b59f6656a215f218c6e68f8a20e02604399925ad016e18be79944c90748d578309dccae9926d7
+ sha512sums = 1fb6f2f17384f217e5a04f140ca35db33449f68cc780af24a2f6f7611874849b9a6fa86a8a930b2da457e4f40c36505761705d140ccb1a56b17ed287d659ae53
sha512sums = c9820c2a83d08bd5d842a78e924682db97ebd5c7291b682603ad30dafcdcc5816c13e717ad39554f042b9d9ed71ab902ce3f604952264a900a72612ee8060acb
sha512sums = 4ee4210bde391e6dc782cb7c14f2cb968c95ad541aa0efcf843a811f8cc5f0d1067ee3c8346bb412aa9fd1dd5a8bd05a4524df7dc4a106957009853dd237074a
- sha512sums = 73493680845e690d0cfd769fbbe68978c0a615602375078aea945ca1f1011404eb4b64972aec7a6e5efa720fb425d91b3f30025391c38ccf77e070ccb391e710
+ sha512sums = 27c4eb01d462c525b59e5808a3b2501b63a34425752128388fbde82f7eb5944b20d2f8d8b1be8ed8adb165cab4cfb8e13f90215f20989ca671a0422ffa37001f
pkgname = mastodon
diff --git a/PKGBUILD b/PKGBUILD
index 7b023323722f..347b1564c1e2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,14 +1,15 @@
-# Maintainer: ny-a <nyaarch64 at gmail dot com>
+# Maintainer: Anthony Wang <ta180m@pm.me>
+# Contributor: ny-a <nyaarch64 at gmail dot com>
# Contributor: Daniel Moch <daniel@danielmoch.com>
# Contributor: Jean Lucas <jean@4ray.co>
# Contributor: Fredrick Brennan <copypaste@kittens.ph>
pkgname=mastodon
-pkgver=3.4.6
+pkgver=3.5.1
pkgrel=1
-pkgdesc='Self-hosted social media and network server based on ActivityPub and OStatus'
+pkgdesc='Your self-hosted, globally interconnected microblogging community'
arch=(x86_64)
-url=https://github.com/tootsuite/mastodon
+url=https://github.com/mastodon/mastodon
license=(AGPL3)
depends=(ffmpeg
imagemagick
@@ -27,14 +28,15 @@ depends=(ffmpeg
makedepends=(git)
backup=(etc/mastodon.conf)
install=mastodon.install
-source=(https://github.com/tootsuite/mastodon/archive/v$pkgver.tar.gz
+options=(!strip)
+source=(https://github.com/mastodon/mastodon/archive/v$pkgver.tar.gz
mastodon.target
mastodon.sysusers.d
mastodon.tmpfiles.d)
-sha512sums=('83b79e5fddf3190b921aa942c22ba15bdb740c6bb318e468a87b59f6656a215f218c6e68f8a20e02604399925ad016e18be79944c90748d578309dccae9926d7'
+sha512sums=('1fb6f2f17384f217e5a04f140ca35db33449f68cc780af24a2f6f7611874849b9a6fa86a8a930b2da457e4f40c36505761705d140ccb1a56b17ed287d659ae53'
'c9820c2a83d08bd5d842a78e924682db97ebd5c7291b682603ad30dafcdcc5816c13e717ad39554f042b9d9ed71ab902ce3f604952264a900a72612ee8060acb'
'4ee4210bde391e6dc782cb7c14f2cb968c95ad541aa0efcf843a811f8cc5f0d1067ee3c8346bb412aa9fd1dd5a8bd05a4524df7dc4a106957009853dd237074a'
- '73493680845e690d0cfd769fbbe68978c0a615602375078aea945ca1f1011404eb4b64972aec7a6e5efa720fb425d91b3f30025391c38ccf77e070ccb391e710')
+ '27c4eb01d462c525b59e5808a3b2501b63a34425752128388fbde82f7eb5944b20d2f8d8b1be8ed8adb165cab4cfb8e13f90215f20989ca671a0422ffa37001f')
prepare() {
cd mastodon-$pkgver
@@ -67,13 +69,9 @@ package() {
cd mastodon-$pkgver/dist
# Fix path discrepancies
- for f in mastodon-*.service; do
- sed -e '0,/home/s/home/var\/lib/' \
- -e 's/\/live//' \
- -e 's/=\/usr\/bin/=\/var\/lib\/mastodon/' \
- -e 's/home\/mastodon\/.rbenv\/shims/usr\/bin/' \
- -i $f
- done
+ sed -e 's/home\/mastodon\/live/var\/lib\/mastodon/g' \
+ -e 's/home\/mastodon\/.rbenv\/shims/usr\/bin/' \
+ -i mastodon-*.service
install -Dm 644 mastodon-*.service -t "$pkgdir"/usr/lib/systemd/system
}
diff --git a/mastodon.install b/mastodon.install
index 1bbebea40012..3f3b602e3331 100644
--- a/mastodon.install
+++ b/mastodon.install
@@ -1,17 +1,24 @@
post_install() {
+ echo "Setting ownership of mastodon files"
+ chown mastodon:mastodon -R /var/lib/mastodon
+
echo "To setup Mastodon, enable and start PostgreSQL and Redis:
# systemctl enable --now postgresql redis
Create the Mastodon PostgreSQL user and grant it the ability to create databases with:
-# su - postgres -s /bin/sh -c \"createuser -d mastodon\"
+# sudo -u postgres createuser -d mastodon
Then, run:
-# su - mastodon -s /bin/sh -c \"cd '/var/lib/mastodon'; RAILS_ENV=production bundle exec rails mastodon:setup\"
+# cd /var/lib/mastodon
+# sudo -u mastodon RAILS_ENV=production bundle exec rails mastodon:setup
Finally, enable and start all the required services:
# systemctl enable --now mastodon.target"
}
post_upgrade() {
+ echo "Setting ownership of mastodon files"
+ chown mastodon:mastodon -R /var/lib/mastodon
+
echo "To upgrade the database schema, run:
-# su - mastodon -s /bin/sh -c \"RAILS_ENV=production bundle exec rails db:migrate\"
+# sudo -u mastodon RAILS_ENV=production bundle exec rails db:migrate
To pre-compile assets, run:
-# su - mastodon -s /bin/sh -c \"RAILS_ENV=production bundle exec rails assets:precompile\""
+# sudo -u mastodon RAILS_ENV=production bundle exec rails assets:precompile"
}
diff --git a/mastodon.tmpfiles.d b/mastodon.tmpfiles.d
index 561bf48783b7..ea9f4ae08a21 100644
--- a/mastodon.tmpfiles.d
+++ b/mastodon.tmpfiles.d
@@ -1,2 +1,2 @@
-Z /var/lib/mastodon - mastodon mastodon
+d /var/lib/mastodon - mastodon mastodon
z /etc/mastodon.conf 0600 mastodon mastodon