~sircmpwn/sr.ht-packages

sr.ht-apkbuilds: *.sr.ht: Enable prometheus multiprocessing mode v3 APPLIED

Ignas Kiela: 1
 *.sr.ht: Enable prometheus multiprocessing mode

 40 files changed, 280 insertions(+), 67 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/sr.ht-packages/patches/27171/mbox | git am -3
Learn more about email & git

[PATCH sr.ht-apkbuilds v3] *.sr.ht: Enable prometheus multiprocessing mode Export this patch

---
I intended to fix the OpenRC issue before submitting, but when I recently had
time to look into it, I realized that I can't really understand how the code
is currently written, so I decided to not hold up this patch on that, since a
workaround would be needed either way. I do still intend to fix the bug in
OpenRC, but I need to get a bit more knowledgeable with C to do that.

 sr.ht/builds.sr.ht/APKBUILD                     | 16 ++++++++++------
 sr.ht/builds.sr.ht/builds.sr.ht.confd           |  3 +++
 .../builds.sr.ht/builds.sr.ht.gunicorn.conf.py  |  5 +++++
 sr.ht/builds.sr.ht/builds.sr.ht.initd           | 12 ++++++++++--
 sr.ht/dispatch.sr.ht/APKBUILD                   | 17 ++++++++++++-----
 sr.ht/dispatch.sr.ht/dispatch.sr.ht.confd       |  3 +++
 .../dispatch.sr.ht.gunicorn.conf.py             |  5 +++++
 sr.ht/dispatch.sr.ht/dispatch.sr.ht.initd       | 12 ++++++++++--
 sr.ht/git.sr.ht/APKBUILD                        | 14 +++++++++-----
 sr.ht/git.sr.ht/git.sr.ht.confd                 |  3 +++
 sr.ht/git.sr.ht/git.sr.ht.gunicorn.conf.py      |  5 +++++
 sr.ht/git.sr.ht/git.sr.ht.initd                 | 12 ++++++++++--
 sr.ht/hg.sr.ht/APKBUILD                         | 14 +++++++++-----
 sr.ht/hg.sr.ht/hg.sr.ht.confd                   |  3 +++
 sr.ht/hg.sr.ht/hg.sr.ht.gunicorn.conf.py        |  5 +++++
 sr.ht/hg.sr.ht/hg.sr.ht.initd                   | 12 ++++++++++--
 sr.ht/hub.sr.ht/APKBUILD                        | 14 +++++++++-----
 sr.ht/hub.sr.ht/hub.sr.ht.confd                 |  3 +++
 sr.ht/hub.sr.ht/hub.sr.ht.gunicorn.conf.py      |  5 +++++
 sr.ht/hub.sr.ht/hub.sr.ht.initd                 | 12 ++++++++++--
 sr.ht/lists.sr.ht/APKBUILD                      | 14 +++++++++-----
 sr.ht/lists.sr.ht/lists.sr.ht.confd             |  3 +++
 sr.ht/lists.sr.ht/lists.sr.ht.gunicorn.conf.py  |  5 +++++
 sr.ht/lists.sr.ht/lists.sr.ht.initd             | 12 ++++++++++--
 sr.ht/man.sr.ht/APKBUILD                        | 14 +++++++++-----
 sr.ht/man.sr.ht/man.sr.ht.confd                 |  3 +++
 sr.ht/man.sr.ht/man.sr.ht.gunicorn.conf.py      |  5 +++++
 sr.ht/man.sr.ht/man.sr.ht.initd                 | 12 ++++++++++--
 sr.ht/meta.sr.ht/APKBUILD                       | 14 +++++++++-----
 sr.ht/meta.sr.ht/meta.sr.ht.confd               |  3 +++
 sr.ht/meta.sr.ht/meta.sr.ht.gunicorn.conf.py    |  5 +++++
 sr.ht/meta.sr.ht/meta.sr.ht.initd               | 12 ++++++++++--
 sr.ht/paste.sr.ht/APKBUILD                      | 16 +++++++++++++++-
 sr.ht/paste.sr.ht/paste.sr.ht.confd             |  3 +++
 sr.ht/paste.sr.ht/paste.sr.ht.gunicorn.conf.py  |  5 +++++
 sr.ht/paste.sr.ht/paste.sr.ht.initd             | 12 ++++++++++--
 sr.ht/todo.sr.ht/APKBUILD                       | 14 +++++++++-----
 sr.ht/todo.sr.ht/todo.sr.ht.confd               |  3 +++
 sr.ht/todo.sr.ht/todo.sr.ht.gunicorn.conf.py    |  5 +++++
 sr.ht/todo.sr.ht/todo.sr.ht.initd               | 12 ++++++++++--
 40 files changed, 280 insertions(+), 67 deletions(-)
 mode change 100644 => 100755 sr.ht/builds.sr.ht/APKBUILD
 create mode 100644 sr.ht/builds.sr.ht/builds.sr.ht.gunicorn.conf.py
 create mode 100644 sr.ht/dispatch.sr.ht/dispatch.sr.ht.gunicorn.conf.py
 create mode 100644 sr.ht/git.sr.ht/git.sr.ht.gunicorn.conf.py
 create mode 100644 sr.ht/hg.sr.ht/hg.sr.ht.gunicorn.conf.py
 create mode 100644 sr.ht/hub.sr.ht/hub.sr.ht.gunicorn.conf.py
 create mode 100644 sr.ht/lists.sr.ht/lists.sr.ht.gunicorn.conf.py
 create mode 100644 sr.ht/man.sr.ht/man.sr.ht.gunicorn.conf.py
 create mode 100644 sr.ht/meta.sr.ht/meta.sr.ht.gunicorn.conf.py
 create mode 100644 sr.ht/paste.sr.ht/paste.sr.ht.gunicorn.conf.py
 create mode 100644 sr.ht/todo.sr.ht/todo.sr.ht.gunicorn.conf.py

diff --git a/sr.ht/builds.sr.ht/APKBUILD b/sr.ht/builds.sr.ht/APKBUILD
old mode 100644
new mode 100755
index 417b795..7b2e629
--- a/sr.ht/builds.sr.ht/APKBUILD
+++ b/sr.ht/builds.sr.ht/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=builds.sr.ht
pkgver=0.70.12
pkgver=0.74.10
pkgrel=0
pkgdesc="sr.ht build service"
url="https://git.sr.ht/~sircmpwn/builds.sr.ht"
@@ -32,6 +32,7 @@ source="
	builds.sr.ht-api.initd
	builds.sr.ht-worker.confd
	builds.sr.ht-worker.initd
	builds.sr.ht.gunicorn.conf.py
"
install="$pkgname.pre-install $pkgname.post-upgrade"
builddir="$srcdir/$pkgname-$pkgver"
@@ -58,6 +59,8 @@ package() {
		"$pkgdir"/etc/init.d/builds.sr.ht-api
	install -Dm644 "$srcdir"/builds.sr.ht-api.confd \
		"$pkgdir"/etc/conf.d/builds.sr.ht-api
	install -Dm644 "$srcdir"/builds.sr.ht.gunicorn.conf.py \
		"$pkgdir"/etc/sr.ht/builds.sr.ht.gunicorn.conf.py
}

_images() {
@@ -87,12 +90,13 @@ _nginx() {
}

sha512sums="
886f7b530c77bd965e9752cec6507045a9867d3292d39ddd82cf37e7c971898415c3ddbde09e9630ae268f97728e8bdd818859cd09aec49d469680693eab14cf  builds.sr.ht-0.70.12.tar.gz
4bc2435c8f67e44d3fdfa9ce2d1f15fbd0a45f066204e56fd5466084b78d12c2a88479d46bfffd185abe1d3a0302a46ce5e73d5e4da239e57707385e63e70b41  sr.ht-nginx-0.70.12.tar.gz
0e3ede63309393e15e5b4ecd7d9c511ca2ecc6b99b50bac34c876a3261975b723a45643405aeb0c3b2533f879e854c1f2f3c6d152137611ea3fea72b9d52a045  builds.sr.ht.confd
8efe408c19e088f83ad318d9c5388db1f54956acfd2a7daf75c0728acd40b26244eaea20c74a6f704018e2856831bc931c6646ca2f7842342763070ecc808033  builds.sr.ht.initd
668ea5cda4ff65b6c3de87dffe993dd33232ae7ace0f45630410c991cd54038e82f8088bb039db5360125a87b650af47e9e5491ded0148bc067fc2a1c7b7e695  builds.sr.ht-0.74.10.tar.gz
917bbc9a493f6aa756af3f3597f9edf2e25227efe30f6ab635f99a7d9f4ecd6e9f36a7f2b9b40cc95b6e584dd62e1a0badb46e4ff9d3c3d5ce959455b15a95b6  sr.ht-nginx-0.74.10.tar.gz
d205043f3fe0dc022d25f8714ad5fb095a7dc92a10fe4eb4a1c6d6a500b54692773c1e314e9337a320f9b6043225a9a5a9e50d9a5dc30e7c80305b7ad538ea0f  builds.sr.ht.confd
ea8b25d92e53d62bff2466d048d9a34482d9d06a2d6bdb828ce9d036009cdb2ca7435c288f79b51860539399acdb3c27eda268e8ec7a7fcfa2969961959b2d0e  builds.sr.ht.initd
a507ea33f4e87d41d68b42f816914d357ff687e249e424f2278e3c44e980774080377ca5daa02212776095402ba7e271355d427750270005cf6f6db079040a08  builds.sr.ht-api.confd
e48c2c1ab073a2e8c900bea336004be6f792c5151dc3af4ea3625fd403959b6959d816acfbd8e3f0faae35ed10626c64616fad701bf5212b0c198b554483721d  builds.sr.ht-api.initd
5aa18804ddfee263763b035780679b98cf4877de193c254f24fab7ce56f304556af9a377bfca36635c21b4380892e8d458a420021919934080cc43feda1694c4  builds.sr.ht-worker.confd
8d0a501e76ef704c5eab78dc2cf609b2d033ceeff4f86f36a4b6d27dee9586f7fc855055500626449d57cd9c1fd833ab450b2639b6a85212d0eaf2b4a52bb0a5  builds.sr.ht-worker.initd
074627ee36977e9ded111fa746afab36719065d3eb063b212fefd2371f59cb88a12067ca66951b014dab0d6668c682e3fbd18c7b3cf430e432490aca8e0f1ed4  builds.sr.ht-worker.initd
21f39ea0981d7773eb512e5ba234022364d0f7ee9b6ca897ce4c51e3b127eb2d9a7a5fbcaa06d14f20b2df2439421d7261f200e3f4f13b45a91e78ba77bc363c  builds.sr.ht.gunicorn.conf.py
"
diff --git a/sr.ht/builds.sr.ht/builds.sr.ht.confd b/sr.ht/builds.sr.ht/builds.sr.ht.confd
index f55e7d9..cf80f7e 100644
--- a/sr.ht/builds.sr.ht/builds.sr.ht.confd
+++ b/sr.ht/builds.sr.ht/builds.sr.ht.confd
@@ -4,5 +4,8 @@
# Bind the web service to this address:
# BUILDS_BIND=127.0.0.1:5002

# Gunicorn configuration file
# BUILDS_GUNICORN_CONF=/etc/sr.ht/builds.sr.ht.gunicorn.conf.py

# Extra arguments to pass to Gunicorn
# BUILDS_ARGS=
diff --git a/sr.ht/builds.sr.ht/builds.sr.ht.gunicorn.conf.py b/sr.ht/builds.sr.ht/builds.sr.ht.gunicorn.conf.py
new file mode 100644
index 0000000..aa3e7ae
--- /dev/null
+++ b/sr.ht/builds.sr.ht/builds.sr.ht.gunicorn.conf.py
@@ -0,0 +1,5 @@
from prometheus_client import multiprocess


def child_exit(server, worker):
    multiprocess.mark_process_dead(worker.pid)
diff --git a/sr.ht/builds.sr.ht/builds.sr.ht.initd b/sr.ht/builds.sr.ht/builds.sr.ht.initd
index 9cac9f0..51c99d7 100755
--- a/sr.ht/builds.sr.ht/builds.sr.ht.initd
+++ b/sr.ht/builds.sr.ht/builds.sr.ht.initd
@@ -4,11 +4,13 @@ description="builds.sr.ht service"
supervisor=supervise-daemon
BUILDS_USER=${BUILDS_USER:-builds}
BUILDS_BIND=${BUILDS_BIND:-127.0.0.1:5002}
BUILDS_GUNICORN_CONF=${BUILDS_GUNICORN_CONF:-/etc/sr.ht/builds.sr.ht.gunicorn.conf.py}
BUILDS_ARGS=${BUILDS_ARGS:-}
LOGS=/var/log/builds.sr.ht.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
prometheus_multiproc_dir=/run/builds.sr.ht
supervise_daemon_args="-1 $LOGS -2 $LOGS -e prometheus_multiproc_dir=$prometheus_multiproc_dir"
command="/usr/bin/gunicorn"
command_args="buildsrht.app:app -b $BUILDS_BIND $BUILDS_ARGS"
command_args="buildsrht.app:app -b $BUILDS_BIND -c $BUILDS_GUNICORN_CONF $BUILDS_ARGS"
command_user="$BUILDS_USER:$BUILDS_USER"
pidfile="/run/${RC_SVCNAME}.pid"

@@ -21,4 +23,10 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$BUILDS_USER:$BUILDS_USER"
	# Workaround for https://github.com/OpenRC/openrc/issues/335
	if [ -n "$prometheus_multiproc_dir" ]
	then
		checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$BUILDS_USER:$BUILDS_USER"
		rm -rf "$prometheus_multiproc_dir"/*
	fi
}
diff --git a/sr.ht/dispatch.sr.ht/APKBUILD b/sr.ht/dispatch.sr.ht/APKBUILD
index 360bf7d..477f3b2 100644
--- a/sr.ht/dispatch.sr.ht/APKBUILD
+++ b/sr.ht/dispatch.sr.ht/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=dispatch.sr.ht
pkgver=0.15.8
pkgver=0.15.33
pkgrel=0
pkgdesc="sr.ht dispatch service"
url="https://git.sr.ht/~sircmpwn/dispatch.sr.ht"
@@ -19,6 +19,7 @@ source="
	sr.ht-nginx-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/sr.ht-nginx/archive/master.tar.gz
	dispatch.sr.ht.confd
	dispatch.sr.ht.initd
	dispatch.sr.ht.gunicorn.conf.py
"
builddir="$srcdir/$pkgname-$pkgver"
export PKGVER=$pkgver
@@ -35,6 +36,9 @@ package() {
		"$pkgdir"/etc/init.d/dispatch.sr.ht
	install -Dm644 "$srcdir"/dispatch.sr.ht.confd \
		"$pkgdir"/etc/conf.d/dispatch.sr.ht
	install -Dm644 "$srcdir"/dispatch.sr.ht.gunicorn.conf.py \
		"$pkgdir"/etc/sr.ht/dispatch.sr.ht.gunicorn.conf.py

}

_nginx() {
@@ -44,7 +48,10 @@ _nginx() {
		"$subpkgdir"/etc/nginx/http.d/dispatch.sr.ht.conf
}

sha512sums="3567d1828193b72785e99493d1e9846917a5a4e27cb66d366d0536c7cbdc61d25e6b6156d78ee2c2899174e197236eb149dfb81a4b95d50f8083d3329217a75f  dispatch.sr.ht-0.15.8.tar.gz
0b2b6b2916799e20d05d6e35fdb20ac0cded65e254beb79a3aa91d4faa20fe6c93bd3e178acb2d2966841a7ce4f0149b0a863db1d57a36407ff85833779d3959  sr.ht-nginx-0.15.8.tar.gz
2cb15282905d56d6b17f5aed032b15d98da64c9ec315db4650e0729398a9ea4d9704a57e3b7f55e1c5381914f7fe5e85b58e4e88e9e68fcab89ef1763e377278  dispatch.sr.ht.confd
9e96f369c042faba2130e20861e3f6e458c0d986961bff284040f76832012c488836aef870e4e7ba238f8443659953a0edfc0f1c10878ca73d27fe3756766955  dispatch.sr.ht.initd"
sha512sums="
b581922de780139a313aa0fe2250aaa8710b33660f58195e8238b88c98437703bc622638563e8142b726dc16e920c9396959a94a6166d723726ed357b116ab6c  dispatch.sr.ht-0.15.33.tar.gz
917bbc9a493f6aa756af3f3597f9edf2e25227efe30f6ab635f99a7d9f4ecd6e9f36a7f2b9b40cc95b6e584dd62e1a0badb46e4ff9d3c3d5ce959455b15a95b6  sr.ht-nginx-0.15.33.tar.gz
ea2cea43b8d48fedd50117eec8166635e927fe13a1b7cd4ff27e79c0b428b9a276dbe9ebcde5ce2c08ec8a6da75bf1d0d1b820456ac7003ecc8afafd4fcb2faf  dispatch.sr.ht.confd
94df16f5ba6d1017fd9f890548773d931a556c18432b98f4bd7f40ffc198ffccee72372b760720ba2edb0fea926d2d700fd0c8f23ff860fe47c1b9e6793cd047  dispatch.sr.ht.initd
21f39ea0981d7773eb512e5ba234022364d0f7ee9b6ca897ce4c51e3b127eb2d9a7a5fbcaa06d14f20b2df2439421d7261f200e3f4f13b45a91e78ba77bc363c  dispatch.sr.ht.gunicorn.conf.py
"
diff --git a/sr.ht/dispatch.sr.ht/dispatch.sr.ht.confd b/sr.ht/dispatch.sr.ht/dispatch.sr.ht.confd
index 38b98a6..c55080a 100644
--- a/sr.ht/dispatch.sr.ht/dispatch.sr.ht.confd
+++ b/sr.ht/dispatch.sr.ht/dispatch.sr.ht.confd
@@ -4,5 +4,8 @@
# Bind the web service to this address:
# DISPATCH_BIND=127.0.0.1:5005

# Gunicorn configuration file
# DISPATCH_GUNICORN_CONF=/etc/sr.ht/dispatch.sr.ht.gunicorn.conf.py

# Extra arguments to pass to Gunicorn
# DISPATCH_ARGS=
diff --git a/sr.ht/dispatch.sr.ht/dispatch.sr.ht.gunicorn.conf.py b/sr.ht/dispatch.sr.ht/dispatch.sr.ht.gunicorn.conf.py
new file mode 100644
index 0000000..aa3e7ae
--- /dev/null
+++ b/sr.ht/dispatch.sr.ht/dispatch.sr.ht.gunicorn.conf.py
@@ -0,0 +1,5 @@
from prometheus_client import multiprocess


def child_exit(server, worker):
    multiprocess.mark_process_dead(worker.pid)
diff --git a/sr.ht/dispatch.sr.ht/dispatch.sr.ht.initd b/sr.ht/dispatch.sr.ht/dispatch.sr.ht.initd
index 018b519..206c774 100644
--- a/sr.ht/dispatch.sr.ht/dispatch.sr.ht.initd
+++ b/sr.ht/dispatch.sr.ht/dispatch.sr.ht.initd
@@ -4,11 +4,13 @@ description="dispatch.sr.ht service"
supervisor=supervise-daemon
DISPATCH_USER=${DISPATCH_USER:-dispatch}
DISPATCH_BIND=${DISPATCH_BIND:-127.0.0.1:5005}
DISPATCH_GUNICORN_CONF=${DISPATCH_GUNICORN_CONF:-/etc/sr.ht/dispatch.sr.ht.gunicorn.conf.py}
DISPATCH_ARGS=${DISPATCH_ARGS:-}
LOGS=/var/log/dispatch.sr.ht.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
prometheus_multiproc_dir=/run/dispatch.sr.ht
supervise_daemon_args="-1 $LOGS -2 $LOGS -e prometheus_multiproc_dir=$prometheus_multiproc_dir"
command="/usr/bin/gunicorn"
command_args="dispatchsrht.app:app -b $DISPATCH_BIND $DISPATCH_ARGS"
command_args="dispatchsrht.app:app -b $DISPATCH_BIND -c $DISPATCH_GUNICORN_CONF $DISPATCH_ARGS"
command_user="$DISPATCH_USER:$DISPATCH_USER"
pidfile="/run/${RC_SVCNAME}.pid"

@@ -21,4 +23,10 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$DISPATCH_USER:$DISPATCH_USER"
	# Workaround for https://github.com/OpenRC/openrc/issues/335
	if [ -n "$prometheus_multiproc_dir" ]
	then
		checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$DISPATCH_USER:$DISPATCH_USER"
		rm -rf "$prometheus_multiproc_dir"/*
	fi
}
diff --git a/sr.ht/git.sr.ht/APKBUILD b/sr.ht/git.sr.ht/APKBUILD
index 9340527..debb778 100644
--- a/sr.ht/git.sr.ht/APKBUILD
+++ b/sr.ht/git.sr.ht/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=git.sr.ht
pkgver=0.72.43
pkgver=0.75.1
pkgrel=0
pkgdesc="sr.ht git service"
url="https://git.sr.ht/~sircmpwn/git.sr.ht"
@@ -24,6 +24,7 @@ source="
	git.sr.ht-api.confd
	git.sr.ht-webhooks.initd
	git.sr.ht-webhooks.confd
	git.sr.ht.gunicorn.conf.py
"
export PKGVER=$pkgver
options="$options !check"
@@ -58,6 +59,8 @@ package() {
		"$pkgdir"/etc/init.d/git.sr.ht-webhooks
	install -Dm644 "$srcdir"/git.sr.ht-webhooks.confd \
		"$pkgdir"/etc/conf.d/git.sr.ht-webhooks
	install -Dm644 "$srcdir"/git.sr.ht.gunicorn.conf.py \
		"$pkgdir"/etc/sr.ht/git.sr.ht.gunicorn.conf.py

	cd gitsrht-dispatch
	install -Dm755 gitsrht-dispatch "$pkgdir"/usr/bin/gitsrht-dispatch
@@ -79,12 +82,13 @@ _nginx() {
}

sha512sums="
f59afc403a07d614f0bac4a4c5bc96ef74e572946762499395d4511a1fd4770fee9c66f37cbd0579516334cd6e21f1216dec93a7b2c1d94c2f6e60066d0b42ec  git.sr.ht-0.72.43.tar.gz
4bc2435c8f67e44d3fdfa9ce2d1f15fbd0a45f066204e56fd5466084b78d12c2a88479d46bfffd185abe1d3a0302a46ce5e73d5e4da239e57707385e63e70b41  sr.ht-nginx-0.72.43.tar.gz
3debc75949507607a8572c2164b3785388cac46419a8d12cea5dc060a5effcb89913f6a873975dde732ea0749e899542055196979c44cb2d68ba226b96f1fd6c  git.sr.ht.initd
721b0f736c28ece353707ae317a71f2cbf20b02e08f4a3d481a05bf798de4af4d1b7ad2c0fd774581e1c04f2771e139be9f784edc7d433e3a5aecfb7e9a56c78  git.sr.ht.confd
bef609483179a366cd4d467b07f8b4419a11a1c49d32beafc30245bf9cdab4ef65960cb462f7a47b43a1976186dac43d755395d1fe4c0e008541e51a0b5c8795  git.sr.ht-0.75.1.tar.gz
917bbc9a493f6aa756af3f3597f9edf2e25227efe30f6ab635f99a7d9f4ecd6e9f36a7f2b9b40cc95b6e584dd62e1a0badb46e4ff9d3c3d5ce959455b15a95b6  sr.ht-nginx-0.75.1.tar.gz
bab6312b5a6d1bd9808cb6eae2b33f1fc4f544ac286ce9a67f4c07fc8d4679dc81d93f3d1ec7f8adad3dedead9203b5d10ab63aff478fb11780790e7a01a232a  git.sr.ht.initd
7462f15928aa24b10e63041b0021aa5a69fa92d071f497d6b1dc353dac3bff30818cb560c6011effbd619d450e8b8c6f8f3ab07a1df9714ea79b00e4d12dcf44  git.sr.ht.confd
370a9f710704d7dfe88632f0ae2b7d2b406621322cab1f87f4f4c3984c741fba616f9c2a806d83e79250dc58aba89161a2db8ca424794dbd2cacbffb6e1a9adb  git.sr.ht-api.initd
938a8aefdea3e4c6a9b15ac1c10d789282443c5b6cd1fee662d86af261cf69d8b67435f3bcececcd64544bd147addbd2792fcdbf67b9a36975e0e5e00f337719  git.sr.ht-api.confd
4038c7375d50ab393d076d31d776e82a2fcd54d6edcd55eb864fcc8d7254646799b4ee05a2e1f75f3a79e660e802a0fa05d9e34c16870aebe33dbf8191ed386a  git.sr.ht-webhooks.initd
acd385323da772e1163b690eafca3b3a59e13bf236bb279c08a383a9ab2b356b4f1b7dce18f235882ba79c8ac35a6fa7594aad260962b38f7df70886e4fcace5  git.sr.ht-webhooks.confd
21f39ea0981d7773eb512e5ba234022364d0f7ee9b6ca897ce4c51e3b127eb2d9a7a5fbcaa06d14f20b2df2439421d7261f200e3f4f13b45a91e78ba77bc363c  git.sr.ht.gunicorn.conf.py
"
diff --git a/sr.ht/git.sr.ht/git.sr.ht.confd b/sr.ht/git.sr.ht/git.sr.ht.confd
index 6389681..966e2eb 100644
--- a/sr.ht/git.sr.ht/git.sr.ht.confd
+++ b/sr.ht/git.sr.ht/git.sr.ht.confd
@@ -4,5 +4,8 @@
# Bind the web service to this address:
# GIT_BIND=127.0.0.1:5001

# Gunicorn configuration file
# GIT_GUNICORN_CONF=/etc/sr.ht/git.sr.ht.gunicorn.conf.py

# Extra arguments to pass to Gunicorn
# GIT_ARGS=
diff --git a/sr.ht/git.sr.ht/git.sr.ht.gunicorn.conf.py b/sr.ht/git.sr.ht/git.sr.ht.gunicorn.conf.py
new file mode 100644
index 0000000..aa3e7ae
--- /dev/null
+++ b/sr.ht/git.sr.ht/git.sr.ht.gunicorn.conf.py
@@ -0,0 +1,5 @@
from prometheus_client import multiprocess


def child_exit(server, worker):
    multiprocess.mark_process_dead(worker.pid)
diff --git a/sr.ht/git.sr.ht/git.sr.ht.initd b/sr.ht/git.sr.ht/git.sr.ht.initd
index 158c23f..090fbb8 100755
--- a/sr.ht/git.sr.ht/git.sr.ht.initd
+++ b/sr.ht/git.sr.ht/git.sr.ht.initd
@@ -4,11 +4,13 @@ description="git.sr.ht service"
supervisor=supervise-daemon
GIT_USER=${GIT_USER:-git}
GIT_BIND=${GIT_BIND:-127.0.0.1:5001}
GIT_GUNICORN_CONF=${GIT_GUNICORN_CONF:-/etc/sr.ht/git.sr.ht.gunicorn.conf.py}
GIT_ARGS=${GIT_ARGS:-}
LOGS=/var/log/git.sr.ht.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
prometheus_multiproc_dir=/run/git.sr.ht
supervise_daemon_args="-1 $LOGS -2 $LOGS -e prometheus_multiproc_dir=$prometheus_multiproc_dir"
command="/usr/bin/gunicorn"
command_args="gitsrht.app:app -b $GIT_BIND $GIT_ARGS"
command_args="gitsrht.app:app -b $GIT_BIND  -c $GIT_GUNICORN_CONF $GIT_ARGS"
command_user="$GIT_USER:$GIT_USER"
pidfile="/run/${RC_SVCNAME}.pid"

@@ -21,4 +23,10 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$GIT_USER:$GIT_USER"
	# Workaround for https://github.com/OpenRC/openrc/issues/335
	if [ -n "$prometheus_multiproc_dir" ]
	then
		checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$GIT_USER:$GIT_USER"
		rm -rf "$prometheus_multiproc_dir"/*
	fi
}
diff --git a/sr.ht/hg.sr.ht/APKBUILD b/sr.ht/hg.sr.ht/APKBUILD
index f1d49f3..2e65d20 100644
--- a/sr.ht/hg.sr.ht/APKBUILD
+++ b/sr.ht/hg.sr.ht/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=hg.sr.ht
pkgver=0.28.0
pkgver=0.29.1
pkgrel=0
pkgdesc="sr.ht mercurial service"
url="https://hg.sr.ht/~sircmpwn/hg.sr.ht"
@@ -24,6 +24,7 @@ source="
	hg.sr.ht-api.confd
	hg.sr.ht-webhooks.initd
	hg.sr.ht-webhooks.confd
	hg.sr.ht.gunicorn.conf.py
"
export PKGVER=$pkgver
options="$options !check"
@@ -52,6 +53,8 @@ package() {
		"$pkgdir"/etc/init.d/hg.sr.ht-webhooks
	install -Dm644 "$srcdir"/hg.sr.ht-webhooks.confd \
		"$pkgdir"/etc/conf.d/hg.sr.ht-webhooks
	install -Dm644 "$srcdir"/hg.sr.ht.gunicorn.conf.py \
		"$pkgdir"/etc/sr.ht/hg.sr.ht.gunicorn.conf.py
	cd hgsrht-keys
	install -Dm755 hgsrht-keys "$pkgdir"/usr/bin/hgsrht-keys
	cd ../api
@@ -69,12 +72,13 @@ _nginx() {
}

sha512sums="
a6912e14a41864b94c13505f2dbc96db39d44e6af364340edfd96a899b29ee8692087078236a70a3e1aa1b06da13a7e1de7988ee37e1a695aefc9152bc930c3f  hg.sr.ht-0.28.0.tar.gz
31450f1505aa269be6c24e99b971038ee63d74ffced70affa90fe539a03e07ab490f5a5b89b1eab35ca196508919c71710e10b8628c0ef977d46612d047e1bb9  sr.ht-nginx-0.28.0.tar.gz
38923f14ca3cedf4004447ef5ab75d5699a858efdc22866f1da10a82c3a938227c03380b84fae719b84b4751f03fec55be922d950a155e09c7e8e41ff71b3c6b  hg.sr.ht.initd
2c3f1776f8bb6bb42f0d240b28561d0bfb1b4638cad169cd5162f9c227028d0d256fd510f8a47c9c0ec111d11e9f54c293fef6c3e3d99d925dcd170294f44472  hg.sr.ht.confd
7eb9113ee4abc636e73d4d9fdf6730b5fe930c552e43fb35f6ba5a9050674916fee8f4793d3bb171885bd4dcfd21ac2cd33287cb175843463c7c5035ad3b2069  hg.sr.ht-0.29.1.tar.gz
917bbc9a493f6aa756af3f3597f9edf2e25227efe30f6ab635f99a7d9f4ecd6e9f36a7f2b9b40cc95b6e584dd62e1a0badb46e4ff9d3c3d5ce959455b15a95b6  sr.ht-nginx-0.29.1.tar.gz
f2055a52508d85b069facae34a102a8d7597b69d4905f1c73350677d0653e53569fe689e823fbe556f686f373df6e86608a78194f4d00daf7678b3e82a80a092  hg.sr.ht.initd
867dc537ea53099a2ab4dbc8c400012ca24053d9226281322c103944faa3b66a7986c325c860718882a4b28b986a2208f9a9b40f37a2d54c19be46ebe3902a82  hg.sr.ht.confd
379d3eca6754aa2fc7526f8ea937061b53f322ebac71635455d6ff056baaf5d61709c43cfdce182e774f8fd0c0b09f02d1ccbebeac6cbfdc07652fcf734d0c42  hg.sr.ht-api.initd
eaed280fc25b88294c5d02893e72b8751afc1db0db3e5f20123239ca28ae6f3e53b22c11992e44a4f8b4943f6326da0ed03ad0bd0a900d10efcb507d35b1b64f  hg.sr.ht-api.confd
93f25762da77462c8167ae53ba37ab4f9982c7f3c2d03dde445f0578758b808987c4781912a0fa5b4a4e25ba50c9d27477dfea8e319908ddc124dc836aefd2d6  hg.sr.ht-webhooks.initd
af5bb605d8ba2e848de5755c9c7f1607591068f6ac79ddc1d312873e92218c6b535eb4cbcf10590656239459b7808ba5469d52d32f80e8e2448fc18c22f7a70c  hg.sr.ht-webhooks.confd
21f39ea0981d7773eb512e5ba234022364d0f7ee9b6ca897ce4c51e3b127eb2d9a7a5fbcaa06d14f20b2df2439421d7261f200e3f4f13b45a91e78ba77bc363c  hg.sr.ht.gunicorn.conf.py
"
diff --git a/sr.ht/hg.sr.ht/hg.sr.ht.confd b/sr.ht/hg.sr.ht/hg.sr.ht.confd
index 85f57d2..f30338d 100644
--- a/sr.ht/hg.sr.ht/hg.sr.ht.confd
+++ b/sr.ht/hg.sr.ht/hg.sr.ht.confd
@@ -4,5 +4,8 @@
# Bind the web service to this address:
# HG_BIND=127.0.0.1:5010

# Gunicorn configuration file
# HG_GUNICORN_CONF=/etc/sr.ht/hg.sr.ht.gunicorn.conf.py

# Extra arguments to pass to Gunicorn
# HG_ARGS=
diff --git a/sr.ht/hg.sr.ht/hg.sr.ht.gunicorn.conf.py b/sr.ht/hg.sr.ht/hg.sr.ht.gunicorn.conf.py
new file mode 100644
index 0000000..aa3e7ae
--- /dev/null
+++ b/sr.ht/hg.sr.ht/hg.sr.ht.gunicorn.conf.py
@@ -0,0 +1,5 @@
from prometheus_client import multiprocess


def child_exit(server, worker):
    multiprocess.mark_process_dead(worker.pid)
diff --git a/sr.ht/hg.sr.ht/hg.sr.ht.initd b/sr.ht/hg.sr.ht/hg.sr.ht.initd
index 5c96b9d..f15a610 100755
--- a/sr.ht/hg.sr.ht/hg.sr.ht.initd
+++ b/sr.ht/hg.sr.ht/hg.sr.ht.initd
@@ -4,11 +4,13 @@ description="hg.sr.ht service"
supervisor=supervise-daemon
HG_USER=${HG_USER:-hg}
HG_BIND=${HG_BIND:-127.0.0.1:5010}
HG_GUNICORN_CONF=${HG_GUNICORN_CONF:-/etc/sr.ht/hg.sr.ht.gunicorn.conf.py}
HG_ARGS=${HG_ARGS:-}
LOGS=/var/log/hg.sr.ht.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
prometheus_multiproc_dir=/run/hg.sr.ht
supervise_daemon_args="-1 $LOGS -2 $LOGS -e prometheus_multiproc_dir=$prometheus_multiproc_dir"
command="/usr/bin/gunicorn"
command_args="hgsrht.app:app -b $HG_BIND $HG_ARGS"
command_args="hgsrht.app:app -b $HG_BIND -c $HG_GUNICORN_CONF $HG_ARGS"
command_user="$HG_USER:$HG_USER"
pidfile="/run/${RC_SVCNAME}.pid"

@@ -21,4 +23,10 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$HG_USER:$HG_USER"
	# Workaround for https://github.com/OpenRC/openrc/issues/335
	if [ -n "$prometheus_multiproc_dir" ]
	then
		checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$HG_USER:$HG_USER"
		rm -rf "$prometheus_multiproc_dir"/*
	fi
}
diff --git a/sr.ht/hub.sr.ht/APKBUILD b/sr.ht/hub.sr.ht/APKBUILD
index 7367cec..315b7a1 100644
--- a/sr.ht/hub.sr.ht/APKBUILD
+++ b/sr.ht/hub.sr.ht/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=hub.sr.ht
pkgver=0.13.5
pkgver=0.14.2
pkgrel=0
pkgdesc="sr.ht hub service"
url="https://git.sr.ht/~sircmpwn/hub.sr.ht"
@@ -17,6 +17,7 @@ source="
	sr.ht-nginx-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/sr.ht-nginx/archive/master.tar.gz
	hub.sr.ht.initd
	hub.sr.ht.confd
	hub.sr.ht.gunicorn.conf.py
"
export PKGVER=$pkgver
options="$options !check"
@@ -33,6 +34,8 @@ package() {
		"$pkgdir"/etc/init.d/hub.sr.ht
	install -Dm644 "$srcdir"/hub.sr.ht.confd \
		"$pkgdir"/etc/conf.d/hub.sr.ht
	install -Dm644 "$srcdir"/hub.sr.ht.gunicorn.conf.py \
		"$pkgdir"/etc/sr.ht/hub.sr.ht.gunicorn.conf.py
}

_nginx() {
@@ -43,8 +46,9 @@ _nginx() {
}

sha512sums="
38652c83b18843dfee4d752ed4fcf5624993b3cfdf20be0e63521b4153b5b30fb3d06494df185d4bf43f86a3e7a0a5eed687d8fff83abd6e87d4a1a5bb7de8ed  hub.sr.ht-0.13.5.tar.gz
4bc2435c8f67e44d3fdfa9ce2d1f15fbd0a45f066204e56fd5466084b78d12c2a88479d46bfffd185abe1d3a0302a46ce5e73d5e4da239e57707385e63e70b41  sr.ht-nginx-0.13.5.tar.gz
b120bdb3cc74a124259babf8b3f271fa74fbd4fac0dfd1a2a88b7e2311473f8509936019926d6770ca07b3cdd7cf37627c8f37a8f97790da56d2b33b2bf39dca  hub.sr.ht.initd
b7c6210b6893918ad655a709b39469607f3cff8d193948c1a74c6c364e9fb9dc3ed03d5ccb682b3b4581622988242f925977096a595e010ba4ef3afea0b6100e  hub.sr.ht.confd
7c8b949e7ff9e2678b18a3017e780ecbf25939d7d02452e24c1db3fb6939fc7d1cc2abf2562cf6695ba24929250f24ab70f0387617e83720292fe5b9ef66dab5  hub.sr.ht-0.14.2.tar.gz
917bbc9a493f6aa756af3f3597f9edf2e25227efe30f6ab635f99a7d9f4ecd6e9f36a7f2b9b40cc95b6e584dd62e1a0badb46e4ff9d3c3d5ce959455b15a95b6  sr.ht-nginx-0.14.2.tar.gz
e82162ed183905bdbc55676624983dbccb5f0a542024f3d88c670c69cf3f19447890ef8e4b3fbfd859ccb58caaa4196bdfad056d99a493fe2c23fddc3d99137d  hub.sr.ht.initd
657499dc280ca355704f704f183ad6097753fef02e5742014370e3f09d0d7c56966d3015022c54dcaad680ebc940c53c9f670b8488fb76e964ba5a89e60fa1aa  hub.sr.ht.confd
21f39ea0981d7773eb512e5ba234022364d0f7ee9b6ca897ce4c51e3b127eb2d9a7a5fbcaa06d14f20b2df2439421d7261f200e3f4f13b45a91e78ba77bc363c  hub.sr.ht.gunicorn.conf.py
"
diff --git a/sr.ht/hub.sr.ht/hub.sr.ht.confd b/sr.ht/hub.sr.ht/hub.sr.ht.confd
index 1366344..a2e0dfd 100644
--- a/sr.ht/hub.sr.ht/hub.sr.ht.confd
+++ b/sr.ht/hub.sr.ht/hub.sr.ht.confd
@@ -4,5 +4,8 @@
# Bind the web service to this address:
# HUB_BIND=127.0.0.1:5014

# Gunicorn configuration file
# HUB_GUNICORN_CONF=/etc/sr.ht/hub.sr.ht.gunicorn.conf.py

# Extra arguments to pass to Gunicorn
# HUB_ARGS=
diff --git a/sr.ht/hub.sr.ht/hub.sr.ht.gunicorn.conf.py b/sr.ht/hub.sr.ht/hub.sr.ht.gunicorn.conf.py
new file mode 100644
index 0000000..aa3e7ae
--- /dev/null
+++ b/sr.ht/hub.sr.ht/hub.sr.ht.gunicorn.conf.py
@@ -0,0 +1,5 @@
from prometheus_client import multiprocess


def child_exit(server, worker):
    multiprocess.mark_process_dead(worker.pid)
diff --git a/sr.ht/hub.sr.ht/hub.sr.ht.initd b/sr.ht/hub.sr.ht/hub.sr.ht.initd
index 000ee24..fe0cfc6 100755
--- a/sr.ht/hub.sr.ht/hub.sr.ht.initd
+++ b/sr.ht/hub.sr.ht/hub.sr.ht.initd
@@ -4,11 +4,13 @@ description="hub.sr.ht service"
supervisor=supervise-daemon
HUB_USER=${HUB_USER:-hub}
HUB_BIND=${HUB_BIND:-127.0.0.1:5014}
HUB_GUNICORN_CONF=${HUB_GUNICORN_CONF:-/etc/sr.ht/hub.sr.ht.gunicorn.conf.py}
HUB_ARGS=${HUB_ARGS:-}
LOGS=/var/log/hub.sr.ht.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
prometheus_multiproc_dir=/run/hub.sr.ht
supervise_daemon_args="-1 $LOGS -2 $LOGS -e prometheus_multiproc_dir=$prometheus_multiproc_dir"
command="/usr/bin/gunicorn"
command_args="hubsrht.app:app -b $HUB_BIND $HUB_ARGS"
command_args="hubsrht.app:app -b $HUB_BIND -c $HUB_GUNICORN_CONF $HUB_ARGS"
command_user="$HUB_USER:$HUB_USER"
pidfile="/run/${RC_SVCNAME}.pid"

@@ -21,4 +23,10 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$HUB_USER:$HUB_USER"
	# Workaround for https://github.com/OpenRC/openrc/issues/335
	if [ -n "$prometheus_multiproc_dir" ]
	then
		checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$HUB_USER:$HUB_USER"
		rm -rf "$prometheus_multiproc_dir"/*
	fi
}
diff --git a/sr.ht/lists.sr.ht/APKBUILD b/sr.ht/lists.sr.ht/APKBUILD
index 2a2b4bc..930a931 100644
--- a/sr.ht/lists.sr.ht/APKBUILD
+++ b/sr.ht/lists.sr.ht/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=lists.sr.ht
pkgver=0.49.1
pkgver=0.50.5
pkgrel=0
pkgdesc="sr.ht mailing list service"
url="https://git.sr.ht/~sircmpwn/lists.sr.ht"
@@ -31,6 +31,7 @@ source="
	lists.sr.ht-lmtp.confd
	lists.sr.ht-webhooks.initd
	lists.sr.ht-webhooks.confd
	lists.sr.ht.gunicorn.conf.py
"
export PKGVER=$pkgver
options="$options !check"
@@ -66,6 +67,8 @@ package() {
		"$pkgdir"/etc/init.d/lists.sr.ht-webhooks
	install -Dm644 "$srcdir"/lists.sr.ht-webhooks.confd \
		"$pkgdir"/etc/conf.d/lists.sr.ht-webhooks
	install -Dm644 "$srcdir"/lists.sr.ht.gunicorn.conf.py \
		"$pkgdir"/etc/sr.ht/lists.sr.ht.gunicorn.conf.py
}

_nginx() {
@@ -76,10 +79,10 @@ _nginx() {
}

sha512sums="
2765bedf4430f7cd83f365873a0b89eb9929225074eb8b681f33a69b4d7aa2db2e1830ed6f776feae5edb16620dcc556d8525797f807e5cff8f78ee308f27bda  lists.sr.ht-0.49.1.tar.gz
4bc2435c8f67e44d3fdfa9ce2d1f15fbd0a45f066204e56fd5466084b78d12c2a88479d46bfffd185abe1d3a0302a46ce5e73d5e4da239e57707385e63e70b41  sr.ht-nginx-0.49.1.tar.gz
50817a0e37f99f3620e539f539492567d1a69f12bfafd69c6f33eb79ba0822ee8e84bdd6c544e548f2dd40fe941e91272e22ee16948d571832029a4122bfb8e6  lists.sr.ht.initd
66d39dc5d1341c6b249035c80b90fe10c602eafc162eb084b485ad68b435378b846eda0658573d7190a4137e045f9ed87989caefbc019c6d4eac61e76523f207  lists.sr.ht.confd
673da1fe9ed6047511b3f614225ba3708666142d3661f60c945858b6ce4e1e5d9011db558bbef8086e0da5964d85ee8c6ebb21d1cd70c5bd5a540ad4fa254599  lists.sr.ht-0.50.5.tar.gz
917bbc9a493f6aa756af3f3597f9edf2e25227efe30f6ab635f99a7d9f4ecd6e9f36a7f2b9b40cc95b6e584dd62e1a0badb46e4ff9d3c3d5ce959455b15a95b6  sr.ht-nginx-0.50.5.tar.gz
bc34e789d752eb35f534511eef7ee70f257db0fee9db2cc5829adf48dfd7b20a2e259d01ab0ca914e64768c5e99cdfca995bf49e9d879fb6aff4cef5bdecc631  lists.sr.ht.initd
0fdee2ea046f0f90ff56be74d3ad036c855103e76a4ca47b418f66f54c581a4e5d5674499fa68bcb4ca4dee1a35e9fffab0dfe45b66d071b841ffc113cdf9d79  lists.sr.ht.confd
2460050d9d6e6d2ebf623c2734a31fd2d1aeaaf8161a6a2d5fdc701b3d38f8844951f2361745aad175ce0edd3b92a0bfe326beb04a239f59fb902a000f32d6f9  lists.sr.ht-api.initd
ddd380a46dbf7f6c1fd883f2b1f80e984ba7e11bf71a53e60152549737b3253e9e7010ccdeae66811f3b2f6a8bafe241f57fc36a12b9f80379900355bb68c8ef  lists.sr.ht-api.confd
b70ef07ee3247b33167111e301804d69416e8ebe020ea28587a4fd7d8fa0a81c7228309a5aa344d83f32578a7a66466f9484eac5332cfe264a538178645fd202  lists.sr.ht-process.initd
@@ -88,4 +91,5 @@ b70ef07ee3247b33167111e301804d69416e8ebe020ea28587a4fd7d8fa0a81c7228309a5aa344d8
47e703f2820bc6161909eb5434cba80b4c801fd4f18ee2b984afb217bbe43f21391ff86a8855d470b122131db1f2714a7c8c5aa58a6666123a8520327bdc0b11  lists.sr.ht-lmtp.confd
5f06d373d62096eea3c1bc6cabc220151f23705cd544be4b73d3ef488a4cffebfa5bd72455af7a1fc3b10fe08a894737fe627a1e2e2395a22d4bd08bd3042586  lists.sr.ht-webhooks.initd
66d114850cc9002a2491458fb91947da35010e521f28a89828b0fd5ef76463a8298bd4f921f22a67c70cfc85cdf13a62a8eee71925eb6e531d81e36ff1e78982  lists.sr.ht-webhooks.confd
21f39ea0981d7773eb512e5ba234022364d0f7ee9b6ca897ce4c51e3b127eb2d9a7a5fbcaa06d14f20b2df2439421d7261f200e3f4f13b45a91e78ba77bc363c  lists.sr.ht.gunicorn.conf.py
"
diff --git a/sr.ht/lists.sr.ht/lists.sr.ht.confd b/sr.ht/lists.sr.ht/lists.sr.ht.confd
index 929ee94..5be9a6d 100644
--- a/sr.ht/lists.sr.ht/lists.sr.ht.confd
+++ b/sr.ht/lists.sr.ht/lists.sr.ht.confd
@@ -4,5 +4,8 @@
# Bind the web service to this address:
# LISTS_BIND=127.0.0.1:5006

# Gunicorn configuration file
# LISTS_GUNICORN_CONF=/etc/sr.ht/lists.sr.ht.gunicorn.conf.py

# Extra arguments to pass to Gunicorn
# LISTS_ARGS=
diff --git a/sr.ht/lists.sr.ht/lists.sr.ht.gunicorn.conf.py b/sr.ht/lists.sr.ht/lists.sr.ht.gunicorn.conf.py
new file mode 100644
index 0000000..aa3e7ae
--- /dev/null
+++ b/sr.ht/lists.sr.ht/lists.sr.ht.gunicorn.conf.py
@@ -0,0 +1,5 @@
from prometheus_client import multiprocess


def child_exit(server, worker):
    multiprocess.mark_process_dead(worker.pid)
diff --git a/sr.ht/lists.sr.ht/lists.sr.ht.initd b/sr.ht/lists.sr.ht/lists.sr.ht.initd
index e241f1f..82e8b82 100755
--- a/sr.ht/lists.sr.ht/lists.sr.ht.initd
+++ b/sr.ht/lists.sr.ht/lists.sr.ht.initd
@@ -4,11 +4,13 @@ description="lists.sr.ht service"
supervisor=supervise-daemon
LISTS_USER=${LISTS_USER:-lists}
LISTS_BIND=${LISTS_BIND:-127.0.0.1:5006}
LISTS_GUNICORN_CONF=${LISTS_GUNICORN_CONF:-/etc/sr.ht/lists.sr.ht.gunicorn.conf.py}
LISTS_ARGS=${LISTS_ARGS:-}
LOGS=/var/log/lists.sr.ht.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
prometheus_multiproc_dir=/run/lists.sr.ht
supervise_daemon_args="-1 $LOGS -2 $LOGS -e prometheus_multiproc_dir=$prometheus_multiproc_dir"
command="/usr/bin/gunicorn"
command_args="listssrht.app:app -b $LISTS_BIND $LISTS_ARGS"
command_args="listssrht.app:app -b $LISTS_BIND -c $LISTS_GUNICORN_CONF $LISTS_ARGS"
command_user="$LISTS_USER:$LISTS_USER"
pidfile="/run/${RC_SVCNAME}.pid"

@@ -21,4 +23,10 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$LISTS_USER:$LISTS_USER"
	# Workaround for https://github.com/OpenRC/openrc/issues/335
	if [ -n "$prometheus_multiproc_dir" ]
	then
		checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$LISTS_USER:$LISTS_USER"
		rm -rf "$prometheus_multiproc_dir"/*
	fi
}
diff --git a/sr.ht/man.sr.ht/APKBUILD b/sr.ht/man.sr.ht/APKBUILD
index b98eb60..ae5316e 100644
--- a/sr.ht/man.sr.ht/APKBUILD
+++ b/sr.ht/man.sr.ht/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=man.sr.ht
pkgver=0.15.18
pkgver=0.15.22
pkgrel=0
pkgdesc="sr.ht wiki service"
url="https://git.sr.ht/~sircmpwn/man.sr.ht"
@@ -21,6 +21,7 @@ source="
	sr.ht-nginx-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/sr.ht-nginx/archive/master.tar.gz
	man.sr.ht.initd
	man.sr.ht.confd
	man.sr.ht.gunicorn.conf.py
"
export PKGVER=$pkgver
options="$options !check"
@@ -36,6 +37,8 @@ package() {
		"$pkgdir"/etc/init.d/man.sr.ht
	install -Dm644 "$srcdir"/man.sr.ht.confd \
		"$pkgdir"/etc/conf.d/man.sr.ht
	install -Dm644 "$srcdir"/man.sr.ht.gunicorn.conf.py \
		"$pkgdir"/etc/sr.ht/man.sr.ht.gunicorn.conf.py
}

_nginx() {
@@ -46,8 +49,9 @@ _nginx() {
}

sha512sums="
e05eb1562bd406b4c19be6214b3222d31718ff6a5eb03ef3cd54741bda3344692bff65047ef739517947e19199c7be81635ceca038a2f875bc6da838d8457d35  man.sr.ht-0.15.18.tar.gz
4bc2435c8f67e44d3fdfa9ce2d1f15fbd0a45f066204e56fd5466084b78d12c2a88479d46bfffd185abe1d3a0302a46ce5e73d5e4da239e57707385e63e70b41  sr.ht-nginx-0.15.18.tar.gz
ca32992f0778f6edf227de4520dd13fe0c3c4e4dd5be1043a5e5fb66f49392813a5bd0502e33b7c3f352cdcb12edc84e20faa2e376d33fe937a6b756e6e90033  man.sr.ht.initd
e8e3b1f8e3e6a132692774d141e79b9334714130371523bf43edadba0a580ce6003e7a7f5b23fb769d78c5951f6ac1f4097232c2764ed5988366ad80d1a85df7  man.sr.ht.confd
2cfb16afba6ccccd22eba20142d25cfabde56bdf73b7eae40505b89e33c8096e11c5a8bed012f99bf30d2199a68498b753466b5929924afbc9a435be4f594ce6  man.sr.ht-0.15.22.tar.gz
917bbc9a493f6aa756af3f3597f9edf2e25227efe30f6ab635f99a7d9f4ecd6e9f36a7f2b9b40cc95b6e584dd62e1a0badb46e4ff9d3c3d5ce959455b15a95b6  sr.ht-nginx-0.15.22.tar.gz
626300024baaf62c21152de76ab4256ed38a699d2a2c30b4758a115dc8e14ab2986dc9ef5d3ba77e64261ef5cd121342212c3621cfe47b7a20e80dca2247480d  man.sr.ht.initd
2a271c656ab5e4314142200f8c9d4d95fd6a9080d561a64fcfa9530e258168f56a863e759400120f7b0ed98f2212a19e3e8afe4e2d4fab53071e88146a5fac08  man.sr.ht.confd
21f39ea0981d7773eb512e5ba234022364d0f7ee9b6ca897ce4c51e3b127eb2d9a7a5fbcaa06d14f20b2df2439421d7261f200e3f4f13b45a91e78ba77bc363c  man.sr.ht.gunicorn.conf.py
"
diff --git a/sr.ht/man.sr.ht/man.sr.ht.confd b/sr.ht/man.sr.ht/man.sr.ht.confd
index be760e4..bd6da4c 100644
--- a/sr.ht/man.sr.ht/man.sr.ht.confd
+++ b/sr.ht/man.sr.ht/man.sr.ht.confd
@@ -4,5 +4,8 @@
# Bind the web service to this address:
# MAN_BIND=127.0.0.1:5004

# Gunicorn configuration file
# MAN_GUNICORN_CONF=/etc/sr.ht/man.sr.ht.gunicorn.conf.py

# Extra arguments to pass to Gunicorn
# MAN_ARGS=
diff --git a/sr.ht/man.sr.ht/man.sr.ht.gunicorn.conf.py b/sr.ht/man.sr.ht/man.sr.ht.gunicorn.conf.py
new file mode 100644
index 0000000..aa3e7ae
--- /dev/null
+++ b/sr.ht/man.sr.ht/man.sr.ht.gunicorn.conf.py
@@ -0,0 +1,5 @@
from prometheus_client import multiprocess


def child_exit(server, worker):
    multiprocess.mark_process_dead(worker.pid)
diff --git a/sr.ht/man.sr.ht/man.sr.ht.initd b/sr.ht/man.sr.ht/man.sr.ht.initd
index c2804f2..7e7e28f 100755
--- a/sr.ht/man.sr.ht/man.sr.ht.initd
+++ b/sr.ht/man.sr.ht/man.sr.ht.initd
@@ -4,11 +4,13 @@ description="man.sr.ht service"
supervisor=supervise-daemon
MAN_USER=${MAN_USER:-man}
MAN_BIND=${MAN_BIND:-127.0.0.1:5004}
MAN_GUNICORN_CONF=${MAN_GUNICORN_CONF:-/etc/sr.ht/man.sr.ht.gunicorn.conf.py}
MAN_ARGS=${MAN_ARGS:-}
LOGS=/var/log/man.sr.ht.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
prometheus_multiproc_dir=/run/man.sr.ht
supervise_daemon_args="-1 $LOGS -2 $LOGS -e prometheus_multiproc_dir=$prometheus_multiproc_dir"
command="/usr/bin/gunicorn"
command_args="mansrht.app:app -b $MAN_BIND $MAN_ARGS"
command_args="mansrht.app:app -b $MAN_BIND -c $MAN_GUNICORN_CONF $MAN_ARGS"
command_user="$MAN_USER:$MAN_USER"
pidfile="/run/${RC_SVCNAME}.pid"

@@ -21,4 +23,10 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$MAN_USER:$MAN_USER"
	# Workaround for https://github.com/OpenRC/openrc/issues/335
	if [ -n "$prometheus_multiproc_dir" ]
	then
		checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$MAN_USER:$MAN_USER"
		rm -rf "$prometheus_multiproc_dir"/*
	fi
}
diff --git a/sr.ht/meta.sr.ht/APKBUILD b/sr.ht/meta.sr.ht/APKBUILD
index 674830c..a2f3e93 100644
--- a/sr.ht/meta.sr.ht/APKBUILD
+++ b/sr.ht/meta.sr.ht/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=meta.sr.ht
pkgver=0.54.3
pkgver=0.57.0
pkgrel=0
pkgdesc="sr.ht account service"
url="https://git.sr.ht/~sircmpwn/meta.sr.ht"
@@ -30,6 +30,7 @@ source="
	meta.sr.ht-api.confd
	meta.sr.ht-webhooks.initd
	meta.sr.ht-webhooks.confd
	meta.sr.ht.gunicorn.conf.py
"
builddir="$srcdir/$pkgname-$pkgver"
export PKGVER=$pkgver
@@ -56,6 +57,8 @@ package() {
		"$pkgdir"/etc/init.d/meta.sr.ht-webhooks
	install -Dm644 "$srcdir"/meta.sr.ht-webhooks.confd \
		"$pkgdir"/etc/conf.d/meta.sr.ht-webhooks
	install -Dm644 "$srcdir"/meta.sr.ht.gunicorn.conf.py \
		"$pkgdir"/etc/sr.ht/meta.sr.ht.gunicorn.conf.py

	cd api
	install -Dm755 metasrht-api "$pkgdir"/usr/bin/metasrht-api
@@ -76,12 +79,13 @@ _nginx() {
}

sha512sums="
87bc4308dd61ff9b6dc13169c722e6c45367044f6e3e38da7700270887e6c3357d501af9f2b68748c1a487de9802acf291db47244d9a4ed5c62e5e755e95a2e3  meta.sr.ht-0.54.3.tar.gz
4bc2435c8f67e44d3fdfa9ce2d1f15fbd0a45f066204e56fd5466084b78d12c2a88479d46bfffd185abe1d3a0302a46ce5e73d5e4da239e57707385e63e70b41  sr.ht-nginx-0.54.3.tar.gz
c1782e12caaeb11db5eab299dbee1510ee1a697840c5b5ecd46aec23f7a16acc6e60fa0b7959a1cbcbc2614183b4e988f9eb905da475e418fd4b13fd53c71e2a  meta.sr.ht.initd
7e29f31839febf557d484f34de800e89be39d7a288cc5ea0b4d7fbdf13a722564d3795fdf0da53c5e2f9fb79f3e9b57508b569aa99762e35c4f9ac50f7dff59e  meta.sr.ht.confd
fc2c4560425d715e10cf3ff00b4afc7efbb537d08b6a654a64466f16f0943bb76818c00a7f1d54a647fcdbb78d82b70134c28bdb5a537030d189cf2de9a74145  meta.sr.ht-0.57.0.tar.gz
917bbc9a493f6aa756af3f3597f9edf2e25227efe30f6ab635f99a7d9f4ecd6e9f36a7f2b9b40cc95b6e584dd62e1a0badb46e4ff9d3c3d5ce959455b15a95b6  sr.ht-nginx-0.57.0.tar.gz
f84bb7c0532a27b1a2425726a79b329d4782eb459571c289d793beabfe9334ffbca53bcb19a699e1f0a7d696fe57cf8c0692f72576351d9cf4b9f8f325222eaf  meta.sr.ht.initd
01ef7929b8a4cb52eed0909b665dade805b6973ed6d30fc8e1aa7b72471a59951495cf7669f7bf80ffae8d681002be7d548bcc2b04365c3295b1c3794b2b9759  meta.sr.ht.confd
8377026251395fa74980a6733a6715c5dcfa6b893ad846d556479d3170605ba7cbe5dcc1c482f90a20e0b6332732cba9480d198dfcc9d73d2d6e338e5276bc65  meta.sr.ht-api.initd
36550c28b15fbdf32051591a9231035852916ae701521afa00b7da5959ec08c6eca74714ecea3b8d5f35d41c388aadd61ddfeee9a270cefdadf9be32b0ced145  meta.sr.ht-api.confd
26db23b2302c5a3a3dcb6068f0bc57d932a24ff8bcf288b8d8e1ca2385ee05603eded26e19b73c40adc96b8a0d2fad64c4f28526d69bcbc61981df8acc3efb11  meta.sr.ht-webhooks.initd
0091092a0f0f77158c571e0731470239034cd1480657755ca0537ab4d00002d60b444bcd7df12bfc86b4ca79f5cfed51722079a46a44abc8bf2ba6a7e1111a7c  meta.sr.ht-webhooks.confd
21f39ea0981d7773eb512e5ba234022364d0f7ee9b6ca897ce4c51e3b127eb2d9a7a5fbcaa06d14f20b2df2439421d7261f200e3f4f13b45a91e78ba77bc363c  meta.sr.ht.gunicorn.conf.py
"
diff --git a/sr.ht/meta.sr.ht/meta.sr.ht.confd b/sr.ht/meta.sr.ht/meta.sr.ht.confd
index b59a4db..db6a42f 100644
--- a/sr.ht/meta.sr.ht/meta.sr.ht.confd
+++ b/sr.ht/meta.sr.ht/meta.sr.ht.confd
@@ -4,5 +4,8 @@
# Bind the web service to this address:
# META_BIND=127.0.0.1:5001

# Gunicorn configuration file
# META_GUNICORN_CONF=/etc/sr.ht/meta.sr.ht.gunicorn.conf.py

# Extra arguments to pass to Gunicorn
# META_ARGS=
diff --git a/sr.ht/meta.sr.ht/meta.sr.ht.gunicorn.conf.py b/sr.ht/meta.sr.ht/meta.sr.ht.gunicorn.conf.py
new file mode 100644
index 0000000..aa3e7ae
--- /dev/null
+++ b/sr.ht/meta.sr.ht/meta.sr.ht.gunicorn.conf.py
@@ -0,0 +1,5 @@
from prometheus_client import multiprocess


def child_exit(server, worker):
    multiprocess.mark_process_dead(worker.pid)
diff --git a/sr.ht/meta.sr.ht/meta.sr.ht.initd b/sr.ht/meta.sr.ht/meta.sr.ht.initd
index f8e9a0c..61f6f19 100755
--- a/sr.ht/meta.sr.ht/meta.sr.ht.initd
+++ b/sr.ht/meta.sr.ht/meta.sr.ht.initd
@@ -4,11 +4,13 @@ description="meta.sr.ht service"
supervisor=supervise-daemon
META_USER=${META_USER:-meta}
META_BIND=${META_BIND:-127.0.0.1:5000}
META_GUNICORN_CONF=${META_GUNICORN_CONF:-/etc/sr.ht/meta.sr.ht.gunicorn.conf.py}
META_ARGS=${META_ARGS:-}
LOGS=/var/log/meta.sr.ht.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
prometheus_multiproc_dir=/run/meta.sr.ht
supervise_daemon_args="-1 $LOGS -2 $LOGS -e prometheus_multiproc_dir=$prometheus_multiproc_dir"
command="/usr/bin/gunicorn"
command_args="metasrht.app:app -b $META_BIND $META_ARGS"
command_args="metasrht.app:app -b $META_BIND -c $META_GUNICORN_CONF $META_ARGS"
command_user="$META_USER:$META_USER"
pidfile="/run/${RC_SVCNAME}.pid"

@@ -21,4 +23,10 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$META_USER:$META_USER"
	# Workaround for https://github.com/OpenRC/openrc/issues/335
	if [ -n "$prometheus_multiproc_dir" ]
	then
		checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$META_USER:$META_USER"
		rm -rf "$prometheus_multiproc_dir"/*
	fi
}
diff --git a/sr.ht/paste.sr.ht/APKBUILD b/sr.ht/paste.sr.ht/APKBUILD
index 69ddd45..8578eb6 100644
--- a/sr.ht/paste.sr.ht/APKBUILD
+++ b/sr.ht/paste.sr.ht/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=paste.sr.ht
pkgver=0.12.1
pkgver=0.13.6
pkgrel=0
pkgdesc="sr.ht paste service"
url="https://git.sr.ht/~sircmpwn/paste.sr.ht"
@@ -20,6 +20,7 @@ source="
	paste.sr.ht.confd
	paste.sr.ht-api.initd
	paste.sr.ht-api.confd
	paste.sr.ht.gunicorn.conf.py
"
export PKGVER=$pkgver
options="$options !check"
@@ -37,11 +38,16 @@ package() {
		"$pkgdir"/etc/init.d/paste.sr.ht
	install -Dm644 "$srcdir"/paste.sr.ht.confd \
		"$pkgdir"/etc/conf.d/paste.sr.ht
<<<<<<< HEAD
	install -Dm755 "$srcdir"/paste.sr.ht-api.initd \
		"$pkgdir"/etc/init.d/paste.sr.ht-api
	install -Dm644 "$srcdir"/paste.sr.ht-api.confd \
		"$pkgdir"/etc/conf.d/paste.sr.ht-api
	install -Dm755 api/pastesrht-api "$pkgdir"/usr/bin/pastesrht-api
=======
	install -Dm644 "$srcdir"/paste.sr.ht.gunicorn.conf.py \
		"$pkgdir"/etc/sr.ht/paste.sr.ht.gunicorn.conf.py
>>>>>>> *.sr.ht: Enable prometheus multiprocessing mode
}

_nginx() {
@@ -52,10 +58,18 @@ _nginx() {
}

sha512sums="
<<<<<<< HEAD
7f138f10c863c17db26f9b625885351dbdc41e00da1d6f070fb8785aee23e4b63a0e2c9acc0054f86b583a05aad196f98c80845ae536debaf1cf6c4e2b2d15b4  paste.sr.ht-0.12.1.tar.gz
0b2b6b2916799e20d05d6e35fdb20ac0cded65e254beb79a3aa91d4faa20fe6c93bd3e178acb2d2966841a7ce4f0149b0a863db1d57a36407ff85833779d3959  sr.ht-nginx-0.12.1.tar.gz
ecbbfe19bbb60bb7724210bb38601dcf64cbd24056fb59d22ac4539082b6e30ac4d80b59d1e3ba58ac232df291304746b6deb49836c0a329233c3531baa33bda  paste.sr.ht.initd
8b4f89e5d8fd96b6e898f81c7d5f516715285a4cb871a6bb31bcea059eb40aff5019039a973815aacd22eb9957bb02b2835a8e9c9aac3ab83649145c6636a388  paste.sr.ht.confd
263f268ba32fef424d8b44af76fa9c94a309c75d2d8c40f46b6556c713c590744edb6e78810b3d9c7a1d037d314c12e034d5e2cee4b46c92851a5e65dfb4f3a3  paste.sr.ht-api.initd
e226a1a3913749c5a72e57c2e6f75f94199f47c72d47ccbac5abba3bc30b827d8619c2f1a60ef2b67f28074007a051981f47d4d2c749da4c5e5e9d1823f54dbf  paste.sr.ht-api.confd
=======
0d9851d95e86bd9a32fcc437c12d34471575b6da861aff6666b6fe1246810d99b3c9bc898f4342eaaa31a7771dfe1e1d1c2cb75ffb14d2a23b0a9c2f8cf27d49  paste.sr.ht-0.12.4.tar.gz
691524a85946dce41d81bbad585fc84c98308b21cec5373b1e0cf2009e3c8592e3563ad816fb2ef2f1befe88c568584a5af277a77ca56367a2dec8222bd589b8  sr.ht-nginx-0.12.4.tar.gz
72febad34a908e3402ca5a914226e8757e294e5524452124bd219ea411ad97f3417a1ea40b0d706dac1468b2231aee1f7ca7a214f351178dda4ab54f7ef442dc  paste.sr.ht.initd
dea54d754186f6bc67c8ca3ef6cc5236355cdc9962aa502d4138245bdcba7edb804b627fcfbf4909fc54bed08ef44ce635947982ff3cb69f3dac0bb6bd55abb3  paste.sr.ht.confd
21f39ea0981d7773eb512e5ba234022364d0f7ee9b6ca897ce4c51e3b127eb2d9a7a5fbcaa06d14f20b2df2439421d7261f200e3f4f13b45a91e78ba77bc363c  paste.sr.ht.gunicorn.conf.py
>>>>>>> *.sr.ht: Enable prometheus multiprocessing mode
"
diff --git a/sr.ht/paste.sr.ht/paste.sr.ht.confd b/sr.ht/paste.sr.ht/paste.sr.ht.confd
index b4a9d43..0d71f0e 100644
--- a/sr.ht/paste.sr.ht/paste.sr.ht.confd
+++ b/sr.ht/paste.sr.ht/paste.sr.ht.confd
@@ -4,5 +4,8 @@
# Bind the web service to this address:
# PASTE_BIND=127.0.0.1:5011

# Gunicorn configuration file
# PASTE_GUNICORN_CONF=/etc/sr.ht/paste.sr.ht.gunicorn.conf.py

# Extra arguments to pass to Gunicorn
# PASTE_ARGS=
diff --git a/sr.ht/paste.sr.ht/paste.sr.ht.gunicorn.conf.py b/sr.ht/paste.sr.ht/paste.sr.ht.gunicorn.conf.py
new file mode 100644
index 0000000..aa3e7ae
--- /dev/null
+++ b/sr.ht/paste.sr.ht/paste.sr.ht.gunicorn.conf.py
@@ -0,0 +1,5 @@
from prometheus_client import multiprocess


def child_exit(server, worker):
    multiprocess.mark_process_dead(worker.pid)
diff --git a/sr.ht/paste.sr.ht/paste.sr.ht.initd b/sr.ht/paste.sr.ht/paste.sr.ht.initd
index 724b6c5..e19e8b0 100755
--- a/sr.ht/paste.sr.ht/paste.sr.ht.initd
+++ b/sr.ht/paste.sr.ht/paste.sr.ht.initd
@@ -4,11 +4,13 @@ description="paste.sr.ht service"
supervisor=supervise-daemon
PASTE_USER=${PASTE_USER:-paste}
PASTE_BIND=${PASTE_BIND:-127.0.0.1:5011}
PASTE_GUNICORN_CONF=${PASTE_GUNICORN_CONF:-/etc/sr.ht/paste.sr.ht.gunicorn.conf.py}
PASTE_ARGS=${PASTE_ARGS:-}
LOGS=/var/log/paste.sr.ht.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
prometheus_multiproc_dir=/run/paste.sr.ht
supervise_daemon_args="-1 $LOGS -2 $LOGS -e prometheus_multiproc_dir=$prometheus_multiproc_dir"
command="/usr/bin/gunicorn"
command_args="pastesrht.app:app -b $PASTE_BIND $PASTE_ARGS"
command_args="pastesrht.app:app -b $PASTE_BIND  -c $PASTE_GUNICORN_CONF $PASTE_ARGS"
command_user="$PASTE_USER:$PASTE_USER"
pidfile="/run/${RC_SVCNAME}.pid"

@@ -21,4 +23,10 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$PASTE_USER:$PASTE_USER"
	# Workaround for https://github.com/OpenRC/openrc/issues/335
	if [ -n "$prometheus_multiproc_dir" ]
	then
		checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$PASTE_USER:$PASTE_USER"
		rm -rf "$prometheus_multiproc_dir"/*
	fi
}
diff --git a/sr.ht/todo.sr.ht/APKBUILD b/sr.ht/todo.sr.ht/APKBUILD
index 523cf1d..2d55f2a 100644
--- a/sr.ht/todo.sr.ht/APKBUILD
+++ b/sr.ht/todo.sr.ht/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=todo.sr.ht
pkgver=0.64.23
pkgver=0.65.3
pkgrel=0
pkgdesc="sr.ht ticket tracking service"
url="https://git.sr.ht/~sircmpwn/todo.sr.ht"
@@ -24,6 +24,7 @@ source="
	todo.sr.ht-webhooks.initd
	todo.sr.ht-api.confd
	todo.sr.ht-api.initd
	todo.sr.ht.gunicorn.conf.py
"
export PKGVER=$pkgver
options="$options !check"
@@ -57,6 +58,8 @@ package() {
		"$pkgdir"/etc/init.d/todo.sr.ht-api
	install -Dm644 "$srcdir"/todo.sr.ht-api.confd \
		"$pkgdir"/etc/conf.d/todo.sr.ht-api
	install -Dm644 "$srcdir"/todo.sr.ht.gunicorn.conf.py \
		"$pkgdir"/etc/sr.ht/todo.sr.ht.gunicorn.conf.py
}

_nginx() {
@@ -67,14 +70,15 @@ _nginx() {
}

sha512sums="
a1292d18b5bfadcd545ffb46a2c9ed98703c1cc5a3c5cdb8bb08f404b7b2315594e35f28111927881fe4e248a6ac8dae0b0d3282020060dcf8b90caaae96e762  todo.sr.ht-0.64.23.tar.gz
4bc2435c8f67e44d3fdfa9ce2d1f15fbd0a45f066204e56fd5466084b78d12c2a88479d46bfffd185abe1d3a0302a46ce5e73d5e4da239e57707385e63e70b41  sr.ht-nginx-0.64.23.tar.gz
9f0c7284e7dd21156efdbad8074651c643ed6eb8aaca70d44fdfc652726930f8f1036d7f5d55f64bfb09e220e9c4d8e17b0abb54793daae44716deea6d122145  todo.sr.ht.initd
a4ab31da9633228e14a3baedaa0a257100d2758d5feaeb655a1647fd5a08b5a8a2c7af560d3d3af0956b66e6fbb8cba1fc7c46929eb78c45d81e881ef6d6c6c1  todo.sr.ht.confd
80be26b91afc1da906518a9edeb8855fa3ea721c22faaf61929b1531f15bfc05343a4ffd66cacd4f8333d63d528f06459181e363cb18b27682bbf18bafa0a239  todo.sr.ht-0.65.3.tar.gz
917bbc9a493f6aa756af3f3597f9edf2e25227efe30f6ab635f99a7d9f4ecd6e9f36a7f2b9b40cc95b6e584dd62e1a0badb46e4ff9d3c3d5ce959455b15a95b6  sr.ht-nginx-0.65.3.tar.gz
946a15e8a723dea178edc451b461f756761a9429fd434820df1955225a9fe73c7aefb838ec32bb9f3a3f7b80a5921641540cdf5fcde3fff272420ea1abe3970e  todo.sr.ht.initd
a71116bd25e0c6e8e3e14e4dadb653e6360e2b468bd415439559b56ffc18724efa9bcb593181d8f0fe0cbccf96f3196a452659bb4375e687faf0b09a48ef5557  todo.sr.ht.confd
c4ac342b5fa506c1323d9c55f36b800e16cb9afdecc32f94bf7261c8fa2710db839b84137d24f3e43ac28e036cf21f63c381a650661e722e416c61a6cf44c938  todo.sr.ht-lmtp.initd
8765703a5ac67da782e471f3f89d0c6fb58cf1dba7342377bccba6e39bd324c47d13948edd5a99af6376b39f60239b3689f6983b92353380f208fe1f12589907  todo.sr.ht-lmtp.confd
befda599f189e99b542ebaf5dd17739169bf73a1499c9de92a98778bd108bb9813e1838e461ced494c6b495a16e34cf805abdb3ccabcf14c2ccecf2d42e780df  todo.sr.ht-webhooks.confd
a2e9686eacd4f37262067749b8844c005839cf190751ab9d49f631e1aa61f64541715e19a942ab20f0541db2b7594499c5c12b522c7b4b90176543f05d576eb7  todo.sr.ht-webhooks.initd
6d096a0559db2c689938e0f0c24d0158efe836dec209f694256f2803494884f206cab423cd5d3b08a68c9446aa2aff1eca0a95da31088fa8a9628becbf344215  todo.sr.ht-api.confd
a1b4901c6e18bc5826bb359941c99b53143f2b4ecdddf6fbba89c78fa4721578720d9a60fe95d4a4d382ef98cf1c3ad3e3f75d5d46782b1ec349c0c2adc7164b  todo.sr.ht-api.initd
21f39ea0981d7773eb512e5ba234022364d0f7ee9b6ca897ce4c51e3b127eb2d9a7a5fbcaa06d14f20b2df2439421d7261f200e3f4f13b45a91e78ba77bc363c  todo.sr.ht.gunicorn.conf.py
"
diff --git a/sr.ht/todo.sr.ht/todo.sr.ht.confd b/sr.ht/todo.sr.ht/todo.sr.ht.confd
index 105e7d1..5da096b 100644
--- a/sr.ht/todo.sr.ht/todo.sr.ht.confd
+++ b/sr.ht/todo.sr.ht/todo.sr.ht.confd
@@ -4,5 +4,8 @@
# Bind the web service to this address:
# TODO_BIND=127.0.0.1:5003

# Gunicorn configuration file
# TODO_GUNICORN_CONF=/etc/sr.ht/todo.sr.ht.gunicorn.conf.py

# Extra arguments to pass to Gunicorn
# TODO_ARGS=
diff --git a/sr.ht/todo.sr.ht/todo.sr.ht.gunicorn.conf.py b/sr.ht/todo.sr.ht/todo.sr.ht.gunicorn.conf.py
new file mode 100644
index 0000000..aa3e7ae
--- /dev/null
+++ b/sr.ht/todo.sr.ht/todo.sr.ht.gunicorn.conf.py
@@ -0,0 +1,5 @@
from prometheus_client import multiprocess


def child_exit(server, worker):
    multiprocess.mark_process_dead(worker.pid)
diff --git a/sr.ht/todo.sr.ht/todo.sr.ht.initd b/sr.ht/todo.sr.ht/todo.sr.ht.initd
index b333a8e..61cf457 100755
--- a/sr.ht/todo.sr.ht/todo.sr.ht.initd
+++ b/sr.ht/todo.sr.ht/todo.sr.ht.initd
@@ -4,11 +4,13 @@ description="todo.sr.ht service"
supervisor=supervise-daemon
TODO_USER=${TODO_USER:-todo}
TODO_BIND=${TODO_BIND:-127.0.0.1:5003}
TODO_GUNICORN_CONF=${TODO_GUNICORN_CONF:-/etc/sr.ht/todo.sr.ht.gunicorn.conf.py}
TODO_ARGS=${TODO_ARGS:-}
LOGS=/var/log/todo.sr.ht.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
prometheus_multiproc_dir=/run/todo.sr.ht
supervise_daemon_args="-1 $LOGS -2 $LOGS -e prometheus_multiproc_dir=$prometheus_multiproc_dir"
command="/usr/bin/gunicorn"
command_args="todosrht.app:app -b $TODO_BIND $TODO_ARGS"
command_args="todosrht.app:app -b $TODO_BIND -c $TODO_GUNICORN_CONF $TODO_ARGS"
command_user="$TODO_USER:$TODO_USER"
pidfile="/run/${RC_SVCNAME}.pid"

@@ -21,4 +23,10 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$TODO_USER:$TODO_USER"
	# Workaround for https://github.com/OpenRC/openrc/issues/335
	if [ -n "$prometheus_multiproc_dir" ]
	then
		checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$TODO_USER:$TODO_USER"
		rm -rf "$prometheus_multiproc_dir"/*
	fi
}
-- 
2.25.1
Thanks!

To git@git.sr.ht:~sircmpwn/sr.ht-apkbuilds
   bc95011..89791a1  master -> master

I'm not going to deploy all of these right away, and instead let this
roll out naturally with our normal deployments. I will deploy a couple
of them - meta.sr.ht and git.sr.ht - right now. Can also deploy one or
two of them by request.