From ca184b1082a51b0179e8a2705af08c96e0c258a0 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 25 Nov 2018 09:41:56 -0500 Subject: [PATCH] Update builds.sr.ht package --- sr.ht/builds.sr.ht/APKBUILD | 10 ++++---- sr.ht/builds.sr.ht/builds.sr.ht-runner.initd | 25 -------------------- sr.ht/builds.sr.ht/builds.sr.ht-worker.initd | 20 ++++++++++++++++ 3 files changed, 24 insertions(+), 31 deletions(-) delete mode 100644 sr.ht/builds.sr.ht/builds.sr.ht-runner.initd create mode 100644 sr.ht/builds.sr.ht/builds.sr.ht-worker.initd diff --git a/sr.ht/builds.sr.ht/APKBUILD b/sr.ht/builds.sr.ht/APKBUILD index 5877e37..cd7fdb2 100644 --- a/sr.ht/builds.sr.ht/APKBUILD +++ b/sr.ht/builds.sr.ht/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Drew DeVault pkgname=builds.sr.ht -pkgver=0.4.6 +pkgver=0.29.6 pkgrel=0 pkgdesc="sr.ht build service" url="https://git.sr.ht/~sircmpwn/builds.sr.ht" @@ -12,14 +12,12 @@ depends=" py3-celery py3-redis py3-yaml - py3-markdown - py3-bleach " -makedepends="py-setuptools nodejs sassc" +makedepends="py-setuptools nodejs sassc go" subpackages="$pkgname-images" source=" http://git.sr.ht/~sircmpwn/$pkgname/snapshot/$pkgname-$pkgver.tar.xz - builds.sr.ht-runner.initd + builds.sr.ht-worker.initd " install="$pkgname.pre-install" builddir="$srcdir/$pkgname-$pkgver" @@ -41,7 +39,7 @@ images() { cd "$builddir" mkdir -p "$subpkgdir"/var/lib/ cp -R images "$subpkgdir"/var/lib/ - install -Dm755 "$srcdir"/builds.sr.ht-runner.initd "$subpkgdir"/etc/init.d/builds.sr.ht-runner + install -Dm755 "$srcdir"/builds.sr.ht-worker.initd "$subpkgdir"/etc/init.d/builds.sr.ht-worker } sha512sums="9eab18643eec0f282a564c2d49b96f184719707d35df5cc4fdced0c8157a9004a95dc0e878f989a1f9eaadd3171316d566b957f53206ddc837965d3c8242994d builds.sr.ht-0.4.6.tar.xz diff --git a/sr.ht/builds.sr.ht/builds.sr.ht-runner.initd b/sr.ht/builds.sr.ht/builds.sr.ht-runner.initd deleted file mode 100644 index e44b08d..0000000 --- a/sr.ht/builds.sr.ht/builds.sr.ht-runner.initd +++ /dev/null @@ -1,25 +0,0 @@ -#!/sbin/openrc-run -name="srht-runner" -description="builds.sr.ht build runner service" - -depend() { - need net -} - -nproc() { - grep "core id" /proc/cpuinfo | wc -l -} - -start() { - ebegin "Starting $name" - start-stop-daemon --background --make-pidfile --pidfile /run/$name.pid -u builds \ - --exec /usr/bin/celery -- \ - -A buildsrht.runner worker --loglevel=info -c $(nproc) - eend $? -} - -stop() { - ebegin "Stopping $name" - start-stop-daemon --stop --exec /usr/bin/celery --pidfile /run/$name.pid - eend $? -} diff --git a/sr.ht/builds.sr.ht/builds.sr.ht-worker.initd b/sr.ht/builds.sr.ht/builds.sr.ht-worker.initd new file mode 100644 index 0000000..89f5f81 --- /dev/null +++ b/sr.ht/builds.sr.ht/builds.sr.ht-worker.initd @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +name="srht-worker" +description="builds.sr.ht build worker" + +depend() { + need net +} + +start() { + ebegin "Starting $name" + start-stop-daemon --background --make-pidfile --pidfile /run/$name.pid -u builds \ + --exec /usr/bin/builds.sr.ht-worker + eend $? +} + +stop() { + ebegin "Stopping $name" + start-stop-daemon --stop --exec /usr/bin/builds.sr.ht-worker --pidfile /run/$name.pid + eend $? +} -- 2.45.2