From f383cbf550a50650738fe7e11739c8da9b2a6f5b Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 8 May 2017 15:01:13 -0700 Subject: [PATCH 1/6] Update to the oxidized rust-installer --- .gitmodules | 2 +- src/Cargo.lock | 165 ++++++++++++++++++++++++++++++++++++- src/Cargo.toml | 1 + src/bootstrap/dist.rs | 46 +++++------ src/bootstrap/step.rs | 13 +++ src/rust-installer | 1 - src/tools/rust-installer | 1 + src/tools/tidy/src/main.rs | 2 +- 8 files changed, 201 insertions(+), 30 deletions(-) delete mode 160000 src/rust-installer create mode 160000 src/tools/rust-installer diff --git a/.gitmodules b/.gitmodules index 7cd896b763f54..791404344ef3a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,7 +13,7 @@ path = src/jemalloc url = https://github.com/rust-lang/jemalloc.git [submodule "src/rust-installer"] - path = src/rust-installer + path = src/tools/rust-installer url = https://github.com/rust-lang/rust-installer.git [submodule "src/liblibc"] path = src/liblibc diff --git a/src/Cargo.lock b/src/Cargo.lock index 3dd8231a49f69..0b6597ce4e836 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -58,6 +58,29 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "backtrace" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "backtrace-sys" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bitflags" version = "0.5.0" @@ -102,6 +125,11 @@ dependencies = [ name = "cargotest2" version = "0.1.0" +[[package]] +name = "cfg-if" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "clap" version = "2.22.1" @@ -115,6 +143,7 @@ dependencies = [ "unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "vec_map 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -158,6 +187,15 @@ dependencies = [ name = "core" version = "0.0.0" +[[package]] +name = "dbghelp-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "diff" version = "0.1.10" @@ -177,6 +215,14 @@ dependencies = [ "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "error-chain" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "error_index_generator" version = "0.0.0" @@ -197,6 +243,15 @@ dependencies = [ "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "flate2" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fmt_macros" version = "0.0.0" @@ -224,7 +279,7 @@ name = "handlebars" version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -233,6 +288,21 @@ dependencies = [ "serde_json 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "installer" +version = "0.0.0" +dependencies = [ + "clap 2.22.1 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "xz2 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "itoa" version = "0.3.1" @@ -249,7 +319,7 @@ dependencies = [ [[package]] name = "lazy_static" -version = "0.2.5" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -273,6 +343,16 @@ name = "log" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lzma-sys" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "mdbook" version = "0.0.21" @@ -298,6 +378,15 @@ dependencies = [ "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "miniz-sys" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-traits" version = "0.1.37" @@ -453,6 +542,11 @@ dependencies = [ "syntax_pos 0.0.0", ] +[[package]] +name = "rustc-demangle" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "rustc-main" version = "0.0.0" @@ -800,6 +894,15 @@ dependencies = [ "syntax_pos 0.0.0", ] +[[package]] +name = "same-file" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "serde" version = "0.9.11" @@ -887,6 +990,16 @@ dependencies = [ "serialize 0.0.0", ] +[[package]] +name = "tar" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", + "xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "term" version = "0.0.0" @@ -980,6 +1093,16 @@ name = "void" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "walkdir" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" @@ -990,28 +1113,57 @@ name = "winapi-build" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "xattr" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "xz2" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lzma-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "yaml-rust" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + [metadata] "checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699" "checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" "checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159" +"checksum backtrace 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f551bc2ddd53aea015d453ef0b635af89444afa5ed2405dd0b2062ad5d600d80" +"checksum backtrace-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d192fd129132fbc97497c1f2ec2c2c5174e376b95f535199ef4fe0a293d33842" "checksum bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f67931368edf3a9a51d29886d245f1c3db2f1ef0dcc9e35ff70341b78c10d23" "checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4" +"checksum cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de1e760d7b6535af4241fca8bd8adf68e2e7edacc6b29f5d399050c5e48cf88c" "checksum clap 2.22.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e17a4a72ffea176f77d6e2db609c6c919ef221f23862c9915e687fb54d833485" "checksum cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "d18d68987ed4c516dcc3e7913659bfa4076f5182eea4a7e0038bb060953e76ac" +"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" "checksum diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0a515461b6c8c08419850ced27bc29e86166dcdcde8fbe76f8b1f0589bb49472" "checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90" "checksum env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e3856f1697098606fc6cb97a93de88ca3f3bc35bb878c725920e6e82ecf05e83" +"checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" "checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922" +"checksum flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "36df0166e856739905cd3d7e0b210fe818592211a008862599845e012d8d304c" "checksum gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "40899336fb50db0c78710f53e87afc54d8c7266fb76262fecc78ca1a7f09deae" "checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" "checksum handlebars 0.25.2 (registry+https://github.com/rust-lang/crates.io-index)" = "663e1728d8037fb0d4e13bcd1b1909fb5d913690a9929eb385922df157c2ff8f" "checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4732c563b9a21a406565c4747daa7b46742f082911ae4753f390dc9ec7ee1a97" +"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" "checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135" "checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad" +"checksum lzma-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "506a25e3491881f47407458f95429d153437d3a5bc4685c747de69e1ec7e897d" "checksum mdbook 0.0.21 (registry+https://github.com/rust-lang/crates.io-index)" = "f1e2e9d848514dcfad4195788d0d42ae5153a477c191d75d5b84fab10f222fbd" "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" +"checksum miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726" "checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99" "checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167" "checksum open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3478ed1686bd1300c8a981a940abc92b06fac9cbef747f4c668d4e032ff7b842" @@ -1023,10 +1175,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9191b1f57603095f105d317e375d19b1c9c5c3185ea9633a99a6dcbed04457" "checksum rls-data 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fc4277ce3c57f456b11fe3145b181a844a25201bab5cbaa1978457e6e2f27d47" "checksum rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d7c7046dc6a92f2ae02ed302746db4382e75131b9ce20ce967259f6b5867a6a" +"checksum rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3058a43ada2c2d0b92b3ae38007a2d0fa5e9db971be260e0171408a4ff471c95" "checksum rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "684ce48436d6465300c9ea783b6b14c4361d6b8dcbb1375b486a69cc19e2dfb0" +"checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" "checksum serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)" = "a702319c807c016e51f672e5c77d6f0b46afddd744b5e437d6b8436b888b458f" "checksum serde_json 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)" = "dbc45439552eb8fb86907a2c41c1fd0ef97458efb87ff7f878db466eb581824e" "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" +"checksum tar 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c2374f318bbe2c5ac6c83dd6240d5f1a73106f72d39b3f7d6f8d8637c7b425d8" "checksum term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "07b6c1ac5b3fffd75073276bca1ceed01f67a28537097a2a9539e116e50fb21a" "checksum thread-id 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4437c97558c70d129e40629a5b385b3fb1ffac301e63941335e4d354081ec14a" "checksum thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7" @@ -1038,5 +1193,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" "checksum vec_map 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8cdc8b93bd0198ed872357fb2e667f7125646b1762f16d60b2c96350d361897" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +"checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" +"checksum xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "5f04de8a1346489a2f9e9bd8526b73d135ec554227b17568456e86aa35b6f3fc" +"checksum xz2 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e9510bdf100731599107c61f77daf46713a69a568f75458999c1f9dbf6ba25b0" +"checksum yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992" diff --git a/src/Cargo.toml b/src/Cargo.toml index 9aca3e134d655..99e8b9f256afc 100644 --- a/src/Cargo.toml +++ b/src/Cargo.toml @@ -13,6 +13,7 @@ members = [ "tools/build-manifest", "tools/remote-test-client", "tools/remote-test-server", + "tools/rust-installer", ] # These projects have their own Cargo.lock diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 1b69f7413b569..028bfe3408f6d 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -26,12 +26,6 @@ use std::process::{Command, Stdio}; use build_helper::output; -#[cfg(not(target_os = "solaris"))] -const SH_CMD: &'static str = "sh"; -// On Solaris, sh is the historical bourne shell, not a POSIX shell, or bash. -#[cfg(target_os = "solaris")] -const SH_CMD: &'static str = "bash"; - use {Build, Compiler, Mode}; use channel; use util::{cp_r, libdir, is_dylib, cp_filtered, copy, exe}; @@ -55,6 +49,10 @@ pub fn tmpdir(build: &Build) -> PathBuf { build.out.join("tmp/dist") } +fn rust_installer(build: &Build) -> Command { + build.tool_cmd(&Compiler::new(0, &build.config.build), "rust-installer") +} + /// Builds the `rust-docs` installer component. /// /// Slurps up documentation from the `stage`'s `host`. @@ -74,8 +72,8 @@ pub fn docs(build: &Build, stage: u32, host: &str) { let src = build.out.join(host).join("doc"); cp_r(&src, &dst); - let mut cmd = Command::new(SH_CMD); - cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh"))) + let mut cmd = rust_installer(build); + cmd.arg("generate") .arg("--product-name=Rust-Documentation") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=Rust-documentation-is-installed.") @@ -124,8 +122,8 @@ pub fn mingw(build: &Build, host: &str) { .arg(host); build.run(&mut cmd); - let mut cmd = Command::new(SH_CMD); - cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh"))) + let mut cmd = rust_installer(build); + cmd.arg("generate") .arg("--product-name=Rust-MinGW") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=Rust-MinGW-is-installed.") @@ -190,8 +188,8 @@ pub fn rustc(build: &Build, stage: u32, host: &str) { } // Finally, wrap everything up in a nice tarball! - let mut cmd = Command::new(SH_CMD); - cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh"))) + let mut cmd = rust_installer(build); + cmd.arg("generate") .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=Rust-is-ready-to-roll.") @@ -300,8 +298,8 @@ pub fn std(build: &Build, compiler: &Compiler, target: &str) { let src = build.sysroot(compiler).join("lib/rustlib"); cp_r(&src.join(target), &dst); - let mut cmd = Command::new(SH_CMD); - cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh"))) + let mut cmd = rust_installer(build); + cmd.arg("generate") .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=std-is-standing-at-the-ready.") @@ -356,8 +354,8 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) { println!("image_src: {:?}, dst: {:?}", image_src, dst); cp_r(&image_src, &dst); - let mut cmd = Command::new(SH_CMD); - cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh"))) + let mut cmd = rust_installer(build); + cmd.arg("generate") .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=save-analysis-saved.") @@ -521,8 +519,8 @@ pub fn rust_src(build: &Build) { } // Create source tarball in rust-installer format - let mut cmd = Command::new(SH_CMD); - cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh"))) + let mut cmd = rust_installer(build); + cmd.arg("generate") .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=Awesome-Source.") @@ -622,8 +620,8 @@ pub fn cargo(build: &Build, stage: u32, target: &str) { t!(t!(File::create(overlay.join("version"))).write_all(version.as_bytes())); // Generate the installer tarball - let mut cmd = Command::new("sh"); - cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh"))) + let mut cmd = rust_installer(build); + cmd.arg("generate") .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=Rust-is-ready-to-roll.") @@ -671,8 +669,8 @@ pub fn rls(build: &Build, stage: u32, target: &str) { t!(t!(File::create(overlay.join("version"))).write_all(version.as_bytes())); // Generate the installer tarball - let mut cmd = Command::new("sh"); - cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh"))) + let mut cmd = rust_installer(build); + cmd.arg("generate") .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=RLS-ready-to-serve.") @@ -742,8 +740,8 @@ pub fn extended(build: &Build, stage: u32, target: &str) { input_tarballs.push_str(&sanitize_sh(&mingw_installer)); } - let mut cmd = Command::new(SH_CMD); - cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/combine-installers.sh"))) + let mut cmd = rust_installer(build); + cmd.arg("combine") .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=Rust-is-ready-to-roll.") diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs index 970c0bc565d86..99f0e17abab3e 100644 --- a/src/bootstrap/step.rs +++ b/src/bootstrap/step.rs @@ -574,6 +574,10 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { .dep(|s| s.name("maybe-clean-tools")) .dep(|s| s.name("libstd-tool")) .run(move |s| compile::tool(build, s.stage, s.target, "remote-test-client")); + rules.build("tool-rust-installer", "src/tools/rust-installer") + .dep(|s| s.name("maybe-clean-tools")) + .dep(|s| s.name("libstd-tool")) + .run(move |s| compile::tool(build, s.stage, s.target, "rust-installer")); rules.build("tool-cargo", "src/tools/cargo") .host(true) .default(build.config.extended) @@ -704,6 +708,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { .host(true) .only_host_build(true) .default(true) + .dep(|s| s.name("tool-rust-installer").stage(0)) .run(move |s| dist::rustc(build, s.stage, s.target)); rules.dist("dist-std", "src/libstd") .dep(move |s| { @@ -718,10 +723,12 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { }) .default(true) .only_host_build(true) + .dep(|s| s.name("tool-rust-installer").stage(0)) .run(move |s| dist::std(build, &s.compiler(), s.target)); rules.dist("dist-mingw", "path/to/nowhere") .default(true) .only_host_build(true) + .dep(|s| s.name("tool-rust-installer").stage(0)) .run(move |s| { if s.target.contains("pc-windows-gnu") { dist::mingw(build, s.target) @@ -732,21 +739,25 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { .host(true) .only_build(true) .only_host_build(true) + .dep(|s| s.name("tool-rust-installer").stage(0)) .run(move |_| dist::rust_src(build)); rules.dist("dist-docs", "src/doc") .default(true) .only_host_build(true) .dep(|s| s.name("default:doc")) + .dep(|s| s.name("tool-rust-installer").stage(0)) .run(move |s| dist::docs(build, s.stage, s.target)); rules.dist("dist-analysis", "analysis") .default(build.config.extended) .dep(|s| s.name("dist-std")) .only_host_build(true) + .dep(|s| s.name("tool-rust-installer").stage(0)) .run(move |s| dist::analysis(build, &s.compiler(), s.target)); rules.dist("dist-rls", "rls") .host(true) .only_host_build(true) .dep(|s| s.name("tool-rls")) + .dep(|s| s.name("tool-rust-installer").stage(0)) .run(move |s| dist::rls(build, s.stage, s.target)); rules.dist("install", "path/to/nowhere") .dep(|s| s.name("default:dist")) @@ -755,6 +766,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { .host(true) .only_host_build(true) .dep(|s| s.name("tool-cargo")) + .dep(|s| s.name("tool-rust-installer").stage(0)) .run(move |s| dist::cargo(build, s.stage, s.target)); rules.dist("dist-extended", "extended") .default(build.config.extended) @@ -767,6 +779,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { .dep(|d| d.name("dist-cargo")) .dep(|d| d.name("dist-rls")) .dep(|d| d.name("dist-analysis")) + .dep(|s| s.name("tool-rust-installer").stage(0)) .run(move |s| dist::extended(build, s.stage, s.target)); rules.dist("dist-sign", "hash-and-sign") diff --git a/src/rust-installer b/src/rust-installer deleted file mode 160000 index 2e6417f6af521..0000000000000 --- a/src/rust-installer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2e6417f6af5218a29a8ee72ed17af085560b9b9c diff --git a/src/tools/rust-installer b/src/tools/rust-installer new file mode 160000 index 0000000000000..b787d33b0eb4d --- /dev/null +++ b/src/tools/rust-installer @@ -0,0 +1 @@ +Subproject commit b787d33b0eb4dbb4ffb7de71af1027a782dccf0b diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs index f14a6a03893b3..6b666fa809f7a 100644 --- a/src/tools/tidy/src/main.rs +++ b/src/tools/tidy/src/main.rs @@ -81,12 +81,12 @@ fn filter_dirs(path: &Path) -> bool { "src/libbacktrace", "src/compiler-rt", "src/rustllvm", - "src/rust-installer", "src/liblibc", "src/vendor", "src/rt/hoedown", "src/tools/cargo", "src/tools/rls", + "src/tools/rust-installer", ]; skip.iter().any(|p| path.ends_with(p)) } From c9b2410fe8ae757f762c83e3486d16ae7f904445 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 8 May 2017 15:23:30 -0700 Subject: [PATCH 2/6] Use "rust-installer tarball" to create rustc-src too This gives us an extra rustc-src.tar.xz, which is 33% smaller than the .tar.gz! --- src/bootstrap/dist.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 028bfe3408f6d..254b817b847a3 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -469,13 +469,17 @@ pub fn rust_src(build: &Build) { write_file(&plain_dst_src.join("version"), build.rust_version().as_bytes()); // Create plain source tarball - let tarball = rust_src_location(build); + let mut tarball = rust_src_location(build); + tarball.set_extension(""); // strip .gz + tarball.set_extension(""); // strip .tar if let Some(dir) = tarball.parent() { t!(fs::create_dir_all(dir)); } - let mut cmd = Command::new("tar"); - cmd.arg("-czf").arg(sanitize_sh(&tarball)) - .arg(&plain_name) + let mut cmd = rust_installer(build); + cmd.arg("tarball") + .arg("--input").arg(&plain_name) + .arg("--output").arg(sanitize_sh(&tarball)) + .arg("--work-dir=.") .current_dir(tmpdir(build)); build.run(&mut cmd); From 8eaff4d848aeee49f3125ccd736942f5b484db3e Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 9 May 2017 11:43:48 -0700 Subject: [PATCH 3/6] Force tool-rust-installer deps to build-only --- src/bootstrap/step.rs | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs index 99f0e17abab3e..92666e8e63907 100644 --- a/src/bootstrap/step.rs +++ b/src/bootstrap/step.rs @@ -708,7 +708,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { .host(true) .only_host_build(true) .default(true) - .dep(|s| s.name("tool-rust-installer").stage(0)) + .dep(move |s| tool_rust_installer(build, s)) .run(move |s| dist::rustc(build, s.stage, s.target)); rules.dist("dist-std", "src/libstd") .dep(move |s| { @@ -723,12 +723,12 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { }) .default(true) .only_host_build(true) - .dep(|s| s.name("tool-rust-installer").stage(0)) + .dep(move |s| tool_rust_installer(build, s)) .run(move |s| dist::std(build, &s.compiler(), s.target)); rules.dist("dist-mingw", "path/to/nowhere") .default(true) .only_host_build(true) - .dep(|s| s.name("tool-rust-installer").stage(0)) + .dep(move |s| tool_rust_installer(build, s)) .run(move |s| { if s.target.contains("pc-windows-gnu") { dist::mingw(build, s.target) @@ -739,25 +739,25 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { .host(true) .only_build(true) .only_host_build(true) - .dep(|s| s.name("tool-rust-installer").stage(0)) + .dep(move |s| tool_rust_installer(build, s)) .run(move |_| dist::rust_src(build)); rules.dist("dist-docs", "src/doc") .default(true) .only_host_build(true) .dep(|s| s.name("default:doc")) - .dep(|s| s.name("tool-rust-installer").stage(0)) + .dep(move |s| tool_rust_installer(build, s)) .run(move |s| dist::docs(build, s.stage, s.target)); rules.dist("dist-analysis", "analysis") .default(build.config.extended) .dep(|s| s.name("dist-std")) .only_host_build(true) - .dep(|s| s.name("tool-rust-installer").stage(0)) + .dep(move |s| tool_rust_installer(build, s)) .run(move |s| dist::analysis(build, &s.compiler(), s.target)); rules.dist("dist-rls", "rls") .host(true) .only_host_build(true) .dep(|s| s.name("tool-rls")) - .dep(|s| s.name("tool-rust-installer").stage(0)) + .dep(move |s| tool_rust_installer(build, s)) .run(move |s| dist::rls(build, s.stage, s.target)); rules.dist("install", "path/to/nowhere") .dep(|s| s.name("default:dist")) @@ -766,7 +766,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { .host(true) .only_host_build(true) .dep(|s| s.name("tool-cargo")) - .dep(|s| s.name("tool-rust-installer").stage(0)) + .dep(move |s| tool_rust_installer(build, s)) .run(move |s| dist::cargo(build, s.stage, s.target)); rules.dist("dist-extended", "extended") .default(build.config.extended) @@ -779,7 +779,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { .dep(|d| d.name("dist-cargo")) .dep(|d| d.name("dist-rls")) .dep(|d| d.name("dist-analysis")) - .dep(|s| s.name("tool-rust-installer").stage(0)) + .dep(move |s| tool_rust_installer(build, s)) .run(move |s| dist::extended(build, s.stage, s.target)); rules.dist("dist-sign", "hash-and-sign") @@ -791,6 +791,14 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { rules.verify(); return rules; + + /// Helper to depend on a stage0 build-only rust-installer tool. + fn tool_rust_installer<'a>(build: &'a Build, step: &Step<'a>) -> Step<'a> { + step.name("tool-rust-installer") + .host(&build.config.build) + .target(&build.config.build) + .stage(0) + } } #[derive(PartialEq, Eq, Hash, Clone, Debug)] From 2729b716bbd8532c0bc7c791c3ef164d5ee959e0 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 10 May 2017 12:20:00 -0700 Subject: [PATCH 4/6] Don't use sanitize_sh with rust-installer There's no shell interpreting the file paths under the new Rusty rust-installer, so we don't need to use `sanitize_sh` for it. Plus, the drive-letter transformation is actually harmful for the now-native Windows rust-installer to understand those paths. --- src/bootstrap/dist.rs | 81 +++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 41 deletions(-) diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 254b817b847a3..6557b8410b196 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -77,9 +77,9 @@ pub fn docs(build: &Build, stage: u32, host: &str) { .arg("--product-name=Rust-Documentation") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=Rust-documentation-is-installed.") - .arg(format!("--image-dir={}", sanitize_sh(&image))) - .arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build)))) - .arg(format!("--output-dir={}", sanitize_sh(&distdir(build)))) + .arg("--image-dir").arg(&image) + .arg("--work-dir").arg(&tmpdir(build)) + .arg("--output-dir").arg(&distdir(build)) .arg(format!("--package-name={}-{}", name, host)) .arg("--component-name=rust-docs") .arg("--legacy-manifest-dirs=rustlib,cargo") @@ -127,9 +127,9 @@ pub fn mingw(build: &Build, host: &str) { .arg("--product-name=Rust-MinGW") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=Rust-MinGW-is-installed.") - .arg(format!("--image-dir={}", sanitize_sh(&image))) - .arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build)))) - .arg(format!("--output-dir={}", sanitize_sh(&distdir(build)))) + .arg("--image-dir").arg(&image) + .arg("--work-dir").arg(&tmpdir(build)) + .arg("--output-dir").arg(&distdir(build)) .arg(format!("--package-name={}-{}", name, host)) .arg("--component-name=rust-mingw") .arg("--legacy-manifest-dirs=rustlib,cargo"); @@ -193,10 +193,10 @@ pub fn rustc(build: &Build, stage: u32, host: &str) { .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=Rust-is-ready-to-roll.") - .arg(format!("--image-dir={}", sanitize_sh(&image))) - .arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build)))) - .arg(format!("--output-dir={}", sanitize_sh(&distdir(build)))) - .arg(format!("--non-installed-overlay={}", sanitize_sh(&overlay))) + .arg("--image-dir").arg(&image) + .arg("--work-dir").arg(&tmpdir(build)) + .arg("--output-dir").arg(&distdir(build)) + .arg("--non-installed-overlay").arg(&overlay) .arg(format!("--package-name={}-{}", name, host)) .arg("--component-name=rustc") .arg("--legacy-manifest-dirs=rustlib,cargo"); @@ -303,9 +303,9 @@ pub fn std(build: &Build, compiler: &Compiler, target: &str) { .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=std-is-standing-at-the-ready.") - .arg(format!("--image-dir={}", sanitize_sh(&image))) - .arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build)))) - .arg(format!("--output-dir={}", sanitize_sh(&distdir(build)))) + .arg("--image-dir").arg(&image) + .arg("--work-dir").arg(&tmpdir(build)) + .arg("--output-dir").arg(&distdir(build)) .arg(format!("--package-name={}-{}", name, target)) .arg(format!("--component-name=rust-std-{}", target)) .arg("--legacy-manifest-dirs=rustlib,cargo"); @@ -359,9 +359,9 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) { .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=save-analysis-saved.") - .arg(format!("--image-dir={}", sanitize_sh(&image))) - .arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build)))) - .arg(format!("--output-dir={}", sanitize_sh(&distdir(build)))) + .arg("--image-dir").arg(&image) + .arg("--work-dir").arg(&tmpdir(build)) + .arg("--output-dir").arg(&distdir(build)) .arg(format!("--package-name={}-{}", name, target)) .arg(format!("--component-name=rust-analysis-{}", target)) .arg("--legacy-manifest-dirs=rustlib,cargo"); @@ -478,7 +478,7 @@ pub fn rust_src(build: &Build) { let mut cmd = rust_installer(build); cmd.arg("tarball") .arg("--input").arg(&plain_name) - .arg("--output").arg(sanitize_sh(&tarball)) + .arg("--output").arg(&tarball) .arg("--work-dir=.") .current_dir(tmpdir(build)); build.run(&mut cmd); @@ -528,9 +528,9 @@ pub fn rust_src(build: &Build) { .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=Awesome-Source.") - .arg(format!("--image-dir={}", sanitize_sh(&image))) - .arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build)))) - .arg(format!("--output-dir={}", sanitize_sh(&distdir(build)))) + .arg("--image-dir").arg(&image) + .arg("--work-dir").arg(&tmpdir(build)) + .arg("--output-dir").arg(&distdir(build)) .arg(format!("--package-name={}", name)) .arg("--component-name=rust-src") .arg("--legacy-manifest-dirs=rustlib,cargo"); @@ -629,10 +629,10 @@ pub fn cargo(build: &Build, stage: u32, target: &str) { .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=Rust-is-ready-to-roll.") - .arg(format!("--image-dir={}", sanitize_sh(&image))) - .arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build)))) - .arg(format!("--output-dir={}", sanitize_sh(&distdir(build)))) - .arg(format!("--non-installed-overlay={}", sanitize_sh(&overlay))) + .arg("--image-dir").arg(&image) + .arg("--work-dir").arg(&tmpdir(build)) + .arg("--output-dir").arg(&distdir(build)) + .arg("--non-installed-overlay").arg(&overlay) .arg(format!("--package-name={}-{}", name, target)) .arg("--component-name=cargo") .arg("--legacy-manifest-dirs=rustlib,cargo"); @@ -678,10 +678,10 @@ pub fn rls(build: &Build, stage: u32, target: &str) { .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=RLS-ready-to-serve.") - .arg(format!("--image-dir={}", sanitize_sh(&image))) - .arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build)))) - .arg(format!("--output-dir={}", sanitize_sh(&distdir(build)))) - .arg(format!("--non-installed-overlay={}", sanitize_sh(&overlay))) + .arg("--image-dir").arg(&image) + .arg("--work-dir").arg(&tmpdir(build)) + .arg("--output-dir").arg(&distdir(build)) + .arg("--non-installed-overlay").arg(&overlay) .arg(format!("--package-name={}-{}", name, target)) .arg("--component-name=rls") .arg("--legacy-manifest-dirs=rustlib,cargo"); @@ -732,16 +732,15 @@ pub fn extended(build: &Build, stage: u32, target: &str) { // upgrades rustc was upgraded before rust-std. To avoid rustc clobbering // the std files during uninstall. To do this ensure that rustc comes // before rust-std in the list below. - let mut input_tarballs = format!("{},{},{},{},{},{}", - sanitize_sh(&rustc_installer), - sanitize_sh(&cargo_installer), - sanitize_sh(&rls_installer), - sanitize_sh(&analysis_installer), - sanitize_sh(&docs_installer), - sanitize_sh(&std_installer)); + let mut tarballs = vec![rustc_installer, cargo_installer, rls_installer, + analysis_installer, docs_installer, std_installer]; if target.contains("pc-windows-gnu") { - input_tarballs.push_str(","); - input_tarballs.push_str(&sanitize_sh(&mingw_installer)); + tarballs.push(mingw_installer); + } + let mut input_tarballs = tarballs[0].as_os_str().to_owned(); + for tarball in &tarballs[1..] { + input_tarballs.push(","); + input_tarballs.push(tarball); } let mut cmd = rust_installer(build); @@ -749,12 +748,12 @@ pub fn extended(build: &Build, stage: u32, target: &str) { .arg("--product-name=Rust") .arg("--rel-manifest-dir=rustlib") .arg("--success-message=Rust-is-ready-to-roll.") - .arg(format!("--work-dir={}", sanitize_sh(&work))) - .arg(format!("--output-dir={}", sanitize_sh(&distdir(build)))) + .arg("--work-dir").arg(&work) + .arg("--output-dir").arg(&distdir(build)) .arg(format!("--package-name={}-{}", pkgname(build, "rust"), target)) .arg("--legacy-manifest-dirs=rustlib,cargo") - .arg(format!("--input-tarballs={}", input_tarballs)) - .arg(format!("--non-installed-overlay={}", sanitize_sh(&overlay))); + .arg("--input-tarballs").arg(input_tarballs) + .arg("--non-installed-overlay").arg(&overlay); build.run(&mut cmd); let mut license = String::new(); From eb5fc3c0131cc9486011bca30e1899fe2ebb6d3a Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 11 May 2017 11:42:09 -0700 Subject: [PATCH 5/6] Update to lzma-sys-0.1.2 to fix Windows crt-static --- src/Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cargo.lock b/src/Cargo.lock index 0b6597ce4e836..99e384a8a0f66 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -345,7 +345,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lzma-sys" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1126,7 +1126,7 @@ name = "xz2" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lzma-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lzma-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1160,7 +1160,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" "checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135" "checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad" -"checksum lzma-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "506a25e3491881f47407458f95429d153437d3a5bc4685c747de69e1ec7e897d" +"checksum lzma-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "62f701b225af0ecead9b083529d92b7c19f91a2819df76a96ed80ac705349918" "checksum mdbook 0.0.21 (registry+https://github.com/rust-lang/crates.io-index)" = "f1e2e9d848514dcfad4195788d0d42ae5153a477c191d75d5b84fab10f222fbd" "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" "checksum miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726" From 861a4ed37ca9f84d73cbed4339f8ea1c001697fa Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 11 May 2017 16:58:40 -0700 Subject: [PATCH 6/6] Update to tar-0.4.12 to fix Windows paths --- src/Cargo.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Cargo.lock b/src/Cargo.lock index 99e384a8a0f66..c292d4c772c4e 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -297,7 +297,7 @@ dependencies = [ "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "xz2 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -992,7 +992,7 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1181,7 +1181,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)" = "a702319c807c016e51f672e5c77d6f0b46afddd744b5e437d6b8436b888b458f" "checksum serde_json 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)" = "dbc45439552eb8fb86907a2c41c1fd0ef97458efb87ff7f878db466eb581824e" "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" -"checksum tar 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c2374f318bbe2c5ac6c83dd6240d5f1a73106f72d39b3f7d6f8d8637c7b425d8" +"checksum tar 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ab0ef9ead2fe0aa9e18475a96a207bfd5143f4124779ef7429503a8665416ce8" "checksum term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "07b6c1ac5b3fffd75073276bca1ceed01f67a28537097a2a9539e116e50fb21a" "checksum thread-id 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4437c97558c70d129e40629a5b385b3fb1ffac301e63941335e4d354081ec14a" "checksum thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7"