aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorPrzemyslaw Pawelczyk <przemoc@zoho.com>2016-06-17 03:47:32 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-06-20 13:35:25 +0000
commit701230873d785eb06a9e78e941bada0b4c868cd7 (patch)
treefed2a174b8805b151d4c749d6cb9a4c87ba23c47 /testing
parent6c0e846e12e780a2f46f3179ef9e6cdd3a413bbb (diff)
downloadaports-701230873d785eb06a9e78e941bada0b4c868cd7.tar.bz2
aports-701230873d785eb06a9e78e941bada0b4c868cd7.tar.xz
testing/buildbot-slave: Fix some stuff.
* APKBUILD: Leverage default_prepare and use builddir (no _). * APKBUILD: Introduce some constants for better DRY-ness, reformat package() function, create there a workdir (otherwise buildbot won't start). * buildslave.initd: Put openrc-run in shebang. It has not been tested, as buildslave setup is a bit more complicated. http://docs.buildbot.net/0.8.9/manual/installation.html#creating-a-buildslave
Diffstat (limited to 'testing')
-rw-r--r--testing/buildbot-slave/APKBUILD43
-rw-r--r--testing/buildbot-slave/buildslave.initd2
2 files changed, 26 insertions, 19 deletions
diff --git a/testing/buildbot-slave/APKBUILD b/testing/buildbot-slave/APKBUILD
index 959da40b6d..b8cdcacc96 100644
--- a/testing/buildbot-slave/APKBUILD
+++ b/testing/buildbot-slave/APKBUILD
@@ -11,42 +11,49 @@ depends="python py-twisted"
depends_dev=""
makedepends="python-dev py-setuptools"
install="buildbot-slave.pre-install"
+BUILDBOT_USER=buildbot
+BUILDBOT_GROUP=buildbot
+pkgusers="$BUILDBOT_USER"
+pkggroups="$BUILDBOT_GROUP"
subpackages=""
source="https://pypi.python.org/packages/source/b/buildbot-slave/buildbot-slave-$pkgver.tar.gz
buildslave.initd
buildslave.confd"
-_builddir="$srcdir"/buildbot-slave-$pkgver
+builddir="$srcdir"/$pkgname-$pkgver
+
prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
+ default_prepare || return 1
}
build() {
- cd "$_builddir"
+ cd "$builddir"
python setup.py build || return 1
}
package() {
- cd "$_builddir"
- python setup.py install --prefix=/usr --root="$pkgdir" || return 1
- install -m755 -D "$srcdir"/buildslave.initd \
- "$pkgdir"/etc/init.d/buildslave || return 1
- install -m644 -D "$srcdir"/buildslave.confd \
- "$pkgdir"/etc/conf.d/buildslave || return 1
+ cd "$builddir"
+ python setup.py install --prefix=/usr --root="$pkgdir" \
+ || return 1
+ install -D -m 755 \
+ "$srcdir"/buildslave.initd \
+ "$pkgdir"/etc/init.d/buildslave \
+ || return 1
+ install -D -m 644 \
+ "$srcdir"/buildslave.confd \
+ "$pkgdir"/etc/conf.d/buildslave \
+ || return 1
+ install -d -o $BUILDBOT_USER -g $BUILDBOT_GROUP \
+ "$pkgdir"/var/lib/buildslave \
+ || return 1
}
md5sums="b4c085dcad558b61af5233d1ea1ed750 buildbot-slave-0.8.9.tar.gz
-2247778c260d7d14745d1fed9d44e84e buildslave.initd
+6a07c39a20fd2de62eeac38332fc5ec4 buildslave.initd
3baaa33c0bc00e0fb6784f8c41482488 buildslave.confd"
sha256sums="864ca4a975bdbe3e973812a7d4ac7ffaf6f9ea5b6364e9ddb2fc92bccacf93af buildbot-slave-0.8.9.tar.gz
-9f4c8d6946ebda59966256856a58dc0eae8581aa072dc0a018fe2f6b50af4170 buildslave.initd
+5c3247e53ae214b4c1913e8eccbf7c43f8707ec217deb1f4ec6bec4f351fbf09 buildslave.initd
c324eee07561afd8be623b46cd8f50cbbac5f1e42f2c493aa75dbaace6dcfa6f buildslave.confd"
sha512sums="3cc6b0cafe752fcfe5b91b70faff249cffb2dbfc03274cccffccd739ec448b66986db171924d14ba4de85e843b2f67a36650bcb965f600ec1dd8278f6198a283 buildbot-slave-0.8.9.tar.gz
-b891240feaea7e96f5912f87ad88e45b9a877a1cb48d4dcac701f76ff5df212de52b84e5319df1d5064bce0c8aaf1ceac4af9b81d0fdb57a3840c6aefe0a3d6f buildslave.initd
+217a9e3f774bcc7e7773d6e3047dbbabe196d168f814485ae54d1a94b330616fd80ad82bfa67c9b6185c39b780eae7a71776e727810ff4df337baca44d5fdbda buildslave.initd
54fc03a82cebf874c18d1bd739a6640677cfcd540b47a9929e6f5d63a83bd64bee615b033a72b49ab5fa3da69b16ff657805392ab0a68e0d33e48581fc8bb017 buildslave.confd"
diff --git a/testing/buildbot-slave/buildslave.initd b/testing/buildbot-slave/buildslave.initd
index 17e22abdc7..587c7ccb3b 100644
--- a/testing/buildbot-slave/buildslave.initd
+++ b/testing/buildbot-slave/buildslave.initd
@@ -1,4 +1,4 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2