summaryrefslogtreecommitdiff
path: root/sys-process/iotop
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-03-03 13:42:34 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-03-03 13:42:34 +0000
commit066d27181e9a797ad9f8fc43b49fc9a10ff2f707 (patch)
tree3cb05783d73b2c33589ba305144a31c718e123cd /sys-process/iotop
parent16449a80e28af2209916cc66d19c9a44ca2b90d9 (diff)
gentoo resync : 03.03.2019
Diffstat (limited to 'sys-process/iotop')
-rw-r--r--sys-process/iotop/Manifest5
-rw-r--r--sys-process/iotop/files/iotop-0.6-Actually-skip-invalid-lines-in-proc-status.patch26
-rw-r--r--sys-process/iotop/files/iotop-0.6-Ignore-invalid-lines-in-proc-status-files.patch64
-rw-r--r--sys-process/iotop/files/iotop-0.6-Only-split-proc-status-lines-on-the-character.patch31
-rw-r--r--sys-process/iotop/iotop-0.6.ebuild7
5 files changed, 131 insertions, 2 deletions
diff --git a/sys-process/iotop/Manifest b/sys-process/iotop/Manifest
index 8ce499eea408..485afc3dee8f 100644
--- a/sys-process/iotop/Manifest
+++ b/sys-process/iotop/Manifest
@@ -1,4 +1,7 @@
+AUX iotop-0.6-Actually-skip-invalid-lines-in-proc-status.patch 896 BLAKE2B 854d249c2d9308d2fc5cb2371d402ea7ddeff04af378e909616d920a45aa2f4409e6a15c9c8e261d192f580b22c8e51190d3abeaf9bbe68c5a6d196f65c2b5df SHA512 15efbc86ceefa464aa315baf6f43188003788e8507c6d614ef00557da3fe280c77fdc368347d8e4389423d3d9797346a6e602282229c93229717bf6cd6784de7
+AUX iotop-0.6-Ignore-invalid-lines-in-proc-status-files.patch 2826 BLAKE2B bef789782f496e840cc89be232399d495b3e77886b031c6ccdc78ecc71cdcb8585fe39a9164b2eeee6219f62bf97a7038f48a60de66529cd8bd5fd0c0ccceafa SHA512 ff09ac51be530f6d1f5b21101c2a501563afb021f943c74f7965fd9a8ee35a1dfb6842b1055fc3afdf8c2b5533a4a49ad5b12d24ce12c605a581db30d1e62437
+AUX iotop-0.6-Only-split-proc-status-lines-on-the-character.patch 984 BLAKE2B c43a4feaa7293b86454a96aaddbbc3c40c6a2afc2656448cc899230abc479d702adbc5785a818754214f7524bc499f4699ac1c841b7753601c9bcd89771440ec SHA512 291ed55dcebd988e0819f28805f12392bfff3ea0686cddebdb9bec8042f981c2d94c7ac3f8d9a4ba5e8611686129c47347bd1a9484ce82a2687c651007efb937
AUX iotop-0.6-setup.py3.patch 1151 BLAKE2B da00d36a1778173e2d77041fec584aa1ff42062932915ff2a6beb9aaeda0699fdb6a6c9903eee56e10efb9ed9d6def08a8d7fbbe714def4e8bff4504500aa55e SHA512 6b97da5ef9e78c268193ce0270328f4c4d99d30f532fe68dac9bd033bb0a5e6cdb3145b53a7670c7babdae7f170473d1f9eb23137b5950fdaceadde266b4bb73
DIST iotop-0.6.tar.bz2 29779 BLAKE2B 6c979f7beef4e9ec6536eb5ec113ab7089ccb0b8b00dfca6181408390584dac0eae18b110c3f4837a25defd7ab2c2e9d79f1f5cad762f97519e94847951f0037 SHA512 b1047da3bc46604447cc8ab22442a3a5381e1a79a6b176fe9ee8402ee5cebb959205407a6aeaffccccde9d2f67624ff8ee6717b051838f13ab88bf3a16db3ab9
-EBUILD iotop-0.6.ebuild 723 BLAKE2B 1a0cf691eece2d5a345aa295f0458fcb368b97be399f3e204a02aff288c0147adec7ce1b9c5ce0ad01dc68a722d77fb8fa05cb337f54e65d7219d6031dcea950 SHA512 e95470cf93d36ed84240a77e813b8c4148d3c687f362d37a6c1891ee9a524b7f1e05231e83c3d9f15e8ce5cf35da58d61a5caa395b1ae86f495d11b36e52a295
+EBUILD iotop-0.6.ebuild 933 BLAKE2B a086ea6fb3f45e68c97954eb233696b7262d40b54a5094f95c7045b398286b180416fca68f61b3344e4f1d971e5ec2e8f86c9bc1eb9193ad8f526a9ed4a98825 SHA512 53062f4a427549a5c8d6d802f942a984fefe010e941a7321001b230ce65e816ceae644ebea18a0c2437f2ba27626ec9a92c2240052337fa326a913226ee08a4f
MISC metadata.xml 359 BLAKE2B d2fa2d7b93eeb82a5494f0c92270a512083e71b60699ebdd9b860560796b21e94e77be8c5af0dcd4533bc3b6a4bc173d72cef1d5da736f7b948c83982ef91489 SHA512 12f1f2e8971ea7d83248c637e6128be106087f733af8625fea8dd7ad9c891ef38ea0eda8ed7f6cfe96a4c0b795a799c1b51301e0ae424898c413a354305c7852
diff --git a/sys-process/iotop/files/iotop-0.6-Actually-skip-invalid-lines-in-proc-status.patch b/sys-process/iotop/files/iotop-0.6-Actually-skip-invalid-lines-in-proc-status.patch
new file mode 100644
index 000000000000..9dc89bfb6f33
--- /dev/null
+++ b/sys-process/iotop/files/iotop-0.6-Actually-skip-invalid-lines-in-proc-status.patch
@@ -0,0 +1,26 @@
+From 7c51ce0e29bd135c216f18e18f0c4ab769af0d6f Mon Sep 17 00:00:00 2001
+From: Paul Wise <pabs3@bonedaddy.net>
+Date: Fri, 25 May 2018 15:20:44 +0800
+Subject: [PATCH 2/2] Actually skip invalid lines in /proc/*/status
+
+Fixes: commit 0392b205b5c3973a326721c2e9f97f0fa2eefa82
+---
+ iotop/data.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/iotop/data.py b/iotop/data.py
+index e0387f0..3874974 100644
+--- a/iotop/data.py
++++ b/iotop/data.py
+@@ -214,7 +214,7 @@ def parse_proc_pid_status(pid):
+ # Ignore lines that are not formatted correctly as
+ # some downstream kernels may have weird lines and
+ # the needed fields are probably formatted correctly.
+- pass
++ continue
+ result_dict[key] = value.strip()
+ except IOError:
+ pass # No such process
+--
+2.20.1.97.g81188d93c3-goog
+
diff --git a/sys-process/iotop/files/iotop-0.6-Ignore-invalid-lines-in-proc-status-files.patch b/sys-process/iotop/files/iotop-0.6-Ignore-invalid-lines-in-proc-status-files.patch
new file mode 100644
index 000000000000..df46caf4ce11
--- /dev/null
+++ b/sys-process/iotop/files/iotop-0.6-Ignore-invalid-lines-in-proc-status-files.patch
@@ -0,0 +1,64 @@
+From 0392b205b5c3973a326721c2e9f97f0fa2eefa82 Mon Sep 17 00:00:00 2001
+From: Paul Wise <pabs3@bonedaddy.net>
+Date: Fri, 25 May 2018 15:13:26 +0800
+Subject: [PATCH 1/2] Ignore invalid lines in /proc/*/status files
+
+One Ubuntu Linux kernel security fix introduced a blank line.
+Some other Linux kernels may have invalid lines in the future.
+
+See-also: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1772671
+Fixes: https://bugs.launchpad.net/ubuntu/+source/iotop/+bug/1772856
+Reported-by: Paul Jaros <jaros.paul@gmail.com>
+Reported-in: <CAEh_nc0_DXTmfu16PxmVyrCi6QQeSrpnGGhtfNu60wJYfa_6Zw@mail.gmail.com>
+Traceback (most recent call last):
+ File "/usr/sbin/iotop", line 17, in <module>
+ main()
+ File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 620, in main
+ main_loop()
+ File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 610, in <lambda>
+ main_loop = lambda: run_iotop(options)
+ File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 508, in run_iotop
+ return curses.wrapper(run_iotop_window, options)
+ File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
+ return func(stdscr, *args, **kwds)
+ File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 501, in run_iotop_window
+ ui.run()
+ File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 155, in run
+ self.process_list.duration)
+ File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 434, in refresh_display
+ lines = self.get_data()
+ File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 415, in get_data
+ return list(map(format, processes))
+ File "/usr/lib/python2.7/dist-packages/iotop/ui.py", line 388, in format
+ cmdline = p.get_cmdline()
+ File "/usr/lib/python2.7/dist-packages/iotop/data.py", line 292, in get_cmdline
+ proc_status = parse_proc_pid_status(self.pid)
+ File "/usr/lib/python2.7/dist-packages/iotop/data.py", line 196, in parse_proc_pid_status
+ key, value = line.split(':\t', 1)
+ValueError: need more than 1 value to unpack
+---
+ iotop/data.py | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/iotop/data.py b/iotop/data.py
+index 115bb8f..e0387f0 100644
+--- a/iotop/data.py
++++ b/iotop/data.py
+@@ -208,7 +208,13 @@ def parse_proc_pid_status(pid):
+ result_dict = {}
+ try:
+ for line in open('/proc/%d/status' % pid):
+- key, value = line.split(':', 1)
++ try:
++ key, value = line.split(':', 1)
++ except ValueError:
++ # Ignore lines that are not formatted correctly as
++ # some downstream kernels may have weird lines and
++ # the needed fields are probably formatted correctly.
++ pass
+ result_dict[key] = value.strip()
+ except IOError:
+ pass # No such process
+--
+2.20.1.97.g81188d93c3-goog
+
diff --git a/sys-process/iotop/files/iotop-0.6-Only-split-proc-status-lines-on-the-character.patch b/sys-process/iotop/files/iotop-0.6-Only-split-proc-status-lines-on-the-character.patch
new file mode 100644
index 000000000000..ae8540f9da9f
--- /dev/null
+++ b/sys-process/iotop/files/iotop-0.6-Only-split-proc-status-lines-on-the-character.patch
@@ -0,0 +1,31 @@
+From 7814f30a5ed65acd07f284bba991ca557788ee80 Mon Sep 17 00:00:00 2001
+From: Paul Wise <pabs3@bonedaddy.net>
+Date: Thu, 28 Jul 2016 13:25:54 +0800
+Subject: [PATCH] Only split /proc/*/status lines on the : character.
+
+Apparently vserver kernels have some lines that don't
+appear to have the tab character so iotop crashes.
+
+The tab character will be stripped by the next code line.
+
+Closes: https://bugs.gentoo.org/show_bug.cgi?id=458556
+---
+ iotop/data.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/iotop/data.py b/iotop/data.py
+index c4e961e..d18ca9d 100644
+--- a/iotop/data.py
++++ b/iotop/data.py
+@@ -197,7 +197,7 @@ def parse_proc_pid_status(pid):
+ result_dict = {}
+ try:
+ for line in open('/proc/%d/status' % pid):
+- key, value = line.split(':\t', 1)
++ key, value = line.split(':', 1)
+ result_dict[key] = value.strip()
+ except IOError:
+ pass # No such process
+--
+2.20.1.97.g81188d93c3-goog
+
diff --git a/sys-process/iotop/iotop-0.6.ebuild b/sys-process/iotop/iotop-0.6.ebuild
index 3faec2aa4511..01dc5a097efd 100644
--- a/sys-process/iotop/iotop-0.6.ebuild
+++ b/sys-process/iotop/iotop-0.6.ebuild
@@ -21,7 +21,12 @@ CONFIG_CHECK="~TASK_IO_ACCOUNTING ~TASK_DELAY_ACCT ~TASKSTATS ~VM_EVENT_COUNTERS
DOCS=( NEWS README THANKS ChangeLog )
-PATCHES=( "${FILESDIR}"/${P}-setup.py3.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-setup.py3.patch
+ "${FILESDIR}"/${P}-Only-split-proc-status-lines-on-the-character.patch
+ "${FILESDIR}"/${P}-Ignore-invalid-lines-in-proc-status-files.patch
+ "${FILESDIR}"/${P}-Actually-skip-invalid-lines-in-proc-status.patch
+)
pkg_setup() {
linux-info_pkg_setup