Yocto 2.3

Move OpenBMC to Yocto 2.3(pyro).

Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Resolves: openbmc/openbmc#2461
diff --git a/import-layers/meta-virtualization/recipes-containers/criu/criu_git.bb b/import-layers/meta-virtualization/recipes-containers/criu/criu_git.bb
index dc0bdbe..21dee2b 100644
--- a/import-layers/meta-virtualization/recipes-containers/criu/criu_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/criu/criu_git.bb
@@ -22,11 +22,12 @@
            file://0002-criu-Skip-documentation-install.patch \
            file://0001-criu-Change-libraries-install-directory.patch \
            ${@bb.utils.contains('PACKAGECONFIG', 'selinux', '', 'file://disable-selinux.patch', d)} \
+           file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
           "
 
 COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
 
-DEPENDS += "libnl libcap protobuf-c-native protobuf-c"
+DEPENDS += "libnl libcap protobuf-c-native protobuf-c util-linux-native"
 
 S = "${WORKDIR}/git"
 
@@ -67,6 +68,7 @@
 }
 
 do_install () {
+    export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages"
     oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" install
 }
 
diff --git a/import-layers/meta-virtualization/recipes-containers/criu/files/disable-selinux.patch b/import-layers/meta-virtualization/recipes-containers/criu/files/disable-selinux.patch
index da881dd..5d5d035 100644
--- a/import-layers/meta-virtualization/recipes-containers/criu/files/disable-selinux.patch
+++ b/import-layers/meta-virtualization/recipes-containers/criu/files/disable-selinux.patch
@@ -1,3 +1,8 @@
+From bd2eeaddfc1f12f87184d870cc9a1adde1cf0b10 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Mon, 24 Apr 2017 13:08:48 -0400
+Subject: [PATCH] criu/Makefile.config: explicitly remove selinux support
+
 Upstream-Status: Inappropriate [disable feature]
 
 It shows warning when build crius if libselinux has been built already:
@@ -7,20 +12,28 @@
 Apply this patch to disable selinux support when 'selinux' is not in PACKAGECONF.
 
 Signed-off-by: Kai Kang <kai.kang@windriver.com>
+[MA: Context updated to apply against criu v2.5]
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ criu/Makefile.config | 5 -----
+ 1 file changed, 5 deletions(-)
 
-diff --git a/Makefile.config b/Makefile.config
-index ce4b8d8..3ac2780 100644
---- a/Makefile.config
-+++ b/Makefile.config
-@@ -8,11 +8,6 @@ ifeq ($(call try-cc,$(LIBBSD_DEV_TEST),-lbsd),y)
- 	DEFINES += -DCONFIG_HAS_LIBBSD
+diff --git a/criu/Makefile.config b/criu/Makefile.config
+index f531b3b..37216f8 100644
+--- a/criu/Makefile.config
++++ b/criu/Makefile.config
+@@ -7,11 +7,6 @@ ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),true)
+         FEATURE_DEFINES	+= -DCONFIG_HAS_LIBBSD
  endif
  
 -ifeq ($(call pkg-config-check,libselinux),y)
--	LIBS := -lselinux $(LIBS)
--	DEFINES += -DCONFIG_HAS_SELINUX
+-        LIBS		+= -lselinux
+-        FEATURE_DEFINES	+= -DCONFIG_HAS_SELINUX
 -endif
 -
- $(CONFIG): scripts/utilities.mak scripts/feature-tests.mak include/config-base.h
- 	$(E) "  GEN     " $@
- 	$(Q) @echo '#ifndef __CR_CONFIG_H__' > $@
+ export DEFINES += $(FEATURE_DEFINES)
+ export CFLAGS += $(FEATURE_DEFINES)
+ 
+-- 
+2.7.4
+
diff --git a/import-layers/meta-virtualization/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch b/import-layers/meta-virtualization/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
new file mode 100644
index 0000000..8bda8c4
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/criu/files/lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch
@@ -0,0 +1,30 @@
+From 2e0c5c66786016f6443da2c1ff15ad77f018ec9b Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Mon, 24 Apr 2017 16:12:05 -0400
+Subject: [PATCH] lib/Makefile: overwrite install-lib, to allow multiarch
+
+I am not sure why Yocto installs python modules in arch specific
+/usr/libXX directories but it does. Allow the recipe to pass this via
+INSTALL_LIB.
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ lib/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index f1c0821..c714d12 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -56,7 +56,7 @@ install: lib-c lib-py ../crit/crit c/criu.pc.in
+ 	$(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc
+ 	$(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
+ 	$(E) "  INSTALL " crit
+-	$(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES)
++	$(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES) --install-lib=$(INSTALL_LIB)
+ .PHONY: install
+ 
+ uninstall:
+-- 
+2.7.4
+