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-worker/, dev-util/buildbot-worker/files/
Date: Wed, 27 Jun 2018 15:24:30
Message-Id: 1530113052.5069f910206258f09b56e3bd43f6c487d9b39b6d.dolsen@gentoo
1 commit: 5069f910206258f09b56e3bd43f6c487d9b39b6d
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 17 10:34:53 2018 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 27 15:24:12 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5069f910
7
8 dev-util/buildbot-worker: Version bump
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 dev-util/buildbot-worker/Manifest | 1 +
13 .../buildbot-worker/buildbot-worker-1.1.2.ebuild | 133 +++++++++++++++++++++
14 .../buildbot-worker/files/buildbot_worker.confd2 | 2 +-
15 3 files changed, 135 insertions(+), 1 deletion(-)
16
17 diff --git a/dev-util/buildbot-worker/Manifest b/dev-util/buildbot-worker/Manifest
18 index 8444ffed398..bf6ffcf0ac6 100644
19 --- a/dev-util/buildbot-worker/Manifest
20 +++ b/dev-util/buildbot-worker/Manifest
21 @@ -2,3 +2,4 @@ DIST buildbot-worker-0.9.12.tar.gz 101655 BLAKE2B a73f98ec56bd3ad6d19ad0b9dfa015
22 DIST buildbot-worker-0.9.13.tar.gz 102710 BLAKE2B ab60bc2607a706ecc760c2439655bca3f328d773fbb07e73c994f079356341a251ca23c573a71cce92dbf71ba62ceaa70210f8925fd4d1cdfac335b2a485ee9f SHA512 920f76d70c88a660b1d4c15683847a144b8dfaa01b91742ff2fedbe013ab030d3c5f07b6308f8bfb3f7bf3c2f805f7735d007e67257ca5233d2b585518f79e40
23 DIST buildbot-worker-0.9.15.post1.tar.gz 100901 BLAKE2B 5e4744fcd69e2920e0ca9ba0b1aa77ea5f62ed4aecc9f00df17953dc813e1f8d61a859ab0aacc26f88f51d281574a8089b849fe063d55c8649c4a53b528d8ba8 SHA512 6ee23f1dd52672646f28978cec3fa9e29b64cae84f524bbcb6f2614a4a56e49e8363975b89cd3508e78c9779233a27403e46fc098be0808d6cfc1e6aa6b8499f
24 DIST buildbot-worker-1.1.0.tar.gz 102142 BLAKE2B 144587edf2adc9d99837dc549b4d0696761f6cb3c959d4c133a5136606934ce03836cd1fcb019e7bb8ec473526c2ac07146c4820ef4d8b17ed9d843acd6c06b4 SHA512 77c46b3c9a16847eaf72de1dafa871a3242b66235c94ce8109f953db39aa4b74de2a03ca7ff06e91f8ea0751ed57e6ec1f39336912d56346f1bed171f597f6ed
25 +DIST buildbot-worker-1.1.2.tar.gz 103013 BLAKE2B b44593b71e61fee4037911759fa4f686aaabf5ef4be9efaecd539e88c5fc2ed2059d8dd8d6d1c4b3ba57d3563f79aaa404176529622003070c136803c90beb10 SHA512 3dd3da7e87d667307fca264d91af4671f76c3aad93a0512ae5777bb2e3972efe349968cf72fa17b99e45f2d7cec1ec16b1180c48d296e2702c9548bf858951a7
26
27 diff --git a/dev-util/buildbot-worker/buildbot-worker-1.1.2.ebuild b/dev-util/buildbot-worker/buildbot-worker-1.1.2.ebuild
28 new file mode 100644
29 index 00000000000..dea70dbdd5e
30 --- /dev/null
31 +++ b/dev-util/buildbot-worker/buildbot-worker-1.1.2.ebuild
32 @@ -0,0 +1,133 @@
33 +# Copyright 1999-2018 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI="6"
37 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
38 +
39 +EGIT_REPO_URI="https://github.com/buildbot/buildbot.git"
40 +
41 +[[ ${PV} == *9999 ]] && inherit git-r3
42 +inherit readme.gentoo-r1 user distutils-r1
43 +
44 +DESCRIPTION="BuildBot Worker (slave) Daemon"
45 +HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.org/project/buildbot-worker/"
46 +
47 +MY_V="${PV/_p/.post}"
48 +MY_P="${PN}-${MY_V}"
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 +IUSE="test"
59 +
60 +RDEPEND=">=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}]
61 + >=dev-python/twisted-17.9.0[${PYTHON_USEDEP}]
62 + dev-python/future[${PYTHON_USEDEP}]
63 + !<dev-util/buildbot-0.9.7
64 +"
65 +DEPEND="${RDEPEND}
66 + test? (
67 + dev-python/mock[${PYTHON_USEDEP}]
68 + dev-python/setuptools_trial[${PYTHON_USEDEP}]
69 + )
70 +"
71 +
72 +S="${WORKDIR}/${MY_P}"
73 +[[ ${PV} == *9999 ]] && S=${S}/worker
74 +
75 +pkg_setup() {
76 + enewuser buildbot
77 +
78 + DOC_CONTENTS="The \"buildbot\" user and the \"buildbot_worker\" init script has been added
79 + to support starting buildbot_worker through Gentoo's init system. To use this,
80 + execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
81 + Set up your build worker following the documentation, make sure the
82 + resulting directories are owned by the \"buildbot\" user and point
83 + \"${ROOT}etc/conf.d/buildbot_worker.myinstance\" at the right location.
84 + The scripts can run as a different user if desired."
85 +}
86 +
87 +python_test() {
88 + distutils_install_for_testing
89 +
90 + esetup.py test || die "Tests failed under ${EPYTHON}"
91 +}
92 +
93 +python_install_all() {
94 + distutils-r1_python_install_all
95 +
96 + doman docs/buildbot-worker.1
97 +
98 + newconfd "${FILESDIR}/buildbot_worker.confd2" buildbot_worker
99 + newinitd "${FILESDIR}/buildbot_worker.initd2" buildbot_worker
100 +
101 + dodir /var/lib/buildbot_worker
102 + cp "${FILESDIR}/buildbot.tac.sample" "${D}/var/lib/buildbot_worker"|| die "Install failed!"
103 +
104 + readme.gentoo_create_doc
105 +}
106 +
107 +pkg_postinst() {
108 + readme.gentoo_print_elog
109 +
110 + if [[ -n ${REPLACING_VERSIONS} ]]; then
111 + ewarn
112 + ewarn "Starting with buildbot-worker-0.9.10-r1, more than one instance of a buildbot_worker"
113 + ewarn "can be run simultaneously. Note that \"BASEDIR\" in the buildbot_worker configuration file"
114 + ewarn "is now the common base directory for all instances. If you are migrating from an older"
115 + ewarn "version, make sure that you copy the current contents of \"BASEDIR\" to a subdirectory."
116 + ewarn "The name of the subdirectory corresponds to the name of the buildbot_worker instance."
117 + ewarn "In order to start the service running OpenRC-based systems need to link to the init file:"
118 + ewarn " ln --symbolic --relative /etc/init.d/buildbot_worker /etc/init.d/buildbot_worker.myinstance"
119 + ewarn " rc-update add buildbot_worker.myinstance default"
120 + ewarn " /etc/init.d/buildbot_worker.myinstance start"
121 + ewarn "Systems using systemd can do the following:"
122 + ewarn " systemctl enable buildbot_worker@××××××××××.service"
123 + ewarn " systemctl enable buildbot_worker.target"
124 + ewarn " systemctl start buildbot_worker.target"
125 + fi
126 +}
127 +
128 +pkg_config() {
129 + local buildworker_path="/var/lib/buildbot_worker"
130 + local log_path="/var/log/buildbot_worker"
131 +
132 + einfo "This will prepare a new buildbot_worker instance in ${buildworker_path}."
133 + einfo "Press Control-C to abort."
134 +
135 + einfo "Enter the name for the new instance: "
136 + read instance_name
137 + [[ -z "${instance_name}" ]] && die "Invalid instance name"
138 +
139 + local instance_path="${buildworker_path}/${instance_name}"
140 + local instance_log_path="${log_path}/${instance_name}"
141 +
142 + if [[ -e "${instance_path}" ]]; then
143 + eerror "The instance with the specified name already exists:"
144 + eerror "${instance_path}"
145 + die "Instance already exists"
146 + fi
147 +
148 + if [[ ! -d "${instance_path}" ]]; then
149 + mkdir --parents "${instance_path}" || die "Unable to create directory ${buildworker_path}"
150 + fi
151 + chown --recursive buildbot "${instance_path}" || die "Setting permissions for instance failed"
152 + cp "${buildworker_path}/buildbot.tac.sample" "${instance_path}/buildbot.tac" \
153 + || die "Moving sample configuration failed"
154 + ln --symbolic --relative "/etc/init.d/buildbot_worker" "/etc/init.d/buildbot_worker.${instance_name}" \
155 + || die "Unable to create link to init file"
156 +
157 + if [[ ! -d "${instance_log_path}" ]]; then
158 + mkdir --parents "${instance_log_path}" || die "Unable to create directory ${instance_log_path}"
159 + fi
160 + ln --symbolic --relative "${instance_log_path}/twistd.log" "${instance_path}/twistd.log" \
161 + || die "Unable to create link to log file"
162 +
163 + einfo "Successfully created a buildbot_worker instance at ${instance_path}."
164 + einfo "To change the default settings edit the buildbot.tac file in this directory."
165 +}
166
167 diff --git a/dev-util/buildbot-worker/files/buildbot_worker.confd2 b/dev-util/buildbot-worker/files/buildbot_worker.confd2
168 index 3ae1d865fdb..f14e3210ca9 100644
169 --- a/dev-util/buildbot-worker/files/buildbot_worker.confd2
170 +++ b/dev-util/buildbot-worker/files/buildbot_worker.confd2
171 @@ -8,7 +8,7 @@ USERNAME="buildbot"
172 # Extra options passed to twistd.
173 TWISTD_OPTS=""
174
175 -# Optional specifiv python version to run in
176 +# Optional specific python version to run in
177 # (if not the system default version)
178 # ie: RUNTIME_PYTHON="/usr/bin/python2.7"
179 RUNTIME_PYTHON=""