summaryrefslogtreecommitdiff
path: root/dev-util/buildbot-slave
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-util/buildbot-slave
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-util/buildbot-slave')
-rw-r--r--dev-util/buildbot-slave/Manifest8
-rw-r--r--dev-util/buildbot-slave/buildbot-slave-0.8.12.ebuild53
-rw-r--r--dev-util/buildbot-slave/files/buildslave.confd9
-rw-r--r--dev-util/buildbot-slave/files/buildslave.initd48
-rw-r--r--dev-util/buildbot-slave/files/buildslave.service15
-rw-r--r--dev-util/buildbot-slave/metadata.xml12
6 files changed, 145 insertions, 0 deletions
diff --git a/dev-util/buildbot-slave/Manifest b/dev-util/buildbot-slave/Manifest
new file mode 100644
index 000000000000..d9c586f30413
--- /dev/null
+++ b/dev-util/buildbot-slave/Manifest
@@ -0,0 +1,8 @@
+AUX buildslave.confd 217 SHA256 c324eee07561afd8be623b46cd8f50cbbac5f1e42f2c493aa75dbaace6dcfa6f SHA512 54fc03a82cebf874c18d1bd739a6640677cfcd540b47a9929e6f5d63a83bd64bee615b033a72b49ab5fa3da69b16ff657805392ab0a68e0d33e48581fc8bb017 WHIRLPOOL 9e352aaf7b2388f23b2f346f86c92904a9dbcb1bb263c517243169a14250d19b8d934939ec3fac36a2300c73d9e3b727d5edeb4df628d5fbf13ef6f6e3346bce
+AUX buildslave.initd 1140 SHA256 5c3247e53ae214b4c1913e8eccbf7c43f8707ec217deb1f4ec6bec4f351fbf09 SHA512 217a9e3f774bcc7e7773d6e3047dbbabe196d168f814485ae54d1a94b330616fd80ad82bfa67c9b6185c39b780eae7a71776e727810ff4df337baca44d5fdbda WHIRLPOOL 21af3453d6ef6b9c3db6333b854bfce3390da8463022632651b64a2535741b7dd23349390985f6a1fc9fb73d091c31d71bf4069ac64e58d2e020d32e83e5b8ea
+AUX buildslave.service 386 SHA256 64f70fb7e06c65a2e9eac3fac7e37aca98eec04f69f4e1b344b5d0671725cab3 SHA512 53d9ac95006fb4e43e0bfa82c935e17c577cd292c8fea373247e4cd9bb21843f2f82971ffd37f50aa16fe258139c22adbe24570e3017fa529f2258a1d395d8dd WHIRLPOOL 1ad2b4a0723a5aed1116dafcaf5090f2984b6b6a97cb6ba3c65070e1e4743de0ad4e72a1b23a15f3f2bb4eb574fa44d6eb86e67dbac13d1b8f1eba174f8da879
+DIST buildbot-slave-0.8.12.tar.gz 118339 SHA256 905eab122dcfc9425d51f0ed0c7682e7f933e140a7203637aa12a84498bd7461 SHA512 74f7f9ffab946000a5d31ae28140698ca259ba5b75815ed839d51fa5d9f702e998b61a716b66aab7946b6143d329244f2403d9b98cbbfc70223b691dcb70f0bc WHIRLPOOL f0281c11520ff31291977fa67397c7398d8ecf7fe0e70a45521158e792862aa9bb6eb65591181a1a3d71913241768e65143a1b35d6316cb5f8b5bc5373d02979
+EBUILD buildbot-slave-0.8.12.ebuild 1567 SHA256 0cc61dd3f196d89a452bab265b7ae81175254f031db83e738b0e6dd4b87c6885 SHA512 d1c85ce92232dd353ba1efeba7abdaf831ca4e2b8f89ecdf2ad09ff93a19c572809b6d61e31ee1d3000fed134a668c19edd6a2747a1146b21b5fd65af762fe12 WHIRLPOOL b507ec4fc3c27bcd90e1e703e883be4162017d3732491012db73862392ce51d3c6e26cde3675ee7f0fb905064650e12f8ad1a47d513bc99a78e7f989e0f0e482
+MISC ChangeLog 2979 SHA256 793aef10ce735be742a0b5994ec9e491c65ef1e3a08ddd8d0bb17f8422e41178 SHA512 5d976dd45dbbbb301ec0c27b52674c58d1a8a00bd89ca37780ee72b76294039f974ea62b5324375c7269a119b96a3a9c62262a68916ca1ab0cc614aac125839d WHIRLPOOL a0a57ec3ccfd89bfb52fa0cedfa833f56db9db3265ad57e0c738017841d2ae0ba257bcee29f3fcd222b5c07b322fc45ceb1f7dff3c5f48a6ab143e3651eeb288
+MISC ChangeLog-2015 10377 SHA256 bf0a05181de1a4c9624047d1a2f113bdd03dd55f2fba8cf4d349c703b33a996f SHA512 1220c8be36649acfa29d4898cf565c3a5cab784faffe6959425fd59b135b88904243a5ce2fa01e8657c17643ade374e1f62365956cebb4126bf0baa8d9b70b30 WHIRLPOOL 50bc8a8aa665efe1c45e2fbc3db3d60a9517d9c44bea4d1d5338e601f18a7767216b6514fd42fa76023d9493ce7b22e0527e6c4f9e902bdcfb1594c5c835670d
+MISC metadata.xml 384 SHA256 8bfbf7b8688e3e46fa22b5f711fbdad5ee8f0b8e49cb85aa150abc19239748ae SHA512 339c2747b1d392528c2b53934ed652574db095407cba130d0c8deac06570dce89e01f5fafb1e9ebe585c88ee3cdcc9f16747c08cdeace6ad47ebdff7f9d5302a WHIRLPOOL b10b1daaa4868eb4ed9eff3b9d6eec12b1b02a48fc963367b8e616d2650b38bd1b2f52f8713f53f1e93bf54cd342b8af2716d3fa304d687af338d21e8b58808a
diff --git a/dev-util/buildbot-slave/buildbot-slave-0.8.12.ebuild b/dev-util/buildbot-slave/buildbot-slave-0.8.12.ebuild
new file mode 100644
index 000000000000..8bb290378b53
--- /dev/null
+++ b/dev-util/buildbot-slave/buildbot-slave-0.8.12.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+inherit distutils-r1 readme.gentoo systemd user
+
+DESCRIPTION="BuildBot Slave Daemon"
+HOMEPAGE="http://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.python.org/pypi/buildbot-slave"
+
+MY_PV="${PV/_p/p}"
+MY_P="${PN}-${MY_PV}"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux"
+IUSE="test"
+
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/twisted-core[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ test? ( dev-python/mock[${PYTHON_USEDEP}] )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewuser buildbot
+
+ DOC_CONTENTS="The \"buildbot\" user and the \"buildslave\" init script has been added
+ to support starting buildslave through Gentoo's init system. To use this,
+ set up your build slave following the documentation, make sure the
+ resulting directories are owned by the \"buildbot\" user and point
+ \"${ROOT}etc/conf.d/buildslave\" at the right location. The scripts can
+ run as a different user if desired. If you need to run more than one
+ build slave, just copy the scripts."
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ doman docs/buildslave.1
+
+ newconfd "${FILESDIR}/buildslave.confd" buildslave
+ newinitd "${FILESDIR}/buildslave.initd" buildslave
+ systemd_dounit "${FILESDIR}/buildslave.service"
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/dev-util/buildbot-slave/files/buildslave.confd b/dev-util/buildbot-slave/files/buildslave.confd
new file mode 100644
index 000000000000..4ef42c4a7333
--- /dev/null
+++ b/dev-util/buildbot-slave/files/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/dev-util/buildbot-slave/files/buildslave.initd b/dev-util/buildbot-slave/files/buildslave.initd
new file mode 100644
index 000000000000..587c7ccb3bb5
--- /dev/null
+++ b/dev-util/buildbot-slave/files/buildslave.initd
@@ -0,0 +1,48 @@
+#!/sbin/openrc-run
+# 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 $?
+}
diff --git a/dev-util/buildbot-slave/files/buildslave.service b/dev-util/buildbot-slave/files/buildslave.service
new file mode 100644
index 000000000000..5c8e483fe83a
--- /dev/null
+++ b/dev-util/buildbot-slave/files/buildslave.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=buildbot slave instances
+After=local-fs.target network.target
+
+[Service]
+Type=forking
+User=buildbot
+WorkingDirectory=/var/lib/buildslave
+# The following assume there is a 'slave' directory
+# in $WorkingDirectory with the slave configuration files
+ExecStart=/usr/bin/buildslave start slave
+ExecStop=/usr/bin/buildslave stop slave
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-util/buildbot-slave/metadata.xml b/dev-util/buildbot-slave/metadata.xml
new file mode 100644
index 000000000000..87ac9774fee6
--- /dev/null
+++ b/dev-util/buildbot-slave/metadata.xml
@@ -0,0 +1,12 @@
+<?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>
+ <upstream>
+ <remote-id type="pypi">buildbot-slave</remote-id>
+ <remote-id type="github">buildbot/buildbot</remote-id>
+ </upstream>
+</pkgmetadata>