diff options
| -rw-r--r-- | recipes-containers/oci-image-tools/files/0001-tool-respect-GO-and-GOBUILDFLAGS-when-building.patch | 31 | ||||
| -rw-r--r-- | recipes-containers/oci-image-tools/oci-image-tools_git.bb | 5 |
2 files changed, 34 insertions, 2 deletions
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 new file mode 100644 index 00000000..7e0b2a11 --- /dev/null +++ b/recipes-containers/oci-image-tools/files/0001-tool-respect-GO-and-GOBUILDFLAGS-when-building.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From 7e6bfc9657f9fd83c170d5bf3721d54bf9e88074 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 3 | Date: Sun, 13 Oct 2019 15:35:08 -0400 | ||
| 4 | Subject: [PATCH] tool: respect GO and GOBUILDFLAGS when building | ||
| 5 | |||
| 6 | Ensure that the building of the tools respect the go compiler and | ||
| 7 | build flags from our environemnt. Otherwise, we'll use the host | ||
| 8 | settings for each and end up with a binary that cannot be run on | ||
| 9 | the target. | ||
| 10 | |||
| 11 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 12 | --- | ||
| 13 | Makefile | 2 +- | ||
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/src/import/Makefile b/src/import/Makefile | ||
| 17 | index bacb341..1bfe021 100644 | ||
| 18 | --- a/src/import/Makefile | ||
| 19 | +++ b/src/import/Makefile | ||
| 20 | @@ -27,7 +27,7 @@ check-license: | ||
| 21 | |||
| 22 | .PHONY: tool | ||
| 23 | tool: | ||
| 24 | - go build -ldflags "-X main.gitCommit=${COMMIT}" -o oci-image-tool ./cmd/oci-image-tool | ||
| 25 | + $(GO) build $(GOBUILDFLAGS) $(EXTRA_FLAGS) -ldflags "-X main.gitCommit=${COMMIT}" -o oci-image-tool ./cmd/oci-image-tool | ||
| 26 | |||
| 27 | |||
| 28 | all: tool man | ||
| 29 | -- | ||
| 30 | 2.19.1 | ||
| 31 | |||
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 a1ea9408..676f3cc4 100644 --- a/recipes-containers/oci-image-tools/oci-image-tools_git.bb +++ b/recipes-containers/oci-image-tools/oci-image-tools_git.bb | |||
| @@ -13,9 +13,10 @@ DEPENDS = "\ | |||
| 13 | " | 13 | " |
| 14 | 14 | ||
| 15 | SRC_URI = "git://github.com/opencontainers/image-tools.git \ | 15 | SRC_URI = "git://github.com/opencontainers/image-tools.git \ |
| 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 | 18 | ||
| 18 | SRCREV = "e324098b70c87495404be6f341be459d2dfde64e" | 19 | SRCREV = "93db3b16e6738bf9b8bee47d86ac93be5340838b" |
| 19 | PV = "0.2.0-dev+git${SRCPV}" | 20 | PV = "0.2.0-dev+git${SRCPV}" |
| 20 | GO_IMPORT = "import" | 21 | GO_IMPORT = "import" |
| 21 | 22 | ||
