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/cgroup-lite/cgroup-lite_1.11.bb b/import-layers/meta-virtualization/recipes-containers/cgroup-lite/cgroup-lite_1.11.bb
index b3af6f4..065d0ea 100644
--- a/import-layers/meta-virtualization/recipes-containers/cgroup-lite/cgroup-lite_1.11.bb
+++ b/import-layers/meta-virtualization/recipes-containers/cgroup-lite/cgroup-lite_1.11.bb
@@ -9,6 +9,7 @@
SRC_URI[md5sum] = "b20976194ee8fdb61e6b55281fb6ead4"
SRC_URI[sha256sum] = "a79ab9ae6fb3ff3ce0aa5539b055c0379eaffdc6c5f003af4010fcea683c1a45"
+inherit allarch
inherit update-rc.d
INITSCRIPT_NAME = "cgroups-init"
diff --git a/import-layers/meta-virtualization/recipes-containers/containerd/containerd-docker_git.bb b/import-layers/meta-virtualization/recipes-containers/containerd/containerd-docker_git.bb
new file mode 100644
index 0000000..f6dcaec
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/containerd/containerd-docker_git.bb
@@ -0,0 +1,10 @@
+include containerd.inc
+
+SRCREV = "03e5862ec0d8d3b3f750e19fca3ee367e13c090e"
+SRC_URI = "\
+ git://github.com/docker/containerd.git;branch=docker-1.13.x \
+ "
+CONTAINERD_VERSION = "0.2.3"
+
+PROVIDES += "virtual/containerd"
+RPROVIDES_${PN} = "virtual/containerd"
diff --git a/import-layers/meta-virtualization/recipes-containers/containerd/containerd-opencontainers_git.bb b/import-layers/meta-virtualization/recipes-containers/containerd/containerd-opencontainers_git.bb
new file mode 100644
index 0000000..37f8547
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/containerd/containerd-opencontainers_git.bb
@@ -0,0 +1,9 @@
+include containerd.inc
+
+SRCREV = "0ac3cd1be170d180b2baed755e8f0da547ceb267"
+SRC_URI = "git://github.com/docker/containerd.git;nobranch=1 \
+ "
+CONTAINERD_VERSION = "0.2.2"
+
+PROVIDES += "virtual/containerd"
+RPROVIDES_${PN} = "virtual/containerd"
diff --git a/import-layers/meta-virtualization/recipes-containers/containerd/containerd_git.bb b/import-layers/meta-virtualization/recipes-containers/containerd/containerd.inc
similarity index 92%
rename from import-layers/meta-virtualization/recipes-containers/containerd/containerd_git.bb
rename to import-layers/meta-virtualization/recipes-containers/containerd/containerd.inc
index c2000b1..b143979 100644
--- a/import-layers/meta-virtualization/recipes-containers/containerd/containerd_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/containerd/containerd.inc
@@ -4,22 +4,15 @@
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 = "0ac3cd1be170d180b2baed755e8f0da547ceb267"
-SRC_URI = "\
- git://github.com/docker/containerd.git;nobranch=1 \
- "
-
# Apache-2.0 for containerd
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.code;md5=aadc30f9c14d876ded7bedc0afd2d3d7"
S = "${WORKDIR}/git"
-CONTAINERD_VERSION = "0.2.2"
PV = "${CONTAINERD_VERSION}+git${SRCREV}"
-DEPENDS = "go-cross \
- "
+inherit go
RRECOMMENDS_${PN} = "lxc docker"
CONTAINERD_PKG="github.com/docker/containerd"
@@ -47,6 +40,7 @@
mkdir -p .gopath/src/"$(dirname "${CONTAINERD_PKG}")"
ln -sf ../../../.. .gopath/src/"${CONTAINERD_PKG}"
export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
+ export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
cd -
# Pass the needed cflags/ldflags so that cgo
@@ -86,6 +80,6 @@
fi
}
-FILES_${PN} += "/lib/systemd/system/*"
+FILES_${PN} += "${systemd_system_unitdir}/*"
INHIBIT_PACKAGE_STRIP = "1"
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
+
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-distribution/docker-distribution_git.bb b/import-layers/meta-virtualization/recipes-containers/docker-distribution/docker-distribution_git.bb
new file mode 100644
index 0000000..08b6d70
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/docker-distribution/docker-distribution_git.bb
@@ -0,0 +1,64 @@
+HOMEPAGE = "http://github.com/docker/distribution"
+SUMMARY = "The Docker toolset to pack, ship, store, and deliver content"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
+
+SRCREV_distribution="0810eba2adf048b77621472991211924d9ec31c5"
+SRC_URI = "git://github.com/docker/distribution.git;branch=master;name=distribution;destsuffix=git/src/github.com/docker/distribution \
+ file://docker-registry.service \
+ "
+
+PACKAGES =+ "docker-registry"
+
+PV = "v2.6.0-rc+git${SRCPV}"
+S = "${WORKDIR}/git/src/github.com/docker/distribution"
+
+inherit goarch
+inherit go
+
+# This disables seccomp and apparmor, which are on by default in the
+# go package.
+EXTRA_OEMAKE="BUILDTAGS=''"
+
+do_compile() {
+ export GOARCH="${TARGET_GOARCH}"
+ export GOPATH="${WORKDIR}/git/"
+ export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+ # Pass the needed cflags/ldflags so that cgo
+ # can find the needed headers files and libraries
+ export CGO_ENABLED="1"
+ export CFLAGS=""
+ export LDFLAGS=""
+ export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export GO_GCFLAGS=""
+ export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+
+ oe_runmake binaries
+}
+
+do_install() {
+ install -d ${D}/${sbindir}
+ install ${S}/bin/registry ${D}/${sbindir}
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 644 ${WORKDIR}/docker-registry.service ${D}/${systemd_unitdir}/system
+ fi
+
+ install -d ${D}/${sysconfdir}/docker-distribution/registry/
+ install ${S}/cmd/registry/config-example.yml ${D}/${sysconfdir}/docker-distribution/registry/config.yml
+
+ # storage for the registry containers
+ install -d ${D}/${localstatedir}/lib/registry/
+}
+
+INSANE_SKIP_${PN} += "ldflags already-stripped"
+INSANE_SKIP_docker-registry += "ldflags already-stripped"
+
+FILES_docker-registry = "${sbindir}/*"
+FILES_docker-registry += "${systemd_unitdir}/system/docker-registry.service"
+FILES_docker-registry += "${sysconfdir}/docker-distribution/*"
+FILES_docker-registry += "${localstatedir}/lib/registry/"
+
+SYSTEMD_SERVICE_docker-registry = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker-registry.service','',d)}"
+SYSTEMD_AUTO_ENABLE_docker-registry = "enable"
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-distribution/files/docker-registry.service b/import-layers/meta-virtualization/recipes-containers/docker-distribution/files/docker-registry.service
new file mode 100644
index 0000000..15460c7
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/docker-distribution/files/docker-registry.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=v2 Registry server for Docker
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/registry serve /etc/docker-distribution/registry/config.yml
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-registry/docker-registry_git.bb b/import-layers/meta-virtualization/recipes-containers/docker-registry/docker-registry_git.bb
deleted file mode 100644
index e94e985..0000000
--- a/import-layers/meta-virtualization/recipes-containers/docker-registry/docker-registry_git.bb
+++ /dev/null
@@ -1,93 +0,0 @@
-HOMEPAGE = "https://github.com/docker/docker-registry"
-SUMMARY = "Registry server for Docker"
-DESCRIPTION = "\
- This is the classic python docker-registry. \
- . \
- hosting/delivering of repositories and images \
- "
-
-SRCREV = "fd8c0c114985547b69088e0f1526e58bfe2ff914"
-SRC_URI = "\
- git://github.com/docker/docker-registry.git \
- file://docker-registry.conf \
- file://docker-registry.service \
- file://config.yml \
- file://change_sqlalchemy_rqt.patch \
- "
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=35e8e5305c1b7b4a5761f9de5d44e5f4"
-
-S = "${WORKDIR}/git"
-
-PV = "0.9.1+git${SRCREV}"
-
-RDEPENDS_${PN} += "\
- docker \
- gunicorn (>= 19.1.1) \
- python-pip \
- python-distribute \
- python-m2crypto (>= 0.22.3) \
- python-pyyaml (>= 3.11) \
- python-flask (>= 0.10.1) \
- python-gevent (>= 1.0.1) \
- python-requests \
- python-sqlalchemy (>= 0.9.4) \
- python-blinker (>= 1.3) \
- python-backports-lzma (>= 0.0.3) \
- python-flask-cors (>= 1.10.3) \
- python-bugsnag (>= 2.0.2) \
- python-docker-registry-core (>= 2.0.3) \
- python-newrelic (>= 2.22.0.19) \
- python-itsdangerous (>= 0.21) \
- python-jinja2 (>= 2.4) \
- python-werkzeug (>= 0.7) \
- python-simplejson (>= 3.6.2) \
- python-redis (>= 2.10.3) \
- python-boto (>= 2.34.0) \
- python-webob \
- "
-# OFFICIAL REQ:
-# docker-registry-core>=2,<3
-# blinker==1.3
-# backports.lzma==0.0.3,!=0.0.4
-
-# Flask==0.10.1
-# gevent==1.0.1
-# gunicorn==19.1.1
-# PyYAML==3.11
-# requests==2.3.0
-# M2Crypto==0.22.3
-# sqlalchemy==0.9.4
-# setuptools==5.8
-#
-# [bugsnag]
-# bugsnag>=2.0,<2.1
-#
-# [cors]
-# Flask-cors>=1.8,<2.0
-#
-# [newrelic]
-# newrelic>=2.22,<2.23
-
-
-inherit setuptools systemd
-
-SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
-SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker-registry.service','',d)}"
-
-do_install_append() {
- mkdir -p ${D}/etc/default/
- cp ${WORKDIR}/docker-registry.conf ${D}/etc/default/docker-registry
-
- if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}${systemd_unitdir}/system
- install -m 644 ${WORKDIR}/docker-registry.service ${D}/${systemd_unitdir}/system
- sed -i "s|#WORKDIR#|${PYTHON_SITEPACKAGES_DIR}/docker_registry|" ${D}/${systemd_unitdir}/system/docker-registry.service
- fi
- # based on config_mirror.yml - uses /var/docker-registry instead of /tmp for files
- install ${WORKDIR}/config.yml ${D}/etc/docker-registry.yml
- mkdir -p ${D}/var/docker-registry
-}
-
-FILES_${PN} += "/etc/default /var/docker-registry /etc/ /etc/default/volatiles"
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/change_sqlalchemy_rqt.patch b/import-layers/meta-virtualization/recipes-containers/docker-registry/files/change_sqlalchemy_rqt.patch
deleted file mode 100644
index 75cbd6d..0000000
--- a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/change_sqlalchemy_rqt.patch
+++ /dev/null
@@ -1,13 +0,0 @@
----
- requirements/main.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/requirements/main.txt
-+++ b/requirements/main.txt
-@@ -5,5 +5,5 @@
- PyYAML==3.11
- requests==2.3.0
- M2Crypto==0.22.3
--sqlalchemy==0.9.4
-+sqlalchemy>=0.9.4
- setuptools==5.8
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/config.yml b/import-layers/meta-virtualization/recipes-containers/docker-registry/files/config.yml
deleted file mode 100644
index 8b33766..0000000
--- a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/config.yml
+++ /dev/null
@@ -1,228 +0,0 @@
-# All other flavors inherit the `common' config snippet
-common: &common
- issue: '"docker-registry server"'
- # Default log level is info
- loglevel: _env:LOGLEVEL:info
- # Enable debugging (additional informations in the output of the _ping endpoint)
- debug: _env:DEBUG:false
- # By default, the registry acts standalone (eg: doesn't query the index)
- standalone: _env:STANDALONE:true
- # The default endpoint to use (if NOT standalone) is index.docker.io
- index_endpoint: _env:INDEX_ENDPOINT:https://index.docker.io
- # Storage redirect is disabled
- storage_redirect: _env:STORAGE_REDIRECT
- # Token auth is enabled (if NOT standalone)
- disable_token_auth: _env:DISABLE_TOKEN_AUTH
- # No priv key
- privileged_key: _env:PRIVILEGED_KEY
- # No search backend
- search_backend: _env:SEARCH_BACKEND
- # SQLite search backend
- sqlalchemy_index_database: _env:SQLALCHEMY_INDEX_DATABASE:sqlite:////var/docker-registry/docker-registry.db
-
- # Mirroring is not enabled
- mirroring:
- source: _env:MIRROR_SOURCE # https://registry-1.docker.io
- source_index: _env:MIRROR_SOURCE_INDEX # https://index.docker.io
- tags_cache_ttl: _env:MIRROR_TAGS_CACHE_TTL:172800 # seconds
-
- cache:
- host: _env:CACHE_REDIS_HOST
- port: _env:CACHE_REDIS_PORT
- db: _env:CACHE_REDIS_DB:0
- password: _env:CACHE_REDIS_PASSWORD
-
- # Enabling LRU cache for small files
- # This speeds up read/write on small files
- # when using a remote storage backend (like S3).
- cache_lru:
- host: _env:CACHE_LRU_REDIS_HOST
- port: _env:CACHE_LRU_REDIS_PORT
- db: _env:CACHE_LRU_REDIS_DB:0
- password: _env:CACHE_LRU_REDIS_PASSWORD
-
- # Enabling these options makes the Registry send an email on each code Exception
- email_exceptions:
- smtp_host: _env:SMTP_HOST
- smtp_port: _env:SMTP_PORT:25
- smtp_login: _env:SMTP_LOGIN
- smtp_password: _env:SMTP_PASSWORD
- smtp_secure: _env:SMTP_SECURE:false
- from_addr: _env:SMTP_FROM_ADDR:docker-registry@localdomain.local
- to_addr: _env:SMTP_TO_ADDR:noise+dockerregistry@localdomain.local
-
- # Enable bugsnag (set the API key)
- bugsnag: _env:BUGSNAG
-
- # CORS support is not enabled by default
- cors:
- origins: _env:CORS_ORIGINS
- methods: _env:CORS_METHODS
- headers: _env:CORS_HEADERS:[Content-Type]
- expose_headers: _env:CORS_EXPOSE_HEADERS
- supports_credentials: _env:CORS_SUPPORTS_CREDENTIALS
- max_age: _env:CORS_MAX_AGE
- send_wildcard: _env:CORS_SEND_WILDCARD
- always_send: _env:CORS_ALWAYS_SEND
- automatic_options: _env:CORS_AUTOMATIC_OPTIONS
- vary_header: _env:CORS_VARY_HEADER
- resources: _env:CORS_RESOURCES
-
-local: &local
- <<: *common
- storage: local
- storage_path: _env:STORAGE_PATH:/var/docker-registry
-
-
-s3: &s3
- <<: *common
- storage: s3
- s3_region: _env:AWS_REGION
- s3_bucket: _env:AWS_BUCKET
- boto_bucket: _env:AWS_BUCKET
- storage_path: _env:STORAGE_PATH:/registry
- s3_encrypt: _env:AWS_ENCRYPT:true
- s3_secure: _env:AWS_SECURE:true
- s3_access_key: _env:AWS_KEY
- s3_secret_key: _env:AWS_SECRET
- s3_use_sigv4: _env:AWS_USE_SIGV4
- boto_host: _env:AWS_HOST
- boto_port: _env:AWS_PORT
- boto_calling_format: _env:AWS_CALLING_FORMAT
-
-cloudfronts3: &cloudfronts3
- <<: *s3
- cloudfront:
- base: _env:CF_BASE_URL
- keyid: _env:CF_KEYID
- keysecret: _env:CF_KEYSECRET
-
-azureblob: &azureblob
- <<: *common
- storage: azureblob
- azure_storage_account_name: _env:AZURE_STORAGE_ACCOUNT_NAME
- azure_storage_account_key: _env:AZURE_STORAGE_ACCOUNT_KEY
- azure_storage_container: _env:AZURE_STORAGE_CONTAINER:registry
- azure_use_https: _env:AZURE_USE_HTTPS:true
-
-# Ceph Object Gateway Configuration
-# See http://ceph.com/docs/master/radosgw/ for details on installing this service.
-ceph-s3: &ceph-s3
- <<: *common
- storage: s3
- s3_region: ~
- s3_bucket: _env:AWS_BUCKET
- s3_encrypt: _env:AWS_ENCRYPT:false
- s3_secure: _env:AWS_SECURE:false
- storage_path: _env:STORAGE_PATH:/registry
- s3_access_key: _env:AWS_KEY
- s3_secret_key: _env:AWS_SECRET
- boto_bucket: _env:AWS_BUCKET
- boto_host: _env:AWS_HOST
- boto_port: _env:AWS_PORT
- boto_debug: _env:AWS_DEBUG:0
- boto_calling_format: _env:AWS_CALLING_FORMAT
-
-# Google Cloud Storage Configuration
-# See:
-# https://developers.google.com/storage/docs/reference/v1/getting-startedv1#keys
-# for details on access and secret keys.
-gcs:
- <<: *common
- storage: gcs
- boto_bucket: _env:GCS_BUCKET
- storage_path: _env:STORAGE_PATH:/registry
- gs_secure: _env:GCS_SECURE:true
- gs_access_key: _env:GCS_KEY
- gs_secret_key: _env:GCS_SECRET
- # OAuth 2.0 authentication with the storage.
- # oauth2 can be set to true or false. If it is set to true, gs_access_key,
- # gs_secret_key and gs_secure are not needed.
- # Client ID and Client Secret must be set into OAUTH2_CLIENT_ID and
- # OAUTH2_CLIENT_SECRET environment variables.
- # See: https://developers.google.com/accounts/docs/OAuth2.
- oauth2: _env:GCS_OAUTH2:false
-
-# This flavor is for storing images in Openstack Swift
-swift: &swift
- <<: *common
- storage: swift
- storage_path: _env:STORAGE_PATH:/registry
- # keystone authorization
- swift_authurl: _env:OS_AUTH_URL
- swift_container: _env:OS_CONTAINER
- swift_user: _env:OS_USERNAME
- swift_password: _env:OS_PASSWORD
- swift_tenant_name: _env:OS_TENANT_NAME
- swift_region_name: _env:OS_REGION_NAME
-
-# This flavor stores the images in Glance (to integrate with openstack)
-# See also: https://github.com/docker/openstack-docker
-glance: &glance
- <<: *common
- storage: glance
- storage_alternate: _env:GLANCE_STORAGE_ALTERNATE:file
- storage_path: _env:STORAGE_PATH:/var/docker-registry
-
-openstack:
- <<: *glance
-
-# This flavor stores the images in Glance (to integrate with openstack)
-# and tags in Swift.
-glance-swift: &glance-swift
- <<: *swift
- storage: glance
- storage_alternate: swift
-
-openstack-swift:
- <<: *glance-swift
-
-elliptics:
- <<: *common
- storage: elliptics
- elliptics_nodes: _env:ELLIPTICS_NODES
- elliptics_wait_timeout: _env:ELLIPTICS_WAIT_TIMEOUT:60
- elliptics_check_timeout: _env:ELLIPTICS_CHECK_TIMEOUT:60
- elliptics_io_thread_num: _env:ELLIPTICS_IO_THREAD_NUM:2
- elliptics_net_thread_num: _env:ELLIPTICS_NET_THREAD_NUM:2
- elliptics_nonblocking_io_thread_num: _env:ELLIPTICS_NONBLOCKING_IO_THREAD_NUM:2
- elliptics_groups: _env:ELLIPTICS_GROUPS
- elliptics_verbosity: _env:ELLIPTICS_VERBOSITY:4
- elliptics_logfile: _env:ELLIPTICS_LOGFILE:/dev/stderr
- elliptics_addr_family: _env:ELLIPTICS_ADDR_FAMILY:2
-
-# This flavor stores the images in Aliyun OSS
-# See:
-# https://i.aliyun.com/access_key/
-# for details on access and secret keys.
-oss: &oss
- <<: *common
- storage: oss
- storage_path: _env:STORAGE_PATH:/registry/
- oss_host: _env:OSS_HOST
- oss_bucket: _env:OSS_BUCKET
- oss_accessid: _env:OSS_KEY
- oss_accesskey: _env:OSS_SECRET
-
-
-
-# This is the default configuration when no flavor is specified
-dev: &dev
- <<: *local
- loglevel: _env:LOGLEVEL:debug
- debug: _env:DEBUG:true
- search_backend: _env:SEARCH_BACKEND:sqlalchemy
-
-# This flavor is used by unit tests
-test:
- <<: *dev
- index_endpoint: https://registry-stage.hub.docker.com
- standalone: true
- storage_path: _env:STORAGE_PATH:./tmp/test
-
-# To specify another flavor, set the environment variable SETTINGS_FLAVOR
-# $ export SETTINGS_FLAVOR=prod
-prod:
- <<: *s3
- storage_path: _env:STORAGE_PATH:/prod
-
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/docker-registry.conf b/import-layers/meta-virtualization/recipes-containers/docker-registry/files/docker-registry.conf
deleted file mode 100644
index 940ece1..0000000
--- a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/docker-registry.conf
+++ /dev/null
@@ -1,19 +0,0 @@
-# The Docker registry configuration file
-DOCKER_REGISTRY_CONFIG=/etc/docker-registry.yml
-
-# The configuration to use from DOCKER_REGISTRY_CONFIG file
-SETTINGS_FLAVOR=local
-
-# Address to bind the registry to
-REGISTRY_ADDRESS=0.0.0.0
-
-# Port to bind the registry to
-REGISTRY_PORT=5000
-
-# Number of workers to handle the connections
-GUNICORN_WORKERS=4
-
-STANDALONE=true
-
-MIRROR_SOURCE=https://registry-1.docker.io
-MIRROR_SOURCE_INDEX=https://index.docker.io
diff --git a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/docker-registry.service b/import-layers/meta-virtualization/recipes-containers/docker-registry/files/docker-registry.service
deleted file mode 100644
index 4f4cfe7..0000000
--- a/import-layers/meta-virtualization/recipes-containers/docker-registry/files/docker-registry.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Registry server for Docker
-After=docker.service
-Requires=docker.service
-
-[Service]
-Type=simple
-Environment=DOCKER_REGISTRY_CONFIG=/etc/docker-registry.yml
-EnvironmentFile=-/etc/default/docker-registry
-WorkingDirectory=#WORKDIR#
-ExecStart=/usr/bin/gunicorn --access-logfile /var/log/docker-registry-access.log --error-logfile /var/log/docker-registry-error.log --debug --max-requests 100 --graceful-timeout 3600 -t 3600 -k gevent -b ${REGISTRY_ADDRESS}:${REGISTRY_PORT} -w ${GUNICORN_WORKERS} docker_registry.wsgi:application
-Restart=on-failure
-
-[Install]
-WantedBy=multi-user.target
diff --git a/import-layers/meta-virtualization/recipes-containers/docker/docker_git.bb b/import-layers/meta-virtualization/recipes-containers/docker/docker_git.bb
index 04dc76d..74170cb 100644
--- a/import-layers/meta-virtualization/recipes-containers/docker/docker_git.bb
+++ b/import-layers/meta-virtualization/recipes-containers/docker/docker_git.bb
@@ -18,12 +18,14 @@
subtle and/or glaring issues. \
"
-SRCREV = "7392c3b0ce0f9d3e918a321c66668c5d1ef4f689"
+SRCREV_docker = "49bf474f9ed7ce7143a59d1964ff7b7fd9b52178"
+SRCREV_libnetwork="0f534354b813003a754606689722fe253101bc4e"
SRC_URI = "\
- git://github.com/docker/docker.git;nobranch=1 \
- file://docker.service \
+ git://github.com/docker/docker.git;nobranch=1;name=docker \
+ git://github.com/docker/libnetwork.git;branch=master;name=libnetwork;destsuffix=libnetwork \
file://docker.init \
file://hi.Dockerfile \
+ file://context-use-golang.org-x-net-pkg-until-we-move-to-go.patch \
"
# Apache-2.0 for docker
@@ -32,11 +34,10 @@
S = "${WORKDIR}/git"
-DOCKER_VERSION = "1.12.5"
-PV = "${DOCKER_VERSION}+git${SRCREV}"
+DOCKER_VERSION = "1.13.0"
+PV = "${DOCKER_VERSION}+git${SRCREV_docker}"
DEPENDS = " \
- go-cross \
go-cli \
go-pty \
go-context \
@@ -50,45 +51,32 @@
go-systemd \
btrfs-tools \
sqlite3 \
- go-distribution-digest \
+ go-distribution \
+ compose-file \
+ go-connections \
+ notary \
+ grpc-go \
"
-DEPENDS_append_class-target = "lvm2"
+PACKAGES =+ "${PN}-contrib"
+
+DEPENDS_append_class-target = " lvm2"
RDEPENDS_${PN} = "curl aufs-util git util-linux iptables \
${@bb.utils.contains('DISTRO_FEATURES','systemd','','cgroup-lite',d)} \
"
-RDEPENDS_${PN} += "containerd runc"
+RDEPENDS_${PN} += "virtual/containerd virtual/runc"
+
RRECOMMENDS_${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat"
-RSUGGESTS_${PN} = "lxc docker-registry rt-tests"
+RSUGGESTS_${PN} = "lxc rt-tests"
DOCKER_PKG="github.com/docker/docker"
+inherit systemd update-rc.d
+inherit go
+inherit goarch
+
do_configure[noexec] = "1"
do_compile() {
- case "${TARGET_ARCH}" in
- arm)
- GOARCH=arm
- case "${TUNE_PKGARCH}" in
- cortexa*)
- export GOARM=7
- ;;
- esac
- ;;
- aarch64)
- GOARCH=arm64
- ;;
- i586|i686)
- GOARCH=386
- ;;
- x86_64)
- GOARCH=amd64
- ;;
- *)
- GOARCH="${TARGET_ARCH}"
- ;;
- esac
- export GOARCH
-
# Set GOPATH. See 'PACKAGERS.md'. Don't rely on
# docker to download its dependencies but rather
# use dependencies packaged independently.
@@ -96,6 +84,10 @@
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 ../../../../../libnetwork .gopath/src/github.com/docker/libnetwork
+
export GOPATH="${S}/.gopath:${S}/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
cd -
@@ -113,42 +105,50 @@
# to build this:
DOCKER_GITCOMMIT="${SRCREV}" \
./hack/make.sh dynbinary
-}
-inherit systemd update-rc.d
+ # build the proxy
+ go build -o ${S}/docker-proxy github.com/docker/libnetwork/cmd/proxy
+}
SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.service','',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"
+INITSCRIPT_PARAMS_${PN} = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
do_install() {
mkdir -p ${D}/${bindir}
cp ${S}/bundles/latest/dynbinary-client/docker ${D}/${bindir}/docker
cp ${S}/bundles/latest/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd
- cp ${S}/bundles/latest/dynbinary-daemon/docker-proxy ${D}/${bindir}/docker-proxy
+ cp ${S}/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}/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 ${WORKDIR}/docker.service ${D}/${systemd_unitdir}/system
+ install -m 644 ${S}/contrib/init/systemd/docker.service ${D}/${systemd_unitdir}/system
else
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init
fi
- mkdir -p ${D}/usr/share/docker/
- cp ${WORKDIR}/hi.Dockerfile ${D}/usr/share/docker/
+ mkdir -p ${D}${datadir}/docker/
+ cp ${WORKDIR}/hi.Dockerfile ${D}${datadir}/docker/
+ install -m 0755 ${S}/contrib/check-config.sh ${D}${datadir}/docker/
}
inherit useradd
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "-r docker"
-FILES_${PN} += "/lib/systemd/system/*"
+FILES_${PN} += "${systemd_unitdir}/system/*"
+
+FILES_${PN}-contrib += "${datadir}/docker/check-config.sh"
+RDEPENDS_${PN}-contrib += "bash"
# DO NOT STRIP docker
INHIBIT_PACKAGE_STRIP = "1"
+INSANE_SKIP_${PN} += "ldflags"
diff --git a/import-layers/meta-virtualization/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch b/import-layers/meta-virtualization/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch
new file mode 100644
index 0000000..240b744
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/docker/files/context-use-golang.org-x-net-pkg-until-we-move-to-go.patch
@@ -0,0 +1,116 @@
+From de69555afaf05efcdeea7b7c20c6f7b12f3e1bac Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Fri, 20 Jan 2017 11:58:44 -0500
+Subject: [PATCH] context: use golang.org/x/net pkg until we move to go 1.7
+
+In go 1.6 the context.go is not yet integrated and as such we will get
+build errors like:
+
+walwrap.go:4:2: cannot find package "context" in any of:
+...
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ client/README.md | 2 +-
+ client/client.go | 2 +-
+ daemon/info_unix.go | 2 +-
+ integration-cli/docker_api_attach_test.go | 2 +-
+ integration-cli/docker_cli_save_load_unix_test.go | 2 +-
+ vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go | 2 +-
+ vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go | 2 +-
+ 7 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/client/README.md b/client/README.md
+index 059dfb3..9de54aa 100644
+--- a/client/README.md
++++ b/client/README.md
+@@ -8,7 +8,7 @@ For example, to list running containers (the equivalent of `docker ps`):
+ package main
+
+ import (
+- "context"
++ "golang.org/x/net/context"
+ "fmt"
+
+ "github.com/docker/docker/api/types"
+diff --git a/client/client.go b/client/client.go
+index a9bdab6..95933af 100644
+--- a/client/client.go
++++ b/client/client.go
+@@ -19,7 +19,7 @@ For example, to list running containers (the equivalent of "docker ps"):
+ package main
+
+ import (
+- "context"
++ "golang.org/x/net/context"
+ "fmt"
+
+ "github.com/docker/docker/api/types"
+diff --git a/daemon/info_unix.go b/daemon/info_unix.go
+index 9c41c0e..57f8a7b 100644
+--- a/daemon/info_unix.go
++++ b/daemon/info_unix.go
+@@ -3,7 +3,7 @@
+ package daemon
+
+ import (
+- "context"
++ "golang.org/x/net/context"
+ "os/exec"
+ "strings"
+
+diff --git a/integration-cli/docker_api_attach_test.go b/integration-cli/docker_api_attach_test.go
+index d43bf3a..e5802a7 100644
+--- a/integration-cli/docker_api_attach_test.go
++++ b/integration-cli/docker_api_attach_test.go
+@@ -3,7 +3,7 @@ package main
+ import (
+ "bufio"
+ "bytes"
+- "context"
++ "golang.org/x/net/context"
+ "io"
+ "net"
+ "net/http"
+diff --git a/integration-cli/docker_cli_save_load_unix_test.go b/integration-cli/docker_cli_save_load_unix_test.go
+index 22445e5..d0afc8c 100644
+--- a/integration-cli/docker_cli_save_load_unix_test.go
++++ b/integration-cli/docker_cli_save_load_unix_test.go
+@@ -3,7 +3,7 @@
+ package main
+
+ import (
+- "context"
++ "golang.org/x/net/context"
+ "fmt"
+ "io/ioutil"
+ "os"
+diff --git a/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go b/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
+index 6b3295a..cbfcf7e 100644
+--- a/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
++++ b/vendor/github.com/docker/swarmkit/manager/logbroker/subscription.go
+@@ -1,7 +1,7 @@
+ package logbroker
+
+ import (
+- "context"
++ "golang.org/x/net/context"
+ "fmt"
+ "strings"
+ "sync"
+diff --git a/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go b/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
+index 5a6c71a..efe5921 100644
+--- a/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
++++ b/vendor/github.com/docker/swarmkit/manager/state/raft/storage/walwrap.go
+@@ -1,7 +1,7 @@
+ package storage
+
+ import (
+- "context"
++ "golang.org/x/net/context"
+ "io"
+ "io/ioutil"
+ "os"
+--
+2.7.4
+
diff --git a/import-layers/meta-virtualization/recipes-containers/docker/files/docker-registry.service b/import-layers/meta-virtualization/recipes-containers/docker/files/docker-registry.service
new file mode 100644
index 0000000..7b4bc46
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/docker/files/docker-registry.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=docker private registry service
+After=docker.service
+
+[Service]
+ExecStartPre=-/usr/bin/docker kill registry
+ExecStartPre=-/usr/bin/docker rm registry
+ExecStart=/usr/bin/docker run --name registry -v /mirror/registry:/tmp/ -p 5000:5000 \
+ -e "STANDALONE=true" \
+ -e "MIRROR_SOURCE=https://registry-1.docker.io" \
+ -e "MIRROR_SOURCE_INDEX=https://index.docker.io" \
+ -e "SETTINGS_FLAVOR=local" \
+ registry
+ExecStop=-/usr/bin/docker stop registry
+Restart=always
+RestartSec=10s
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/meta-virtualization/recipes-containers/docker/files/docker.init b/import-layers/meta-virtualization/recipes-containers/docker/files/docker.init
index 2e8eb9e..9c01c75 100644
--- a/import-layers/meta-virtualization/recipes-containers/docker/files/docker.init
+++ b/import-layers/meta-virtualization/recipes-containers/docker/files/docker.init
@@ -28,7 +28,6 @@
pidfile="/var/run/$prog.pid"
lockfile="/var/lock/subsys/$prog"
logfile="/var/log/$prog"
-other_args="--registry-mirror=http://localhost:5000 --insecure-registry=http://localhost:5000 --raw-logs"
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
@@ -39,8 +38,8 @@
if ! [ -f $pidfile ]; then
printf "Starting $prog:\t"
- echo -e "\n$(date)\n" >> $logfile
- "$unshare" -m -- $exec daemon $other_args &>> $logfile &
+ echo "\n$(date)\n" >> $logfile
+ "$unshare" -m -- $exec -d $other_args &>> $logfile &
pid=$!
touch $lockfile
# wait up to 10 seconds for the pidfile to exist. see
diff --git a/import-layers/meta-virtualization/recipes-containers/go-digest/go-digest_git.bb b/import-layers/meta-virtualization/recipes-containers/go-digest/go-digest_git.bb
new file mode 100644
index 0000000..a2f8cd6
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/go-digest/go-digest_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Common digest package used across the container ecosystem."
+HOMEPAGE = "https://github.com/opencontainers/go-digest.git"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE.code;md5=9cd86830b557232ce55e2a6b47387471"
+
+SRCNAME = "go-digest"
+
+PKG_NAME = "github.com/opencontainers/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "b6234c321f263c503268e3b205f3d9755f9d14ed"
+PV = "v1.0.0-rc0+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.code ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "go_digest_file_sysroot_preprocess"
+
+go_digest_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"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-containers/go-errors/go-errors_git.bb b/import-layers/meta-virtualization/recipes-containers/go-errors/go-errors_git.bb
new file mode 100644
index 0000000..3bb74a7
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/go-errors/go-errors_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Simple error handling primitives"
+HOMEPAGE = "https://github.com/pkg/errors"
+SECTION = "devel/go"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=6fe682a02df52c6653f33bd0f7126b5a"
+
+SRCNAME = "errors"
+
+PKG_NAME = "github.com/pkg/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "248dadf4e9068a0b3e79f02ed0a610d935de5302"
+PV = "v0.8.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" -not -path "*/.tool/*"); 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_errors_file_sysroot_preprocess"
+
+go_errors_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"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-containers/go-spf13-cobra/spf13-cobra_git.bb b/import-layers/meta-virtualization/recipes-containers/go-spf13-cobra/spf13-cobra_git.bb
new file mode 100644
index 0000000..e942e4e
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/go-spf13-cobra/spf13-cobra_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "A Commander for modern Go CLI interactions"
+HOMEPAGE = "https://github.com/spf13/cobra"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE.txt;md5=920d76114a32b0fb75b3f2718c5a91be"
+
+SRCNAME = "cobra"
+
+PKG_NAME = "github.com/spf13/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "b5d8e8f46a2f829f755b6e33b454e25c61c935e1"
+PV = "v0.0.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" -not -path "*/.tool/*"); 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.txt ${D}${prefix}/local/go/src/${PKG_NAME}/
+}
+
+SYSROOT_PREPROCESS_FUNCS += "cobra_file_sysroot_preprocess"
+
+cobra_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"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-containers/go-spf13-pflag/spf13-pflag_git.bb b/import-layers/meta-virtualization/recipes-containers/go-spf13-pflag/spf13-pflag_git.bb
new file mode 100644
index 0000000..2fbcb43
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/go-spf13-pflag/spf13-pflag_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags."
+HOMEPAGE = "https://github.com/spf13/pflag"
+SECTION = "devel/go"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=1e8b7dc8b906737639131047a590f21d"
+
+SRCNAME = "pflag"
+
+PKG_NAME = "github.com/spf13/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "9ff6c6923cfffbcd502984b8e0c80539a94968b7"
+PV = "v1.0.0-rc4+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" -not -path "*/.tool/*"); 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 += "pflag_file_sysroot_preprocess"
+
+pflag_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"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-containers/lxc/files/Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch b/import-layers/meta-virtualization/recipes-containers/lxc/files/Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch
new file mode 100644
index 0000000..f9cecc0
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/lxc/files/Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch
@@ -0,0 +1,119 @@
+From 5c957671a511441b112b137b88bf0b1f31adac20 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <siarheit@google.com>
+Date: Sat, 21 Jan 2017 11:57:13 +0000
+Subject: [PATCH] Use AC_HEADER_MAJOR to detect major()/minor()/makedev()
+
+commit af6824fce9c9536fbcabef8d5547f6c486f55fdf from
+git://github.com/lxc/lxc.git
+
+Before the change build failed on Gentoo as:
+
+ bdev/lxclvm.c: In function 'lvm_detect':
+ bdev/lxclvm.c:140:4: error: implicit declaration of function 'major' [-Werror=implicit-function-declaration]
+ major(statbuf.st_rdev), minor(statbuf.st_rdev));
+ ^~~~~
+ bdev/lxclvm.c:140:28: error: implicit declaration of function 'minor' [-Werror=implicit-function-declaration]
+ major(statbuf.st_rdev), minor(statbuf.st_rdev));
+ ^~~~~
+
+glibc plans to remove <sys/sysmacros.h> from glibc's <sys/types.h>:
+ https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
+
+Gentoo already applied glibc patch to experimental glibc-2.24
+to start preparingfor the change.
+
+Autoconf has AC_HEADER_MAJOR to find out which header defines
+reqiured macros:
+ https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html
+
+This change should also increase portability across other libcs.
+
+Bug: https://bugs.gentoo.org/604360
+Signed-off-by: Sergei Trofimovich <siarheit@google.com>
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ configure.ac | 3 +++
+ src/lxc/bdev/lxclvm.c | 9 +++++++++
+ src/lxc/conf.c | 8 ++++++++
+ src/lxc/lxccontainer.c | 8 ++++++++
+ 4 files changed, 28 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 8f31c29..924baa1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -601,6 +601,9 @@ AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include <sys/prctl.h>])
+ # Check for some headers
+ AC_CHECK_HEADERS([sys/signalfd.h pty.h ifaddrs.h sys/capability.h sys/personality.h utmpx.h sys/timerfd.h])
+
++# lookup major()/minor()/makedev()
++AC_HEADER_MAJOR
++
+ # Check for some syscalls functions
+ AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat])
+
+diff --git a/src/lxc/bdev/lxclvm.c b/src/lxc/bdev/lxclvm.c
+index 3d41b10..419d1c2 100644
+--- a/src/lxc/bdev/lxclvm.c
++++ b/src/lxc/bdev/lxclvm.c
+@@ -32,10 +32,19 @@
+ #include <sys/wait.h>
+
+ #include "bdev.h"
++#include "config.h"
+ #include "log.h"
+ #include "lxclvm.h"
+ #include "utils.h"
+
++/* major()/minor() */
++#ifdef MAJOR_IN_MKDEV
++# include <sys/mkdev.h>
++#endif
++#ifdef MAJOR_IN_SYSMACROS
++# include <sys/sysmacros.h>
++#endif
++
+ lxc_log_define(lxclvm, lxc);
+
+ extern char *dir_new_path(char *src, const char *oldname, const char *name,
+diff --git a/src/lxc/conf.c b/src/lxc/conf.c
+index 3b023ef..53406ca 100644
+--- a/src/lxc/conf.c
++++ b/src/lxc/conf.c
+@@ -39,6 +39,14 @@
+ #include <grp.h>
+ #include <time.h>
+
++/* makedev() */
++#ifdef MAJOR_IN_MKDEV
++# include <sys/mkdev.h>
++#endif
++#ifdef MAJOR_IN_SYSMACROS
++# include <sys/sysmacros.h>
++#endif
++
+ #ifdef HAVE_STATVFS
+ #include <sys/statvfs.h>
+ #endif
+diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
+index 9f12ca2..aa02833 100644
+--- a/src/lxc/lxccontainer.c
++++ b/src/lxc/lxccontainer.c
+@@ -61,6 +61,14 @@
+ #include "utils.h"
+ #include "version.h"
+
++/* major()/minor() */
++#ifdef MAJOR_IN_MKDEV
++# include <sys/mkdev.h>
++#endif
++#ifdef MAJOR_IN_SYSMACROS
++# include <sys/sysmacros.h>
++#endif
++
+ #if HAVE_IFADDRS_H
+ #include <ifaddrs.h>
+ #else
+--
+2.7.4
+
diff --git a/import-layers/meta-virtualization/recipes-containers/lxc/lxc_2.0.0.bb b/import-layers/meta-virtualization/recipes-containers/lxc/lxc_2.0.0.bb
index 53068a8..c98d1a7 100644
--- a/import-layers/meta-virtualization/recipes-containers/lxc/lxc_2.0.0.bb
+++ b/import-layers/meta-virtualization/recipes-containers/lxc/lxc_2.0.0.bb
@@ -10,6 +10,7 @@
libcap-bin \
bridge-utils \
dnsmasq \
+ initscripts \
perl-module-strict \
perl-module-getopt-long \
perl-module-vars \
@@ -18,8 +19,11 @@
perl-module-constant \
perl-module-overload \
perl-module-exporter-heavy \
+"
+RDEPENDS_${PN}_append_libc-glibc = "\
glibc-utils \
"
+
RDEPENDS_${PN}-ptest += "file make"
SRC_URI = "http://linuxcontainers.org/downloads/${BPN}-${PV}.tar.gz \
@@ -30,6 +34,7 @@
file://lxc-fix-B-S.patch \
file://lxc-doc-upgrade-to-use-docbook-3.1-DTD.patch \
file://logs-optionally-use-base-filenames-to-report-src-fil.patch \
+ file://Use-AC_HEADER_MAJOR-to-detect-major-minor-makedev.patch \
"
SRC_URI[md5sum] = "04a7245a614cd3296b0ae9ceeeb83fbb"
@@ -50,9 +55,6 @@
CFLAGS_append = " -Wno-error=deprecated-declarations"
-# disable problematic GCC 5.2 optimizations [YOCTO #8291]
-FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns2"
-
PACKAGECONFIG ??= "templates \
${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
"
@@ -63,6 +65,7 @@
PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
PACKAGECONFIG[seccomp] ="--enable-seccomp,--disable-seccomp,libseccomp,libseccomp"
PACKAGECONFIG[python] = "--enable-python,--disable-python,python3,python3-core"
+PACKAGECONFIG[lua] = "--enable-lua,--disable-lua,lua,lua"
# required by python3 to run setup.py
export BUILD_SYS
@@ -84,17 +87,19 @@
# For LXC the docdir only contains example configuration files and should be included in the lxc package
FILES_${PN} += "${docdir}"
FILES_${PN} += "${libdir}/python3*"
-FILES_${PN}-dbg += "${libexecdir}/lxc/.debug"
+FILES_${PN} += "${datadir}/lua/*"
+FILES_${PN} += "${libdir}/lua/lxc/*"
+FILES_${PN}-dbg += "${libdir}/lua/lxc/.debug"
+FILES_${PN}-dbg += "${libexecdir}/lxc/.debug ${libexecdir}/lxc/hooks/.debug"
PACKAGES =+ "${PN}-templates ${PN}-setup ${PN}-networking"
FILES_${PN}-templates += "${datadir}/lxc/templates"
RDEPENDS_${PN}-templates += "bash"
ALLOW_EMPTY_${PN}-networking = "1"
-FILES_${PN}-setup += "/etc/tmpfiles.d"
-FILES_${PN}-setup += "/lib/systemd/system"
-FILES_${PN}-setup += "/usr/lib/systemd/system"
-FILES_${PN}-setup += "/etc/init.d"
+FILES_${PN}-setup += "${sysconfdir}/tmpfiles.d"
+FILES_${PN}-setup += "${systemd_system_unitdir}"
+FILES_${PN}-setup += "${sysconfdir}/init.d"
PRIVATE_LIBS_${PN}-ptest = "liblxc.so.1"
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-image-spec/oci-image-spec_git.bb b/import-layers/meta-virtualization/recipes-containers/oci-image-spec/oci-image-spec_git.bb
new file mode 100644
index 0000000..92a8399
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-image-spec/oci-image-spec_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "The OCI Image Format project creates and maintains the software shipping container image format spec"
+HOMEPAGE = "https://github.com/opencontainers/image-spec"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=27ef03aa2da6e424307f102e8b42621d"
+
+SRCNAME = "image-spec"
+
+PKG_NAME = "github.com/opencontainers/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "91d3eaabebcdc329edd9b4ff0f28f8f90022201f"
+PV = "v1.0.0-rc4+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 += "image_spec_file_sysroot_preprocess"
+
+image_spec_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"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-image-tools/oci-image-tools_git.bb b/import-layers/meta-virtualization/recipes-containers/oci-image-tools/oci-image-tools_git.bb
new file mode 100644
index 0000000..29a8926
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-image-tools/oci-image-tools_git.bb
@@ -0,0 +1,61 @@
+HOMEPAGE = "https://github.com/opencontainers/image-tools"
+SUMMARY = "A collection of tools for working with the OCI image format specification"
+LICENSE = "Apache-2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+DEPENDS = "\
+ oci-image-spec \
+ oci-runtime-spec \
+ go-digest \
+ go-errors \
+ spf13-cobra \
+ spf13-pflag \
+ "
+
+SRC_URI = "git://github.com/opencontainers/image-tools.git"
+SRCREV = "a358e03fde4e3628bf9fb7656bf643b63f975636"
+PV = "0.1.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit goarch
+inherit go
+
+# This disables seccomp and apparmor, which are on by default in the
+# go package.
+EXTRA_OEMAKE="BUILDTAGS=''"
+
+do_compile() {
+ export GOARCH="${TARGET_GOARCH}"
+ export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+ # Setup vendor directory so that it can be used in GOPATH.
+ #
+ # Go looks in a src directory under any directory in GOPATH but riddler
+ # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
+ #
+ # We also need to link in the ipallocator directory as that is not under
+ # a src directory.
+ ln -sfn . "${S}/vendor/src"
+ mkdir -p "${S}/vendor/src/github.com/opencontainers/image-tools/"
+ ln -sfn "${S}/image" "${S}/vendor/src/github.com/opencontainers/image-tools/image"
+ export GOPATH="${S}/vendor"
+
+ # Pass the needed cflags/ldflags so that cgo
+ # can find the needed headers files and libraries
+ export CGO_ENABLED="1"
+ export CFLAGS=""
+ export LDFLAGS=""
+ export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+
+ oe_runmake tools
+}
+
+do_install() {
+ install -d ${D}/${sbindir}
+ install ${S}/oci-create-runtime-bundle ${D}/${sbindir}/
+ install ${S}/oci-image-validate ${D}/${sbindir}/
+ install ${S}/oci-unpack ${D}/${sbindir}/
+}
+
+INSANE_SKIP_${PN} += "ldflags"
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb b/import-layers/meta-virtualization/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb
new file mode 100644
index 0000000..82f852f
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-runtime-spec/oci-runtime-spec_git.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "The Open Container Initiative develops specifications for standards on Operating System process and application containers"
+HOMEPAGE = "https://github.com/opencontainers/runtime-spec"
+SECTION = "devel/go"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://src/${PKG_NAME}/LICENSE;md5=b355a61a394a504dacde901c958f662c"
+
+SRCNAME = "runtime-spec"
+
+PKG_NAME = "github.com/opencontainers/${SRCNAME}"
+SRC_URI = "git://${PKG_NAME}.git;destsuffix=git/src/${PKG_NAME}"
+
+SRCREV = "4af0c72f92aacf1b43618d7986197d8209fadf0b"
+PV = "v1.0.0-rc4+git${SRCPV}"
+
+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" -not -path "*/.tool/*"); 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 += "runtime_spec_file_sysroot_preprocess"
+
+runtime_spec_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"
\ No newline at end of file
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb b/import-layers/meta-virtualization/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
new file mode 100644
index 0000000..4f77dce
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
@@ -0,0 +1,35 @@
+HOMEPAGE = "https://github.com/opencontainers/runtime-tools"
+SUMMARY = "oci-runtime-tool is a collection of tools for working with the OCI runtime specification"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b355a61a394a504dacde901c958f662c"
+
+SRC_URI = "git://github.com/opencontainers/runtime-tools.git"
+
+SRCREV = "038b0c99b82f3c08de31f6b09e693eb24644affd"
+PV = "0.0.1+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit goarch
+inherit go
+
+do_compile() {
+ export GOARCH="${TARGET_GOARCH}"
+ export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+ export GOPATH="${S}"
+
+ # Pass the needed cflags/ldflags so that cgo
+ # can find the needed headers files and libraries
+ export CGO_ENABLED="1"
+ export CFLAGS=""
+ export LDFLAGS=""
+ export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+
+ oe_runmake
+}
+
+do_install() {
+ install -d ${D}/${sbindir}
+ install ${S}/oci-runtime-tool ${D}/${sbindir}/oci-runtime-tool
+}
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-configure-drop-selinux-support.patch b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-configure-drop-selinux-support.patch
new file mode 100644
index 0000000..510126e
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-configure-drop-selinux-support.patch
@@ -0,0 +1,25 @@
+From 12c263703a0b0ae92566de7e5440fce7b59cd9be Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Tue, 8 Nov 2016 13:16:19 -0500
+Subject: [PATCH] configure: drop selinux support
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c1275acb253d..eaba7fbb57e2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -8,7 +8,6 @@ AC_USE_SYSTEM_EXTENSIONS
+ AC_SYS_LARGEFILE
+
+ PKG_CHECK_MODULES([YAJL], [yajl >= 2.0.0])
+-PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.0.0])
+ PKG_CHECK_MODULES([LIBMOUNT], [mount >= 2.23.0])
+
+ AC_MSG_CHECKING([whether to disable argument checking])
+--
+2.4.0.53.g8440f74
+
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch
new file mode 100644
index 0000000..507cd08
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook/0001-selinux-drop-selinux-support.patch
@@ -0,0 +1,40 @@
+From 9b66394c712ec0d0fcb2052baa7f590621a53461 Mon Sep 17 00:00:00 2001
+From: Bruce Ashfield <bruce.ashfield@windriver.com>
+Date: Tue, 8 Nov 2016 13:15:46 -0500
+Subject: [PATCH] selinux: drop selinux support
+
+Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
+---
+ src/systemdhook.c | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/src/systemdhook.c b/src/systemdhook.c
+index 274e5b910699..b9e8f1be376a 100644
+--- a/src/systemdhook.c
++++ b/src/systemdhook.c
+@@ -14,7 +14,6 @@
+ #include <errno.h>
+ #include <inttypes.h>
+ #include <linux/limits.h>
+-#include <selinux/selinux.h>
+ #include <yajl/yajl_tree.h>
+
+ #include "config.h"
+@@ -538,14 +537,6 @@ static int prestart(const char *rootfs,
+ }
+ }
+
+- if (strcmp("", mount_label)) {
+- rc = setfilecon(journal_dir, (security_context_t)mount_label);
+- if (rc < 0) {
+- pr_perror("Failed to set journal dir selinux context");
+- return -1;
+- }
+- }
+-
+ if (makepath(cont_journal_dir, 0755) == -1) {
+ if (errno != EEXIST) {
+ pr_perror("Failed to mkdir container journal dir: %s", cont_journal_dir);
+--
+2.4.0.53.g8440f74
+
diff --git a/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook_git.bb b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook_git.bb
new file mode 100644
index 0000000..872872a
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/oci-systemd-hook/oci-systemd-hook_git.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "OCI systemd hook enables users to run systemd in docker and OCI"
+SECTION = "console/utils"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d32239bcb673463ab874e80d47fae504"
+PRIORITY = "optional"
+
+DEPENDS = "yajl util-linux"
+
+SRCREV = "ca515c1f399bd0b16e94b7c34aa1ef20498beca6"
+SRC_URI = "git://github.com/projectatomic/oci-systemd-hook \
+ file://0001-selinux-drop-selinux-support.patch \
+ file://0001-configure-drop-selinux-support.patch \
+"
+
+PV = "0.0.1+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[selinux] = ",,libselinux"
+
+EXTRA_OECONF += "--libexecdir=${libexecdir}/oci/hooks.d"
+
+# nothing to compile, we do it all in the install task
+do_compile[noexec] = "1"
+
+do_install() {
+ # Avoid building docs, and other artifacts by surgically calling the
+ # semi-internal target of "install-exec-am"
+ oe_runmake 'DESTDIR=${D}' install-exec-am
+}
+
+FILES_${PN} += "${libexecdir}/oci/hooks.d/"
+
diff --git a/import-layers/meta-virtualization/recipes-containers/riddler/riddler_git.bb b/import-layers/meta-virtualization/recipes-containers/riddler/riddler_git.bb
new file mode 100644
index 0000000..ae6c5ec
--- /dev/null
+++ b/import-layers/meta-virtualization/recipes-containers/riddler/riddler_git.bb
@@ -0,0 +1,48 @@
+HOMEPAGE = "https://github.com/jfrazelle/riddler"
+SUMMARY = "Convert `docker inspect` to opencontainers (OCI compatible) runc spec."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=20ce4c6a4f32d6ee4a68e3a7506db3f1"
+
+SRC_URI = "git://github.com/jfrazelle/riddler;branch=master"
+SRCREV = "23befa0b232877b5b502b828e24161d801bd67f6"
+PV = "0.1.0+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+inherit goarch
+inherit go
+
+# This disables seccomp and apparmor, which are on by default in the
+# go package.
+EXTRA_OEMAKE="BUILDTAGS=''"
+
+do_compile() {
+ export GOARCH="${TARGET_GOARCH}"
+ export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
+ # Setup vendor directory so that it can be used in GOPATH.
+ #
+ # Go looks in a src directory under any directory in GOPATH but riddler
+ # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
+ #
+ # We also need to link in the ipallocator directory as that is not under
+ # a src directory.
+ ln -sfn . "${S}/vendor/src"
+ mkdir -p "${S}/vendor/src/github.com/jessfraz/riddler"
+ ln -sfn "${S}/parse" "${S}/vendor/src/github.com/jessfraz/riddler/parse"
+ export GOPATH="${S}/vendor"
+
+ # Pass the needed cflags/ldflags so that cgo
+ # can find the needed headers files and libraries
+ export CGO_ENABLED="1"
+ export CFLAGS=""
+ export LDFLAGS=""
+ export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+ export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
+
+ oe_runmake static
+}
+
+do_install() {
+ install -d ${D}/${sbindir}
+ install ${S}/riddler ${D}/${sbindir}/riddler
+}
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