From 8955b88e9c0c2687fb60175282a04c288e2435b6 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 30 2018 05:25:37 +0000 Subject: import iotop-0.6-4.el7 --- diff --git a/SOURCES/iotop-0.3.2-ppcprio.patch b/SOURCES/iotop-0.3.2-ppcprio.patch new file mode 100644 index 0000000..10aacaf --- /dev/null +++ b/SOURCES/iotop-0.3.2-ppcprio.patch @@ -0,0 +1,21 @@ +diff -up iotop-0.6/iotop/ioprio.py.ppcprio iotop-0.6/iotop/ioprio.py +--- iotop-0.6/iotop/ioprio.py.ppcprio 2018-08-02 15:17:46.523099123 +0200 ++++ iotop-0.6/iotop/ioprio.py 2018-08-02 15:19:45.671660952 +0200 +@@ -32,7 +32,7 @@ IOPRIO_GET_ARCH_SYSCALL = [ + ('i*86', '*', 290), + ('ia64*', '*', 1275), + ('parisc*', '*', 268), +- ('powerpc*', '*', 274), ++ ('ppc*', '*', 274), + ('s390*', '*', 283), + ('sparc*', '*', 218), + ('sh*', '*', 289), +@@ -46,7 +46,7 @@ IOPRIO_SET_ARCH_SYSCALL = [ + ('i*86', '*', 289), + ('ia64*', '*', 1274), + ('parisc*', '*', 267), +- ('powerpc*', '*', 273), ++ ('ppc*', '*', 273), + ('s390*', '*', 282), + ('sparc*', '*', 196), + ('sh*', '*', 288), diff --git a/SOURCES/iotop-0.6-aarch64prio.patch b/SOURCES/iotop-0.6-aarch64prio.patch new file mode 100644 index 0000000..8e04729 --- /dev/null +++ b/SOURCES/iotop-0.6-aarch64prio.patch @@ -0,0 +1,19 @@ +diff -urN iotop-0.6.orig/iotop/ioprio.py iotop-0.6/iotop/ioprio.py +--- iotop-0.6.orig/iotop/ioprio.py 2013-05-27 00:44:18.000000003 +0200 ++++ iotop-0.6/iotop/ioprio.py 2018-08-01 15:12:59.460788725 +0200 +@@ -27,6 +27,7 @@ + # 'x86_64' but it will use the i386 syscall number, that's why we consider both + # the architecture name and the word size. + IOPRIO_GET_ARCH_SYSCALL = [ ++ ('aarch64', '*', 31), + ('alpha', '*', 443), + ('arm*', '*', 315), + ('i*86', '*', 290), +@@ -41,6 +42,7 @@ + ] + + IOPRIO_SET_ARCH_SYSCALL = [ ++ ('aarch64', '*', 30), + ('alpha', '*', 442), + ('arm*', '*', 314), + ('i*86', '*', 289), diff --git a/SOURCES/iotop-0.6-splitline.patch b/SOURCES/iotop-0.6-splitline.patch new file mode 100644 index 0000000..b35ea12 --- /dev/null +++ b/SOURCES/iotop-0.6-splitline.patch @@ -0,0 +1,18 @@ +diff -up iotop-0.6/iotop/data.py.splitline iotop-0.6/iotop/data.py +--- iotop-0.6/iotop/data.py.splitline 2013-05-27 00:44:18.000000000 +0200 ++++ iotop-0.6/iotop/data.py 2018-07-09 16:08:04.135771959 +0200 +@@ -193,7 +193,13 @@ def parse_proc_pid_status(pid): + result_dict = {} + try: + for line in open('/proc/%d/status' % pid): +- key, value = line.split(':\t', 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. ++ continue + result_dict[key] = value.strip() + except IOError: + pass # No such process diff --git a/SPECS/iotop.spec b/SPECS/iotop.spec index fdf55d1..f373ab2 100644 --- a/SPECS/iotop.spec +++ b/SPECS/iotop.spec @@ -1,7 +1,7 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: iotop Version: 0.6 -Release: 2%{?dist} +Release: 4%{?dist} Summary: Top like utility for I/O Group: Applications/System @@ -9,6 +9,11 @@ License: GPLv2+ URL: http://guichaz.free.fr/iotop/ Source0: http://guichaz.free.fr/iotop/files/%{name}-%{version}.tar.bz2 +# from upstream, for iotop <= 0.6, rhbz#1582821 +Patch1: iotop-0.6-splitline.patch +Patch2: iotop-0.3.2-ppcprio.patch +Patch3: iotop-0.6-aarch64prio.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -17,6 +22,9 @@ Requires: python %prep %setup +%patch1 -p1 -b .splitline +%patch2 -p1 -b .ppcprio +%patch3 -p1 -b .aarch64prio %build %{__python} setup.py build @@ -45,6 +53,12 @@ rm -rf $RPM_BUILD_ROOT %{python_sitelib}/* %changelog +* Thu Aug 02 2018 Michal Hlavinka - 0.6-4 +- fix prio field for ppc and aarch64 (#1610912, #1610914) + +* Mon Jul 09 2018 Michal Hlavinka - 0.6-3 +- fix data value unpack with latest kernels (#1582821) + * Fri Dec 27 2013 Daniel Mach - 0.6-2 - Mass rebuild 2013-12-27