[yocto] [PATCH][meta-virtualization] oci-image-tools: fix do package qa warning

changqing.li at windriver.com changqing.li at windriver.com
Sat Sep 29 02:26:20 PDT 2018


From: Changqing Li <changqing.li at windriver.com>

fix below warning:
do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/oci-image-tool'
has relocations in .text [textrel]

Add GOBUILDFLAGS which have -buildmode=pie to fix the problem

Signed-off-by: Changqing Li <changqing.li at windriver.com>
---
 .../files/0001-fix-do_package_qa-error.patch       | 32 ++++++++++++++++++++++
 .../oci-image-tools/oci-image-tools_git.bb         |  4 ++-
 2 files changed, 35 insertions(+), 1 deletion(-)
 create mode 100644 recipes-containers/oci-image-tools/files/0001-fix-do_package_qa-error.patch

diff --git a/recipes-containers/oci-image-tools/files/0001-fix-do_package_qa-error.patch b/recipes-containers/oci-image-tools/files/0001-fix-do_package_qa-error.patch
new file mode 100644
index 0000000..4b3efc2
--- /dev/null
+++ b/recipes-containers/oci-image-tools/files/0001-fix-do_package_qa-error.patch
@@ -0,0 +1,32 @@
+From 981e2582128911d0b131cb47aeb88005b04b38fe Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li at windriver.com>
+Date: Thu, 27 Sep 2018 12:54:42 +0800
+Subject: [PATCH] fix do_package_qa error
+
+fix below error:
+do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/oci-image-tool' 
+has relocations in .text [textrel]
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Changqing Li <changqing.li at windriver.com>
+---
+ src/import/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/import/Makefile b/src/import/Makefile
+index 61d7a80..7e641e9 100644
+--- a/src/import/Makefile
++++ b/src/import/Makefile
+@@ -29,7 +29,7 @@ check-license:
+ 
+ .PHONY: tool
+ tool:
+-	go build -ldflags "-X main.gitCommit=${COMMIT}" -o oci-image-tool ./cmd/oci-image-tool
++	go build -ldflags "-X main.gitCommit=${COMMIT}" ${GOBUILDFLAGS} -o oci-image-tool ./cmd/oci-image-tool
+ 
+ 
+ all: tool man
+-- 
+2.7.4
+
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 807ee26..ad7c5e9 100644
--- a/recipes-containers/oci-image-tools/oci-image-tools_git.bb
+++ b/recipes-containers/oci-image-tools/oci-image-tools_git.bb
@@ -15,7 +15,9 @@ DEPENDS = "\
 SRC_URI = "git://github.com/opencontainers/image-tools.git \
            file://0001-image-manifest-Recursively-remove-pre-existing-entri.patch \
            file://0002-image-manifest-Split-unpackLayerEntry-into-its-own-f.patch \
-           file://0001-config-make-Config.User-mapping-errors-a-warning.patch"
+           file://0001-config-make-Config.User-mapping-errors-a-warning.patch \
+           file://0001-fix-do_package_qa-error.patch \
+"
 
 SRCREV = "4abe1a166f9be97e8e71b1bb4d7599cc29323011"
 PV = "0.2.0-dev+git${SRCPV}"
-- 
2.7.4



More information about the yocto mailing list