diff options
author | Andrew Geissler <geissonator@yahoo.com> | 2020-04-13 21:39:40 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-05-05 16:30:44 +0300 |
commit | 82c905dc58a36aeae40b1b273a12f63fb1973cf4 (patch) | |
tree | 38caf00263451b5036435cdc36e035b25d32e623 /poky/meta/recipes-kernel/blktrace | |
parent | 83ecb75644b3d677c274188f9ac0b2374d6f6925 (diff) | |
download | openbmc-82c905dc58a36aeae40b1b273a12f63fb1973cf4.tar.xz |
meta-openembedded and poky: subtree updates
Squash of the following due to dependencies among them
and OpenBMC changes:
meta-openembedded: subtree update:d0748372d2..9201611135
meta-openembedded: subtree update:9201611135..17fd382f34
poky: subtree update:9052e5b32a..2e11d97b6c
poky: subtree update:2e11d97b6c..a8544811d7
The change log was too large for the jenkins plugin
to handle therefore it has been removed. Here is
the first and last commit of each subtree:
meta-openembedded:d0748372d2
cppzmq: bump to version 4.6.0
meta-openembedded:17fd382f34
mpv: Remove X11 dependency
poky:9052e5b32a
package_ipk: Remove pointless comment to trigger rebuild
poky:a8544811d7
pbzip2: Fix license warning
Change-Id: If0fc6c37629642ee207a4ca2f7aa501a2c673cd6
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'poky/meta/recipes-kernel/blktrace')
-rw-r--r-- | poky/meta/recipes-kernel/blktrace/blktrace/make-btt-scripts-python3-ready.patch | 197 | ||||
-rw-r--r-- | poky/meta/recipes-kernel/blktrace/blktrace_git.bb | 1 |
2 files changed, 198 insertions, 0 deletions
diff --git a/poky/meta/recipes-kernel/blktrace/blktrace/make-btt-scripts-python3-ready.patch b/poky/meta/recipes-kernel/blktrace/blktrace/make-btt-scripts-python3-ready.patch new file mode 100644 index 000000000..3b0c1c692 --- /dev/null +++ b/poky/meta/recipes-kernel/blktrace/blktrace/make-btt-scripts-python3-ready.patch @@ -0,0 +1,197 @@ +From 70d5ca2d5f3d6b97c11c641b7e0c5836983219a0 Mon Sep 17 00:00:00 2001 +From: Eric Sandeen <sandeen@redhat.com> +Date: Wed, 28 Mar 2018 15:26:36 -0500 +Subject: [oe-core][PATCH 1/1] make btt scripts python3-ready + +Many distributions are moving to python3 by default. Here's +an attempt to make the python scripts in blktrace python3-ready. + +Most of this was done with automated tools. I hand fixed some +space-vs tab issues, and cast an array index to integer. It +passes rudimentary testing when run under python2.7 as well +as python3. + +This doesn't do anything with the shebangs, it leaves them both +invoking whatever "env python" coughs up on the system. + +Signed-off-by: Eric Sandeen <sandeen@redhat.com> +Signed-off-by: Jens Axboe <axboe@kernel.dk> + +Unchanged except to modify shebangs to use python3 since +oe-core does not support python2 anymore. + +Upstream-Status: Backport [git://git.kernel.dk/blktrace.git commit 70d5ca2d5...] + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + +--- + btt/bno_plot.py | 28 +++++++++++++++------------- + btt/btt_plot.py | 22 +++++++++++++--------- + 2 files changed, 28 insertions(+), 22 deletions(-) + +--- git.orig/btt/bno_plot.py ++++ git/btt/bno_plot.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/env python3 + # + # btt blkno plotting interface + # +@@ -38,6 +38,8 @@ automatically push the keys under the gr + To exit the plotter, enter 'quit' or ^D at the 'gnuplot> ' prompt. + """ + ++from __future__ import absolute_import ++from __future__ import print_function + import getopt, glob, os, sys, tempfile + + verbose = 0 +@@ -60,14 +62,14 @@ def parse_args(in_args): + + try: + (opts, args) = getopt.getopt(in_args, s_opts, l_opts) +- except getopt.error, msg: +- print >>sys.stderr, msg +- print >>sys.stderr, __doc__ ++ except getopt.error as msg: ++ print(msg, file=sys.stderr) ++ print(__doc__, file=sys.stderr) + sys.exit(1) + + for (o, a) in opts: + if o in ('-h', '--help'): +- print __doc__ ++ print(__doc__) + sys.exit(0) + elif o in ('-v', '--verbose'): + verbose += 1 +@@ -84,10 +86,10 @@ if __name__ == '__main__': + (bnos, keys_below) = parse_args(sys.argv[1:]) + + if verbose: +- print 'Using files:', +- for bno in bnos: print bno, +- if keys_below: print '\nKeys are to be placed below graph' +- else: print '' ++ print('Using files:', end=' ') ++ for bno in bnos: print(bno, end=' ') ++ if keys_below: print('\nKeys are to be placed below graph') ++ else: print('') + + tmpdir = tempfile.mktemp() + os.mkdir(tmpdir) +@@ -99,7 +101,7 @@ if __name__ == '__main__': + fo = open(t, 'w') + for line in open(f, 'r'): + fld = line.split(None) +- print >>fo, fld[0], fld[1], int(fld[2])-int(fld[1]) ++ print(fld[0], fld[1], int(fld[2])-int(fld[1]), file=fo) + fo.close() + + t = t[t.rfind('/')+1:] +@@ -107,16 +109,16 @@ if __name__ == '__main__': + else: plot_cmd = "%s,'%s'" % (plot_cmd, t) + + fo = open('%s/plot.cmds' % tmpdir, 'w') +- print >>fo, cmds +- if len(bnos) > 10 or keys_below: print >>fo, 'set key below' +- print >>fo, plot_cmd ++ print(cmds, file=fo) ++ if len(bnos) > 10 or keys_below: print('set key below', file=fo) ++ print(plot_cmd, file=fo) + fo.close() + + pid = os.fork() + if pid == 0: + cmd = 'gnuplot %s/plot.cmds -' % tmpdir + +- if verbose: print 'Executing %s' % cmd ++ if verbose: print('Executing %s' % cmd) + + os.chdir(tmpdir) + os.system(cmd) +--- git.orig/btt/btt_plot.py ++++ git/btt/btt_plot.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#! /usr/bin/env python3 + # + # btt_plot.py: Generate matplotlib plots for BTT generate data files + # +@@ -55,6 +55,10 @@ Arguments: + but the -o (--output) and -T (--title) options will be ignored. + """ + ++from __future__ import absolute_import ++from __future__ import print_function ++import six ++from six.moves import range + __author__ = 'Alan D. Brunelle <alan.brunelle@hp.com>' + + #------------------------------------------------------------------------------ +@@ -82,7 +86,7 @@ get_base = lambda file: file[file.find( + def fatal(msg): + """Generate fatal error message and exit""" + +- print >>sys.stderr, 'FATAL: %s' % msg ++ print('FATAL: %s' % msg, file=sys.stderr) + sys.exit(1) + + #------------------------------------------------------------------------------ +@@ -163,7 +167,7 @@ def get_data(files): + if not os.path.exists(file): + fatal('%s not found' % file) + elif verbose: +- print 'Processing %s' % file ++ print('Processing %s' % file) + + xs = [] + ys = [] +@@ -214,8 +218,8 @@ def parse_args(args): + + try: + (opts, args) = getopt.getopt(args[1:], s_opts, l_opts) +- except getopt.error, msg: +- print >>sys.stderr, msg ++ except getopt.error as msg: ++ print(msg, file=sys.stderr) + fatal(__doc__) + + for (o, a) in opts: +@@ -293,15 +297,15 @@ def generate_output(type, db): + def color(idx, style): + """Returns a color/symbol type based upon the index passed.""" + +- colors = [ 'b', 'g', 'r', 'c', 'm', 'y', 'k' ] ++ colors = [ 'b', 'g', 'r', 'c', 'm', 'y', 'k' ] + l_styles = [ '-', ':', '--', '-.' ] + m_styles = [ 'o', '+', '.', ',', 's', 'v', 'x', '<', '>' ] + + color = colors[idx % len(colors)] + if style == 'line': +- style = l_styles[(idx / len(l_styles)) % len(l_styles)] ++ style = l_styles[int((idx / len(l_styles)) % len(l_styles))] + elif style == 'marker': +- style = m_styles[(idx / len(m_styles)) % len(m_styles)] ++ style = m_styles[int((idx / len(m_styles)) % len(m_styles))] + + return '%s%s' % (color, style) + +@@ -314,7 +318,7 @@ def generate_output(type, db): + ofile = '%s.png' % type + + if verbose: +- print 'Generating plot into %s' % ofile ++ print('Generating plot into %s' % ofile) + + fig = plt.figure(figsize=plot_size) + ax = fig.add_subplot(111) +@@ -329,7 +333,7 @@ def generate_output(type, db): + legends = None + + keys = [] +- for file in db.iterkeys(): ++ for file in six.iterkeys(db): + if not file in ['min_x', 'max_x', 'min_y', 'max_y']: + keys.append(file) + diff --git a/poky/meta/recipes-kernel/blktrace/blktrace_git.bb b/poky/meta/recipes-kernel/blktrace/blktrace_git.bb index 2605ff916..6903053b5 100644 --- a/poky/meta/recipes-kernel/blktrace/blktrace_git.bb +++ b/poky/meta/recipes-kernel/blktrace/blktrace_git.bb @@ -12,6 +12,7 @@ PV = "1.2.0+git${SRCPV}" SRC_URI = "git://git.kernel.dk/blktrace.git \ file://ldflags.patch \ file://CVE-2018-10689.patch \ + file://make-btt-scripts-python3-ready.patch \ " S = "${WORKDIR}/git" |