diff options
| author | Jason Wessel <jason.wessel@windriver.com> | 2017-09-13 12:39:46 -0700 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-09-14 09:49:00 -0400 |
| commit | 01a8d4537012ad93dc8510e9b762acdc8c4536c7 (patch) | |
| tree | 8b22ba0333f7a8c83193bee31b33a3b307f1164a /recipes-containers/oci-image-tools | |
| parent | 718592922bd64da4d609c96e831f6aba05e44a8d (diff) | |
| download | meta-virtualization-01a8d4537012ad93dc8510e9b762acdc8c4536c7.tar.gz | |
nets, docker, runc, oci-*tools: go.bbclass compile fixes
Recently in the oe-core the go.bbclass changed and requires the
defition of the GO_IMPORT variable. This was intended to simplify how
the compilation works with go packages and it is still a work in
progress.
This patch set makes the recipes compatible to generate the same end
result as before using the new go.bbclass from oe-core.
Any patches that were included in the recipes had to have the paths
adjusted because the new go.bbclass manipulates the notion of S to be
S + "src" + "$GO_IMPORT" internally for the purpose of unpack, patch
and compile.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-containers/oci-image-tools')
3 files changed, 12 insertions, 12 deletions
diff --git a/recipes-containers/oci-image-tools/files/0001-image-manifest-Recursively-remove-pre-existing-entri.patch b/recipes-containers/oci-image-tools/files/0001-image-manifest-Recursively-remove-pre-existing-entri.patch index d2cacc2e..5594f976 100644 --- a/recipes-containers/oci-image-tools/files/0001-image-manifest-Recursively-remove-pre-existing-entri.patch +++ b/recipes-containers/oci-image-tools/files/0001-image-manifest-Recursively-remove-pre-existing-entri.patch | |||
| @@ -40,8 +40,8 @@ Signed-off-by: W. Trevor King <wking@tremily.us> | |||
| 40 | 40 | ||
| 41 | diff --git a/image/manifest.go b/image/manifest.go | 41 | diff --git a/image/manifest.go b/image/manifest.go |
| 42 | index 8834c1e5f2f0..144bd4f62219 100644 | 42 | index 8834c1e5f2f0..144bd4f62219 100644 |
| 43 | --- a/image/manifest.go | 43 | --- a/src/import/image/manifest.go |
| 44 | +++ b/image/manifest.go | 44 | +++ b/src/import/image/manifest.go |
| 45 | @@ -253,11 +253,27 @@ loop: | 45 | @@ -253,11 +253,27 @@ loop: |
| 46 | continue loop | 46 | continue loop |
| 47 | } | 47 | } |
diff --git a/recipes-containers/oci-image-tools/files/0002-image-manifest-Split-unpackLayerEntry-into-its-own-f.patch b/recipes-containers/oci-image-tools/files/0002-image-manifest-Split-unpackLayerEntry-into-its-own-f.patch index 9cf513ec..69bdcdb5 100644 --- a/recipes-containers/oci-image-tools/files/0002-image-manifest-Split-unpackLayerEntry-into-its-own-f.patch +++ b/recipes-containers/oci-image-tools/files/0002-image-manifest-Split-unpackLayerEntry-into-its-own-f.patch | |||
| @@ -18,8 +18,8 @@ Signed-off-by: W. Trevor King <wking@tremily.us> | |||
| 18 | 18 | ||
| 19 | diff --git a/image/manifest.go b/image/manifest.go | 19 | diff --git a/image/manifest.go b/image/manifest.go |
| 20 | index 144bd4f62219..dfd5a83f70e4 100644 | 20 | index 144bd4f62219..dfd5a83f70e4 100644 |
| 21 | --- a/image/manifest.go | 21 | --- a/src/import/image/manifest.go |
| 22 | +++ b/image/manifest.go | 22 | +++ b/src/import/image/manifest.go |
| 23 | @@ -218,116 +218,131 @@ loop: | 23 | @@ -218,116 +218,131 @@ loop: |
| 24 | return errors.Wrapf(err, "error advancing tar stream") | 24 | return errors.Wrapf(err, "error advancing tar stream") |
| 25 | } | 25 | } |
diff --git a/recipes-containers/oci-image-tools/oci-image-tools_git.bb b/recipes-containers/oci-image-tools/oci-image-tools_git.bb index 8d48eba3..30179608 100644 --- a/recipes-containers/oci-image-tools/oci-image-tools_git.bb +++ b/recipes-containers/oci-image-tools/oci-image-tools_git.bb | |||
| @@ -18,8 +18,7 @@ SRC_URI = "git://github.com/opencontainers/image-tools.git \ | |||
| 18 | 18 | ||
| 19 | SRCREV = "4abe1a166f9be97e8e71b1bb4d7599cc29323011" | 19 | SRCREV = "4abe1a166f9be97e8e71b1bb4d7599cc29323011" |
| 20 | PV = "0.2.0-dev+git${SRCPV}" | 20 | PV = "0.2.0-dev+git${SRCPV}" |
| 21 | 21 | GO_IMPORT = "import" | |
| 22 | S = "${WORKDIR}/git" | ||
| 23 | 22 | ||
| 24 | inherit goarch | 23 | inherit goarch |
| 25 | inherit go | 24 | inherit go |
| @@ -38,11 +37,11 @@ do_compile() { | |||
| 38 | # | 37 | # |
| 39 | # We also need to link in the ipallocator directory as that is not under | 38 | # We also need to link in the ipallocator directory as that is not under |
| 40 | # a src directory. | 39 | # a src directory. |
| 41 | ln -sfn . "${S}/vendor/src" | 40 | ln -sfn . "${S}/src/import/vendor/src" |
| 42 | mkdir -p "${S}/vendor/src/github.com/opencontainers/image-tools/" | 41 | mkdir -p "${S}/src/import/vendor/src/github.com/opencontainers/image-tools/" |
| 43 | ln -sfn "${S}/image" "${S}/vendor/src/github.com/opencontainers/image-tools/image" | 42 | ln -sfn "${S}/src/import/image" "${S}/src/import/vendor/src/github.com/opencontainers/image-tools/image" |
| 44 | ln -sfn "${S}/version" "${S}/vendor/src/github.com/opencontainers/image-tools/version" | 43 | ln -sfn "${S}/src/import/version" "${S}/src/import/vendor/src/github.com/opencontainers/image-tools/version" |
| 45 | export GOPATH="${S}/vendor" | 44 | export GOPATH="${S}/src/import/vendor" |
| 46 | 45 | ||
| 47 | # Pass the needed cflags/ldflags so that cgo | 46 | # Pass the needed cflags/ldflags so that cgo |
| 48 | # can find the needed headers files and libraries | 47 | # can find the needed headers files and libraries |
| @@ -51,13 +50,14 @@ do_compile() { | |||
| 51 | export LDFLAGS="" | 50 | export LDFLAGS="" |
| 52 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | 51 | export CGO_CFLAGS="${BUILDSDK_CFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 53 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | 52 | export CGO_LDFLAGS="${BUILDSDK_LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" |
| 53 | cd ${S}/src/import | ||
| 54 | 54 | ||
| 55 | oe_runmake tool | 55 | oe_runmake tool |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | do_install() { | 58 | do_install() { |
| 59 | install -d ${D}/${sbindir} | 59 | install -d ${D}/${sbindir} |
| 60 | install ${S}/oci-image-tool ${D}/${sbindir}/ | 60 | install ${S}/src/import/oci-image-tool ${D}/${sbindir}/ |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | INSANE_SKIP_${PN} += "ldflags" | 63 | INSANE_SKIP_${PN} += "ldflags" |
