diff options
author | Magnus Granberg <zorry@gentoo.org> | 2024-10-27 09:16:10 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-11-09 09:07:19 +0000 |
commit | d776ca4a8c3906675b25d02f694adc228befaa21 (patch) | |
tree | 97fd0e8bb6c1ebc555ea0a7ef8a08610feea9786 /dev-util/buildbot-worker | |
parent | dev-util/buildbot-waterfall-view: add 4.1.0 (diff) | |
download | gentoo-d776ca4a8c3906675b25d02f694adc228befaa21.tar.gz gentoo-d776ca4a8c3906675b25d02f694adc228befaa21.tar.bz2 gentoo-d776ca4a8c3906675b25d02f694adc228befaa21.zip |
dev-util/buildbot-worker: add 4.1.0
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/buildbot-worker')
-rw-r--r-- | dev-util/buildbot-worker/Manifest | 1 | ||||
-rw-r--r-- | dev-util/buildbot-worker/buildbot-worker-4.1.0.ebuild | 137 |
2 files changed, 138 insertions, 0 deletions
diff --git a/dev-util/buildbot-worker/Manifest b/dev-util/buildbot-worker/Manifest index bd4933430c97..6a562b626747 100644 --- a/dev-util/buildbot-worker/Manifest +++ b/dev-util/buildbot-worker/Manifest @@ -2,3 +2,4 @@ DIST buildbot-worker-3.11.0-remove_py27.tar.gz 7134 BLAKE2B 8c92f8425b9a8d60e462 DIST buildbot-worker-3.11.0.tar.gz 131028 BLAKE2B 644e10f1d90c75a9f20439bc902764d9f69b16781d710e56bf4cad40d30f06f137d6a00d4c450c1589909ca93c98ff9a0cd6e1363a8feff58a4832e0096aada7 SHA512 73f42495bd252e75cd984d3222663260079887caadff29b69c23f188a1f3208fc6e2acfa38553fb5615ba1c3d4996655c96faa16ba0eb7335c6290ce3ce58679 DIST buildbot-worker-3.11.1.tar.gz 131129 BLAKE2B d8466c086261c612e976586b4589ca20617f5b9a7b69ccf276500fd351caead1425ae24897c4db242024de53f83c98b869dd9035bc366d9ee0376290307922a0 SHA512 c4560f69a15434cf93a43521bd1bbb568937a6ad8be338bca9089c9f449c3d0c5b8f000abf06a5fcfe4ebf5b206a9c81417a91cee633b67ca89ee67497a8368a DIST buildbot_worker-3.11.9.tar.gz 133480 BLAKE2B 61fb60b933d3469683b514fff3c204a4e8d1d143654c87659be37d217af307794e2e31dbe800897521d4755e36d9b7ae19a708420caeea8677610e8187d58a10 SHA512 8c313317f4815abf7d944d176702a8f6058a212766a41e48d7ca43a2bde626f609185b1beba59810e19cf751cf90eacb718731d937ff4b0a34d97cad0d35fc37 +DIST buildbot_worker-4.1.0.tar.gz 127579 BLAKE2B da2cd7b1443957e0a8d363030d0bfc5902d4ff88c88e49d9db9a9be5a7e54fc5878a004ddea3d91097c5549c76df58608c952dacb570d0b214c402e1e6884df8 SHA512 fd0f42eb2495498535ab627774922b030c61e60c6ea457588bbebfce2972322b15ee9f5cc16b3b4c7d80ddcf786ecddbc840447dc1fa07ade2676f5e3904ff50 diff --git a/dev-util/buildbot-worker/buildbot-worker-4.1.0.ebuild b/dev-util/buildbot-worker/buildbot-worker-4.1.0.ebuild new file mode 100644 index 000000000000..b710bc00ca82 --- /dev/null +++ b/dev-util/buildbot-worker/buildbot-worker-4.1.0.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYPI_NO_NORMALIZE=1 +PYTHON_COMPAT=( python3_{10..12} ) +PYPI_PN=${PN/-/_} +inherit readme.gentoo-r1 systemd distutils-r1 pypi + +DESCRIPTION="BuildBot Worker (slave) Daemon" +HOMEPAGE="https://buildbot.net/ + https://github.com/buildbot/buildbot + https://pypi.org/project/buildbot-worker/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~riscv ~sparc ~amd64-linux ~x86-linux" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + acct-user/buildbot + !<dev-util/buildbot-3.0.0 + >=dev-python/autobahn-0.16.0[${PYTHON_USEDEP}] + >=dev-python/msgpack-0.6.0[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + >=dev-python/twisted-21.2.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + ${RDEPEND} + dev-python/parameterized[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + ) +" + +DOC_CONTENTS="The \"buildbot\" user and the \"buildbot_worker\" init script has been added +to support starting buildbot_worker through Gentoo's init system. To use this, +execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance. +Set up your build worker following the documentation, make sure the +resulting directories are owned by the \"buildbot\" user and point +\"${ROOT}/etc/conf.d/buildbot_worker.myinstance\" at the right location. +The scripts can run as a different user if desired." + +src_prepare() { + # Remove shipped windows start script + sed -e "/'buildbot_worker_windows_service=buildbot_worker.scripts.windows_service:HandleCommandLine',/d" \ + -i setup.py || die + + distutils-r1_src_prepare +} + +python_test() { + "${EPYTHON}" -m twisted.trial buildbot_worker || die "Tests failed with ${EPYTHON}" +} + +python_install_all() { + + distutils-r1_python_install_all + + doman docs/buildbot-worker.1 + + newconfd "${FILESDIR}/buildbot_worker.confd2" buildbot_worker + newinitd "${FILESDIR}/buildbot_worker.initd2" buildbot_worker + systemd_dounit "${FILESDIR}/buildbot_worker.target" + systemd_newunit "${FILESDIR}/buildbot_worker_at.service" "buildbot_worker@.service" + systemd_install_serviced "${FILESDIR}/buildbot_worker_at.service.conf" "buildbot_worker@.service" + + dodir /var/lib/buildbot_worker + cp "${FILESDIR}/buildbot.tac.sample" "${D}/var/lib/buildbot_worker"|| die "Install failed!" + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog + + if [[ -n ${REPLACING_VERSIONS} ]]; then + ewarn + ewarn "More than one instance of a buildbot_worker can be run simultaneously." + ewarn " Note that \"BASEDIR\" in the buildbot_worker configuration file" + ewarn "is now the common base directory for all instances. If you are migrating from an older" + ewarn "version, make sure that you copy the current contents of \"BASEDIR\" to a subdirectory." + ewarn "The name of the subdirectory corresponds to the name of the buildbot_worker instance." + ewarn "In order to start the service running OpenRC-based systems need to link to the init file:" + ewarn " ln --symbolic --relative /etc/init.d/buildbot_worker /etc/init.d/buildbot_worker.myinstance" + ewarn " rc-update add buildbot_worker.myinstance default" + ewarn " /etc/init.d/buildbot_worker.myinstance start" + ewarn "Systems using systemd can do the following:" + ewarn " systemctl enable buildbot_worker@myinstance.service" + ewarn " systemctl enable buildbot_worker.target" + ewarn " systemctl start buildbot_worker.target" + fi +} + +pkg_config() { + local buildworker_path="/var/lib/buildbot_worker" + local log_path="/var/log/buildbot_worker" + + einfo "This will prepare a new buildbot_worker instance in ${buildworker_path}." + einfo "Press Control-C to abort." + + einfo "Enter the name for the new instance: " + read instance_name + [[ -z "${instance_name}" ]] && die "Invalid instance name" + + local instance_path="${buildworker_path}/${instance_name}" + local instance_log_path="${log_path}/${instance_name}" + + if [[ -e "${instance_path}" ]]; then + eerror "The instance with the specified name already exists:" + eerror "${instance_path}" + die "Instance already exists" + fi + + if [[ ! -d "${instance_path}" ]]; then + mkdir --parents "${instance_path}" || die "Unable to create directory ${buildworker_path}" + fi + chown --recursive buildbot:buildbot "${instance_path}" || die "Setting permissions for instance failed" + cp "${buildworker_path}/buildbot.tac.sample" "${instance_path}/buildbot.tac" \ + || die "Moving sample configuration failed" + ln --symbolic --relative "/etc/init.d/buildbot_worker" "/etc/init.d/buildbot_worker.${instance_name}" \ + || die "Unable to create link to init file" + + if [[ ! -d "${instance_log_path}" ]]; then + mkdir --parents "${instance_log_path}" || die "Unable to create directory ${instance_log_path}" + chown --recursive buildbot:buildbot "${instance_log_path}" \ + || die "Setting permissions for instance failed" + fi + ln --symbolic --relative "${instance_log_path}/twistd.log" "${instance_path}/twistd.log" \ + || die "Unable to create link to log file" + + einfo "Successfully created a buildbot_worker instance at ${instance_path}." + einfo "To change the default settings edit the buildbot.tac file in this directory." +} |