Gentoo Archives: gentoo-commits

From: Brian Dolbec <dolsen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/buildbot/
Date: Thu, 26 Jul 2018 17:17:40
Message-Id: 1532625428.a7a3d825f681238883e3aed904de37f9365ffbe6.dolsen@gentoo
1 commit: a7a3d825f681238883e3aed904de37f9365ffbe6
2 Author: Brian Dolbec dolsen <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 26 16:56:40 2018 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 26 17:17:08 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7a3d825
7
8 dev-util/buildbot: Version bump to 1.3.0
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 dev-util/buildbot/Manifest | 1 +
13 dev-util/buildbot/buildbot-1.3.0.ebuild | 210 ++++++++++++++++++++++++++++++++
14 2 files changed, 211 insertions(+)
15
16 diff --git a/dev-util/buildbot/Manifest b/dev-util/buildbot/Manifest
17 index fe05e44af16..147a94705ef 100644
18 --- a/dev-util/buildbot/Manifest
19 +++ b/dev-util/buildbot/Manifest
20 @@ -1,3 +1,4 @@
21 DIST buildbot-0.8.12.tar.gz 4834352 BLAKE2B 16d06d6ccbbb90581471cf1727cc9cdd556ab1c0fa1433bbe76475513a7482619b05c28038e956e8724b99a806aec371961302914567fd36caccfe342daa6aaa SHA512 18c5144132fb033f3581d3c494d5e8ff35d3e8b1548764452ce9ae543d710e58a2c6e3e8e46a0ef237804f9a6a45485890ae4616ab655fb00d4ccf328d6f6645
22 DIST buildbot-0.9.12.tar.gz 3057832 BLAKE2B 8e1748739bacc3c884f353b2a1c798575e3ce5f451a1711ecf88a7c7e517da86d2e791748d31468a2bb07369022e96cb568518b7a8ce1d9e1cece0b6ab77eec8 SHA512 62459918267297b31b2a6416f72794c7a4ebdcb60de04ece1681f6b8be9debf161716cc70ad843fd468b23e02c521c0a0783a5a1e119d75648e107691d6b908d
23 DIST buildbot-1.1.2.tar.gz 3101168 BLAKE2B 35ec56440014015850a69324d475c4ca9555ad90da85b26a7a43eca74f08361137021aec72ddca37cbb24f21519ebf45948e66214291f356b4a1fbada7c0b3b8 SHA512 14c28d6fae18a10d89d41509635188d881ac76e7b61758481a9afbb22eb384d7ab5080383242e5850af13bfe46877985a91036270c3c4fbf01eafee5b7699815
24 +DIST buildbot-1.3.0.tar.gz 3119185 BLAKE2B d366b83baad7e865481535a2462ceb222aadce6c90a6229e82a72bf86518b8ebb0624d8ac8b64867783d58b6e9033b942a1ccd31fd6664a2b527eac9f11ab852 SHA512 e5ecf3eafe428a188c2410d270ee9bd5afc39122e62d35747288cf85347368ab4a94190b4ff6fe687269dc19cc7b91d33be8d3e3b637741e421a2cbd83572830
25
26 diff --git a/dev-util/buildbot/buildbot-1.3.0.ebuild b/dev-util/buildbot/buildbot-1.3.0.ebuild
27 new file mode 100644
28 index 00000000000..f52f1c9e2ed
29 --- /dev/null
30 +++ b/dev-util/buildbot/buildbot-1.3.0.ebuild
31 @@ -0,0 +1,210 @@
32 +# Copyright 1999-2018 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="6"
36 +PYTHON_REQ_USE="sqlite"
37 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
38 +
39 +EGIT_REPO_URI="https://github.com/buildbot/${PN}.git"
40 +
41 +[[ ${PV} == *9999 ]] && inherit git-r3
42 +inherit readme.gentoo-r1 user systemd distutils-r1
43 +
44 +MY_PV="${PV/_p/.post}"
45 +MY_P="${PN}-${MY_PV}"
46 +
47 +DESCRIPTION="BuildBot build automation system"
48 +HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.org/project/buildbot/"
49 +[[ ${PV} == *9999 ]] || SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
50 +
51 +LICENSE="GPL-2"
52 +SLOT="0"
53 +if [[ ${PV} == *9999 ]]; then
54 + KEYWORDS=""
55 +else
56 + KEYWORDS="~amd64"
57 +fi
58 +
59 +IUSE="crypt doc docker examples irc test"
60 +
61 +RDEPEND="
62 + >=dev-python/jinja-2.1[${PYTHON_USEDEP}]
63 + >=dev-python/twisted-17.9.0[${PYTHON_USEDEP}]
64 + >=dev-python/autobahn-0.16.0[${PYTHON_USEDEP}]
65 + >=dev-python/sqlalchemy-0.8[${PYTHON_USEDEP}]
66 + >=dev-python/sqlalchemy-migrate-0.9[${PYTHON_USEDEP}]
67 + dev-python/future[${PYTHON_USEDEP}]
68 + >=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
69 + >=dev-python/txaio-2.2.2[${PYTHON_USEDEP}]
70 + dev-python/pyjwt[${PYTHON_USEDEP}]
71 + >=dev-python/zope-interface-4.1.1[${PYTHON_USEDEP}]
72 + ~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}]
73 + crypt? (
74 + >=dev-python/twisted-17.9.0[${PYTHON_USEDEP},crypt]
75 + >=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}]
76 + dev-python/idna[${PYTHON_USEDEP}]
77 + dev-python/service_identity[${PYTHON_USEDEP}]
78 + )
79 + irc? (
80 + dev-python/txrequests[${PYTHON_USEDEP}]
81 + )
82 + docker? (
83 + >=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}]
84 + )
85 +"
86 +DEPEND="${RDEPEND}
87 + >=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}]
88 + doc? (
89 + >=dev-python/sphinx-1.4.3[${PYTHON_USEDEP}]
90 + dev-python/sphinxcontrib-blockdiag[${PYTHON_USEDEP}]
91 + dev-python/sphinxcontrib-spelling[${PYTHON_USEDEP}]
92 + dev-python/pyenchant[${PYTHON_USEDEP}]
93 + >=dev-python/docutils-0.8[${PYTHON_USEDEP}]
94 + <dev-python/docutils-0.13.0[${PYTHON_USEDEP}]
95 + dev-python/sphinx-jinja[${PYTHON_USEDEP}]
96 + )
97 + test? (
98 + >=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
99 + >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
100 + dev-python/moto[${PYTHON_USEDEP}]
101 + dev-python/boto3[${PYTHON_USEDEP}]
102 + dev-python/pyjade[${PYTHON_USEDEP}]
103 + dev-python/txgithub[${PYTHON_USEDEP}]
104 + dev-python/txrequests[${PYTHON_USEDEP}]
105 + dev-python/lz4[${PYTHON_USEDEP}]
106 + dev-python/treq[${PYTHON_USEDEP}]
107 + dev-python/setuptools_trial[${PYTHON_USEDEP}]
108 + ~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}]
109 + >=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}]
110 + )"
111 +
112 +S=${WORKDIR}/${MY_P}
113 +[[ ${PV} == *9999 ]] && S=${S}/master
114 +
115 +if [[ ${PV} != *9999 ]]; then
116 + PATCHES=(
117 + "${FILESDIR}/Remove-distro-version-test.patch"
118 + )
119 +fi
120 +
121 +pkg_setup() {
122 + enewuser buildbot
123 +
124 + DOC_CONTENTS="The \"buildbot\" user and the \"buildmaster\" init script has been added
125 + to support starting buildbot through Gentoo's init system. To use this,
126 + execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
127 + The scripts can run as a different user if desired."
128 +}
129 +
130 +src_compile() {
131 + distutils-r1_src_compile
132 +
133 + if use doc; then
134 + einfo "Generation of documentation"
135 + pushd docs > /dev/null
136 + #'man' target is currently broken
137 + emake html
138 + popd > /dev/null
139 + fi
140 +}
141 +
142 +src_install() {
143 + distutils-r1_src_install
144 +
145 + doman docs/buildbot.1
146 +
147 + if use doc; then
148 + dohtml -r docs/_build/html/
149 + # TODO: install man pages
150 + fi
151 +
152 + if use examples; then
153 + insinto /usr/share/doc/${PF}
154 + doins -r docs/examples
155 + fi
156 +
157 + newconfd "${FILESDIR}/buildmaster.confd" buildmaster
158 + newinitd "${FILESDIR}/buildmaster.initd" buildmaster
159 + systemd_dounit "${FILESDIR}/buildmaster.target"
160 + systemd_newunit "${FILESDIR}/buildmaster_at.service" "buildmaster@.service"
161 + systemd_install_serviced "${FILESDIR}/buildmaster_at.service.conf" "buildmaster@.service"
162 +
163 + readme.gentoo_create_doc
164 +}
165 +
166 +python_test() {
167 + distutils_install_for_testing
168 +
169 + esetup.py test || die "Tests failed under ${EPYTHON}"
170 +}
171 +
172 +pkg_postinst() {
173 + readme.gentoo_print_elog
174 +
175 + if [[ -n ${REPLACING_VERSIONS} ]]; then
176 + ewarn
177 + ewarn "Starting with buildbot-0.8.12-r2, more than one instance of buildmaster"
178 + ewarn "can be run simultaneously. Note that \"BASEDIR\" in the buildbot configuration file"
179 + ewarn "is now the common base directory for all instances. If you are migrating from an older"
180 + ewarn "version, make sure that you copy the current contents of \"BASEDIR\" to a subdirectory."
181 + ewarn "The name of the subdirectory corresponds to the name of the buildmaster instance."
182 + ewarn "In order to start the service running OpenRC-based systems need to link to the init file:"
183 + ewarn " ln --symbolic --relative /etc/init.d/buildmaster /etc/init.d/buildmaster.myinstance"
184 + ewarn " rc-update add buildmaster.myinstance default"
185 + ewarn " /etc/init.d/buildmaster.myinstance start"
186 + ewarn "Systems using systemd can do the following:"
187 + ewarn " systemctl enable buildmaster@××××××××××.service"
188 + ewarn " systemctl enable buildmaster.target"
189 + ewarn " systemctl start buildmaster.target"
190 + elog
191 + elog "Upstream recommends the following when upgrading:"
192 + elog "Each time you install a new version of Buildbot, you should run the"
193 + elog "\"buildbot upgrade-master\" command on each of your pre-existing build masters."
194 + elog "This will add files and fix (or at least detect) incompatibilities between"
195 + elog "your old config and the new code."
196 + fi
197 + elog
198 + elog "In order to create a new instance of buildmaster, execute:"
199 + elog " emerge --config =${CATEGORY}/${PF}"
200 +}
201 +
202 +pkg_config() {
203 + local buildmaster_path="/var/lib/buildmaster"
204 + local log_path="/var/log/buildmaster"
205 +
206 + einfo "This will prepare a new buildmaster instance in ${buildmaster_path}."
207 + einfo "Press Control-C to abort."
208 +
209 + einfo "Enter the name for the new instance: "
210 + read instance_name
211 + [[ -z "${instance_name}" ]] && die "Invalid instance name"
212 +
213 + local instance_path="${buildmaster_path}/${instance_name}"
214 + local instance_log_path="${log_path}/${instance_name}"
215 +
216 + if [[ -e "${instance_path}" ]]; then
217 + eerror "The instance with the specified name already exists:"
218 + eerror "${instance_path}"
219 + die "Instance already exists"
220 + fi
221 +
222 + local buildbot="/usr/bin/buildbot"
223 + if [[ ! -d "${buildmaster_path}" ]]; then
224 + mkdir --parents "${buildmaster_path}" || die "Unable to create directory ${buildmaster_path}"
225 + fi
226 + "${buildbot}" create-master "${instance_path}" &>/dev/null || die "Creating instance failed"
227 + chown --recursive buildbot "${instance_path}" || die "Setting permissions for instance failed"
228 + mv "${instance_path}/master.cfg.sample" "${instance_path}/master.cfg" \
229 + || die "Moving sample configuration failed"
230 + ln --symbolic --relative "/etc/init.d/buildmaster" "/etc/init.d/buildmaster.${instance_name}" \
231 + || die "Unable to create link to init file"
232 +
233 + if [[ ! -d "${instance_log_path}" ]]; then
234 + mkdir --parents "${instance_log_path}" || die "Unable to create directory ${instance_log_path}"
235 + fi
236 + ln --symbolic --relative "${instance_log_path}/twistd.log" "${instance_path}/twistd.log" \
237 + || die "Unable to create link to log file"
238 +
239 + einfo "Successfully created a buildmaster instance at ${instance_path}."
240 + einfo "To change the default settings edit the master.cfg file in this directory."
241 +}