Skip to contentSkip to conversation

consul: add INSANE_SKIP for textrel

PATCH In review [email protected] 2 participants 12 messages Oct 10, 2018 – Oct 11, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 consul: add INSANE_SKIP for textrel

From: Changqing Li <[email protected]>

1. for i586, bitbake consul will have QA error of textrel. consul-git-r0 do_package_qa: QA Issue: ELF binary i 'work/i586-wrs-linux/consul/git-r0/packages-split/consul/usr/bin/consul' has relocations in .text [textrel]

according to go doc:
-buildmode=pie
Build the listed main packages and everything they import into position independent executables (PIE). Packages not named main are ignored.

checked use command "eu-findtextrel ./consul", functions not compiled with -fpic/-fPIC are from packages not named main, and also not imported into package main.

so -buildmode=pie cannot reslove this problem. so refer commit b689c72a of oe-core, just skip it.

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

---
 recipes-connectivity/consul/consul_git.bb | 3 +++
 1 file changed, 3 insertions(+)
recipes-connectivity/consul/consul_git.bb +3 -0
index a44e0b2..ee49c5e 100644
@@ -23,3 +23,6 @@ do_install_append() {
 }
 
 FILES_${PN} += "${systemd_unitdir}/system"
+
+#for i586, executable consul contains textrel
+INSANE_SKIP_${PN} += "textrel"
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 docker-distribution: fix do package qa warning[ldflags]

From: Changqing Li <[email protected]>

when bitbake lib32-docker-distribution, we might met below warning:

lib32-docker-distribution-v2.6.2-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary: 'work/core2-32-wrsmllib32-linux/lib32-docker-distribution /v2.6.2-r0/packages-split/lib32-docker-registry/usr/sbin/registry' [ldflags]

which caused by "INSANE_SKIP_docker-registry += "ldflags already-stripped" don't cover case for multilib, so add multilib prefix MLPREFIX to fix it.

---
 recipes-containers/docker-distribution/docker-distribution_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/docker-distribution/docker-distribution_git.bb +1 -1
index add5ce1..d4f8098 100644
@@ -57,7 +57,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"
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH] docker-distribution: fix do package qa warning[ldflags]

merged

Bruce

Quoted 40 lines · On Wed, Oct 10, 2018 at 2:59 AM <[email protected]> wrote:

From: Changqing Li <[email protected]>

when bitbake lib32-docker-distribution, we might met below warning:

lib32-docker-distribution-v2.6.2-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary: 'work/core2-32-wrsmllib32-linux/lib32-docker-distribution /v2.6.2-r0/packages-split/lib32-docker-registry/usr/sbin/registry' [ldflags]

which caused by "INSANE_SKIP_docker-registry += "ldflags already-stripped" don't cover case for multilib, so add multilib prefix MLPREFIX to fix it.

---
 recipes-containers/docker-distribution/docker-distribution_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/docker-distribution/docker-distribution_git.bb +1 -2
index add5ce1..d4f8098 100644
@@ -57,7 +57,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
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#3 lore raw

PATCH 1/1 docker: fix do package qa warning

In reply to [email protected]

From: Changqing Li <[email protected]>

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

WARNING: docker-18.03.0+git708b068d3095c6a6be939eb2da78c921d2e945e2-r0
do_package_qa: QA Issue: ELF binary 'work/aarch64-poky-linux/docker/ 18.03.0+git708b068d3095c6a6be939eb2da78c921d2e945e2-r0/packages-split/ docker/usr/bin/docker' 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-docker = "${SECURITY_NOPIE_CFLAGS}" SECURITY_LDFLAGS_pn-docker = ""

---
 recipes-containers/docker/docker_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/docker/docker_git.bb +1 -1
index 73e0120..b3673d4 100644
@@ -172,4 +172,4 @@ RDEPENDS_${PN}-contrib += "bash"
 
 # DO NOT STRIP docker
 INHIBIT_PACKAGE_STRIP = "1"
-INSANE_SKIP_${PN} += "ldflags"
+INSANE_SKIP_${PN} += "ldflags textrel"
Signature · 1 line
2.7.4
#4 lore raw

Re: [PATCH] docker: fix do package qa warning

merged

Bruce

Quoted 40 lines · On Wed, Oct 10, 2018 at 3:00 AM <[email protected]> wrote:

From: Changqing Li <[email protected]>

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

WARNING: docker-18.03.0+git708b068d3095c6a6be939eb2da78c921d2e945e2-r0
do_package_qa: QA Issue: ELF binary 'work/aarch64-poky-linux/docker/ 18.03.0+git708b068d3095c6a6be939eb2da78c921d2e945e2-r0/packages-split/ docker/usr/bin/docker' 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-docker = "${SECURITY_NOPIE_CFLAGS}" SECURITY_LDFLAGS_pn-docker = ""

---
 recipes-containers/docker/docker_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/docker/docker_git.bb +1 -2
index 73e0120..b3673d4 100644
@@ -172,4 +172,4 @@ RDEPENDS_${PN}-contrib += "bash"
 
 # DO NOT STRIP docker
 INHIBIT_PACKAGE_STRIP = "1"
-INSANE_SKIP_${PN} += "ldflags"
+INSANE_SKIP_${PN} += "ldflags textrel"
--

2.7.4

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#5 lore raw

PATCH 1/1 oci-image-tools: fix do package qa warning

In reply to [email protected]

From: Changqing Li <[email protected]>

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 = ""

---
 recipes-containers/oci-image-tools/oci-image-tools_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/oci-image-tools/oci-image-tools_git.bb +1 -1
index 807ee26..8c41b6e 100644
@@ -61,4 +61,4 @@ do_install() {
 	install ${S}/src/import/oci-image-tool ${D}/${sbindir}/
 }
 
-INSANE_SKIP_${PN} += "ldflags"
+INSANE_SKIP_${PN} += "ldflags textrel"
Signature · 1 line
2.7.4
#6 lore raw

Re: [PATCH] oci-image-tools: fix do package qa warning

merged

Bruce

Quoted 40 lines · On Wed, Oct 10, 2018 at 2:59 AM <[email protected]> wrote:

From: Changqing Li <[email protected]>

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 = ""

---
 recipes-containers/oci-image-tools/oci-image-tools_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/oci-image-tools/oci-image-tools_git.bb +1 -2
index 807ee26..8c41b6e 100644
@@ -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
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#7 lore raw

PATCH 1/1 docker-distribution: fix do package qa warning [textrel]

In reply to [email protected]

From: Changqing Li <[email protected]>

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

docker-distribution-v2.6.2-r0 do_package_qa: QA Issue: ELF binary 'work/aarch64-poky-linux/docker-distribution/v2.6.2-r0/packages-split/ docker-registry/usr/sbin/registry' 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-docker-distribution = "${SECURITY_NOPIE_CFLAGS}" SECURITY_LDFLAGS_pn-docker-distribution = ""

---
 recipes-containers/docker-distribution/docker-distribution_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/docker-distribution/docker-distribution_git.bb +1 -1
index d4f8098..2892556 100644
@@ -57,7 +57,7 @@ do_install() {
 }
 
 INSANE_SKIP_${PN} += "ldflags already-stripped"
-INSANE_SKIP_${MLPREFIX}docker-registry += "ldflags already-stripped"
+INSANE_SKIP_${MLPREFIX}docker-registry += "ldflags already-stripped textrel"
 
 FILES_docker-registry = "${sbindir}/*"
 FILES_docker-registry += "${systemd_unitdir}/system/docker-registry.service"
Signature · 1 line
2.7.4
#8 lore raw

Re: [PATCH] docker-distribution: fix do package qa warning [textrel]

merged

Bruce

Quoted 42 lines · On Wed, Oct 10, 2018 at 3:00 AM <[email protected]> wrote:

From: Changqing Li <[email protected]>

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

docker-distribution-v2.6.2-r0 do_package_qa: QA Issue: ELF binary 'work/aarch64-poky-linux/docker-distribution/v2.6.2-r0/packages-split/ docker-registry/usr/sbin/registry' 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-docker-distribution = "${SECURITY_NOPIE_CFLAGS}" SECURITY_LDFLAGS_pn-docker-distribution = ""

---
 recipes-containers/docker-distribution/docker-distribution_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/docker-distribution/docker-distribution_git.bb +1 -2
index d4f8098..2892556 100644
@@ -57,7 +57,7 @@ do_install() {
 }
 
 INSANE_SKIP_${PN} += "ldflags already-stripped"
-INSANE_SKIP_${MLPREFIX}docker-registry += "ldflags already-stripped"
+INSANE_SKIP_${MLPREFIX}docker-registry += "ldflags already-stripped textrel"
 
 FILES_docker-registry = "${sbindir}/*"
 FILES_docker-registry += "${systemd_unitdir}/system/docker-registry.service"
--

2.7.4

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#9 lore raw

PATCH 1/1 oci-runtime-tools: fix do package qa warning

In reply to [email protected]

From: Changqing Li <[email protected]>

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-runtime-tools-0.1.0+gitAUTOINC+6e7da8148f-r0 do_package_qa: QA Issue:
ELF binary 'work/aarch64-poky-linux/oci-runtime-tools/0.1.0+gitAUTOINC+6e7 da8148f-r0/packages-split/oci-runtime-tools/usr/sbin/oci-runtime-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-runtime-tools = "${SECURITY_NOPIE_CFLAGS}" SECURITY_LDFLAGS_pn-oci-runtime-tools = ""

---
 recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb +1 -1
index 61b68b5..adbfc1e 100644
@@ -11,7 +11,7 @@ SRCREV = "6e7da8148f4de2c9e9c9d3b345576898d4f412cb"
 PV = "0.1.0+git${SRCPV}"
 GO_IMPORT = "import"
 
-INSANE_SKIP_${PN} += "ldflags"
+INSANE_SKIP_${PN} += "ldflags textrel"
 
 inherit goarch
 inherit go
Signature · 1 line
2.7.4
#10 lore raw

Re: [PATCH] oci-runtime-tools: fix do package qa warning

merged.

Bruce

Quoted 43 lines · On Wed, Oct 10, 2018 at 3:00 AM <[email protected]> wrote:

From: Changqing Li <[email protected]>

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-runtime-tools-0.1.0+gitAUTOINC+6e7da8148f-r0 do_package_qa: QA Issue:
ELF binary 'work/aarch64-poky-linux/oci-runtime-tools/0.1.0+gitAUTOINC+6e7 da8148f-r0/packages-split/oci-runtime-tools/usr/sbin/oci-runtime-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-runtime-tools = "${SECURITY_NOPIE_CFLAGS}" SECURITY_LDFLAGS_pn-oci-runtime-tools = ""

---
 recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-containers/oci-runtime-tools/oci-runtime-tools_git.bb +1 -2
index 61b68b5..adbfc1e 100644
@@ -11,7 +11,7 @@ SRCREV = "6e7da8148f4de2c9e9c9d3b345576898d4f412cb"
 PV = "0.1.0+git${SRCPV}"
 GO_IMPORT = "import"
 
-INSANE_SKIP_${PN} += "ldflags"
+INSANE_SKIP_${PN} += "ldflags textrel"
 
 inherit goarch
 inherit go
--

2.7.4

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#11 lore raw
In reply to [email protected]

merged

Bruce

Quoted 50 lines · On Wed, Oct 10, 2018 at 2:59 AM <[email protected]> wrote:

From: Changqing Li <[email protected]>

1. for i586, bitbake consul will have QA error of textrel. consul-git-r0 do_package_qa: QA Issue: ELF binary i 'work/i586-wrs-linux/consul/git-r0/packages-split/consul/usr/bin/consul' has relocations in .text [textrel]

according to go doc:
-buildmode=pie
Build the listed main packages and everything they import into position independent executables (PIE). Packages not named main are ignored.

checked use command "eu-findtextrel ./consul", functions not compiled with -fpic/-fPIC are from packages not named main, and also not imported into package main.

so -buildmode=pie cannot reslove this problem. so refer commit b689c72a of oe-core, just skip it.

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

---
 recipes-connectivity/consul/consul_git.bb | 3 +++
 1 file changed, 3 insertions(+)
recipes-connectivity/consul/consul_git.bb +3 -1
index a44e0b2..ee49c5e 100644
@@ -23,3 +23,6 @@ do_install_append() {
 }
 
 FILES_${PN} += "${systemd_unitdir}/system"
+
+#for i586, executable consul contains textrel
+INSANE_SKIP_${PN} += "textrel"
--

2.7.4

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"