mbox

[0/3] Use frozen flag for cargo build

Message ID cover.1690981978.git.frederic.martinsons@gmail.com
State Not Applicable, archived
Headers show

Pull-request

https://gitlab.com/fmartinsons/openembedded-core 15104-check-cargo-lock

Message

Frédéric Martinsons Aug. 2, 2023, 1:16 p.m. UTC
From: Frederic Martinsons <frederic.martinsons@gmail.com>

This patch series force the usage of --frozen instead of --offline during cargo build.
This has the advantage to be sure that Cargo.lock file will not be modified.
Moreover, raise a clear error when Cargo.lock is not present.
For this to work, we must modify ourself the Cargo.lock before building
in case there are git repo that have been patched.

The last commit was for removing rust-hello-world, patch to the
documentation project will follow.

The following changes since commit 692e414aed5313ff275b69e93179aa7c559700f3:

  ffmpeg: Fix wrong code found with gas/2.41 (2023-08-01 09:49:14 +0100)

are available in the Git repository at:

  https://gitlab.com/fmartinsons/openembedded-core 15104-check-cargo-lock

Frederic Martinsons (3):
  cargo.bbclass: Use --frozen flag for cargo operations
  cargo_common.bbclass: Handle Cargo.lock modifications for git
    dependencies
  drop rust-hello-world recipe

 meta/classes-recipe/cargo.bbclass             |  7 +++-
 meta/classes-recipe/cargo_common.bbclass      | 41 +++++++++++++++++++
 meta/conf/distro/include/maintainers.inc      |  1 -
 meta/lib/oeqa/runtime/cases/rust.py           | 12 ------
 .../packagegroup-core-tools-testapps.bb       |  3 --
 .../rust-hello-world/0001-enable-LTO.patch    | 24 -----------
 .../rust-example/rust-hello-world_git.bb      | 19 ---------
 7 files changed, 47 insertions(+), 60 deletions(-)
 delete mode 100644 meta/recipes-extended/rust-example/rust-hello-world/0001-enable-LTO.patch
 delete mode 100644 meta/recipes-extended/rust-example/rust-hello-world_git.bb

Comments

Frédéric Martinsons Aug. 2, 2023, 3:06 p.m. UTC | #1
Le mer. 2 août 2023, 15:16, <frederic.martinsons@gmail.com> a écrit :

> From: Frederic Martinsons <frederic.martinsons@gmail.com>
>
> This patch series force the usage of --frozen instead of --offline during
> cargo build.
> This has the advantage to be sure that Cargo.lock file will not be
> modified.
> Moreover, raise a clear error when Cargo.lock is not present.
> For this to work, we must modify ourself the Cargo.lock before building
> in case there are git repo that have been patched.
>
> The last commit was for removing rust-hello-world, patch to the
> documentation project will follow.
>
> The following changes since commit
> 692e414aed5313ff275b69e93179aa7c559700f3:
>
>   ffmpeg: Fix wrong code found with gas/2.41 (2023-08-01 09:49:14 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/fmartinsons/openembedded-core 15104-check-cargo-lock
>
> Frederic Martinsons (3):
>   cargo.bbclass: Use --frozen flag for cargo operations
>   cargo_common.bbclass: Handle Cargo.lock modifications for git
>     dependencies
>   drop rust-hello-world recipe
>
>  meta/classes-recipe/cargo.bbclass             |  7 +++-
>  meta/classes-recipe/cargo_common.bbclass      | 41 +++++++++++++++++++
>  meta/conf/distro/include/maintainers.inc      |  1 -
>  meta/lib/oeqa/runtime/cases/rust.py           | 12 ------
>  .../packagegroup-core-tools-testapps.bb       |  3 --
>  .../rust-hello-world/0001-enable-LTO.patch    | 24 -----------
>  .../rust-example/rust-hello-world_git.bb      | 19 ---------
>  7 files changed, 47 insertions(+), 60 deletions(-)
>  delete mode 100644
> meta/recipes-extended/rust-example/rust-hello-world/0001-enable-LTO.patch
>  delete mode 100644 meta/recipes-extended/rust-example/
> rust-hello-world_git.bb
>
> --
> 2.34.1
>

Sorry, I missed the v2 part in header. These are the follow up after
remarks made yesterday (about removal of rust-hello-world and robustness
when modifying Cargo.lock file in place)

>