summaryrefslogtreecommitdiffstats
path: root/recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2017-07-12 17:02:42 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-07-13 10:54:49 -0400
commitf0f0453984192fd1b250785d2088a84733065c28 (patch)
treeaaffa0ce19816af43f5a1ced614bf9b6c255c5e8 /recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch
parent165ffabe8933d2e44074d67921ea465eab4d90cb (diff)
downloadmeta-virtualization-f0f0453984192fd1b250785d2088a84733065c28.tar.gz
openvswitch: backport py3 fixups
While attempting to get ovs to be built and run with py3 (completely free of py2) host contamination was found (builds on hosts without python-six installed would fail). It was also determined that pyc files were still being generated with py2 and not py3. This resulted in more work being done to achieve the desired results. This work was sent upstream and subsequently merged. Unfortunately this didn't make v2.7.1 and may not be available until the next major release, so here we backport these commits and adjust the recipe to get a clean py3 only build. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch')
-rw-r--r--recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch102
1 files changed, 102 insertions, 0 deletions
diff --git a/recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch b/recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch
new file mode 100644
index 00000000..ddc86db2
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch
@@ -0,0 +1,102 @@
1From 0f318e472d9897d99395adcfb17cbeaff05677ba Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Thu, 29 Jun 2017 20:33:23 -0700
4Subject: [PATCH 4/8] Python3 compatibility: iteritems to items
5
6Commit 4ab665623cbb4c6506e48b82e0c9fe8585f42e13 from
7https://github.com/openvswitch/ovs.git
8
9Allow compability with python3 and python2 by changing iteritems() to
10items().
11
12Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
13Signed-off-by: Ben Pfaff <blp@ovn.org>
14---
15 build-aux/extract-ofp-actions | 2 +-
16 build-aux/extract-ofp-errors | 2 +-
17 build-aux/extract-ofp-fields | 2 +-
18 ovsdb/ovsdb-idlc.in | 8 ++++----
19 4 files changed, 7 insertions(+), 7 deletions(-)
20
21diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
22index 874e6b4..c11297c 100755
23--- a/build-aux/extract-ofp-actions
24+++ b/build-aux/extract-ofp-actions
25@@ -13,7 +13,7 @@ version_map = {"1.0": 0x01,
26 "1.3": 0x04,
27 "1.4": 0x05,
28 "1.5": 0x06}
29-version_reverse_map = dict((v, k) for (k, v) in version_map.iteritems())
30+version_reverse_map = dict((v, k) for (k, v) in version_map.items())
31
32 # Map from vendor name to the length of the action header.
33 vendor_map = {"OF": (0x00000000, 4),
34diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
35index 336a240..71ae0bd 100755
36--- a/build-aux/extract-ofp-errors
37+++ b/build-aux/extract-ofp-errors
38@@ -14,7 +14,7 @@ version_map = {"1.0": 0x01,
39 "1.4": 0x05,
40 "1.5": 0x06,
41 "1.6": 0x07}
42-version_reverse_map = dict((v, k) for (k, v) in version_map.iteritems())
43+version_reverse_map = dict((v, k) for (k, v) in version_map.items())
44
45 token = None
46 line = ""
47diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
48index 61e752b..ef997dd 100755
49--- a/build-aux/extract-ofp-fields
50+++ b/build-aux/extract-ofp-fields
51@@ -16,7 +16,7 @@ VERSION = {"1.0": 0x01,
52 "1.3": 0x04,
53 "1.4": 0x05,
54 "1.5": 0x06}
55-VERSION_REVERSE = dict((v,k) for k, v in VERSION.iteritems())
56+VERSION_REVERSE = dict((v,k) for k, v in VERSION.items())
57
58 TYPES = {"u8": (1, False),
59 "be16": (2, False),
60diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
61index 3fa1a0f..615548f 100755
62--- a/ovsdb/ovsdb-idlc.in
63+++ b/ovsdb/ovsdb-idlc.in
64@@ -138,7 +138,7 @@ def printCIDLHeader(schemaFile):
65 #include "smap.h"
66 #include "uuid.h"''' % {'prefix': prefix.upper()})
67
68- for tableName, table in sorted(schema.tables.iteritems()):
69+ for tableName, table in sorted(schema.tables.items()):
70 structName = "%s%s" % (prefix, tableName.lower())
71
72 print(" ")
73@@ -300,7 +300,7 @@ def printCIDLSource(schemaFile):
74 ''' % schema.idlHeader)
75
76 # Cast functions.
77- for tableName, table in sorted(schema.tables.iteritems()):
78+ for tableName, table in sorted(schema.tables.items()):
79 structName = "%s%s" % (prefix, tableName.lower())
80 print('''
81 static struct %(s)s *
82@@ -311,7 +311,7 @@ static struct %(s)s *
83 ''' % {'s': structName})
84
85
86- for tableName, table in sorted(schema.tables.iteritems()):
87+ for tableName, table in sorted(schema.tables.items()):
88 structName = "%s%s" % (prefix, tableName.lower())
89 print(" ")
90 print("/* %s table. */" % (tableName))
91@@ -1025,7 +1025,7 @@ void
92 # Table classes.
93 print(" ")
94 print("struct ovsdb_idl_table_class %stable_classes[%sN_TABLES] = {" % (prefix, prefix.upper()))
95- for tableName, table in sorted(schema.tables.iteritems()):
96+ for tableName, table in sorted(schema.tables.items()):
97 structName = "%s%s" % (prefix, tableName.lower())
98 if table.is_root:
99 is_root = "true"
100--
1012.5.0
102