commit iotop for openSUSE:Factory
Hello community, here is the log from the commit of package iotop for openSUSE:Factory checked in at Thu Mar 31 15:56:49 CEST 2011. -------- --- iotop/iotop.changes 2010-09-07 12:21:38.000000000 +0200 +++ iotop/iotop.changes 2011-03-30 10:22:41.000000000 +0200 @@ -1,0 +2,21 @@ +Wed Mar 30 07:42:46 UTC 2011 - saschpe@suse.de + +- Remove authors from %%description +- Change "python ./setup.py" calls to "python setup.py" + +------------------------------------------------------------------- +Mon Mar 28 23:04:21 UTC 2011 - pascal.bleser@opensuse.org + +- update to 0.4.3: + * the netlink message parsing code was fixed to accept alignment padding + * UTF-8 output is now forced even if the locale is misconfigured + * the semantic of the 'a' key was changed to show stats since iotop was + started + +- changes from 0.4.2: + * workaround for an ncurses bug where UTF-8 strings are misprinted + * ioprio support for the armel and hppa architectures was added + * a possible incompatibility with Linux 2.6.37 on 64-bit systems was fixed + * iotop does not crash anymore when the locale is incorrectly configured + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- iotop-0.4.1.tar.bz2 iotop-pid_alignment.patch New: ---- iotop-0.4.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ iotop.spec ++++++ --- /var/tmp/diff_new_pack.sXSp8h/_old 2011-03-31 15:56:09.000000000 +0200 +++ /var/tmp/diff_new_pack.sXSp8h/_new 2011-03-31 15:56:09.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package iotop (Version 0.4.1) +# spec file for package iotop # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,25 +15,25 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: iotop -BuildRequires: python-devel >= 2.5 +Version: 0.4.3 +Release: 1 Summary: Top Like UI to Show Per-Process I/O Going on -Version: 0.4.1 -Release: 2 -Source: %{name}-%{version}.tar.bz2 +Source: http://guichaz.free.fr/iotop/files/iotop-%{version}.tar.bz2 Source1: %{name}-rpmlintrc -#Added 2010.09.06 Will be unnecessary with next major version. -Patch0: iotop-pid_alignment.patch -License: GPLv2 -Group: System/Monitoring Url: http://guichaz.free.fr/iotop/ +Group: System/Monitoring +License: GPLv2 BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: python-devel >= 2.5 Requires: python-curses +%if 0%{?suse_version} >= 1120 BuildArch: noarch -%{py_requires} +%endif +%py_requires %description Linux has always been able to show how much I/O was going on (the bi @@ -42,39 +42,28 @@ Iotop is a Python program with a UI similar to top to show on behalf of which process is the I/O going on. - - -Authors: --------- - Guillaume Chazarain <guichaz@yahoo.fr> - %prep %setup -q -%patch0 -p1 %build -python setup.py build +%__python setup.py build %install -#! /bin/sh -# # Copied from: http://trac.edgewall.org/ticket/1141 -# # this file is *inserted* into the install section of the generated # spec file -# # this is, what dist.py normally does -./setup.py install --prefix=/usr --root=%{buildroot} --record="INSTALLED_FILES" +%__python setup.py install --prefix="%{_prefix}" --root="%{buildroot}" --record="INSTALLED_FILES" # catch compressed man pages -sed -i -e 's@\(.\+/man/man[[:digit:]]/.\+\.[[:digit:]]\)$@\1*@' "INSTALLED_FILES" +%__sed -i -e 's@\(.\+/man/man[[:digit:]]/.\+\.[[:digit:]]\)$@\1*@' "INSTALLED_FILES" # catch any compiled python files (.pyc, .pyo), but don't list them twice -sed -i -e 's@\(.\+\)\.py$@\1.py*@' \ +%__sed -i -e 's@\(.\+\)\.py$@\1.py*@' \ -e '/.\+\.pyc$/d' \ "INSTALLED_FILES" echo "%dir %{python_sitelib}/iotop" >> INSTALLED_FILES %clean -rm -rf %{buildroot} +%{?buildroot:%__rm -rf "%{buildroot}"} %files -f INSTALLED_FILES %defattr(-,root,root) ++++++ iotop-0.4.1.tar.bz2 -> iotop-0.4.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iotop-0.4.1/ChangeLog new/iotop-0.4.3/ChangeLog --- old/iotop-0.4.1/ChangeLog 2010-06-27 18:08:25.000000000 +0200 +++ new/iotop-0.4.3/ChangeLog 2011-03-28 22:36:07.000000000 +0200 @@ -1,3 +1,83 @@ +2011-03-28 Guillaume Chazarain <guichaz@gmail.com> + + * NEWS, iotop/version.py: Version bump + +2011-03-14 Guillaume Chazarain <guichaz@gmail.com> + + * iotop/ui.py: Show stats since iotop started, not since 'a' was + pressed. This is to avoid losing valuable data when 'a' is + inadvertently pressed. + +2011-03-13 Guillaume Chazarain <guichaz@gmail.com> + + * iotop/ui.py: Force UTF-8 output even if the locale is not set to + UTF-8. At worst it will output garbage, which is better than + crashing in this case. + +2011-01-16 Guillaume Chazarain <guichaz@gmail.com> + + * THANKS, iotop/data.py, iotop/genetlink.py: Fix netlink message + parsing to accept alignement padding. https://lkml.org/lkml/2010/12/13/176 + https://lkml.org/lkml/2010/12/29/237 + +2010-12-15 Guillaume Chazarain <guichaz@gmail.com> + + * iotop/data.py: Removing dead code + +2010-12-14 Guillaume Chazarain <guichaz@gmail.com> + + * NEWS: Grammar + +2010-12-14 Guillaume Chazarain <guichaz@gmail.com> + + * NEWS, iotop/version.py: Version bump + +2010-12-14 Guillaume Chazarain <guichaz@gmail.com> + + * MANIFEST.in, install-rpm.sh, setup.cfg: Try to do without + install-rpm.sh + +2010-12-14 Guillaume Chazarain <guichaz@gmail.com> + + * iotop/ui.py: With addstr instead of insstr we get a harmless + exception when writing on the last column. Confirmed by http://ubuntuforums.org/showthread.php?t=457689 + addstr() raises an exception but the string is printed anyway + +2010-12-14 Guillaume Chazarain <guichaz@gmail.com> + + * iotop/ui.py: Back to addstr because of: + http://marc.info/?l=ncurses-bug&m=125233342917443&w=3 insstr (from ncursesw) UTF-8 issue => The cursor position was not + updated for wide characters by insstr() + +2010-09-06 Guillaume Chazarain <guichaz@gmail.com> + + * bin/iotop: Revert "Some distributions have a default distutils + prefix which is not in sys.path, so installed modules cannot be + imported." This reverts commit d0812c2024a1f8edb081a2996af12efacdf8c961. Actually I don't think this is needed for now. + +2010-09-06 Guillaume Chazarain <guichaz@gmail.com> + + * bin/iotop: Some distributions have a default distutils prefix + which is not in sys.path, so installed modules cannot be imported. + To address that, explicitely add the path where the module is + supposed to be installed to sys.path. + +2010-09-04 Guillaume Chazarain <guichaz@gmail.com> + + * THANKS, iotop/ioprio.py: Support for getting and setting IO + priority on armel and hppa architectures. + +2010-09-04 Guillaume Chazarain <guichaz@gmail.com> + + * THANKS, iotop/data.py: Instead of assuming the pid field is 4 + bytes long, take its length from the header. This is needed for + http://lkml.org/lkml/2010/2/12/167 [PATCH] delayacct: align to 8 + byte boundary on 64-bit systems + +2010-08-22 Paul Wise <pabs3@bonedaddy.net> + + * iotop/ui.py: Fix traceback with an invalid locale. Closes: http://bugs.debian.org/593846 + 2010-06-27 Guillaume Chazarain <guichaz@gmail.com> * NEWS, iotop/version.py: Bump version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iotop-0.4.1/NEWS new/iotop-0.4.3/NEWS --- old/iotop-0.4.1/NEWS 2010-06-27 18:08:10.000000000 +0200 +++ new/iotop-0.4.3/NEWS 2011-03-28 22:34:10.000000000 +0200 @@ -1,3 +1,16 @@ +0.4.3 +~~~~~ +o Fixed netlink message parsing to accept alignement padding +o Force UTF-8 output even if the locale is misconfigured +o Changed the semantic of 'a' to show stats since iotop was started + +0.4.2 +~~~~~ +o Workaround for an ncurses bug where UTF-8 strings are misprinted +o Added ioprio support for the armel and hppa architectures +o Fix possible incompatibility with linux-2.6.37 on 64 bit systems +o Do not crash when the locale is incorrectly configured + 0.4.1 ~~~~~ o Portability fix diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iotop-0.4.1/PKG-INFO new/iotop-0.4.3/PKG-INFO --- old/iotop-0.4.1/PKG-INFO 2010-06-27 18:08:26.000000000 +0200 +++ new/iotop-0.4.3/PKG-INFO 2011-03-28 22:36:07.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: iotop -Version: 0.4.1 +Version: 0.4.3 Summary: Per process I/O bandwidth monitor Home-page: http://guichaz.free.fr/iotop Author: Guillaume Chazarain diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iotop-0.4.1/THANKS new/iotop-0.4.3/THANKS --- old/iotop-0.4.1/THANKS 2010-06-27 18:08:10.000000000 +0200 +++ new/iotop-0.4.3/THANKS 2011-03-28 22:34:10.000000000 +0200 @@ -30,3 +30,15 @@ Jiri Olsa <jolsa@redhat.com> Wrote the support for python2.4 with the ctypes module. + +Philipp Thomas <pth@suse.de> + Reported that iotop produced wrong numbers in openSUSE 11.3. + +Jakub Wilk <jwilk@debian.org> + Contributed syscall numbers for getting and setting IO priority on armel and hppa architectures. + +Jeff Mahoney <jeffm@suse.com> + Contributed a fixed implementation of the taskstats parsing code. + +Florian Mickler <florian@mickler.org> + Contributed a fixed implementation of the taskstats parsing code. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iotop-0.4.1/install-rpm.sh new/iotop-0.4.3/install-rpm.sh --- old/iotop-0.4.1/install-rpm.sh 2010-06-27 18:08:10.000000000 +0200 +++ new/iotop-0.4.3/install-rpm.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -#! /bin/sh -# -# Copied from: http://trac.edgewall.org/ticket/1141 -# -# this file is *inserted* into the install section of the generated -# spec file -# - -# this is, what dist.py normally does -./setup.py install --prefix=/usr --root=${RPM_BUILD_ROOT} --record="INSTALLED_FILES" - -# catch compressed man pages -sed -i -e 's@\(.\+/man/man[[:digit:]]/.\+\.[[:digit:]]\)$@\1*@' "INSTALLED_FILES" - -# catch any compiled python files (.pyc, .pyo), but don't list them twice -sed -i -e 's@\(.\+\)\.py$@\1.py*@' \ - -e '/.\+\.pyc$/d' \ - "INSTALLED_FILES" - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iotop-0.4.1/iotop/data.py new/iotop-0.4.3/iotop/data.py --- old/iotop-0.4.1/iotop/data.py 2010-06-27 18:08:10.000000000 +0200 +++ new/iotop-0.4.3/iotop/data.py 2011-03-28 22:34:10.000000000 +0200 @@ -134,6 +134,9 @@ TASKSTATS_CMD_GET = 1 TASKSTATS_CMD_ATTR_PID = 1 +TASKSTATS_TYPE_AGGR_PID = 4 +TASKSTATS_TYPE_PID = 1 +TASKSTATS_TYPE_STATS = 3 class TaskStatsNetlink(object): # Keep in sync with format_stats() and pinfo.did_some_io() @@ -152,23 +155,25 @@ def get_single_task_stats(self, thread): thread.task_stats_request.send(self.connection) try: - reply = self.connection.recv() + reply = GeNlMessage.recv(self.connection) except OSError, e: if e.errno == errno.ESRCH: # OSError: Netlink error: No such process (3) return raise - if len(reply.payload) < 292: + for attr_type, attr_value in reply.attrs.iteritems(): + if attr_type == TASKSTATS_TYPE_AGGR_PID: + reply = attr_value.nested() + break + else: + return + taskstats_data = reply[TASKSTATS_TYPE_STATS].data + if len(taskstats_data) < 272: # Short reply return - reply_data = reply.payload[20:] - - reply_length, reply_type = struct.unpack('HH', reply.payload[4:8]) - reply_version = struct.unpack('H', reply.payload[20:22])[0] - assert reply_length >= 288 - assert reply_type == TASKSTATS_CMD_ATTR_PID + 3 - assert reply_version >= 4 - return Stats(reply_data) + taskstats_version = struct.unpack('H', taskstats_data[:2])[0] + assert taskstats_version >= 4 + return Stats(taskstats_data) # # PIDs manipulations diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iotop-0.4.1/iotop/genetlink.py new/iotop-0.4.3/iotop/genetlink.py --- old/iotop-0.4.1/iotop/genetlink.py 2010-06-27 18:08:10.000000000 +0200 +++ new/iotop-0.4.3/iotop/genetlink.py 2011-03-28 22:34:10.000000000 +0200 @@ -45,6 +45,18 @@ Message.__init__(self, family, flags=flags, payload=[GenlHdr(self.cmd)]+attrs) + @staticmethod + def recv(conn): + msg = conn.recv() + packet = msg.payload + hdr = _genl_hdr_parse(packet[:4]) + + genlmsg = GeNlMessage(msg.type, hdr.cmd, [], msg.flags) + genlmsg.attrs = parse_attributes(packet[4:]) + genlmsg.version = hdr.version + + return genlmsg + class Controller: def __init__(self, conn): self.conn = conn @@ -53,10 +65,8 @@ m = GeNlMessage(GENL_ID_CTRL, CTRL_CMD_GETFAMILY, flags=NLM_F_REQUEST, attrs=[a]) m.send(self.conn) - m = self.conn.recv() - gh = _genl_hdr_parse(m.payload[:4]) - attrs = parse_attributes(m.payload[4:]) - return attrs[CTRL_ATTR_FAMILY_ID].u16() + m = GeNlMessage.recv(self.conn) + return m.attrs[CTRL_ATTR_FAMILY_ID].u16() connection = Connection(NETLINK_GENERIC) controller = Controller(connection) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iotop-0.4.1/iotop/ioprio.py new/iotop-0.4.3/iotop/ioprio.py --- old/iotop-0.4.1/iotop/ioprio.py 2010-06-27 18:08:10.000000000 +0200 +++ new/iotop-0.4.3/iotop/ioprio.py 2011-03-28 22:34:10.000000000 +0200 @@ -29,8 +29,10 @@ # the architecture name and the word size. IOPRIO_GET_ARCH_SYSCALL = [ ('alpha', '*', 443), + ('arm*', '*', 315), ('i*86', '*', 290), ('ia64*', '*', 1275), + ('parisc*', '*', 268), ('powerpc*', '*', 274), ('s390*', '*', 283), ('sparc*', '*', 218), @@ -41,8 +43,10 @@ IOPRIO_SET_ARCH_SYSCALL = [ ('alpha', '*', 442), + ('arm*', '*', 314), ('i*86', '*', 289), ('ia64*', '*', 1274), + ('parisc*', '*', 267), ('powerpc*', '*', 273), ('s390*', '*', 282), ('sparc*', '*', 196), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iotop-0.4.1/iotop/ui.py new/iotop-0.4.3/iotop/ui.py --- old/iotop-0.4.1/iotop/ui.py 2010-06-27 18:08:10.000000000 +0200 +++ new/iotop-0.4.3/iotop/ui.py 2011-03-28 22:34:10.000000000 +0200 @@ -280,7 +280,6 @@ def handle_key(self, key): def toggle_accumulated(): self.options.accumulated ^= True - self.process_list.clear() def toggle_only_io(): self.options.only ^= True def toggle_processes(): @@ -420,7 +419,7 @@ 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() @@ -446,13 +445,9 @@ num_lines = min(len(lines), self.height - 2 - int(bool(status_msg))) for i in xrange(num_lines): try: - self.win.insstr(i + 2, 0, lines[i].encode('utf-8')) + self.win.addstr(i + 2, 0, lines[i].encode('utf-8')) except curses.error: - exc_type, value, traceback = sys.exc_info() - value = '%s win:%s i:%d line:%s' % \ - (value, self.win.getmaxyx(), i, lines[i]) - value = str(value).encode('string_escape') - raise exc_type, value, traceback + pass if status_msg: self.win.insstr(self.height - 1, 0, status_msg, curses.A_BOLD) self.win.refresh() @@ -512,7 +507,10 @@ a refresh.''' % sys.argv[0] def main(): - locale.setlocale(locale.LC_ALL, '') + try: + locale.setlocale(locale.LC_ALL, '') + except locale.Error: + print 'unable to set locale, falling back to the default locale' parser = optparse.OptionParser(usage=USAGE, version='iotop ' + VERSION) parser.add_option('-o', '--only', action='store_true', dest='only', default=False, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iotop-0.4.1/iotop/version.py new/iotop-0.4.3/iotop/version.py --- old/iotop-0.4.1/iotop/version.py 2010-06-27 18:08:10.000000000 +0200 +++ new/iotop-0.4.3/iotop/version.py 2011-03-28 22:34:10.000000000 +0200 @@ -1 +1 @@ -VERSION = '0.4.1' +VERSION = '0.4.3' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iotop-0.4.1/setup.cfg new/iotop-0.4.3/setup.cfg --- old/iotop-0.4.1/setup.cfg 2010-06-27 18:08:10.000000000 +0200 +++ new/iotop-0.4.3/setup.cfg 2011-03-28 22:34:10.000000000 +0200 @@ -1,3 +1,2 @@ [bdist_rpm] -install_script = install-rpm.sh doc_files = ChangeLog COPYING NEWS README THANKS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de