From 541e990681bc0c059a5fe8b32f60d87d00875de0 Mon Sep 17 00:00:00 2001 From: Khionu Sybiern Date: Sat, 3 Nov 2018 17:29:00 -0400 Subject: [PATCH 1/2] Configure tar to not set mtime Signed-off-by: Khionu Sybiern --- Cargo.toml | 4 ++++ src/cargo/ops/cargo_package.rs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 0866ce233d6..c2f5ee2dede 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,6 +64,10 @@ openssl = { version = '0.10.11', optional = true } # for more information. rustc-workspace-hack = "1.0.0" +# TODO: This patch will be removed before PR merge, when tar has a release containing this patch +[patch.crates-io] +tar = { git = "https://github.com/alexcrichton/tar-rs", rev = "f442964" } + [target.'cfg(target_os = "macos")'.dependencies] core-foundation = { version = "0.6.0", features = ["mac_os_10_7_support"] } diff --git a/src/cargo/ops/cargo_package.rs b/src/cargo/ops/cargo_package.rs index 2b062840d6e..37c82238ad5 100644 --- a/src/cargo/ops/cargo_package.rs +++ b/src/cargo/ops/cargo_package.rs @@ -418,6 +418,9 @@ fn run_verify(ws: &Workspace, tar: &FileLock, opts: &PackageOpts) -> CargoResult paths::remove_dir_all(&dst)?; } let mut archive = Archive::new(f); + // We don't need to set the Modified Time, as it's not relevant to verification + // and it errors on filesystems that don't support setting a modified timestamp + archive.set_preserve_mtime(false); archive.unpack(dst.parent().unwrap())?; // Manufacture an ephemeral workspace to ensure that even if the top-level From 5a594941349fab8384c4f4cb70cb03ede3c0d0f3 Mon Sep 17 00:00:00 2001 From: Khionu Sybiern Date: Mon, 5 Nov 2018 11:42:19 -0500 Subject: [PATCH 2/2] Remove patch and bump tar to 0.4.18 Signed-off-by: Khionu Sybiern --- Cargo.toml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c2f5ee2dede..77cec84c9fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,7 +50,7 @@ serde_derive = "1.0" serde_ignored = "0.0.4" serde_json = { version = "1.0.30", features = ["raw_value"] } shell-escape = "0.1.4" -tar = { version = "0.4.15", default-features = false } +tar = { version = "0.4.18", default-features = false } tempfile = "3.0" termcolor = "1.0" toml = "0.4.2" @@ -64,10 +64,6 @@ openssl = { version = '0.10.11', optional = true } # for more information. rustc-workspace-hack = "1.0.0" -# TODO: This patch will be removed before PR merge, when tar has a release containing this patch -[patch.crates-io] -tar = { git = "https://github.com/alexcrichton/tar-rs", rev = "f442964" } - [target.'cfg(target_os = "macos")'.dependencies] core-foundation = { version = "0.6.0", features = ["mac_os_10_7_support"] }