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