Package init
This commit is contained in:
commit
b84d172048
21
0000-iotop-0.6-noendcurses.patch
Normal file
21
0000-iotop-0.6-noendcurses.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -up iotop-0.6/iotop/ui.py.noendcurses iotop-0.6/iotop/ui.py
|
||||
--- iotop-0.6/iotop/ui.py.noendcurses 2014-12-03 17:50:38.941430261 +0100
|
||||
+++ iotop-0.6/iotop/ui.py 2014-12-03 17:51:40.108064465 +0100
|
||||
@@ -520,6 +525,17 @@ Please do not file bugs on iotop about t
|
||||
sys.exit(1)
|
||||
else:
|
||||
raise
|
||||
+ except curses.error as e:
|
||||
+ stre = str(e)
|
||||
+ if stre.find('ERR')>=0 and (
|
||||
+ stre.find('nocbreak()')>=0 or stre.find('endwin()')>=0
|
||||
+ ):
|
||||
+ pass
|
||||
+ # endwin and nocbreak can cause error (and raise hard to catch
|
||||
+ # exception) if iotop was running in the terminal and that
|
||||
+ # terminal got closed while iotop was still running
|
||||
+ else:
|
||||
+ raise
|
||||
|
||||
#
|
||||
# Profiling
|
||||
9
0001-iotop-0.6-python3.patch
Normal file
9
0001-iotop-0.6-python3.patch
Normal file
@ -0,0 +1,9 @@
|
||||
diff -ru iotop-0.6.orign/sbin/iotop iotop-0.6/sbin/iotop
|
||||
--- iotop-0.6.orign/sbin/iotop 2013-05-27 00:44:18.000000000 +0200
|
||||
+++ iotop-0.6/sbin/iotop 2015-11-15 22:47:24.468058681 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# iotop: Display I/O usage of processes in a top like UI
|
||||
# Copyright (c) 2007, 2008 Guillaume Chazarain <guichaz@gmail.com>, GPLv2
|
||||
# See iotop --help for some help
|
||||
32
0002-iotop-python3build.patch
Normal file
32
0002-iotop-python3build.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 99c8d7cedce81f17b851954d94bfa73787300599 Mon Sep 17 00:00:00 2001
|
||||
From: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
|
||||
Date: Fri, 17 Oct 2014 13:49:31 +0200
|
||||
Subject: [PATCH] Fix build error with Python 3 caused by itervalues() in
|
||||
setup.py
|
||||
|
||||
The itervalues() method is not available in Python 3. As a
|
||||
consequence, this patch replaces the call to itervalues() in setup.py
|
||||
with a call to values() which works on both Python 2 and Python 3.
|
||||
|
||||
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
|
||||
Signed-off-by: Paul Wise <pabs3@bonedaddy.net>
|
||||
---
|
||||
setup.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 7150102..9de6068 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -7,7 +7,7 @@ from iotop.version import VERSION
|
||||
# Dirty hack to make setup.py install the iotop script to sbin/ instead of bin/
|
||||
# while still honoring the choice of installing into local/ or not.
|
||||
if hasattr(distutils_install, 'INSTALL_SCHEMES'):
|
||||
- for d in distutils_install.INSTALL_SCHEMES.itervalues():
|
||||
+ for d in distutils_install.INSTALL_SCHEMES.values():
|
||||
if d.get('scripts', '').endswith('/bin'):
|
||||
d['scripts'] = d['scripts'][:-len('/bin')] + '/sbin'
|
||||
|
||||
--
|
||||
2.4.10.GIT
|
||||
|
||||
12
0003-iotop-0.3.2-batchprintutf8.patch
Normal file
12
0003-iotop-0.3.2-batchprintutf8.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up iotop-0.6/iotop/ui.py.batchprintutf8 iotop-0.6/iotop/ui.py
|
||||
--- iotop-0.6/iotop/ui.py.batchprintutf8 2016-11-14 11:21:23.690185257 +0100
|
||||
+++ iotop-0.6/iotop/ui.py 2016-11-14 11:23:26.511040007 +0100
|
||||
@@ -444,7 +444,7 @@ class IOTopUI(object):
|
||||
if self.options.quiet <= int(first_time):
|
||||
print(''.join(titles))
|
||||
for l in lines:
|
||||
- print(l)
|
||||
+ print(l.encode('utf-8'))
|
||||
sys.stdout.flush()
|
||||
else:
|
||||
self.win.erase()
|
||||
18
6000-iotop-0.6-splitline.patch
Normal file
18
6000-iotop-0.6-splitline.patch
Normal file
@ -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
|
||||
21
6001-iotop-0.3.2-ppcprio.patch
Normal file
21
6001-iotop-0.3.2-ppcprio.patch
Normal file
@ -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),
|
||||
19
6002-iotop-0.6-aarch64prio.patch
Normal file
19
6002-iotop-0.6-aarch64prio.patch
Normal file
@ -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),
|
||||
BIN
iotop-0.6.tar.bz2
Normal file
BIN
iotop-0.6.tar.bz2
Normal file
Binary file not shown.
73
iotop.spec
Normal file
73
iotop.spec
Normal file
@ -0,0 +1,73 @@
|
||||
Name: iotop
|
||||
Version: 0.6
|
||||
Release: 19
|
||||
Summary: Simple top-like I/O monitor
|
||||
License: GPLv2+
|
||||
URL: http://guichaz.free.fr/iotop/
|
||||
|
||||
Source0: http://guichaz.free.fr/iotop/files/%{name}-%{version}.tar.bz2
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python3-devel git
|
||||
|
||||
Patch0000: 0000-iotop-0.6-noendcurses.patch
|
||||
Patch0001: 0001-iotop-0.6-python3.patch
|
||||
Patch0002: 0002-iotop-python3build.patch
|
||||
Patch0003: 0003-iotop-0.3.2-batchprintutf8.patch
|
||||
Patch6000: 6000-iotop-0.6-splitline.patch
|
||||
Patch6001: 6001-iotop-0.3.2-ppcprio.patch
|
||||
Patch6002: 6002-iotop-0.6-aarch64prio.patch
|
||||
|
||||
%description
|
||||
iotop watches I/O usage information output by the Linux kernel (requires 2.6.20 or later) and
|
||||
displays a table of current I/O usage by processes or threads on the system. At least the
|
||||
CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING, CONFIG_TASKSTATS and CONFIG_VM_EVENT_COUNTERS
|
||||
options need to be enabled in your Linux kernel build configuration.
|
||||
|
||||
iotop displays columns for the I/O bandwidth read and written by each process/thread during the
|
||||
sampling period. It also displays the percentage of time the thread/process spent while swapping in and
|
||||
while waiting on I/O. For each process, its I/O priority (class/level) is shown.
|
||||
|
||||
%package help
|
||||
Summary: Including man files for iotop
|
||||
Requires: man
|
||||
|
||||
%description help
|
||||
This contains man files for the using of iotop
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1 -S git
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
|
||||
%files
|
||||
%doc README
|
||||
%license COPYING
|
||||
%{python3_sitelib}/*
|
||||
%{_sbindir}/iotop
|
||||
|
||||
%files help
|
||||
%{_mandir}/man8/iotop.*
|
||||
|
||||
%changelog
|
||||
* Sat Aug 31 2019 Miaohe Lin <linmiaohe@huawei.com> - 0.6-19
|
||||
- Type:enhancemnet
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:openEuler Debranding
|
||||
|
||||
* Wed Aug 21 2019 wubo <wubo40@huawei.com> - 0.6-18.h2
|
||||
- change patch name
|
||||
|
||||
* Mon Feb 11 2019 wangjia <wangjia55@huawei.com> - 0.6-18.h1
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix prio field for ppc and aarch64
|
||||
fix data value unpack with latest kernels
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user