From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1324240-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 E6CF1158013
	for <garchives@archives.gentoo.org>; Sat, 25 Sep 2021 18:08:55 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 2D473E0844;
	Sat, 25 Sep 2021 18:08:55 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id ECE25E0844
	for <gentoo-commits@lists.gentoo.org>; Sat, 25 Sep 2021 18:08:54 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 0C906342C2C
	for <gentoo-commits@lists.gentoo.org>; Sat, 25 Sep 2021 18:08:54 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 92A8510B
	for <gentoo-commits@lists.gentoo.org>; Sat, 25 Sep 2021 18:08:52 +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: <1632593223.33f89dc6c34036b1f0fd00ee829847f117445883.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-3.3.0.ebuild
X-VCS-Directories: dev-util/buildbot-worker/
X-VCS-Committer: dolsen
X-VCS-Committer-Name: Brian Dolbec
X-VCS-Revision: 33f89dc6c34036b1f0fd00ee829847f117445883
X-VCS-Branch: master
Date: Sat, 25 Sep 2021 18:08:52 +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: 8d905b86-de02-42e5-8504-863ff3285557
X-Archives-Hash: 914f6ca4c164d434d98f9f52b1e673db

commit:     33f89dc6c34036b1f0fd00ee829847f117445883
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 25 18:02:07 2021 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Sep 25 18:07:03 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33f89dc6

dev-util/buildbot-worker: Version bump to 3.3.0

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

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

diff --git a/dev-util/buildbot-worker/Manifest b/dev-util/buildbot-worker/Manifest
index 73f164b5b61..e785c6ec544 100644
--- a/dev-util/buildbot-worker/Manifest
+++ b/dev-util/buildbot-worker/Manifest
@@ -6,3 +6,4 @@ DIST buildbot-worker-3.0.2.tar.gz 96923 BLAKE2B 720d265381c0dc4f876ba1c87df893d8
 DIST buildbot-worker-3.1.0.tar.gz 97938 BLAKE2B a886656ad099a849731307ce5db4eea0990b46bbae3aef8f931cbbfbaac0c8ac69d81fde1c1f6791a489e6dd1abe8b09f90615c658a31d8fb8cf3a0eb0cb6cb1 SHA512 eca2a32c67822adc0dd258ba991205525024ee1543e218337835393ad9bd948d5f48dd4348976c64eb4c6812a16a7e951f4114ef81982a49a0d80da485567f98
 DIST buildbot-worker-3.1.1.tar.gz 98239 BLAKE2B e73abcdd0fb067da0e77bf8382f8d4d54c0db63e3cf04d003599dc68dfe5c742758ba2c3e39368413a45e8c5beb913a4cf5571e229c3ce5084066790702fb4e8 SHA512 9bf969aadf0f2ccea726365b1e250ebd0c0d0146b4fb1b49ae675e0db555a0b50a87ceb455c25f987b75605d72ab50306f5af9247978fe93270d2c97b8ed04dd
 DIST buildbot-worker-3.2.0.tar.gz 99401 BLAKE2B e50ee76f667aab2a07647df3bd1dfd2016827bc5bf96be5f2f6e90158790c3b908f0c5b88fead59bf9977dc15adbe275c7ba81829c56fde3c1c318084633624f SHA512 c7822c16761052f2b45b809de3d3ff910f40679d885213541aa87f54a3490e9a092152f9cbb8c4ab25d1e5b2c9597e87b202f0db62c79f35e8fec2cfcc797653
+DIST buildbot-worker-3.3.0.tar.gz 99996 BLAKE2B 4e2bbe6467fc58a9f8c597939cdcfd4538712445580ab7f2c0e1ce3415cc1f8c60ce2b3cba4c16f341d8c19e1b99a91e799c7d3ff2343af0fffa0a1740960588 SHA512 e75a7a91a5b2c418dae65abdd1dde2b840a840e5b9cc1a218007a9e33e1cd58288bc708ec43ecfd9ec74a257809a59f65923ec8dc8aee1ef28cfaf82314964e3

diff --git a/dev-util/buildbot-worker/buildbot-worker-3.3.0.ebuild b/dev-util/buildbot-worker/buildbot-worker-3.3.0.ebuild
new file mode 100644
index 00000000000..e66c92ea227
--- /dev/null
+++ b/dev-util/buildbot-worker/buildbot-worker-3.3.0.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+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 ~arm64 ~amd64-linux ~x86-linux"
+
+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."
+}