summaryrefslogtreecommitdiff
path: root/sys-apps/dstat
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-17 00:01:35 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-17 00:01:35 +0100
commit6c9dc10e04cd513437e046ccca0e51a3d6d4dc7c (patch)
treeb7183e321a607f857cc5c62cfbd5bae7cbfb3982 /sys-apps/dstat
parent66113e7871aede225d661473925cea4cce9e6d23 (diff)
gentoo auto-resync : 17:05:2024 - 00:01:35
Diffstat (limited to 'sys-apps/dstat')
-rw-r--r--sys-apps/dstat/Manifest2
-rw-r--r--sys-apps/dstat/dstat-0.7.4-r3.ebuild60
-rw-r--r--sys-apps/dstat/files/dstat-0.7.4-fix-backslash-in-regex.patch168
3 files changed, 230 insertions, 0 deletions
diff --git a/sys-apps/dstat/Manifest b/sys-apps/dstat/Manifest
index 6be4badba5b9..0ed6b25f5bad 100644
--- a/sys-apps/dstat/Manifest
+++ b/sys-apps/dstat/Manifest
@@ -1,6 +1,8 @@
+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 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 1303 BLAKE2B 805f06912ab8c9613ee79fd84b873c855dfb5f30ebbe48abd5c33f234cdfa659a15c040be214f823edc4c8ac12b40305b3000113c9c56f6552c4cacb0894213c SHA512 fdf775ee47d6cc6bae1353b494d156c1917f46f9b401f248abb60ca97051277c08238f6878a4600307adf8991905ff804d86d7ac8e80da45bdbbe9e176cf8121
+EBUILD dstat-0.7.4-r3.ebuild 1365 BLAKE2B 2b8dd78f6c4c93d3c4192bda3906872b92c8ed3f9a0e08ddf1c4cc2541ce6dae9d7ba9e962346446b6574cf2b94d3b1a4e540cd523e273e3a904ec1ac9c556b0 SHA512 ac4ffc495baf8ec84a394edd6f1dda52483371b85d395db7564183bcb08299d7ae3bb7cb1d9c09ceb7c29e42a0f53b75ca1f87691b226502d5e7b7122f8245f3
MISC metadata.xml 897 BLAKE2B 23501d288b9bd4cd5fbd432bcf441ea433156717f1f940407e2dc3c1e3b7a4858fb9002d794b1acd44a5549ad9a477f506a0ac2d5cd3ec94f6959ee76c6d142b SHA512 12c6151da673209b4d679df4e47d99dbe8163462d1410e4f2f177e944f944e72aea751b07c1d105b8f7e235928a4ea690cc140b41ebf58095677fca4c652ff23
diff --git a/sys-apps/dstat/dstat-0.7.4-r3.ebuild b/sys-apps/dstat/dstat-0.7.4-r3.ebuild
new file mode 100644
index 000000000000..a20659b9c3bd
--- /dev/null
+++ b/sys-apps/dstat/dstat-0.7.4-r3.ebuild
@@ -0,0 +1,60 @@
+# 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 ~ia64 ~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"
+)
+
+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-fix-backslash-in-regex.patch b/sys-apps/dstat/files/dstat-0.7.4-fix-backslash-in-regex.patch
new file mode 100644
index 000000000000..fbd6c836eb8f
--- /dev/null
+++ b/sys-apps/dstat/files/dstat-0.7.4-fix-backslash-in-regex.patch
@@ -0,0 +1,168 @@
+diff --git a/dstat b/dstat
+index 9359965..e26334a 100755
+--- a/dstat
++++ b/dstat
+@@ -755,7 +755,7 @@ class dstat_disk(dstat):
+ def __init__(self):
+ self.nick = ('read', 'writ')
+ self.type = 'b'
+- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
++ self.diskfilter = re.compile(r'^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
+ self.open('/proc/diskstats')
+ self.cols = 2
+
+@@ -841,7 +841,7 @@ class dstat_disk24(dstat):
+ def __init__(self):
+ self.nick = ('read', 'writ')
+ self.type = 'b'
+- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
++ self.diskfilter = re.compile(r'^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
+ self.open('/proc/partitions')
+ if self.fd and not self.discover:
+ raise Exception('Kernel has no per-partition I/O accounting [CONFIG_BLK_STATS], use at least 2.4.20')
+@@ -926,8 +926,8 @@ class dstat_disk24_old(dstat):
+ def __init__(self):
+ self.nick = ('read', 'writ')
+ self.type = 'b'
+- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
+- self.regexp = re.compile('^\((\d+),(\d+)\):\(\d+,\d+,(\d+),\d+,(\d+)\)$')
++ self.diskfilter = re.compile(r'^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
++ self.regexp = re.compile(r'^\((\d+),(\d+)\):\(\d+,\d+,(\d+),\d+,(\d+)\)$')
+ self.open('/proc/stat')
+ self.cols = 2
+
+@@ -1178,7 +1178,7 @@ class dstat_io(dstat):
+ self.type = 'f'
+ self.width = 5
+ self.scale = 1000
+- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
++ self.diskfilter = re.compile(r'^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
+ self.open('/proc/diskstats')
+ self.cols = 2
+
+@@ -1324,7 +1324,7 @@ class dstat_net(dstat):
+ def __init__(self):
+ self.nick = ('recv', 'send')
+ self.type = 'b'
+- self.totalfilter = re.compile('^(lo|bond\d+|face|.+\.\d+)$')
++ self.totalfilter = re.compile(r'^(lo|bond\d+|face|.+\.\d+)$')
+ self.open('/proc/net/dev')
+ self.cols = 2
+
+@@ -2329,7 +2329,7 @@ def getcpunr():
+
+ # Fallback 2
+ try:
+- search = re.compile('^cpu\d+')
++ search = re.compile(r'^cpu\d+')
+ cpunr = 0
+ for line in dopen('/proc/stat').readlines():
+ if search.match(line):
+@@ -2346,14 +2346,14 @@ def blockdevices():
+ ### FIXME: Add scsi support too and improve
+ def sysfs_dev(device):
+ "Convert sysfs device names into device names"
+- m = re.match('ide/host(\d)/bus(\d)/target(\d)/lun(\d)/disc', device)
++ m = re.match(r'ide/host(\d)/bus(\d)/target(\d)/lun(\d)/disc', device)
+ if m:
+ l = m.groups()
+ # ide/host0/bus0/target0/lun0/disc -> 0 -> hda
+ # ide/host0/bus1/target0/lun0/disc -> 2 -> hdc
+ nr = int(l[1]) * 2 + int(l[3])
+ return 'hd' + chr(ord('a') + nr)
+- m = re.match('cciss/(c\dd\d)', device)
++ m = re.match(r'cciss/(c\dd\d)', device)
+ if m:
+ l = m.groups()
+ return l[0]
+diff --git a/plugins/dstat_disk_avgqu.py b/plugins/dstat_disk_avgqu.py
+index 5da8d46..6cf283f 100644
+--- a/plugins/dstat_disk_avgqu.py
++++ b/plugins/dstat_disk_avgqu.py
+@@ -11,7 +11,7 @@ class dstat_plugin(dstat):
+ self.type = 'f'
+ self.width = 4
+ self.scale = 10
+- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
++ self.diskfilter = re.compile(r'^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
+ self.open('/proc/diskstats')
+ self.cols = 1
+ self.struct = dict( rq_ticks=0 )
+diff --git a/plugins/dstat_disk_avgrq.py b/plugins/dstat_disk_avgrq.py
+index 1f2cd20..be25e17 100644
+--- a/plugins/dstat_disk_avgrq.py
++++ b/plugins/dstat_disk_avgrq.py
+@@ -12,7 +12,7 @@ class dstat_plugin(dstat):
+ self.type = 'f'
+ self.width = 4
+ self.scale = 10
+- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
++ self.diskfilter = re.compile(r'^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
+ self.open('/proc/diskstats')
+ self.cols = 1
+ self.struct = dict( nr_ios=0, rd_sect=0, wr_sect=0 )
+diff --git a/plugins/dstat_disk_svctm.py b/plugins/dstat_disk_svctm.py
+index 7a9a0f1..c88f0e0 100644
+--- a/plugins/dstat_disk_svctm.py
++++ b/plugins/dstat_disk_svctm.py
+@@ -15,7 +15,7 @@ class dstat_plugin(dstat):
+ self.type = 'f'
+ self.width = 4
+ self.scale = 1
+- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
++ self.diskfilter = re.compile(r'^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
+ self.open('/proc/diskstats')
+ self.cols = 1
+ self.struct = dict( nr_ios=0, tot_ticks=0 )
+diff --git a/plugins/dstat_disk_tps.py b/plugins/dstat_disk_tps.py
+index b58dbe8..d2acd78 100644
+--- a/plugins/dstat_disk_tps.py
++++ b/plugins/dstat_disk_tps.py
+@@ -12,7 +12,7 @@ class dstat_plugin(dstat):
+ self.type = 'd'
+ self.width = 5
+ self.scale = 1000
+- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
++ self.diskfilter = re.compile(r'^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
+ self.open('/proc/diskstats')
+ self.cols = 2
+
+diff --git a/plugins/dstat_disk_util.py b/plugins/dstat_disk_util.py
+index 2632c09..e0b292b 100644
+--- a/plugins/dstat_disk_util.py
++++ b/plugins/dstat_disk_util.py
+@@ -14,7 +14,7 @@ class dstat_plugin(dstat):
+ self.type = 'f'
+ self.width = 4
+ self.scale = 34
+- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
++ self.diskfilter = re.compile(r'^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
+ self.open('/proc/diskstats')
+ self.cols = 1
+ self.struct = dict( tot_ticks=0 )
+diff --git a/plugins/dstat_disk_wait.py b/plugins/dstat_disk_wait.py
+index 2b320b2..3f8d331 100644
+--- a/plugins/dstat_disk_wait.py
++++ b/plugins/dstat_disk_wait.py
+@@ -13,7 +13,7 @@ class dstat_plugin(dstat):
+ self.type = 'f'
+ self.width = 4
+ self.scale = 1
+- self.diskfilter = re.compile('^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
++ self.diskfilter = re.compile(r'^([hsv]d[a-z]+\d+|cciss/c\d+d\d+p\d+|dm-\d+|md\d+|mmcblk\d+p\d0|VxVM\d+)$')
+ self.open('/proc/diskstats')
+ self.cols = 1
+ self.struct = dict( rd_ios=0, wr_ios=0, rd_ticks=0, wr_ticks=0 )
+diff --git a/plugins/dstat_net_packets.py b/plugins/dstat_net_packets.py
+index c3ef198..f7f34b7 100644
+--- a/plugins/dstat_net_packets.py
++++ b/plugins/dstat_net_packets.py
+@@ -10,7 +10,7 @@ class dstat_plugin(dstat):
+ self.type = 'd'
+ self.width = 5
+ self.scale = 1000
+- self.totalfilter = re.compile('^(lo|bond\d+|face|.+\.\d+)$')
++ self.totalfilter = re.compile(r'^(lo|bond\d+|face|.+\.\d+)$')
+ self.open('/proc/net/dev')
+ self.cols = 2
+