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: Sat, 10 Oct 2020 18:56:30
Message-Id: 1602356169.0862ff8df8e4b1c411116e45512a38af71e8f7c0.dolsen@gentoo
1 commit: 0862ff8df8e4b1c411116e45512a38af71e8f7c0
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 10 17:23:13 2020 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 10 18:56:09 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0862ff8d
7
8 dev-util/buildbot-worker: Version bump to 2.8.4
9
10 Package-Manager: Portage-3.0.8, Repoman-3.0.1
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.4.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 1f66b9bbf4c..8e21e4f93ae 100644
19 --- a/dev-util/buildbot-worker/Manifest
20 +++ b/dev-util/buildbot-worker/Manifest
21 @@ -1 +1,2 @@
22 DIST buildbot-worker-2.8.2.tar.gz 101707 BLAKE2B 451dff979c6934bf6dd4e1579abbe18e9cf43551c906bd516c788a6a5f6170650a5468927bec0a8d4ab242e5886247406b2e098e1908a8d9b5777744982c7be6 SHA512 0628825ac023a66cd249dc6b42ff2f3ad3b5c0cb97561fd332ce4775abaa5368a8b7b636115259ab4aa842c811178c9b641ef4453b06167315eb81117ffef815
23 +DIST buildbot-worker-2.8.4.tar.gz 101175 BLAKE2B 23077305d26ab282eaa4c633ebee7ca7c502285862604ecafe25d6b666ce802729c5478d676e6834bf9a2e27ccf48e1ad0e69449e55532aa81b0dcd3c6780011 SHA512 16ad9a0e5e9c875f90383fc90c359ee843e0b82a7878f87f2ac9e7091d8d907707c69210876f25b4fdf7148bcaafab10d10a8a0a8865c73808db707320757107
24
25 diff --git a/dev-util/buildbot-worker/buildbot-worker-2.8.4.ebuild b/dev-util/buildbot-worker/buildbot-worker-2.8.4.ebuild
26 new file mode 100644
27 index 00000000000..3bd934a5034
28 --- /dev/null
29 +++ b/dev-util/buildbot-worker/buildbot-worker-2.8.4.ebuild
30 @@ -0,0 +1,126 @@
31 +# Copyright 1999-2020 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI="7"
35 +PYTHON_COMPAT=( python3_{6,7,8} )
36 +
37 +DISTUTILS_USE_SETUPTOOLS="rdepend"
38 +
39 +inherit readme.gentoo-r1 distutils-r1
40 +
41 +DESCRIPTION="BuildBot Worker (slave) Daemon"
42 +HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.org/project/buildbot-worker/"
43 +
44 +MY_V="${PV/_p/.post}"
45 +MY_P="${PN}-${MY_V}"
46 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
47 +
48 +LICENSE="GPL-2"
49 +SLOT="0"
50 +KEYWORDS="~amd64"
51 +
52 +IUSE="test"
53 +RESTRICT="!test? ( test )"
54 +
55 +RDEPEND="
56 + acct-user/buildbot
57 + >=dev-python/twisted-17.9.0[${PYTHON_USEDEP}]
58 + dev-python/future[${PYTHON_USEDEP}]
59 + !<dev-util/buildbot-1.0.0
60 +"
61 +DEPEND="${RDEPEND}
62 + test? (
63 + dev-python/mock[${PYTHON_USEDEP}]
64 + dev-python/setuptools_trial[${PYTHON_USEDEP}]
65 + )
66 +"
67 +
68 +S="${WORKDIR}/${MY_P}"
69 +
70 +pkg_setup() {
71 + DOC_CONTENTS="The \"buildbot\" user and the \"buildbot_worker\" init script has been added
72 + to support starting buildbot_worker through Gentoo's init system. To use this,
73 + execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance.
74 + Set up your build worker following the documentation, make sure the
75 + resulting directories are owned by the \"buildbot\" user and point
76 + \"${ROOT}/etc/conf.d/buildbot_worker.myinstance\" at the right location.
77 + The scripts can run as a different user if desired."
78 +}
79 +
80 +distutils_enable_tests setup.py
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 +}