All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] FYI: consolidated merge series
@ 2017-07-17 20:04 Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 01/12] openvswitch: uprev to v2.7.1 Bruce Ashfield
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

Hi all,

There's been some ongoing work to get OVS updated to a python3 only
version, updates to get docker + runc to be something more recent and
some other various fixes.

All of these need to work together or we end up breaking docker, runc
and users of the various runtimes that we don't know about.

I just finished testing the latest runc + oci tools + docker + ovs py3
and the smoke tests are passing.

I'm sending out this FYI series which will merge shortly.

Cheers,

Bruce


Bruce Ashfield (3):
  oci-runtime-tools: skip ld checks
  docker: update version string to 17.06.0
  containerd: uprev to latest 0.2.x

Jan Kiszka (2):
  lxc: Fix INITSCRIPT_PARAMS value
  docker: Fix and update sysvinit script

Jason Wessel (5):
  runc-docker: Uprev to 1.0-rc3+
  runc-docker: Add --console-socket=/dev/null
  docker: Uprev to latest based on runc 1.0-rc3
  oci-systemd-hook: Uprev hook to latest
  oci-runtime-tools, oci-runtime-spec: Uprev to runc 1.0-rc3 versions

Mark Asselstine (2):
  openvswitch: uprev to v2.7.1
  openvswitch: backport py3 fixups

 .../containerd/containerd-docker_git.bb            |   14 +-
 recipes-containers/containerd/containerd.inc       |   30 +-
 .../containerd/files/containerd.service            |   11 +
 recipes-containers/docker/docker_git.bb            |   18 +-
 ...-golang.org-x-net-pkg-until-we-move-to-go.patch |   57 +-
 recipes-containers/docker/files/docker.init        |    5 +-
 recipes-containers/lxc/lxc_2.0.8.bb                |    2 +-
 .../oci-runtime-spec/oci-runtime-spec_git.bb       |    6 +-
 .../oci-runtime-tools/oci-runtime-tools_git.bb     |   14 +-
 .../0001-selinux-drop-selinux-support.patch        |   35 +-
 .../oci-systemd-hook/oci-systemd-hook_git.bb       |    2 +-
 ...untime-spec-198f23f827eea397d4331d7eb048d.patch |   89 ++
 .../0001-runc-Add-console-socket-dev-null.patch    |   33 +
 ...-Remove-Platform-as-no-longer-in-OCI-spec.patch |   75 ++
 ...date-memory-specs-to-use-int64-not-uint64.patch |  194 +++
 recipes-containers/runc/runc-docker_git.bb         |   10 +-
 recipes-containers/runc/runc.inc                   |    4 +
 ...gure-Only-link-against-libpcap-on-FreeBSD.patch |   70 --
 ...n3-compatibility-Convert-print-statements.patch | 1264 ++++++++++++++++++++
 ...2-Python3-compatibility-exception-cleanup.patch |   79 ++
 ...03-Python3-compatibility-execfile-to-exec.patch |   33 +
 ...-Python3-compatibility-iteritems-to-items.patch |  102 ++
 ...ython3-compatibility-fix-integer-problems.patch |   51 +
 ...n3-compatibility-math-error-compatibility.patch |   56 +
 ...0007-Python3-compatibility-unicode-to-str.patch |   51 +
 .../0008-AUTHORS-Add-Jason-Wessel.patch            |   28 +
 ...-b29cb89e9e9fe3119b2e5dd5d4fb79141635b7cc.patch |  110 ++
 ...-c298ef781c2d35d939fe163cbc2f41ea7b1cb8d1.patch |  110 --
 recipes-networking/openvswitch/openvswitch.inc     |    1 -
 recipes-networking/openvswitch/openvswitch_git.bb  |   17 +-
 30 files changed, 2283 insertions(+), 288 deletions(-)
 create mode 100644 recipes-containers/containerd/files/containerd.service
 create mode 100644 recipes-containers/runc/runc-docker/0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch
 create mode 100644 recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch
 create mode 100644 recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch
 create mode 100644 recipes-containers/runc/runc-docker/0003-Update-memory-specs-to-use-int64-not-uint64.patch
 delete mode 100644 recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0001-Python3-compatibility-Convert-print-statements.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0002-Python3-compatibility-exception-cleanup.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0005-Python3-compatibility-fix-integer-problems.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0007-Python3-compatibility-unicode-to-str.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0008-AUTHORS-Add-Jason-Wessel.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-b29cb89e9e9fe3119b2e5dd5d4fb79141635b7cc.patch
 delete mode 100644 recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-c298ef781c2d35d939fe163cbc2f41ea7b1cb8d1.patch

-- 
2.4.0.53.g8440f74



^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 01/12] openvswitch: uprev to v2.7.1
  2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
@ 2017-07-17 20:04 ` Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 02/12] openvswitch: backport py3 fixups Bruce Ashfield
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

From: Mark Asselstine <mark.asselstine@windriver.com>

Released at the end of June 2017 this is a bugfix release with no
major functional changes. Surprisingly the patch for CVE-2017-9263 is
still not applied upstream so we continue to carry this change.

The remaining patches were audited and cleaned up as needed.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 ...gure-Only-link-against-libpcap-on-FreeBSD.patch |  70 -------------
 ...-b29cb89e9e9fe3119b2e5dd5d4fb79141635b7cc.patch | 110 +++++++++++++++++++++
 ...-c298ef781c2d35d939fe163cbc2f41ea7b1cb8d1.patch | 110 ---------------------
 recipes-networking/openvswitch/openvswitch_git.bb  |   4 +-
 4 files changed, 112 insertions(+), 182 deletions(-)
 delete mode 100644 recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-b29cb89e9e9fe3119b2e5dd5d4fb79141635b7cc.patch
 delete mode 100644 recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-c298ef781c2d35d939fe163cbc2f41ea7b1cb8d1.patch

diff --git a/recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch b/recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch
deleted file mode 100644
index 0a44b85ebf43..000000000000
--- a/recipes-networking/openvswitch/files/configure-Only-link-against-libpcap-on-FreeBSD.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From d30e714ccb9d13caf39d14d5b2fc9523b678ed51 Mon Sep 17 00:00:00 2001
-From: Ben Pfaff <blp@nicira.com>
-Date: Thu, 14 Mar 2013 15:20:55 -0700
-Subject: [PATCH] configure: Only link against libpcap on FreeBSD.
-
-commit d30e714ccb9d13caf39d14d5b2fc9523b678ed51 upstream
-http://git.openvswitch.org/git/openvswitch
-
-On other platforms there is no benefit to linking against libpcap, because
-it is not used.
-
-Signed-off-by: Ben Pfaff <blp@nicira.com>
-CC: Ed Maste <emaste@freebsd.org>
----
- acinclude.m4 | 7 ++++++-
- configure.ac | 3 +--
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index f0610c9..19a47dd 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -1,6 +1,6 @@
- # -*- autoconf -*-
- 
--# Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
-+# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
-@@ -295,6 +295,8 @@ AC_DEFUN([OVS_CHECK_IF_PACKET],
-    fi])
- 
- dnl Checks for net/if_dl.h.
-+dnl
-+dnl (We use this as a proxy for checking whether we're building on FreeBSD.)
- AC_DEFUN([OVS_CHECK_IF_DL],
-   [AC_CHECK_HEADER([net/if_dl.h],
-                    [HAVE_IF_DL=yes],
-@@ -303,6 +305,9 @@ AC_DEFUN([OVS_CHECK_IF_DL],
-    if test "$HAVE_IF_DL" = yes; then
-       AC_DEFINE([HAVE_IF_DL], [1],
-                 [Define to 1 if net/if_dl.h is available.])
-+
-+      # On FreeBSD we use libpcap to access network devices.
-+      AC_SEARCH_LIBS([pcap_open_live], [pcap])
-    fi])
- 
- dnl Checks for buggy strtok_r.
-diff --git a/configure.ac b/configure.ac
-index 1cacd29..bd49179 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1,4 +1,4 @@
--# Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
-+# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
-@@ -44,7 +44,6 @@ AC_SYS_LARGEFILE
- AC_SEARCH_LIBS([pow], [m])
- AC_SEARCH_LIBS([clock_gettime], [rt])
- AC_SEARCH_LIBS([timer_create], [rt])
--AC_SEARCH_LIBS([pcap_open_live], [pcap])
- 
- OVS_CHECK_ESX
- OVS_CHECK_COVERAGE
--- 
-1.8.3.2
-
diff --git a/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-b29cb89e9e9fe3119b2e5dd5d4fb79141635b7cc.patch b/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-b29cb89e9e9fe3119b2e5dd5d4fb79141635b7cc.patch
new file mode 100644
index 000000000000..47c81dd98c18
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-b29cb89e9e9fe3119b2e5dd5d4fb79141635b7cc.patch
@@ -0,0 +1,110 @@
+From a2a656e6976a60e5df3ade0d17a40b4ebdc2b41a Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Wed, 30 Mar 2016 06:23:45 -0400
+Subject: [PATCH] openvswitch: Add test-install rule to support ptest execution
+
+Signed-off-by: Radu Patriu <radu.patriu@enea.com>
+
+Fix ptest for v2.5
+ - Copy certain files from srcdir since it has been different from
+   build directory.
+ - Copy more necessary files for new added test cases.
+ - Modify config files for running on target.
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ Makefile.am |  1 +
+ test.mk     | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 73 insertions(+)
+ create mode 100644 test.mk
+
+diff --git a/Makefile.am b/Makefile.am
+index a4dd7b8..0bd32c7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -429,3 +429,4 @@ include windows/automake.mk
+ include ovn/automake.mk
+ include selinux/automake.mk
+ include build-aux/automake.mk
++include test.mk
+diff --git a/test.mk b/test.mk
+new file mode 100644
+index 0000000..b10a581
+--- /dev/null
++++ b/test.mk
+@@ -0,0 +1,72 @@
++TEST_DEST ?= ${prefix}/lib/openvswitch
++TEST_ROOT ?= ${prefix}/lib/openvswitch
++TEST_DEPEND =
++
++if HAVE_OPENSSL
++TEST_DEPEND += $(TESTPKI_FILES)
++endif
++
++test-install: $(TEST_DEPEND)
++	@list='$(noinst_PROGRAMS) $(EXTRA_DIST) $(dist_check_SCRIPTS) $(TEST_DEPEND) tests/atlocal tests/atconfig' ;\
++	install -d $(TEST_DEST)/tests ;\
++	install $(srcdir)/vtep/ovs-vtep $(TEST_DEST)/tests ;\
++	install -d $(TEST_DEST)/python ;\
++	install -d $(TEST_DEST)/python/ovs ;\
++	install -d $(TEST_DEST)/python/ovs/db ;\
++	install -d $(TEST_DEST)/python/ovs/unixctl ;\
++	install -d $(TEST_DEST)/vswitchd ;\
++	install $(srcdir)/vswitchd/vswitch.ovsschema $(TEST_DEST)/vswitchd ;\
++	install vswitchd/ovs-vswitchd $(TEST_DEST)/vswitchd ;\
++	install -d $(TEST_DEST)/debian ;\
++	install $(srcdir)/debian/ovs-monitor-ipsec $(TEST_DEST)/debian ;\
++	install -d $(TEST_DEST)/build-aux ;\
++	install $(srcdir)/build-aux/check-structs $(TEST_DEST)/build-aux ;\
++	install -d $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/opt_xensource_libexec_interface-reconfigure $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigure.py $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py $(TEST_DEST)/xenserver ;\
++	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py $(TEST_DEST)/xenserver ;\
++	install -d $(TEST_DEST)/vtep ;\
++	install $(srcdir)/vtep/vtep.ovsschema $(TEST_DEST)/vtep ;\
++	install -d $(TEST_DEST)/ovn ;\
++	install $(srcdir)/ovn/ovn-nb.ovsschema $(TEST_DEST)/ovn ;\
++	install $(srcdir)/ovn/ovn-sb.ovsschema $(TEST_DEST)/ovn ;\
++	install -d $(TEST_DEST)/utilities ;\
++	install $(srcdir)/utilities/ovs-pcap.in $(TEST_DEST)/utilities ;\
++	install $(srcdir)/utilities/ovs-pki.in $(TEST_DEST)/utilities ;\
++	for p in $$list ; do \
++	  echo $$p ;\
++	  p=$${p#../git/} ;\
++	  pre=$${p#tests\/} ;\
++	  if test $$pre != $$p ; then \
++	    echo installing $$p to $(TEST_DEST)/tests/$$pre ;\
++	    if test -f $$p ; then \
++	      install $$p $(TEST_DEST)/tests/$$pre ;\
++	    else \
++	      install $(srcdir)/$$p $(TEST_DEST)/tests/$$pre ;\
++	    fi ;\
++	    continue ;\
++	  fi ;\
++	  pre=$${p#python\/ovs\/} ;\
++	  if test $$pre != $$p ; then \
++	    echo installing $$p to $(TEST_DEST)/python/ovs/$$pre ;\
++	    if test -f $$p ; then \
++	      install $$p $(TEST_DEST)/python/ovs/$$pre ;\
++	    else \
++	      install $(srcdir)/$$p $(TEST_DEST)/python/ovs/$$pre ;\
++	    fi ;\
++	    continue ;\
++	  fi; \
++	done ;\
++	sed -i 's|abs_builddir=.*|abs_builddir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|abs_srcdir=.*|abs_srcdir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|abs_top_srcdir=.*|abs_top_srcdir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|abs_top_builddir=.*|abs_top_builddir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|at_srcdir=.*|at_srcdir='"'"'.'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|at_top_srcdir=.*|at_top_srcdir='"'"'..'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|at_top_build_prefix=.*|at_top_build_prefix='"'"'../'"'"'|g' $(TEST_DEST)/tests/atconfig
++	sed -i 's|^\(.*config\.log.*\)|#\1|g' $(TEST_DEST)/tests/testsuite
++	sed -i 's|$$srcdir|$$abs_srcdir|g' $(TEST_DEST)/tests/testsuite
++	sed -i 's|ovs-appctl-bashcomp\.bash|/etc/bash_completion.d/ovs-appctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
++	sed -i 's|ovs-vsctl-bashcomp\.bash|/etc/bash_completion.d/ovs-vsctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
+-- 
+2.7.4
+
diff --git a/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-c298ef781c2d35d939fe163cbc2f41ea7b1cb8d1.patch b/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-c298ef781c2d35d939fe163cbc2f41ea7b1cb8d1.patch
deleted file mode 100644
index 47c81dd98c18..000000000000
--- a/recipes-networking/openvswitch/openvswitch-git/openvswitch-add-ptest-c298ef781c2d35d939fe163cbc2f41ea7b1cb8d1.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From a2a656e6976a60e5df3ade0d17a40b4ebdc2b41a Mon Sep 17 00:00:00 2001
-From: He Zhe <zhe.he@windriver.com>
-Date: Wed, 30 Mar 2016 06:23:45 -0400
-Subject: [PATCH] openvswitch: Add test-install rule to support ptest execution
-
-Signed-off-by: Radu Patriu <radu.patriu@enea.com>
-
-Fix ptest for v2.5
- - Copy certain files from srcdir since it has been different from
-   build directory.
- - Copy more necessary files for new added test cases.
- - Modify config files for running on target.
-
-Signed-off-by: He Zhe <zhe.he@windriver.com>
----
- Makefile.am |  1 +
- test.mk     | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 73 insertions(+)
- create mode 100644 test.mk
-
-diff --git a/Makefile.am b/Makefile.am
-index a4dd7b8..0bd32c7 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -429,3 +429,4 @@ include windows/automake.mk
- include ovn/automake.mk
- include selinux/automake.mk
- include build-aux/automake.mk
-+include test.mk
-diff --git a/test.mk b/test.mk
-new file mode 100644
-index 0000000..b10a581
---- /dev/null
-+++ b/test.mk
-@@ -0,0 +1,72 @@
-+TEST_DEST ?= ${prefix}/lib/openvswitch
-+TEST_ROOT ?= ${prefix}/lib/openvswitch
-+TEST_DEPEND =
-+
-+if HAVE_OPENSSL
-+TEST_DEPEND += $(TESTPKI_FILES)
-+endif
-+
-+test-install: $(TEST_DEPEND)
-+	@list='$(noinst_PROGRAMS) $(EXTRA_DIST) $(dist_check_SCRIPTS) $(TEST_DEPEND) tests/atlocal tests/atconfig' ;\
-+	install -d $(TEST_DEST)/tests ;\
-+	install $(srcdir)/vtep/ovs-vtep $(TEST_DEST)/tests ;\
-+	install -d $(TEST_DEST)/python ;\
-+	install -d $(TEST_DEST)/python/ovs ;\
-+	install -d $(TEST_DEST)/python/ovs/db ;\
-+	install -d $(TEST_DEST)/python/ovs/unixctl ;\
-+	install -d $(TEST_DEST)/vswitchd ;\
-+	install $(srcdir)/vswitchd/vswitch.ovsschema $(TEST_DEST)/vswitchd ;\
-+	install vswitchd/ovs-vswitchd $(TEST_DEST)/vswitchd ;\
-+	install -d $(TEST_DEST)/debian ;\
-+	install $(srcdir)/debian/ovs-monitor-ipsec $(TEST_DEST)/debian ;\
-+	install -d $(TEST_DEST)/build-aux ;\
-+	install $(srcdir)/build-aux/check-structs $(TEST_DEST)/build-aux ;\
-+	install -d $(TEST_DEST)/xenserver ;\
-+	install $(srcdir)/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync $(TEST_DEST)/xenserver ;\
-+	install $(srcdir)/xenserver/opt_xensource_libexec_interface-reconfigure $(TEST_DEST)/xenserver ;\
-+	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigure.py $(TEST_DEST)/xenserver ;\
-+	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py $(TEST_DEST)/xenserver ;\
-+	install $(srcdir)/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py $(TEST_DEST)/xenserver ;\
-+	install -d $(TEST_DEST)/vtep ;\
-+	install $(srcdir)/vtep/vtep.ovsschema $(TEST_DEST)/vtep ;\
-+	install -d $(TEST_DEST)/ovn ;\
-+	install $(srcdir)/ovn/ovn-nb.ovsschema $(TEST_DEST)/ovn ;\
-+	install $(srcdir)/ovn/ovn-sb.ovsschema $(TEST_DEST)/ovn ;\
-+	install -d $(TEST_DEST)/utilities ;\
-+	install $(srcdir)/utilities/ovs-pcap.in $(TEST_DEST)/utilities ;\
-+	install $(srcdir)/utilities/ovs-pki.in $(TEST_DEST)/utilities ;\
-+	for p in $$list ; do \
-+	  echo $$p ;\
-+	  p=$${p#../git/} ;\
-+	  pre=$${p#tests\/} ;\
-+	  if test $$pre != $$p ; then \
-+	    echo installing $$p to $(TEST_DEST)/tests/$$pre ;\
-+	    if test -f $$p ; then \
-+	      install $$p $(TEST_DEST)/tests/$$pre ;\
-+	    else \
-+	      install $(srcdir)/$$p $(TEST_DEST)/tests/$$pre ;\
-+	    fi ;\
-+	    continue ;\
-+	  fi ;\
-+	  pre=$${p#python\/ovs\/} ;\
-+	  if test $$pre != $$p ; then \
-+	    echo installing $$p to $(TEST_DEST)/python/ovs/$$pre ;\
-+	    if test -f $$p ; then \
-+	      install $$p $(TEST_DEST)/python/ovs/$$pre ;\
-+	    else \
-+	      install $(srcdir)/$$p $(TEST_DEST)/python/ovs/$$pre ;\
-+	    fi ;\
-+	    continue ;\
-+	  fi; \
-+	done ;\
-+	sed -i 's|abs_builddir=.*|abs_builddir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|abs_srcdir=.*|abs_srcdir='"'"'$(TEST_ROOT)/tests'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|abs_top_srcdir=.*|abs_top_srcdir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|abs_top_builddir=.*|abs_top_builddir='"'"'$(TEST_ROOT)'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|at_srcdir=.*|at_srcdir='"'"'.'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|at_top_srcdir=.*|at_top_srcdir='"'"'..'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|at_top_build_prefix=.*|at_top_build_prefix='"'"'../'"'"'|g' $(TEST_DEST)/tests/atconfig
-+	sed -i 's|^\(.*config\.log.*\)|#\1|g' $(TEST_DEST)/tests/testsuite
-+	sed -i 's|$$srcdir|$$abs_srcdir|g' $(TEST_DEST)/tests/testsuite
-+	sed -i 's|ovs-appctl-bashcomp\.bash|/etc/bash_completion.d/ovs-appctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
-+	sed -i 's|ovs-vsctl-bashcomp\.bash|/etc/bash_completion.d/ovs-vsctl-bashcomp\.bash|g' $(TEST_DEST)/tests/testsuite
--- 
-2.7.4
-
diff --git a/recipes-networking/openvswitch/openvswitch_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb
index a2893e9da0a5..39726075953e 100644
--- a/recipes-networking/openvswitch/openvswitch_git.bb
+++ b/recipes-networking/openvswitch/openvswitch_git.bb
@@ -12,11 +12,11 @@ RDEPENDS_${PN}-ptest += "\
 	"
 
 S = "${WORKDIR}/git"
-PV = "2.7.0+${SRCREV}"
+PV = "2.7.1+${SRCREV}"
 
 FILESEXTRAPATHS_append := "${THISDIR}/${PN}-git:"
 
-SRCREV = "c298ef781c2d35d939fe163cbc2f41ea7b1cb8d1"
+SRCREV = "b29cb89e9e9fe3119b2e5dd5d4fb79141635b7cc"
 SRC_URI = "file://openvswitch-switch \
            file://openvswitch-switch-setup \
            file://openvswitch-testcontroller \
-- 
2.4.0.53.g8440f74



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 02/12] openvswitch: backport py3 fixups
  2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 01/12] openvswitch: uprev to v2.7.1 Bruce Ashfield
@ 2017-07-17 20:04 ` Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 03/12] runc-docker: Uprev to 1.0-rc3+ Bruce Ashfield
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

From: Mark Asselstine <mark.asselstine@windriver.com>

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>
---
 ...n3-compatibility-Convert-print-statements.patch | 1264 ++++++++++++++++++++
 ...2-Python3-compatibility-exception-cleanup.patch |   79 ++
 ...03-Python3-compatibility-execfile-to-exec.patch |   33 +
 ...-Python3-compatibility-iteritems-to-items.patch |  102 ++
 ...ython3-compatibility-fix-integer-problems.patch |   51 +
 ...n3-compatibility-math-error-compatibility.patch |   56 +
 ...0007-Python3-compatibility-unicode-to-str.patch |   51 +
 .../0008-AUTHORS-Add-Jason-Wessel.patch            |   28 +
 recipes-networking/openvswitch/openvswitch.inc     |    1 -
 recipes-networking/openvswitch/openvswitch_git.bb  |   13 +
 10 files changed, 1677 insertions(+), 1 deletion(-)
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0001-Python3-compatibility-Convert-print-statements.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0002-Python3-compatibility-exception-cleanup.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0005-Python3-compatibility-fix-integer-problems.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0007-Python3-compatibility-unicode-to-str.patch
 create mode 100644 recipes-networking/openvswitch/openvswitch-git/0008-AUTHORS-Add-Jason-Wessel.patch

diff --git a/recipes-networking/openvswitch/openvswitch-git/0001-Python3-compatibility-Convert-print-statements.patch b/recipes-networking/openvswitch/openvswitch-git/0001-Python3-compatibility-Convert-print-statements.patch
new file mode 100644
index 000000000000..d6197588d6d0
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/0001-Python3-compatibility-Convert-print-statements.patch
@@ -0,0 +1,1264 @@
+From c5c18f9c5f1b7217d43af43be9736c1762c7ebba Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Thu, 29 Jun 2017 20:33:23 -0700
+Subject: [PATCH 1/8] Python3 compatibility: Convert print statements
+
+Commit d34a1cc02536f9a812517a71accec3fbd3c6c98b from
+https://github.com/openvswitch/ovs.git
+
+This patch fixes up all the print statements to work with python3 or
+python2.
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+Signed-off-by: Ben Pfaff <blp@ovn.org>
+---
+ build-aux/check-structs       |   4 +-
+ build-aux/extract-ofp-actions |  68 +++---
+ build-aux/extract-ofp-errors  |   2 +-
+ build-aux/extract-ofp-fields  |   2 +-
+ build-aux/extract-ofp-msgs    |   6 +-
+ ovsdb/ovsdb-doc               |   6 +-
+ ovsdb/ovsdb-idlc.in           | 523 +++++++++++++++++++++---------------------
+ 7 files changed, 306 insertions(+), 305 deletions(-)
+
+diff --git a/build-aux/check-structs b/build-aux/check-structs
+index f79f235..bae511f 100755
+--- a/build-aux/check-structs
++++ b/build-aux/check-structs
+@@ -211,7 +211,7 @@ def checkStructs():
+ 
+     if '--help' in sys.argv:
+         argv0 = os.path.basename(sys.argv[0])
+-        print '''\
++        print('''\
+ %(argv0)s, for checking struct and struct member alignment
+ usage: %(argv0)s -Ipath HEADER [HEADER]...
+ 
+@@ -226,7 +226,7 @@ assertions using OFP_ASSERT.
+ 
+ This program is specialized for reading Open vSwitch's OpenFlow header
+ files.  It will not work on arbitrary header files without extensions.\
+-''' % {"argv0": argv0}
++''' % {"argv0": argv0})
+         sys.exit(0)
+ 
+     global fileName
+diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
+index 0062ab8..874e6b4 100755
+--- a/build-aux/extract-ofp-actions
++++ b/build-aux/extract-ofp-actions
+@@ -67,7 +67,7 @@ def fatal(msg):
+ 
+ def usage():
+     argv0 = os.path.basename(sys.argv[0])
+-    print ('''\
++    print('''\
+ %(argv0)s, for extracting OpenFlow action data
+ usage: %(argv0)s OFP_ACTIONS.C [--prototypes | --definitions]
+ 
+@@ -238,36 +238,36 @@ def extract_ofp_actions(fn, definitions):
+     if n_errors:
+         sys.exit(1)
+ 
+-    print """\
++    print("""\
+ /* Generated automatically; do not modify!     -*- buffer-read-only: t -*- */
+-"""
++""")
+ 
+     if definitions:
+-        print "/* Verify that structs used as actions are reasonable sizes. */"
++        print("/* Verify that structs used as actions are reasonable sizes. */")
+         for s in sorted(arg_structs):
+-            print "BUILD_ASSERT_DECL(sizeof(%s) %% OFP_ACTION_ALIGN == 0);" % s
++            print("BUILD_ASSERT_DECL(sizeof(%s) %% OFP_ACTION_ALIGN == 0);" % s)
+ 
+-        print "\nstatic struct ofpact_raw_instance all_raw_instances[] = {"
++        print("\nstatic struct ofpact_raw_instance all_raw_instances[] = {")
+         for vendor in domain:
+             for type_ in domain[vendor]:
+                 for version in domain[vendor][type_]:
+                     d = domain[vendor][type_][version]
+-                    print "    { { 0x%08x, %2d, 0x%02x }, " % (
+-                        vendor, type_, version)
+-                    print "      %s," % d["enum"]
+-                    print "      HMAP_NODE_NULL_INITIALIZER,"
+-                    print "      HMAP_NODE_NULL_INITIALIZER,"
+-                    print "      %s," % d["min_length"]
+-                    print "      %s," % d["max_length"]
+-                    print "      %s," % d["arg_ofs"]
+-                    print "      %s," % d["arg_len"]
+-                    print "      \"%s\"," % re.sub('_RAW[0-9]*', '', d["enum"], 1)
++                    print("    { { 0x%08x, %2d, 0x%02x }, " % (
++                        vendor, type_, version))
++                    print("      %s," % d["enum"])
++                    print("      HMAP_NODE_NULL_INITIALIZER,")
++                    print("      HMAP_NODE_NULL_INITIALIZER,")
++                    print("      %s," % d["min_length"])
++                    print("      %s," % d["max_length"])
++                    print("      %s," % d["arg_ofs"])
++                    print("      %s," % d["arg_len"])
++                    print("      \"%s\"," % re.sub('_RAW[0-9]*', '', d["enum"], 1))
+                     if d["deprecation"]:
+-                        print "      \"%s\"," % re.sub(r'(["\\])', r'\\\1', d["deprecation"])
++                        print("      \"%s\"," % re.sub(r'(["\\])', r'\\\1', d["deprecation"]))
+                     else:
+-                        print "      NULL,"
+-                    print "    },"
+-        print "};";
++                        print("      NULL,")
++                    print("    },")
++        print("};")
+ 
+     for versions in enums.values():
+         need_ofp_version = False
+@@ -314,11 +314,11 @@ def extract_ofp_actions(fn, definitions):
+             decl += "}"
+         else:
+             decl += ";"
+-        print decl
+-        print
++        print(decl)
++        print("")
+ 
+     if definitions:
+-        print """\
++        print("""\
+ static enum ofperr
+ ofpact_decode(const struct ofp_action_header *a, enum ofp_raw_action_type raw,
+               enum ofp_version version, uint64_t arg,
+@@ -326,14 +326,14 @@ ofpact_decode(const struct ofp_action_header *a, enum ofp_raw_action_type raw,
+               uint64_t *tlv_bitmap, struct ofpbuf *out)
+ {
+     switch (raw) {\
+-"""
++""")
+         for versions in enums.values():
+             enum = versions[0]["enum"]
+-            print "    case %s:" % enum
++            print("    case %s:" % enum)
+             base_argtype = versions[0]["base_argtype"]
+             arg_vl_mff_map = versions[0]["arg_vl_mff_map"]
+             if base_argtype == 'void':
+-                print "        return decode_%s(out);" % enum
++                print("        return decode_%s(out);" % enum)
+             else:
+                 if base_argtype.startswith('struct'):
+                     arg = "ALIGNED_CAST(const %s *, a)" % base_argtype
+@@ -344,16 +344,16 @@ ofpact_decode(const struct ofp_action_header *a, enum ofp_raw_action_type raw,
+                     else:
+                         arg = "arg"
+                 if arg_vl_mff_map:
+-                    print "        return decode_%s(%s, version, vl_mff_map, tlv_bitmap, out);" % (enum, arg)
++                    print("        return decode_%s(%s, version, vl_mff_map, tlv_bitmap, out);" % (enum, arg))
+                 else:
+-                    print "        return decode_%s(%s, version, out);" % (enum, arg)
+-            print
+-        print """\
++                    print("        return decode_%s(%s, version, out);" % (enum, arg))
++            print("")
++        print("""\
+     default:
+         OVS_NOT_REACHED();
+     }
+ }\
+-"""
++""")
+     else:
+         for versions in enums.values():
+             enum = versions[0]["enum"]
+@@ -368,15 +368,15 @@ ofpact_decode(const struct ofp_action_header *a, enum ofp_raw_action_type raw,
+                 if arg_vl_mff_map:
+                     prototype += 'const struct vl_mff_map *, uint64_t *, '
+             prototype += "struct ofpbuf *);"
+-            print prototype
++            print(prototype)
+ 
+-        print """
++        print("""
+ static enum ofperr ofpact_decode(const struct ofp_action_header *,
+                                  enum ofp_raw_action_type raw,
+                                  enum ofp_version version,
+                                  uint64_t arg, const struct vl_mff_map *vl_mff_map,
+                                  uint64_t *tlv_bitmap, struct ofpbuf *out);
+-"""
++""")
+ 
+ if __name__ == '__main__':
+     if '--help' in sys.argv:
+diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
+index 2312b76..336a240 100755
+--- a/build-aux/extract-ofp-errors
++++ b/build-aux/extract-ofp-errors
+@@ -426,7 +426,7 @@ static const struct ofperr_domain %s = {
+                 vendor, type_, code = map[enum]
+                 if code == None:
+                     code = -1
+-                print "        { %#8x, %2d, %3d }, /* %s */" % (vendor, type_, code, enum)
++                print ("        { %#8x, %2d, %3d }, /* %s */" % (vendor, type_, code, enum))
+             else:
+                 print ("        {       -1, -1,  -1 }, /* %s */" % enum)
+         print ("""\
+diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
+index 498b887..425a85f 100755
+--- a/build-aux/extract-ofp-fields
++++ b/build-aux/extract-ofp-fields
+@@ -728,7 +728,7 @@ def make_ovs_fields(meta_flow_h, meta_flow_xml):
+ ovs\-fields \- protocol header fields in OpenFlow and Open vSwitch
+ .
+ .PP
+-''') % version
++''' % version)
+ 
+     recursively_replace(doc, 'oxm_classes', make_oxm_classes_xml(document))
+ 
+diff --git a/build-aux/extract-ofp-msgs b/build-aux/extract-ofp-msgs
+index 1813638..a67e870 100755
+--- a/build-aux/extract-ofp-msgs
++++ b/build-aux/extract-ofp-msgs
+@@ -56,14 +56,14 @@ def fatal(msg):
+ 
+ def usage():
+     argv0 = os.path.basename(sys.argv[0])
+-    print '''\
++    print('''\
+ %(argv0)s, for extracting OpenFlow message types from header files
+ usage: %(argv0)s INPUT OUTPUT
+   where INPUT is the name of the input header file
+     and OUTPUT is the output file name.
+ Despite OUTPUT, the output is written to stdout, and the OUTPUT argument
+ only controls #line directives in the output.\
+-''' % {"argv0": argv0}
++''' % {"argv0": argv0})
+     sys.exit(0)
+ 
+ def make_sizeof(s):
+@@ -378,5 +378,5 @@ if __name__ == '__main__':
+         line_number = 0
+ 
+         for line in extract_ofp_msgs(sys.argv[2]):
+-            print line
++            print(line)
+         
+diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc
+index 5cf26ee..b34fb11 100755
+--- a/ovsdb/ovsdb-doc
++++ b/ovsdb/ovsdb-doc
+@@ -258,7 +258,7 @@ represent strong references; thin lines represent weak references.
+     return s
+ 
+ def usage():
+-    print """\
++    print("""\
+ %(argv0)s: ovsdb schema documentation generator
+ Prints documentation for an OVSDB schema as an nroff-formatted manpage.
+ usage: %(argv0)s [OPTIONS] SCHEMA XML
+@@ -269,7 +269,7 @@ The following options are also available:
+   --er-diagram=DIAGRAM.PIC    include E-R diagram from DIAGRAM.PIC
+   --version=VERSION           use VERSION to display on document footer
+   -h, --help                  display this help message\
+-""" % {'argv0': argv0}
++""" % {'argv0': argv0})
+     sys.exit(0)
+ 
+ if __name__ == "__main__":
+@@ -304,7 +304,7 @@ if __name__ == "__main__":
+         for line in s.split("\n"):
+             line = line.strip()
+             if len(line):
+-                print line
++                print(line)
+ 
+     except error.Error, e:
+         sys.stderr.write("%s: %s\n" % (argv0, e.msg))
+diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
+index 721ab50..1064448 100755
+--- a/ovsdb/ovsdb-idlc.in
++++ b/ovsdb/ovsdb-idlc.in
+@@ -1,5 +1,6 @@
+ #! @PYTHON@
+ 
++from __future__ import print_function
+ import getopt
+ import os
+ import re
+@@ -123,7 +124,7 @@ def sorted_columns(table):
+ def printCIDLHeader(schemaFile):
+     schema = parseSchema(schemaFile)
+     prefix = schema.idlPrefix
+-    print '''\
++    print('''\
+ /* Generated automatically -- do not modify!    -*- buffer-read-only: t -*- */
+ 
+ #ifndef %(prefix)sIDL_HEADER
+@@ -135,39 +136,39 @@ def printCIDLHeader(schemaFile):
+ #include "ovsdb-data.h"
+ #include "ovsdb-idl-provider.h"
+ #include "smap.h"
+-#include "uuid.h"''' % {'prefix': prefix.upper()}
++#include "uuid.h"''' % {'prefix': prefix.upper()})
+ 
+     for tableName, table in sorted(schema.tables.iteritems()):
+         structName = "%s%s" % (prefix, tableName.lower())
+ 
+-        print "\f"
+-        print "/* %s table. */" % tableName
+-        print "struct %s {" % structName
+-        print "\tstruct ovsdb_idl_row header_;"
++        print("\f")
++        print("/* %s table. */" % tableName)
++        print("struct %s {" % structName)
++        print("\tstruct ovsdb_idl_row header_;")
+         for columnName, column in sorted_columns(table):
+-            print "\n\t/* %s column. */" % columnName
++            print("\n\t/* %s column. */" % columnName)
+             comment, members = cMembers(prefix, tableName,
+                                         columnName, column, False)
+             for member in members:
+-                print "\t%(type)s%(name)s;%(comment)s" % member
+-        print "};"
++                print("\t%(type)s%(name)s;%(comment)s" % member)
++        print("};")
+ 
+         # Column indexes.
+         printEnum("%s_column_id" % structName.lower(), ["%s_COL_%s" % (structName.upper(), columnName.upper())
+                                                         for columnName, column in sorted_columns(table)]
+                   + ["%s_N_COLUMNS" % structName.upper()])
+ 
+-        print
++        print("")
+         for columnName in table.columns:
+-            print "#define %(s)s_col_%(c)s (%(s)s_columns[%(S)s_COL_%(C)s])" % {
++            print("#define %(s)s_col_%(c)s (%(s)s_columns[%(S)s_COL_%(C)s])" % {
+                 's': structName,
+                 'S': structName.upper(),
+                 'c': columnName,
+-                'C': columnName.upper()}
++                'C': columnName.upper()})
+ 
+-        print "\nextern struct ovsdb_idl_column %s_columns[%s_N_COLUMNS];" % (structName, structName.upper())
++        print("\nextern struct ovsdb_idl_column %s_columns[%s_N_COLUMNS];" % (structName, structName.upper()))
+ 
+-        print '''
++        print('''
+ const struct %(s)s *%(s)s_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
+ const struct %(s)s *%(s)s_first(const struct ovsdb_idl *);
+ const struct %(s)s *%(s)s_next(const struct %(s)s *);
+@@ -205,87 +206,87 @@ void %(s)s_init(struct %(s)s *);
+ void %(s)s_delete(const struct %(s)s *);
+ struct %(s)s *%(s)s_insert(struct ovsdb_idl_txn *);
+ bool %(s)s_is_updated(const struct %(s)s *, enum %(s)s_column_id);
+-''' % {'s': structName, 'S': structName.upper()}
++''' % {'s': structName, 'S': structName.upper()})
+ 
+         for columnName, column in sorted_columns(table):
+-            print 'void %(s)s_verify_%(c)s(const struct %(s)s *);' % {'s': structName, 'c': columnName}
++            print('void %(s)s_verify_%(c)s(const struct %(s)s *);' % {'s': structName, 'c': columnName})
+ 
+-        print
++        print("")
+         for columnName, column in sorted_columns(table):
+             if column.type.value:
+                 valueParam = ', enum ovsdb_atomic_type value_type'
+             else:
+                 valueParam = ''
+-            print 'const struct ovsdb_datum *%(s)s_get_%(c)s(const struct %(s)s *, enum ovsdb_atomic_type key_type%(v)s);' % {
+-                's': structName, 'c': columnName, 'v': valueParam}
++            print('const struct ovsdb_datum *%(s)s_get_%(c)s(const struct %(s)s *, enum ovsdb_atomic_type key_type%(v)s);' % {
++                's': structName, 'c': columnName, 'v': valueParam})
+ 
+-        print
++        print("")
+         for columnName, column in sorted_columns(table):
+-            print 'void %(s)s_set_%(c)s(const struct %(s)s *,' % {'s': structName, 'c': columnName},
++            print('void %(s)s_set_%(c)s(const struct %(s)s *,' % {'s': structName, 'c': columnName}, end=' ')
+             if column.type.is_smap():
+                 args = ['const struct smap *']
+             else:
+                 comment, members = cMembers(prefix, tableName, columnName,
+                                             column, True)
+                 args = ['%(type)s%(name)s' % member for member in members]
+-            print '%s);' % ', '.join(args)
++            print('%s);' % ', '.join(args))
+ 
+-        print
++        print("")
+         for columnName, column in sorted_columns(table):
+             if column.type.is_map():
+-                print 'void %(s)s_update_%(c)s_setkey(const struct %(s)s *, ' % {'s': structName, 'c': columnName},
+-                print '%(coltype)s, %(valtype)s);' % {'coltype':column.type.key.to_const_c_type(prefix), 'valtype':column.type.value.to_const_c_type(prefix)}
+-                print 'void %(s)s_update_%(c)s_delkey(const struct %(s)s *, ' % {'s': structName, 'c': columnName},
+-                print '%(coltype)s);' % {'coltype':column.type.key.to_const_c_type(prefix)}
++                print('void %(s)s_update_%(c)s_setkey(const struct %(s)s *, ' % {'s': structName, 'c': columnName}, end=' ')
++                print('%(coltype)s, %(valtype)s);' % {'coltype':column.type.key.to_const_c_type(prefix), 'valtype':column.type.value.to_const_c_type(prefix)})
++                print('void %(s)s_update_%(c)s_delkey(const struct %(s)s *, ' % {'s': structName, 'c': columnName}, end=' ')
++                print('%(coltype)s);' % {'coltype':column.type.key.to_const_c_type(prefix)})
+             if column.type.is_set():
+-                print 'void %(s)s_update_%(c)s_addvalue(const struct %(s)s *, ' % {'s': structName, 'c': columnName},
+-                print '%(valtype)s);' % {'valtype':column.type.key.to_const_c_type(prefix)}
+-                print 'void %(s)s_update_%(c)s_delvalue(const struct %(s)s *, ' % {'s': structName, 'c': columnName},
+-                print '%(valtype)s);' % {'valtype':column.type.key.to_const_c_type(prefix)}
++                print('void %(s)s_update_%(c)s_addvalue(const struct %(s)s *, ' % {'s': structName, 'c': columnName}, end=' ')
++                print('%(valtype)s);' % {'valtype':column.type.key.to_const_c_type(prefix)})
++                print('void %(s)s_update_%(c)s_delvalue(const struct %(s)s *, ' % {'s': structName, 'c': columnName}, end=' ')
++                print('%(valtype)s);' % {'valtype':column.type.key.to_const_c_type(prefix)})
+ 
+-            print 'void %(s)s_add_clause_%(c)s(struct ovsdb_idl_condition *, enum ovsdb_function function,' % {'s': structName, 'c': columnName},
++            print('void %(s)s_add_clause_%(c)s(struct ovsdb_idl_condition *, enum ovsdb_function function,' % {'s': structName, 'c': columnName}, end=' ')
+             if column.type.is_smap():
+                 args = ['const struct smap *']
+             else:
+                 comment, members = cMembers(prefix, tableName, columnName,
+                                             column, True, refTable=False)
+                 args = ['%(type)s%(name)s' % member for member in members]
+-            print '%s);' % ', '.join(args)
++            print('%s);' % ', '.join(args))
+ 
+-            print 'void %(s)s_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);' % {'s': structName},
++            print('void %(s)s_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);' % {'s': structName})
+ 
+-        print
++        print("")
+ 
+     # Table indexes.
+     printEnum("%stable_id" % prefix.lower(), ["%sTABLE_%s" % (prefix.upper(), tableName.upper()) for tableName in sorted(schema.tables)] + ["%sN_TABLES" % prefix.upper()])
+-    print
++    print("")
+     for tableName in schema.tables:
+-        print "#define %(p)stable_%(t)s (%(p)stable_classes[%(P)sTABLE_%(T)s])" % {
++        print("#define %(p)stable_%(t)s (%(p)stable_classes[%(P)sTABLE_%(T)s])" % {
+             'p': prefix,
+             'P': prefix.upper(),
+             't': tableName.lower(),
+-            'T': tableName.upper()}
+-    print "\nextern struct ovsdb_idl_table_class %stable_classes[%sN_TABLES];" % (prefix, prefix.upper())
++            'T': tableName.upper()})
++    print("\nextern struct ovsdb_idl_table_class %stable_classes[%sN_TABLES];" % (prefix, prefix.upper()))
+ 
+-    print "\nextern struct ovsdb_idl_class %sidl_class;" % prefix
++    print("\nextern struct ovsdb_idl_class %sidl_class;" % prefix)
+ 
+-    print "\nconst char * %sget_db_version(void);" % prefix
+-    print "\n#endif /* %(prefix)sIDL_HEADER */" % {'prefix': prefix.upper()}
++    print("\nconst char * %sget_db_version(void);" % prefix)
++    print("\n#endif /* %(prefix)sIDL_HEADER */" % {'prefix': prefix.upper()})
+ 
+ def printEnum(type, members):
+     if len(members) == 0:
+         return
+ 
+-    print "\nenum %s {" % type
++    print("\nenum %s {" % type)
+     for member in members[:-1]:
+-        print "    %s," % member
+-    print "    %s" % members[-1]
+-    print "};"
++        print("    %s," % member)
++    print("    %s" % members[-1])
++    print("};")
+ 
+ def printCIDLSource(schemaFile):
+     schema = parseSchema(schemaFile)
+     prefix = schema.idlPrefix
+-    print '''\
++    print('''\
+ /* Generated automatically -- do not modify!    -*- buffer-read-only: t -*- */
+ 
+ #include <config.h>
+@@ -296,33 +297,33 @@ def printCIDLSource(schemaFile):
+ #include "ovsdb-error.h"
+ #include "util.h"
+ 
+-''' % schema.idlHeader
++''' % schema.idlHeader)
+ 
+     # Cast functions.
+     for tableName, table in sorted(schema.tables.iteritems()):
+         structName = "%s%s" % (prefix, tableName.lower())
+-        print '''
++        print('''
+ static struct %(s)s *
+ %(s)s_cast(const struct ovsdb_idl_row *row)
+ {
+     return row ? CONTAINER_OF(row, struct %(s)s, header_) : NULL;
+ }\
+-''' % {'s': structName}
++''' % {'s': structName})
+ 
+ 
+     for tableName, table in sorted(schema.tables.iteritems()):
+         structName = "%s%s" % (prefix, tableName.lower())
+-        print "\f"
+-        print "/* %s table. */" % (tableName)
++        print("\f")
++        print("/* %s table. */" % (tableName))
+ 
+         # Parse functions.
+         for columnName, column in sorted_columns(table):
+-            print '''
++            print('''
+ static void
+ %(s)s_parse_%(c)s(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
+ {
+     struct %(s)s *row = %(s)s_cast(row_);''' % {'s': structName,
+-                                                'c': columnName}
++                                                'c': columnName})
+             type = column.type
+             if type.value:
+                 keyVar = "row->key_%s" % columnName
+@@ -332,89 +333,89 @@ static void
+                 valueVar = None
+ 
+             if type.is_smap():
+-                print "    smap_init(&row->%s);" % columnName
+-                print "    for (size_t i = 0; i < datum->n; i++) {"
+-                print "        smap_add(&row->%s," % columnName
+-                print "                 datum->keys[i].string,"
+-                print "                 datum->values[i].string);"
+-                print "    }"
++                print("    smap_init(&row->%s);" % columnName)
++                print("    for (size_t i = 0; i < datum->n; i++) {")
++                print("        smap_add(&row->%s," % columnName)
++                print("                 datum->keys[i].string,")
++                print("                 datum->values[i].string);")
++                print("    }")
+             elif (type.n_min == 1 and type.n_max == 1) or type.is_optional_pointer():
+-                print
+-                print "    if (datum->n >= 1) {"
++                print("")
++                print("    if (datum->n >= 1) {")
+                 if not type.key.ref_table:
+-                    print "        %s = datum->keys[0].%s;" % (keyVar, type.key.type.to_string())
++                    print("        %s = datum->keys[0].%s;" % (keyVar, type.key.type.to_string()))
+                 else:
+-                    print "        %s = %s%s_cast(ovsdb_idl_get_row_arc(row_, &%stable_%s, &datum->keys[0].uuid));" % (keyVar, prefix, type.key.ref_table.name.lower(), prefix, type.key.ref_table.name.lower())
++                    print("        %s = %s%s_cast(ovsdb_idl_get_row_arc(row_, &%stable_%s, &datum->keys[0].uuid));" % (keyVar, prefix, type.key.ref_table.name.lower(), prefix, type.key.ref_table.name.lower()))
+ 
+                 if valueVar:
+                     if not type.value.ref_table:
+-                        print "        %s = datum->values[0].%s;" % (valueVar, type.value.type.to_string())
++                        print("        %s = datum->values[0].%s;" % (valueVar, type.value.type.to_string()))
+                     else:
+-                        print "        %s = %s%s_cast(ovsdb_idl_get_row_arc(row_, &%stable_%s, &datum->values[0].uuid));" % (valueVar, prefix, type.value.ref_table.name.lower(), prefix, type.value.ref_table.name.lower())
+-                print "    } else {"
+-                print "        %s" % type.key.initCDefault(keyVar, type.n_min == 0)
++                        print("        %s = %s%s_cast(ovsdb_idl_get_row_arc(row_, &%stable_%s, &datum->values[0].uuid));" % (valueVar, prefix, type.value.ref_table.name.lower(), prefix, type.value.ref_table.name.lower()))
++                print("    } else {")
++                print("        %s" % type.key.initCDefault(keyVar, type.n_min == 0))
+                 if valueVar:
+-                    print "        %s" % type.value.initCDefault(valueVar, type.n_min == 0)
+-                print "    }"
++                    print("        %s" % type.value.initCDefault(valueVar, type.n_min == 0))
++                print("    }")
+             else:
+                 if type.n_max != sys.maxint:
+-                    print "    size_t n = MIN(%d, datum->n);" % type.n_max
++                    print("    size_t n = MIN(%d, datum->n);" % type.n_max)
+                     nMax = "n"
+                 else:
+                     nMax = "datum->n"
+-                print "    %s = NULL;" % keyVar
++                print("    %s = NULL;" % keyVar)
+                 if valueVar:
+-                    print "    %s = NULL;" % valueVar
+-                print "    row->n_%s = 0;" % columnName
+-                print "    for (size_t i = 0; i < %s; i++) {" % nMax
++                    print("    %s = NULL;" % valueVar)
++                print("    row->n_%s = 0;" % columnName)
++                print("    for (size_t i = 0; i < %s; i++) {" % nMax)
+                 if type.key.ref_table:
+-                    print """\
++                    print("""\
+         struct %s%s *keyRow = %s%s_cast(ovsdb_idl_get_row_arc(row_, &%stable_%s, &datum->keys[i].uuid));
+         if (!keyRow) {
+             continue;
+         }\
+-""" % (prefix, type.key.ref_table.name.lower(), prefix, type.key.ref_table.name.lower(), prefix, type.key.ref_table.name.lower())
++""" % (prefix, type.key.ref_table.name.lower(), prefix, type.key.ref_table.name.lower(), prefix, type.key.ref_table.name.lower()))
+                     keySrc = "keyRow"
+                 else:
+                     keySrc = "datum->keys[i].%s" % type.key.type.to_string()
+                 if type.value and type.value.ref_table:
+-                    print """\
++                    print("""\
+         struct %s%s *valueRow = %s%s_cast(ovsdb_idl_get_row_arc(row_, &%stable_%s, &datum->values[i].uuid));
+         if (!valueRow) {
+             continue;
+         }\
+-""" % (prefix, type.value.ref_table.name.lower(), prefix, type.value.ref_table.name.lower(), prefix, type.value.ref_table.name.lower())
++""" % (prefix, type.value.ref_table.name.lower(), prefix, type.value.ref_table.name.lower(), prefix, type.value.ref_table.name.lower()))
+                     valueSrc = "valueRow"
+                 elif valueVar:
+                     valueSrc = "datum->values[i].%s" % type.value.type.to_string()
+-                print "        if (!row->n_%s) {" % (columnName)
++                print("        if (!row->n_%s) {" % (columnName))
+ 
+-                print "            %s = xmalloc(%s * sizeof *%s);" % (
+-                    keyVar, nMax, keyVar)
++                print("            %s = xmalloc(%s * sizeof *%s);" % (
++                    keyVar, nMax, keyVar))
+                 if valueVar:
+-                    print "            %s = xmalloc(%s * sizeof *%s);" % (
+-                        valueVar, nMax, valueVar)
+-                print "        }"
+-                print "        %s[row->n_%s] = %s;" % (keyVar, columnName, keySrc)
++                    print("            %s = xmalloc(%s * sizeof *%s);" % (
++                        valueVar, nMax, valueVar))
++                print("        }")
++                print("        %s[row->n_%s] = %s;" % (keyVar, columnName, keySrc))
+                 if valueVar:
+-                    print "        %s[row->n_%s] = %s;" % (valueVar, columnName, valueSrc)
+-                print "        row->n_%s++;" % columnName
+-                print "    }"
+-            print "}"
++                    print("        %s[row->n_%s] = %s;" % (valueVar, columnName, valueSrc))
++                print("        row->n_%s++;" % columnName)
++                print("    }")
++            print("}")
+ 
+         # Unparse functions.
+         for columnName, column in sorted_columns(table):
+             type = column.type
+             if type.is_smap() or (type.n_min != 1 or type.n_max != 1) and not type.is_optional_pointer():
+-                print '''
++                print('''
+ static void
+ %(s)s_unparse_%(c)s(struct ovsdb_idl_row *row_)
+ {
+     struct %(s)s *row = %(s)s_cast(row_);''' % {'s': structName,
+-                                                'c': columnName}
++                                                'c': columnName})
+ 
+                 if type.is_smap():
+-                    print "    smap_destroy(&row->%s);" % columnName
++                    print("    smap_destroy(&row->%s);" % columnName)
+                 else:
+                     if type.value:
+                         keyVar = "row->key_%s" % columnName
+@@ -422,45 +423,45 @@ static void
+                     else:
+                         keyVar = "row->%s" % columnName
+                         valueVar = None
+-                    print "    free(%s);" % keyVar
++                    print("    free(%s);" % keyVar)
+                     if valueVar:
+-                        print "    free(%s);" % valueVar
+-                print '}'
++                        print("    free(%s);" % valueVar)
++                print('}')
+             else:
+-                print '''
++                print('''
+ static void
+ %(s)s_unparse_%(c)s(struct ovsdb_idl_row *row OVS_UNUSED)
+ {
+     /* Nothing to do. */
+-}''' % {'s': structName, 'c': columnName}
++}''' % {'s': structName, 'c': columnName})
+ 
+         # Generic Row Initialization function.
+-        print """
++        print("""
+ static void
+ %(s)s_init__(struct ovsdb_idl_row *row)
+ {
+     %(s)s_init(%(s)s_cast(row));
+-}""" % {'s': structName}
++}""" % {'s': structName})
+ 
+         # Row Initialization function.
+-        print """
++        print("""
+ /* Clears the contents of 'row' in table "%(t)s". */
+ void
+ %(s)s_init(struct %(s)s *row)
+ {
+-    memset(row, 0, sizeof *row); """ % {'s': structName, 't': tableName}
++    memset(row, 0, sizeof *row); """ % {'s': structName, 't': tableName})
+         for columnName, column in sorted_columns(table):
+             if column.type.is_smap():
+-                print "    smap_init(&row->%s);" % columnName
++                print("    smap_init(&row->%s);" % columnName)
+             elif (column.type.n_min == 1 and
+                   column.type.n_max == 1 and
+                   column.type.key.type == ovs.db.types.StringType and
+                   not column.type.value):
+-                print "    row->%s = \"\";" % columnName
+-        print "}"
++                print("    row->%s = \"\";" % columnName)
++        print("}")
+ 
+         # First, next functions.
+-        print '''
++        print('''
+ /* Searches table "%(t)s" in 'idl' for a row with UUID 'uuid'.  Returns
+  * a pointer to the row if there is one, otherwise a null pointer.  */
+ const struct %(s)s *
+@@ -514,9 +515,9 @@ const struct %(s)s
+         'P': prefix.upper(),
+         't': tableName,
+         'tl': tableName.lower(),
+-        'T': tableName.upper()}
++        'T': tableName.upper()})
+ 
+-        print '''
++        print('''
+ 
+ /* Deletes 'row' from table "%(t)s".  'row' may be freed, so it must not be
+  * accessed afterward.
+@@ -550,11 +551,11 @@ bool
+         'P': prefix.upper(),
+         't': tableName,
+         'tl': tableName.lower(),
+-        'T': tableName.upper()}
++        'T': tableName.upper()})
+ 
+         # Verify functions.
+         for columnName, column in sorted_columns(table):
+-            print '''
++            print('''
+ /* Causes the original contents of column "%(c)s" in 'row' to be
+  * verified as a prerequisite to completing the transaction.  That is, if
+  * "%(c)s" in 'row' changed (or if 'row' was deleted) between the
+@@ -585,7 +586,7 @@ void
+ }''' % {'s': structName,
+         'S': structName.upper(),
+         'c': columnName,
+-        'C': columnName.upper()}
++        'C': columnName.upper()})
+ 
+         # Get functions.
+         for columnName, column in sorted_columns(table):
+@@ -597,7 +598,7 @@ void
+                 valueParam = ''
+                 valueType = ''
+                 valueComment = ''
+-            print """
++            print("""
+ /* Returns the "%(c)s" column's value from the "%(t)s" table in 'row'
+  * as a struct ovsdb_datum.  This is useful occasionally: for example,
+  * ovsdb_datum_find_key() is an easier and more efficient way to search
+@@ -625,7 +626,7 @@ const struct ovsdb_datum *
+     return ovsdb_idl_read(&row->header_, &%(s)s_col_%(c)s);
+ }""" % {'t': tableName, 's': structName, 'c': columnName,
+        'kt': column.type.key.toAtomicType(),
+-       'v': valueParam, 'vt': valueType, 'vc': valueComment}
++       'v': valueParam, 'vt': valueType, 'vc': valueComment})
+ 
+         # Set functions.
+         for columnName, column in sorted_columns(table):
+@@ -635,8 +636,8 @@ const struct ovsdb_datum *
+                                         column, True)
+ 
+             if type.is_smap():
+-                print comment
+-                print """void
++                print(comment)
++                print("""void
+ %(s)s_set_%(c)s(const struct %(s)s *row, const struct smap *%(c)s)
+ {
+     struct ovsdb_datum datum;
+@@ -654,7 +655,7 @@ const struct ovsdb_datum *
+        's': structName,
+        'S': structName.upper(),
+        'c': columnName,
+-       'C': columnName.upper()}
++       'C': columnName.upper()})
+                 continue
+ 
+             keyVar = members[0]['name']
+@@ -668,84 +669,84 @@ const struct ovsdb_datum *
+                 if len(members) > 1:
+                     nVar = members[1]['name']
+ 
+-            print comment
+-            print """\
++            print(comment)
++            print("""\
+ void
+ %(s)s_set_%(c)s(const struct %(s)s *row, %(args)s)
+ {
+     struct ovsdb_datum datum;""" % {'s': structName,
+         'c': columnName,
+         'args': ', '.join(['%(type)s%(name)s'
+-                           % m for m in members])}
++                           % m for m in members])})
+             if type.n_min == 1 and type.n_max == 1:
+-                print "    union ovsdb_atom key;"
++                print("    union ovsdb_atom key;")
+                 if type.value:
+-                    print "    union ovsdb_atom value;"
+-                print
+-                print "    datum.n = 1;"
+-                print "    datum.keys = &key;"
+-                print "    " + type.key.assign_c_value_casting_away_const("key.%s" % type.key.type.to_string(), keyVar)
++                    print("    union ovsdb_atom value;")
++                print("")
++                print("    datum.n = 1;")
++                print("    datum.keys = &key;")
++                print("    " + type.key.assign_c_value_casting_away_const("key.%s" % type.key.type.to_string(), keyVar))
+                 if type.value:
+-                    print "    datum.values = &value;"
+-                    print "    "+ type.value.assign_c_value_casting_away_const("value.%s" % type.value.type.to_string(), valueVar)
++                    print("    datum.values = &value;")
++                    print("    "+ type.value.assign_c_value_casting_away_const("value.%s" % type.value.type.to_string(), valueVar))
+                 else:
+-                    print "    datum.values = NULL;"
++                    print("    datum.values = NULL;")
+                 txn_write_func = "ovsdb_idl_txn_write_clone"
+             elif type.is_optional_pointer():
+-                print "    union ovsdb_atom key;"
+-                print
+-                print "    if (%s) {" % keyVar
+-                print "        datum.n = 1;"
+-                print "        datum.keys = &key;"
+-                print "        " + type.key.assign_c_value_casting_away_const("key.%s" % type.key.type.to_string(), keyVar)
+-                print "    } else {"
+-                print "        datum.n = 0;"
+-                print "        datum.keys = NULL;"
+-                print "    }"
+-                print "    datum.values = NULL;"
++                print("    union ovsdb_atom key;")
++                print("")
++                print("    if (%s) {" % keyVar)
++                print("        datum.n = 1;")
++                print("        datum.keys = &key;")
++                print("        " + type.key.assign_c_value_casting_away_const("key.%s" % type.key.type.to_string(), keyVar))
++                print("    } else {")
++                print("        datum.n = 0;")
++                print("        datum.keys = NULL;")
++                print("    }")
++                print("    datum.values = NULL;")
+                 txn_write_func = "ovsdb_idl_txn_write_clone"
+             elif type.n_max == 1:
+-                print "    union ovsdb_atom key;"
+-                print
+-                print "    if (%s) {" % nVar
+-                print "        datum.n = 1;"
+-                print "        datum.keys = &key;"
+-                print "        " + type.key.assign_c_value_casting_away_const("key.%s" % type.key.type.to_string(), "*" + keyVar)
+-                print "    } else {"
+-                print "        datum.n = 0;"
+-                print "        datum.keys = NULL;"
+-                print "    }"
+-                print "    datum.values = NULL;"
++                print("    union ovsdb_atom key;")
++                print("")
++                print("    if (%s) {" % nVar)
++                print("        datum.n = 1;")
++                print("        datum.keys = &key;")
++                print("        " + type.key.assign_c_value_casting_away_const("key.%s" % type.key.type.to_string(), "*" + keyVar))
++                print("    } else {")
++                print("        datum.n = 0;")
++                print("        datum.keys = NULL;")
++                print("    }")
++                print("    datum.values = NULL;")
+                 txn_write_func = "ovsdb_idl_txn_write_clone"
+             else:
+-                print
+-                print "    datum.n = %s;" % nVar
+-                print "    datum.keys = %s ? xmalloc(%s * sizeof *datum.keys) : NULL;" % (nVar, nVar)
++                print("")
++                print("    datum.n = %s;" % nVar)
++                print("    datum.keys = %s ? xmalloc(%s * sizeof *datum.keys) : NULL;" % (nVar, nVar))
+                 if type.value:
+-                    print "    datum.values = xmalloc(%s * sizeof *datum.values);" % nVar
++                    print("    datum.values = xmalloc(%s * sizeof *datum.values);" % nVar)
+                 else:
+-                    print "    datum.values = NULL;"
+-                print "    for (size_t i = 0; i < %s; i++) {" % nVar
+-                print "        " + type.key.copyCValue("datum.keys[i].%s" % type.key.type.to_string(), "%s[i]" % keyVar)
++                    print("    datum.values = NULL;")
++                print("    for (size_t i = 0; i < %s; i++) {" % nVar)
++                print("        " + type.key.copyCValue("datum.keys[i].%s" % type.key.type.to_string(), "%s[i]" % keyVar))
+                 if type.value:
+-                    print "        " + type.value.copyCValue("datum.values[i].%s" % type.value.type.to_string(), "%s[i]" % valueVar)
+-                print "    }"
++                    print("        " + type.value.copyCValue("datum.values[i].%s" % type.value.type.to_string(), "%s[i]" % valueVar))
++                print("    }")
+                 if type.value:
+                     valueType = type.value.toAtomicType()
+                 else:
+                     valueType = "OVSDB_TYPE_VOID"
+                 txn_write_func = "ovsdb_idl_txn_write"
+-            print "    %(f)s(&row->header_, &%(s)s_col_%(c)s, &datum);" \
++            print("    %(f)s(&row->header_, &%(s)s_col_%(c)s, &datum);" \
+                 % {'f': txn_write_func,
+                    's': structName,
+                    'S': structName.upper(),
+-                   'c': columnName}
+-            print "}"
++                   'c': columnName})
++            print("}")
+         # Update/Delete of partial map column functions
+         for columnName, column in sorted_columns(table):
+             type = column.type
+             if type.is_map():
+-                print '''
++                print('''
+ /* Sets an element of the "%(c)s" map column from the "%(t)s" table in 'row'
+  * to 'new_value' given the key value 'new_key'.
+  *
+@@ -761,17 +762,17 @@ void
+     datum->values = xmalloc(datum->n * sizeof *datum->values);
+ ''' % {'s': structName, 'c': columnName,'coltype':column.type.key.to_const_c_type(prefix),
+         'valtype':column.type.value.to_const_c_type(prefix), 'S': structName.upper(),
+-        'C': columnName.upper(), 't': tableName}
++        'C': columnName.upper(), 't': tableName})
+ 
+-                print "    "+ type.key.copyCValue("datum->keys[0].%s" % type.key.type.to_string(), "new_key")
+-                print "    "+ type.value.copyCValue("datum->values[0].%s" % type.value.type.to_string(), "new_value")
+-                print '''
++                print("    "+ type.key.copyCValue("datum->keys[0].%s" % type.key.type.to_string(), "new_key"))
++                print("    "+ type.value.copyCValue("datum->values[0].%s" % type.value.type.to_string(), "new_value"))
++                print('''
+     ovsdb_idl_txn_write_partial_map(&row->header_,
+                                     &%(s)s_col_%(c)s,
+                                     datum);
+ }''' % {'s': structName, 'c': columnName,'coltype':column.type.key.toCType(prefix),
+-        'valtype':column.type.value.to_const_c_type(prefix), 'S': structName.upper()}
+-                print '''
++        'valtype':column.type.value.to_const_c_type(prefix), 'S': structName.upper()})
++                print('''
+ /* Deletes an element of the "%(c)s" map column from the "%(t)s" table in 'row'
+  * given the key value 'delete_key'.
+  *
+@@ -787,19 +788,19 @@ void
+     datum->values = NULL;
+ ''' % {'s': structName, 'c': columnName,'coltype':column.type.key.to_const_c_type(prefix),
+         'valtype':column.type.value.to_const_c_type(prefix), 'S': structName.upper(),
+-        'C': columnName.upper(), 't': tableName}
++        'C': columnName.upper(), 't': tableName})
+ 
+-                print "    "+ type.key.copyCValue("datum->keys[0].%s" % type.key.type.to_string(), "delete_key")
+-                print '''
++                print("    "+ type.key.copyCValue("datum->keys[0].%s" % type.key.type.to_string(), "delete_key"))
++                print('''
+     ovsdb_idl_txn_delete_partial_map(&row->header_,
+                                     &%(s)s_col_%(c)s,
+                                     datum);
+ }''' % {'s': structName, 'c': columnName,'coltype':column.type.key.toCType(prefix),
+-        'valtype':column.type.value.to_const_c_type(prefix), 'S': structName.upper()}
++        'valtype':column.type.value.to_const_c_type(prefix), 'S': structName.upper()})
+         # End Update/Delete of partial maps
+         # Update/Delete of partial set column functions
+             if type.is_set():
+-                print '''
++                print('''
+ /* Adds the value 'new_value' to the "%(c)s" set column from the "%(t)s" table
+  * in 'row'.
+  *
+@@ -814,16 +815,16 @@ void
+     datum->keys = xmalloc(datum->n * sizeof *datum->values);
+     datum->values = NULL;
+ ''' % {'s': structName, 'c': columnName,
+-        'valtype':column.type.key.to_const_c_type(prefix), 't': tableName}
++        'valtype':column.type.key.to_const_c_type(prefix), 't': tableName})
+ 
+-                print "    "+ type.key.copyCValue("datum->keys[0].%s" % type.key.type.to_string(), "new_value")
+-                print '''
++                print("    "+ type.key.copyCValue("datum->keys[0].%s" % type.key.type.to_string(), "new_value"))
++                print('''
+     ovsdb_idl_txn_write_partial_set(&row->header_,
+                                     &%(s)s_col_%(c)s,
+                                     datum);
+ }''' % {'s': structName, 'c': columnName,'coltype':column.type.key.toCType(prefix),
+-        'valtype':column.type.key.to_const_c_type(prefix), 'S': structName.upper()}
+-                print '''
++        'valtype':column.type.key.to_const_c_type(prefix), 'S': structName.upper()})
++                print('''
+ /* Deletes the value 'delete_value' from the "%(c)s" set column from the
+  * "%(t)s" table in 'row'.
+  *
+@@ -839,15 +840,15 @@ void
+     datum->values = NULL;
+ ''' % {'s': structName, 'c': columnName,'coltype':column.type.key.to_const_c_type(prefix),
+         'valtype':column.type.key.to_const_c_type(prefix), 'S': structName.upper(),
+-        'C': columnName.upper(), 't': tableName}
++        'C': columnName.upper(), 't': tableName})
+ 
+-                print "    "+ type.key.copyCValue("datum->keys[0].%s" % type.key.type.to_string(), "delete_value")
+-                print '''
++                print("    "+ type.key.copyCValue("datum->keys[0].%s" % type.key.type.to_string(), "delete_value"))
++                print('''
+     ovsdb_idl_txn_delete_partial_set(&row->header_,
+                                     &%(s)s_col_%(c)s,
+                                     datum);
+ }''' % {'s': structName, 'c': columnName,'coltype':column.type.key.toCType(prefix),
+-        'valtype':column.type.key.to_const_c_type(prefix), 'S': structName.upper()}
++        'valtype':column.type.key.to_const_c_type(prefix), 'S': structName.upper()})
+         # End Update/Delete of partial set
+ 
+         # Add clause functions.
+@@ -858,8 +859,8 @@ void
+                                         column, True, refTable=False)
+ 
+             if type.is_smap():
+-                print comment
+-                print """void
++                print(comment)
++                print("""void
+ %(s)s_add_clause_%(c)s(struct ovsdb_idl_condition *cond, enum ovsdb_function function, const struct smap *%(c)s)
+ {
+     struct ovsdb_datum datum;
+@@ -884,7 +885,7 @@ void
+        'P': prefix.upper(),
+        's': structName,
+        'S': structName.upper(),
+-       'c': columnName}
++       'c': columnName})
+                 continue
+ 
+             keyVar = members[0]['name']
+@@ -898,73 +899,73 @@ void
+                 if len(members) > 1:
+                     nVar = members[1]['name']
+ 
+-            print comment
+-            print 'void'
+-            print '%(s)s_add_clause_%(c)s(struct ovsdb_idl_condition *cond, enum ovsdb_function function, %(args)s)' % \
++            print(comment)
++            print('void')
++            print('%(s)s_add_clause_%(c)s(struct ovsdb_idl_condition *cond, enum ovsdb_function function, %(args)s)' % \
+                 {'s': structName, 'c': columnName,
+-                 'args': ', '.join(['%(type)s%(name)s' % m for m in members])}
+-            print "{"
+-            print "    struct ovsdb_datum datum;"
++                 'args': ', '.join(['%(type)s%(name)s' % m for m in members])})
++            print("{")
++            print("    struct ovsdb_datum datum;")
+             free = []
+             if type.n_min == 1 and type.n_max == 1:
+-                print "    union ovsdb_atom key;"
++                print("    union ovsdb_atom key;")
+                 if type.value:
+-                    print "    union ovsdb_atom value;"
+-                print
+-                print "    datum.n = 1;"
+-                print "    datum.keys = &key;"
+-                print "    " + type.key.assign_c_value_casting_away_const("key.%s" % type.key.type.to_string(), keyVar, refTable=False)
++                    print("    union ovsdb_atom value;")
++                print("")
++                print("    datum.n = 1;")
++                print("    datum.keys = &key;")
++                print("    " + type.key.assign_c_value_casting_away_const("key.%s" % type.key.type.to_string(), keyVar, refTable=False))
+                 if type.value:
+-                    print "    datum.values = &value;"
+-                    print "    "+ type.value.assign_c_value_casting_away_const("value.%s" % type.value.type.to_string(), valueVar, refTable=False)
++                    print("    datum.values = &value;")
++                    print("    "+ type.value.assign_c_value_casting_away_const("value.%s" % type.value.type.to_string(), valueVar, refTable=False))
+                 else:
+-                    print "    datum.values = NULL;"
++                    print("    datum.values = NULL;")
+             elif type.is_optional_pointer():
+-                print "    union ovsdb_atom key;"
+-                print
+-                print "    if (%s) {" % keyVar
+-                print "        datum.n = 1;"
+-                print "        datum.keys = &key;"
+-                print "        " + type.key.assign_c_value_casting_away_const("key.%s" % type.key.type.to_string(), keyVar, refTable=False)
+-                print "    } else {"
+-                print "        datum.n = 0;"
+-                print "        datum.keys = NULL;"
+-                print "    }"
+-                print "    datum.values = NULL;"
++                print("    union ovsdb_atom key;")
++                print("")
++                print("    if (%s) {" % keyVar)
++                print("        datum.n = 1;")
++                print("        datum.keys = &key;")
++                print("        " + type.key.assign_c_value_casting_away_const("key.%s" % type.key.type.to_string(), keyVar, refTable=False))
++                print("    } else {")
++                print("        datum.n = 0;")
++                print("        datum.keys = NULL;")
++                print("    }")
++                print("    datum.values = NULL;")
+             elif type.n_max == 1:
+-                print "    union ovsdb_atom key;"
+-                print
+-                print "    if (%s) {" % nVar
+-                print "        datum.n = 1;"
+-                print "        datum.keys = &key;"
+-                print "        " + type.key.assign_c_value_casting_away_const("key.%s" % type.key.type.to_string(), "*" + keyVar, refTable=False)
+-                print "    } else {"
+-                print "        datum.n = 0;"
+-                print "        datum.keys = NULL;"
+-                print "    }"
+-                print "    datum.values = NULL;"
++                print("    union ovsdb_atom key;")
++                print("")
++                print("    if (%s) {" % nVar)
++                print("        datum.n = 1;")
++                print("        datum.keys = &key;")
++                print("        " + type.key.assign_c_value_casting_away_const("key.%s" % type.key.type.to_string(), "*" + keyVar, refTable=False))
++                print("    } else {")
++                print("        datum.n = 0;")
++                print("        datum.keys = NULL;")
++                print("    }")
++                print("    datum.values = NULL;")
+             else:
+-                print "    datum.n = %s;" % nVar
+-                print "    datum.keys = %s ? xmalloc(%s * sizeof *datum.keys) : NULL;" % (nVar, nVar)
++                print("    datum.n = %s;" % nVar)
++                print("    datum.keys = %s ? xmalloc(%s * sizeof *datum.keys) : NULL;" % (nVar, nVar))
+                 free += ['datum.keys']
+                 if type.value:
+-                    print "    datum.values = xmalloc(%s * sizeof *datum.values);" % nVar
++                    print("    datum.values = xmalloc(%s * sizeof *datum.values);" % nVar)
+                     free += ['datum.values']
+                 else:
+-                    print "    datum.values = NULL;"
+-                print "    for (size_t i = 0; i < %s; i++) {" % nVar
+-                print "        " + type.key.assign_c_value_casting_away_const("datum.keys[i].%s" % type.key.type.to_string(), "%s[i]" % keyVar, refTable=False)
++                    print("    datum.values = NULL;")
++                print("    for (size_t i = 0; i < %s; i++) {" % nVar)
++                print("        " + type.key.assign_c_value_casting_away_const("datum.keys[i].%s" % type.key.type.to_string(), "%s[i]" % keyVar, refTable=False))
+                 if type.value:
+-                    print "        " + type.value.assign_c_value_casting_away_const("datum.values[i].%s" % type.value.type.to_string(), "%s[i]" % valueVar, refTable=False)
+-                print "    }"
++                    print("        " + type.value.assign_c_value_casting_away_const("datum.values[i].%s" % type.value.type.to_string(), "%s[i]" % valueVar, refTable=False))
++                print("    }")
+                 if type.value:
+                     valueType = type.value.toAtomicType()
+                 else:
+                     valueType = "OVSDB_TYPE_VOID"
+-                print "    ovsdb_datum_sort_unique(&datum, %s, %s);" % (
+-                    type.key.toAtomicType(), valueType)
++                print("    ovsdb_datum_sort_unique(&datum, %s, %s);" % (
++                    type.key.toAtomicType(), valueType))
+ 
+-            print"""    ovsdb_idl_condition_add_clause(cond,
++            print("""    ovsdb_idl_condition_add_clause(cond,
+                           function,
+                           &%(s)s_col_%(c)s,
+                           &datum);\
+@@ -974,28 +975,28 @@ void
+        'P': prefix.upper(),
+        's': structName,
+        'S': structName.upper(),
+-       'c': columnName}
++       'c': columnName})
+             for var in free:
+-                print "    free(%s);" % var
+-            print "}"
++                print("    free(%s);" % var)
++            print("}")
+ 
+-        print """
++        print("""
+ void
+ %(s)s_set_condition(struct ovsdb_idl *idl, struct ovsdb_idl_condition *condition)
+ {
+     ovsdb_idl_set_condition(idl, &%(p)stable_%(tl)s, condition);
+ }""" % {'p': prefix,
+         's': structName,
+-        'tl': tableName.lower()}
++        'tl': tableName.lower()})
+ 
+         # Table columns.
+         for columnName, column in sorted_columns(table):
+             prereqs = []
+             x = column.type.cInitType("%s_col_%s" % (tableName, columnName), prereqs)
+             if prereqs:
+-                print '\n'.join(prereqs)
+-        print "\nstruct ovsdb_idl_column %s_columns[%s_N_COLUMNS] = {" % (
+-            structName, structName.upper())
++                print('\n'.join(prereqs))
++        print("\nstruct ovsdb_idl_column %s_columns[%s_N_COLUMNS] = {" % (
++            structName, structName.upper()))
+         for columnName, column in sorted_columns(table):
+             if column.mutable:
+                 mutable = "true"
+@@ -1003,7 +1004,7 @@ void
+                 mutable = "false"
+             type_init = '\n'.join("            " + x
+                                   for x in column.type.cInitType("%s_col_%s" % (tableName, columnName), prereqs))
+-            print """\
++            print("""\
+     [%(P)s%(T)s_COL_%(C)s] = {
+          .name = "%(c)s",
+          .type = {
+@@ -1018,38 +1019,38 @@ void
+                'C': columnName.upper(),
+                's': structName,
+                'mutable': mutable,
+-               'type': type_init}
+-        print "};"
++               'type': type_init})
++        print("};")
+ 
+     # Table classes.
+-    print "\f"
+-    print "struct ovsdb_idl_table_class %stable_classes[%sN_TABLES] = {" % (prefix, prefix.upper())
++    print("\f")
++    print("struct ovsdb_idl_table_class %stable_classes[%sN_TABLES] = {" % (prefix, prefix.upper()))
+     for tableName, table in sorted(schema.tables.iteritems()):
+         structName = "%s%s" % (prefix, tableName.lower())
+         if table.is_root:
+             is_root = "true"
+         else:
+             is_root = "false"
+-        print "    {\"%s\", %s," % (tableName, is_root)
+-        print "     %s_columns, ARRAY_SIZE(%s_columns)," % (
+-            structName, structName)
+-        print "     sizeof(struct %s), %s_init__}," % (structName, structName)
+-    print "};"
++        print("    {\"%s\", %s," % (tableName, is_root))
++        print("     %s_columns, ARRAY_SIZE(%s_columns)," % (
++            structName, structName))
++        print("     sizeof(struct %s), %s_init__}," % (structName, structName))
++    print("};")
+ 
+     # IDL class.
+-    print "\nstruct ovsdb_idl_class %sidl_class = {" % prefix
+-    print "    \"%s\", %stable_classes, ARRAY_SIZE(%stable_classes)" % (
+-        schema.name, prefix, prefix)
+-    print "};"
++    print("\nstruct ovsdb_idl_class %sidl_class = {" % prefix)
++    print("    \"%s\", %stable_classes, ARRAY_SIZE(%stable_classes)" % (
++        schema.name, prefix, prefix))
++    print("};")
+ 
+-    print """
++    print("""
+ /* Return the schema version.  The caller must not free the returned value. */
+ const char *
+ %sget_db_version(void)
+ {
+     return "%s";
+ }
+-""" % (prefix, schema.version)
++""" % (prefix, schema.version))
+ 
+ 
+ 
+@@ -1075,7 +1076,7 @@ def ovsdb_escape(string):
+     return re.sub(r'["\\\000-\037]', escape, string)
+ 
+ def usage():
+-    print """\
++    print("""\
+ %(argv0)s: ovsdb schema compiler
+ usage: %(argv0)s [OPTIONS] COMMAND ARG...
+ 
+@@ -1087,7 +1088,7 @@ The following commands are supported:
+ The following options are also available:
+   -h, --help                  display this help message
+   -V, --version               display version information\
+-""" % {'argv0': argv0}
++""" % {'argv0': argv0})
+     sys.exit(0)
+ 
+ if __name__ == "__main__":
+@@ -1105,7 +1106,7 @@ if __name__ == "__main__":
+             if key in ['-h', '--help']:
+                 usage()
+             elif key in ['-V', '--version']:
+-                print "ovsdb-idlc (Open vSwitch) @VERSION@"
++                print("ovsdb-idlc (Open vSwitch) @VERSION@")
+             elif key in ['-C', '--directory']:
+                 os.chdir(value)
+             else:
+-- 
+2.5.0
+
diff --git a/recipes-networking/openvswitch/openvswitch-git/0002-Python3-compatibility-exception-cleanup.patch b/recipes-networking/openvswitch/openvswitch-git/0002-Python3-compatibility-exception-cleanup.patch
new file mode 100644
index 000000000000..59c0f3e4d4c3
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/0002-Python3-compatibility-exception-cleanup.patch
@@ -0,0 +1,79 @@
+From c98fee41d130cb946aa4e60fefaa6cbf203f6790 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Thu, 29 Jun 2017 20:33:23 -0700
+Subject: [PATCH 2/8] Python3 compatibility: exception cleanup
+
+Commit 52e4a477f0b3c0a0ece7adeede6e06e07814f8b9 from
+https://github.com/openvswitch/ovs.git
+
+The exception syntax which is compatible with python2 and python3 is
+to use the "as" form for "except:".
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+Signed-off-by: Ben Pfaff <blp@ovn.org>
+---
+ build-aux/extract-ofp-fields | 2 +-
+ ovsdb/ovsdb-doc              | 4 ++--
+ ovsdb/ovsdb-idlc.in          | 4 ++--
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
+index 425a85f..61e752b 100755
+--- a/build-aux/extract-ofp-fields
++++ b/build-aux/extract-ofp-fields
+@@ -784,7 +784,7 @@ if __name__ == "__main__":
+     try:
+         options, args = getopt.gnu_getopt(sys.argv[1:], 'h',
+                                           ['help', 'ovs-version='])
+-    except getopt.GetoptError, geo:
++    except getopt.GetoptError as geo:
+         sys.stderr.write("%s: %s\n" % (argv0, geo.msg))
+         sys.exit(1)
+ 
+diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc
+index b34fb11..918e88a 100755
+--- a/ovsdb/ovsdb-doc
++++ b/ovsdb/ovsdb-doc
+@@ -278,7 +278,7 @@ if __name__ == "__main__":
+             options, args = getopt.gnu_getopt(sys.argv[1:], 'hV',
+                                               ['er-diagram=',
+                                                'version=', 'help'])
+-        except getopt.GetoptError, geo:
++        except getopt.GetoptError as geo:
+             sys.stderr.write("%s: %s\n" % (argv0, geo.msg))
+             sys.exit(1)
+ 
+@@ -306,7 +306,7 @@ if __name__ == "__main__":
+             if len(line):
+                 print(line)
+ 
+-    except error.Error, e:
++    except error.Error as e:
+         sys.stderr.write("%s: %s\n" % (argv0, e.msg))
+         sys.exit(1)
+ 
+diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
+index 1064448..8b85f0d 100755
+--- a/ovsdb/ovsdb-idlc.in
++++ b/ovsdb/ovsdb-idlc.in
+@@ -1098,7 +1098,7 @@ if __name__ == "__main__":
+                                               ['directory',
+                                                'help',
+                                                'version'])
+-        except getopt.GetoptError, geo:
++        except getopt.GetoptError as geo:
+             sys.stderr.write("%s: %s\n" % (argv0, geo.msg))
+             sys.exit(1)
+ 
+@@ -1136,7 +1136,7 @@ if __name__ == "__main__":
+             sys.exit(1)
+ 
+         func(*args[1:])
+-    except ovs.db.error.Error, e:
++    except ovs.db.error.Error as e:
+         sys.stderr.write("%s: %s\n" % (argv0, e))
+         sys.exit(1)
+ 
+-- 
+2.5.0
+
diff --git a/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch b/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch
new file mode 100644
index 000000000000..a85980ed3296
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch
@@ -0,0 +1,33 @@
+From 9cbae86be03756df76560c15720756f9ac088144 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Thu, 29 Jun 2017 20:33:23 -0700
+Subject: [PATCH 3/8] Python3 compatibility: execfile to exec
+
+Commit a4d10a7ca937d73873f6f98619d88682e69f5dbe from
+https://github.com/openvswitch/ovs.git
+
+Allow compability with python3 and python2 by changing execfile() to
+exec().
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+Signed-off-by: Ben Pfaff <blp@ovn.org>
+---
+ ovsdb/ovsdb-idlc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
+index 8b85f0d..3fa1a0f 100755
+--- a/ovsdb/ovsdb-idlc.in
++++ b/ovsdb/ovsdb-idlc.in
+@@ -17,7 +17,7 @@ def parseSchema(filename):
+ 
+ def annotateSchema(schemaFile, annotationFile):
+     schemaJson = ovs.json.from_file(schemaFile)
+-    execfile(annotationFile, globals(), {"s": schemaJson})
++    exec(compile(open(annotationFile, "rb").read(), annotationFile, 'exec'), globals(), {"s": schemaJson})
+     ovs.json.to_stream(schemaJson, sys.stdout)
+     sys.stdout.write('\n')
+ 
+-- 
+2.5.0
+
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 000000000000..ddc86db2a103
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/0004-Python3-compatibility-iteritems-to-items.patch
@@ -0,0 +1,102 @@
+From 0f318e472d9897d99395adcfb17cbeaff05677ba Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Thu, 29 Jun 2017 20:33:23 -0700
+Subject: [PATCH 4/8] Python3 compatibility: iteritems to items
+
+Commit 4ab665623cbb4c6506e48b82e0c9fe8585f42e13 from
+https://github.com/openvswitch/ovs.git
+
+Allow compability with python3 and python2 by changing iteritems() to
+items().
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+Signed-off-by: Ben Pfaff <blp@ovn.org>
+---
+ build-aux/extract-ofp-actions | 2 +-
+ build-aux/extract-ofp-errors  | 2 +-
+ build-aux/extract-ofp-fields  | 2 +-
+ ovsdb/ovsdb-idlc.in           | 8 ++++----
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
+index 874e6b4..c11297c 100755
+--- a/build-aux/extract-ofp-actions
++++ b/build-aux/extract-ofp-actions
+@@ -13,7 +13,7 @@ version_map = {"1.0": 0x01,
+                "1.3": 0x04,
+                "1.4": 0x05,
+                "1.5": 0x06}
+-version_reverse_map = dict((v, k) for (k, v) in version_map.iteritems())
++version_reverse_map = dict((v, k) for (k, v) in version_map.items())
+ 
+ # Map from vendor name to the length of the action header.
+ vendor_map = {"OF": (0x00000000,  4),
+diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
+index 336a240..71ae0bd 100755
+--- a/build-aux/extract-ofp-errors
++++ b/build-aux/extract-ofp-errors
+@@ -14,7 +14,7 @@ version_map = {"1.0": 0x01,
+                "1.4": 0x05,
+                "1.5": 0x06,
+                "1.6": 0x07}
+-version_reverse_map = dict((v, k) for (k, v) in version_map.iteritems())
++version_reverse_map = dict((v, k) for (k, v) in version_map.items())
+ 
+ token = None
+ line = ""
+diff --git a/build-aux/extract-ofp-fields b/build-aux/extract-ofp-fields
+index 61e752b..ef997dd 100755
+--- a/build-aux/extract-ofp-fields
++++ b/build-aux/extract-ofp-fields
+@@ -16,7 +16,7 @@ VERSION = {"1.0": 0x01,
+            "1.3": 0x04,
+            "1.4": 0x05,
+            "1.5": 0x06}
+-VERSION_REVERSE = dict((v,k) for k, v in VERSION.iteritems())
++VERSION_REVERSE = dict((v,k) for k, v in VERSION.items())
+ 
+ TYPES = {"u8":       (1,   False),
+          "be16":     (2,   False),
+diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
+index 3fa1a0f..615548f 100755
+--- a/ovsdb/ovsdb-idlc.in
++++ b/ovsdb/ovsdb-idlc.in
+@@ -138,7 +138,7 @@ def printCIDLHeader(schemaFile):
+ #include "smap.h"
+ #include "uuid.h"''' % {'prefix': prefix.upper()})
+ 
+-    for tableName, table in sorted(schema.tables.iteritems()):
++    for tableName, table in sorted(schema.tables.items()):
+         structName = "%s%s" % (prefix, tableName.lower())
+ 
+         print("\f")
+@@ -300,7 +300,7 @@ def printCIDLSource(schemaFile):
+ ''' % schema.idlHeader)
+ 
+     # Cast functions.
+-    for tableName, table in sorted(schema.tables.iteritems()):
++    for tableName, table in sorted(schema.tables.items()):
+         structName = "%s%s" % (prefix, tableName.lower())
+         print('''
+ static struct %(s)s *
+@@ -311,7 +311,7 @@ static struct %(s)s *
+ ''' % {'s': structName})
+ 
+ 
+-    for tableName, table in sorted(schema.tables.iteritems()):
++    for tableName, table in sorted(schema.tables.items()):
+         structName = "%s%s" % (prefix, tableName.lower())
+         print("\f")
+         print("/* %s table. */" % (tableName))
+@@ -1025,7 +1025,7 @@ void
+     # Table classes.
+     print("\f")
+     print("struct ovsdb_idl_table_class %stable_classes[%sN_TABLES] = {" % (prefix, prefix.upper()))
+-    for tableName, table in sorted(schema.tables.iteritems()):
++    for tableName, table in sorted(schema.tables.items()):
+         structName = "%s%s" % (prefix, tableName.lower())
+         if table.is_root:
+             is_root = "true"
+-- 
+2.5.0
+
diff --git a/recipes-networking/openvswitch/openvswitch-git/0005-Python3-compatibility-fix-integer-problems.patch b/recipes-networking/openvswitch/openvswitch-git/0005-Python3-compatibility-fix-integer-problems.patch
new file mode 100644
index 000000000000..717a97dbee81
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/0005-Python3-compatibility-fix-integer-problems.patch
@@ -0,0 +1,51 @@
+From bc29f98f0137fa1083a4cacf832d52f740d150a8 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Thu, 29 Jun 2017 20:33:23 -0700
+Subject: [PATCH 5/8] Python3 compatibility: fix integer problems
+
+Commit fa145f1a53943243f94a32ce98525db8494b0052 from
+https://github.com/openvswitch/ovs.git
+
+In python3 maxint is not defined, but maxsize is defined in both
+python2 and python3.
+
+The put_text() will not automatically use a value which came in as
+float due to a pior math function and python3 will throw an exception.
+The simple answer is to convert it with int() and move on.
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+Signed-off-by: Ben Pfaff <blp@ovn.org>
+---
+ ovsdb/ovsdb-idlc.in   | 2 +-
+ python/build/nroff.py | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
+index 615548f..7cbcbf5 100755
+--- a/ovsdb/ovsdb-idlc.in
++++ b/ovsdb/ovsdb-idlc.in
+@@ -358,7 +358,7 @@ static void
+                     print("        %s" % type.value.initCDefault(valueVar, type.n_min == 0))
+                 print("    }")
+             else:
+-                if type.n_max != sys.maxint:
++                if type.n_max != sys.maxsize:
+                     print("    size_t n = MIN(%d, datum->n);" % type.n_max)
+                     nMax = "n"
+                 else:
+diff --git a/python/build/nroff.py b/python/build/nroff.py
+index c23837f..401f699 100644
+--- a/python/build/nroff.py
++++ b/python/build/nroff.py
+@@ -148,6 +148,8 @@ def fatal(msg):
+ 
+ 
+ def put_text(text, x, y, s):
++    x = int(x)
++    y = int(y)
+     extend = x + len(s) - len(text[y])
+     if extend > 0:
+         text[y] += ' ' * extend
+-- 
+2.5.0
+
diff --git a/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch b/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch
new file mode 100644
index 000000000000..54905cd0a785
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/0006-Python3-compatibility-math-error-compatibility.patch
@@ -0,0 +1,56 @@
+From 3a9fcf1c8f60c160c282c9755ee1c7f9f7e113c3 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Thu, 29 Jun 2017 20:33:23 -0700
+Subject: [PATCH 6/8] Python3 compatibility: math error compatibility
+
+Commit 3fa5aa4294377e0f35267936d0c5caea3e61db48 from
+https://github.com/openvswitch/ovs.git
+
+The way math is handled with typing is completely different in python3.
+
+% python2<<EOF
+x=10
+y=8
+print((x + (y - 1)) / y * y)
+EOF
+16
+
+python3<<EOF
+x=10
+y=8
+print((x + (y - 1)) / y * y)
+EOF
+17.0
+
+So we need to force an integer for the round function as follows and
+maintain compatibility with python2.
+
+python3<<EOF
+x=10
+y=8
+print(int((x + (y - 1)) / y) * y)
+EOF
+16
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+Signed-off-by: Ben Pfaff <blp@ovn.org>
+---
+ build-aux/extract-ofp-actions | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
+index c11297c..bd7131f 100755
+--- a/build-aux/extract-ofp-actions
++++ b/build-aux/extract-ofp-actions
+@@ -35,7 +35,7 @@ line = ""
+ arg_structs = set()
+ 
+ def round_up(x, y):
+-    return (x + (y - 1)) / y * y
++    return int((x + (y - 1)) / y) * y
+ 
+ def open_file(fn):
+     global file_name
+-- 
+2.5.0
+
diff --git a/recipes-networking/openvswitch/openvswitch-git/0007-Python3-compatibility-unicode-to-str.patch b/recipes-networking/openvswitch/openvswitch-git/0007-Python3-compatibility-unicode-to-str.patch
new file mode 100644
index 000000000000..faa32b73b783
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/0007-Python3-compatibility-unicode-to-str.patch
@@ -0,0 +1,51 @@
+From 2fe58f87b00d0ec24d6997930d0bcdb130c84396 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Thu, 29 Jun 2017 20:33:23 -0700
+Subject: [PATCH 7/8] Python3 compatibility: unicode to str
+
+Commit 7430959d4ad17db89b8387c3aef58c8b230cad10 from
+https://github.com/openvswitch/ovs.git
+
+When transitioning from python2 to python3 the following type class
+changes occured:
+
+python2 -> python3
+unicode -> str
+str -> bytes
+
+That means we have to check the python version and do the right type
+check python3 will throw an error when it tries to use the unicode
+type because it doesn't exist.
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+Signed-off-by: Ben Pfaff <blp@ovn.org>
+---
+ ovsdb/ovsdb-doc | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/ovsdb/ovsdb-doc b/ovsdb/ovsdb-doc
+index 918e88a..406c293 100755
+--- a/ovsdb/ovsdb-doc
++++ b/ovsdb/ovsdb-doc
+@@ -65,9 +65,15 @@ def columnGroupToNroff(table, groupXml, documented_columns):
+                 if node.hasAttribute('type'):
+                     type_string = node.attributes['type'].nodeValue
+                     type_json = ovs.json.from_string(str(type_string))
+-                    if type(type_json) in (str, unicode):
+-                        raise error.Error("%s %s:%s has invalid 'type': %s" 
+-                                          % (table.name, name, key, type_json))
++                    # py2 -> py3 means str -> bytes and unicode -> str
++                    try:
++                        if type(type_json) in (str, unicode):
++                            raise error.Error("%s %s:%s has invalid 'type': %s" 
++                                              % (table.name, name, key, type_json))
++                    except:
++                        if type(type_json) in (bytes, str):
++                            raise error.Error("%s %s:%s has invalid 'type': %s" 
++                                              % (table.name, name, key, type_json))
+                     type_ = ovs.db.types.BaseType.from_json(type_json)
+                 else:
+                     type_ = column.type.value
+-- 
+2.5.0
+
diff --git a/recipes-networking/openvswitch/openvswitch-git/0008-AUTHORS-Add-Jason-Wessel.patch b/recipes-networking/openvswitch/openvswitch-git/0008-AUTHORS-Add-Jason-Wessel.patch
new file mode 100644
index 000000000000..d2c2be7cf352
--- /dev/null
+++ b/recipes-networking/openvswitch/openvswitch-git/0008-AUTHORS-Add-Jason-Wessel.patch
@@ -0,0 +1,28 @@
+From a3289add8368e0c970ae1c1c84f5df1f817ed43c Mon Sep 17 00:00:00 2001
+From: Ben Pfaff <blp@ovn.org>
+Date: Thu, 6 Jul 2017 14:01:27 -0700
+Subject: [PATCH 8/8] AUTHORS: Add Jason Wessel.
+
+Commit a91c4cfaf863718bc94fb9c88939bd0b0385a6fe from
+https://github.com/openvswitch/ovs.git
+
+Signed-off-by: Ben Pfaff <blp@ovn.org>
+---
+ AUTHORS.rst | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/AUTHORS.rst b/AUTHORS.rst
+index 63e6a8d..d0dc70d 100644
+--- a/AUTHORS.rst
++++ b/AUTHORS.rst
+@@ -156,6 +156,7 @@ Jan Scheurich                   jan.scheurich@ericsson.com
+ Jan Vansteenkiste               jan@vstone.eu
+ Jarno Rajahalme                 jarno@ovn.org
+ Jason Kölker                    jason@koelker.net
++Jason Wessel                    jason.wessel@windriver.com
+ Jasper Capel                    jasper@capel.tv
+ Jean Tourrilhes                 jt@hpl.hp.com
+ Jeremy Stribling                strib@nicira.com
+-- 
+2.5.0
+
diff --git a/recipes-networking/openvswitch/openvswitch.inc b/recipes-networking/openvswitch/openvswitch.inc
index 0e2e67f65b01..9d7f0f3494ef 100644
--- a/recipes-networking/openvswitch/openvswitch.inc
+++ b/recipes-networking/openvswitch/openvswitch.inc
@@ -34,7 +34,6 @@ SRC_URI = "\
 	"
 
 EXTRA_OECONF += "\
-	PYTHON=python \
 	PYTHON3=python3 \
 	PERL=${bindir}/perl \
 	"
diff --git a/recipes-networking/openvswitch/openvswitch_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb
index 39726075953e..a3c586b75200 100644
--- a/recipes-networking/openvswitch/openvswitch_git.bb
+++ b/recipes-networking/openvswitch/openvswitch_git.bb
@@ -33,6 +33,19 @@ SRC_URI = "file://openvswitch-switch \
            file://python-switch-remaining-scripts-to-use-python3.patch \
            "
 
+# Temporarily backport patches to better support py3. These have been
+# merged upstream but are not part of v2.7.1.
+SRC_URI += " \
+           file://0001-Python3-compatibility-Convert-print-statements.patch \
+           file://0002-Python3-compatibility-exception-cleanup.patch \
+           file://0003-Python3-compatibility-execfile-to-exec.patch \
+           file://0004-Python3-compatibility-iteritems-to-items.patch \
+           file://0005-Python3-compatibility-fix-integer-problems.patch \
+           file://0006-Python3-compatibility-math-error-compatibility.patch \
+           file://0007-Python3-compatibility-unicode-to-str.patch \
+           file://0008-AUTHORS-Add-Jason-Wessel.patch \
+"
+
 LIC_FILES_CHKSUM = "file://COPYING;md5=17b2c9d4c70853a09c0e143137754b35"
 
 PACKAGECONFIG ?= ""
-- 
2.4.0.53.g8440f74



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 03/12] runc-docker: Uprev to 1.0-rc3+
  2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 01/12] openvswitch: uprev to v2.7.1 Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 02/12] openvswitch: backport py3 fixups Bruce Ashfield
@ 2017-07-17 20:04 ` Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 04/12] runc-docker: Add --console-socket=/dev/null Bruce Ashfield
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

From: Jason Wessel <jason.wessel@windriver.com>

Uprev to pick up latest changes in docker-runc.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 ...untime-spec-198f23f827eea397d4331d7eb048d.patch |  89 ++++++++++
 ...-Remove-Platform-as-no-longer-in-OCI-spec.patch |  75 ++++++++
 ...date-memory-specs-to-use-int64-not-uint64.patch | 194 +++++++++++++++++++++
 recipes-containers/runc/runc-docker_git.bb         |   9 +-
 recipes-containers/runc/runc.inc                   |   4 +
 5 files changed, 368 insertions(+), 3 deletions(-)
 create mode 100644 recipes-containers/runc/runc-docker/0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch
 create mode 100644 recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch
 create mode 100644 recipes-containers/runc/runc-docker/0003-Update-memory-specs-to-use-int64-not-uint64.patch

diff --git a/recipes-containers/runc/runc-docker/0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch b/recipes-containers/runc/runc-docker/0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch
new file mode 100644
index 000000000000..bc1e9a236e73
--- /dev/null
+++ b/recipes-containers/runc/runc-docker/0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch
@@ -0,0 +1,89 @@
+From e8ef6025a4f48620baf91737cd37eb5e6a40f48c Mon Sep 17 00:00:00 2001
+From: Justin Cormack <justin.cormack@docker.com>
+Date: Fri, 23 Jun 2017 17:14:59 -0700
+Subject: [PATCH 1/3] Update to runtime spec
+ 198f23f827eea397d4331d7eb048d9d4c7ff7bee
+
+Updates memory limits to be int64, and removes Platform from spec.
+
+Signed-off-by: Justin Cormack <justin.cormack@docker.com>
+---
+ vendor.conf                                        |  2 +-
+ .../opencontainers/runtime-spec/specs-go/config.go | 23 ++++++----------------
+ 2 files changed, 7 insertions(+), 18 deletions(-)
+
+diff --git a/vendor.conf b/vendor.conf
+index e23e7ea7..09a8a924 100644
+--- a/vendor.conf
++++ b/vendor.conf
+@@ -1,7 +1,7 @@
+ # OCI runtime-spec. When updating this, make sure you use a version tag rather
+ # than a commit ID so it's much more obvious what version of the spec we are
+ # using.
+-github.com/opencontainers/runtime-spec 239c4e44f2a612ed85f6db9c66247aa33f437e91
++github.com/opencontainers/runtime-spec 198f23f827eea397d4331d7eb048d9d4c7ff7bee
+ # Core libcontainer functionality.
+ github.com/mrunalp/fileutils ed869b029674c0e9ce4c0dfa781405c2d9946d08
+ github.com/opencontainers/selinux v1.0.0-rc1
+diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
+index 8bf8d924..68ab112e 100644
+--- a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
++++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
+@@ -6,8 +6,6 @@ import "os"
+ type Spec struct {
+ 	// Version of the Open Container Runtime Specification with which the bundle complies.
+ 	Version string `json:"ociVersion"`
+-	// Platform specifies the configuration's target platform.
+-	Platform Platform `json:"platform"`
+ 	// Process configures the container process.
+ 	Process *Process `json:"process,omitempty"`
+ 	// Root configures the container's root filesystem.
+@@ -101,15 +99,6 @@ type Root struct {
+ 	Readonly bool `json:"readonly,omitempty"`
+ }
+ 
+-// Platform specifies OS and arch information for the host system that the container
+-// is created for.
+-type Platform struct {
+-	// OS is the operating system.
+-	OS string `json:"os"`
+-	// Arch is the architecture
+-	Arch string `json:"arch"`
+-}
+-
+ // Mount specifies a mount for a container.
+ type Mount struct {
+ 	// Destination is the absolute path where the mount will be placed in the container.
+@@ -284,15 +273,15 @@ type LinuxBlockIO struct {
+ // LinuxMemory for Linux cgroup 'memory' resource management
+ type LinuxMemory struct {
+ 	// Memory limit (in bytes).
+-	Limit *uint64 `json:"limit,omitempty"`
++	Limit *int64 `json:"limit,omitempty"`
+ 	// Memory reservation or soft_limit (in bytes).
+-	Reservation *uint64 `json:"reservation,omitempty"`
++	Reservation *int64 `json:"reservation,omitempty"`
+ 	// Total memory limit (memory + swap).
+-	Swap *uint64 `json:"swap,omitempty"`
++	Swap *int64 `json:"swap,omitempty"`
+ 	// Kernel memory limit (in bytes).
+-	Kernel *uint64 `json:"kernel,omitempty"`
++	Kernel *int64 `json:"kernel,omitempty"`
+ 	// Kernel memory limit for tcp (in bytes)
+-	KernelTCP *uint64 `json:"kernelTCP,omitempty"`
++	KernelTCP *int64 `json:"kernelTCP,omitempty"`
+ 	// How aggressive the kernel will swap memory pages.
+ 	Swappiness *uint64 `json:"swappiness,omitempty"`
+ }
+@@ -486,7 +475,7 @@ type WindowsNetwork struct {
+ 	EndpointList []string `json:"endpointList,omitempty"`
+ 	// Specifies if unqualified DNS name resolution is allowed.
+ 	AllowUnqualifiedDNSQuery bool `json:"allowUnqualifiedDNSQuery,omitempty"`
+-	// Comma seperated list of DNS suffixes to use for name resolution.
++	// Comma separated list of DNS suffixes to use for name resolution.
+ 	DNSSearchList []string `json:"DNSSearchList,omitempty"`
+ 	// Name (ID) of the container that we will share with the network stack.
+ 	NetworkSharedContainerName string `json:"networkSharedContainerName,omitempty"`
+-- 
+2.11.0
+
diff --git a/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch b/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch
new file mode 100644
index 000000000000..6ec286a87b5f
--- /dev/null
+++ b/recipes-containers/runc/runc-docker/0002-Remove-Platform-as-no-longer-in-OCI-spec.patch
@@ -0,0 +1,75 @@
+From e1146182a8cebb5a6133a9e298a5e4acf99652e9 Mon Sep 17 00:00:00 2001
+From: Justin Cormack <justin.cormack@docker.com>
+Date: Fri, 23 Jun 2017 17:16:08 -0700
+Subject: [PATCH 2/3] Remove Platform as no longer in OCI spec
+
+This was never used, just validated, so was removed from spec.
+
+Signed-off-by: Justin Cormack <justin.cormack@docker.com>
+---
+ libcontainer/specconv/example.go |  5 -----
+ spec.go                          | 14 --------------
+ 2 files changed, 19 deletions(-)
+
+diff --git a/libcontainer/specconv/example.go b/libcontainer/specconv/example.go
+index 33134116..d6621194 100644
+--- a/libcontainer/specconv/example.go
++++ b/libcontainer/specconv/example.go
+@@ -2,7 +2,6 @@ package specconv
+ 
+ import (
+ 	"os"
+-	"runtime"
+ 	"strings"
+ 
+ 	"github.com/opencontainers/runtime-spec/specs-go"
+@@ -15,10 +14,6 @@ func sPtr(s string) *string { return &s }
+ func Example() *specs.Spec {
+ 	return &specs.Spec{
+ 		Version: specs.Version,
+-		Platform: specs.Platform{
+-			OS:   runtime.GOOS,
+-			Arch: runtime.GOARCH,
+-		},
+ 		Root: specs.Root{
+ 			Path:     "rootfs",
+ 			Readonly: true,
+diff --git a/spec.go b/spec.go
+index 92d38f57..876937d2 100644
+--- a/spec.go
++++ b/spec.go
+@@ -7,7 +7,6 @@ import (
+ 	"fmt"
+ 	"io/ioutil"
+ 	"os"
+-	"runtime"
+ 
+ 	"github.com/opencontainers/runc/libcontainer/configs"
+ 	"github.com/opencontainers/runc/libcontainer/specconv"
+@@ -131,9 +130,6 @@ func loadSpec(cPath string) (spec *specs.Spec, err error) {
+ 	if err = json.NewDecoder(cf).Decode(&spec); err != nil {
+ 		return nil, err
+ 	}
+-	if err = validatePlatform(&spec.Platform); err != nil {
+-		return nil, err
+-	}
+ 	return spec, validateProcessSpec(spec.Process)
+ }
+ 
+@@ -148,13 +144,3 @@ func createLibContainerRlimit(rlimit specs.LinuxRlimit) (configs.Rlimit, error)
+ 		Soft: rlimit.Soft,
+ 	}, nil
+ }
+-
+-func validatePlatform(platform *specs.Platform) error {
+-	if platform.OS != runtime.GOOS {
+-		return fmt.Errorf("target os %s mismatch with current os %s", platform.OS, runtime.GOOS)
+-	}
+-	if platform.Arch != runtime.GOARCH {
+-		return fmt.Errorf("target arch %s mismatch with current arch %s", platform.Arch, runtime.GOARCH)
+-	}
+-	return nil
+-}
+-- 
+2.11.0
+
diff --git a/recipes-containers/runc/runc-docker/0003-Update-memory-specs-to-use-int64-not-uint64.patch b/recipes-containers/runc/runc-docker/0003-Update-memory-specs-to-use-int64-not-uint64.patch
new file mode 100644
index 000000000000..9cb349221cfe
--- /dev/null
+++ b/recipes-containers/runc/runc-docker/0003-Update-memory-specs-to-use-int64-not-uint64.patch
@@ -0,0 +1,194 @@
+From 3d9074ead33a5c27dc20bb49457c69c6d2ae6b57 Mon Sep 17 00:00:00 2001
+From: Justin Cormack <justin.cormack@docker.com>
+Date: Fri, 23 Jun 2017 17:17:00 -0700
+Subject: [PATCH 3/3] Update memory specs to use int64 not uint64
+
+replace #1492 #1494
+fix #1422
+
+Since https://github.com/opencontainers/runtime-spec/pull/876 the memory
+specifications are now `int64`, as that better matches the visible interface where
+`-1` is a valid value. Otherwise finding the correct value was difficult as it
+was kernel dependent.
+
+Signed-off-by: Justin Cormack <justin.cormack@docker.com>
+---
+ libcontainer/cgroups/fs/memory.go    | 36 +++++++++++++++++-------------------
+ libcontainer/configs/cgroup_linux.go | 10 +++++-----
+ update.go                            | 14 +++++++-------
+ 3 files changed, 29 insertions(+), 31 deletions(-)
+
+diff --git a/libcontainer/cgroups/fs/memory.go b/libcontainer/cgroups/fs/memory.go
+index da2cc9f8..b739c631 100644
+--- a/libcontainer/cgroups/fs/memory.go
++++ b/libcontainer/cgroups/fs/memory.go
+@@ -73,14 +73,14 @@ func EnableKernelMemoryAccounting(path string) error {
+ 	// until a limit is set on the cgroup and limit cannot be set once the
+ 	// cgroup has children, or if there are already tasks in the cgroup.
+ 	for _, i := range []int64{1, -1} {
+-		if err := setKernelMemory(path, uint64(i)); err != nil {
++		if err := setKernelMemory(path, i); err != nil {
+ 			return err
+ 		}
+ 	}
+ 	return nil
+ }
+ 
+-func setKernelMemory(path string, kernelMemoryLimit uint64) error {
++func setKernelMemory(path string, kernelMemoryLimit int64) error {
+ 	if path == "" {
+ 		return fmt.Errorf("no such directory for %s", cgroupKernelMemoryLimit)
+ 	}
+@@ -88,7 +88,7 @@ func setKernelMemory(path string, kernelMemoryLimit uint64) error {
+ 		// kernel memory is not enabled on the system so we should do nothing
+ 		return nil
+ 	}
+-	if err := ioutil.WriteFile(filepath.Join(path, cgroupKernelMemoryLimit), []byte(strconv.FormatUint(kernelMemoryLimit, 10)), 0700); err != nil {
++	if err := ioutil.WriteFile(filepath.Join(path, cgroupKernelMemoryLimit), []byte(strconv.FormatInt(kernelMemoryLimit, 10)), 0700); err != nil {
+ 		// Check if the error number returned by the syscall is "EBUSY"
+ 		// The EBUSY signal is returned on attempts to write to the
+ 		// memory.kmem.limit_in_bytes file if the cgroup has children or
+@@ -106,14 +106,12 @@ func setKernelMemory(path string, kernelMemoryLimit uint64) error {
+ }
+ 
+ func setMemoryAndSwap(path string, cgroup *configs.Cgroup) error {
+-	ulimited := -1
+-
+-	// If the memory update is set to uint64(-1) we should also
+-	// set swap to uint64(-1), it means unlimited memory.
+-	if cgroup.Resources.Memory == uint64(ulimited) {
+-		// Only set swap if it's enbled in kernel
++	// If the memory update is set to -1 we should also
++	// set swap to -1, it means unlimited memory.
++	if cgroup.Resources.Memory == -1 {
++		// Only set swap if it's enabled in kernel
+ 		if cgroups.PathExists(filepath.Join(path, cgroupMemorySwapLimit)) {
+-			cgroup.Resources.MemorySwap = uint64(ulimited)
++			cgroup.Resources.MemorySwap = -1
+ 		}
+ 	}
+ 
+@@ -128,29 +126,29 @@ func setMemoryAndSwap(path string, cgroup *configs.Cgroup) error {
+ 		// When update memory limit, we should adapt the write sequence
+ 		// for memory and swap memory, so it won't fail because the new
+ 		// value and the old value don't fit kernel's validation.
+-		if cgroup.Resources.MemorySwap == uint64(ulimited) || memoryUsage.Limit < cgroup.Resources.MemorySwap {
+-			if err := writeFile(path, cgroupMemorySwapLimit, strconv.FormatUint(cgroup.Resources.MemorySwap, 10)); err != nil {
++		if cgroup.Resources.MemorySwap == -1 || memoryUsage.Limit < uint64(cgroup.Resources.MemorySwap) {
++			if err := writeFile(path, cgroupMemorySwapLimit, strconv.FormatInt(cgroup.Resources.MemorySwap, 10)); err != nil {
+ 				return err
+ 			}
+-			if err := writeFile(path, cgroupMemoryLimit, strconv.FormatUint(cgroup.Resources.Memory, 10)); err != nil {
++			if err := writeFile(path, cgroupMemoryLimit, strconv.FormatInt(cgroup.Resources.Memory, 10)); err != nil {
+ 				return err
+ 			}
+ 		} else {
+-			if err := writeFile(path, cgroupMemoryLimit, strconv.FormatUint(cgroup.Resources.Memory, 10)); err != nil {
++			if err := writeFile(path, cgroupMemoryLimit, strconv.FormatInt(cgroup.Resources.Memory, 10)); err != nil {
+ 				return err
+ 			}
+-			if err := writeFile(path, cgroupMemorySwapLimit, strconv.FormatUint(cgroup.Resources.MemorySwap, 10)); err != nil {
++			if err := writeFile(path, cgroupMemorySwapLimit, strconv.FormatInt(cgroup.Resources.MemorySwap, 10)); err != nil {
+ 				return err
+ 			}
+ 		}
+ 	} else {
+ 		if cgroup.Resources.Memory != 0 {
+-			if err := writeFile(path, cgroupMemoryLimit, strconv.FormatUint(cgroup.Resources.Memory, 10)); err != nil {
++			if err := writeFile(path, cgroupMemoryLimit, strconv.FormatInt(cgroup.Resources.Memory, 10)); err != nil {
+ 				return err
+ 			}
+ 		}
+ 		if cgroup.Resources.MemorySwap != 0 {
+-			if err := writeFile(path, cgroupMemorySwapLimit, strconv.FormatUint(cgroup.Resources.MemorySwap, 10)); err != nil {
++			if err := writeFile(path, cgroupMemorySwapLimit, strconv.FormatInt(cgroup.Resources.MemorySwap, 10)); err != nil {
+ 				return err
+ 			}
+ 		}
+@@ -171,13 +169,13 @@ func (s *MemoryGroup) Set(path string, cgroup *configs.Cgroup) error {
+ 	}
+ 
+ 	if cgroup.Resources.MemoryReservation != 0 {
+-		if err := writeFile(path, "memory.soft_limit_in_bytes", strconv.FormatUint(cgroup.Resources.MemoryReservation, 10)); err != nil {
++		if err := writeFile(path, "memory.soft_limit_in_bytes", strconv.FormatInt(cgroup.Resources.MemoryReservation, 10)); err != nil {
+ 			return err
+ 		}
+ 	}
+ 
+ 	if cgroup.Resources.KernelMemoryTCP != 0 {
+-		if err := writeFile(path, "memory.kmem.tcp.limit_in_bytes", strconv.FormatUint(cgroup.Resources.KernelMemoryTCP, 10)); err != nil {
++		if err := writeFile(path, "memory.kmem.tcp.limit_in_bytes", strconv.FormatInt(cgroup.Resources.KernelMemoryTCP, 10)); err != nil {
+ 			return err
+ 		}
+ 	}
+diff --git a/libcontainer/configs/cgroup_linux.go b/libcontainer/configs/cgroup_linux.go
+index 3e0509de..e15a662f 100644
+--- a/libcontainer/configs/cgroup_linux.go
++++ b/libcontainer/configs/cgroup_linux.go
+@@ -43,19 +43,19 @@ type Resources struct {
+ 	Devices []*Device `json:"devices"`
+ 
+ 	// Memory limit (in bytes)
+-	Memory uint64 `json:"memory"`
++	Memory int64 `json:"memory"`
+ 
+ 	// Memory reservation or soft_limit (in bytes)
+-	MemoryReservation uint64 `json:"memory_reservation"`
++	MemoryReservation int64 `json:"memory_reservation"`
+ 
+ 	// Total memory usage (memory + swap); set `-1` to enable unlimited swap
+-	MemorySwap uint64 `json:"memory_swap"`
++	MemorySwap int64 `json:"memory_swap"`
+ 
+ 	// Kernel memory limit (in bytes)
+-	KernelMemory uint64 `json:"kernel_memory"`
++	KernelMemory int64 `json:"kernel_memory"`
+ 
+ 	// Kernel memory limit for TCP use (in bytes)
+-	KernelMemoryTCP uint64 `json:"kernel_memory_tcp"`
++	KernelMemoryTCP int64 `json:"kernel_memory_tcp"`
+ 
+ 	// CPU shares (relative weight vs. other containers)
+ 	CpuShares uint64 `json:"cpu_shares"`
+diff --git a/update.go b/update.go
+index 0ea90d60..133be999 100644
+--- a/update.go
++++ b/update.go
+@@ -124,11 +124,11 @@ other options are ignored.
+ 
+ 		r := specs.LinuxResources{
+ 			Memory: &specs.LinuxMemory{
+-				Limit:       u64Ptr(0),
+-				Reservation: u64Ptr(0),
+-				Swap:        u64Ptr(0),
+-				Kernel:      u64Ptr(0),
+-				KernelTCP:   u64Ptr(0),
++				Limit:       i64Ptr(0),
++				Reservation: i64Ptr(0),
++				Swap:        i64Ptr(0),
++				Kernel:      i64Ptr(0),
++				KernelTCP:   i64Ptr(0),
+ 			},
+ 			CPU: &specs.LinuxCPU{
+ 				Shares:          u64Ptr(0),
+@@ -213,7 +213,7 @@ other options are ignored.
+ 			}
+ 			for _, pair := range []struct {
+ 				opt  string
+-				dest *uint64
++				dest *int64
+ 			}{
+ 				{"memory", r.Memory.Limit},
+ 				{"memory-swap", r.Memory.Swap},
+@@ -232,7 +232,7 @@ other options are ignored.
+ 					} else {
+ 						v = -1
+ 					}
+-					*pair.dest = uint64(v)
++					*pair.dest = v
+ 				}
+ 			}
+ 			r.Pids.Limit = int64(context.Int("pids-limit"))
+-- 
+2.11.0
+
diff --git a/recipes-containers/runc/runc-docker_git.bb b/recipes-containers/runc/runc-docker_git.bb
index 96d48cae51d3..194d6612f2b6 100644
--- a/recipes-containers/runc/runc-docker_git.bb
+++ b/recipes-containers/runc/runc-docker_git.bb
@@ -2,10 +2,13 @@ include runc.inc
 
 # Note: this rev is before the required protocol field, update when all components
 #       have been updated to match.
-SRCREV = "2f7393a47307a16f8cee44a37b262e8b81021e3e"
-SRC_URI = "git://github.com/docker/runc.git;nobranch=1 \
+SRCREV_runc-docker = "9d6821d1b53908e249487741eccd567249ca1d99"
+SRC_URI = "git://github.com/docker/runc.git;nobranch=1;name=runc-docker \
+           file://0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch \
+           file://0002-Remove-Platform-as-no-longer-in-OCI-spec.patch \
+           file://0003-Update-memory-specs-to-use-int64-not-uint64.patch \
           "
 
-RUNC_VERSION = "1.0.0-rc2"
+RUNC_VERSION = "1.0.0-rc3"
 PROVIDES += "virtual/runc"
 RPROVIDES_${PN} = "virtual/runc"
diff --git a/recipes-containers/runc/runc.inc b/recipes-containers/runc/runc.inc
index 4808547b15a8..dbc83c275e35 100644
--- a/recipes-containers/runc/runc.inc
+++ b/recipes-containers/runc/runc.inc
@@ -37,6 +37,10 @@ do_compile() {
 	export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
 	cd -
 
+	# Fix up symlink for go-cross compiler
+	rm -f ${S}/vendor/src
+	ln -sf ./ ${S}/vendor/src
+
 	# Pass the needed cflags/ldflags so that cgo
 	# can find the needed headers files and libraries
 	export CGO_ENABLED="1"
-- 
2.4.0.53.g8440f74



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 04/12] runc-docker: Add --console-socket=/dev/null
  2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
                   ` (2 preceding siblings ...)
  2017-07-17 20:04 ` [PATCH 03/12] runc-docker: Uprev to 1.0-rc3+ Bruce Ashfield
@ 2017-07-17 20:04 ` Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 05/12] docker: Uprev to latest based on runc 1.0-rc3 Bruce Ashfield
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

From: Jason Wessel <jason.wessel@windriver.com>

This allows for setting up a detached session where you do not want to
set the terminal to false in the config.json.  More or less this is a
runtime override.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 .../0001-runc-Add-console-socket-dev-null.patch    | 33 ++++++++++++++++++++++
 recipes-containers/runc/runc-docker_git.bb         |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch

diff --git a/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch b/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch
new file mode 100644
index 000000000000..f49adfbf2147
--- /dev/null
+++ b/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch
@@ -0,0 +1,33 @@
+From 3fff2a3505fba1d1ff0074edff15708a77f6cfa9 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <jason.wessel@windriver.com>
+Date: Wed, 12 Jul 2017 13:35:03 -0700
+Subject: [PATCH] runc: Add --console-socket=/dev/null
+
+This allows for setting up a detached session where you do not want to
+set the terminal to false in the config.json.  More or less this is a
+runtime override.
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+---
+ utils_linux.go | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/utils_linux.go b/utils_linux.go
+index 8085f7fe..e6d31b35 100644
+--- a/utils_linux.go
++++ b/utils_linux.go
+@@ -227,6 +227,11 @@ type runner struct {
+ }
+ 
+ func (r *runner) run(config *specs.Process) (int, error) {
++	if (r.consoleSocket == "/dev/null") {
++		r.detach = false
++		r.consoleSocket = ""
++		config.Terminal = false
++	}
+ 	if err := r.checkTerminal(config); err != nil {
+ 		r.destroy()
+ 		return -1, err
+-- 
+2.11.0
+
diff --git a/recipes-containers/runc/runc-docker_git.bb b/recipes-containers/runc/runc-docker_git.bb
index 194d6612f2b6..f412c84b2ecd 100644
--- a/recipes-containers/runc/runc-docker_git.bb
+++ b/recipes-containers/runc/runc-docker_git.bb
@@ -7,6 +7,7 @@ SRC_URI = "git://github.com/docker/runc.git;nobranch=1;name=runc-docker \
            file://0001-Update-to-runtime-spec-198f23f827eea397d4331d7eb048d.patch \
            file://0002-Remove-Platform-as-no-longer-in-OCI-spec.patch \
            file://0003-Update-memory-specs-to-use-int64-not-uint64.patch \
+           file://0001-runc-Add-console-socket-dev-null.patch \
           "
 
 RUNC_VERSION = "1.0.0-rc3"
-- 
2.4.0.53.g8440f74



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 05/12] docker: Uprev to latest based on runc 1.0-rc3
  2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
                   ` (3 preceding siblings ...)
  2017-07-17 20:04 ` [PATCH 04/12] runc-docker: Add --console-socket=/dev/null Bruce Ashfield
@ 2017-07-17 20:04 ` Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 06/12] oci-systemd-hook: Uprev hook to latest Bruce Ashfield
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

From: Jason Wessel <jason.wessel@windriver.com>

The build method for docker client changed where by the docker cli is
now required to be pulled in from a separate git tree to be built.

The integration patch to cross compile was also upreved since some
parts of it were accepted upstream while other parts have not been
accepted at this time.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 recipes-containers/docker/docker_git.bb            | 14 ++++--
 ...-golang.org-x-net-pkg-until-we-move-to-go.patch | 57 +++-------------------
 2 files changed, 18 insertions(+), 53 deletions(-)

diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
index c1b38dce92da..acb177099807 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -18,11 +18,13 @@ DESCRIPTION = "Linux container runtime \
  subtle and/or glaring issues. \
  "
 
-SRCREV_docker = "49bf474f9ed7ce7143a59d1964ff7b7fd9b52178"
-SRCREV_libnetwork="0f534354b813003a754606689722fe253101bc4e"
+SRCREV_docker = "e639a70fbe999d96354a5bcf560231b7b8aa935c"
+SRCREV_libnetwork = "26addf43a5d925ff79d262dbbdb5344bc2b6e198"
+SRCREV_cli = "a765218f1988e85b68aa3977f34893ec7b059a60"
 SRC_URI = "\
-	git://github.com/docker/docker.git;nobranch=1;name=docker \
+	git://github.com/moby/moby.git;nobranch=1;name=docker \
 	git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=libnetwork \
+	git://github.com/docker/cli;branch=master;name=cli;destsuffix=cli \
 	file://docker.init \
 	file://hi.Dockerfile \
 	file://context-use-golang.org-x-net-pkg-until-we-move-to-go.patch \
@@ -30,7 +32,7 @@ SRC_URI = "\
 
 # Apache-2.0 for docker
 LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9740d093a080530b5c5c6573df9af45a"
 
 S = "${WORKDIR}/git"
 
@@ -86,6 +88,7 @@ do_compile() {
 
 	mkdir -p .gopath/src/github.com/docker
 	ln -sf ../../../../../libnetwork .gopath/src/github.com/docker/libnetwork
+	ln -sf ../../../../../cli .gopath/src/github.com/docker/cli
 
 	export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
 	export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
@@ -107,6 +110,9 @@ do_compile() {
 
 	# build the proxy
 	go build -o ${S}/docker-proxy github.com/docker/libnetwork/cmd/proxy
+
+        # build the cli
+	go build -o ${S}/bundles/latest/dynbinary-client/docker github.com/docker/cli/cmd/docker
 }
 
 SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
diff --git a/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch b/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch
index 240b744188a9..c43a7e74827c 100644
--- a/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch
+++ b/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch
@@ -11,20 +11,16 @@ walwrap.go:4:2: cannot find package "context" in any of:
 
 Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
 ---
- client/README.md                                                        | 2 +-
- client/client.go                                                        | 2 +-
- daemon/info_unix.go                                                     | 2 +-
- integration-cli/docker_api_attach_test.go                               | 2 +-
- integration-cli/docker_cli_save_load_unix_test.go                       | 2 +-
- vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go     | 2 +-
- vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go | 2 +-
- 7 files changed, 7 insertions(+), 7 deletions(-)
+ client/README.md                                  |    2 +-
+ client/client.go                                  |    2 +-
+ daemon/info_unix.go                               |    2 +-
+ integration-cli/docker_api_attach_test.go         |    2 +-
+ integration-cli/docker_cli_save_load_unix_test.go |    2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
 
-diff --git a/client/README.md b/client/README.md
-index 059dfb3..9de54aa 100644
 --- a/client/README.md
 +++ b/client/README.md
-@@ -8,7 +8,7 @@ For example, to list running containers (the equivalent of `docker ps`):
+@@ -8,7 +8,7 @@ For example, to list running containers
  package main
  
  import (
@@ -33,11 +29,9 @@ index 059dfb3..9de54aa 100644
  	"fmt"
  
  	"github.com/docker/docker/api/types"
-diff --git a/client/client.go b/client/client.go
-index a9bdab6..95933af 100644
 --- a/client/client.go
 +++ b/client/client.go
-@@ -19,7 +19,7 @@ For example, to list running containers (the equivalent of "docker ps"):
+@@ -19,7 +19,7 @@ For example, to list running containers
  	package main
  
  	import (
@@ -46,8 +40,6 @@ index a9bdab6..95933af 100644
  		"fmt"
  
  		"github.com/docker/docker/api/types"
-diff --git a/daemon/info_unix.go b/daemon/info_unix.go
-index 9c41c0e..57f8a7b 100644
 --- a/daemon/info_unix.go
 +++ b/daemon/info_unix.go
 @@ -3,7 +3,7 @@
@@ -59,8 +51,6 @@ index 9c41c0e..57f8a7b 100644
  	"os/exec"
  	"strings"
  
-diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go
-index d43bf3a..e5802a7 100644
 --- a/integration-cli/docker_api_attach_test.go
 +++ b/integration-cli/docker_api_attach_test.go
 @@ -3,7 +3,7 @@ package main
@@ -72,8 +62,6 @@ index d43bf3a..e5802a7 100644
  	"io"
  	"net"
  	"net/http"
-diff --git a/integration-cli/docker_cli_save_load_unix_test.go b/integration-cli/docker_cli_save_load_unix_test.go
-index 22445e5..d0afc8c 100644
 --- a/integration-cli/docker_cli_save_load_unix_test.go
 +++ b/integration-cli/docker_cli_save_load_unix_test.go
 @@ -3,7 +3,7 @@
@@ -85,32 +73,3 @@ index 22445e5..d0afc8c 100644
  	"fmt"
  	"io/ioutil"
  	"os"
-diff --git a/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go b/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
-index 6b3295a..cbfcf7e 100644
---- a/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
-+++ b/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
-@@ -1,7 +1,7 @@
- package logbroker
- 
- import (
--	"context"
-+	"golang.org/x/net/context"
- 	"fmt"
- 	"strings"
- 	"sync"
-diff --git a/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go b/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
-index 5a6c71a..efe5921 100644
---- a/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
-+++ b/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
-@@ -1,7 +1,7 @@
- package storage
- 
- import (
--	"context"
-+	"golang.org/x/net/context"
- 	"io"
- 	"io/ioutil"
- 	"os"
--- 
-2.7.4
-
-- 
2.4.0.53.g8440f74



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 06/12] oci-systemd-hook: Uprev hook to latest
  2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
                   ` (4 preceding siblings ...)
  2017-07-17 20:04 ` [PATCH 05/12] docker: Uprev to latest based on runc 1.0-rc3 Bruce Ashfield
@ 2017-07-17 20:04 ` Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 07/12] oci-runtime-tools, oci-runtime-spec: Uprev to runc 1.0-rc3 versions Bruce Ashfield
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

From: Jason Wessel <jason.wessel@windriver.com>

The selinux disable patch required changes as more setfilecon
operations were added.

The new upstream work is needed to allow the rootfs specification to
continue working because runc no longer passes the "root" key as a
part of the json configuration which is sent to a hook via stdin.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 .../0001-selinux-drop-selinux-support.patch        | 35 ++++++++++++----------
 .../oci-systemd-hook/oci-systemd-hook_git.bb       |  2 +-
 2 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch b/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch
index 507cd08e6f8f..5016f6e75d9d 100644
--- a/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch
+++ b/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch
@@ -5,25 +5,34 @@ Subject: [PATCH] selinux: drop selinux support
 
 Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
 ---
- src/systemdhook.c | 9 ---------
- 1 file changed, 9 deletions(-)
+ src/systemdhook.c |   12 ------------
+ 1 file changed, 12 deletions(-)
 
-diff --git a/src/systemdhook.c b/src/systemdhook.c
-index 274e5b910699..b9e8f1be376a 100644
 --- a/src/systemdhook.c
 +++ b/src/systemdhook.c
-@@ -14,7 +14,6 @@
+@@ -16,7 +16,6 @@
  #include <errno.h>
  #include <inttypes.h>
  #include <linux/limits.h>
 -#include <selinux/selinux.h>
  #include <yajl/yajl_tree.h>
+ #include <stdbool.h>
  
- #include "config.h"
-@@ -538,14 +537,6 @@ static int prestart(const char *rootfs,
+@@ -129,9 +128,6 @@ static int chperm(const char *path, cons
+ 				closedir(dir);
+ 				return -1;
  			}
- 		}
+-			if (setfilecon (full_path, label) < 0) {
+-				pr_perror("Failed to set context %s on %s", label, full_path);
+-			}
  
+ 			if (doChown) {
+ 				/* Change uid and gid to something the container can handle */
+@@ -496,14 +492,6 @@ static int prestart(const char *rootfs,
+ 				return -1;
+ 			}
+ 		}
+-
 -		if (strcmp("", mount_label)) {
 -			rc = setfilecon(journal_dir, (security_context_t)mount_label);
 -			if (rc < 0) {
@@ -31,10 +40,6 @@ index 274e5b910699..b9e8f1be376a 100644
 -				return -1;
 -			}
 -		}
--
- 		if (makepath(cont_journal_dir, 0755) == -1) {
- 			if (errno != EEXIST) {
- 				pr_perror("Failed to mkdir container journal dir: %s", cont_journal_dir);
--- 
-2.4.0.53.g8440f74
-
+ 
+ 		/* Attempt to creare /var/log/journal inside of rootfs,
+ 		   if successful, or directory exists, mount tmpfs on top of
diff --git a/recipes-containers/oci-systemd-hook/oci-systemd-hook_git.bb b/recipes-containers/oci-systemd-hook/oci-systemd-hook_git.bb
index 872872a1106f..fc88905334da 100644
--- a/recipes-containers/oci-systemd-hook/oci-systemd-hook_git.bb
+++ b/recipes-containers/oci-systemd-hook/oci-systemd-hook_git.bb
@@ -6,7 +6,7 @@ PRIORITY = "optional"
 
 DEPENDS = "yajl util-linux"
 
-SRCREV = "ca515c1f399bd0b16e94b7c34aa1ef20498beca6"
+SRCREV = "1ac958a4197a9ea52174812fc7d7d036af8140d3"
 SRC_URI = "git://github.com/projectatomic/oci-systemd-hook \
            file://0001-selinux-drop-selinux-support.patch \
            file://0001-configure-drop-selinux-support.patch \
-- 
2.4.0.53.g8440f74



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 07/12] oci-runtime-tools, oci-runtime-spec: Uprev to runc 1.0-rc3 versions
  2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
                   ` (5 preceding siblings ...)
  2017-07-17 20:04 ` [PATCH 06/12] oci-systemd-hook: Uprev hook to latest Bruce Ashfield
@ 2017-07-17 20:04 ` Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 08/12] oci-runtime-tools: skip ld checks Bruce Ashfield
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

From: Jason Wessel <jason.wessel@windriver.com>

The config.json has elements which have changed in the latest runc.
These changes are not backward compatible with older versions of runc.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb  |  6 +++---
 .../oci-runtime-tools/oci-runtime-tools_git.bb               | 12 ++++++++++--
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb b/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb
index 82f852f97583..deba7b3e19f3 100644
--- a/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb
+++ b/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb
@@ -9,8 +9,8 @@ SRCNAME = "runtime-spec"
 PKG_NAME = "github.com/opencontainers/${SRCNAME}"
 SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
 
-SRCREV = "4af0c72f92aacf1b43618d7986197d8209fadf0b"
-PV = "v1.0.0-rc4+git${SRCPV}"
+SRCREV = "a39b1cd4fdf7743ab721cc9da58abbee2f8624d1"
+PV = "v1.0.0-rc6+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
@@ -38,4 +38,4 @@ runtime_spec_file_sysroot_preprocess () {
 
 FILES_${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
 
-CLEANBROKEN = "1"
\ No newline at end of file
+CLEANBROKEN = "1"
diff --git a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
index 4f77dced2ad5..a3f8e6656854 100644
--- a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
+++ b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b355a61a394a504dacde901c958f662c"
 
 SRC_URI = "git://github.com/opencontainers/runtime-tools.git"
 
-SRCREV = "038b0c99b82f3c08de31f6b09e693eb24644affd"
+SRCREV = "15ec1df3f6607f4223ab3915547c184cf60a30dd"
 PV = "0.0.1+git${SRCPV}"
 
 S = "${WORKDIR}/git"
@@ -16,7 +16,7 @@ inherit go
 do_compile() {
 	export GOARCH="${TARGET_GOARCH}"
 	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
-	export GOPATH="${S}"
+	export GOPATH="${S}:${S}/vendor"
 
 	# Pass the needed cflags/ldflags so that cgo
 	# can find the needed headers files and libraries
@@ -26,6 +26,14 @@ do_compile() {
 	export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
 	export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
 
+	# link fixups for compilation
+	rm -f ${S}/vendor/src
+	ln -sf ./ ${S}/vendor/src
+	mkdir -p ${S}/vendor/github.com/opencontainers/runtime-tools
+	ln -sf ../../../../generate ${S}/vendor/github.com/opencontainers/runtime-tools/generate
+	ln -sf ../../../../validate ${S}/vendor/github.com/opencontainers/runtime-tools/validate
+	ln -sf ../../../../cmd ${S}/vendor/github.com/opencontainers/runtime-tools/cmd
+
 	oe_runmake
 }
 
-- 
2.4.0.53.g8440f74



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 08/12] oci-runtime-tools: skip ld checks
  2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
                   ` (6 preceding siblings ...)
  2017-07-17 20:04 ` [PATCH 07/12] oci-runtime-tools, oci-runtime-spec: Uprev to runc 1.0-rc3 versions Bruce Ashfield
@ 2017-07-17 20:04 ` Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 09/12] docker: update version string to 17.06.0 Bruce Ashfield
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

The latest oci-runtime-tool builds are throwing the missing GNU_HASH
error during QA checks.

This is common with go applications, and isn't a problem, so for now,
we simply skip the check.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
index a3f8e6656854..d73edfe71a61 100644
--- a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
+++ b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
@@ -10,6 +10,8 @@ PV = "0.0.1+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
+INSANE_SKIP_${PN} += "ldflags"
+
 inherit goarch
 inherit go
 
-- 
2.4.0.53.g8440f74



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 09/12] docker: update version string to 17.06.0
  2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
                   ` (7 preceding siblings ...)
  2017-07-17 20:04 ` [PATCH 08/12] oci-runtime-tools: skip ld checks Bruce Ashfield
@ 2017-07-17 20:04 ` Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 10/12] containerd: uprev to latest 0.2.x Bruce Ashfield
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

The docker uprev missed the version string which matches the actual
binary being built. With this change, the package now reflects the
correct version.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 recipes-containers/docker/docker_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
index acb177099807..16ebd2104a53 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -36,7 +36,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=9740d093a080530b5c5c6573df9af45a"
 
 S = "${WORKDIR}/git"
 
-DOCKER_VERSION = "1.13.0"
+DOCKER_VERSION = "17.06.0"
 PV = "${DOCKER_VERSION}+git${SRCREV_docker}"
 
 DEPENDS = " \
-- 
2.4.0.53.g8440f74



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 10/12] containerd: uprev to latest 0.2.x
  2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
                   ` (8 preceding siblings ...)
  2017-07-17 20:04 ` [PATCH 09/12] docker: update version string to 17.06.0 Bruce Ashfield
@ 2017-07-17 20:04 ` Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 11/12] lxc: Fix INITSCRIPT_PARAMS value Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 12/12] docker: Fix and update sysvinit script Bruce Ashfield
  11 siblings, 0 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

To match the docker (moby) and runc updates, we need the latest containerd
from the 0.2.x branch to work in cooperation with the other components.

Note: containerd master won't currently work with docker master, but is
very similar to 0.2.x. The build target varies slightly in master, but
otherwise with these changes to the recipe and build steps we can switch
easily when the time comes.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 .../containerd/containerd-docker_git.bb            | 14 ++++++----
 recipes-containers/containerd/containerd.inc       | 30 +++++++++-------------
 .../containerd/files/containerd.service            | 11 ++++++++
 3 files changed, 32 insertions(+), 23 deletions(-)
 create mode 100644 recipes-containers/containerd/files/containerd.service

diff --git a/recipes-containers/containerd/containerd-docker_git.bb b/recipes-containers/containerd/containerd-docker_git.bb
index f6dcaeca9e97..b18a9bb29d22 100644
--- a/recipes-containers/containerd/containerd-docker_git.bb
+++ b/recipes-containers/containerd/containerd-docker_git.bb
@@ -1,10 +1,14 @@
-include containerd.inc
-
-SRCREV = "03e5862ec0d8d3b3f750e19fca3ee367e13c090e"
+SRCREV = "3addd840653146c90a254301d6c3a663c7fd6429"
 SRC_URI = "\
-	git://github.com/docker/containerd.git;branch=docker-1.13.x \
+	git://github.com/docker/containerd.git;branch=v0.2.x;destsuffix=git/src/github.com/containerd/containerd \
 	"
-CONTAINERD_VERSION = "0.2.3"
+
+include containerd.inc
+
+CONTAINERD_VERSION = "v0.2.x"
+S = "${WORKDIR}/git/src/github.com/containerd/containerd"
 
 PROVIDES += "virtual/containerd"
 RPROVIDES_${PN} = "virtual/containerd"
+
+DEPENDS += "btrfs-tools"
diff --git a/recipes-containers/containerd/containerd.inc b/recipes-containers/containerd/containerd.inc
index b14397957edb..18d9188e0acf 100644
--- a/recipes-containers/containerd/containerd.inc
+++ b/recipes-containers/containerd/containerd.inc
@@ -8,30 +8,23 @@ DESCRIPTION = "containerd is a daemon to control runC, built for performance and
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE.code;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
 
+SRC_URI += "file://containerd.service"
+
 S = "${WORKDIR}/git"
 
 PV = "${CONTAINERD_VERSION}+git${SRCREV}"
 
 inherit go
+inherit goarch
 
 RRECOMMENDS_${PN} = "lxc docker"
-CONTAINERD_PKG="github.com/docker/containerd"
+CONTAINERD_PKG="github.com/containerd/containerd"
+
+INSANE_SKIP_${PN} += "ldflags"
 
 do_configure[noexec] = "1"
 
 do_compile() {
-	export GOARCH="${TARGET_ARCH}"
-	# supported amd64, 386, arm arm64
-	if [ "${TARGET_ARCH}" = "x86_64" ]; then
-		export GOARCH="amd64"
-	fi
-	if [ "${TARGET_ARCH}" = "aarch64" ]; then
-		export GOARCH="arm64"
-	fi
-	if [ "${TARGET_ARCH}" = "i586" ]; then
-		export GOARCH="386"
-	fi
-
 	# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
 	# docker to download its dependencies but rather
 	# use dependencies packaged independently.
@@ -39,9 +32,9 @@ do_compile() {
 	rm -rf .gopath
 	mkdir -p .gopath/src/"$(dirname "${CONTAINERD_PKG}")"
 	ln -sf ../../../.. .gopath/src/"${CONTAINERD_PKG}"
-	export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
-	export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
-	cd -
+
+        export GOPATH="${WORKDIR}/git/"
+        export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
 
 	# Pass the needed cflags/ldflags so that cgo
 	# can find the needed headers files and libraries
@@ -50,6 +43,7 @@ do_compile() {
 	export LDFLAGS=""
 	export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
 	export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+        export GO_GCFLAGS=""
 	export CC_FOR_TARGET="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
 	export CXX_FOR_TARGET="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"
 
@@ -74,9 +68,9 @@ do_install() {
 
 	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
 		install -d ${D}${systemd_unitdir}/system
-		install -m 644 ${S}/hack/containerd.service ${D}/${systemd_unitdir}/system
+		install -m 644 ${WORKDIR}/containerd.service ${D}/${systemd_unitdir}/system
 	        # adjust from /usr/local/bin to /usr/bin/
-		sed -e "s:/usr/local/bin/containerd:${bindir}/docker-containerd -l \"unix\:///var/run/docker/libcontainerd/docker-containerd.sock\":g" -i ${D}/${systemd_unitdir}/system/containerd.service
+		sed -e "s:/usr/local/bin/containerd:${bindir}/docker-containerd:g" -i ${D}/${systemd_unitdir}/system/containerd.service
 	fi
 }
 
diff --git a/recipes-containers/containerd/files/containerd.service b/recipes-containers/containerd/files/containerd.service
new file mode 100644
index 000000000000..23633b02bcc6
--- /dev/null
+++ b/recipes-containers/containerd/files/containerd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=containerd
+Documentation=https://containerd.tools
+After=network.target
+
+[Service]
+ExecStart=/usr/local/bin/containerd
+Delegate=yes
+
+[Install]
+WantedBy=multi-user.target
-- 
2.4.0.53.g8440f74



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 11/12] lxc: Fix INITSCRIPT_PARAMS value
  2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
                   ` (9 preceding siblings ...)
  2017-07-17 20:04 ` [PATCH 10/12] containerd: uprev to latest 0.2.x Bruce Ashfield
@ 2017-07-17 20:04 ` Bruce Ashfield
  2017-07-17 20:04 ` [PATCH 12/12] docker: Fix and update sysvinit script Bruce Ashfield
  11 siblings, 0 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

From: Jan Kiszka <jan.kiszka@siemens.com>

Analogously to docker: There is no variable
OS_DEFAULT_INITSCRIPT_PARAMS, just use "defaults".

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 recipes-containers/lxc/lxc_2.0.8.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-containers/lxc/lxc_2.0.8.bb b/recipes-containers/lxc/lxc_2.0.8.bb
index f4d1102bd941..8b5d77fc9fce 100644
--- a/recipes-containers/lxc/lxc_2.0.8.bb
+++ b/recipes-containers/lxc/lxc_2.0.8.bb
@@ -79,7 +79,7 @@ SYSTEMD_AUTO_ENABLE_${PN}-setup = "disable"
 
 INITSCRIPT_PACKAGES = "${PN}-setup"
 INITSCRIPT_NAME_{PN}-setup = "lxc"
-INITSCRIPT_PARAMS_${PN}-setup = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
+INITSCRIPT_PARAMS_${PN}-setup = "defaults"
 
 FILES_${PN}-doc = "${mandir} ${infodir}"
 # For LXC the docdir only contains example configuration files and should be included in the lxc package
-- 
2.4.0.53.g8440f74



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 12/12] docker: Fix and update sysvinit script
  2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
                   ` (10 preceding siblings ...)
  2017-07-17 20:04 ` [PATCH 11/12] lxc: Fix INITSCRIPT_PARAMS value Bruce Ashfield
@ 2017-07-17 20:04 ` Bruce Ashfield
  11 siblings, 0 replies; 13+ messages in thread
From: Bruce Ashfield @ 2017-07-17 20:04 UTC (permalink / raw)
  To: meta-virtualization

From: Jan Kiszka <jan.kiszka@siemens.com>

Fix daemonization, align args with docker.service, fix line breaks in
log file - and fix INITSCRIPT_PARAMS (there is no variable
OS_DEFAULT_INITSCRIPT_PARAMS).

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 recipes-containers/docker/docker_git.bb     | 2 +-
 recipes-containers/docker/files/docker.init | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
index 16ebd2104a53..1ced8f479e27 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -122,7 +122,7 @@ SYSTEMD_AUTO_ENABLE_${PN} = "enable"
 
 INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${PN}','',d)}"
 INITSCRIPT_NAME_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','docker.init','',d)}"
-INITSCRIPT_PARAMS_${PN} = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
+INITSCRIPT_PARAMS_${PN} = "defaults"
 
 do_install() {
 	mkdir -p ${D}/${bindir}
diff --git a/recipes-containers/docker/files/docker.init b/recipes-containers/docker/files/docker.init
index 9c01c7581acc..2e8eb9e40a3f 100644
--- a/recipes-containers/docker/files/docker.init
+++ b/recipes-containers/docker/files/docker.init
@@ -28,6 +28,7 @@ exec="/usr/bin/$prog"
 pidfile="/var/run/$prog.pid"
 lockfile="/var/lock/subsys/$prog"
 logfile="/var/log/$prog"
+other_args="--registry-mirror=http://localhost:5000 --insecure-registry=http://localhost:5000 --raw-logs"
 
 [ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
 
@@ -38,8 +39,8 @@ start() {
 
     if ! [ -f $pidfile ]; then
         printf "Starting $prog:\t"
-        echo "\n$(date)\n" >> $logfile
-        "$unshare" -m -- $exec -d $other_args &>> $logfile &
+        echo -e "\n$(date)\n" >> $logfile
+        "$unshare" -m -- $exec daemon $other_args &>> $logfile &
         pid=$!
         touch $lockfile
         # wait up to 10 seconds for the pidfile to exist.  see
-- 
2.4.0.53.g8440f74



^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-07-17 20:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-17 20:04 [PATCH 00/12] FYI: consolidated merge series Bruce Ashfield
2017-07-17 20:04 ` [PATCH 01/12] openvswitch: uprev to v2.7.1 Bruce Ashfield
2017-07-17 20:04 ` [PATCH 02/12] openvswitch: backport py3 fixups Bruce Ashfield
2017-07-17 20:04 ` [PATCH 03/12] runc-docker: Uprev to 1.0-rc3+ Bruce Ashfield
2017-07-17 20:04 ` [PATCH 04/12] runc-docker: Add --console-socket=/dev/null Bruce Ashfield
2017-07-17 20:04 ` [PATCH 05/12] docker: Uprev to latest based on runc 1.0-rc3 Bruce Ashfield
2017-07-17 20:04 ` [PATCH 06/12] oci-systemd-hook: Uprev hook to latest Bruce Ashfield
2017-07-17 20:04 ` [PATCH 07/12] oci-runtime-tools, oci-runtime-spec: Uprev to runc 1.0-rc3 versions Bruce Ashfield
2017-07-17 20:04 ` [PATCH 08/12] oci-runtime-tools: skip ld checks Bruce Ashfield
2017-07-17 20:04 ` [PATCH 09/12] docker: update version string to 17.06.0 Bruce Ashfield
2017-07-17 20:04 ` [PATCH 10/12] containerd: uprev to latest 0.2.x Bruce Ashfield
2017-07-17 20:04 ` [PATCH 11/12] lxc: Fix INITSCRIPT_PARAMS value Bruce Ashfield
2017-07-17 20:04 ` [PATCH 12/12] docker: Fix and update sysvinit script Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.