summaryrefslogtreecommitdiff
path: root/dev-util/buildbot-worker
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-util/buildbot-worker
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-util/buildbot-worker')
-rw-r--r--dev-util/buildbot-worker/Manifest15
-rw-r--r--dev-util/buildbot-worker/buildbot-worker-0.9.12.ebuild133
-rw-r--r--dev-util/buildbot-worker/buildbot-worker-0.9.13.ebuild133
-rw-r--r--dev-util/buildbot-worker/buildbot-worker-0.9.15_p1.ebuild133
-rw-r--r--dev-util/buildbot-worker/buildbot-worker-1.1.0.ebuild133
-rw-r--r--dev-util/buildbot-worker/buildbot-worker-1.1.2.ebuild133
-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.confd214
-rw-r--r--dev-util/buildbot-worker/files/buildbot_worker.initd257
-rw-r--r--dev-util/buildbot-worker/metadata.xml20
11 files changed, 974 insertions, 0 deletions
diff --git a/dev-util/buildbot-worker/Manifest b/dev-util/buildbot-worker/Manifest
new file mode 100644
index 000000000000..45cbff5d027b
--- /dev/null
+++ b/dev-util/buildbot-worker/Manifest
@@ -0,0 +1,15 @@
+AUX buildbot.tac.sample 1809 BLAKE2B 57b907edf44579b9f380d528d47fbf3616248d106190f700313e050bd439909f6522a20ce2bf91e6e18205b52ca79f9f6ecdb98d8018e67059c0a74c00d56483 SHA512 0cfe04d4587b9befef451d2fb47125643d84bbf12eec99a84622c21f06d7a8e10eb0ceb67c9491b61639b6634b2942ebc42d2ffa8253afbec688dc4e03d70158
+AUX buildbot_worker.confd2 366 BLAKE2B bfd08d2c6ee89c9e9d09e3280ded65765789b701cd4aa31d953b8f87d24ec1d85260b22d978d152191c918c72569e77bdac91de07d3eae4dad9ac529b4c140d4 SHA512 2bcb93b739827566bce295bc508481c50b57c1202d858359733649d4f35f116d994e0285a53a84d1b89d371a6fd23c0a89f4e555c31555bf14783eb5f57f15b0
+AUX buildbot_worker.initd2 1640 BLAKE2B 17a40547260004b40d77219aefa70f08846741e328a2a20bb0b075d5fa0007cc6ad63ecf600eee49251de14c4abb41f70ca813a9429dbce251509121157da9b9 SHA512 8eae575cb001b4750cd2033f9cb82d3985ad9bc2a4bc20ff0e4aaa0cbd05bacf8d6d885ec08112da15e0ccf8fd895006eed39b0b9a4bcaee86911b5180fab0f2
+DIST buildbot-worker-0.9.12.tar.gz 101655 BLAKE2B a73f98ec56bd3ad6d19ad0b9dfa015869fd6115789a7ddcecdebdac8707850715c677ee248668f73035ea5656665973634829f2f97e3e75fe8e1515cb0838b88 SHA512 c2e86bd8818eddc2849626a0c7642169bc91fa2cc1d531977736e53c4ad3c87c3f0cb17d7b9acd137e783ae822f558a19f4668e3cd37e90a8435157485bd1d57
+DIST buildbot-worker-0.9.13.tar.gz 102710 BLAKE2B ab60bc2607a706ecc760c2439655bca3f328d773fbb07e73c994f079356341a251ca23c573a71cce92dbf71ba62ceaa70210f8925fd4d1cdfac335b2a485ee9f SHA512 920f76d70c88a660b1d4c15683847a144b8dfaa01b91742ff2fedbe013ab030d3c5f07b6308f8bfb3f7bf3c2f805f7735d007e67257ca5233d2b585518f79e40
+DIST buildbot-worker-0.9.15.post1.tar.gz 100901 BLAKE2B 5e4744fcd69e2920e0ca9ba0b1aa77ea5f62ed4aecc9f00df17953dc813e1f8d61a859ab0aacc26f88f51d281574a8089b849fe063d55c8649c4a53b528d8ba8 SHA512 6ee23f1dd52672646f28978cec3fa9e29b64cae84f524bbcb6f2614a4a56e49e8363975b89cd3508e78c9779233a27403e46fc098be0808d6cfc1e6aa6b8499f
+DIST buildbot-worker-1.1.0.tar.gz 102142 BLAKE2B 144587edf2adc9d99837dc549b4d0696761f6cb3c959d4c133a5136606934ce03836cd1fcb019e7bb8ec473526c2ac07146c4820ef4d8b17ed9d843acd6c06b4 SHA512 77c46b3c9a16847eaf72de1dafa871a3242b66235c94ce8109f953db39aa4b74de2a03ca7ff06e91f8ea0751ed57e6ec1f39336912d56346f1bed171f597f6ed
+DIST buildbot-worker-1.1.2.tar.gz 103013 BLAKE2B b44593b71e61fee4037911759fa4f686aaabf5ef4be9efaecd539e88c5fc2ed2059d8dd8d6d1c4b3ba57d3563f79aaa404176529622003070c136803c90beb10 SHA512 3dd3da7e87d667307fca264d91af4671f76c3aad93a0512ae5777bb2e3972efe349968cf72fa17b99e45f2d7cec1ec16b1180c48d296e2702c9548bf858951a7
+EBUILD buildbot-worker-0.9.12.ebuild 4808 BLAKE2B 56e8fb43e57c6a90054296637223fc719e4b52738a3d5037326713b10ef29ba9ac9c71c2f468c040e075310501720147d59b83f9e83a4cf45146784de22905e1 SHA512 9280d45f8db1a23af1aa1098b6dd8677a22036a5256f6bd36b54a45f488a7c4ea2dbda2b006aaa2bec2084c14fe30cec56b3e6d6d65ae5a00db86e3307c3c7f2
+EBUILD buildbot-worker-0.9.13.ebuild 4811 BLAKE2B aa27842388456ee6deb710df750bcc84d6550b4bc67d1e37892127ae3f174fa7c170e9c07e6d3e6447abc9f2240375c8139475cb6c97d34220596dd4bb003645 SHA512 883cb6457f5f71ceff7becf1ca035466dd30ee796a1a8e0ec7bf61f5bd0fde926d21b264e3c1bc5aab8144027baefdd5ff27c55a2a669059a5a6f5e9cd3b0098
+EBUILD buildbot-worker-0.9.15_p1.ebuild 4815 BLAKE2B b2c7ed54635f056e08dbf6f88a61d3e08e5a6ecd0a85b2ef1a8f20630c2310325d5a794da6ed8b0a83a75fe2f0df833bd88353cf5505389f5e276b8bcd3a4718 SHA512 ffea0666c8da47bce1d410c8de890ef8f37b77a6739199cc9a3a895ac4c79f7cef82b1ffba30a453039e577f4f75e43a5b441690735757f7b899093449203258
+EBUILD buildbot-worker-1.1.0.ebuild 4815 BLAKE2B b2c7ed54635f056e08dbf6f88a61d3e08e5a6ecd0a85b2ef1a8f20630c2310325d5a794da6ed8b0a83a75fe2f0df833bd88353cf5505389f5e276b8bcd3a4718 SHA512 ffea0666c8da47bce1d410c8de890ef8f37b77a6739199cc9a3a895ac4c79f7cef82b1ffba30a453039e577f4f75e43a5b441690735757f7b899093449203258
+EBUILD buildbot-worker-1.1.2.ebuild 4815 BLAKE2B b2c7ed54635f056e08dbf6f88a61d3e08e5a6ecd0a85b2ef1a8f20630c2310325d5a794da6ed8b0a83a75fe2f0df833bd88353cf5505389f5e276b8bcd3a4718 SHA512 ffea0666c8da47bce1d410c8de890ef8f37b77a6739199cc9a3a895ac4c79f7cef82b1ffba30a453039e577f4f75e43a5b441690735757f7b899093449203258
+EBUILD buildbot-worker-9999.ebuild 4815 BLAKE2B b2c7ed54635f056e08dbf6f88a61d3e08e5a6ecd0a85b2ef1a8f20630c2310325d5a794da6ed8b0a83a75fe2f0df833bd88353cf5505389f5e276b8bcd3a4718 SHA512 ffea0666c8da47bce1d410c8de890ef8f37b77a6739199cc9a3a895ac4c79f7cef82b1ffba30a453039e577f4f75e43a5b441690735757f7b899093449203258
+MISC metadata.xml 591 BLAKE2B e5b06e8136a2adbab54c70e416a7117fccf3ae0a33bab129e1b5db13096cdb8716ca09606fd67a9c82088a0e40e0ae8bc3137262086c8ebb45bbc6993c14984a SHA512 d3273df1c8e6284b75ab5cd15cc5092d10db8ab8c0126e5eb21425bf3f2cab0f582a4e1bdf1e96881cc580a13047ac9fc72e09474f03dd788f85cd7962be6257
diff --git a/dev-util/buildbot-worker/buildbot-worker-0.9.12.ebuild b/dev-util/buildbot-worker/buildbot-worker-0.9.12.ebuild
new file mode 100644
index 000000000000..475028a231a8
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-0.9.12.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python2_7 python3_{5,6} )
+
+EGIT_REPO_URI="https://github.com/buildbot/buildbot.git"
+
+[[ ${PV} == *9999 ]] && inherit git-r3
+inherit readme.gentoo-r1 user distutils-r1
+
+DESCRIPTION="BuildBot Worker (slave) Daemon"
+HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.org/project/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.9.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.13.ebuild b/dev-util/buildbot-worker/buildbot-worker-0.9.13.ebuild
new file mode 100644
index 000000000000..f1331b427b7a
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-0.9.13.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+EGIT_REPO_URI="https://github.com/buildbot/buildbot.git"
+
+[[ ${PV} == *9999 ]] && inherit git-r3
+inherit readme.gentoo-r1 user distutils-r1
+
+DESCRIPTION="BuildBot Worker (slave) Daemon"
+HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.org/project/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.9.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}/worker
+
+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.15_p1.ebuild b/dev-util/buildbot-worker/buildbot-worker-0.9.15_p1.ebuild
new file mode 100644
index 000000000000..dea70dbdd5e7
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-0.9.15_p1.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+EGIT_REPO_URI="https://github.com/buildbot/buildbot.git"
+
+[[ ${PV} == *9999 ]] && inherit git-r3
+inherit readme.gentoo-r1 user distutils-r1
+
+DESCRIPTION="BuildBot Worker (slave) Daemon"
+HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.org/project/buildbot-worker/"
+
+MY_V="${PV/_p/.post}"
+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.9.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}/worker
+
+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-1.1.0.ebuild b/dev-util/buildbot-worker/buildbot-worker-1.1.0.ebuild
new file mode 100644
index 000000000000..dea70dbdd5e7
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-1.1.0.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+EGIT_REPO_URI="https://github.com/buildbot/buildbot.git"
+
+[[ ${PV} == *9999 ]] && inherit git-r3
+inherit readme.gentoo-r1 user distutils-r1
+
+DESCRIPTION="BuildBot Worker (slave) Daemon"
+HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.org/project/buildbot-worker/"
+
+MY_V="${PV/_p/.post}"
+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.9.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}/worker
+
+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-1.1.2.ebuild b/dev-util/buildbot-worker/buildbot-worker-1.1.2.ebuild
new file mode 100644
index 000000000000..dea70dbdd5e7
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-1.1.2.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+EGIT_REPO_URI="https://github.com/buildbot/buildbot.git"
+
+[[ ${PV} == *9999 ]] && inherit git-r3
+inherit readme.gentoo-r1 user distutils-r1
+
+DESCRIPTION="BuildBot Worker (slave) Daemon"
+HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.org/project/buildbot-worker/"
+
+MY_V="${PV/_p/.post}"
+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.9.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}/worker
+
+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-9999.ebuild b/dev-util/buildbot-worker/buildbot-worker-9999.ebuild
new file mode 100644
index 000000000000..dea70dbdd5e7
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-9999.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+EGIT_REPO_URI="https://github.com/buildbot/buildbot.git"
+
+[[ ${PV} == *9999 ]] && inherit git-r3
+inherit readme.gentoo-r1 user distutils-r1
+
+DESCRIPTION="BuildBot Worker (slave) Daemon"
+HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.org/project/buildbot-worker/"
+
+MY_V="${PV/_p/.post}"
+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.9.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}/worker
+
+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.confd2 b/dev-util/buildbot-worker/files/buildbot_worker.confd2
new file mode 100644
index 000000000000..f14e3210ca99
--- /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 specific 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.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/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>