diff options
author | Brian Dolbec <dolsen@gentoo.org> | 2016-08-09 14:50:15 -0700 |
---|---|---|
committer | Brian Dolbec <dolsen@gentoo.org> | 2016-08-09 16:47:21 -0700 |
commit | 1f6e4e956f45a71cc4ca09af253731d5f986b01e (patch) | |
tree | 13a6b50aceaf07e71afec107d1855337f8458908 /dev-util | |
parent | dev-util/buildbot-waterfall-view: New buildbot-0.9 waterfall-view plugin (diff) | |
download | gentoo-1f6e4e956f45a71cc4ca09af253731d5f986b01e.tar.gz gentoo-1f6e4e956f45a71cc4ca09af253731d5f986b01e.tar.bz2 gentoo-1f6e4e956f45a71cc4ca09af253731d5f986b01e.zip |
dev-util/buildbot-worker: New buildbot-0.9 worker (slave)
This new package replaces the dev-util/buildbot-slave package.
This new build slave is not comaptible with buildbot versions prior to 0.9*.
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/buildbot-worker/Manifest | 1 | ||||
-rw-r--r-- | dev-util/buildbot-worker/buildbot-worker-0.9.0_rc1.ebuild | 67 | ||||
-rw-r--r-- | dev-util/buildbot-worker/buildbot-worker-9999.ebuild | 67 | ||||
-rw-r--r-- | dev-util/buildbot-worker/files/buildbot_worker.confd | 9 | ||||
-rw-r--r-- | dev-util/buildbot-worker/files/buildbot_worker.initd | 48 | ||||
-rw-r--r-- | dev-util/buildbot-worker/files/buildbot_worker.service | 12 | ||||
-rw-r--r-- | dev-util/buildbot-worker/metadata.xml | 19 |
7 files changed, 223 insertions, 0 deletions
diff --git a/dev-util/buildbot-worker/Manifest b/dev-util/buildbot-worker/Manifest new file mode 100644 index 000000000000..f5d3c01b49a8 --- /dev/null +++ b/dev-util/buildbot-worker/Manifest @@ -0,0 +1 @@ +DIST buildbot-worker-0.9.0rc1.tar.gz 98041 SHA256 5fc9bc888aee3af5e144c51a6c11d8f5afe57e459644749c66b495e82fba7e7e SHA512 c9201649d8af74bc988032a69c20b220bf70b2fe7bba7eb27638408a34f2d82b90f6421a39f3a2af8cfbe8ea11429dc04faa1de635bff77fd5a9b13c9d78f167 WHIRLPOOL 6205a8bc018a65674e955fa6edeb9f32ec1f0dbc05bf50f649cab7271f506cfad61c8556a05c0d2185f364b9b9a493130bdea2e798cd96238f7b0797f6d12257 diff --git a/dev-util/buildbot-worker/buildbot-worker-0.9.0_rc1.ebuild b/dev-util/buildbot-worker/buildbot-worker-0.9.0_rc1.ebuild new file mode 100644 index 000000000000..b59c1138e435 --- /dev/null +++ b/dev-util/buildbot-worker/buildbot-worker-0.9.0_rc1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +PYTHON_COMPAT=( python2_7 ) + +EGIT_REPO_URI="https://github.com/buildbot/buildbot.git" + +[[ ${PV} == *9999 ]] && inherit git-r3 +inherit readme.gentoo user distutils-r1 + +DESCRIPTION="BuildBot Slave Daemon" +HOMEPAGE="http://trac.buildbot.net/ http://code.google.com/p/buildbot/ http://pypi.python.org/pypi/buildbot-slave" + +MY_PV="${PV/_p/p}" +MY_V="0.9.0rc1" +MY_P="${PN}-${MY_V}" +[[ ${PV} == *9999 ]] || SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +if [[ ${PV} == *9999 ]]; then + KEYWORDS="" +else + KEYWORDS="~amd64" +fi +IUSE="test" + +RDEPEND=">=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}] + || ( >=dev-python/twisted-core-8.0.0[${PYTHON_USEDEP}] + <dev-python/twisted-16.3.0[${PYTHON_USEDEP}] + ) + dev-python/future[${PYTHON_USEDEP}] + !<dev-util/buildbot-0.9.0_rc1" +DEPEND="${RDEPEND} + test? ( dev-python/mock[${PYTHON_USEDEP}] )" + +S="${WORKDIR}/${MY_P}" +[[ ${PV} == *9999 ]] && S=${S}/slave + +pkg_setup() { + enewuser buildbot + + DOC_CONTENTS="The \"buildbot\" user and the \"buildbot_worker\" init script has been added + to support starting buildbot_worker through Gentoo's init system. To use this, + set up your build worker following the documentation, make sure the + resulting directories are owned by the \"buildbot\" user and point + \"${ROOT}etc/conf.d/buildbot_worker\" at the right location. The scripts can + run as a different user if desired. If you need to run more than one + build worker, just copy the scripts." +} + +python_install_all() { + distutils-r1_python_install_all + + doman docs/buildbot-worker.1 + + newconfd "${FILESDIR}/buildbot_worker.confd" buildbot_worker + newinitd "${FILESDIR}/buildbot_worker.initd" buildbot_worker + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/dev-util/buildbot-worker/buildbot-worker-9999.ebuild b/dev-util/buildbot-worker/buildbot-worker-9999.ebuild new file mode 100644 index 000000000000..1c363daa1e44 --- /dev/null +++ b/dev-util/buildbot-worker/buildbot-worker-9999.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +PYTHON_COMPAT=( python2_7 ) + +EGIT_REPO_URI="https://github.com/buildbot/buildbot.git" + +[[ ${PV} == *9999 ]] && inherit git-r3 +inherit readme.gentoo user distutils-r1 + +DESCRIPTION="BuildBot Slave Daemon" +HOMEPAGE="http://trac.buildbot.net/ http://code.google.com/p/buildbot/ http://pypi.python.org/pypi/buildbot-slave" + +MY_PV="${PV/_p/p}" +MY_V="0.9.0rc1" +MY_P="${PN}-${MY_V}" +[[ ${PV} == *9999 ]] || SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +if [[ ${PV} == *9999 ]]; then + KEYWORDS="" +else + KEYWORDS="~amd64" +fi +IUSE="test" + +RDEPEND=">=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}] + || ( >=dev-python/twisted-core-8.0.0[${PYTHON_USEDEP}] + <dev-python/twisted-16.3.0[${PYTHON_USEDEP}] + ) + dev-python/future[${PYTHON_USEDEP}] + !<dev-util/buildbot-0.9.0_rc1" +DEPEND="${RDEPEND} + test? ( dev-python/mock[${PYTHON_USEDEP}] )" + +S="${WORKDIR}/${MY_P}" +[[ ${PV} == *9999 ]] && S=${S}/slave + +pkg_setup() { + enewuser buildbot + + DOC_CONTENTS="The \"buildbot\" user and the \"buildbot_worker\" init script has been added + to support starting buildbot_worker through Gentoo's init system. To use this, + set up your build worker following the documentation, make sure the + resulting directories are owned by the \"buildbot\" user and point + \"${ROOT}etc/conf.d/buildbot_worker\" at the right location. The scripts can + run as a different user if desired. If you need to run more than one + build worker, just copy the scripts." +} + +python_install_all() { + distutils-r1_python_install_all + + doman docs/buildbot-worker.1 + + newconfd "${FILESDIR}/buildbot_worker.confd" buildslave + newinitd "${FILESDIR}/buildbot_worker.initd" buildslave + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/dev-util/buildbot-worker/files/buildbot_worker.confd b/dev-util/buildbot-worker/files/buildbot_worker.confd new file mode 100644 index 000000000000..7e77999cf0c8 --- /dev/null +++ b/dev-util/buildbot-worker/files/buildbot_worker.confd @@ -0,0 +1,9 @@ +# Path to the build slave's basedir. +BASEDIR="/var/lib/buildbot_worker" + +# 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/dev-util/buildbot-worker/files/buildbot_worker.initd b/dev-util/buildbot-worker/files/buildbot_worker.initd new file mode 100644 index 000000000000..5301ed546baf --- /dev/null +++ b/dev-util/buildbot-worker/files/buildbot_worker.initd @@ -0,0 +1,48 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 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}/buildbot_worker.pid" \ + --env HOME="${BASEDIR}" \ + --exec /usr/bin/twistd -- \ + --no_save \ + --logfile="${BASEDIR}/twistd.log" \ + --pidfile="${BASEDIR}/buildbot_worker.pid" \ + --python="${BASEDIR}/buildbot.tac" + eend $? +} + +stop() { + ebegin "Stopping buildslave in ${BASEDIR}" + start-stop-daemon --stop --pidfile "${BASEDIR}/buildbot_worker.pid" + eend $? +} diff --git a/dev-util/buildbot-worker/files/buildbot_worker.service b/dev-util/buildbot-worker/files/buildbot_worker.service new file mode 100644 index 000000000000..e75a2d51e4f3 --- /dev/null +++ b/dev-util/buildbot-worker/files/buildbot_worker.service @@ -0,0 +1,12 @@ +[Unit] +Description=buildbot worker (slave) instances +After=local-fs.target network.target + +[Service] +Type=forking +User=buildbot +ExecStart=/usr/bin/buildbot_worker start /var/lib/buildbot_worker +ExecStop=/usr/bin/buildbot_worker stop /var/lib/buildbot_worker + +[Install] +WantedBy=multi-user.target diff --git a/dev-util/buildbot-worker/metadata.xml b/dev-util/buildbot-worker/metadata.xml new file mode 100644 index 000000000000..973ff7f8ffeb --- /dev/null +++ b/dev-util/buildbot-worker/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>hwoarang@gentoo.org</email> + <name>Markos Chandras</name> + </maintainer> + <maintainer type="person"> + <email>dolsen@gentoo.org</email> + <name>Brian Dolbec</name> + </maintainer> + <upstream> + <maintainer> + <email>devel@buildbot.net</email> + <name>Developers List</name> + </maintainer> + <remote-id type="pypi">buildbot-slave</remote-id> + </upstream> +</pkgmetadata> |