From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1182840-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 51ECA1382C5
	for <garchives@archives.gentoo.org>; Sun, 28 Jun 2020 00:46:42 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B95BBE08FF;
	Sun, 28 Jun 2020 00:46:39 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 9566DE08FF
	for <gentoo-commits@lists.gentoo.org>; Sun, 28 Jun 2020 00:46:39 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 8556D34F016
	for <gentoo-commits@lists.gentoo.org>; Sun, 28 Jun 2020 00:46:38 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id F15B12AB
	for <gentoo-commits@lists.gentoo.org>; Sun, 28 Jun 2020 00:46:33 +0000 (UTC)
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" <dolsen@gentoo.org>
Message-ID: <1593305179.4a2158f10fa26b915878f56ff5ad02718f0b5094.dolsen@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/buildbot-worker/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-util/buildbot-worker/Manifest dev-util/buildbot-worker/buildbot-worker-2.8.2.ebuild
X-VCS-Directories: dev-util/buildbot-worker/
X-VCS-Committer: dolsen
X-VCS-Committer-Name: Brian Dolbec
X-VCS-Revision: 4a2158f10fa26b915878f56ff5ad02718f0b5094
X-VCS-Branch: master
Date: Sun, 28 Jun 2020 00:46:33 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 3683b287-9989-4ad4-9160-302ef678ac0c
X-Archives-Hash: 3e387e3a671b9fdc99ae2aa858990351

commit:     4a2158f10fa26b915878f56ff5ad02718f0b5094
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 28 00:01:06 2020 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun Jun 28 00:46:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a2158f1

dev-util/buildbot-worker: Version bump

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

 dev-util/buildbot-worker/Manifest                  |   1 +
 .../buildbot-worker/buildbot-worker-2.8.2.ebuild   | 126 +++++++++++++++++++++
 2 files changed, 127 insertions(+)

diff --git a/dev-util/buildbot-worker/Manifest b/dev-util/buildbot-worker/Manifest
index 6c7a6260837..230a5ed56d4 100644
--- a/dev-util/buildbot-worker/Manifest
+++ b/dev-util/buildbot-worker/Manifest
@@ -1,2 +1,3 @@
 DIST buildbot-worker-2.7.0.tar.gz 101075 BLAKE2B 2ee82434f565bef111685712b9b4dd7b0c522de59eefe3eda672827e4bcffae8288c5b9842221b52aa7d5907eeadd4bc5c635382b8c6c4e82977b3c139afdd4b SHA512 bdfce0a7b222fdddbf7830f90c1775e2bded7080e5053b114b7c136b3e114f6c8b26ee4ad802fce66514524e29e863a2f1a4366758c59ebbc6eeadb4b0a271db
 DIST buildbot-worker-2.8.0.tar.gz 102605 BLAKE2B 4cd6d8755803d7649acaf1b45e6632a7a9bddd8a58590a8caa73f686584fedf62d98911a9e148e5a6f34c99b8551cd80c2acbd03fc4f892300cad89a4f68e0b8 SHA512 62f3a72ed7d7ca724b667528e55673c20382ed95abc898dc43e43c5e09bc1d8116eeb2791145097a9b9f7ab2d38a90d974dfbbf5697d8c045a630632ece8512e
+DIST buildbot-worker-2.8.2.tar.gz 101707 BLAKE2B 451dff979c6934bf6dd4e1579abbe18e9cf43551c906bd516c788a6a5f6170650a5468927bec0a8d4ab242e5886247406b2e098e1908a8d9b5777744982c7be6 SHA512 0628825ac023a66cd249dc6b42ff2f3ad3b5c0cb97561fd332ce4775abaa5368a8b7b636115259ab4aa842c811178c9b641ef4453b06167315eb81117ffef815

diff --git a/dev-util/buildbot-worker/buildbot-worker-2.8.2.ebuild b/dev-util/buildbot-worker/buildbot-worker-2.8.2.ebuild
new file mode 100644
index 00000000000..3bd934a5034
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-2.8.2.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+DISTUTILS_USE_SETUPTOOLS="rdepend"
+
+inherit readme.gentoo-r1 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}"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	acct-user/buildbot
+	>=dev-python/twisted-17.9.0[${PYTHON_USEDEP}]
+	dev-python/future[${PYTHON_USEDEP}]
+	!<dev-util/buildbot-1.0.0
+"
+DEPEND="${RDEPEND}
+	test? (
+		dev-python/mock[${PYTHON_USEDEP}]
+		dev-python/setuptools_trial[${PYTHON_USEDEP}]
+	)
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+	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."
+}
+
+distutils_enable_tests setup.py
+
+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 "More than one instance of a buildbot_worker can be run simultaneously."
+		ewarn " 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: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}"
+		chown --recursive buildbot:buildbot "${instance_log_path}" \
+			|| die "Setting permissions for instance failed"
+	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."
+}