docker-distribution: fix do package qa warning
PATCH 1/1 docker-distribution: fix do package qa warning
From: Changqing Li <[email protected]>
fix below warning:
1.do_package_qa: QA Issue: No GNU_HASH in the elf binary: xxx/usr/sbin/registry' [ldflags] 2.do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry'
has relocations in .text [textrel]
Add GOBUILDFLAGS which have -buildmode=pie to fix the second problem
--- .../docker-distribution/docker-distribution_git.bb | 3 +- .../files/0001-fix-do_package_qa-error.patch | 32 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
recipes-containers/docker-distribution/docker-distribution_git.bb +2 -1
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314" SRCREV_distribution="48294d928ced5dd9b378f7fd7c6f5da3ff3f2c89" SRC_URI = "git://github.com/docker/distribution.git;branch=release/2.6;name=distribution;destsuffix=git/src/github.com/docker/distribution \ file://docker-registry.service \ + file://0001-fix-do_package_qa-error.patch \ " PACKAGES =+ "docker-registry"
@@ -57,7 +58,7 @@ do_install() { } INSANE_SKIP_${PN} += "ldflags already-stripped" -INSANE_SKIP_docker-registry += "ldflags already-stripped" +INSANE_SKIP_${MLPREFIX}docker-registry += "ldflags already-stripped" FILES_docker-registry = "${sbindir}/*" FILES_docker-registry += "${systemd_unitdir}/system/docker-registry.service"
recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 4b9d701fabff8e7969db081406d00fa9fe46b3fd Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +Date: Thu, 27 Sep 2018 11:05:51 +0800 +Subject: [PATCH] fix do_package_qa error + +fix below error: +do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry' +has relocations in .text [textrel] + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Changqing Li <[email protected]> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 47b8f1d..13b0f92 100644 +--- a/Makefile ++++ b/Makefile +@@ -39,7 +39,7 @@ GODEP=$(shell which godep || echo '') + + ${PREFIX}/bin/registry: $(GOFILES) + @echo "+ $@" +- @go build -tags "${DOCKER_BUILDTAGS}" -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/registry ++ @go build -tags "${DOCKER_BUILDTAGS}" -o $@ ${GO_LDFLAGS} ${GOBUILDFLAGS} ${GO_GCFLAGS} ./cmd/registry + + ${PREFIX}/bin/digest: $(GOFILES) + @echo "+ $@" +-- +2.7.4 +
Signature · 1 line
2.7.4
PATCH 1/1 docker: fix package qa warning
From: Changqing Li <[email protected]>
fix below warning:do_package_qa: QA Issue: ELF binary 'xxx/usr/bin/docker' has relocations in .text [textrel]
--- recipes-containers/docker/docker_git.bb | 1 + .../files/0001-fix-do_package_qa-error.patch | 31 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 recipes-containers/docker/files/0001-fix-do_package_qa-error.patch
recipes-containers/docker/docker_git.bb +1 -0
@@ -28,6 +28,7 @@ SRC_URI = "\ file://docker.init \ file://hi.Dockerfile \ file://0001-libnetwork-use-GO-instead-of-go.patch \ + file://0001-fix-do_package_qa-error.patch \ " # Apache-2.0 for docker
recipes-containers/docker/files/0001-fix-do_package_qa-error.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 56c865e2a7269d63f0780b4cd1ed6fdb18e3ff1b Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +Date: Wed, 26 Sep 2018 17:41:59 +0800 +Subject: [PATCH] fix do_package_qa error + +fix below error: +do_package_qa: QA Issue: ELF binary 'xxx/usr/bin/docker' +has relocations in .text [textrel] + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Changqing Li <[email protected]> +--- + cli/scripts/build/dynbinary | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cli/scripts/build/dynbinary b/cli/scripts/build/dynbinary +index 3c32ed3..938e086 100755 +--- a/cli/scripts/build/dynbinary ++++ b/cli/scripts/build/dynbinary +@@ -9,6 +9,6 @@ source ./scripts/build/.variables + + echo "Building dynamically linked $TARGET" + export CGO_ENABLED=1 +-go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" "${SOURCE}" ++go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}" + + ln -sf "$(basename "${TARGET}")" build/docker +-- +2.7.4 +
Signature · 1 line
2.7.4
Re: [PATCH][meta-virtualization] docker: fix package qa warning
Quoted 47 lines · On 2018-09-29 5:26 AM, [email protected] wrote:
From: Changqing Li <[email protected]>
fix below warning:
do_package_qa: QA Issue: ELF binary 'xxx/usr/bin/docker' has relocations in .text [textrel]Signed-off-by Changqing Li <[email protected]>--- recipes-containers/docker/docker_git.bb | 1 + .../files/0001-fix-do_package_qa-error.patch | 31 ++++++++++++++++++++++ 2 files changed, 32 insertions(+)create mode 100644
recipes-containers/docker/files/0001-fix-do_package_qa-error.patchrecipes-containers/docker/docker_git.bb +1
-0@@ -28,6 +28,7 @@ SRC_URI = "\ file://docker.init \ file://hi.Dockerfile \ file://0001-libnetwork-use-GO-instead-of-go.patch \ + file://0001-fix-do_package_qa-error.patch \ " # Apache-2.0 for dockerrecipes-containers/docker/files/0001-fix-do_package_qa-error.patch new file +16
-0@@ -0,0 +1,31 @@ +From 56c865e2a7269d63f0780b4cd1ed6fdb18e3ff1b Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +Date: Wed, 26 Sep 2018 17:41:59 +0800 +Subject: [PATCH] fix do_package_qa error + +fix below error: +do_package_qa: QA Issue: ELF binary 'xxx/usr/bin/docker' +has relocations in .text [textrel] + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Changqing Li <[email protected]> +--- + cli/scripts/build/dynbinary | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +
recipes-containers/docker/files/0001-fix-do_package_qa-error.patch line 26
Quoted 10 lines
recipes-containers/docker/files/0001-fix-do_package_qa-error.patch new file +10
-0+diff --git a/cli/scripts/build/dynbinary b/cli/scripts/build/dynbinary +index 3c32ed3..938e086 100755 +--- a/cli/scripts/build/dynbinary ++++ b/cli/scripts/build/dynbinary +@@ -9,6 +9,6 @@ source ./scripts/build/.variables + + echo "Building dynamically linked $TARGET" + export CGO_ENABLED=1 +-go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" "${SOURCE}" ++go build -o "${TARGET}" -tags pkcs11 --ldflags "${LDFLAGS}" -buildmode=pie "${SOURCE}"
This should be conditional. I'm not seeing these warnings/errors on any of my builds, so clearly you have a different configuration.
Bruce
Quoted 6 lines
recipes-containers/docker/files/0001-fix-do_package_qa-error.patch new file +5
-0+ + ln -sf "$(basename "${TARGET}")" build/docker +-- +2.7.4 +
PATCH 1/1 oci-image-tools: fix do package qa warning
In reply to [email protected]From: Changqing Li <[email protected]>
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
--- .../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
recipes-containers/oci-image-tools/files/0001-fix-do_package_qa-error.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 981e2582128911d0b131cb47aeb88005b04b38fe Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +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 <[email protected]> +--- + 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 +
recipes-containers/oci-image-tools/oci-image-tools_git.bb +3 -1
@@ -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}"
Signature · 1 line
2.7.4
PATCH 1/1 oci-runtime-tools: fix do package qa warning
In reply to [email protected]From: Changqing Li <[email protected]>
fix below warning:do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/oci-runtime-tool' has relocations in .text [textrel]
Add GOBUILDFLAGS which have -buildmode=pie to fix the problem
--- .../files/0001-fix-do_package_qa-error.patch | 32 ++++++++++++++++++++++ .../oci-runtime-tools/oci-runtime-tools_git.bb | 1 + 2 files changed, 33 insertions(+) create mode 100644 recipes-containers/oci-runtime-tools/files/0001-fix-do_package_qa-error.patch
recipes-containers/oci-runtime-tools/files/0001-fix-do_package_qa-error.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 7de9fd7db7a001b66d92d5e80806e50bb5252392 Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +Date: Thu, 27 Sep 2018 12:50:32 +0800 +Subject: [PATCH] fix do_package_qa error + +fix below error: +do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/oci-runtime-tool' +has relocations in .text [textrel] + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Changqing Li <[email protected]> +--- + src/import/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/import/Makefile b/src/import/Makefile +index 77626d2..b97f6ec 100644 +--- a/src/import/Makefile ++++ b/src/import/Makefile +@@ -8,7 +8,7 @@ COMMIT=$(shell git rev-parse HEAD 2> /dev/null || true) + all: tool runtimetest + + tool: +- go build -tags "$(BUILDTAGS)" -ldflags "-X main.gitCommit=${COMMIT}" -o oci-runtime-tool ./cmd/oci-runtime-tool ++ go build -tags "$(BUILDTAGS)" -ldflags "-X main.gitCommit=${COMMIT}" ${GOBUILDFLAGS} -o oci-runtime-tool ./cmd/oci-runtime-tool + + .PHONY: runtimetest + runtimetest: +-- +2.7.4 +
recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb +1 -0
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=b355a61a394a504dacde901c958f66 SRC_URI = "git://github.com/opencontainers/runtime-tools.git \ file://0001-Revert-implement-add-set-function-for-hooks-items.patch \ + file://0001-fix-do_package_qa-error.patch \ " SRCREV = "6e7da8148f4de2c9e9c9d3b345576898d4f412cb"
Signature · 1 line
2.7.4
These are all to the wrong mailing list, please resend them to the meta-virtualization list.
Quoted 7 lines · On 2018-09-29 5:26 AM, [email protected] wrote:
From: Changqing Li <[email protected]>
fix below warning:
1.do_package_qa: QA Issue: No
GNU_HASHin the elf binary: xxx/usr/sbin/registry' [ldflags] 2.do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry'
has relocations in .text [textrel]
These need to be 2 separate patches on the resend.
Bruce
Quoted 70 lines
Add GOBUILDFLAGS which have -buildmode=pie to fix the second problem
Signed-off-by Changqing Li <[email protected]>--- .../docker-distribution/docker-distribution_git.bb | 3 +- .../files/0001-fix-do_package_qa-error.patch | 32 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-)create mode 100644
recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patchrecipes-containers/docker-distribution/docker-distribution_git.bb +2
-1@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314" SRCREV_distribution="48294d928ced5dd9b378f7fd7c6f5da3ff3f2c89" SRC_URI = "git://github.com/docker/distribution.git;branch=release/2.6;name=distribution;destsuffix=git/src/github.com/docker/distribution \ file://docker-registry.service \ + file://0001-fix-do_package_qa-error.patch \ " PACKAGES =+ "docker-registry"@@ -57,7 +58,7 @@ do_install() { } INSANE_SKIP_${PN} += "ldflags already-stripped" -INSANE_SKIP_docker-registry += "ldflags already-stripped" +INSANE_SKIP_${MLPREFIX}docker-registry += "ldflags already-stripped" FILES_docker-registry = "${sbindir}/*" FILES_docker-registry += "${systemd_unitdir}/system/docker-registry.service"recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch new file +32
-0@@ -0,0 +1,32 @@ +From 4b9d701fabff8e7969db081406d00fa9fe46b3fd Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +Date: Thu, 27 Sep 2018 11:05:51 +0800 +Subject: [PATCH] fix do_package_qa error + +fix below error: +do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry' +has relocations in .text [textrel] + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Changqing Li <[email protected]> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 47b8f1d..13b0f92 100644 +--- a/Makefile ++++ b/Makefile +@@ -39,7 +39,7 @@ GODEP=$(shell which godep || echo '') + + ${PREFIX}/bin/registry: $(GOFILES) + @echo "+ $@" +- @go build -tags "${DOCKER_BUILDTAGS}" -o $@ ${GO_LDFLAGS} ${GO_GCFLAGS} ./cmd/registry ++ @go build -tags "${DOCKER_BUILDTAGS}" -o $@ ${GO_LDFLAGS} ${GOBUILDFLAGS} ${GO_GCFLAGS} ./cmd/registry + + ${PREFIX}/bin/digest: $(GOFILES) + @echo "+ $@" +-- +2.7.4 +
Quoted 2 lines · Bruce Ashfield
These are all to the wrong mailing list, please resend them to the meta-virtualization list.
OK.
Quoted 6 lines · On 2018-09-29 5:26 AM, [email protected] wrote:
Quoted 4 lines
From: Changqing Li <[email protected]>
fix below warning:
Quoted 7 lines
Quoted 3 lines
1.do_package_qa: QA Issue: No
GNU_HASHin the elf binary: xxx/usr/sbin/registry' [ldflags] 2.do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry'
has relocations in .text [textrel]These need to be 2 separate patches on the resend.
Bruce
Got it.
//Sandy
Quoted 76 lines
Quoted 74 lines
Add GOBUILDFLAGS which have -buildmode=pie to fix the second problem
Signed-off-by Changqing Li <[email protected]>---
.../docker-distribution/docker-distribution_git.bb | 3 +- .../files/0001-fix-do_package_qa-error.patch | 32
++++++++++++++++++++++2 files changed, 34 insertions(+), 1 deletion(-)create mode 100644
recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patchrecipes-containers/docker-distribution/docker-distribution_git.bb +0
-0@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM ="file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
SRCREV_distribution="48294d928ced5dd9b378f7fd7c6f5da3ff3f2c89"
SRC_URI= "git://github.com/docker/distribution.git;branch=release/2.6;name=distribution;destsuffix=git/src/github.com/docker/distribution\
file://docker-registry.service \
+ file://0001-fix-do_package_qa-error.patch \
"
PACKAGES =+ "docker-registry"recipes-containers/docker-distribution/docker-distribution_git.bb +0
-0@@ -57,7 +58,7 @@ do_install() { }INSANE_SKIP_${PN} += "ldflags already-stripped"
recipes-containers/docker-distribution/docker-distribution_git.bb +1
-1-INSANE_SKIP_docker-registry += "ldflags already-stripped" +INSANE_SKIP_${MLPREFIX}docker-registry += "ldflags already-stripped"FILES_docker-registry = "${sbindir}/*"
FILES_docker-registry += "${systemd_unitdir}/system/docker-registry.service"recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch +0
-0new file mode 100644
index 0000000..269b0cd
---/dev/null
+++b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patchrecipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch +25
-0@@ -0,0 +1,32 @@ +From 4b9d701fabff8e7969db081406d00fa9fe46b3fd Mon Sep 17 00:00:00 2001 +From: Changqing Li <[email protected]> +Date: Thu, 27 Sep 2018 11:05:51 +0800 +Subject: [PATCH] fix do_package_qa error + +fix below error: +do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry' +has relocations in .text [textrel] + +Upstream-Status: Inappropriate [oe-specific] + +Signed-off-by: Changqing Li <[email protected]> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 47b8f1d..13b0f92 100644 +--- a/Makefile ++++ b/Makefile +@@ -39,7 +39,7 @@ GODEP=$(shell which godep || echo '') + + ${PREFIX}/bin/registry: $(GOFILES) + @echo "+ $@" +- @go build -tags "${DOCKER_BUILDTAGS}" -o $@ ${GO_LDFLAGS}${GO_GCFLAGS} ./cmd/registry
++ @go build -tags "${DOCKER_BUILDTAGS}" -o $@ ${GO_LDFLAGS} ${GOBUILDFLAGS} ${GO_GCFLAGS} ./cmd/registryrecipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch +6
-0+ + ${PREFIX}/bin/digest: $(GOFILES) + @echo "+ $@" +-- +2.7.4 +
Signature · 4 lines
BRs Sandy(Li Changqing) Wind River Linux