diff mbox series

[1/1] support/download: replace deprecated .cargo/config

Message ID 20250422102451.3987515-1-fiona.klute@gmx.de
State New
Headers show
Series [1/1] support/download: replace deprecated .cargo/config | expand

Commit Message

Fiona Klute April 22, 2025, 10:24 a.m. UTC
From: "Fiona Klute (WIWA)" <fiona.klute@gmx.de>

With the current vendoring process, any Cargo build emits the
following warning:

warning: `.../.cargo/config` is deprecated in favor of `config.toml`

.cargo/config.toml was introduced in 1.39 [1], so there shouldn't be
backwards compatibility issues in Buildroot. However, because the
generated config file becomes part of the vendored archive, this
changes the hashes of all Cargo-based packages.

[1] https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure

Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
---
With the pending Rust 1.86 update requiring a -cargo3 archive version
anyway [1], this seems like a good time to switch the config file away
from the deprecated version (otherwise we'd need another archive
version bump). This patch should be applied together with that series
before regenerating the generated archive hashes.

[1] https://patchwork.ozlabs.org/project/buildroot/patch/20250422074738.821755-4-elmehdi.younes@smile.fr/

 support/download/cargo-post-process | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/support/download/cargo-post-process b/support/download/cargo-post-process
index 12198051a4..b0e59ad74d 100755
--- a/support/download/cargo-post-process
+++ b/support/download/cargo-post-process
@@ -31,14 +31,14 @@  post_process_unpack "${base_name}" "${output}"
 # Do the Cargo vendoring
 pushd "${base_name}" > /dev/null
 
-# Create the local .cargo/config with vendor info
+# Create the local .cargo/config.toml with vendor info
 mkdir -p .cargo/
 mkdir -p "${CARGO_HOME}"
 flock "${CARGO_HOME}"/.br-lock \
 cargo vendor \
     --manifest-path "${manifest}" \
     --locked VENDOR \
-    > .cargo/config
+    > .cargo/config.toml
 
 # "cargo vendor' outputs on stderr a message directing to add some data
 # to the project's .cargo/config.toml, data that it outputs on stdout.