diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-12 19:09:37 -0500 |
| commit | b590c8d7572b727d565cc0b8ff660d43569845de (patch) | |
| tree | 06f7a4102ea4e845df8b66660f252920d52952f9 /dev-util/buildbot-worker | |
| parent | 24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff) | |
| download | srcux-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz srcux-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz srcux-b590c8d7572b727d565cc0b8ff660d43569845de.zip | |
Adding metadata
Diffstat (limited to 'dev-util/buildbot-worker')
| -rw-r--r-- | dev-util/buildbot-worker/Manifest | 5 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/buildbot-worker-3.11.0.ebuild | 139 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/buildbot-worker-3.11.1.ebuild | 140 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/buildbot-worker-3.11.9.ebuild | 137 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/buildbot-worker-4.1.0.ebuild | 137 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/buildbot-worker-9999.ebuild | 136 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/files/buildbot.tac.sample | 70 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/files/buildbot_worker.confd2 | 14 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/files/buildbot_worker.initd2 | 57 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/files/buildbot_worker.service | 12 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/files/buildbot_worker.target | 5 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/files/buildbot_worker_at.service | 14 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/files/buildbot_worker_at.service.conf | 5 | ||||
| -rw-r--r-- | dev-util/buildbot-worker/metadata.xml | 12 |
14 files changed, 883 insertions, 0 deletions
diff --git a/dev-util/buildbot-worker/Manifest b/dev-util/buildbot-worker/Manifest new file mode 100644 index 000000000000..6a562b626747 --- /dev/null +++ b/dev-util/buildbot-worker/Manifest @@ -0,0 +1,5 @@ +DIST buildbot-worker-3.11.0-remove_py27.tar.gz 7134 BLAKE2B 8c92f8425b9a8d60e46228aab6aef49352090c931e21818d684167100f0c5c184e5e4e6aabdbb420bfe0b124d572194b33889deccf123b934754ad4e75037af0 SHA512 d9158e7936336d6147c0938ea212da55775ffe1c431b94b1b89274113fa45cbd62b7042737bac8a6580e268aca823fa072ee3d3bb49bad97aa99bd56995d7134 +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-3.11.0.ebuild b/dev-util/buildbot-worker/buildbot-worker-3.11.0.ebuild new file mode 100644 index 000000000000..c6b19c238712 --- /dev/null +++ b/dev-util/buildbot-worker/buildbot-worker-3.11.0.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2025 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_{13..14} ) +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" +IUSE="test" +RESTRICT="!test? ( test )" + +SRC_URI="${SRC_URI} https://dev.gentoo.org/~zorry/patches/buildbot/buildbot-worker-${PV}-remove_py27.tar.gz" + +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/twisted-18.7.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 + # applay remove py 2.7 patch + eapply "${WORKDIR}/buildbot-worker-${PV}-remove_py27.patch" + + 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." +} diff --git a/dev-util/buildbot-worker/buildbot-worker-3.11.1.ebuild b/dev-util/buildbot-worker/buildbot-worker-3.11.1.ebuild new file mode 100644 index 000000000000..22317ba96e7f --- /dev/null +++ b/dev-util/buildbot-worker/buildbot-worker-3.11.1.ebuild @@ -0,0 +1,140 @@ +# Copyright 1999-2025 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_{13..14} ) +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" +IUSE="test" +RESTRICT="!test? ( test )" + +SRC_URI+=" + https://github.com/buildbot/buildbot/releases/download/v${PV}/${P}.tar.gz +" + +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-18.7.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." +} diff --git a/dev-util/buildbot-worker/buildbot-worker-3.11.9.ebuild b/dev-util/buildbot-worker/buildbot-worker-3.11.9.ebuild new file mode 100644 index 000000000000..13c94c83ba1c --- /dev/null +++ b/dev-util/buildbot-worker/buildbot-worker-3.11.9.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2025 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_{13..14} ) +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" +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-18.7.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." +} 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..cf3ba1352f8a --- /dev/null +++ b/dev-util/buildbot-worker/buildbot-worker-4.1.0.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2025 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_{13..14} ) +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" +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." +} diff --git a/dev-util/buildbot-worker/buildbot-worker-9999.ebuild b/dev-util/buildbot-worker/buildbot-worker-9999.ebuild new file mode 100644 index 000000000000..8820a766530f --- /dev/null +++ b/dev-util/buildbot-worker/buildbot-worker-9999.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) +EGIT_REPO_URI="https://github.com/buildbot/buildbot.git" +inherit readme.gentoo-r1 systemd distutils-r1 + +DESCRIPTION="BuildBot Worker (slave) Daemon" +HOMEPAGE="https://buildbot.net/ + https://github.com/buildbot/buildbot + https://pypi.org/project/buildbot-worker/" +S="${S}/worker" + +LICENSE="GPL-2" +SLOT="0" +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-18.7.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." +} diff --git a/dev-util/buildbot-worker/files/buildbot.tac.sample b/dev-util/buildbot-worker/files/buildbot.tac.sample new file mode 100644 index 000000000000..19bd941911bd --- /dev/null +++ b/dev-util/buildbot-worker/files/buildbot.tac.sample @@ -0,0 +1,70 @@ +''' +This is a sample buildbot.tac file to initalize +a buildbot worker complete with logging. +''' + +import os.path +import socket + +from twisted.application import service +from twisted.python.logfile import LogFile +from twisted.python.log import ILogObserver, FileLogObserver + +from buildbot_worker.bot import Worker + +################################ +# Set the following variables +# to your desired values +################################# + +# use the current directory or +# set to an absolute value +basedir = '.' + +# logging +rotateLength = 10000000 +maxRotatedFiles = 10 + +# buildbot communication port +port = 9989 + +# worker settings +worker_name = 'example-worker' +passwd = 'pass' +buildmaster_host = 'localhost' +keepalive = 600 +umask = None +maxdelay = 300 +numcpus = None +allow_shutdown = None + + +# Begin starting up the worker +# if this is a relocatable tac file, get the directory containing the TAC +if basedir == '.': + basedir = os.path.abspath(os.path.dirname(__file__)) + +# note: this line is matched against to check that this is +# a buildbot-worker directory; do not edit it. +application = service.Application('buildbot-worker') + +# set up logging +logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"), + rotateLength=rotateLength, + maxRotatedFiles=maxRotatedFiles + ) +application.setComponent(ILogObserver, FileLogObserver(logfile).emit) + +worker = Worker(buildmaster_host, + port, + worker_name, + passwd, + basedir, + keepalive, + umask=umask, + maxdelay=maxdelay, + numcpus=numcpus, + allow_shutdown=allow_shutdown + ) + +worker.setServiceParent(application) diff --git a/dev-util/buildbot-worker/files/buildbot_worker.confd2 b/dev-util/buildbot-worker/files/buildbot_worker.confd2 new file mode 100644 index 000000000000..2ce321f522c4 --- /dev/null +++ b/dev-util/buildbot-worker/files/buildbot_worker.confd2 @@ -0,0 +1,14 @@ +# Path to the build slave's basedir. +BASEDIR="/var/lib/buildbot_worker" + +# User account for the buildslave. +# The basedir should be owned by this user. +USERNAME="buildbot" + +# Extra options passed to twistd. +TWISTD_OPTS="" + +# Optional specific python version to run in +# (if not the system default version) +# ie: RUNTIME_PYTHON="/usr/bin/python3.8" +RUNTIME_PYTHON="" diff --git a/dev-util/buildbot-worker/files/buildbot_worker.initd2 b/dev-util/buildbot-worker/files/buildbot_worker.initd2 new file mode 100644 index 000000000000..4ebfdd452926 --- /dev/null +++ b/dev-util/buildbot-worker/files/buildbot_worker.initd2 @@ -0,0 +1,57 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +BUILDWORKER_NAME=${RC_SVCNAME#*.} +BUILDWORKER_PATH="${BASEDIR}/${BUILDWORKER_NAME}" +depend() { + need net +} + +checkconfig() { + if [ -z "${BUILDWORKER_NAME}" ]; then + eerror "Buildbot-worker name not defined. Please link buildbot_worker.foo to this file to start the buildbot_worker with the name \"foo\"." + return 1 + fi + if [ -z "${BASEDIR}" ]; then + eerror "BASEDIR not set" + return 1 + fi + if [ -z "${USERNAME}" ]; then + eerror "USERNAME not set" + return 1 + fi + if [ ! -d "${BUILDWORKER_PATH}" ]; then + eerror "${BUILDWORKER_PATH} is not a directory" + return 1 + fi + if [ ! -e "${BUILDWORKER_PATH}/buildbot.tac" ]; then + eerror "${BUILDWORKER_PATH} does not contain buildbot.tac" + return 1 + fi + if [ ! -e "${RUNTIME_PYTHON}" ]; then + RUNTIME_PYTHON="/usr/bin/python" + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting buildbot-worker in ${BUILDWORKER_PATH}" + # We set HOME here to make something valid show up in the env of child + # processes spawned by the buildbot-worker. + start-stop-daemon --start -u "${USERNAME}" \ + --pidfile "${BUILDWORKER_PATH}/buildbot_worker.pid" \ + --env HOME="${BUILDWORKER_PATH}" \ + --exec "${RUNTIME_PYTHON}" -- /usr/bin/twistd \ + --no_save \ + --logfile="${BUILDWORKER_PATH}/twistd.log" \ + --pidfile="${BUILDWORKER_PATH}/buildbot_worker.pid" \ + --python="${BUILDWORKER_PATH}/buildbot.tac" + eend $? +} + +stop() { + ebegin "Stopping buildbot-worker in ${BUILDWORKER_PATH}" + start-stop-daemon --stop --pidfile "${BUILDWORKER_PATH}/buildbot_worker.pid" + eend $? +} diff --git a/dev-util/buildbot-worker/files/buildbot_worker.service b/dev-util/buildbot-worker/files/buildbot_worker.service new file mode 100644 index 000000000000..e75a2d51e4f3 --- /dev/null +++ b/dev-util/buildbot-worker/files/buildbot_worker.service @@ -0,0 +1,12 @@ +[Unit] +Description=buildbot worker (slave) instances +After=local-fs.target network.target + +[Service] +Type=forking +User=buildbot +ExecStart=/usr/bin/buildbot_worker start /var/lib/buildbot_worker +ExecStop=/usr/bin/buildbot_worker stop /var/lib/buildbot_worker + +[Install] +WantedBy=multi-user.target diff --git a/dev-util/buildbot-worker/files/buildbot_worker.target b/dev-util/buildbot-worker/files/buildbot_worker.target new file mode 100644 index 000000000000..4a2b3e2d52f3 --- /dev/null +++ b/dev-util/buildbot-worker/files/buildbot_worker.target @@ -0,0 +1,5 @@ +[Unit] +Description=Buildbot-Worker target that allows to start or stop all buildbot_worker@*.service instances + +[Install] +WantedBy=multi-user.target diff --git a/dev-util/buildbot-worker/files/buildbot_worker_at.service b/dev-util/buildbot-worker/files/buildbot_worker_at.service new file mode 100644 index 000000000000..6b8849920f79 --- /dev/null +++ b/dev-util/buildbot-worker/files/buildbot_worker_at.service @@ -0,0 +1,14 @@ +[Unit] +Description=buildbot-worker daemon +After=local-fs.target network.target +PartOf=buildbot_worker.target + +[Service] +Environment=BASEDIR=/var/lib/buildbot_worker +Type=forking +User=buildbot +ExecStart=/usr/bin/buildbot-worker start ${BASEDIR}/%i +ExecStop=/usr/bin/buildbot-worker stop ${BASEDIR}/%i + +[Install] +WantedBy=buildbot_worker.target diff --git a/dev-util/buildbot-worker/files/buildbot_worker_at.service.conf b/dev-util/buildbot-worker/files/buildbot_worker_at.service.conf new file mode 100644 index 000000000000..8d37f9412e7d --- /dev/null +++ b/dev-util/buildbot-worker/files/buildbot_worker_at.service.conf @@ -0,0 +1,5 @@ +# Uncomment the following lines to configure the base directory for all buildmaster instances. + +#[Service] +#Environment=BASEDIR=/var/lib/buildbot_worker + diff --git a/dev-util/buildbot-worker/metadata.xml b/dev-util/buildbot-worker/metadata.xml new file mode 100644 index 000000000000..9c78de90e779 --- /dev/null +++ b/dev-util/buildbot-worker/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <upstream> + <maintainer> + <email>devel@buildbot.net</email> + <name>Developers List</name> + </maintainer> + <remote-id type="cpe">cpe:/a:buildbot:buildbot</remote-id> + </upstream> + <origin>baldeagleos-repo</origin> +</pkgmetadata> |
