Hello community,

here is the log from the commit of package bcc for openSUSE:Factory checked in 
at 2018-02-23 15:29:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bcc (Old)
 and      /work/SRC/openSUSE:Factory/.bcc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bcc"

Fri Feb 23 15:29:26 2018 rev:18 rq:578854 version:0.5.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/bcc/bcc.changes  2018-02-09 15:48:05.902201122 
+0100
+++ /work/SRC/openSUSE:Factory/.bcc.new/bcc.changes     2018-02-23 
15:29:28.807211822 +0100
@@ -1,0 +2,7 @@
+Wed Feb 21 07:41:03 UTC 2018 - g...@suse.com
+
+- Add bcc-bsc1080085-backport-bytes-strings.patch and
+  bcc-bsc1080085-fix-cachetop-py3-str.patch to fix the python3
+  compatibility issue (bsc#1080085)
+
+-------------------------------------------------------------------

New:
----
  bcc-bsc1080085-backport-bytes-strings.patch
  bcc-bsc1080085-fix-cachetop-py3-str.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bcc.spec ++++++
--- /var/tmp/diff_new_pack.3VUu9u/_old  2018-02-23 15:29:29.555184799 +0100
+++ /var/tmp/diff_new_pack.3VUu9u/_new  2018-02-23 15:29:29.559184654 +0100
@@ -35,6 +35,8 @@
 Patch2:         %{name}-bsc1065593-llvm4-hack.patch
 Patch3:         %{name}-python3.patch
 Patch4:         %{name}-fix-build-for-llvm-5.0.1.patch
+Patch5:         %{name}-bsc1080085-backport-bytes-strings.patch
+Patch6:         %{name}-bsc1080085-fix-cachetop-py3-str.patch
 ExcludeArch:    ppc s390
 BuildRequires:  bison
 BuildRequires:  cmake >= 2.8.7
@@ -161,6 +163,8 @@
 %endif
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
+%patch6 -p1
 
 %build
 # Prevent the cpp examples from compilation and installation

++++++ bcc-bsc1080085-backport-bytes-strings.patch ++++++
++++ 2466 lines (skipped)

++++++ bcc-bsc1080085-fix-cachetop-py3-str.patch ++++++
>From fedd277132f7d28a1cc96ce37aa931a999c0025c Mon Sep 17 00:00:00 2001
From: Gary Lin <g...@suse.com>
Date: Tue, 13 Feb 2018 18:02:42 +0800
Subject: [PATCH] cachetop: convert str to bytes

Signed-off-by: Gary Lin <g...@suse.com>
---
 tools/cachetop.py | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/tools/cachetop.py b/tools/cachetop.py
index 5afd3fa..16f45d6 100755
--- a/tools/cachetop.py
+++ b/tools/cachetop.py
@@ -18,12 +18,12 @@ from __future__ import division
 # from __future__ import unicode_literals
 from __future__ import print_function
 
+import curses
 from bcc import BPF
 from collections import defaultdict
 from time import strftime
 
 import argparse
-import curses
 import pwd
 import re
 import signal
@@ -52,8 +52,8 @@ def signal_ignore(signal, frame):
 def get_meminfo():
     result = {}
 
-    for line in open('/proc/meminfo'):
-        k = line.split(':', 3)
+    for line in open('/proc/meminfo', "rb"):
+        k = line.split(b':', 3)
         v = k[1].split()
         result[k[0]] = int(v[0])
     return result
@@ -88,16 +88,16 @@ def get_processes_stats(
         whits = 0
 
         for k, v in count.items():
-            if re.match('mark_page_accessed', bpf.ksym(k)) is not None:
+            if re.match(b'mark_page_accessed', bpf.ksym(k)) is not None:
                 mpa = max(0, v)
 
-            if re.match('mark_buffer_dirty', bpf.ksym(k)) is not None:
+            if re.match(b'mark_buffer_dirty', bpf.ksym(k)) is not None:
                 mbd = max(0, v)
 
-            if re.match('add_to_page_cache_lru', bpf.ksym(k)) is not None:
+            if re.match(b'add_to_page_cache_lru', bpf.ksym(k)) is not None:
                 apcl = max(0, v)
 
-            if re.match('account_page_dirtied', bpf.ksym(k)) is not None:
+            if re.match(b'account_page_dirtied', bpf.ksym(k)) is not None:
                 apd = max(0, v)
 
             # access = total cache access incl. reads(mpa) and writes(mbd)
@@ -195,8 +195,8 @@ def handle_loop(stdscr, args):
 
         # Get memory info
         mem = get_meminfo()
-        cached = int(mem["Cached"]) / 1024
-        buff = int(mem["Buffers"]) / 1024
+        cached = int(mem[b"Cached"]) / 1024
+        buff = int(mem[b"Buffers"]) / 1024
 
         process_stats = get_processes_stats(
             b,
-- 
2.16.1


Reply via email to