* [meta-virtualization][PATCH V2] docker-compose: fix textrel QA issue
@ 2023-09-27 5:54 Qi.Chen
2023-10-02 16:16 ` Bruce Ashfield
0 siblings, 1 reply; 2+ messages in thread
From: Qi.Chen @ 2023-09-27 5:54 UTC (permalink / raw)
To: meta-virtualization
From: Chen Qi <Qi.Chen@windriver.com>
Fix textrel QA issue like below:
ERROR: QA Issue: docker-compose: ELF binary /usr/lib/docker/cli-plugins/
docker-compose has relocations in .text [textrel]
The problem could be fixed by adding -buildmode=pie, as this option has
already been in GOBUILDFLAGS except for mips and riscv32, let's make
use of GOBUILDFLAGS.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
recipes-containers/docker-compose/docker-compose_git.bb | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/recipes-containers/docker-compose/docker-compose_git.bb b/recipes-containers/docker-compose/docker-compose_git.bb
index d528535c..f6a2502a 100644
--- a/recipes-containers/docker-compose/docker-compose_git.bb
+++ b/recipes-containers/docker-compose/docker-compose_git.bb
@@ -38,6 +38,7 @@ PACKAGECONFIG ?= ""
include relocation.inc
+GOBUILDFLAGS:append = " -mod=vendor"
do_compile() {
cd ${S}/src/import
@@ -50,8 +51,6 @@ do_compile() {
export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
- export GOFLAGS="-mod=vendor -trimpath"
-
# our copied .go files are to be used for the build
ln -sf vendor.copy vendor
# inform go that we know what we are doing
@@ -60,7 +59,7 @@ do_compile() {
GO_LDFLAGS="-s -w -X internal.Version=${PV} -X ${COMPOSE_PKG}/internal.Version=${PV}"
GO_BUILDTAGS=""
mkdir -p ./bin
- ${GO} build $GOFLAGS -tags "$GO_BUILDTAGS" -ldflags "$GO_LDFLAGS" -o ./bin/docker-compose ./cmd
+ ${GO} build ${GOBUILDFLAGS} -tags "$GO_BUILDTAGS" -ldflags "$GO_LDFLAGS" -o ./bin/docker-compose ./cmd
}
do_install() {
--
2.40.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [meta-virtualization][PATCH V2] docker-compose: fix textrel QA issue
2023-09-27 5:54 [meta-virtualization][PATCH V2] docker-compose: fix textrel QA issue Qi.Chen
@ 2023-10-02 16:16 ` Bruce Ashfield
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2023-10-02 16:16 UTC (permalink / raw)
To: Qi.Chen; +Cc: meta-virtualization
merged.
Bruce
In message: [meta-virtualization][PATCH V2] docker-compose: fix textrel QA issue
on 26/09/2023 Chen Qi via lists.yoctoproject.org wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> Fix textrel QA issue like below:
>
> ERROR: QA Issue: docker-compose: ELF binary /usr/lib/docker/cli-plugins/
> docker-compose has relocations in .text [textrel]
>
> The problem could be fixed by adding -buildmode=pie, as this option has
> already been in GOBUILDFLAGS except for mips and riscv32, let's make
> use of GOBUILDFLAGS.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> recipes-containers/docker-compose/docker-compose_git.bb | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/recipes-containers/docker-compose/docker-compose_git.bb b/recipes-containers/docker-compose/docker-compose_git.bb
> index d528535c..f6a2502a 100644
> --- a/recipes-containers/docker-compose/docker-compose_git.bb
> +++ b/recipes-containers/docker-compose/docker-compose_git.bb
> @@ -38,6 +38,7 @@ PACKAGECONFIG ?= ""
>
> include relocation.inc
>
> +GOBUILDFLAGS:append = " -mod=vendor"
> do_compile() {
> cd ${S}/src/import
>
> @@ -50,8 +51,6 @@ do_compile() {
> export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
> export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
>
> - export GOFLAGS="-mod=vendor -trimpath"
> -
> # our copied .go files are to be used for the build
> ln -sf vendor.copy vendor
> # inform go that we know what we are doing
> @@ -60,7 +59,7 @@ do_compile() {
> GO_LDFLAGS="-s -w -X internal.Version=${PV} -X ${COMPOSE_PKG}/internal.Version=${PV}"
> GO_BUILDTAGS=""
> mkdir -p ./bin
> - ${GO} build $GOFLAGS -tags "$GO_BUILDTAGS" -ldflags "$GO_LDFLAGS" -o ./bin/docker-compose ./cmd
> + ${GO} build ${GOBUILDFLAGS} -tags "$GO_BUILDTAGS" -ldflags "$GO_LDFLAGS" -o ./bin/docker-compose ./cmd
> }
>
> do_install() {
> --
> 2.40.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8324): https://lists.yoctoproject.org/g/meta-virtualization/message/8324
> Mute This Topic: https://lists.yoctoproject.org/mt/101612602/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-02 16:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-27 5:54 [meta-virtualization][PATCH V2] docker-compose: fix textrel QA issue Qi.Chen
2023-10-02 16:16 ` 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.