summaryrefslogtreecommitdiff
path: root/dev-util/buildbot-worker
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-worker
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-util/buildbot-worker')
-rw-r--r--dev-util/buildbot-worker/Manifest19
-rw-r--r--dev-util/buildbot-worker/buildbot-worker-0.9.10-r2.ebuild133
-rw-r--r--dev-util/buildbot-worker/buildbot-worker-0.9.11.ebuild133
-rw-r--r--dev-util/buildbot-worker/buildbot-worker-0.9.4.ebuild76
-rw-r--r--dev-util/buildbot-worker/buildbot-worker-0.9.7.ebuild73
-rw-r--r--dev-util/buildbot-worker/buildbot-worker-0.9.8.ebuild74
-rw-r--r--dev-util/buildbot-worker/buildbot-worker-9999.ebuild133
-rw-r--r--dev-util/buildbot-worker/files/buildbot.tac.sample70
-rw-r--r--dev-util/buildbot-worker/files/buildbot_worker.confd9
-rw-r--r--dev-util/buildbot-worker/files/buildbot_worker.confd214
-rw-r--r--dev-util/buildbot-worker/files/buildbot_worker.initd48
-rw-r--r--dev-util/buildbot-worker/files/buildbot_worker.initd257
-rw-r--r--dev-util/buildbot-worker/files/buildbot_worker.service12
-rw-r--r--dev-util/buildbot-worker/metadata.xml20
14 files changed, 871 insertions, 0 deletions
diff --git a/dev-util/buildbot-worker/Manifest b/dev-util/buildbot-worker/Manifest
new file mode 100644
index 000000000000..35d92b77d0ec
--- /dev/null
+++ b/dev-util/buildbot-worker/Manifest
@@ -0,0 +1,19 @@
+AUX buildbot.tac.sample 1809 SHA256 a30325dea9efe1226f8e018aea314b1a44262bfce42fb5e0fd9edd4b7e14be76 SHA512 0cfe04d4587b9befef451d2fb47125643d84bbf12eec99a84622c21f06d7a8e10eb0ceb67c9491b61639b6634b2942ebc42d2ffa8253afbec688dc4e03d70158 WHIRLPOOL e2365fb5b843b005b7dad0ccb7ac0bf7b2de78c12fdfbe6b0bf7b6e978973b5d0660ea8c59d72abf1129383420064847a47b6acaa8d7b7d57052ef23585c699e
+AUX buildbot_worker.confd 222 SHA256 1fa81daad2d0b36b5743b5ecd7afb1fb65b4b0b568e565c89cfbca3043e053f9 SHA512 ccea785a073ba3a159f25c42d02722311eae3bdcafa4fe011e80d626f8b1aa74d3fe5118bf0c7831c7ceefdd896feab58667534e47e6814f5c62dd2b6bb0c550 WHIRLPOOL c68188a65e2695450fb800b34958e2ad23538425374e4ad1dd5ead4106d04d4f8d70df9fa86b846b444bf9b767fc8d1f309c9ec4d9b173d979b9866ca9128a62
+AUX buildbot_worker.confd2 367 SHA256 eca0268e8763e4382ac0baf77061d1238b1a81523ba099b794138b8535424923 SHA512 d46ca9656ba3f4fa58208954ba80d0c8e3a2a6a1eb14a92128653e56915811ac1f1e0a4aba0755fe4844aa0d85907eef6c657236035d139faf030b5d6940b820 WHIRLPOOL cd01a8e9ba57f2b41a2a23726cbe77eeb9ac09a6555c95252168f3321b697540cab70d5b33550967ba43908dd110fafbd447d79b9e0ffef9948f520f44b289d0
+AUX buildbot_worker.initd 1139 SHA256 e5572d2219c33b9e6c4689eae779d1aeffa2645b9a0942fcb3909bc7ad9c40f5 SHA512 51a8f21f84849eaa8e26abdb8b7bfaa3be4f1af813485fbb294ac09bef5ea003de32ae07566267fb1d52177fedf2541805af60204a8793645ea4909388e39c10 WHIRLPOOL c8f597e988b0e1a884c8947fa56def10d7d28a5b4d2a3d0c1b02720b0d40ff1241f96870a3f8a3d33a6987cf32bb61ec427e8b0884c260f21de78c0caf0a5ec3
+AUX buildbot_worker.initd2 1640 SHA256 5894d6b79e903d82d3981b08957834af33757ba38ea4ed5f97936283421d7a1e SHA512 8eae575cb001b4750cd2033f9cb82d3985ad9bc2a4bc20ff0e4aaa0cbd05bacf8d6d885ec08112da15e0ccf8fd895006eed39b0b9a4bcaee86911b5180fab0f2 WHIRLPOOL 0f570af7607c066678a328480b3157a3ff04300cf0a13f1f684c8156d20ab0017d801c5461e2b956bbe00464a28a6d956ed312f29e8b0aa7818e58aaaba6eb46
+AUX buildbot_worker.service 296 SHA256 c7bc100f3aa9e9d8b7cd0656e8474776177dd56ba35da864db4750b8ae42d69f SHA512 936035e92d8bd481b8af93450445a82ccf8eb21d3f6bf99c2a02f52ba71d911940b8a6316b7f8b888443f577d73184bf7e7d99329ffbaa995e32ea3d9cf715bc WHIRLPOOL 8c55173c8bff639e031d1bf0212e6231cf12e59da74fbc3a5cd367b7432c7f3ef3eb3244b001ab45b3fc0ccc3fd4cdbcc60b5ce3b6c549f681e95c5374319968
+DIST buildbot-worker-0.9.10.tar.gz 99028 SHA256 1793631d74629cd73bc0df1fadf28fb34d87e63aa72cba82058122bde165a824 SHA512 0f515610d9c788657b10ba6624745841241fe554b472e53abdda221a678eb73d7a21a6529eb0769450de3a79b43bb6e51f4208247a4d8ef25c3d36b6ced6ec89 WHIRLPOOL 67cb199328428167c7e52f7b6ecbe7aa73729b5b453b5a8c16ba4999502bf30d9b139788f755eb4811968a60ce61fde32cdc29a31242d3777302792bb04863a6
+DIST buildbot-worker-0.9.11.tar.gz 100746 SHA256 4254bf964465acb6586fda36b26a424466a265b6a5259138cf4fa63a1e9f6851 SHA512 c7209c3fff8c43a23de71fa61709c9f02a5bdd9c8c8980ac5d205f720abdaa9bdb78d0d4e40fe9f915c8d5cf253b9e3c63401712ee121ac085909b0244d82897 WHIRLPOOL 30e1fb17eda975ff3a1e333a0ae17bdc2b432bd9c139a0c1f8dbea69984311add3a6f0659b7add0a3fecc2acf9460a908709efa8994f5763bfbbd2618df67050
+DIST buildbot-worker-0.9.4.tar.gz 100889 SHA256 129e0d3fa9ee34f0f227487b6d1645820d2d4853099a1b0aed56587d3acab965 SHA512 7d055b7b005ebf1cc8033fb86f5321a9d80e0505c1a8b28b9ba3945323f157d34f34066ee9513e82b05c63af099d6030bf42d6f44533859b4e01983f1114462b WHIRLPOOL 8f2b95a476e93beaba5305137bb1d219a9aff59e8bb4450d6352babe799bb0166c299e7c8ea69e53c467e7e58be2681ddba4ae74ad8ba945221e1059906e5fc1
+DIST buildbot-worker-0.9.7.tar.gz 96416 SHA256 a41b4e0c7329821a0d85ee0e6edbde3db403676c62e59a6f436a048a008ac268 SHA512 84ccaf0472553f8422b342163e44e55481f6691338df38db6b1be74f0a79c13e2a52be56df632491662ab79648cd5034ce04d906bbedb01030e4fa96f1689ef9 WHIRLPOOL 70379e6f34ea30aef0e0008fd098a53ba144696f1416ac77c3756018bc371646d2261a28589ad5131f7be7de930189bd771b4a82de27343441543da5c683e122
+DIST buildbot-worker-0.9.8.tar.gz 97193 SHA256 825e022a794c7470276169b6ac1b774f39f60d16545bb46fdf5b4a3b2c78f44f SHA512 43cb7d83835d009c3d4f9a9671d3bd1037d50969b6238f9c77e9f1caedea83c9b9f77d642743d47ff2eea8f3c6549b9e4c843b7d9f638dc5a28339e034ea9b47 WHIRLPOOL 1127b956c3a94ad426c686e42dcbdf6a6f4427751c4ddf247569bc0ee03e86d1ae609263386e730d92b2a572be76208cb999c571fdee9f85de49de161a5c1ab1
+EBUILD buildbot-worker-0.9.10-r2.ebuild 4810 SHA256 79b798ef0f6513ec2ac108005657d0cb067c6781532b74fa98ddfd21e714a5e4 SHA512 c330f345c67d69ac7c276462104942061ffd9fa5b55173222a8b5b927576ac218ec97a11c09c9fd4eca56beccbbc45f8080d771dd5c1ebde7eef7cff43ca4a2a WHIRLPOOL 9794ba57c88cc4674eb3cc59492d820714ff9e0ece4d6d55a8cf3f14924d4f352323eb37792d3c6dfd9c3b19a846b40004b13396f00769bd3df8bd1a80decaf7
+EBUILD buildbot-worker-0.9.11.ebuild 4804 SHA256 13c159d879f67129928e5e6625bebe0f91414fc0cd4476bb8cd192c3aad2ae98 SHA512 999648a81ebd40ffc7cba11a718374e558d7026f0cc67cec1b7117e6b81f571043037e98ac3e5e0ef8751ae9a426be5fa5e675764223091c789c725ae99a1b7c WHIRLPOOL 6494284ba56aea9f77dcc3bfae2ca49f5224a1550e40b8198715da59a4dce03568272837a5ab5fc7c70c47e81f659061ec8a60c94570ac963e1bdb98e8d31a93
+EBUILD buildbot-worker-0.9.4.ebuild 2010 SHA256 f0cbb73ac8ee6008ecf71af5c98db4c62f6812507906588d8d9b9b44ace61895 SHA512 f4743127ede02a4ea17fea13db095ef96120dfaea37c92812beecec1e86221e1dc51d5dd12391b639f6ec2a8acbf13126c5e091a713bde8f795a2c0efc7af176 WHIRLPOOL f095fcaccb6e557df3a22245c0f3173c76505ada5ef073ecf7d3671a359f72815f22c38fbe8c9ddbd2e4b44d78b4602e2458903c8e229ad26216fd0b00dec72d
+EBUILD buildbot-worker-0.9.7.ebuild 1929 SHA256 f3e4a4142d631de55641e6bd03815c17ade4ee381f5ca8f84665cc0ffa843f56 SHA512 e86c6223f0b86fd54ec0f68c3ec4577c072543e3cb9f0d679c98a8a5a4af58f172e681979aeaba4610eb3bd8af133d367fedf78bb7de8ea386a7af5acfc384e3 WHIRLPOOL 55738da98a6e3e10fc3dc7f4b03a3fbfceb5a4e89df3b8929106b62d0b2fde814493c02d59da212153fe08921596f7ef85653dfaa3b545ccc64a7ed117377dab
+EBUILD buildbot-worker-0.9.8.ebuild 1956 SHA256 633288152b35404a12844d82d336b2ad44697ae2bf9c38c7e914c04ddcdd3181 SHA512 0128564c240f840f80cf035b912300ae615027ca32326eaccfddb5b2acc611e9f7fe191c65a9450adaa4a5d79ebef39e9bc0e7e0e373c5f4daab8a67af386148 WHIRLPOOL 0f545de1b4f13ced4ba844e02f1a47eeba7c9b0ffb600a3a6fd1ee5f7e2ce8b006a87e204fc4d155e478caba23aa6b2f429f7f887e04f20852cc6156ea55ea53
+EBUILD buildbot-worker-9999.ebuild 4804 SHA256 13c159d879f67129928e5e6625bebe0f91414fc0cd4476bb8cd192c3aad2ae98 SHA512 999648a81ebd40ffc7cba11a718374e558d7026f0cc67cec1b7117e6b81f571043037e98ac3e5e0ef8751ae9a426be5fa5e675764223091c789c725ae99a1b7c WHIRLPOOL 6494284ba56aea9f77dcc3bfae2ca49f5224a1550e40b8198715da59a4dce03568272837a5ab5fc7c70c47e81f659061ec8a60c94570ac963e1bdb98e8d31a93
+MISC ChangeLog 1884 SHA256 e84ac9d3144868250dba0f8f838d5758ad64836792e5a2fe02a9bcab9a1a74b8 SHA512 6fc01aefe3d8e75fb7ae5448154e04565ebf434acb2e0d843c89d6dbc607ba0b3064a0a352fc38a329ce588061c4491960a2dfdbe3a51bc9f035501170e341e4 WHIRLPOOL 4cff2243ef7c6ee758d399779b0f9d18490b22ea51b7ec27576a83a05996db55f2f78b98f56dcb1d5147c4dc1d2d35259a8e2115d80108aac74f537837d2ad11
+MISC metadata.xml 591 SHA256 3a89cdceb5291fcd69949b39636d7114b706e2c40fcf11b03c0a06bd2aeb51b2 SHA512 d3273df1c8e6284b75ab5cd15cc5092d10db8ab8c0126e5eb21425bf3f2cab0f582a4e1bdf1e96881cc580a13047ac9fc72e09474f03dd788f85cd7962be6257 WHIRLPOOL ad7de4c7080f104c6545121826b45527607a3da5b5135dfb66de78369818665e05905d1d514ab6da940295c04d4dc030e054882802c9eb2ba120c41c168ffb15
diff --git a/dev-util/buildbot-worker/buildbot-worker-0.9.10-r2.ebuild b/dev-util/buildbot-worker/buildbot-worker-0.9.10-r2.ebuild
new file mode 100644
index 000000000000..419fd619809a
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-0.9.10-r2.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 python3_5 )
+
+EGIT_REPO_URI="https://github.com/buildbot/buildbot.git"
+
+[[ ${PV} == *9999 ]] && inherit git-r3
+inherit readme.gentoo user distutils-r1
+
+DESCRIPTION="BuildBot Worker (slave) Daemon"
+HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.python.org/pypi/buildbot-worker"
+
+MY_PV="${PV/_p/.post}"
+MY_P="${PN}-${MY_PV}"
+[[ ${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-17.5.0[${PYTHON_USEDEP}]
+ dev-python/future[${PYTHON_USEDEP}]
+ !<dev-util/buildbot-0.9.7
+"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/setuptools_trial[${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,
+ execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
+ 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.myinstance\" at the right location.
+ The scripts can run as a different user if desired."
+}
+
+python_test() {
+ distutils_install_for_testing
+
+ esetup.py test || die "Tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ doman docs/buildbot-worker.1
+
+ newconfd "${FILESDIR}/buildbot_worker.confd2" buildbot_worker
+ newinitd "${FILESDIR}/buildbot_worker.initd2" buildbot_worker
+
+ dodir /var/lib/buildbot_worker
+ cp "${FILESDIR}/buildbot.tac.sample" "${D}/var/lib/buildbot_worker"|| die "Install failed!"
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn
+ ewarn "Starting with buildbot-worker-0.9.10-r1, more than one instance of a buildbot_worker"
+ ewarn "can be run simultaneously. Note that \"BASEDIR\" in the buildbot_worker configuration file"
+ ewarn "is now the common base directory for all instances. If you are migrating from an older"
+ ewarn "version, make sure that you copy the current contents of \"BASEDIR\" to a subdirectory."
+ ewarn "The name of the subdirectory corresponds to the name of the buildbot_worker instance."
+ ewarn "In order to start the service running OpenRC-based systems need to link to the init file:"
+ ewarn " ln --symbolic --relative /etc/init.d/buildbot_worker /etc/init.d/buildbot_worker.myinstance"
+ ewarn " rc-update add buildbot_worker.myinstance default"
+ ewarn " /etc/init.d/buildbot_worker.myinstance start"
+ ewarn "Systems using systemd can do the following:"
+ ewarn " systemctl enable buildbot_worker@myinstance.service"
+ ewarn " systemctl enable buildbot_worker.target"
+ ewarn " systemctl start buildbot_worker.target"
+ fi
+}
+
+pkg_config() {
+ local buildworker_path="/var/lib/buildbot_worker"
+ local log_path="/var/log/buildbot_worker"
+
+ einfo "This will prepare a new buildbot_worker instance in ${buildworker_path}."
+ einfo "Press Control-C to abort."
+
+ einfo "Enter the name for the new instance: "
+ read instance_name
+ [[ -z "${instance_name}" ]] && die "Invalid instance name"
+
+ local instance_path="${buildworker_path}/${instance_name}"
+ local instance_log_path="${log_path}/${instance_name}"
+
+ if [[ -e "${instance_path}" ]]; then
+ eerror "The instance with the specified name already exists:"
+ eerror "${instance_path}"
+ die "Instance already exists"
+ fi
+
+ if [[ ! -d "${instance_path}" ]]; then
+ mkdir --parents "${instance_path}" || die "Unable to create directory ${buildworker_path}"
+ fi
+ chown --recursive buildbot "${instance_path}" || die "Setting permissions for instance failed"
+ cp "${buildworker_path}/buildbot.tac.sample" "${instance_path}/buildbot.tac" \
+ || die "Moving sample configuration failed"
+ ln --symbolic --relative "/etc/init.d/buildbot_worker" "/etc/init.d/buildbot_worker.${instance_name}" \
+ || die "Unable to create link to init file"
+
+ if [[ ! -d "${instance_log_path}" ]]; then
+ mkdir --parents "${instance_log_path}" || die "Unable to create directory ${instance_log_path}"
+ fi
+ ln --symbolic --relative "${instance_log_path}/twistd.log" "${instance_path}/twistd.log" \
+ || die "Unable to create link to log file"
+
+ einfo "Successfully created a buildbot_worker instance at ${instance_path}."
+ einfo "To change the default settings edit the buildbot.tac file in this directory."
+}
diff --git a/dev-util/buildbot-worker/buildbot-worker-0.9.11.ebuild b/dev-util/buildbot-worker/buildbot-worker-0.9.11.ebuild
new file mode 100644
index 000000000000..0697e9a2ce0d
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-0.9.11.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 python3_5 )
+
+EGIT_REPO_URI="https://github.com/buildbot/buildbot.git"
+
+[[ ${PV} == *9999 ]] && inherit git-r3
+inherit readme.gentoo user distutils-r1
+
+DESCRIPTION="BuildBot Worker (slave) Daemon"
+HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.python.org/pypi/buildbot-worker"
+
+MY_V="${PV/_p/p}"
+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-17.5.0[${PYTHON_USEDEP}]
+ dev-python/future[${PYTHON_USEDEP}]
+ !<dev-util/buildbot-0.9.7
+"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/setuptools_trial[${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,
+ execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
+ 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.myinstance\" at the right location.
+ The scripts can run as a different user if desired."
+}
+
+python_test() {
+ distutils_install_for_testing
+
+ esetup.py test || die "Tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ doman docs/buildbot-worker.1
+
+ newconfd "${FILESDIR}/buildbot_worker.confd2" buildbot_worker
+ newinitd "${FILESDIR}/buildbot_worker.initd2" buildbot_worker
+
+ dodir /var/lib/buildbot_worker
+ cp "${FILESDIR}/buildbot.tac.sample" "${D}/var/lib/buildbot_worker"|| die "Install failed!"
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn
+ ewarn "Starting with buildbot-worker-0.9.10-r1, more than one instance of a buildbot_worker"
+ ewarn "can be run simultaneously. Note that \"BASEDIR\" in the buildbot_worker configuration file"
+ ewarn "is now the common base directory for all instances. If you are migrating from an older"
+ ewarn "version, make sure that you copy the current contents of \"BASEDIR\" to a subdirectory."
+ ewarn "The name of the subdirectory corresponds to the name of the buildbot_worker instance."
+ ewarn "In order to start the service running OpenRC-based systems need to link to the init file:"
+ ewarn " ln --symbolic --relative /etc/init.d/buildbot_worker /etc/init.d/buildbot_worker.myinstance"
+ ewarn " rc-update add buildbot_worker.myinstance default"
+ ewarn " /etc/init.d/buildbot_worker.myinstance start"
+ ewarn "Systems using systemd can do the following:"
+ ewarn " systemctl enable buildbot_worker@myinstance.service"
+ ewarn " systemctl enable buildbot_worker.target"
+ ewarn " systemctl start buildbot_worker.target"
+ fi
+}
+
+pkg_config() {
+ local buildworker_path="/var/lib/buildbot_worker"
+ local log_path="/var/log/buildbot_worker"
+
+ einfo "This will prepare a new buildbot_worker instance in ${buildworker_path}."
+ einfo "Press Control-C to abort."
+
+ einfo "Enter the name for the new instance: "
+ read instance_name
+ [[ -z "${instance_name}" ]] && die "Invalid instance name"
+
+ local instance_path="${buildworker_path}/${instance_name}"
+ local instance_log_path="${log_path}/${instance_name}"
+
+ if [[ -e "${instance_path}" ]]; then
+ eerror "The instance with the specified name already exists:"
+ eerror "${instance_path}"
+ die "Instance already exists"
+ fi
+
+ if [[ ! -d "${instance_path}" ]]; then
+ mkdir --parents "${instance_path}" || die "Unable to create directory ${buildworker_path}"
+ fi
+ chown --recursive buildbot "${instance_path}" || die "Setting permissions for instance failed"
+ cp "${buildworker_path}/buildbot.tac.sample" "${instance_path}/buildbot.tac" \
+ || die "Moving sample configuration failed"
+ ln --symbolic --relative "/etc/init.d/buildbot_worker" "/etc/init.d/buildbot_worker.${instance_name}" \
+ || die "Unable to create link to init file"
+
+ if [[ ! -d "${instance_log_path}" ]]; then
+ mkdir --parents "${instance_log_path}" || die "Unable to create directory ${instance_log_path}"
+ fi
+ ln --symbolic --relative "${instance_log_path}/twistd.log" "${instance_path}/twistd.log" \
+ || die "Unable to create link to log file"
+
+ einfo "Successfully created a buildbot_worker instance at ${instance_path}."
+ einfo "To change the default settings edit the buildbot.tac file in this directory."
+}
diff --git a/dev-util/buildbot-worker/buildbot-worker-0.9.4.ebuild b/dev-util/buildbot-worker/buildbot-worker-0.9.4.ebuild
new file mode 100644
index 000000000000..309d72c4734f
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-0.9.4.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.python.org/pypi/buildbot-worker"
+
+MY_V="${PV/_p/p}"
+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-16.0.0[${PYTHON_USEDEP}]
+ >=dev-python/twisted-core-8.0.0[${PYTHON_USEDEP}]
+ )
+ dev-python/future[${PYTHON_USEDEP}]
+ !<dev-util/buildbot-0.9.0_rc1
+"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/setuptools_trial[${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_test() {
+ distutils_install_for_testing
+
+ esetup.py test || die "Tests failed under ${EPYTHON}"
+}
+
+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-0.9.7.ebuild b/dev-util/buildbot-worker/buildbot-worker-0.9.7.ebuild
new file mode 100644
index 000000000000..fcdfadfbed66
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-0.9.7.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 python3_5 )
+
+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="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.python.org/pypi/buildbot-worker"
+
+MY_V="${PV/_p/p}"
+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-17.1.0[${PYTHON_USEDEP}]
+ dev-python/future[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/setuptools_trial[${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_test() {
+ distutils_install_for_testing
+
+ esetup.py test || die "Tests failed under ${EPYTHON}"
+}
+
+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-0.9.8.ebuild b/dev-util/buildbot-worker/buildbot-worker-0.9.8.ebuild
new file mode 100644
index 000000000000..d3e878cd1624
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-0.9.8.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 python3_5 )
+
+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="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.python.org/pypi/buildbot-worker"
+
+MY_V="${PV/_p/p}"
+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-17.5.0[${PYTHON_USEDEP}]
+ dev-python/future[${PYTHON_USEDEP}]
+ !<dev-util/buildbot-0.9.7
+"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/setuptools_trial[${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_test() {
+ distutils_install_for_testing
+
+ esetup.py test || die "Tests failed under ${EPYTHON}"
+}
+
+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..0697e9a2ce0d
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-9999.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 python3_5 )
+
+EGIT_REPO_URI="https://github.com/buildbot/buildbot.git"
+
+[[ ${PV} == *9999 ]] && inherit git-r3
+inherit readme.gentoo user distutils-r1
+
+DESCRIPTION="BuildBot Worker (slave) Daemon"
+HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.python.org/pypi/buildbot-worker"
+
+MY_V="${PV/_p/p}"
+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-17.5.0[${PYTHON_USEDEP}]
+ dev-python/future[${PYTHON_USEDEP}]
+ !<dev-util/buildbot-0.9.7
+"
+DEPEND="${RDEPEND}
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/setuptools_trial[${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,
+ execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
+ 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.myinstance\" at the right location.
+ The scripts can run as a different user if desired."
+}
+
+python_test() {
+ distutils_install_for_testing
+
+ esetup.py test || die "Tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ doman docs/buildbot-worker.1
+
+ newconfd "${FILESDIR}/buildbot_worker.confd2" buildbot_worker
+ newinitd "${FILESDIR}/buildbot_worker.initd2" buildbot_worker
+
+ dodir /var/lib/buildbot_worker
+ cp "${FILESDIR}/buildbot.tac.sample" "${D}/var/lib/buildbot_worker"|| die "Install failed!"
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ ewarn
+ ewarn "Starting with buildbot-worker-0.9.10-r1, more than one instance of a buildbot_worker"
+ ewarn "can be run simultaneously. Note that \"BASEDIR\" in the buildbot_worker configuration file"
+ ewarn "is now the common base directory for all instances. If you are migrating from an older"
+ ewarn "version, make sure that you copy the current contents of \"BASEDIR\" to a subdirectory."
+ ewarn "The name of the subdirectory corresponds to the name of the buildbot_worker instance."
+ ewarn "In order to start the service running OpenRC-based systems need to link to the init file:"
+ ewarn " ln --symbolic --relative /etc/init.d/buildbot_worker /etc/init.d/buildbot_worker.myinstance"
+ ewarn " rc-update add buildbot_worker.myinstance default"
+ ewarn " /etc/init.d/buildbot_worker.myinstance start"
+ ewarn "Systems using systemd can do the following:"
+ ewarn " systemctl enable buildbot_worker@myinstance.service"
+ ewarn " systemctl enable buildbot_worker.target"
+ ewarn " systemctl start buildbot_worker.target"
+ fi
+}
+
+pkg_config() {
+ local buildworker_path="/var/lib/buildbot_worker"
+ local log_path="/var/log/buildbot_worker"
+
+ einfo "This will prepare a new buildbot_worker instance in ${buildworker_path}."
+ einfo "Press Control-C to abort."
+
+ einfo "Enter the name for the new instance: "
+ read instance_name
+ [[ -z "${instance_name}" ]] && die "Invalid instance name"
+
+ local instance_path="${buildworker_path}/${instance_name}"
+ local instance_log_path="${log_path}/${instance_name}"
+
+ if [[ -e "${instance_path}" ]]; then
+ eerror "The instance with the specified name already exists:"
+ eerror "${instance_path}"
+ die "Instance already exists"
+ fi
+
+ if [[ ! -d "${instance_path}" ]]; then
+ mkdir --parents "${instance_path}" || die "Unable to create directory ${buildworker_path}"
+ fi
+ chown --recursive buildbot "${instance_path}" || die "Setting permissions for instance failed"
+ cp "${buildworker_path}/buildbot.tac.sample" "${instance_path}/buildbot.tac" \
+ || die "Moving sample configuration failed"
+ ln --symbolic --relative "/etc/init.d/buildbot_worker" "/etc/init.d/buildbot_worker.${instance_name}" \
+ || die "Unable to create link to init file"
+
+ if [[ ! -d "${instance_log_path}" ]]; then
+ mkdir --parents "${instance_log_path}" || die "Unable to create directory ${instance_log_path}"
+ fi
+ ln --symbolic --relative "${instance_log_path}/twistd.log" "${instance_path}/twistd.log" \
+ || die "Unable to create link to log file"
+
+ einfo "Successfully created a buildbot_worker instance at ${instance_path}."
+ einfo "To change the default settings edit the buildbot.tac file in this directory."
+}
diff --git a/dev-util/buildbot-worker/files/buildbot.tac.sample b/dev-util/buildbot-worker/files/buildbot.tac.sample
new file mode 100644
index 000000000000..ee3d7ca3cef9
--- /dev/null
+++ b/dev-util/buildbot-worker/files/buildbot.tac.sample
@@ -0,0 +1,70 @@
+'''
+This is a sample buildbot.tac file to initalize
+a buildbot worker complete with logging.
+'''
+
+import os.path
+import socket
+
+from twisted.application import service
+from twisted.python.logfile import LogFile
+from twisted.python.log import ILogObserver, FileLogObserver
+
+from buildbot_worker.bot import Worker
+
+################################
+# Set the following variables
+# to your desired values
+#################################
+
+# use the current directory or
+# set to an absolute value
+basedir = '.'
+
+# logging
+rotateLength = 10000000
+maxRotatedFiles = 10
+
+# buildbot communication port
+port = 9989
+
+# worker settings
+worker_name = 'worker-1'
+passwd = 'mypasswd'
+buildmaster_host = 'mybuildbot.foobar.org'
+keepalive = 600
+umask = None
+maxdelay = 300
+numcpus = None
+allow_shutdown = None
+
+
+# Begin starting up the worker
+# if this is a relocatable tac file, get the directory containing the TAC
+if basedir == '.':
+ basedir = os.path.abspath(os.path.dirname(__file__))
+
+# note: this line is matched against to check that this is
+# a buildbot-worker directory; do not edit it.
+application = service.Application('buildbot-worker')
+
+# set up logging
+logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"),
+ rotateLength=rotateLength,
+ maxRotatedFiles=maxRotatedFiles
+ )
+application.setComponent(ILogObserver, FileLogObserver(logfile).emit)
+
+worker = Worker(buildmaster_host,
+ port,
+ worker_name,
+ passwd,
+ basedir,
+ keepalive,
+ umask=umask,
+ maxdelay=maxdelay,
+ numcpus=numcpus,
+ allow_shutdown=allow_shutdown
+ )
+
+worker.setServiceParent(application)
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.confd2 b/dev-util/buildbot-worker/files/buildbot_worker.confd2
new file mode 100644
index 000000000000..3ae1d865fdb1
--- /dev/null
+++ b/dev-util/buildbot-worker/files/buildbot_worker.confd2
@@ -0,0 +1,14 @@
+# 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=""
+
+# Optional specifiv python version to run in
+# (if not the system default version)
+# ie: RUNTIME_PYTHON="/usr/bin/python2.7"
+RUNTIME_PYTHON=""
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..8b13460491e4
--- /dev/null
+++ b/dev-util/buildbot-worker/files/buildbot_worker.initd
@@ -0,0 +1,48 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 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.initd2 b/dev-util/buildbot-worker/files/buildbot_worker.initd2
new file mode 100644
index 000000000000..453d207e5d88
--- /dev/null
+++ b/dev-util/buildbot-worker/files/buildbot_worker.initd2
@@ -0,0 +1,57 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+BUILDWORKER_NAME=${RC_SVCNAME:16}
+BUILDWORKER_PATH="${BASEDIR}/${BUILDWORKER_NAME}"
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z "${BUILDWORKER_NAME}" ]; then
+ eerror "Buildbot-worker name not defined. Please link buildbot_worker.foo to this file to start the buildbot_worker with the name \"foo\"."
+ return 1
+ fi
+ if [ -z "${BASEDIR}" ]; then
+ eerror "BASEDIR not set"
+ return 1
+ fi
+ if [ -z "${USERNAME}" ]; then
+ eerror "USERNAME not set"
+ return 1
+ fi
+ if [ ! -d "${BUILDWORKER_PATH}" ]; then
+ eerror "${BUILDWORKER_PATH} is not a directory"
+ return 1
+ fi
+ if [ ! -e "${BUILDWORKER_PATH}/buildbot.tac" ]; then
+ eerror "${BUILDWORKER_PATH} does not contain buildbot.tac"
+ return 1
+ fi
+ if [ ! -e "${RUNTIME_PYTHON}" ]; then
+ RUNTIME_PYTHON="/usr/bin/python"
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting buildbot-worker in ${BUILDWORKER_PATH}"
+ # We set HOME here to make something valid show up in the env of child
+ # processes spawned by the buildbot-worker.
+ start-stop-daemon --start -u "${USERNAME}" \
+ --pidfile "${BUILDWORKER_PATH}/buildbot_worker.pid" \
+ --env HOME="${BUILDWORKER_PATH}" \
+ --exec "${RUNTIME_PYTHON}" -- /usr/bin/twistd \
+ --no_save \
+ --logfile="${BUILDWORKER_PATH}/twistd.log" \
+ --pidfile="${BUILDWORKER_PATH}/buildbot_worker.pid" \
+ --python="${BUILDWORKER_PATH}/buildbot.tac"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping buildbot-worker in ${BUILDWORKER_PATH}"
+ start-stop-daemon --stop --pidfile "${BUILDWORKER_PATH}/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..113a011b29b3
--- /dev/null
+++ b/dev-util/buildbot-worker/metadata.xml
@@ -0,0 +1,20 @@
+<?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-worker</remote-id>
+ <remote-id type="github">buildbot/buildbot</remote-id>
+ </upstream>
+</pkgmetadata>