Skip to content

Commit 18c58c9

Browse files
committed
Merge branch 'master' into db-show-manifest-version
2 parents e18574d + c60e5e4 commit 18c58c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+828
-553
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ matrix:
9191
env: TARGET=i686-linux-android
9292
DOCKER=android
9393
SKIP_TESTS=1
94+
- os: linux
95+
env: TARGET=x86_64-linux-android
96+
DOCKER=android
97+
SKIP_TESTS=1
9498

9599
# On OSX we want to target 10.7 so we ensure that the appropriate
96100
# environment variable is set to tell the linker what we want.
@@ -122,7 +126,7 @@ install:
122126
- sudo pip install awscli
123127
- aws configure set preview.cloudfront true
124128
- curl https://static.rust-lang.org/rustup.sh |
125-
sh -s -- --prefix=$HOME/rust --spec=nightly-2016-11-06 --with-target=$TARGET
129+
sh -s -- --prefix=$HOME/rust --spec=nightly-2017-04-25 --with-target=$TARGET
126130

127131
script:
128132
- mkdir -p target/$TARGET

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# 1.3.0
2+
3+
* [Add armv8l support](https://github.com/rust-lang-nursery/rustup.rs/pull/1055)
4+
* [Update curl crate](https://github.com/rust-lang-nursery/rustup.rs/pull/1101)
5+
* [Fix inadvertent dependency on bash](https://github.com/rust-lang-nursery/rustup.rs/pull/1048)
6+
* [Update openssl-probe to 0.1.1](https://github.com/rust-lang-nursery/rustup.rs/pull/1061)
7+
* [zsh completions cleanup](https://github.com/rust-lang-nursery/rustup.rs/pull/1068)
8+
* [Alias 'rustup toolchain uninstall' to 'rustup uninstall'](https://github.com/rust-lang-nursery/rustup.rs/pull/1073)
9+
* [Fix a typo in PowerShell completion script help](https://github.com/rust-lang-nursery/rustup.rs/pull/1076)
10+
* [Enforce timeouts for reading rustc version](https://github.com/rust-lang-nursery/rustup.rs/pull/1071)
11+
* [Fix OpenSSL linkage by using the final install-directory in the build](https://github.com/rust-lang-nursery/rustup.rs/pull/1065)
12+
13+
Contributors: bors, Brian Anderson, Diggory Blake, Greg Alexander, James Elford,
14+
Jordan Hiltunen, Justin Noah, Kang Seonghoon, Kevin K, Marco A L Barbosa
15+
116
# 1.2.0
217

318
* [Check ZDOTDIR when adding path to .zprofile](https://github.com/rust-lang-nursery/rustup.rs/pull/1038)

Cargo.lock

Lines changed: 92 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "rustup"
4-
version = "1.2.0"
4+
version = "1.3.0"
55
authors = [ "Diggory Blake <[email protected]>" ]
66
description = "multirust in rust - manage multiple rust installations with ease"
77

@@ -58,7 +58,7 @@ winapi = "0.2.8"
5858
winreg = "0.3.2"
5959
user32-sys = "0.1.2"
6060
kernel32-sys = "0.2.1"
61-
gcc = "0.3.28"
61+
gcc = "0.3.49"
6262
psapi-sys = "0.1"
6363

6464
[dev-dependencies]

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ $ rustup toolchain link my-toolchain path/to/my/toolchain/sysroot
407407
For example, on Ubuntu you might clone `rust-lang/rust` into `~/rust`, build it, and then run:
408408

409409
```
410-
$ rustup toolchain link myrust ~/rustg/x86_64-unknown-linux-gnu/stage2/
410+
$ rustup toolchain link myrust ~/rust/build/x86_64-unknown-linux-gnu/stage2/
411411
$ rustup default myrust
412412
```
413413

@@ -421,22 +421,22 @@ is invoked for a custom toolchain and it is not available, `rustup`
421421
will attempt to use `cargo` from one of the release channels*,
422422
preferring 'nightly', then 'beta' or 'stable'.
423423

424-
## Working with HTTP proxies
424+
## Working with network proxies
425425

426426
Enterprise networks often don't have direct outside HTTP access, but enforce
427-
the use of HTTP proxies. If you're on such a network, you can request that
427+
the use of proxies. If you're on such a network, you can request that
428428
rustup uses a proxy by setting its URL in the environment. In most cases,
429-
setting `http_proxy` should be sufficient. On a Unix-like system with a
429+
setting `https_proxy` should be sufficient. On a Unix-like system with a
430430
shell like __bash__ or __zsh__, you could use:
431431

432432
```
433-
export http_proxy=http://proxy.example.com:8080
433+
export https_proxy=socks5://proxy.example.com:1080 # or http://proxy.example.com:8080
434434
```
435435

436436
On Windows, the command would be:
437437

438438
```
439-
set http_proxy=http://proxy.example.com:8080
439+
set https_proxy=socks5://proxy.example.com:1080
440440
```
441441

442442
If you need a more complex setup, rustup supports the convention used by
@@ -532,6 +532,7 @@ platform of your choice:
532532
- [i686-linux-android](https://static.rust-lang.org/rustup/dist/i686-linux-android/rustup-init)
533533
- [i686-unknown-linux-gnu](https://static.rust-lang.org/rustup/dist/i686-unknown-linux-gnu/rustup-init)
534534
- [x86_64-apple-darwin](https://static.rust-lang.org/rustup/dist/x86_64-apple-darwin/rustup-init)
535+
- [x86_64-linux-android](https://static.rust-lang.org/rustup/dist/x86_64-linux-android/rustup-init)
535536
- [x86_64-pc-windows-gnu](https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe)
536537
- [x86_64-pc-windows-msvc](https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe)<sup>[](#vs2015)</sup>
537538
- [x86_64-unknown-freebsd](https://static.rust-lang.org/rustup/dist/x86_64-unknown-freebsd/rustup-init)

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ install:
4444
4545
# Install rust, x86_64-pc-windows-msvc host
4646
- appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
47-
- rustup-init.exe -y --default-toolchain=nightly-2017-01-06-x86_64-pc-windows-msvc
47+
- rustup-init.exe -y --default-toolchain=nightly-2017-04-25-x86_64-pc-windows-msvc
4848
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
4949

5050
# Install the target we're compiling for

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn commit_info() -> String {
3535

3636
fn commit_hash() -> Result<String, Ignore> {
3737
Ok(try!(String::from_utf8(try!(Command::new("git")
38-
.args(&["rev-parse", "--short", "HEAD"])
38+
.args(&["rev-parse", "--short=9", "HEAD"])
3939
.output())
4040
.stdout)))
4141
}

ci/docker/android/Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,16 @@ RUN apt-get install -y --no-install-recommends \
2727
--install-dir /android-ndk/x86 \
2828
--arch x86 \
2929
--api 21 && \
30+
./android-ndk-r13b/build/tools/make_standalone_toolchain.py \
31+
--install-dir /android-ndk/x86_64 \
32+
--arch x86_64 \
33+
--api 21 && \
3034
rm -rf ./android-ndk-r13b-linux-x86_64.zip ./android-ndk-r13b && \
3135
apt-get purge --auto-remove -y unzip python
3236

33-
ENV PATH=$PATH:/android-ndk/arm/bin:/android-ndk/arm64/bin:/android-ndk/x86/bin
37+
ENV PATH=$PATH:/android-ndk/arm/bin
38+
ENV PATH=$PATH:/android-ndk/arm64/bin
39+
ENV PATH=$PATH:/android-ndk/x86/bin
40+
ENV PATH=$PATH:/android-ndk/x86_64/bin
3441

3542
WORKDIR /buildslave

ci/prepare-deploy-travis.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ fi
1212

1313
# Upload docs
1414
if [[ "$TARGET" == "x86_64-unknown-linux-gnu" && "$TRAVIS_BRANCH" == "stable" ]]; then
15-
# FIXME rust-lang/rust#32532
16-
printf "not uploading docs"
17-
#git config --global credential.helper store;
18-
#echo "https://${TOKEN}:[email protected]" >> ~/.git-credentials;
19-
#cargo doc --release;
20-
#echo '<meta http-equiv=refresh content=0;url=multirust/index.html>' > target/doc/index.html;
21-
#sudo pip install ghp-import;
22-
#ghp-import -n target/doc;
23-
#git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages;
15+
git config --global credential.helper store;
16+
echo "https://${TOKEN}:[email protected]" >> ~/.git-credentials;
17+
cargo doc --release;
18+
echo '<meta http-equiv=refresh content=0;url=multirust/index.html>' > target/doc/index.html;
19+
sudo pip install ghp-import;
20+
ghp-import -n target/doc;
21+
git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages;
2422
fi;
2523

2624
# Copy rustup-init to rustup-setup for backwards compatibility

ci/run-docker.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ case $TARGET in
6767
OPENSSL_OS=android-x86
6868
OPENSSL_CC=i686-linux-android-gcc
6969
OPENSSL_AR=i686-linux-android-ar
70+
OPENSSL_CFLAGS=no-asm
71+
;;
72+
x86_64-linux-android)
73+
OPENSSL_OS=linux-x86_64
74+
OPENSSL_CC=x86_64-linux-android-gcc
75+
OPENSSL_AR=x86_64-linux-android-ar
76+
OPENSSL_CFLAGS="no-asm -mandroid -fomit-frame-pointer"
7077
;;
7178
arm-*-linux-gnueabi)
7279
OPENSSL_OS=linux-armv4

src/download/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rustls-backend = ["hyper", "env_proxy", "rustls", "lazy_static", "ca-loader"]
1717
[dependencies]
1818
error-chain = "0.7.1"
1919
url = "1.1"
20-
curl = { version = "0.4", optional = true }
20+
curl = { version = "0.4.6", optional = true }
2121
lazy_static = { version = "0.2", optional = true }
2222
native-tls = { version = "0.1", optional = true }
2323

src/rustup-cli/common.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ pub fn rustc_version(toolchain: &Toolchain) -> String {
235235
// we guard against such cases by enforcing a reasonable timeout to read.
236236
let mut line1 = None;
237237
if let Ok(mut child) = cmd.spawn() {
238-
let timeout = Duration::new(1, 0);
238+
let timeout = Duration::new(3, 0);
239239
match child.wait_timeout(timeout) {
240240
Ok(Some(status)) if status.success() => {
241241
let out = child.stdout.expect("Child::stdout requested but not present");
@@ -248,6 +248,7 @@ pub fn rustc_version(toolchain: &Toolchain) -> String {
248248
}
249249
Ok(None) => {
250250
let _ = child.kill();
251+
return String::from("(timeout reading rustc version)")
251252
}
252253
Ok(Some(_)) | Err(_) => {}
253254
}

src/rustup-cli/help.rs

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ r"DISCUSSION:
3232
'nightly', or '1.8.0'. For more information see `rustup help
3333
toolchain`.";
3434

35-
pub static TOOLCHAIN_INSTALL_HELP: &'static str =
35+
pub static INSTALL_HELP: &'static str =
3636
r"DISCUSSION:
3737
Installs a specific rust toolchain.
3838
@@ -66,7 +66,7 @@ r"DISCUSSION:
6666
6767
'channel' is either a named release channel or an explicit version
6868
number, such as '1.8.0'. Channel names can be optionally appended
69-
with an archive date, as in 'nightly-2014-12-18', in which case
69+
with an archive date, as in 'nightly-2017-05-09', in which case
7070
the toolchain is downloaded from the archive for that date.
7171
7272
Finally, the host may be specified as a target triple. This is
@@ -81,8 +81,29 @@ r"DISCUSSION:
8181
8282
$ rustup default stable-msvc
8383
84-
Toolchain names that don't name a channel instead can be used to
85-
name custom toolchains with the `rustup toolchain link` command.";
84+
rustup can also manage symlinked local toolchain builds, which are
85+
often used to for developing Rust itself. For more information see
86+
`rustup toolchain help link`.";
87+
88+
pub static TOOLCHAIN_LINK_HELP: &'static str =
89+
r"DISCUSSION:
90+
'toolchain' is the custom name to be assigned to the new toolchain.
91+
Any name is permitted as long as it does not fully match an initial
92+
substring of a standard release channel. For example, you can use
93+
the names 'latest' or '2017-04-01' but you cannot use 'stable' or
94+
'beta-i686' or 'nightly-x86_64-unknown-linux-gnu'.
95+
96+
'path' specifies the directory where the binaries and libraries for
97+
the custom toolchain can be found. For example, when used for
98+
development of Rust itself, toolchains can be linked directly out of
99+
the build directory. After building, you can test out different
100+
compiler versions as follows:
101+
102+
$ rustup toolchain link latest-stage1 build/x86_64-unknown-linux-gnu/stage1
103+
$ rustup override set latest-stage1
104+
105+
If you now compile a crate in the current directory, the custom
106+
toolchain 'latest-stage1' will be used.";
86107

87108
pub static OVERRIDE_HELP: &'static str =
88109
r"DISCUSSION:

src/rustup-cli/main.rs

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
1+
//! The main rustup commandline application
2+
//!
3+
//! The rustup binary is a chimera, changing its behavior based on the
4+
//! name of the binary. This is used most prominently to enable
5+
//! rustup's tool 'proxies' - that is, rustup itself and the rustup
6+
//! proxies are the same binary; when the binary is called 'rustup' or
7+
//! 'rustup.exe' rustup behaves like the rustup commandline
8+
//! application; when it is called 'rustc' it behaves as a proxy to
9+
//! 'rustc'.
10+
//!
11+
//! This scheme is further used to distingush the rustup installer,
12+
//! called 'rustup-init' which is again just the rustup binary under a
13+
//! different name.
14+
115
#![recursion_limit = "1024"]
216

317
extern crate rustup_dist;
4-
#[macro_use]
518
extern crate rustup_utils;
619
#[macro_use]
720
extern crate error_chain;
821

9-
#[macro_use]
1022
extern crate clap;
1123
extern crate regex;
12-
#[macro_use]
1324
extern crate rustup;
1425
extern crate term;
1526
extern crate itertools;
@@ -54,29 +65,26 @@ use rustup_dist::dist::TargetTriple;
5465
use rustup::env_var::RUST_RECURSION_COUNT_MAX;
5566

5667
fn main() {
57-
if let Err(ref e) = run_multirust() {
68+
if let Err(ref e) = run_rustup() {
5869
common::report_error(e);
5970
std::process::exit(1);
6071
}
6172
}
6273

63-
fn run_multirust() -> Result<()> {
64-
// Guard against infinite recursion
65-
let recursion_count = env::var("RUST_RECURSION_COUNT").ok()
66-
.and_then(|s| s.parse().ok()).unwrap_or(0);
67-
if recursion_count > RUST_RECURSION_COUNT_MAX {
68-
return Err(ErrorKind::InfiniteRecursion.into());
69-
}
74+
fn run_rustup() -> Result<()> {
75+
// Guard against infinite proxy recursion. This mostly happens due to
76+
// bugs in rustup.
77+
do_recursion_guard()?;
7078

71-
// Do various things to clean up past messes
72-
// FIXME: Remove this soon to get it out of the proxy path
79+
// Do various hacks to clean up past messes
7380
do_compatibility_hacks();
7481

7582
// The name of arg0 determines how the program is going to behave
7683
let arg0 = env::args().next().map(PathBuf::from);
7784
let name = arg0.as_ref()
7885
.and_then(|a| a.file_stem())
7986
.and_then(|a| a.to_str());
87+
8088
match name {
8189
Some("rustup") => {
8290
rustup_mode::main()
@@ -123,6 +131,16 @@ fn run_multirust() -> Result<()> {
123131
}
124132
}
125133

134+
fn do_recursion_guard() -> Result<()> {
135+
let recursion_count = env::var("RUST_RECURSION_COUNT").ok()
136+
.and_then(|s| s.parse().ok()).unwrap_or(0);
137+
if recursion_count > RUST_RECURSION_COUNT_MAX {
138+
return Err(ErrorKind::InfiniteRecursion.into());
139+
}
140+
141+
Ok(())
142+
}
143+
126144
fn do_compatibility_hacks() {
127145
make_environment_compatible();
128146
fix_windows_reg_key();

src/rustup-cli/rustup_mode.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub fn cli() -> App<'static, 'static> {
129129
.after_help(SHOW_HELP))
130130
.subcommand(SubCommand::with_name("install")
131131
.about("Update Rust toolchains")
132-
.after_help(TOOLCHAIN_INSTALL_HELP)
132+
.after_help(INSTALL_HELP)
133133
.setting(AppSettings::Hidden) // synonym for 'toolchain install'
134134
.arg(Arg::with_name("toolchain")
135135
.required(true)
@@ -141,7 +141,7 @@ pub fn cli() -> App<'static, 'static> {
141141
.required(true)
142142
.multiple(true)))
143143
.subcommand(SubCommand::with_name("update")
144-
.about("Update Rust toolchains")
144+
.about("Update Rust toolchains and rustup")
145145
.after_help(UPDATE_HELP)
146146
.arg(Arg::with_name("toolchain")
147147
.required(false)
@@ -176,6 +176,7 @@ pub fn cli() -> App<'static, 'static> {
176176
.multiple(true)))
177177
.subcommand(SubCommand::with_name("link")
178178
.about("Create a custom toolchain by symlinking to a directory")
179+
.after_help(TOOLCHAIN_LINK_HELP)
179180
.arg(Arg::with_name("toolchain")
180181
.required(true))
181182
.arg(Arg::with_name("path")

0 commit comments

Comments
 (0)