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