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/runc/runc-docker_git.bb b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker_git.bb
new file mode 100644
index 0000000..96d48ca
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/runc/runc-docker_git.bb
@@ -0,0 +1,11 @@
+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 \
+          "
+
+RUNC_VERSION = "1.0.0-rc2"
+PROVIDES += "virtual/runc"
+RPROVIDES_${PN} = "virtual/runc"
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc-opencontainers_git.bb b/import-layers/meta-virtualization/recipes-containers/runc/runc-opencontainers_git.bb
new file mode 100644
index 0000000..4a6e8cd
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/runc/runc-opencontainers_git.bb
@@ -0,0 +1,15 @@
+include runc.inc
+
+SRCREV = "75f8da7c889acc4509a0cf6f0d3a8f9584778375"
+SRC_URI = "git://github.com/opencontainers/runc;branch=master \
+          "
+RUNC_VERSION = "1.0.0-rc3"
+PROVIDES += "virtual/runc"
+RPROVIDES_${PN} = "virtual/runc"
+
+do_compile_prepend() {
+	# Go looks in a src directory under any directory in GOPATH but
+	# runc-opencontainers uses 'vendor' instead of 'vendor/src'. We can fix
+	# this with a symlink.
+	ln -sfn . "${S}/vendor/src"
+}
diff --git a/import-layers/meta-virtualization/recipes-containers/runc/runc_git.bb b/import-layers/meta-virtualization/recipes-containers/runc/runc.inc
similarity index 82%
rename from import-layers/meta-virtualization/recipes-containers/runc/runc_git.bb
rename to import-layers/meta-virtualization/recipes-containers/runc/runc.inc
index 905a751..4808547 100644
--- a/import-layers/meta-virtualization/recipes-containers/runc/runc_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/runc/runc.inc
@@ -2,24 +2,15 @@
 SUMMARY = "runc container cli tools"
 DESCRIPTION = "runc is a CLI tool for spawning and running containers according to the OCI specification."
 
-# Note: this rev is before the required protocol field, update when all components
-#       have been updated to match.
-SRCREV = "1cdaa709f151b61cee2bdaa09d8e5d2b58a8ba72"
-SRC_URI = "\
-	git://github.com/opencontainers/runc;branch=master \
-	"
-
 # Apache-2.0 for containerd
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8"
 
 S = "${WORKDIR}/git"
 
-RUNC_VERSION = "1.0.0-rc1"
 PV = "${RUNC_VERSION}+git${SRCREV}"
 
-DEPENDS = "go-cross \
-    "
+inherit go
 RRECOMMENDS_${PN} = "lxc docker"
 
 LIBCONTAINER_PACKAGE="github.com/opencontainers/runc/libcontainer"
@@ -27,11 +18,11 @@
 do_configure[noexec] = "1"
 EXTRA_OEMAKE="BUILDTAGS=''"
 
-inherit go-osarchmap
+inherit goarch
 
 do_compile() {
 	export GOARCH="${TARGET_GOARCH}"
-
+	export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
 	# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
 	# docker to download its dependencies but rather
 	# use dependencies packaged independently.
@@ -43,6 +34,7 @@
 
 	(cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname})
 	export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+	export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
 	cd -
 
 	# Pass the needed cflags/ldflags so that cgo