iotop package is retired on branch c10s for BAKERY-412

This commit is contained in:
Troy Dawson 2024-03-21 18:53:00 +00:00
parent 8da24581b1
commit 1ce026d58f
11 changed files with 1 additions and 451 deletions

6
.gitignore vendored
View File

@ -1,6 +0,0 @@
iotop-0.4.tar.bz2
/iotop-0.4.3.tar.bz2
/iotop-0.4.4.tar.bz2
/iotop-0.5.tar.bz2
/iotop-0.6.tar.bz2
/iotop-0.6.git4e4fbca5.tar.bz2

1
dead.package Normal file
View File

@ -0,0 +1 @@
iotop package is retired on branch c10s for BAKERY-412

View File

@ -1,12 +0,0 @@
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()

View File

@ -1,43 +0,0 @@
diff --git a/iotop/data.py b/iotop/data.py
index f5496d0..665397c 100644
--- a/iotop/data.py
+++ b/iotop/data.py
@@ -43,7 +43,6 @@ except (ImportError, RuntimeError):
# Check for requirements:
# o Linux >= 2.6.20 with I/O accounting and VM event counters
#
-
ioaccounting = os.path.exists('/proc/self/io')
try:
@@ -90,7 +89,7 @@ class Stats(DumpableObject):
('cancelled_write_bytes', 264)
]
- has_blkio_delay_total = False
+ has_blkio_delay_total = None
def __init__(self, task_stats_buffer):
sd = self.__dict__
@@ -101,7 +100,7 @@ class Stats(DumpableObject):
# This is a heuristic to detect if CONFIG_TASK_DELAY_ACCT is enabled in
# the kernel.
if not Stats.has_blkio_delay_total:
- Stats.has_blkio_delay_total = self.blkio_delay_total != 0
+ Stats.has_blkio_delay_total = sysctl_task_delayacct()
def accumulate(self, other_stats, destination, coeff=1):
"""Update destination from operator(self, other_stats)"""
diff --git a/iotop/ui.py b/iotop/ui.py
index 77f82c7..d9dc044 100644
--- a/iotop/ui.py
+++ b/iotop/ui.py
@@ -514,7 +514,7 @@ class IOTopUI(object):
else:
self.win.erase()
- if self.has_swapin_io:
+ if self.has_swapin_io is not False:
status_msg = None
else:
status_msg = ('CONFIG_TASK_DELAY_ACCT '

View File

@ -1,64 +0,0 @@
diff --git a/iotop/ui.py b/iotop/ui.py
index 7ae8bad..77f82c7 100644
--- a/iotop/ui.py
+++ b/iotop/ui.py
@@ -224,6 +224,12 @@ class IOTopUI(object):
new_sorting_key += delta
new_sorting_key = max(0, new_sorting_key)
new_sorting_key = min(len(IOTopUI.sorting_keys) - 1, new_sorting_key)
+ if not self.has_swapin_io:
+ if new_sorting_key in (5, 6):
+ if delta <= 0:
+ new_sorting_key = 4
+ elif delta > 0:
+ new_sorting_key = 7
return new_sorting_key
# I wonder if switching to urwid for the display would be better here
@@ -421,14 +427,22 @@ class IOTopUI(object):
def format(p):
stats = format_stats(self.options, p, self.process_list.duration)
io_delay, swapin_delay, read_bytes, write_bytes = stats
+ format = '%%%dd' % MAX_PID_WIDTH
+ params = p.pid,
+ format += ' %4s'
+ params += p.get_ioprio(),
+ format += ' %-8s'
+ params += p.get_user()[:8],
+ format += ' %11s %11s'
+ params += read_bytes, write_bytes
if self.has_swapin_io:
- delay_stats = '%7s %7s ' % (swapin_delay, io_delay)
- else:
- delay_stats = ' ?unavailable? '
- pid_format = '%%%dd' % MAX_PID_WIDTH
- line = (pid_format + ' %4s %-8s %11s %11s %s') % (
- p.pid, p.get_ioprio(), p.get_user()[:8], read_bytes,
- write_bytes, delay_stats)
+ format += ' %7s %7s'
+ params += swapin_delay, io_delay
+ elif self.options.batch:
+ format += ' %s '
+ params += '?unavailable?',
+ format += ' '
+ line = format % (params)
cmdline = p.get_cmdline()
if not self.options.batch:
remaining_length = self.width - len(line)
@@ -481,6 +495,7 @@ class IOTopUI(object):
# and iotop then uses the sysctl value instead.
if sysctl_task_delayacct() == False:
self.has_swapin_io = False
+ self.adjust_sorting_key(0)
lines = self.get_data()
if self.options.time:
titles = [' TIME'] + titles
@@ -571,6 +586,8 @@ class IOTopUI(object):
pos = 0
remaining_cols = self.width
for i in range(len(titles)):
+ if not self.has_swapin_io and i in (5, 6):
+ continue
attr = curses.A_REVERSE
title = titles[i]
if i == self.sorting_key:

View File

@ -1,21 +0,0 @@
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

View File

@ -1,9 +0,0 @@
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

View File

@ -1,33 +0,0 @@
diff -up iotop-0.6/setup.cfg.usesetuptools iotop-0.6/setup.cfg
--- iotop-0.6/setup.cfg.usesetuptools 2021-10-08 04:27:30.000000000 +0200
+++ iotop-0.6/setup.cfg 2022-12-20 23:17:11.242082371 +0100
@@ -1,3 +1,6 @@
[bdist_rpm]
doc_files = ChangeLog COPYING NEWS README THANKS
install_script = .install-rpm.sh
+
+[install]
+install_scripts=/usr/sbin
diff -up iotop-0.6/setup.py.usesetuptools iotop-0.6/setup.py
--- iotop-0.6/setup.py.usesetuptools 2021-10-08 04:27:30.000000000 +0200
+++ iotop-0.6/setup.py 2022-12-20 23:18:52.703691554 +0100
@@ -1,18 +1,10 @@
#!/usr/bin/env python3
-from distutils.core import setup, Extension
-from distutils.command import install as distutils_install
+from setuptools import setup, Extension
from iotop.version import VERSION
_ioprio = Extension('iotop._ioprio', sources = ['iotop/_ioprio.c'])
-# 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.values():
- if d.get('scripts', '').endswith('/bin'):
- d['scripts'] = d['scripts'][:-len('/bin')] + '/sbin'
-
setup(name='iotop',
version=VERSION,
description='Per process I/O bandwidth monitor',

View File

@ -1,32 +0,0 @@
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

View File

@ -1,230 +0,0 @@
Name: iotop
Version: 0.6
Release: 35%{?dist}
Summary: Top like utility for I/O
License: GPLv2+
URL: http://guichaz.free.fr/iotop/
Source0: http://guichaz.free.fr/iotop/files/%{name}-%{version}.git4e4fbca5.tar.bz2
# rhbz#1035503
Patch0: iotop-0.6-noendcurses.patch
Patch1: iotop-0.6-python3.patch
# Fix build error with Python 3 caused by itervalues() in setup.py
# http://repo.or.cz/iotop.git/commit/99c8d7cedce81f17b851954d94bfa73787300599
Patch2: iotop-python3build.patch
# sent upstream, iotop <= 0.6, rhbz#1285088
Patch3: iotop-0.3.2-batchprintutf8.patch
# from upstream, iotop <= 0.6
Patch4: iotop-0.6-git9c49d59.patch
# rhbz#1679201
Patch5: iotop-0.6-delayacctmsg.patch
Patch6: iotop-0.6-usesetuptools.patch
#BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: gcc
%description
Linux has always been able to show how much I/O was going on
(the bi and bo columns of the vmstat 1 command).
iotop is a Python program with a top like UI used to
show of behalf of which process is the I/O going on.
%prep
%setup -n %{name}-%{version}
%patch3 -p1 -b .batchprintutf8
%patch4 -p1 -b .git9c49d59
%patch5 -p1 -b .delayacctmsg
%patch6 -p1 -b .usesetuptools
%build
%py3_build
%install
%py3_install
%files -n %{name}
%doc NEWS THANKS README ChangeLog
%license COPYING
%{python3_sitearch}/iotop*
%{_sbindir}/iotop
%{_mandir}/man8/iotop.*
%changelog
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Dec 20 2022 Michal Hlavinka <mhlavink@redhat.com> - 0.6-34
- use setuptools instead of distutils (#2155049)
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.6-32
- Rebuilt for Python 3.11
* Wed Feb 09 2022 Michal Hlavinka <mhlavink@redhat.com> - 0.6-31
- do not show DELAY_ACCT error for non-existent pids
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Nov 03 2021 Michal Hlavinka <mhlavink@redhat.com> - 0.6-29
- update iotop to current upstream git
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.6-27
- Rebuilt for Python 3.10
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.6-24
- Rebuilt for Python 3.9
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6-22
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6-21
- Rebuilt for Python 3.8
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6-17
- Rebuilt for Python 3.7
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.6-13
- Rebuild for Python 3.6
* Mon Nov 14 2016 Michal Hlavinka <mhlavink@redhat.com> - 0.6-12
- fix printing unicode strings in batch mode (#1285088)
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-11
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Mon Feb 29 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.6-10
- SPEC file cleanup
- Added licence tag
- Removal of old and unneeded macros
- Use of newest python macros
- Removed Python 2 dependency
- Added patch for Python 3 build
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sun Nov 15 2015 Adel Gadllah <adel.gadllah@gmail.com> - 0.6-8
- Fix python3 patch
* Sun Nov 15 2015 Adel Gadllah <adel.gadllah@gmail.com> - 0.6-7
- Rebuilt with python3 - RH#1282262
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Jan 30 2015 Michal Hlavinka <mhlavink@redhat.com> - 0.6-5
- always ignore nocbreak errors, there is way too many false positives (#1035503)
* Wed Dec 03 2014 Michal Hlavinka <mhlavink@redhat.com> - 0.6-4
- ignore curses failures during termination (#1035503)
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed May 29 2013 Michal Hlavinka <mhlavink@redhat.com> - 0.6-1
- iotop updated to 0.6
* Tue Feb 05 2013 Michal Hlavinka <mhlavink@redhat.com> - 0.5-1
- iotop updated to 0.5
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Nov 16 2011 Michal Hlavinka <mhlavink@redhat.com> - 0.4.4-1
- iotop updated to 0.4.4
* Fri Oct 14 2011 Michal Hlavinka <mhlavink@redhat.com> 0.4.3-3
- fix typo in last patch
* Thu Oct 13 2011 Michal Hlavinka <mhlavink@redhat.com> 0.4.3-2
- after CVE-2011-2494 fix, iotop needs root privileges
* Sun Sep 18 2011 Adel Gadllah <adel.gadllah@gmail.com> 0.4.3-1
- New upstream version
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Tue Jan 12 2010 Adel Gadllah <adel.gadllah@gmail.com> 0.4-1
- New upstream version
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue May 19 2009 Adel Gadllah <adel.gadllah@gmail.com> 0.3-1
- New upstream version
- fixes RH #475917
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.2.1-2
- Rebuild for Python 2.6
* Wed Jul 09 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.2.1-1
- Update to 0.2.1
* Mon Jul 07 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.2-2
- New upstream tarball..
* Mon May 26 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.2-1
- Update to new upstream version
* Fri Dec 28 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.1-3
- Fix build issue
* Fri Dec 28 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.1-2
- Fix traceback on xterm-color RH #400071
* Sat Nov 3 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.1-1
- Fix version
* Sat Nov 3 2007 Adel Gadllah <adel.gadllah@gmail.com> 20070930-1
- Initial Build

View File

@ -1 +0,0 @@
SHA512 (iotop-0.6.git4e4fbca5.tar.bz2) = 9715d9adb77a676c73a20bfad85f3cb6789ce9c242060b94fa9c8daf49174e5b7c39da46aa11cdb9631e10f3577a64d9113c27be06de9802c92a2be3a3b3ab42