summaryrefslogtreecommitdiff
path: root/sys-apps/dstat
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-02 02:07:07 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-02 02:07:07 +0000
commitd4f65848c7ecabb56e2f93889cbd20078cd347f7 (patch)
tree180032f5afeb689db6a270d612f3e3364ed8fd2b /sys-apps/dstat
parentc635a4b7ddb6105bfc6fef130b188a087726677b (diff)
gentoo auto-resync : 02:12:2024 - 02:07:07
Diffstat (limited to 'sys-apps/dstat')
-rw-r--r--sys-apps/dstat/Manifest2
-rw-r--r--sys-apps/dstat/dstat-0.7.4-r4.ebuild61
-rw-r--r--sys-apps/dstat/files/dstat-0.7.4-use-importlib.patch37
3 files changed, 100 insertions, 0 deletions
diff --git a/sys-apps/dstat/Manifest b/sys-apps/dstat/Manifest
index c03d06f59ac5..a17275252cc1 100644
--- a/sys-apps/dstat/Manifest
+++ b/sys-apps/dstat/Manifest
@@ -1,8 +1,10 @@
AUX dstat-0.7.4-fix-backslash-in-regex.patch 7599 BLAKE2B 558ce4d122f5fa2530f05c79b360e9f5d72a03f9db42f03307f4f379ae1b467d2fa41fe088215a05175566e621a67e0f34630ec1ad1ace0e0fd948493620de0b SHA512 13cbfe76246113b12bd4aae50a074197c9cb7a000bcd92150267a01420b41070cd73bf6c1105b881daf1d647c3d50e8b33c3d3dd16b4e3cbc677eaf83365a724
AUX dstat-0.7.4-fix-csv-output.patch 888 BLAKE2B 6aa25d7b7c2fed6986be55bf5802692ca6fd9d982d9b0a819983fbff3745c5aaf12667bd0e5cd2e385c8f4583273feff2744ba015b04fe1c8545b388ab828dc4 SHA512 4e68c320983c5e1851dcf6e51d2d0e1de92e084310fb650f0bf7ddae68d6b923f9a013003ca91f98f513e9ae135c1800582f214d70f65f5e8b5809e9bda6600a
AUX dstat-0.7.4-skip-non-sandbox-tests.patch 661 BLAKE2B 31f98e58c8f23e3b6322de86bdddb83afa22b0b8bed48164378c6c071348ac2a37350b789985634017c1e338ceb73d7f9221d99e0b8b4b4d550f10d7840bde76 SHA512 0087d7fa2ce9388440bacdac52038433c1a7f0c5fd885027a4b18895c8f450cc7cae7610e6232e26393749f1b165c4ade5ee2a0e453c7e2542450f5a3d3100ac
+AUX dstat-0.7.4-use-importlib.patch 1694 BLAKE2B d947f1ccc881bbdfa362cf910f06244dc36a7a45d4633caa5903dcd8ea4af9b8cab88825693da1af08e036cd898233657766e3632d722eca37615bf9e82cd048 SHA512 bc6a792c0c2fe6a3e679ca5b3d2a7cbd525cb363d65d61bd1358d85e4b2a3eaae2accb501b31d2c706b1db3c2e77477c6a73a1ed6f76df30e90acb0f8db9e8ad
AUX fix-collections-deprecation-warning.patch 899 BLAKE2B ec02bf38b8c40f8f018ba6da523da24f9215dfd7c967dbfc2384ea16ab9b01489a7d69cd99d81ddb1222e75e6d070e40d435e1d12ad8ea2961e447721d9656bc SHA512 4164f61a1ef97f2a4962f84138305b68cdbc9fcc5c639fade7b580c9f9904d592af9e05982536cd2bea5581c30696a0308dedbe6f739f0094c319bc85d547fea
DIST dstat-0.7.4.tar.gz 139992 BLAKE2B c8226358956687a4f64e248ef539b431b9e394e87986366f9941df2e86f0dac3032261ec2ca9c816d3bc89afabc352bc8bc80f9ad3eaa6118fd16bd7b0f1e68e SHA512 d100223887ebd83d0fd1259436f39419a85df9002556abcfc8e4195aa63be73d85707dcd5c4fb56a979b29131485dce6e97c177fbfca08dc50bd0f92b15cc6f5
EBUILD dstat-0.7.4-r2.ebuild 1297 BLAKE2B 19e140fe41e06dc45a162394fd7db521f87133fab7b5277734c60f8c6ecb8323f867dccbfd7007cfff443edee150f2ef8b41f0d2a8f2a961b5a64bbdb1a329c7 SHA512 98f5cbce096844754bcac169e722b7f8e5ae77610c2f29a7880cf633eaad08cfa1869529f68bd9c665a51304cbdf16d3fb2a8d73f35fadd92979f3712f76f8c5
EBUILD dstat-0.7.4-r3.ebuild 1354 BLAKE2B 4e74ec6ea070626f300c6fdb5bb0e672cc01b1a4edc126b34df50c478aaf46e03403827c064ac48155da852478a82538db382c8c5611b4764725f447a3dcef85 SHA512 dad52e37666398c5f8284dccd6c42de29f23895e61b16d6ac91cc98179e89c3a1182ed92ee8297c68b013c6564564840ff04a6d64c8c6e30f4e9da9bf664f5e8
+EBUILD dstat-0.7.4-r4.ebuild 1401 BLAKE2B a5ffe3995a8a472f0222d0cb32015558fd7b386547862a394f2c661a184d12f77a250df03f16d5d7a90cd4e80c78a76adbc92eefbdf3766bd58ab2acdfb39fd6 SHA512 aadb40c3d6f5b43794ae8a734b54f758296a43d316183aa1973812988b13e3e7b43c8a52bb525f228b54a14d64beb4a12d4559e1c7a7ba2fed54f707c1654aa5
MISC metadata.xml 897 BLAKE2B 23501d288b9bd4cd5fbd432bcf441ea433156717f1f940407e2dc3c1e3b7a4858fb9002d794b1acd44a5549ad9a477f506a0ac2d5cd3ec94f6959ee76c6d142b SHA512 12c6151da673209b4d679df4e47d99dbe8163462d1410e4f2f177e944f944e72aea751b07c1d105b8f7e235928a4ea690cc140b41ebf58095677fca4c652ff23
diff --git a/sys-apps/dstat/dstat-0.7.4-r4.ebuild b/sys-apps/dstat/dstat-0.7.4-r4.ebuild
new file mode 100644
index 000000000000..d0c6bd489b80
--- /dev/null
+++ b/sys-apps/dstat/dstat-0.7.4-r4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit python-r1
+
+DESCRIPTION="Versatile replacement for vmstat, iostat and ifstat"
+HOMEPAGE="http://dag.wieers.com/home-made/dstat/"
+SRC_URI="https://github.com/dagwieers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm64 ~hppa ~mips ppc ppc64 sparc x86 ~x86-linux"
+IUSE="doc examples"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-python/six[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/dstat-${PV}-skip-non-sandbox-tests.patch"
+ "${FILESDIR}/fix-collections-deprecation-warning.patch"
+ "${FILESDIR}/dstat-0.7.4-fix-csv-output.patch"
+ "${FILESDIR}/dstat-${PV}-fix-backslash-in-regex.patch"
+ "${FILESDIR}/dstat-${PV}-use-importlib.patch"
+)
+
+src_prepare() {
+ # bug fix: allow delay to be specified
+ # backport from: https://github.com/dagwieers/dstat/pull/167/files
+ sed -e 's; / op\.delay; // op.delay;' -i "dstat" || die
+
+ default
+}
+
+src_test() {
+ python_foreach_impl emake test
+}
+
+src_install() {
+ python_foreach_impl python_doscript dstat
+
+ insinto /usr/share/dstat
+ newins dstat dstat.py
+ doins plugins/dstat_*.py
+
+ doman docs/dstat.1
+
+ einstalldocs
+
+ if use examples; then
+ dodoc examples/{mstat,read}.py
+ fi
+ if use doc; then
+ dodoc docs/*.html
+ fi
+}
diff --git a/sys-apps/dstat/files/dstat-0.7.4-use-importlib.patch b/sys-apps/dstat/files/dstat-0.7.4-use-importlib.patch
new file mode 100644
index 000000000000..a6650ff1b37b
--- /dev/null
+++ b/sys-apps/dstat/files/dstat-0.7.4-use-importlib.patch
@@ -0,0 +1,37 @@
+diff --git a/dstat b/dstat
+index 9359965..541fe95 100755
+--- a/dstat
++++ b/dstat
+@@ -2613,28 +2613,19 @@ def main():
+ pluginfile = 'dstat_' + mod.replace('-', '_')
+ try:
+ if pluginfile not in globals():
+- import imp
+- fp, pathname, description = imp.find_module(pluginfile, pluginpath)
+- fp.close()
++ import importlib.machinery
++ spec = importlib.machinery.PathFinder().find_spec(pluginfile, pluginpath)
+
+ ### TODO: Would using .pyc help with anything ?
+ ### Try loading python plugin
+- if description[0] in ('.py', ):
+- exec(open(pathname).read())
++ if spec.origin.endswith('.py'):
++ exec(open(spec.origin).read())
+ #execfile(pathname)
+ exec('global plug; plug = dstat_plugin(); del(dstat_plugin)')
+ plug.filename = pluginfile
+ plug.check()
+ plug.prepare()
+
+- ### Try loading C plugin (not functional yet)
+- elif description[0] == '.so':
+- exec('import %s; global plug; plug = %s.new()' % (pluginfile, pluginfile))
+- plug.check()
+- plug.prepare()
+-# print(dir(plug))
+-# print(plug.__module__)
+-# print(plug.name)
+ else:
+ print('Module %s is of unknown type.' % pluginfile, file=sys.stderr)
+