diff options
Diffstat (limited to 'unmaintained')
-rw-r--r-- | unmaintained/buildbot/APKBUILD | 56 | ||||
-rw-r--r-- | unmaintained/buildbot/buildbot.pre-install | 6 | ||||
-rw-r--r-- | unmaintained/buildbot/buildmaster.confd | 10 | ||||
-rw-r--r-- | unmaintained/buildbot/buildmaster.initd | 69 |
4 files changed, 141 insertions, 0 deletions
diff --git a/unmaintained/buildbot/APKBUILD b/unmaintained/buildbot/APKBUILD new file mode 100644 index 0000000000..743275e4f9 --- /dev/null +++ b/unmaintained/buildbot/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=buildbot +pkgver=1.6.0 +pkgrel=0 +pkgdesc="Continuous integration testing framework" +url="http://buildbot.net/" +arch="noarch" +license="GPL-2.0" +depends="python2 py-twisted py-simplejson py2-sqlalchemy + py2-pysqlite py-jinja2 py2-sqlalchemy-migrate + py-dateutil py-setuptools" +depends_dev="" +makedepends="python2-dev" +install="${pkgname}.pre-install" +BUILDBOT_USER=buildbot +BUILDBOT_GROUP=buildbot +pkgusers="$BUILDBOT_USER" +pkggroups="$BUILDBOT_GROUP" +subpackages="$pkgname-openrc" +source="https://files.pythonhosted.org/packages/source/${pkgname:0:1}/$pkgname/$pkgname-${pkgver/_/}.tar.gz + buildmaster.initd + buildmaster.confd" + +builddir="$srcdir"/$pkgname-${pkgver/_/} + +check() { + cd "$builddir" + python2 setup.py check +} + +prepare() { + default_prepare +} + +build() { + cd "$builddir" + python2 setup.py build +} + +package() { + cd "$builddir" + python2 setup.py install --prefix=/usr --root="$pkgdir" + install -D -m 755 \ + "$srcdir"/buildmaster.initd \ + "$pkgdir"/etc/init.d/buildmaster + install -D -m 644 \ + "$srcdir"/buildmaster.confd \ + "$pkgdir"/etc/conf.d/buildmaster + install -d -o $BUILDBOT_USER -g $BUILDBOT_GROUP \ + "$pkgdir"/var/lib/buildmaster +} + +sha512sums="1d54bf5b0932b8bb21e0c6a8b8545eccfa48af56dd751d97ab9f8540c0e1735dc98871b33616ba66467f7ca78d2c54c3d6666264784d236097659f3f4d1fd5f0 buildbot-1.6.0.tar.gz +2e65d22f1b94433ba11839fb3434d072f9ff8132396b03fdcdb3b437778679d1699534296fbb851d2661a3a7a0bce4ef1f94c49e7910419557e4055f2ed1a4d5 buildmaster.initd +d9339c30d3a92e92b41b0e3139ec89ecbd1460b0e4ee6c6fe2560c4307b2eb3f29b838c2f2312b9c7049bd95eaf652d09039227c691af805bc25a36999ec1840 buildmaster.confd" diff --git a/unmaintained/buildbot/buildbot.pre-install b/unmaintained/buildbot/buildbot.pre-install new file mode 100644 index 0000000000..7a1deeded1 --- /dev/null +++ b/unmaintained/buildbot/buildbot.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S buildbot 2>/dev/null +adduser -S -D -H -h /home/buildbot -s /sbin/nologin -G buildbot -g buildbot buildbot 2>/dev/null + +exit 0 diff --git a/unmaintained/buildbot/buildmaster.confd b/unmaintained/buildbot/buildmaster.confd new file mode 100644 index 0000000000..e489d66f9d --- /dev/null +++ b/unmaintained/buildbot/buildmaster.confd @@ -0,0 +1,10 @@ + +# Path to the build master's basedir. +BASEDIR=/var/lib/buildmaster + +# User account for the buildmaster. +# The basedir should be owned by this user. +USERNAME=buildbot + +# Extra options to pass to twistd. +TWISTD_OPTS="" diff --git a/unmaintained/buildbot/buildmaster.initd b/unmaintained/buildbot/buildmaster.initd new file mode 100644 index 0000000000..05c1a10104 --- /dev/null +++ b/unmaintained/buildbot/buildmaster.initd @@ -0,0 +1,69 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" +extra_stopped_commands="create" + +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 buildmaster in ${BASEDIR}" + start-stop-daemon --start -u "${USERNAME}" \ + --pidfile "${BASEDIR}/buildmaster.pid" \ + --exec /usr/bin/python -- /usr/bin/twistd \ + --no_save \ + --logfile="${BASEDIR}/twistd.log" \ + --pidfile="${BASEDIR}/buildmaster.pid" \ + --python="${BASEDIR}/buildbot.tac" + eend $? +} + +stop() { + ebegin "Stopping buildmaster in ${BASEDIR}" + start-stop-daemon --stop --pidfile "${BASEDIR}/buildmaster.pid" + eend $? +} + +reload() { + ebegin "Reconfiguring buildmaster in ${BASEDIR}" + start-stop-daemon --signal HUP --pidfile \ + "${BASEDIR}"/buildmaster.pid + eend $? +} + +create() { + if [ -e "${BASEDIR}"/buildbot.tac -o -e "${BASEDIR}"/master.cfg ]; then + eerror "${BASEDIR} already contains buildbot.tac or master.cfg" + return 1 + fi + ebegin "Creating buildmaster in ${BASEDIR}" + start-stop-daemon -u "${USERNAME}" \ + --exec /usr/bin/buildbot \ + -- create-master -r "${BASEDIR}" + mv "${BASEDIR}"/master.cfg.sample "${BASEDIR}"/master.cfg + ewarn "Remember to customize exemplary master.cfg in ${BASEDIR}" + eend $? +} |