diff --git a/.appveyor.yml b/.appveyor.yml index 1175531c3..eb43e1835 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -20,13 +20,13 @@ matrix: environment: global: - FEATURES: "generic" + FEATURES: "windows" BUILD_OPTIONS: "--no-default-features" TEST_OPTIONS: "--no-default-features --no-fail-fast" matrix: # minimum version - - CHANNEL: 1.27.0 + - CHANNEL: 1.31.0 ARCH: i686 ABI: msvc # "msvc" ABI @@ -45,11 +45,11 @@ environment: - CHANNEL: nightly ARCH: i686 ABI: msvc - FEATURES: "generic nightly" + FEATURES: "windows nightly" - CHANNEL: nightly ARCH: x86_64 ABI: msvc - FEATURES: "generic nightly" + FEATURES: "windows nightly" # "gnu" ABI - CHANNEL: stable ARCH: i686 diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 000000000..fb7d7d09b --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,15 @@ +freebsd_instance: + image: freebsd-12-0-release-amd64 + +task: + name: stable x86_64-unknown-freebsd + setup_script: + - pkg install -y curl gmake + - curl https://sh.rustup.rs -sSf --output rustup.sh + - sh rustup.sh -y + build_script: + - . $HOME/.cargo/env + - cargo build + test_script: + - . $HOME/.cargo/env + - cargo test diff --git a/.travis.yml b/.travis.yml index 6673c1fa9..32929a629 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ matrix: - rust: nightly fast_finish: true include: - - rust: 1.27.0 + - rust: 1.31.0 - rust: stable os: linux env: TEST_INSTALL=true diff --git a/Cargo.lock b/Cargo.lock index b19a54e8c..ae89e4184 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,10 +11,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.6.8" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aho-corasick" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -22,25 +30,25 @@ name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "arch" version = "0.0.1" dependencies = [ - "platform-info 0.1.0 (git+https://github.com/uutils/platform-info)", + "platform-info 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] [[package]] name = "atty" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -50,22 +58,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "backtrace" -version = "0.3.7" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace-sys" -version = "0.1.16" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -93,15 +102,15 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bit-vec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bit-vec" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -116,7 +125,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -135,19 +144,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byteorder" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cargo_metadata" -version = "0.5.6" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -161,12 +170,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.6" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" -version = "0.1.2" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -174,7 +183,7 @@ name = "chgrp" version = "0.0.1" dependencies = [ "uucore 0.0.1", - "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -193,16 +202,16 @@ dependencies = [ "clippy 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", - "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "chrono" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -210,7 +219,7 @@ dependencies = [ name = "chroot" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -224,16 +233,16 @@ dependencies = [ [[package]] name = "clap" -version = "2.32.0" +version = "2.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -242,13 +251,13 @@ version = "0.0.212" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "backtrace 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "clippy_lints 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -256,20 +265,20 @@ name = "clippy_lints" version = "0.0.212" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cargo_metadata 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cargo_metadata 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)", + "if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -277,14 +286,14 @@ name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "comm" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -293,17 +302,17 @@ dependencies = [ name = "cp" version = "0.0.1" dependencies = [ - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "ioctl-sys 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", - "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "xattr 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -319,7 +328,7 @@ name = "cpp_build" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_common 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_syn 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_synmap 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -343,8 +352,8 @@ name = "cpp_macros" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_common 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_syn 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_synom 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -389,15 +398,15 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "date" version = "0.0.1" dependencies = [ - "chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -425,11 +434,6 @@ dependencies = [ "uucore 0.0.1", ] -[[package]] -name = "dtoa" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "du" version = "0.0.1" @@ -447,7 +451,7 @@ dependencies = [ [[package]] name = "either" -version = "1.4.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -464,14 +468,14 @@ name = "error-chain" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "expand" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -495,21 +499,22 @@ dependencies = [ [[package]] name = "failure" -version = "0.1.1" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "failure_derive" -version = "0.1.1" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -529,9 +534,9 @@ name = "filetime" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -560,32 +565,18 @@ name = "fuchsia-cprng" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "generic-array" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "getopts" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -613,12 +604,12 @@ name = "hashsum" version = "0.0.1" dependencies = [ "digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "md5 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "md5 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha3 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -650,10 +641,10 @@ dependencies = [ name = "hostname" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -665,24 +656,24 @@ dependencies = [ [[package]] name = "idna" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "if_chain" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "install" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", @@ -695,22 +686,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "itertools" -version = "0.7.8" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "itoa" -version = "0.3.4" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "join" version = "0.0.1" dependencies = [ - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -779,11 +770,11 @@ dependencies = [ name = "ls" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "term_grid 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "termsize 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "termsize 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", @@ -791,12 +782,12 @@ dependencies = [ [[package]] name = "matches" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "md5" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -809,17 +800,14 @@ dependencies = [ [[package]] name = "memchr" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "mkdir" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -828,7 +816,7 @@ dependencies = [ name = "mkfifo" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -837,7 +825,7 @@ dependencies = [ name = "mknod" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -846,7 +834,7 @@ dependencies = [ name = "mktemp" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", @@ -856,9 +844,9 @@ dependencies = [ name = "more" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "nix 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -867,7 +855,7 @@ dependencies = [ name = "mv" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -875,7 +863,7 @@ dependencies = [ name = "nice" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -886,7 +874,19 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nix" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -895,25 +895,25 @@ dependencies = [ name = "nl" version = "0.0.1" dependencies = [ - "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] [[package]] name = "nodrop" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "nohup" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -922,28 +922,28 @@ dependencies = [ name = "nproc" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] [[package]] name = "num-integer" -version = "0.1.36" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.2.1" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num_cpus" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", @@ -954,23 +954,28 @@ name = "number_prefix" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "numfmt" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] +[[package]] +name = "numtoa" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "od" version = "0.0.1" dependencies = [ - "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", @@ -981,7 +986,7 @@ name = "onig" version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "onig_sys 69.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -992,15 +997,15 @@ name = "onig_sys" version = "69.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "paste" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1008,7 +1013,7 @@ dependencies = [ name = "pathchk" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1027,23 +1032,23 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.9" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "platform-info" -version = "0.1.0" -source = "git+https://github.com/uutils/platform-info#d8f497798725694c821cfe3a65cbd2c21d16762a" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "printenv" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1051,13 +1056,13 @@ dependencies = [ name = "printf" version = "0.0.1" dependencies = [ - "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] [[package]] name = "proc-macro2" -version = "0.2.3" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1067,12 +1072,12 @@ dependencies = [ name = "ptx" version = "0.0.1" dependencies = [ - "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1082,14 +1087,14 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pwd" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1110,18 +1115,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "quote" -version = "0.4.2" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" -version = "0.3.22" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1135,7 +1139,7 @@ dependencies = [ "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1147,7 +1151,7 @@ dependencies = [ "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1165,7 +1169,7 @@ dependencies = [ "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1213,7 +1217,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1226,7 +1230,7 @@ dependencies = [ "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1258,7 +1262,7 @@ dependencies = [ name = "readlink" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1267,13 +1271,13 @@ dependencies = [ name = "realpath" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] [[package]] name = "redox_syscall" -version = "0.1.37" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1281,34 +1285,34 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" -version = "1.0.3" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.1" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "relpath" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1317,24 +1321,24 @@ name = "remove_dir_all" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rm" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", - "walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rmdir" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1353,23 +1357,28 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.8" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rustc_version" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ryu" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "same-file" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1378,7 +1387,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1390,44 +1399,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "seq" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] [[package]] name = "serde" -version = "1.0.29" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.29" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive_internals" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.11" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1463,7 +1461,7 @@ name = "shred" version = "0.0.1" dependencies = [ "filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1474,7 +1472,7 @@ dependencies = [ name = "shuf" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1483,16 +1481,21 @@ dependencies = [ name = "sleep" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] +[[package]] +name = "smallvec" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "sort" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1501,7 +1504,7 @@ dependencies = [ name = "split" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1509,7 +1512,7 @@ dependencies = [ name = "stat" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1518,7 +1521,7 @@ dependencies = [ name = "stdbuf" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libstdbuf 0.0.1", "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", @@ -1526,34 +1529,24 @@ dependencies = [ [[package]] name = "strsim" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "sum" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] [[package]] name = "syn" -version = "0.11.11" +version = "0.15.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn" -version = "0.12.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1561,35 +1554,29 @@ dependencies = [ name = "sync" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "synom" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "synstructure" -version = "0.6.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tac" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1597,19 +1584,19 @@ dependencies = [ name = "tail" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tee" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1630,8 +1617,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1645,23 +1632,24 @@ dependencies = [ [[package]] name = "termion" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "termsize" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1670,13 +1658,13 @@ name = "test" version = "0.0.1" dependencies = [ "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] [[package]] name = "textwrap" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1696,15 +1684,15 @@ version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "timeout" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", @@ -1712,10 +1700,10 @@ dependencies = [ [[package]] name = "toml" -version = "0.4.5" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1723,7 +1711,7 @@ name = "touch" version = "0.0.1" dependencies = [ "filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1732,9 +1720,9 @@ dependencies = [ name = "tr" version = "0.0.1" dependencies = [ - "bit-set 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1749,7 +1737,7 @@ dependencies = [ name = "truncate" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1757,7 +1745,7 @@ dependencies = [ name = "tsort" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1765,7 +1753,7 @@ dependencies = [ name = "tty" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1777,15 +1765,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ucd-util" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "uname" version = "0.0.1" dependencies = [ - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "platform-info 0.1.0 (git+https://github.com/uutils/platform-info)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "platform-info 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1793,7 +1781,7 @@ dependencies = [ name = "unexpand" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1803,13 +1791,16 @@ name = "unicode-bidi" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicode-normalization" -version = "0.1.5" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "unicode-width" @@ -1835,7 +1826,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "uniq" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1844,7 +1835,7 @@ name = "unix_socket" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1852,7 +1843,7 @@ dependencies = [ name = "unlink" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -1861,18 +1852,18 @@ dependencies = [ name = "uptime" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] [[package]] name = "url" -version = "1.7.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1880,25 +1871,28 @@ dependencies = [ name = "users" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] [[package]] name = "utf8-ranges" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "uucore" version = "0.0.1" dependencies = [ - "data-encoding 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "platform-info 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1970,7 +1964,7 @@ dependencies = [ "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "readlink 0.0.1", "realpath 0.0.1", - "regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "relpath 0.0.1", "rm 0.0.1", "rmdir 0.0.1", @@ -2015,7 +2009,7 @@ dependencies = [ [[package]] name = "vec_map" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -2025,11 +2019,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "walkdir" -version = "2.1.4" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2041,7 +2036,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "wc" version = "0.0.1" dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] @@ -2058,9 +2053,9 @@ name = "whoami" version = "0.0.1" dependencies = [ "advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2078,7 +2073,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi" -version = "0.3.5" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2095,6 +2090,14 @@ name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -2102,7 +2105,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "xattr" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2112,31 +2115,32 @@ dependencies = [ name = "yes" version = "0.0.1" dependencies = [ - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "uucore 0.0.1", ] [metadata] "checksum advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e06588080cb19d0acb6739808aafa5f26bfb2ca015b2b6370028b44cf7cb8a9a" -"checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a" +"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" +"checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "af80143d6f7608d746df1520709e5d141c96f240b0e62b0aa41bdfb53374d9d4" +"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" -"checksum backtrace 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea58cd16fd6c9d120b5bcb01d63883ae4cc7ba2aed35c1841b862a3c7ef6639" -"checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661" -"checksum bit-set 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6f1efcc46c18245a69c38fcc5cc650f16d3a59d034f3106e9ed63748f695730a" -"checksum bit-vec 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4440d5cb623bb7390ae27fec0bb6c61111969860f8e3ae198bfa0663645e67cf" +"checksum backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f106c02a3604afcdc0df5d36cc47b44b55917dbaf3d808f71c163a0ddba64637" +"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" +"checksum bit-set 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e84c238982c4b1e1ee668d136c510c67a13465279c0cb367ea6baf6310620a80" +"checksum bit-vec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f59bbe95d4e52a6398ec21238d31577f2b28a9d86807f06ca59d191d8440d0bb" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" -"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" +"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum block-buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1339a1042f5d9f295737ad4d9a6ab6bf81c84a933dba110b9200cd6d1448b814" "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" -"checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" -"checksum cargo_metadata 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "682476b87b3e22cd3820d86b26cd8603cd84ab76dce7547b2631858347aa8967" -"checksum cc 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fedf677519ac9e865c4ff43ef8f930773b37ed6e6ea61b6b83b400a7b5787f49" -"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" -"checksum chrono 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6962c635d530328acc53ac6a955e83093fedc91c5809dfac1fa60fa470830a37" -"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" +"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" +"checksum cargo_metadata 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1efca0b863ca03ed4c109fb1c55e0bc4bbeb221d3e103d86251046b06a526bd0" +"checksum cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)" = "a0c56216487bb80eec9c4516337b2588a4f2a2290d72a1416d930e4dcdb0c90d" +"checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" +"checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" +"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" "checksum clippy 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)" = "7e253af13a0cc39c7f22cf16f1be49d593dedc5895fe2fbb15f14d66ead00533" "checksum clippy_lints 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)" = "bd2326065405649672adbd5cb30dad2fad3a470935653d51c70591d47d3a8512" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" @@ -2147,54 +2151,53 @@ dependencies = [ "checksum cpp_syn 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8cd649bf5b3804d92fe12a60c7698f5a538a6033ed8a668bf5241d4d4f1644e" "checksum cpp_synmap 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "897e4f9cdbe2874edd3ffe53718ee5d8b89e2a970057b2c93d3214104f2e90b6" "checksum cpp_synom 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc8da5694233b646150c785118f77835ad0a49680c7f312a10ef30957c67b6d" -"checksum data-encoding 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "67df0571a74bf0d97fb8b2ed22abdd9a48475c96bd327db968b7d9cace99655e" +"checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97" "checksum digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e5b29bf156f3f4b3c4f610a25ff69370616ae6e0657d416de22645483e72af0a" -"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" -"checksum either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "740178ddf48b1a9e878e6d6509a1442a2d42fd2928aae8e7a6f8a36fb01981b3" +"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" -"checksum failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "934799b6c1de475a012a02dab0ace1ace43789ee4b99bcfbf1a2e3e8ced5de82" -"checksum failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7cdda555bb90c9bb67a3b670a0f42de8e73f5981524123ad8578aafec8ddb8b" +"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" +"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum filetime 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2f8c63033fcba1f51ef744505b3cad42510432b904c062afa67ad7ece008429d" "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum generic-array 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fceb69994e330afed50c93524be68c42fa898c2d9fd4ee8da03bd7363acd26f2" -"checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797" +"checksum getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "72327b15c228bfe31f1390f93dd5e9279587f0463836393c9df719ce62a3e450" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum half 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9353c2a89d550b58fa0061d8ed8d002a7d8cdf2494eb0e432859bd3a9e543836" "checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa" -"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" -"checksum if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "61bb90bdd39e3af69b0172dfc6130f6cd6332bf040fbb9bdd4401d37adbd48b8" +"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +"checksum if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac95d9aa0624e7b78187d6fb8ab012b41d9f6f54b1bcb61e61c4845f8357ec" "checksum ioctl-sys 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5e2c4b26352496eaaa8ca7cfa9bd99e93419d3f7983dc6e99c2a35fe9e33504a" -"checksum itertools 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)" = "f58856976b776fedd95533137617a02fb25719f40e7d9b01c7043cd65474f450" -"checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c" +"checksum itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0d47946d458e94a1b7bcabbf6521ea7c037062c81f534615abcad76e84d4970d" +"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" "checksum libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)" = "ec350a9417dfd244dc9a6c4a71e13895a4db6b92f0b106f07ebbc3f3bc580cee" -"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" -"checksum md5 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "daa1004633f76cdcd5a9d83ffcfe615e30ca7a2a638fcc8b8039a2dac21289d7" +"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +"checksum md5 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "79c56d6a0b07f9e19282511c83fc5b086364cbae4ba8c7d5f190c3d9b0425a48" "checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" -"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" +"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" +"checksum nix 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46f0f3210768d796e8fa79ec70ee6af172dacbe7147f5e69be5240a47778302b" "checksum nix 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "47e49f6982987135c5e9620ab317623e723bd06738fd85377e8d55f57c8b6487" -"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" -"checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe" -"checksum num-traits 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3c2bd9b9d21e48e956b763c9f37134dc62d9e95da6edb3f672cacb6caf3cd3" -"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" +"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" +"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" +"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" +"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" "checksum number_prefix 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "dbf9993e59c894e3c08aa1c2712914e9e6bf1fcbfc6bef283e2183df345a4fee" +"checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" "checksum onig 4.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a646989adad8a19f49be2090374712931c3a59835cb5277b4530f48b417f26e7" "checksum onig_sys 69.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388410bf5fa341f10e58e6db3975f4bea1ac30247dd79d37a9e5ced3cb4cc3b0" "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" -"checksum platform-info 0.1.0 (git+https://github.com/uutils/platform-info)" = "" -"checksum proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0" +"checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" +"checksum platform-info 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f2fd076acdc7a98374de6e300bf3af675997225bef21aecac2219553f04dd7e8" +"checksum proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)" = "64c827cea7a7ab30ce4593e5e04d7a11617ad6ece2fa230605a78b00ff965316" "checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum quote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eca14c727ad12702eb4b6bfb5a232287dcf8385cb8ca83a3eeaf6519c44c408" -"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" +"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" +"checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" @@ -2208,58 +2211,58 @@ dependencies = [ "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" +"checksum redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)" = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum regex 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3d8c9f33201f46669484bacc312b00e7541bed6aaf296dffe2bb4e0ac6b8ce2a" -"checksum regex-syntax 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05b06a75f5217880fc5e905952a42750bf44787e56a6c6d6852ed0992f5e1d54" +"checksum regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58" +"checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" "checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" "checksum rust-ini 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" "checksum rust-users 0.6.0 (git+https://github.com/uutils/rust-users)" = "" -"checksum rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "76d7ba1feafada44f2d38eed812bd2489a03c0f5abb975799251518b68848649" -"checksum rustc_version 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a54aa04a10c68c1c4eacb4337fd883b435997ede17a9385784b990777686b09a" -"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637" +"checksum rustc-demangle 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "ccc78bfd5acd7bf3e89cffcf899e5cb1a52d6fafa8dec2739ad70c9577a57288" +"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +"checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" +"checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "4763b773978e495252615e814d2ad04773b2c1f85421c7913869a537f35cb406" -"checksum serde_derive 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "8ab31f00ae5574bb643c196d5e302961c122da1c768604c6d16a35c5d551948a" -"checksum serde_derive_internals 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1fc848d073be32cd982380c06587ea1d433bc1a4c4a111de07ec2286a3ddade8" -"checksum serde_json 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "fab6c4d75bedcf880711c85e39ebf8ccc70d0eba259899047ec5d7436643ee17" +"checksum serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "aa5f7c20820475babd2c077c3ab5f8c77a31c15e16ea38687b4c02d3e48680f4" +"checksum serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "58fc82bec244f168b23d1963b45c8bf5726e9a15a9d146a067f9081aeed2de79" +"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d963c78ce367df26d7ea8b8cc655c651b42e8a1e584e869c1e17dae3ccb116a" "checksum sha3 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26405905b6a56a94c60109cfda62610507ac14a65be531f5767dec5c5a8dd6a0" -"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum syn 0.12.14 (registry+https://github.com/rust-lang/crates.io-index)" = "8c5bc2d6ff27891209efa5f63e9de78648d7801f085e4653701a692ce938d6fd" -"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" -"checksum synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a761d12e6d8dcb4dcf952a7a89b475e3a9d69e4a69307e01a470977642914bd" +"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" +"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +"checksum syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)" = "ec52cd796e5f01d0067225a5392e70084acc4c0013fa71d55166d38a8b307836" +"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11ce2fe9db64b842314052e2421ac61a73ce41b898dc8e3750398b219c5fc1e0" "checksum term_grid 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "230d3e804faaed5a39b08319efb797783df2fd9671b39b7596490cb486d702cf" -"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" -"checksum termsize 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4e3cde4e7c68acfef795660eba99817550b0d7b6d79ebb8e75439358ca5b680f" -"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" +"checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" +"checksum termsize 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5e86d824a8e90f342ad3ef4bd51ef7119a9b681b0cc9f8ee7b2852f02ccd2517" +"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e" +"checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" -"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d" +"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" +"checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unindent 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "834b4441326c660336850c5c0926cc20548e848967a5f57bc20c2b741c8d41f4" "checksum unix_socket 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aa2700417c405c38f5e6902d699345241c28c0b7ade4abaad71e35a87eb1564" -"checksum url 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f808aadd8cfec6ef90e4a14eb46f24511824d1ac596b9682703c87056c8678b7" -"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" -"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" +"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" +"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" +"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" -"checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369" +"checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" "checksum walker 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44971d5e5ae4f7904dffb6260ebd3910e7bcae104a94730e04a24cb6af40646b" "checksum wild 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "690e5dbd46cfaf2f3bd09875ad94e92cc56459fce505807d6ce5332671aa93ae" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" +"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum xattr 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "abb373b92de38a4301d66bec009929b4fb83120ea1c4a401be89dbe0b9777443" +"checksum xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" diff --git a/Cargo.toml b/Cargo.toml index 7dd7000a4..c18c61562 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,10 @@ unix = [ "uptime", "users", "who", + + "generic" ] +windows = ["generic"] # Feature "fuchsia" contains the exclusive list of utilities # that can be compiled and run on Fuchsia. Should be built # with --no-default-features when selecting this feature. @@ -149,7 +152,7 @@ redox = [ ] test_unimplemented = [] nightly = [] -default = ["generic", "unix"] +default = ["unix"] [workspace] @@ -260,6 +263,7 @@ unindent = "0.1.3" lazy_static = "1.3.0" [target.'cfg(unix)'.dev-dependencies] +# FIXME: this should use the normal users crate, but it conflicts with the users utility rust-users = { git = "https://github.com/uutils/rust-users" } unix_socket = "0.5.0" diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 000000000..3e90613e3 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,324 @@ +# Config options +PROFILE ?= debug +MULTICALL ?= n +INSTALL ?= install +ifneq (,$(filter install, $(MAKECMDGOALS))) +override PROFILE:=release +endif + +PROFILE_CMD := +ifeq ($(PROFILE),release) + PROFILE_CMD = --release +endif + +RM := rm -rf + +# Binaries +CARGO ?= cargo +CARGOFLAGS ?= + +# Install directories +PREFIX ?= /usr/local +DESTDIR ?= +BINDIR ?= /bin +MANDIR ?= /man/man1 + +INSTALLDIR_BIN=$(DESTDIR)$(PREFIX)$(BINDIR) +INSTALLDIR_MAN=$(DESTDIR)$(PREFIX)/share/$(MANDIR) +$(shell test -d $(INSTALLDIR_MAN)) +ifneq ($(.SHELLSTATUS),0) +override INSTALLDIR_MAN=$(DESTDIR)$(PREFIX)$(MANDIR) +endif + +#prefix to apply to uutils binary and all tool binaries +PROG_PREFIX ?= + +# This won't support any directory with spaces in its name, but you can just +# make a symlink without spaces that points to the directory. +BASEDIR ?= $(shell pwd) +BUILDDIR := $(BASEDIR)/target/${PROFILE} +PKG_BUILDDIR := $(BUILDDIR)/deps +DOCSDIR := $(BASEDIR)/docs + +BUSYBOX_ROOT := $(BASEDIR)/tmp +BUSYBOX_VER := 1.24.1 +BUSYBOX_SRC := $(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER) + +# Possible programs +PROGS := \ + base32 \ + base64 \ + basename \ + cat \ + cksum \ + comm \ + cp \ + cut \ + dircolors \ + dirname \ + echo \ + env \ + expand \ + expr \ + factor \ + false \ + fmt \ + fold \ + hashsum \ + head \ + join \ + link \ + ln \ + ls \ + mkdir \ + mktemp \ + more \ + mv \ + nl \ + numfmt \ + nproc \ + od \ + paste \ + printenv \ + printf \ + ptx \ + pwd \ + readlink \ + realpath \ + relpath \ + rm \ + rmdir \ + seq \ + shred \ + shuf \ + sleep \ + sort \ + split \ + sum \ + sync \ + tac \ + tail \ + tee \ + test \ + tr \ + true \ + truncate \ + tsort \ + unexpand \ + uniq \ + wc \ + whoami \ + yes + +UNIX_PROGS := \ + arch \ + chgrp \ + chmod \ + chown \ + chroot \ + du \ + groups \ + hostid \ + hostname \ + id \ + install \ + kill \ + logname \ + mkfifo \ + mknod \ + nice \ + nohup \ + pathchk \ + pinky \ + stat \ + stdbuf \ + timeout \ + touch \ + tty \ + uname \ + unlink \ + uptime \ + users \ + who + +ifneq ($(OS),Windows_NT) + PROGS := $(PROGS) $(UNIX_PROGS) +endif + +UTILS ?= $(PROGS) + +# Programs with usable tests +TEST_PROGS := \ + base32 \ + base64 \ + basename \ + cat \ + chgrp \ + chmod \ + chown \ + cksum \ + comm \ + cp \ + cut \ + dircolors \ + dirname \ + echo \ + env \ + expr \ + factor \ + false \ + fold \ + hashsum \ + head \ + install \ + link \ + ln \ + ls \ + mkdir \ + mktemp \ + mv \ + nl \ + numfmt \ + od \ + paste \ + pathchk \ + pinky \ + printf \ + ptx \ + pwd \ + readlink \ + realpath \ + rm \ + rmdir \ + seq \ + sort \ + split \ + stat \ + stdbuf \ + sum \ + tac \ + tail \ + test \ + touch \ + tr \ + true \ + truncate \ + tsort \ + unexpand \ + uniq \ + unlink \ + wc \ + who + +TESTS := \ + $(sort $(filter $(UTILS),$(filter-out $(SKIP_UTILS),$(TEST_PROGS)))) + +TEST_NO_FAIL_FAST := +TEST_SPEC_FEATURE := +ifneq ($(SPEC),) +TEST_NO_FAIL_FAST :=--no-fail-fast +TEST_SPEC_FEATURE := test_unimplemented +endif + +define TEST_BUSYBOX +test_busybox_$(1): + (cd $(BUSYBOX_SRC)/testsuite && bindir=$(BUILDDIR) ./runtest $(RUNTEST_ARGS) $(1) ) +endef + +# Output names +EXES := \ + $(sort $(filter $(UTILS),$(filter-out $(SKIP_UTILS),$(PROGS)))) + +INSTALLEES := ${EXES} +ifeq (${MULTICALL}, y) +INSTALLEES := ${INSTALLEES} uutils +endif + +# Shared library extension +SYSTEM := $(shell uname) +DYLIB_EXT := +ifeq ($(SYSTEM),Linux) + DYLIB_EXT := so + DYLIB_FLAGS := -shared +endif +ifeq ($(SYSTEM),Darwin) + DYLIB_EXT := dylib + DYLIB_FLAGS := -dynamiclib -undefined dynamic_lookup +endif + +all: build + +do_install = $(INSTALL) ${1} +use_default := 1 + +build-pkgs: +ifneq (${MULTICALL}, y) + ${CARGO} build ${CARGOFLAGS} ${PROFILE_CMD} $(foreach pkg,$(EXES),-p $(pkg)) +endif + +build-uutils: + ${CARGO} build ${CARGOFLAGS} --features "${EXES}" ${PROFILE_CMD} --no-default-features + +build-manpages: + cd $(DOCSDIR) && make man + +build: build-uutils build-pkgs build-manpages + +$(foreach test,$(filter-out $(SKIP_UTILS),$(PROGS)),$(eval $(call TEST_BUSYBOX,$(test)))) + +test: + ${CARGO} test ${CARGOFLAGS} --features "$(TESTS) $(TEST_SPEC_FEATURE)" --no-default-features $(TEST_NO_FAIL_FAST) + +busybox-src: + if [ ! -e $(BUSYBOX_SRC) ]; then \ + mkdir -p $(BUSYBOX_ROOT); \ + wget https://busybox.net/downloads/busybox-$(BUSYBOX_VER).tar.bz2 -P $(BUSYBOX_ROOT); \ + tar -C $(BUSYBOX_ROOT) -xf $(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER).tar.bz2; \ + fi; \ + +# This is a busybox-specific config file their test suite wants to parse. +$(BUILDDIR)/.config: $(BASEDIR)/.busybox-config + cp $< $@ + +# Test under the busybox testsuite +$(BUILDDIR)/busybox: busybox-src build-uutils $(BUILDDIR)/.config + cp $(BUILDDIR)/uutils $(BUILDDIR)/busybox; \ + chmod +x $@; + +ifeq ($(EXES),) +busytest: +else +busytest: $(BUILDDIR)/busybox $(addprefix test_busybox_,$(filter-out $(SKIP_UTILS),$(EXES))) +endif + +clean: + $(RM) $(BUILDDIR) + cd $(DOCSDIR) && make clean + +distclean: clean + $(CARGO) clean $(CARGOFLAGS) && $(CARGO) update $(CARGOFLAGS) + +install: build + mkdir -p $(INSTALLDIR_BIN) + mkdir -p $(INSTALLDIR_MAN) +ifeq (${MULTICALL}, y) + $(INSTALL) $(BUILDDIR)/uutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)uutils + cd $(INSTALLDIR_BIN) && $(foreach prog, $(filter-out uutils, $(INSTALLEES)), \ + ln -fs $(PROG_PREFIX)uutils $(PROG_PREFIX)$(prog) &&) : + cat $(DOCSDIR)/_build/man/uutils.1 | gzip > $(INSTALLDIR_MAN)/$(PROG_PREFIX)uutils.1.gz +else + $(foreach prog, $(INSTALLEES), \ + $(INSTALL) $(BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);) +endif + $(foreach man, $(filter $(INSTALLEES), $(basename $(notdir $(wildcard $(DOCSDIR)/_build/man/*)))), \ + cat $(DOCSDIR)/_build/man/$(man).1 | gzip > $(INSTALLDIR_MAN)/$(PROG_PREFIX)$(man).1.gz &&) : + +uninstall: +ifeq (${MULTICALL}, y) + rm -f $(addprefix $(INSTALLDIR_BIN)/,$(PROG_PREFIX)uutils) +endif + rm -f $(addprefix $(INSTALLDIR_MAN)/,$(PROG_PREFIX)uutils.1.gz) + rm -f $(addprefix $(INSTALLDIR_BIN)/$(PROG_PREFIX),$(PROGS)) + rm -f $(addprefix $(INSTALLDIR_MAN)/$(PROG_PREFIX),$(addsuffix .1.gz,$(PROGS))) + +.PHONY: all build build-uutils build-pkgs build-docs test distclean clean busytest install uninstall diff --git a/Makefile b/Makefile index 3e90613e3..044aaa770 100644 --- a/Makefile +++ b/Makefile @@ -1,324 +1,5 @@ -# Config options -PROFILE ?= debug -MULTICALL ?= n -INSTALL ?= install -ifneq (,$(filter install, $(MAKECMDGOALS))) -override PROFILE:=release -endif - -PROFILE_CMD := -ifeq ($(PROFILE),release) - PROFILE_CMD = --release -endif - -RM := rm -rf - -# Binaries -CARGO ?= cargo -CARGOFLAGS ?= - -# Install directories -PREFIX ?= /usr/local -DESTDIR ?= -BINDIR ?= /bin -MANDIR ?= /man/man1 - -INSTALLDIR_BIN=$(DESTDIR)$(PREFIX)$(BINDIR) -INSTALLDIR_MAN=$(DESTDIR)$(PREFIX)/share/$(MANDIR) -$(shell test -d $(INSTALLDIR_MAN)) -ifneq ($(.SHELLSTATUS),0) -override INSTALLDIR_MAN=$(DESTDIR)$(PREFIX)$(MANDIR) -endif - -#prefix to apply to uutils binary and all tool binaries -PROG_PREFIX ?= - -# This won't support any directory with spaces in its name, but you can just -# make a symlink without spaces that points to the directory. -BASEDIR ?= $(shell pwd) -BUILDDIR := $(BASEDIR)/target/${PROFILE} -PKG_BUILDDIR := $(BUILDDIR)/deps -DOCSDIR := $(BASEDIR)/docs - -BUSYBOX_ROOT := $(BASEDIR)/tmp -BUSYBOX_VER := 1.24.1 -BUSYBOX_SRC := $(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER) - -# Possible programs -PROGS := \ - base32 \ - base64 \ - basename \ - cat \ - cksum \ - comm \ - cp \ - cut \ - dircolors \ - dirname \ - echo \ - env \ - expand \ - expr \ - factor \ - false \ - fmt \ - fold \ - hashsum \ - head \ - join \ - link \ - ln \ - ls \ - mkdir \ - mktemp \ - more \ - mv \ - nl \ - numfmt \ - nproc \ - od \ - paste \ - printenv \ - printf \ - ptx \ - pwd \ - readlink \ - realpath \ - relpath \ - rm \ - rmdir \ - seq \ - shred \ - shuf \ - sleep \ - sort \ - split \ - sum \ - sync \ - tac \ - tail \ - tee \ - test \ - tr \ - true \ - truncate \ - tsort \ - unexpand \ - uniq \ - wc \ - whoami \ - yes - -UNIX_PROGS := \ - arch \ - chgrp \ - chmod \ - chown \ - chroot \ - du \ - groups \ - hostid \ - hostname \ - id \ - install \ - kill \ - logname \ - mkfifo \ - mknod \ - nice \ - nohup \ - pathchk \ - pinky \ - stat \ - stdbuf \ - timeout \ - touch \ - tty \ - uname \ - unlink \ - uptime \ - users \ - who - -ifneq ($(OS),Windows_NT) - PROGS := $(PROGS) $(UNIX_PROGS) -endif - -UTILS ?= $(PROGS) - -# Programs with usable tests -TEST_PROGS := \ - base32 \ - base64 \ - basename \ - cat \ - chgrp \ - chmod \ - chown \ - cksum \ - comm \ - cp \ - cut \ - dircolors \ - dirname \ - echo \ - env \ - expr \ - factor \ - false \ - fold \ - hashsum \ - head \ - install \ - link \ - ln \ - ls \ - mkdir \ - mktemp \ - mv \ - nl \ - numfmt \ - od \ - paste \ - pathchk \ - pinky \ - printf \ - ptx \ - pwd \ - readlink \ - realpath \ - rm \ - rmdir \ - seq \ - sort \ - split \ - stat \ - stdbuf \ - sum \ - tac \ - tail \ - test \ - touch \ - tr \ - true \ - truncate \ - tsort \ - unexpand \ - uniq \ - unlink \ - wc \ - who - -TESTS := \ - $(sort $(filter $(UTILS),$(filter-out $(SKIP_UTILS),$(TEST_PROGS)))) - -TEST_NO_FAIL_FAST := -TEST_SPEC_FEATURE := -ifneq ($(SPEC),) -TEST_NO_FAIL_FAST :=--no-fail-fast -TEST_SPEC_FEATURE := test_unimplemented -endif - -define TEST_BUSYBOX -test_busybox_$(1): - (cd $(BUSYBOX_SRC)/testsuite && bindir=$(BUILDDIR) ./runtest $(RUNTEST_ARGS) $(1) ) -endef - -# Output names -EXES := \ - $(sort $(filter $(UTILS),$(filter-out $(SKIP_UTILS),$(PROGS)))) - -INSTALLEES := ${EXES} -ifeq (${MULTICALL}, y) -INSTALLEES := ${INSTALLEES} uutils -endif - -# Shared library extension -SYSTEM := $(shell uname) -DYLIB_EXT := -ifeq ($(SYSTEM),Linux) - DYLIB_EXT := so - DYLIB_FLAGS := -shared -endif -ifeq ($(SYSTEM),Darwin) - DYLIB_EXT := dylib - DYLIB_FLAGS := -dynamiclib -undefined dynamic_lookup -endif - -all: build - -do_install = $(INSTALL) ${1} -use_default := 1 - -build-pkgs: -ifneq (${MULTICALL}, y) - ${CARGO} build ${CARGOFLAGS} ${PROFILE_CMD} $(foreach pkg,$(EXES),-p $(pkg)) -endif - -build-uutils: - ${CARGO} build ${CARGOFLAGS} --features "${EXES}" ${PROFILE_CMD} --no-default-features - -build-manpages: - cd $(DOCSDIR) && make man - -build: build-uutils build-pkgs build-manpages - -$(foreach test,$(filter-out $(SKIP_UTILS),$(PROGS)),$(eval $(call TEST_BUSYBOX,$(test)))) - -test: - ${CARGO} test ${CARGOFLAGS} --features "$(TESTS) $(TEST_SPEC_FEATURE)" --no-default-features $(TEST_NO_FAIL_FAST) - -busybox-src: - if [ ! -e $(BUSYBOX_SRC) ]; then \ - mkdir -p $(BUSYBOX_ROOT); \ - wget https://busybox.net/downloads/busybox-$(BUSYBOX_VER).tar.bz2 -P $(BUSYBOX_ROOT); \ - tar -C $(BUSYBOX_ROOT) -xf $(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER).tar.bz2; \ - fi; \ - -# This is a busybox-specific config file their test suite wants to parse. -$(BUILDDIR)/.config: $(BASEDIR)/.busybox-config - cp $< $@ - -# Test under the busybox testsuite -$(BUILDDIR)/busybox: busybox-src build-uutils $(BUILDDIR)/.config - cp $(BUILDDIR)/uutils $(BUILDDIR)/busybox; \ - chmod +x $@; - -ifeq ($(EXES),) -busytest: -else -busytest: $(BUILDDIR)/busybox $(addprefix test_busybox_,$(filter-out $(SKIP_UTILS),$(EXES))) -endif - -clean: - $(RM) $(BUILDDIR) - cd $(DOCSDIR) && make clean - -distclean: clean - $(CARGO) clean $(CARGOFLAGS) && $(CARGO) update $(CARGOFLAGS) - -install: build - mkdir -p $(INSTALLDIR_BIN) - mkdir -p $(INSTALLDIR_MAN) -ifeq (${MULTICALL}, y) - $(INSTALL) $(BUILDDIR)/uutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)uutils - cd $(INSTALLDIR_BIN) && $(foreach prog, $(filter-out uutils, $(INSTALLEES)), \ - ln -fs $(PROG_PREFIX)uutils $(PROG_PREFIX)$(prog) &&) : - cat $(DOCSDIR)/_build/man/uutils.1 | gzip > $(INSTALLDIR_MAN)/$(PROG_PREFIX)uutils.1.gz -else - $(foreach prog, $(INSTALLEES), \ - $(INSTALL) $(BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog);) -endif - $(foreach man, $(filter $(INSTALLEES), $(basename $(notdir $(wildcard $(DOCSDIR)/_build/man/*)))), \ - cat $(DOCSDIR)/_build/man/$(man).1 | gzip > $(INSTALLDIR_MAN)/$(PROG_PREFIX)$(man).1.gz &&) : - -uninstall: -ifeq (${MULTICALL}, y) - rm -f $(addprefix $(INSTALLDIR_BIN)/,$(PROG_PREFIX)uutils) -endif - rm -f $(addprefix $(INSTALLDIR_MAN)/,$(PROG_PREFIX)uutils.1.gz) - rm -f $(addprefix $(INSTALLDIR_BIN)/$(PROG_PREFIX),$(PROGS)) - rm -f $(addprefix $(INSTALLDIR_MAN)/$(PROG_PREFIX),$(addsuffix .1.gz,$(PROGS))) - -.PHONY: all build build-uutils build-pkgs build-docs test distclean clean busytest install uninstall +USEGNU=gmake $* +all: + @$(USEGNU) +.DEFAULT: + @$(USEGNU) diff --git a/README.md b/README.md index c8713e36f..8fc611d20 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,17 @@ uutils coreutils ================ +[![Discord](https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat)](https://discord.gg/wQVJbvJ) [![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/uutils/coreutils/blob/master/LICENSE) -[![Build Status](https://api.travis-ci.org/uutils/coreutils.svg?branch=master)](https://travis-ci.org/uutils/coreutils) -[![Build status](https://ci.appveyor.com/api/projects/status/787ltcxgy86r20le?svg=true)](https://ci.appveyor.com/project/Arcterus/coreutils) +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fuutils%2Fcoreutils.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fuutils%2Fcoreutils?ref=badge_shield) [![LOC](https://tokei.rs/b1/github/uutils/coreutils?category=code)](https://github.com/Aaronepower/tokei) [![dependency status](https://deps.rs/repo/github/uutils/coreutils/status.svg)](https://deps.rs/repo/github/uutils/coreutils) -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fuutils%2Fcoreutils.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fuutils%2Fcoreutils?ref=badge_shield) + +[![Build Status](https://api.travis-ci.org/uutils/coreutils.svg?branch=master)](https://travis-ci.org/uutils/coreutils) +[![Build Status (Windows)](https://ci.appveyor.com/api/projects/status/787ltcxgy86r20le?svg=true)](https://ci.appveyor.com/project/Arcterus/coreutils) +[![Build Status (FreeBSD)](https://api.cirrus-ci.com/github/uutils/coreutils.svg)](https://cirrus-ci.com/github/uutils/coreutils/master) + +----------------------------------------------- uutils is an attempt at writing universal (as in cross-platform) CLI utils in [Rust](http://www.rust-lang.org). This repo is to aggregate the GNU @@ -28,15 +33,13 @@ Requirements * Rust (`cargo`, `rustc`) * GNU Make (required to build documentation) -* CMake (Unix; used by Oniguruma, which is required for `expr`) -* NMake (Windows; used by Oniguruma, which is required for `expr`) * [Sphinx](http://www.sphinx-doc.org/) (for documentation) * gzip (for installing documentation) ### Rust Version ### uutils follows Rust's release channels and is tested against stable, beta and nightly. -The current oldest supported version of the Rust compiler is `1.27.0`. +The current oldest supported version of the Rust compiler is `1.31.0`. On both Windows and Redox, only the nightly version is tested currently. @@ -67,7 +70,7 @@ Unix-like platforms at the moment, to build on Windows, you must do the following: ```bash # to keep debug information, compile without --release -$ cargo build --release --no-default-features --features generic +$ cargo build --release --no-default-features --features windows ``` If you don't want to build every utility available on your platform into the diff --git a/build.rs b/build.rs index 778562b0a..b5b70c019 100644 --- a/build.rs +++ b/build.rs @@ -16,7 +16,7 @@ pub fn main() { if val == "1" && key.starts_with(feature_prefix) { let krate = key[feature_prefix.len()..].to_lowercase(); match krate.as_ref() { - "default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic" + "default" | "unix" | "redox" | "redox_generic" | "fuchsia" | "generic" | "windows" | "nightly" | "test_unimplemented" => continue, _ => {} } diff --git a/docs/GNUmakefile b/docs/GNUmakefile new file mode 100644 index 000000000..05cef70c1 --- /dev/null +++ b/docs/GNUmakefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +SPHINXPROJ = uutils +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help GNUmakefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: GNUmakefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile index 70f7c2b99..044aaa770 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,20 +1,5 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SPHINXPROJ = uutils -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file +USEGNU=gmake $* +all: + @$(USEGNU) +.DEFAULT: + @$(USEGNU) diff --git a/src/arch/Cargo.toml b/src/arch/Cargo.toml index 5d8703f80..f438686bc 100644 --- a/src/arch/Cargo.toml +++ b/src/arch/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_arch" path = "arch.rs" [dependencies] -platform-info = { git = "https://github.com/uutils/platform-info" } +platform-info = "0.0.1" uucore = { path = "../uucore" } [[bin]] diff --git a/src/chmod/chmod.rs b/src/chmod/chmod.rs index 6cd1f6373..b428285bd 100644 --- a/src/chmod/chmod.rs +++ b/src/chmod/chmod.rs @@ -196,7 +196,7 @@ impl Chmoder { } }; match self.fmode { - Some(mode) => try!(self.change_file(fperm, mode, file, name)), + Some(mode) => self.change_file(fperm, mode, file, name)?, None => { let cmode_unwrapped = self.cmode.clone().unwrap(); for mode in cmode_unwrapped.split(',') { @@ -209,7 +209,7 @@ impl Chmoder { }; match result { Ok(mode) => { - try!(self.change_file(fperm, mode, file, name)); + self.change_file(fperm, mode, file, name)?; fperm = mode; } Err(f) => { diff --git a/src/cksum/cksum.rs b/src/cksum/cksum.rs index 44eb84af2..08b56b7d3 100644 --- a/src/cksum/cksum.rs +++ b/src/cksum/cksum.rs @@ -58,7 +58,7 @@ fn cksum(fname: &str) -> io::Result<(u32, usize)> { let mut rd: Box = match fname { "-" => Box::new(stdin()), _ => { - file = try!(File::open(&Path::new(fname))); + file = File::open(&Path::new(fname))?; Box::new(BufReader::new(file)) } }; diff --git a/src/comm/comm.rs b/src/comm/comm.rs index b614f898b..f9381826b 100644 --- a/src/comm/comm.rs +++ b/src/comm/comm.rs @@ -117,7 +117,7 @@ fn open_file(name: &str) -> io::Result { match name { "-" => Ok(LineReader::Stdin(stdin())), _ => { - let f = try!(File::open(&Path::new(name))); + let f = File::open(&Path::new(name))?; Ok(LineReader::FileIn(BufReader::new(f))) } } diff --git a/src/cp/cp.rs b/src/cp/cp.rs index c0c2babd2..eb2205113 100644 --- a/src/cp/cp.rs +++ b/src/cp/cp.rs @@ -1179,8 +1179,8 @@ pub fn localize_to_target(root: &Path, source: &Path, target: &Path) -> CopyResu pub fn paths_refer_to_same_file(p1: &Path, p2: &Path) -> io::Result { // We have to take symlinks and relative paths into account. - let pathbuf1 = try!(canonicalize(p1, CanonicalizeMode::Normal)); - let pathbuf2 = try!(canonicalize(p2, CanonicalizeMode::Normal)); + let pathbuf1 = canonicalize(p1, CanonicalizeMode::Normal)?; + let pathbuf2 = canonicalize(p2, CanonicalizeMode::Normal)?; Ok(pathbuf1 == pathbuf2) } diff --git a/src/fmt/parasplit.rs b/src/fmt/parasplit.rs index 42ceccf81..5ffe4593e 100644 --- a/src/fmt/parasplit.rs +++ b/src/fmt/parasplit.rs @@ -520,7 +520,7 @@ impl<'a> WordSplit<'a> { impl<'a> WordSplit<'a> { fn new<'b>(opts: &'b FmtOptions, string: &'b str) -> WordSplit<'b> { // wordsplits *must* start at a non-whitespace character - let trim_string = string.trim_left(); + let trim_string = string.trim_start(); WordSplit { opts, string: trim_string, diff --git a/src/ln/ln.rs b/src/ln/ln.rs index d6c89f50d..263c4de10 100644 --- a/src/ln/ln.rs +++ b/src/ln/ln.rs @@ -269,9 +269,9 @@ fn link(src: &PathBuf, dst: &PathBuf, settings: &Settings) -> Result<()> { if !read_yes() { return Ok(()); } - try!(fs::remove_file(dst)) + fs::remove_file(dst)? } - OverwriteMode::Force => try!(fs::remove_file(dst)), + OverwriteMode::Force => fs::remove_file(dst)?, }; backup_path = match settings.backup { @@ -281,14 +281,14 @@ fn link(src: &PathBuf, dst: &PathBuf, settings: &Settings) -> Result<()> { BackupMode::ExistingBackup => Some(existing_backup_path(dst, &settings.suffix)), }; if let Some(ref p) = backup_path { - try!(fs::rename(dst, p)); + fs::rename(dst, p)?; } } if settings.symbolic { - try!(symlink(src, dst)); + symlink(src, dst)?; } else { - try!(fs::hard_link(src, dst)); + fs::hard_link(src, dst)?; } if settings.verbose { diff --git a/src/ls/Cargo.toml b/src/ls/Cargo.toml index b0304b5ca..dbce03fe5 100644 --- a/src/ls/Cargo.toml +++ b/src/ls/Cargo.toml @@ -12,7 +12,7 @@ path = "ls.rs" getopts = "0.2.18" number_prefix = "0.2.8" term_grid = "0.1.5" -termsize = "0.1.4" +termsize = "0.1.6" time = "0.1.40" lazy_static = "1.0.1" unicode-width = "0.1.5" diff --git a/src/od/formatteriteminfo.rs b/src/od/formatteriteminfo.rs index d43b1bade..29d5cb6d9 100644 --- a/src/od/formatteriteminfo.rs +++ b/src/od/formatteriteminfo.rs @@ -33,15 +33,15 @@ impl fmt::Debug for FormatWriter { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { &FormatWriter::IntWriter(ref p) => { - try!(f.write_str("IntWriter:")); + f.write_str("IntWriter:")?; fmt::Pointer::fmt(p, f) } &FormatWriter::FloatWriter(ref p) => { - try!(f.write_str("FloatWriter:")); + f.write_str("FloatWriter:")?; fmt::Pointer::fmt(p, f) } &FormatWriter::MultibyteWriter(ref p) => { - try!(f.write_str("MultibyteWriter:")); + f.write_str("MultibyteWriter:")?; fmt::Pointer::fmt(&(*p as *const ()), f) } } diff --git a/src/paste/paste.rs b/src/paste/paste.rs index 0b5c13635..8ad29568b 100644 --- a/src/paste/paste.rs +++ b/src/paste/paste.rs @@ -94,7 +94,7 @@ fn paste(filenames: Vec, serial: bool, delimiters: String) { match file.read_line(&mut line) { Ok(0) => break, Ok(_) => { - output.push_str(line.trim_right()); + output.push_str(line.trim_end()); output.push_str(&delimiters[delim_count % delimiters.len()]); } Err(e) => crash!(1, "{}", e.to_string()), @@ -118,7 +118,7 @@ fn paste(filenames: Vec, serial: bool, delimiters: String) { eof[i] = true; eof_count += 1; } - Ok(_) => output.push_str(line.trim_right()), + Ok(_) => output.push_str(line.trim_end()), Err(e) => crash!(1, "{}", e.to_string()), } } diff --git a/src/ptx/ptx.rs b/src/ptx/ptx.rs index 7ae696bc9..cc30242d5 100644 --- a/src/ptx/ptx.rs +++ b/src/ptx/ptx.rs @@ -416,7 +416,7 @@ fn format_tex_line(config: &Config, word_ref: &WordRef, line: &str, reference: & output.push_str(&format!("\\{} ", config.macro_name)); let all_before = if config.input_ref { let before = &line[0..word_ref.position]; - adjust_tex_str(before.trim().trim_left_matches(reference)) + adjust_tex_str(before.trim().trim_start_matches(reference)) } else { adjust_tex_str(&line[0..word_ref.position]) }; @@ -447,7 +447,7 @@ fn format_roff_line(config: &Config, word_ref: &WordRef, line: &str, reference: output.push_str(&format!(".{}", config.macro_name)); let all_before = if config.input_ref { let before = &line[0..word_ref.position]; - adjust_roff_str(before.trim().trim_left_matches(reference)) + adjust_roff_str(before.trim().trim_start_matches(reference)) } else { adjust_roff_str(&line[0..word_ref.position]) }; diff --git a/src/shred/shred.rs b/src/shred/shred.rs index a2852bc86..65005b916 100644 --- a/src/shred/shred.rs +++ b/src/shred/shred.rs @@ -491,24 +491,24 @@ fn do_pass( given_file_size: Option, exact: bool, ) -> Result<(), io::Error> { - try!(file.seek(SeekFrom::Start(0))); + file.seek(SeekFrom::Start(0))?; // Use the given size or the whole file if not specified - let size: u64 = given_file_size.unwrap_or(try!(get_file_size(path))); + let size: u64 = given_file_size.unwrap_or(get_file_size(path)?); let generator = BytesGenerator::new(size, generator_type, exact); for block in generator { - try!(file.write_all(&*block)); + file.write_all(&*block)?; } - try!(file.sync_data()); + file.sync_data()?; Ok(()) } fn get_file_size(path: &Path) -> Result { - let size: u64 = try!(fs::metadata(path)).len(); + let size: u64 = fs::metadata(path)?.len(); Ok(size) } @@ -574,7 +574,7 @@ fn do_remove(path: &Path, orig_filename: &str, verbose: bool) -> Result<(), io:: let renamed_path: Option = wipe_name(&path, verbose); match renamed_path { Some(rp) => { - try!(fs::remove_file(rp)); + fs::remove_file(rp)?; } None => (), } diff --git a/src/stat/fsext.rs b/src/stat/fsext.rs index 31ca7d4c9..b76451740 100644 --- a/src/stat/fsext.rs +++ b/src/stat/fsext.rs @@ -21,28 +21,21 @@ pub trait BirthTime { use std::fs::Metadata; impl BirthTime for Metadata { - #[cfg(feature = "nightly")] fn pretty_birth(&self) -> String { self.created() - .map(|t| t.elapsed().unwrap()) + .ok() + .and_then(|t| t.elapsed().ok()) .map(|e| pretty_time(e.as_secs() as i64, e.subsec_nanos() as i64)) .unwrap_or("-".to_owned()) } - #[cfg(not(feature = "nightly"))] - fn pretty_birth(&self) -> String { - "-".to_owned() - } - #[cfg(feature = "nightly")] + fn birth(&self) -> String { self.created() - .map(|t| t.elapsed().unwrap()) + .ok() + .and_then(|t| t.elapsed().ok()) .map(|e| format!("{}", e.as_secs())) .unwrap_or("0".to_owned()) } - #[cfg(not(feature = "nightly"))] - fn birth(&self) -> String { - "0".to_owned() - } } #[macro_export] @@ -94,7 +87,6 @@ pub fn pretty_access(mode: mode_t) -> String { S_IFLNK => 'l', S_IFSOCK => 's', // TODO: Other file types - // See coreutils/gnulib/lib/filemode.c _ => '?', }); @@ -151,19 +143,19 @@ use std::convert::{AsRef, From}; use std::error::Error; use std::io::Error as IOError; -#[cfg(any(target_os = "linux", target_os = "macos", target_os = "android"))] +#[cfg(any(target_os = "linux", target_os = "macos", target_os = "android", target_os = "freebsd"))] use libc::statfs as Sstatfs; -// #[cfg(any(target_os = "openbsd", target_os = "netbsd", target_os = "openbsd", target_os = "bitrig", target_os = "dragonfly"))] -// use self::libc::statvfs as Sstatfs; +#[cfg(any(target_os = "openbsd", target_os = "netbsd", target_os = "openbsd", target_os = "bitrig", target_os = "dragonfly"))] +use libc::statvfs as Sstatfs; -#[cfg(any(target_os = "linux", target_os = "macos", target_os = "android"))] +#[cfg(any(target_os = "linux", target_os = "macos", target_os = "android", target_os = "freebsd"))] use libc::statfs as statfs_fn; -// #[cfg(any(target_os = "openbsd", target_os = "netbsd", target_os = "openbsd", target_os = "bitrig", target_os = "dragonfly"))] -// use self::libc::statvfs as statfs_fn; +#[cfg(any(target_os = "openbsd", target_os = "netbsd", target_os = "openbsd", target_os = "bitrig", target_os = "dragonfly"))] +use libc::statvfs as statfs_fn; pub trait FsMeta { fn fs_type(&self) -> i64; - fn iosize(&self) -> i64; + fn iosize(&self) -> u64; fn blksize(&self) -> i64; fn total_blocks(&self) -> u64; fn free_blocks(&self) -> u64; @@ -171,7 +163,7 @@ pub trait FsMeta { fn total_fnodes(&self) -> u64; fn free_fnodes(&self) -> u64; fn fsid(&self) -> u64; - fn namelen(&self) -> i64; + fn namelen(&self) -> u64; } impl FsMeta for Sstatfs { @@ -193,22 +185,28 @@ impl FsMeta for Sstatfs { fn free_fnodes(&self) -> u64 { self.f_ffree as u64 } + #[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd"))] fn fs_type(&self) -> i64 { self.f_type as i64 } + #[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "freebsd")))] + fn fs_type(&self) -> i64 { + // FIXME: statvfs doesn't have an equivalent, so we need to do something else + unimplemented!() + } #[cfg(target_os = "linux")] - fn iosize(&self) -> i64 { - self.f_frsize as i64 + fn iosize(&self) -> u64 { + self.f_frsize as u64 } - #[cfg(target_os = "macos")] - fn iosize(&self) -> i64 { - self.f_iosize as i64 + #[cfg(any(target_os = "macos", target_os = "freebsd"))] + fn iosize(&self) -> u64 { + self.f_iosize as u64 } - // FIXME: - #[cfg(not(any(target_os = "macos", target_os = "linux")))] - fn iosize(&self) -> i64 { - 0 + // XXX: dunno if this is right + #[cfg(not(any(target_os = "macos", target_os = "freebsd", target_os = "linux")))] + fn iosize(&self) -> u64 { + self.f_bsize as u64 } // Linux, SunOS, HP-UX, 4.4BSD, FreeBSD have a system call statfs() that returns @@ -217,29 +215,32 @@ impl FsMeta for Sstatfs { // // Solaris, Irix and POSIX have a system call statvfs(2) that returns a // struct statvfs, containing an unsigned long f_fsid - #[cfg(any(target_os = "macos", target_os = "linux"))] + #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "linux"))] fn fsid(&self) -> u64 { let f_fsid: &[u32; 2] = unsafe { transmute(&self.f_fsid) }; (f_fsid[0] as u64) << 32 | f_fsid[1] as u64 } - // FIXME: - #[cfg(not(any(target_os = "macos", target_os = "linux")))] + #[cfg(not(any(target_os = "macos", target_os = "freebsd", target_os = "linux")))] fn fsid(&self) -> u64 { - 0 + self.f_fsid as u64 } #[cfg(target_os = "linux")] - fn namelen(&self) -> i64 { - self.f_namelen as i64 + fn namelen(&self) -> u64 { + self.f_namelen as u64 } #[cfg(target_os = "macos")] - fn namelen(&self) -> i64 { + fn namelen(&self) -> u64 { 1024 } - // FIXME: - #[cfg(not(any(target_os = "macos", target_os = "linux")))] + #[cfg(target_os = "freebsd")] fn namelen(&self) -> u64 { - 0 + self.f_namemax as u64 + } + // XXX: should everything just use statvfs? + #[cfg(not(any(target_os = "macos", target_os = "freebsd", target_os = "linux")))] + fn namelen(&self) -> u64 { + self.f_namemax as u64 } } diff --git a/src/stat/stat.rs b/src/stat/stat.rs index 482d0e21a..7b65c7a24 100644 --- a/src/stat/stat.rs +++ b/src/stat/stat.rs @@ -468,7 +468,7 @@ impl Stater { let default_tokens = if fmtstr.is_empty() { Stater::generate_tokens(&Stater::default_fmt(showfs, terse, false), use_printf).unwrap() } else { - try!(Stater::generate_tokens(&fmtstr, use_printf)) + Stater::generate_tokens(&fmtstr, use_printf)? }; let default_dev_tokens = Stater::generate_tokens(&Stater::default_fmt(showfs, terse, true), use_printf).unwrap(); diff --git a/src/stdbuf/build.rs b/src/stdbuf/build.rs index cea536e4b..256592301 100644 --- a/src/stdbuf/build.rs +++ b/src/stdbuf/build.rs @@ -5,16 +5,21 @@ use std::path::Path; #[path = "../../mkmain.rs"] mod mkmain; -#[cfg(target_os = "linux")] +#[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "windows")))] mod platform { pub const DYLIB_EXT: &str = ".so"; } -#[cfg(target_os = "macos")] +#[cfg(any(target_os = "macos", target_os = "ios"))] mod platform { pub const DYLIB_EXT: &str = ".dylib"; } +#[cfg(target_os = "windows")] +mod platform { + pub const DYLIB_EXT: &str = ".dll"; +} + fn main() { mkmain::main(); diff --git a/src/stdbuf/stdbuf.rs b/src/stdbuf/stdbuf.rs index 480f96908..1b58ad5a2 100644 --- a/src/stdbuf/stdbuf.rs +++ b/src/stdbuf/stdbuf.rs @@ -51,7 +51,7 @@ enum OkMsg { Version, } -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd", target_os = "dragonflybsd"))] fn preload_strings() -> (&'static str, &'static str) { ("LD_PRELOAD", "so") } @@ -61,7 +61,7 @@ fn preload_strings() -> (&'static str, &'static str) { ("DYLD_LIBRARY_PATH", "dylib") } -#[cfg(not(any(target_os = "linux", target_os = "macos")))] +#[cfg(not(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd", target_os = "dragonflybsd", target_os = "macos")))] fn preload_strings() -> (&'static str, &'static str) { crash!(1, "Command not supported for this operating system!") } @@ -93,8 +93,8 @@ fn print_usage(opts: &Options) { } fn parse_size(size: &str) -> Option { - let ext = size.trim_left_matches(|c: char| c.is_digit(10)); - let num = size.trim_right_matches(|c: char| c.is_alphabetic()); + let ext = size.trim_start_matches(|c: char| c.is_digit(10)); + let num = size.trim_end_matches(|c: char| c.is_alphabetic()); let mut recovered = num.to_owned(); recovered.push_str(ext); if recovered != size { @@ -172,9 +172,9 @@ fn parse_options( return Ok(OkMsg::Version); } let mut modified = false; - options.stdin = try!(check_option(&matches, "input", &mut modified).ok_or(ErrMsg::Fatal)); - options.stdout = try!(check_option(&matches, "output", &mut modified).ok_or(ErrMsg::Fatal)); - options.stderr = try!(check_option(&matches, "error", &mut modified).ok_or(ErrMsg::Fatal)); + options.stdin = check_option(&matches, "input", &mut modified).ok_or(ErrMsg::Fatal)?; + options.stdout = check_option(&matches, "output", &mut modified).ok_or(ErrMsg::Fatal)?; + options.stderr = check_option(&matches, "error", &mut modified).ok_or(ErrMsg::Fatal)?; if matches.free.len() != 1 { return Err(ErrMsg::Retry); diff --git a/src/sum/sum.rs b/src/sum/sum.rs index 3e1fa5921..3f506ab40 100644 --- a/src/sum/sum.rs +++ b/src/sum/sum.rs @@ -68,7 +68,7 @@ fn open(name: &str) -> Result> { match name { "-" => Ok(Box::new(stdin()) as Box), _ => { - let f = try!(File::open(&Path::new(name))); + let f = File::open(&Path::new(name))?; Ok(Box::new(f) as Box) } } diff --git a/src/tee/tee.rs b/src/tee/tee.rs old mode 100755 new mode 100644 index eddd940f7..dfc72ef74 --- a/src/tee/tee.rs +++ b/src/tee/tee.rs @@ -131,14 +131,14 @@ struct MultiWriter { impl Write for MultiWriter { fn write(&mut self, buf: &[u8]) -> Result { for writer in &mut self.writers { - try!(writer.write_all(buf)); + writer.write_all(buf)?; } Ok(buf.len()) } fn flush(&mut self) -> Result<()> { for writer in &mut self.writers { - try!(writer.flush()); + writer.flush()?; } Ok(()) } diff --git a/src/tsort/tsort.rs b/src/tsort/tsort.rs old mode 100755 new mode 100644 index 145dd61fe..f930e620d --- a/src/tsort/tsort.rs +++ b/src/tsort/tsort.rs @@ -79,7 +79,7 @@ pub fn uumain(args: Vec) -> i32 { let mut line = String::new(); match reader.read_line(&mut line) { Ok(_) => { - let tokens: Vec = line.trim_right() + let tokens: Vec = line.trim_end() .split_whitespace() .map(|s| s.to_owned()) .collect(); diff --git a/src/uname/Cargo.toml b/src/uname/Cargo.toml index 1fa06c89f..94609d061 100644 --- a/src/uname/Cargo.toml +++ b/src/uname/Cargo.toml @@ -10,7 +10,7 @@ path = "uname.rs" [dependencies] clap = "2.32.0" -platform-info = { git = "https://github.com/uutils/platform-info" } +platform-info = "0.0.1" uucore = { path = "../uucore" } [[bin]] diff --git a/src/uname/uname.rs b/src/uname/uname.rs index 05fce6366..7adc1b4e9 100644 --- a/src/uname/uname.rs +++ b/src/uname/uname.rs @@ -122,7 +122,7 @@ pub fn uumain(args: Vec) -> i32 { output.push_str(HOST_OS); output.push_str(" "); } - println!("{}", output.trim_right()); + println!("{}", output.trim_end()); 0 } diff --git a/src/uucore/Cargo.toml b/src/uucore/Cargo.toml index 578c9eb3b..faba36a54 100644 --- a/src/uucore/Cargo.toml +++ b/src/uucore/Cargo.toml @@ -11,6 +11,9 @@ time = { version = "0.1.40", optional = true } data-encoding = { version = "^2.1", optional = true } libc = { version = "0.2.42", optional = true } wild = "2.0.1" +nix = { version = "0.13", optional = true } +lazy_static = { version = "1.3", optional = true } +platform-info = { version = "0.0.1", optional = true } [target.'cfg(target_os = "redox")'.dependencies] termion = "1.5" @@ -25,6 +28,7 @@ utmpx = ["time", "libc"] process = ["libc"] signals = [] entries = ["libc"] +zero-copy = ["nix", "libc", "lazy_static", "platform-info"] wide = [] default = [] diff --git a/src/uucore/lib.rs b/src/uucore/lib.rs index dc8c3f904..58e7ff261 100644 --- a/src/uucore/lib.rs +++ b/src/uucore/lib.rs @@ -13,6 +13,13 @@ extern crate failure; #[cfg(feature = "failure_derive")] #[macro_use] extern crate failure_derive; +#[cfg(feature = "nix")] +extern crate nix; +#[cfg(all(feature = "lazy_static", target_os = "linux"))] +#[macro_use] +extern crate lazy_static; +#[cfg(feature = "platform-info")] +extern crate platform_info; #[macro_use] mod macros; @@ -40,5 +47,8 @@ pub mod process; #[cfg(all(unix, not(target_os = "fuchsia"), feature = "signals"))] pub mod signals; +#[cfg(feature = "zero-copy")] +pub mod zero_copy; + #[cfg(all(windows, feature = "wide"))] pub mod wide; diff --git a/src/uucore/mode.rs b/src/uucore/mode.rs index 7a08652db..26e237a7b 100644 --- a/src/uucore/mode.rs +++ b/src/uucore/mode.rs @@ -10,7 +10,7 @@ use std::error::Error; pub fn parse_numeric(fperm: u32, mut mode: &str) -> Result { let (op, pos) = parse_op(mode, Some('='))?; - mode = mode[pos..].trim_left_matches('0'); + mode = mode[pos..].trim_start_matches('0'); if mode.len() > 4 { Err(format!("mode is too large ({} > 7777)", mode)) } else { diff --git a/src/uucore/zero_copy/mod.rs b/src/uucore/zero_copy/mod.rs new file mode 100644 index 000000000..70e19a776 --- /dev/null +++ b/src/uucore/zero_copy/mod.rs @@ -0,0 +1,139 @@ +use self::platform::*; + +use std::io::{self, Write}; + +mod platform; + +pub trait AsRawObject { + fn as_raw_object(&self) -> RawObject; +} + +pub trait FromRawObject : Sized { + unsafe fn from_raw_object(obj: RawObject) -> Option; +} + +// TODO: also make a SpliceWriter that takes an input fd and and output fd and uses splice() to +// transfer data +// TODO: make a TeeWriter or something that takes an input fd and two output fds and uses tee() to +// transfer to both output fds + +enum InnerZeroCopyWriter { + Platform(PlatformZeroCopyWriter), + Standard(T), +} + +impl Write for InnerZeroCopyWriter { + fn write(&mut self, buf: &[u8]) -> io::Result { + match self { + InnerZeroCopyWriter::Platform(ref mut writer) => writer.write(buf), + InnerZeroCopyWriter::Standard(ref mut writer) => writer.write(buf), + } + } + + fn flush(&mut self) -> io::Result<()> { + match self { + InnerZeroCopyWriter::Platform(ref mut writer) => writer.flush(), + InnerZeroCopyWriter::Standard(ref mut writer) => writer.flush(), + } + } +} + +pub struct ZeroCopyWriter { + /// This field is never used, but we need it to drop file descriptors + #[allow(dead_code)] + raw_obj_owner: Option, + + inner: InnerZeroCopyWriter, +} + +struct TransformContainer<'a, A: Write + AsRawObject + Sized, B: Write + Sized> { + /// This field is never used and probably could be converted into PhantomData, but might be + /// useful for restructuring later (at the moment it's basically left over from an earlier + /// design) + #[allow(dead_code)] + original: Option<&'a mut A>, + + transformed: Option, +} + +impl<'a, A: Write + AsRawObject + Sized, B: Write + Sized> Write for TransformContainer<'a, A, B> { + fn write(&mut self, bytes: &[u8]) -> io::Result { + self.transformed.as_mut().unwrap().write(bytes) + } + + fn flush(&mut self) -> io::Result<()> { + self.transformed.as_mut().unwrap().flush() + } +} + +impl<'a, A: Write + AsRawObject + Sized, B: Write + Sized> AsRawObject for TransformContainer<'a, A, B> { + fn as_raw_object(&self) -> RawObject { + panic!("Test should never be used") + } +} + +impl ZeroCopyWriter { + pub fn new(writer: T) -> Self { + let raw_obj = writer.as_raw_object(); + match unsafe { PlatformZeroCopyWriter::new(raw_obj) } { + Ok(inner) => { + ZeroCopyWriter { + raw_obj_owner: Some(writer), + inner: InnerZeroCopyWriter::Platform(inner), + } + } + _ => { + // creating the splice writer failed for whatever reason, so just make a default + // writer + ZeroCopyWriter { + raw_obj_owner: None, + inner: InnerZeroCopyWriter::Standard(writer), + } + } + } + } + + pub fn with_default<'a: 'b, 'b, F, W>(writer: &'a mut T, func: F) -> ZeroCopyWriter + where + F: Fn(&'a mut T) -> W, + W: Write + Sized + 'b, + { + let raw_obj = writer.as_raw_object(); + match unsafe { PlatformZeroCopyWriter::new(raw_obj) } { + Ok(inner) => { + ZeroCopyWriter { + raw_obj_owner: Some(TransformContainer { original: Some(writer), transformed: None, }), + inner: InnerZeroCopyWriter::Platform(inner), + } + } + _ => { + // XXX: should func actually consume writer and leave it up to the user to save the value? + // maybe provide a default stdin method then? in some cases it would make more sense for the + // value to be consumed + let real_writer = func(writer); + ZeroCopyWriter { + raw_obj_owner: None, + inner: InnerZeroCopyWriter::Standard(TransformContainer { original: None, transformed: Some(real_writer) }), + } + } + } + } + + // XXX: unsure how to get something like this working without allocating, so not providing it + /*pub fn stdout() -> ZeroCopyWriter { + let mut stdout = io::stdout(); + ZeroCopyWriter::with_default(&mut stdout, |stdout| { + stdout.lock() + }) + }*/ +} + +impl Write for ZeroCopyWriter { + fn write(&mut self, buf: &[u8]) -> io::Result { + self.inner.write(buf) + } + + fn flush(&mut self) -> io::Result<()> { + self.inner.flush() + } +} diff --git a/src/uucore/zero_copy/platform/default.rs b/src/uucore/zero_copy/platform/default.rs new file mode 100644 index 000000000..9d158522c --- /dev/null +++ b/src/uucore/zero_copy/platform/default.rs @@ -0,0 +1,21 @@ +use crate::zero_copy::RawObject; + +use std::io::{self, Write}; + +pub struct PlatformZeroCopyWriter; + +impl PlatformZeroCopyWriter { + pub unsafe fn new(_obj: RawObject) -> Result { + Err(()) + } +} + +impl Write for PlatformZeroCopyWriter { + fn write(&mut self, _bytes: &[u8]) -> io::Result { + panic!("should never occur") + } + + fn flush(&mut self) -> io::Result<()> { + panic!("should never occur") + } +} diff --git a/src/uucore/zero_copy/platform/linux.rs b/src/uucore/zero_copy/platform/linux.rs new file mode 100644 index 000000000..7de9c99ab --- /dev/null +++ b/src/uucore/zero_copy/platform/linux.rs @@ -0,0 +1,105 @@ +use std::io::{self, Write}; +use std::os::unix::io::RawFd; + +use libc::{O_APPEND, S_IFIFO, S_IFREG}; +use nix::errno::Errno; +use nix::fcntl::{fcntl, splice, vmsplice, FcntlArg, SpliceFFlags}; +use nix::sys::uio::IoVec; +use nix::sys::stat::{fstat, FileStat}; +use nix::unistd::pipe; +use platform_info::{Uname, PlatformInfo}; + +use crate::zero_copy::{FromRawObject, RawObject}; + +lazy_static! { + static ref IN_WSL: bool = { + let info = PlatformInfo::new().unwrap(); + info.release().contains("Microsoft") + }; +} + +pub struct PlatformZeroCopyWriter { + raw_obj: RawObject, + read_pipe: RawFd, + write_pipe: RawFd, + write_fn: fn(&mut PlatformZeroCopyWriter, &[IoVec<&[u8]>], usize) -> io::Result, +} + +impl PlatformZeroCopyWriter { + pub unsafe fn new(raw_obj: RawObject) -> nix::Result { + if *IN_WSL { + // apparently WSL hasn't implemented vmsplice(), causing writes to fail + // thus, we will just say zero-copy doesn't work there rather than working + // around it + return Err(nix::Error::from(Errno::EOPNOTSUPP)) + } + + let stat_info: FileStat = fstat(raw_obj)?; + let access_mode: libc::c_int = fcntl(raw_obj, FcntlArg::F_GETFL)?; + + let is_regular = (stat_info.st_mode & S_IFREG) != 0; + let is_append = (access_mode & O_APPEND) != 0; + let is_fifo = (stat_info.st_mode & S_IFIFO) != 0; + + if is_regular && !is_append { + let (read_pipe, write_pipe) = pipe()?; + + Ok(PlatformZeroCopyWriter { + raw_obj, + read_pipe, + write_pipe, + write_fn: write_regular, + }) + } else if is_fifo { + Ok(PlatformZeroCopyWriter { + raw_obj, + read_pipe: Default::default(), + write_pipe: Default::default(), + write_fn: write_fifo, + }) + } else { + // FIXME: how to error? + Err(nix::Error::from(Errno::UnknownErrno)) + } + } +} + +impl FromRawObject for PlatformZeroCopyWriter { + unsafe fn from_raw_object(obj: RawObject) -> Option { + PlatformZeroCopyWriter::new(obj).ok() + } +} + +impl Write for PlatformZeroCopyWriter { + fn write(&mut self, buf: &[u8]) -> io::Result { + let iovec = &[IoVec::from_slice(buf)]; + + let func = self.write_fn; + func(self, iovec, buf.len()) + } + + fn flush(&mut self) -> io::Result<()> { + // XXX: not sure if we need anything else + Ok(()) + } +} + +fn write_regular(writer: &mut PlatformZeroCopyWriter, iovec: &[IoVec<&[u8]>], len: usize) -> io::Result { + vmsplice(writer.write_pipe, iovec, SpliceFFlags::empty()) + .and_then(|_| + splice( + writer.read_pipe, + None, + writer.raw_obj, + None, + len, + SpliceFFlags::empty() + ) + ) + .map_err(|_| io::Error::last_os_error()) +} + +fn write_fifo(writer: &mut PlatformZeroCopyWriter, iovec: &[IoVec<&[u8]>], _len: usize) -> io::Result { + vmsplice(writer.raw_obj, iovec, SpliceFFlags::empty()) + .map_err(|_| io::Error::last_os_error()) +} diff --git a/src/uucore/zero_copy/platform/mod.rs b/src/uucore/zero_copy/platform/mod.rs new file mode 100644 index 000000000..039b94b00 --- /dev/null +++ b/src/uucore/zero_copy/platform/mod.rs @@ -0,0 +1,21 @@ +#[cfg(unix)] +pub use self::unix::*; +#[cfg(any(target_os = "linux", target_os = "android"))] +pub use self::linux::*; +#[cfg(windows)] +pub use self::windows::*; + +// Add any operating systems we support here +#[cfg(not(any(target_os = "linux", target_os = "android")))] +pub use self::default::*; + +#[cfg(unix)] +mod unix; +#[cfg(any(target_os = "linux", target_os = "android"))] +mod linux; +#[cfg(windows)] +mod windows; + +// Add any operating systems we support here +#[cfg(not(any(target_os = "linux", target_os = "android")))] +mod default; diff --git a/src/uucore/zero_copy/platform/unix.rs b/src/uucore/zero_copy/platform/unix.rs new file mode 100644 index 000000000..0a6fd7e24 --- /dev/null +++ b/src/uucore/zero_copy/platform/unix.rs @@ -0,0 +1,18 @@ +use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; + +use crate::zero_copy::{AsRawObject, FromRawObject}; + +pub type RawObject = RawFd; + +impl AsRawObject for T { + fn as_raw_object(&self) -> RawObject { + self.as_raw_fd() + } +} + +// FIXME: check if this works right +impl FromRawObject for T { + unsafe fn from_raw_object(obj: RawObject) -> Option { + Some(T::from_raw_fd(obj)) + } +} diff --git a/src/uucore/zero_copy/platform/windows.rs b/src/uucore/zero_copy/platform/windows.rs new file mode 100644 index 000000000..745607267 --- /dev/null +++ b/src/uucore/zero_copy/platform/windows.rs @@ -0,0 +1,19 @@ +use std::os::windows::io::{AsRawHandle, FromRawHandle, RawHandle}; + +use crate::zero_copy::{AsRawObject, FromRawObject}; + +pub type RawObject = RawHandle; + +impl AsRawObject for T { + fn as_raw_object(&self) -> RawObject { + self.as_raw_handle() + } +} + +impl FromRawObject for T { + unsafe fn from_raw_object(obj: RawObject) -> Option { + Some(T::from_raw_handle(obj)) + } +} + +// TODO: see if there's some zero-copy stuff in Windows diff --git a/src/wc/wc.rs b/src/wc/wc.rs index d96682c11..db1ee0ebd 100644 --- a/src/wc/wc.rs +++ b/src/wc/wc.rs @@ -144,7 +144,7 @@ fn wc(files: Vec, settings: &Settings) -> StdResult<(), i32> { let mut max_width: usize = 0; for path in &files { - let mut reader = try!(open(&path[..])); + let mut reader = open(&path[..])?; let mut line_count: usize = 0; let mut word_count: usize = 0; diff --git a/src/who/who.rs b/src/who/who.rs index 83780edbd..99f0cb9a0 100644 --- a/src/who/who.rs +++ b/src/who/who.rs @@ -31,7 +31,7 @@ static LONG_HELP: &str = " -m only hostname and user associated with stdin -p, --process print active processes spawned by init -q, --count all login names and number of users logged on - -r, --runlevel print current runlevel + -r, --runlevel print current runlevel (not available on BSDs) -s, --short print only name, line, and time (default) -t, --time print last system clock change -T, -w, --mesg add user's message status as +, - or ? @@ -60,6 +60,7 @@ pub fn uumain(args: Vec) -> i32 { "count", "all login names and number of users logged on", ); + #[cfg(any(target_os = "macos", target_os = "ios", target_os = "linux", target_os = "android"))] opts.optflag("r", "runlevel", "print current runlevel"); opts.optflag("s", "short", "print only name, line, and time (default)"); opts.optflag("t", "time", "print last system clock change"); @@ -281,7 +282,7 @@ fn current_tty() -> String { if !res.is_null() { CStr::from_ptr(res as *const _) .to_string_lossy() - .trim_left_matches("/dev/") + .trim_start_matches("/dev/") .to_owned() } else { "".to_owned() @@ -291,6 +292,17 @@ fn current_tty() -> String { impl Who { fn exec(&mut self) { + let run_level_chk = |record: i16| { + #[allow(unused_assignments)] + let mut res = false; + + #[cfg(any(target_os = "macos", target_os = "ios", target_os = "linux", target_os = "android"))] + { + res = record == utmpx::RUN_LVL; + } + res + }; + let f = if self.args.len() == 1 { self.args[0].as_ref() } else { @@ -321,7 +333,7 @@ impl Who { if !self.my_line_only || cur_tty == ut.tty_device() { if self.need_users && ut.is_user_process() { self.print_user(&ut); - } else if self.need_runlevel && ut.record_type() == utmpx::RUN_LVL { + } else if self.need_runlevel && run_level_chk(ut.record_type()) { self.print_runlevel(&ut); } else if self.need_boottime && ut.record_type() == utmpx::BOOT_TIME { self.print_boottime(&ut); @@ -510,7 +522,7 @@ impl Who { if self.include_exit { buf.push_str(&format!(" {:<12}", exit)); } - println!("{}", buf.trim_right()); + println!("{}", buf.trim_end()); } #[inline] diff --git a/src/yes/Cargo.toml b/src/yes/Cargo.toml index a45e8722e..5ae7a41be 100644 --- a/src/yes/Cargo.toml +++ b/src/yes/Cargo.toml @@ -11,7 +11,7 @@ path = "yes.rs" [dependencies] clap = "2.32" -uucore = { path = "../uucore" } +uucore = { path = "../uucore", features = ["zero-copy"] } [features] latency = [] diff --git a/src/yes/yes.rs b/src/yes/yes.rs index a153222ba..b8e7971fd 100644 --- a/src/yes/yes.rs +++ b/src/yes/yes.rs @@ -17,6 +17,7 @@ extern crate clap; extern crate uucore; use clap::Arg; +use uucore::zero_copy::ZeroCopyWriter; use std::borrow::Cow; use std::io::{self, Write}; @@ -83,9 +84,10 @@ fn prepare_buffer<'a>(input: &'a str, _buffer: &'a mut [u8; BUF_SIZE]) -> &'a [u } pub fn exec(bytes: &[u8]) { - let stdout_raw = io::stdout(); - let mut stdout = stdout_raw.lock(); + let mut stdin_raw = io::stdout(); + let mut writer = ZeroCopyWriter::with_default(&mut stdin_raw, |stdin| stdin.lock()); loop { - stdout.write_all(bytes).unwrap(); + // TODO: needs to check if pipe fails + writer.write_all(bytes).unwrap(); } } diff --git a/tests/common/util.rs b/tests/common/util.rs old mode 100755 new mode 100644 index 1467e5135..43e83f1e6 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -110,8 +110,8 @@ impl CmdResult { /// stderr_only is a better choice unless stdout may or will be non-empty pub fn stderr_is>(&self, msg: T) -> Box<&CmdResult> { assert_eq!( - String::from(msg.as_ref()).trim_right(), - self.stderr.trim_right() + String::from(msg.as_ref()).trim_end(), + self.stderr.trim_end() ); Box::new(self) } @@ -162,16 +162,16 @@ pub fn log_info, U: AsRef>(msg: T, par: U) { } pub fn recursive_copy(src: &Path, dest: &Path) -> Result<()> { - if try!(fs::metadata(src)).is_dir() { + if fs::metadata(src)?.is_dir() { for entry in try!(fs::read_dir(src)) { - let entry = try!(entry); + let entry = entry?; let mut new_dest = PathBuf::from(dest); new_dest.push(entry.file_name()); - if try!(fs::metadata(entry.path())).is_dir() { - try!(fs::create_dir(&new_dest)); - try!(recursive_copy(&entry.path(), &new_dest)); + if fs::metadata(entry.path())?.is_dir() { + fs::create_dir(&new_dest)?; + recursive_copy(&entry.path(), &new_dest)?; } else { - try!(fs::copy(&entry.path(), new_dest)); + fs::copy(&entry.path(), new_dest)?; } } } diff --git a/tests/test_chown.rs b/tests/test_chown.rs index 0f7124391..24a040414 100644 --- a/tests/test_chown.rs +++ b/tests/test_chown.rs @@ -17,10 +17,10 @@ mod test_passgrp { #[test] fn test_grp2gid() { - if cfg!(target_os = "macos") { - assert_eq!(0, grp2gid("wheel").unwrap()); + if cfg!(target_os = "linux") || cfg!(target_os = "android") || cfg!(target_os = "windows") { + assert_eq!(0, grp2gid("root").unwrap()) } else { - assert_eq!(0, grp2gid("root").unwrap()); + assert_eq!(0, grp2gid("wheel").unwrap()); } assert!(grp2gid("88888888").is_err()); assert!(grp2gid("agroupthatdoesntexist").is_err()); @@ -34,10 +34,10 @@ mod test_passgrp { #[test] fn test_gid2grp() { - if cfg!(target_os = "macos") { - assert_eq!("wheel", gid2grp(0).unwrap()); - } else { + if cfg!(target_os = "linux") || cfg!(target_os = "android") || cfg!(target_os = "windows") { assert_eq!("root", gid2grp(0).unwrap()); + } else { + assert_eq!("wheel", gid2grp(0).unwrap()); } assert!(gid2grp(88888888).is_err()); } diff --git a/util/rewrite_rules.rs b/util/rewrite_rules.rs new file mode 100644 index 000000000..6aba8166c --- /dev/null +++ b/util/rewrite_rules.rs @@ -0,0 +1,18 @@ +//! Rules to update the codebase using Rerast + +/// Converts try!() to ? +fn try_to_question_mark>(r: Result) -> Result { + replace!(try!(r) => r?); + unreachable!() +} + +fn trim_left_to_start(s: &str) { + replace!(s.trim_left() => s.trim_start()); + replace!(s.trim_right() => s.trim_end()); +} + +fn trim_left_matches_to_start bool>(s: &str, inner: P) { + replace!(s.trim_left_matches(inner) => s.trim_start_matches(inner)); + replace!(s.trim_right_matches(inner) => s.trim_end_matches(inner)); +} +