summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-containers/oci-image-tools/files/0001-config-make-Config.User-mapping-errors-a-warning.patch6
-rw-r--r--recipes-containers/oci-image-tools/files/0001-tool-respect-GO-and-GOBUILDFLAGS-when-building.patch6
-rw-r--r--recipes-containers/oci-image-tools/oci-image-tools_git.bb23
3 files changed, 13 insertions, 22 deletions
diff --git a/recipes-containers/oci-image-tools/files/0001-config-make-Config.User-mapping-errors-a-warning.patch b/recipes-containers/oci-image-tools/files/0001-config-make-Config.User-mapping-errors-a-warning.patch
index 78d2b9d0..b61d4f49 100644
--- a/recipes-containers/oci-image-tools/files/0001-config-make-Config.User-mapping-errors-a-warning.patch
+++ b/recipes-containers/oci-image-tools/files/0001-config-make-Config.User-mapping-errors-a-warning.patch
@@ -12,10 +12,10 @@ Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
12 image/config.go | 2 +- 12 image/config.go | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-) 13 1 file changed, 1 insertion(+), 1 deletion(-)
14 14
15diff --git a/src/import/image/config.go b/src/import/image/config.go 15diff --git a/image/config.go b/image/config.go
16index d28b1bc4fe5f..37dfd1f14ef7 100644 16index d28b1bc4fe5f..37dfd1f14ef7 100644
17--- a/src/import/image/config.go 17--- a/image/config.go
18+++ b/src/import/image/config.go 18+++ b/image/config.go
19@@ -106,7 +106,7 @@ func (c *config) runtimeSpec(rootfs string) (*specs.Spec, error) { 19@@ -106,7 +106,7 @@ func (c *config) runtimeSpec(rootfs string) (*specs.Spec, error) {
20 s.Process.User.UID = uint32(uid) 20 s.Process.User.UID = uint32(uid)
21 s.Process.User.GID = uint32(gid) 21 s.Process.User.GID = uint32(gid)
diff --git a/recipes-containers/oci-image-tools/files/0001-tool-respect-GO-and-GOBUILDFLAGS-when-building.patch b/recipes-containers/oci-image-tools/files/0001-tool-respect-GO-and-GOBUILDFLAGS-when-building.patch
index 7e0b2a11..65c2929a 100644
--- a/recipes-containers/oci-image-tools/files/0001-tool-respect-GO-and-GOBUILDFLAGS-when-building.patch
+++ b/recipes-containers/oci-image-tools/files/0001-tool-respect-GO-and-GOBUILDFLAGS-when-building.patch
@@ -13,10 +13,10 @@ Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
13 Makefile | 2 +- 13 Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-) 14 1 file changed, 1 insertion(+), 1 deletion(-)
15 15
16diff --git a/src/import/Makefile b/src/import/Makefile 16diff --git a/Makefile b/Makefile
17index bacb341..1bfe021 100644 17index bacb341..1bfe021 100644
18--- a/src/import/Makefile 18--- a/Makefile
19+++ b/src/import/Makefile 19+++ b/Makefile
20@@ -27,7 +27,7 @@ check-license: 20@@ -27,7 +27,7 @@ check-license:
21 21
22 .PHONY: tool 22 .PHONY: tool
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 e0b27163..4beb3a63 100644
--- a/recipes-containers/oci-image-tools/oci-image-tools_git.bb
+++ b/recipes-containers/oci-image-tools/oci-image-tools_git.bb
@@ -1,7 +1,7 @@
1HOMEPAGE = "https://github.com/opencontainers/image-tools" 1HOMEPAGE = "https://github.com/opencontainers/image-tools"
2SUMMARY = "A collection of tools for working with the OCI image format specification" 2SUMMARY = "A collection of tools for working with the OCI image format specification"
3LICENSE = "Apache-2.0" 3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
5 5
6DEPENDS = "\ 6DEPENDS = "\
7 oci-image-spec \ 7 oci-image-spec \
@@ -12,7 +12,7 @@ DEPENDS = "\
12 spf13-pflag \ 12 spf13-pflag \
13 " 13 "
14 14
15SRC_URI = "git://github.com/opencontainers/image-tools.git;branch=master;protocol=https \ 15SRC_URI = "git://github.com/opencontainers/image-tools.git;branch=master;protocol=https;destsuffix=git/src/github.com/opencontainers/image-tools \
16 file://0001-config-make-Config.User-mapping-errors-a-warning.patch \ 16 file://0001-config-make-Config.User-mapping-errors-a-warning.patch \
17 file://0001-tool-respect-GO-and-GOBUILDFLAGS-when-building.patch" 17 file://0001-tool-respect-GO-and-GOBUILDFLAGS-when-building.patch"
18 18
@@ -27,21 +27,12 @@ inherit go
27# go package. 27# go package.
28EXTRA_OEMAKE="BUILDTAGS=''" 28EXTRA_OEMAKE="BUILDTAGS=''"
29 29
30S = "${WORKDIR}/git/src/github.com/opencontainers/image-tools"
31
30do_compile() { 32do_compile() {
31 export GOARCH="${TARGET_GOARCH}" 33 export GOARCH="${TARGET_GOARCH}"
32 export GOROOT="${STAGING_LIBDIR}/go" 34 export GOROOT="${STAGING_LIBDIR}/go"
33 # Setup vendor directory so that it can be used in GOPATH. 35 export GOPATH="${WORKDIR}/git/"
34 #
35 # Go looks in a src directory under any directory in GOPATH but riddler
36 # uses 'vendor' instead of 'vendor/src'. We can fix this with a symlink.
37 #
38 # We also need to link in the ipallocator directory as that is not under
39 # a src directory.
40 ln -sfn . "${S}/src/import/vendor/src"
41 mkdir -p "${S}/src/import/vendor/src/github.com/opencontainers/image-tools/"
42 ln -sfn "${S}/src/import/image" "${S}/src/import/vendor/src/github.com/opencontainers/image-tools/image"
43 ln -sfn "${S}/src/import/version" "${S}/src/import/vendor/src/github.com/opencontainers/image-tools/version"
44 export GOPATH="${S}/src/import/vendor"
45 36
46 # Pass the needed cflags/ldflags so that cgo 37 # Pass the needed cflags/ldflags so that cgo
47 # can find the needed headers files and libraries 38 # can find the needed headers files and libraries
@@ -54,14 +45,14 @@ do_compile() {
54 45
55 export GOBUILDFLAGS="-trimpath" 46 export GOBUILDFLAGS="-trimpath"
56 47
57 cd ${S}/src/import 48 cd ${S}
58 49
59 oe_runmake tool 50 oe_runmake tool
60} 51}
61 52
62do_install() { 53do_install() {
63 install -d ${D}/${sbindir} 54 install -d ${D}/${sbindir}
64 install ${S}/src/import/oci-image-tool ${D}/${sbindir}/ 55 install ${S}/oci-image-tool ${D}/${sbindir}/
65} 56}
66 57
67INSANE_SKIP:${PN} += "ldflags textrel" 58INSANE_SKIP:${PN} += "ldflags textrel"