These recipes are copied verbatim from:
https://git.yoctoproject.org/meta-virtualization/tree/?id=dbd37caa6d48772b87426450fb6b816c11acc68a

(copy from external source:
 git: https://git.yoctoproject.org/meta-virtualization
 archive: dbd37caa6d48772b87426450fb6b816c11acc68a
 copy: recipes-containers/ --> recipes-containers/
 copy: recipes-devtools/go/ --> recipes-devtools/go/
)

Acked-by: Martin Kaistra <[email protected]>
Signed-off-by: Alexander Kanavin <[email protected]>
---
 .../cgroup-lite/cgroup-lite_1.15.bb           |  34 ++++
 .../cgroup-lite/files/cgroups-init            |  27 +++
 recipes-containers/containerd/README.md       |  30 +++
 .../0001-Add-build-option-GODEBUG-1.patch     |  32 ++++
 ...O_BUILD_FLAGS-to-be-externally-speci.patch |  38 ++++
 .../containerd-opencontainers_git.bb          | 127 +++++++++++++
 ...1-build-use-oe-provided-GO-and-flags.patch |  64 +++++++
 recipes-containers/docker/docker-ce_git.bb    |  57 ++++++
 recipes-containers/docker/docker.inc          | 179 ++++++++++++++++++
 ...ernal-GO111MODULE-and-cross-compiler.patch |  27 +++
 ...0001-dynbinary-use-go-cross-compiler.patch |  23 +++
 ...0001-libnetwork-use-GO-instead-of-go.patch |  59 ++++++
 recipes-containers/docker/files/docker.init   | 131 +++++++++++++
 ...-GOBUILDFLAGS-for-runc-and-remove-re.patch |  37 ++++
 ...001-runc-Add-console-socket-dev-null.patch |  30 +++
 .../0001-runc-docker-SIGUSR1-daemonize.patch  | 131 +++++++++++++
 recipes-containers/runc/runc-docker_git.bb    |  14 ++
 .../runc/runc-opencontainers_git.bb           |  10 +
 recipes-containers/runc/runc.inc              |  83 ++++++++
 ...-output-binary-allow-yocto-to-do-thi.patch |  28 +++
 recipes-containers/tini/tini_0.19.0.bb        |  32 ++++
 recipes-devtools/go/compose-file_git.bb       |  41 ++++
 .../0001-build-use-instead-of-go.patch        |  30 +++
 recipes-devtools/go/go-build_git.bb           |  58 ++++++
 recipes-devtools/go/go-capability_git.bb      |  29 +++
 recipes-devtools/go/go-cli_git.bb             |  29 +++
 recipes-devtools/go/go-connections_git.bb     |  39 ++++
 recipes-devtools/go/go-context_git.bb         |  28 +++
 recipes-devtools/go/go-dbus_git.bb            |  29 +++
 recipes-devtools/go/go-distribution_git.bb    |  39 ++++
 recipes-devtools/go/go-fsnotify_git.bb        |  29 +++
 recipes-devtools/go/go-libtrust_git.bb        |  29 +++
 recipes-devtools/go/go-logrus_git.bb          |  29 +++
 recipes-devtools/go/go-md2man_git.bb          |  23 +++
 recipes-devtools/go/go-metalinter_git.bb      |  24 +++
 recipes-devtools/go/go-mux_git.bb             |  28 +++
 recipes-devtools/go/go-patricia_git.bb        |  29 +++
 recipes-devtools/go/go-pty_git.bb             |  28 +++
 recipes-devtools/go/go-systemd_git.bb         |  31 +++
 recipes-devtools/go/grpc-go_git.bb            |  41 ++++
 recipes-devtools/go/notary_git.bb             |  39 ++++
 41 files changed, 1845 insertions(+)
 create mode 100644 recipes-containers/cgroup-lite/cgroup-lite_1.15.bb
 create mode 100755 recipes-containers/cgroup-lite/files/cgroups-init
 create mode 100644 recipes-containers/containerd/README.md
 create mode 100644 
recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch
 create mode 100644 
recipes-containers/containerd/containerd-opencontainers/0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch
 create mode 100644 
recipes-containers/containerd/containerd-opencontainers_git.bb
 create mode 100644 
recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
 create mode 100644 recipes-containers/docker/docker-ce_git.bb
 create mode 100644 recipes-containers/docker/docker.inc
 create mode 100644 
recipes-containers/docker/files/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch
 create mode 100644 
recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch
 create mode 100644 
recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch
 create mode 100644 recipes-containers/docker/files/docker.init
 create mode 100644 
recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.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/0001-runc-docker-SIGUSR1-daemonize.patch
 create mode 100644 recipes-containers/runc/runc-docker_git.bb
 create mode 100644 recipes-containers/runc/runc-opencontainers_git.bb
 create mode 100644 recipes-containers/runc/runc.inc
 create mode 100644 
recipes-containers/tini/tini/0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch
 create mode 100644 recipes-containers/tini/tini_0.19.0.bb
 create mode 100644 recipes-devtools/go/compose-file_git.bb
 create mode 100644 
recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch
 create mode 100644 recipes-devtools/go/go-build_git.bb
 create mode 100644 recipes-devtools/go/go-capability_git.bb
 create mode 100644 recipes-devtools/go/go-cli_git.bb
 create mode 100644 recipes-devtools/go/go-connections_git.bb
 create mode 100644 recipes-devtools/go/go-context_git.bb
 create mode 100644 recipes-devtools/go/go-dbus_git.bb
 create mode 100644 recipes-devtools/go/go-distribution_git.bb
 create mode 100644 recipes-devtools/go/go-fsnotify_git.bb
 create mode 100644 recipes-devtools/go/go-libtrust_git.bb
 create mode 100644 recipes-devtools/go/go-logrus_git.bb
 create mode 100644 recipes-devtools/go/go-md2man_git.bb
 create mode 100644 recipes-devtools/go/go-metalinter_git.bb
 create mode 100644 recipes-devtools/go/go-mux_git.bb
 create mode 100644 recipes-devtools/go/go-patricia_git.bb
 create mode 100644 recipes-devtools/go/go-pty_git.bb
 create mode 100644 recipes-devtools/go/go-systemd_git.bb
 create mode 100644 recipes-devtools/go/grpc-go_git.bb
 create mode 100644 recipes-devtools/go/notary_git.bb

diff --git a/recipes-containers/cgroup-lite/cgroup-lite_1.15.bb 
b/recipes-containers/cgroup-lite/cgroup-lite_1.15.bb
new file mode 100644
index 0000000..8bed040
--- /dev/null
+++ b/recipes-containers/cgroup-lite/cgroup-lite_1.15.bb
@@ -0,0 +1,34 @@
+SECTION = "devel"
+SUMMARY = "Light-weight package to set up cgroups at system boot."
+DESCRIPTION =  "Light-weight package to set up cgroups at system boot."
+HOMEPAGE = "http://packages.ubuntu.com/source/artful/cgroup-lite";
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = 
"file://debian/copyright;md5=5d5da4e0867cf06014f87102154d0102"
+SRC_URI = 
"https://launchpad.net/ubuntu/+archive/primary/+files/cgroup-lite_1.15.tar.xz";
+SRC_URI += "file://cgroups-init"
+SRC_URI[md5sum] = "1438c1f4a7227c0dedfce5f86f02591d"
+SRC_URI[sha256sum] = 
"02f44c70ed3cf27b9e89e5266492fddf4b455336ab4e03abc85e92297537201f"
+
+inherit allarch update-rc.d systemd
+
+INITSCRIPT_NAME = "cgroups-init"
+INITSCRIPT_PARAMS = "start 8 2 3 4 5 . stop 20 0 1 6 ."
+
+# Keeps the sysvinit scripts out of the image if building
+# where systemd is in use.
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN} = "cgroups-init.service"
+SYSTEMD_AUTO_ENABLE:${PN} = "mask"
+
+
+do_install() {
+       install -d ${D}/${base_bindir}
+       install -m 0755 ${S}/scripts/cgroups-mount ${D}/${base_bindir}
+       install -m 0755 ${S}/scripts/cgroups-umount ${D}/${base_bindir}
+
+       install -d ${D}${sysconfdir}/init.d
+       install -m 0755 ${WORKDIR}/cgroups-init 
${D}${sysconfdir}/init.d/cgroups-init
+
+       install -d ${D}${systemd_unitdir}/system
+       ln -sf /dev/null ${D}${systemd_unitdir}/system/cgroups-init.service
+}
diff --git a/recipes-containers/cgroup-lite/files/cgroups-init 
b/recipes-containers/cgroup-lite/files/cgroups-init
new file mode 100755
index 0000000..e504024
--- /dev/null
+++ b/recipes-containers/cgroup-lite/files/cgroups-init
@@ -0,0 +1,27 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          cgroups mount
+# Required-Start:    $network $remote_fs
+# Required-Stop:     $network $remote_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: mount/unmount cgroups
+### END INIT INFO
+
+# must start before libvirtd is run
+case "$1" in
+  start)
+        echo -n "Mounting cgroups..."
+               /bin/cgroups-mount
+        echo "Done"
+        ;;
+  stop)
+        echo -n "Unmounting cgroups..."
+               /bin/cgroups-umount
+        echo "Done"
+        ;;
+  *)
+        echo "Usage: /etc/init.d/cgroups-init {start|stop}"
+        exit 1
+        ;;
+esac
diff --git a/recipes-containers/containerd/README.md 
b/recipes-containers/containerd/README.md
new file mode 100644
index 0000000..f773079
--- /dev/null
+++ b/recipes-containers/containerd/README.md
@@ -0,0 +1,30 @@
+# containerd: sample image fetch and exec commands
+
+```shell
+root@qemux86-64:~# ctr images list
+REF                             TYPE                                           
           DIGEST                                                               
   SIZE     PLATFORMS
+docker.io/calico/node:v3.11.2   
application/vnd.docker.distribution.manifest.list.v2+json 
sha256:887bcd551668cccae1fbfd6d2eb0f635ec37bb4cf599e1169989aa49dfac5b57 84.8 
MiB linux/amd64,linux/arm64,linux/ppc64le
+docker.io/library/alpine:latest 
application/vnd.docker.distribution.manifest.list.v2+json 
sha256:c0e9560cda118f9ec63ddefb4a173a2b2a0347082d7dff7dc14272e7841a5b5a 2.7 MiB 
 linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,l
+
+root@qemux86-64:~# ctr image pull docker.io/library/alpine:latest
+docker.io/library/alpine:latest:                                               
   resolved       |++++++++++++++++++++++++++++++++++++++|
+index-sha256:c0e9560cda118f9ec63ddefb4a173a2b2a0347082d7dff7dc14272e7841a5b5a: 
   exists         |++++++++++++++++++++++++++++++++++++++|
+manifest-sha256:d7342993700f8cd7aba8496c2d0e57be0666e80b4c441925fc6f9361fa81d10e:
 exists         |++++++++++++++++++++++++++++++++++++++|
+layer-sha256:188c0c94c7c576fff0792aca7ec73d67a2f7f4cb3a6e53a84559337260b36964: 
   exists         |++++++++++++++++++++++++++++++++++++++|
+config-sha256:d6e46aa2470df1d32034c6707c8041158b652f38d2a9ae3d7ad7e7532d22ebe0:
   exists         |++++++++++++++++++++++++++++++++++++++|
+elapsed: 6.5 s                                                                 
   total:   0.0 B (0.0 B/s)
+unpacking linux/amd64 
sha256:c0e9560cda118f9ec63ddefb4a173a2b2a0347082d7dff7dc14272e7841a5b5a...
+
+
+root@qemux86-64:~# ctr run -t docker.io/library/alpine:latest dtest /bin/sh
+/ # uname -a
+Linux qemux86-64 5.8.13-yocto-standard #1 SMP PREEMPT Tue Oct 6 12:23:29 UTC 
2020 x86_64 Linux
+/ #
+
+
+ # root@qemux86-64:~# ctr c list
+CONTAINER    IMAGE                              RUNTIME
+dtest        docker.io/library/alpine:latest    io.containerd.runc.v2
+
+root@qemux86-64:~# ctr c delete dtest
+```
\ No newline at end of file
diff --git 
a/recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch
 
b/recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch
new file mode 100644
index 0000000..8b43c8a
--- /dev/null
+++ 
b/recipes-containers/containerd/containerd-opencontainers/0001-Add-build-option-GODEBUG-1.patch
@@ -0,0 +1,32 @@
+From 84874e47aa2025b8e73df0286c44f3b8a1d9fdb2 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <[email protected]>
+Date: Mon, 2 Sep 2019 16:20:07 +0800
+Subject: [PATCH] Add build option "GODEBUG=1"
+
+Make will generate GDB friendly binary with this build option.
+
+Signed-off-by: Hui Zhu <[email protected]>
+
+Upstream-Status: Backport [c5a0c7f491b435e4eb45972903b00e2d8ed46495]
+
+Partly backport and refresh to v1.2.7
+Signed-off-by: Hongxu Jia <[email protected]>
+---
+ src/import/Makefile | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+Index: git/src/import/Makefile
+===================================================================
+--- git.orig/src/import/Makefile       2020-10-12 08:09:41.638977052 -0700
++++ git/src/import/Makefile    2020-10-12 08:10:49.783074373 -0700
+@@ -72,6 +72,10 @@
+ COMMANDS=ctr containerd containerd-stress
+ MANPAGES=ctr.8 containerd.8 containerd-config.8 containerd-config.toml.5
+ 
++ifndef GODEBUG
++   EXTRA_LDFLAGS += -s -w
++endif
++
+ ifdef BUILDTAGS
+     GO_BUILDTAGS = ${BUILDTAGS}
+ endif
diff --git 
a/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch
 
b/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch
new file mode 100644
index 0000000..7f4d751
--- /dev/null
+++ 
b/recipes-containers/containerd/containerd-opencontainers/0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch
@@ -0,0 +1,38 @@
+From 474b93f8f643651144304a6971ef476add7f06f8 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <[email protected]>
+Date: Tue, 25 May 2021 12:49:41 -0400
+Subject: [PATCH] Makefile: allow GO_BUILD_FLAGS to be externally specified
+
+Since our oe-core go infrastructure insists on both -pie and static
+builds (for the most part), and that is not recommended by many
+packages, we end up with errors like:
+
+  cannot find package runtime/cgo (using -importcfg)
+          ...
+         
recipe-sysroot-native/usr/lib/aarch64-poky-linux/go/pkg/tool/linux_amd64/link:
+         cannot open file : open : no such file or directory
+
+Upstream-Status: Inappropriate: specific to OE go configuration and build
+
+Signed-off-by: Bruce Ashfield <[email protected]>
+---
+ Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git git.orig/src/import/Makefile  git.orig/src/import/Makefile
+index c61418e60..54a10eb42 100644
+--- git.orig/src/import/Makefile
++++ git.orig/src/import/Makefile
+@@ -112,7 +112,8 @@ endif
+ GOPATHS=$(shell echo ${GOPATH} | tr ":" "\n" | tr ";" "\n")
+ 
+ TESTFLAGS_RACE=
+-GO_BUILD_FLAGS=
++# allow flags to be exported and picked up.
++# GO_BUILD_FLAGS=
+ # See Golang issue re: '-trimpath': https://github.com/golang/go/issues/13809
+ GO_GCFLAGS=$(shell                            \
+       set -- ${GOPATHS};                      \
+-- 
+2.19.1
+
diff --git a/recipes-containers/containerd/containerd-opencontainers_git.bb 
b/recipes-containers/containerd/containerd-opencontainers_git.bb
new file mode 100644
index 0000000..361ed25
--- /dev/null
+++ b/recipes-containers/containerd/containerd-opencontainers_git.bb
@@ -0,0 +1,127 @@
+HOMEPAGE = "https://github.com/docker/containerd";
+SUMMARY = "containerd is a daemon to control runC"
+DESCRIPTION = "containerd is a daemon to control runC, built for performance 
and density. \
+               containerd leverages runC's advanced features such as seccomp 
and user namespace \
+               support as well as checkpoint and restore for cloning and live 
migration of containers."
+
+
+SRCREV = "1e5ef943eb76627a6d3b6de8cd1ef6537f393a71"
+SRC_URI = 
"git://github.com/containerd/containerd;branch=release/1.5;protocol=https \
+           file://0001-Add-build-option-GODEBUG-1.patch \
+           
file://0001-Makefile-allow-GO_BUILD_FLAGS-to-be-externally-speci.patch \
+          "
+
+# Apache-2.0 for containerd
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = 
"file://src/import/LICENSE;md5=1269f40c0d099c21a871163984590d89"
+
+CONTAINERD_VERSION = "v1.5.8"
+
+EXTRA_OEMAKE += "GODEBUG=1"
+
+PROVIDES += "virtual/containerd"
+RPROVIDES:${PN} = "virtual-containerd"
+
+S = "${WORKDIR}/git"
+
+PV = "${CONTAINERD_VERSION}+git${SRCPV}"
+
+inherit go
+inherit goarch
+
+GO_IMPORT = "import"
+
+CONTAINERD_PKG="github.com/containerd/containerd"
+
+INSANE_SKIP:${PN} += "ldflags"
+
+do_configure[noexec] = "1"
+
+do_compile() {
+    export GOARCH="${TARGET_GOARCH}"
+
+    # link fixups for compilation
+    rm -f ${S}/src/import/vendor/src
+    ln -sf ./ ${S}/src/import/vendor/src
+
+    mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/
+    mkdir -p ${S}/src/import/vendor/src/github.com/containerd/containerd/pkg/
+    mkdir -p 
${S}/src/import/vendor/src/github.com/containerd/containerd/contrib/
+    # without this, the stress test parts of the build fail
+    cp ${S}/src/import/*.go 
${S}/src/import/vendor/src/github.com/containerd/containerd
+
+    for c in content timeout ttrpcutil oom stdio process errdefs fs images 
mount snapshots linux api runtimes defaults progress \
+                    protobuf reference diff platforms runtime remotes version 
archive dialer gc metadata \
+                    metrics filters identifiers labels leases plugin server 
services \
+                    cmd cio containers namespaces oci events log reaper sys 
rootfs nvidia seed apparmor seccomp \
+                    cap cri userns atomic ioutil os registrar seutil 
runtimeoptions netns; do
+        if [ -d ${S}/src/import/${c} ]; then
+           ln -sfn ${S}/src/import/${c} 
${S}/src/import/vendor/github.com/containerd/containerd/${c}
+        fi
+        if [ -d ${S}/src/import/pkg/${c} ]; then
+            ln -sfn ${S}/src/import/pkg/${c} 
${S}/src/import/vendor/github.com/containerd/containerd/pkg/${c}
+        fi
+        if [ -d ${S}/src/import/contrib/${c} ]; then
+            ln -sfn ${S}/src/import/contrib/${c} 
${S}/src/import/vendor/github.com/containerd/containerd/contrib/${c}
+        fi
+    done
+
+    export 
GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+    export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
+
+    # Pass the needed cflags/ldflags so that cgo
+    # can find the needed headers files and libraries
+    export CGO_ENABLED="1"
+    export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+    export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+    export BUILDTAGS="no_btrfs static_build netgo"
+    export CFLAGS="${CFLAGS}"
+    export LDFLAGS="${LDFLAGS}"
+    export SHIM_CGO_ENABLED="${CGO_ENABLED}"
+    # fixes:
+    # cannot find package runtime/cgo (using -importcfg)
+    #        ... 
recipe-sysroot-native/usr/lib/aarch64-poky-linux/go/pkg/tool/linux_amd64/link:
+    #        cannot open file : open : no such file or directory
+    export GO_BUILD_FLAGS="-a -pkgdir dontusecurrentpkgs"
+    export GO111MODULE=off
+
+    cd ${S}/src/import
+    oe_runmake binaries
+}
+
+inherit systemd
+SYSTEMD_PACKAGES = 
"${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
+SYSTEMD_SERVICE:${PN} = 
"${@bb.utils.contains('DISTRO_FEATURES','systemd','containerd.service','',d)}"
+
+do_install() {
+       mkdir -p ${D}/${bindir}
+
+       cp ${S}/src/import/bin/containerd ${D}/${bindir}/containerd
+       cp ${S}/src/import/bin/containerd-shim ${D}/${bindir}/containerd-shim
+       cp ${S}/src/import/bin/containerd-shim-runc-v1 
${D}/${bindir}/containerd-shim-runc-v1
+       cp ${S}/src/import/bin/containerd-shim-runc-v2 
${D}/${bindir}/containerd-shim-runc-v2
+       cp ${S}/src/import/bin/ctr ${D}/${bindir}/containerd-ctr
+
+       ln -sf containerd ${D}/${bindir}/docker-containerd
+       ln -sf containerd-shim ${D}/${bindir}/docker-containerd-shim
+       ln -sf containerd-ctr ${D}/${bindir}/docker-containerd-ctr
+
+       ln -sf containerd-ctr ${D}/${bindir}/ctr
+
+       if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
+               install -d ${D}${systemd_unitdir}/system
+               install -m 644 ${S}/src/import/containerd.service 
${D}/${systemd_unitdir}/system
+               # adjust from /usr/local/bin to /usr/bin/
+               sed -e "s:/usr/local/bin/containerd:${bindir}/containerd:g" -i 
${D}/${systemd_unitdir}/system/containerd.service
+       fi
+}
+
+FILES:${PN} += "${systemd_system_unitdir}/*"
+
+INSANE_SKIP:${PN} += "ldflags already-stripped"
+
+COMPATIBLE_HOST = "^(?!(qemu)?mips).*"
+
+RDEPENDS:${BPN} += " virtual-runc"
+
+CVE_PRODUCT = "containerd"
diff --git 
a/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
 
b/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
new file mode 100644
index 0000000..544881e
--- /dev/null
+++ 
b/recipes-containers/containerd/files/0001-build-use-oe-provided-GO-and-flags.patch
@@ -0,0 +1,64 @@
+From 408e8b526d490af817a64b7220e8e2c3789de58f Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <[email protected]>
+Date: Sun, 10 Feb 2019 23:46:06 +0000
+Subject: [PATCH] build: use oe provided GO and flags
+
+We want to use the go compiler as defined in the oe-enviroment, not the
+generic call to 'go'. Without changing this, we'll get things like cgo
+errors and invalid flag combos.
+
+Signed-off-by: Bruce Ashfield <[email protected]>
+---
+ Makefile | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: git/src/import/Makefile
+===================================================================
+--- git.orig/src/import/Makefile
++++ git/src/import/Makefile
+@@ -121,7 +121,7 @@
+ TESTFLAGS_PARALLEL ?= 8
+ 
+ # Use this to replace `go test` with, for instance, `gotestsum`
+-GOTEST ?= go test
++GOTEST ?= $(GO) test
+ 
+ OUTPUTDIR = $(join $(ROOTDIR), _output)
+ CRIDIR=$(OUTPUTDIR)/cri
+@@ -169,7 +169,7 @@
+ 
+ build: ## build the go packages
+       @echo "$(WHALE) $@"
+-      @go build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} 
${EXTRA_FLAGS} ${GO_LDFLAGS} ${PACKAGES}
++      @$(GO) build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} 
${EXTRA_FLAGS} ${GO_LDFLAGS} ${PACKAGES}
+ 
+ test: ## run tests, except integration tests and tests that require root
+       @echo "$(WHALE) $@"
+@@ -201,7 +201,7 @@
+ 
+ define BUILD_BINARY
+ @echo "$(WHALE) $@"
+-@go build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@ 
${GO_LDFLAGS} ${GO_TAGS}  ./$<
++@$(GO) build ${DEBUG_GO_GCFLAGS} ${GO_GCFLAGS} ${GO_BUILD_FLAGS} -o $@ 
${GO_LDFLAGS} ${GO_TAGS}  ./$<
+ endef
+ 
+ # Build a binary from a cmd.
+@@ -210,15 +210,15 @@
+ 
+ bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a 
static shim build: 
https://github.com/golang/go/issues/17789#issuecomment-258542220
+       @echo "$(WHALE) bin/containerd-shim"
+-      @CGO_ENABLED=${SHIM_CGO_ENABLED} go build ${GO_BUILD_FLAGS} -o 
bin/containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim
++      @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build -a -pkgdir 
dontusecurrentpkgs ${GO_BUILD_FLAGS} -o bin/containerd-shim ${SHIM_GO_LDFLAGS} 
${GO_TAGS} ./cmd/containerd-shim
+ 
+ bin/containerd-shim-runc-v1: cmd/containerd-shim-runc-v1 FORCE # set !cgo and 
omit pie for a static shim build: 
https://github.com/golang/go/issues/17789#issuecomment-258542220
+       @echo "$(WHALE) bin/containerd-shim-runc-v1"
+-      @CGO_ENABLED=${SHIM_CGO_ENABLED} go build ${GO_BUILD_FLAGS} -o 
bin/containerd-shim-runc-v1 ${SHIM_GO_LDFLAGS} ${GO_TAGS} 
./cmd/containerd-shim-runc-v1
++      @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build -a -pkgdir 
dontusecurrentpkgs ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v1 
${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v1
+ 
+ bin/containerd-shim-runc-v2: cmd/containerd-shim-runc-v2 FORCE # set !cgo and 
omit pie for a static shim build: 
https://github.com/golang/go/issues/17789#issuecomment-258542220
+       @echo "$(WHALE) bin/containerd-shim-runc-v2"
+-      @CGO_ENABLED=${SHIM_CGO_ENABLED} go build ${GO_BUILD_FLAGS} -o 
bin/containerd-shim-runc-v2 ${SHIM_GO_LDFLAGS} ${GO_TAGS} 
./cmd/containerd-shim-runc-v2
++      @CGO_ENABLED=${SHIM_CGO_ENABLED} $(GO) build -a -pkgdir 
dontusecurrentpkgs ${GO_BUILD_FLAGS} -o bin/containerd-shim-runc-v2 
${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/containerd-shim-runc-v2
+ 
+ binaries: $(BINARIES) ## build binaries
+       @echo "$(WHALE) $@"
diff --git a/recipes-containers/docker/docker-ce_git.bb 
b/recipes-containers/docker/docker-ce_git.bb
new file mode 100644
index 0000000..5fe8fbd
--- /dev/null
+++ b/recipes-containers/docker/docker-ce_git.bb
@@ -0,0 +1,57 @@
+HOMEPAGE = "http://www.docker.com";
+SUMMARY = "Linux container runtime"
+DESCRIPTION = "Linux container runtime \
+ Docker complements kernel namespacing with a high-level API which \
+ operates at the process level. It runs unix processes with strong \
+ guarantees of isolation and repeatability across servers. \
+ . \
+ Docker is a great building block for automating distributed systems: \
+ large-scale web deployments, database clusters, continuous deployment \
+ systems, private PaaS, service-oriented architectures, etc. \
+ . \
+ This package contains the daemon and client, which are \
+ officially supported on x86_64 and arm hosts. \
+ Other architectures are considered experimental. \
+ . \
+ Also, note that kernel version 3.10 or above is required for proper \
+ operation of the daemon process, and that any lower versions may have \
+ subtle and/or glaring issues. \
+ "
+
+#
+# https://github.com/docker/docker-ce-packaging.git
+#  common.mk:
+#    DOCKER_CLI_REPO    ?= https://github.com/docker/cli.git
+#    DOCKER_ENGINE_REPO ?= https://github.com/docker/docker.git
+#    REF                ?= HEAD
+#    DOCKER_CLI_REF     ?= $(REF)
+#    DOCKER_ENGINE_REF  ?= $(REF)
+#
+# These follow the tags for our releases in the listed repositories
+# so we get that tag, and make it our SRCREVS:
+#
+
+SRCREV_docker = "d24c6dc5cf5e68dfb30027b2db454099566a9b9e"
+SRCREV_libnetwork = "64b7a4574d1426139437d20e81c0b6d391130ec8"
+SRCREV_cli = "62eae52c2a76f4c1dcf79dfc7b5ea3bf5eebab8b"
+SRCREV_FORMAT = "docker_libnetwork"
+SRC_URI = "\
+       
git://github.com/docker/docker.git;branch=20.10;name=docker;protocol=https \
+       
git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=git/libnetwork;protocol=https
 \
+       
git://github.com/docker/cli;branch=20.10;name=cli;destsuffix=git/cli;protocol=https
 \
+       file://0001-libnetwork-use-GO-instead-of-go.patch \
+       file://docker.init \
+        file://0001-dynbinary-use-go-cross-compiler.patch \
+        file://0001-cli-use-external-GO111MODULE-and-cross-compiler.patch \
+       "
+
+require docker.inc
+
+# Apache-2.0 for docker
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = 
"file://src/import/LICENSE;md5=4859e97a9c7780e77972d989f0823f28"
+
+DOCKER_VERSION = "20.10.8-ce"
+PV = "${DOCKER_VERSION}+git${SRCREV_docker}"
+
+CVE_PRODUCT = "docker"
diff --git a/recipes-containers/docker/docker.inc 
b/recipes-containers/docker/docker.inc
new file mode 100644
index 0000000..40a3642
--- /dev/null
+++ b/recipes-containers/docker/docker.inc
@@ -0,0 +1,179 @@
+DEPENDS = " \
+    go-cli \
+    go-pty \
+    go-context \
+    go-mux \
+    go-patricia \
+    go-logrus \
+    go-fsnotify \
+    go-dbus \
+    go-capability \
+    go-systemd \
+    btrfs-tools \
+    sqlite3 \
+    go-distribution \
+    compose-file \
+    go-connections \
+    notary \
+    grpc-go \
+    libtool-native \
+    libtool \
+    "
+
+DEPENDS:append:class-target = " lvm2"
+RDEPENDS:${PN} = "util-linux util-linux-unshare iptables \
+                  ${@bb.utils.contains('DISTRO_FEATURES', 'aufs', 'aufs-util', 
'', d)} \
+                  ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 
'cgroup-lite', d)} \
+                  bridge-utils \
+                  ca-certificates \
+                 "
+RDEPENDS:${PN} += "virtual-containerd virtual-runc"
+
+RRECOMMENDS:${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat 
kernel-module-nf-conntrack-netlink kernel-module-xt-addrtype 
kernel-module-xt-masquerade"
+
+PROVIDES += "virtual/docker"
+
+# we want all the docker variant recpes to be installable via "docker"
+PACKAGE_NAME = "docker"
+RPROVIDES:${PN} += "docker"
+RPROVIDES:${PN}-dbg += "docker-dbg"
+RPROVIDES:${PN}-dev += "docker-dev"
+RPROVIDES:${PN}-contrip += "docker-dev"
+
+inherit pkgconfig
+PACKAGECONFIG ??= "docker-init"
+PACKAGECONFIG[seccomp] = "seccomp,,libseccomp"
+PACKAGECONFIG[docker-init] = ",,,docker-init"
+PACKAGECONFIG[transient-config] = "transient-config"
+
+
+GO_IMPORT = "import"
+S = "${WORKDIR}/git"
+
+
+inherit systemd update-rc.d
+inherit go
+inherit goarch
+inherit pkgconfig
+
+do_configure[noexec] = "1"
+
+DOCKER_PKG="github.com/docker/docker"
+# in order to exclude devicemapper and btrfs - 
https://github.com/docker/docker/issues/14056
+BUILD_TAGS ?= "exclude_graphdriver_btrfs exclude_graphdriver_devicemapper"
+
+do_compile() {
+       # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
+       # docker to download its dependencies but rather
+       # use dependencies packaged independently.
+       cd ${S}/src/import
+       rm -rf .gopath
+       mkdir -p .gopath/src/"$(dirname "${DOCKER_PKG}")"
+       ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}"
+       
+       mkdir -p .gopath/src/github.com/docker
+       ln -sf ${WORKDIR}/git/libnetwork 
.gopath/src/github.com/docker/libnetwork
+       ln -sf ${WORKDIR}/git/cli .gopath/src/github.com/docker/cli
+
+       export 
GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+       export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
+
+       # Pass the needed cflags/ldflags so that cgo
+       # can find the needed headers files and libraries
+       export GOARCH=${TARGET_GOARCH}
+       export CGO_ENABLED="1"
+       export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+       export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+       export DOCKER_BUILDTAGS='${BUILD_TAGS} ${PACKAGECONFIG_CONFARGS}'
+       export GO111MODULE=off
+
+       export DISABLE_WARN_OUTSIDE_CONTAINER=1
+
+       cd ${S}/src/import/
+
+       # this is the unsupported built structure
+       # that doesn't rely on an existing docker
+       # to build this:
+       VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_moby}" 
./hack/make.sh dynbinary
+
+        # build the cli
+       cd ${S}/src/import/.gopath/src/github.com/docker/cli
+       export CFLAGS=""
+       export LDFLAGS=""
+       export DOCKER_VERSION=${DOCKER_VERSION}
+       VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${SRCREV_moby}" make 
dynbinary
+
+       # build the proxy
+       cd ${S}/src/import/.gopath/src/github.com/docker/libnetwork
+       oe_runmake cross-local
+}
+
+do_install() {
+       mkdir -p ${D}/${bindir}
+       cp ${WORKDIR}/git/cli/build/docker ${D}/${bindir}/docker
+       cp ${S}/src/import/bundles/dynbinary-daemon/dockerd 
${D}/${bindir}/dockerd
+       cp ${WORKDIR}/git/libnetwork/bin/docker-proxy* 
${D}/${bindir}/docker-proxy
+
+       if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; 
then
+               install -d ${D}${systemd_unitdir}/system
+               install -m 644 ${S}/src/import/contrib/init/systemd/docker.* 
${D}/${systemd_unitdir}/system
+               # replaces one copied from above with one that uses the local 
registry for a mirror
+               install -m 644 
${S}/src/import/contrib/init/systemd/docker.service 
${D}/${systemd_unitdir}/system
+               rm -f ${D}/${systemd_unitdir}/system/docker.service.rpm
+       fi
+       if 
${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+               install -d ${D}${sysconfdir}/init.d
+               install -m 0755 ${WORKDIR}/docker.init 
${D}${sysconfdir}/init.d/docker.init
+       fi
+       # TLS key that docker creates at run-time if not found is what resides 
here
+       if 
${@bb.utils.contains('PACKAGECONFIG','transient-config','true','false',d)}; then
+               install -d ${D}${sysconfdir}
+               ln -s ..${localstatedir}/run/docker ${D}${sysconfdir}/docker
+       else
+               install -d ${D}${sysconfdir}/docker
+       fi
+
+       mkdir -p ${D}${datadir}/docker/
+       install -m 0755 ${S}/src/import/contrib/check-config.sh 
${D}${datadir}/docker/
+}
+
+
+SYSTEMD_PACKAGES = 
"${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
+SYSTEMD_SERVICE:${PN} = 
"${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.socket','',d)}"
+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} = "defaults"
+
+inherit useradd
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "-r docker"
+
+COMPATIBLE_HOST = "^(?!(qemu)?mips).*"
+
+INSANE_SKIP:${PN} += "ldflags textrel"
+
+FILES:${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker"
+
+PACKAGES =+ "${PN}-contrib"
+FILES:${PN}-contrib += "${datadir}/docker/check-config.sh"
+RDEPENDS:${PN}-contrib += "bash"
+
+# By the docker-packaging repository and 
https://docs.docker.com/engine/install/centos/#installation-methods
+# docker is packaged by most distros with a split between the engine and the 
CLI.
+#
+# We do the same here, by introducing the -cli package
+#
+# But to keep existing use cases working, we also create a RDEPENDS between 
the main
+# docker package (the engine) and the cli, so existing "docker" package 
installs will
+# continue to work the same way. To have separate and non-redepending packages 
created
+# set the DOCKER_UNIFIED_PACKAGE variable to False
+#
+PACKAGES =+ "${PN}-cli"
+FILES:${PN}-cli += "${bindir}/docker"
+
+# set to "False" if packages should be generated for the cli and engine, and
+# NOT rdepend to get a classic one-package install
+DOCKER_UNIFIED_PACKAGE ?= "True"
+RDEPENDS:${PN} += "${@bb.utils.contains("DOCKER_UNIFIED_PACKAGE", "True", 
"${PN}-cli", "", d)}"
diff --git 
a/recipes-containers/docker/files/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch
 
b/recipes-containers/docker/files/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch
new file mode 100644
index 0000000..dc32261
--- /dev/null
+++ 
b/recipes-containers/docker/files/0001-cli-use-external-GO111MODULE-and-cross-compiler.patch
@@ -0,0 +1,27 @@
+From 650c882d3c53db118b01dd5e15fa1bc0ddaa36f1 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <[email protected]>
+Date: Thu, 15 Apr 2021 11:28:05 -0400
+Subject: [PATCH] cli: use external GO111MODULE and cross compiler
+
+Signed-off-by: Bruce Ashfield <[email protected]>
+---
+ git/cli/scripts/build/binary | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git git/cli/scripts/build/binary git/cli/scripts/build/binary
+index e4c5e12a6b..7c47b75c2f 100755
+--- git/cli/scripts/build/binary
++++ git/cli/scripts/build/binary
+@@ -73,8 +73,7 @@ fi
+ 
+ echo "Building $GO_LINKMODE $(basename "${TARGET}")"
+ 
+-export GO111MODULE=auto
+ 
+-go build -o "${TARGET}" -tags "${GO_BUILDTAGS}" --ldflags "${LDFLAGS}" 
${GO_BUILDMODE} "${SOURCE}"
++${GO} build -o "${TARGET}" -tags "${GO_BUILDTAGS}" --ldflags "${LDFLAGS}" 
${GO_BUILDMODE} "${SOURCE}"
+ 
+ ln -sf "$(basename "${TARGET}")" "$(dirname "${TARGET}")/docker"
+-- 
+2.19.1
+
diff --git 
a/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch 
b/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch
new file mode 100644
index 0000000..971c60d
--- /dev/null
+++ b/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch
@@ -0,0 +1,23 @@
+From bbf600cc4d46c3f7ec0c1b486790a2402d41f550 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <[email protected]>
+Date: Tue, 30 Jun 2020 22:23:33 -0400
+Subject: [PATCH] dynbinary: use go cross compiler
+
+Signed-off-by: Bruce Ashfield <[email protected]>
+---
+ hack/make/.binary | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: git/src/import/hack/make/.binary
+===================================================================
+--- git.orig/src/import/hack/make/.binary
++++ git/src/import/hack/make/.binary
+@@ -81,7 +81,7 @@
+ 
+       echo "Building: $DEST/$BINARY_FULLNAME"
+       echo "GOOS=\"${GOOS}\" GOARCH=\"${GOARCH}\" GOARM=\"${GOARM}\""
+-      go build \
++      ${GO} build \
+               -o "$DEST/$BINARY_FULLNAME" \
+               "${BUILDFLAGS[@]}" \
+               -ldflags "
diff --git 
a/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch 
b/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch
new file mode 100644
index 0000000..c623b26
--- /dev/null
+++ b/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch
@@ -0,0 +1,59 @@
+From 04c07804930faad708218a3134c81de06a9c742a Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <[email protected]>
+Date: Fri, 6 Apr 2018 23:58:22 -0400
+Subject: [PATCH] libnetwork: use $(GO) instead of go
+
+Ensure that the libnetwork makefile uses the go cross flags and
+utilities.
+
+Signed-off-by: Bruce Ashfield <[email protected]>
+---
+ Makefile | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+Index: git/libnetwork/Makefile
+===================================================================
+--- git.orig/libnetwork/Makefile
++++ git/libnetwork/Makefile
+@@ -45,9 +45,9 @@
+ build-local:
+       @echo "🐳 $@"
+       @mkdir -p "bin"
+-      go build -tags experimental -o "bin/dnet" ./cmd/dnet
+-      go build -o "bin/docker-proxy" ./cmd/proxy
+-      CGO_ENABLED=0 go build -o "bin/diagnosticClient" ./cmd/diagnostic
++      $(GO) build -tags experimental -o "bin/dnet" ./cmd/dnet
++      $(GO) build -o "bin/proxy" ./cmd/proxy
++      CGO_ENABLED=0 $(GO) build -o "bin/diagnosticClient" ./cmd/diagnostic
+       CGO_ENABLED=0 go build -o "bin/testMain" 
./cmd/networkdb-test/testMain.go
+ 
+ build-images:
+@@ -82,8 +82,8 @@
+ 
+ cross-local:
+       @echo "🐳 $@"
+-      go build -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet
+-      go build -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy
++      @$(GO) build -linkshared $(GOBUILDFLAGS) -o 
"bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy
++      @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/dnet-$$GOOS-$$GOARCH" 
./cmd/dnet
+ 
+ # Rebuild protocol buffers.
+ # These may need to be rebuilt after vendoring updates, so .proto files are 
declared .PHONY so they are always rebuilt.
+@@ -130,7 +130,7 @@
+       if ls $$dir/*.go &> /dev/null; then \
+               pushd . &> /dev/null ; \
+               cd $$dir ; \
+-              go test ${INSIDECONTAINER} -test.parallel 5 -test.v 
-covermode=count -coverprofile=./profile.tmp ; \
++              $(GO) test ${INSIDECONTAINER} -test.parallel 5 -test.v 
-covermode=count -coverprofile=./profile.tmp ; \
+               ret=$$? ;\
+               if [ $$ret -ne 0 ]; then exit $$ret; fi ;\
+               popd &> /dev/null; \
+@@ -145,7 +145,7 @@
+ # Depends on binaries because vet will silently fail if it can not load 
compiled imports
+ vet: ## run go vet
+       @echo "🐳 $@"
+-      @test -z "$$(go vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a 
string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit 
status 1)' | tee /dev/stderr)"
++      @test -z "$$($(GO) vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not 
a string in call to Errorf' | egrep -v 
'(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)"
+ 
+ misspell:
+       @echo "🐳 $@"
diff --git a/recipes-containers/docker/files/docker.init 
b/recipes-containers/docker/files/docker.init
new file mode 100644
index 0000000..24f8fea
--- /dev/null
+++ b/recipes-containers/docker/files/docker.init
@@ -0,0 +1,131 @@
+#!/bin/sh
+#
+#       /etc/rc.d/init.d/docker
+#
+#       Daemon for docker.com
+#
+# chkconfig:   2345 95 95
+# description: Daemon for docker.com
+
+### BEGIN INIT INFO
+# Provides:       docker
+# Required-Start: $network cgconfig
+# Required-Stop:
+# Should-Start:
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop:  0 1 6
+# Short-Description: start and stop docker
+# Description: Daemon for docker.com
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+prog="dockerd"
+unshare=/usr/bin/unshare
+exec="/usr/bin/$prog"
+pidfile="/var/run/$prog.pid"
+lockfile="/var/lock/subsys/$prog"
+logfile="/var/log/$prog"
+other_args="--pidfile $pidfile --registry-mirror=http://localhost:5000 
--insecure-registry=http://localhost:5000 --raw-logs"
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+start() {
+    [ -x $exec ] || exit 5
+
+    check_for_cleanup
+
+    if ! [ -f $pidfile ]; then
+        printf "Starting $prog:\t"
+        echo -e "\n$(date)\n" >> $logfile
+        "$unshare" -m -- $exec $other_args >> $logfile 2>&1 &
+        pid=$!
+        touch $lockfile
+        # wait up to 10 seconds for the pidfile to exist.  see
+        # https://github.com/docker/docker/issues/5359
+        tries=0
+        while [ ! -f $pidfile -a $tries -lt 10 ]; do
+            sleep 1
+            tries=$((tries + 1))
+        done
+        success
+        echo
+    else
+        failure
+        echo
+        printf "$pidfile still exists...\n"
+        exit 7
+    fi
+}
+
+stop() {
+    echo -n $"Stopping $prog: "
+    killproc $prog
+    retval=$?
+    echo
+    [ $retval -eq 0 ] && rm -f $lockfile
+    return $retval
+}
+
+restart() {
+    stop
+    start
+}
+
+reload() {
+    restart
+}
+
+force_reload() {
+    restart
+}
+
+rh_status() {
+    status $prog
+}
+
+rh_status_q() {
+    rh_status >/dev/null 2>&1
+}
+
+
+check_for_cleanup() {
+    if [ -f ${pidfile} ]; then
+        /bin/ps -fp $(cat ${pidfile}) > /dev/null || rm ${pidfile}
+    fi
+}
+
+case "$1" in
+    start)
+        rh_status_q && exit 0
+        $1
+        ;;
+    stop)
+        rh_status_q || exit 0
+        $1
+        ;;
+    restart)
+        $1
+        ;;
+    reload)
+        rh_status_q || exit 7
+        $1
+        ;;
+    force-reload)
+        force_reload
+        ;;
+    status)
+        rh_status
+        ;;
+    condrestart|try-restart)
+        rh_status_q || exit 0
+        restart
+        ;;
+    *)
+        echo $"Usage: $0 
{start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+        exit 2
+esac
+
+exit $?
diff --git 
a/recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch
 
b/recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch
new file mode 100644
index 0000000..c855d7b
--- /dev/null
+++ 
b/recipes-containers/runc/files/0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch
@@ -0,0 +1,37 @@
+From 0fe50d2ca4517f5e3070585040f35ace413acd44 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <[email protected]>
+Date: Tue, 24 Aug 2021 11:38:23 -0400
+Subject: [PATCH] Makefile: respect GOBUILDFLAGS for runc and remove recvtty
+ from static
+
+Signed-off-by: Chen Qi <[email protected]>
+[bva: refreshed for release 1.0.2]
+Signed-off-by: Bruce Ashfield <[email protected]>
+---
+ Makefile | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/import/Makefile b/src/import/Makefile
+index efbddf0d..4b174c80 100644
+--- a/src/import/Makefile
++++ b/src/import/Makefile
+@@ -24,7 +24,7 @@ ifeq ($(shell $(GO) env GOOS),linux)
+               endif
+       endif
+ endif
+-GO_BUILD := $(GO) build -trimpath $(MOD_VENDOR) $(GO_BUILDMODE) 
$(EXTRA_FLAGS) -tags "$(BUILDTAGS)" \
++GO_BUILD := $(GO) build $(GOBUILDFLAGS) -trimpath $(MOD_VENDOR) 
$(GO_BUILDMODE) $(EXTRA_FLAGS) -tags "$(BUILDTAGS)" \
+       -ldflags "-X main.gitCommit=$(COMMIT) -X main.version=$(VERSION) 
$(EXTRA_LDFLAGS)"
+ GO_BUILD_STATIC := CGO_ENABLED=1 $(GO) build -trimpath $(MOD_VENDOR) 
$(EXTRA_FLAGS) -tags "$(BUILDTAGS) netgo osusergo" \
+       -ldflags "-extldflags -static -X main.gitCommit=$(COMMIT) -X 
main.version=$(VERSION) $(EXTRA_LDFLAGS)"
+@@ -41,7 +41,6 @@ recvtty:
+ 
+ static:
+       $(GO_BUILD_STATIC) -o runc .
+-      $(GO_BUILD_STATIC) -o contrib/cmd/recvtty/recvtty ./contrib/cmd/recvtty
+ 
+ release:
+       script/release.sh -r release/$(VERSION) -v $(VERSION)
+-- 
+2.19.1
+
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 0000000..bcf4c10
--- /dev/null
+++ 
b/recipes-containers/runc/runc-docker/0001-runc-Add-console-socket-dev-null.patch
@@ -0,0 +1,30 @@
+From 3fff2a3505fba1d1ff0074edff15708a77f6cfa9 Mon Sep 17 00:00:00 2001
+From: Jason Wessel <[email protected]>
+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 <[email protected]>
+---
+ utils_linux.go | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+Index: git/src/import/utils_linux.go
+===================================================================
+--- git.orig/src/import/utils_linux.go
++++ git/src/import/utils_linux.go
+@@ -267,6 +267,11 @@
+ }
+ 
+ func (r *runner) run(config *specs.Process) (int, error) {
++      if (r.consoleSocket == "/dev/null") {
++              r.detach = false
++              r.consoleSocket = ""
++              config.Terminal = false
++      }
+       var err error
+       defer func() {
+               if err != nil {
diff --git 
a/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch 
b/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch
new file mode 100644
index 0000000..4350c40
--- /dev/null
+++ 
b/recipes-containers/runc/runc-docker/0001-runc-docker-SIGUSR1-daemonize.patch
@@ -0,0 +1,131 @@
+From cd7d76a6d1ecb1856f6ed666fb5c30dc105aa94e Mon Sep 17 00:00:00 2001
+From: Jason Wessel <[email protected]>
+Date: Tue, 5 Dec 2017 18:28:28 -0800
+Subject: [PATCH] runc-docker: Allow "run start ..." to daemonize with 
$SIGUSR1_PARENT_PID
+
+The runc-docker has all the code in it to properly run a stop hook if
+you use it in the foreground.  It doesn't work in the back ground
+because there is no way for a golang application to fork a child exit
+out of the parent process because all the golang threads stay with the
+parent.
+
+This patch has three parts that happen ONLY when $SIGUSR1_PARENT_PID
+is set.
+
+1) The code was copied which performs the normal the signal handling
+   block which is used for the foreground operation of runc.
+
+2) At the point where runc start would normally exit, it closes
+   stdin/stdout/stderr so it would be possible to daemonize "runc start ...".
+
+3) The code to send a SIGUSR1 to the parent process was added.  The
+   idea being that a parent process would simply exit at that point
+   because it was blocking until runc performed everything it was
+   required to perform.
+
+Signed-off-by: Jason Wessel <[email protected]>
+---
+ signals.go     | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++----
+ utils_linux.go |  2 +-
+ 2 files changed, 51 insertions(+), 5 deletions(-)
+
+Index: git/src/import/signals.go
+===================================================================
+--- git.orig/src/import/signals.go
++++ git/src/import/signals.go
+@@ -5,7 +5,9 @@
+ import (
+       "os"
+       "os/signal"
++      "syscall" // only for Signal
+ 
++        "strconv"
+       "github.com/opencontainers/runc/libcontainer"
+       "github.com/opencontainers/runc/libcontainer/system"
+       "github.com/opencontainers/runc/libcontainer/utils"
+@@ -55,9 +57,6 @@
+ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, 
detach bool) (int, error) {
+       // make sure we know the pid of our main process so that we can return
+       // after it dies.
+-      if detach && h.notifySocket == nil {
+-              return 0, nil
+-      }
+ 
+       pid1, err := process.Pid()
+       if err != nil {
+@@ -67,12 +66,61 @@
+       if h.notifySocket != nil {
+               if detach {
+                       _ = h.notifySocket.run(pid1)
+-                      return 0, nil
+               }
+               _ = h.notifySocket.run(os.Getpid())
+               go func() { _ = h.notifySocket.run(0) }()
+       }
+ 
++      if (detach) {
++              // This allows the parent process to daemonize this process
++              // so long as stdin/stderr/stdout are closed
++              if envVal := os.Getenv("SIGUSR1_PARENT_PID"); envVal != "" {
++                      // Close stdin/stdout/stderr
++                      os.Stdin.Close()
++                      os.Stdout.Close()
++                      os.Stderr.Close()
++                      // Notify parent to detach
++                      i, err := strconv.Atoi(envVal)
++                      if (err != nil) {
++                              return 0, nil
++                      }
++                      unix.Kill(i, unix.SIGUSR1)
++                      // Loop waiting on the child to signal or exit,
++                      // after which all stop hooks will be run
++                      for s := range h.signals {
++                              switch s {
++                              case unix.SIGCHLD:
++                                      exits, err := h.reap()
++                                      if err != nil {
++                                              logrus.Error(err)
++                                      }
++                                      for _, e := range exits {
++                                              logrus.WithFields(logrus.Fields{
++                                                      "pid":    e.pid,
++                                                      "status": e.status,
++                                              }).Debug("process exited")
++                                              if e.pid == pid1 {
++                                                      // call Wait() on the 
process even though we already have the exit
++                                                      // status because we 
must ensure that any of the go specific process
++                                                      // fun such as flushing 
pipes are complete before we return.
++                                                      process.Wait()
++                                                      if h.notifySocket != 
nil {
++                                                              
h.notifySocket.Close()
++                                                      }
++                                                      return e.status, nil
++                                              }
++                                      }
++                              default:
++                                      logrus.Debugf("sending signal to 
process %s", s)
++                                      if err := unix.Kill(pid1, 
s.(syscall.Signal)); err != nil {
++                                              logrus.Error(err)
++                                      }
++                              }
++                      }
++              }
++              return 0, nil
++      }
++
+       // Perform the initial tty resize. Always ignore errors resizing because
+       // stdout might have disappeared (due to races with when SIGHUP is 
sent).
+       _ = tty.resize()
+Index: git/src/import/utils_linux.go
+===================================================================
+--- git.orig/src/import/utils_linux.go
++++ git/src/import/utils_linux.go
+@@ -345,7 +345,7 @@
+       if err != nil {
+               r.terminate(process)
+       }
+-      if detach {
++      if (detach && os.Getenv("SIGUSR1_PARENT_PID") == "") {
+               return 0, nil
+       }
+       if err == nil {
diff --git a/recipes-containers/runc/runc-docker_git.bb 
b/recipes-containers/runc/runc-docker_git.bb
new file mode 100644
index 0000000..4a46fd2
--- /dev/null
+++ b/recipes-containers/runc/runc-docker_git.bb
@@ -0,0 +1,14 @@
+include runc.inc
+
+# Note: this rev is before the required protocol field, update when all 
components
+#       have been updated to match.
+SRCREV_runc-docker = "04bcb7c71550a0212bfb876db7bac723ae13296a"
+SRC_URI = 
"git://github.com/opencontainers/runc;branch=release-1.0;name=runc-docker;protocol=https
 \
+           file://0001-runc-Add-console-socket-dev-null.patch \
+           
file://0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch \
+           file://0001-runc-docker-SIGUSR1-daemonize.patch \
+          "
+
+RUNC_VERSION = "1.0.2"
+
+CVE_PRODUCT = "runc"
diff --git a/recipes-containers/runc/runc-opencontainers_git.bb 
b/recipes-containers/runc/runc-opencontainers_git.bb
new file mode 100644
index 0000000..16ef509
--- /dev/null
+++ b/recipes-containers/runc/runc-opencontainers_git.bb
@@ -0,0 +1,10 @@
+include runc.inc
+
+SRCREV = "86d83333d765f4535e4898d6778388dab715eb7c"
+SRC_URI = " \
+    git://github.com/opencontainers/runc;branch=release-1.0;protocol=https \
+    file://0001-Makefile-respect-GOBUILDFLAGS-for-runc-and-remove-re.patch \
+    "
+RUNC_VERSION = "1.0.2"
+
+CVE_PRODUCT = "runc"
diff --git a/recipes-containers/runc/runc.inc b/recipes-containers/runc/runc.inc
new file mode 100644
index 0000000..c8e7427
--- /dev/null
+++ b/recipes-containers/runc/runc.inc
@@ -0,0 +1,83 @@
+HOMEPAGE = "https://github.com/opencontainers/runc";
+SUMMARY = "runc container cli tools"
+DESCRIPTION = "runc is a CLI tool for spawning and running containers 
according to the OCI specification."
+
+# Apache-2.0 for containerd
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = 
"file://src/import/LICENSE;md5=435b266b3899aa8a959f17d41c56def8"
+
+S = "${WORKDIR}/git"
+
+PV = "${RUNC_VERSION}+git${SRCPV}"
+
+inherit go
+inherit goarch
+inherit pkgconfig
+
+PACKAGECONFIG[seccomp] = "seccomp,,libseccomp"
+PACKAGECONFIG[selinux] = "selinux,,libselinux"
+# This PACKAGECONFIG serves the purpose of whether building runc as static or 
not
+PACKAGECONFIG[static] = ""
+
+PACKAGECONFIG ??= "static \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 
'seccomp', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 
'selinux', '', d)} \
+                 "
+
+
+PROVIDES += "virtual/runc"
+RPROVIDES:${PN} = "virtual-runc"
+
+GO_IMPORT = "import"
+
+LIBCONTAINER_PACKAGE="github.com/opencontainers/runc/libcontainer"
+
+do_configure[noexec] = "1"
+
+
+DISTRO_BUILDTAGS ?= "${@bb.utils.contains('DISTRO_FEATURES', 'seccomp', 
'seccomp', '', d)} \
+                     ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 
'selinux', '', d)}"
+
+EXTRA_OEMAKE="BUILDTAGS='${PACKAGECONFIG_CONFARGS} ${DISTRO_BUILDTAGS}' 
GO=${GO}"
+
+do_compile() {
+       # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
+       # docker to download its dependencies but rather
+       # use dependencies packaged independently.
+       cd ${S}/src/import
+       rm -rf .gopath
+       dname=`dirname "${LIBCONTAINER_PACKAGE}"`
+       bname=`basename "${LIBCONTAINER_PACKAGE}"`
+       mkdir -p .gopath/src/${dname}
+
+       (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname})
+       export 
GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+
+       # Fix up symlink for go-cross compiler
+       rm -f ${S}/src/import/vendor/src
+       ln -sf ./ ${S}/src/import/vendor/src
+
+       # Pass the needed cflags/ldflags so that cgo
+       # can find the needed headers files and libraries
+       export CGO_ENABLED="1"
+       export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+       export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+       export GO=${GO}
+
+       export CFLAGS=""
+       export LDFLAGS=""
+
+       if ${@bb.utils.contains('PACKAGECONFIG', 'static', 'true', 'false', 
d)}; then
+               oe_runmake static
+       else
+               oe_runmake runc
+       fi
+}
+
+do_install() {
+       mkdir -p ${D}/${bindir}
+
+       cp ${S}/src/import/runc ${D}/${bindir}/runc
+       ln -sf runc ${D}/${bindir}/docker-runc
+}
+
diff --git 
a/recipes-containers/tini/tini/0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch
 
b/recipes-containers/tini/tini/0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch
new file mode 100644
index 0000000..6797720
--- /dev/null
+++ 
b/recipes-containers/tini/tini/0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch
@@ -0,0 +1,28 @@
+From b99ef9954a34cffd85a5cc09922b201ae11b494d Mon Sep 17 00:00:00 2001
+From: Theodor Gherzan <[email protected]>
+Date: Mon, 5 Jun 2017 18:16:56 +0200
+Subject: [PATCH] Do not strip the output binary, allow yocto to do this
+
+Upstream-Status: Inappropriate [configuration specific]
+
+Signed-off-by: Theodor Gherzan <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b5b93ba..c2907e2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -54,7 +54,7 @@ if(NOT HAS_BUILTIN_FORTIFY)
+ endif()
+ 
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Werror -Wextra -Wall 
-pedantic-errors -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat")
+-set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} 
-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-s")
++set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} 
-Wl,-Bsymbolic-functions -Wl,-z,relro")
+ 
+ # Build
+ 
+-- 
+2.7.4
+
diff --git a/recipes-containers/tini/tini_0.19.0.bb 
b/recipes-containers/tini/tini_0.19.0.bb
new file mode 100644
index 0000000..914cffb
--- /dev/null
+++ b/recipes-containers/tini/tini_0.19.0.bb
@@ -0,0 +1,32 @@
+HOMEPAGE = "http://github.com/krallin/tini";
+SUMMARY = "Minimal init for containers"
+DESCRIPTION = "Tini is the simplest init you could think of. All Tini does is \
+spawn a single child (Tini is meant to be run in a container), and wait for \
+it to exit all the while reaping zombies and performing signal forwarding. "
+
+SRCREV = "b9f42a0e7bb46efea0c9e3d8610c96ab53b467f8"
+SRC_URI = " \
+  git://github.com/krallin/tini.git;branch=master;protocol=https \
+  file://0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch \
+  "
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ffc9091894702bc5dcf4cc0085561ef5"
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native"
+
+# tini links with -static, so no PIE for us
+SECURITY_CFLAGS:pn-${PN} = "${SECURITY_NO_PIE_CFLAGS}"
+
+inherit cmake
+
+do_install() {
+  mkdir -p ${D}/${bindir}
+  install -m 0755 ${B}/tini-static ${D}/${bindir}/docker-init
+}
+
+# Tini is the currently the provider for docker-init
+PROVIDES += "docker-init"
+RPROVIDES:${PN} = "docker-init"
diff --git a/recipes-devtools/go/compose-file_git.bb 
b/recipes-devtools/go/compose-file_git.bb
new file mode 100644
index 0000000..c33a7ac
--- /dev/null
+++ b/recipes-devtools/go/compose-file_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Parser for the Compose file format (version 3)"
+HOMEPAGE = "https://github.com/aanand/compose-file";
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = 
"file://src/${PKG_NAME}/LICENSE;md5=9cd86830b557232ce55e2a6b47387471"
+
+SRCNAME = "compose-file"
+
+PKG_NAME = "github.com/aanand/${SRCNAME}"
+SRC_URI = 
"git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME};branch=master;protocol=https"
+
+SRCREV = "a3e58764f50597b6217fec07e9bff7225c4a1719"
+PV = "3.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+           if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+               mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+           fi
+           cp $j ${D}${prefix}/local/go/$j
+       done
+       cp -r ${S}/src/${PKG_NAME}/LICENSE 
${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_compose_file_sysroot_preprocess"
+
+go_compose_file_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
+
+CLEANBROKEN = "1"
diff --git a/recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch 
b/recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch
new file mode 100644
index 0000000..873d7ab
--- /dev/null
+++ b/recipes-devtools/go/go-build/0001-build-use-instead-of-go.patch
@@ -0,0 +1,30 @@
+From 4db28c98481056c41097f808335c37e8517fe485 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <[email protected]>
+Date: Fri, 7 Aug 2020 23:39:18 -0400
+Subject: [PATCH] build: use  instead of 'go'
+
+While we can get away with 'go' if the host/target arch match, the
+new go-binary toolchain blows up in a cross compile situation.
+
+Signed-off-by: Bruce Ashfield <[email protected]>
+---
+ gobuild/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: git/src/import/gobuild/Makefile
+===================================================================
+--- git.orig/src/import/gobuild/Makefile
++++ git/src/import/gobuild/Makefile
+@@ -19,10 +19,10 @@
+ 
+ ${GODEPPATHS}:
+       mkdir -p ${GOSRC}
+-      GOPATH=${GOPATH} go get -d $(subst ${GOSRC}/,,$@)
++      GOPATH=${GOPATH} ${GO} get -d $(subst ${GOSRC}/,,$@)
+ 
+ ${BIN}: ${GODEPPATHS} $(filter %/[email protected], ${MAIN})
+-      GOPATH=${GOPATH} ${ARCH} go build $(filter %/[email protected], ${MAIN})
++      GOPATH=${GOPATH} ${ARCH} ${GO} build $(filter %/[email protected], ${MAIN})
+ 
+ clean:
+       rm -f   ${BIN}
diff --git a/recipes-devtools/go/go-build_git.bb 
b/recipes-devtools/go/go-build_git.bb
new file mode 100644
index 0000000..831b3c0
--- /dev/null
+++ b/recipes-devtools/go/go-build_git.bb
@@ -0,0 +1,58 @@
+HOMEPAGE = "https://github.com/lf-edge/runx";
+SUMMARY = "console for runx"
+DESCRIPTION = "Xen Runtime for OCI"
+
+SRCREV_runx = "f24efd33fb18469e9cfe4d1bfe8e2c90ec8c4e93"
+
+SRC_URI = "\
+         git://github.com/lf-edge/runx;nobranch=1;name=runx;protocol=https \
+          file://0001-build-use-instead-of-go.patch \
+         "
+SRC_URI[md5sum] = "0d701ac1e2a67d47ce7127432df2c32b"
+SRC_URI[sha256sum] = 
"5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = 
"file://src/import/LICENSE;md5=945fc9aa694796a6337395cc291ddd8c"
+
+S = "${WORKDIR}/git"
+PV = "0.1-git${SRCREV_runx}"
+
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "vmsep"
+GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}"
+
+inherit pkgconfig
+
+GO_IMPORT = "import"
+inherit go
+
+RDEPENDS:${PN}-dev = "bash"
+
+do_compile() {
+
+    export GOARCH="${TARGET_GOARCH}"
+    cd ${S}/src/import/gobuild
+
+    # Build the target binaries
+    export GOARCH="${TARGET_GOARCH}"
+    # Pass the needed cflags/ldflags so that cgo can find the needed headers 
files and libraries
+    export CGO_ENABLED="1"
+    export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+    export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+    export CFLAGS=""
+    export LDFLAGS=""
+    export CC="${CC}"
+    export LD="${LD}"
+    export GOBIN=""
+    export GO111MODULE=off
+
+    oe_runmake GO=${GO}
+}
+
+do_install() {
+
+    install -d ${D}${datadir}/runX
+    install -m 755 ${B}/src/import/gobuild/serial_fd_handler 
${D}${datadir}/runX/
+}
+
+FILES:${PN} += "${datadir}/runX/*"
diff --git a/recipes-devtools/go/go-capability_git.bb 
b/recipes-devtools/go/go-capability_git.bb
new file mode 100644
index 0000000..7e5ab11
--- /dev/null
+++ b/recipes-devtools/go/go-capability_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Utilities for manipulating POSIX capabilities in Go."
+HOMEPAGE = "https://github.com/syndtr/gocapability";
+SECTION = "devel/go"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a7304f5073e7be4ba7bffabbf9f2bbca"
+
+SRCNAME = "gocapability"
+
+PKG_NAME = "github.com/syndtr/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "2c00daeb6c3b45114c80ac44119e7b8801fdd852"
+PV = "0.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_capability_sysroot_preprocess"
+
+go_capability_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-cli_git.bb 
b/recipes-devtools/go/go-cli_git.bb
new file mode 100644
index 0000000..ae67f8e
--- /dev/null
+++ b/recipes-devtools/go/go-cli_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "A small package for building command line apps in Go"
+HOMEPAGE = "https://github.com/codegangsta/cli";
+SECTION = "devel/go"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ed9b539ed65d73926f30ff1f1587dc44"
+
+SRCNAME = "cli"
+
+PKG_NAME = "github.com/codegangsta/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "27ecc97192df1bf053a22b04463f2b51b8b8373e"
+PV = "1.1.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_cli_sysroot_preprocess"
+
+go_cli_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-connections_git.bb 
b/recipes-devtools/go/go-connections_git.bb
new file mode 100644
index 0000000..ebfdb9f
--- /dev/null
+++ b/recipes-devtools/go/go-connections_git.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Utility package to work with network connections"
+HOMEPAGE = "https://github.com/docker/connections";
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = 
"file://src/${PKG_NAME}/LICENSE;md5=04424bc6f5a5be60691b9824d65c2ad8"
+
+SRCNAME = "go-connections"
+
+PKG_NAME = "github.com/docker/${SRCNAME}"
+SRC_URI = 
"git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME};branch=master;protocol=https"
+
+SRCREV = "4ccf312bf1d35e5dbda654e57a9be4c3f3cd0366"
+PV = "0.2.1+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+           if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+               mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+           fi
+           cp $j ${D}${prefix}/local/go/$j
+       done
+       cp -r ${S}/src/${PKG_NAME}/LICENSE 
${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_connections_sysroot_preprocess"
+
+go_connections_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-context_git.bb 
b/recipes-devtools/go/go-context_git.bb
new file mode 100644
index 0000000..37f39b3
--- /dev/null
+++ b/recipes-devtools/go/go-context_git.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "A golang registry for global request variables."
+HOMEPAGE = "https://github.com/gorilla/context";
+SECTION = "devel/go"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c50f6bd9c1e15ed0bad3bea18e3c1b7f"
+
+SRCNAME = "context"
+
+PKG_NAME = "github.com/gorilla/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "14f550f51af52180c2eefed15e5fd18d63c0a64a"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_context_sysroot_preprocess"
+
+go_context_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-dbus_git.bb 
b/recipes-devtools/go/go-dbus_git.bb
new file mode 100644
index 0000000..4bf44d6
--- /dev/null
+++ b/recipes-devtools/go/go-dbus_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Native Go bindings for D-Bus"
+HOMEPAGE = "https://github.com/godbus/dbus";
+SECTION = "devel/go"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=09042bd5c6c96a2b9e45ddf1bc517eed"
+
+SRCNAME = "dbus"
+
+PKG_NAME = "github.com/godbus/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "5f6efc7ef2759c81b7ba876593971bfce311eab3"
+PV = "4.0.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_dbus_sysroot_preprocess"
+
+go_dbus_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-distribution_git.bb 
b/recipes-devtools/go/go-distribution_git.bb
new file mode 100644
index 0000000..948831b
--- /dev/null
+++ b/recipes-devtools/go/go-distribution_git.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "The Docker toolset to pack, ship, store, and deliver content"
+HOMEPAGE = "https://github.com/docker/distribution";
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = 
"file://src/${PKG_NAME}/LICENSE;md5=d2794c0df5b907fdace235a619d80314"
+
+SRCNAME = "distribution"
+
+PKG_NAME = "github.com/docker/${SRCNAME}"
+SRC_URI = 
"git://${PKG_NAME}.git;branch=docker/1.13;destsuffix=git/src/${PKG_NAME};protocol=https"
+
+SRCREV = "28602af35aceda2f8d571bad7ca37a54cf0250bc"
+PV = "2.6.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+           if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+               mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+           fi
+           cp $j ${D}${prefix}/local/go/$j
+       done
+       cp -r ${S}/src/${PKG_NAME}/LICENSE 
${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_distribution_digeset_sysroot_preprocess"
+
+go_distribution_digeset_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-fsnotify_git.bb 
b/recipes-devtools/go/go-fsnotify_git.bb
new file mode 100644
index 0000000..8aa1c76
--- /dev/null
+++ b/recipes-devtools/go/go-fsnotify_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "A golang registry for global request variables."
+HOMEPAGE = "https://github.com/go-fsnotify/fsnotify";
+SECTION = "devel/go"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c38914c9a7ab03bb2b96d4baaee10769"
+
+SRCNAME = "fsnotify"
+
+PKG_NAME = "github.com/fsnotify/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "836bfd95fecc0f1511dd66bdbf2b5b61ab8b00b6"
+PV = "1.2.11+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_fsnotify_sysroot_preprocess"
+
+go_fsnotify_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-libtrust_git.bb 
b/recipes-devtools/go/go-libtrust_git.bb
new file mode 100644
index 0000000..e2a28ec
--- /dev/null
+++ b/recipes-devtools/go/go-libtrust_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Primitives for identity and authorization"
+HOMEPAGE = "https://github.com/docker/libtrust";
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=435b266b3899aa8a959f17d41c56def8"
+
+SRCNAME = "libtrust"
+
+PKG_NAME = "github.com/docker/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "9cbd2a1374f46905c68a4eb3694a130610adc62a"
+PV = "0.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_libtrust_sysroot_preprocess"
+
+go_libtrust_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-logrus_git.bb 
b/recipes-devtools/go/go-logrus_git.bb
new file mode 100644
index 0000000..2c59d34
--- /dev/null
+++ b/recipes-devtools/go/go-logrus_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "A golang registry for global request variables."
+HOMEPAGE = "https://github.com/Sirupsen/logrus";
+SECTION = "devel/go"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8dadfef729c08ec4e631c4f6fc5d43a0"
+
+SRCNAME = "logrus"
+
+PKG_NAME = "github.com/Sirupsen/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "d26492970760ca5d33129d2d799e34be5c4782eb"
+PV = "0.11.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_logrus_sysroot_preprocess"
+
+go_logrus_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-md2man_git.bb 
b/recipes-devtools/go/go-md2man_git.bb
new file mode 100644
index 0000000..aa05899
--- /dev/null
+++ b/recipes-devtools/go/go-md2man_git.bb
@@ -0,0 +1,23 @@
+DESCRIPTION = "A markdown to manpage generator."
+HOMEPAGE = "https://github.com/cpuguy83/go-md2man";
+SECTION = "devel/go"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = 
"file://src/${GO_IMPORT}/LICENSE.md;md5=80794f9009df723bbc6fe19234c9f517"
+
+BBCLASSEXTEND = "native"
+
+GO_IMPORT = "github.com/cpuguy83/go-md2man"
+#GO_INSTALL = "${GO_IMPORT}/bin/go-md2man"
+
+SRC_URI = "git://${GO_IMPORT}.git;branch=master;protocol=https"
+
+SRCREV = "f79a8a8ca69da163eee19ab442bedad7a35bba5a"
+PV = "1.0.10+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit go
+
+do_compile:prepend() {
+       export GO111MODULE=off
+}
diff --git a/recipes-devtools/go/go-metalinter_git.bb 
b/recipes-devtools/go/go-metalinter_git.bb
new file mode 100644
index 0000000..3dda45c
--- /dev/null
+++ b/recipes-devtools/go/go-metalinter_git.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "Go Meta Linter."
+HOMEPAGE = "https://github.com/alecthomas/gometalinter";
+SECTION = "devel/go"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=dee20b35647295553d32faef05846a7b"
+
+BBCLASSEXTEND = "native"
+
+SRCNAME = "gometalinter"
+
+PKG_NAME = "github.com/alecthomas/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "e8d801238da6f0dfd14078d68f9b53fa50a7eeb5"
+PV = "0.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-mux_git.bb 
b/recipes-devtools/go/go-mux_git.bb
new file mode 100644
index 0000000..3f939f4
--- /dev/null
+++ b/recipes-devtools/go/go-mux_git.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "A powerful URL router and dispatcher for golang."
+HOMEPAGE = "https://github.com/gorilla/mux";
+SECTION = "devel/go"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c50f6bd9c1e15ed0bad3bea18e3c1b7f"
+
+SRCNAME = "mux"
+
+PKG_NAME = "github.com/gorilla/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "136d54f81f00414c45c3c68dd47e98cc97519c5e"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_mux_sysroot_preprocess"
+
+go_mux_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-patricia_git.bb 
b/recipes-devtools/go/go-patricia_git.bb
new file mode 100644
index 0000000..4c29b57
--- /dev/null
+++ b/recipes-devtools/go/go-patricia_git.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "A generic patricia trie (also called radix tree) implemented in 
Go (Golang)"
+HOMEPAGE = "https://github.com/gorilla/context";
+SECTION = "devel/go"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=9949b99212edd6b1e24ce702376c3baf"
+
+SRCNAME = "go-patricia"
+
+PKG_NAME = "github.com/tchap/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "666120de432aea38ab06bd5c818f04f4129882c9"
+PV = "2.2.6+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_patricia_sysroot_preprocess"
+
+go_patricia_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-pty_git.bb 
b/recipes-devtools/go/go-pty_git.bb
new file mode 100644
index 0000000..132e82d
--- /dev/null
+++ b/recipes-devtools/go/go-pty_git.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "PTY interface for Go"
+HOMEPAGE = "https://github.com/creack/pty";
+SECTION = "devel/go"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://License;md5=93958070863d769117fa33b129020050"
+
+SRCNAME = "pty"
+
+PKG_NAME = "github.com/creack/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=master;protocol=https"
+
+SRCREV = "05017fcccf23c823bfdea560dcc958a136e54fb7"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_pty_sysroot_preprocess"
+
+go_pty_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/go-systemd_git.bb 
b/recipes-devtools/go/go-systemd_git.bb
new file mode 100644
index 0000000..91f67da
--- /dev/null
+++ b/recipes-devtools/go/go-systemd_git.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "Go bindings to systemd socket activation, journal, D-Bus, and 
unit files"
+HOMEPAGE = "https://github.com/coreos/go-systemd";
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=19cbd64715b51267a47bf3750cc6a8a5"
+
+SRCNAME = "systemd"
+
+PKG_NAME = "github.com/coreos/go-${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;branch=main;protocol=https"
+
+SRCREV = "b4a58d95188dd092ae20072bac14cece0e67c388"
+PV = "4+git${SRCPV}"
+
+RDEPENDS:${PN} += "bash"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       cp -r ${S}/* ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_systemd_sysroot_preprocess"
+
+go_systemd_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
diff --git a/recipes-devtools/go/grpc-go_git.bb 
b/recipes-devtools/go/grpc-go_git.bb
new file mode 100644
index 0000000..b516e21
--- /dev/null
+++ b/recipes-devtools/go/grpc-go_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "The Go language implementation of gRPC. HTTP/2 based RPC"
+HOMEPAGE = "https://github.com/grpc/grpc-go";
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = 
"file://src/${PKG_NAME}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRCNAME = "grpc-go"
+
+PKG_NAME = "google.golang.org/grpc"
+SRC_URI = 
"git://github.com/grpc/${SRCNAME}.git;destsuffix=git/src/${PKG_NAME};branch=master;protocol=https"
+
+SRCREV = "5d8e5aad40bedb696205b96b786f1d0e1326b3f8"
+PV = "1.41.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+           if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+               mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+           fi
+           cp $j ${D}${prefix}/local/go/$j
+       done
+       cp -r ${S}/src/${PKG_NAME}/LICENSE 
${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_grpc_sysroot_preprocess"
+
+go_grpc_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += " \
+    ${prefix}/local/go/src/${PKG_NAME}/* \
+"
diff --git a/recipes-devtools/go/notary_git.bb 
b/recipes-devtools/go/notary_git.bb
new file mode 100644
index 0000000..972da5e
--- /dev/null
+++ b/recipes-devtools/go/notary_git.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Notary is a Docker project that allows anyone to have trust 
over arbitrary collections of data"
+HOMEPAGE = "https://github.com/docker/notary";
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = 
"file://src/${PKG_NAME}/LICENSE;md5=3596b980bb036e0875174ed15e4b982a"
+
+SRCNAME = "notary"
+
+PKG_NAME = "github.com/docker/${SRCNAME}"
+SRC_URI = 
"git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME};branch=master;protocol=https"
+
+SRCREV = "d6e1431feb32348e0650bf7551ac5cffd01d857b"
+PV = "0.6.1+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# NO-OP the do compile rule because this recipe is source only.
+do_compile() {
+}
+
+do_install() {
+       install -d ${D}${prefix}/local/go/src/${PKG_NAME}
+       for j in $(cd ${S} && find src/${PKG_NAME} -name "*.go"); do
+           if [ ! -d ${D}${prefix}/local/go/$(dirname $j) ]; then
+               mkdir -p ${D}${prefix}/local/go/$(dirname $j)
+           fi
+           cp $j ${D}${prefix}/local/go/$j
+       done
+       cp -r ${S}/src/${PKG_NAME}/LICENSE 
${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_notary_sysroot_preprocess"
+
+go_notary_sysroot_preprocess () {
+    install -d ${SYSROOT_DESTDIR}${prefix}/local/go/src/${PKG_NAME}
+    cp -r ${D}${prefix}/local/go/src/${PKG_NAME} 
${SYSROOT_DESTDIR}${prefix}/local/go/src/$(dirname ${PKG_NAME})
+}
+
+FILES:${PN} += "${prefix}/local/go/src/${PKG_NAME}/*"
-- 
2.20.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#55995): https://lists.yoctoproject.org/g/yocto/message/55995
Mute This Topic: https://lists.yoctoproject.org/mt/88722268/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to