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: Sat, 25 Sep 2021 18:08:56
Message-Id: 1632593223.b961b454b321d1e3a3173c0bda2d8f9225edb744.dolsen@gentoo
1 commit: b961b454b321d1e3a3173c0bda2d8f9225edb744
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 25 18:03:40 2021 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 25 18:07:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b961b454
7
8 dev-util/buildbot: Version bump to 3.3.0
9
10 Package-Manager: Portage-3.0.22, Repoman-3.0.3
11 Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>
12
13 dev-util/buildbot/Manifest | 1 +
14 dev-util/buildbot/buildbot-3.3.0.ebuild | 200 ++++++++++++++++++++++++++++++++
15 2 files changed, 201 insertions(+)
16
17 diff --git a/dev-util/buildbot/Manifest b/dev-util/buildbot/Manifest
18 index a0dd081dff8..3fd48216350 100644
19 --- a/dev-util/buildbot/Manifest
20 +++ b/dev-util/buildbot/Manifest
21 @@ -7,3 +7,4 @@ DIST buildbot-3.0.2.tar.gz 2221373 BLAKE2B 7f7e08375f0eb6eb0187dc734f0eefda5bc24
22 DIST buildbot-3.1.0.tar.gz 2229027 BLAKE2B 27eaed470f18c4fe8cae1730ca92918352518263a5cc7c3affea070dc3c9890e88db81e2f0d70b1071da89a4df7fd34091ac9dd08b8d6933e568365859640c4e SHA512 2eb08af4c59b5268fb9d5dd3e5c6c4889542c39b7034aee7bb6151d4e24ce99a9c0a83ec303ca4110a55e8f7daa562ddc0debee83499984a3d9fa0fad965740c
23 DIST buildbot-3.1.1.tar.gz 2229124 BLAKE2B c384b897a5f8816b7d6a52070cb1cce7e9b70d41a5837990af3474d3063a4906600f82c1bc6e6c48d826ac1f95dc36dcc15ebca10c9249615d25f547e0216dad SHA512 4f4194fab83bb80cff15366fb6461624b75c5a2d0e473ac9cb6a8abb372ccd7ee9208a944f198d874e8cd1a87358239ba3e8314d54ef35a641ff83510c48de37
24 DIST buildbot-3.2.0.tar.gz 2245261 BLAKE2B ccb1dc5e6a6bf5c9e06a7b05cc1baa605b09cf65ad4f9beff2a40e9f52a3065363960a990c288ed181cc5cc5cf5af1ce06dd4df561ddfe9819165ebe32760887 SHA512 5730126786880eb48da140cbbaaac2df95e6d04d22268fb305c1a228969bd096cd18959779f6101af73c41fecb07a7c1e2bb276271bede53989323a46fb06962
25 +DIST buildbot-3.3.0.tar.gz 2255464 BLAKE2B 9b4cfdd948bdf4b183dc45973f26b41ec5b390740c92f3b29c460c8fba4f35b71eaf848b026b21e1ba1e213b18d6d91e3736b69aa8c3e6dbb847b04b644e2c54 SHA512 da0d26257964df40a470b00e2cd0f3f2230d3224bf8ae7c2b896fc8ec739e5d3ce7988ab07f6c66dcb13b0d4b6916e839f53a025cac637ccd4bcd3f442e12b1d
26
27 diff --git a/dev-util/buildbot/buildbot-3.3.0.ebuild b/dev-util/buildbot/buildbot-3.3.0.ebuild
28 new file mode 100644
29 index 00000000000..1a848207da3
30 --- /dev/null
31 +++ b/dev-util/buildbot/buildbot-3.3.0.ebuild
32 @@ -0,0 +1,200 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI="7"
37 +PYTHON_REQ_USE="sqlite"
38 +PYTHON_COMPAT=( python3_{7,8,9} )
39 +
40 +DISTUTILS_USE_SETUPTOOLS="rdepend"
41 +
42 +inherit readme.gentoo-r1 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 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz
50 +"
51 +
52 +LICENSE="GPL-2"
53 +SLOT="0"
54 +KEYWORDS="~amd64 ~arm64 ~amd64-linux ~x86-linux"
55 +
56 +IUSE="crypt doc docker examples irc test"
57 +RESTRICT="!test? ( test )"
58 +
59 +RDEPEND="
60 + acct-user/buildbot
61 + >=dev-python/jinja-2.1[${PYTHON_USEDEP}]
62 + >=dev-python/twisted-17.9.0[${PYTHON_USEDEP},crypt?]
63 + >=dev-python/autobahn-0.16.0[${PYTHON_USEDEP}]
64 + >=dev-python/sqlalchemy-1.2.0[${PYTHON_USEDEP}]
65 + <dev-python/sqlalchemy-1.5.0[${PYTHON_USEDEP}]
66 + >=dev-python/sqlalchemy-migrate-0.13[${PYTHON_USEDEP}]
67 + >=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}]
68 + >=dev-python/txaio-2.2.2[${PYTHON_USEDEP}]
69 + dev-python/pyjwt[${PYTHON_USEDEP}]
70 + dev-python/pyyaml[${PYTHON_USEDEP}]
71 + dev-python/unidiff[${PYTHON_USEDEP}]
72 + >=dev-python/zope-interface-4.1.1[${PYTHON_USEDEP}]
73 + ~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}]
74 + 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 + dev-python/requests[${PYTHON_USEDEP}]
85 + )
86 +"
87 +DEPEND="${RDEPEND}
88 + doc? (
89 + >=dev-python/sphinx-3.2.0[${PYTHON_USEDEP}]
90 + dev-python/sphinxcontrib-blockdiag[${PYTHON_USEDEP}]
91 + dev-python/sphinxcontrib-spelling[${PYTHON_USEDEP}]
92 + dev-python/sphinxcontrib-websupport[${PYTHON_USEDEP}]
93 + dev-python/pyenchant[${PYTHON_USEDEP}]
94 + dev-python/docutils[${PYTHON_USEDEP}]
95 + dev-python/sphinx-jinja[${PYTHON_USEDEP}]
96 + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
97 + )
98 + test? (
99 + dev-python/ldap3[${PYTHON_USEDEP}]
100 + >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
101 + dev-python/moto[${PYTHON_USEDEP}]
102 + >=dev-python/boto3-1.12.48[${PYTHON_USEDEP}]
103 + dev-python/parameterized[${PYTHON_USEDEP}]
104 + dev-python/pypugjs[${PYTHON_USEDEP}]
105 + dev-python/txrequests[${PYTHON_USEDEP}]
106 + dev-python/lz4[${PYTHON_USEDEP}]
107 + dev-python/treq[${PYTHON_USEDEP}]
108 + dev-python/setuptools_trial[${PYTHON_USEDEP}]
109 + ~dev-util/buildbot-pkg-${PV}[${PYTHON_USEDEP}]
110 + ~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}]
111 + ~dev-util/buildbot-www-${PV}[${PYTHON_USEDEP}]
112 + )"
113 +
114 +S=${WORKDIR}/${MY_P}
115 +
116 +distutils_enable_tests setup.py
117 +
118 +pkg_setup() {
119 + DOC_CONTENTS="The \"buildbot\" user and the \"buildmaster\" init script has been added
120 + to support starting buildbot through Gentoo's init system. To use this,
121 + execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
122 + The scripts can run as a different user if desired."
123 +}
124 +
125 +src_compile() {
126 + distutils-r1_src_compile
127 +
128 + # missing files, so skip building
129 + if use doc; then
130 + einfo "Generation of documentation"
131 + pushd docs > /dev/null || die
132 + #'man' target is currently broken
133 + emake html
134 + popd > /dev/null || die
135 + fi
136 +}
137 +
138 +src_install() {
139 + distutils-r1_src_install
140 +
141 + doman docs/buildbot.1
142 +
143 + if use doc; then
144 + HTML_DOCS=( docs/_build/html/ )
145 + fi
146 +
147 + if use examples; then
148 + insinto /usr/share/doc/${PF}
149 + doins -r docs/examples
150 + fi
151 +
152 + newconfd "${FILESDIR}/buildmaster.confd" buildmaster
153 + newinitd "${FILESDIR}/buildmaster.initd" buildmaster
154 + systemd_dounit "${FILESDIR}/buildmaster.target"
155 + systemd_newunit "${FILESDIR}/buildmaster_at.service" "buildmaster@.service"
156 + systemd_install_serviced "${FILESDIR}/buildmaster_at.service.conf" "buildmaster@.service"
157 +
158 + readme.gentoo_create_doc
159 +}
160 +
161 +pkg_postinst() {
162 + readme.gentoo_print_elog
163 +
164 + if [[ -n ${REPLACING_VERSIONS} ]]; then
165 + ewarn
166 + ewarn "Starting with buildbot-0.8.12-r2, more than one instance of buildmaster"
167 + ewarn "can be run simultaneously. Note that \"BASEDIR\" in the buildbot configuration file"
168 + ewarn "is now the common base directory for all instances. If you are migrating from an older"
169 + ewarn "version, make sure that you copy the current contents of \"BASEDIR\" to a subdirectory."
170 + ewarn "The name of the subdirectory corresponds to the name of the buildmaster instance."
171 + ewarn "In order to start the service running OpenRC-based systems need to link to the init file:"
172 + ewarn " ln --symbolic --relative /etc/init.d/buildmaster /etc/init.d/buildmaster.myinstance"
173 + ewarn " rc-update add buildmaster.myinstance default"
174 + ewarn " /etc/init.d/buildmaster.myinstance start"
175 + ewarn "Systems using systemd can do the following:"
176 + ewarn " systemctl enable buildmaster@××××××××××.service"
177 + ewarn " systemctl enable buildmaster.target"
178 + ewarn " systemctl start buildmaster.target"
179 + elog
180 + elog "Upstream recommends the following when upgrading:"
181 + elog "Each time you install a new version of Buildbot, you should run the"
182 + elog "\"buildbot upgrade-master\" command on each of your pre-existing build masters."
183 + elog "This will add files and fix (or at least detect) incompatibilities between"
184 + elog "your old config and the new code."
185 + fi
186 + elog
187 + elog "In order to create a new instance of buildmaster, execute:"
188 + elog " emerge --config =${CATEGORY}/${PF}"
189 +}
190 +
191 +pkg_config() {
192 + local buildmaster_path="/var/lib/buildmaster"
193 + local log_path="/var/log/buildmaster"
194 +
195 + einfo "This will prepare a new buildmaster instance in ${buildmaster_path}."
196 + einfo "Press Control-C to abort."
197 +
198 + einfo "Enter the name for the new instance: "
199 + read instance_name
200 + [[ -z "${instance_name}" ]] && die "Invalid instance name"
201 +
202 + local instance_path="${buildmaster_path}/${instance_name}"
203 + local instance_log_path="${log_path}/${instance_name}"
204 +
205 + if [[ -e "${instance_path}" ]]; then
206 + eerror "The instance with the specified name already exists:"
207 + eerror "${instance_path}"
208 + die "Instance already exists"
209 + fi
210 +
211 + local buildbot="/usr/bin/buildbot"
212 + if [[ ! -d "${buildmaster_path}" ]]; then
213 + mkdir --parents "${buildmaster_path}" || die "Unable to create directory ${buildmaster_path}"
214 + fi
215 + "${buildbot}" create-master "${instance_path}" &>/dev/null || die "Creating instance failed"
216 + chown --recursive buildbot:buildbot "${instance_path}" || die "Setting permissions for instance failed"
217 + mv "${instance_path}/master.cfg.sample" "${instance_path}/master.cfg" \
218 + || die "Moving sample configuration failed"
219 + ln --symbolic --relative "/etc/init.d/buildmaster" "/etc/init.d/buildmaster.${instance_name}" \
220 + || die "Unable to create link to init file"
221 +
222 + if [[ ! -d "${instance_log_path}" ]]; then
223 + mkdir --parents "${instance_log_path}" || die "Unable to create directory ${instance_log_path}"
224 + chown --recursive buildbot:buildbot "${instance_log_path}" \
225 + || die "Setting permissions for instance failed"
226 + fi
227 + ln --symbolic --relative "${instance_log_path}/twistd.log" "${instance_path}/twistd.log" \
228 + || die "Unable to create link to log file"
229 +
230 + einfo "Successfully created a buildmaster instance at ${instance_path}."
231 + einfo "To change the default settings edit the master.cfg file in this directory."
232 +}