<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes-recipe/cargo-update-recipe-crates.bbclass, branch 5.1_M2</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=5.1_M2</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=5.1_M2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2024-06-13T08:11:17+00:00</updated>
<entry>
<title>cargo-update-recipe-crates: add RECIPE_UPDATE_EXTRA_TASKS</title>
<updated>2024-06-13T08:11:17+00:00</updated>
<author>
<name>Tim Orling</name>
<email>tim.orling@konsulko.com</email>
</author>
<published>2024-06-12T17:33:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=5676d39218097ac78a3a2335fd4f6bedd9dcf150'/>
<id>urn:sha1:5676d39218097ac78a3a2335fd4f6bedd9dcf150</id>
<content type='text'>
When we upgrade a recipe that inherits cargo-update-recipe-crates and
the upstream Cargo.toml/Cargo.lock have been changed, we need to run
the update_crates task or else the devtool upgrade (and therefore
AUH upgrade) will fail.

Add "do_update_crates" task to RECIPE_UPDATE_EXTRA_TASKS for all
recipes that inherit this class.

(From OE-Core rev: 0156ab3e009fa789c629f6c0ab06fcf21add94f8)

Signed-off-by: Tim Orling &lt;tim.orling@konsulko.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cargo-update-recipe-crates.bbclass: Do not add name= to crate:// URIs</title>
<updated>2023-04-06T13:28:59+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2023-04-06T12:57:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=46dafcedf93d62abfa38f74b765cc2b98757467f'/>
<id>urn:sha1:46dafcedf93d62abfa38f74b765cc2b98757467f</id>
<content type='text'>
With the recent change to the crate fetcher, which automatically sets
the name to for each crate to be versioned, there is no longer a need to
explicitly set the name= parameter for each URI. This also results in
generated files that are compatible with the crate fetcher in Kirkstone
and Langdale.

(From OE-Core rev: eb272afcd9a12ce2b2f43436b3f84f52cb6cdfb7)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cargo-update-recipe-crates: force name overrides</title>
<updated>2023-04-01T10:36:26+00:00</updated>
<author>
<name>Frederic Martinsons</name>
<email>frederic.martinsons@gmail.com</email>
</author>
<published>2023-03-31T05:45:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=476890160aafe66d6bfd4737ca49cc425d0a3a4c'/>
<id>urn:sha1:476890160aafe66d6bfd4737ca49cc425d0a3a4c</id>
<content type='text'>
A project can have multiple Cargo.lock (provides
multiple binaries for example) and each one can
depends on differenct version of the same crates.
Even within the same Cargo.lock file, it is possible
to have different version of same crates.

To avoid conflicts, override the name with the version
for all crates checksum

Moreover, when searching for Cargo.lock, we should ignore
specific dir like .git (no use to walk down there) and .pc
(because it can have a Cargo.lock if this file was patched)

(From OE-Core rev: 1795e98a04ad09b011afcc7cc3bf6dc49475b19a)

Signed-off-by: Frederic Martinsons &lt;frederic.martinsons@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cargo-update-recipe-crates: generate checksum for each crates</title>
<updated>2023-03-30T09:49:01+00:00</updated>
<author>
<name>Frederic Martinsons</name>
<email>frederic.martinsons@gmail.com</email>
</author>
<published>2023-03-16T12:12:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=eef7fbea2c5bf59369390be4d5efa915591b7b22'/>
<id>urn:sha1:eef7fbea2c5bf59369390be4d5efa915591b7b22</id>
<content type='text'>
This is related to checksum verification introduction from
https://patchwork.yoctoproject.org/project/bitbake/patch/20230315131513.50635-1-frederic.martinsons@gmail.com/

I also choose to raise an exception if:
 - no crates can be found
 - no Cargo.lock file exist

Otherwise the generated inc file will silently be emptied.

(From OE-Core rev: c75b924a3de02625aa90ad4db4403f00d1ffeba2)

Signed-off-by: Frederic Martinsons &lt;frederic.martinsons@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cargo-update-recipe-crates.bbclass: Mark the update_crates task as nostamp</title>
<updated>2023-01-26T21:57:48+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>peter.kjellerstedt@axis.com</email>
</author>
<published>2023-01-25T22:55:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bcc22368c9132a4c28c9a910f6e968da51ffa6f2'/>
<id>urn:sha1:bcc22368c9132a4c28c9a910f6e968da51ffa6f2</id>
<content type='text'>
If having devtool modified a recipe and then updated the crate versions,
e.g., by doing a git bisect, running the update_crates task needs to
always update the .inc file even if the bitbake metadata has not
changed.

(From OE-Core rev: 137d290ac1f7516a509fc9d264489e51c3004d5d)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cargo-update-recipe-crates: small improvements</title>
<updated>2022-11-03T07:46:47+00:00</updated>
<author>
<name>Martin Jansa</name>
<email>Martin.Jansa@gmail.com</email>
</author>
<published>2022-11-02T08:12:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=99350f44b2b215bd84f873a6ce653c4d386db8b0'/>
<id>urn:sha1:99350f44b2b215bd84f873a6ce653c4d386db8b0</id>
<content type='text'>
* use 4 spaces
* avoid trailing space
* add CARGO_LOCK_SRC_DIR to allow searching outside ${S}
* use BPN in output filename
* First I've used CARGO_LOCK_SRC_DIR as relative to ${S}, because that's what CARGO_SRC_DIR
  in cargo.bbclass is using:
  meta/classes-recipe/cargo.bbclass:CARGO_SRC_DIR ??= ""
  meta/classes-recipe/cargo.bbclass:MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml"

  but change to absolute path (defaulting to ${S}) as requested by Alex:
  11:44 &lt; kanavin&gt; JaMa, would prefer CARGO_LOCK_SRC_DIR ??= "${S}"
  11:46 &lt; kanavin&gt; otherwise looks good

* I've resolved my usecase for CARGO_LOCK_SRC_DIR by changing
  S back to ${WORKDIR}/git and using CARGO_SRC_DIR to select
  the right subdirectory to be built, because the Cargo.toml
  in this subdirectory was also referencing other subdirectories
  with relative path:
  https://github.com/solana-labs/solana-program-library/blob/88b147506d5b9515f3a4762421a0b8c309188dc9/token/cli/Cargo.toml#L30
  so including all Cargo.lock files in whole ${WORKDIR}/git
  seems like reasonable approach

(From OE-Core rev: 7636a2b8080521ed2ad54b0edce47a8742a12d58)

Signed-off-by: Martin Jansa &lt;Martin.Jansa@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cargo-update-recipe-crates.bbclass: add a class to generate SRC_URI crate lists from Cargo.lock</title>
<updated>2022-11-01T17:34:58+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex.kanavin@gmail.com</email>
</author>
<published>2022-10-31T11:47:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6a5b4d84288904957f99446ebc5629302554df89'/>
<id>urn:sha1:6a5b4d84288904957f99446ebc5629302554df89</id>
<content type='text'>
For better or worse, more and more rust components are appearing that do
not include their dependencies in tarballs (or git trees), and rely on cargo
to fetch them. On the other hand, bitbake does not use cargo (and quite possible
won't ever be able to), and relies on having each item explicitly listed in SRC_URI
with a crate:// prefix. This however creates a problem of both making such lists in
the first place and updating them when a recipe is updated to a newer version.

So this class can be used to perform such updates by implementing a task that does it;
the next commit shows the outcome for python3-bcrypt (which has been tested to work
and produce a successful build).

Note: the python script relies on tomllib library, which appears in Python 3.11 and
does not exist in earlier versions - I've tested this by first updating python to 3.11-rc2
in oe-core.

(From OE-Core rev: 9eee3631124d64574b18a70a2fc42f446d58bfd2)

Signed-off-by: Alexander Kanavin &lt;alex@linutronix.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
