Re: [Slackbuilds-users] Fix for iotop issue with 4.4.144 kernel

2018-08-25 Thread Willy Sudiarto Raharjo
> iotop is broken with the latest Slackware kernel. I've included the
> maintainer here, but also posting the note and a patch for the iotop
> SlackBuild to the list for further review.
> 
> A few comments regarding the issue and patch: Recent kernels, including
> Slackware's 4.4.144 kernel, have introduced at least one blank line in
> /proc//status which breaks the parse_proc_pid_status() function in
> iotop/data.py. The added patch fix-proc-status-read.patch updates this
> function to skip empty lines.
> 
> Additional reports of this issue can be found here: 
> 
>     [1] https://bugzilla.redhat.com/show_bug.cgi?id=1584612 
>     [2]
> https://unix.stackexchange.com/questions/446624/error-with-command-iotop-on-centos
>  
> 
>     [3] https://bugs.launchpad.net/pkg-website/+bug/1773383
> 
> The fix is based on the report in [2].

Thanks for the information
i have tested and pushed the patch to my branch which will be included
in the next public update.


-- 
Willy Sudiarto Raharjo



signature.asc
Description: OpenPGP digital signature
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/



Re: [Slackbuilds-users] Fix for iotop issue with 4.4.144 kernel

2018-08-20 Thread Audrius Kažukauskas
Hi, Jason,

On Sun, 2018-08-19 at 00:27:25 -0400, Jason Graham wrote:
> Hi,
> 
> iotop is broken with the latest Slackware kernel. I've included the
> maintainer here, but also posting the note and a patch for the iotop
> SlackBuild to the list for further review.
> 
> A few comments regarding the issue and patch:
> 
> Recent kernels, including Slackware's 4.4.144 kernel, have introduced at
> least one blank line in /proc//status which breaks the
> parse_proc_pid_status() function in iotop/data.py. The patch
> fix-proc-status-read.patch updates this
> function to skip empty lines.
> 
> Additional reports of this issue can be found here:
> 
>  [1] https://bugzilla.redhat.com/show_bug.cgi?id=1584612
>  [2]
> https://unix.stackexchange.com/questions/446624/error-with-command-iotop-on-centos
>  [3] https://bugs.launchpad.net/pkg-website/+bug/1773383
> 
> The fix is based on the report in [2].

Thanks for the heads up.  I was on holiday for the last couple of weeks
and just now getting back to computer stuff (including SlackBuilds).
I'll submit the fix as soon as I can.

-- 
Audrius Kažukauskas


signature.asc
Description: PGP signature
___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/



[Slackbuilds-users] Fix for iotop issue with 4.4.144 kernel

2018-08-18 Thread Jason Graham
Hi,

iotop is broken with the latest Slackware kernel. I've included the
maintainer here, but also posting the note and a patch for the iotop
SlackBuild to the list for further review.

A few comments regarding the issue and patch: Recent kernels, including
Slackware's 4.4.144 kernel, have introduced at least one blank line in
/proc//status which breaks the parse_proc_pid_status() function in
iotop/data.py. The added patch fix-proc-status-read.patch updates this
function to skip empty lines.

Additional reports of this issue can be found here: 

    [1] https://bugzilla.redhat.com/show_bug.cgi?id=1584612 
    [2]
https://unix.stackexchange.com/questions/446624/error-with-command-iotop-on-centos
 

    [3] https://bugs.launchpad.net/pkg-website/+bug/1773383

The fix is based on the report in [2].

Best,
Jason

-- 
>From 27b7cdba96278d2bc67b60d7b8bb53114f7fcfc0 Mon Sep 17 00:00:00 2001
From: Jason Graham 
Date: Sat, 18 Aug 2018 23:33:11 -0400
Subject: [PATCH] Fix for iotop issue with 4.4.144 kernel

Recent kernels, including Slackware's 4.4.144 kernel, have introduced
at least one blank line in /proc//status which breaks the
parse_proc_pid_status() function in iotop/data.py. The patch
fix-proc-status-read.patch updates this function to skip empty lines.

Additional reports of this issue can be found here:

 [1] https://bugzilla.redhat.com/show_bug.cgi?id=1584612
 [2] https://unix.stackexchange.com/questions/446624/error-with-command-iotop-on-centos
 [3] https://bugs.launchpad.net/pkg-website/+bug/1773383

The fix is based on the report in [2].
---
 system/iotop/fix-proc-status-read.patch | 10 ++
 system/iotop/iotop.SlackBuild   |  4 +++-
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 system/iotop/fix-proc-status-read.patch

diff --git a/system/iotop/fix-proc-status-read.patch b/system/iotop/fix-proc-status-read.patch
new file mode 100644
index 00..b88d8b274f
--- /dev/null
+++ b/system/iotop/fix-proc-status-read.patch
@@ -0,0 +1,10 @@
+--- iotop-0.6.orig/iotop/data.py	2013-05-26 18:44:18.0 -0400
 iotop-0.6/iotop/data.py	2018-08-18 23:21:03.528110821 -0400
+@@ -193,6 +193,7 @@
+ result_dict = {}
+ try:
+ for line in open('/proc/%d/status' % pid):
++if not line.strip(): continue
+ key, value = line.split(':\t', 1)
+ result_dict[key] = value.strip()
+ except IOError:
diff --git a/system/iotop/iotop.SlackBuild b/system/iotop/iotop.SlackBuild
index 2516bf1d43..e2c8327557 100644
--- a/system/iotop/iotop.SlackBuild
+++ b/system/iotop/iotop.SlackBuild
@@ -24,7 +24,7 @@
 
 PRGNAM=iotop
 VERSION=${VERSION:-0.6}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
 TAG=${TAG:-_SBo}
 
 if [ -z "$ARCH" ]; then
@@ -55,6 +55,8 @@ find -L . \
  \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
   -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
 
+patch -p1 < $CWD/fix-proc-status-read.patch
+
 sed -i 's|share/man/man8|man/man8|' setup.py
 
 python setup.py install --root=$PKG
-- 
2.14.4

___
SlackBuilds-users mailing list
SlackBuilds-users@slackbuilds.org
https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/
FAQ - https://slackbuilds.org/faq/