mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
chore(deps): update tar to 0.4.42
The new version of tar enables the creation of sparse tar archives by default. The ability to read such sparse entries was added in tar 0.4.6, which has been in use starting from Cargo 0.13 and Rust 1.12. Additionally, `docker cp` doesn't support sparse tar entries in the GNU format. For compatibility with older versions of Rust and Cargo, as well as with `docker cp`, this commit disables sparse archive creation in the corresponding cases where the `tar::Builder` is used. See #14594.
This commit is contained in:
parent
fd5f1a05c1
commit
0c74d2449d
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -3371,9 +3371,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tar"
|
||||
version = "0.4.41"
|
||||
version = "0.4.42"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909"
|
||||
checksum = "4ff6c40d3aedb5e06b57c6f669ad17ab063dd1e63d977c6a88e7f4dfa4f04020"
|
||||
dependencies = [
|
||||
"filetime",
|
||||
"libc",
|
||||
|
@ -94,7 +94,7 @@ shell-escape = "0.1.5"
|
||||
similar = "2.6.0"
|
||||
supports-hyperlinks = "3.0.0"
|
||||
snapbox = { version = "0.6.17", features = ["diff", "dir", "term-svg", "regex", "json"] }
|
||||
tar = { version = "0.4.41", default-features = false }
|
||||
tar = { version = "0.4.42", default-features = false }
|
||||
tempfile = "3.10.1"
|
||||
thiserror = "1.0.63"
|
||||
time = { version = "0.3.36", features = ["parsing", "formatting", "serde"] }
|
||||
|
@ -122,6 +122,7 @@ impl Container {
|
||||
return;
|
||||
}
|
||||
let mut ar = tar::Builder::new(Vec::new());
|
||||
ar.sparse(false);
|
||||
let files = std::mem::replace(&mut self.files, Vec::new());
|
||||
for mut file in files {
|
||||
ar.append_data(&mut file.header, &file.path, file.contents.as_slice())
|
||||
|
@ -1513,6 +1513,7 @@ impl Package {
|
||||
t!(fs::create_dir_all(dst.parent().unwrap()));
|
||||
let f = t!(File::create(&dst));
|
||||
let mut a = Builder::new(GzEncoder::new(f, Compression::none()));
|
||||
a.sparse(false);
|
||||
|
||||
if !self
|
||||
.files
|
||||
|
@ -903,6 +903,7 @@ fn tar(
|
||||
|
||||
// Put all package files into a compressed archive.
|
||||
let mut ar = Builder::new(encoder);
|
||||
ar.sparse(false);
|
||||
let gctx = ws.gctx();
|
||||
|
||||
let base_name = format!("{}-{}", pkg.name(), pkg.version());
|
||||
|
Loading…
x
Reference in New Issue
Block a user