From b2be182d49eea46686b5cf2680d457df61e89dc4 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 30 Jun 2018 08:49:38 +0100 Subject: gentoo resync : 30.06.2018 --- dev-util/buildbot/Manifest | 6 +- dev-util/buildbot/buildbot-1.1.2.ebuild | 184 ++++++++++++++++++++++++++++++ dev-util/buildbot/files/buildmaster.confd | 5 + dev-util/buildbot/files/buildmaster.initd | 4 +- 4 files changed, 195 insertions(+), 4 deletions(-) create mode 100644 dev-util/buildbot/buildbot-1.1.2.ebuild (limited to 'dev-util/buildbot') diff --git a/dev-util/buildbot/Manifest b/dev-util/buildbot/Manifest index 4abf58320e39..beb6cab3853b 100644 --- a/dev-util/buildbot/Manifest +++ b/dev-util/buildbot/Manifest @@ -1,7 +1,7 @@ AUX Remove-distro-version-test.patch 804 BLAKE2B a568d6daaa349b4bf02b59c5a7ef88e6c3017e45840dc2f93d8459dea0d11924c92255446fa5f3ef851a38daec1e8140275cfaac6876705e7ec3a5fc6815a49d SHA512 b98005b8a02456d60bdc8085efb4c6fa52386e7b185bf7acefbaf3cd8fe481f87cad68a4d4986f498e35dca1618208032f0a73b04ca0515bbb2703729d3308fe AUX buildbot-0.9.15_p1-buildbotworkerdocker.py.patch 947 BLAKE2B d0e4e1e97ac30d63d1167c64e6505b18573abb3183b970e24dd7cbd22db06094cb7a14be97f3fd3a4ac9ef6bb6bc37050613e83ddb4bb6dd2d61e88769336069 SHA512 1b92cde0a585521d4ce33fa4cc19b9322c64e004f58a4c8570a6ce34a551d77431dd761f59ac41553968a89459c9cb5ea49212e2ce7b2838adbd51b922edee81 -AUX buildmaster.confd 218 BLAKE2B b921db1ea03c73d4a9c9eddc79c5831dcc755a51d31a334e8b35ec0abacb76dee28185030aeaf5f70f2f660139ce1d5707c43c083d6966790ad136c2c1251860 SHA512 d9339c30d3a92e92b41b0e3139ec89ecbd1460b0e4ee6c6fe2560c4307b2eb3f29b838c2f2312b9c7049bd95eaf652d09039227c691af805bc25a36999ec1840 -AUX buildmaster.initd 1573 BLAKE2B bfd18d13345ab7dacc367867da3d0d70317250a3bec0d772caf40cdb16b0684eafcff6b3858608e2d317b48fb9e72b742dba5c3b0276a4183fc70d3b5aff693e SHA512 22d58baa3500de63ca3d278c2ed44c78694c8f022a9916b0f35344485dbbbe46b054ba9b0cc9a8c56948ea8726e419cb7e1177036124fc3fc5acc957d56f168c +AUX buildmaster.confd 362 BLAKE2B 72d36c02b825ab26e8d85348c3dc65800e03c8d9439a4ada658764b5f87e83e07eb89b1b5bedc59466135008135733319d8e4a31657c9f3f0c1713d1649ab820 SHA512 5b3e3cc75187d0b44c8e59cdfb605752db20913b025eadc7e673bc7c9c45b33e1a0d19362c0cc0c023cd32255946d510f172090ada9cbf2978f4807de29e2b72 +AUX buildmaster.initd 1576 BLAKE2B badfd427f40acced775fbf1e115ddf72792e9df80ff46dbb2b99cf01187885be360ada13b05ceec0ea181337f0ba07966f659a9f539f47cc3611555f051bbdf5 SHA512 0ad8173fcd732420c104ee3467d9df4c629165d82e75ddc8154249e69af3a8492a645e57e2da8e06372ba062aecbff82bfd0b24ff7d58515f87f0d255c8cab0f AUX buildmaster.target 138 BLAKE2B 7570fc327d2e002803f7d6691740f5885e6b54d3df2522c0439d551d0c01161fcd99779df0bff417dd66e1bacde2956bfa7b39f988f2fe204fb2abdb675adfe9 SHA512 c5f56688349af0adcfa644abc699445e2c61bb268d5407f8fc540ac80ea9be6aee615df16bbf0f41db272dd4159762d7be744b3116efc0f9bc7cb1d458edb050 AUX buildmaster_at.service 375 BLAKE2B 1a4d829389298713bf66885a5bcd28202eec32b6356b43b9e0861b00052e3702593a2e2a4764246dd62e52805ba2f2e62a86d0ae8ec4cbed3df42400dc562f74 SHA512 c37f1c461a4c7ee741a839772a5feabf10103542e159c6ae4eddfa37a146732dfc23f91d867d69c3718a21714516a3847485ae4e6580c93a5aa94daec40dd093 AUX buildmaster_at.service.conf 150 BLAKE2B c6931c3ebfd77553d52b650668c440ca17f37bf270ab807eb97702d23cc504c0a933453addeef4abd3ddb13e9441cd330dd4cff9dc9962bdabbed8f0fa6d892c SHA512 d533b95c5b180cda5aa73966c590b7828598d5b6bcd77147a88238941adaa4c3c78e5f17d771598f622212856b16ce4582ab915a4cb57f0dd633eb2ad6b4c10d @@ -12,10 +12,12 @@ DIST buildbot-0.9.13.tar.gz 3061713 BLAKE2B fac74d610bf0ff1cfeea1c59c46e95339d6b DIST buildbot-0.9.15.post1.tar.gz 3088947 BLAKE2B c9a0265d3df2a9ac01872fc7106b5b787334bd899a43fcdb6ad06aab5e0e8f1ddb4374bf5211f251f26985c3b11a0b981bdd23fb668ac1717af36443831648e6 SHA512 c5c72132fd8446fbb14467851063d192dbb817506163eacc3022d563698453c66706a895613ca1c17502dd25957b31f6409996497d2e7646ab2fdbb3fb55c31d DIST buildbot-1.1.0.docs.tar.xz 23932 BLAKE2B 81da8b86bb269efd2cd3f9146f3d9b41d64b28fdd0c878708c323d040a7e773cd277a18c82b1ef3cb07759ba8aedbc604e1de84f6477205b1708c28b6e86831e SHA512 511d244ffd205989047b4514b164e194b30fe4e0513d3bda776fb4d7a1a5bf42d8b7f00540b88e427838ab43f45686a83e556687ab75ce55eae6b834426a8ef7 DIST buildbot-1.1.0.tar.gz 3098781 BLAKE2B 5a4ba8b641765fd58c3b5e788fc20aa1fb6195655ce2d82929f0f62ff48d20672f21efe0c413387e583d095c3ffcee1055a287016fe87ec1f3eb6b0ccdefdccb SHA512 f850ba2cd93d54a8abc97503719f93f69dfdc3d03b519e2d05c02bdc11893529eb51d74b6584555689281aedb71c3aa6c23141cf5fbc68ae97e09f1c89b2c94c +DIST buildbot-1.1.2.tar.gz 3101168 BLAKE2B 35ec56440014015850a69324d475c4ca9555ad90da85b26a7a43eca74f08361137021aec72ddca37cbb24f21519ebf45948e66214291f356b4a1fbada7c0b3b8 SHA512 14c28d6fae18a10d89d41509635188d881ac76e7b61758481a9afbb22eb384d7ab5080383242e5850af13bfe46877985a91036270c3c4fbf01eafee5b7699815 EBUILD buildbot-0.8.12-r3.ebuild 5487 BLAKE2B 65e94e3913dfc194381b8c86b0743f2ddb278f90cf5f0d32e1ddeee50cb5da314a6c35c892264985841ebd6227453f699794db30786e329a6b5219e6ece0ec6b SHA512 b628b1cec97419b16289c219967eee1154a1b022004afb25981bc83ff60924e462cd652e2c88f51a799c8bec7acdd25dcaf6e2657f0d3f44a69a793d205bfcca EBUILD buildbot-0.9.12.ebuild 7108 BLAKE2B 3f1d6b553364fbc381e6d22ffc3a41be88dfb5359583aabe53cadbffca1c7e3dc18714693543a7b0422f1b4a6e842e64c77d49092fd041a28c65a61fc441227a SHA512 933fc9c4fcd252837b565d7442a9f617548a26cad8b2719d2f167f40d5abb0e000b98fda7994dc718399ed1428b6a67abd7b1e6ddc39d48fd49ca1d7bab233a6 EBUILD buildbot-0.9.13.ebuild 7049 BLAKE2B 05ba09770db0a62bcfea80aba47362dd1ae1d76c6020c7b9b579373e5c0e7bc922a46a96aeb1508137d99c08588980f5430fd147a1852248bfa91654b344f1d0 SHA512 1438c1c66928f59421431852274fe8d86dbb70ada6b6172b080ee5851d3817edbfe643973577fe9390e8f05bb26a055656861563ba1f3ed607cb27d34993f84a EBUILD buildbot-0.9.15_p1.ebuild 7238 BLAKE2B f5e70ab74c1e116335aa48bbe5349f34493c5829cabbb69e98ba9971e5c6f6f1d1c29fda2235e15b3127266f29908009f292f5e3952217864b613e4a59e854c8 SHA512 73c7640b3450701711099233c2cc405ef23707bb6074c8ad4b11790d2940284aaf7eecfce6af4cdfaf7f32eb693cd1f329ab3eb1b43a8f65f8b98439a63f7234 EBUILD buildbot-1.1.0.ebuild 7352 BLAKE2B 4565a431c481ffb3681e3fb47c54daaaf5f2c34476f41e696df012a77960b920942014aaeec8220d59ff75f481986777c0a57304f953dfbab1f5e01616334cee SHA512 6fee92726755e6c0fb6f3f55277669518c2da4435b0dbd2d09fd656613269822c80740d06b5486f6dea8e40d6731176fd61ee5cbafdfc64b10e0eb7872168997 +EBUILD buildbot-1.1.2.ebuild 6550 BLAKE2B 88e1fb4d2acc8f6876629ad933c54e0574ba179788f33416ca00c40ada8f0d355d49f5675d19ba47003090ad5f8f556568b3b65354925df95a9be39655148328 SHA512 1db8c11e0622f7ccf0c7237e7404736c40d55233d2b56778a2b85b30dd9e26843d9ab2e3c9fe2c63467dfe54f28141323688eed1ee43e3a0f7e483fda71a3254 EBUILD buildbot-9999.ebuild 7179 BLAKE2B 8bf2ee184ffb4faebcf281f8884f8732dc51ec3e9a0293a6441f1eee85a118360750c4101b3e957616a7e1eda0858fef90db4cdaa0ff79d36ae66ecfa43b3a64 SHA512 c58491324b048e3d36c019ff9eeb226f1f1cadec45b58d6337fe2af3ded585426a1b4563069ca8e6c7528d74f1a2e520604ba8c7286fdcb8fe6e11282ad57c12 MISC metadata.xml 1616 BLAKE2B cf5a0b7f346e9077dccbd4a9f1b9e95255f874cc8ebfdaec0a067f44c7c2b8015362cf590cb927f8ec87ca497ef38973a6acf5117968904c8762a84ef751cb70 SHA512 efb2ec3027be76f7d9d07bb19616ae4692acd07eefe79412f5983281db51095ad2f900155a26efafeeead403edfeb7fc0e570672f6b254bca83d5263c645d5a4 diff --git a/dev-util/buildbot/buildbot-1.1.2.ebuild b/dev-util/buildbot/buildbot-1.1.2.ebuild new file mode 100644 index 000000000000..0888e9cce412 --- /dev/null +++ b/dev-util/buildbot/buildbot-1.1.2.ebuild @@ -0,0 +1,184 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +PYTHON_REQ_USE="sqlite" +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) + +EGIT_REPO_URI="https://github.com/buildbot/${PN}.git" + +[[ ${PV} == *9999 ]] && inherit git-r3 +inherit readme.gentoo-r1 user systemd distutils-r1 + +MY_PV="${PV/_p/.post}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="BuildBot build automation system" +HOMEPAGE="https://buildbot.net/ https://github.com/buildbot/buildbot https://pypi.org/project/buildbot/" +[[ ${PV} == *9999 ]] || SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +if [[ ${PV} == *9999 ]]; then + KEYWORDS="" +else + KEYWORDS="~amd64" +fi + +IUSE="crypt docker examples irc test" + +RDEPEND=" + >=dev-python/jinja-2.1[${PYTHON_USEDEP}] + >=dev-python/twisted-17.9.0[${PYTHON_USEDEP}] + >=dev-python/autobahn-0.16.0[${PYTHON_USEDEP}] + >=dev-python/sqlalchemy-0.8[${PYTHON_USEDEP}] + >=dev-python/sqlalchemy-migrate-0.9[${PYTHON_USEDEP}] + dev-python/future[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}] + >=dev-python/txaio-2.2.2[${PYTHON_USEDEP}] + dev-python/pyjwt[${PYTHON_USEDEP}] + >=dev-python/zope-interface-4.1.1[${PYTHON_USEDEP}] + ~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}] + crypt? ( + >=dev-python/twisted-17.9.0[${PYTHON_USEDEP},crypt] + >=dev-python/pyopenssl-16.0.0[${PYTHON_USEDEP}] + dev-python/idna[${PYTHON_USEDEP}] + dev-python/service_identity[${PYTHON_USEDEP}] + ) + irc? ( + dev-python/txrequests[${PYTHON_USEDEP}] + ) + docker? ( + >=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}] + ) +" +DEPEND="${RDEPEND} + >=dev-python/setuptools-21.2.1[${PYTHON_USEDEP}] + test? ( + >=dev-python/python-dateutil-1.5[${PYTHON_USEDEP}] + >=dev-python/mock-2.0.0[${PYTHON_USEDEP}] + dev-python/moto[${PYTHON_USEDEP}] + dev-python/boto3[${PYTHON_USEDEP}] + dev-python/pyjade[${PYTHON_USEDEP}] + dev-python/txgithub[${PYTHON_USEDEP}] + dev-python/txrequests[${PYTHON_USEDEP}] + dev-python/lz4[${PYTHON_USEDEP}] + dev-python/treq[${PYTHON_USEDEP}] + dev-python/setuptools_trial[${PYTHON_USEDEP}] + ~dev-util/buildbot-worker-${PV}[${PYTHON_USEDEP}] + >=dev-python/docker-py-2.2.0[${PYTHON_USEDEP}] + )" + +S=${WORKDIR}/${MY_P} +[[ ${PV} == *9999 ]] && S=${S}/master + +if [[ ${PV} != *9999 ]]; then + PATCHES=( + "${FILESDIR}/Remove-distro-version-test.patch" + ) +fi + +pkg_setup() { + enewuser buildbot + + DOC_CONTENTS="The \"buildbot\" user and the \"buildmaster\" init script has been added + to support starting buildbot through Gentoo's init system. To use this, + execute \"emerge --config =${CATEGORY}/${PF}\" to create a new instance. + The scripts can run as a different user if desired." +} + +src_install() { + distutils-r1_src_install + + doman docs/buildbot.1 + + if use examples; then + insinto /usr/share/doc/${PF} + doins -r docs/examples + fi + + newconfd "${FILESDIR}/buildmaster.confd" buildmaster + newinitd "${FILESDIR}/buildmaster.initd" buildmaster + systemd_dounit "${FILESDIR}/buildmaster.target" + systemd_newunit "${FILESDIR}/buildmaster_at.service" "buildmaster@.service" + systemd_install_serviced "${FILESDIR}/buildmaster_at.service.conf" "buildmaster@.service" + + readme.gentoo_create_doc +} + +python_test() { + distutils_install_for_testing + + esetup.py test || die "Tests failed under ${EPYTHON}" +} + +pkg_postinst() { + readme.gentoo_print_elog + + if [[ -n ${REPLACING_VERSIONS} ]]; then + ewarn + ewarn "Starting with buildbot-0.8.12-r2, more than one instance of buildmaster" + ewarn "can be run simultaneously. Note that \"BASEDIR\" in the buildbot 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 buildmaster 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/buildmaster /etc/init.d/buildmaster.myinstance" + ewarn " rc-update add buildmaster.myinstance default" + ewarn " /etc/init.d/buildmaster.myinstance start" + ewarn "Systems using systemd can do the following:" + ewarn " systemctl enable buildmaster@myinstance.service" + ewarn " systemctl enable buildmaster.target" + ewarn " systemctl start buildmaster.target" + elog + elog "Upstream recommends the following when upgrading:" + elog "Each time you install a new version of Buildbot, you should run the" + elog "\"buildbot upgrade-master\" command on each of your pre-existing build masters." + elog "This will add files and fix (or at least detect) incompatibilities between" + elog "your old config and the new code." + fi + elog + elog "In order to create a new instance of buildmaster, execute:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config() { + local buildmaster_path="/var/lib/buildmaster" + local log_path="/var/log/buildmaster" + + einfo "This will prepare a new buildmaster instance in ${buildmaster_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="${buildmaster_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 + + local buildbot="/usr/bin/buildbot" + if [[ ! -d "${buildmaster_path}" ]]; then + mkdir --parents "${buildmaster_path}" || die "Unable to create directory ${buildmaster_path}" + fi + "${buildbot}" create-master "${instance_path}" &>/dev/null || die "Creating instance failed" + chown --recursive buildbot "${instance_path}" || die "Setting permissions for instance failed" + mv "${instance_path}/master.cfg.sample" "${instance_path}/master.cfg" \ + || die "Moving sample configuration failed" + ln --symbolic --relative "/etc/init.d/buildmaster" "/etc/init.d/buildmaster.${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}" + 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 buildmaster instance at ${instance_path}." + einfo "To change the default settings edit the master.cfg file in this directory." +} diff --git a/dev-util/buildbot/files/buildmaster.confd b/dev-util/buildbot/files/buildmaster.confd index e489d66f9d4b..eb3185aef358 100644 --- a/dev-util/buildbot/files/buildmaster.confd +++ b/dev-util/buildbot/files/buildmaster.confd @@ -8,3 +8,8 @@ USERNAME=buildbot # Extra options to pass to twistd. TWISTD_OPTS="" + +# Optional specific python version to run in +# (if not the system default version) +# ie: RUNTIME_PYTHON="/usr/bin/python2.7" +RUNTIME_PYTHON="" diff --git a/dev-util/buildbot/files/buildmaster.initd b/dev-util/buildbot/files/buildmaster.initd index 29fd444d123f..933c6e2b4e51 100644 --- a/dev-util/buildbot/files/buildmaster.initd +++ b/dev-util/buildbot/files/buildmaster.initd @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 extra_started_commands="reload" @@ -39,7 +39,7 @@ start() { ebegin "Starting buildmaster in ${BUILDMASTER_PATH}" start-stop-daemon --start -u "${USERNAME}" \ --pidfile "${BUILDMASTER_PATH}/buildmaster.pid" \ - --exec /usr/bin/python2 -- /usr/bin/twistd \ + --exec "${RUNTIME_PYTHON}" -- /usr/bin/twistd \ --no_save \ --logfile="${BUILDMASTER_PATH}/twistd.log" \ --pidfile="${BUILDMASTER_PATH}/buildmaster.pid" \ -- cgit v1.2.3