~sircmpwn/sr.ht-packages

sr.ht-apkbuilds: *.sr.ht: Enable prometheus multiprocessing mode v2 PROPOSED

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

 40 files changed, 234 insertions(+), 69 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/24819/mbox | git am -3
Learn more about email & git
View this thread in the archives

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

Using rm -rf for removing old files instead of checkpath -D because it straigt
up doesn't work(https://github.com/OpenRC/openrc/issues/335)
---
Took me a good while to get back on this. Tested in a VM with meta.sr.ht,
everything seems to work, changes for other services are the same so shouldn't 
have any problems with that. One thing I'm not sure about is how the upgrade is
going to go, as this changes files which are potentially editied by
administrators.

Should need a careful review, lots of repetitive changes to many files, which is
prone to errors. Everything seems OK to me, but one pair of eyes isn't enough
for this.

 sr.ht/builds.sr.ht/APKBUILD                     | 14 +++++++++-----
 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           |  8 ++++++--
 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       |  8 ++++++--
 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                 |  8 ++++++--
 sr.ht/hg.sr.ht/APKBUILD                         | 12 ++++++++----
 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                   |  8 ++++++--
 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                 |  8 ++++++--
 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             |  8 ++++++--
 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                 |  8 ++++++--
 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               |  8 ++++++--
 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             |  8 ++++++--
 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               |  8 ++++++--
 40 files changed, 234 insertions(+), 69 deletions(-)
 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
index 417b795..2badba6
--- 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.71.3
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
9b7d2de8d2ac35d5b68e5488d2985468df1948cf7cf2717a8e5d38b8a539e5c534f5f252c928f28ba12f5451f94aefebc0abc52dab4ce57f687f813b938a97e7  builds.sr.ht-0.71.3.tar.gz
691524a85946dce41d81bbad585fc84c98308b21cec5373b1e0cf2009e3c8592e3563ad816fb2ef2f1befe88c568584a5af277a77ca56367a2dec8222bd589b8  sr.ht-nginx-0.71.3.tar.gz
d205043f3fe0dc022d25f8714ad5fb095a7dc92a10fe4eb4a1c6d6a500b54692773c1e314e9337a320f9b6043225a9a5a9e50d9a5dc30e7c80305b7ad538ea0f  builds.sr.ht.confd
cd0f08de63d0071fa02568c4bc87eb87c5132681f611bdff8eb7e1f5b3c1448799f573aec2178146adace3ec1d8eac1e419e27c3630d23d7e30753dfe5f55034  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
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..685c6fc 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,6 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$BUILDS_USER:$BUILDS_USER"
	checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$BUILDS_USER:$BUILDS_USER"
	rm -rf "$prometheus_multiproc_dir"/*
}
diff --git a/sr.ht/dispatch.sr.ht/APKBUILD b/sr.ht/dispatch.sr.ht/APKBUILD
index 360bf7d..342e973 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.32
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="
61662493bbe70603f6ea4c8f04bd072335318f04071f623b87de62b33254424e08205900d2c988c0055684a59e9f57d31e644f94a4a01a3b3da1628d90ba9d3f  dispatch.sr.ht-0.15.32.tar.gz
691524a85946dce41d81bbad585fc84c98308b21cec5373b1e0cf2009e3c8592e3563ad816fb2ef2f1befe88c568584a5af277a77ca56367a2dec8222bd589b8  sr.ht-nginx-0.15.32.tar.gz
ea2cea43b8d48fedd50117eec8166635e927fe13a1b7cd4ff27e79c0b428b9a276dbe9ebcde5ce2c08ec8a6da75bf1d0d1b820456ac7003ecc8afafd4fcb2faf  dispatch.sr.ht.confd
409fef9ee3b16035cdb9d8c7d5fec097fc41fead9f37dab4b0ed14f5b6079fae6535ece8e32c841d9d9de7e849cd1d7f6b2cbf669c206b9d0b22ecb2debd5f8c  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..ba2c934 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,6 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$DISPATCH_USER:$DISPATCH_USER"
	checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$DISPATCH_USER:$DISPATCH_USER"
	rm -rf "$prometheus_multiproc_dir"/*
}
diff --git a/sr.ht/git.sr.ht/APKBUILD b/sr.ht/git.sr.ht/APKBUILD
index 9340527..4d75daa 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.72.46
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
64afc8fff12439465e40eec07e156e10d5129ea2788da68b3de58d5b7a6177cc732c0987f51c2609d20e1e892e03403b291e4e7affbfeab9ffb6af05456bff6d  git.sr.ht-0.72.46.tar.gz
691524a85946dce41d81bbad585fc84c98308b21cec5373b1e0cf2009e3c8592e3563ad816fb2ef2f1befe88c568584a5af277a77ca56367a2dec8222bd589b8  sr.ht-nginx-0.72.46.tar.gz
a3e94f94db78ce501afc8054383c5f5bcf07bf1659d5b338fd7c462858cabf381ca1b708f54dc686d64c04e55cf24c883a9064f482ae533cb583386add310079  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..afd17a7 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,6 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$GIT_USER:$GIT_USER"
	checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$GIT_USER:$GIT_USER"
	rm -rf "$prometheus_multiproc_dir"/*
}
diff --git a/sr.ht/hg.sr.ht/APKBUILD b/sr.ht/hg.sr.ht/APKBUILD
index dd9d2b2..d1316ec 100644
--- a/sr.ht/hg.sr.ht/APKBUILD
+++ b/sr.ht/hg.sr.ht/APKBUILD
@@ -22,6 +22,7 @@ source="
	hg.sr.ht.confd
	hg.sr.ht-webhooks.initd
	hg.sr.ht-webhooks.confd
	hg.sr.ht.gunicorn.conf.py
"
export PKGVER=$pkgver
options="$options !check"
@@ -44,6 +45,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 ../hgsrht/hgrcs
@@ -59,10 +62,11 @@ _nginx() {
}

sha512sums="
4d45cbbd2d9b6dc5f2d25fe8adba3f759a725a7055411c1286f7f344e047a97ac2c870c442e63c3f3e2b8d1b17f56a4d4ac56c0c6a954d1968613a249503162f  hg.sr.ht-0.27.6.tar.gz
4bc2435c8f67e44d3fdfa9ce2d1f15fbd0a45f066204e56fd5466084b78d12c2a88479d46bfffd185abe1d3a0302a46ce5e73d5e4da239e57707385e63e70b41  sr.ht-nginx-0.27.6.tar.gz
38923f14ca3cedf4004447ef5ab75d5699a858efdc22866f1da10a82c3a938227c03380b84fae719b84b4751f03fec55be922d950a155e09c7e8e41ff71b3c6b  hg.sr.ht.initd
2c3f1776f8bb6bb42f0d240b28561d0bfb1b4638cad169cd5162f9c227028d0d256fd510f8a47c9c0ec111d11e9f54c293fef6c3e3d99d925dcd170294f44472  hg.sr.ht.confd
b3e78f04a8f7797c85e163c565f4a2c5e17e8dc8aedfcca52c17dcf5ef0c7e20dc6eb6932f2ea73807117e50fe57357f5aaa2a0e29965bce01e87f4ee55c790c  hg.sr.ht-0.27.6.tar.gz
47556546badebb0dfa841111f4726f3a32a67d8bbac32ac9d634ccc414da3b7e4374a4d487128306a41a5783e4075ee268edbe8770bbc21dd68a32b71cc8d7a9  sr.ht-nginx-0.27.6.tar.gz
aec6f4b6ee1e535860841021b6ab864a5c39b160e9b34ebdb5a40bd73a1d6d36d572bb617bc33e473c2eabd1726370328387f15067416f4a746f027f8f4f74bc  hg.sr.ht.initd
867dc537ea53099a2ab4dbc8c400012ca24053d9226281322c103944faa3b66a7986c325c860718882a4b28b986a2208f9a9b40f37a2d54c19be46ebe3902a82  hg.sr.ht.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..00a6656 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,6 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$HG_USER:$HG_USER"
	checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$HG_USER:$HG_USER"
	rm -rf "$prometheus_multiproc_dir"/*
}
diff --git a/sr.ht/hub.sr.ht/APKBUILD b/sr.ht/hub.sr.ht/APKBUILD
index 7367cec..c76f605 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.13.11
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
a1639678048c69e6437c4265c9a4017b54bf25b081020be033bf35ebf228e4627e445f3667ad18104206bcd2a7a52fc4843d1dfaa174a217aae48ccf9329e065  hub.sr.ht-0.13.11.tar.gz
691524a85946dce41d81bbad585fc84c98308b21cec5373b1e0cf2009e3c8592e3563ad816fb2ef2f1befe88c568584a5af277a77ca56367a2dec8222bd589b8  sr.ht-nginx-0.13.11.tar.gz
f425ee1411a3fd7b43316189e09f71144237b23a3a0c995ca0f6a95236e7976f770d672dc4fc1b8af73bfed4596665d7c7afba3c476aeba41a0e849ddd73393b  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..7869909 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,6 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$HUB_USER:$HUB_USER"
	checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$HUB_USER:$HUB_USER"
	rm -rf "$prometheus_multiproc_dir"/*
}
diff --git a/sr.ht/lists.sr.ht/APKBUILD b/sr.ht/lists.sr.ht/APKBUILD
index 2a2b4bc..e7125c8 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.49.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
74e60b6295df5eae2f534948e85c85b6eff600d25b631873d654b58de29bf2c42e907d2b1a8143f526ed3c9448286abeaf74f9813620747ac8d118927267d6e7  lists.sr.ht-0.49.5.tar.gz
691524a85946dce41d81bbad585fc84c98308b21cec5373b1e0cf2009e3c8592e3563ad816fb2ef2f1befe88c568584a5af277a77ca56367a2dec8222bd589b8  sr.ht-nginx-0.49.5.tar.gz
7cdcb6233b1004706e2ba4e92ed2348b1819f4f2193f1caf2aeaa0a92929143edb10b74c1c004e88a71459d1fabd30a434979d3df1bb748988bcd19f0249b0dc  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..bc59f5e 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,6 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$LISTS_USER:$LISTS_USER"
	checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$LISTS_USER:$LISTS_USER"
	rm -rf "$prometheus_multiproc_dir"/*
}
diff --git a/sr.ht/man.sr.ht/APKBUILD b/sr.ht/man.sr.ht/APKBUILD
index b98eb60..83ef468 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.20
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
d2aca5d2b68d1f9fc3932884f5b2d767a7d5897040b3325ad206afba0a7c2965300b90c4d4fbcac09047c07f5c233a3fa6a9b5afec80cc6bc836750c86641d38  man.sr.ht-0.15.20.tar.gz
691524a85946dce41d81bbad585fc84c98308b21cec5373b1e0cf2009e3c8592e3563ad816fb2ef2f1befe88c568584a5af277a77ca56367a2dec8222bd589b8  sr.ht-nginx-0.15.20.tar.gz
e9de6df9304f2a45c90d8e030c9f0a3086297a10fec07dbe42a81d0191d3535e0bd679c60d728c8fda2a6876daf8ca384a8292eb6dcce0a27176e283fbbb8319  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..a9994ed 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,6 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$MAN_USER:$MAN_USER"
	checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$MAN_USER:$MAN_USER"
	rm -rf "$prometheus_multiproc_dir"/*
}
diff --git a/sr.ht/meta.sr.ht/APKBUILD b/sr.ht/meta.sr.ht/APKBUILD
index 674830c..e7fb3cc 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.55.11
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
8f67174161adcc15d1f341e81fddc29bd7fac82f13b2cc9d3e9c47da7b4ec398dbaaf221c94fd2d5fc3d826a6629fed9bbdc3137520654bed0bcebe91cfe2357  meta.sr.ht-0.55.11.tar.gz
691524a85946dce41d81bbad585fc84c98308b21cec5373b1e0cf2009e3c8592e3563ad816fb2ef2f1befe88c568584a5af277a77ca56367a2dec8222bd589b8  sr.ht-nginx-0.55.11.tar.gz
f49881abab21623cdc73bb7fc1e5282294972ad920e079a4c322320d8a7bc0fd1f2136975a7987a1a41c63d8ccce899cec0eeecee0011564ccdb5d1b052d72b8  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..b9bfee3 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,6 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$META_USER:$META_USER"
	checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$META_USER:$META_USER"
	rm -rf "$prometheus_multiproc_dir"/*
}
diff --git a/sr.ht/paste.sr.ht/APKBUILD b/sr.ht/paste.sr.ht/APKBUILD
index c277d44..5ebe911 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.12.4
pkgrel=0
pkgdesc="sr.ht paste service"
url="https://git.sr.ht/~sircmpwn/paste.sr.ht"
@@ -18,6 +18,7 @@ source="
	sr.ht-nginx-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/sr.ht-nginx/archive/master.tar.gz
	paste.sr.ht.initd
	paste.sr.ht.confd
	paste.sr.ht.gunicorn.conf.py
"
export PKGVER=$pkgver
options="$options !check"
@@ -33,6 +34,8 @@ package() {
		"$pkgdir"/etc/init.d/paste.sr.ht
	install -Dm644 "$srcdir"/paste.sr.ht.confd \
		"$pkgdir"/etc/conf.d/paste.sr.ht
	install -Dm644 "$srcdir"/paste.sr.ht.gunicorn.conf.py \
		"$pkgdir"/etc/sr.ht/paste.sr.ht.gunicorn.conf.py
}

_nginx() {
@@ -42,7 +45,10 @@ _nginx() {
		"$subpkgdir"/etc/nginx/http.d/paste.sr.ht.conf
}

sha512sums="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"
sha512sums="
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
"
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..6fd043a 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,6 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$PASTE_USER:$PASTE_USER"
	checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$PASTE_USER:$PASTE_USER"
	rm -rf "$prometheus_multiproc_dir"/*
}
diff --git a/sr.ht/todo.sr.ht/APKBUILD b/sr.ht/todo.sr.ht/APKBUILD
index 523cf1d..dad8b9b 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.64.26
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
fe46353b4d7db07009c922351fe180fe1f7cd86490d0bfbcdb2ed7a9da3a9d7531959c8c68ecb4e8a2a30c14e377b8866a5ecf56d02890aa94754fe37052914d  todo.sr.ht-0.64.26.tar.gz
691524a85946dce41d81bbad585fc84c98308b21cec5373b1e0cf2009e3c8592e3563ad816fb2ef2f1befe88c568584a5af277a77ca56367a2dec8222bd589b8  sr.ht-nginx-0.64.26.tar.gz
c6dd9422357614c1e1f6e4059849288e26d045b5f84160a202d300835e0b9bd402bc2e784ba6ff02774844dbe5e50206c3d272b6108bd2e890d71b4ce33e1091  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..935c786 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,6 @@ depend() {

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$TODO_USER:$TODO_USER"
	checkpath -d "$prometheus_multiproc_dir" -m 775 -o "$TODO_USER:$TODO_USER"
	rm -rf "$prometheus_multiproc_dir"/*
}
-- 
2.25.1
Can you summarize the motivations for this change?
> Using rm -rf for removing old files instead of checkpath -D because it
> straigt
> up doesn't work(https://github.com/OpenRC/openrc/issues/335)
> ---
> Took me a good while to get back on this. Tested in a VM with
> meta.sr.ht,
> everything seems to work, changes for other services are the same so
> shouldn't
> have any problems with that. One thing I'm not sure about is how the
> upgrade is
> going to go, as this changes files which are potentially editied by
> administrators.
> 
> Should need a careful review, lots of repetitive changes to many files,
> which is
> prone to errors. Everything seems OK to me, but one pair of eyes isn't
> enough
> for this.
> 
> sr.ht/builds.sr.ht/APKBUILD | 14 +++++++++-----
> 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 | 8 ++++++--
> 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 | 8 ++++++--
> 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 | 8 ++++++--
> sr.ht/hg.sr.ht/APKBUILD | 12 ++++++++----
> 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 | 8 ++++++--
> 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 | 8 ++++++--
> 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 | 8 ++++++--
> 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 | 8 ++++++--
> 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 | 8 ++++++--
> 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 | 8 ++++++--
> 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 | 8 ++++++--
> 40 files changed, 234 insertions(+), 69 deletions(-)
> 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
> index 417b795..2badba6
> --- 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.71.3
> 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
> +9b7d2de8d2ac35d5b68e5488d2985468df1948cf7cf2717a8e5d38b8a539e5c534f5f252c928f28ba12f5451f94aefebc0abc52dab4ce57f687f813b938a97e7
> builds.sr.ht-0.71.3.tar.gz
> +691524a85946dce41d81bbad585fc84c98308b21cec5373b1e0cf2009e3c8592e3563ad816fb2ef2f1befe88c568584a5af277a77ca56367a2dec8222bd589b8
> sr.ht-nginx-0.71.3.tar.gz
> +d205043f3fe0dc022d25f8714ad5fb095a7dc92a10fe4eb4a1c6d6a500b54692773c1e314e9337a320f9b6043225a9a5a9e50d9a5dc30e7c80305b7ad538ea0f
> builds.sr.ht.confd
> +cd0f08de63d0071fa02568c4bc87eb87c5132681f611bdff8eb7e1f5b3c1448799f573aec2178146adace3ec1d8eac1e419e27c3630d23d7e30753dfe5f55034
> 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
> +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..685c6fc 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,6 @@ depend() {
> 
> start_pre() {
> checkpath -f "$LOGS" -m 644 -o "$BUILDS_USER:$BUILDS_USER"
> + checkpath -d "$prometheus_multiproc_dir" -m 775 -o
> "$BUILDS_USER:$BUILDS_USER"
> + rm -rf "$prometheus_multiproc_dir"/*
oof I really don't like this. If the variable is unset then we run
rm -rf /*

Need to find a different approach