dev-util/buildbot-worker: Version bump
authorBrian Dolbec <dolsen@gentoo.org>
Sun, 17 Jun 2018 10:34:53 +0000 (03:34 -0700)
committerBrian Dolbec <dolsen@gentoo.org>
Wed, 27 Jun 2018 15:24:12 +0000 (08:24 -0700)
Package-Manager: Portage-2.3.40, Repoman-2.3.9

dev-util/buildbot-worker/Manifest
dev-util/buildbot-worker/buildbot-worker-1.1.2.ebuild [new file with mode: 0644]
dev-util/buildbot-worker/files/buildbot_worker.confd2

index 8444ffed3982284c2ab2f9d6f0f1fe2cb63cd1e9..bf6ffcf0ac6dfcd0c8d7210446d8f206b0a8ca7d 100644 (file)
@@ -2,3 +2,4 @@ DIST buildbot-worker-0.9.12.tar.gz 101655 BLAKE2B a73f98ec56bd3ad6d19ad0b9dfa015
 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
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 (file)
index 0000000..dea70db
--- /dev/null
@@ -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."
+}
index 3ae1d865fdb1e875abc5aa7e7d69a9faa060b26b..f14e3210ca99ea537b2c6bcb984b24eaf839866d 100644 (file)
@@ -8,7 +8,7 @@ USERNAME="buildbot"
 # Extra options passed to twistd.
 TWISTD_OPTS=""
 
-# Optional specifiv python version to run in 
+# Optional specific python version to run in
 # (if not the system default version)
 # ie: RUNTIME_PYTHON="/usr/bin/python2.7"
 RUNTIME_PYTHON=""