From 8aa757aa7c8aa4681c490f196ef630a2fe3363aa Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 23:56:33 +0100 Subject: [PATCH] package created using the webbuild interface [release 0.6-1mamba;Sun May 09 2021] --- README.md | 2 ++ iotop-0.6-batchprintutf8.patch | 12 ++++++++ iotop-0.6-noendcurses.patch | 21 ++++++++++++++ iotop-0.6-python3.patch | 9 ++++++ iotop-0.6-python3build.patch | 32 ++++++++++++++++++++ iotop.spec | 53 ++++++++++++++++++++++++++++++++++ 6 files changed, 129 insertions(+) create mode 100644 iotop-0.6-batchprintutf8.patch create mode 100644 iotop-0.6-noendcurses.patch create mode 100644 iotop-0.6-python3.patch create mode 100644 iotop-0.6-python3build.patch create mode 100644 iotop.spec diff --git a/README.md b/README.md index 910c2ed..a75df49 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # iotop +Top like utility for I/O. + diff --git a/iotop-0.6-batchprintutf8.patch b/iotop-0.6-batchprintutf8.patch new file mode 100644 index 0000000..4e63bc0 --- /dev/null +++ b/iotop-0.6-batchprintutf8.patch @@ -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() diff --git a/iotop-0.6-noendcurses.patch b/iotop-0.6-noendcurses.patch new file mode 100644 index 0000000..b3529d4 --- /dev/null +++ b/iotop-0.6-noendcurses.patch @@ -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 diff --git a/iotop-0.6-python3.patch b/iotop-0.6-python3.patch new file mode 100644 index 0000000..550a194 --- /dev/null +++ b/iotop-0.6-python3.patch @@ -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 , GPLv2 + # See iotop --help for some help diff --git a/iotop-0.6-python3build.patch b/iotop-0.6-python3build.patch new file mode 100644 index 0000000..55b73db --- /dev/null +++ b/iotop-0.6-python3build.patch @@ -0,0 +1,32 @@ +From 99c8d7cedce81f17b851954d94bfa73787300599 Mon Sep 17 00:00:00 2001 +From: Christophe Vu-Brugier +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 +Signed-off-by: Paul Wise +--- + 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 + diff --git a/iotop.spec b/iotop.spec new file mode 100644 index 0000000..bbbe91b --- /dev/null +++ b/iotop.spec @@ -0,0 +1,53 @@ +Name: iotop +Version: 0.6 +Release: 1mamba +Summary: Top like utility for I/O +Group: System/Tools +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://guichaz.free.fr/iotop +Source: https://repo.or.cz/iotop.git/iotop-%{version}/iotop-%{version}.tar.bz2 +Patch0: iotop-0.6-python3.patch +Patch1: iotop-0.6-python3build.patch +Patch2: iotop-0.6-noendcurses.patch +Patch3: iotop-0.6-batchprintutf8.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: libpython3-devel +## AUTOBUILDREQ-END + +%description +Top like utility for I/O. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 + +%build +CFLAGS="%{optflags}" %{__python3} setup.py build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%{__python3} setup.py install \ + -O1 --skip-build \ + --root="%{buildroot}" \ + --install-headers=%{python3_inc} \ + --install-lib=%{python3_sitearch} \ + --record=%{name}.filelist + +sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files -f %{name}.filelist +%defattr(-,root,root) +%doc COPYING THANKS + +%changelog +* Sun May 09 2021 Silvan Calarco 0.6-1mamba +- package created using the webbuild interface