From 6abbf81ef2f298e3221ff5e67a1f3c5f23958212 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 14 Dec 2020 13:26:14 +0000 Subject: gentoo resync : 14.12.2020 --- app-admin/diamond/Manifest | 6 +- .../diamond/diamond-4.0.515.20170311-r1.ebuild | 102 +++++++++++++++++++++ app-admin/diamond/diamond-4.0.515.20170311.ebuild | 102 --------------------- .../diamond/diamond-4.0.515.20200620-r1.ebuild | 84 +++++++++++++++++ app-admin/diamond/diamond-4.0.515.20200620.ebuild | 84 ----------------- app-admin/diamond/files/diamond.initd | 5 +- 6 files changed, 193 insertions(+), 190 deletions(-) create mode 100644 app-admin/diamond/diamond-4.0.515.20170311-r1.ebuild delete mode 100644 app-admin/diamond/diamond-4.0.515.20170311.ebuild create mode 100644 app-admin/diamond/diamond-4.0.515.20200620-r1.ebuild delete mode 100644 app-admin/diamond/diamond-4.0.515.20200620.ebuild (limited to 'app-admin/diamond') diff --git a/app-admin/diamond/Manifest b/app-admin/diamond/Manifest index 1461074ab927..0db1d53b9e47 100644 --- a/app-admin/diamond/Manifest +++ b/app-admin/diamond/Manifest @@ -1,7 +1,7 @@ AUX diamond.confd 57 BLAKE2B 8a5e3f478d3eb948e262239a9a83026e067ed67f2a4878075c8ddb7d8d356a2482da0642e673b8b3f658de6c6f30a30c830bc68af3fe2d750b998dc896525942 SHA512 51b037902394b22f957a15ad1479ebdae5ac29384f2b7a5053ea8200bad05dc9c9060cc5c6c1a931e341e99b95327e55b06aaa9a828950533265f9c96a8dff55 -AUX diamond.initd 598 BLAKE2B fc754ce2a756dfe65222f4484e8c1e49c5c8392590809e3bd3384522dc83715a95b8d76d8ec28738cae050553af636f49cf54acb180485e4fad1a7484a5da000 SHA512 cb06aeb1bf0374e9e79b46b4ace6213978c8e49939aa989dbaa50069bab7c5069eb5c1d2f663515b9904f9465ad4ddbca43d3f29e762691d666c6cca70161e50 +AUX diamond.initd 659 BLAKE2B 945ab65f07091de300082518d57f7c479a2c29800c8813494f2e45babf030bec9dc11b640378bbfa1bd2445be498f03b14e1f30f6a814401db34e0733fcc44bd SHA512 c6a9e120ab4012335d75610dac60b2ea0c9bc3f3d8244f14caa0ee7b5c50f623e330dee580285de0ce4319c554d9f9996fbe07b9e35d1a3c30a14f57ef97ecc7 DIST python-diamond-4.0.515.20170311.tar.gz 671963 BLAKE2B 9449f2d27b48c0e24727eb2c415a5095b20199d9315ef69df92a4aa6f8f3397743f3dc6cf2d8d91f79eca309926731b6b42da170a02987a20aeccd1e0980f4ac SHA512 d18a80540018975455b839a78fd55d13d167726b92914e3dc2de1c6f27f47319962361e05961c55047ba185e11ebf57831f3ab5cff9158a50d30a2ca635d53bd DIST python-diamond-4.0.515.20200620.tar.gz 674623 BLAKE2B eaf290a18a79115fdc013addff5b9d5a5c5b5ce06989c7e3cb8ac5dd988f47878a893ae37a96d1f020dac1aff00ebe191bf27c3d19ac5625afd56cf79451a141 SHA512 5e43aa1bb7acbeaa80db2bbc8e956042104fa9364893b5149bcfa7bff3e00b3667a112243e7a1fad85c1fb1b0c2e2727d0f73fb6851c1959ac95c1854b0c0f76 -EBUILD diamond-4.0.515.20170311.ebuild 2930 BLAKE2B 367260bba34e5ce64c5b1070ad2daa3c9a21fa76286a4d62b7452475f7f899f3b41efd101187439767ee9782c9b679a3263141a07681ed4c857b589204623a8e SHA512 07e79c270f6c987dda3d2bb4e98ad848b46b43964118fdb6878a278f0ca6bf43a21b965ad59f2032004a16bfcca1da7f23ebf91354f552915d4565e6f4989e3b -EBUILD diamond-4.0.515.20200620.ebuild 2395 BLAKE2B a6424ab9ac1ff2f1cd8a4c69beabbb8534d0a3ccdbc44fb9f822cb36b7af12bb6406af382d7e4eea6fae794785674dc39cfe6a12e8578f1562b7c035b5e0c20c SHA512 576d410ed4475bda3ae2dbeaa529283e08780124d5e040856418bbba8d202f23d38a1691bb22a0c5b208720e30d1736dc669459a58eb483f926b19182889232e +EBUILD diamond-4.0.515.20170311-r1.ebuild 2930 BLAKE2B 367260bba34e5ce64c5b1070ad2daa3c9a21fa76286a4d62b7452475f7f899f3b41efd101187439767ee9782c9b679a3263141a07681ed4c857b589204623a8e SHA512 07e79c270f6c987dda3d2bb4e98ad848b46b43964118fdb6878a278f0ca6bf43a21b965ad59f2032004a16bfcca1da7f23ebf91354f552915d4565e6f4989e3b +EBUILD diamond-4.0.515.20200620-r1.ebuild 2395 BLAKE2B a6424ab9ac1ff2f1cd8a4c69beabbb8534d0a3ccdbc44fb9f822cb36b7af12bb6406af382d7e4eea6fae794785674dc39cfe6a12e8578f1562b7c035b5e0c20c SHA512 576d410ed4475bda3ae2dbeaa529283e08780124d5e040856418bbba8d202f23d38a1691bb22a0c5b208720e30d1736dc669459a58eb483f926b19182889232e MISC metadata.xml 802 BLAKE2B d013e1b87c2f1d5f0f628766ed754a4ac50e9c9e710b7b2542081cd06988f7f577513a53165c54ff4d1d1de3bba92ec2089eaa15d16cbe946f7489d0345aeaaa SHA512 c455baa068661000d395e15f6952b3106cb3633f1a95395745c6a0d7cc5dbfb193d018af1341f27b250226bdc109e961bda4a612115d5805958f8e500108239a diff --git a/app-admin/diamond/diamond-4.0.515.20170311-r1.ebuild b/app-admin/diamond/diamond-4.0.515.20170311-r1.ebuild new file mode 100644 index 000000000000..80dbc4734ecc --- /dev/null +++ b/app-admin/diamond/diamond-4.0.515.20170311-r1.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +if [[ ${PV} = 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/python-diamond/Diamond.git" + S=${WORKDIR}/diamond-${PV} +else + GHASH=73207d04e0739a4ce92bc201b36681c42d9fa7e7 # python3 branch + SRC_URI="https://github.com/python-diamond/Diamond/archive/${GHASH}.tar.gz -> python-diamond-${PV}.tar.gz" + KEYWORDS="amd64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + S=${WORKDIR}/Diamond-${GHASH} +fi + +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit distutils-r1 prefix + +DESCRIPTION="Python daemon that collects and publishes system metrics" +HOMEPAGE="https://github.com/python-diamond/Diamond" + +LICENSE="MIT" +SLOT="0" +IUSE="test mongo mysql snmp redis" +RESTRICT="!test? ( test )" + +RDEPEND="dev-python/configobj + dev-python/setproctitle + mongo? ( dev-python/pymongo ) + mysql? ( dev-python/mysqlclient ) + snmp? ( dev-python/pysnmp ) + redis? ( dev-python/redis-py ) + !kernel_linux? ( >=dev-python/psutil-3 )" +DEPEND="${RDEPEND} + test? ( + dev-python/mock + dev-python/pysnmp + )" + +src_prepare() { + # adjust for Prefix + hprefixify bin/diamond* + + # fix the version (not set in GitHub archive) + sed -i -e "s/__VERSIONTOKENHERE__/${PV}/" src/diamond/version.py.tmpl || die + echo "${PV}" > version.txt || die + # fix psutil usage + sed -i -e 's/psutil\.network_io_counters/psutil.net_io_counters/' \ + src/collectors/network/network.py || die + # fix symlink out of place + rm README.md || die + cp docs/index.md README.md || die + + # this module isn't Python3 yet (lambda), if you use this and have a + # fix, let me know + rm src/diamond/handler/rrdtool.py || die + + # forgotten conversion + sed -i \ + -e 's/import Queue/import queue/' \ + -e 's/Queue\.Full/queue.Full/' \ + src/diamond/handler/queue.py || die + # fix usage of map as list + sed -i \ + -e '/paths = map(str.strip, paths)/d' \ + src/diamond/utils/classes.py || die + # send data as bytes + sed -i \ + -e '/self.socket.sendall/s/data/str.encode(data)/' \ + src/diamond/handler/graphite.py || die + + distutils-r1_src_prepare +} + +python_test() { + # don't want to depend on docker for just this + mv src/collectors/docker_collector/test/{test,no}docker_collector.py || die + # fails on binding ports + mv src/collectors/portstat/tests/{test,no}_portstat.py || die + "${PYTHON}" ./test.py || die "Tests fail with ${PYTHON}" +} + +python_install() { + export VIRTUAL_ENV=1 + distutils-r1_python_install + python_optimize + mv "${ED}"/usr/etc "${ED}"/ || die + rm "${ED}"/etc/diamond/*.windows # won't need these + sed -i \ + -e '/pid_file =/s:/var/run:/run:' \ + "${ED}"/etc/diamond/diamond.conf.example || die + hprefixify "${ED}"/etc/diamond/diamond.conf.example +} + +src_install() { + distutils-r1_src_install + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + keepdir /var/log/diamond +} diff --git a/app-admin/diamond/diamond-4.0.515.20170311.ebuild b/app-admin/diamond/diamond-4.0.515.20170311.ebuild deleted file mode 100644 index 80dbc4734ecc..000000000000 --- a/app-admin/diamond/diamond-4.0.515.20170311.ebuild +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -if [[ ${PV} = 9999* ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/python-diamond/Diamond.git" - S=${WORKDIR}/diamond-${PV} -else - GHASH=73207d04e0739a4ce92bc201b36681c42d9fa7e7 # python3 branch - SRC_URI="https://github.com/python-diamond/Diamond/archive/${GHASH}.tar.gz -> python-diamond-${PV}.tar.gz" - KEYWORDS="amd64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - S=${WORKDIR}/Diamond-${GHASH} -fi - -PYTHON_COMPAT=( python3_{6,7,8} ) - -inherit distutils-r1 prefix - -DESCRIPTION="Python daemon that collects and publishes system metrics" -HOMEPAGE="https://github.com/python-diamond/Diamond" - -LICENSE="MIT" -SLOT="0" -IUSE="test mongo mysql snmp redis" -RESTRICT="!test? ( test )" - -RDEPEND="dev-python/configobj - dev-python/setproctitle - mongo? ( dev-python/pymongo ) - mysql? ( dev-python/mysqlclient ) - snmp? ( dev-python/pysnmp ) - redis? ( dev-python/redis-py ) - !kernel_linux? ( >=dev-python/psutil-3 )" -DEPEND="${RDEPEND} - test? ( - dev-python/mock - dev-python/pysnmp - )" - -src_prepare() { - # adjust for Prefix - hprefixify bin/diamond* - - # fix the version (not set in GitHub archive) - sed -i -e "s/__VERSIONTOKENHERE__/${PV}/" src/diamond/version.py.tmpl || die - echo "${PV}" > version.txt || die - # fix psutil usage - sed -i -e 's/psutil\.network_io_counters/psutil.net_io_counters/' \ - src/collectors/network/network.py || die - # fix symlink out of place - rm README.md || die - cp docs/index.md README.md || die - - # this module isn't Python3 yet (lambda), if you use this and have a - # fix, let me know - rm src/diamond/handler/rrdtool.py || die - - # forgotten conversion - sed -i \ - -e 's/import Queue/import queue/' \ - -e 's/Queue\.Full/queue.Full/' \ - src/diamond/handler/queue.py || die - # fix usage of map as list - sed -i \ - -e '/paths = map(str.strip, paths)/d' \ - src/diamond/utils/classes.py || die - # send data as bytes - sed -i \ - -e '/self.socket.sendall/s/data/str.encode(data)/' \ - src/diamond/handler/graphite.py || die - - distutils-r1_src_prepare -} - -python_test() { - # don't want to depend on docker for just this - mv src/collectors/docker_collector/test/{test,no}docker_collector.py || die - # fails on binding ports - mv src/collectors/portstat/tests/{test,no}_portstat.py || die - "${PYTHON}" ./test.py || die "Tests fail with ${PYTHON}" -} - -python_install() { - export VIRTUAL_ENV=1 - distutils-r1_python_install - python_optimize - mv "${ED}"/usr/etc "${ED}"/ || die - rm "${ED}"/etc/diamond/*.windows # won't need these - sed -i \ - -e '/pid_file =/s:/var/run:/run:' \ - "${ED}"/etc/diamond/diamond.conf.example || die - hprefixify "${ED}"/etc/diamond/diamond.conf.example -} - -src_install() { - distutils-r1_src_install - newinitd "${FILESDIR}"/${PN}.initd ${PN} - newconfd "${FILESDIR}"/${PN}.confd ${PN} - keepdir /var/log/diamond -} diff --git a/app-admin/diamond/diamond-4.0.515.20200620-r1.ebuild b/app-admin/diamond/diamond-4.0.515.20200620-r1.ebuild new file mode 100644 index 000000000000..938b0d14ce90 --- /dev/null +++ b/app-admin/diamond/diamond-4.0.515.20200620-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +if [[ ${PV} = 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/grobian/Diamond.git" + EGIT_BRANCH="python3" + S=${WORKDIR}/diamond-${PV} +else + GHASH=8d8a2e49d80d44968a34d43e36c1d864695a29c1 # from python3 branch + SRC_URI="https://github.com/grobian/Diamond/archive/${GHASH}.tar.gz -> python-diamond-${PV}.tar.gz" + KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + S=${WORKDIR}/Diamond-${GHASH} +fi + +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit distutils-r1 prefix + +DESCRIPTION="Python daemon that collects and publishes system metrics" +HOMEPAGE="https://github.com/python-diamond/Diamond" + +LICENSE="MIT" +SLOT="0" +IUSE="test mongo mysql snmp redis" +RESTRICT="!test? ( test )" + +RDEPEND="dev-python/configobj + dev-python/setproctitle + mongo? ( dev-python/pymongo ) + mysql? ( dev-python/mysqlclient ) + snmp? ( dev-python/pysnmp ) + redis? ( dev-python/redis-py ) + !kernel_linux? ( >=dev-python/psutil-3 ) + kernel_linux? ( sys-process/psmisc )" +DEPEND="${RDEPEND} + test? ( dev-python/mock )" + +src_prepare() { + # adjust for Prefix + hprefixify bin/diamond* + + # fix the version (not set in GitHub archive) + sed -i -e "s/__VERSIONTOKENHERE__/${PV}/" src/diamond/version.py.tmpl || die + echo "${PV}" > version.txt || die + # fix symlink out of place + rm README.md || die + cp docs/index.md README.md || die + + # this module isn't Python3 yet (lambda), if you use this and have a + # fix, let me know + rm src/diamond/handler/rrdtool.py || die + + distutils-r1_src_prepare +} + +python_test() { + "${PYTHON}" ./test.py || die "Tests fail with ${PYTHON}" +} + +python_install() { + export VIRTUAL_ENV=1 + distutils-r1_python_install + python_optimize + # since python3.8 installation goes straight into /etc + [[ -d ${ED}/etc ]] && [[ -d ${ED}/usr/etc ]] && rm -Rf "${ED}"/usr/etc + if [[ -d ${ED}/usr/etc ]] ; then + mv "${ED}"/usr/etc "${ED}"/ || die + fi + rm "${ED}"/etc/diamond/*.windows # won't need these + sed -i \ + -e '/pid_file =/s:/var/run:/run:' \ + "${ED}"/etc/diamond/diamond.conf.example || die + hprefixify "${ED}"/etc/diamond/diamond.conf.example +} + +src_install() { + distutils-r1_src_install + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + keepdir /var/log/diamond +} diff --git a/app-admin/diamond/diamond-4.0.515.20200620.ebuild b/app-admin/diamond/diamond-4.0.515.20200620.ebuild deleted file mode 100644 index 938b0d14ce90..000000000000 --- a/app-admin/diamond/diamond-4.0.515.20200620.ebuild +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -if [[ ${PV} = 9999* ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/grobian/Diamond.git" - EGIT_BRANCH="python3" - S=${WORKDIR}/diamond-${PV} -else - GHASH=8d8a2e49d80d44968a34d43e36c1d864695a29c1 # from python3 branch - SRC_URI="https://github.com/grobian/Diamond/archive/${GHASH}.tar.gz -> python-diamond-${PV}.tar.gz" - KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" - S=${WORKDIR}/Diamond-${GHASH} -fi - -PYTHON_COMPAT=( python3_{6,7,8} ) - -inherit distutils-r1 prefix - -DESCRIPTION="Python daemon that collects and publishes system metrics" -HOMEPAGE="https://github.com/python-diamond/Diamond" - -LICENSE="MIT" -SLOT="0" -IUSE="test mongo mysql snmp redis" -RESTRICT="!test? ( test )" - -RDEPEND="dev-python/configobj - dev-python/setproctitle - mongo? ( dev-python/pymongo ) - mysql? ( dev-python/mysqlclient ) - snmp? ( dev-python/pysnmp ) - redis? ( dev-python/redis-py ) - !kernel_linux? ( >=dev-python/psutil-3 ) - kernel_linux? ( sys-process/psmisc )" -DEPEND="${RDEPEND} - test? ( dev-python/mock )" - -src_prepare() { - # adjust for Prefix - hprefixify bin/diamond* - - # fix the version (not set in GitHub archive) - sed -i -e "s/__VERSIONTOKENHERE__/${PV}/" src/diamond/version.py.tmpl || die - echo "${PV}" > version.txt || die - # fix symlink out of place - rm README.md || die - cp docs/index.md README.md || die - - # this module isn't Python3 yet (lambda), if you use this and have a - # fix, let me know - rm src/diamond/handler/rrdtool.py || die - - distutils-r1_src_prepare -} - -python_test() { - "${PYTHON}" ./test.py || die "Tests fail with ${PYTHON}" -} - -python_install() { - export VIRTUAL_ENV=1 - distutils-r1_python_install - python_optimize - # since python3.8 installation goes straight into /etc - [[ -d ${ED}/etc ]] && [[ -d ${ED}/usr/etc ]] && rm -Rf "${ED}"/usr/etc - if [[ -d ${ED}/usr/etc ]] ; then - mv "${ED}"/usr/etc "${ED}"/ || die - fi - rm "${ED}"/etc/diamond/*.windows # won't need these - sed -i \ - -e '/pid_file =/s:/var/run:/run:' \ - "${ED}"/etc/diamond/diamond.conf.example || die - hprefixify "${ED}"/etc/diamond/diamond.conf.example -} - -src_install() { - distutils-r1_src_install - newinitd "${FILESDIR}"/${PN}.initd ${PN} - newconfd "${FILESDIR}"/${PN}.confd ${PN} - keepdir /var/log/diamond -} diff --git a/app-admin/diamond/files/diamond.initd b/app-admin/diamond/files/diamond.initd index a2383fd31875..f9b829488c79 100644 --- a/app-admin/diamond/files/diamond.initd +++ b/app-admin/diamond/files/diamond.initd @@ -16,6 +16,9 @@ stop() { ebegin "Stopping ${SVCNAME}" #start-stop-daemon --stop -R 80 --pidfile /run/${SVCNAME}.pid # diamond doesn't kill its children, so work around that for now - pstree -Tp `cat /run/${SVCNAME}.pid` | grep -o '([0-9]\+)' | tr '()' ' ' | xargs kill + pid=$(< /run/${SVCNAME}.pid) + if [ -n ${pid} ] && [ ${pid} -gt 1 ] ; then + pstree -Tp ${pid} | grep -o '([0-9]\+)' | tr '()' ' ' | xargs kill + fi eend $? } -- cgit v1.2.3