Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id E3082E00ABE; Sat, 29 Sep 2018 02:26:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [147.11.146.13 listed in list.dnswl.org] Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 1E488E00ABE for ; Sat, 29 Sep 2018 02:26:45 -0700 (PDT) Received: from ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id w8T9Qj8Q004533 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL) for ; Sat, 29 Sep 2018 02:26:45 -0700 (PDT) Received: from pek-lpg-core2.corp.ad.wrs.com (128.224.153.41) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.408.0; Sat, 29 Sep 2018 02:26:45 -0700 From: To: Date: Sat, 29 Sep 2018 17:26:20 +0800 Message-ID: <1538213181-18700-3-git-send-email-changqing.li@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538213181-18700-1-git-send-email-changqing.li@windriver.com> References: <1538213181-18700-1-git-send-email-changqing.li@windriver.com> MIME-Version: 1.0 Subject: [PATCH][meta-virtualization] oci-image-tools: fix do package qa warning X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2018 09:26:50 -0000 Content-Type: text/plain From: Changqing Li 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 --- .../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 +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 +--- + 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