All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Ashfield <bruce.ashfield@gmail.com>
To: Qi.Chen@windriver.com
Cc: meta-virtualization@lists.yoctoproject.org
Subject: Re: [meta-virtualization][PATCH] nerdctl: fix textrel QA issue
Date: Mon, 25 Sep 2023 01:23:53 +0000	[thread overview]
Message-ID: <ZRDhKSMSQOrVb7+M@gmail.com> (raw)
In-Reply-To: <20230920051803.2385542-1-Qi.Chen@windriver.com>

merged.

Bruce

In message: [meta-virtualization][PATCH] nerdctl: fix textrel QA issue
on 19/09/2023 Chen Qi via lists.yoctoproject.org wrote:

> From: Chen Qi <Qi.Chen@windriver.com>
> 
> Fix the following QA issue:
> 
>   ERROR: QA Issue: nerdctl: ELF binary /usr/bin/nerdctl has relocations in .text [textrel]
> 
> We want to use -buildmode=pie, in order to avoid duplicating codes with
> go.bbclass, make use of GOBUILDFLAGS.
> 
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  recipes-containers/nerdctl/nerdctl_git.bb | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/recipes-containers/nerdctl/nerdctl_git.bb b/recipes-containers/nerdctl/nerdctl_git.bb
> index 62460a52..f68223df 100644
> --- a/recipes-containers/nerdctl/nerdctl_git.bb
> +++ b/recipes-containers/nerdctl/nerdctl_git.bb
> @@ -51,6 +51,8 @@ PACKAGECONFIG ?= ""
>  # sets the "sites" variable.
>  include relocation.inc
>  
> +PIEFLAG = "${@bb.utils.contains('GOBUILDFLAGS', '-buildmode=pie', '-buildmode=pie', '', d)}"
> +
>  do_compile() {
>  
>      	cd ${S}/src/import
> @@ -64,7 +66,7 @@ do_compile() {
>  	export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
>  	export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
>  
> -	export GOFLAGS="-mod=vendor -trimpath"
> +	export GOFLAGS="-mod=vendor -trimpath ${PIEFLAG}"
>  
>  	# our copied .go files are to be used for the build
>  	ln -sf vendor.copy vendor
> -- 
> 2.40.0
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8313): https://lists.yoctoproject.org/g/meta-virtualization/message/8313
> Mute This Topic: https://lists.yoctoproject.org/mt/101473054/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



      reply	other threads:[~2023-09-25  1:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20  5:18 [meta-virtualization][PATCH] nerdctl: fix textrel QA issue Qi.Chen
2023-09-25  1:23 ` Bruce Ashfield [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZRDhKSMSQOrVb7+M@gmail.com \
    --to=bruce.ashfield@gmail.com \
    --cc=Qi.Chen@windriver.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.