diff options
Diffstat (limited to 'recipes-containers/docker/docker.inc')
-rw-r--r-- | recipes-containers/docker/docker.inc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/recipes-containers/docker/docker.inc b/recipes-containers/docker/docker.inc index 48f7d3ec..05a14f97 100644 --- a/recipes-containers/docker/docker.inc +++ b/recipes-containers/docker/docker.inc | |||
@@ -36,17 +36,21 @@ GO_IMPORT = "import" | |||
36 | S = "${WORKDIR}/git" | 36 | S = "${WORKDIR}/git" |
37 | 37 | ||
38 | 38 | ||
39 | |||
39 | inherit systemd update-rc.d | 40 | inherit systemd update-rc.d |
40 | inherit go | 41 | inherit go |
41 | inherit goarch | 42 | inherit goarch |
42 | inherit pkgconfig | 43 | inherit pkgconfig |
43 | 44 | ||
45 | REQUIRED_DISTRO_FEATURES ?= "seccomp ipv6" | ||
46 | inherit features_check | ||
47 | |||
44 | do_configure[noexec] = "1" | 48 | do_configure[noexec] = "1" |
45 | 49 | ||
46 | # Export for possible use in Makefiles, default value comes from go.bbclass | 50 | # Export for possible use in Makefiles, default value comes from go.bbclass |
47 | export GO_LINKSHARED | 51 | export GO_LINKSHARED |
48 | 52 | ||
49 | DOCKER_PKG="github.com/docker/docker" | 53 | DOCKER_PKG = "github.com/docker/docker" |
50 | # in order to exclude devicemapper and btrfs - https://github.com/docker/docker/issues/14056 | 54 | # in order to exclude devicemapper and btrfs - https://github.com/docker/docker/issues/14056 |
51 | BUILD_TAGS ?= "exclude_graphdriver_btrfs exclude_graphdriver_devicemapper" | 55 | BUILD_TAGS ?= "exclude_graphdriver_btrfs exclude_graphdriver_devicemapper" |
52 | 56 | ||
@@ -60,8 +64,7 @@ do_compile() { | |||
60 | ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" | 64 | ln -sf ../../../.. .gopath/src/"${DOCKER_PKG}" |
61 | 65 | ||
62 | mkdir -p .gopath/src/github.com/docker | 66 | mkdir -p .gopath/src/github.com/docker |
63 | ln -sf ${WORKDIR}/git/libnetwork .gopath/src/github.com/docker/libnetwork | 67 | ln -sf ${S}/cli .gopath/src/github.com/docker/cli |
64 | ln -sf ${WORKDIR}/git/cli .gopath/src/github.com/docker/cli | ||
65 | 68 | ||
66 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor" | 69 | export GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor" |
67 | export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" | 70 | export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" |
@@ -90,17 +93,13 @@ do_compile() { | |||
90 | export LDFLAGS="" | 93 | export LDFLAGS="" |
91 | export DOCKER_VERSION=${DOCKER_VERSION} | 94 | export DOCKER_VERSION=${DOCKER_VERSION} |
92 | VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${DOCKER_COMMIT}" make dynbinary | 95 | VERSION="${DOCKER_VERSION}" DOCKER_GITCOMMIT="${DOCKER_COMMIT}" make dynbinary |
93 | |||
94 | # build the proxy | ||
95 | cd ${S}/src/import/.gopath/src/github.com/docker/libnetwork | ||
96 | oe_runmake cross-local | ||
97 | } | 96 | } |
98 | 97 | ||
99 | do_install() { | 98 | do_install() { |
100 | mkdir -p ${D}/${bindir} | 99 | mkdir -p ${D}/${bindir} |
101 | cp ${WORKDIR}/git/cli/build/docker ${D}/${bindir}/docker | 100 | cp ${S}/cli/build/docker ${D}/${bindir}/docker |
102 | cp ${S}/src/import/bundles/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd | 101 | cp ${S}/src/import/bundles/dynbinary-daemon/dockerd ${D}/${bindir}/dockerd |
103 | cp ${WORKDIR}/git/libnetwork/bin/docker-proxy* ${D}/${bindir}/docker-proxy | 102 | cp ${S}/src/import/bundles/dynbinary-daemon/docker-proxy ${D}/${bindir}/docker-proxy |
104 | 103 | ||
105 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 104 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
106 | install -d ${D}${systemd_unitdir}/system | 105 | install -d ${D}${systemd_unitdir}/system |
@@ -110,7 +109,7 @@ do_install() { | |||
110 | rm -f ${D}/${systemd_unitdir}/system/docker.service.rpm | 109 | rm -f ${D}/${systemd_unitdir}/system/docker.service.rpm |
111 | else | 110 | else |
112 | install -d ${D}${sysconfdir}/init.d | 111 | install -d ${D}${sysconfdir}/init.d |
113 | install -m 0755 ${WORKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init | 112 | install -m 0755 ${UNPACKDIR}/docker.init ${D}${sysconfdir}/init.d/docker.init |
114 | fi | 113 | fi |
115 | # TLS key that docker creates at run-time if not found is what resides here | 114 | # TLS key that docker creates at run-time if not found is what resides here |
116 | if ${@bb.utils.contains('PACKAGECONFIG','transient-config','true','false',d)}; then | 115 | if ${@bb.utils.contains('PACKAGECONFIG','transient-config','true','false',d)}; then |
@@ -126,7 +125,7 @@ do_install() { | |||
126 | 125 | ||
127 | 126 | ||
128 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" | 127 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" |
129 | SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.socket','',d)}" | 128 | SYSTEMD_SERVICE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','docker.service docker.socket','',d)}" |
130 | SYSTEMD_AUTO_ENABLE:${PN} = "enable" | 129 | SYSTEMD_AUTO_ENABLE:${PN} = "enable" |
131 | 130 | ||
132 | # inverted logic warning. We ony want the sysvinit init to be installed if systemd | 131 | # inverted logic warning. We ony want the sysvinit init to be installed if systemd |