-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next tar-rs
update creates sparse entries by default
#14594
Comments
As a further note, I've publisehed tar 0.4.42 with this change |
@alexcrichton is there a reason this didn't justify a breaking release? |
Honestly I just didn't even think about it. It's API-compatible and backwards-compatible for versions ~8 years back, though, so I'm not sure it'd warrant a breaking release. I figured Cargo might want a heads up though since it may want more compat than that. |
Since a new release has already come out, I would suggest we proactively bump to |
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 everywhere the `tar::Builder` is used. See rust-lang#14594.
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 rust-lang#14594.
Recently, the
tar
crate got support for creating archives with sparse entries (alexcrichton/tar-rs#375). It is going to be enabled by default in the next release.For Cargo (which depends on this crate), keeping the default would mean that some very old versions of Cargo would not be able to read some archives created by the latest Cargo. Specifically, the ability to read sparse entries was added in
tar
0.4.6
(released 2016-06-09). The correspondingtar-rs
bump for Cargo was #2973, which is included in Cargo0.13
which is included in rust1.12
.The sparseness check does not affect Rust source files (as text files generally do not contain large chunks of null bytes), but it may affect crates containing binary files. For example,
protobuf-build
andmetal
crates contain binaries that could possibly be sparse. The commandrg -ca '\x00{4096}' ~/.cargo/registry/
might reveal other similar binaries.I'm creating this issue at the request of @alexcrichton to let the Cargo team decide whether to
ar.sparse(false)
calls explicitly everywheretar::Builder
is used.The text was updated successfully, but these errors were encountered: