Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: karem.ibrahim46@gmail.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 1/1] Added a new cargo-online bbclass for recipes requiring remote crates
Date: Fri, 22 Nov 2024 17:02:11 +0000	[thread overview]
Message-ID: <5dee23092f00a4607ae0ce0b50f23fdd4798d0d4.camel@linuxfoundation.org> (raw)
In-Reply-To: <20241122133140.1627-2-karem.ibrahim46@gmail.com>

On Fri, 2024-11-22 at 15:31 +0200, Kareem Ibrahim via lists.openembedded.org wrote:
> - This change was intended to abstract user from having to set compile network flag to get remote crates
> - as network access was disabled by default in kirkstone version
> - I faced an do_compile error with bitbaking Qualcomm qcrosvm under yocto kirkstone with message "Could not resolve host: github.com"
> - And after some hours of debugging I noticed that cargo inherited by recipe needs remote crates during do_compile of the cargo.bbclass
> - It was fixed by adding line do_compile[network] = "1" to the recipe
> - So I found it more convenient, since cargo build usually need network access, to abstract users from these details of cargo.bbclass do_compile
> 
> Signed-off-by: Kareem Ibrahim <karem.ibrahim46@gmail.com>
> ---
>  meta/classes/cargo-online.bbclass | 7 +++++++
>  1 file changed, 7 insertions(+)
>  create mode 100644 meta/classes/cargo-online.bbclass
> 
> diff --git a/meta/classes/cargo-online.bbclass b/meta/classes/cargo-online.bbclass
> new file mode 100644
> index 0000000000..175c94e09d
> --- /dev/null
> +++ b/meta/classes/cargo-online.bbclass
> @@ -0,0 +1,7 @@
> +# This bbclass is added to abstract recipes writers from
> +# having to set do_compile network flag to 1
> +# if his cargo package need external remote crates
> +# as network access was disabled by default since kirkstone version
> +
> +inherit cargo
> +do_compile[network] = "1"
> \ No newline at end of file
> 

We can't take a change like this unfortunately. Fetching outside
do_fetch means DL_DIR is not populated, our source mirrors would work
and our software/license manifests are incomplete, all things which we
have people relying upon (including for legal review).

As has been mentioned, we have made changes to cargo since kirkstone to
allow all the crates to be specified in SRC_URI so I'd hope there is no
need for this change in more recent versions of the project.

Cheers,

Richard



      parent reply	other threads:[~2024-11-22 17:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 13:31 [PATCH 0/1] *** SUBJECT HERE *** Kareem Ibrahim
2024-11-22 13:31 ` [PATCH 1/1] Added a new cargo-online bbclass for recipes requiring remote crates Kareem Ibrahim
2024-11-22 13:40   ` [OE-core] " Martin Jansa
2024-11-22 15:18     ` Kareem Ibrahim
2024-11-22 16:28       ` Martin Jansa
2024-11-22 13:46   ` Patchtest results for " patchtest
2024-11-22 17:02   ` Richard Purdie [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=5dee23092f00a4607ae0ce0b50f23fdd4798d0d4.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=karem.ibrahim46@gmail.com \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox