Hello community, here is the log from the commit of package rust for openSUSE:Factory checked in at 2017-09-05 15:18:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rust (Old) and /work/SRC/openSUSE:Factory/.rust.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rust" Tue Sep 5 15:18:59 2017 rev:16 rq:520947 version:1.20.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rust/rust.changes 2017-09-04 12:39:26.877128600 +0200 +++ /work/SRC/openSUSE:Factory/.rust.new/rust.changes 2017-09-05 15:19:08.776125302 +0200 @@ -1,0 +2,51 @@ +Mon Sep 4 22:44:20 UTC 2017 - luke.nukem.jones@gmail.com + +- Update to version 1.20.0 +- Remove x86 from build targets +- Language + + [Associated constants are now stabilised.][42809] + + [A lot of macro bugs are now fixed.][42913] +- Compiler + + [Struct fields are now properly coerced to the expected field type.][42807] + + [Enabled wasm LLVM backend][42571] WASM can now be built with the + `wasm32-experimental-emscripten` target. + + [Changed some of the error messages to be more helpful.][42033] + + [Add support for RELRO(RELocation Read-Only) for platforms that support + it.][43170] + + [rustc now reports the total number of errors on compilation failure][43015] + previously this was only the number of errors in the pass that failed. + + [Expansion in rustc has been sped up 29x.][42533] + + [added `msp430-none-elf` target.][43099] + + [rustc will now suggest one-argument enum variant to fix type mismatch when + applicable][43178] + + [Fixes backtraces on Redox][43228] + + [rustc now identifies different versions of same crate when absolute paths of + different types match in an error message.][42826] +- Libraries + + [Relaxed Debug constraints on `{HashMap,BTreeMap}::{Keys,Values}`.][42854] + + [Impl `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Debug`, `Hash` for unsized + tuples.][43011] + + [Impl `fmt::{Display, Debug}` for `Ref`, `RefMut`, `MutexGuard`, + `RwLockReadGuard`, `RwLockWriteGuard`][42822] + + [Impl `Clone` for `DefaultHasher`.][42799] + + [Impl `Sync` for `SyncSender`.][42397] + + [Impl `FromStr` for `char`][42271] + + [Fixed how `{f32, f64}::{is_sign_negative, is_sign_positive}` handles + NaN.][42431] + + [allow messages in the `unimplemented!()` macro.][42155] + ie. `unimplemented!("Waiting for 1.21 to be stable")` + + [`pub(restricted)` is now supported in the `thread_local!` macro.][43185] + + [Upgrade to Unicode 10.0.0][42999] + + [Reimplemented `{f32, f64}::{min, max}` in Rust instead of using CMath.][42430] + + [Skip the main thread's manual stack guard on Linux][43072] + + [Iterator::nth for `ops::{Range, RangeFrom}` is now done in O(1) time][43077] + + [`#[repr(align(N))]` attribute max number is now 2^31 + 1.][43097] This was + previously 2^15. + + [`{OsStr, Path}::Display` now avoids allocations where possible][42613] +- Compatibility Notes + + [Functions with `'static` in their return types will now not be as usable as + if they were using lifetime parameters instead.][42417] + + [The reimplementation of `{f32, f64}::is_sign_{negative, positive}` now + takes the sign of NaN into account where previously didn't.][42430] + +------------------------------------------------------------------- @@ -782,2 +832,0 @@ - - Old: ---- cargo-0.18.0-aarch64-unknown-linux-gnu.tar.gz cargo-0.18.0-armv7-unknown-linux-gnueabihf.tar.gz cargo-0.18.0-i686-unknown-linux-gnu.tar.gz cargo-0.18.0-powerpc64-unknown-linux-gnu.tar.gz cargo-0.18.0-powerpc64le-unknown-linux-gnu.tar.gz cargo-0.18.0-s390x-unknown-linux-gnu.tar.gz cargo-0.18.0-x86_64-unknown-linux-gnu.tar.gz rustc-1.19.0-src.tar.gz New: ---- cargo-0.21.0-aarch64-unknown-linux-gnu.tar.gz cargo-0.21.0-armv7-unknown-linux-gnueabihf.tar.gz cargo-0.21.0-i686-unknown-linux-gnu.tar.gz cargo-0.21.0-powerpc64-unknown-linux-gnu.tar.gz cargo-0.21.0-powerpc64le-unknown-linux-gnu.tar.gz cargo-0.21.0-s390x-unknown-linux-gnu.tar.gz cargo-0.21.0-x86_64-unknown-linux-gnu.tar.gz rustc-1.20.0-src.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rust.spec ++++++ --- /var/tmp/diff_new_pack.dvD08i/_old 2017-09-05 15:19:14.855270793 +0200 +++ /var/tmp/diff_new_pack.dvD08i/_new 2017-09-05 15:19:14.859270231 +0200 @@ -17,38 +17,29 @@ # -%global prev_rust 1.18.0 -%global cargo_version 0.18.0 +%global prev_rust 1.19.0 +%global cargo_version 0.21.0 + +%global rust_arch %{_arch} %global abi gnu -%ifarch s390x -%global _arch s390x -%endif %ifarch armv7hl -%global _arch armv7 +%global rust_arch armv7 %global abi gnueabihf %endif -%ifarch aarch64 -%global _arch aarch64 -%endif %ifarch ppc64 -%global _arch powerpc64 +%global rust_arch powerpc64 %endif %ifarch ppc64le -%global _arch powerpc64le +%global rust_arch powerpc64le %endif -%ifarch x86_64 -%global _arch x86_64 -%endif -%ifarch %{ix86} -%global _arch i686 -%endif -%global rust_triple %{_arch}-unknown-linux-%{abi} +%global rust_triple %{rust_arch}-unknown-linux-%{abi} + %global dl_url https://static.rust-lang.org/dist %global common_libdir %{_prefix}/lib %global rustlibdir %{common_libdir}/rustlib %bcond_with bootstrap Name: rust -Version: 1.19.0 +Version: 1.20.0 Release: 0 Summary: A systems programming language License: MIT or Apache-2.0 @@ -86,7 +77,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build # Restrict the architectures as building rust relies on being initially # bootstrapped before we can build the n+1 release -ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64 ppc64le s390x +ExclusiveArch: x86_64 %{arm} aarch64 ppc64 ppc64le s390x %if 0%{?suse_version} BuildRequires: fdupes ++++++ cargo-0.18.0-aarch64-unknown-linux-gnu.tar.gz -> cargo-0.21.0-aarch64-unknown-linux-gnu.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-aarch64-unknown-linux-gnu/README.md new/cargo-0.21.0-aarch64-unknown-linux-gnu/README.md --- old/cargo-0.18.0-aarch64-unknown-linux-gnu/README.md 2017-04-24 22:38:22.000000000 +0200 +++ new/cargo-0.21.0-aarch64-unknown-linux-gnu/README.md 2017-08-27 22:01:02.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` Binary files old/cargo-0.18.0-aarch64-unknown-linux-gnu/cargo/bin/cargo and new/cargo-0.21.0-aarch64-unknown-linux-gnu/cargo/bin/cargo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-aarch64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo new/cargo-0.21.0-aarch64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo --- old/cargo-0.18.0-aarch64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo 1970-01-01 01:00:00.000000000 +0100 +++ new/cargo-0.21.0-aarch64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo 2017-08-27 22:01:02.000000000 +0200 @@ -0,0 +1,211 @@ +command -v cargo >/dev/null 2>&1 && +_cargo() +{ + local cur prev words cword cmd + _get_comp_words_by_ref cur prev words cword + + COMPREPLY=() + + cmd=${words[1]} + + local vcs='git hg none' + local color='auto always never' + local msg_format='human json' + + local opt_help='-h --help' + local opt_verbose='-v --verbose' + local opt_quiet='-q --quiet' + local opt_color='--color' + local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" + local opt_pkg='-p --package' + local opt_feat='--features --all-features --no-default-features' + local opt_mani='--manifest-path' + local opt_jobs='-j --jobs' + local opt_force='-f --force' + local opt_test='--test --bench' + local opt_lock='--frozen --locked' + + local opt___nocmd="$opt_common -V --version --list" + local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" + local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" + local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" + local opt__fetch="$opt_common $opt_mani $opt_lock" + local opt__generate_lockfile="${opt__fetch}" + local opt__git_checkout="$opt_common $opt_lock --reference --url" + local opt__help="$opt_help" + local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" + local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" + local opt__locate_project="$opt_mani -h --help" + local opt__login="$opt_common $opt_lock --host" + local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" + local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" + local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" + local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" + local opt__pkgid="${opt__fetch} $opt_pkg" + local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" + local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" + local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" + local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" + local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" + local opt__search="$opt_common $opt_lock --host --limit" + local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" + local opt__uninstall="$opt_common $opt_lock --bin --root" + local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" + local opt__verify_project="${opt__fetch}" + local opt__version="$opt_help $opt_verbose $opt_color" + local opt__yank="$opt_common $opt_lock --vers --undo --index --token" + + if [[ $cword -eq 1 ]]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) + else + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + fi + elif [[ $cword -ge 2 ]]; then + case "${prev}" in + --vcs) + COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) + ;; + --color) + COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) + ;; + --message-format) + COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) + ;; + --manifest-path) + _filedir toml + ;; + --bin) + COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) + ;; + --test) + COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) + ;; + --bench) + COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) + ;; + --example) + COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) + ;; + --target) + COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) + ;; + help) + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + ;; + *) + local opt_var=opt__${cmd//-/_} + COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) + ;; + esac + fi + + # compopt does not work in bash version 3 + + return 0 +} && +complete -F _cargo cargo + +__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) + +_locate_manifest(){ + local manifest=`cargo locate-project 2>/dev/null` + # regexp-replace manifest '\{"root":"|"\}' '' + echo ${manifest:9:-2} +} + +# Extracts the values of "name" from the array given in $1 and shows them as +# command line options for completion +_get_names_from_array() +{ + local manifest=$(_locate_manifest) + if [[ -z $manifest ]]; then + return 0 + fi + + local last_line + local -a names + local in_block=false + local block_name=$1 + while read line + do + if [[ $last_line == "[[$block_name]]" ]]; then + in_block=true + else + if [[ $last_line =~ .*\[\[.* ]]; then + in_block=false + fi + fi + + if [[ $in_block == true ]]; then + if [[ $line =~ .*name.*\= ]]; then + line=${line##*=} + line=${line%%\"} + line=${line##*\"} + names+=($line) + fi + fi + + last_line=$line + done < $manifest + echo "${names[@]}" +} + +#Gets the bin names from the manifest file +_bin_names() +{ + _get_names_from_array "bin" +} + +#Gets the test names from the manifest file +_test_names() +{ + _get_names_from_array "test" +} + +#Gets the bench names from the manifest file +_benchmark_names() +{ + _get_names_from_array "bench" +} + +_get_examples(){ + local files=($(dirname $(_locate_manifest))/examples/*.rs) + local names=("${files[@]##*/}") + local names=("${names[@]%.*}") + # "*" means no examples found + if [[ "${names[@]}" != "*" ]]; then + echo "${names[@]}" + fi +} + +_get_targets(){ + local CURRENT_PATH + if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then + CURRENT_PATH=$PWD + else + CURRENT_PATH=$(_locate_manifest) + fi + if [[ -z "$CURRENT_PATH" ]]; then + return 1 + fi + local TARGETS=() + local FIND_PATHS=( "/" ) + local FIND_PATH LINES LINE + while [[ "$CURRENT_PATH" != "/" ]]; do + FIND_PATHS+=( "$CURRENT_PATH" ) + CURRENT_PATH=$(dirname $CURRENT_PATH) + done + for FIND_PATH in ${FIND_PATHS[@]}; do + if [[ -f "$FIND_PATH"/.cargo/config ]]; then + LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) + for LINE in ${LINES[@]}; do + TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) + done + fi + done + echo "${TARGETS[@]}" +} +# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-aarch64-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo new/cargo-0.21.0-aarch64-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo --- old/cargo-0.18.0-aarch64-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo 2017-04-24 22:38:22.000000000 +0200 +++ new/cargo-0.21.0-aarch64-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo 1970-01-01 01:00:00.000000000 +0100 @@ -1,211 +0,0 @@ -command -v cargo >/dev/null 2>&1 && -_cargo() -{ - local cur prev words cword cmd - _get_comp_words_by_ref cur prev words cword - - COMPREPLY=() - - cmd=${words[1]} - - local vcs='git hg none' - local color='auto always never' - local msg_format='human json' - - local opt_help='-h --help' - local opt_verbose='-v --verbose' - local opt_quiet='-q --quiet' - local opt_color='--color' - local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" - local opt_pkg='-p --package' - local opt_feat='--features --all-features --no-default-features' - local opt_mani='--manifest-path' - local opt_jobs='-j --jobs' - local opt_force='-f --force' - local opt_test='--test --bench' - local opt_lock='--frozen --locked' - - local opt___nocmd="$opt_common -V --version --list" - local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" - local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" - local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" - local opt__fetch="$opt_common $opt_mani $opt_lock" - local opt__generate_lockfile="${opt__fetch}" - local opt__git_checkout="$opt_common $opt_lock --reference --url" - local opt__help="$opt_help" - local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" - local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" - local opt__locate_project="$opt_mani -h --help" - local opt__login="$opt_common $opt_lock --host" - local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" - local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" - local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" - local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" - local opt__pkgid="${opt__fetch} $opt_pkg" - local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" - local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" - local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" - local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" - local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" - local opt__search="$opt_common $opt_lock --host --limit" - local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" - local opt__uninstall="$opt_common $opt_lock --bin --root" - local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" - local opt__verify_project="${opt__fetch}" - local opt__version="$opt_help $opt_verbose $opt_color" - local opt__yank="$opt_common $opt_lock --vers --undo --index --token" - - if [[ $cword -eq 1 ]]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) - else - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - fi - elif [[ $cword -ge 2 ]]; then - case "${prev}" in - --vcs) - COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) - ;; - --color) - COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) - ;; - --message-format) - COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) - ;; - --manifest-path) - _filedir toml - ;; - --bin) - COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) - ;; - --test) - COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) - ;; - --bench) - COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) - ;; - --example) - COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) - ;; - --target) - COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) - ;; - help) - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - ;; - *) - local opt_var=opt__${cmd//-/_} - COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) - ;; - esac - fi - - # compopt does not work in bash version 3 - - return 0 -} && -complete -F _cargo cargo - -__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) - -_locate_manifest(){ - local manifest=`cargo locate-project 2>/dev/null` - # regexp-replace manifest '\{"root":"|"\}' '' - echo ${manifest:9:-2} -} - -# Extracts the values of "name" from the array given in $1 and shows them as -# command line options for completion -_get_names_from_array() -{ - local manifest=$(_locate_manifest) - if [[ -z $manifest ]]; then - return 0 - fi - - local last_line - local -a names - local in_block=false - local block_name=$1 - while read line - do - if [[ $last_line == "[[$block_name]]" ]]; then - in_block=true - else - if [[ $last_line =~ .*\[\[.* ]]; then - in_block=false - fi - fi - - if [[ $in_block == true ]]; then - if [[ $line =~ .*name.*\= ]]; then - line=${line##*=} - line=${line%%\"} - line=${line##*\"} - names+=($line) - fi - fi - - last_line=$line - done < $manifest - echo "${names[@]}" -} - -#Gets the bin names from the manifest file -_bin_names() -{ - _get_names_from_array "bin" -} - -#Gets the test names from the manifest file -_test_names() -{ - _get_names_from_array "test" -} - -#Gets the bench names from the manifest file -_benchmark_names() -{ - _get_names_from_array "bench" -} - -_get_examples(){ - local files=($(dirname $(_locate_manifest))/examples/*.rs) - local names=("${files[@]##*/}") - local names=("${names[@]%.*}") - # "*" means no examples found - if [[ "${names[@]}" != "*" ]]; then - echo "${names[@]}" - fi -} - -_get_targets(){ - local CURRENT_PATH - if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then - CURRENT_PATH=$PWD - else - CURRENT_PATH=$(_locate_manifest) - fi - if [[ -z "$CURRENT_PATH" ]]; then - return 1 - fi - local TARGETS=() - local FIND_PATHS=( "/" ) - local FIND_PATH LINES LINE - while [[ "$CURRENT_PATH" != "/" ]]; do - FIND_PATHS+=( "$CURRENT_PATH" ) - CURRENT_PATH=$(dirname $CURRENT_PATH) - done - for FIND_PATH in ${FIND_PATHS[@]}; do - if [[ -f "$FIND_PATH"/.cargo/config ]]; then - LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) - for LINE in ${LINES[@]}; do - TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) - done - fi - done - echo "${TARGETS[@]}" -} -# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-aarch64-unknown-linux-gnu/cargo/manifest.in new/cargo-0.21.0-aarch64-unknown-linux-gnu/cargo/manifest.in --- old/cargo-0.18.0-aarch64-unknown-linux-gnu/cargo/manifest.in 2017-04-24 22:38:22.000000000 +0200 +++ new/cargo-0.21.0-aarch64-unknown-linux-gnu/cargo/manifest.in 2017-08-27 22:01:02.000000000 +0200 @@ -1,33 +1,33 @@ -file:bin/cargo -file:etc/bash_completions.d/cargo -file:share/doc/cargo/LICENSE-APACHE -file:share/doc/cargo/LICENSE-MIT -file:share/doc/cargo/LICENSE-THIRD-PARTY -file:share/doc/cargo/README.md -file:share/man/man1/cargo-bench.1 -file:share/man/man1/cargo-build.1 file:share/man/man1/cargo-check.1 -file:share/man/man1/cargo-clean.1 file:share/man/man1/cargo-doc.1 +file:share/man/man1/cargo-package.1 +file:share/man/man1/cargo-install.1 file:share/man/man1/cargo-fetch.1 +file:share/man/man1/cargo-update.1 +file:share/man/man1/cargo-new.1 file:share/man/man1/cargo-generate-lockfile.1 file:share/man/man1/cargo-init.1 -file:share/man/man1/cargo-install.1 -file:share/man/man1/cargo-login.1 -file:share/man/man1/cargo-metadata.1 -file:share/man/man1/cargo-new.1 -file:share/man/man1/cargo-owner.1 -file:share/man/man1/cargo-package.1 -file:share/man/man1/cargo-pkgid.1 -file:share/man/man1/cargo-publish.1 -file:share/man/man1/cargo-run.1 file:share/man/man1/cargo-rustc.1 +file:share/man/man1/cargo-clean.1 +file:share/man/man1/cargo-metadata.1 +file:share/man/man1/cargo.1 +file:share/man/man1/cargo-bench.1 +file:share/man/man1/cargo-yank.1 file:share/man/man1/cargo-rustdoc.1 +file:share/man/man1/cargo-run.1 +file:share/man/man1/cargo-publish.1 +file:share/man/man1/cargo-build.1 +file:share/man/man1/cargo-login.1 +file:share/man/man1/cargo-version.1 +file:share/man/man1/cargo-uninstall.1 +file:share/man/man1/cargo-owner.1 file:share/man/man1/cargo-search.1 file:share/man/man1/cargo-test.1 -file:share/man/man1/cargo-uninstall.1 -file:share/man/man1/cargo-update.1 -file:share/man/man1/cargo-version.1 -file:share/man/man1/cargo-yank.1 -file:share/man/man1/cargo.1 +file:share/man/man1/cargo-pkgid.1 file:share/zsh/site-functions/_cargo +file:share/doc/cargo/LICENSE-MIT +file:share/doc/cargo/LICENSE-APACHE +file:share/doc/cargo/README.md +file:share/doc/cargo/LICENSE-THIRD-PARTY +file:etc/bash_completion.d/cargo +file:bin/cargo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-aarch64-unknown-linux-gnu/cargo/share/doc/cargo/README.md new/cargo-0.21.0-aarch64-unknown-linux-gnu/cargo/share/doc/cargo/README.md --- old/cargo-0.18.0-aarch64-unknown-linux-gnu/cargo/share/doc/cargo/README.md 2017-04-24 22:38:22.000000000 +0200 +++ new/cargo-0.21.0-aarch64-unknown-linux-gnu/cargo/share/doc/cargo/README.md 2017-08-27 22:01:02.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-aarch64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo new/cargo-0.21.0-aarch64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo --- old/cargo-0.18.0-aarch64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo 2017-04-24 22:38:22.000000000 +0200 +++ new/cargo-0.21.0-aarch64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo 2017-08-27 22:01:02.000000000 +0200 @@ -348,6 +348,15 @@ '(-v, --verbose)'{-v,--verbose}'[use verbose output]' \ '--color=:colorization option:(auto always never)' \ '1: :_test_names' \ + '(--doc --bin --example --test --bench)--lib[only test library]' \ + '(--lib --bin --example --test --bench)--doc[only test documentation]' \ + '(--lib --doc --example --test --bench)--bin=[binary name]' \ + '(--lib --doc --bin --test --bench)--example=[example name]' \ + '(--lib --doc --bin --example --bench)--test=[test name]' \ + '(--lib --doc --bin --example --test)--bench=[benchmark name]' \ + '--message-format:error format:(human json)' \ + '--frozen[require lock and cache up to date]' \ + '--locked[require lock up to date]' ;; uninstall) @@ -510,7 +519,7 @@ _get_names_from_array "bench" } -# These flags are mutally exclusive specifiers for the scope of a command; as +# These flags are mutually exclusive specifiers for the scope of a command; as # they are used in multiple places without change, they are expanded into the # appropriate command's `_arguments` where appropriate. set command_scope_spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-aarch64-unknown-linux-gnu/install.sh new/cargo-0.21.0-aarch64-unknown-linux-gnu/install.sh --- old/cargo-0.18.0-aarch64-unknown-linux-gnu/install.sh 2017-04-24 22:38:23.000000000 +0200 +++ new/cargo-0.21.0-aarch64-unknown-linux-gnu/install.sh 2017-08-27 22:01:02.000000000 +0200 @@ -363,6 +363,9 @@ CYGWIN*) _ostype=pc-windows-gnu ;; + Haiku) + _ostype=unknown-haiku + ;; *) err "unknown value from uname -s: $_uname_value" @@ -612,6 +615,18 @@ # Decide the destination of the file local _file_install_path="$_dest_prefix/$_file" + if echo "$_file" | grep "^etc/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^etc\///')" + _file_install_path="$CFG_SYSCONFDIR/$_f" + fi + + if echo "$_file" | grep "^bin/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^bin\///')" + _file_install_path="$CFG_BINDIR/$_f" + fi + if echo "$_file" | grep "^lib/" > /dev/null then local _f="$(echo "$_file" | sed 's/^lib\///')" @@ -684,7 +699,7 @@ critical_need_ok "failed to copy directory" # Set permissions. 0755 for dirs, 644 for files - run chmod -R u+rwx,go+rx,go-w "$_file_install_path" + run chmod -R u+rwX,go+rX,go-w "$_file_install_path" critical_need_ok "failed to set permissions on directory" # Update the manifest @@ -851,6 +866,8 @@ valopt without "" "comma-separated list of components to not install" valopt components "" "comma-separated list of components to install" flag list-components "list available components" +valopt sysconfdir "$CFG_DESTDIR_PREFIX/etc" "install system configuration files" +valopt bindir "$CFG_DESTDIR_PREFIX/bin" "install binaries" valopt libdir "$CFG_DESTDIR_PREFIX/lib" "install libraries" valopt mandir "$CFG_DESTDIR_PREFIX/share/man" "install man pages in PATH" # NB See the docdir handling in install_components for an explanation of this @@ -874,15 +891,15 @@ # FIXME: Might want to consider loading this from a file and not generating install.sh # Rust or Cargo -TEMPLATE_PRODUCT_NAME="Rust" +TEMPLATE_PRODUCT_NAME='Rust' # rustlib or cargo TEMPLATE_REL_MANIFEST_DIR=rustlib # 'Rust is ready to roll.' or 'Cargo is cool to cruise.' -TEMPLATE_SUCCESS_MESSAGE="Rust is ready to roll." +TEMPLATE_SUCCESS_MESSAGE='Rust is ready to roll.' # Locations to look for directories containing legacy, pre-versioned manifests -TEMPLATE_LEGACY_MANIFEST_DIRS="rustlib,cargo" +TEMPLATE_LEGACY_MANIFEST_DIRS='rustlib,cargo' # The installer version -TEMPLATE_RUST_INSTALLER_VERSION="3" +TEMPLATE_RUST_INSTALLER_VERSION='3' # OK, let's get installing ... @@ -1014,3 +1031,5 @@ echo echo " $TEMPLATE_SUCCESS_MESSAGE" echo + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-aarch64-unknown-linux-gnu/version new/cargo-0.21.0-aarch64-unknown-linux-gnu/version --- old/cargo-0.18.0-aarch64-unknown-linux-gnu/version 2017-04-24 22:38:22.000000000 +0200 +++ new/cargo-0.21.0-aarch64-unknown-linux-gnu/version 2017-08-27 22:01:02.000000000 +0200 @@ -1 +1 @@ -0.18.0 (fe7b0cdcf 2017-04-24) \ No newline at end of file +0.21.0 (5b4b8b2ae 2017-08-12) \ No newline at end of file ++++++ cargo-0.18.0-armv7-unknown-linux-gnueabihf.tar.gz -> cargo-0.21.0-armv7-unknown-linux-gnueabihf.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/README.md new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/README.md --- old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/README.md 2017-04-24 22:29:55.000000000 +0200 +++ new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/README.md 2017-08-27 22:07:53.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` Binary files old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/cargo/bin/cargo and new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/cargo/bin/cargo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/cargo/etc/bash_completion.d/cargo new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/cargo/etc/bash_completion.d/cargo --- old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/cargo/etc/bash_completion.d/cargo 1970-01-01 01:00:00.000000000 +0100 +++ new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/cargo/etc/bash_completion.d/cargo 2017-08-27 22:07:53.000000000 +0200 @@ -0,0 +1,211 @@ +command -v cargo >/dev/null 2>&1 && +_cargo() +{ + local cur prev words cword cmd + _get_comp_words_by_ref cur prev words cword + + COMPREPLY=() + + cmd=${words[1]} + + local vcs='git hg none' + local color='auto always never' + local msg_format='human json' + + local opt_help='-h --help' + local opt_verbose='-v --verbose' + local opt_quiet='-q --quiet' + local opt_color='--color' + local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" + local opt_pkg='-p --package' + local opt_feat='--features --all-features --no-default-features' + local opt_mani='--manifest-path' + local opt_jobs='-j --jobs' + local opt_force='-f --force' + local opt_test='--test --bench' + local opt_lock='--frozen --locked' + + local opt___nocmd="$opt_common -V --version --list" + local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" + local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" + local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" + local opt__fetch="$opt_common $opt_mani $opt_lock" + local opt__generate_lockfile="${opt__fetch}" + local opt__git_checkout="$opt_common $opt_lock --reference --url" + local opt__help="$opt_help" + local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" + local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" + local opt__locate_project="$opt_mani -h --help" + local opt__login="$opt_common $opt_lock --host" + local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" + local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" + local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" + local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" + local opt__pkgid="${opt__fetch} $opt_pkg" + local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" + local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" + local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" + local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" + local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" + local opt__search="$opt_common $opt_lock --host --limit" + local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" + local opt__uninstall="$opt_common $opt_lock --bin --root" + local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" + local opt__verify_project="${opt__fetch}" + local opt__version="$opt_help $opt_verbose $opt_color" + local opt__yank="$opt_common $opt_lock --vers --undo --index --token" + + if [[ $cword -eq 1 ]]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) + else + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + fi + elif [[ $cword -ge 2 ]]; then + case "${prev}" in + --vcs) + COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) + ;; + --color) + COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) + ;; + --message-format) + COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) + ;; + --manifest-path) + _filedir toml + ;; + --bin) + COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) + ;; + --test) + COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) + ;; + --bench) + COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) + ;; + --example) + COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) + ;; + --target) + COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) + ;; + help) + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + ;; + *) + local opt_var=opt__${cmd//-/_} + COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) + ;; + esac + fi + + # compopt does not work in bash version 3 + + return 0 +} && +complete -F _cargo cargo + +__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) + +_locate_manifest(){ + local manifest=`cargo locate-project 2>/dev/null` + # regexp-replace manifest '\{"root":"|"\}' '' + echo ${manifest:9:-2} +} + +# Extracts the values of "name" from the array given in $1 and shows them as +# command line options for completion +_get_names_from_array() +{ + local manifest=$(_locate_manifest) + if [[ -z $manifest ]]; then + return 0 + fi + + local last_line + local -a names + local in_block=false + local block_name=$1 + while read line + do + if [[ $last_line == "[[$block_name]]" ]]; then + in_block=true + else + if [[ $last_line =~ .*\[\[.* ]]; then + in_block=false + fi + fi + + if [[ $in_block == true ]]; then + if [[ $line =~ .*name.*\= ]]; then + line=${line##*=} + line=${line%%\"} + line=${line##*\"} + names+=($line) + fi + fi + + last_line=$line + done < $manifest + echo "${names[@]}" +} + +#Gets the bin names from the manifest file +_bin_names() +{ + _get_names_from_array "bin" +} + +#Gets the test names from the manifest file +_test_names() +{ + _get_names_from_array "test" +} + +#Gets the bench names from the manifest file +_benchmark_names() +{ + _get_names_from_array "bench" +} + +_get_examples(){ + local files=($(dirname $(_locate_manifest))/examples/*.rs) + local names=("${files[@]##*/}") + local names=("${names[@]%.*}") + # "*" means no examples found + if [[ "${names[@]}" != "*" ]]; then + echo "${names[@]}" + fi +} + +_get_targets(){ + local CURRENT_PATH + if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then + CURRENT_PATH=$PWD + else + CURRENT_PATH=$(_locate_manifest) + fi + if [[ -z "$CURRENT_PATH" ]]; then + return 1 + fi + local TARGETS=() + local FIND_PATHS=( "/" ) + local FIND_PATH LINES LINE + while [[ "$CURRENT_PATH" != "/" ]]; do + FIND_PATHS+=( "$CURRENT_PATH" ) + CURRENT_PATH=$(dirname $CURRENT_PATH) + done + for FIND_PATH in ${FIND_PATHS[@]}; do + if [[ -f "$FIND_PATH"/.cargo/config ]]; then + LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) + for LINE in ${LINES[@]}; do + TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) + done + fi + done + echo "${TARGETS[@]}" +} +# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/cargo/etc/bash_completions.d/cargo new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/cargo/etc/bash_completions.d/cargo --- old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/cargo/etc/bash_completions.d/cargo 2017-04-24 22:29:55.000000000 +0200 +++ new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/cargo/etc/bash_completions.d/cargo 1970-01-01 01:00:00.000000000 +0100 @@ -1,211 +0,0 @@ -command -v cargo >/dev/null 2>&1 && -_cargo() -{ - local cur prev words cword cmd - _get_comp_words_by_ref cur prev words cword - - COMPREPLY=() - - cmd=${words[1]} - - local vcs='git hg none' - local color='auto always never' - local msg_format='human json' - - local opt_help='-h --help' - local opt_verbose='-v --verbose' - local opt_quiet='-q --quiet' - local opt_color='--color' - local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" - local opt_pkg='-p --package' - local opt_feat='--features --all-features --no-default-features' - local opt_mani='--manifest-path' - local opt_jobs='-j --jobs' - local opt_force='-f --force' - local opt_test='--test --bench' - local opt_lock='--frozen --locked' - - local opt___nocmd="$opt_common -V --version --list" - local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" - local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" - local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" - local opt__fetch="$opt_common $opt_mani $opt_lock" - local opt__generate_lockfile="${opt__fetch}" - local opt__git_checkout="$opt_common $opt_lock --reference --url" - local opt__help="$opt_help" - local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" - local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" - local opt__locate_project="$opt_mani -h --help" - local opt__login="$opt_common $opt_lock --host" - local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" - local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" - local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" - local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" - local opt__pkgid="${opt__fetch} $opt_pkg" - local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" - local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" - local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" - local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" - local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" - local opt__search="$opt_common $opt_lock --host --limit" - local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" - local opt__uninstall="$opt_common $opt_lock --bin --root" - local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" - local opt__verify_project="${opt__fetch}" - local opt__version="$opt_help $opt_verbose $opt_color" - local opt__yank="$opt_common $opt_lock --vers --undo --index --token" - - if [[ $cword -eq 1 ]]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) - else - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - fi - elif [[ $cword -ge 2 ]]; then - case "${prev}" in - --vcs) - COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) - ;; - --color) - COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) - ;; - --message-format) - COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) - ;; - --manifest-path) - _filedir toml - ;; - --bin) - COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) - ;; - --test) - COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) - ;; - --bench) - COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) - ;; - --example) - COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) - ;; - --target) - COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) - ;; - help) - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - ;; - *) - local opt_var=opt__${cmd//-/_} - COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) - ;; - esac - fi - - # compopt does not work in bash version 3 - - return 0 -} && -complete -F _cargo cargo - -__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) - -_locate_manifest(){ - local manifest=`cargo locate-project 2>/dev/null` - # regexp-replace manifest '\{"root":"|"\}' '' - echo ${manifest:9:-2} -} - -# Extracts the values of "name" from the array given in $1 and shows them as -# command line options for completion -_get_names_from_array() -{ - local manifest=$(_locate_manifest) - if [[ -z $manifest ]]; then - return 0 - fi - - local last_line - local -a names - local in_block=false - local block_name=$1 - while read line - do - if [[ $last_line == "[[$block_name]]" ]]; then - in_block=true - else - if [[ $last_line =~ .*\[\[.* ]]; then - in_block=false - fi - fi - - if [[ $in_block == true ]]; then - if [[ $line =~ .*name.*\= ]]; then - line=${line##*=} - line=${line%%\"} - line=${line##*\"} - names+=($line) - fi - fi - - last_line=$line - done < $manifest - echo "${names[@]}" -} - -#Gets the bin names from the manifest file -_bin_names() -{ - _get_names_from_array "bin" -} - -#Gets the test names from the manifest file -_test_names() -{ - _get_names_from_array "test" -} - -#Gets the bench names from the manifest file -_benchmark_names() -{ - _get_names_from_array "bench" -} - -_get_examples(){ - local files=($(dirname $(_locate_manifest))/examples/*.rs) - local names=("${files[@]##*/}") - local names=("${names[@]%.*}") - # "*" means no examples found - if [[ "${names[@]}" != "*" ]]; then - echo "${names[@]}" - fi -} - -_get_targets(){ - local CURRENT_PATH - if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then - CURRENT_PATH=$PWD - else - CURRENT_PATH=$(_locate_manifest) - fi - if [[ -z "$CURRENT_PATH" ]]; then - return 1 - fi - local TARGETS=() - local FIND_PATHS=( "/" ) - local FIND_PATH LINES LINE - while [[ "$CURRENT_PATH" != "/" ]]; do - FIND_PATHS+=( "$CURRENT_PATH" ) - CURRENT_PATH=$(dirname $CURRENT_PATH) - done - for FIND_PATH in ${FIND_PATHS[@]}; do - if [[ -f "$FIND_PATH"/.cargo/config ]]; then - LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) - for LINE in ${LINES[@]}; do - TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) - done - fi - done - echo "${TARGETS[@]}" -} -# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/cargo/manifest.in new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/cargo/manifest.in --- old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/cargo/manifest.in 2017-04-24 22:29:55.000000000 +0200 +++ new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/cargo/manifest.in 2017-08-27 22:07:53.000000000 +0200 @@ -1,33 +1,33 @@ -file:bin/cargo -file:etc/bash_completions.d/cargo -file:share/doc/cargo/LICENSE-APACHE -file:share/doc/cargo/LICENSE-MIT -file:share/doc/cargo/LICENSE-THIRD-PARTY -file:share/doc/cargo/README.md -file:share/man/man1/cargo-bench.1 -file:share/man/man1/cargo-build.1 file:share/man/man1/cargo-check.1 -file:share/man/man1/cargo-clean.1 file:share/man/man1/cargo-doc.1 +file:share/man/man1/cargo-package.1 +file:share/man/man1/cargo-install.1 file:share/man/man1/cargo-fetch.1 +file:share/man/man1/cargo-update.1 +file:share/man/man1/cargo-new.1 file:share/man/man1/cargo-generate-lockfile.1 file:share/man/man1/cargo-init.1 -file:share/man/man1/cargo-install.1 -file:share/man/man1/cargo-login.1 -file:share/man/man1/cargo-metadata.1 -file:share/man/man1/cargo-new.1 -file:share/man/man1/cargo-owner.1 -file:share/man/man1/cargo-package.1 -file:share/man/man1/cargo-pkgid.1 -file:share/man/man1/cargo-publish.1 -file:share/man/man1/cargo-run.1 file:share/man/man1/cargo-rustc.1 +file:share/man/man1/cargo-clean.1 +file:share/man/man1/cargo-metadata.1 +file:share/man/man1/cargo.1 +file:share/man/man1/cargo-bench.1 +file:share/man/man1/cargo-yank.1 file:share/man/man1/cargo-rustdoc.1 +file:share/man/man1/cargo-run.1 +file:share/man/man1/cargo-publish.1 +file:share/man/man1/cargo-build.1 +file:share/man/man1/cargo-login.1 +file:share/man/man1/cargo-version.1 +file:share/man/man1/cargo-uninstall.1 +file:share/man/man1/cargo-owner.1 file:share/man/man1/cargo-search.1 file:share/man/man1/cargo-test.1 -file:share/man/man1/cargo-uninstall.1 -file:share/man/man1/cargo-update.1 -file:share/man/man1/cargo-version.1 -file:share/man/man1/cargo-yank.1 -file:share/man/man1/cargo.1 +file:share/man/man1/cargo-pkgid.1 file:share/zsh/site-functions/_cargo +file:share/doc/cargo/LICENSE-MIT +file:share/doc/cargo/LICENSE-APACHE +file:share/doc/cargo/README.md +file:share/doc/cargo/LICENSE-THIRD-PARTY +file:etc/bash_completion.d/cargo +file:bin/cargo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/cargo/share/doc/cargo/README.md new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/cargo/share/doc/cargo/README.md --- old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/cargo/share/doc/cargo/README.md 2017-04-24 22:29:55.000000000 +0200 +++ new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/cargo/share/doc/cargo/README.md 2017-08-27 22:07:53.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/cargo/share/zsh/site-functions/_cargo new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/cargo/share/zsh/site-functions/_cargo --- old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/cargo/share/zsh/site-functions/_cargo 2017-04-24 22:29:55.000000000 +0200 +++ new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/cargo/share/zsh/site-functions/_cargo 2017-08-27 22:07:53.000000000 +0200 @@ -348,6 +348,15 @@ '(-v, --verbose)'{-v,--verbose}'[use verbose output]' \ '--color=:colorization option:(auto always never)' \ '1: :_test_names' \ + '(--doc --bin --example --test --bench)--lib[only test library]' \ + '(--lib --bin --example --test --bench)--doc[only test documentation]' \ + '(--lib --doc --example --test --bench)--bin=[binary name]' \ + '(--lib --doc --bin --test --bench)--example=[example name]' \ + '(--lib --doc --bin --example --bench)--test=[test name]' \ + '(--lib --doc --bin --example --test)--bench=[benchmark name]' \ + '--message-format:error format:(human json)' \ + '--frozen[require lock and cache up to date]' \ + '--locked[require lock up to date]' ;; uninstall) @@ -510,7 +519,7 @@ _get_names_from_array "bench" } -# These flags are mutally exclusive specifiers for the scope of a command; as +# These flags are mutually exclusive specifiers for the scope of a command; as # they are used in multiple places without change, they are expanded into the # appropriate command's `_arguments` where appropriate. set command_scope_spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/install.sh new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/install.sh --- old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/install.sh 2017-04-24 22:29:55.000000000 +0200 +++ new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/install.sh 2017-08-27 22:07:53.000000000 +0200 @@ -363,6 +363,9 @@ CYGWIN*) _ostype=pc-windows-gnu ;; + Haiku) + _ostype=unknown-haiku + ;; *) err "unknown value from uname -s: $_uname_value" @@ -612,6 +615,18 @@ # Decide the destination of the file local _file_install_path="$_dest_prefix/$_file" + if echo "$_file" | grep "^etc/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^etc\///')" + _file_install_path="$CFG_SYSCONFDIR/$_f" + fi + + if echo "$_file" | grep "^bin/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^bin\///')" + _file_install_path="$CFG_BINDIR/$_f" + fi + if echo "$_file" | grep "^lib/" > /dev/null then local _f="$(echo "$_file" | sed 's/^lib\///')" @@ -684,7 +699,7 @@ critical_need_ok "failed to copy directory" # Set permissions. 0755 for dirs, 644 for files - run chmod -R u+rwx,go+rx,go-w "$_file_install_path" + run chmod -R u+rwX,go+rX,go-w "$_file_install_path" critical_need_ok "failed to set permissions on directory" # Update the manifest @@ -851,6 +866,8 @@ valopt without "" "comma-separated list of components to not install" valopt components "" "comma-separated list of components to install" flag list-components "list available components" +valopt sysconfdir "$CFG_DESTDIR_PREFIX/etc" "install system configuration files" +valopt bindir "$CFG_DESTDIR_PREFIX/bin" "install binaries" valopt libdir "$CFG_DESTDIR_PREFIX/lib" "install libraries" valopt mandir "$CFG_DESTDIR_PREFIX/share/man" "install man pages in PATH" # NB See the docdir handling in install_components for an explanation of this @@ -874,15 +891,15 @@ # FIXME: Might want to consider loading this from a file and not generating install.sh # Rust or Cargo -TEMPLATE_PRODUCT_NAME="Rust" +TEMPLATE_PRODUCT_NAME='Rust' # rustlib or cargo TEMPLATE_REL_MANIFEST_DIR=rustlib # 'Rust is ready to roll.' or 'Cargo is cool to cruise.' -TEMPLATE_SUCCESS_MESSAGE="Rust is ready to roll." +TEMPLATE_SUCCESS_MESSAGE='Rust is ready to roll.' # Locations to look for directories containing legacy, pre-versioned manifests -TEMPLATE_LEGACY_MANIFEST_DIRS="rustlib,cargo" +TEMPLATE_LEGACY_MANIFEST_DIRS='rustlib,cargo' # The installer version -TEMPLATE_RUST_INSTALLER_VERSION="3" +TEMPLATE_RUST_INSTALLER_VERSION='3' # OK, let's get installing ... @@ -1014,3 +1031,5 @@ echo echo " $TEMPLATE_SUCCESS_MESSAGE" echo + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/version new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/version --- old/cargo-0.18.0-armv7-unknown-linux-gnueabihf/version 2017-04-24 22:29:55.000000000 +0200 +++ new/cargo-0.21.0-armv7-unknown-linux-gnueabihf/version 2017-08-27 22:07:53.000000000 +0200 @@ -1 +1 @@ -0.18.0 (fe7b0cdcf 2017-04-24) \ No newline at end of file +0.21.0 (5b4b8b2ae 2017-08-12) \ No newline at end of file ++++++ cargo-0.18.0-i686-unknown-linux-gnu.tar.gz -> cargo-0.21.0-i686-unknown-linux-gnu.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-i686-unknown-linux-gnu/README.md new/cargo-0.21.0-i686-unknown-linux-gnu/README.md --- old/cargo-0.18.0-i686-unknown-linux-gnu/README.md 2017-04-24 22:08:40.000000000 +0200 +++ new/cargo-0.21.0-i686-unknown-linux-gnu/README.md 2017-08-27 21:43:59.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` Binary files old/cargo-0.18.0-i686-unknown-linux-gnu/cargo/bin/cargo and new/cargo-0.21.0-i686-unknown-linux-gnu/cargo/bin/cargo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-i686-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo new/cargo-0.21.0-i686-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo --- old/cargo-0.18.0-i686-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo 1970-01-01 01:00:00.000000000 +0100 +++ new/cargo-0.21.0-i686-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo 2017-08-27 21:43:59.000000000 +0200 @@ -0,0 +1,211 @@ +command -v cargo >/dev/null 2>&1 && +_cargo() +{ + local cur prev words cword cmd + _get_comp_words_by_ref cur prev words cword + + COMPREPLY=() + + cmd=${words[1]} + + local vcs='git hg none' + local color='auto always never' + local msg_format='human json' + + local opt_help='-h --help' + local opt_verbose='-v --verbose' + local opt_quiet='-q --quiet' + local opt_color='--color' + local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" + local opt_pkg='-p --package' + local opt_feat='--features --all-features --no-default-features' + local opt_mani='--manifest-path' + local opt_jobs='-j --jobs' + local opt_force='-f --force' + local opt_test='--test --bench' + local opt_lock='--frozen --locked' + + local opt___nocmd="$opt_common -V --version --list" + local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" + local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" + local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" + local opt__fetch="$opt_common $opt_mani $opt_lock" + local opt__generate_lockfile="${opt__fetch}" + local opt__git_checkout="$opt_common $opt_lock --reference --url" + local opt__help="$opt_help" + local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" + local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" + local opt__locate_project="$opt_mani -h --help" + local opt__login="$opt_common $opt_lock --host" + local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" + local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" + local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" + local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" + local opt__pkgid="${opt__fetch} $opt_pkg" + local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" + local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" + local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" + local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" + local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" + local opt__search="$opt_common $opt_lock --host --limit" + local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" + local opt__uninstall="$opt_common $opt_lock --bin --root" + local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" + local opt__verify_project="${opt__fetch}" + local opt__version="$opt_help $opt_verbose $opt_color" + local opt__yank="$opt_common $opt_lock --vers --undo --index --token" + + if [[ $cword -eq 1 ]]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) + else + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + fi + elif [[ $cword -ge 2 ]]; then + case "${prev}" in + --vcs) + COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) + ;; + --color) + COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) + ;; + --message-format) + COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) + ;; + --manifest-path) + _filedir toml + ;; + --bin) + COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) + ;; + --test) + COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) + ;; + --bench) + COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) + ;; + --example) + COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) + ;; + --target) + COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) + ;; + help) + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + ;; + *) + local opt_var=opt__${cmd//-/_} + COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) + ;; + esac + fi + + # compopt does not work in bash version 3 + + return 0 +} && +complete -F _cargo cargo + +__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) + +_locate_manifest(){ + local manifest=`cargo locate-project 2>/dev/null` + # regexp-replace manifest '\{"root":"|"\}' '' + echo ${manifest:9:-2} +} + +# Extracts the values of "name" from the array given in $1 and shows them as +# command line options for completion +_get_names_from_array() +{ + local manifest=$(_locate_manifest) + if [[ -z $manifest ]]; then + return 0 + fi + + local last_line + local -a names + local in_block=false + local block_name=$1 + while read line + do + if [[ $last_line == "[[$block_name]]" ]]; then + in_block=true + else + if [[ $last_line =~ .*\[\[.* ]]; then + in_block=false + fi + fi + + if [[ $in_block == true ]]; then + if [[ $line =~ .*name.*\= ]]; then + line=${line##*=} + line=${line%%\"} + line=${line##*\"} + names+=($line) + fi + fi + + last_line=$line + done < $manifest + echo "${names[@]}" +} + +#Gets the bin names from the manifest file +_bin_names() +{ + _get_names_from_array "bin" +} + +#Gets the test names from the manifest file +_test_names() +{ + _get_names_from_array "test" +} + +#Gets the bench names from the manifest file +_benchmark_names() +{ + _get_names_from_array "bench" +} + +_get_examples(){ + local files=($(dirname $(_locate_manifest))/examples/*.rs) + local names=("${files[@]##*/}") + local names=("${names[@]%.*}") + # "*" means no examples found + if [[ "${names[@]}" != "*" ]]; then + echo "${names[@]}" + fi +} + +_get_targets(){ + local CURRENT_PATH + if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then + CURRENT_PATH=$PWD + else + CURRENT_PATH=$(_locate_manifest) + fi + if [[ -z "$CURRENT_PATH" ]]; then + return 1 + fi + local TARGETS=() + local FIND_PATHS=( "/" ) + local FIND_PATH LINES LINE + while [[ "$CURRENT_PATH" != "/" ]]; do + FIND_PATHS+=( "$CURRENT_PATH" ) + CURRENT_PATH=$(dirname $CURRENT_PATH) + done + for FIND_PATH in ${FIND_PATHS[@]}; do + if [[ -f "$FIND_PATH"/.cargo/config ]]; then + LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) + for LINE in ${LINES[@]}; do + TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) + done + fi + done + echo "${TARGETS[@]}" +} +# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-i686-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo new/cargo-0.21.0-i686-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo --- old/cargo-0.18.0-i686-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo 2017-04-24 22:08:40.000000000 +0200 +++ new/cargo-0.21.0-i686-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo 1970-01-01 01:00:00.000000000 +0100 @@ -1,211 +0,0 @@ -command -v cargo >/dev/null 2>&1 && -_cargo() -{ - local cur prev words cword cmd - _get_comp_words_by_ref cur prev words cword - - COMPREPLY=() - - cmd=${words[1]} - - local vcs='git hg none' - local color='auto always never' - local msg_format='human json' - - local opt_help='-h --help' - local opt_verbose='-v --verbose' - local opt_quiet='-q --quiet' - local opt_color='--color' - local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" - local opt_pkg='-p --package' - local opt_feat='--features --all-features --no-default-features' - local opt_mani='--manifest-path' - local opt_jobs='-j --jobs' - local opt_force='-f --force' - local opt_test='--test --bench' - local opt_lock='--frozen --locked' - - local opt___nocmd="$opt_common -V --version --list" - local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" - local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" - local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" - local opt__fetch="$opt_common $opt_mani $opt_lock" - local opt__generate_lockfile="${opt__fetch}" - local opt__git_checkout="$opt_common $opt_lock --reference --url" - local opt__help="$opt_help" - local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" - local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" - local opt__locate_project="$opt_mani -h --help" - local opt__login="$opt_common $opt_lock --host" - local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" - local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" - local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" - local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" - local opt__pkgid="${opt__fetch} $opt_pkg" - local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" - local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" - local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" - local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" - local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" - local opt__search="$opt_common $opt_lock --host --limit" - local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" - local opt__uninstall="$opt_common $opt_lock --bin --root" - local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" - local opt__verify_project="${opt__fetch}" - local opt__version="$opt_help $opt_verbose $opt_color" - local opt__yank="$opt_common $opt_lock --vers --undo --index --token" - - if [[ $cword -eq 1 ]]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) - else - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - fi - elif [[ $cword -ge 2 ]]; then - case "${prev}" in - --vcs) - COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) - ;; - --color) - COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) - ;; - --message-format) - COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) - ;; - --manifest-path) - _filedir toml - ;; - --bin) - COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) - ;; - --test) - COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) - ;; - --bench) - COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) - ;; - --example) - COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) - ;; - --target) - COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) - ;; - help) - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - ;; - *) - local opt_var=opt__${cmd//-/_} - COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) - ;; - esac - fi - - # compopt does not work in bash version 3 - - return 0 -} && -complete -F _cargo cargo - -__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) - -_locate_manifest(){ - local manifest=`cargo locate-project 2>/dev/null` - # regexp-replace manifest '\{"root":"|"\}' '' - echo ${manifest:9:-2} -} - -# Extracts the values of "name" from the array given in $1 and shows them as -# command line options for completion -_get_names_from_array() -{ - local manifest=$(_locate_manifest) - if [[ -z $manifest ]]; then - return 0 - fi - - local last_line - local -a names - local in_block=false - local block_name=$1 - while read line - do - if [[ $last_line == "[[$block_name]]" ]]; then - in_block=true - else - if [[ $last_line =~ .*\[\[.* ]]; then - in_block=false - fi - fi - - if [[ $in_block == true ]]; then - if [[ $line =~ .*name.*\= ]]; then - line=${line##*=} - line=${line%%\"} - line=${line##*\"} - names+=($line) - fi - fi - - last_line=$line - done < $manifest - echo "${names[@]}" -} - -#Gets the bin names from the manifest file -_bin_names() -{ - _get_names_from_array "bin" -} - -#Gets the test names from the manifest file -_test_names() -{ - _get_names_from_array "test" -} - -#Gets the bench names from the manifest file -_benchmark_names() -{ - _get_names_from_array "bench" -} - -_get_examples(){ - local files=($(dirname $(_locate_manifest))/examples/*.rs) - local names=("${files[@]##*/}") - local names=("${names[@]%.*}") - # "*" means no examples found - if [[ "${names[@]}" != "*" ]]; then - echo "${names[@]}" - fi -} - -_get_targets(){ - local CURRENT_PATH - if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then - CURRENT_PATH=$PWD - else - CURRENT_PATH=$(_locate_manifest) - fi - if [[ -z "$CURRENT_PATH" ]]; then - return 1 - fi - local TARGETS=() - local FIND_PATHS=( "/" ) - local FIND_PATH LINES LINE - while [[ "$CURRENT_PATH" != "/" ]]; do - FIND_PATHS+=( "$CURRENT_PATH" ) - CURRENT_PATH=$(dirname $CURRENT_PATH) - done - for FIND_PATH in ${FIND_PATHS[@]}; do - if [[ -f "$FIND_PATH"/.cargo/config ]]; then - LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) - for LINE in ${LINES[@]}; do - TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) - done - fi - done - echo "${TARGETS[@]}" -} -# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-i686-unknown-linux-gnu/cargo/manifest.in new/cargo-0.21.0-i686-unknown-linux-gnu/cargo/manifest.in --- old/cargo-0.18.0-i686-unknown-linux-gnu/cargo/manifest.in 2017-04-24 22:08:40.000000000 +0200 +++ new/cargo-0.21.0-i686-unknown-linux-gnu/cargo/manifest.in 2017-08-27 21:43:59.000000000 +0200 @@ -1,33 +1,33 @@ -file:bin/cargo -file:etc/bash_completions.d/cargo -file:share/doc/cargo/LICENSE-APACHE -file:share/doc/cargo/LICENSE-MIT -file:share/doc/cargo/LICENSE-THIRD-PARTY -file:share/doc/cargo/README.md -file:share/man/man1/cargo-bench.1 -file:share/man/man1/cargo-build.1 file:share/man/man1/cargo-check.1 -file:share/man/man1/cargo-clean.1 file:share/man/man1/cargo-doc.1 +file:share/man/man1/cargo-package.1 +file:share/man/man1/cargo-install.1 file:share/man/man1/cargo-fetch.1 +file:share/man/man1/cargo-update.1 +file:share/man/man1/cargo-new.1 file:share/man/man1/cargo-generate-lockfile.1 file:share/man/man1/cargo-init.1 -file:share/man/man1/cargo-install.1 -file:share/man/man1/cargo-login.1 -file:share/man/man1/cargo-metadata.1 -file:share/man/man1/cargo-new.1 -file:share/man/man1/cargo-owner.1 -file:share/man/man1/cargo-package.1 -file:share/man/man1/cargo-pkgid.1 -file:share/man/man1/cargo-publish.1 -file:share/man/man1/cargo-run.1 file:share/man/man1/cargo-rustc.1 +file:share/man/man1/cargo-clean.1 +file:share/man/man1/cargo-metadata.1 +file:share/man/man1/cargo.1 +file:share/man/man1/cargo-bench.1 +file:share/man/man1/cargo-yank.1 file:share/man/man1/cargo-rustdoc.1 +file:share/man/man1/cargo-run.1 +file:share/man/man1/cargo-publish.1 +file:share/man/man1/cargo-build.1 +file:share/man/man1/cargo-login.1 +file:share/man/man1/cargo-version.1 +file:share/man/man1/cargo-uninstall.1 +file:share/man/man1/cargo-owner.1 file:share/man/man1/cargo-search.1 file:share/man/man1/cargo-test.1 -file:share/man/man1/cargo-uninstall.1 -file:share/man/man1/cargo-update.1 -file:share/man/man1/cargo-version.1 -file:share/man/man1/cargo-yank.1 -file:share/man/man1/cargo.1 +file:share/man/man1/cargo-pkgid.1 file:share/zsh/site-functions/_cargo +file:share/doc/cargo/LICENSE-MIT +file:share/doc/cargo/LICENSE-APACHE +file:share/doc/cargo/README.md +file:share/doc/cargo/LICENSE-THIRD-PARTY +file:etc/bash_completion.d/cargo +file:bin/cargo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-i686-unknown-linux-gnu/cargo/share/doc/cargo/README.md new/cargo-0.21.0-i686-unknown-linux-gnu/cargo/share/doc/cargo/README.md --- old/cargo-0.18.0-i686-unknown-linux-gnu/cargo/share/doc/cargo/README.md 2017-04-24 22:08:40.000000000 +0200 +++ new/cargo-0.21.0-i686-unknown-linux-gnu/cargo/share/doc/cargo/README.md 2017-08-27 21:43:59.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-i686-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo new/cargo-0.21.0-i686-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo --- old/cargo-0.18.0-i686-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo 2017-04-24 22:08:40.000000000 +0200 +++ new/cargo-0.21.0-i686-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo 2017-08-27 21:43:59.000000000 +0200 @@ -348,6 +348,15 @@ '(-v, --verbose)'{-v,--verbose}'[use verbose output]' \ '--color=:colorization option:(auto always never)' \ '1: :_test_names' \ + '(--doc --bin --example --test --bench)--lib[only test library]' \ + '(--lib --bin --example --test --bench)--doc[only test documentation]' \ + '(--lib --doc --example --test --bench)--bin=[binary name]' \ + '(--lib --doc --bin --test --bench)--example=[example name]' \ + '(--lib --doc --bin --example --bench)--test=[test name]' \ + '(--lib --doc --bin --example --test)--bench=[benchmark name]' \ + '--message-format:error format:(human json)' \ + '--frozen[require lock and cache up to date]' \ + '--locked[require lock up to date]' ;; uninstall) @@ -510,7 +519,7 @@ _get_names_from_array "bench" } -# These flags are mutally exclusive specifiers for the scope of a command; as +# These flags are mutually exclusive specifiers for the scope of a command; as # they are used in multiple places without change, they are expanded into the # appropriate command's `_arguments` where appropriate. set command_scope_spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-i686-unknown-linux-gnu/install.sh new/cargo-0.21.0-i686-unknown-linux-gnu/install.sh --- old/cargo-0.18.0-i686-unknown-linux-gnu/install.sh 2017-04-24 22:08:40.000000000 +0200 +++ new/cargo-0.21.0-i686-unknown-linux-gnu/install.sh 2017-08-27 21:43:59.000000000 +0200 @@ -363,6 +363,9 @@ CYGWIN*) _ostype=pc-windows-gnu ;; + Haiku) + _ostype=unknown-haiku + ;; *) err "unknown value from uname -s: $_uname_value" @@ -612,6 +615,18 @@ # Decide the destination of the file local _file_install_path="$_dest_prefix/$_file" + if echo "$_file" | grep "^etc/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^etc\///')" + _file_install_path="$CFG_SYSCONFDIR/$_f" + fi + + if echo "$_file" | grep "^bin/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^bin\///')" + _file_install_path="$CFG_BINDIR/$_f" + fi + if echo "$_file" | grep "^lib/" > /dev/null then local _f="$(echo "$_file" | sed 's/^lib\///')" @@ -684,7 +699,7 @@ critical_need_ok "failed to copy directory" # Set permissions. 0755 for dirs, 644 for files - run chmod -R u+rwx,go+rx,go-w "$_file_install_path" + run chmod -R u+rwX,go+rX,go-w "$_file_install_path" critical_need_ok "failed to set permissions on directory" # Update the manifest @@ -851,6 +866,8 @@ valopt without "" "comma-separated list of components to not install" valopt components "" "comma-separated list of components to install" flag list-components "list available components" +valopt sysconfdir "$CFG_DESTDIR_PREFIX/etc" "install system configuration files" +valopt bindir "$CFG_DESTDIR_PREFIX/bin" "install binaries" valopt libdir "$CFG_DESTDIR_PREFIX/lib" "install libraries" valopt mandir "$CFG_DESTDIR_PREFIX/share/man" "install man pages in PATH" # NB See the docdir handling in install_components for an explanation of this @@ -874,15 +891,15 @@ # FIXME: Might want to consider loading this from a file and not generating install.sh # Rust or Cargo -TEMPLATE_PRODUCT_NAME="Rust" +TEMPLATE_PRODUCT_NAME='Rust' # rustlib or cargo TEMPLATE_REL_MANIFEST_DIR=rustlib # 'Rust is ready to roll.' or 'Cargo is cool to cruise.' -TEMPLATE_SUCCESS_MESSAGE="Rust is ready to roll." +TEMPLATE_SUCCESS_MESSAGE='Rust is ready to roll.' # Locations to look for directories containing legacy, pre-versioned manifests -TEMPLATE_LEGACY_MANIFEST_DIRS="rustlib,cargo" +TEMPLATE_LEGACY_MANIFEST_DIRS='rustlib,cargo' # The installer version -TEMPLATE_RUST_INSTALLER_VERSION="3" +TEMPLATE_RUST_INSTALLER_VERSION='3' # OK, let's get installing ... @@ -1014,3 +1031,5 @@ echo echo " $TEMPLATE_SUCCESS_MESSAGE" echo + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-i686-unknown-linux-gnu/version new/cargo-0.21.0-i686-unknown-linux-gnu/version --- old/cargo-0.18.0-i686-unknown-linux-gnu/version 2017-04-24 22:08:40.000000000 +0200 +++ new/cargo-0.21.0-i686-unknown-linux-gnu/version 2017-08-27 21:43:59.000000000 +0200 @@ -1 +1 @@ -0.18.0 (fe7b0cdcf 2017-04-24) \ No newline at end of file +0.21.0 (5b4b8b2ae 2017-08-12) \ No newline at end of file ++++++ cargo-0.18.0-powerpc64-unknown-linux-gnu.tar.gz -> cargo-0.21.0-powerpc64-unknown-linux-gnu.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64-unknown-linux-gnu/README.md new/cargo-0.21.0-powerpc64-unknown-linux-gnu/README.md --- old/cargo-0.18.0-powerpc64-unknown-linux-gnu/README.md 2017-04-24 23:08:48.000000000 +0200 +++ new/cargo-0.21.0-powerpc64-unknown-linux-gnu/README.md 2017-08-27 22:03:38.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` Binary files old/cargo-0.18.0-powerpc64-unknown-linux-gnu/cargo/bin/cargo and new/cargo-0.21.0-powerpc64-unknown-linux-gnu/cargo/bin/cargo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo new/cargo-0.21.0-powerpc64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo --- old/cargo-0.18.0-powerpc64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo 1970-01-01 01:00:00.000000000 +0100 +++ new/cargo-0.21.0-powerpc64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo 2017-08-27 22:03:38.000000000 +0200 @@ -0,0 +1,211 @@ +command -v cargo >/dev/null 2>&1 && +_cargo() +{ + local cur prev words cword cmd + _get_comp_words_by_ref cur prev words cword + + COMPREPLY=() + + cmd=${words[1]} + + local vcs='git hg none' + local color='auto always never' + local msg_format='human json' + + local opt_help='-h --help' + local opt_verbose='-v --verbose' + local opt_quiet='-q --quiet' + local opt_color='--color' + local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" + local opt_pkg='-p --package' + local opt_feat='--features --all-features --no-default-features' + local opt_mani='--manifest-path' + local opt_jobs='-j --jobs' + local opt_force='-f --force' + local opt_test='--test --bench' + local opt_lock='--frozen --locked' + + local opt___nocmd="$opt_common -V --version --list" + local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" + local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" + local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" + local opt__fetch="$opt_common $opt_mani $opt_lock" + local opt__generate_lockfile="${opt__fetch}" + local opt__git_checkout="$opt_common $opt_lock --reference --url" + local opt__help="$opt_help" + local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" + local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" + local opt__locate_project="$opt_mani -h --help" + local opt__login="$opt_common $opt_lock --host" + local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" + local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" + local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" + local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" + local opt__pkgid="${opt__fetch} $opt_pkg" + local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" + local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" + local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" + local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" + local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" + local opt__search="$opt_common $opt_lock --host --limit" + local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" + local opt__uninstall="$opt_common $opt_lock --bin --root" + local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" + local opt__verify_project="${opt__fetch}" + local opt__version="$opt_help $opt_verbose $opt_color" + local opt__yank="$opt_common $opt_lock --vers --undo --index --token" + + if [[ $cword -eq 1 ]]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) + else + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + fi + elif [[ $cword -ge 2 ]]; then + case "${prev}" in + --vcs) + COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) + ;; + --color) + COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) + ;; + --message-format) + COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) + ;; + --manifest-path) + _filedir toml + ;; + --bin) + COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) + ;; + --test) + COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) + ;; + --bench) + COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) + ;; + --example) + COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) + ;; + --target) + COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) + ;; + help) + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + ;; + *) + local opt_var=opt__${cmd//-/_} + COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) + ;; + esac + fi + + # compopt does not work in bash version 3 + + return 0 +} && +complete -F _cargo cargo + +__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) + +_locate_manifest(){ + local manifest=`cargo locate-project 2>/dev/null` + # regexp-replace manifest '\{"root":"|"\}' '' + echo ${manifest:9:-2} +} + +# Extracts the values of "name" from the array given in $1 and shows them as +# command line options for completion +_get_names_from_array() +{ + local manifest=$(_locate_manifest) + if [[ -z $manifest ]]; then + return 0 + fi + + local last_line + local -a names + local in_block=false + local block_name=$1 + while read line + do + if [[ $last_line == "[[$block_name]]" ]]; then + in_block=true + else + if [[ $last_line =~ .*\[\[.* ]]; then + in_block=false + fi + fi + + if [[ $in_block == true ]]; then + if [[ $line =~ .*name.*\= ]]; then + line=${line##*=} + line=${line%%\"} + line=${line##*\"} + names+=($line) + fi + fi + + last_line=$line + done < $manifest + echo "${names[@]}" +} + +#Gets the bin names from the manifest file +_bin_names() +{ + _get_names_from_array "bin" +} + +#Gets the test names from the manifest file +_test_names() +{ + _get_names_from_array "test" +} + +#Gets the bench names from the manifest file +_benchmark_names() +{ + _get_names_from_array "bench" +} + +_get_examples(){ + local files=($(dirname $(_locate_manifest))/examples/*.rs) + local names=("${files[@]##*/}") + local names=("${names[@]%.*}") + # "*" means no examples found + if [[ "${names[@]}" != "*" ]]; then + echo "${names[@]}" + fi +} + +_get_targets(){ + local CURRENT_PATH + if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then + CURRENT_PATH=$PWD + else + CURRENT_PATH=$(_locate_manifest) + fi + if [[ -z "$CURRENT_PATH" ]]; then + return 1 + fi + local TARGETS=() + local FIND_PATHS=( "/" ) + local FIND_PATH LINES LINE + while [[ "$CURRENT_PATH" != "/" ]]; do + FIND_PATHS+=( "$CURRENT_PATH" ) + CURRENT_PATH=$(dirname $CURRENT_PATH) + done + for FIND_PATH in ${FIND_PATHS[@]}; do + if [[ -f "$FIND_PATH"/.cargo/config ]]; then + LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) + for LINE in ${LINES[@]}; do + TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) + done + fi + done + echo "${TARGETS[@]}" +} +# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo new/cargo-0.21.0-powerpc64-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo --- old/cargo-0.18.0-powerpc64-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo 2017-04-24 23:08:48.000000000 +0200 +++ new/cargo-0.21.0-powerpc64-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo 1970-01-01 01:00:00.000000000 +0100 @@ -1,211 +0,0 @@ -command -v cargo >/dev/null 2>&1 && -_cargo() -{ - local cur prev words cword cmd - _get_comp_words_by_ref cur prev words cword - - COMPREPLY=() - - cmd=${words[1]} - - local vcs='git hg none' - local color='auto always never' - local msg_format='human json' - - local opt_help='-h --help' - local opt_verbose='-v --verbose' - local opt_quiet='-q --quiet' - local opt_color='--color' - local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" - local opt_pkg='-p --package' - local opt_feat='--features --all-features --no-default-features' - local opt_mani='--manifest-path' - local opt_jobs='-j --jobs' - local opt_force='-f --force' - local opt_test='--test --bench' - local opt_lock='--frozen --locked' - - local opt___nocmd="$opt_common -V --version --list" - local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" - local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" - local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" - local opt__fetch="$opt_common $opt_mani $opt_lock" - local opt__generate_lockfile="${opt__fetch}" - local opt__git_checkout="$opt_common $opt_lock --reference --url" - local opt__help="$opt_help" - local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" - local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" - local opt__locate_project="$opt_mani -h --help" - local opt__login="$opt_common $opt_lock --host" - local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" - local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" - local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" - local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" - local opt__pkgid="${opt__fetch} $opt_pkg" - local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" - local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" - local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" - local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" - local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" - local opt__search="$opt_common $opt_lock --host --limit" - local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" - local opt__uninstall="$opt_common $opt_lock --bin --root" - local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" - local opt__verify_project="${opt__fetch}" - local opt__version="$opt_help $opt_verbose $opt_color" - local opt__yank="$opt_common $opt_lock --vers --undo --index --token" - - if [[ $cword -eq 1 ]]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) - else - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - fi - elif [[ $cword -ge 2 ]]; then - case "${prev}" in - --vcs) - COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) - ;; - --color) - COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) - ;; - --message-format) - COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) - ;; - --manifest-path) - _filedir toml - ;; - --bin) - COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) - ;; - --test) - COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) - ;; - --bench) - COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) - ;; - --example) - COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) - ;; - --target) - COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) - ;; - help) - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - ;; - *) - local opt_var=opt__${cmd//-/_} - COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) - ;; - esac - fi - - # compopt does not work in bash version 3 - - return 0 -} && -complete -F _cargo cargo - -__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) - -_locate_manifest(){ - local manifest=`cargo locate-project 2>/dev/null` - # regexp-replace manifest '\{"root":"|"\}' '' - echo ${manifest:9:-2} -} - -# Extracts the values of "name" from the array given in $1 and shows them as -# command line options for completion -_get_names_from_array() -{ - local manifest=$(_locate_manifest) - if [[ -z $manifest ]]; then - return 0 - fi - - local last_line - local -a names - local in_block=false - local block_name=$1 - while read line - do - if [[ $last_line == "[[$block_name]]" ]]; then - in_block=true - else - if [[ $last_line =~ .*\[\[.* ]]; then - in_block=false - fi - fi - - if [[ $in_block == true ]]; then - if [[ $line =~ .*name.*\= ]]; then - line=${line##*=} - line=${line%%\"} - line=${line##*\"} - names+=($line) - fi - fi - - last_line=$line - done < $manifest - echo "${names[@]}" -} - -#Gets the bin names from the manifest file -_bin_names() -{ - _get_names_from_array "bin" -} - -#Gets the test names from the manifest file -_test_names() -{ - _get_names_from_array "test" -} - -#Gets the bench names from the manifest file -_benchmark_names() -{ - _get_names_from_array "bench" -} - -_get_examples(){ - local files=($(dirname $(_locate_manifest))/examples/*.rs) - local names=("${files[@]##*/}") - local names=("${names[@]%.*}") - # "*" means no examples found - if [[ "${names[@]}" != "*" ]]; then - echo "${names[@]}" - fi -} - -_get_targets(){ - local CURRENT_PATH - if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then - CURRENT_PATH=$PWD - else - CURRENT_PATH=$(_locate_manifest) - fi - if [[ -z "$CURRENT_PATH" ]]; then - return 1 - fi - local TARGETS=() - local FIND_PATHS=( "/" ) - local FIND_PATH LINES LINE - while [[ "$CURRENT_PATH" != "/" ]]; do - FIND_PATHS+=( "$CURRENT_PATH" ) - CURRENT_PATH=$(dirname $CURRENT_PATH) - done - for FIND_PATH in ${FIND_PATHS[@]}; do - if [[ -f "$FIND_PATH"/.cargo/config ]]; then - LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) - for LINE in ${LINES[@]}; do - TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) - done - fi - done - echo "${TARGETS[@]}" -} -# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64-unknown-linux-gnu/cargo/manifest.in new/cargo-0.21.0-powerpc64-unknown-linux-gnu/cargo/manifest.in --- old/cargo-0.18.0-powerpc64-unknown-linux-gnu/cargo/manifest.in 2017-04-24 23:08:48.000000000 +0200 +++ new/cargo-0.21.0-powerpc64-unknown-linux-gnu/cargo/manifest.in 2017-08-27 22:03:38.000000000 +0200 @@ -1,33 +1,33 @@ -file:bin/cargo -file:etc/bash_completions.d/cargo -file:share/doc/cargo/LICENSE-APACHE -file:share/doc/cargo/LICENSE-MIT -file:share/doc/cargo/LICENSE-THIRD-PARTY -file:share/doc/cargo/README.md -file:share/man/man1/cargo-bench.1 -file:share/man/man1/cargo-build.1 file:share/man/man1/cargo-check.1 -file:share/man/man1/cargo-clean.1 file:share/man/man1/cargo-doc.1 +file:share/man/man1/cargo-package.1 +file:share/man/man1/cargo-install.1 file:share/man/man1/cargo-fetch.1 +file:share/man/man1/cargo-update.1 +file:share/man/man1/cargo-new.1 file:share/man/man1/cargo-generate-lockfile.1 file:share/man/man1/cargo-init.1 -file:share/man/man1/cargo-install.1 -file:share/man/man1/cargo-login.1 -file:share/man/man1/cargo-metadata.1 -file:share/man/man1/cargo-new.1 -file:share/man/man1/cargo-owner.1 -file:share/man/man1/cargo-package.1 -file:share/man/man1/cargo-pkgid.1 -file:share/man/man1/cargo-publish.1 -file:share/man/man1/cargo-run.1 file:share/man/man1/cargo-rustc.1 +file:share/man/man1/cargo-clean.1 +file:share/man/man1/cargo-metadata.1 +file:share/man/man1/cargo.1 +file:share/man/man1/cargo-bench.1 +file:share/man/man1/cargo-yank.1 file:share/man/man1/cargo-rustdoc.1 +file:share/man/man1/cargo-run.1 +file:share/man/man1/cargo-publish.1 +file:share/man/man1/cargo-build.1 +file:share/man/man1/cargo-login.1 +file:share/man/man1/cargo-version.1 +file:share/man/man1/cargo-uninstall.1 +file:share/man/man1/cargo-owner.1 file:share/man/man1/cargo-search.1 file:share/man/man1/cargo-test.1 -file:share/man/man1/cargo-uninstall.1 -file:share/man/man1/cargo-update.1 -file:share/man/man1/cargo-version.1 -file:share/man/man1/cargo-yank.1 -file:share/man/man1/cargo.1 +file:share/man/man1/cargo-pkgid.1 file:share/zsh/site-functions/_cargo +file:share/doc/cargo/LICENSE-MIT +file:share/doc/cargo/LICENSE-APACHE +file:share/doc/cargo/README.md +file:share/doc/cargo/LICENSE-THIRD-PARTY +file:etc/bash_completion.d/cargo +file:bin/cargo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64-unknown-linux-gnu/cargo/share/doc/cargo/README.md new/cargo-0.21.0-powerpc64-unknown-linux-gnu/cargo/share/doc/cargo/README.md --- old/cargo-0.18.0-powerpc64-unknown-linux-gnu/cargo/share/doc/cargo/README.md 2017-04-24 23:08:48.000000000 +0200 +++ new/cargo-0.21.0-powerpc64-unknown-linux-gnu/cargo/share/doc/cargo/README.md 2017-08-27 22:03:38.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo new/cargo-0.21.0-powerpc64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo --- old/cargo-0.18.0-powerpc64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo 2017-04-24 23:08:48.000000000 +0200 +++ new/cargo-0.21.0-powerpc64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo 2017-08-27 22:03:38.000000000 +0200 @@ -348,6 +348,15 @@ '(-v, --verbose)'{-v,--verbose}'[use verbose output]' \ '--color=:colorization option:(auto always never)' \ '1: :_test_names' \ + '(--doc --bin --example --test --bench)--lib[only test library]' \ + '(--lib --bin --example --test --bench)--doc[only test documentation]' \ + '(--lib --doc --example --test --bench)--bin=[binary name]' \ + '(--lib --doc --bin --test --bench)--example=[example name]' \ + '(--lib --doc --bin --example --bench)--test=[test name]' \ + '(--lib --doc --bin --example --test)--bench=[benchmark name]' \ + '--message-format:error format:(human json)' \ + '--frozen[require lock and cache up to date]' \ + '--locked[require lock up to date]' ;; uninstall) @@ -510,7 +519,7 @@ _get_names_from_array "bench" } -# These flags are mutally exclusive specifiers for the scope of a command; as +# These flags are mutually exclusive specifiers for the scope of a command; as # they are used in multiple places without change, they are expanded into the # appropriate command's `_arguments` where appropriate. set command_scope_spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64-unknown-linux-gnu/install.sh new/cargo-0.21.0-powerpc64-unknown-linux-gnu/install.sh --- old/cargo-0.18.0-powerpc64-unknown-linux-gnu/install.sh 2017-04-24 23:08:48.000000000 +0200 +++ new/cargo-0.21.0-powerpc64-unknown-linux-gnu/install.sh 2017-08-27 22:03:38.000000000 +0200 @@ -363,6 +363,9 @@ CYGWIN*) _ostype=pc-windows-gnu ;; + Haiku) + _ostype=unknown-haiku + ;; *) err "unknown value from uname -s: $_uname_value" @@ -612,6 +615,18 @@ # Decide the destination of the file local _file_install_path="$_dest_prefix/$_file" + if echo "$_file" | grep "^etc/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^etc\///')" + _file_install_path="$CFG_SYSCONFDIR/$_f" + fi + + if echo "$_file" | grep "^bin/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^bin\///')" + _file_install_path="$CFG_BINDIR/$_f" + fi + if echo "$_file" | grep "^lib/" > /dev/null then local _f="$(echo "$_file" | sed 's/^lib\///')" @@ -684,7 +699,7 @@ critical_need_ok "failed to copy directory" # Set permissions. 0755 for dirs, 644 for files - run chmod -R u+rwx,go+rx,go-w "$_file_install_path" + run chmod -R u+rwX,go+rX,go-w "$_file_install_path" critical_need_ok "failed to set permissions on directory" # Update the manifest @@ -851,6 +866,8 @@ valopt without "" "comma-separated list of components to not install" valopt components "" "comma-separated list of components to install" flag list-components "list available components" +valopt sysconfdir "$CFG_DESTDIR_PREFIX/etc" "install system configuration files" +valopt bindir "$CFG_DESTDIR_PREFIX/bin" "install binaries" valopt libdir "$CFG_DESTDIR_PREFIX/lib" "install libraries" valopt mandir "$CFG_DESTDIR_PREFIX/share/man" "install man pages in PATH" # NB See the docdir handling in install_components for an explanation of this @@ -874,15 +891,15 @@ # FIXME: Might want to consider loading this from a file and not generating install.sh # Rust or Cargo -TEMPLATE_PRODUCT_NAME="Rust" +TEMPLATE_PRODUCT_NAME='Rust' # rustlib or cargo TEMPLATE_REL_MANIFEST_DIR=rustlib # 'Rust is ready to roll.' or 'Cargo is cool to cruise.' -TEMPLATE_SUCCESS_MESSAGE="Rust is ready to roll." +TEMPLATE_SUCCESS_MESSAGE='Rust is ready to roll.' # Locations to look for directories containing legacy, pre-versioned manifests -TEMPLATE_LEGACY_MANIFEST_DIRS="rustlib,cargo" +TEMPLATE_LEGACY_MANIFEST_DIRS='rustlib,cargo' # The installer version -TEMPLATE_RUST_INSTALLER_VERSION="3" +TEMPLATE_RUST_INSTALLER_VERSION='3' # OK, let's get installing ... @@ -1014,3 +1031,5 @@ echo echo " $TEMPLATE_SUCCESS_MESSAGE" echo + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64-unknown-linux-gnu/version new/cargo-0.21.0-powerpc64-unknown-linux-gnu/version --- old/cargo-0.18.0-powerpc64-unknown-linux-gnu/version 2017-04-24 23:08:48.000000000 +0200 +++ new/cargo-0.21.0-powerpc64-unknown-linux-gnu/version 2017-08-27 22:03:38.000000000 +0200 @@ -1 +1 @@ -0.18.0 (fe7b0cdcf 2017-04-24) \ No newline at end of file +0.21.0 (5b4b8b2ae 2017-08-12) \ No newline at end of file ++++++ cargo-0.18.0-powerpc64le-unknown-linux-gnu.tar.gz -> cargo-0.21.0-powerpc64le-unknown-linux-gnu.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/README.md new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/README.md --- old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/README.md 2017-04-24 23:18:11.000000000 +0200 +++ new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/README.md 2017-08-27 21:48:58.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` Binary files old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/cargo/bin/cargo and new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/cargo/bin/cargo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo --- old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo 1970-01-01 01:00:00.000000000 +0100 +++ new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo 2017-08-27 21:48:58.000000000 +0200 @@ -0,0 +1,211 @@ +command -v cargo >/dev/null 2>&1 && +_cargo() +{ + local cur prev words cword cmd + _get_comp_words_by_ref cur prev words cword + + COMPREPLY=() + + cmd=${words[1]} + + local vcs='git hg none' + local color='auto always never' + local msg_format='human json' + + local opt_help='-h --help' + local opt_verbose='-v --verbose' + local opt_quiet='-q --quiet' + local opt_color='--color' + local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" + local opt_pkg='-p --package' + local opt_feat='--features --all-features --no-default-features' + local opt_mani='--manifest-path' + local opt_jobs='-j --jobs' + local opt_force='-f --force' + local opt_test='--test --bench' + local opt_lock='--frozen --locked' + + local opt___nocmd="$opt_common -V --version --list" + local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" + local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" + local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" + local opt__fetch="$opt_common $opt_mani $opt_lock" + local opt__generate_lockfile="${opt__fetch}" + local opt__git_checkout="$opt_common $opt_lock --reference --url" + local opt__help="$opt_help" + local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" + local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" + local opt__locate_project="$opt_mani -h --help" + local opt__login="$opt_common $opt_lock --host" + local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" + local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" + local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" + local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" + local opt__pkgid="${opt__fetch} $opt_pkg" + local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" + local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" + local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" + local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" + local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" + local opt__search="$opt_common $opt_lock --host --limit" + local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" + local opt__uninstall="$opt_common $opt_lock --bin --root" + local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" + local opt__verify_project="${opt__fetch}" + local opt__version="$opt_help $opt_verbose $opt_color" + local opt__yank="$opt_common $opt_lock --vers --undo --index --token" + + if [[ $cword -eq 1 ]]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) + else + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + fi + elif [[ $cword -ge 2 ]]; then + case "${prev}" in + --vcs) + COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) + ;; + --color) + COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) + ;; + --message-format) + COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) + ;; + --manifest-path) + _filedir toml + ;; + --bin) + COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) + ;; + --test) + COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) + ;; + --bench) + COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) + ;; + --example) + COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) + ;; + --target) + COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) + ;; + help) + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + ;; + *) + local opt_var=opt__${cmd//-/_} + COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) + ;; + esac + fi + + # compopt does not work in bash version 3 + + return 0 +} && +complete -F _cargo cargo + +__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) + +_locate_manifest(){ + local manifest=`cargo locate-project 2>/dev/null` + # regexp-replace manifest '\{"root":"|"\}' '' + echo ${manifest:9:-2} +} + +# Extracts the values of "name" from the array given in $1 and shows them as +# command line options for completion +_get_names_from_array() +{ + local manifest=$(_locate_manifest) + if [[ -z $manifest ]]; then + return 0 + fi + + local last_line + local -a names + local in_block=false + local block_name=$1 + while read line + do + if [[ $last_line == "[[$block_name]]" ]]; then + in_block=true + else + if [[ $last_line =~ .*\[\[.* ]]; then + in_block=false + fi + fi + + if [[ $in_block == true ]]; then + if [[ $line =~ .*name.*\= ]]; then + line=${line##*=} + line=${line%%\"} + line=${line##*\"} + names+=($line) + fi + fi + + last_line=$line + done < $manifest + echo "${names[@]}" +} + +#Gets the bin names from the manifest file +_bin_names() +{ + _get_names_from_array "bin" +} + +#Gets the test names from the manifest file +_test_names() +{ + _get_names_from_array "test" +} + +#Gets the bench names from the manifest file +_benchmark_names() +{ + _get_names_from_array "bench" +} + +_get_examples(){ + local files=($(dirname $(_locate_manifest))/examples/*.rs) + local names=("${files[@]##*/}") + local names=("${names[@]%.*}") + # "*" means no examples found + if [[ "${names[@]}" != "*" ]]; then + echo "${names[@]}" + fi +} + +_get_targets(){ + local CURRENT_PATH + if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then + CURRENT_PATH=$PWD + else + CURRENT_PATH=$(_locate_manifest) + fi + if [[ -z "$CURRENT_PATH" ]]; then + return 1 + fi + local TARGETS=() + local FIND_PATHS=( "/" ) + local FIND_PATH LINES LINE + while [[ "$CURRENT_PATH" != "/" ]]; do + FIND_PATHS+=( "$CURRENT_PATH" ) + CURRENT_PATH=$(dirname $CURRENT_PATH) + done + for FIND_PATH in ${FIND_PATHS[@]}; do + if [[ -f "$FIND_PATH"/.cargo/config ]]; then + LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) + for LINE in ${LINES[@]}; do + TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) + done + fi + done + echo "${TARGETS[@]}" +} +# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo --- old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo 2017-04-24 23:18:11.000000000 +0200 +++ new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo 1970-01-01 01:00:00.000000000 +0100 @@ -1,211 +0,0 @@ -command -v cargo >/dev/null 2>&1 && -_cargo() -{ - local cur prev words cword cmd - _get_comp_words_by_ref cur prev words cword - - COMPREPLY=() - - cmd=${words[1]} - - local vcs='git hg none' - local color='auto always never' - local msg_format='human json' - - local opt_help='-h --help' - local opt_verbose='-v --verbose' - local opt_quiet='-q --quiet' - local opt_color='--color' - local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" - local opt_pkg='-p --package' - local opt_feat='--features --all-features --no-default-features' - local opt_mani='--manifest-path' - local opt_jobs='-j --jobs' - local opt_force='-f --force' - local opt_test='--test --bench' - local opt_lock='--frozen --locked' - - local opt___nocmd="$opt_common -V --version --list" - local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" - local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" - local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" - local opt__fetch="$opt_common $opt_mani $opt_lock" - local opt__generate_lockfile="${opt__fetch}" - local opt__git_checkout="$opt_common $opt_lock --reference --url" - local opt__help="$opt_help" - local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" - local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" - local opt__locate_project="$opt_mani -h --help" - local opt__login="$opt_common $opt_lock --host" - local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" - local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" - local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" - local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" - local opt__pkgid="${opt__fetch} $opt_pkg" - local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" - local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" - local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" - local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" - local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" - local opt__search="$opt_common $opt_lock --host --limit" - local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" - local opt__uninstall="$opt_common $opt_lock --bin --root" - local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" - local opt__verify_project="${opt__fetch}" - local opt__version="$opt_help $opt_verbose $opt_color" - local opt__yank="$opt_common $opt_lock --vers --undo --index --token" - - if [[ $cword -eq 1 ]]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) - else - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - fi - elif [[ $cword -ge 2 ]]; then - case "${prev}" in - --vcs) - COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) - ;; - --color) - COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) - ;; - --message-format) - COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) - ;; - --manifest-path) - _filedir toml - ;; - --bin) - COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) - ;; - --test) - COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) - ;; - --bench) - COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) - ;; - --example) - COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) - ;; - --target) - COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) - ;; - help) - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - ;; - *) - local opt_var=opt__${cmd//-/_} - COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) - ;; - esac - fi - - # compopt does not work in bash version 3 - - return 0 -} && -complete -F _cargo cargo - -__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) - -_locate_manifest(){ - local manifest=`cargo locate-project 2>/dev/null` - # regexp-replace manifest '\{"root":"|"\}' '' - echo ${manifest:9:-2} -} - -# Extracts the values of "name" from the array given in $1 and shows them as -# command line options for completion -_get_names_from_array() -{ - local manifest=$(_locate_manifest) - if [[ -z $manifest ]]; then - return 0 - fi - - local last_line - local -a names - local in_block=false - local block_name=$1 - while read line - do - if [[ $last_line == "[[$block_name]]" ]]; then - in_block=true - else - if [[ $last_line =~ .*\[\[.* ]]; then - in_block=false - fi - fi - - if [[ $in_block == true ]]; then - if [[ $line =~ .*name.*\= ]]; then - line=${line##*=} - line=${line%%\"} - line=${line##*\"} - names+=($line) - fi - fi - - last_line=$line - done < $manifest - echo "${names[@]}" -} - -#Gets the bin names from the manifest file -_bin_names() -{ - _get_names_from_array "bin" -} - -#Gets the test names from the manifest file -_test_names() -{ - _get_names_from_array "test" -} - -#Gets the bench names from the manifest file -_benchmark_names() -{ - _get_names_from_array "bench" -} - -_get_examples(){ - local files=($(dirname $(_locate_manifest))/examples/*.rs) - local names=("${files[@]##*/}") - local names=("${names[@]%.*}") - # "*" means no examples found - if [[ "${names[@]}" != "*" ]]; then - echo "${names[@]}" - fi -} - -_get_targets(){ - local CURRENT_PATH - if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then - CURRENT_PATH=$PWD - else - CURRENT_PATH=$(_locate_manifest) - fi - if [[ -z "$CURRENT_PATH" ]]; then - return 1 - fi - local TARGETS=() - local FIND_PATHS=( "/" ) - local FIND_PATH LINES LINE - while [[ "$CURRENT_PATH" != "/" ]]; do - FIND_PATHS+=( "$CURRENT_PATH" ) - CURRENT_PATH=$(dirname $CURRENT_PATH) - done - for FIND_PATH in ${FIND_PATHS[@]}; do - if [[ -f "$FIND_PATH"/.cargo/config ]]; then - LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) - for LINE in ${LINES[@]}; do - TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) - done - fi - done - echo "${TARGETS[@]}" -} -# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/cargo/manifest.in new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/cargo/manifest.in --- old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/cargo/manifest.in 2017-04-24 23:18:11.000000000 +0200 +++ new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/cargo/manifest.in 2017-08-27 21:48:58.000000000 +0200 @@ -1,33 +1,33 @@ -file:bin/cargo -file:etc/bash_completions.d/cargo -file:share/doc/cargo/LICENSE-APACHE -file:share/doc/cargo/LICENSE-MIT -file:share/doc/cargo/LICENSE-THIRD-PARTY -file:share/doc/cargo/README.md -file:share/man/man1/cargo-bench.1 -file:share/man/man1/cargo-build.1 file:share/man/man1/cargo-check.1 -file:share/man/man1/cargo-clean.1 file:share/man/man1/cargo-doc.1 +file:share/man/man1/cargo-package.1 +file:share/man/man1/cargo-install.1 file:share/man/man1/cargo-fetch.1 +file:share/man/man1/cargo-update.1 +file:share/man/man1/cargo-new.1 file:share/man/man1/cargo-generate-lockfile.1 file:share/man/man1/cargo-init.1 -file:share/man/man1/cargo-install.1 -file:share/man/man1/cargo-login.1 -file:share/man/man1/cargo-metadata.1 -file:share/man/man1/cargo-new.1 -file:share/man/man1/cargo-owner.1 -file:share/man/man1/cargo-package.1 -file:share/man/man1/cargo-pkgid.1 -file:share/man/man1/cargo-publish.1 -file:share/man/man1/cargo-run.1 file:share/man/man1/cargo-rustc.1 +file:share/man/man1/cargo-clean.1 +file:share/man/man1/cargo-metadata.1 +file:share/man/man1/cargo.1 +file:share/man/man1/cargo-bench.1 +file:share/man/man1/cargo-yank.1 file:share/man/man1/cargo-rustdoc.1 +file:share/man/man1/cargo-run.1 +file:share/man/man1/cargo-publish.1 +file:share/man/man1/cargo-build.1 +file:share/man/man1/cargo-login.1 +file:share/man/man1/cargo-version.1 +file:share/man/man1/cargo-uninstall.1 +file:share/man/man1/cargo-owner.1 file:share/man/man1/cargo-search.1 file:share/man/man1/cargo-test.1 -file:share/man/man1/cargo-uninstall.1 -file:share/man/man1/cargo-update.1 -file:share/man/man1/cargo-version.1 -file:share/man/man1/cargo-yank.1 -file:share/man/man1/cargo.1 +file:share/man/man1/cargo-pkgid.1 file:share/zsh/site-functions/_cargo +file:share/doc/cargo/LICENSE-MIT +file:share/doc/cargo/LICENSE-APACHE +file:share/doc/cargo/README.md +file:share/doc/cargo/LICENSE-THIRD-PARTY +file:etc/bash_completion.d/cargo +file:bin/cargo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/cargo/share/doc/cargo/README.md new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/cargo/share/doc/cargo/README.md --- old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/cargo/share/doc/cargo/README.md 2017-04-24 23:18:11.000000000 +0200 +++ new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/cargo/share/doc/cargo/README.md 2017-08-27 21:48:58.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo --- old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo 2017-04-24 23:18:11.000000000 +0200 +++ new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo 2017-08-27 21:48:58.000000000 +0200 @@ -348,6 +348,15 @@ '(-v, --verbose)'{-v,--verbose}'[use verbose output]' \ '--color=:colorization option:(auto always never)' \ '1: :_test_names' \ + '(--doc --bin --example --test --bench)--lib[only test library]' \ + '(--lib --bin --example --test --bench)--doc[only test documentation]' \ + '(--lib --doc --example --test --bench)--bin=[binary name]' \ + '(--lib --doc --bin --test --bench)--example=[example name]' \ + '(--lib --doc --bin --example --bench)--test=[test name]' \ + '(--lib --doc --bin --example --test)--bench=[benchmark name]' \ + '--message-format:error format:(human json)' \ + '--frozen[require lock and cache up to date]' \ + '--locked[require lock up to date]' ;; uninstall) @@ -510,7 +519,7 @@ _get_names_from_array "bench" } -# These flags are mutally exclusive specifiers for the scope of a command; as +# These flags are mutually exclusive specifiers for the scope of a command; as # they are used in multiple places without change, they are expanded into the # appropriate command's `_arguments` where appropriate. set command_scope_spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/install.sh new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/install.sh --- old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/install.sh 2017-04-24 23:18:11.000000000 +0200 +++ new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/install.sh 2017-08-27 21:48:58.000000000 +0200 @@ -363,6 +363,9 @@ CYGWIN*) _ostype=pc-windows-gnu ;; + Haiku) + _ostype=unknown-haiku + ;; *) err "unknown value from uname -s: $_uname_value" @@ -612,6 +615,18 @@ # Decide the destination of the file local _file_install_path="$_dest_prefix/$_file" + if echo "$_file" | grep "^etc/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^etc\///')" + _file_install_path="$CFG_SYSCONFDIR/$_f" + fi + + if echo "$_file" | grep "^bin/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^bin\///')" + _file_install_path="$CFG_BINDIR/$_f" + fi + if echo "$_file" | grep "^lib/" > /dev/null then local _f="$(echo "$_file" | sed 's/^lib\///')" @@ -684,7 +699,7 @@ critical_need_ok "failed to copy directory" # Set permissions. 0755 for dirs, 644 for files - run chmod -R u+rwx,go+rx,go-w "$_file_install_path" + run chmod -R u+rwX,go+rX,go-w "$_file_install_path" critical_need_ok "failed to set permissions on directory" # Update the manifest @@ -851,6 +866,8 @@ valopt without "" "comma-separated list of components to not install" valopt components "" "comma-separated list of components to install" flag list-components "list available components" +valopt sysconfdir "$CFG_DESTDIR_PREFIX/etc" "install system configuration files" +valopt bindir "$CFG_DESTDIR_PREFIX/bin" "install binaries" valopt libdir "$CFG_DESTDIR_PREFIX/lib" "install libraries" valopt mandir "$CFG_DESTDIR_PREFIX/share/man" "install man pages in PATH" # NB See the docdir handling in install_components for an explanation of this @@ -874,15 +891,15 @@ # FIXME: Might want to consider loading this from a file and not generating install.sh # Rust or Cargo -TEMPLATE_PRODUCT_NAME="Rust" +TEMPLATE_PRODUCT_NAME='Rust' # rustlib or cargo TEMPLATE_REL_MANIFEST_DIR=rustlib # 'Rust is ready to roll.' or 'Cargo is cool to cruise.' -TEMPLATE_SUCCESS_MESSAGE="Rust is ready to roll." +TEMPLATE_SUCCESS_MESSAGE='Rust is ready to roll.' # Locations to look for directories containing legacy, pre-versioned manifests -TEMPLATE_LEGACY_MANIFEST_DIRS="rustlib,cargo" +TEMPLATE_LEGACY_MANIFEST_DIRS='rustlib,cargo' # The installer version -TEMPLATE_RUST_INSTALLER_VERSION="3" +TEMPLATE_RUST_INSTALLER_VERSION='3' # OK, let's get installing ... @@ -1014,3 +1031,5 @@ echo echo " $TEMPLATE_SUCCESS_MESSAGE" echo + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/version new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/version --- old/cargo-0.18.0-powerpc64le-unknown-linux-gnu/version 2017-04-24 23:18:11.000000000 +0200 +++ new/cargo-0.21.0-powerpc64le-unknown-linux-gnu/version 2017-08-27 21:48:58.000000000 +0200 @@ -1 +1 @@ -0.18.0 (fe7b0cdcf 2017-04-24) \ No newline at end of file +0.21.0 (5b4b8b2ae 2017-08-12) \ No newline at end of file ++++++ cargo-0.18.0-s390x-unknown-linux-gnu.tar.gz -> cargo-0.21.0-s390x-unknown-linux-gnu.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-s390x-unknown-linux-gnu/README.md new/cargo-0.21.0-s390x-unknown-linux-gnu/README.md --- old/cargo-0.18.0-s390x-unknown-linux-gnu/README.md 2017-04-24 22:37:49.000000000 +0200 +++ new/cargo-0.21.0-s390x-unknown-linux-gnu/README.md 2017-08-27 22:00:26.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` Binary files old/cargo-0.18.0-s390x-unknown-linux-gnu/cargo/bin/cargo and new/cargo-0.21.0-s390x-unknown-linux-gnu/cargo/bin/cargo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-s390x-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo new/cargo-0.21.0-s390x-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo --- old/cargo-0.18.0-s390x-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo 1970-01-01 01:00:00.000000000 +0100 +++ new/cargo-0.21.0-s390x-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo 2017-08-27 22:00:26.000000000 +0200 @@ -0,0 +1,211 @@ +command -v cargo >/dev/null 2>&1 && +_cargo() +{ + local cur prev words cword cmd + _get_comp_words_by_ref cur prev words cword + + COMPREPLY=() + + cmd=${words[1]} + + local vcs='git hg none' + local color='auto always never' + local msg_format='human json' + + local opt_help='-h --help' + local opt_verbose='-v --verbose' + local opt_quiet='-q --quiet' + local opt_color='--color' + local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" + local opt_pkg='-p --package' + local opt_feat='--features --all-features --no-default-features' + local opt_mani='--manifest-path' + local opt_jobs='-j --jobs' + local opt_force='-f --force' + local opt_test='--test --bench' + local opt_lock='--frozen --locked' + + local opt___nocmd="$opt_common -V --version --list" + local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" + local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" + local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" + local opt__fetch="$opt_common $opt_mani $opt_lock" + local opt__generate_lockfile="${opt__fetch}" + local opt__git_checkout="$opt_common $opt_lock --reference --url" + local opt__help="$opt_help" + local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" + local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" + local opt__locate_project="$opt_mani -h --help" + local opt__login="$opt_common $opt_lock --host" + local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" + local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" + local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" + local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" + local opt__pkgid="${opt__fetch} $opt_pkg" + local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" + local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" + local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" + local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" + local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" + local opt__search="$opt_common $opt_lock --host --limit" + local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" + local opt__uninstall="$opt_common $opt_lock --bin --root" + local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" + local opt__verify_project="${opt__fetch}" + local opt__version="$opt_help $opt_verbose $opt_color" + local opt__yank="$opt_common $opt_lock --vers --undo --index --token" + + if [[ $cword -eq 1 ]]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) + else + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + fi + elif [[ $cword -ge 2 ]]; then + case "${prev}" in + --vcs) + COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) + ;; + --color) + COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) + ;; + --message-format) + COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) + ;; + --manifest-path) + _filedir toml + ;; + --bin) + COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) + ;; + --test) + COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) + ;; + --bench) + COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) + ;; + --example) + COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) + ;; + --target) + COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) + ;; + help) + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + ;; + *) + local opt_var=opt__${cmd//-/_} + COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) + ;; + esac + fi + + # compopt does not work in bash version 3 + + return 0 +} && +complete -F _cargo cargo + +__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) + +_locate_manifest(){ + local manifest=`cargo locate-project 2>/dev/null` + # regexp-replace manifest '\{"root":"|"\}' '' + echo ${manifest:9:-2} +} + +# Extracts the values of "name" from the array given in $1 and shows them as +# command line options for completion +_get_names_from_array() +{ + local manifest=$(_locate_manifest) + if [[ -z $manifest ]]; then + return 0 + fi + + local last_line + local -a names + local in_block=false + local block_name=$1 + while read line + do + if [[ $last_line == "[[$block_name]]" ]]; then + in_block=true + else + if [[ $last_line =~ .*\[\[.* ]]; then + in_block=false + fi + fi + + if [[ $in_block == true ]]; then + if [[ $line =~ .*name.*\= ]]; then + line=${line##*=} + line=${line%%\"} + line=${line##*\"} + names+=($line) + fi + fi + + last_line=$line + done < $manifest + echo "${names[@]}" +} + +#Gets the bin names from the manifest file +_bin_names() +{ + _get_names_from_array "bin" +} + +#Gets the test names from the manifest file +_test_names() +{ + _get_names_from_array "test" +} + +#Gets the bench names from the manifest file +_benchmark_names() +{ + _get_names_from_array "bench" +} + +_get_examples(){ + local files=($(dirname $(_locate_manifest))/examples/*.rs) + local names=("${files[@]##*/}") + local names=("${names[@]%.*}") + # "*" means no examples found + if [[ "${names[@]}" != "*" ]]; then + echo "${names[@]}" + fi +} + +_get_targets(){ + local CURRENT_PATH + if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then + CURRENT_PATH=$PWD + else + CURRENT_PATH=$(_locate_manifest) + fi + if [[ -z "$CURRENT_PATH" ]]; then + return 1 + fi + local TARGETS=() + local FIND_PATHS=( "/" ) + local FIND_PATH LINES LINE + while [[ "$CURRENT_PATH" != "/" ]]; do + FIND_PATHS+=( "$CURRENT_PATH" ) + CURRENT_PATH=$(dirname $CURRENT_PATH) + done + for FIND_PATH in ${FIND_PATHS[@]}; do + if [[ -f "$FIND_PATH"/.cargo/config ]]; then + LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) + for LINE in ${LINES[@]}; do + TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) + done + fi + done + echo "${TARGETS[@]}" +} +# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-s390x-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo new/cargo-0.21.0-s390x-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo --- old/cargo-0.18.0-s390x-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo 2017-04-24 22:37:49.000000000 +0200 +++ new/cargo-0.21.0-s390x-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo 1970-01-01 01:00:00.000000000 +0100 @@ -1,211 +0,0 @@ -command -v cargo >/dev/null 2>&1 && -_cargo() -{ - local cur prev words cword cmd - _get_comp_words_by_ref cur prev words cword - - COMPREPLY=() - - cmd=${words[1]} - - local vcs='git hg none' - local color='auto always never' - local msg_format='human json' - - local opt_help='-h --help' - local opt_verbose='-v --verbose' - local opt_quiet='-q --quiet' - local opt_color='--color' - local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" - local opt_pkg='-p --package' - local opt_feat='--features --all-features --no-default-features' - local opt_mani='--manifest-path' - local opt_jobs='-j --jobs' - local opt_force='-f --force' - local opt_test='--test --bench' - local opt_lock='--frozen --locked' - - local opt___nocmd="$opt_common -V --version --list" - local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" - local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" - local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" - local opt__fetch="$opt_common $opt_mani $opt_lock" - local opt__generate_lockfile="${opt__fetch}" - local opt__git_checkout="$opt_common $opt_lock --reference --url" - local opt__help="$opt_help" - local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" - local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" - local opt__locate_project="$opt_mani -h --help" - local opt__login="$opt_common $opt_lock --host" - local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" - local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" - local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" - local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" - local opt__pkgid="${opt__fetch} $opt_pkg" - local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" - local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" - local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" - local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" - local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" - local opt__search="$opt_common $opt_lock --host --limit" - local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" - local opt__uninstall="$opt_common $opt_lock --bin --root" - local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" - local opt__verify_project="${opt__fetch}" - local opt__version="$opt_help $opt_verbose $opt_color" - local opt__yank="$opt_common $opt_lock --vers --undo --index --token" - - if [[ $cword -eq 1 ]]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) - else - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - fi - elif [[ $cword -ge 2 ]]; then - case "${prev}" in - --vcs) - COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) - ;; - --color) - COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) - ;; - --message-format) - COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) - ;; - --manifest-path) - _filedir toml - ;; - --bin) - COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) - ;; - --test) - COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) - ;; - --bench) - COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) - ;; - --example) - COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) - ;; - --target) - COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) - ;; - help) - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - ;; - *) - local opt_var=opt__${cmd//-/_} - COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) - ;; - esac - fi - - # compopt does not work in bash version 3 - - return 0 -} && -complete -F _cargo cargo - -__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) - -_locate_manifest(){ - local manifest=`cargo locate-project 2>/dev/null` - # regexp-replace manifest '\{"root":"|"\}' '' - echo ${manifest:9:-2} -} - -# Extracts the values of "name" from the array given in $1 and shows them as -# command line options for completion -_get_names_from_array() -{ - local manifest=$(_locate_manifest) - if [[ -z $manifest ]]; then - return 0 - fi - - local last_line - local -a names - local in_block=false - local block_name=$1 - while read line - do - if [[ $last_line == "[[$block_name]]" ]]; then - in_block=true - else - if [[ $last_line =~ .*\[\[.* ]]; then - in_block=false - fi - fi - - if [[ $in_block == true ]]; then - if [[ $line =~ .*name.*\= ]]; then - line=${line##*=} - line=${line%%\"} - line=${line##*\"} - names+=($line) - fi - fi - - last_line=$line - done < $manifest - echo "${names[@]}" -} - -#Gets the bin names from the manifest file -_bin_names() -{ - _get_names_from_array "bin" -} - -#Gets the test names from the manifest file -_test_names() -{ - _get_names_from_array "test" -} - -#Gets the bench names from the manifest file -_benchmark_names() -{ - _get_names_from_array "bench" -} - -_get_examples(){ - local files=($(dirname $(_locate_manifest))/examples/*.rs) - local names=("${files[@]##*/}") - local names=("${names[@]%.*}") - # "*" means no examples found - if [[ "${names[@]}" != "*" ]]; then - echo "${names[@]}" - fi -} - -_get_targets(){ - local CURRENT_PATH - if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then - CURRENT_PATH=$PWD - else - CURRENT_PATH=$(_locate_manifest) - fi - if [[ -z "$CURRENT_PATH" ]]; then - return 1 - fi - local TARGETS=() - local FIND_PATHS=( "/" ) - local FIND_PATH LINES LINE - while [[ "$CURRENT_PATH" != "/" ]]; do - FIND_PATHS+=( "$CURRENT_PATH" ) - CURRENT_PATH=$(dirname $CURRENT_PATH) - done - for FIND_PATH in ${FIND_PATHS[@]}; do - if [[ -f "$FIND_PATH"/.cargo/config ]]; then - LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) - for LINE in ${LINES[@]}; do - TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) - done - fi - done - echo "${TARGETS[@]}" -} -# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-s390x-unknown-linux-gnu/cargo/manifest.in new/cargo-0.21.0-s390x-unknown-linux-gnu/cargo/manifest.in --- old/cargo-0.18.0-s390x-unknown-linux-gnu/cargo/manifest.in 2017-04-24 22:37:49.000000000 +0200 +++ new/cargo-0.21.0-s390x-unknown-linux-gnu/cargo/manifest.in 2017-08-27 22:00:26.000000000 +0200 @@ -1,33 +1,33 @@ -file:bin/cargo -file:etc/bash_completions.d/cargo -file:share/doc/cargo/LICENSE-APACHE -file:share/doc/cargo/LICENSE-MIT -file:share/doc/cargo/LICENSE-THIRD-PARTY -file:share/doc/cargo/README.md -file:share/man/man1/cargo-bench.1 -file:share/man/man1/cargo-build.1 file:share/man/man1/cargo-check.1 -file:share/man/man1/cargo-clean.1 file:share/man/man1/cargo-doc.1 +file:share/man/man1/cargo-package.1 +file:share/man/man1/cargo-install.1 file:share/man/man1/cargo-fetch.1 +file:share/man/man1/cargo-update.1 +file:share/man/man1/cargo-new.1 file:share/man/man1/cargo-generate-lockfile.1 file:share/man/man1/cargo-init.1 -file:share/man/man1/cargo-install.1 -file:share/man/man1/cargo-login.1 -file:share/man/man1/cargo-metadata.1 -file:share/man/man1/cargo-new.1 -file:share/man/man1/cargo-owner.1 -file:share/man/man1/cargo-package.1 -file:share/man/man1/cargo-pkgid.1 -file:share/man/man1/cargo-publish.1 -file:share/man/man1/cargo-run.1 file:share/man/man1/cargo-rustc.1 +file:share/man/man1/cargo-clean.1 +file:share/man/man1/cargo-metadata.1 +file:share/man/man1/cargo.1 +file:share/man/man1/cargo-bench.1 +file:share/man/man1/cargo-yank.1 file:share/man/man1/cargo-rustdoc.1 +file:share/man/man1/cargo-run.1 +file:share/man/man1/cargo-publish.1 +file:share/man/man1/cargo-build.1 +file:share/man/man1/cargo-login.1 +file:share/man/man1/cargo-version.1 +file:share/man/man1/cargo-uninstall.1 +file:share/man/man1/cargo-owner.1 file:share/man/man1/cargo-search.1 file:share/man/man1/cargo-test.1 -file:share/man/man1/cargo-uninstall.1 -file:share/man/man1/cargo-update.1 -file:share/man/man1/cargo-version.1 -file:share/man/man1/cargo-yank.1 -file:share/man/man1/cargo.1 +file:share/man/man1/cargo-pkgid.1 file:share/zsh/site-functions/_cargo +file:share/doc/cargo/LICENSE-MIT +file:share/doc/cargo/LICENSE-APACHE +file:share/doc/cargo/README.md +file:share/doc/cargo/LICENSE-THIRD-PARTY +file:etc/bash_completion.d/cargo +file:bin/cargo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-s390x-unknown-linux-gnu/cargo/share/doc/cargo/README.md new/cargo-0.21.0-s390x-unknown-linux-gnu/cargo/share/doc/cargo/README.md --- old/cargo-0.18.0-s390x-unknown-linux-gnu/cargo/share/doc/cargo/README.md 2017-04-24 22:37:49.000000000 +0200 +++ new/cargo-0.21.0-s390x-unknown-linux-gnu/cargo/share/doc/cargo/README.md 2017-08-27 22:00:26.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-s390x-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo new/cargo-0.21.0-s390x-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo --- old/cargo-0.18.0-s390x-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo 2017-04-24 22:37:49.000000000 +0200 +++ new/cargo-0.21.0-s390x-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo 2017-08-27 22:00:26.000000000 +0200 @@ -348,6 +348,15 @@ '(-v, --verbose)'{-v,--verbose}'[use verbose output]' \ '--color=:colorization option:(auto always never)' \ '1: :_test_names' \ + '(--doc --bin --example --test --bench)--lib[only test library]' \ + '(--lib --bin --example --test --bench)--doc[only test documentation]' \ + '(--lib --doc --example --test --bench)--bin=[binary name]' \ + '(--lib --doc --bin --test --bench)--example=[example name]' \ + '(--lib --doc --bin --example --bench)--test=[test name]' \ + '(--lib --doc --bin --example --test)--bench=[benchmark name]' \ + '--message-format:error format:(human json)' \ + '--frozen[require lock and cache up to date]' \ + '--locked[require lock up to date]' ;; uninstall) @@ -510,7 +519,7 @@ _get_names_from_array "bench" } -# These flags are mutally exclusive specifiers for the scope of a command; as +# These flags are mutually exclusive specifiers for the scope of a command; as # they are used in multiple places without change, they are expanded into the # appropriate command's `_arguments` where appropriate. set command_scope_spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-s390x-unknown-linux-gnu/install.sh new/cargo-0.21.0-s390x-unknown-linux-gnu/install.sh --- old/cargo-0.18.0-s390x-unknown-linux-gnu/install.sh 2017-04-24 22:37:49.000000000 +0200 +++ new/cargo-0.21.0-s390x-unknown-linux-gnu/install.sh 2017-08-27 22:00:26.000000000 +0200 @@ -363,6 +363,9 @@ CYGWIN*) _ostype=pc-windows-gnu ;; + Haiku) + _ostype=unknown-haiku + ;; *) err "unknown value from uname -s: $_uname_value" @@ -612,6 +615,18 @@ # Decide the destination of the file local _file_install_path="$_dest_prefix/$_file" + if echo "$_file" | grep "^etc/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^etc\///')" + _file_install_path="$CFG_SYSCONFDIR/$_f" + fi + + if echo "$_file" | grep "^bin/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^bin\///')" + _file_install_path="$CFG_BINDIR/$_f" + fi + if echo "$_file" | grep "^lib/" > /dev/null then local _f="$(echo "$_file" | sed 's/^lib\///')" @@ -684,7 +699,7 @@ critical_need_ok "failed to copy directory" # Set permissions. 0755 for dirs, 644 for files - run chmod -R u+rwx,go+rx,go-w "$_file_install_path" + run chmod -R u+rwX,go+rX,go-w "$_file_install_path" critical_need_ok "failed to set permissions on directory" # Update the manifest @@ -851,6 +866,8 @@ valopt without "" "comma-separated list of components to not install" valopt components "" "comma-separated list of components to install" flag list-components "list available components" +valopt sysconfdir "$CFG_DESTDIR_PREFIX/etc" "install system configuration files" +valopt bindir "$CFG_DESTDIR_PREFIX/bin" "install binaries" valopt libdir "$CFG_DESTDIR_PREFIX/lib" "install libraries" valopt mandir "$CFG_DESTDIR_PREFIX/share/man" "install man pages in PATH" # NB See the docdir handling in install_components for an explanation of this @@ -874,15 +891,15 @@ # FIXME: Might want to consider loading this from a file and not generating install.sh # Rust or Cargo -TEMPLATE_PRODUCT_NAME="Rust" +TEMPLATE_PRODUCT_NAME='Rust' # rustlib or cargo TEMPLATE_REL_MANIFEST_DIR=rustlib # 'Rust is ready to roll.' or 'Cargo is cool to cruise.' -TEMPLATE_SUCCESS_MESSAGE="Rust is ready to roll." +TEMPLATE_SUCCESS_MESSAGE='Rust is ready to roll.' # Locations to look for directories containing legacy, pre-versioned manifests -TEMPLATE_LEGACY_MANIFEST_DIRS="rustlib,cargo" +TEMPLATE_LEGACY_MANIFEST_DIRS='rustlib,cargo' # The installer version -TEMPLATE_RUST_INSTALLER_VERSION="3" +TEMPLATE_RUST_INSTALLER_VERSION='3' # OK, let's get installing ... @@ -1014,3 +1031,5 @@ echo echo " $TEMPLATE_SUCCESS_MESSAGE" echo + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-s390x-unknown-linux-gnu/version new/cargo-0.21.0-s390x-unknown-linux-gnu/version --- old/cargo-0.18.0-s390x-unknown-linux-gnu/version 2017-04-24 22:37:49.000000000 +0200 +++ new/cargo-0.21.0-s390x-unknown-linux-gnu/version 2017-08-27 22:00:26.000000000 +0200 @@ -1 +1 @@ -0.18.0 (fe7b0cdcf 2017-04-24) \ No newline at end of file +0.21.0 (5b4b8b2ae 2017-08-12) \ No newline at end of file ++++++ cargo-0.18.0-x86_64-unknown-linux-gnu.tar.gz -> cargo-0.21.0-x86_64-unknown-linux-gnu.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-x86_64-unknown-linux-gnu/README.md new/cargo-0.21.0-x86_64-unknown-linux-gnu/README.md --- old/cargo-0.18.0-x86_64-unknown-linux-gnu/README.md 2017-04-24 22:16:48.000000000 +0200 +++ new/cargo-0.21.0-x86_64-unknown-linux-gnu/README.md 2017-08-27 21:25:26.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` Binary files old/cargo-0.18.0-x86_64-unknown-linux-gnu/cargo/bin/cargo and new/cargo-0.21.0-x86_64-unknown-linux-gnu/cargo/bin/cargo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-x86_64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo new/cargo-0.21.0-x86_64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo --- old/cargo-0.18.0-x86_64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo 1970-01-01 01:00:00.000000000 +0100 +++ new/cargo-0.21.0-x86_64-unknown-linux-gnu/cargo/etc/bash_completion.d/cargo 2017-08-27 21:25:26.000000000 +0200 @@ -0,0 +1,211 @@ +command -v cargo >/dev/null 2>&1 && +_cargo() +{ + local cur prev words cword cmd + _get_comp_words_by_ref cur prev words cword + + COMPREPLY=() + + cmd=${words[1]} + + local vcs='git hg none' + local color='auto always never' + local msg_format='human json' + + local opt_help='-h --help' + local opt_verbose='-v --verbose' + local opt_quiet='-q --quiet' + local opt_color='--color' + local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" + local opt_pkg='-p --package' + local opt_feat='--features --all-features --no-default-features' + local opt_mani='--manifest-path' + local opt_jobs='-j --jobs' + local opt_force='-f --force' + local opt_test='--test --bench' + local opt_lock='--frozen --locked' + + local opt___nocmd="$opt_common -V --version --list" + local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" + local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" + local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" + local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" + local opt__fetch="$opt_common $opt_mani $opt_lock" + local opt__generate_lockfile="${opt__fetch}" + local opt__git_checkout="$opt_common $opt_lock --reference --url" + local opt__help="$opt_help" + local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" + local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" + local opt__locate_project="$opt_mani -h --help" + local opt__login="$opt_common $opt_lock --host" + local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" + local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" + local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" + local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" + local opt__pkgid="${opt__fetch} $opt_pkg" + local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" + local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" + local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" + local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" + local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" + local opt__search="$opt_common $opt_lock --host --limit" + local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" + local opt__uninstall="$opt_common $opt_lock --bin --root" + local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" + local opt__verify_project="${opt__fetch}" + local opt__version="$opt_help $opt_verbose $opt_color" + local opt__yank="$opt_common $opt_lock --vers --undo --index --token" + + if [[ $cword -eq 1 ]]; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) + else + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + fi + elif [[ $cword -ge 2 ]]; then + case "${prev}" in + --vcs) + COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) + ;; + --color) + COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) + ;; + --message-format) + COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) + ;; + --manifest-path) + _filedir toml + ;; + --bin) + COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) + ;; + --test) + COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) + ;; + --bench) + COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) + ;; + --example) + COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) + ;; + --target) + COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) + ;; + help) + COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) + ;; + *) + local opt_var=opt__${cmd//-/_} + COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) + ;; + esac + fi + + # compopt does not work in bash version 3 + + return 0 +} && +complete -F _cargo cargo + +__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) + +_locate_manifest(){ + local manifest=`cargo locate-project 2>/dev/null` + # regexp-replace manifest '\{"root":"|"\}' '' + echo ${manifest:9:-2} +} + +# Extracts the values of "name" from the array given in $1 and shows them as +# command line options for completion +_get_names_from_array() +{ + local manifest=$(_locate_manifest) + if [[ -z $manifest ]]; then + return 0 + fi + + local last_line + local -a names + local in_block=false + local block_name=$1 + while read line + do + if [[ $last_line == "[[$block_name]]" ]]; then + in_block=true + else + if [[ $last_line =~ .*\[\[.* ]]; then + in_block=false + fi + fi + + if [[ $in_block == true ]]; then + if [[ $line =~ .*name.*\= ]]; then + line=${line##*=} + line=${line%%\"} + line=${line##*\"} + names+=($line) + fi + fi + + last_line=$line + done < $manifest + echo "${names[@]}" +} + +#Gets the bin names from the manifest file +_bin_names() +{ + _get_names_from_array "bin" +} + +#Gets the test names from the manifest file +_test_names() +{ + _get_names_from_array "test" +} + +#Gets the bench names from the manifest file +_benchmark_names() +{ + _get_names_from_array "bench" +} + +_get_examples(){ + local files=($(dirname $(_locate_manifest))/examples/*.rs) + local names=("${files[@]##*/}") + local names=("${names[@]%.*}") + # "*" means no examples found + if [[ "${names[@]}" != "*" ]]; then + echo "${names[@]}" + fi +} + +_get_targets(){ + local CURRENT_PATH + if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then + CURRENT_PATH=$PWD + else + CURRENT_PATH=$(_locate_manifest) + fi + if [[ -z "$CURRENT_PATH" ]]; then + return 1 + fi + local TARGETS=() + local FIND_PATHS=( "/" ) + local FIND_PATH LINES LINE + while [[ "$CURRENT_PATH" != "/" ]]; do + FIND_PATHS+=( "$CURRENT_PATH" ) + CURRENT_PATH=$(dirname $CURRENT_PATH) + done + for FIND_PATH in ${FIND_PATHS[@]}; do + if [[ -f "$FIND_PATH"/.cargo/config ]]; then + LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) + for LINE in ${LINES[@]}; do + TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) + done + fi + done + echo "${TARGETS[@]}" +} +# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-x86_64-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo new/cargo-0.21.0-x86_64-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo --- old/cargo-0.18.0-x86_64-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo 2017-04-24 22:16:48.000000000 +0200 +++ new/cargo-0.21.0-x86_64-unknown-linux-gnu/cargo/etc/bash_completions.d/cargo 1970-01-01 01:00:00.000000000 +0100 @@ -1,211 +0,0 @@ -command -v cargo >/dev/null 2>&1 && -_cargo() -{ - local cur prev words cword cmd - _get_comp_words_by_ref cur prev words cword - - COMPREPLY=() - - cmd=${words[1]} - - local vcs='git hg none' - local color='auto always never' - local msg_format='human json' - - local opt_help='-h --help' - local opt_verbose='-v --verbose' - local opt_quiet='-q --quiet' - local opt_color='--color' - local opt_common="$opt_help $opt_verbose $opt_quiet $opt_color" - local opt_pkg='-p --package' - local opt_feat='--features --all-features --no-default-features' - local opt_mani='--manifest-path' - local opt_jobs='-j --jobs' - local opt_force='-f --force' - local opt_test='--test --bench' - local opt_lock='--frozen --locked' - - local opt___nocmd="$opt_common -V --version --list" - local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run" - local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release" - local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release" - local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release" - local opt__fetch="$opt_common $opt_mani $opt_lock" - local opt__generate_lockfile="${opt__fetch}" - local opt__git_checkout="$opt_common $opt_lock --reference --url" - local opt__help="$opt_help" - local opt__init="$opt_common $opt_lock --bin --lib --name --vcs" - local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers" - local opt__locate_project="$opt_mani -h --help" - local opt__login="$opt_common $opt_lock --host" - local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps" - local opt__new="$opt_common $opt_lock --vcs --bin --lib --name" - local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token" - local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata" - local opt__pkgid="${opt__fetch} $opt_pkg" - local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify" - local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps" - local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release" - local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release" - local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open" - local opt__search="$opt_common $opt_lock --host --limit" - local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast" - local opt__uninstall="$opt_common $opt_lock --bin --root" - local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise" - local opt__verify_project="${opt__fetch}" - local opt__version="$opt_help $opt_verbose $opt_color" - local opt__yank="$opt_common $opt_lock --vers --undo --index --token" - - if [[ $cword -eq 1 ]]; then - if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W "${opt___nocmd}" -- "$cur" ) ) - else - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - fi - elif [[ $cword -ge 2 ]]; then - case "${prev}" in - --vcs) - COMPREPLY=( $( compgen -W "$vcs" -- "$cur" ) ) - ;; - --color) - COMPREPLY=( $( compgen -W "$color" -- "$cur" ) ) - ;; - --message-format) - COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) ) - ;; - --manifest-path) - _filedir toml - ;; - --bin) - COMPREPLY=( $( compgen -W "$(_bin_names)" -- "$cur" ) ) - ;; - --test) - COMPREPLY=( $( compgen -W "$(_test_names)" -- "$cur" ) ) - ;; - --bench) - COMPREPLY=( $( compgen -W "$(_benchmark_names)" -- "$cur" ) ) - ;; - --example) - COMPREPLY=( $( compgen -W "$(_get_examples)" -- "$cur" ) ) - ;; - --target) - COMPREPLY=( $( compgen -W "$(_get_targets)" -- "$cur" ) ) - ;; - help) - COMPREPLY=( $( compgen -W "$__cargo_commands" -- "$cur" ) ) - ;; - *) - local opt_var=opt__${cmd//-/_} - COMPREPLY=( $( compgen -W "${!opt_var}" -- "$cur" ) ) - ;; - esac - fi - - # compopt does not work in bash version 3 - - return 0 -} && -complete -F _cargo cargo - -__cargo_commands=$(cargo --list 2>/dev/null | tail -n +2) - -_locate_manifest(){ - local manifest=`cargo locate-project 2>/dev/null` - # regexp-replace manifest '\{"root":"|"\}' '' - echo ${manifest:9:-2} -} - -# Extracts the values of "name" from the array given in $1 and shows them as -# command line options for completion -_get_names_from_array() -{ - local manifest=$(_locate_manifest) - if [[ -z $manifest ]]; then - return 0 - fi - - local last_line - local -a names - local in_block=false - local block_name=$1 - while read line - do - if [[ $last_line == "[[$block_name]]" ]]; then - in_block=true - else - if [[ $last_line =~ .*\[\[.* ]]; then - in_block=false - fi - fi - - if [[ $in_block == true ]]; then - if [[ $line =~ .*name.*\= ]]; then - line=${line##*=} - line=${line%%\"} - line=${line##*\"} - names+=($line) - fi - fi - - last_line=$line - done < $manifest - echo "${names[@]}" -} - -#Gets the bin names from the manifest file -_bin_names() -{ - _get_names_from_array "bin" -} - -#Gets the test names from the manifest file -_test_names() -{ - _get_names_from_array "test" -} - -#Gets the bench names from the manifest file -_benchmark_names() -{ - _get_names_from_array "bench" -} - -_get_examples(){ - local files=($(dirname $(_locate_manifest))/examples/*.rs) - local names=("${files[@]##*/}") - local names=("${names[@]%.*}") - # "*" means no examples found - if [[ "${names[@]}" != "*" ]]; then - echo "${names[@]}" - fi -} - -_get_targets(){ - local CURRENT_PATH - if [ `uname -o` == "Cygwin" -a -f "$PWD"/Cargo.toml ]; then - CURRENT_PATH=$PWD - else - CURRENT_PATH=$(_locate_manifest) - fi - if [[ -z "$CURRENT_PATH" ]]; then - return 1 - fi - local TARGETS=() - local FIND_PATHS=( "/" ) - local FIND_PATH LINES LINE - while [[ "$CURRENT_PATH" != "/" ]]; do - FIND_PATHS+=( "$CURRENT_PATH" ) - CURRENT_PATH=$(dirname $CURRENT_PATH) - done - for FIND_PATH in ${FIND_PATHS[@]}; do - if [[ -f "$FIND_PATH"/.cargo/config ]]; then - LINES=( `grep "$FIND_PATH"/.cargo/config -e "^\[target\."` ) - for LINE in ${LINES[@]}; do - TARGETS+=(`sed 's/^\[target\.\(.*\)\]$/\1/' <<< $LINE`) - done - fi - done - echo "${TARGETS[@]}" -} -# vim:ft=sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-x86_64-unknown-linux-gnu/cargo/manifest.in new/cargo-0.21.0-x86_64-unknown-linux-gnu/cargo/manifest.in --- old/cargo-0.18.0-x86_64-unknown-linux-gnu/cargo/manifest.in 2017-04-24 22:16:48.000000000 +0200 +++ new/cargo-0.21.0-x86_64-unknown-linux-gnu/cargo/manifest.in 2017-08-27 21:25:26.000000000 +0200 @@ -1,33 +1,33 @@ -file:bin/cargo -file:etc/bash_completions.d/cargo -file:share/doc/cargo/LICENSE-APACHE -file:share/doc/cargo/LICENSE-MIT -file:share/doc/cargo/LICENSE-THIRD-PARTY -file:share/doc/cargo/README.md -file:share/man/man1/cargo-bench.1 -file:share/man/man1/cargo-build.1 file:share/man/man1/cargo-check.1 -file:share/man/man1/cargo-clean.1 file:share/man/man1/cargo-doc.1 +file:share/man/man1/cargo-package.1 +file:share/man/man1/cargo-install.1 file:share/man/man1/cargo-fetch.1 +file:share/man/man1/cargo-update.1 +file:share/man/man1/cargo-new.1 file:share/man/man1/cargo-generate-lockfile.1 file:share/man/man1/cargo-init.1 -file:share/man/man1/cargo-install.1 -file:share/man/man1/cargo-login.1 -file:share/man/man1/cargo-metadata.1 -file:share/man/man1/cargo-new.1 -file:share/man/man1/cargo-owner.1 -file:share/man/man1/cargo-package.1 -file:share/man/man1/cargo-pkgid.1 -file:share/man/man1/cargo-publish.1 -file:share/man/man1/cargo-run.1 file:share/man/man1/cargo-rustc.1 +file:share/man/man1/cargo-clean.1 +file:share/man/man1/cargo-metadata.1 +file:share/man/man1/cargo.1 +file:share/man/man1/cargo-bench.1 +file:share/man/man1/cargo-yank.1 file:share/man/man1/cargo-rustdoc.1 +file:share/man/man1/cargo-run.1 +file:share/man/man1/cargo-publish.1 +file:share/man/man1/cargo-build.1 +file:share/man/man1/cargo-login.1 +file:share/man/man1/cargo-version.1 +file:share/man/man1/cargo-uninstall.1 +file:share/man/man1/cargo-owner.1 file:share/man/man1/cargo-search.1 file:share/man/man1/cargo-test.1 -file:share/man/man1/cargo-uninstall.1 -file:share/man/man1/cargo-update.1 -file:share/man/man1/cargo-version.1 -file:share/man/man1/cargo-yank.1 -file:share/man/man1/cargo.1 +file:share/man/man1/cargo-pkgid.1 file:share/zsh/site-functions/_cargo +file:share/doc/cargo/LICENSE-MIT +file:share/doc/cargo/LICENSE-APACHE +file:share/doc/cargo/README.md +file:share/doc/cargo/LICENSE-THIRD-PARTY +file:etc/bash_completion.d/cargo +file:bin/cargo diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-x86_64-unknown-linux-gnu/cargo/share/doc/cargo/README.md new/cargo-0.21.0-x86_64-unknown-linux-gnu/cargo/share/doc/cargo/README.md --- old/cargo-0.18.0-x86_64-unknown-linux-gnu/cargo/share/doc/cargo/README.md 2017-04-24 22:16:48.000000000 +0200 +++ new/cargo-0.21.0-x86_64-unknown-linux-gnu/cargo/share/doc/cargo/README.md 2017-08-27 21:25:26.000000000 +0200 @@ -34,22 +34,6 @@ cargo build --release ``` -Otherwise, you can also use a more traditional approach: - -```sh -./configure -make -make install -``` - -More options can be discovered through `./configure`, such as compiling cargo -for more than one target. For example, if you'd like to compile both 32 and 64 -bit versions of cargo on unix you would use: - -``` -$ ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu -``` - ## Running the tests To run cargo's tests, use `cargo test`. If you do not have the cross-compilers @@ -71,8 +55,7 @@ made locally, run: ```sh -./configure -make doc +sh src/ci/dox.sh open target/doc/index.html ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-x86_64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo new/cargo-0.21.0-x86_64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo --- old/cargo-0.18.0-x86_64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo 2017-04-24 22:16:48.000000000 +0200 +++ new/cargo-0.21.0-x86_64-unknown-linux-gnu/cargo/share/zsh/site-functions/_cargo 2017-08-27 21:25:26.000000000 +0200 @@ -348,6 +348,15 @@ '(-v, --verbose)'{-v,--verbose}'[use verbose output]' \ '--color=:colorization option:(auto always never)' \ '1: :_test_names' \ + '(--doc --bin --example --test --bench)--lib[only test library]' \ + '(--lib --bin --example --test --bench)--doc[only test documentation]' \ + '(--lib --doc --example --test --bench)--bin=[binary name]' \ + '(--lib --doc --bin --test --bench)--example=[example name]' \ + '(--lib --doc --bin --example --bench)--test=[test name]' \ + '(--lib --doc --bin --example --test)--bench=[benchmark name]' \ + '--message-format:error format:(human json)' \ + '--frozen[require lock and cache up to date]' \ + '--locked[require lock up to date]' ;; uninstall) @@ -510,7 +519,7 @@ _get_names_from_array "bench" } -# These flags are mutally exclusive specifiers for the scope of a command; as +# These flags are mutually exclusive specifiers for the scope of a command; as # they are used in multiple places without change, they are expanded into the # appropriate command's `_arguments` where appropriate. set command_scope_spec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-x86_64-unknown-linux-gnu/install.sh new/cargo-0.21.0-x86_64-unknown-linux-gnu/install.sh --- old/cargo-0.18.0-x86_64-unknown-linux-gnu/install.sh 2017-04-24 22:16:48.000000000 +0200 +++ new/cargo-0.21.0-x86_64-unknown-linux-gnu/install.sh 2017-08-27 21:25:26.000000000 +0200 @@ -363,6 +363,9 @@ CYGWIN*) _ostype=pc-windows-gnu ;; + Haiku) + _ostype=unknown-haiku + ;; *) err "unknown value from uname -s: $_uname_value" @@ -612,6 +615,18 @@ # Decide the destination of the file local _file_install_path="$_dest_prefix/$_file" + if echo "$_file" | grep "^etc/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^etc\///')" + _file_install_path="$CFG_SYSCONFDIR/$_f" + fi + + if echo "$_file" | grep "^bin/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^bin\///')" + _file_install_path="$CFG_BINDIR/$_f" + fi + if echo "$_file" | grep "^lib/" > /dev/null then local _f="$(echo "$_file" | sed 's/^lib\///')" @@ -684,7 +699,7 @@ critical_need_ok "failed to copy directory" # Set permissions. 0755 for dirs, 644 for files - run chmod -R u+rwx,go+rx,go-w "$_file_install_path" + run chmod -R u+rwX,go+rX,go-w "$_file_install_path" critical_need_ok "failed to set permissions on directory" # Update the manifest @@ -851,6 +866,8 @@ valopt without "" "comma-separated list of components to not install" valopt components "" "comma-separated list of components to install" flag list-components "list available components" +valopt sysconfdir "$CFG_DESTDIR_PREFIX/etc" "install system configuration files" +valopt bindir "$CFG_DESTDIR_PREFIX/bin" "install binaries" valopt libdir "$CFG_DESTDIR_PREFIX/lib" "install libraries" valopt mandir "$CFG_DESTDIR_PREFIX/share/man" "install man pages in PATH" # NB See the docdir handling in install_components for an explanation of this @@ -874,15 +891,15 @@ # FIXME: Might want to consider loading this from a file and not generating install.sh # Rust or Cargo -TEMPLATE_PRODUCT_NAME="Rust" +TEMPLATE_PRODUCT_NAME='Rust' # rustlib or cargo TEMPLATE_REL_MANIFEST_DIR=rustlib # 'Rust is ready to roll.' or 'Cargo is cool to cruise.' -TEMPLATE_SUCCESS_MESSAGE="Rust is ready to roll." +TEMPLATE_SUCCESS_MESSAGE='Rust is ready to roll.' # Locations to look for directories containing legacy, pre-versioned manifests -TEMPLATE_LEGACY_MANIFEST_DIRS="rustlib,cargo" +TEMPLATE_LEGACY_MANIFEST_DIRS='rustlib,cargo' # The installer version -TEMPLATE_RUST_INSTALLER_VERSION="3" +TEMPLATE_RUST_INSTALLER_VERSION='3' # OK, let's get installing ... @@ -1014,3 +1031,5 @@ echo echo " $TEMPLATE_SUCCESS_MESSAGE" echo + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cargo-0.18.0-x86_64-unknown-linux-gnu/version new/cargo-0.21.0-x86_64-unknown-linux-gnu/version --- old/cargo-0.18.0-x86_64-unknown-linux-gnu/version 2017-04-24 22:16:48.000000000 +0200 +++ new/cargo-0.21.0-x86_64-unknown-linux-gnu/version 2017-08-27 21:25:26.000000000 +0200 @@ -1 +1 @@ -0.18.0 (fe7b0cdcf 2017-04-24) \ No newline at end of file +0.21.0 (5b4b8b2ae 2017-08-12) \ No newline at end of file ++++++ rustc-1.19.0-src.tar.gz -> rustc-1.20.0-src.tar.gz ++++++ /work/SRC/openSUSE:Factory/rust/rustc-1.19.0-src.tar.gz /work/SRC/openSUSE:Factory/.rust.new/rustc-1.20.0-src.tar.gz differ: char 12, line 1