All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docker-distribution: fix do package qa warning[ldflags]
@ 2018-09-30  3:17 changqing.li
  2018-09-30  3:17 ` [PATCH] docker-distribution: fix do package qa warning [textrel] changqing.li
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: changqing.li @ 2018-09-30  3:17 UTC (permalink / raw)
  To: meta-virtualization

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

fix below warning:
do_package_qa: QA Issue: No GNU_HASH in the elf binary:
xxx/usr/sbin/registry' [ldflags]

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 recipes-containers/docker-distribution/docker-distribution_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
index 7c7bce2..23d94c9 100644
--- a/recipes-containers/docker-distribution/docker-distribution_git.bb
+++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
@@ -58,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"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH] docker-distribution: fix do package qa warning [textrel]
  2018-09-30  3:17 [PATCH] docker-distribution: fix do package qa warning[ldflags] changqing.li
@ 2018-09-30  3:17 ` changqing.li
  2018-10-01  1:22   ` Bruce Ashfield
  2018-09-30  3:17 ` [PATCH] docker: fix package qa warning changqing.li
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: changqing.li @ 2018-09-30  3:17 UTC (permalink / raw)
  To: meta-virtualization

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

fix below warning:

do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry'
has relocations in .text [textrel]

Add GOBUILDFLAGS which have -buildmode=pie to fix it

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 .../docker-distribution/docker-distribution_git.bb |  1 +
 .../files/0001-fix-do_package_qa-error.patch       | 32 ++++++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch

diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
index add5ce1..7c7bce2 100644
--- a/recipes-containers/docker-distribution/docker-distribution_git.bb
+++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
@@ -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"
diff --git a/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
new file mode 100644
index 0000000..269b0cd
--- /dev/null
+++ b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
@@ -0,0 +1,32 @@
+From 4b9d701fabff8e7969db081406d00fa9fe46b3fd Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+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 <changqing.li@windriver.com>
+---
+ 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
+
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH] docker: fix package qa warning
  2018-09-30  3:17 [PATCH] docker-distribution: fix do package qa warning[ldflags] changqing.li
  2018-09-30  3:17 ` [PATCH] docker-distribution: fix do package qa warning [textrel] changqing.li
@ 2018-09-30  3:17 ` changqing.li
  2018-10-01  1:23   ` Bruce Ashfield
  2018-09-30  3:17 ` [PATCH] oci-image-tools: fix do " changqing.li
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: changqing.li @ 2018-09-30  3:17 UTC (permalink / raw)
  To: meta-virtualization

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

fix below warning:
do_package_qa: QA Issue: ELF binary 'xxx/usr/bin/docker'
has relocations in .text [textrel]

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 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

diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
index 73e0120..1a8d1a6 100644
--- a/recipes-containers/docker/docker_git.bb
+++ b/recipes-containers/docker/docker_git.bb
@@ -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
diff --git a/recipes-containers/docker/files/0001-fix-do_package_qa-error.patch b/recipes-containers/docker/files/0001-fix-do_package_qa-error.patch
new file mode 100644
index 0000000..79e71a5
--- /dev/null
+++ b/recipes-containers/docker/files/0001-fix-do_package_qa-error.patch
@@ -0,0 +1,31 @@
+From 56c865e2a7269d63f0780b4cd1ed6fdb18e3ff1b Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+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 <changqing.li@windriver.com>
+---
+ 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
+
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH] oci-image-tools: fix do package qa warning
  2018-09-30  3:17 [PATCH] docker-distribution: fix do package qa warning[ldflags] changqing.li
  2018-09-30  3:17 ` [PATCH] docker-distribution: fix do package qa warning [textrel] changqing.li
  2018-09-30  3:17 ` [PATCH] docker: fix package qa warning changqing.li
@ 2018-09-30  3:17 ` changqing.li
  2018-09-30  3:17 ` [PATCH] oci-runtime-tools: " changqing.li
  2018-10-01  1:15 ` [PATCH] docker-distribution: fix do package qa warning[ldflags] Bruce Ashfield
  4 siblings, 0 replies; 19+ messages in thread
From: changqing.li @ 2018-09-30  3:17 UTC (permalink / raw)
  To: meta-virtualization

From: Changqing Li <changqing.li@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@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@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@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



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH] oci-runtime-tools: fix do package qa warning
  2018-09-30  3:17 [PATCH] docker-distribution: fix do package qa warning[ldflags] changqing.li
                   ` (2 preceding siblings ...)
  2018-09-30  3:17 ` [PATCH] oci-image-tools: fix do " changqing.li
@ 2018-09-30  3:17 ` changqing.li
  2018-10-01  1:15 ` [PATCH] docker-distribution: fix do package qa warning[ldflags] Bruce Ashfield
  4 siblings, 0 replies; 19+ messages in thread
From: changqing.li @ 2018-09-30  3:17 UTC (permalink / raw)
  To: meta-virtualization

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

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

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 .../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

diff --git a/recipes-containers/oci-runtime-tools/files/0001-fix-do_package_qa-error.patch b/recipes-containers/oci-runtime-tools/files/0001-fix-do_package_qa-error.patch
new file mode 100644
index 0000000..3c5d820
--- /dev/null
+++ b/recipes-containers/oci-runtime-tools/files/0001-fix-do_package_qa-error.patch
@@ -0,0 +1,32 @@
+From 7de9fd7db7a001b66d92d5e80806e50bb5252392 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+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 <changqing.li@windriver.com>
+---
+ 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
+
diff --git a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
index 61b68b5..218f68c 100644
--- a/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
+++ b/recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb
@@ -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"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH] docker-distribution: fix do package qa warning[ldflags]
  2018-09-30  3:17 [PATCH] docker-distribution: fix do package qa warning[ldflags] changqing.li
                   ` (3 preceding siblings ...)
  2018-09-30  3:17 ` [PATCH] oci-runtime-tools: " changqing.li
@ 2018-10-01  1:15 ` Bruce Ashfield
  2018-10-09  5:08   ` Changqing Li
  4 siblings, 1 reply; 19+ messages in thread
From: Bruce Ashfield @ 2018-10-01  1:15 UTC (permalink / raw)
  To: changqing.li; +Cc: meta-virtualization

The shortlog of this isn't quite right.

You are not really fixing the QA warning, but are making sure that it
is masked in some sort of multlib configuration ?
That needs to be clarified in the shortlog.

On Sat, Sep 29, 2018 at 11:17 PM <changqing.li@windriver.com> wrote:
>
> From: Changqing Li <changqing.li@windriver.com>
>
> fix below warning:
> do_package_qa: QA Issue: No GNU_HASH in the elf binary:
> xxx/usr/sbin/registry' [ldflags]

And the configuration explained here.

Bruce

>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>  recipes-containers/docker-distribution/docker-distribution_git.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
> index 7c7bce2..23d94c9 100644
> --- a/recipes-containers/docker-distribution/docker-distribution_git.bb
> +++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
> @@ -58,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"
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] docker-distribution: fix do package qa warning [textrel]
  2018-09-30  3:17 ` [PATCH] docker-distribution: fix do package qa warning [textrel] changqing.li
@ 2018-10-01  1:22   ` Bruce Ashfield
  2018-10-09  3:13     ` Changqing Li
  2018-10-09  3:14     ` Changqing Li
  0 siblings, 2 replies; 19+ messages in thread
From: Bruce Ashfield @ 2018-10-01  1:22 UTC (permalink / raw)
  To: changqing.li; +Cc: meta-virtualization

On Sat, Sep 29, 2018 at 11:18 PM <changqing.li@windriver.com> wrote:
>
> From: Changqing Li <changqing.li@windriver.com>
>
> fix below warning:
>
> do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry'
> has relocations in .text [textrel]
>
> Add GOBUILDFLAGS which have -buildmode=pie to fix it

This is not universally true, so your configuration needs more
explanation. We haven't needed these flags before, and I've never seen
the warnings.

I just build docker and dumped the environment, my GOBUILDFLAGS do not
have buildmode=pie

So clearly, your config is different.

I'm not against adding the extra variable, but we are taking a the
risk of injecting build configurations that we haven't needed before,
and may not want.

So I need to understand what configuration you are building that is
making them required, and then figure out what else is being injected
that wasn't being injected before.

Same comment applies for all the QA fixes.

Bruce

>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>  .../docker-distribution/docker-distribution_git.bb |  1 +
>  .../files/0001-fix-do_package_qa-error.patch       | 32 ++++++++++++++++++++++
>  2 files changed, 33 insertions(+)
>  create mode 100644 recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>
> diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
> index add5ce1..7c7bce2 100644
> --- a/recipes-containers/docker-distribution/docker-distribution_git.bb
> +++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
> @@ -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"
> diff --git a/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
> new file mode 100644
> index 0000000..269b0cd
> --- /dev/null
> +++ b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
> @@ -0,0 +1,32 @@
> +From 4b9d701fabff8e7969db081406d00fa9fe46b3fd Mon Sep 17 00:00:00 2001
> +From: Changqing Li <changqing.li@windriver.com>
> +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 <changqing.li@windriver.com>
> +---
> + 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
> +
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] docker: fix package qa warning
  2018-09-30  3:17 ` [PATCH] docker: fix package qa warning changqing.li
@ 2018-10-01  1:23   ` Bruce Ashfield
  2018-10-02 18:42     ` M. Asselstine
  0 siblings, 1 reply; 19+ messages in thread
From: Bruce Ashfield @ 2018-10-01  1:23 UTC (permalink / raw)
  To: changqing.li; +Cc: meta-virtualization

On Sat, Sep 29, 2018 at 11:18 PM <changqing.li@windriver.com> wrote:
>
> From: Changqing Li <changqing.li@windriver.com>
>
> fix below warning:
> do_package_qa: QA Issue: ELF binary 'xxx/usr/bin/docker'
> has relocations in .text [textrel]
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>  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
>
> diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
> index 73e0120..1a8d1a6 100644
> --- a/recipes-containers/docker/docker_git.bb
> +++ b/recipes-containers/docker/docker_git.bb
> @@ -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
> diff --git a/recipes-containers/docker/files/0001-fix-do_package_qa-error.patch b/recipes-containers/docker/files/0001-fix-do_package_qa-error.patch
> new file mode 100644
> index 0000000..79e71a5
> --- /dev/null
> +++ b/recipes-containers/docker/files/0001-fix-do_package_qa-error.patch
> @@ -0,0 +1,31 @@
> +From 56c865e2a7269d63f0780b4cd1ed6fdb18e3ff1b Mon Sep 17 00:00:00 2001
> +From: Changqing Li <changqing.li@windriver.com>
> +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 <changqing.li@windriver.com>
> +---
> + 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}"

As I mentioned in my other replies, I've never seen these warnings
myself. So I need to understand the configuration better.

Since I've never seen this before, my first reaction is that any
change of the flags to include buildmode=pie needs to be conditional
on some other distro feature that is enabled in your configuration.

Bruce

> +
> + ln -sf "$(basename "${TARGET}")" build/docker
> +--
> +2.7.4
> +
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] docker: fix package qa warning
  2018-10-01  1:23   ` Bruce Ashfield
@ 2018-10-02 18:42     ` M. Asselstine
  2018-10-09  4:53       ` Changqing Li
  0 siblings, 1 reply; 19+ messages in thread
From: M. Asselstine @ 2018-10-02 18:42 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

On Sun, Sep 30, 2018 at 9:23 PM, Bruce Ashfield
<bruce.ashfield@gmail.com> wrote:
> On Sat, Sep 29, 2018 at 11:18 PM <changqing.li@windriver.com> wrote:
>>
>> From: Changqing Li <changqing.li@windriver.com>
>>
>> fix below warning:
>> do_package_qa: QA Issue: ELF binary 'xxx/usr/bin/docker'
>> has relocations in .text [textrel]
>>
>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>> ---
>>  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
>>
>> diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
>> index 73e0120..1a8d1a6 100644
>> --- a/recipes-containers/docker/docker_git.bb
>> +++ b/recipes-containers/docker/docker_git.bb
>> @@ -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
>> diff --git a/recipes-containers/docker/files/0001-fix-do_package_qa-error.patch b/recipes-containers/docker/files/0001-fix-do_package_qa-error.patch
>> new file mode 100644
>> index 0000000..79e71a5
>> --- /dev/null
>> +++ b/recipes-containers/docker/files/0001-fix-do_package_qa-error.patch
>> @@ -0,0 +1,31 @@
>> +From 56c865e2a7269d63f0780b4cd1ed6fdb18e3ff1b Mon Sep 17 00:00:00 2001
>> +From: Changqing Li <changqing.li@windriver.com>
>> +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 <changqing.li@windriver.com>
>> +---
>> + 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}"
>
> As I mentioned in my other replies, I've never seen these warnings
> myself. So I need to understand the configuration better.
>
> Since I've never seen this before, my first reaction is that any
> change of the flags to include buildmode=pie needs to be conditional
> on some other distro feature that is enabled in your configuration.

Most likely the security flags at play. Could also be that you don't
have the check enabled. At any rate I agree the details need to be
captured in the commit log.

MarkA

>
> Bruce
>
>> +
>> + ln -sf "$(basename "${TARGET}")" build/docker
>> +--
>> +2.7.4
>> +
>> --
>> 2.7.4
>>
>> --
>> _______________________________________________
>> meta-virtualization mailing list
>> meta-virtualization@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end"
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] docker-distribution: fix do package qa warning [textrel]
  2018-10-01  1:22   ` Bruce Ashfield
@ 2018-10-09  3:13     ` Changqing Li
  2018-10-09  4:47       ` Changqing Li
  2018-10-09  3:14     ` Changqing Li
  1 sibling, 1 reply; 19+ messages in thread
From: Changqing Li @ 2018-10-09  3:13 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 5104 bytes --]



On 10/01/2018 09:22 AM, Bruce Ashfield wrote:
> On Sat, Sep 29, 2018 at 11:18 PM <changqing.li@windriver.com> wrote:
>> From: Changqing Li <changqing.li@windriver.com>
>>
>> fix below warning:
>>
>> do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry'
>> has relocations in .text [textrel]
>>
>> Add GOBUILDFLAGS which have -buildmode=pie to fix it
> This is not universally true, so your configuration needs more
> explanation. We haven't needed these flags before, and I've never seen
> the warnings.
>
> I just build docker and dumped the environment, my GOBUILDFLAGS do not
> have buildmode=pie
>
> So clearly, your config is different.
>
> I'm not against adding the extra variable, but we are taking a the
> risk of injecting build configurations that we haven't needed before,
> and may not want.
>
> So I need to understand what configuration you are building that is
> making them required, and then figure out what else is being injected
> that wasn't being injected before.
>
> Same comment applies for all the QA fixes.
>
> Bruce

Hi,  Bruce

I do some research, package QA check  is enabled by default in 
insane.bbclass.
variable WARN_QA contains the checked items. and textrel is checked by 
default.

But,  this warning  is arch related(Besides arch,  no other special config).
Here is my test result of which archs  the warnings can see.

docker                                      arm64  arm  x86  x86-64
docker-distribution                   arm64
containerd-opencontainers     arm64  arm  x86  x86-64
oci-image-tools                        arm64
oci-runtime-tools                     arm64
runc-docker                             arm64  arm  x86  x86-64


About GOBUILDFLAGS,  buildmode=pie is added to oe-core recently, so 
maybe you need
to check lastest code, here is the patch.



Do you think we need add the fix patch only for special arch? like
SRC_URI_append_aarch64="file://0001-fix-do_package_qa-error.patch"

>
>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>> ---
>>   .../docker-distribution/docker-distribution_git.bb |  1 +
>>   .../files/0001-fix-do_package_qa-error.patch       | 32 ++++++++++++++++++++++
>>   2 files changed, 33 insertions(+)
>>   create mode 100644 recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>>
>> diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
>> index add5ce1..7c7bce2 100644
>> --- a/recipes-containers/docker-distribution/docker-distribution_git.bb
>> +++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
>> @@ -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"
>> diff --git a/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>> new file mode 100644
>> index 0000000..269b0cd
>> --- /dev/null
>> +++ b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>> @@ -0,0 +1,32 @@
>> +From 4b9d701fabff8e7969db081406d00fa9fe46b3fd Mon Sep 17 00:00:00 2001
>> +From: Changqing Li <changqing.li@windriver.com>
>> +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 <changqing.li@windriver.com>
>> +---
>> + 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
>> +
>> --
>> 2.7.4
>>
>> --
>> _______________________________________________
>> meta-virtualization mailing list
>> meta-virtualization@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>
>

-- 
BRs

Sandy(Li Changqing)
Wind River Linux


[-- Attachment #2.1: Type: text/html, Size: 7527 bytes --]

[-- Attachment #2.2: nmeabbcbjjpodgbo.png --]
[-- Type: image/png, Size: 7276 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] docker-distribution: fix do package qa warning [textrel]
  2018-10-01  1:22   ` Bruce Ashfield
  2018-10-09  3:13     ` Changqing Li
@ 2018-10-09  3:14     ` Changqing Li
  2018-10-09  9:19       ` Changqing Li
  1 sibling, 1 reply; 19+ messages in thread
From: Changqing Li @ 2018-10-09  3:14 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 5115 bytes --]



On 10/01/2018 09:22 AM, Bruce Ashfield wrote:
> On Sat, Sep 29, 2018 at 11:18 PM <changqing.li@windriver.com> wrote:
>> From: Changqing Li <changqing.li@windriver.com>
>>
>> fix below warning:
>>
>> do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry'
>> has relocations in .text [textrel]
>>
>> Add GOBUILDFLAGS which have -buildmode=pie to fix it
> This is not universally true, so your configuration needs more
> explanation. We haven't needed these flags before, and I've never seen
> the warnings.
>
> I just build docker and dumped the environment, my GOBUILDFLAGS do not
> have buildmode=pie
>
> So clearly, your config is different.
>
> I'm not against adding the extra variable, but we are taking a the
> risk of injecting build configurations that we haven't needed before,
> and may not want.
>
> So I need to understand what configuration you are building that is
> making them required, and then figure out what else is being injected
> that wasn't being injected before.
>
> Same comment applies for all the QA fixes.
>
> Bruce

Hi,  Bruce

I do some research, package QA check  is enabled by default in 
insane.bbclass.
variable WARN_QA contains the checked items. and textrel is checked by 
default.

But,  this warning  is arch related(Besides arch,  no other special config).
Here is my test result of which archs  the warnings can see.

docker                                      arm64  arm  x86  x86-64
docker-distribution                   arm64
containerd-opencontainers     arm64  arm  x86  x86-64
oci-image-tools                        arm64
oci-runtime-tools                     arm64
runc-docker                             arm64  arm  x86  x86-64


About GOBUILDFLAGS,  buildmode=pie is added to oe-core recently, so 
maybe you need
to check lastest code, here is the patch.



Do you think we need add the fix patch only for special arch? like
SRC_URI_append_aarch64="file://0001-fix-do_package_qa-error.patch"

//Sandy

>
>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>> ---
>>   .../docker-distribution/docker-distribution_git.bb |  1 +
>>   .../files/0001-fix-do_package_qa-error.patch       | 32 ++++++++++++++++++++++
>>   2 files changed, 33 insertions(+)
>>   create mode 100644 recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>>
>> diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
>> index add5ce1..7c7bce2 100644
>> --- a/recipes-containers/docker-distribution/docker-distribution_git.bb
>> +++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
>> @@ -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"
>> diff --git a/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>> new file mode 100644
>> index 0000000..269b0cd
>> --- /dev/null
>> +++ b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>> @@ -0,0 +1,32 @@
>> +From 4b9d701fabff8e7969db081406d00fa9fe46b3fd Mon Sep 17 00:00:00 2001
>> +From: Changqing Li <changqing.li@windriver.com>
>> +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 <changqing.li@windriver.com>
>> +---
>> + 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
>> +
>> --
>> 2.7.4
>>
>> --
>> _______________________________________________
>> meta-virtualization mailing list
>> meta-virtualization@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>
>

-- 
BRs

Sandy(Li Changqing)
Wind River Linux


[-- Attachment #2.1: Type: text/html, Size: 7554 bytes --]

[-- Attachment #2.2: kjbchpkfiaifpkbp.png --]
[-- Type: image/png, Size: 7276 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] docker-distribution: fix do package qa warning [textrel]
  2018-10-09  3:13     ` Changqing Li
@ 2018-10-09  4:47       ` Changqing Li
  0 siblings, 0 replies; 19+ messages in thread
From: Changqing Li @ 2018-10-09  4:47 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 5447 bytes --]

Please ignore this mail,  this mail is same as next one,  just send two 
times by mistake.


On 10/09/2018 11:13 AM, Changqing Li wrote:
>
>
>
> On 10/01/2018 09:22 AM, Bruce Ashfield wrote:
>> On Sat, Sep 29, 2018 at 11:18 PM<changqing.li@windriver.com>  wrote:
>>> From: Changqing Li<changqing.li@windriver.com>
>>>
>>> fix below warning:
>>>
>>> do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry'
>>> has relocations in .text [textrel]
>>>
>>> Add GOBUILDFLAGS which have -buildmode=pie to fix it
>> This is not universally true, so your configuration needs more
>> explanation. We haven't needed these flags before, and I've never seen
>> the warnings.
>>
>> I just build docker and dumped the environment, my GOBUILDFLAGS do not
>> have buildmode=pie
>>
>> So clearly, your config is different.
>>
>> I'm not against adding the extra variable, but we are taking a the
>> risk of injecting build configurations that we haven't needed before,
>> and may not want.
>>
>> So I need to understand what configuration you are building that is
>> making them required, and then figure out what else is being injected
>> that wasn't being injected before.
>>
>> Same comment applies for all the QA fixes.
>>
>> Bruce
>
> Hi,  Bruce
>
> I do some research, package QA check  is enabled by default in 
> insane.bbclass.
> variable WARN_QA contains the checked items. and textrel is checked by 
> default.
>
> But,  this warning  is arch related(Besides arch,  no other special 
> config).
> Here is my test result of which archs  the warnings can see.
>
> docker                                      arm64  arm  x86 x86-64
> docker-distribution                   arm64
> containerd-opencontainers     arm64  arm  x86  x86-64
> oci-image-tools                        arm64
> oci-runtime-tools                     arm64
> runc-docker                             arm64  arm  x86  x86-64
>
>
> About GOBUILDFLAGS,  buildmode=pie is added to oe-core recently, so 
> maybe you need
> to check lastest code, here is the patch.
>
>
>
> Do you think we need add the fix patch only for special arch? like
> SRC_URI_append_aarch64="file://0001-fix-do_package_qa-error.patch"
>
>>> Signed-off-by: Changqing Li<changqing.li@windriver.com>
>>> ---
>>>   .../docker-distribution/docker-distribution_git.bb |  1 +
>>>   .../files/0001-fix-do_package_qa-error.patch       | 32 ++++++++++++++++++++++
>>>   2 files changed, 33 insertions(+)
>>>   create mode 100644 recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>>>
>>> diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
>>> index add5ce1..7c7bce2 100644
>>> --- a/recipes-containers/docker-distribution/docker-distribution_git.bb
>>> +++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
>>> @@ -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"
>>> diff --git a/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>>> new file mode 100644
>>> index 0000000..269b0cd
>>> --- /dev/null
>>> +++ b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>>> @@ -0,0 +1,32 @@
>>> +From 4b9d701fabff8e7969db081406d00fa9fe46b3fd Mon Sep 17 00:00:00 2001
>>> +From: Changqing Li<changqing.li@windriver.com>
>>> +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<changqing.li@windriver.com>
>>> +---
>>> + 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
>>> +
>>> --
>>> 2.7.4
>>>
>>> --
>>> _______________________________________________
>>> meta-virtualization mailing list
>>> meta-virtualization@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>>
>
> -- 
> BRs
>
> Sandy(Li Changqing)
> Wind River Linux
>
>

-- 
BRs

Sandy(Li Changqing)
Wind River Linux


[-- Attachment #2.1: Type: text/html, Size: 8555 bytes --]

[-- Attachment #2.2: nmeabbcbjjpodgbo.png --]
[-- Type: image/png, Size: 7276 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] docker: fix package qa warning
  2018-10-02 18:42     ` M. Asselstine
@ 2018-10-09  4:53       ` Changqing Li
  0 siblings, 0 replies; 19+ messages in thread
From: Changqing Li @ 2018-10-09  4:53 UTC (permalink / raw)
  To: M. Asselstine, Bruce Ashfield; +Cc: meta-virtualization



On 10/03/2018 02:42 AM, M. Asselstine wrote:
> On Sun, Sep 30, 2018 at 9:23 PM, Bruce Ashfield
> <bruce.ashfield@gmail.com> wrote:
>> On Sat, Sep 29, 2018 at 11:18 PM <changqing.li@windriver.com> wrote:
>>> From: Changqing Li <changqing.li@windriver.com>
>>>
>>> fix below warning:
>>> do_package_qa: QA Issue: ELF binary 'xxx/usr/bin/docker'
>>> has relocations in .text [textrel]
>>>
>>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>>> ---
>>>   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
>>>
>>> diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb
>>> index 73e0120..1a8d1a6 100644
>>> --- a/recipes-containers/docker/docker_git.bb
>>> +++ b/recipes-containers/docker/docker_git.bb
>>> @@ -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
>>> diff --git a/recipes-containers/docker/files/0001-fix-do_package_qa-error.patch b/recipes-containers/docker/files/0001-fix-do_package_qa-error.patch
>>> new file mode 100644
>>> index 0000000..79e71a5
>>> --- /dev/null
>>> +++ b/recipes-containers/docker/files/0001-fix-do_package_qa-error.patch
>>> @@ -0,0 +1,31 @@
>>> +From 56c865e2a7269d63f0780b4cd1ed6fdb18e3ff1b Mon Sep 17 00:00:00 2001
>>> +From: Changqing Li <changqing.li@windriver.com>
>>> +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 <changqing.li@windriver.com>
>>> +---
>>> + 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}"
>> As I mentioned in my other replies, I've never seen these warnings
>> myself. So I need to understand the configuration better.
>>
>> Since I've never seen this before, my first reaction is that any
>> change of the flags to include buildmode=pie needs to be conditional
>> on some other distro feature that is enabled in your configuration.
> Most likely the security flags at play. Could also be that you don't
> have the check enabled. At any rate I agree the details need to be
> captured in the commit log.
>
> MarkA

Yes.  This is caused by security flags -pie -fpie,  but this flags are 
enabled by default now.

below workaround can also make these warning disappear.
SECURITY_CFLAGS_pn-docker = "${SECURITY_NOPIE_CFLAGS}" 
(SECURITY_NOPIE_CFLAGS ?= "-no-pie -fno-PIE")
SECURITY_LDFLAGS_pn-docker = ""

>
>> Bruce
>>
>>> +
>>> + ln -sf "$(basename "${TARGET}")" build/docker
>>> +--
>>> +2.7.4
>>> +
>>> --
>>> 2.7.4
>>>
>>> --
>>> _______________________________________________
>>> meta-virtualization mailing list
>>> meta-virtualization@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>>
>>
>> --
>> "Thou shalt not follow the NULL pointer, for chaos and madness await
>> thee at its end"
>> --
>> _______________________________________________
>> meta-virtualization mailing list
>> meta-virtualization@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-virtualization

-- 
BRs

Sandy(Li Changqing)
Wind River Linux



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] docker-distribution: fix do package qa warning[ldflags]
  2018-10-01  1:15 ` [PATCH] docker-distribution: fix do package qa warning[ldflags] Bruce Ashfield
@ 2018-10-09  5:08   ` Changqing Li
  0 siblings, 0 replies; 19+ messages in thread
From: Changqing Li @ 2018-10-09  5:08 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization


On 10/01/2018 09:15 AM, Bruce Ashfield wrote:
> The shortlog of this isn't quite right.
>
> You are not really fixing the QA warning, but are making sure that it
> is masked in some sort of multlib configuration ?
> That needs to be clarified in the shortlog.
>
> On Sat, Sep 29, 2018 at 11:17 PM <changqing.li@windriver.com> wrote:
>> From: Changqing Li <changqing.li@windriver.com>
>>
>> fix below warning:
>> do_package_qa: QA Issue: No GNU_HASH in the elf binary:
>> xxx/usr/sbin/registry' [ldflags]
> And the configuration explained here.
>
> Bruce

I will update the shortlog in next version.

//Sandy
>
>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>> ---
>>   recipes-containers/docker-distribution/docker-distribution_git.bb | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
>> index 7c7bce2..23d94c9 100644
>> --- a/recipes-containers/docker-distribution/docker-distribution_git.bb
>> +++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
>> @@ -58,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"
>> --
>> 2.7.4
>>
>> --
>> _______________________________________________
>> meta-virtualization mailing list
>> meta-virtualization@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>
>

-- 
BRs

Sandy(Li Changqing)
Wind River Linux



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] docker-distribution: fix do package qa warning [textrel]
  2018-10-09  3:14     ` Changqing Li
@ 2018-10-09  9:19       ` Changqing Li
  2018-10-09 12:41         ` Bruce Ashfield
  0 siblings, 1 reply; 19+ messages in thread
From: Changqing Li @ 2018-10-09  9:19 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 5571 bytes --]



On 10/09/2018 11:14 AM, Changqing Li wrote:
>
>
>
> On 10/01/2018 09:22 AM, Bruce Ashfield wrote:
>> On Sat, Sep 29, 2018 at 11:18 PM<changqing.li@windriver.com>  wrote:
>>> From: Changqing Li<changqing.li@windriver.com>
>>>
>>> fix below warning:
>>>
>>> do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry'
>>> has relocations in .text [textrel]
>>>
>>> Add GOBUILDFLAGS which have -buildmode=pie to fix it
>> This is not universally true, so your configuration needs more
>> explanation. We haven't needed these flags before, and I've never seen
>> the warnings.
>>
>> I just build docker and dumped the environment, my GOBUILDFLAGS do not
>> have buildmode=pie
>>
>> So clearly, your config is different.
>>
>> I'm not against adding the extra variable, but we are taking a the
>> risk of injecting build configurations that we haven't needed before,
>> and may not want.
>>
>> So I need to understand what configuration you are building that is
>> making them required, and then figure out what else is being injected
>> that wasn't being injected before.
>>
>> Same comment applies for all the QA fixes.
>>
>> Bruce
>
> Hi,  Bruce
>
> I do some research, package QA check  is enabled by default in 
> insane.bbclass.
> variable WARN_QA contains the checked items. and textrel is checked by 
> default.
>
> But,  this warning  is arch related(Besides arch,  no other special 
> config).
> Here is my test result of which archs  the warnings can see.
>
> docker                                      arm64  arm  x86 x86-64
> docker-distribution                   arm64
> containerd-opencontainers     arm64  arm  x86  x86-64
> oci-image-tools                        arm64
> oci-runtime-tools                     arm64
> runc-docker                             arm64  arm  x86  x86-64
>
>
> About GOBUILDFLAGS,  buildmode=pie is added to oe-core recently, so 
> maybe you need
> to check lastest code, here is the patch.
>
>
>
> Do you think we need add the fix patch only for special arch? like
> SRC_URI_append_aarch64="file://0001-fix-do_package_qa-error.patch"
>
> //Sandy

PS: Refer this commit, 
http://cgit.openembedded.org/openembedded-core/commit/?id=b689c72ad2dc84b8bb55ecbf72d95701707b9bb3
seems problem only met on aarch64,  but not only skip aarch64.

//Sandy

>
>>> Signed-off-by: Changqing Li<changqing.li@windriver.com>
>>> ---
>>>   .../docker-distribution/docker-distribution_git.bb |  1 +
>>>   .../files/0001-fix-do_package_qa-error.patch       | 32 ++++++++++++++++++++++
>>>   2 files changed, 33 insertions(+)
>>>   create mode 100644 recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>>>
>>> diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
>>> index add5ce1..7c7bce2 100644
>>> --- a/recipes-containers/docker-distribution/docker-distribution_git.bb
>>> +++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
>>> @@ -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"
>>> diff --git a/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>>> new file mode 100644
>>> index 0000000..269b0cd
>>> --- /dev/null
>>> +++ b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>>> @@ -0,0 +1,32 @@
>>> +From 4b9d701fabff8e7969db081406d00fa9fe46b3fd Mon Sep 17 00:00:00 2001
>>> +From: Changqing Li<changqing.li@windriver.com>
>>> +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<changqing.li@windriver.com>
>>> +---
>>> + 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
>>> +
>>> --
>>> 2.7.4
>>>
>>> --
>>> _______________________________________________
>>> meta-virtualization mailing list
>>> meta-virtualization@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/meta-virtualization
>>
>
> -- 
> BRs
>
> Sandy(Li Changqing)
> Wind River Linux
>
>

-- 
BRs

Sandy(Li Changqing)
Wind River Linux


[-- Attachment #2.1: Type: text/html, Size: 8995 bytes --]

[-- Attachment #2.2: kjbchpkfiaifpkbp.png --]
[-- Type: image/png, Size: 7276 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] docker-distribution: fix do package qa warning [textrel]
  2018-10-09  9:19       ` Changqing Li
@ 2018-10-09 12:41         ` Bruce Ashfield
  2018-10-10  2:06           ` Changqing Li
  0 siblings, 1 reply; 19+ messages in thread
From: Bruce Ashfield @ 2018-10-09 12:41 UTC (permalink / raw)
  To: changqing.li; +Cc: meta-virtualization


[-- Attachment #1.1: Type: text/plain, Size: 6076 bytes --]

On Tue, Oct 9, 2018 at 5:20 AM Changqing Li <changqing.li@windriver.com>
wrote:

>
>
> On 10/09/2018 11:14 AM, Changqing Li wrote:
>
>
>
> On 10/01/2018 09:22 AM, Bruce Ashfield wrote:
>
> On Sat, Sep 29, 2018 at 11:18 PM <changqing.li@windriver.com> <changqing.li@windriver.com> wrote:
>
> From: Changqing Li <changqing.li@windriver.com> <changqing.li@windriver.com>
>
> fix below warning:
>
> do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry'
> has relocations in .text [textrel]
>
> Add GOBUILDFLAGS which have -buildmode=pie to fix it
>
> This is not universally true, so your configuration needs more
> explanation. We haven't needed these flags before, and I've never seen
> the warnings.
>
> I just build docker and dumped the environment, my GOBUILDFLAGS do not
> have buildmode=pie
>
> So clearly, your config is different.
>
> I'm not against adding the extra variable, but we are taking a the
> risk of injecting build configurations that we haven't needed before,
> and may not want.
>
> So I need to understand what configuration you are building that is
> making them required, and then figure out what else is being injected
> that wasn't being injected before.
>
> Same comment applies for all the QA fixes.
>
> Bruce
>
>
> Hi,  Bruce
>
> I do some research, package QA check  is enabled by default in
> insane.bbclass.
> variable WARN_QA contains the checked items. and textrel is checked by
> default.
>
> But,  this warning  is arch related(Besides arch,  no other special
> config).
> Here is my test result of which archs  the warnings can see.
>
> docker                                      arm64  arm  x86  x86-64
> docker-distribution                   arm64
> containerd-opencontainers     arm64  arm  x86  x86-64
> oci-image-tools                        arm64
> oci-runtime-tools                     arm64
> runc-docker                             arm64  arm  x86  x86-64
>
>
> About GOBUILDFLAGS,  buildmode=pie is added to oe-core recently, so maybe
> you need
> to check lastest code, here is the patch.
>
>
>
> Do you think we need add the fix patch only for special arch? like
> SRC_URI_append_aarch64="file://0001-fix-do_package_qa-error.patch"
>
> //Sandy
>
>
> PS: Refer this commit,
> http://cgit.openembedded.org/openembedded-core/commit/?id=b689c72ad2dc84b8bb55ecbf72d95701707b9bb3
> seems problem only met on aarch64,  but not only skip aarch64.
>

My trees are completely up to date. I always track master and master-next
for these builds.

And yet, I can't trigger any build issues from the QA check. I'd have
expected that other docker
users would also be hitting this and would have either reported an issue,
or sent patches.

But like the commit you are referencing, I'd prefer to just add a skip to
the QA versus take
patches for issues that I'm not able to reproduce.

Bruce



>
> //Sandy
>
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com> <changqing.li@windriver.com>
> ---
>  .../docker-distribution/docker-distribution_git.bb |  1 +
>  .../files/0001-fix-do_package_qa-error.patch       | 32 ++++++++++++++++++++++
>  2 files changed, 33 insertions(+)
>  create mode 100644 recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>
> diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb b/recipes-containers/docker-distribution/docker-distribution_git.bb
> index add5ce1..7c7bce2 100644
> --- a/recipes-containers/docker-distribution/docker-distribution_git.bb
> +++ b/recipes-containers/docker-distribution/docker-distribution_git.bb
> @@ -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"
> diff --git a/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
> new file mode 100644
> index 0000000..269b0cd
> --- /dev/null
> +++ b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
> @@ -0,0 +1,32 @@
> +From 4b9d701fabff8e7969db081406d00fa9fe46b3fd Mon Sep 17 00:00:00 2001
> +From: Changqing Li <changqing.li@windriver.com> <changqing.li@windriver.com>
> +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 <changqing.li@windriver.com> <changqing.li@windriver.com>
> +---
> + 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
> +
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-virtualization mailing listmeta-virtualization@yoctoproject.orghttps://lists.yoctoproject.org/listinfo/meta-virtualization
>
>
> --
> BRs
>
> Sandy(Li Changqing)
> Wind River Linux
>
>
>
>
> --
> BRs
>
> Sandy(Li Changqing)
> Wind River Linux
>
>

-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #1.2: Type: text/html, Size: 10705 bytes --]

[-- Attachment #2: kjbchpkfiaifpkbp.png --]
[-- Type: image/png, Size: 7276 bytes --]

[-- Attachment #3: kjbchpkfiaifpkbp.png --]
[-- Type: image/png, Size: 7276 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] docker-distribution: fix do package qa warning [textrel]
  2018-10-09 12:41         ` Bruce Ashfield
@ 2018-10-10  2:06           ` Changqing Li
  0 siblings, 0 replies; 19+ messages in thread
From: Changqing Li @ 2018-10-10  2:06 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 7637 bytes --]



On 10/09/2018 08:41 PM, Bruce Ashfield wrote:
>
>
> On Tue, Oct 9, 2018 at 5:20 AM Changqing Li 
> <changqing.li@windriver.com <mailto:changqing.li@windriver.com>> wrote:
>
>
>
>     On 10/09/2018 11:14 AM, Changqing Li wrote:
>>
>>
>>
>>     On 10/01/2018 09:22 AM, Bruce Ashfield wrote:
>>>     On Sat, Sep 29, 2018 at 11:18 PM<changqing.li@windriver.com> <mailto:changqing.li@windriver.com>  wrote:
>>>>     From: Changqing Li<changqing.li@windriver.com> <mailto:changqing.li@windriver.com>
>>>>
>>>>     fix below warning:
>>>>
>>>>     do_package_qa: QA Issue: ELF binary 'xxx/usr/sbin/registry'
>>>>     has relocations in .text [textrel]
>>>>
>>>>     Add GOBUILDFLAGS which have -buildmode=pie to fix it
>>>     This is not universally true, so your configuration needs more
>>>     explanation. We haven't needed these flags before, and I've never seen
>>>     the warnings.
>>>
>>>     I just build docker and dumped the environment, my GOBUILDFLAGS do not
>>>     have buildmode=pie
>>>
>>>     So clearly, your config is different.
>>>
>>>     I'm not against adding the extra variable, but we are taking a the
>>>     risk of injecting build configurations that we haven't needed before,
>>>     and may not want.
>>>
>>>     So I need to understand what configuration you are building that is
>>>     making them required, and then figure out what else is being injected
>>>     that wasn't being injected before.
>>>
>>>     Same comment applies for all the QA fixes.
>>>
>>>     Bruce
>>
>>     Hi,  Bruce
>>
>>     I do some research, package QA check  is enabled by default in
>>     insane.bbclass.
>>     variable WARN_QA contains the checked items. and textrel is
>>     checked by default.
>>
>>     But,  this warning  is arch related(Besides arch,  no other
>>     special config).
>>     Here is my test result of which archs  the warnings can see.
>>
>>     docker                                      arm64  arm x86  x86-64
>>     docker-distribution                   arm64
>>     containerd-opencontainers     arm64  arm  x86  x86-64
>>     oci-image-tools                        arm64
>>     oci-runtime-tools                     arm64
>>     runc-docker                             arm64  arm  x86 x86-64
>>
>>
>>     About GOBUILDFLAGS,  buildmode=pie is added to oe-core recently,
>>     so maybe you need
>>     to check lastest code, here is the patch.
>>
>>
>>
>>     Do you think we need add the fix patch only for special arch? like
>>     SRC_URI_append_aarch64="file://0001-fix-do_package_qa-error.patch"
>>
>>     //Sandy
>
>     PS: Refer this commit,
>     http://cgit.openembedded.org/openembedded-core/commit/?id=b689c72ad2dc84b8bb55ecbf72d95701707b9bb3
>     seems problem only met on aarch64,  but not only skip aarch64.
>
>
> My trees are completely up to date. I always track master and 
> master-next for these builds.
>
> And yet, I can't trigger any build issues from the QA check. I'd have 
> expected that other docker
> users would also be hitting this and would have either reported an 
> issue, or sent patches.
>
> But like the commit you are referencing, I'd prefer to just add a skip 
> to the QA versus take
> patches for issues that I'm not able to reproduce.
>
> Bruce

ok. I will resend the patch to skip the qa check.

//Sandy
>
>
>     //Sandy
>
>>
>>>>     Signed-off-by: Changqing Li<changqing.li@windriver.com> <mailto:changqing.li@windriver.com>
>>>>     ---
>>>>       .../docker-distribution/docker-distribution_git.bb <http://docker-distribution_git.bb>  |  1 +
>>>>       .../files/0001-fix-do_package_qa-error.patch       | 32 ++++++++++++++++++++++
>>>>       2 files changed, 33 insertions(+)
>>>>       create mode 100644 recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>>>>
>>>>     diff --git a/recipes-containers/docker-distribution/docker-distribution_git.bb <http://docker-distribution_git.bb>  b/recipes-containers/docker-distribution/docker-distribution_git.bb <http://docker-distribution_git.bb>
>>>>     index add5ce1..7c7bce2 100644
>>>>     --- a/recipes-containers/docker-distribution/docker-distribution_git.bb <http://docker-distribution_git.bb>
>>>>     +++ b/recipes-containers/docker-distribution/docker-distribution_git.bb <http://docker-distribution_git.bb>
>>>>     @@ -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
>>>>     <http://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"
>>>>     diff --git a/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>>>>     new file mode 100644
>>>>     index 0000000..269b0cd
>>>>     --- /dev/null
>>>>     +++ b/recipes-containers/docker-distribution/files/0001-fix-do_package_qa-error.patch
>>>>     @@ -0,0 +1,32 @@
>>>>     +From 4b9d701fabff8e7969db081406d00fa9fe46b3fd Mon Sep 17 00:00:00 2001
>>>>     +From: Changqing Li<changqing.li@windriver.com> <mailto:changqing.li@windriver.com>
>>>>     +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<changqing.li@windriver.com> <mailto:changqing.li@windriver.com>
>>>>     +---
>>>>     + 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
>>>>     +
>>>>     --
>>>>     2.7.4
>>>>
>>>>     --
>>>>     _______________________________________________
>>>>     meta-virtualization mailing list
>>>>     meta-virtualization@yoctoproject.org
>>>>     <mailto:meta-virtualization@yoctoproject.org>
>>>>     https://lists.yoctoproject.org/listinfo/meta-virtualization
>>
>>     -- 
>>     BRs
>>
>>     Sandy(Li Changqing)
>>     Wind River Linux
>>
>>
>
>     -- 
>     BRs
>
>     Sandy(Li Changqing)
>     Wind River Linux
>
>
>
> -- 
> "Thou shalt not follow the NULL pointer, for chaos and madness await 
> thee at its end"

-- 
BRs

Sandy(Li Changqing)
Wind River Linux


[-- Attachment #2: Type: text/html, Size: 13462 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH] oci-image-tools: fix do package qa warning
  2018-10-10  6:59 ` [PATCH] oci-image-tools: fix do package qa warning changqing.li
@ 2018-10-11 18:38   ` Bruce Ashfield
  0 siblings, 0 replies; 19+ messages in thread
From: Bruce Ashfield @ 2018-10-11 18:38 UTC (permalink / raw)
  To: changqing.li; +Cc: meta-virtualization

merged

Bruce
On Wed, Oct 10, 2018 at 2:59 AM <changqing.li@windriver.com> wrote:
>
> From: Changqing Li <changqing.li@windriver.com>
>
> 1. After security flag PIE is enabled by default, we might met
> below QA warning on some arch, like aarch64, fix it by skip
> textrel QA check refer commit b689c72a of oe-core
>
> oci-image-tools-0.2.0-dev+gitAUTOINC+4abe1a166f-r0 do_package_qa:
> QA Issue: ELF binary 'work/aarch64-poky-linux/oci-image-tools/
> 0.2.0-dev+gitAUTOINC+4abe1a166f-r0/packages-split/oci-image-tools/
> usr/sbin/oci-image-tool' has relocations in .text [textrel]
>
> 2. This problem is caused since security_flags.inc is used by default.
>    so alternative work around is:
>       SECURITY_CFLAGS_pn-oci-image-tools = "${SECURITY_NOPIE_CFLAGS}"
>       SECURITY_LDFLAGS_pn-oci-image-tools = ""
>
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>  recipes-containers/oci-image-tools/oci-image-tools_git.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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..8c41b6e 100644
> --- a/recipes-containers/oci-image-tools/oci-image-tools_git.bb
> +++ b/recipes-containers/oci-image-tools/oci-image-tools_git.bb
> @@ -61,4 +61,4 @@ do_install() {
>         install ${S}/src/import/oci-image-tool ${D}/${sbindir}/
>  }
>
> -INSANE_SKIP_${PN} += "ldflags"
> +INSANE_SKIP_${PN} += "ldflags textrel"
> --
> 2.7.4
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH] oci-image-tools: fix do package qa warning
  2018-10-10  6:59 [PATCH][meta-cloud-services] consul: add INSANE_SKIP for textrel changqing.li
@ 2018-10-10  6:59 ` changqing.li
  2018-10-11 18:38   ` Bruce Ashfield
  0 siblings, 1 reply; 19+ messages in thread
From: changqing.li @ 2018-10-10  6:59 UTC (permalink / raw)
  To: meta-virtualization

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

1. After security flag PIE is enabled by default, we might met
below QA warning on some arch, like aarch64, fix it by skip
textrel QA check refer commit b689c72a of oe-core

oci-image-tools-0.2.0-dev+gitAUTOINC+4abe1a166f-r0 do_package_qa: 
QA Issue: ELF binary 'work/aarch64-poky-linux/oci-image-tools/
0.2.0-dev+gitAUTOINC+4abe1a166f-r0/packages-split/oci-image-tools/
usr/sbin/oci-image-tool' has relocations in .text [textrel]

2. This problem is caused since security_flags.inc is used by default.
   so alternative work around is:
      SECURITY_CFLAGS_pn-oci-image-tools = "${SECURITY_NOPIE_CFLAGS}"
      SECURITY_LDFLAGS_pn-oci-image-tools = ""

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 recipes-containers/oci-image-tools/oci-image-tools_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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..8c41b6e 100644
--- a/recipes-containers/oci-image-tools/oci-image-tools_git.bb
+++ b/recipes-containers/oci-image-tools/oci-image-tools_git.bb
@@ -61,4 +61,4 @@ do_install() {
 	install ${S}/src/import/oci-image-tool ${D}/${sbindir}/
 }
 
-INSANE_SKIP_${PN} += "ldflags"
+INSANE_SKIP_${PN} += "ldflags textrel"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-10-11 18:38 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-30  3:17 [PATCH] docker-distribution: fix do package qa warning[ldflags] changqing.li
2018-09-30  3:17 ` [PATCH] docker-distribution: fix do package qa warning [textrel] changqing.li
2018-10-01  1:22   ` Bruce Ashfield
2018-10-09  3:13     ` Changqing Li
2018-10-09  4:47       ` Changqing Li
2018-10-09  3:14     ` Changqing Li
2018-10-09  9:19       ` Changqing Li
2018-10-09 12:41         ` Bruce Ashfield
2018-10-10  2:06           ` Changqing Li
2018-09-30  3:17 ` [PATCH] docker: fix package qa warning changqing.li
2018-10-01  1:23   ` Bruce Ashfield
2018-10-02 18:42     ` M. Asselstine
2018-10-09  4:53       ` Changqing Li
2018-09-30  3:17 ` [PATCH] oci-image-tools: fix do " changqing.li
2018-09-30  3:17 ` [PATCH] oci-runtime-tools: " changqing.li
2018-10-01  1:15 ` [PATCH] docker-distribution: fix do package qa warning[ldflags] Bruce Ashfield
2018-10-09  5:08   ` Changqing Li
2018-10-10  6:59 [PATCH][meta-cloud-services] consul: add INSANE_SKIP for textrel changqing.li
2018-10-10  6:59 ` [PATCH] oci-image-tools: fix do package qa warning changqing.li
2018-10-11 18:38   ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.