public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/buildbot/, dev-util/buildbot/files/
@ 2016-03-30 12:18 Patrice Clement
  0 siblings, 0 replies; 8+ messages in thread
From: Patrice Clement @ 2016-03-30 12:18 UTC (permalink / raw
  To: gentoo-commits

commit:     0462b33e75b5061c6671edc5fabf89b53dd1e09f
Author:     Michael Seifert <mseifert <AT> error-reports <DOT> org>
AuthorDate: Thu Mar 10 18:48:49 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Mar 30 12:03:13 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0462b33e

dev-util/buildbot: Added support for multiple service instances when using systemd.

This commit adds support for starting multiple buildmaster instances using
systemd. A service configuration file allows to specify the filesystem location
of the buildmaster instances. A systemd target allows to start up or shut down
all buildmaster instances at once.

Gentoo-Bug: https://bugs.gentoo.org/570666
Closes: https://github.com/gentoo/gentoo/pull/1027

Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 dev-util/buildbot/buildbot-0.8.12-r2.ebuild         |  4 +++-
 dev-util/buildbot/files/buildmaster.target          |  5 +++++
 dev-util/buildbot/files/buildmaster_at.service      | 16 ++++++++++++++++
 dev-util/buildbot/files/buildmaster_at.service.conf |  5 +++++
 4 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/dev-util/buildbot/buildbot-0.8.12-r2.ebuild b/dev-util/buildbot/buildbot-0.8.12-r2.ebuild
index 99f46ee..c20323b 100644
--- a/dev-util/buildbot/buildbot-0.8.12-r2.ebuild
+++ b/dev-util/buildbot/buildbot-0.8.12-r2.ebuild
@@ -82,7 +82,9 @@ src_install() {
 
 	newconfd "${FILESDIR}/buildmaster.confd" buildmaster
 	newinitd "${FILESDIR}/buildmaster.initd" buildmaster
-	systemd_dounit "${FILESDIR}"/${PN}.service
+	systemd_dounit "${FILESDIR}/buildmaster.target"
+	systemd_newunit "${FILESDIR}/buildmaster_at.service" "buildmaster@.service"
+	systemd_install_serviced "${FILESDIR}/buildmaster_at.service.conf" "buildmaster@.service"
 
 	readme.gentoo_create_doc
 }

diff --git a/dev-util/buildbot/files/buildmaster.target b/dev-util/buildbot/files/buildmaster.target
new file mode 100644
index 0000000..2bf1a36
--- /dev/null
+++ b/dev-util/buildbot/files/buildmaster.target
@@ -0,0 +1,5 @@
+[Unit]
+Description=Buildbot target that allows to start or stop all buildmaster@*.service instances
+
+[Install]
+WantedBy=multi-user.target

diff --git a/dev-util/buildbot/files/buildmaster_at.service b/dev-util/buildbot/files/buildmaster_at.service
new file mode 100644
index 0000000..88f9f57
--- /dev/null
+++ b/dev-util/buildbot/files/buildmaster_at.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=buildbot master daemon
+After=local-fs.target network.target
+PartOf=buildmaster.target
+
+[Service]
+Environment=BASEDIR=/var/lib/buildmaster
+Type=forking
+User=buildbot
+ExecStartPre=/usr/bin/buildbot checkconfig ${BASEDIR}/%i
+ExecStart=/usr/bin/buildbot start ${BASEDIR}/%i
+ExecStop=/usr/bin/buildbot stop ${BASEDIR}/%i
+
+[Install]
+WantedBy=buildmaster.target
+

diff --git a/dev-util/buildbot/files/buildmaster_at.service.conf b/dev-util/buildbot/files/buildmaster_at.service.conf
new file mode 100644
index 0000000..baf1ae7
--- /dev/null
+++ b/dev-util/buildbot/files/buildmaster_at.service.conf
@@ -0,0 +1,5 @@
+# Uncomment the following lines to configure the base directory for all buildmaster instances.
+
+#[Service]
+#Environment=BASEDIR=/var/lib/buildmaster
+


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/buildbot/, dev-util/buildbot/files/
@ 2016-03-30 12:18 Patrice Clement
  0 siblings, 0 replies; 8+ messages in thread
From: Patrice Clement @ 2016-03-30 12:18 UTC (permalink / raw
  To: gentoo-commits

commit:     0a098cd5685c2a28030738928c689fc6b338cf10
Author:     Michael Seifert <mseifert <AT> error-reports <DOT> org>
AuthorDate: Thu Mar 10 18:35:55 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Mar 30 12:02:24 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a098cd5

dev-util/buildbot: Bumped to 0.8.12-r2. Removed 0.8.12-r1.

Bumped version from 0.8.12-r1 to 0.8.12-r2, due to updated initd file. The
initd file now supports multiple instances of buildmaster.

Gentoo-Bug: https://bugs.gentoo.org/570666
Closes: https://github.com/gentoo/gentoo/pull/1027

Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 ...-0.8.12-r1.ebuild => buildbot-0.8.12-r2.ebuild} |  0
 dev-util/buildbot/files/buildmaster.initd          | 35 +++++++++++++---------
 2 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/dev-util/buildbot/buildbot-0.8.12-r1.ebuild b/dev-util/buildbot/buildbot-0.8.12-r2.ebuild
similarity index 100%
rename from dev-util/buildbot/buildbot-0.8.12-r1.ebuild
rename to dev-util/buildbot/buildbot-0.8.12-r2.ebuild

diff --git a/dev-util/buildbot/files/buildmaster.initd b/dev-util/buildbot/files/buildmaster.initd
index 313365f..39440f7 100644
--- a/dev-util/buildbot/files/buildmaster.initd
+++ b/dev-util/buildbot/files/buildmaster.initd
@@ -1,14 +1,21 @@
 #!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 extra_started_commands="reload"
 
+BUILDMASTER_NAME=${RC_SVCNAME:12}
+BUILDMASTER_PATH="${BASEDIR}/${BUILDMASTER_NAME}"
+
 depend() {
 	need net
 }
 
 checkconfig() {
+	if [ -z "${BUILDMASTER_NAME}" ]; then
+		eerror "Buildmaster name not defined. Please link buildmaster.foo to this file to start the buildmaster with the name \"foo\"."
+		return 1
+	fi
 	if [ -z "${BASEDIR}" ]; then
 		eerror "BASEDIR not set"
 		return 1
@@ -17,38 +24,38 @@ checkconfig() {
 		eerror "USERNAME not set"
 		return 1
 	fi
-	if [ ! -d "${BASEDIR}" ]; then
-		eerror "${BASEDIR} is not a directory"
+	if [ ! -d "${BUILDMASTER_PATH}" ]; then
+		eerror "${BUILDMASTER_PATH} is not a directory"
 		return 1
 	fi
-	if [ ! -e "${BASEDIR}/buildbot.tac" ]; then
-		eerror "${BASEDIR} does not contain buildbot.tac"
+	if [ ! -e "${BUILDMASTER_PATH}/buildbot.tac" ]; then
+		eerror "${BUILDMASTER_PATH} does not contain buildbot.tac"
 		return 1
 	fi
 }
 
 start() {
 	checkconfig || return 1
-	ebegin "Starting buildmaster in ${BASEDIR}"
+	ebegin "Starting buildmaster in ${BUILDMASTER_PATH}"
 	start-stop-daemon --start -u "${USERNAME}" \
-		--pidfile "${BASEDIR}/buildmaster.pid" \
+		--pidfile "${BUILDMASTER_PATH}/buildmaster.pid" \
 		--exec /usr/bin/python -- /usr/bin/twistd \
 		--no_save \
-		--logfile="${BASEDIR}/twistd.log" \
-		--pidfile="${BASEDIR}/buildmaster.pid" \
-		--python="${BASEDIR}/buildbot.tac"
+		--logfile="${BUILDMASTER_PATH}/twistd.log" \
+		--pidfile="${BUILDMASTER_PATH}/buildmaster.pid" \
+		--python="${BUILDMASTER_PATH}/buildbot.tac"
 	eend $?
 }
 
 stop() {
-	ebegin "Stopping buildmaster in ${BASEDIR}"
-	start-stop-daemon --stop --pidfile "${BASEDIR}/buildmaster.pid"
+	ebegin "Stopping buildmaster in ${BUILDMASTER_PATH}"
+	start-stop-daemon --stop --pidfile "${BUILDMASTER_PATH}/buildmaster.pid"
 	eend $?
 }
 
 reload() {
-	ebegin "Reconfiguring buildmaster in ${BASEDIR}"
+	ebegin "Reconfiguring buildmaster in ${BUILDMASTER_PATH}"
 	start-stop-daemon --signal HUP --pidfile \
-		"${BASEDIR}"/buildmaster.pid
+		"${BUILDMASTER_PATH}"/buildmaster.pid
 	eend $?
 }


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/buildbot/, dev-util/buildbot/files/
@ 2016-08-11  2:24 Brian Dolbec
  0 siblings, 0 replies; 8+ messages in thread
From: Brian Dolbec @ 2016-08-11  2:24 UTC (permalink / raw
  To: gentoo-commits

commit:     f02a962ac82d910fc293795721bca2368ac0028c
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 11 02:23:39 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Aug 11 02:24:35 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f02a962a

dev-util/buildbot: Update the 0.9.0_rc1 and 9999 versions with changes made in 0.8.12-r2

Clean up the files/ directory, remove the no longer needed .9 versions of the files.

Package-Manager: portage-2.3.0

 dev-util/buildbot/buildbot-0.9.0_rc1.ebuild    | 161 --------------------
 dev-util/buildbot/buildbot-0.9.1_rc1-r1.ebuild | 201 +++++++++++++++++++++++++
 dev-util/buildbot/buildbot-9999.ebuild         | 120 ++++++++++-----
 dev-util/buildbot/files/buildbot9.service      |  14 --
 dev-util/buildbot/files/buildmaster.confd.9    |  10 --
 dev-util/buildbot/files/buildmaster.initd.9    |  54 -------
 6 files changed, 281 insertions(+), 279 deletions(-)

diff --git a/dev-util/buildbot/buildbot-0.9.0_rc1.ebuild b/dev-util/buildbot/buildbot-0.9.0_rc1.ebuild
deleted file mode 100644
index fcaba40..0000000
--- a/dev-util/buildbot/buildbot-0.9.0_rc1.ebuild
+++ /dev/null
@@ -1,161 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-PYTHON_REQ_USE="sqlite"
-PYTHON_COMPAT=( python2_7 )
-
-EGIT_REPO_URI="https://github.com/buildbot/${PN}.git"
-
-[[ ${PV} == *9999 ]] && inherit git-r3
-inherit readme.gentoo-r1 user systemd distutils-r1
-
-MY_PV="${PV/_p/p}"
-MY_V="0.9.0rc1"
-MY_P="${PN}-${MY_V}"
-
-DESCRIPTION="BuildBot build automation system"
-HOMEPAGE="http://trac.buildbot.net/ https://github.com/buildbot/buildbot http://pypi.python.org/pypi/buildbot"
-[[ ${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="crypt doc examples irc mail manhole test"
-
-RDEPEND=">=dev-python/jinja-2.1[${PYTHON_USEDEP}]
-	|| (
-		>=dev-python/twisted-web-14.0.1[${PYTHON_USEDEP}]
-		>=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
-	)
-	>=dev-python/sqlalchemy-0.8[${PYTHON_USEDEP}]
-	>=dev-python/sqlalchemy-migrate-0.9[${PYTHON_USEDEP}]
-	crypt? (
-		>=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
-		dev-python/idna[${PYTHON_USEDEP}]
-		dev-python/service_identity[${PYTHON_USEDEP}]
-	)
-	irc? (
-		|| ( >=dev-python/twisted-words-14.0.1[${PYTHON_USEDEP}]
-			<dev-python/twisted-16.3.0[${PYTHON_USEDEP}]
-		)
-	)
-	mail? (
-		|| ( >=dev-python/twisted-mail-14.0.1[${PYTHON_USEDEP}]
-			<dev-python/twisted-16.3.0[${PYTHON_USEDEP}]
-		)
-	)
-	manhole? (
-		|| ( >=dev-python/twisted-conch-14.0.1[${PYTHON_USEDEP}]
-			<dev-python/twisted-16.3.0[${PYTHON_USEDEP}]
-		)
-	)
-	dev-python/future[${PYTHON_USEDEP}]
-	>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
-	>=dev-python/autobahn-0.10.2[${PYTHON_USEDEP}]
-	<dev-python/autobahn-0.13.0[${PYTHON_USEDEP}]
-	>=dev-python/txaio-2.2.2[${PYTHON_USEDEP}]
-	"
-DEPEND="${RDEPEND}
-	>=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}]
-	doc? ( >=dev-python/sphinx-1.4.3[${PYTHON_USEDEP}] )
-	test? (
-		>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
-		dev-python/mock[${PYTHON_USEDEP}]
-		|| (
-			(
-				>=dev-python/twisted-mail-14.0.1[${PYTHON_USEDEP}]
-				>=dev-python/twisted-web-14.0.1[${PYTHON_USEDEP}]
-				>=dev-python/twisted-words-14.0.1[${PYTHON_USEDEP}]
-			)
-			<dev-python/twisted-16.3.0[${PYTHON_USEDEP}]
-		)
-		dev-python/moto[${PYTHON_USEDEP}]
-		dev-python/boto3[${PYTHON_USEDEP}]
-		dev-python/ramlfications[${PYTHON_USEDEP}]
-		dev-python/pyjade[${PYTHON_USEDEP}]
-		dev-python/txgithub[${PYTHON_USEDEP}]
-		dev-python/txrequests[${PYTHON_USEDEP}]
-	)"
-
-# still yet to be added deps
-# doc? (     'sphinxcontrib-blockdiag',
-#            'sphinxcontrib-spelling',
-#            'pyenchant',
-#            'docutils>=0.8',
-#            'sphinx-jinja',)
-
-S=${WORKDIR}/${MY_P}
-[[ ${PV} == *9999 ]] && S=${S}/master
-
-pkg_setup() {
-	enewuser buildbot
-
-	DOC_CONTENTS="The \"buildbot\" user and the \"buildmaster\" init script has been added
-		to support starting buildbot through Gentoo's init system. To use this,
-		set up your build master following the documentation, make sure the
-		resulting directories are owned by the \"buildbot\" user and point
-		\"${EROOT}etc/conf.d/buildmaster\" at the right location. The scripts can
-		run as a different user if desired. If you need to run more than one
-		build master, just copy the scripts."
-}
-
-# docs generation is broken  might need a separate ebuild
-#python_compile_all() {
-	#if use doc; then
-		#einfo "Generation of documentation"
-		##'man' target is currently broken
-		#emake -C docs html
-	#fi
-#}
-
-python_install_all() {
-	distutils-r1_python_install_all
-
-	doman docs/buildbot.1
-
-	#if use doc; then
-	#	dohtml -r docs/_build/html/
-	#	# TODO: install man pages
-	#fi
-
-	if use examples; then
-		insinto /usr/share/doc/${PF}
-		doins -r contrib docs/examples
-	fi
-
-	newconfd "${FILESDIR}"/buildmaster.confd.9 buildmaster
-	newinitd "${FILESDIR}"/buildmaster.initd.9 buildmaster
-	systemd_dounit "${FILESDIR}/${PN}9".service
-
-	# In case of multiple masters, it's possible to edit web files
-	# so all master can share the changes. So protect them!
-	# If something else need to be protected, please open a bug
-	# on http://bugs.gentoo.org
-	local cp
-	add_config_protect() {
-		cp+=" $(python_get_sitedir)/${PN}/status/web"
-	}
-	python_foreach_impl add_config_protect
-	echo "CONFIG_PROTECT=\"${cp}\"" \
-		> 85${PN} || die
-	doenvd 85${PN}
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-	elog
-	elog "Upstream recommends the following when upgrading:"
-	elog "Each time you install a new version of Buildbot, you should run the"
-	elog "\"buildbot upgrade-master\" command on each of your pre-existing build masters."
-	elog "This will add files and fix (or at least detect) incompatibilities between"
-	elog "your old config and the new code."
-}

diff --git a/dev-util/buildbot/buildbot-0.9.1_rc1-r1.ebuild b/dev-util/buildbot/buildbot-0.9.1_rc1-r1.ebuild
new file mode 100644
index 0000000..be6322c
--- /dev/null
+++ b/dev-util/buildbot/buildbot-0.9.1_rc1-r1.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_REQ_USE="sqlite"
+PYTHON_COMPAT=( python2_7 )
+
+EGIT_REPO_URI="https://github.com/buildbot/${PN}.git"
+
+[[ ${PV} == *9999 ]] && inherit git-r3
+inherit readme.gentoo-r1 user systemd distutils-r1
+
+MY_PV="${PV/_p/p}"
+MY_V="0.9.0rc1"
+MY_P="${PN}-${MY_V}"
+
+DESCRIPTION="BuildBot build automation system"
+HOMEPAGE="http://trac.buildbot.net/ https://github.com/buildbot/buildbot http://pypi.python.org/pypi/buildbot"
+[[ ${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="crypt doc examples irc mail manhole test"
+
+RDEPEND=">=dev-python/jinja-2.1[${PYTHON_USEDEP}]
+	|| (
+		>=dev-python/twisted-web-14.0.1[${PYTHON_USEDEP}]
+		>=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+	)
+	>=dev-python/sqlalchemy-0.8[${PYTHON_USEDEP}]
+	>=dev-python/sqlalchemy-migrate-0.9[${PYTHON_USEDEP}]
+	crypt? (
+		>=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+		dev-python/idna[${PYTHON_USEDEP}]
+		dev-python/service_identity[${PYTHON_USEDEP}]
+	)
+	irc? (
+		|| ( >=dev-python/twisted-words-14.0.1[${PYTHON_USEDEP}]
+			<dev-python/twisted-16.3.0[${PYTHON_USEDEP}]
+		)
+	)
+	mail? (
+		|| ( >=dev-python/twisted-mail-14.0.1[${PYTHON_USEDEP}]
+			<dev-python/twisted-16.3.0[${PYTHON_USEDEP}]
+		)
+	)
+	manhole? (
+		|| ( >=dev-python/twisted-conch-14.0.1[${PYTHON_USEDEP}]
+			<dev-python/twisted-16.3.0[${PYTHON_USEDEP}]
+		)
+	)
+	dev-python/future[${PYTHON_USEDEP}]
+	>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
+	>=dev-python/autobahn-0.10.2[${PYTHON_USEDEP}]
+	<dev-python/autobahn-0.13.0[${PYTHON_USEDEP}]
+	>=dev-python/txaio-2.2.2[${PYTHON_USEDEP}]
+	"
+DEPEND="${RDEPEND}
+	>=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}]
+	doc? ( >=dev-python/sphinx-1.4.3[${PYTHON_USEDEP}] )
+	test? (
+		>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
+		dev-python/mock[${PYTHON_USEDEP}]
+		|| (
+			(
+				>=dev-python/twisted-mail-14.0.1[${PYTHON_USEDEP}]
+				>=dev-python/twisted-web-14.0.1[${PYTHON_USEDEP}]
+				>=dev-python/twisted-words-14.0.1[${PYTHON_USEDEP}]
+			)
+			<dev-python/twisted-16.3.0[${PYTHON_USEDEP}]
+		)
+		dev-python/moto[${PYTHON_USEDEP}]
+		dev-python/boto3[${PYTHON_USEDEP}]
+		dev-python/ramlfications[${PYTHON_USEDEP}]
+		dev-python/pyjade[${PYTHON_USEDEP}]
+		dev-python/txgithub[${PYTHON_USEDEP}]
+		dev-python/txrequests[${PYTHON_USEDEP}]
+	)"
+
+# still yet to be added deps
+# doc? (     'sphinxcontrib-blockdiag',
+#            'sphinxcontrib-spelling',
+#            'pyenchant',
+#            'docutils>=0.8',
+#            'sphinx-jinja',)
+
+S=${WORKDIR}/${MY_P}
+[[ ${PV} == *9999 ]] && S=${S}/master
+
+pkg_setup() {
+	enewuser buildbot
+
+	DOC_CONTENTS="The \"buildbot\" user and the \"buildmaster\" init script has been added
+		to support starting buildbot through Gentoo's init system. To use this,
+		execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
+		The scripts can	run as a different user if desired."
+}
+
+src_compile() {
+	distutils-r1_src_compile
+
+	if use doc; then
+		einfo "Generation of documentation"
+		pushd docs > /dev/null
+		#'man' target is currently broken
+		emake html
+		popd > /dev/null
+	fi
+}
+
+src_install() {
+	distutils-r1_src_install
+
+	doman docs/buildbot.1
+
+	if use doc; then
+		dohtml -r docs/_build/html/
+		# TODO: install man pages
+	fi
+
+	if use examples; then
+		insinto /usr/share/doc/${PF}
+		doins -r contrib docs/examples
+	fi
+
+	newconfd "${FILESDIR}/buildmaster.confd" buildmaster
+	newinitd "${FILESDIR}/buildmaster.initd" buildmaster
+	systemd_dounit "${FILESDIR}/buildmaster.target"
+	systemd_newunit "${FILESDIR}/buildmaster_at.service" "buildmaster@.service"
+	systemd_install_serviced "${FILESDIR}/buildmaster_at.service.conf" "buildmaster@.service"
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+
+	if [[ -n ${REPLACING_VERSIONS} ]]; then
+		ewarn
+		ewarn "Starting with buildbot-0.8.12-r2, more than one instance of buildmaster"
+		ewarn "can be run simultaneously. Note that \"BASEDIR\" in the buildbot 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 buildmaster 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/buildmaster /etc/init.d/buildmaster.myinstance"
+		ewarn "    rc-update add buildmaster.myinstance default"
+		ewarn "    /etc/init.d/buildmaster.myinstance start"
+		ewarn "Systems using systemd can do the following:"
+		ewarn "    systemctl enable buildmaster@myinstance.service"
+		ewarn "    systemctl enable buildmaster.target"
+		ewarn "    systemctl start buildmaster.target"
+		elog
+		elog "Upstream recommends the following when upgrading:"
+		elog "Each time you install a new version of Buildbot, you should run the"
+		elog "\"buildbot upgrade-master\" command on each of your pre-existing build masters."
+		elog "This will add files and fix (or at least detect) incompatibilities between"
+		elog "your old config and the new code."
+	fi
+	elog
+	elog "In order to create a new instance of buildmaster, execute:"
+	elog "    emerge --config =${CATEGORY}/${PF}"
+}
+
+pkg_config() {
+	local buildmaster_path="/var/lib/buildmaster"
+	einfo "This will prepare a new buildmaster instance in ${buildmaster_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="${buildmaster_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
+
+	local buildbot="/usr/bin/buildbot"
+	if [[ ! -d "${buildmaster_path}" ]]; then
+		mkdir --parents "${buildmaster_path}" || die "Unable to create directory ${buildmaster_path}"
+	fi
+	"${buildbot}" create-master "${instance_path}" &>/dev/null || die "Creating instance failed"
+	chown --recursive buildbot "${instance_path}" || die "Setting permissions for instance failed"
+	mv "${instance_path}/master.cfg.sample" "${instance_path}/master.cfg" \
+		|| die "Moving sample configuration failed"
+	ln --symbolic --relative "/etc/init.d/buildmaster" "/etc/init.d/buildmaster.${instance_name}" \
+		|| die "Unable to create link to init file"
+
+	einfo "Successfully created a buildmaster instance at ${instance_path}."
+	einfo "To change the default settings edit the master.cfg file in this directory."
+}

diff --git a/dev-util/buildbot/buildbot-9999.ebuild b/dev-util/buildbot/buildbot-9999.ebuild
index 8a0d136..05d4446 100644
--- a/dev-util/buildbot/buildbot-9999.ebuild
+++ b/dev-util/buildbot/buildbot-9999.ebuild
@@ -98,63 +98,103 @@ pkg_setup() {
 
 	DOC_CONTENTS="The \"buildbot\" user and the \"buildmaster\" init script has been added
 		to support starting buildbot through Gentoo's init system. To use this,
-		set up your build master following the documentation, make sure the
-		resulting directories are owned by the \"buildbot\" user and point
-		\"${EROOT}etc/conf.d/buildmaster\" at the right location. The scripts can
-		run as a different user if desired. If you need to run more than one
-		build master, just copy the scripts."
+		execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
+		The scripts can	run as a different user if desired."
 }
 
-# docs generation is broken  might need a separate ebuild
-#python_compile_all() {
-	#if use doc; then
-		#einfo "Generation of documentation"
-		##'man' target is currently broken
-		#emake -C docs html
-	#fi
-#}
+src_compile() {
+	distutils-r1_src_compile
 
-python_install_all() {
-	distutils-r1_python_install_all
+	if use doc; then
+		einfo "Generation of documentation"
+		pushd docs > /dev/null
+		#'man' target is currently broken
+		emake html
+		popd > /dev/null
+	fi
+}
+
+src_install() {
+	distutils-r1_src_install
 
 	doman docs/buildbot.1
 
-	#if use doc; then
-	#	dohtml -r docs/_build/html/
-	#	# TODO: install man pages
-	#fi
+	if use doc; then
+		dohtml -r docs/_build/html/
+		# TODO: install man pages
+	fi
 
 	if use examples; then
 		insinto /usr/share/doc/${PF}
 		doins -r contrib docs/examples
 	fi
 
-	newconfd "${FILESDIR}"/buildmaster.confd.9 buildmaster
-	newinitd "${FILESDIR}"/buildmaster.initd.9 buildmaster
-	systemd_dounit "${FILESDIR}/${PN}9".service
-
-	# In case of multiple masters, it's possible to edit web files
-	# so all master can share the changes. So protect them!
-	# If something else need to be protected, please open a bug
-	# on http://bugs.gentoo.org
-	local cp
-	add_config_protect() {
-		cp+=" $(python_get_sitedir)/${PN}/status/web"
-	}
-	python_foreach_impl add_config_protect
-	echo "CONFIG_PROTECT=\"${cp}\"" \
-		> 85${PN} || die
-	doenvd 85${PN}
+	newconfd "${FILESDIR}/buildmaster.confd" buildmaster
+	newinitd "${FILESDIR}/buildmaster.initd" buildmaster
+	systemd_dounit "${FILESDIR}/buildmaster.target"
+	systemd_newunit "${FILESDIR}/buildmaster_at.service" "buildmaster@.service"
+	systemd_install_serviced "${FILESDIR}/buildmaster_at.service.conf" "buildmaster@.service"
 
 	readme.gentoo_create_doc
 }
 
 pkg_postinst() {
 	readme.gentoo_print_elog
+
+	if [[ -n ${REPLACING_VERSIONS} ]]; then
+		ewarn
+		ewarn "Starting with buildbot-0.8.12-r2, more than one instance of buildmaster"
+		ewarn "can be run simultaneously. Note that \"BASEDIR\" in the buildbot 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 buildmaster 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/buildmaster /etc/init.d/buildmaster.myinstance"
+		ewarn "    rc-update add buildmaster.myinstance default"
+		ewarn "    /etc/init.d/buildmaster.myinstance start"
+		ewarn "Systems using systemd can do the following:"
+		ewarn "    systemctl enable buildmaster@myinstance.service"
+		ewarn "    systemctl enable buildmaster.target"
+		ewarn "    systemctl start buildmaster.target"
+		elog
+		elog "Upstream recommends the following when upgrading:"
+		elog "Each time you install a new version of Buildbot, you should run the"
+		elog "\"buildbot upgrade-master\" command on each of your pre-existing build masters."
+		elog "This will add files and fix (or at least detect) incompatibilities between"
+		elog "your old config and the new code."
+	fi
 	elog
-	elog "Upstream recommends the following when upgrading:"
-	elog "Each time you install a new version of Buildbot, you should run the"
-	elog "\"buildbot upgrade-master\" command on each of your pre-existing build masters."
-	elog "This will add files and fix (or at least detect) incompatibilities between"
-	elog "your old config and the new code."
+	elog "In order to create a new instance of buildmaster, execute:"
+	elog "    emerge --config =${CATEGORY}/${PF}"
+}
+
+pkg_config() {
+	local buildmaster_path="/var/lib/buildmaster"
+	einfo "This will prepare a new buildmaster instance in ${buildmaster_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="${buildmaster_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
+
+	local buildbot="/usr/bin/buildbot"
+	if [[ ! -d "${buildmaster_path}" ]]; then
+		mkdir --parents "${buildmaster_path}" || die "Unable to create directory ${buildmaster_path}"
+	fi
+	"${buildbot}" create-master "${instance_path}" &>/dev/null || die "Creating instance failed"
+	chown --recursive buildbot "${instance_path}" || die "Setting permissions for instance failed"
+	mv "${instance_path}/master.cfg.sample" "${instance_path}/master.cfg" \
+		|| die "Moving sample configuration failed"
+	ln --symbolic --relative "/etc/init.d/buildmaster" "/etc/init.d/buildmaster.${instance_name}" \
+		|| die "Unable to create link to init file"
+
+	einfo "Successfully created a buildmaster instance at ${instance_path}."
+	einfo "To change the default settings edit the master.cfg file in this directory."
 }

diff --git a/dev-util/buildbot/files/buildbot9.service b/dev-util/buildbot/files/buildbot9.service
deleted file mode 100644
index 371d6e0..0000000
--- a/dev-util/buildbot/files/buildbot9.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=buildbot master daemon
-After=local-fs.target network.target
-
-[Service]
-Type=forking
-User=buildbot
-WorkingDirectory=/var/lib/buildmaster
-ExecStartPre=/usr/bin/buildbot checkconfig /var/lib/buildmaster
-ExecStart=/usr/bin/buildbot start /var/lib/buildmaster
-ExecStop=/usr/bin/buildbot stop /var/lib/buildmaster
-
-[Install]
-WantedBy=multi-user.target

diff --git a/dev-util/buildbot/files/buildmaster.confd.9 b/dev-util/buildbot/files/buildmaster.confd.9
deleted file mode 100644
index e489d66..0000000
--- a/dev-util/buildbot/files/buildmaster.confd.9
+++ /dev/null
@@ -1,10 +0,0 @@
-
-# Path to the build master's basedir.
-BASEDIR=/var/lib/buildmaster
-
-# User account for the buildmaster.
-# The basedir should be owned by this user.
-USERNAME=buildbot
-
-# Extra options to pass to twistd.
-TWISTD_OPTS=""

diff --git a/dev-util/buildbot/files/buildmaster.initd.9 b/dev-util/buildbot/files/buildmaster.initd.9
deleted file mode 100644
index d146bff..0000000
--- a/dev-util/buildbot/files/buildmaster.initd.9
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_started_commands="reload"
-
-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 buildmaster in ${BASEDIR}"
-	start-stop-daemon --start -u "${USERNAME}" \
-		--pidfile "${BASEDIR}/buildmaster.pid" \
-		--exec /usr/bin/twistd -- \
-		--no_save \
-		--logfile="${BASEDIR}/twistd.log" \
-		--pidfile="${BASEDIR}/buildmaster.pid" \
-		--python="${BASEDIR}/buildbot.tac"
-	eend $?
-}
-
-stop() {
-	ebegin "Stopping buildmaster in ${BASEDIR}"
-	start-stop-daemon --stop --pidfile "${BASEDIR}/buildmaster.pid"
-	eend $?
-}
-
-reload() {
-	ebegin "Reconfiguring buildmaster in ${BASEDIR}"
-	start-stop-daemon --signal HUP --pidfile \
-		"${BASEDIR}"/buildmaster.pid
-	eend $?
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/buildbot/, dev-util/buildbot/files/
@ 2017-01-06  0:48 Brian Dolbec
  0 siblings, 0 replies; 8+ messages in thread
From: Brian Dolbec @ 2017-01-06  0:48 UTC (permalink / raw
  To: gentoo-commits

commit:     16054d8026ef98f083adc0d8c1c8ad48ea586a53
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  5 00:29:20 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Jan  6 00:48:13 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16054d80

dev-util/buildbot: Version bump

The test suite (and it's new deps) is fully functional now, passes all tests.

Package-Manager: Portage-2.3.3_p7, Repoman-2.3.1

 dev-util/buildbot/Manifest                         |   2 +
 dev-util/buildbot/buildbot-0.9.2.ebuild            | 223 +++++++++++++++++++++
 .../buildbot-0.9.Addmissedtestingtemplates.patch   |  25 +++
 3 files changed, 250 insertions(+)

diff --git a/dev-util/buildbot/Manifest b/dev-util/buildbot/Manifest
index 872f70f..623b6d0 100644
--- a/dev-util/buildbot/Manifest
+++ b/dev-util/buildbot/Manifest
@@ -2,3 +2,5 @@ DIST buildbot-0.8.10.tar.gz 4822307 SHA256 c4964d2ebd81cb80a14cb058fb2aab0572a1d
 DIST buildbot-0.8.12.tar.gz 4834352 SHA256 c6b66976dff712268566574d57131ec15e5682f6d4390cd5c8559bab0980c4d6 SHA512 18c5144132fb033f3581d3c494d5e8ff35d3e8b1548764452ce9ae543d710e58a2c6e3e8e46a0ef237804f9a6a45485890ae4616ab655fb00d4ccf328d6f6645 WHIRLPOOL 5754b7c0278fb5e7da8a7dd66253f6f4d12f54c125f6a78aa9018a2b6b22fd88a27e79e6821ab05e4cd9e87bf0dd08c3c73c7914d4c499ac13c48ca232ed21c8
 DIST buildbot-0.9.0.post1.tar.gz 3013406 SHA256 afd8229c9fd33daa6d8227cd665c75b1b25c47ffcc4046ab5fd5b290ccd536a3 SHA512 0b171ca6ed15b15b4df23d0618cb7d98f6ae922efaa1e35a9458efaaf676b80a6ff3be36231b8ca31cadf89c3968425c560a0bff3630e8792d179462eba0da67 WHIRLPOOL e440826e4a027b42d28c0f3a0afca3c46ec5dc0b4d629fcef75de4b3350cffa2208e0024983f0ffebd1df38a5d860c6bd541fc1c3e28f8b6669ee93a4d4be8b4
 DIST buildbot-0.9.1.tar.gz 3051975 SHA256 a9f385f66f5cc3021f4cbfce92496673ebf9171578fa9e5ae4f66732276d64ce SHA512 c3b845a3607c5eaa0a5076755bc0e285ba7c6809f9d7934fab7c6cf8299610e921034656cf3792113961176a821138c6d069122d4d1f1698f16badf3ef9a0dea WHIRLPOOL 6767878665f09ff7b6219ddcda73487b441f3e33ce580fc2df2f16d430217d4ac38b93e22a3f3abd9c8380ac6e6c93de6767faec1aa5615f82fbe8d8e20759e1
+DIST buildbot-0.9.2.tar.gz 3026977 SHA256 d33ec059941cf830c8f7b7f336a76e32e7122e2690a27b784efeddc6dbf4564a SHA512 a1c6345bcceb5c8f4ed600542625eee81e59af00a1b12054fe77e3b4ed5536b7004fcbd07cfc96baa3061193eb79e4290e056cf7157b71831370654c057a2c57 WHIRLPOOL 075a00d85df5321180345348a02ac12cc8a1bea36d6e60617ebe54de71ce5a989fcf009822834dad1994a6f83ebb5c6132f350902fd31d5b279c5c13014bb4b9
+DIST buildbot-test_templates.tar.xz 304 SHA256 3d581b74c21f88119f7e5f93f381f2004662ca7219aae9a05f0bd3f8cae48317 SHA512 87ba914896d86f70e2e4b24a51248c475bf24fad4c02e3a99d6d7fa41b5a57f369865b20a7c30dafa3162ba50ccb04de1809b0cf9d53e45537738e4821229866 WHIRLPOOL 151dc42ceed8e90c96cdd0b6e937f13019c0d6cd5e2e878ee971cbc69ce4ea56b240b58fa743766bd0d71cafa38279e37be077324eb5ece7b99df46eaf566dfe

diff --git a/dev-util/buildbot/buildbot-0.9.2.ebuild b/dev-util/buildbot/buildbot-0.9.2.ebuild
new file mode 100644
index 00000000..529c293
--- /dev/null
+++ b/dev-util/buildbot/buildbot-0.9.2.ebuild
@@ -0,0 +1,223 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_REQ_USE="sqlite"
+PYTHON_COMPAT=( python2_7 )
+
+EGIT_REPO_URI="https://github.com/buildbot/${PN}.git"
+
+[[ ${PV} == *9999 ]] && inherit git-r3
+inherit readme.gentoo-r1 user systemd distutils-r1
+
+MY_PV="${PV/_p/p}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="BuildBot build automation system"
+HOMEPAGE="http://trac.buildbot.net/ https://github.com/buildbot/buildbot http://pypi.python.org/pypi/buildbot"
+if [[ ${PV} != *9999 ]]; then
+	SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz
+		http://dev.gentoo.org/~dolsen/distfiles/buildbot-test_templates.tar.xz"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+if [[ ${PV} == *9999 ]]; then
+	KEYWORDS=""
+else
+	KEYWORDS="~amd64"
+fi
+
+IUSE="crypt doc examples irc mail manhole test"
+
+RDEPEND=">=dev-python/jinja-2.1[${PYTHON_USEDEP}]
+	|| (
+		>=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+		>=dev-python/twisted-web-14.0.1[${PYTHON_USEDEP}]
+	)
+	>=dev-python/autobahn-0.16.0[${PYTHON_USEDEP}]
+	>=dev-python/sqlalchemy-0.8[${PYTHON_USEDEP}]
+	>=dev-python/sqlalchemy-migrate-0.9[${PYTHON_USEDEP}]
+	crypt? (
+		>=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]
+		dev-python/idna[${PYTHON_USEDEP}]
+		dev-python/service_identity[${PYTHON_USEDEP}]
+	)
+	irc? (
+		dev-python/txrequests[${PYTHON_USEDEP}]
+		|| ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+			>=dev-python/twisted-words-14.0.1[${PYTHON_USEDEP}]
+		)
+	)
+	mail? (
+		|| ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+			>=dev-python/twisted-mail-14.0.1[${PYTHON_USEDEP}]
+		)
+	)
+	manhole? (
+		|| ( >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+			>=dev-python/twisted-conch-14.0.1[${PYTHON_USEDEP}]
+		)
+	)
+	dev-python/future[${PYTHON_USEDEP}]
+	>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
+	>=dev-python/txaio-2.2.2[${PYTHON_USEDEP}]
+	"
+DEPEND="${RDEPEND}
+	>=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}]
+	doc? ( >=dev-python/sphinx-1.4.3[${PYTHON_USEDEP}] )
+	test? (
+		>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
+		dev-python/mock[${PYTHON_USEDEP}]
+		=dev-python/httpretty-0.8.10[${PYTHON_USEDEP}]
+		|| (
+			>=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
+			(
+				>=dev-python/twisted-mail-14.0.1[${PYTHON_USEDEP}]
+				>=dev-python/twisted-web-14.0.1[${PYTHON_USEDEP}]
+				>=dev-python/twisted-words-14.0.1[${PYTHON_USEDEP}]
+			)
+		)
+		dev-python/moto[${PYTHON_USEDEP}]
+		dev-python/boto3[${PYTHON_USEDEP}]
+		dev-python/ramlfications[${PYTHON_USEDEP}]
+		dev-python/pyjade[${PYTHON_USEDEP}]
+		dev-python/txgithub[${PYTHON_USEDEP}]
+		dev-python/txrequests[${PYTHON_USEDEP}]
+		>=dev-python/treq-16.0.0[${PYTHON_USEDEP}]
+		dev-python/setuptools_trial[${PYTHON_USEDEP}]
+		~dev-util/buildbot-www-${PV}[${PYTHON_USEDEP}]
+	)"
+
+# still yet to be added deps
+# doc? (     'sphinxcontrib-blockdiag',
+#            'sphinxcontrib-spelling',
+#            'pyenchant',
+#            'docutils>=0.8',
+#            'sphinx-jinja',)
+
+S=${WORKDIR}/${MY_P}
+[[ ${PV} == *9999 ]] && S=${S}/master
+
+pkg_setup() {
+	enewuser buildbot
+
+	DOC_CONTENTS="The \"buildbot\" user and the \"buildmaster\" init script has been added
+		to support starting buildbot through Gentoo's init system. To use this,
+		execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
+		The scripts can	run as a different user if desired."
+}
+
+src_unpack() {
+	unpack ${MY_P}.tar.gz
+	cd ${MY_P}/buildbot/test/unit
+	unpack buildbot-test_templates.tar.xz
+}
+
+src_prepare() {
+	epatch "${FILESDIR}"/buildbot-0.9.Addmissedtestingtemplates.patch
+	}
+
+src_compile() {
+	distutils-r1_src_compile
+
+	if use doc; then
+		einfo "Generation of documentation"
+		pushd docs > /dev/null
+		#'man' target is currently broken
+		emake html
+		popd > /dev/null
+	fi
+}
+
+src_install() {
+	distutils-r1_src_install
+
+	doman docs/buildbot.1
+
+	if use doc; then
+		dohtml -r docs/_build/html/
+		# TODO: install man pages
+	fi
+
+	if use examples; then
+		insinto /usr/share/doc/${PF}
+		doins -r contrib docs/examples
+	fi
+
+	newconfd "${FILESDIR}/buildmaster.confd" buildmaster
+	newinitd "${FILESDIR}/buildmaster.initd" buildmaster
+	systemd_dounit "${FILESDIR}/buildmaster.target"
+	systemd_newunit "${FILESDIR}/buildmaster_at.service" "buildmaster@.service"
+	systemd_install_serviced "${FILESDIR}/buildmaster_at.service.conf" "buildmaster@.service"
+
+	readme.gentoo_create_doc
+}
+
+python_test() {
+	distutils_install_for_testing
+
+	esetup.py test || die "Tests failed under ${EPYTHON}"
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+
+	if [[ -n ${REPLACING_VERSIONS} ]]; then
+		ewarn
+		ewarn "Starting with buildbot-0.8.12-r2, more than one instance of buildmaster"
+		ewarn "can be run simultaneously. Note that \"BASEDIR\" in the buildbot 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 buildmaster 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/buildmaster /etc/init.d/buildmaster.myinstance"
+		ewarn "    rc-update add buildmaster.myinstance default"
+		ewarn "    /etc/init.d/buildmaster.myinstance start"
+		ewarn "Systems using systemd can do the following:"
+		ewarn "    systemctl enable buildmaster@myinstance.service"
+		ewarn "    systemctl enable buildmaster.target"
+		ewarn "    systemctl start buildmaster.target"
+		elog
+		elog "Upstream recommends the following when upgrading:"
+		elog "Each time you install a new version of Buildbot, you should run the"
+		elog "\"buildbot upgrade-master\" command on each of your pre-existing build masters."
+		elog "This will add files and fix (or at least detect) incompatibilities between"
+		elog "your old config and the new code."
+	fi
+	elog
+	elog "In order to create a new instance of buildmaster, execute:"
+	elog "    emerge --config =${CATEGORY}/${PF}"
+}
+
+pkg_config() {
+	local buildmaster_path="/var/lib/buildmaster"
+	einfo "This will prepare a new buildmaster instance in ${buildmaster_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="${buildmaster_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
+
+	local buildbot="/usr/bin/buildbot"
+	if [[ ! -d "${buildmaster_path}" ]]; then
+		mkdir --parents "${buildmaster_path}" || die "Unable to create directory ${buildmaster_path}"
+	fi
+	"${buildbot}" create-master "${instance_path}" &>/dev/null || die "Creating instance failed"
+	chown --recursive buildbot "${instance_path}" || die "Setting permissions for instance failed"
+	mv "${instance_path}/master.cfg.sample" "${instance_path}/master.cfg" \
+		|| die "Moving sample configuration failed"
+	ln --symbolic --relative "/etc/init.d/buildmaster" "/etc/init.d/buildmaster.${instance_name}" \
+		|| die "Unable to create link to init file"
+
+	einfo "Successfully created a buildmaster instance at ${instance_path}."
+	einfo "To change the default settings edit the master.cfg file in this directory."
+}

diff --git a/dev-util/buildbot/files/buildbot-0.9.Addmissedtestingtemplates.patch b/dev-util/buildbot/files/buildbot-0.9.Addmissedtestingtemplates.patch
new file mode 100644
index 00000000..3546c31
--- /dev/null
+++ b/dev-util/buildbot/files/buildbot-0.9.Addmissedtestingtemplates.patch
@@ -0,0 +1,25 @@
+From 5da64c3dda866a3e3ddf52ad00f455dc2c536a18 Mon Sep 17 00:00:00 2001
+From: Brian Dolbec <dolsen@gentoo.org>
+Date: Wed, 4 Jan 2017 17:44:56 -0800
+Subject: [PATCH] master/setup.py: Add missed testing templates
+
+---
+ master/setup.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/master/setup.py b/master/setup.py
+index be2ace952..79bcf143f 100755
+--- a/master/setup.py
++++ b/master/setup.py
+@@ -206,6 +206,8 @@ setup_args = {
+         ]),
+         include("buildbot/spec", "*.raml"),
+         include("buildbot/spec/types", "*.raml"),
++        include("buildbot/test/unit/test_templates_dir", "*.html"),
++        include("buildbot/test/unit/test_templates_dir/plugin", "*.*"),
+     ] + include_statics("buildbot/www/static"),
+     'cmdclass': {'install_data': install_data_twisted,
+                  'sdist': our_sdist},
+-- 
+2.11.0
+


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/buildbot/, dev-util/buildbot/files/
@ 2018-01-16 17:43 Brian Dolbec
  0 siblings, 0 replies; 8+ messages in thread
From: Brian Dolbec @ 2018-01-16 17:43 UTC (permalink / raw
  To: gentoo-commits

commit:     49514530a8d66c0078302b3363bf2d9f825bbcb6
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 16 01:05:11 2018 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Jan 16 17:41:38 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49514530

dev-util/buildbot: Version bump, update 9999 ebuild

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 dev-util/buildbot/Manifest                         |  1 +
 ...ldbot-9999.ebuild => buildbot-0.9.15_p1.ebuild} | 14 ++++++++--
 dev-util/buildbot/buildbot-9999.ebuild             | 10 +++++--
 ...uildbot-0.9.15_p1-buildbotworkerdocker.py.patch | 32 ++++++++++++++++++++++
 dev-util/buildbot/metadata.xml                     |  1 +
 5 files changed, 52 insertions(+), 6 deletions(-)

diff --git a/dev-util/buildbot/Manifest b/dev-util/buildbot/Manifest
index 1b4a50d57a5..d2609b51e79 100644
--- a/dev-util/buildbot/Manifest
+++ b/dev-util/buildbot/Manifest
@@ -3,3 +3,4 @@ DIST buildbot-0.9.10.tar.gz 3112750 BLAKE2B f09b1e38a2920ae34f45d946e8d88bc52509
 DIST buildbot-0.9.11.tar.gz 3096455 BLAKE2B 2582fd27e89fc684911926c272630bfdb3fb84e7c18dadff9e66f609a2976d2a70ba0f566af0a7805fe5a7a370e4215ce2ceca4187d418eaa7075414e6974106 SHA512 c68a657213b0f878d8c2b4e6ebe18cfc9b3e19a4eecaf085fd3e5631bbb78dc9bd14e6b3d4b576e78eb1631329c86331371200a350d33696204fb76e7beae81c
 DIST buildbot-0.9.12.tar.gz 3057832 BLAKE2B 8e1748739bacc3c884f353b2a1c798575e3ce5f451a1711ecf88a7c7e517da86d2e791748d31468a2bb07369022e96cb568518b7a8ce1d9e1cece0b6ab77eec8 SHA512 62459918267297b31b2a6416f72794c7a4ebdcb60de04ece1681f6b8be9debf161716cc70ad843fd468b23e02c521c0a0783a5a1e119d75648e107691d6b908d
 DIST buildbot-0.9.13.tar.gz 3061713 BLAKE2B fac74d610bf0ff1cfeea1c59c46e95339d6b080725f6b01258921175b8036daeef23dfd3bf2a71fe838d43b9d7777e3a3141ff9cec0e1c7e609f21c53f51b91d SHA512 b1cf176d01e04bc219be8ffa787a857aec7bcfb930c3e9cabe0410fca60d826c35e74d277cd5764fcd3c6183ea5f19bae195c09ad401cdd948bda500789f2ade
+DIST buildbot-0.9.15.post1.tar.gz 3088947 BLAKE2B c9a0265d3df2a9ac01872fc7106b5b787334bd899a43fcdb6ad06aab5e0e8f1ddb4374bf5211f251f26985c3b11a0b981bdd23fb668ac1717af36443831648e6 SHA512 c5c72132fd8446fbb14467851063d192dbb817506163eacc3022d563698453c66706a895613ca1c17502dd25957b31f6409996497d2e7646ab2fdbb3fb55c31d

diff --git a/dev-util/buildbot/buildbot-9999.ebuild b/dev-util/buildbot/buildbot-0.9.15_p1.ebuild
similarity index 96%
copy from dev-util/buildbot/buildbot-9999.ebuild
copy to dev-util/buildbot/buildbot-0.9.15_p1.ebuild
index a9a9d7adf5f..48d59be0032 100644
--- a/dev-util/buildbot/buildbot-9999.ebuild
+++ b/dev-util/buildbot/buildbot-0.9.15_p1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -10,7 +10,7 @@ EGIT_REPO_URI="https://github.com/buildbot/${PN}.git"
 [[ ${PV} == *9999 ]] && inherit git-r3
 inherit readme.gentoo-r1 user systemd distutils-r1
 
-MY_PV="${PV/_p/p}"
+MY_PV="${PV/_p/.post}"
 MY_P="${PN}-${MY_PV}"
 
 DESCRIPTION="BuildBot build automation system"
@@ -25,7 +25,7 @@ else
 	KEYWORDS="~amd64"
 fi
 
-IUSE="crypt doc examples irc test"
+IUSE="crypt doc docker examples irc test"
 
 RDEPEND="
 	>=dev-python/jinja-2.1[${PYTHON_USEDEP}]
@@ -48,6 +48,9 @@ RDEPEND="
 	irc? (
 		dev-python/txrequests[${PYTHON_USEDEP}]
 	)
+	docker? (
+		>=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}]
+	)
 "
 DEPEND="${RDEPEND}
 	>=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}]
@@ -74,11 +77,16 @@ DEPEND="${RDEPEND}
 		dev-python/treq[${PYTHON_USEDEP}]
 		dev-python/setuptools_trial[${PYTHON_USEDEP}]
 		~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}]
+		>=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}]
 	)"
 
 S=${WORKDIR}/${MY_P}
 [[ ${PV} == *9999 ]] && S=${S}/master
 
+#PATCHES=(
+#	"${FILESDIR}/${P}-buildbotworkerdocker.py.patch"
+#)
+
 pkg_setup() {
 	enewuser buildbot
 

diff --git a/dev-util/buildbot/buildbot-9999.ebuild b/dev-util/buildbot/buildbot-9999.ebuild
index a9a9d7adf5f..4d20f12a6a2 100644
--- a/dev-util/buildbot/buildbot-9999.ebuild
+++ b/dev-util/buildbot/buildbot-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="6"
@@ -10,7 +10,7 @@ EGIT_REPO_URI="https://github.com/buildbot/${PN}.git"
 [[ ${PV} == *9999 ]] && inherit git-r3
 inherit readme.gentoo-r1 user systemd distutils-r1
 
-MY_PV="${PV/_p/p}"
+MY_PV="${PV/_p/.post}"
 MY_P="${PN}-${MY_PV}"
 
 DESCRIPTION="BuildBot build automation system"
@@ -25,7 +25,7 @@ else
 	KEYWORDS="~amd64"
 fi
 
-IUSE="crypt doc examples irc test"
+IUSE="crypt doc docker examples irc test"
 
 RDEPEND="
 	>=dev-python/jinja-2.1[${PYTHON_USEDEP}]
@@ -48,6 +48,9 @@ RDEPEND="
 	irc? (
 		dev-python/txrequests[${PYTHON_USEDEP}]
 	)
+	docker? (
+		>=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}]
+	)
 "
 DEPEND="${RDEPEND}
 	>=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}]
@@ -74,6 +77,7 @@ DEPEND="${RDEPEND}
 		dev-python/treq[${PYTHON_USEDEP}]
 		dev-python/setuptools_trial[${PYTHON_USEDEP}]
 		~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}]
+		>=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}]
 	)"
 
 S=${WORKDIR}/${MY_P}

diff --git a/dev-util/buildbot/files/buildbot-0.9.15_p1-buildbotworkerdocker.py.patch b/dev-util/buildbot/files/buildbot-0.9.15_p1-buildbotworkerdocker.py.patch
new file mode 100644
index 00000000000..db08d7a45dd
--- /dev/null
+++ b/dev-util/buildbot/files/buildbot-0.9.15_p1-buildbotworkerdocker.py.patch
@@ -0,0 +1,32 @@
+From 7051ebdac8c8a9054e8a37ab7dd8fb6f0ac1affb Mon Sep 17 00:00:00 2001
+From: Brian Dolbec <dolsen@gentoo.org>
+Date: Mon, 15 Jan 2018 13:50:36 -0800
+Subject: [PATCH] master/buildbot/worker/docker.py: Fix test fail when docker
+ is not installed
+
+This fixes numerous tracebacks (note, only partial traceback):
+
+  File "/usr/lib64/python3.6/site-packages/buildbot/worker/docker.py", line 259, in _thd_start_instance
+    if docker_py_version >= 2.2:
+builtins.NameError: name 'docker_py_version' is not defined
+
+With this patch, the tests pass.
+---
+ master/buildbot/worker/docker.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/buildbot/worker/docker.py b/master/buildbot/worker/docker.py
+index 62e30785f..e558d69ff 100644
+--- a/buildbot/worker/docker.py
++++ b/buildbot/worker/docker.py
+@@ -41,6 +41,7 @@ try:
+ except ImportError:
+     docker = None
+     client = None
++    docker_py_version = 0.0
+ 
+ 
+ def _handle_stream_line(line):
+-- 
+2.15.1
+

diff --git a/dev-util/buildbot/metadata.xml b/dev-util/buildbot/metadata.xml
index dc8748343ec..a40eac4867f 100644
--- a/dev-util/buildbot/metadata.xml
+++ b/dev-util/buildbot/metadata.xml
@@ -24,6 +24,7 @@
 		* released under the GPL
 	</longdescription>
 	<use>
+		<flag name="docker">Add support for worker docker command steps</flag>
 		<flag name="irc">Add support for status delivery through an ircbot.</flag>
 		<flag name="mail">Add support for watching a maildir for commits.</flag>
 		<flag name="manhole">Add support for manhole (debug over ssh)</flag>


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/buildbot/, dev-util/buildbot/files/
@ 2020-05-12 18:15 Brian Dolbec
  0 siblings, 0 replies; 8+ messages in thread
From: Brian Dolbec @ 2020-05-12 18:15 UTC (permalink / raw
  To: gentoo-commits

commit:     ca2041cb54d4fd8c2af7461043cbc13f37fcfb65
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Fri May  8 17:34:17 2020 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue May 12 18:15:03 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca2041cb

dev-util/buildbot: Version bump, adds python 3.7,3.8

metadata.xml: take maintainership

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

 dev-util/buildbot/Manifest                         |  1 +
 ...{buildbot-9999.ebuild => buildbot-2.7.0.ebuild} | 47 ++++++------
 dev-util/buildbot/buildbot-9999.ebuild             | 47 ++++++------
 ...-gentoo-to-the-VERSION_ID-check-exclusion.patch | 26 +++++++
 dev-util/buildbot/files/pypugjs.patch              | 84 ++++++++++++++++++++++
 dev-util/buildbot/metadata.xml                     |  5 +-
 6 files changed, 167 insertions(+), 43 deletions(-)

diff --git a/dev-util/buildbot/Manifest b/dev-util/buildbot/Manifest
index 945e3fa1b8a..9bdfbaf4fd3 100644
--- a/dev-util/buildbot/Manifest
+++ b/dev-util/buildbot/Manifest
@@ -1,3 +1,4 @@
 DIST buildbot-0.9.12.tar.gz 3057832 BLAKE2B 8e1748739bacc3c884f353b2a1c798575e3ce5f451a1711ecf88a7c7e517da86d2e791748d31468a2bb07369022e96cb568518b7a8ce1d9e1cece0b6ab77eec8 SHA512 62459918267297b31b2a6416f72794c7a4ebdcb60de04ece1681f6b8be9debf161716cc70ad843fd468b23e02c521c0a0783a5a1e119d75648e107691d6b908d
 DIST buildbot-1.1.2.tar.gz 3101168 BLAKE2B 35ec56440014015850a69324d475c4ca9555ad90da85b26a7a43eca74f08361137021aec72ddca37cbb24f21519ebf45948e66214291f356b4a1fbada7c0b3b8 SHA512 14c28d6fae18a10d89d41509635188d881ac76e7b61758481a9afbb22eb384d7ab5080383242e5850af13bfe46877985a91036270c3c4fbf01eafee5b7699815
 DIST buildbot-1.3.0.tar.gz 3119185 BLAKE2B d366b83baad7e865481535a2462ceb222aadce6c90a6229e82a72bf86518b8ebb0624d8ac8b64867783d58b6e9033b942a1ccd31fd6664a2b527eac9f11ab852 SHA512 e5ecf3eafe428a188c2410d270ee9bd5afc39122e62d35747288cf85347368ab4a94190b4ff6fe687269dc19cc7b91d33be8d3e3b637741e421a2cbd83572830
+DIST buildbot-2.7.0.tar.gz 3175050 BLAKE2B 0a41eccaa4ca8df6396455049e8c09a1b2fe6cde3072da7fd3715f2769015944e8880f41dbe6750dd7b26bd863fb82f8e8d8c6540f9e1bf3ea4378f11adc973d SHA512 9946fe0b1591d51e5136d9458526918e872174afee79b5f1c333823ef1d2ddae66f017e9b57e26a2451da7ca7672720f32544c606ce5652d0825fae563779669

diff --git a/dev-util/buildbot/buildbot-9999.ebuild b/dev-util/buildbot/buildbot-2.7.0.ebuild
similarity index 87%
copy from dev-util/buildbot/buildbot-9999.ebuild
copy to dev-util/buildbot/buildbot-2.7.0.ebuild
index d59c41b23e9..38c6ccf3ffd 100644
--- a/dev-util/buildbot/buildbot-9999.ebuild
+++ b/dev-util/buildbot/buildbot-2.7.0.ebuild
@@ -1,14 +1,16 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="6"
+EAPI="7"
 PYTHON_REQ_USE="sqlite"
-PYTHON_COMPAT=( python3_6 )
+PYTHON_COMPAT=( python3_{6,7,8} )
 
 EGIT_REPO_URI="https://github.com/buildbot/${PN}.git"
 
+DISTUTILS_USE_SETUPTOOLS="rdepend"
+
 [[ ${PV} == *9999 ]] && inherit git-r3
-inherit readme.gentoo-r1 user systemd distutils-r1
+inherit readme.gentoo-r1 systemd distutils-r1
 
 MY_PV="${PV/_p/.post}"
 MY_P="${PN}-${MY_PV}"
@@ -29,6 +31,7 @@ IUSE="crypt doc docker examples irc test"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
+	acct-user/buildbot
 	>=dev-python/jinja-2.1[${PYTHON_USEDEP}]
 	>=dev-python/twisted-17.9.0[${PYTHON_USEDEP}]
 	>=dev-python/autobahn-0.16.0[${PYTHON_USEDEP}]
@@ -38,12 +41,13 @@ RDEPEND="
 	>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
 	>=dev-python/txaio-2.2.2[${PYTHON_USEDEP}]
 	dev-python/pyjwt[${PYTHON_USEDEP}]
+	dev-python/pyyaml[${PYTHON_USEDEP}]
 	>=dev-python/zope-interface-4.1.1[${PYTHON_USEDEP}]
 	~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}]
 	crypt? (
 		>=dev-python/twisted-17.9.0[${PYTHON_USEDEP},crypt]
 		>=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}]
-		dev-python/idna[${PYTHON_USEDEP}]
+		<dev-python/idna-2.9[${PYTHON_USEDEP}]
 		dev-python/service_identity[${PYTHON_USEDEP}]
 	)
 	irc? (
@@ -51,46 +55,53 @@ RDEPEND="
 	)
 	docker? (
 		>=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}]
+		dev-python/requests[${PYTHON_USEDEP}]
 	)
 "
 DEPEND="${RDEPEND}
-	>=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}]
 	doc? (
 		>=dev-python/sphinx-1.4.3[${PYTHON_USEDEP}]
 		dev-python/sphinxcontrib-blockdiag[${PYTHON_USEDEP}]
 		dev-python/sphinxcontrib-spelling[${PYTHON_USEDEP}]
 		dev-python/pyenchant[${PYTHON_USEDEP}]
-		>=dev-python/docutils-0.8[${PYTHON_USEDEP}]
-		<dev-python/docutils-0.13.0[${PYTHON_USEDEP}]
+		dev-python/docutils[${PYTHON_USEDEP}]
 		dev-python/sphinx-jinja[${PYTHON_USEDEP}]
 	)
 	test? (
-		>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
 		>=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
 		dev-python/moto[${PYTHON_USEDEP}]
-		dev-python/boto3[${PYTHON_USEDEP}]
-		dev-python/pyjade[${PYTHON_USEDEP}]
-		dev-python/txgithub[${PYTHON_USEDEP}]
+		>=dev-python/boto3-1.12.48[${PYTHON_USEDEP}]
+		dev-python/parameterized[${PYTHON_USEDEP}]
+		dev-python/pypugjs[${PYTHON_USEDEP}]
 		dev-python/txrequests[${PYTHON_USEDEP}]
 		dev-python/lz4[${PYTHON_USEDEP}]
 		dev-python/treq[${PYTHON_USEDEP}]
 		dev-python/setuptools_trial[${PYTHON_USEDEP}]
+		~dev-util/buildbot-pkg-${PV}[${PYTHON_USEDEP}]
 		~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}]
-		>=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}]
+		~dev-util/buildbot-www-${PV}[${PYTHON_USEDEP}]
+		crypt? (
+			>=dev-python/twisted-17.9.0[${PYTHON_USEDEP},crypt]
+			>=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}]
+			<dev-python/idna-2.9[${PYTHON_USEDEP}]
+			dev-python/service_identity[${PYTHON_USEDEP}]
+		)
 	)"
+#		>=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}]
 
 S=${WORKDIR}/${MY_P}
 [[ ${PV} == *9999 ]] && S=${S}/master
 
 if [[ ${PV} != *9999 ]]; then
 	PATCHES=(
-		"${FILESDIR}/Remove-distro-version-test.patch"
+		"${FILESDIR}/Add-gentoo-to-the-VERSION_ID-check-exclusion.patch"
+		"${FILESDIR}/pypugjs.patch"
 	)
 fi
 
-pkg_setup() {
-	enewuser buildbot
+distutils_enable_tests setup.py
 
+pkg_setup() {
 	DOC_CONTENTS="The \"buildbot\" user and the \"buildmaster\" init script has been added
 		to support starting buildbot through Gentoo's init system. To use this,
 		execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
@@ -133,12 +144,6 @@ src_install() {
 	readme.gentoo_create_doc
 }
 
-python_test() {
-	distutils_install_for_testing
-
-	esetup.py test || die "Tests failed under ${EPYTHON}"
-}
-
 pkg_postinst() {
 	readme.gentoo_print_elog
 

diff --git a/dev-util/buildbot/buildbot-9999.ebuild b/dev-util/buildbot/buildbot-9999.ebuild
index d59c41b23e9..38c6ccf3ffd 100644
--- a/dev-util/buildbot/buildbot-9999.ebuild
+++ b/dev-util/buildbot/buildbot-9999.ebuild
@@ -1,14 +1,16 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="6"
+EAPI="7"
 PYTHON_REQ_USE="sqlite"
-PYTHON_COMPAT=( python3_6 )
+PYTHON_COMPAT=( python3_{6,7,8} )
 
 EGIT_REPO_URI="https://github.com/buildbot/${PN}.git"
 
+DISTUTILS_USE_SETUPTOOLS="rdepend"
+
 [[ ${PV} == *9999 ]] && inherit git-r3
-inherit readme.gentoo-r1 user systemd distutils-r1
+inherit readme.gentoo-r1 systemd distutils-r1
 
 MY_PV="${PV/_p/.post}"
 MY_P="${PN}-${MY_PV}"
@@ -29,6 +31,7 @@ IUSE="crypt doc docker examples irc test"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
+	acct-user/buildbot
 	>=dev-python/jinja-2.1[${PYTHON_USEDEP}]
 	>=dev-python/twisted-17.9.0[${PYTHON_USEDEP}]
 	>=dev-python/autobahn-0.16.0[${PYTHON_USEDEP}]
@@ -38,12 +41,13 @@ RDEPEND="
 	>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
 	>=dev-python/txaio-2.2.2[${PYTHON_USEDEP}]
 	dev-python/pyjwt[${PYTHON_USEDEP}]
+	dev-python/pyyaml[${PYTHON_USEDEP}]
 	>=dev-python/zope-interface-4.1.1[${PYTHON_USEDEP}]
 	~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}]
 	crypt? (
 		>=dev-python/twisted-17.9.0[${PYTHON_USEDEP},crypt]
 		>=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}]
-		dev-python/idna[${PYTHON_USEDEP}]
+		<dev-python/idna-2.9[${PYTHON_USEDEP}]
 		dev-python/service_identity[${PYTHON_USEDEP}]
 	)
 	irc? (
@@ -51,46 +55,53 @@ RDEPEND="
 	)
 	docker? (
 		>=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}]
+		dev-python/requests[${PYTHON_USEDEP}]
 	)
 "
 DEPEND="${RDEPEND}
-	>=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}]
 	doc? (
 		>=dev-python/sphinx-1.4.3[${PYTHON_USEDEP}]
 		dev-python/sphinxcontrib-blockdiag[${PYTHON_USEDEP}]
 		dev-python/sphinxcontrib-spelling[${PYTHON_USEDEP}]
 		dev-python/pyenchant[${PYTHON_USEDEP}]
-		>=dev-python/docutils-0.8[${PYTHON_USEDEP}]
-		<dev-python/docutils-0.13.0[${PYTHON_USEDEP}]
+		dev-python/docutils[${PYTHON_USEDEP}]
 		dev-python/sphinx-jinja[${PYTHON_USEDEP}]
 	)
 	test? (
-		>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
 		>=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
 		dev-python/moto[${PYTHON_USEDEP}]
-		dev-python/boto3[${PYTHON_USEDEP}]
-		dev-python/pyjade[${PYTHON_USEDEP}]
-		dev-python/txgithub[${PYTHON_USEDEP}]
+		>=dev-python/boto3-1.12.48[${PYTHON_USEDEP}]
+		dev-python/parameterized[${PYTHON_USEDEP}]
+		dev-python/pypugjs[${PYTHON_USEDEP}]
 		dev-python/txrequests[${PYTHON_USEDEP}]
 		dev-python/lz4[${PYTHON_USEDEP}]
 		dev-python/treq[${PYTHON_USEDEP}]
 		dev-python/setuptools_trial[${PYTHON_USEDEP}]
+		~dev-util/buildbot-pkg-${PV}[${PYTHON_USEDEP}]
 		~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}]
-		>=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}]
+		~dev-util/buildbot-www-${PV}[${PYTHON_USEDEP}]
+		crypt? (
+			>=dev-python/twisted-17.9.0[${PYTHON_USEDEP},crypt]
+			>=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}]
+			<dev-python/idna-2.9[${PYTHON_USEDEP}]
+			dev-python/service_identity[${PYTHON_USEDEP}]
+		)
 	)"
+#		>=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}]
 
 S=${WORKDIR}/${MY_P}
 [[ ${PV} == *9999 ]] && S=${S}/master
 
 if [[ ${PV} != *9999 ]]; then
 	PATCHES=(
-		"${FILESDIR}/Remove-distro-version-test.patch"
+		"${FILESDIR}/Add-gentoo-to-the-VERSION_ID-check-exclusion.patch"
+		"${FILESDIR}/pypugjs.patch"
 	)
 fi
 
-pkg_setup() {
-	enewuser buildbot
+distutils_enable_tests setup.py
 
+pkg_setup() {
 	DOC_CONTENTS="The \"buildbot\" user and the \"buildmaster\" init script has been added
 		to support starting buildbot through Gentoo's init system. To use this,
 		execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
@@ -133,12 +144,6 @@ src_install() {
 	readme.gentoo_create_doc
 }
 
-python_test() {
-	distutils_install_for_testing
-
-	esetup.py test || die "Tests failed under ${EPYTHON}"
-}
-
 pkg_postinst() {
 	readme.gentoo_print_elog
 

diff --git a/dev-util/buildbot/files/Add-gentoo-to-the-VERSION_ID-check-exclusion.patch b/dev-util/buildbot/files/Add-gentoo-to-the-VERSION_ID-check-exclusion.patch
new file mode 100644
index 00000000000..16fc0a133e1
--- /dev/null
+++ b/dev-util/buildbot/files/Add-gentoo-to-the-VERSION_ID-check-exclusion.patch
@@ -0,0 +1,26 @@
+From f8d6fe39570a698d80d821a440219f5cd79d8314 Mon Sep 17 00:00:00 2001
+From: Brian Dolbec <dolsen@gentoo.org>
+Date: Tue, 5 Mar 2019 11:21:14 -0800
+Subject: [PATCH] test_buildbot_net_usage.py: Add "gentoo" to the VERSION_ID check exclusion
+
+Make the exclusions test into a list (slight speed improvement, easier to extend) and add "gentoo".
+
+Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
+---
+ buildbot/test/unit/test_buildbot_net_usage_data.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/buildbot/test/unit/test_buildbot_net_usage_data.py b/buildbot/test/unit/test_buildbot_net_usage_data.py
+index c347956..e422c55 100644
+--- a/buildbot/test/unit/test_buildbot_net_usage_data.py
++++ b/buildbot/test/unit/test_buildbot_net_usage_data.py
+@@ -150,5 +150,5 @@ class Tests(unittest.TestCase):
+         self.assertEqual(len(distro), 2)
+         self.assertNotIn("unknown", distro[0])
+         # Rolling distributions like Arch Linux (arch) does not have VERSION_ID
+-        if distro[0] != "arch":
++        if distro[0] not in ["arch", "gentoo"]:
+             self.assertNotIn("unknown", distro[1])
+--
+libgit2 0.99.0
+

diff --git a/dev-util/buildbot/files/pypugjs.patch b/dev-util/buildbot/files/pypugjs.patch
new file mode 100644
index 00000000000..3ac99502b5d
--- /dev/null
+++ b/dev-util/buildbot/files/pypugjs.patch
@@ -0,0 +1,84 @@
+From 26fefa8f8fa7b347e1c86723194de3a4094dc012 Mon Sep 17 00:00:00 2001
+From: Brian Dolbec <dolsen@gentoo.org>
+Date: Sat, 25 Apr 2020 11:53:06 -0700
+Subject: [PATCH] Initial pyjade port to pypugjs
+
+---
+ common/code_spelling_ignore_words.txt        |  1 +
+ master/buildbot/test/unit/test_www_config.py |  8 ++++----
+ master/buildbot/www/config.py                | 10 +++++-----
+ master/docs/manual/configuration/www.rst     | 10 ++++++----
+ master/docs/spelling_wordlist.txt            |  2 +-
+ master/setup.py                              |  4 ++--
+ requirements-ci.txt                          |  2 +-
+ 7 files changed, 20 insertions(+), 17 deletions(-)
+
+diff --git a/buildbot/test/unit/test_www_config.py b/buildbot/test/unit/test_www_config.py
+index 23a108e..a8c24ec 100644
+--- a/buildbot/test/unit/test_www_config.py
++++ b/buildbot/test/unit/test_www_config.py
+@@ -107,10 +107,10 @@ class IndexResource(TestReactorMixin, www.WwwTestMixin, unittest.TestCase):
+     def test_parseCustomTemplateDir(self):
+         exp = {'views/builds.html': '<div>\n</div>'}
+         try:
+-            # we make the test work if pyjade is present or note
+-            # It is better than just skip if pyjade is not there
+-            import pyjade  # pylint: disable=import-outside-toplevel
+-            [pyjade]
++            # we make the test work if pypugjs is present or note
++            # It is better than just skip if pypugjs is not there
++            import pypugjs  # pylint: disable=import-outside-toplevel
++            [pypugjs]
+             exp.update({'plugin/views/plugin.html':
+                         '<div class="myclass"><pre>this is customized</pre></div>'})
+         except ImportError:
+diff --git a/buildbot/www/config.py b/buildbot/www/config.py
+index a021299..50bae4d 100644
+--- config.py	2020-02-27 13:34:10.000000000 -0800
++++ config2.py	2020-05-11 17:26:44.587026761 -0700
+@@ -61,12 +61,12 @@
+         res = {}
+         allowed_ext = [".html"]
+         try:
+-            import pyjade   # pylint: disable=import-outside-toplevel
++            import pypugjs   # pylint: disable=import-outside-toplevel
+             allowed_ext.append(".jade")
+         except ImportError:  # pragma: no cover
+-            log.msg("pyjade not installed. Ignoring .jade files from %s" %
++            log.msg("pypugjs not installed. Ignoring .jade files from %s" %
+                     (template_dir,))
+-            pyjade = None
++            pypugjs = None
+         for root, dirs, files in os.walk(template_dir):
+             if root == template_dir:
+                 template_name = posixpath.join("views", "%s.html")
+@@ -86,9 +86,9 @@
+                 elif ext == ".jade":
+                     with open(fn) as f:
+                         jade = f.read()
+-                        parser = pyjade.parser.Parser(jade)
++                        parser = pypugjs.parser.Parser(jade)
+                         block = parser.parse()
+-                        compiler = pyjade.ext.html.Compiler(
++                        compiler = pypugjs.ext.html.Compiler(
+                             block, pretty=False)
+                         html = compiler.compile()
+                 res[template_name % (basename,)] = html
+diff --git a/setup.py b/master/setup.py
+index 8fca506..1f32a74 100755
+--- a/setup.py
++++ b/setup.py
+@@ -490,8 +490,8 @@ test_deps = [
+     # http client libraries
+     'treq',
+     'txrequests',
+-    # pyjade required for custom templates tests
+-    'pyjade',
++    # pypugjs required for custom templates tests
++    'pypugjs',
+     # boto3 and moto required for running EC2 tests
+     'boto3',
+     'moto',
+--
+libgit2 0.99.0
+

diff --git a/dev-util/buildbot/metadata.xml b/dev-util/buildbot/metadata.xml
index 16f4ac623ef..45ebb49fa83 100644
--- a/dev-util/buildbot/metadata.xml
+++ b/dev-util/buildbot/metadata.xml
@@ -1,7 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-	<!-- maintainer-needed -->
+	<maintainer type="person">
+		<email>dolsen@gentoo.org</email>
+		<name>Brian Dolbec</name>
+	</maintainer>
 	<longdescription lang="en">
 	BuildBot is a system to automate the compile/test cycle required
 	by most software projects to validate code changes.


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/buildbot/, dev-util/buildbot/files/
@ 2022-05-30  0:11 Brian Dolbec
  0 siblings, 0 replies; 8+ messages in thread
From: Brian Dolbec @ 2022-05-30  0:11 UTC (permalink / raw
  To: gentoo-commits

commit:     8071d1527b1b5dc313cb77822edd04f63f644738
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun May 29 23:44:52 2022 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon May 30 00:11:18 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8071d152

dev-util/buildbot: Bump to 3.5.0

Update deps in 9999
Fix init script bug 845297

Closes: https://bugs.gentoo.org/845297
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

 dev-util/buildbot/Manifest                                  |  1 +
 .../{buildbot-9999.ebuild => buildbot-3.5.0.ebuild}         | 13 +++++++++----
 dev-util/buildbot/buildbot-9999.ebuild                      | 10 +++++-----
 dev-util/buildbot/files/buildmaster.initd                   |  4 ++--
 4 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/dev-util/buildbot/Manifest b/dev-util/buildbot/Manifest
index 3107d5d2b7f8..28cea4cfa214 100644
--- a/dev-util/buildbot/Manifest
+++ b/dev-util/buildbot/Manifest
@@ -1 +1,2 @@
 DIST buildbot-3.4.0.tar.gz 2446868 BLAKE2B a58b268fd4569105f1c0ba48c9ed86210a3fee4725f167d6b6847960bbb56a092d0c0db427ecf5932a91d44065da8843fbb4046d289800a019b0b1d8b1f53fea SHA512 92e5085862ac37a6c3c059870a3998fbaac2019c48384295f3e209788ea14bddff6704f1b987a8f3b1550c1b0255d228f8a0b2a20b5cb760b22a513db465863b
+DIST buildbot-3.5.0.tar.gz 2450653 BLAKE2B 0e923f2a3a334241b25c6a151b397356d7ba81ab2ff19c17c50a5996494d0f99fa198b63aa18a27ab60c5ad53c0154494bf4dea4e2bd306f4b709858a64dc3c4 SHA512 9730305540db3cdf166fdfc071142061926bbb895aa941046ad25e8350d3c161d4175f3518cd8a3ab51f320b0a5980517e5e53d9f5ddc342492ee56a0f6f266f

diff --git a/dev-util/buildbot/buildbot-9999.ebuild b/dev-util/buildbot/buildbot-3.5.0.ebuild
similarity index 95%
copy from dev-util/buildbot/buildbot-9999.ebuild
copy to dev-util/buildbot/buildbot-3.5.0.ebuild
index 0f755c2b1c80..5157b8bb6383 100644
--- a/dev-util/buildbot/buildbot-9999.ebuild
+++ b/dev-util/buildbot/buildbot-3.5.0.ebuild
@@ -5,17 +5,22 @@ EAPI=8
 
 PYTHON_REQ_USE="sqlite"
 PYTHON_COMPAT=( python3_{8..10} )
-EGIT_REPO_URI="https://github.com/buildbot/${PN}.git"
-inherit readme.gentoo-r1 git-r3 systemd distutils-r1
+inherit readme.gentoo-r1 systemd distutils-r1
+
+MY_PV="${PV/_p/.post}"
+MY_P="${PN}-${MY_PV}"
 
 DESCRIPTION="BuildBot build automation system"
 HOMEPAGE="https://buildbot.net/
 	https://github.com/buildbot/buildbot
 	https://pypi.org/project/buildbot/"
-S="${S}/master"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
 
 LICENSE="GPL-2"
 SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~riscv ~amd64-linux ~x86-linux"
+
 IUSE="crypt docker examples irc test"
 RESTRICT="!test? ( test )"
 
@@ -24,7 +29,7 @@ RDEPEND="
 	>=dev-python/twisted-17.9.0[${PYTHON_USEDEP},crypt?]
 	>=dev-python/jinja-2.1[${PYTHON_USEDEP}]
 	>=dev-python/zope-interface-4.1.1[${PYTHON_USEDEP}]
-	>=dev-python/sqlalchemy-1.2.0[${PYTHON_USEDEP}]
+	>=dev-python/sqlalchemy-1.3.0[${PYTHON_USEDEP}]
 	<dev-python/sqlalchemy-1.5.0[${PYTHON_USEDEP}]
 	>=dev-python/alembic-1.6.0[${PYTHON_USEDEP}]
 	>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]

diff --git a/dev-util/buildbot/buildbot-9999.ebuild b/dev-util/buildbot/buildbot-9999.ebuild
index 0f755c2b1c80..bc6e6f1f0996 100644
--- a/dev-util/buildbot/buildbot-9999.ebuild
+++ b/dev-util/buildbot/buildbot-9999.ebuild
@@ -24,7 +24,7 @@ RDEPEND="
 	>=dev-python/twisted-17.9.0[${PYTHON_USEDEP},crypt?]
 	>=dev-python/jinja-2.1[${PYTHON_USEDEP}]
 	>=dev-python/zope-interface-4.1.1[${PYTHON_USEDEP}]
-	>=dev-python/sqlalchemy-1.2.0[${PYTHON_USEDEP}]
+	>=dev-python/sqlalchemy-1.3.0[${PYTHON_USEDEP}]
 	<dev-python/sqlalchemy-1.5.0[${PYTHON_USEDEP}]
 	>=dev-python/alembic-1.6.0[${PYTHON_USEDEP}]
 	>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
@@ -55,12 +55,12 @@ BDEPEND="
 		>=dev-python/boto3-1.12.48[${PYTHON_USEDEP}]
 		dev-python/moto[${PYTHON_USEDEP}]
 		>=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
-		dev-python/parameterized[${PYTHON_USEDEP}]
+		>=dev-python/msgpack-0.6.0[${PYTHON_USEDEP}]
 		dev-python/lz4[${PYTHON_USEDEP}]
 		dev-python/ldap3[${PYTHON_USEDEP}]
-		~dev-util/buildbot-pkg-${PV}[${PYTHON_USEDEP}]
-		~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}]
-		~dev-util/buildbot-www-${PV}[${PYTHON_USEDEP}]
+		dev-util/buildbot-pkg[${PYTHON_USEDEP}]
+		dev-util/buildbot-worker[${PYTHON_USEDEP}]
+		dev-util/buildbot-www[${PYTHON_USEDEP}]
 	)"
 
 DOC_CONTENTS="The \"buildbot\" user and the \"buildmaster\" init script has been added

diff --git a/dev-util/buildbot/files/buildmaster.initd b/dev-util/buildbot/files/buildmaster.initd
index b75ae34830d4..2fe8db9f513e 100644
--- a/dev-util/buildbot/files/buildmaster.initd
+++ b/dev-util/buildbot/files/buildmaster.initd
@@ -1,10 +1,10 @@
 #!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 extra_started_commands="reload"
 
-BUILDMASTER_NAME=${RC_SVCNAME:12}
+BUILDMASTER_NAME=${RC_SVCNAME#*.}
 BUILDMASTER_PATH="${BASEDIR}/${BUILDMASTER_NAME}"
 
 depend() {


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/buildbot/, dev-util/buildbot/files/
@ 2024-01-30  8:33 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-01-30  8:33 UTC (permalink / raw
  To: gentoo-commits

commit:     ac28332b5f2296e7211a928be73b8dd5eaaee14c
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 28 16:51:18 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 30 08:29:14 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac28332b

dev-util/buildbot: add 3.11.0

Closes: https://bugs.gentoo.org/920676
Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/buildbot/Manifest                         |   1 +
 dev-util/buildbot/buildbot-3.11.0.ebuild           | 183 +++++++++++++++++++++
 .../buildbot-3.11.0-importlib.resources.patch      |  13 ++
 3 files changed, 197 insertions(+)

diff --git a/dev-util/buildbot/Manifest b/dev-util/buildbot/Manifest
index c0ec66e0e9b9..c1b132c5f02d 100644
--- a/dev-util/buildbot/Manifest
+++ b/dev-util/buildbot/Manifest
@@ -1,2 +1,3 @@
+DIST buildbot-3.11.0.tar.gz 2523691 BLAKE2B e64a84fa1678d313ef922cb43e3a2df974e1c8e7b8c53a1ec20b6ef177eee5ca66bbe012bdf4754cc135e91fba883237b370f99fbbf780ef1fcab07305f941a7 SHA512 86f6545573473aa48890a9b6e5165c55c5223ab365a1f7bf019e468396f52c4cb3dc93458aae15cef40ff0eb576bd55002a8ae78144cd86271d9a230f1bd40b8
 DIST buildbot-3.6.1.tar.gz 2458176 BLAKE2B 4587ed222e2fae424f3c4f275e67e72bf25b0ce88231a29f931582d82fbe93a846f85b14bdc64740939466ccdc3f15dab3774244aa5c0a293250b52b542014ea SHA512 62a993d1acd8bc5cc916f009909b4b099d9f64007fe790dc219104f248bb21e0ab8f1771c354ef61e6d8ba497451cdef5e7a7de17a87cfd1e941b3b49fbf2206
 DIST buildbot-3.9.0.tar.gz 2505725 BLAKE2B 144a16655a8ec23d74ba190a7867a2dce9c65ea6009aa53ea11494be6f03f8d45bc6568a36511812e7664bcc7de9540728b91264251a46301cbd7ebec04c2069 SHA512 9103c5e08f9d5335c0281403d81fc939cc91b81e8051d4590f29e00779392ac706934d209312e51aafc44a35ab768ad54cbd251afe50e326c52e2f1b0d72196b

diff --git a/dev-util/buildbot/buildbot-3.11.0.ebuild b/dev-util/buildbot/buildbot-3.11.0.ebuild
new file mode 100644
index 000000000000..e56ade01547e
--- /dev/null
+++ b/dev-util/buildbot/buildbot-3.11.0.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_REQ_USE="sqlite"
+PYTHON_COMPAT=( python3_{10..12} )
+inherit readme.gentoo-r1 systemd distutils-r1 pypi
+
+DESCRIPTION="BuildBot build automation system"
+HOMEPAGE="https://buildbot.net/
+	https://github.com/buildbot/buildbot
+	https://pypi.org/project/buildbot/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~amd64-linux ~x86-linux"
+
+IUSE="crypt docker examples irc test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	acct-user/buildbot
+	~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}]
+	>=dev-python/alembic-1.6.0[${PYTHON_USEDEP}]
+	>=dev-python/autobahn-0.16.9[${PYTHON_USEDEP}]
+	>=dev-python/croniter-1.3.0[${PYTHON_USEDEP}]
+	>=dev-python/msgpack-0.6.0[${PYTHON_USEDEP}]
+	>=dev-python/jinja-2.1[${PYTHON_USEDEP}]
+	>=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
+	dev-python/packaging[${PYTHON_USEDEP}]
+	dev-python/pyjwt[${PYTHON_USEDEP}]
+	dev-python/pyyaml[${PYTHON_USEDEP}]
+	>=dev-python/sqlalchemy-1.3.0[${PYTHON_USEDEP}]
+	<dev-python/sqlalchemy-1.5.0[${PYTHON_USEDEP}]
+	>=dev-python/twisted-18.7.0[${PYTHON_USEDEP}]
+	>=dev-python/txaio-2.2.2[${PYTHON_USEDEP}]
+	>=dev-python/unidiff-0.7.5[${PYTHON_USEDEP}]
+	>=dev-python/zope-interface-4.1.1[${PYTHON_USEDEP}]
+	crypt? (
+		>=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}]
+		dev-python/service-identity[${PYTHON_USEDEP}]
+		|| (
+			>=dev-python/twisted-18.7.0[${PYTHON_USEDEP},ssl(-)]
+			>=dev-python/twisted-18.7.0[${PYTHON_USEDEP},crypt(-)]
+		)
+		dev-python/idna[${PYTHON_USEDEP}]
+	)
+	irc? (
+		dev-python/txrequests[${PYTHON_USEDEP}]
+	)
+	docker? (
+		>=dev-python/docker-7.0.0[${PYTHON_USEDEP}]
+		dev-python/requests[${PYTHON_USEDEP}]
+	)
+"
+BDEPEND="
+	test? (
+		${RDEPEND}
+		~dev-util/buildbot-pkg-${PV}[${PYTHON_USEDEP}]
+		dev-util/buildbot-worker[${PYTHON_USEDEP}]
+		~dev-util/buildbot-www-${PV}[${PYTHON_USEDEP}]
+		>=dev-python/boto3-1.12.48[${PYTHON_USEDEP}]
+		dev-python/lz4[${PYTHON_USEDEP}]
+		dev-python/ldap3[${PYTHON_USEDEP}]
+		>=dev-python/markdown-3.0.0[${PYTHON_USEDEP}]
+		>=dev-python/moto-4.2.13[${PYTHON_USEDEP}]
+		dev-python/parameterized[${PYTHON_USEDEP}]
+		dev-python/pypugjs[${PYTHON_USEDEP}]
+		dev-python/txrequests[${PYTHON_USEDEP}]
+		dev-python/treq[${PYTHON_USEDEP}]
+	)"
+
+DOC_CONTENTS="The \"buildbot\" user and the \"buildmaster\" init script has been added
+to support starting buildbot through Gentoo's init system. To use this,
+execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
+The scripts can	run as a different user if desired."
+
+src_prepare() {
+	# disable all warnings as errors
+	sed -e "/warnings.filterwarnings('error')/d" -i buildbot/test/__init__.py || die
+	# https://github.com/buildbot/buildbot/issues/6776
+	# https://bugs.gentoo.org/904062
+	rm buildbot/test/integration/test_try_client.py || die
+
+	distutils-r1_src_prepare
+}
+
+python_test() {
+	"${EPYTHON}" -m twisted.trial buildbot || die "Tests failed with ${EPYTHON}"
+}
+
+src_install() {
+	distutils-r1_src_install
+
+	doman docs/buildbot.1
+
+	if use examples; then
+		dodoc -r docs/examples
+	fi
+
+	newconfd "${FILESDIR}/buildmaster.confd" buildmaster
+	newinitd "${FILESDIR}/buildmaster.initd" buildmaster
+	systemd_dounit "${FILESDIR}/buildmaster.target"
+	systemd_newunit "${FILESDIR}/buildmaster_at.service" "buildmaster@.service"
+	systemd_install_serviced "${FILESDIR}/buildmaster_at.service.conf" "buildmaster@.service"
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+
+	if [[ -n ${REPLACING_VERSIONS} ]]; then
+		ewarn
+		ewarn "Starting with buildbot-0.8.12-r2, more than one instance of buildmaster"
+		ewarn "can be run simultaneously. Note that \"BASEDIR\" in the buildbot 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 buildmaster 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/buildmaster /etc/init.d/buildmaster.myinstance"
+		ewarn "    rc-update add buildmaster.myinstance default"
+		ewarn "    /etc/init.d/buildmaster.myinstance start"
+		ewarn "Systems using systemd can do the following:"
+		ewarn "    systemctl enable buildmaster@myinstance.service"
+		ewarn "    systemctl enable buildmaster.target"
+		ewarn "    systemctl start buildmaster.target"
+		elog
+		elog "Upstream recommends the following when upgrading:"
+		elog "Each time you install a new version of Buildbot, you should run the"
+		elog "\"buildbot upgrade-master\" command on each of your pre-existing build masters."
+		elog "This will add files and fix (or at least detect) incompatibilities between"
+		elog "your old config and the new code."
+	fi
+	elog
+	elog "In order to create a new instance of buildmaster, execute:"
+	elog "    emerge --config =${CATEGORY}/${PF}"
+}
+
+pkg_config() {
+	local buildmaster_path="/var/lib/buildmaster"
+	local log_path="/var/log/buildmaster"
+
+	einfo "This will prepare a new buildmaster instance in ${buildmaster_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="${buildmaster_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
+
+	local buildbot="/usr/bin/buildbot"
+	if [[ ! -d "${buildmaster_path}" ]]; then
+		mkdir --parents "${buildmaster_path}" || die "Unable to create directory ${buildmaster_path}"
+	fi
+	"${buildbot}" create-master "${instance_path}" &>/dev/null || die "Creating instance failed"
+	chown --recursive buildbot:buildbot "${instance_path}" || die "Setting permissions for instance failed"
+	mv "${instance_path}/master.cfg.sample" "${instance_path}/master.cfg" \
+		|| die "Moving sample configuration failed"
+	ln --symbolic --relative "/etc/init.d/buildmaster" "/etc/init.d/buildmaster.${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 buildmaster instance at ${instance_path}."
+	einfo "To change the default settings edit the master.cfg file in this directory."
+}

diff --git a/dev-util/buildbot/files/buildbot-3.11.0-importlib.resources.patch b/dev-util/buildbot/files/buildbot-3.11.0-importlib.resources.patch
new file mode 100644
index 000000000000..3854b93fe4b8
--- /dev/null
+++ b/dev-util/buildbot/files/buildbot-3.11.0-importlib.resources.patch
@@ -0,0 +1,13 @@
+https://github.com/buildbot/buildbot/pull/7270
+We don't use older python then 3.10 so use importlib.resources
+--- a/buildbot/www/plugin.py	2023-12-27 11:18:13.107479017 +0100
++++ b/buildbot/www/plugin.py	2023-12-27 11:20:55.710106750 +0100
+@@ -14,7 +14,7 @@
+ # Copyright Buildbot Team Members
+ 
+ 
+-import importlib_resources
++import importlib.resources as importlib_resources
+ 
+ from twisted.web import static
+ 


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-01-30  8:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-16 17:43 [gentoo-commits] repo/gentoo:master commit in: dev-util/buildbot/, dev-util/buildbot/files/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2024-01-30  8:33 Sam James
2022-05-30  0:11 Brian Dolbec
2020-05-12 18:15 Brian Dolbec
2017-01-06  0:48 Brian Dolbec
2016-08-11  2:24 Brian Dolbec
2016-03-30 12:18 Patrice Clement
2016-03-30 12:18 Patrice Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox