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/
Date: Sun, 28 Jun 2020 00:46:42
Message-Id: 1593305179.4a2158f10fa26b915878f56ff5ad02718f0b5094.dolsen@gentoo
1 commit: 4a2158f10fa26b915878f56ff5ad02718f0b5094
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 28 00:01:06 2020 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 28 00:46:19 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a2158f1
7
8 dev-util/buildbot-worker: Version bump
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>
12
13 dev-util/buildbot-worker/Manifest | 1 +
14 .../buildbot-worker/buildbot-worker-2.8.2.ebuild | 126 +++++++++++++++++++++
15 2 files changed, 127 insertions(+)
16
17 diff --git a/dev-util/buildbot-worker/Manifest b/dev-util/buildbot-worker/Manifest
18 index 6c7a6260837..230a5ed56d4 100644
19 --- a/dev-util/buildbot-worker/Manifest
20 +++ b/dev-util/buildbot-worker/Manifest
21 @@ -1,2 +1,3 @@
22 DIST buildbot-worker-2.7.0.tar.gz 101075 BLAKE2B 2ee82434f565bef111685712b9b4dd7b0c522de59eefe3eda672827e4bcffae8288c5b9842221b52aa7d5907eeadd4bc5c635382b8c6c4e82977b3c139afdd4b SHA512 bdfce0a7b222fdddbf7830f90c1775e2bded7080e5053b114b7c136b3e114f6c8b26ee4ad802fce66514524e29e863a2f1a4366758c59ebbc6eeadb4b0a271db
23 DIST buildbot-worker-2.8.0.tar.gz 102605 BLAKE2B 4cd6d8755803d7649acaf1b45e6632a7a9bddd8a58590a8caa73f686584fedf62d98911a9e148e5a6f34c99b8551cd80c2acbd03fc4f892300cad89a4f68e0b8 SHA512 62f3a72ed7d7ca724b667528e55673c20382ed95abc898dc43e43c5e09bc1d8116eeb2791145097a9b9f7ab2d38a90d974dfbbf5697d8c045a630632ece8512e
24 +DIST buildbot-worker-2.8.2.tar.gz 101707 BLAKE2B 451dff979c6934bf6dd4e1579abbe18e9cf43551c906bd516c788a6a5f6170650a5468927bec0a8d4ab242e5886247406b2e098e1908a8d9b5777744982c7be6 SHA512 0628825ac023a66cd249dc6b42ff2f3ad3b5c0cb97561fd332ce4775abaa5368a8b7b636115259ab4aa842c811178c9b641ef4453b06167315eb81117ffef815
25
26 diff --git a/dev-util/buildbot-worker/buildbot-worker-2.8.2.ebuild b/dev-util/buildbot-worker/buildbot-worker-2.8.2.ebuild
27 new file mode 100644
28 index 00000000000..3bd934a5034
29 --- /dev/null
30 +++ b/dev-util/buildbot-worker/buildbot-worker-2.8.2.ebuild
31 @@ -0,0 +1,126 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="7"
36 +PYTHON_COMPAT=( python3_{6,7,8} )
37 +
38 +DISTUTILS_USE_SETUPTOOLS="rdepend"
39 +
40 +inherit readme.gentoo-r1 distutils-r1
41 +
42 +DESCRIPTION="BuildBot Worker (slave) Daemon"
43 +HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.org/project/buildbot-worker/"
44 +
45 +MY_V="${PV/_p/.post}"
46 +MY_P="${PN}-${MY_V}"
47 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
48 +
49 +LICENSE="GPL-2"
50 +SLOT="0"
51 +KEYWORDS="~amd64"
52 +
53 +IUSE="test"
54 +RESTRICT="!test? ( test )"
55 +
56 +RDEPEND="
57 + acct-user/buildbot
58 + >=dev-python/twisted-17.9.0[${PYTHON_USEDEP}]
59 + dev-python/future[${PYTHON_USEDEP}]
60 + !<dev-util/buildbot-1.0.0
61 +"
62 +DEPEND="${RDEPEND}
63 + test? (
64 + dev-python/mock[${PYTHON_USEDEP}]
65 + dev-python/setuptools_trial[${PYTHON_USEDEP}]
66 + )
67 +"
68 +
69 +S="${WORKDIR}/${MY_P}"
70 +
71 +pkg_setup() {
72 + DOC_CONTENTS="The \"buildbot\" user and the \"buildbot_worker\" init script has been added
73 + to support starting buildbot_worker through Gentoo's init system. To use this,
74 + execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
75 + Set up your build worker following the documentation, make sure the
76 + resulting directories are owned by the \"buildbot\" user and point
77 + \"${ROOT}/etc/conf.d/buildbot_worker.myinstance\" at the right location.
78 + The scripts can run as a different user if desired."
79 +}
80 +
81 +distutils_enable_tests setup.py
82 +
83 +python_install_all() {
84 + distutils-r1_python_install_all
85 +
86 + doman docs/buildbot-worker.1
87 +
88 + newconfd "${FILESDIR}/buildbot_worker.confd2" buildbot_worker
89 + newinitd "${FILESDIR}/buildbot_worker.initd2" buildbot_worker
90 +
91 + dodir /var/lib/buildbot_worker
92 + cp "${FILESDIR}/buildbot.tac.sample" "${D}/var/lib/buildbot_worker"|| die "Install failed!"
93 +
94 + readme.gentoo_create_doc
95 +}
96 +
97 +pkg_postinst() {
98 + readme.gentoo_print_elog
99 +
100 + if [[ -n ${REPLACING_VERSIONS} ]]; then
101 + ewarn
102 + ewarn "More than one instance of a buildbot_worker can be run simultaneously."
103 + ewarn " Note that \"BASEDIR\" in the buildbot_worker configuration file"
104 + ewarn "is now the common base directory for all instances. If you are migrating from an older"
105 + ewarn "version, make sure that you copy the current contents of \"BASEDIR\" to a subdirectory."
106 + ewarn "The name of the subdirectory corresponds to the name of the buildbot_worker instance."
107 + ewarn "In order to start the service running OpenRC-based systems need to link to the init file:"
108 + ewarn " ln --symbolic --relative /etc/init.d/buildbot_worker /etc/init.d/buildbot_worker.myinstance"
109 + ewarn " rc-update add buildbot_worker.myinstance default"
110 + ewarn " /etc/init.d/buildbot_worker.myinstance start"
111 + ewarn "Systems using systemd can do the following:"
112 + ewarn " systemctl enable buildbot_worker@××××××××××.service"
113 + ewarn " systemctl enable buildbot_worker.target"
114 + ewarn " systemctl start buildbot_worker.target"
115 + fi
116 +}
117 +
118 +pkg_config() {
119 + local buildworker_path="/var/lib/buildbot_worker"
120 + local log_path="/var/log/buildbot_worker"
121 +
122 + einfo "This will prepare a new buildbot_worker instance in ${buildworker_path}."
123 + einfo "Press Control-C to abort."
124 +
125 + einfo "Enter the name for the new instance: "
126 + read instance_name
127 + [[ -z "${instance_name}" ]] && die "Invalid instance name"
128 +
129 + local instance_path="${buildworker_path}/${instance_name}"
130 + local instance_log_path="${log_path}/${instance_name}"
131 +
132 + if [[ -e "${instance_path}" ]]; then
133 + eerror "The instance with the specified name already exists:"
134 + eerror "${instance_path}"
135 + die "Instance already exists"
136 + fi
137 +
138 + if [[ ! -d "${instance_path}" ]]; then
139 + mkdir --parents "${instance_path}" || die "Unable to create directory ${buildworker_path}"
140 + fi
141 + chown --recursive buildbot:buildbot "${instance_path}" || die "Setting permissions for instance failed"
142 + cp "${buildworker_path}/buildbot.tac.sample" "${instance_path}/buildbot.tac" \
143 + || die "Moving sample configuration failed"
144 + ln --symbolic --relative "/etc/init.d/buildbot_worker" "/etc/init.d/buildbot_worker.${instance_name}" \
145 + || die "Unable to create link to init file"
146 +
147 + if [[ ! -d "${instance_log_path}" ]]; then
148 + mkdir --parents "${instance_log_path}" || die "Unable to create directory ${instance_log_path}"
149 + chown --recursive buildbot:buildbot "${instance_log_path}" \
150 + || die "Setting permissions for instance failed"
151 + fi
152 + ln --symbolic --relative "${instance_log_path}/twistd.log" "${instance_path}/twistd.log" \
153 + || die "Unable to create link to log file"
154 +
155 + einfo "Successfully created a buildbot_worker instance at ${instance_path}."
156 + einfo "To change the default settings edit the buildbot.tac file in this directory."
157 +}