From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7E8F41382C5 for ; Sat, 20 Jun 2020 10:19:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AAD07E082D; Sat, 20 Jun 2020 10:19:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7A4B0E082D for ; Sat, 20 Jun 2020 10:19:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2C85234F1CD for ; Sat, 20 Jun 2020 10:19:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C23022A1 for ; Sat, 20 Jun 2020 10:18:58 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1592648330.c23bbb8110ac12e0ba8427a16b548894d33f20ae.grobian@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/diamond/files/, app-admin/diamond/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-admin/diamond/Manifest app-admin/diamond/diamond-4.0.515.20200620.ebuild app-admin/diamond/files/diamond.initd X-VCS-Directories: app-admin/diamond/files/ app-admin/diamond/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: c23bbb8110ac12e0ba8427a16b548894d33f20ae X-VCS-Branch: master Date: Sat, 20 Jun 2020 10:18:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 7b8e3277-0b0b-4640-81fb-ebbb568c300e X-Archives-Hash: 68c50660f902c1d0ae2841f8a819568b commit: c23bbb8110ac12e0ba8427a16b548894d33f20ae Author: Fabian Groffen gentoo org> AuthorDate: Sat Jun 20 10:18:38 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Jun 20 10:18:50 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c23bbb81 app-admin/diamond-4.0.515.20200620: version bump Closes: https://bugs.gentoo.org/710192 Closes: https://bugs.gentoo.org/727336 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Fabian Groffen gentoo.org> app-admin/diamond/Manifest | 1 + app-admin/diamond/diamond-4.0.515.20200620.ebuild | 80 +++++++++++++++++++++++ app-admin/diamond/files/diamond.initd | 6 +- 3 files changed, 85 insertions(+), 2 deletions(-) diff --git a/app-admin/diamond/Manifest b/app-admin/diamond/Manifest index a9335d45de4..1a7c1f5d2b7 100644 --- a/app-admin/diamond/Manifest +++ b/app-admin/diamond/Manifest @@ -1 +1,2 @@ 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 diff --git a/app-admin/diamond/diamond-4.0.515.20200620.ebuild b/app-admin/diamond/diamond-4.0.515.20200620.ebuild new file mode 100644 index 00000000000..919e6495593 --- /dev/null +++ b/app-admin/diamond/diamond-4.0.515.20200620.ebuild @@ -0,0 +1,80 @@ +# 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 ~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 + 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/files/diamond.initd b/app-admin/diamond/files/diamond.initd index 168b175a788..a2383fd3187 100644 --- a/app-admin/diamond/files/diamond.initd +++ b/app-admin/diamond/files/diamond.initd @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 depend() { @@ -14,6 +14,8 @@ start() { stop() { ebegin "Stopping ${SVCNAME}" - start-stop-daemon --stop -R 80 --pidfile /run/${SVCNAME}.pid + #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 eend $? }