diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2013-10-09 07:37:14 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2013-10-09 07:38:38 +0000 |
commit | 839bdebd48f32e993bc8d1ff1ceb826a9ee7039d (patch) | |
tree | fcbad821918d621b9ef409b91b52fe7e8148ee56 /testing/buildbot-slave | |
parent | e980ad2e29a93652505f0c6c04c9e12538b43392 (diff) | |
download | aports-839bdebd48f32e993bc8d1ff1ceb826a9ee7039d.tar.bz2 aports-839bdebd48f32e993bc8d1ff1ceb826a9ee7039d.tar.xz |
testing/buildbot-slave: new aport
Diffstat (limited to 'testing/buildbot-slave')
-rw-r--r-- | testing/buildbot-slave/APKBUILD | 52 | ||||
-rw-r--r-- | testing/buildbot-slave/buildbot-slave.pre-install | 4 | ||||
-rw-r--r-- | testing/buildbot-slave/buildslave.confd | 9 | ||||
-rw-r--r-- | testing/buildbot-slave/buildslave.initd | 48 |
4 files changed, 113 insertions, 0 deletions
diff --git a/testing/buildbot-slave/APKBUILD b/testing/buildbot-slave/APKBUILD new file mode 100644 index 0000000000..02a88c9e15 --- /dev/null +++ b/testing/buildbot-slave/APKBUILD @@ -0,0 +1,52 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: +pkgname=buildbot-slave +pkgver=0.8.8 +pkgrel=0 +pkgdesc="Buildbot slave daemon" +url="http://buildbot.net/" +arch="noarch" +license="GPL-2" +depends="python py-twisted" +depends_dev="" +makedepends="python-dev py-setuptools" +install="buildbot-slave.pre-install" +subpackages="" +source="https://buildbot.googlecode.com/files/buildbot-slave-$pkgver.tar.gz + buildslave.initd + buildslave.confd" + +_builddir="$srcdir"/buildbot-slave-$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 +} + +build() { + 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 +} + +md5sums="9854d1df35cb09a5320b30b76eefd9ba buildbot-slave-0.8.8.tar.gz +2247778c260d7d14745d1fed9d44e84e buildslave.initd +3baaa33c0bc00e0fb6784f8c41482488 buildslave.confd" +sha256sums="8b7532d4d34527aea41e353d1bc3c35291ec335d3224c27800d2cc0cfc9837cc buildbot-slave-0.8.8.tar.gz +9f4c8d6946ebda59966256856a58dc0eae8581aa072dc0a018fe2f6b50af4170 buildslave.initd +c324eee07561afd8be623b46cd8f50cbbac5f1e42f2c493aa75dbaace6dcfa6f buildslave.confd" +sha512sums="1a5b02298696016a8743bc81e7e899a8bc11a09481f6c911cf4d3e016d111d707ca393d102635c4841d5f2ec5f3a0c9413dc0768170415a59c7523a3bc680fd1 buildbot-slave-0.8.8.tar.gz +b891240feaea7e96f5912f87ad88e45b9a877a1cb48d4dcac701f76ff5df212de52b84e5319df1d5064bce0c8aaf1ceac4af9b81d0fdb57a3840c6aefe0a3d6f buildslave.initd +54fc03a82cebf874c18d1bd739a6640677cfcd540b47a9929e6f5d63a83bd64bee615b033a72b49ab5fa3da69b16ff657805392ab0a68e0d33e48581fc8bb017 buildslave.confd" diff --git a/testing/buildbot-slave/buildbot-slave.pre-install b/testing/buildbot-slave/buildbot-slave.pre-install new file mode 100644 index 0000000000..4d8bb4e6c9 --- /dev/null +++ b/testing/buildbot-slave/buildbot-slave.pre-install @@ -0,0 +1,4 @@ +#!/bin/sh +adduser -h /var/lib/buildbot -g buildbot -D -s /sbin/nologin buildbot 2>/dev/null +exit 0 + diff --git a/testing/buildbot-slave/buildslave.confd b/testing/buildbot-slave/buildslave.confd new file mode 100644 index 0000000000..4ef42c4a73 --- /dev/null +++ b/testing/buildbot-slave/buildslave.confd @@ -0,0 +1,9 @@ +# Path to the build slave's basedir. +BASEDIR="/var/lib/buildslave" + +# User account for the buildslave. +# The basedir should be owned by this user. +USERNAME="buildbot" + +# Extra options passed to twistd. +TWISTD_OPTS="" diff --git a/testing/buildbot-slave/buildslave.initd b/testing/buildbot-slave/buildslave.initd new file mode 100644 index 0000000000..17e22abdc7 --- /dev/null +++ b/testing/buildbot-slave/buildslave.initd @@ -0,0 +1,48 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net +} + +checkconfig() { + if [ -z "${BASEDIR}" ]; then + eerror "BASEDIR not set" + return 1 + fi + if [ -z "${USERNAME}" ]; then + eerror "USERNAME not set" + return 1 + fi + if [ ! -d "${BASEDIR}" ]; then + eerror "${BASEDIR} is not a directory" + return 1 + fi + if [ ! -e "${BASEDIR}/buildbot.tac" ]; then + eerror "${BASEDIR} does not contain buildbot.tac" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting buildslave in ${BASEDIR}" + # We set HOME here to make something valid show up in the env of child + # processes spawned by the buildslave. + start-stop-daemon --start -u "${USERNAME}" \ + --pidfile "${BASEDIR}/buildslave.pid" \ + --env HOME="${BASEDIR}" \ + --exec /usr/bin/python -- /usr/bin/twistd \ + --no_save \ + --logfile="${BASEDIR}/twistd.log" \ + --pidfile="${BASEDIR}/buildslave.pid" \ + --python="${BASEDIR}/buildbot.tac" + eend $? +} + +stop() { + ebegin "Stopping buildslave in ${BASEDIR}" + start-stop-daemon --stop --pidfile "${BASEDIR}/buildslave.pid" + eend $? +} |