From de512ca534b7f8c089f44eb2c60a82b4c7f87520 Mon Sep 17 00:00:00 2001 From: Dominic Ricottone Date: Sat, 5 Oct 2024 10:24:20 -0500 Subject: [PATCH] sr.ht packages fix The gunicorn scripts were catching way too many exceptions and crashing. I've replaced them with cronjobs to restart the core services on regular intervals. --- Makefile | 6 +++++- src/builds.sr.ht/APKBUILD | 6 +----- src/builds.sr.ht/builds.sr.ht.gunicorn.conf.py | 5 ----- src/git.sr.ht/APKBUILD | 4 ++-- src/git.sr.ht/git.sr.ht.gunicorn.conf.py | 3 --- src/lists.sr.ht/APKBUILD | 4 ++-- src/lists.sr.ht/lists.sr.ht.gunicorn.conf.py | 3 --- src/meta.sr.ht/APKBUILD | 5 ++--- src/meta.sr.ht/meta.sr.ht.gunicorn.conf.py | 3 --- src/py3-ansi2html/src/ansi2html-1.9.1.tar.gz | 1 + src/py3-srht/APKBUILD | 12 +++++++----- src/todo.sr.ht/APKBUILD | 4 ++-- src/todo.sr.ht/todo.sr.ht.gunicorn.conf.py | 3 --- 13 files changed, 22 insertions(+), 37 deletions(-) delete mode 100644 src/builds.sr.ht/builds.sr.ht.gunicorn.conf.py create mode 120000 src/py3-ansi2html/src/ansi2html-1.9.1.tar.gz diff --git a/Makefile b/Makefile index c086315..6b50504 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,11 @@ shell: $(MOUNTS) registry.intra.dominic-ricottone.com/apkbuilder:latest build: pkg - DOCKER_API_VERSION=1.44 simple-builder -repository $(REPO)/x86_64 -build + docker pull --platform linux/amd64 registry.intra.dominic-ricottone.com/apkbuilder:latest + simple-builder -repository $(REPO)/x86_64 -build + docker image rm registry.intra.dominic-ricottone.com/apkbuilder:latest + docker pull --platform linux/arm64 registry.intra.dominic-ricottone.com/apkbuilder:latest DOCKER_API_VERSION=1.44 simple-builder -repository $(REPO)/aarch64 -build + docker image rm registry.intra.dominic-ricottone.com/apkbuilder:latest .PHONY: clean ls shell build diff --git a/src/builds.sr.ht/APKBUILD b/src/builds.sr.ht/APKBUILD index 1eb39d0..ad9f9f6 100755 --- a/src/builds.sr.ht/APKBUILD +++ b/src/builds.sr.ht/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Drew DeVault pkgname=builds.sr.ht pkgver=0.85.6 -pkgrel=0 +pkgrel=1 pkgdesc="sr.ht build service" url="https://git.sr.ht/~sircmpwn/builds.sr.ht" arch="all" @@ -31,7 +31,6 @@ 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" @@ -56,8 +55,6 @@ 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() { @@ -95,5 +92,4 @@ a507ea33f4e87d41d68b42f816914d357ff687e249e424f2278e3c44e980774080377ca5daa02212 e48c2c1ab073a2e8c900bea336004be6f792c5151dc3af4ea3625fd403959b6959d816acfbd8e3f0faae35ed10626c64616fad701bf5212b0c198b554483721d builds.sr.ht-api.initd 5aa18804ddfee263763b035780679b98cf4877de193c254f24fab7ce56f304556af9a377bfca36635c21b4380892e8d458a420021919934080cc43feda1694c4 builds.sr.ht-worker.confd 074627ee36977e9ded111fa746afab36719065d3eb063b212fefd2371f59cb88a12067ca66951b014dab0d6668c682e3fbd18c7b3cf430e432490aca8e0f1ed4 builds.sr.ht-worker.initd -21f39ea0981d7773eb512e5ba234022364d0f7ee9b6ca897ce4c51e3b127eb2d9a7a5fbcaa06d14f20b2df2439421d7261f200e3f4f13b45a91e78ba77bc363c builds.sr.ht.gunicorn.conf.py " diff --git a/src/builds.sr.ht/builds.sr.ht.gunicorn.conf.py b/src/builds.sr.ht/builds.sr.ht.gunicorn.conf.py deleted file mode 100644 index aa3e7ae..0000000 --- a/src/builds.sr.ht/builds.sr.ht.gunicorn.conf.py +++ /dev/null @@ -1,5 +0,0 @@ -from prometheus_client import multiprocess - - -def child_exit(server, worker): - multiprocess.mark_process_dead(worker.pid) diff --git a/src/git.sr.ht/APKBUILD b/src/git.sr.ht/APKBUILD index ed91e1b..0e4db44 100644 --- a/src/git.sr.ht/APKBUILD +++ b/src/git.sr.ht/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Drew DeVault pkgname=git.sr.ht pkgver=0.85.8 -pkgrel=0 +pkgrel=1 pkgdesc="sr.ht git service" url="https://git.sr.ht/~sircmpwn/git.sr.ht" arch="all" @@ -77,5 +77,5 @@ bab6312b5a6d1bd9808cb6eae2b33f1fc4f544ac286ce9a67f4c07fc8d4679dc81d93f3d1ec7f8ad 938a8aefdea3e4c6a9b15ac1c10d789282443c5b6cd1fee662d86af261cf69d8b67435f3bcececcd64544bd147addbd2792fcdbf67b9a36975e0e5e00f337719 git.sr.ht-api.confd 4038c7375d50ab393d076d31d776e82a2fcd54d6edcd55eb864fcc8d7254646799b4ee05a2e1f75f3a79e660e802a0fa05d9e34c16870aebe33dbf8191ed386a git.sr.ht-webhooks.initd acd385323da772e1163b690eafca3b3a59e13bf236bb279c08a383a9ab2b356b4f1b7dce18f235882ba79c8ac35a6fa7594aad260962b38f7df70886e4fcace5 git.sr.ht-webhooks.confd -39c12898976aa3b5896ed8287216cf4f2ed4998722891e1b5e507070df86f9111286396eb82cc01b3faaf1016b51db47d077fc4b1b7d72e3782f936c89fb3e37 git.sr.ht.gunicorn.conf.py +08486bf6bd4a9061a12cc62b5b010d5fde4269be2ea80895579a117bb6cfdf10dbb40536201d122596c94e189222c20df6127b586b75e0920e330004dcc7902c git.sr.ht.gunicorn.conf.py " diff --git a/src/git.sr.ht/git.sr.ht.gunicorn.conf.py b/src/git.sr.ht/git.sr.ht.gunicorn.conf.py index ce18c2c..c8d84e8 100644 --- a/src/git.sr.ht/git.sr.ht.gunicorn.conf.py +++ b/src/git.sr.ht/git.sr.ht.gunicorn.conf.py @@ -1,4 +1,3 @@ -from prometheus_client import multiprocess import traceback import io @@ -8,5 +7,3 @@ def worker_abort(worker): traceback.print_stack(file=debug_info) worker.log.critical(debug_info.getvalue()) -def child_exit(server, worker): - multiprocess.mark_process_dead(worker.pid) diff --git a/src/lists.sr.ht/APKBUILD b/src/lists.sr.ht/APKBUILD index 2a4f762..bdc9f3a 100644 --- a/src/lists.sr.ht/APKBUILD +++ b/src/lists.sr.ht/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Drew DeVault pkgname=lists.sr.ht pkgver=0.57.15 -pkgrel=0 +pkgrel=1 pkgdesc="sr.ht mailing list service" url="https://git.sr.ht/~sircmpwn/lists.sr.ht" arch="all" @@ -90,5 +90,5 @@ b70ef07ee3247b33167111e301804d69416e8ebe020ea28587a4fd7d8fa0a81c7228309a5aa344d8 47e703f2820bc6161909eb5434cba80b4c801fd4f18ee2b984afb217bbe43f21391ff86a8855d470b122131db1f2714a7c8c5aa58a6666123a8520327bdc0b11 lists.sr.ht-lmtp.confd 5f06d373d62096eea3c1bc6cabc220151f23705cd544be4b73d3ef488a4cffebfa5bd72455af7a1fc3b10fe08a894737fe627a1e2e2395a22d4bd08bd3042586 lists.sr.ht-webhooks.initd 66d114850cc9002a2491458fb91947da35010e521f28a89828b0fd5ef76463a8298bd4f921f22a67c70cfc85cdf13a62a8eee71925eb6e531d81e36ff1e78982 lists.sr.ht-webhooks.confd -39c12898976aa3b5896ed8287216cf4f2ed4998722891e1b5e507070df86f9111286396eb82cc01b3faaf1016b51db47d077fc4b1b7d72e3782f936c89fb3e37 lists.sr.ht.gunicorn.conf.py +08486bf6bd4a9061a12cc62b5b010d5fde4269be2ea80895579a117bb6cfdf10dbb40536201d122596c94e189222c20df6127b586b75e0920e330004dcc7902c lists.sr.ht.gunicorn.conf.py " diff --git a/src/lists.sr.ht/lists.sr.ht.gunicorn.conf.py b/src/lists.sr.ht/lists.sr.ht.gunicorn.conf.py index ce18c2c..c8d84e8 100644 --- a/src/lists.sr.ht/lists.sr.ht.gunicorn.conf.py +++ b/src/lists.sr.ht/lists.sr.ht.gunicorn.conf.py @@ -1,4 +1,3 @@ -from prometheus_client import multiprocess import traceback import io @@ -8,5 +7,3 @@ def worker_abort(worker): traceback.print_stack(file=debug_info) worker.log.critical(debug_info.getvalue()) -def child_exit(server, worker): - multiprocess.mark_process_dead(worker.pid) diff --git a/src/meta.sr.ht/APKBUILD b/src/meta.sr.ht/APKBUILD index 15ed5db..87162e7 100644 --- a/src/meta.sr.ht/APKBUILD +++ b/src/meta.sr.ht/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Drew DeVault pkgname=meta.sr.ht pkgver=0.69.4 -pkgrel=0 +pkgrel=1 pkgdesc="sr.ht account service" url="https://git.sr.ht/~sircmpwn/meta.sr.ht" arch="all" @@ -14,7 +14,6 @@ depends=" py3-redis py3-srht py3-zxcvbn - redis " makedepends="py-setuptools sassc go minify" subpackages="$pkgname-openrc $pkgname-billing:_billing:noarch $pkgname-nginx:_nginx:noarch" @@ -81,5 +80,5 @@ fbff1755c572da66c351004690530d875c882a65576cc641399e07dfb39e818105be1370f6ba28c6 36550c28b15fbdf32051591a9231035852916ae701521afa00b7da5959ec08c6eca74714ecea3b8d5f35d41c388aadd61ddfeee9a270cefdadf9be32b0ced145 meta.sr.ht-api.confd 26db23b2302c5a3a3dcb6068f0bc57d932a24ff8bcf288b8d8e1ca2385ee05603eded26e19b73c40adc96b8a0d2fad64c4f28526d69bcbc61981df8acc3efb11 meta.sr.ht-webhooks.initd 0091092a0f0f77158c571e0731470239034cd1480657755ca0537ab4d00002d60b444bcd7df12bfc86b4ca79f5cfed51722079a46a44abc8bf2ba6a7e1111a7c meta.sr.ht-webhooks.confd -39c12898976aa3b5896ed8287216cf4f2ed4998722891e1b5e507070df86f9111286396eb82cc01b3faaf1016b51db47d077fc4b1b7d72e3782f936c89fb3e37 meta.sr.ht.gunicorn.conf.py +08486bf6bd4a9061a12cc62b5b010d5fde4269be2ea80895579a117bb6cfdf10dbb40536201d122596c94e189222c20df6127b586b75e0920e330004dcc7902c meta.sr.ht.gunicorn.conf.py " diff --git a/src/meta.sr.ht/meta.sr.ht.gunicorn.conf.py b/src/meta.sr.ht/meta.sr.ht.gunicorn.conf.py index ce18c2c..c8d84e8 100644 --- a/src/meta.sr.ht/meta.sr.ht.gunicorn.conf.py +++ b/src/meta.sr.ht/meta.sr.ht.gunicorn.conf.py @@ -1,4 +1,3 @@ -from prometheus_client import multiprocess import traceback import io @@ -8,5 +7,3 @@ def worker_abort(worker): traceback.print_stack(file=debug_info) worker.log.critical(debug_info.getvalue()) -def child_exit(server, worker): - multiprocess.mark_process_dead(worker.pid) diff --git a/src/py3-ansi2html/src/ansi2html-1.9.1.tar.gz b/src/py3-ansi2html/src/ansi2html-1.9.1.tar.gz new file mode 120000 index 0000000..47bc3cc --- /dev/null +++ b/src/py3-ansi2html/src/ansi2html-1.9.1.tar.gz @@ -0,0 +1 @@ +/var/cache/distfiles/ansi2html-1.9.1.tar.gz \ No newline at end of file diff --git a/src/py3-srht/APKBUILD b/src/py3-srht/APKBUILD index 9b4c70e..3804cc4 100644 --- a/src/py3-srht/APKBUILD +++ b/src/py3-srht/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Drew DeVault pkgbase=core.sr.ht pkgname=py3-srht -pkgver=0.71.5 +pkgver=0.73.0 pkgrel=0 pkgdesc="sr.ht shared code" url="https://git.sr.ht/~sircmpwn/core.sr.ht" @@ -28,7 +28,9 @@ depends=" py3-tinycss2 " makedepends=" - py-setuptools + py3-build + py3-installer + py3-setuptools minify git " @@ -50,16 +52,16 @@ prepare() { build() { cd "$builddir" export PKGVER=$pkgver - python3 setup.py build + python3 -m build --wheel } package() { cd "$builddir" export PKGVER=$pkgver - python3 setup.py install --root="$pkgdir" --optimize=1 + python3 -m installer --destdir="$pkgdir" --compile-bytecode=1 dist/*.whl } sha512sums=" -f0ac8c320dccbbb31c00ef1e9986f6ed2955d2f8903fdb08401c27da1766e2f0a55d79d40d6fbcb4d418115039386e1269b92578b896fb827ba3bfeb622dd23a core.sr.ht-0.71.5.tar.gz +7c6fed10bb4db723cb2a0541adaedb57d3121b319eef702bd6cc368f915c7a6835af270beb1d2d020d093fa2cc40911e3726300b4687a2a8a45cab12d83283b4 core.sr.ht-0.73.0.tar.gz " diff --git a/src/todo.sr.ht/APKBUILD b/src/todo.sr.ht/APKBUILD index e9046ee..307892d 100644 --- a/src/todo.sr.ht/APKBUILD +++ b/src/todo.sr.ht/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Drew DeVault pkgname=todo.sr.ht pkgver=0.75.8 -pkgrel=0 +pkgrel=1 pkgdesc="sr.ht ticket tracking service" url="https://git.sr.ht/~sircmpwn/todo.sr.ht" arch="all" @@ -79,5 +79,5 @@ befda599f189e99b542ebaf5dd17739169bf73a1499c9de92a98778bd108bb9813e1838e461ced49 0e23d03aaf3a435b875716c02f5aa1474e652c5737f12ba8c1a899c3838a9b1ef8d72fc9ad9fa6d98120ba638352a4ad767aae0bb2c1091ad4a6d7a21cb001fb todo.sr.ht-webhooks.initd 6d096a0559db2c689938e0f0c24d0158efe836dec209f694256f2803494884f206cab423cd5d3b08a68c9446aa2aff1eca0a95da31088fa8a9628becbf344215 todo.sr.ht-api.confd a1b4901c6e18bc5826bb359941c99b53143f2b4ecdddf6fbba89c78fa4721578720d9a60fe95d4a4d382ef98cf1c3ad3e3f75d5d46782b1ec349c0c2adc7164b todo.sr.ht-api.initd -39c12898976aa3b5896ed8287216cf4f2ed4998722891e1b5e507070df86f9111286396eb82cc01b3faaf1016b51db47d077fc4b1b7d72e3782f936c89fb3e37 todo.sr.ht.gunicorn.conf.py +08486bf6bd4a9061a12cc62b5b010d5fde4269be2ea80895579a117bb6cfdf10dbb40536201d122596c94e189222c20df6127b586b75e0920e330004dcc7902c todo.sr.ht.gunicorn.conf.py " diff --git a/src/todo.sr.ht/todo.sr.ht.gunicorn.conf.py b/src/todo.sr.ht/todo.sr.ht.gunicorn.conf.py index ce18c2c..c8d84e8 100644 --- a/src/todo.sr.ht/todo.sr.ht.gunicorn.conf.py +++ b/src/todo.sr.ht/todo.sr.ht.gunicorn.conf.py @@ -1,4 +1,3 @@ -from prometheus_client import multiprocess import traceback import io @@ -8,5 +7,3 @@ def worker_abort(worker): traceback.print_stack(file=debug_info) worker.log.critical(debug_info.getvalue()) -def child_exit(server, worker): - multiprocess.mark_process_dead(worker.pid) -- 2.45.2