diff --git a/Cargo.lock b/Cargo.lock index ae89e4184..4ee7ae042 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,7 +38,7 @@ name = "arch" version = "0.0.1" dependencies = [ "platform-info 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -46,7 +46,7 @@ name = "atty" 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)", + "libc 0.2.54 (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)", ] @@ -64,7 +64,7 @@ dependencies = [ "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)", + "libc 0.2.54 (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)", ] @@ -75,7 +75,7 @@ version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "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)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -83,21 +83,21 @@ name = "base32" version = "0.0.1" dependencies = [ "clippy 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "base64" version = "0.0.1" dependencies = [ - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "basename" version = "0.0.1" dependencies = [ - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -154,8 +154,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.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 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -165,7 +165,7 @@ version = "0.0.1" dependencies = [ "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "unix_socket 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -182,7 +182,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "chgrp" version = "0.0.1" dependencies = [ - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -190,8 +190,8 @@ dependencies = [ name = "chmod" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "walker 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -201,7 +201,7 @@ version = "0.0.1" 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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -220,15 +220,15 @@ name = "chroot" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cksum" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -274,8 +274,8 @@ dependencies = [ "quine-mc_cluskey 0.2.4 (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.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 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.91 (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)", @@ -294,8 +294,8 @@ name = "comm" version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -307,9 +307,9 @@ dependencies = [ "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)", + "libc 0.2.54 (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", + "uucore 0.0.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)", @@ -393,7 +393,7 @@ dependencies = [ name = "cut" version = "0.0.1" dependencies = [ - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -407,7 +407,7 @@ version = "0.0.1" dependencies = [ "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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -423,15 +423,15 @@ name = "dircolors" version = "0.0.1" dependencies = [ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "dirname" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -439,14 +439,14 @@ name = "du" version = "0.0.1" dependencies = [ "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "echo" version = "0.0.1" dependencies = [ - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -458,9 +458,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "env" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rust-ini 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -477,16 +477,16 @@ version = "0.0.1" dependencies = [ "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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "expr" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "onig 4.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -494,7 +494,7 @@ name = "factor" version = "0.0.1" dependencies = [ "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -511,9 +511,9 @@ name = "failure_derive" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (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)", + "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -526,7 +526,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "false" version = "0.0.1" dependencies = [ - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -535,7 +535,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "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)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -543,9 +543,9 @@ dependencies = [ name = "fmt" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -557,7 +557,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "fold" version = "0.0.1" dependencies = [ - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -591,7 +591,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "groups" version = "0.0.1" dependencies = [ - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -606,22 +606,22 @@ dependencies = [ "digest 0.6.2 (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)", + "libc 0.2.54 (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)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "head" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -633,8 +633,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "hostid" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -642,8 +642,8 @@ name = "hostname" version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -651,7 +651,7 @@ dependencies = [ name = "id" version = "0.0.1" dependencies = [ - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -674,9 +674,9 @@ name = "install" version = "0.0.1" dependencies = [ "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)", + "libc 0.2.54 (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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -702,7 +702,7 @@ name = "join" version = "0.0.1" dependencies = [ "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -718,8 +718,8 @@ dependencies = [ name = "kill" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -729,7 +729,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.53" +version = "0.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -738,32 +738,32 @@ version = "0.0.1" dependencies = [ "cpp 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "cpp_build 0.4.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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "link" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ln" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "logname" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -777,7 +777,7 @@ dependencies = [ "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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -795,7 +795,7 @@ name = "memchr" version = "1.0.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)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -808,8 +808,8 @@ name = "mkdir" version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -817,8 +817,8 @@ name = "mkfifo" version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -826,8 +826,8 @@ name = "mknod" version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -837,7 +837,7 @@ dependencies = [ "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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -848,7 +848,7 @@ dependencies = [ "nix 0.8.1 (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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -856,7 +856,7 @@ name = "mv" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -864,8 +864,8 @@ name = "nice" version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -875,7 +875,7 @@ 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.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -887,7 +887,7 @@ 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)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -897,11 +897,11 @@ version = "0.0.1" dependencies = [ "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)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 1.0.2 (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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -914,8 +914,8 @@ name = "nohup" version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -923,9 +923,9 @@ name = "nproc" version = "0.0.1" dependencies = [ "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)", + "libc 0.2.54 (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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -946,7 +946,7 @@ name = "num_cpus" 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)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -962,7 +962,7 @@ name = "numfmt" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -977,8 +977,8 @@ dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -988,7 +988,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "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)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "onig_sys 69.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1006,7 +1006,7 @@ name = "paste" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1014,8 +1014,8 @@ name = "pathchk" version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1027,7 +1027,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "pinky" version = "0.0.1" dependencies = [ - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1040,7 +1040,7 @@ name = "platform-info" 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)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1049,7 +1049,7 @@ name = "printenv" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1057,12 +1057,12 @@ name = "printf" version = "0.0.1" dependencies = [ "itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "proc-macro2" -version = "0.4.29" +version = "0.4.30" 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)", @@ -1074,11 +1074,11 @@ version = "0.0.1" dependencies = [ "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)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 1.0.2 (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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1095,7 +1095,7 @@ name = "pwd" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1118,7 +1118,7 @@ name = "quote" version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1126,7 +1126,7 @@ name = "rand" version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1136,7 +1136,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" 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)", + "libc 0.2.54 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1149,7 +1149,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "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)", + "libc 0.2.54 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1160,12 +1160,12 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "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)", @@ -1212,10 +1212,10 @@ dependencies = [ [[package]] name = "rand_jitter" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1227,7 +1227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "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)", + "libc 0.2.54 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1263,8 +1263,8 @@ name = "readlink" version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1272,7 +1272,7 @@ name = "realpath" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1313,7 +1313,7 @@ name = "relpath" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1330,7 +1330,7 @@ version = "0.0.1" dependencies = [ "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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1339,7 +1339,7 @@ name = "rmdir" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1352,7 +1352,7 @@ name = "rust-users" version = "0.6.0" source = "git+https://github.com/uutils/rust-users#e64253f2b995e7f1a458c68a7eca66e0171d183a" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1387,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.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1400,22 +1400,22 @@ name = "seq" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde" -version = "1.0.90" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.90" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (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)", + "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1425,7 +1425,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "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)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1462,10 +1462,10 @@ version = "0.0.1" dependencies = [ "filetime 0.2.5 (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)", + "libc 0.2.54 (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)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1474,7 +1474,7 @@ version = "0.0.1" dependencies = [ "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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1482,7 +1482,7 @@ name = "sleep" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1497,7 +1497,7 @@ dependencies = [ "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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1505,7 +1505,7 @@ name = "split" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1514,7 +1514,7 @@ version = "0.0.1" dependencies = [ "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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1524,7 +1524,7 @@ dependencies = [ "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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1537,15 +1537,15 @@ name = "sum" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "syn" -version = "0.15.33" +version = "0.15.34" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (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)", ] @@ -1556,8 +1556,8 @@ version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1566,9 +1566,9 @@ name = "synstructure" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30 (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)", + "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1577,7 +1577,7 @@ name = "tac" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1586,9 +1586,9 @@ version = "0.0.1" dependencies = [ "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)", + "libc 0.2.54 (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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1597,8 +1597,8 @@ name = "tee" version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1616,7 +1616,7 @@ version = "2.2.0" 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)", + "libc 0.2.54 (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)", @@ -1635,7 +1635,7 @@ name = "termion" 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)", + "libc 0.2.54 (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)", @@ -1648,7 +1648,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "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)", + "libc 0.2.54 (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)", ] @@ -1657,9 +1657,9 @@ dependencies = [ name = "test" version = "0.0.1" dependencies = [ - "libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1683,7 +1683,7 @@ name = "time" 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)", + "libc 0.2.54 (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)", ] @@ -1693,9 +1693,9 @@ name = "timeout" version = "0.0.1" dependencies = [ "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)", + "libc 0.2.54 (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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1703,7 +1703,7 @@ name = "toml" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1713,7 +1713,7 @@ dependencies = [ "filetime 0.2.5 (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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1723,14 +1723,14 @@ dependencies = [ "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.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "true" version = "0.0.1" dependencies = [ - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1738,7 +1738,7 @@ name = "truncate" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1746,7 +1746,7 @@ name = "tsort" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1754,8 +1754,8 @@ name = "tty" version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1774,7 +1774,7 @@ version = "0.0.1" dependencies = [ "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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1783,7 +1783,7 @@ version = "0.0.1" dependencies = [ "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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1827,7 +1827,7 @@ name = "uniq" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1836,7 +1836,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "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)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1844,8 +1844,8 @@ name = "unlink" version = "0.0.1" dependencies = [ "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", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1854,7 +1854,7 @@ version = "0.0.1" dependencies = [ "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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1872,7 +1872,7 @@ name = "users" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1883,13 +1883,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "uucore" version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "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)", + "libc 0.2.54 (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)", @@ -1937,7 +1938,7 @@ dependencies = [ "join 0.0.1", "kill 0.0.1", "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)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "link 0.0.1", "ln 0.0.1", "logname 0.0.1", @@ -2000,7 +2001,7 @@ dependencies = [ "unlink 0.0.1", "uptime 0.0.1", "users 0.0.1", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "wc 0.0.1", "who 0.0.1", "whoami 0.0.1", @@ -2037,7 +2038,7 @@ name = "wc" version = "0.0.1" dependencies = [ "getopts 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2045,7 +2046,7 @@ name = "who" version = "0.0.1" dependencies = [ "clippy 0.0.212 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2054,7 +2055,7 @@ version = "0.0.1" dependencies = [ "advapi32-sys 0.2.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", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2108,7 +2109,7 @@ name = "xattr" 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)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2116,7 +2117,7 @@ name = "yes" version = "0.0.1" dependencies = [ "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "uucore 0.0.1", + "uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] @@ -2173,7 +2174,7 @@ dependencies = [ "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 libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)" = "c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6" "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" @@ -2191,7 +2192,7 @@ dependencies = [ "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "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 proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" "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" @@ -2206,7 +2207,7 @@ dependencies = [ "checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" +"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" "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" @@ -2224,15 +2225,15 @@ dependencies = [ "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.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 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "a72e9b96fa45ce22a4bc23da3858dfccfd60acd28a25bcd328a98fdd6bea43fd" +"checksum serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "101b495b109a3e3ca8c4cbe44cf62391527cdfb6ba15821c5ce80bcd5ea23f9f" "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 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 syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)" = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe" "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" @@ -2254,6 +2255,7 @@ dependencies = [ "checksum unix_socket 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aa2700417c405c38f5e6902d699345241c28c0b7ade4abaad71e35a87eb1564" "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 uucore 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d9991e24be65c5df85c9f16445554785a68e5ae7ec7feb230424ba35c24ebad7" "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.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" diff --git a/Cargo.toml b/Cargo.toml index c18c61562..8c5f497e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -157,7 +157,7 @@ default = ["unix"] [workspace] [dependencies] -uucore = { path="src/uucore" } +uucore = "0.0.1" arch = { optional=true, path="src/arch" } base32 = { optional=true, path="src/base32" } base64 = { optional=true, path="src/base64" } diff --git a/src/arch/Cargo.toml b/src/arch/Cargo.toml index f438686bc..d009a09c4 100644 --- a/src/arch/Cargo.toml +++ b/src/arch/Cargo.toml @@ -10,7 +10,7 @@ path = "arch.rs" [dependencies] platform-info = "0.0.1" -uucore = { path = "../uucore" } +uucore = "0.0.1" [[bin]] name = "arch" diff --git a/src/base32/Cargo.toml b/src/base32/Cargo.toml index 28fb1d45d..75b25454b 100644 --- a/src/base32/Cargo.toml +++ b/src/base32/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_base32" path = "base32.rs" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["encoding"] [dependencies.clippy] diff --git a/src/base64/Cargo.toml b/src/base64/Cargo.toml index dc25dea95..63b82b4ec 100644 --- a/src/base64/Cargo.toml +++ b/src/base64/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_base64" path = "base64.rs" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["encoding"] [[bin]] diff --git a/src/basename/Cargo.toml b/src/basename/Cargo.toml index 9b0ed2a8b..1e3cb7adc 100644 --- a/src/basename/Cargo.toml +++ b/src/basename/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_basename" path = "basename.rs" [dependencies] -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "basename" diff --git a/src/cat/Cargo.toml b/src/cat/Cargo.toml index 584fbdbed..e4a37d1f7 100644 --- a/src/cat/Cargo.toml +++ b/src/cat/Cargo.toml @@ -12,7 +12,7 @@ path = "cat.rs" quick-error = "1.2.2" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["fs"] [target.'cfg(unix)'.dependencies] diff --git a/src/chgrp/Cargo.toml b/src/chgrp/Cargo.toml index 497b0742c..c62b827ce 100644 --- a/src/chgrp/Cargo.toml +++ b/src/chgrp/Cargo.toml @@ -12,7 +12,7 @@ path = "chgrp.rs" walkdir = "2.1.4" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["entries", "fs"] [[bin]] diff --git a/src/chmod/Cargo.toml b/src/chmod/Cargo.toml index 069c34502..0df9d54a8 100644 --- a/src/chmod/Cargo.toml +++ b/src/chmod/Cargo.toml @@ -13,7 +13,7 @@ libc = "0.2.42" walker = "1.0.0" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["mode"] [[bin]] diff --git a/src/chown/Cargo.toml b/src/chown/Cargo.toml index 1f1f07d4c..c75d4cdb9 100644 --- a/src/chown/Cargo.toml +++ b/src/chown/Cargo.toml @@ -13,7 +13,7 @@ glob = "0.2.11" walkdir = "2.1" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["entries", "fs"] [dependencies.clippy] diff --git a/src/chroot/Cargo.toml b/src/chroot/Cargo.toml index cff9a7c5f..6fd893277 100644 --- a/src/chroot/Cargo.toml +++ b/src/chroot/Cargo.toml @@ -12,7 +12,7 @@ path = "chroot.rs" getopts = "0.2.18" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["entries"] [[bin]] diff --git a/src/cksum/Cargo.toml b/src/cksum/Cargo.toml index d1f1ea7bf..f608e4396 100644 --- a/src/cksum/Cargo.toml +++ b/src/cksum/Cargo.toml @@ -9,7 +9,7 @@ path = "cksum.rs" [dependencies] libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "cksum" diff --git a/src/comm/Cargo.toml b/src/comm/Cargo.toml index 0e85dbcd0..6ddb78f3e 100644 --- a/src/comm/Cargo.toml +++ b/src/comm/Cargo.toml @@ -11,7 +11,7 @@ path = "comm.rs" [dependencies] libc = "0.2.42" getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "comm" diff --git a/src/cp/Cargo.toml b/src/cp/Cargo.toml index 0dbc72fe5..bca17c17a 100644 --- a/src/cp/Cargo.toml +++ b/src/cp/Cargo.toml @@ -20,7 +20,7 @@ quick-error = "1.2.2" filetime = "0.2" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["fs"] [target.'cfg(target_os = "linux")'.dependencies] diff --git a/src/cut/Cargo.toml b/src/cut/Cargo.toml index 90c9ec5d2..97d4ade2b 100644 --- a/src/cut/Cargo.toml +++ b/src/cut/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_cut" path = "cut.rs" [dependencies] -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "cut" diff --git a/src/date/Cargo.toml b/src/date/Cargo.toml index 64cc992aa..29b66ded3 100644 --- a/src/date/Cargo.toml +++ b/src/date/Cargo.toml @@ -11,7 +11,7 @@ path = "date.rs" [dependencies] chrono = "0.4.4" clap = "2.32.0" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "date" diff --git a/src/dircolors/Cargo.toml b/src/dircolors/Cargo.toml index 9acc2f8a6..9d39df0e6 100644 --- a/src/dircolors/Cargo.toml +++ b/src/dircolors/Cargo.toml @@ -10,7 +10,7 @@ path = "dircolors.rs" [dependencies] glob = "0.2.11" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "dircolors" diff --git a/src/dirname/Cargo.toml b/src/dirname/Cargo.toml index 0e4e74d89..746757b48 100644 --- a/src/dirname/Cargo.toml +++ b/src/dirname/Cargo.toml @@ -10,7 +10,7 @@ path = "dirname.rs" [dependencies] libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "dirname" diff --git a/src/du/Cargo.toml b/src/du/Cargo.toml index 2a85ad2a8..8bbbfc869 100644 --- a/src/du/Cargo.toml +++ b/src/du/Cargo.toml @@ -10,7 +10,7 @@ path = "du.rs" [dependencies] time = "0.1.40" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "du" diff --git a/src/echo/Cargo.toml b/src/echo/Cargo.toml index a7095a91c..2c63c3427 100644 --- a/src/echo/Cargo.toml +++ b/src/echo/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_echo" path = "echo.rs" [dependencies] -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "echo" diff --git a/src/env/Cargo.toml b/src/env/Cargo.toml index 33419f8b5..21f8e7ccc 100644 --- a/src/env/Cargo.toml +++ b/src/env/Cargo.toml @@ -10,7 +10,7 @@ path = "env.rs" [dependencies] libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" rust-ini = "0.13.0" [[bin]] diff --git a/src/expand/Cargo.toml b/src/expand/Cargo.toml index c0a17b1c0..ba8f38c59 100644 --- a/src/expand/Cargo.toml +++ b/src/expand/Cargo.toml @@ -11,7 +11,7 @@ path = "expand.rs" [dependencies] unicode-width = "0.1.5" getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "expand" diff --git a/src/expr/Cargo.toml b/src/expr/Cargo.toml index 5d6ce6fde..36529665f 100644 --- a/src/expr/Cargo.toml +++ b/src/expr/Cargo.toml @@ -11,7 +11,7 @@ path = "expr.rs" [dependencies] libc = "0.2.42" onig = "~4.3.2" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "expr" diff --git a/src/factor/Cargo.toml b/src/factor/Cargo.toml index 97d987b4f..e7ba407b5 100644 --- a/src/factor/Cargo.toml +++ b/src/factor/Cargo.toml @@ -9,7 +9,7 @@ path = "factor.rs" [dependencies] rand = "0.5" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "factor" diff --git a/src/false/Cargo.toml b/src/false/Cargo.toml index 89420e51d..9ae600840 100644 --- a/src/false/Cargo.toml +++ b/src/false/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_false" path = "false.rs" [dependencies] -uucore = { path = "../uucore" } +uucore = "0.0.1" [[bin]] name = "false" diff --git a/src/fmt/Cargo.toml b/src/fmt/Cargo.toml index 546ad646d..ce50a9029 100644 --- a/src/fmt/Cargo.toml +++ b/src/fmt/Cargo.toml @@ -11,7 +11,7 @@ path = "fmt.rs" [dependencies] libc = "0.2.42" unicode-width = "0.1.5" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "fmt" diff --git a/src/fold/Cargo.toml b/src/fold/Cargo.toml index 1804bce08..fb004cc16 100644 --- a/src/fold/Cargo.toml +++ b/src/fold/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_fold" path = "fold.rs" [dependencies] -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "fold" diff --git a/src/groups/Cargo.toml b/src/groups/Cargo.toml index 71cf5ac52..3bef6484e 100644 --- a/src/groups/Cargo.toml +++ b/src/groups/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_groups" path = "groups.rs" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["entries"] [[bin]] diff --git a/src/hashsum/Cargo.toml b/src/hashsum/Cargo.toml index e25645d48..28530b256 100644 --- a/src/hashsum/Cargo.toml +++ b/src/hashsum/Cargo.toml @@ -19,7 +19,7 @@ regex-syntax = "0.6.1" sha1 = "0.6.0" sha2 = "0.6.0" sha3 = "0.6.0" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "hashsum" diff --git a/src/head/Cargo.toml b/src/head/Cargo.toml index 571b2d4a6..75d604608 100644 --- a/src/head/Cargo.toml +++ b/src/head/Cargo.toml @@ -10,7 +10,7 @@ path = "head.rs" [dependencies] libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "head" diff --git a/src/hostid/Cargo.toml b/src/hostid/Cargo.toml index 085f1baf3..8414c740b 100644 --- a/src/hostid/Cargo.toml +++ b/src/hostid/Cargo.toml @@ -10,7 +10,7 @@ path = "hostid.rs" [dependencies] libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "hostid" diff --git a/src/hostname/Cargo.toml b/src/hostname/Cargo.toml index d1be95249..7b1497245 100644 --- a/src/hostname/Cargo.toml +++ b/src/hostname/Cargo.toml @@ -12,7 +12,7 @@ path = "hostname.rs" libc = "0.2.42" winapi = { version = "0.3", features = ["sysinfoapi", "winsock2"] } getopts = "0.2" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "hostname" diff --git a/src/id/Cargo.toml b/src/id/Cargo.toml index 784cbfa35..f9aef3e30 100644 --- a/src/id/Cargo.toml +++ b/src/id/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_id" path = "id.rs" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["entries", "process"] [[bin]] diff --git a/src/install/Cargo.toml b/src/install/Cargo.toml index eb250ec1f..d2f8caac0 100644 --- a/src/install/Cargo.toml +++ b/src/install/Cargo.toml @@ -11,7 +11,7 @@ path = "install.rs" [dependencies] getopts = "0.2.18" libc = ">= 0.2" -uucore = { path="../uucore" } +uucore = "0.0.1" [dev-dependencies] time = "0.1.40" diff --git a/src/join/Cargo.toml b/src/join/Cargo.toml index 9455a8790..01980d092 100644 --- a/src/join/Cargo.toml +++ b/src/join/Cargo.toml @@ -10,7 +10,7 @@ path = "join.rs" [dependencies] clap = "2.32.0" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "join" diff --git a/src/kill/Cargo.toml b/src/kill/Cargo.toml index 6a37ebc4f..1b1ebda7b 100644 --- a/src/kill/Cargo.toml +++ b/src/kill/Cargo.toml @@ -12,7 +12,7 @@ path = "kill.rs" libc = "0.2.42" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["signals"] [[bin]] diff --git a/src/link/Cargo.toml b/src/link/Cargo.toml index 1d3be5415..ff523cfdc 100644 --- a/src/link/Cargo.toml +++ b/src/link/Cargo.toml @@ -10,7 +10,7 @@ path = "link.rs" [dependencies] libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "link" diff --git a/src/ln/Cargo.toml b/src/ln/Cargo.toml index 585758e5d..c9fe57a13 100644 --- a/src/ln/Cargo.toml +++ b/src/ln/Cargo.toml @@ -10,7 +10,7 @@ path = "ln.rs" [dependencies] libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "ln" diff --git a/src/logname/Cargo.toml b/src/logname/Cargo.toml index 1391c9814..f81e10fa3 100644 --- a/src/logname/Cargo.toml +++ b/src/logname/Cargo.toml @@ -10,7 +10,7 @@ path = "logname.rs" [dependencies] libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "logname" diff --git a/src/ls/Cargo.toml b/src/ls/Cargo.toml index dbce03fe5..feafa2c8d 100644 --- a/src/ls/Cargo.toml +++ b/src/ls/Cargo.toml @@ -18,7 +18,7 @@ lazy_static = "1.0.1" unicode-width = "0.1.5" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["entries", "fs"] [[bin]] diff --git a/src/mkdir/Cargo.toml b/src/mkdir/Cargo.toml index b41b96400..9bbabbe43 100644 --- a/src/mkdir/Cargo.toml +++ b/src/mkdir/Cargo.toml @@ -11,7 +11,7 @@ path = "mkdir.rs" [dependencies] getopts = "0.2.18" libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "mkdir" diff --git a/src/mkfifo/Cargo.toml b/src/mkfifo/Cargo.toml index 084887b00..555799cf6 100644 --- a/src/mkfifo/Cargo.toml +++ b/src/mkfifo/Cargo.toml @@ -11,7 +11,7 @@ path = "mkfifo.rs" [dependencies] getopts = "0.2.18" libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "mkfifo" diff --git a/src/mknod/Cargo.toml b/src/mknod/Cargo.toml index 154b62547..5d45c7621 100644 --- a/src/mknod/Cargo.toml +++ b/src/mknod/Cargo.toml @@ -11,7 +11,7 @@ path = "mknod.rs" [dependencies] getopts = "0.2.18" libc = "^0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "mknod" diff --git a/src/mktemp/Cargo.toml b/src/mktemp/Cargo.toml index 8a2226793..f2b98733b 100644 --- a/src/mktemp/Cargo.toml +++ b/src/mktemp/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_mktemp" path = "mktemp.rs" [dependencies] -uucore = { path="../uucore" } +uucore = "0.0.1" getopts = "0.2.18" rand = "0.5" tempfile = "2.1.5" diff --git a/src/more/Cargo.toml b/src/more/Cargo.toml index dbc9c3da0..315d8f52d 100644 --- a/src/more/Cargo.toml +++ b/src/more/Cargo.toml @@ -10,7 +10,7 @@ path = "more.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [target.'cfg(target_os = "redox")'.dependencies] redox_termios = "0.1" diff --git a/src/mv/Cargo.toml b/src/mv/Cargo.toml index f7a0391a7..5b60e4579 100644 --- a/src/mv/Cargo.toml +++ b/src/mv/Cargo.toml @@ -10,7 +10,7 @@ path = "mv.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "mv" diff --git a/src/nice/Cargo.toml b/src/nice/Cargo.toml index 8b7882cbb..8401f1032 100644 --- a/src/nice/Cargo.toml +++ b/src/nice/Cargo.toml @@ -11,7 +11,7 @@ path = "nice.rs" [dependencies] getopts = "0.2.18" libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "nice" diff --git a/src/nl/Cargo.toml b/src/nl/Cargo.toml index 77a4cfe2a..0f6c248b3 100644 --- a/src/nl/Cargo.toml +++ b/src/nl/Cargo.toml @@ -15,7 +15,7 @@ aho-corasick = "0.6.5" memchr = "1.0.1" regex = "1.0.1" regex-syntax = "0.6.1" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "nl" diff --git a/src/nohup/Cargo.toml b/src/nohup/Cargo.toml index 8672725d1..0302fa8d7 100644 --- a/src/nohup/Cargo.toml +++ b/src/nohup/Cargo.toml @@ -13,7 +13,7 @@ getopts = "0.2.18" libc = "0.2.42" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["fs"] [[bin]] diff --git a/src/nproc/Cargo.toml b/src/nproc/Cargo.toml index 46e1f9f8f..622309f17 100644 --- a/src/nproc/Cargo.toml +++ b/src/nproc/Cargo.toml @@ -12,7 +12,7 @@ path = "nproc.rs" getopts = "0.2.18" libc = "0.2.42" num_cpus = "1.5" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "nproc" diff --git a/src/numfmt/Cargo.toml b/src/numfmt/Cargo.toml index 8591cc5e3..c56d040f5 100644 --- a/src/numfmt/Cargo.toml +++ b/src/numfmt/Cargo.toml @@ -10,7 +10,7 @@ path = "numfmt.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "numfmt" diff --git a/src/od/Cargo.toml b/src/od/Cargo.toml index 2e9080e3a..e65ea7e0e 100644 --- a/src/od/Cargo.toml +++ b/src/od/Cargo.toml @@ -13,7 +13,7 @@ getopts = "0.2.18" libc = "0.2.42" byteorder = "1.1.0" half = "1.1.1" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "od" diff --git a/src/paste/Cargo.toml b/src/paste/Cargo.toml index df764a259..fb0d70cd2 100644 --- a/src/paste/Cargo.toml +++ b/src/paste/Cargo.toml @@ -10,7 +10,7 @@ path = "paste.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "paste" diff --git a/src/pathchk/Cargo.toml b/src/pathchk/Cargo.toml index 83fac5708..c6303a9cc 100644 --- a/src/pathchk/Cargo.toml +++ b/src/pathchk/Cargo.toml @@ -11,7 +11,7 @@ path = "pathchk.rs" [dependencies] getopts = "0.2.18" libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "pathchk" diff --git a/src/pinky/Cargo.toml b/src/pinky/Cargo.toml index 2bac97232..56c60aecf 100644 --- a/src/pinky/Cargo.toml +++ b/src/pinky/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_pinky" path = "pinky.rs" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["utmpx", "entries"] [[bin]] diff --git a/src/printenv/Cargo.toml b/src/printenv/Cargo.toml index 5d48fd368..36476dbd4 100644 --- a/src/printenv/Cargo.toml +++ b/src/printenv/Cargo.toml @@ -10,7 +10,7 @@ path = "printenv.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "printenv" diff --git a/src/printf/Cargo.toml b/src/printf/Cargo.toml index 791dbb362..901581561 100644 --- a/src/printf/Cargo.toml +++ b/src/printf/Cargo.toml @@ -10,7 +10,7 @@ path = "printf.rs" [dependencies] itertools = "0.7.8" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "printf" diff --git a/src/ptx/Cargo.toml b/src/ptx/Cargo.toml index 0ce945d93..bd67180bf 100644 --- a/src/ptx/Cargo.toml +++ b/src/ptx/Cargo.toml @@ -15,7 +15,7 @@ aho-corasick = "0.6.5" memchr = "1.0.1" regex-syntax = "0.6.1" regex = "1.0.1" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "ptx" diff --git a/src/pwd/Cargo.toml b/src/pwd/Cargo.toml index 3304b452f..a6e29640b 100644 --- a/src/pwd/Cargo.toml +++ b/src/pwd/Cargo.toml @@ -10,7 +10,7 @@ path = "pwd.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "pwd" diff --git a/src/readlink/Cargo.toml b/src/readlink/Cargo.toml index 36a1e87f4..580d0b805 100644 --- a/src/readlink/Cargo.toml +++ b/src/readlink/Cargo.toml @@ -13,7 +13,7 @@ getopts = "0.2.18" libc = "0.2.42" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["fs"] [[bin]] diff --git a/src/realpath/Cargo.toml b/src/realpath/Cargo.toml index 3655467ad..2b1c16a45 100644 --- a/src/realpath/Cargo.toml +++ b/src/realpath/Cargo.toml @@ -12,7 +12,7 @@ path = "realpath.rs" getopts = "0.2.18" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["fs"] [[bin]] diff --git a/src/relpath/Cargo.toml b/src/relpath/Cargo.toml index 2327a009b..0855e0c0f 100644 --- a/src/relpath/Cargo.toml +++ b/src/relpath/Cargo.toml @@ -12,7 +12,7 @@ path = "relpath.rs" getopts = "0.2.18" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["fs"] [[bin]] diff --git a/src/rm/Cargo.toml b/src/rm/Cargo.toml index 883d7ac00..c5f7d37ff 100644 --- a/src/rm/Cargo.toml +++ b/src/rm/Cargo.toml @@ -12,7 +12,7 @@ path = "rm.rs" getopts = "0.2.18" walkdir = "2.1.4" remove_dir_all = "0.5.1" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "rm" diff --git a/src/rmdir/Cargo.toml b/src/rmdir/Cargo.toml index cf7a772db..6f74aae90 100644 --- a/src/rmdir/Cargo.toml +++ b/src/rmdir/Cargo.toml @@ -10,7 +10,7 @@ path = "rmdir.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "rmdir" diff --git a/src/seq/Cargo.toml b/src/seq/Cargo.toml index 317ad56f0..43ab40aba 100644 --- a/src/seq/Cargo.toml +++ b/src/seq/Cargo.toml @@ -10,7 +10,7 @@ path = "seq.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "seq" diff --git a/src/shred/Cargo.toml b/src/shred/Cargo.toml index b73538b91..634c3ee63 100644 --- a/src/shred/Cargo.toml +++ b/src/shred/Cargo.toml @@ -14,7 +14,7 @@ filetime = "0.2.1" getopts = "0.2.18" libc = "0.2.42" time = "0.1.40" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "shred" diff --git a/src/shuf/Cargo.toml b/src/shuf/Cargo.toml index 5caca95bd..9e04c2046 100644 --- a/src/shuf/Cargo.toml +++ b/src/shuf/Cargo.toml @@ -11,7 +11,7 @@ path = "shuf.rs" [dependencies] getopts = "0.2.18" rand = "0.5" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "shuf" diff --git a/src/sleep/Cargo.toml b/src/sleep/Cargo.toml index e1c1dff21..5dff8703a 100644 --- a/src/sleep/Cargo.toml +++ b/src/sleep/Cargo.toml @@ -12,7 +12,7 @@ path = "sleep.rs" getopts = "0.2.18" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["parse_time"] [[bin]] diff --git a/src/sort/Cargo.toml b/src/sort/Cargo.toml index 335ef6262..e49f55425 100644 --- a/src/sort/Cargo.toml +++ b/src/sort/Cargo.toml @@ -14,7 +14,7 @@ semver = "0.9.0" itertools = "0.7.8" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["fs"] [[bin]] diff --git a/src/split/Cargo.toml b/src/split/Cargo.toml index 354eef41b..8bf0d2022 100644 --- a/src/split/Cargo.toml +++ b/src/split/Cargo.toml @@ -10,7 +10,7 @@ path = "split.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "split" diff --git a/src/stat/Cargo.toml b/src/stat/Cargo.toml index ea27cb600..992ca7f88 100644 --- a/src/stat/Cargo.toml +++ b/src/stat/Cargo.toml @@ -13,7 +13,7 @@ getopts = "0.2.18" time = "0.1.40" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["entries"] [[bin]] diff --git a/src/stdbuf/Cargo.toml b/src/stdbuf/Cargo.toml index 773ad11a5..d31e175b1 100644 --- a/src/stdbuf/Cargo.toml +++ b/src/stdbuf/Cargo.toml @@ -11,7 +11,7 @@ path = "stdbuf.rs" [dependencies] getopts = "0.2.18" tempdir = "0.3.7" -uucore = { path="../uucore" } +uucore = "0.0.1" [build-dependencies] libstdbuf = { path="libstdbuf" } diff --git a/src/stdbuf/libstdbuf/Cargo.toml b/src/stdbuf/libstdbuf/Cargo.toml index d315e50cf..3ee7ef0bd 100644 --- a/src/stdbuf/libstdbuf/Cargo.toml +++ b/src/stdbuf/libstdbuf/Cargo.toml @@ -10,7 +10,7 @@ path = "libstdbuf.rs" crate-type = ["cdylib", "rlib"] [dependencies] -uucore = { path="../../uucore" } +uucore = "0.0.1" libc = "0.2" cpp = "0.4" diff --git a/src/sum/Cargo.toml b/src/sum/Cargo.toml index 8382230cf..572f49e2b 100644 --- a/src/sum/Cargo.toml +++ b/src/sum/Cargo.toml @@ -10,7 +10,7 @@ path = "sum.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "sum" diff --git a/src/sync/Cargo.toml b/src/sync/Cargo.toml index aceafe5ed..361a570de 100644 --- a/src/sync/Cargo.toml +++ b/src/sync/Cargo.toml @@ -15,7 +15,7 @@ winapi = { version = "0.3", features = ["handleapi", "winerror"] } kernel32-sys = "0.2.2" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["wide"] [[bin]] diff --git a/src/tac/Cargo.toml b/src/tac/Cargo.toml index 4fb77ef81..0f09e1a9b 100644 --- a/src/tac/Cargo.toml +++ b/src/tac/Cargo.toml @@ -10,7 +10,7 @@ path = "tac.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "tac" diff --git a/src/tail/Cargo.toml b/src/tail/Cargo.toml index 99a703b8f..337ea3436 100644 --- a/src/tail/Cargo.toml +++ b/src/tail/Cargo.toml @@ -13,7 +13,7 @@ getopts = "0.2.18" kernel32-sys = "0.2.2" libc = "0.2.42" winapi = "0.3" -uucore = { path="../uucore" } +uucore = "0.0.1" [target.'cfg(target_os = "redox")'.dependencies] redox_syscall = "0.1" diff --git a/src/tee/Cargo.toml b/src/tee/Cargo.toml index 711d567ba..d1d86612a 100644 --- a/src/tee/Cargo.toml +++ b/src/tee/Cargo.toml @@ -11,7 +11,7 @@ path = "tee.rs" [dependencies] getopts = "0.2.18" libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "tee" diff --git a/src/test/Cargo.toml b/src/test/Cargo.toml index 4f99a22ed..92a4dd141 100644 --- a/src/test/Cargo.toml +++ b/src/test/Cargo.toml @@ -10,7 +10,7 @@ path = "test.rs" [dependencies] libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [target.'cfg(target_os = "redox")'.dependencies] redox_syscall = "0.1" diff --git a/src/timeout/Cargo.toml b/src/timeout/Cargo.toml index 0b5713bc6..69fd52e4f 100644 --- a/src/timeout/Cargo.toml +++ b/src/timeout/Cargo.toml @@ -14,7 +14,7 @@ libc = "0.2.42" time = "0.1.40" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["parse_time", "process"] [[bin]] diff --git a/src/touch/Cargo.toml b/src/touch/Cargo.toml index d485c813f..d29303780 100644 --- a/src/touch/Cargo.toml +++ b/src/touch/Cargo.toml @@ -14,7 +14,7 @@ getopts = "0.2.18" time = "0.1.40" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["libc"] [[bin]] diff --git a/src/tr/Cargo.toml b/src/tr/Cargo.toml index 350087eb4..4c3421b74 100644 --- a/src/tr/Cargo.toml +++ b/src/tr/Cargo.toml @@ -12,7 +12,7 @@ path = "tr.rs" getopts = "0.2.18" bit-set = "0.5.0" fnv = "1.0.5" -uucore = { path = "../uucore" } +uucore = "0.0.1" [[bin]] name = "tr" diff --git a/src/true/Cargo.toml b/src/true/Cargo.toml index 85d2fc5df..41c95aec2 100644 --- a/src/true/Cargo.toml +++ b/src/true/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_true" path = "true.rs" [dependencies] -uucore = { path = "../uucore" } +uucore = "0.0.1" [[bin]] name = "true" diff --git a/src/truncate/Cargo.toml b/src/truncate/Cargo.toml index 070852cf2..a7a4cd539 100644 --- a/src/truncate/Cargo.toml +++ b/src/truncate/Cargo.toml @@ -10,7 +10,7 @@ path = "truncate.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "truncate" diff --git a/src/tsort/Cargo.toml b/src/tsort/Cargo.toml index 4200b8291..b2c3fe4dc 100644 --- a/src/tsort/Cargo.toml +++ b/src/tsort/Cargo.toml @@ -10,7 +10,7 @@ path = "tsort.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "tsort" diff --git a/src/tty/Cargo.toml b/src/tty/Cargo.toml index 24d94f786..57185ce86 100644 --- a/src/tty/Cargo.toml +++ b/src/tty/Cargo.toml @@ -13,7 +13,7 @@ getopts = "0.2.18" libc = "0.2.42" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["fs"] [[bin]] diff --git a/src/uname/Cargo.toml b/src/uname/Cargo.toml index 94609d061..3129adac2 100644 --- a/src/uname/Cargo.toml +++ b/src/uname/Cargo.toml @@ -11,7 +11,7 @@ path = "uname.rs" [dependencies] clap = "2.32.0" platform-info = "0.0.1" -uucore = { path = "../uucore" } +uucore = "0.0.1" [[bin]] name = "uname" diff --git a/src/unexpand/Cargo.toml b/src/unexpand/Cargo.toml index cecad138a..1521a9225 100644 --- a/src/unexpand/Cargo.toml +++ b/src/unexpand/Cargo.toml @@ -11,9 +11,7 @@ path = "unexpand.rs" [dependencies] getopts = "0.2.18" unicode-width = "0.1.5" - -[dependencies.uucore] -path = "../uucore" +uucore = "0.0.1" [[bin]] name = "unexpand" diff --git a/src/uniq/Cargo.toml b/src/uniq/Cargo.toml index f5ee59e5c..17b014f56 100644 --- a/src/uniq/Cargo.toml +++ b/src/uniq/Cargo.toml @@ -10,7 +10,7 @@ path = "uniq.rs" [dependencies] getopts = "0.2.18" -uucore = { path = "../uucore" } +uucore = "0.0.1" [[bin]] name = "uniq" diff --git a/src/unlink/Cargo.toml b/src/unlink/Cargo.toml index 5121264fe..2606d66c7 100644 --- a/src/unlink/Cargo.toml +++ b/src/unlink/Cargo.toml @@ -11,7 +11,7 @@ path = "unlink.rs" [dependencies] getopts = "0.2.18" libc = "0.2.42" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "unlink" diff --git a/src/uptime/Cargo.toml b/src/uptime/Cargo.toml index 5a39371a8..cf86a2e66 100644 --- a/src/uptime/Cargo.toml +++ b/src/uptime/Cargo.toml @@ -13,7 +13,7 @@ getopts = "0.2.18" time = "0.1.40" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["utmpx"] [[bin]] diff --git a/src/users/Cargo.toml b/src/users/Cargo.toml index 3cfd8aecc..4ef060373 100644 --- a/src/users/Cargo.toml +++ b/src/users/Cargo.toml @@ -13,7 +13,7 @@ getopts = "0.2.18" [dependencies.uucore] features = ["utmpx"] -path = "../uucore" +version = "0.0.1" [[bin]] name = "users" diff --git a/src/uucore/Cargo.toml b/src/uucore/Cargo.toml deleted file mode 100644 index faba36a54..000000000 --- a/src/uucore/Cargo.toml +++ /dev/null @@ -1,37 +0,0 @@ -[package] -name = "uucore" -version = "0.0.1" -authors = [] - -[dependencies] -getopts = "0.2.18" -failure = { version = "0.1.1", optional = true } -failure_derive = { version = "0.1.1", optional = true } -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" - -[features] -fs = ["libc"] -utf8 = [] -encoding = ["data-encoding", "failure", "failure_derive"] -parse_time = [] -mode = ["libc"] -utmpx = ["time", "libc"] -process = ["libc"] -signals = [] -entries = ["libc"] -zero-copy = ["nix", "libc", "lazy_static", "platform-info"] -wide = [] -default = [] - -[lib] -path = "lib.rs" -name = "uucore" diff --git a/src/uucore/coreopts.rs b/src/uucore/coreopts.rs deleted file mode 100644 index c245cf500..000000000 --- a/src/uucore/coreopts.rs +++ /dev/null @@ -1,141 +0,0 @@ -extern crate getopts; - -pub struct HelpText<'a> { - pub name: &'a str, - pub version: &'a str, - pub syntax: &'a str, - pub summary: &'a str, - pub long_help: &'a str, - pub display_usage: bool, -} - -pub struct CoreOptions<'a> { - options: getopts::Options, - help_text: HelpText<'a>, -} - -impl<'a> CoreOptions<'a> { - pub fn new(help_text: HelpText<'a>) -> Self { - let mut ret = CoreOptions { - options: getopts::Options::new(), - help_text, - }; - ret.options - .optflag("", "help", "print usage information") - .optflag("", "version", "print name and version number"); - ret - } - pub fn optflagopt( - &mut self, - short_name: &str, - long_name: &str, - desc: &str, - hint: &str, - ) -> &mut CoreOptions<'a> { - self.options.optflagopt(short_name, long_name, desc, hint); - self - } - pub fn optflag( - &mut self, - short_name: &str, - long_name: &str, - desc: &str, - ) -> &mut CoreOptions<'a> { - self.options.optflag(short_name, long_name, desc); - self - } - pub fn optflagmulti( - &mut self, - short_name: &str, - long_name: &str, - desc: &str, - ) -> &mut CoreOptions<'a> { - self.options.optflagmulti(short_name, long_name, desc); - self - } - pub fn optopt( - &mut self, - short_name: &str, - long_name: &str, - desc: &str, - hint: &str, - ) -> &mut CoreOptions<'a> { - self.options.optopt(short_name, long_name, desc, hint); - self - } - pub fn optmulti( - &mut self, - short_name: &str, - long_name: &str, - desc: &str, - hint: &str, - ) -> &mut CoreOptions<'a> { - self.options.optmulti(short_name, long_name, desc, hint); - self - } - pub fn usage(&self, summary: &str) -> String { - self.options.usage(summary) - } - pub fn parse(&mut self, args: Vec) -> getopts::Matches { - let matches = match self.options.parse(&args[1..]) { - Ok(m) => Some(m), - Err(f) => { - eprint!("{}: error: ", self.help_text.name); - eprintln!("{}", f); - ::std::process::exit(1); - } - }.unwrap(); - if matches.opt_present("help") { - let usage_str = if self.help_text.display_usage { - format!( - "\n {}\n\n Reference\n", - self.options.usage(self.help_text.summary) - ).replace("Options:", " Options:") - } else { - String::new() - }; - print!( - " - {0} {1} - - {0} {2} -{3}{4} -", - self.help_text.name, - self.help_text.version, - self.help_text.syntax, - usage_str, - self.help_text.long_help - ); - exit!(0); - } else if matches.opt_present("version") { - println!("{} {}", self.help_text.name, self.help_text.version); - exit!(0); - } - matches - } -} - -#[macro_export] -macro_rules! new_coreopts { - ($syntax: expr, $summary: expr, $long_help: expr) => ( - uucore::coreopts::CoreOptions::new(uucore::coreopts::HelpText { - name: executable!(), - version: env!("CARGO_PKG_VERSION"), - syntax: $syntax, - summary: $summary, - long_help: $long_help, - display_usage: true - }) - ); - ($syntax: expr, $summary: expr, $long_help: expr, $display_usage: expr) => ( - uucore::coreopts::CoreOptions::new(uucore::coreopts::HelpText { - name: executable!(), - version: env!("CARGO_PKG_VERSION"), - syntax: $syntax, - summary: $summary, - long_help: $long_help, - display_usage: $display_usage - }) - ); -} diff --git a/src/uucore/encoding.rs b/src/uucore/encoding.rs deleted file mode 100644 index b5b233e4d..000000000 --- a/src/uucore/encoding.rs +++ /dev/null @@ -1,127 +0,0 @@ -// This file is part of the uutils coreutils package. -// -// (c) Jian Zeng -// -// For the full copyright and license information, please view the LICENSE -// file that was distributed with this source code. -// - -extern crate data_encoding; -use self::data_encoding::{DecodeError, BASE32, BASE64}; -use std::io::{self, Read, Write}; - -#[derive(Fail, Debug)] -pub enum EncodingError { - #[fail(display = "{}", _0)] - Decode(#[cause] DecodeError), - #[fail(display = "{}", _0)] - Io(#[cause] io::Error), -} - -impl From for EncodingError { - fn from(err: io::Error) -> EncodingError { - EncodingError::Io(err) - } -} - -impl From for EncodingError { - fn from(err: DecodeError) -> EncodingError { - EncodingError::Decode(err) - } -} - -pub type DecodeResult = Result, EncodingError>; - -#[derive(Clone, Copy)] -pub enum Format { - Base32, - Base64, -} -use self::Format::*; - -pub fn encode(f: Format, input: &[u8]) -> String { - match f { - Base32 => BASE32.encode(input), - Base64 => BASE64.encode(input), - } -} - -pub fn decode(f: Format, input: &[u8]) -> DecodeResult { - Ok(match f { - Base32 => BASE32.decode(input)?, - Base64 => BASE64.decode(input)?, - }) -} - -pub struct Data { - line_wrap: usize, - ignore_garbage: bool, - input: R, - format: Format, - alphabet: &'static [u8], -} - -impl Data { - pub fn new(input: R, format: Format) -> Self { - Data { - line_wrap: 76, - ignore_garbage: false, - input, - format, - alphabet: match format { - Base32 => b"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=", - Base64 => b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789=+/", - }, - } - } - - pub fn line_wrap(mut self, wrap: usize) -> Self { - self.line_wrap = wrap; - self - } - - pub fn ignore_garbage(mut self, ignore: bool) -> Self { - self.ignore_garbage = ignore; - self - } - - pub fn decode(&mut self) -> DecodeResult { - let mut buf = vec![]; - self.input.read_to_end(&mut buf)?; - if self.ignore_garbage { - buf.retain(|c| self.alphabet.contains(c)); - } else { - buf.retain(|&c| c != b'\r' && c != b'\n'); - }; - decode(self.format, &buf) - } - - pub fn encode(&mut self) -> String { - let mut buf: Vec = vec![]; - self.input.read_to_end(&mut buf).unwrap(); - encode(self.format, buf.as_slice()) - } -} - -// NOTE: this will likely be phased out at some point -pub fn wrap_print(data: &Data, res: String) { - let stdout = io::stdout(); - wrap_write(stdout.lock(), data.line_wrap, res).unwrap(); -} - -pub fn wrap_write(mut writer: W, line_wrap: usize, res: String) -> io::Result<()> { - use std::cmp::min; - - if line_wrap == 0 { - return write!(writer, "{}", res); - } - - let mut start = 0; - while start < res.len() { - let end = min(start + line_wrap, res.len()); - writeln!(writer, "{}", &res[start..end])?; - start = end; - } - - Ok(()) -} diff --git a/src/uucore/entries.rs b/src/uucore/entries.rs deleted file mode 100644 index 3120d54e2..000000000 --- a/src/uucore/entries.rs +++ /dev/null @@ -1,252 +0,0 @@ -// This file is part of the uutils coreutils package. -// -// (c) Jian Zeng -// -// For the full copyright and license information, please view the LICENSE -// file that was distributed with this source code. - -//! Get password/group file entry -//! -//! # Examples: -//! -//! ``` -//! use uucore::entries::{self, Locate}; -//! assert_eq!("root", entries::uid2usr(0).unwrap()); -//! assert_eq!(0, entries::usr2uid("root").unwrap()); -//! assert!(entries::gid2grp(0).is_ok()); -//! assert!(entries::grp2gid("root").is_ok()); -//! -//! assert!(entries::Passwd::locate(0).is_ok()); -//! assert!(entries::Passwd::locate("0").is_ok()); -//! assert!(entries::Passwd::locate("root").is_ok()); -//! -//! assert!(entries::Group::locate(0).is_ok()); -//! assert!(entries::Group::locate("0").is_ok()); -//! assert!(entries::Group::locate("root").is_ok()); -//! ``` - -#[cfg(any(target_os = "freebsd", target_os = "macos"))] -use libc::time_t; -use libc::{c_char, c_int, gid_t, uid_t}; -use libc::{getgrgid, getgrnam, getgroups, getpwnam, getpwuid, group, passwd}; - -use std::ptr; -use std::io::ErrorKind; -use std::io::Error as IOError; -use std::io::Result as IOResult; -use std::ffi::{CStr, CString}; -use std::borrow::Cow; - -extern "C" { - fn getgrouplist( - name: *const c_char, - gid: gid_t, - groups: *mut gid_t, - ngroups: *mut c_int, - ) -> c_int; -} - -pub fn get_groups() -> IOResult> { - let ngroups = unsafe { getgroups(0, ptr::null_mut()) }; - if ngroups == -1 { - return Err(IOError::last_os_error()); - } - let mut groups = Vec::with_capacity(ngroups as usize); - let ngroups = unsafe { getgroups(ngroups, groups.as_mut_ptr()) }; - if ngroups == -1 { - Err(IOError::last_os_error()) - } else { - unsafe { - groups.set_len(ngroups as usize); - } - Ok(groups) - } -} - -pub struct Passwd { - inner: passwd, -} - -macro_rules! cstr2cow { - ($v:expr) => ( - unsafe { CStr::from_ptr($v).to_string_lossy() } - ) -} - -impl Passwd { - /// AKA passwd.pw_name - pub fn name(&self) -> Cow { - cstr2cow!(self.inner.pw_name) - } - - /// AKA passwd.pw_uid - pub fn uid(&self) -> uid_t { - self.inner.pw_uid - } - - /// AKA passwd.pw_gid - pub fn gid(&self) -> gid_t { - self.inner.pw_gid - } - - /// AKA passwd.pw_gecos - pub fn user_info(&self) -> Cow { - cstr2cow!(self.inner.pw_gecos) - } - - /// AKA passwd.pw_shell - pub fn user_shell(&self) -> Cow { - cstr2cow!(self.inner.pw_shell) - } - - /// AKA passwd.pw_dir - pub fn user_dir(&self) -> Cow { - cstr2cow!(self.inner.pw_dir) - } - - /// AKA passwd.pw_passwd - pub fn user_passwd(&self) -> Cow { - cstr2cow!(self.inner.pw_passwd) - } - - /// AKA passwd.pw_class - #[cfg(any(target_os = "freebsd", target_os = "macos"))] - pub fn user_access_class(&self) -> Cow { - cstr2cow!(self.inner.pw_class) - } - - /// AKA passwd.pw_change - #[cfg(any(target_os = "freebsd", target_os = "macos"))] - pub fn passwd_change_time(&self) -> time_t { - self.inner.pw_change - } - - /// AKA passwd.pw_expire - #[cfg(any(target_os = "freebsd", target_os = "macos"))] - pub fn expiration(&self) -> time_t { - self.inner.pw_expire - } - - pub fn as_inner(&self) -> &passwd { - &self.inner - } - - pub fn into_inner(self) -> passwd { - self.inner - } - - pub fn belongs_to(&self) -> Vec { - let mut ngroups: c_int = 8; - let mut groups = Vec::with_capacity(ngroups as usize); - let gid = self.inner.pw_gid; - let name = self.inner.pw_name; - unsafe { - if getgrouplist(name, gid, groups.as_mut_ptr(), &mut ngroups) == -1 { - groups.resize(ngroups as usize, 0); - getgrouplist(name, gid, groups.as_mut_ptr(), &mut ngroups); - } - groups.set_len(ngroups as usize); - } - groups.truncate(ngroups as usize); - groups - } -} - -pub struct Group { - inner: group, -} - -impl Group { - /// AKA group.gr_name - pub fn name(&self) -> Cow { - cstr2cow!(self.inner.gr_name) - } - - /// AKA group.gr_gid - pub fn gid(&self) -> gid_t { - self.inner.gr_gid - } - - pub fn as_inner(&self) -> &group { - &self.inner - } - - pub fn into_inner(self) -> group { - self.inner - } -} - -/// Fetch desired entry. -pub trait Locate { - fn locate(key: K) -> IOResult - where - Self: ::std::marker::Sized; -} - -macro_rules! f { - ($fnam:ident, $fid:ident, $t:ident, $st:ident) => ( - impl Locate<$t> for $st { - fn locate(k: $t) -> IOResult { - unsafe { - let data = $fid(k); - if !data.is_null() { - Ok($st { - inner: ptr::read(data as *const _) - }) - } else { - Err(IOError::new(ErrorKind::NotFound, format!("No such id: {}", k))) - } - } - } - } - - impl<'a> Locate<&'a str> for $st { - fn locate(k: &'a str) -> IOResult { - if let Ok(id) = k.parse::<$t>() { - let data = unsafe { $fid(id) }; - if !data.is_null() { - Ok($st { - inner: unsafe {ptr::read(data as *const _)} - }) - } else { - Err(IOError::new(ErrorKind::NotFound, format!("No such id: {}", id))) - } - } else { - unsafe { - let data = $fnam(CString::new(k).unwrap().as_ptr()); - if !data.is_null() { - Ok($st { - inner: ptr::read(data as *const _) - }) - } else { - Err(IOError::new(ErrorKind::NotFound, format!("Not found: {}", k))) - } - } - } - } - } - ) -} - -f!(getpwnam, getpwuid, uid_t, Passwd); -f!(getgrnam, getgrgid, gid_t, Group); - -#[inline] -pub fn uid2usr(id: uid_t) -> IOResult { - Passwd::locate(id).map(|p| p.name().into_owned()) -} - -#[inline] -pub fn gid2grp(id: gid_t) -> IOResult { - Group::locate(id).map(|p| p.name().into_owned()) -} - -#[inline] -pub fn usr2uid(name: &str) -> IOResult { - Passwd::locate(name).map(|p| p.uid()) -} - -#[inline] -pub fn grp2gid(name: &str) -> IOResult { - Group::locate(name).map(|p| p.gid()) -} diff --git a/src/uucore/fs.rs b/src/uucore/fs.rs deleted file mode 100644 index 65819afcc..000000000 --- a/src/uucore/fs.rs +++ /dev/null @@ -1,269 +0,0 @@ -// This file is part of the uutils coreutils package. -// -// (c) Joseph Crail -// (c) Jian Zeng -// -// For the full copyright and license information, please view the LICENSE -// file that was distributed with this source code. - -#[cfg(target_os = "redox")] -extern crate termion; - -#[cfg(unix)] -use super::libc; -#[cfg(unix)] -use super::libc::{mode_t, S_IRGRP, S_IROTH, S_IRUSR, S_ISGID, S_ISUID, S_ISVTX, S_IWGRP, S_IWOTH, - S_IWUSR, S_IXGRP, S_IXOTH, S_IXUSR}; -use std::env; -use std::fs; -#[cfg(any(unix, target_os = "redox"))] -use std::os::unix::fs::MetadataExt; -#[cfg(target_os = "redox")] -use std::io; -use std::io::{Error, ErrorKind}; -use std::io::Result as IOResult; -use std::path::{Component, Path, PathBuf}; -use std::borrow::Cow; - -#[cfg(unix)] -macro_rules! has { - ($mode:expr, $perm:expr) => ( - $mode & ($perm as u32) != 0 - ) -} - -pub fn resolve_relative_path(path: &Path) -> Cow { - if path.components().all(|e| e != Component::ParentDir) { - return path.into(); - } - let root = Component::RootDir.as_os_str(); - let mut result = env::current_dir().unwrap_or(PathBuf::from(root)); - for comp in path.components() { - match comp { - Component::ParentDir => { - if let Ok(p) = result.read_link() { - result = p; - } - result.pop(); - } - Component::CurDir => (), - Component::RootDir | Component::Normal(_) | Component::Prefix(_) => { - result.push(comp.as_os_str()) - } - } - } - result.into() -} - -#[derive(Clone, Copy, Debug, Eq, PartialEq)] -pub enum CanonicalizeMode { - None, - Normal, - Existing, - Missing, -} - -fn resolve>(original: P) -> IOResult { - const MAX_LINKS_FOLLOWED: u32 = 255; - let mut followed = 0; - let mut result = original.as_ref().to_path_buf(); - loop { - if followed == MAX_LINKS_FOLLOWED { - return Err(Error::new( - ErrorKind::InvalidInput, - "maximum links followed", - )); - } - - match fs::symlink_metadata(&result) { - Err(e) => return Err(e), - Ok(ref m) if !m.file_type().is_symlink() => break, - Ok(..) => { - followed += 1; - match fs::read_link(&result) { - Ok(path) => { - result.pop(); - result.push(path); - } - Err(e) => { - return Err(e); - } - } - } - } - } - Ok(result) -} - -pub fn canonicalize>(original: P, can_mode: CanonicalizeMode) -> IOResult { - // Create an absolute path - let original = original.as_ref(); - let original = if original.is_absolute() { - original.to_path_buf() - } else { - env::current_dir().unwrap().join(original) - }; - - let mut result = PathBuf::new(); - let mut parts = vec![]; - - // Split path by directory separator; add prefix (Windows-only) and root - // directory to final path buffer; add remaining parts to temporary - // vector for canonicalization. - for part in original.components() { - match part { - Component::Prefix(_) | Component::RootDir => { - result.push(part.as_os_str()); - } - Component::CurDir => (), - Component::ParentDir => { - parts.pop(); - } - Component::Normal(_) => { - parts.push(part.as_os_str()); - } - } - } - - // Resolve the symlinks where possible - if !parts.is_empty() { - for part in parts[..parts.len() - 1].iter() { - result.push(part); - - if can_mode == CanonicalizeMode::None { - continue; - } - - match resolve(&result) { - Err(e) => match can_mode { - CanonicalizeMode::Missing => continue, - _ => return Err(e), - }, - Ok(path) => { - result.pop(); - result.push(path); - } - } - } - - result.push(parts.last().unwrap()); - - match resolve(&result) { - Err(e) => { - if can_mode == CanonicalizeMode::Existing { - return Err(e); - } - } - Ok(path) => { - result.pop(); - result.push(path); - } - } - } - Ok(result) -} - -#[cfg(unix)] -pub fn is_stdin_interactive() -> bool { - unsafe { libc::isatty(libc::STDIN_FILENO) == 1 } -} - -#[cfg(windows)] -pub fn is_stdin_interactive() -> bool { - false -} - -#[cfg(target_os = "redox")] -pub fn is_stdin_interactive() -> bool { - termion::is_tty(&io::stdin()) -} - -#[cfg(unix)] -pub fn is_stdout_interactive() -> bool { - unsafe { libc::isatty(libc::STDOUT_FILENO) == 1 } -} - -#[cfg(windows)] -pub fn is_stdout_interactive() -> bool { - false -} - -#[cfg(target_os = "redox")] -pub fn is_stdout_interactive() -> bool { - termion::is_tty(&io::stdout()) -} - -#[cfg(unix)] -pub fn is_stderr_interactive() -> bool { - unsafe { libc::isatty(libc::STDERR_FILENO) == 1 } -} - -#[cfg(windows)] -pub fn is_stderr_interactive() -> bool { - false -} - -#[cfg(target_os = "redox")] -pub fn is_stderr_interactive() -> bool { - termion::is_tty(&io::stderr()) -} - -#[cfg(not(unix))] -#[allow(unused_variables)] -pub fn display_permissions(metadata: &fs::Metadata) -> String { - String::from("---------") -} - -#[cfg(unix)] -pub fn display_permissions(metadata: &fs::Metadata) -> String { - let mode: mode_t = metadata.mode() as mode_t; - display_permissions_unix(mode as u32) -} - -#[cfg(unix)] -pub fn display_permissions_unix(mode: u32) -> String { - let mut result = String::with_capacity(9); - result.push(if has!(mode, S_IRUSR) { 'r' } else { '-' }); - result.push(if has!(mode, S_IWUSR) { 'w' } else { '-' }); - result.push(if has!(mode, S_ISUID) { - if has!(mode, S_IXUSR) { - 's' - } else { - 'S' - } - } else if has!(mode, S_IXUSR) { - 'x' - } else { - '-' - }); - - result.push(if has!(mode, S_IRGRP) { 'r' } else { '-' }); - result.push(if has!(mode, S_IWGRP) { 'w' } else { '-' }); - result.push(if has!(mode, S_ISGID) { - if has!(mode, S_IXGRP) { - 's' - } else { - 'S' - } - } else if has!(mode, S_IXGRP) { - 'x' - } else { - '-' - }); - - result.push(if has!(mode, S_IROTH) { 'r' } else { '-' }); - result.push(if has!(mode, S_IWOTH) { 'w' } else { '-' }); - result.push(if has!(mode, S_ISVTX) { - if has!(mode, S_IXOTH) { - 't' - } else { - 'T' - } - } else if has!(mode, S_IXOTH) { - 'x' - } else { - '-' - }); - - result -} diff --git a/src/uucore/lib.rs b/src/uucore/lib.rs deleted file mode 100644 index 58e7ff261..000000000 --- a/src/uucore/lib.rs +++ /dev/null @@ -1,54 +0,0 @@ -extern crate wild; - -pub fn args() -> impl Iterator { - wild::args() -} - -#[cfg(feature = "libc")] -pub extern crate libc; -#[cfg(feature = "winapi")] -pub extern crate winapi; -#[cfg(feature = "failure")] -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; - -#[macro_use] -pub mod coreopts; - -pub mod panic; - -#[cfg(feature = "fs")] -pub mod fs; -#[cfg(feature = "encoding")] -pub mod encoding; -#[cfg(feature = "parse_time")] -pub mod parse_time; - -#[cfg(all(not(windows), feature = "mode"))] -pub mod mode; -#[cfg(all(unix, not(target_os = "fuchsia"), feature = "utmpx"))] -pub mod utmpx; -#[cfg(all(unix, feature = "entries"))] -pub mod entries; -#[cfg(all(unix, feature = "process"))] -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/macros.rs b/src/uucore/macros.rs deleted file mode 100644 index 28046f2c8..000000000 --- a/src/uucore/macros.rs +++ /dev/null @@ -1,241 +0,0 @@ -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -#[macro_export] -macro_rules! executable( - () => ({ - let module = module_path!(); - let module = module.split("::").next().unwrap_or(module); - if &module[0..3] == "uu_" { - &module[3..] - } else { - module - } - }) -); - -#[macro_export] -macro_rules! show_error( - ($($args:tt)+) => ({ - eprint!("{}: error: ", executable!()); - eprintln!($($args)+); - }) -); - -#[macro_export] -macro_rules! show_warning( - ($($args:tt)+) => ({ - eprint!("{}: warning: ", executable!()); - eprintln!($($args)+); - }) -); - -#[macro_export] -macro_rules! show_info( - ($($args:tt)+) => ({ - eprint!("{}: ", executable!()); - eprintln!($($args)+); - }) -); - -#[macro_export] -macro_rules! disp_err( - ($($args:tt)+) => ({ - eprint!("{}: ", executable!()); - eprintln!($($args)+); - eprintln!("Try '{} --help' for more information.", executable!()); - }) -); - -#[macro_export] -macro_rules! crash( - ($exitcode:expr, $($args:tt)+) => ({ - show_error!($($args)+); - ::std::process::exit($exitcode) - }) -); - -#[macro_export] -macro_rules! exit( - ($exitcode:expr) => ({ - ::std::process::exit($exitcode) - }) -); - -#[macro_export] -macro_rules! crash_if_err( - ($exitcode:expr, $exp:expr) => ( - match $exp { - Ok(m) => m, - Err(f) => crash!($exitcode, "{}", f), - } - ) -); - -#[macro_export] -macro_rules! return_if_err( - ($exitcode:expr, $exp:expr) => ( - match $exp { - Ok(m) => m, - Err(f) => { - show_error!("{}", f); - return $exitcode; - } - } - ) -); - -#[macro_export] -macro_rules! safe_write( - ($fd:expr, $($args:tt)+) => ( - match write!($fd, $($args)+) { - Ok(_) => {} - Err(f) => panic!(f.to_string()) - } - ) -); - -#[macro_export] -macro_rules! safe_writeln( - ($fd:expr, $($args:tt)+) => ( - match writeln!($fd, $($args)+) { - Ok(_) => {} - Err(f) => panic!(f.to_string()) - } - ) -); - -#[macro_export] -macro_rules! safe_unwrap( - ($exp:expr) => ( - match $exp { - Ok(m) => m, - Err(f) => crash!(1, "{}", f.to_string()) - } - ) -); - -//-- message templates - -//-- message templates : general - -#[macro_export] -macro_rules! snippet_list_join_oxford { - ($conjunction:expr, $valOne:expr, $valTwo:expr) => ( - format!("{}, {} {}", $valOne, $conjunction, $valTwo) - ); - ($conjunction:expr, $valOne:expr, $valTwo:expr $(, $remainingVals:expr)*) => ( - format!("{}, {}", $valOne, snippet_list_join_inner!($conjunction, $valTwo $(, $remainingVals)*)) - ); -} - -#[macro_export] -macro_rules! snippet_list_join_or { - ($valOne:expr, $valTwo:expr) => ( - format!("{} or {}", $valOne, $valTwo) - ); - ($valOne:expr, $valTwo:expr $(, $remainingVals:expr)*) => ( - format!("{}, {}", $valOne, snippet_list_join_oxford!("or", $valTwo $(, $remainingVals)*)) - ); -} - -//-- message templates : invalid input - -#[macro_export] -macro_rules! msg_invalid_input { ($reason: expr) => ( - format!("invalid input: {}", $reason) ); } - -#[macro_export] -macro_rules! snippet_no_file_at_path { ($path:expr) => ( - format!("nonexistent path {}", $path) ); } - -// -- message templates : invalid input : flag - -#[macro_export] -macro_rules! msg_invalid_opt_use { - ($about:expr, $flag:expr) => ( - msg_invalid_input!(format!("The '{}' option {}", $flag, $about)) - ); - ($about:expr, $longflag:expr, $shortflag:expr) => { - msg_invalid_input!(format!("The '{}' ('{}') option {}", $longflag, $shortflag, $about)) - }; -} - -#[macro_export] -macro_rules! msg_opt_only_usable_if { - ($clause:expr, $flag:expr) => ( - msg_invalid_opt_use!(format!("only usable if {}", $clause), $flag) - ); - ($clause:expr, $longflag:expr, $shortflag:expr) => ( - msg_invalid_opt_use!(format!("only usable if {}", $clause), $longflag, $shortflag) - ); -} - -#[macro_export] -macro_rules! msg_opt_invalid_should_be { - ($expects:expr, $received:expr, $flag:expr) => ( - msg_invalid_opt_use!(format!("expects {}, but was provided {}", $expects, $received), $flag) - ); - ($expects:expr, $received:expr, $longflag:expr, $shortflag:expr) => ( - msg_invalid_opt_use!(format!("expects {}, but was provided {}", $expects, $received), $longflag, $shortflag) - ); -} - -// -- message templates : invalid input : args - -#[macro_export] -macro_rules! msg_arg_invalid_value { ($expects:expr, $received:expr) => ( - msg_invalid_input!(format!("expects its argument to be {}, but was provided {}", $expects, $received)) ); } - -#[macro_export] -macro_rules! msg_args_invalid_value { - ($expects:expr, $received:expr) => ( - msg_invalid_input!(format!("expects its arguments to be {}, but was provided {}", $expects, $received)) - ); - ($msg:expr) => ( - msg_invalid_input!($msg) - ); -} - -#[macro_export] -macro_rules! msg_args_nonexistent_file { ($received:expr) => ( - msg_args_invalid_value!("paths to files", snippet_no_file_at_path!($received)));} - -#[macro_export] -macro_rules! msg_wrong_number_of_arguments { - () => ( - msg_args_invalid_value!("wrong number of arguments") - ); - ($min:expr, $max:expr) => ( - msg_args_invalid_value!(format!("expects {}-{} arguments", $min, $max)) - ); - ($exact:expr) => ( - if $exact == 1 { - msg_args_invalid_value!("expects 1 argument") - } else { - msg_args_invalid_value!(format!("expects {} arguments", $exact)) - } - ); -} - -// -- message templates : invalid input : input combinations - -#[macro_export] -macro_rules! msg_expects_one_of { - ($valOne:expr $(, $remainingVals:expr)*) => ( - msg_invalid_input!(format!("expects one of {}", snippet_list_join_or!($valOne $(, $remainingVals)*))) - ); -} - -#[macro_export] -macro_rules! msg_expects_no_more_than_one_of { - ($valOne:expr $(, $remainingVals:expr)*) => ( - msg_invalid_input!(format!("expects no more than one of {}", snippet_list_join_or!($valOne $(, $remainingVals)*))) ; - ); -} diff --git a/src/uucore/mode.rs b/src/uucore/mode.rs deleted file mode 100644 index 26e237a7b..000000000 --- a/src/uucore/mode.rs +++ /dev/null @@ -1,132 +0,0 @@ -// This file is part of the uutils coreutils package. -// -// (c) Alex Lyon -// -// For the full copyright and license information, please view the LICENSE -// file that was distributed with this source code. -// - -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_start_matches('0'); - if mode.len() > 4 { - Err(format!("mode is too large ({} > 7777)", mode)) - } else { - match u32::from_str_radix(mode, 8) { - Ok(change) => Ok(match op { - '+' => fperm | change, - '-' => fperm & !change, - '=' => change, - _ => unreachable!(), - }), - Err(err) => Err(err.description().to_owned()), - } - } -} - -pub fn parse_symbolic( - mut fperm: u32, - mut mode: &str, - considering_dir: bool, -) -> Result { - #[cfg(unix)] - use libc::umask; - - #[cfg(target_os = "redox")] - unsafe fn umask(_mask: u32) -> u32 { - // XXX Redox does not currently have umask - 0 - } - - let (mask, pos) = parse_levels(mode); - if pos == mode.len() { - return Err(format!("invalid mode ({})", mode)); - } - let respect_umask = pos == 0; - let last_umask = unsafe { umask(0) }; - mode = &mode[pos..]; - while mode.len() > 0 { - let (op, pos) = parse_op(mode, None)?; - mode = &mode[pos..]; - let (mut srwx, pos) = parse_change(mode, fperm, considering_dir); - if respect_umask { - srwx &= !(last_umask as u32); - } - mode = &mode[pos..]; - match op { - '+' => fperm |= srwx & mask, - '-' => fperm &= !(srwx & mask), - '=' => fperm = (fperm & !mask) | (srwx & mask), - _ => unreachable!(), - } - } - unsafe { - umask(last_umask); - } - Ok(fperm) -} - -fn parse_levels(mode: &str) -> (u32, usize) { - let mut mask = 0; - let mut pos = 0; - for ch in mode.chars() { - mask |= match ch { - 'u' => 0o7700, - 'g' => 0o7070, - 'o' => 0o7007, - 'a' => 0o7777, - _ => break, - }; - pos += 1; - } - if pos == 0 { - mask = 0o7777; // default to 'a' - } - (mask, pos) -} - -fn parse_op(mode: &str, default: Option) -> Result<(char, usize), String> { - match mode.chars().next() { - Some(ch) => match ch { - '+' | '-' | '=' => Ok((ch, 1)), - _ => match default { - Some(ch) => Ok((ch, 0)), - None => Err(format!( - "invalid operator (expected +, -, or =, but found {})", - ch - )), - }, - }, - None => Err("unexpected end of mode".to_owned()), - } -} - -fn parse_change(mode: &str, fperm: u32, considering_dir: bool) -> (u32, usize) { - let mut srwx = fperm & 0o7000; - let mut pos = 0; - for ch in mode.chars() { - match ch { - 'r' => srwx |= 0o444, - 'w' => srwx |= 0o222, - 'x' => srwx |= 0o111, - 'X' => { - if considering_dir || (fperm & 0o0111) != 0 { - srwx |= 0o111 - } - } - 's' => srwx |= 0o4000 | 0o2000, - 't' => srwx |= 0o1000, - 'u' => srwx = (fperm & 0o700) | ((fperm >> 3) & 0o070) | ((fperm >> 6) & 0o007), - 'g' => srwx = ((fperm << 3) & 0o700) | (fperm & 0o070) | ((fperm >> 3) & 0o007), - 'o' => srwx = ((fperm << 6) & 0o700) | ((fperm << 3) & 0o070) | (fperm & 0o007), - _ => break, - }; - pos += 1; - } - if pos == 0 { - srwx = 0; - } - (srwx, pos) -} diff --git a/src/uucore/panic.rs b/src/uucore/panic.rs deleted file mode 100644 index 5cccca4ba..000000000 --- a/src/uucore/panic.rs +++ /dev/null @@ -1,13 +0,0 @@ -use std::panic; - -pub fn install_sigpipe_hook() { - let hook = panic::take_hook(); - panic::set_hook(Box::new(move |info| { - if let Some(res) = info.payload().downcast_ref::() { - if res.contains("Broken pipe") { - return; - } - } - hook(info) - })); -} diff --git a/src/uucore/parse_time.rs b/src/uucore/parse_time.rs deleted file mode 100644 index 260455f7d..000000000 --- a/src/uucore/parse_time.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is part of the uutils coreutils package. - * - * (c) Alex Lyon - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use std::time::Duration; - -pub fn from_str(string: &str) -> Result { - let len = string.len(); - if len == 0 { - return Err("empty string".to_owned()); - } - let slice = &string[..len - 1]; - let (numstr, times) = match string.chars().next_back().unwrap() { - 's' | 'S' => (slice, 1), - 'm' | 'M' => (slice, 60), - 'h' | 'H' => (slice, 60 * 60), - 'd' | 'D' => (slice, 60 * 60 * 24), - val => { - if !val.is_alphabetic() { - (string, 1) - } else if string == "inf" || string == "infinity" { - ("inf", 1) - } else { - return Err(format!("invalid time interval '{}'", string)); - } - } - }; - let num = match numstr.parse::() { - Ok(m) => m, - Err(e) => return Err(format!("invalid time interval '{}': {}", string, e)), - }; - - const NANOS_PER_SEC: u32 = 1_000_000_000; - let whole_secs = num.trunc(); - let nanos = (num.fract() * (NANOS_PER_SEC as f64)).trunc(); - let duration = Duration::new(whole_secs as u64, nanos as u32); - Ok(duration * times) -} diff --git a/src/uucore/process.rs b/src/uucore/process.rs deleted file mode 100644 index 11888ae66..000000000 --- a/src/uucore/process.rs +++ /dev/null @@ -1,145 +0,0 @@ -// This file is part of the uutils coreutils package. -// -// (c) Maciej Dziardziel -// (c) Jian Zeng -// -// For the full copyright and license information, please view the LICENSE file -// that was distributed with this source code. -// - -use super::libc; -use libc::{c_int, gid_t, pid_t, uid_t}; -use std::fmt; -use std::io; -use std::process::Child; -use std::sync::{Arc, Condvar, Mutex}; -use std::thread; -use std::time::{Duration, Instant}; - -pub fn geteuid() -> uid_t { - unsafe { libc::geteuid() } -} - -pub fn getegid() -> gid_t { - unsafe { libc::getegid() } -} - -pub fn getgid() -> gid_t { - unsafe { libc::getgid() } -} - -pub fn getuid() -> uid_t { - unsafe { libc::getuid() } -} - -// This is basically sys::unix::process::ExitStatus -#[derive(PartialEq, Eq, Clone, Copy, Debug)] -pub enum ExitStatus { - Code(i32), - Signal(i32), -} - -impl ExitStatus { - fn from_status(status: c_int) -> ExitStatus { - if status & 0x7F != 0 { - // WIFSIGNALED(status) - ExitStatus::Signal(status & 0x7F) - } else { - ExitStatus::Code(status & 0xFF00 >> 8) - } - } - - pub fn success(&self) -> bool { - match *self { - ExitStatus::Code(code) => code == 0, - _ => false, - } - } - - pub fn code(&self) -> Option { - match *self { - ExitStatus::Code(code) => Some(code), - _ => None, - } - } - - pub fn signal(&self) -> Option { - match *self { - ExitStatus::Signal(code) => Some(code), - _ => None, - } - } -} - -impl fmt::Display for ExitStatus { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match *self { - ExitStatus::Code(code) => write!(f, "exit code: {}", code), - ExitStatus::Signal(code) => write!(f, "exit code: {}", code), - } - } -} - -/// Missing methods for Child objects -pub trait ChildExt { - /// Send a signal to a Child process. - fn send_signal(&mut self, signal: usize) -> io::Result<()>; - - /// Wait for a process to finish or return after the specified duration. - fn wait_or_timeout(&mut self, timeout: Duration) -> io::Result>; -} - -impl ChildExt for Child { - fn send_signal(&mut self, signal: usize) -> io::Result<()> { - if unsafe { libc::kill(self.id() as pid_t, signal as i32) } != 0 { - Err(io::Error::last_os_error()) - } else { - Ok(()) - } - } - - fn wait_or_timeout(&mut self, timeout: Duration) -> io::Result> { - // The result will be written to that Option, protected by a Mutex - // Then the Condvar will be signaled - let state = Arc::new(( - Mutex::new(Option::None::>), - Condvar::new(), - )); - - // Start the waiting thread - let state_th = state.clone(); - let pid_th = self.id(); - thread::spawn(move || { - let &(ref lock_th, ref cvar_th) = &*state_th; - // Child::wait() would need a &mut to self, can't use that... - // use waitpid() directly, with our own ExitStatus - let mut status: c_int = 0; - let r = unsafe { libc::waitpid(pid_th as i32, &mut status, 0) }; - // Fill the Option and notify on the Condvar - let mut exitstatus_th = lock_th.lock().unwrap(); - if r != pid_th as c_int { - *exitstatus_th = Some(Err(io::Error::last_os_error())); - } else { - let s = ExitStatus::from_status(status); - *exitstatus_th = Some(Ok(s)); - } - cvar_th.notify_one(); - }); - - // Main thread waits - let &(ref lock, ref cvar) = &*state; - let mut exitstatus = lock.lock().unwrap(); - // Condvar::wait_timeout_ms() can wake too soon, in this case wait again - let start = Instant::now(); - loop { - if let Some(exitstatus) = exitstatus.take() { - return exitstatus.map(Some); - } - if start.elapsed() >= timeout { - return Ok(None); - } - let cvar_timeout = timeout - start.elapsed(); - exitstatus = cvar.wait_timeout(exitstatus, cvar_timeout).unwrap().0; - } - } -} diff --git a/src/uucore/signals.rs b/src/uucore/signals.rs deleted file mode 100644 index 76a153a03..000000000 --- a/src/uucore/signals.rs +++ /dev/null @@ -1,389 +0,0 @@ -/* - * This file is part of the uutils coreutils package. - * - * (c) Maciej Dziardziel - * - * For the full copyright and license information, please view the LICENSE file - * that was distributed with this source code. - */ - -pub static DEFAULT_SIGNAL: usize = 15; - -pub struct Signal<'a> { - pub name: &'a str, - pub value: usize, -} - -/* - -Linux Programmer's Manual - - 1 HUP 2 INT 3 QUIT 4 ILL 5 TRAP 6 ABRT 7 BUS - 8 FPE 9 KILL 10 USR1 11 SEGV 12 USR2 13 PIPE 14 ALRM -15 TERM 16 STKFLT 17 CHLD 18 CONT 19 STOP 20 TSTP 21 TTIN -22 TTOU 23 URG 24 XCPU 25 XFSZ 26 VTALRM 27 PROF 28 WINCH -29 POLL 30 PWR 31 SYS - - -*/ - -#[cfg(target_os = "linux")] -pub static ALL_SIGNALS: [Signal<'static>; 31] = [ - Signal { - name: "HUP", - value: 1, - }, - Signal { - name: "INT", - value: 2, - }, - Signal { - name: "QUIT", - value: 3, - }, - Signal { - name: "ILL", - value: 4, - }, - Signal { - name: "TRAP", - value: 5, - }, - Signal { - name: "ABRT", - value: 6, - }, - Signal { - name: "BUS", - value: 7, - }, - Signal { - name: "FPE", - value: 8, - }, - Signal { - name: "KILL", - value: 9, - }, - Signal { - name: "USR1", - value: 10, - }, - Signal { - name: "SEGV", - value: 11, - }, - Signal { - name: "USR2", - value: 12, - }, - Signal { - name: "PIPE", - value: 13, - }, - Signal { - name: "ALRM", - value: 14, - }, - Signal { - name: "TERM", - value: 15, - }, - Signal { - name: "STKFLT", - value: 16, - }, - Signal { - name: "CHLD", - value: 17, - }, - Signal { - name: "CONT", - value: 18, - }, - Signal { - name: "STOP", - value: 19, - }, - Signal { - name: "TSTP", - value: 20, - }, - Signal { - name: "TTIN", - value: 21, - }, - Signal { - name: "TTOU", - value: 22, - }, - Signal { - name: "URG", - value: 23, - }, - Signal { - name: "XCPU", - value: 24, - }, - Signal { - name: "XFSZ", - value: 25, - }, - Signal { - name: "VTALRM", - value: 26, - }, - Signal { - name: "PROF", - value: 27, - }, - Signal { - name: "WINCH", - value: 28, - }, - Signal { - name: "POLL", - value: 29, - }, - Signal { - name: "PWR", - value: 30, - }, - Signal { - name: "SYS", - value: 31, - }, -]; - -/* - - -https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/signal.3.html - - -No Name Default Action Description -1 SIGHUP terminate process terminal line hangup -2 SIGINT terminate process interrupt program -3 SIGQUIT create core image quit program -4 SIGILL create core image illegal instruction -5 SIGTRAP create core image trace trap -6 SIGABRT create core image abort program (formerly SIGIOT) -7 SIGEMT create core image emulate instruction executed -8 SIGFPE create core image floating-point exception -9 SIGKILL terminate process kill program -10 SIGBUS create core image bus error -11 SIGSEGV create core image segmentation violation -12 SIGSYS create core image non-existent system call invoked -13 SIGPIPE terminate process write on a pipe with no reader -14 SIGALRM terminate process real-time timer expired -15 SIGTERM terminate process software termination signal -16 SIGURG discard signal urgent condition present on socket -17 SIGSTOP stop process stop (cannot be caught or ignored) -18 SIGTSTP stop process stop signal generated from keyboard -19 SIGCONT discard signal continue after stop -20 SIGCHLD discard signal child status has changed -21 SIGTTIN stop process background read attempted from control terminal -22 SIGTTOU stop process background write attempted to control terminal -23 SIGIO discard signal I/O is possible on a descriptor (see fcntl(2)) -24 SIGXCPU terminate process cpu time limit exceeded (see setrlimit(2)) -25 SIGXFSZ terminate process file size limit exceeded (see setrlimit(2)) -26 SIGVTALRM terminate process virtual time alarm (see setitimer(2)) -27 SIGPROF terminate process profiling timer alarm (see setitimer(2)) -28 SIGWINCH discard signal Window size change -29 SIGINFO discard signal status request from keyboard -30 SIGUSR1 terminate process User defined signal 1 -31 SIGUSR2 terminate process User defined signal 2 - -*/ - -#[cfg(any(target_os = "macos", target_os = "freebsd"))] -pub static ALL_SIGNALS: [Signal<'static>; 31] = [ - Signal { - name: "HUP", - value: 1, - }, - Signal { - name: "INT", - value: 2, - }, - Signal { - name: "QUIT", - value: 3, - }, - Signal { - name: "ILL", - value: 4, - }, - Signal { - name: "TRAP", - value: 5, - }, - Signal { - name: "ABRT", - value: 6, - }, - Signal { - name: "EMT", - value: 7, - }, - Signal { - name: "FPE", - value: 8, - }, - Signal { - name: "KILL", - value: 9, - }, - Signal { - name: "BUS", - value: 10, - }, - Signal { - name: "SEGV", - value: 11, - }, - Signal { - name: "SYS", - value: 12, - }, - Signal { - name: "PIPE", - value: 13, - }, - Signal { - name: "ALRM", - value: 14, - }, - Signal { - name: "TERM", - value: 15, - }, - Signal { - name: "URG", - value: 16, - }, - Signal { - name: "STOP", - value: 17, - }, - Signal { - name: "TSTP", - value: 18, - }, - Signal { - name: "CONT", - value: 19, - }, - Signal { - name: "CHLD", - value: 20, - }, - Signal { - name: "TTIN", - value: 21, - }, - Signal { - name: "TTOU", - value: 22, - }, - Signal { - name: "IO", - value: 23, - }, - Signal { - name: "XCPU", - value: 24, - }, - Signal { - name: "XFSZ", - value: 25, - }, - Signal { - name: "VTALRM", - value: 26, - }, - Signal { - name: "PROF", - value: 27, - }, - Signal { - name: "WINCH", - value: 28, - }, - Signal { - name: "INFO", - value: 29, - }, - Signal { - name: "USR1", - value: 30, - }, - Signal { - name: "USR2", - value: 31, - }, -]; - -pub fn signal_by_name_or_value(signal_name_or_value: &str) -> Option { - if let Ok(value) = signal_name_or_value.parse() { - if is_signal(value) { - return Some(value); - } else { - return None; - } - } - let signal_name = signal_name_or_value.trim_left_matches("SIG"); - - ALL_SIGNALS - .iter() - .find(|s| s.name == signal_name) - .map(|s| s.value) -} - -#[inline(always)] -pub fn is_signal(num: usize) -> bool { - // Named signals start at 1 - num <= ALL_SIGNALS.len() -} - -#[test] -fn signals_all_contiguous() { - for (i, signal) in ALL_SIGNALS.iter().enumerate() { - assert_eq!(signal.value, i + 1); - } -} - -#[test] -fn signals_all_are_signal() { - for signal in &ALL_SIGNALS { - assert!(is_signal(signal.value)); - } -} - -#[test] -fn signal_by_value() { - assert_eq!(signal_by_name_or_value("0"), Some(0)); - for signal in &ALL_SIGNALS { - assert_eq!( - signal_by_name_or_value(&signal.value.to_string()), - Some(signal.value) - ); - } -} - -#[test] -fn signal_by_short_name() { - for signal in &ALL_SIGNALS { - assert_eq!(signal_by_name_or_value(signal.name), Some(signal.value)); - } -} - -#[test] -fn signal_by_long_name() { - for signal in &ALL_SIGNALS { - assert_eq!( - signal_by_name_or_value(&format!("SIG{}", signal.name)), - Some(signal.value) - ); - } -} diff --git a/src/uucore/utmpx.rs b/src/uucore/utmpx.rs deleted file mode 100644 index 2cb460fc3..000000000 --- a/src/uucore/utmpx.rs +++ /dev/null @@ -1,271 +0,0 @@ -// This file is part of the uutils coreutils package. -// -// (c) Jian Zeng -// -// For the full copyright and license information, please view the LICENSE -// file that was distributed with this source code. -// -//! Aims to provide platform-independent methods to obtain login records -//! -//! **ONLY** support linux, macos and freebsd for the time being -//! -//! # Examples: -//! -//! ``` -//! use uucore::utmpx::Utmpx; -//! for ut in Utmpx::iter_all_records() { -//! if ut.is_user_process() { -//! println!("{}: {}", ut.host(), ut.user()) -//! } -//! } -//! ``` -//! -//! Specifying the path to login record: -//! -//! ``` -//! use uucore::utmpx::Utmpx; -//! for ut in Utmpx::iter_all_records().read_from("/some/where/else") { -//! if ut.is_user_process() { -//! println!("{}: {}", ut.host(), ut.user()) -//! } -//! } -//! ``` - -use super::libc; -pub extern crate time; -use self::time::{Timespec, Tm}; - -use std::io::Result as IOResult; -use std::io::Error as IOError; -use std::ptr; -use std::ffi::CString; - -pub use self::ut::*; -use libc::utmpx; -// pub use libc::getutxid; -// pub use libc::getutxline; -// pub use libc::pututxline; -pub use libc::getutxent; -pub use libc::setutxent; -pub use libc::endutxent; -#[cfg(any(target_os = "macos", target_os = "linux"))] -pub use libc::utmpxname; -#[cfg(target_os = "freebsd")] -pub unsafe extern "C" fn utmpxname(_file: *const libc::c_char) -> libc::c_int { - 0 -} - -// In case the c_char array doesn't end with NULL -macro_rules! chars2string { - ($arr:expr) => ( - $arr.iter().take_while(|i| **i > 0).map(|&i| i as u8 as char).collect::() - ) -} - -#[cfg(target_os = "linux")] -mod ut { - pub static DEFAULT_FILE: &str = "/var/run/utmp"; - - pub use libc::__UT_LINESIZE as UT_LINESIZE; - pub use libc::__UT_NAMESIZE as UT_NAMESIZE; - pub use libc::__UT_HOSTSIZE as UT_HOSTSIZE; - pub const UT_IDSIZE: usize = 4; - - pub use libc::EMPTY; - pub use libc::RUN_LVL; - pub use libc::BOOT_TIME; - pub use libc::NEW_TIME; - pub use libc::OLD_TIME; - pub use libc::INIT_PROCESS; - pub use libc::LOGIN_PROCESS; - pub use libc::USER_PROCESS; - pub use libc::DEAD_PROCESS; - pub use libc::ACCOUNTING; -} - -#[cfg(target_os = "macos")] -mod ut { - pub static DEFAULT_FILE: &str = "/var/run/utmpx"; - - pub use libc::_UTX_LINESIZE as UT_LINESIZE; - pub use libc::_UTX_USERSIZE as UT_NAMESIZE; - pub use libc::_UTX_HOSTSIZE as UT_HOSTSIZE; - pub use libc::_UTX_IDSIZE as UT_IDSIZE; - - pub use libc::EMPTY; - pub use libc::RUN_LVL; - pub use libc::BOOT_TIME; - pub use libc::NEW_TIME; - pub use libc::OLD_TIME; - pub use libc::INIT_PROCESS; - pub use libc::LOGIN_PROCESS; - pub use libc::USER_PROCESS; - pub use libc::DEAD_PROCESS; - pub use libc::ACCOUNTING; - pub use libc::SIGNATURE; - pub use libc::SHUTDOWN_TIME; -} - -#[cfg(target_os = "freebsd")] -mod ut { - use super::libc; - - pub static DEFAULT_FILE: &str = ""; - - pub const UT_LINESIZE: usize = 16; - pub const UT_NAMESIZE: usize = 32; - pub const UT_IDSIZE: usize = 8; - pub const UT_HOSTSIZE: usize = 128; - - pub use libc::EMPTY; - pub use libc::BOOT_TIME; - pub use libc::OLD_TIME; - pub use libc::NEW_TIME; - pub use libc::USER_PROCESS; - pub use libc::INIT_PROCESS; - pub use libc::LOGIN_PROCESS; - pub use libc::DEAD_PROCESS; - pub use libc::SHUTDOWN_TIME; -} - -pub struct Utmpx { - inner: utmpx, -} - -impl Utmpx { - /// A.K.A. ut.ut_type - pub fn record_type(&self) -> i16 { - self.inner.ut_type as i16 - } - /// A.K.A. ut.ut_pid - pub fn pid(&self) -> i32 { - self.inner.ut_pid as i32 - } - /// A.K.A. ut.ut_id - pub fn terminal_suffix(&self) -> String { - chars2string!(self.inner.ut_id) - } - /// A.K.A. ut.ut_user - pub fn user(&self) -> String { - chars2string!(self.inner.ut_user) - } - /// A.K.A. ut.ut_host - pub fn host(&self) -> String { - chars2string!(self.inner.ut_host) - } - /// A.K.A. ut.ut_line - pub fn tty_device(&self) -> String { - chars2string!(self.inner.ut_line) - } - /// A.K.A. ut.ut_tv - pub fn login_time(&self) -> Tm { - time::at(Timespec::new( - self.inner.ut_tv.tv_sec as i64, - self.inner.ut_tv.tv_usec as i32, - )) - } - /// A.K.A. ut.ut_exit - /// - /// Return (e_termination, e_exit) - #[cfg(any(target_os = "linux", target_os = "android"))] - pub fn exit_status(&self) -> (i16, i16) { - (self.inner.ut_exit.e_termination, self.inner.ut_exit.e_exit) - } - /// A.K.A. ut.ut_exit - /// - /// Return (0, 0) on Non-Linux platform - #[cfg(not(any(target_os = "linux", target_os = "android")))] - pub fn exit_status(&self) -> (i16, i16) { - (0, 0) - } - /// Consumes the `Utmpx`, returning the underlying C struct utmpx - pub fn into_inner(self) -> utmpx { - self.inner - } - pub fn is_user_process(&self) -> bool { - !self.user().is_empty() && self.record_type() == USER_PROCESS - } - - /// Canonicalize host name using DNS - pub fn canon_host(&self) -> IOResult { - const AI_CANONNAME: libc::c_int = 0x2; - let host = self.host(); - let host = host.split(':').nth(0).unwrap(); - let hints = libc::addrinfo { - ai_flags: AI_CANONNAME, - ai_family: 0, - ai_socktype: 0, - ai_protocol: 0, - ai_addrlen: 0, - ai_addr: ptr::null_mut(), - ai_canonname: ptr::null_mut(), - ai_next: ptr::null_mut(), - }; - let c_host = CString::new(host).unwrap(); - let mut res = ptr::null_mut(); - let status = unsafe { - libc::getaddrinfo( - c_host.as_ptr(), - ptr::null(), - &hints as *const _, - &mut res as *mut _, - ) - }; - if status == 0 { - let info: libc::addrinfo = unsafe { ptr::read(res as *const _) }; - // http://lists.gnu.org/archive/html/bug-coreutils/2006-09/msg00300.html - // says Darwin 7.9.0 getaddrinfo returns 0 but sets - // res->ai_canonname to NULL. - let ret = if info.ai_canonname.is_null() { - Ok(String::from(host)) - } else { - Ok(unsafe { CString::from_raw(info.ai_canonname).into_string().unwrap() }) - }; - unsafe { - libc::freeaddrinfo(res); - } - ret - } else { - Err(IOError::last_os_error()) - } - } - pub fn iter_all_records() -> UtmpxIter { - UtmpxIter - } -} - -/// Iterator of login records -pub struct UtmpxIter; - -impl UtmpxIter { - /// Sets the name of the utmpx-format file for the other utmpx functions to access. - /// - /// If not set, default record file will be used(file path depends on the target OS) - pub fn read_from(self, f: &str) -> Self { - let res = unsafe { utmpxname(CString::new(f).unwrap().as_ptr()) }; - if res != 0 { - println!("Warning: {}", IOError::last_os_error()); - } - unsafe { - setutxent(); - } - self - } -} - -impl Iterator for UtmpxIter { - type Item = Utmpx; - fn next(&mut self) -> Option { - unsafe { - let res = getutxent(); - if !res.is_null() { - Some(Utmpx { - inner: ptr::read(res as *const _), - }) - } else { - endutxent(); - None - } - } - } -} diff --git a/src/uucore/wide.rs b/src/uucore/wide.rs deleted file mode 100644 index 23088183b..000000000 --- a/src/uucore/wide.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file is part of the uutils coreutils package. - * - * (c) Peter Atashian - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -use std::ffi::{OsStr, OsString}; -use std::os::windows::ffi::{OsStrExt, OsStringExt}; -pub trait ToWide { - fn to_wide(&self) -> Vec; - fn to_wide_null(&self) -> Vec; -} -impl ToWide for T -where - T: AsRef, -{ - fn to_wide(&self) -> Vec { - self.as_ref().encode_wide().collect() - } - fn to_wide_null(&self) -> Vec { - self.as_ref().encode_wide().chain(Some(0)).collect() - } -} -pub trait FromWide { - fn from_wide(wide: &[u16]) -> Self; - fn from_wide_null(wide: &[u16]) -> Self; -} -impl FromWide for String { - fn from_wide(wide: &[u16]) -> String { - OsString::from_wide(wide).to_string_lossy().into_owned() - } - fn from_wide_null(wide: &[u16]) -> String { - let len = wide.iter().take_while(|&&c| c != 0).count(); - OsString::from_wide(&wide[..len]) - .to_string_lossy() - .into_owned() - } -} diff --git a/src/uucore/zero_copy/mod.rs b/src/uucore/zero_copy/mod.rs deleted file mode 100644 index 70e19a776..000000000 --- a/src/uucore/zero_copy/mod.rs +++ /dev/null @@ -1,139 +0,0 @@ -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 deleted file mode 100644 index 9d158522c..000000000 --- a/src/uucore/zero_copy/platform/default.rs +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 7de9c99ab..000000000 --- a/src/uucore/zero_copy/platform/linux.rs +++ /dev/null @@ -1,105 +0,0 @@ -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 deleted file mode 100644 index 039b94b00..000000000 --- a/src/uucore/zero_copy/platform/mod.rs +++ /dev/null @@ -1,21 +0,0 @@ -#[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 deleted file mode 100644 index 0a6fd7e24..000000000 --- a/src/uucore/zero_copy/platform/unix.rs +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index 745607267..000000000 --- a/src/uucore/zero_copy/platform/windows.rs +++ /dev/null @@ -1,19 +0,0 @@ -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/Cargo.toml b/src/wc/Cargo.toml index 88a37778a..51c59590f 100644 --- a/src/wc/Cargo.toml +++ b/src/wc/Cargo.toml @@ -10,7 +10,7 @@ path = "wc.rs" [dependencies] getopts = "0.2.18" -uucore = { path="../uucore" } +uucore = "0.0.1" [[bin]] name = "wc" diff --git a/src/who/Cargo.toml b/src/who/Cargo.toml index 64ce76612..036ba672b 100644 --- a/src/who/Cargo.toml +++ b/src/who/Cargo.toml @@ -9,7 +9,7 @@ name = "uu_who" path = "who.rs" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["utmpx"] [dependencies.clippy] diff --git a/src/whoami/Cargo.toml b/src/whoami/Cargo.toml index 2bc3c2e08..32d7771b9 100644 --- a/src/whoami/Cargo.toml +++ b/src/whoami/Cargo.toml @@ -15,7 +15,7 @@ winapi = { version = "0.3", features = ["lmcons"] } advapi32-sys = "0.2.0" [dependencies.uucore] -path = "../uucore" +version = "0.0.1" features = ["entries", "wide"] [[bin]] diff --git a/src/yes/Cargo.toml b/src/yes/Cargo.toml index 5ae7a41be..736c5ee64 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", features = ["zero-copy"] } +uucore = { version = "0.0.1", features = ["zero-copy"] } [features] latency = [] diff --git a/tests/test_env.rs b/tests/test_env.rs index 44cc6d1e9..e772e30e4 100644 --- a/tests/test_env.rs +++ b/tests/test_env.rs @@ -23,7 +23,7 @@ fn test_echo() { println!("stderr={:?}", result.stderr); assert!(result.success); - let out = result.stdout.trim_right(); + let out = result.stdout.trim_end(); assert_eq!(out, "FOO-bar"); }