buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: James Hilliard <james.hilliard1@gmail.com>,
	Buildroot List <buildroot@buildroot.org>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH 5/7] support/download/cargo-post-process: make manifest path configurable
Date: Fri,  7 Jan 2022 18:13:15 +0100	[thread overview]
Message-ID: <20220107171318.1423075-6-thomas.petazzoni@bootlin.com> (raw)
In-Reply-To: <20220107171318.1423075-1-thomas.petazzoni@bootlin.com>

In most pure Rust packages, the Cargo.toml manifest is at the root
directory, which is why we could call "cargo vendor" without
specifying the path of the manifest.

However, other packages, such as python-cryptography, which have parts
implemented in Rust, have their Cargo.toml located in a specific
subdirectory.

This commit extends the cargo-post-process download script to
understand a BR_CARGO_MANIFEST_PATH environment variable, which allows
a package to pass the location of the Cargo.toml file. If not passed,
"Cargo.toml" is used, preserving the existing behavior for other
packages.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 support/download/cargo-post-process | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/support/download/cargo-post-process b/support/download/cargo-post-process
index 25dbbedbfa..51d9dd24c1 100755
--- a/support/download/cargo-post-process
+++ b/support/download/cargo-post-process
@@ -22,7 +22,7 @@ post_process_unpack ${base_name} ${output}
 
 # Do the Cargo vendoring
 pushd ${base_name} > /dev/null
-cargo vendor --locked VENDOR
+cargo vendor --manifest-path ${BR_CARGO_MANIFEST_PATH-Cargo.toml} --locked VENDOR
 
 # Create the local .cargo/config with vendor info
 mkdir -p .cargo/
-- 
2.33.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2022-01-07 17:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07 17:13 [Buildroot] [PATCH 0/7] Bump of python-cryptography and other Rust related fun Thomas Petazzoni
2022-01-07 17:13 ` [Buildroot] [PATCH 1/7] package/ca-certificates: remove dependency on host-python-cryptography Thomas Petazzoni
2022-01-07 17:13 ` [Buildroot] [PATCH 2/7] package/python-cryptography: drop host variant Thomas Petazzoni
2022-01-07 17:13 ` [Buildroot] [PATCH 3/7] package/rustc: fix BR2_PACKAGE_HOST_RUSTC_ARCH for ARMv5 Thomas Petazzoni
2022-01-07 17:57   ` Thomas Petazzoni
2022-01-07 17:13 ` [Buildroot] [PATCH 4/7] package/rustc: fix the riscv64gc architecture handling Thomas Petazzoni
2022-01-08  0:23   ` Alistair Francis
2022-01-07 17:13 ` Thomas Petazzoni [this message]
2022-01-07 17:13 ` [Buildroot] [PATCH 6/7] support/testing/tests: switch python-cryptography related tests to glibc Thomas Petazzoni
2022-01-07 17:13 ` [Buildroot] [PATCH 7/7] DO-NOT-APPLY package/python-cryptography: bump version to 36.0.1 Thomas Petazzoni
2022-01-08 16:52 ` [Buildroot] [PATCH 0/7] Bump of python-cryptography and other Rust related fun Arnout Vandecappelle
2022-01-09 11:16 ` Thomas Petazzoni

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=20220107171318.1423075-6-thomas.petazzoni@bootlin.com \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@buildroot.org \
    --cc=james.hilliard1@gmail.com \
    --cc=yann.morin.1998@free.fr \
    /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;
as well as URLs for NNTP newsgroup(s).