~dricottone/huttese-apk

79c2dc9a5247fe7c5524e9d814fea1557b938e40 — Drew DeVault 5 years ago 51e82cc
meta.sr.ht: normalize init scripts
9 files changed, 72 insertions(+), 70 deletions(-)

M sr.ht/meta.sr.ht/APKBUILD
A sr.ht/meta.sr.ht/meta.sr.ht-webhooks.confd
D sr.ht/meta.sr.ht/meta.sr.ht-webhooks.init
A sr.ht/meta.sr.ht/meta.sr.ht-webhooks.initd
A sr.ht/meta.sr.ht/meta.sr.ht.confd
R sr.ht/meta.sr.ht/{meta.sr.ht.init => meta.sr.ht.initd}
M sr.ht/py-alembic/APKBUILD
M sr.ht/py-misaka/APKBUILD
M sr.ht/py3-srht/APKBUILD
M sr.ht/meta.sr.ht/APKBUILD => sr.ht/meta.sr.ht/APKBUILD +17 -8
@@ 1,6 1,6 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=meta.sr.ht
pkgver=0.9.8
pkgver=0.31.2
pkgrel=0
pkgdesc="sr.ht account service"
url="https://git.sr.ht/~sircmpwn/meta.sr.ht"


@@ 23,8 23,10 @@ makedepends="py-setuptools nodejs sassc"
subpackages="${pkgname}-openrc"
source="
	$pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/$pkgname/archive/$pkgver.tar.gz
	meta.sr.ht.init
	meta.sr.ht-webhooks.init
	meta.sr.ht.initd
	meta.sr.ht.confd
	meta.sr.ht-webhooks.initd
	meta.sr.ht-webhooks.confd
"
builddir="$srcdir/$pkgname-$pkgver"
export PKGVER=$pkgver


@@ 39,11 41,18 @@ build() {
package() {
	cd "$builddir"
	python3 setup.py install --root="$pkgdir" --optimize=1
	install -Dm755 "$srcdir"/meta.sr.ht.init "$pkgdir"/etc/init.d/meta.sr.ht
	install -Dm755 "$srcdir"/meta.sr.ht-webhooks.init \
	install -Dm755 "$srcdir"/meta.sr.ht.initd \
		"$pkgdir"/etc/init.d/meta.sr.ht
	install -Dm644 "$srcdir"/meta.sr.ht.confd \
		"$pkgdir"/etc/conf.d/meta.sr.ht
	install -Dm755 "$srcdir"/meta.sr.ht-webhooks.initd \
		"$pkgdir"/etc/init.d/meta.sr.ht-webhooks
	install -Dm644 "$srcdir"/meta.sr.ht-webhooks.confd \
		"$pkgdir"/etc/conf.d/meta.sr.ht-webhooks
}

sha512sums="3f6559de738796ea522fff2ed1aa592bbae4ba56f59535fb66885deb832b5189fd023b108a63427e94128cd5dc71491c76d1e0104b51f20f758bd3fa89168c16  meta.sr.ht-0.9.8.tar.xz
c149ba165ce153a13f55ce4b46427e6a7f7dc97ce7bbd776e6d56255b90edb52cc02f80c83e59dd11a67efd1ef0fe9e2a2812ca171d215df15513a1ca60ba597  meta.sr.ht.init
2f002245a570ae7e51063f488e5199cb34de71762d1fdf0605463923a02b6d81d20c7bc5777f6c984b2f58906b0378fe53b456d76f56a06ec865db1e3923d8c8  meta.sr.ht-webhooks.init"
sha512sums="6e592c84715e2af400a80855b805f3017f56bd4c708a2fa7103b96d38a687a51bf4da24f176147aa450bb6b44ccb6dd8a70289871b2e299d82e2fcda75352119  meta.sr.ht-0.31.1.tar.gz
16674a3b4011c0900158af7ad8e241a26d83a2a4edb01c21256073b8373da977efc4f581992f9c4b1917423b3680c71e5e0364748ab9f375205393298ceccdbe  meta.sr.ht.initd
6ee005b75d1a277a3795a0b91eb88c490f27f4053cad5d74051140e812ee5514c77a334f37cd70a3ef7be02feae4a0688e9c06401cd530d3d56b3441c3d57a54  meta.sr.ht.confd
10b4cc09f13c61352c5d0be895eb0012b2781e7a4e11d95dd2787ad31295ec3098f0355fc2b28acae010b080241064168a5ad0d837065e8d24ba4e174bbaa2b6  meta.sr.ht-webhooks.initd
b055504df3b8ede19aa50d36d97c255f6310dbc6e4fd62f6776beb8d62d0592b761819ecb3120754dbb8ad0b48c04b41bae95a2264de0d96de9e1bee70bc2693  meta.sr.ht-webhooks.confd"

A sr.ht/meta.sr.ht/meta.sr.ht-webhooks.confd => sr.ht/meta.sr.ht/meta.sr.ht-webhooks.confd +8 -0
@@ 0,0 1,8 @@
# Run the daemon as this user:
# META_USER=meta

# Extra arguments to pass to Gunicorn
# META_ARGS=

# If no, use an external postgresql server
# LOCAL_PG=yes

D sr.ht/meta.sr.ht/meta.sr.ht-webhooks.init => sr.ht/meta.sr.ht/meta.sr.ht-webhooks.init +0 -36
@@ 1,36 0,0 @@
#!/sbin/openrc-run
name="meta.sr.ht-webhooks"
description="meta.sr.ht webhook delivery service"

# Override these with /etc/conf.d/meta.sr.ht-webhooks
META_USER=${META_USER:-meta}
LOCAL_PG=${LOCAL_PG:-yes}
LOGS=/var/log/meta.sr.ht-webhooks.log

depend() {
	need net
	need redis
	[ "$LOCAL_PG" == "yes" ] && need postgresql
}

start() {
	ebegin "Starting $name"
	touch "$LOGS"
	chown ${META_USER} "$LOGS"
	start-stop-daemon \
		-u ${META_USER} \
		-1 "$LOGS" \
		-2 "$LOGS" \
		--background \
		--make-pidfile \
		--pidfile /run/$name.pid \
		--exec /usr/bin/celery -- \
			-A metasrht.webhooks worker --loglevel=info
	eend $?
}

stop() {
	ebegin "Stopping $name"
	start-stop-daemon --stop --exec /usr/bin/celery --pidfile /run/$name.pid
	eend $?
}

A sr.ht/meta.sr.ht/meta.sr.ht-webhooks.initd => sr.ht/meta.sr.ht/meta.sr.ht-webhooks.initd +22 -0
@@ 0,0 1,22 @@
#!/sbin/openrc-run
name="meta.sr.ht-webhooks"
description="meta.sr.ht webhook delivery service"
META_USER=${META_USER:-meta}
LOCAL_PG=${LOCAL_PG:-yes}
META_ARGS=${META_ARGS:-}
LOGS=/var/log/meta.sr.ht-webhooks.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
command="/usr/bin/celery"
command_args="-A metasrht.webhooks worker --loglevel=info $META_ARGS"
command_user="$META_USER:$META_USER"
pidfile="/run/${RC_SVCNAME}.pid"

depend() {
	need net
	need redis
	[ "$LOCAL_PG" == "yes" ] && need postgresql
}

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$META_USER:$META_USER"
}

A sr.ht/meta.sr.ht/meta.sr.ht.confd => sr.ht/meta.sr.ht/meta.sr.ht.confd +14 -0
@@ 0,0 1,14 @@
# Run the daemon as this user:
# META_USER=meta

# Bind the web service to this address:
# META_BIND=127.0.0.1:5001

# Extra arguments to pass to Gunicorn
# META_ARGS=

# If no, use an external postgresql server
# LOCAL_PG=yes

# If no, use an external redis server
# LOCAL_REDIS=yes

R sr.ht/meta.sr.ht/meta.sr.ht.init => sr.ht/meta.sr.ht/meta.sr.ht.initd +7 -22
@@ 1,14 1,17 @@
#!/sbin/openrc-run
name="meta.sr.ht"
description="meta.sr.ht service"

# Override these with /etc/conf.d/meta.sr.ht
META_USER=${META_USER:-meta}
META_BIND=${META_BIND:-127.0.0.1:5000}
META_ARGS=${META_ARGS:-}
LOCAL_PG=${LOCAL_PG:-yes}
LOCAL_REDIS=${LOCAL_REDIS:-yes}
LOGS=/var/log/meta.sr.ht.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
command="/usr/bin/gunicorn"
command_args="metasrht.app:app_dispatch -b $META_BIND $META_ARGS"
command_user="$META_USER:$META_USER"
pidfile="/run/${RC_SVCNAME}.pid"

depend() {
	need net


@@ 16,24 19,6 @@ depend() {
	[ "$LOCAL_PG" = "yes" ] && need postgresql
}

start() {
	ebegin "Starting $name"
	touch "$LOGS"
	chown $META_USER "$LOGS"
	start-stop-daemon \
		-u $META_USER \
		-1 "$LOGS" \
		-2 "$LOGS" \
		--background \
		--make-pidfile \
		--pidfile /run/$name.pid \
		--exec /usr/bin/gunicorn -- \
			metasrht.app:app_dispatch -b ${META_BIND} ${META_ARGS}
	eend $?
}

stop() {
	ebegin "Stopping $name"
	start-stop-daemon --stop --exec /usr/bin/gunicorn --pidfile /run/$name.pid
	eend $?
start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$META_USER:$META_USER"
}

M sr.ht/py-alembic/APKBUILD => sr.ht/py-alembic/APKBUILD +1 -1
@@ 3,7 3,7 @@
pkgname=py-alembic
_pkgname=alembic
pkgver=0.9.6
pkgrel=0
pkgrel=1
pkgdesc="Lightweight database migration tool for usage with SQLAlchemy"
url="https://bitbucket.org/zzzeek/alembic"
arch="noarch"

M sr.ht/py-misaka/APKBUILD => sr.ht/py-misaka/APKBUILD +1 -1
@@ 2,7 2,7 @@
pkgname=py-misaka
_pkgname=misaka
pkgver=2.1.1
pkgrel=0
pkgrel=1
pkgdesc="A Python binding for Hoedown"
url="http://misaka.61924.nl/"
arch="all"

M sr.ht/py3-srht/APKBUILD => sr.ht/py3-srht/APKBUILD +2 -2
@@ 1,7 1,7 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgbase=core.sr.ht
pkgname=py3-srht
pkgver=0.11.3
pkgver=0.49.0
pkgrel=0
pkgdesc="sr.ht shared code"
url="https://git.sr.ht/~sircmpwn/core.sr.ht"


@@ 53,4 53,4 @@ package() {
	python3 setup.py install --root="$pkgdir" --optimize=1
}

sha512sums="85372540e058544612b52775c41647ebf7158bb2eca2e14012038746719bc9313110d3f9599a5dccf5235d95bdfdc86a68877305f4dc6b120ec3a20b1148972d  srht-0.11.3.tar.xz"
sha512sums="9862d7e8e1c17fb1ed990bf8ea23c0ff2d9b3e1cf9c355526c1cdd68e54a209e3463b6612ceb58dbfb29c1df04685de7a52e47ad645ade25bc91db873605bf46  core.sr.ht-0.49.0.tar.gz"