First upload
This commit is contained in:
commit
aad42f1d8a
12 changed files with 310 additions and 0 deletions
39
mastodon-glitch-soc-redis/.SRCINFO
Normal file
39
mastodon-glitch-soc-redis/.SRCINFO
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
pkgbase = mastodon-glitch-soc-redis
|
||||||
|
pkgdesc = A glitchy but lovable microblogging server
|
||||||
|
pkgver = 4.3.2
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://github.com/glitch-soc/mastodon
|
||||||
|
install = mastodon.install
|
||||||
|
arch = any
|
||||||
|
license = AGPL3
|
||||||
|
depends = ffmpeg
|
||||||
|
depends = git
|
||||||
|
depends = libidn
|
||||||
|
depends = libpqxx
|
||||||
|
depends = libvips
|
||||||
|
depends = libxml2
|
||||||
|
depends = libxslt
|
||||||
|
depends = libyaml
|
||||||
|
depends = nodejs
|
||||||
|
depends = postgresql
|
||||||
|
depends = protobuf
|
||||||
|
depends = ruby-bundler
|
||||||
|
depends = sudo
|
||||||
|
depends = redis
|
||||||
|
depends = zlib
|
||||||
|
provides = mastodon
|
||||||
|
conflicts = mastodon
|
||||||
|
options = !strip
|
||||||
|
backup = etc/mastodon.conf
|
||||||
|
source = https://github.com/glitch-soc/mastodon/archive/v4.3.2.tar.gz
|
||||||
|
source = mastodon.target
|
||||||
|
source = mastodon.sysusers.d
|
||||||
|
source = mastodon.tmpfiles.d
|
||||||
|
source = devise_pam.patch
|
||||||
|
sha512sums = d0c4a174a3dfa35a3208067430d00b708d68e8a6343eef28369d26d2ca208bf6a6e0240ab85f2e843d4ad9e08e11a5163ee2615d8a3c75f41eeb67105e991f7f
|
||||||
|
sha512sums = bbce4ff9142265fc7d5f7669637c112240bc6d1b39dedf212faf8acb09fb9b4b2acc07038df5e790c60baff51bc44ffef9318f9fce043c6831ae5e5f02fea5a6
|
||||||
|
sha512sums = 4ee4210bde391e6dc782cb7c14f2cb968c95ad541aa0efcf843a811f8cc5f0d1067ee3c8346bb412aa9fd1dd5a8bd05a4524df7dc4a106957009853dd237074a
|
||||||
|
sha512sums = 27c4eb01d462c525b59e5808a3b2501b63a34425752128388fbde82f7eb5944b20d2f8d8b1be8ed8adb165cab4cfb8e13f90215f20989ca671a0422ffa37001f
|
||||||
|
sha512sums = 7b2ac9917a6d077152425ce59e2cd97df11730d197b87da324b1e0dc29042de5c11530e4d530f1775ca75fc4a06bccb6a5154feb42c8503b5830ecb46e306b7a
|
||||||
|
|
||||||
|
pkgname = mastodon-glitch-soc-redis
|
87
mastodon-glitch-soc-redis/PKGBUILD
Normal file
87
mastodon-glitch-soc-redis/PKGBUILD
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
# Maintainer: Lain Iwakura <lain@serialexperiments.club>
|
||||||
|
# Contributor: Bjoern Franke <bjo+aur@schafweide.org>
|
||||||
|
|
||||||
|
pkgname=mastodon-glitch-soc-redis
|
||||||
|
pkgver=4.3.2
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='A glitchy but lovable microblogging server'
|
||||||
|
arch=(any)
|
||||||
|
url=https://github.com/glitch-soc/mastodon
|
||||||
|
license=(AGPL3)
|
||||||
|
provides=(mastodon)
|
||||||
|
conflicts=(mastodon)
|
||||||
|
depends=(ffmpeg
|
||||||
|
git
|
||||||
|
libidn
|
||||||
|
libpqxx
|
||||||
|
libvips
|
||||||
|
libxml2
|
||||||
|
libxslt
|
||||||
|
libyaml
|
||||||
|
nodejs
|
||||||
|
postgresql
|
||||||
|
protobuf
|
||||||
|
ruby-bundler
|
||||||
|
sudo
|
||||||
|
redis
|
||||||
|
zlib)
|
||||||
|
backup=(etc/mastodon.conf)
|
||||||
|
install=mastodon.install
|
||||||
|
options=(!strip)
|
||||||
|
source=(https://github.com/glitch-soc/mastodon/archive/v$pkgver.tar.gz
|
||||||
|
mastodon.target
|
||||||
|
mastodon.sysusers.d
|
||||||
|
mastodon.tmpfiles.d
|
||||||
|
devise_pam.patch)
|
||||||
|
sha512sums=('d0c4a174a3dfa35a3208067430d00b708d68e8a6343eef28369d26d2ca208bf6a6e0240ab85f2e843d4ad9e08e11a5163ee2615d8a3c75f41eeb67105e991f7f'
|
||||||
|
'bbce4ff9142265fc7d5f7669637c112240bc6d1b39dedf212faf8acb09fb9b4b2acc07038df5e790c60baff51bc44ffef9318f9fce043c6831ae5e5f02fea5a6'
|
||||||
|
'4ee4210bde391e6dc782cb7c14f2cb968c95ad541aa0efcf843a811f8cc5f0d1067ee3c8346bb412aa9fd1dd5a8bd05a4524df7dc4a106957009853dd237074a'
|
||||||
|
'27c4eb01d462c525b59e5808a3b2501b63a34425752128388fbde82f7eb5944b20d2f8d8b1be8ed8adb165cab4cfb8e13f90215f20989ca671a0422ffa37001f'
|
||||||
|
'7b2ac9917a6d077152425ce59e2cd97df11730d197b87da324b1e0dc29042de5c11530e4d530f1775ca75fc4a06bccb6a5154feb42c8503b5830ecb46e306b7a')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd mastodon-$pkgver
|
||||||
|
patch -p1 < ../devise_pam.patch
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd mastodon-$pkgver
|
||||||
|
sed -i '/husky install/d' package.json # Stop husky from hijacking git hooks
|
||||||
|
bundle config set deployment true
|
||||||
|
bundle config without 'development test'
|
||||||
|
bundle config with 'pam_authentication'
|
||||||
|
bundle config set frozen false
|
||||||
|
bundle add erb
|
||||||
|
bundle install -j$(getconf _NPROCESSORS_ONLN)
|
||||||
|
corepack enable --install-directory . yarn
|
||||||
|
./yarn install
|
||||||
|
# https://aur.archlinux.org/packages/mastodon?O=0#comment-986425
|
||||||
|
cd vendor/bundle/ruby/*/gems/ox-*/ext/ox
|
||||||
|
make
|
||||||
|
cp ox.so ../../lib
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -d "$pkgdir"/{var/lib,etc}
|
||||||
|
cp -a mastodon-$pkgver "$pkgdir"/var/lib/mastodon
|
||||||
|
|
||||||
|
# Put the config file in /etc and link to it
|
||||||
|
touch "$pkgdir"/etc/mastodon.conf
|
||||||
|
ln -s /etc/mastodon.conf "$pkgdir"/var/lib/mastodon/.env.production
|
||||||
|
ln -s /usr/bin/node "$pkgdir"/var/lib/mastodon/node
|
||||||
|
|
||||||
|
install -Dm 644 mastodon.target -t "$pkgdir"/usr/lib/systemd/system
|
||||||
|
install -Dm 644 mastodon.sysusers.d "$pkgdir"/usr/lib/sysusers.d/mastodon.conf
|
||||||
|
install -Dm 644 mastodon.tmpfiles.d "$pkgdir"/usr/lib/tmpfiles.d/mastodon.conf
|
||||||
|
|
||||||
|
cd mastodon-$pkgver/dist
|
||||||
|
|
||||||
|
# Fix path discrepancies
|
||||||
|
sed -e 's/home\/mastodon\/live/var\/lib\/mastodon/g' \
|
||||||
|
-e 's/home\/mastodon\/.rbenv\/shims/usr\/bin/' \
|
||||||
|
-i mastodon-*.service
|
||||||
|
sed -e 's/home\/mastodon\/live/var\/lib\/mastodon/g' \
|
||||||
|
-i nginx.conf
|
||||||
|
|
||||||
|
install -Dm 644 mastodon-*.service -t "$pkgdir"/usr/lib/systemd/system
|
||||||
|
}
|
12
mastodon-glitch-soc-redis/devise_pam.patch
Normal file
12
mastodon-glitch-soc-redis/devise_pam.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
|
||||||
|
index 5c88c4cd5..c333fe443 100644
|
||||||
|
--- a/config/initializers/devise.rb
|
||||||
|
+++ b/config/initializers/devise.rb
|
||||||
|
@@ -1,6 +1,7 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'devise/strategies/authenticatable'
|
||||||
|
+require 'devise_pam_authenticatable'
|
||||||
|
|
||||||
|
Warden::Manager.after_set_user except: :fetch do |user, warden|
|
||||||
|
session_id = warden.cookies.signed['_session_id'] || warden.raw_session['auth_id']
|
29
mastodon-glitch-soc-redis/mastodon.install
Normal file
29
mastodon-glitch-soc-redis/mastodon.install
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
post_install() {
|
||||||
|
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:
|
||||||
|
# sudo -u postgres createuser -d mastodon
|
||||||
|
Then, run:
|
||||||
|
# cd /var/lib/mastodon
|
||||||
|
# sudo chown mastodon:mastodon -R .
|
||||||
|
# sudo -u mastodon corepack enable --install-directory . yarn
|
||||||
|
# sudo -u mastodon RAILS_ENV=production NODE_OPTIONS=--openssl-legacy-provider PATH=./:$PATH bundle exec rails mastodon:setup
|
||||||
|
Finally, enable and start all the required services:
|
||||||
|
# systemctl enable --now mastodon.target"
|
||||||
|
}
|
||||||
|
|
||||||
|
post_upgrade() {
|
||||||
|
cd /var/lib/mastodon
|
||||||
|
|
||||||
|
echo "For the 4.2 to 4.3 update, generate new encryption secrets:
|
||||||
|
# sudo -u mastodon sh -c \"cd /var/lib/mastodon && RAILS_ENV=production bin/rails db:encryption:init\"
|
||||||
|
And add them and MASTODON_USE_LIBVIPS=true to /etc/mastodon.conf"
|
||||||
|
|
||||||
|
echo "Setting ownership of mastodon files"
|
||||||
|
find -path ./public/system -prune -o -exec chown -h mastodon:mastodon {} +
|
||||||
|
echo "Upgrading database schema"
|
||||||
|
sudo -u mastodon RAILS_ENV=production bundle exec rails db:migrate
|
||||||
|
echo "Precompiling assets"
|
||||||
|
sudo -u mastodon corepack enable --install-directory . yarn
|
||||||
|
sudo -u mastodon RAILS_ENV=production NODE_OPTIONS=--openssl-legacy-provider PATH=./:$PATH bundle exec rails assets:precompile
|
||||||
|
}
|
1
mastodon-glitch-soc-redis/mastodon.sysusers.d
Normal file
1
mastodon-glitch-soc-redis/mastodon.sysusers.d
Normal file
|
@ -0,0 +1 @@
|
||||||
|
u mastodon - "Mastodon user" /var/lib/mastodon
|
9
mastodon-glitch-soc-redis/mastodon.target
Normal file
9
mastodon-glitch-soc-redis/mastodon.target
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Mastodon
|
||||||
|
Wants=mastodon-web.service mastodon-sidekiq.service mastodon-streaming.service
|
||||||
|
Wants=postgresql.service redis.service
|
||||||
|
Before=mastodon-web.service mastodon-sidekiq.service mastodon-streaming.service
|
||||||
|
After=postgresql.service redis.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
2
mastodon-glitch-soc-redis/mastodon.tmpfiles.d
Normal file
2
mastodon-glitch-soc-redis/mastodon.tmpfiles.d
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
d /var/lib/mastodon - mastodon mastodon
|
||||||
|
z /etc/mastodon.conf 0600 mastodon mastodon
|
19
nginx-mainline-mod-lua-git/.SRCINFO
Normal file
19
nginx-mainline-mod-lua-git/.SRCINFO
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
pkgbase = nginx-mainline-mod-lua-git
|
||||||
|
pkgdesc = Lua script engine module for mainline nginx
|
||||||
|
pkgver = v0.10.16.r379.g950b1fb2
|
||||||
|
pkgrel = 1
|
||||||
|
epoch = 1
|
||||||
|
url = https://github.com/openresty/lua-nginx-module
|
||||||
|
arch = i686
|
||||||
|
arch = x86_64
|
||||||
|
license = BSD
|
||||||
|
makedepends = nginx-mainline-src
|
||||||
|
depends = nginx-mainline
|
||||||
|
depends = nginx-mainline-mod-ndk
|
||||||
|
depends = luajit
|
||||||
|
depends = lua-resty-core
|
||||||
|
depends = pcre
|
||||||
|
source = git+https://github.com/openresty/lua-nginx-module/
|
||||||
|
sha256sums = SKIP
|
||||||
|
|
||||||
|
pkgname = nginx-mainline-mod-lua-git
|
50
nginx-mainline-mod-lua-git/PKGBUILD
Normal file
50
nginx-mainline-mod-lua-git/PKGBUILD
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
# Maintainer: Lain Iwakura <lain@serialexperiments.club
|
||||||
|
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
|
||||||
|
|
||||||
|
pkgname=nginx-mainline-mod-lua-git
|
||||||
|
_modname="lua"
|
||||||
|
pkgver=v0.10.16.r379.g950b1fb2
|
||||||
|
pkgrel=1
|
||||||
|
epoch=1
|
||||||
|
pkgdesc='Lua script engine module for mainline nginx'
|
||||||
|
arch=('i686' 'x86_64')
|
||||||
|
depends=('nginx-mainline' 'nginx-mainline-mod-ndk' 'luajit' 'lua-resty-core' 'pcre')
|
||||||
|
makedepends=('nginx-mainline-src')
|
||||||
|
url="https://github.com/openresty/lua-nginx-module"
|
||||||
|
license=('BSD')
|
||||||
|
|
||||||
|
source=(git+https://github.com/openresty/$_modname-nginx-module/)
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd "$_modname-nginx-module"
|
||||||
|
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
||||||
|
}
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
mkdir -p build
|
||||||
|
cd build
|
||||||
|
ln -sf /usr/src/nginx/auto
|
||||||
|
ln -sf /usr/src/nginx/src
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd build
|
||||||
|
export LUAJIT_INC=$(pkg-config luajit --variable=includedir)
|
||||||
|
export LUAJIT_LIB=$(pkg-config luajit --variable=libdir)
|
||||||
|
export NGINX_USE_HTTP2=1
|
||||||
|
nginx -V 2>&1 |
|
||||||
|
grep -o -- '--prefix=.*$' |
|
||||||
|
xargs printf '%s\0' |
|
||||||
|
sed -z '/^--with-ld-opt=/{s/-Wl,/\0-E,/;s/-Wl,/-lpcre \0/}' |
|
||||||
|
xargs -0 /usr/src/nginx/configure \
|
||||||
|
--add-dynamic-module=../$_modname-nginx-module
|
||||||
|
make modules
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd build/objs
|
||||||
|
for mod in *.so; do
|
||||||
|
install -Dm755 $mod "$pkgdir"/usr/lib/nginx/modules/$mod
|
||||||
|
done
|
||||||
|
}
|
18
uptime-kuma-beta/.SRCINFO
Normal file
18
uptime-kuma-beta/.SRCINFO
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
pkgbase = uptime-kuma-beta
|
||||||
|
pkgdesc = A fancy self-hosted monitoring tool
|
||||||
|
pkgver = 2.0.0
|
||||||
|
pkgrel = 1
|
||||||
|
url = https://github.com/louislam/uptime-kuma
|
||||||
|
arch = any
|
||||||
|
license = MIT
|
||||||
|
makedepends = npm
|
||||||
|
depends = nodejs
|
||||||
|
noextract = uptime-kuma-beta-2.0.0-beta.1.tar.gz
|
||||||
|
source = uptime-kuma-beta-2.0.0-beta.1.tar.gz::https://github.com/louislam/uptime-kuma/archive/refs/tags/2.0.0-beta.1.tar.gz
|
||||||
|
source = uptime-kuma-beta-dist-2.0.0-beta.1.tar.gz::https://github.com/louislam/uptime-kuma/releases/download/2.0.0-beta.1/dist.tar.gz
|
||||||
|
source = uptime-kuma.service
|
||||||
|
b2sums = 6e9add8620f7a8ac9576271f53c512b78bdbcc35a4ea54eb3ffd31ba2da1d7032722eba4eec82627703a9637f6c3176141130c70774b1051358911d4513bcf0e
|
||||||
|
b2sums = 8c88cd9d35aca5b5d1545339b11c452ba3b442e40de26d56946dca8fa4e6b146c74b4cc1fdfa9532bfbec7d40e9880219a419248e4a91ae82436c94160004406
|
||||||
|
b2sums = dbeac93f20082847cffc991224df2ac85963a03a02898b06b8444d4f33b2f4a51323bdcd2c940df41d1c8beed1e2b75fa449cff7d80dd9d5213f627bbe409f90
|
||||||
|
|
||||||
|
pkgname = uptime-kuma-beta
|
31
uptime-kuma-beta/PKGBUILD
Normal file
31
uptime-kuma-beta/PKGBUILD
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# Maintainer: Lain Iwakura <lain@serialexperiments.club>
|
||||||
|
# Contributor: bgh <aur at bgh dot io>
|
||||||
|
|
||||||
|
pkgname=uptime-kuma-beta
|
||||||
|
pkgver=2.0.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='A fancy self-hosted monitoring tool'
|
||||||
|
|
||||||
|
arch=('any')
|
||||||
|
url="https://github.com/louislam/${pkgname/-beta}"
|
||||||
|
license=('MIT')
|
||||||
|
depends=('nodejs')
|
||||||
|
makedepends=('npm')
|
||||||
|
|
||||||
|
source=(
|
||||||
|
"${pkgname}-${pkgver}-beta.1.tar.gz::${url}/archive/refs/tags/${pkgver}-beta.1.tar.gz"
|
||||||
|
"${pkgname}-dist-${pkgver}-beta.1.tar.gz::${url}/releases/download/${pkgver}-beta.1/dist.tar.gz"
|
||||||
|
"uptime-kuma.service"
|
||||||
|
)
|
||||||
|
noextract=("${pkgname}-${pkgver}-beta.1.tar.gz")
|
||||||
|
|
||||||
|
b2sums=('6e9add8620f7a8ac9576271f53c512b78bdbcc35a4ea54eb3ffd31ba2da1d7032722eba4eec82627703a9637f6c3176141130c70774b1051358911d4513bcf0e'
|
||||||
|
'8c88cd9d35aca5b5d1545339b11c452ba3b442e40de26d56946dca8fa4e6b146c74b4cc1fdfa9532bfbec7d40e9880219a419248e4a91ae82436c94160004406'
|
||||||
|
'dbeac93f20082847cffc991224df2ac85963a03a02898b06b8444d4f33b2f4a51323bdcd2c940df41d1c8beed1e2b75fa449cff7d80dd9d5213f627bbe409f90')
|
||||||
|
|
||||||
|
package() {
|
||||||
|
npm install --global --prefix "$pkgdir"/usr "$srcdir"/$pkgname-${pkgver}-beta.1.tar.gz --cache npm-cache
|
||||||
|
|
||||||
|
cp --recursive "$srcdir"/dist "$pkgdir"/usr/lib/node_modules/$pkgname/
|
||||||
|
install -D -m 644 "${srcdir}/uptime-kuma.service" ${pkgdir}/usr/lib/systemd/system/uptime-kuma.service
|
||||||
|
}
|
13
uptime-kuma-beta/uptime-kuma.service
Normal file
13
uptime-kuma-beta/uptime-kuma.service
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Uptime-Kuma - A free and open source uptime monitoring solution
|
||||||
|
Documentation=https://github.com/louislam/uptime-kuma
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/usr/lib/node_modules/uptime-kuma/
|
||||||
|
ExecStart=/usr/bin/node server/server.js
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Add table
Reference in a new issue