diff --git a/.cargo/config b/.cargo/config index 35da7a485..a4dc4b423 100644 --- a/.cargo/config +++ b/.cargo/config @@ -3,18 +3,11 @@ linker = "x86_64-unknown-redox-gcc" [target.'cfg(feature = "cargo-clippy")'] rustflags = [ - "-Wclippy::use_self", - "-Wclippy::needless_pass_by_value", - "-Wclippy::semicolon_if_nothing_returned", - "-Wclippy::single_char_pattern", - "-Wclippy::explicit_iter_loop", + "-Wclippy::use_self", + "-Wclippy::needless_pass_by_value", + "-Wclippy::semicolon_if_nothing_returned", + "-Wclippy::single_char_pattern", + "-Wclippy::explicit_iter_loop", + "-Wclippy::if_not_else", ] -[build] -# See https://github.com/time-rs/time/issues/293#issuecomment-1005002386. The -# unsoundness here is not in the `time` library, but in the Rust stdlib, and as -# such it needs to be fixed there. -rustflags = ["--cfg", "unsound_local_offset"] - -[target.'cfg(target_os = "linux")'] -rustflags = ["--cfg", "unsound_local_offset"] diff --git a/.clippy.toml b/.clippy.toml index 22fd4be73..bee70857b 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1 +1,2 @@ msrv = "1.64.0" +cognitive-complexity-threshold = 10 diff --git a/.config/nextest.toml b/.config/nextest.toml new file mode 100644 index 000000000..3ba8bb393 --- /dev/null +++ b/.config/nextest.toml @@ -0,0 +1,6 @@ +[profile.ci] +retries = 2 +status-level = "all" +final-status-level = "skip" +failure-output = "immediate-final" +fail-fast = false diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index c29a77873..000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "cargo" - directory: "/" - schedule: - interval: weekly - open-pull-requests-limit: 10 - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: weekly - open-pull-requests-limit: 5 diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index cf12ee2d7..b52ea5098 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -1,9 +1,9 @@ name: CICD -# spell-checker:ignore (abbrev/names) CICD CodeCOV MacOS MinGW MSVC musl -# spell-checker:ignore (env/flags) Awarnings Ccodegen Coverflow Cpanic Dwarnings RUSTDOCFLAGS RUSTFLAGS Zpanic -# spell-checker:ignore (jargon) SHAs deps dequote softprops subshell toolchain -# spell-checker:ignore (people) Peltoche rivy +# spell-checker:ignore (abbrev/names) CICD CodeCOV MacOS MinGW MSVC musl taiki +# spell-checker:ignore (env/flags) Awarnings Ccodegen Coverflow Cpanic Dwarnings RUSTDOCFLAGS RUSTFLAGS Zpanic CARGOFLAGS +# spell-checker:ignore (jargon) SHAs deps dequote softprops subshell toolchain fuzzers +# spell-checker:ignore (people) Peltoche rivy dtolnay # spell-checker:ignore (shell/tools) choco clippy dmake dpkg esac fakeroot fdesc fdescfs gmake grcov halium lcov libssl mkdir popd printf pushd rsync rustc rustfmt rustup shopt utmpdump xargs # spell-checker:ignore (misc) aarch alnum armhf bindir busytest coreutils defconfig DESTDIR gecos gnueabihf issuecomment maint multisize nullglob onexitbegin onexitend pell runtest Swatinem tempfile testsuite toybox uutils @@ -37,8 +37,6 @@ jobs: ## ToDO: [2021-11-10; rivy] 'Style/deps' needs more informative output and better integration of results into the GHA dashboard name: Style/deps runs-on: ${{ matrix.job.os }} - # env: - # STYLE_FAIL_ON_FAULT: false # overrides workflow default strategy: fail-fast: false matrix: @@ -50,6 +48,11 @@ jobs: - { os: windows-latest , features: feat_os_windows } steps: - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@nightly + ## note: requires 'nightly' toolchain b/c `cargo-udeps` uses the `rustc` '-Z save-analysis' option + ## * ... ref: + - uses: taiki-e/install-action@cargo-udeps + - uses: Swatinem/rust-cache@v2 - name: Initialize workflow variables id: vars shell: bash @@ -67,17 +70,6 @@ jobs: CARGO_FEATURES_OPTION='' ; if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi outputs CARGO_FEATURES_OPTION - ## note: requires 'nightly' toolchain b/c `cargo-udeps` uses the `rustc` '-Z save-analysis' option - ## * ... ref: - - name: Install `rust` toolchain - run: | - rustup toolchain install nightly --no-self-update --profile minimal - rustup default nightly - - uses: Swatinem/rust-cache@v2 - - name: Install `cargo-udeps` - run: cargo install cargo-udeps - env: - RUSTUP_TOOLCHAIN: stable - name: Detect unused dependencies shell: bash run: | @@ -93,8 +85,6 @@ jobs: style_format: name: Style/format runs-on: ${{ matrix.job.os }} - # env: - # STYLE_FAIL_ON_FAULT: false # overrides workflow default strategy: fail-fast: false matrix: @@ -102,6 +92,11 @@ jobs: - { os: ubuntu-latest , features: feat_os_unix } steps: - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: rustfmt + - uses: Swatinem/rust-cache@v2 - name: Initialize workflow variables id: vars shell: bash @@ -119,12 +114,6 @@ jobs: CARGO_FEATURES_OPTION='' ; if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi outputs CARGO_FEATURES_OPTION - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update -c rustfmt --profile minimal - rustup default stable - - uses: Swatinem/rust-cache@v2 - name: "`cargo fmt` testing" shell: bash run: | @@ -136,11 +125,48 @@ jobs: S=$(cargo fmt -- --check) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s\n" "$S" | sed -E -n -e "s/^Diff[[:space:]]+in[[:space:]]+${PWD//\//\\/}\/(.*)[[:space:]]+at[[:space:]]+[^0-9]+([0-9]+).*$/::${fault_type} file=\1,line=\2::${fault_prefix}: \`cargo fmt\`: style violation (file:'\1', line:\2; use \`cargo fmt -- \"\1\"\`)/p" ; fault=true ; } if [ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ] && [ -n "$fault" ]; then exit 1 ; fi + fuzz: + name: Run the fuzzers + runs-on: ubuntu-latest + env: + RUN_FOR: 60 + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@nightly + - name: Install `cargo-fuzz` + run: cargo install cargo-fuzz + - uses: Swatinem/rust-cache@v2 + - name: Run fuzz_date for XX seconds + shell: bash + run: | + ## Run it + cd fuzz + cargo +nightly fuzz run fuzz_date -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 + - name: Run fuzz_parse_glob for XX seconds + shell: bash + run: | + ## Run it + cd fuzz + cargo +nightly fuzz run fuzz_parse_glob -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 + - name: Run fuzz_parse_size for XX seconds + shell: bash + run: | + ## Run it + cd fuzz + cargo +nightly fuzz run fuzz_parse_size -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 + - name: Run fuzz_parse_time for XX seconds + shell: bash + run: | + ## Run it + cd fuzz + cargo +nightly fuzz run fuzz_parse_time -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0 + style_lint: name: Style/lint runs-on: ${{ matrix.job.os }} - # env: - # STYLE_FAIL_ON_FAULT: false # overrides workflow default + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" strategy: fail-fast: false matrix: @@ -150,6 +176,13 @@ jobs: - { os: windows-latest , features: feat_os_windows } steps: - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: clippy + - uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 - name: Initialize workflow variables id: vars shell: bash @@ -165,7 +198,7 @@ jobs: # target-specific options # * CARGO_FEATURES_OPTION CARGO_FEATURES_OPTION='--all-features' ; - if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi + if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features ${{ matrix.job.features }}' ; fi outputs CARGO_FEATURES_OPTION # * determine sub-crate utility list UTILITY_LIST="$(./util/show-utils.sh ${CARGO_FEATURES_OPTION})" @@ -179,12 +212,6 @@ jobs: case '${{ matrix.job.os }}' in macos-latest) brew install coreutils ;; # needed for show-utils.sh esac - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update -c clippy --profile minimal - rustup default stable - - uses: Swatinem/rust-cache@v2 - name: "`cargo clippy` lint testing" shell: bash run: | @@ -193,21 +220,18 @@ jobs: fault_type="${{ steps.vars.outputs.FAULT_TYPE }}" fault_prefix=$(echo "$fault_type" | tr '[:lower:]' '[:upper:]') # * convert any warnings to GHA UI annotations; ref: - S=$(cargo clippy --all-targets ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} -- -W clippy::manual_string_new -D warnings 2>&1) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*$/::${fault_type} file=\2,line=\3,col=\4::${fault_prefix}: \`cargo clippy\`: \1 (file:'\2', line:\3)/p;" -e '}' ; fault=true ; } + S=$(cargo clippy --all-targets ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} -- -W clippy::manual_string_new -D warnings 2>&1) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*$/::${fault_type} file=\2,line=\3,col=\4::${fault_prefix}: \`cargo clippy\`: \1 (file:'\2', line:\3)/p;" -e '}' ; fault=true ; } if [ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ] && [ -n "$fault" ]; then exit 1 ; fi style_spellcheck: name: Style/spelling runs-on: ${{ matrix.job.os }} - # env: - # STYLE_FAIL_ON_FAULT: false # overrides workflow default strategy: matrix: job: - { os: ubuntu-latest , features: feat_os_unix } steps: - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v2 - name: Initialize workflow variables id: vars shell: bash @@ -247,6 +271,9 @@ jobs: doc_warnings: name: Documentation/warnings runs-on: ${{ matrix.job.os }} + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" strategy: fail-fast: false matrix: @@ -259,6 +286,13 @@ jobs: # - { os: windows-latest , features: feat_os_windows } steps: - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: clippy + - uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 - name: Initialize workflow variables id: vars shell: bash @@ -274,34 +308,45 @@ jobs: # target-specific options # * CARGO_FEATURES_OPTION CARGO_FEATURES_OPTION='--all-features' ; - if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi + if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features ${{ matrix.job.features }}' ; fi outputs CARGO_FEATURES_OPTION # * determine sub-crate utility list UTILITY_LIST="$(./util/show-utils.sh ${CARGO_FEATURES_OPTION})" echo UTILITY_LIST=${UTILITY_LIST} CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)" outputs CARGO_UTILITY_LIST_OPTIONS - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update -c clippy --profile minimal - rustup default stable - - uses: Swatinem/rust-cache@v2 - name: "`cargo doc` with warnings" shell: bash run: | RUSTDOCFLAGS="-Dwarnings" cargo doc ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-deps --workspace --document-private-items - + - uses: DavidAnson/markdownlint-cli2-action@v10 + with: + command: fix + globs: | + *.md + docs/src/*.md + src/uu/*/*.md min_version: name: MinRustV # Minimum supported rust version (aka, MinSRV or MSRV) runs-on: ${{ matrix.job.os }} + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" strategy: matrix: job: - { os: ubuntu-latest , features: feat_os_unix } steps: - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_MIN_SRV }} + components: rustfmt + - uses: taiki-e/install-action@nextest + - uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 - name: Initialize workflow variables id: vars shell: bash @@ -313,12 +358,6 @@ jobs: unset CARGO_FEATURES_OPTION if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi outputs CARGO_FEATURES_OPTION - - name: Install `rust` toolchain (v${{ env.RUST_MIN_SRV }}) - run: | - ## Install `rust` toolchain (v${{ env.RUST_MIN_SRV }}) - rustup toolchain install --no-self-update ${{ env.RUST_MIN_SRV }} --profile minimal - rustup default ${{ env.RUST_MIN_SRV }} - - uses: Swatinem/rust-cache@v2 - name: Confirm MinSRV compatible 'Cargo.lock' shell: bash run: | @@ -353,9 +392,9 @@ jobs: RUSTUP_TOOLCHAIN=stable cargo fetch --locked --quiet RUSTUP_TOOLCHAIN=stable cargo tree --all --locked --no-dev-dependencies --no-indent ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} | grep -vE "$PWD" | sort --unique - name: Test - run: cargo test -v ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} -p uucore -p coreutils + run: cargo nextest run --hide-progress-bar --profile ci ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} -p uucore -p coreutils env: - RUSTFLAGS: "-Awarnings --cfg unsound_local_offset" + RUSTFLAGS: "-Awarnings" RUST_BACKTRACE: "1" deps: @@ -368,11 +407,7 @@ jobs: - { os: ubuntu-latest , features: feat_os_unix } steps: - uses: actions/checkout@v3 - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update --profile minimal - rustup default stable + - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - name: "`cargo update` testing" shell: bash @@ -385,6 +420,9 @@ jobs: name: Build/Makefile needs: [ min_version, deps ] runs-on: ${{ matrix.job.os }} + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" strategy: fail-fast: false matrix: @@ -392,29 +430,39 @@ jobs: - { os: ubuntu-latest , features: feat_os_unix } steps: - uses: actions/checkout@v3 - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update --profile minimal - rustup default stable + - uses: dtolnay/rust-toolchain@stable + - uses: taiki-e/install-action@nextest - uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 - name: "`make build`" shell: bash run: | make build - - name: "`make test`" + - name: "`make nextest`" shell: bash - run: | - make test + run: make nextest CARGOFLAGS="--profile ci --hide-progress-bar" + env: + RUST_BACKTRACE: "1" + - name: "`make install`" + shell: bash + run: | + DESTDIR=/tmp/ make PROFILE=release install + # Check that the manpage is present + test -f /tmp/usr/local/share/man/man1/whoami.1 + # Check that the completion is present + test -f /tmp/usr/local/share/zsh/site-functions/_install env: RUST_BACKTRACE: "1" - build_rust_stable: name: Build/stable needs: [ min_version, deps ] runs-on: ${{ matrix.job.os }} timeout-minutes: 90 + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" strategy: fail-fast: false matrix: @@ -424,14 +472,13 @@ jobs: - { os: windows-latest , features: feat_os_windows } steps: - uses: actions/checkout@v3 - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update --profile minimal - rustup default stable + - uses: dtolnay/rust-toolchain@stable + - uses: taiki-e/install-action@nextest - uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 - name: Test - run: cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} + run: cargo nextest run --hide-progress-bar --profile ci ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} env: RUST_BACKTRACE: "1" @@ -440,6 +487,9 @@ jobs: needs: [ min_version, deps ] runs-on: ${{ matrix.job.os }} timeout-minutes: 90 + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" strategy: fail-fast: false matrix: @@ -449,14 +499,13 @@ jobs: - { os: windows-latest , features: feat_os_windows } steps: - uses: actions/checkout@v3 - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install nightly --no-self-update --profile minimal - rustup default nightly + - uses: dtolnay/rust-toolchain@nightly + - uses: taiki-e/install-action@nextest - uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 - name: Test - run: cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} + run: cargo nextest run --hide-progress-bar --profile ci ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} env: RUST_BACKTRACE: "1" @@ -464,6 +513,9 @@ jobs: name: Binary sizes needs: [ min_version, deps ] runs-on: ${{ matrix.job.os }} + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" strategy: fail-fast: false matrix: @@ -471,18 +523,16 @@ jobs: - { os: ubuntu-latest , features: feat_os_unix } steps: - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 - name: Install dependencies shell: bash run: | ## Install dependencies sudo apt-get update sudo apt-get install jq - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rustup toolchain install stable --no-self-update --profile minimal - rustup default stable - - uses: Swatinem/rust-cache@v2 - name: "`make install`" shell: bash run: | @@ -495,15 +545,70 @@ jobs: shell: bash run: | ## Compute uutil release sizes - SIZE=$(du -s target/size-release/usr/local/bin/|awk '{print $1}') - SIZE_MULTI=$(du -s target/size-multi-release/usr/local/bin/|awk '{print $1}') + DATE=$(date --rfc-email) + find target/size-release/usr/local/bin -type f -printf '%f\0' | sort -z | + while IFS= read -r -d '' name; do + size=$(du -s target/size-release/usr/local/bin/$name | awk '{print $1}') + echo "\"$name\"" + echo "$size" + done | \ + jq -n \ + --arg date "$DATE" \ + --arg sha "$GITHUB_SHA" \ + 'reduce inputs as $name ({}; . + { ($name): input }) | { ($date): {sha: $sha, sizes: map_values(.)} }' > individual-size-result.json + SIZE=$(cat individual-size-result.json | jq '[.[] | .sizes | .[]] | reduce .[] as $num (0; . + $num)') + SIZE_MULTI=$(du -s target/size-multi-release/usr/local/bin/coreutils | awk '{print $1}') jq -n \ - --arg date "$(date --rfc-email)" \ + --arg date "$DATE" \ --arg sha "$GITHUB_SHA" \ --arg size "$SIZE" \ --arg multisize "$SIZE_MULTI" \ '{($date): { sha: $sha, size: $size, multisize: $multisize, }}' > size-result.json - - uses: actions/upload-artifact@v3 + - name: Download the previous individual size result + uses: dawidd6/action-download-artifact@v2 + with: + workflow: CICD.yml + name: individual-size-result + repo: uutils/coreutils + path: dl + - name: Download the previous size result + uses: dawidd6/action-download-artifact@v2 + with: + workflow: CICD.yml + name: size-result + repo: uutils/coreutils + path: dl + - name: Check uutil release sizes + shell: bash + run: | + check() { + # Warn if the size increases by more than 5% + threshold='1.05' + ratio=$(jq -n "$2 / $3") + echo "$1: size=$2, previous_size=$3, ratio=$ratio, threshold=$threshold" + if [[ "$(jq -n "$ratio > $threshold")" == 'true' ]]; then + echo "::warning file=$4::Size of $1 increases by more than 5%" + fi + } + ## Check individual size result + while read -r name previous_size; do + size=$(cat individual-size-result.json | jq -r ".[] | .sizes | .\"$name\"") + check "\`$name\` binary" "$size" "$previous_size" 'individual-size-result.json' + done < <(cat dl/individual-size-result.json | jq -r '.[] | .sizes | to_entries[] | "\(.key) \(.value)"') + ## Check size result + size=$(cat size-result.json | jq -r '.[] | .size') + previous_size=$(cat dl/size-result.json | jq -r '.[] | .size') + check 'multiple binaries' "$size" "$previous_size" 'size-result.json' + multisize=$(cat size-result.json | jq -r '.[] | .multisize') + previous_multisize=$(cat dl/size-result.json | jq -r '.[] | .multisize') + check 'multicall binary' "$multisize" "$previous_multisize" 'size-result.json' + - name: Upload the individual size result + uses: actions/upload-artifact@v3 + with: + name: individual-size-result + path: individual-size-result.json + - name: Upload the size result + uses: actions/upload-artifact@v3 with: name: size-result path: size-result.json @@ -518,6 +623,8 @@ jobs: timeout-minutes: 90 env: DOCKER_OPTS: '--volume /etc/passwd:/etc/passwd --volume /etc/group:/etc/group' + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" strategy: fail-fast: false matrix: @@ -525,25 +632,26 @@ jobs: # { os , target , cargo-options , features , use-cross , toolchain } - { os: ubuntu-latest , target: arm-unknown-linux-gnueabihf, features: feat_os_unix_gnueabihf, use-cross: use-cross, } - { os: ubuntu-latest , target: aarch64-unknown-linux-gnu , features: feat_os_unix_gnueabihf , use-cross: use-cross } - - { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } # - { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: feat_selinux , use-cross: use-cross } - # - { os: ubuntu-18.04 , target: i586-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } ## note: older windows platform; not required, dev-FYI only - # - { os: ubuntu-18.04 , target: i586-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } ## note: older windows platform; not required, dev-FYI only - { os: ubuntu-latest , target: i686-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } - { os: ubuntu-latest , target: i686-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross } - { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } - { os: ubuntu-latest , target: x86_64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross } - # Commented until https://github.com/uutils/coreutils/issues/3210 is fixed - #- { os: ubuntu-18.04 , target: i686-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } - #- { os: ubuntu-18.04 , target: i686-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross } - #- { os: ubuntu-18.04 , target: x86_64-unknown-linux-gnu , features: feat_os_unix , use-cross: use-cross } - #- { os: ubuntu-18.04 , target: x86_64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross } - { os: macos-latest , target: x86_64-apple-darwin , features: feat_os_macos } - { os: windows-latest , target: i686-pc-windows-msvc , features: feat_os_windows } - { os: windows-latest , target: x86_64-pc-windows-gnu , features: feat_os_windows } ## note: requires rust >= 1.43.0 to link correctly - { os: windows-latest , target: x86_64-pc-windows-msvc , features: feat_os_windows } steps: - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_MIN_SRV }} + targets: ${{ matrix.job.target }} + - uses: Swatinem/rust-cache@v2 + with: + key: "${{ matrix.job.os }}_${{ matrix.job.target }}" + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 - name: Initialize workflow variables id: vars shell: bash @@ -619,8 +727,7 @@ jobs: outputs CARGO_CMD # ** pass needed environment into `cross` container (iff `cross` not already configured via "Cross.toml") if [ "${CARGO_CMD}" = 'cross' ] && [ ! -e "Cross.toml" ] ; then - cargo install --version 0.2.1 cross - printf "[build.env]\npassthrough = [\"CI\", \"RUST_BACKTRACE\"]\n" > Cross.toml + printf "[build.env]\npassthrough = [\"CI\", \"RUST_BACKTRACE\", \"CARGO_TERM_COLOR\"]\n" > Cross.toml fi # * test only library and/or binaries for arm-type targets unset CARGO_TEST_OPTIONS ; case '${{ matrix.job.target }}' in aarch64-* | arm-*) CARGO_TEST_OPTIONS="--bins" ;; esac; @@ -633,6 +740,10 @@ jobs: *-pc-windows-msvc) STRIP="" ;; esac; outputs STRIP + - uses: taiki-e/install-action@v2 + if: steps.vars.outputs.CARGO_CMD == 'cross' + with: + tool: cross@0.2.1 - name: Create all needed build/work directories shell: bash run: | @@ -666,14 +777,6 @@ jobs: echo "foo" > /home/runner/.plan ;; esac - - name: rust toolchain ~ install - run: | - ## rust toolchain ~ install - rustup toolchain install --no-self-update ${{ env.RUST_MIN_SRV }} -t ${{ matrix.job.target }} --profile minimal - rustup default ${{ env.RUST_MIN_SRV }} - - uses: Swatinem/rust-cache@v2 - with: - key: ${{ matrix.job.os }}-${{ matrix.job.target }} - name: Initialize toolchain-dependent workflow variables id: dep_vars shell: bash @@ -783,6 +886,9 @@ jobs: name: Tests/BusyBox test suite needs: [ min_version, deps ] runs-on: ${{ matrix.job.os }} + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" strategy: fail-fast: false matrix: @@ -797,6 +903,8 @@ jobs: echo "TEST_SUMMARY_FILE=busybox-result.json" >> $GITHUB_OUTPUT - uses: actions/checkout@v3 - uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 - name: Install/setup prerequisites shell: bash run: | @@ -856,6 +964,9 @@ jobs: name: Tests/Toybox test suite needs: [ min_version, deps ] runs-on: ${{ matrix.job.os }} + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" strategy: fail-fast: false matrix: @@ -871,12 +982,13 @@ jobs: TEST_SUMMARY_FILE="toybox-result.json" outputs TEST_SUMMARY_FILE - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_MIN_SRV }} + components: rustfmt - uses: Swatinem/rust-cache@v2 - - name: rust toolchain ~ install - run: | - ## rust toolchain ~ install - rustup toolchain install --no-self-update ${{ env.RUST_MIN_SRV }} --profile minimal - rustup default ${{ env.RUST_MIN_SRV }} + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 - name: Build coreutils as multiple binaries shell: bash run: | @@ -936,150 +1048,40 @@ jobs: name: toybox-result.json path: ${{ steps.vars.outputs.TEST_SUMMARY_FILE }} - test_android: - name: Test Android builds - needs: [ min_version, deps ] - runs-on: macos-latest - timeout-minutes: 90 - strategy: - fail-fast: false - matrix: - api-level: [28] - target: [default] - arch: [x86] # , arm64-v8a - env: - TERMUX: v0.118.0 + toml_format: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: AVD cache - uses: actions/cache@v3 - id: avd-cache - with: - path: | - ~/.android/avd/* - ~/.android/avd/*/snapshots/* - ~/.android/adb* - key: avd-${{ matrix.api-level }}-${{ matrix.arch }}+termux-${{ env.TERMUX }} - - name: Create and cache emulator image - if: steps.avd-cache.outputs.cache-hit != 'true' - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - target: ${{ matrix.target }} - arch: ${{ matrix.arch }} - ram-size: 2048M - disk-size: 5120M - force-avd-creation: true - emulator-options: -no-snapshot-load -noaudio -no-boot-anim -camera-back none - script: | - wget https://github.com/termux/termux-app/releases/download/${{ env.TERMUX }}/termux-app_${{ env.TERMUX }}+github-debug_${{ matrix.arch }}.apk - util/android-commands.sh snapshot termux-app_${{ env.TERMUX }}+github-debug_${{ matrix.arch }}.apk - adb -s emulator-5554 emu avd snapshot save ${{ matrix.api-level }}-${{ matrix.arch }}+termux-${{ env.TERMUX }} - echo "Emulator image created." - pkill -9 qemu-system-x86_64 - - name: Build and Test on Android - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - target: ${{ matrix.target }} - arch: ${{ matrix.arch }} - ram-size: 2048M - disk-size: 5120M - force-avd-creation: false - emulator-options: -no-snapshot-save -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -snapshot ${{ matrix.api-level }}-${{ matrix.arch }}+termux-${{ env.TERMUX }} - script: | - util/android-commands.sh sync - util/android-commands.sh build - util/android-commands.sh tests + - name: Clone repository + uses: actions/checkout@v3 - test_freebsd: - name: Tests/FreeBSD test suite - needs: [ min_version, deps ] - runs-on: ${{ matrix.job.os }} - timeout-minutes: 90 - strategy: - fail-fast: false - matrix: - job: - - { os: macos-12 , features: unix } ## GHA MacOS-11.0 VM won't have VirtualBox; refs: , - env: - mem: 4096 - steps: - - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v2 - - name: Prepare, build and test - ## spell-checker:ignore (ToDO) sshfs usesh vmactions - uses: vmactions/freebsd-vm@v0.3.0 - with: - usesh: true - # sync: sshfs - prepare: pkg install -y curl gmake sudo - run: | - ## Prepare, build, and test - # implementation modelled after ref: - # * NOTE: All steps need to be run in this block, otherwise, we are operating back on the mac host - set -e - # - # We need a file-descriptor file system to test test_ls::test_ls_io_errors - mount -t fdescfs fdesc /dev/fd - # - TEST_USER=tester - REPO_NAME=${GITHUB_WORKSPACE##*/} - WORKSPACE_PARENT="/Users/runner/work/${REPO_NAME}" - WORKSPACE="${WORKSPACE_PARENT}/${REPO_NAME}" - # - pw adduser -n ${TEST_USER} -d /root/ -g wheel -c "Coreutils user to build" -w random - # chown -R ${TEST_USER}:wheel /root/ "${WORKSPACE_PARENT}"/ - chown -R ${TEST_USER}:wheel /root/ "/Users/runner/work/${REPO_NAME}"/ - whoami - # - # Further work needs to be done in a sudo as we are changing users - sudo -i -u ${TEST_USER} sh << EOF - set -e - whoami - curl https://sh.rustup.rs -sSf --output rustup.sh - sh rustup.sh -y --profile=minimal - . $HOME/.cargo/env - ## Info - # environment - echo "## environment" - echo "CI='${CI}'" - echo "REPO_NAME='${REPO_NAME}'" - echo "TEST_USER='${TEST_USER}'" - echo "WORKSPACE_PARENT='${WORKSPACE_PARENT}'" - echo "WORKSPACE='${WORKSPACE}'" - env | sort - # tooling info - echo "## tooling info" - cargo -V - rustc -V - # - # To ensure that files are cleaned up, we don't want to exit on error - set +e - cd "${WORKSPACE}" - unset FAULT - cargo build || FAULT=1 - export RUST_BACKTRACE=1 - if (test -z "\$FAULT"); then cargo test --features '${{ matrix.job.features }}' || FAULT=1 ; fi - if (test -z "\$FAULT"); then cargo test --all-features -p uucore || FAULT=1 ; fi - # Clean to avoid to rsync back the files - cargo clean - if (test -n "\$FAULT"); then exit 1 ; fi - EOF + - name: Check + run: npx --yes @taplo/cli fmt --check coverage: name: Code Coverage runs-on: ${{ matrix.job.os }} timeout-minutes: 90 + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" strategy: fail-fast: false matrix: job: - - { os: ubuntu-latest , features: unix } - - { os: macos-latest , features: macos } - - { os: windows-latest , features: windows } + - { os: ubuntu-latest , features: unix, toolchain: nightly } + - { os: macos-latest , features: macos, toolchain: nightly } + - { os: windows-latest , features: windows, toolchain: nightly-x86_64-pc-windows-gnu } steps: - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.job.toolchain }} + components: rustfmt + - uses: taiki-e/install-action@nextest + - uses: taiki-e/install-action@grcov + - uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 # - name: Reattach HEAD ## may be needed for accurate code coverage info # run: git checkout ${{ github.head_ref }} - name: Initialize workflow variables @@ -1128,12 +1130,6 @@ jobs: echo "foo" > /home/runner/.plan ;; esac - - name: rust toolchain ~ install - run: | - ## rust toolchain ~ install - rustup toolchain install ${{ steps.vars.outputs.TOOLCHAIN }} --no-self-update --profile minimal - rustup default ${{ steps.vars.outputs.TOOLCHAIN }} - - uses: Swatinem/rust-cache@v2 - name: Initialize toolchain-dependent workflow variables id: dep_vars shell: bash @@ -1145,35 +1141,29 @@ jobs: CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)" outputs CARGO_UTILITY_LIST_OPTIONS - name: Test uucore - run: cargo test --no-fail-fast -p uucore + run: cargo nextest run --profile ci --hide-progress-bar -p uucore env: - CARGO_INCREMENTAL: "0" RUSTC_WRAPPER: "" RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" RUSTDOCFLAGS: "-Cpanic=abort" RUST_BACKTRACE: "1" # RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }} - name: Test - run: cargo test ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-fail-fast + run: cargo nextest run --profile ci --hide-progress-bar ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} env: - CARGO_INCREMENTAL: "0" RUSTC_WRAPPER: "" RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" RUSTDOCFLAGS: "-Cpanic=abort" RUST_BACKTRACE: "1" # RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }} - name: Test individual utilities - run: cargo test --no-fail-fast ${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} + run: cargo nextest run --profile ci --hide-progress-bar ${{ steps.dep_vars.outputs.CARGO_UTILITY_LIST_OPTIONS }} env: - CARGO_INCREMENTAL: "0" RUSTC_WRAPPER: "" RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" RUSTDOCFLAGS: "-Cpanic=abort" RUST_BACKTRACE: "1" # RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }} - - name: "`grcov` ~ install" - id: build_grcov - run: cargo install grcov - name: Generate coverage data (via `grcov`) id: coverage shell: bash @@ -1199,3 +1189,4 @@ jobs: flags: ${{ steps.vars.outputs.CODECOV_FLAGS }} name: codecov-umbrella fail_ci_if_error: false + diff --git a/.github/workflows/FixPR.yml b/.github/workflows/FixPR.yml index 52561fb36..e1729b173 100644 --- a/.github/workflows/FixPR.yml +++ b/.github/workflows/FixPR.yml @@ -1,6 +1,6 @@ name: FixPR -# spell-checker:ignore Swatinem +# spell-checker:ignore Swatinem dtolnay # Trigger automated fixes for PRs being merged (with associated commits) @@ -36,11 +36,7 @@ jobs: # surface MSRV from CICD workflow RUST_MIN_SRV=$(grep -P "^\s+RUST_MIN_SRV:" .github/workflows/CICD.yml | grep -Po "(?<=\x22)\d+[.]\d+(?:[.]\d+)?(?=\x22)" ) outputs RUST_MIN_SRV - - name: Install `rust` toolchain (v${{ steps.vars.outputs.RUST_MIN_SRV }}) - run: | - ## Install `rust` toolchain (v${{ steps.vars.outputs.RUST_MIN_SRV }}) - rustup toolchain install ${{ steps.vars.outputs.RUST_MIN_SRV }} --profile minimal - rustup default ${{ steps.vars.outputs.RUST_MIN_SRV }} + - uses: dtolnay/rust-toolchain@${{ steps.vars.outputs.RUST_MIN_SRV }} - uses: Swatinem/rust-cache@v2 - name: Ensure updated 'Cargo.lock' shell: bash @@ -101,12 +97,10 @@ jobs: CARGO_FEATURES_OPTION='' ; if [ -n "${{ matrix.job.features }}" ]; then CARGO_FEATURES_OPTION='--features "${{ matrix.job.features }}"' ; fi outputs CARGO_FEATURES_OPTION - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt} - rustup toolchain install stable -c rustfmt --profile minimal - rustup default stable + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: rustfmt - uses: Swatinem/rust-cache@v2 - name: "`cargo fmt`" shell: bash diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index fd2d66835..372bf0717 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -1,10 +1,10 @@ name: GnuTests -# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests +# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem # spell-checker:ignore (jargon) submodules -# spell-checker:ignore (libs/utils) autopoint chksum gperf lcov libexpect pyinotify shopt texinfo valgrind +# spell-checker:ignore (libs/utils) autopoint chksum gperf lcov libexpect pyinotify shopt texinfo valgrind libattr libcap taiki-e # spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic -# spell-checker:ignore (people) Dawid Dziurla * dawidd +# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay # spell-checker:ignore (vars) FILESET SUBDIRS XPASS # * note: to run a single test => `REPO/util/run-gnu-test.sh PATH/TO/TEST/SCRIPT` @@ -42,7 +42,7 @@ jobs: outputs path_GNU path_GNU_tests path_reference path_UUTILS # repo_default_branch="${{ github.event.repository.default_branch }}" - repo_GNU_ref="v9.1" + repo_GNU_ref="v9.3" repo_reference_branch="${{ github.event.repository.default_branch }}" outputs repo_default_branch repo_GNU_ref repo_reference_branch # @@ -58,6 +58,13 @@ jobs: uses: actions/checkout@v3 with: path: '${{ steps.vars.outputs.path_UUTILS }}' + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: rustfmt + - uses: Swatinem/rust-cache@v2 + with: + workspaces: "./${{ steps.vars.outputs.path_UUTILS }} -> target" - name: Checkout code (GNU coreutils) uses: actions/checkout@v3 with: @@ -75,18 +82,12 @@ jobs: # workflow_conclusion: success ## (default); * but, if commit with failed GnuTests is merged into the default branch, future commits will all show regression errors in GnuTests CI until o/w fixed workflow_conclusion: completed ## continually recalibrates to last commit of default branch with a successful GnuTests (ie, "self-heals" from GnuTest regressions, but needs more supervision for/of regressions) path: "${{ steps.vars.outputs.path_reference }}" - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt} - rustup toolchain install stable -c rustfmt --profile minimal - rustup default stable - name: Install dependencies shell: bash run: | ## Install dependencies sudo apt-get update - sudo apt-get install autoconf autopoint bison texinfo gperf gcc g++ gdb python3-pyinotify jq valgrind libexpect-perl + sudo apt-get install -y autoconf autopoint bison texinfo gperf gcc g++ gdb python3-pyinotify jq valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev - name: Add various locales shell: bash run: | @@ -201,9 +202,10 @@ jobs: REF_LOG_FILE='${{ steps.vars.outputs.path_reference }}/test-logs/test-suite.log' REF_SUMMARY_FILE='${{ steps.vars.outputs.path_reference }}/test-summary/gnu-result.json' REPO_DEFAULT_BRANCH='${{ steps.vars.outputs.repo_default_branch }}' + path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}' # https://github.com/uutils/coreutils/issues/4294 # https://github.com/uutils/coreutils/issues/4295 - IGNORE_INTERMITTENT='tests/tail-2/inotify-dir-recreate tests/misc/timeout tests/rm/rm1' + IGNORE_INTERMITTENT='${path_UUTILS}/.github/workflows/ignore-intermittent.txt' mkdir -p ${{ steps.vars.outputs.path_reference }} @@ -226,9 +228,17 @@ jobs: for LINE in ${REF_FAILING} do if ! grep -Fxq ${LINE}<<<"${NEW_FAILING}"; then - MSG="Congrats! The gnu test ${LINE} is no longer failing!" - echo "::warning ::$MSG" - echo $MSG >> ${COMMENT_LOG} + if ! grep ${LINE} ${IGNORE_INTERMITTENT} + then + MSG="Congrats! The gnu test ${LINE} is no longer failing!" + echo "::warning ::$MSG" + echo $MSG >> ${COMMENT_LOG} + else + MSG="Skipping an intermittent issue ${LINE}" + echo "::warning ::$MSG" + echo $MSG >> ${COMMENT_LOG} + echo "" + fi fi done for LINE in ${NEW_FAILING} @@ -305,19 +315,21 @@ jobs: with: repository: 'coreutils/coreutils' path: 'gnu' - ref: 'v9.1' + ref: 'v9.3' submodules: recursive - - name: Install `rust` toolchain - run: | - ## Install `rust` toolchain - rm -f "${HOME}/.cargo/bin/"{rustfmt,cargo-fmt} - rustup toolchain install nightly -c rustfmt --profile minimal - rustup default nightly + - uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly + components: rustfmt + - uses: taiki-e/install-action@grcov + - uses: Swatinem/rust-cache@v2 + with: + workspaces: "./uutils -> target" - name: Install dependencies run: | ## Install dependencies - sudo apt update - sudo apt install autoconf autopoint bison texinfo gperf gcc g++ gdb python3-pyinotify jq valgrind libexpect-perl -y + sudo apt-get update + sudo apt-get install -y autoconf autopoint bison texinfo gperf gcc g++ gdb python3-pyinotify jq valgrind libexpect-perl libacl1-dev libattr1-dev libcap-dev - name: Add various locales run: | ## Add various locales @@ -333,7 +345,6 @@ jobs: locale -a - name: Build binaries env: - CARGO_INCREMENTAL: "0" RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" RUSTDOCFLAGS: "-Cpanic=abort" run: | @@ -342,8 +353,6 @@ jobs: UU_MAKE_PROFILE=debug bash util/build-gnu.sh - name: Run GNU tests run: bash uutils/util/run-gnu-test.sh - - name: "`grcov` ~ install" - run: cargo install grcov - name: Generate coverage data (via `grcov`) id: coverage run: | diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 000000000..a6929b171 --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,100 @@ +name: Android + +# spell-checker:ignore TERMUX reactivecircus Swatinem noaudio pkill swiftshader dtolnay juliangruber + +on: [push, pull_request] + +permissions: + contents: read # to fetch code (actions/checkout) + +# End the current execution if there is a new changeset in the PR. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + test_android: + name: Test builds + runs-on: macos-latest + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + api-level: [28] + target: [default] + arch: [x86] # , arm64-v8a + env: + TERMUX: v0.118.0 + steps: + - uses: actions/checkout@v3 + - name: Restore AVD cache + uses: actions/cache/restore@v3 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/avd/*/snapshots/* + ~/.android/adb* + ~/__rustc_hash__ + key: avd-${{ matrix.api-level }}-${{ matrix.arch }}+termux-${{ env.TERMUX }}+nextest+rustc-hash + - name: Create and cache emulator image + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + target: ${{ matrix.target }} + arch: ${{ matrix.arch }} + ram-size: 2048M + disk-size: 7GB + force-avd-creation: true + emulator-options: -no-snapshot-load -noaudio -no-boot-anim -camera-back none + script: | + util/android-commands.sh init "${{ matrix.arch }}" "${{ matrix.api-level }}" "${{ env.TERMUX }}" + - name: Save AVD cache + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v3 + with: + path: | + ~/.android/avd/* + ~/.android/avd/*/snapshots/* + ~/.android/adb* + ~/__rustc_hash__ + key: avd-${{ matrix.api-level }}-${{ matrix.arch }}+termux-${{ env.TERMUX }}+nextest+rustc-hash + - uses: juliangruber/read-file-action@v1 + id: read_rustc_hash + with: + # ~ expansion didn't work + path: /Users/runner/__rustc_hash__ + trim: true + - name: Restore rust cache + id: rust-cache + uses: actions/cache/restore@v3 + with: + path: ~/__rust_cache__ + # The version vX at the end of the key is just a development version to avoid conflicts in + # the github cache during the development of this workflow + key: ${{ matrix.arch }}_${{ matrix.target}}_${{ steps.read_rustc_hash.outputs.content }}_${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}_v3 + - name: Build and Test + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + target: ${{ matrix.target }} + arch: ${{ matrix.arch }} + ram-size: 2048M + disk-size: 7GB + force-avd-creation: false + emulator-options: -no-snapshot-save -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -snapshot ${{ matrix.api-level }}-${{ matrix.arch }}+termux-${{ env.TERMUX }} + # This is not a usual script. Every line is executed in a separate shell with `sh -c`. If + # one of the lines returns with error the whole script is failed (like running a script with + # set -e) and in consequences the other lines (shells) are not executed. + script: | + util/android-commands.sh sync_host + util/android-commands.sh build + util/android-commands.sh tests + if [[ "${{ steps.rust-cache.outputs.cache-hit }}" != 'true' ]]; then util/android-commands.sh sync_image; fi; exit 0 + - name: Save rust cache + if: steps.rust-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v3 + with: + path: ~/__rust_cache__ + key: ${{ matrix.arch }}_${{ matrix.target}}_${{ steps.read_rustc_hash.outputs.content }}_${{ hashFiles('**/Cargo.toml', '**/Cargo.lock') }}_v3 diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml new file mode 100644 index 000000000..9507b3a56 --- /dev/null +++ b/.github/workflows/freebsd.yml @@ -0,0 +1,190 @@ +name: FreeBSD + +# spell-checker:ignore sshfs usesh vmactions taiki Swatinem esac fdescfs fdesc + +env: + # * style job configuration + STYLE_FAIL_ON_FAULT: true ## (bool) fail the build if a style job contains a fault (error or warning); may be overridden on a per-job basis + +on: [push, pull_request] + +permissions: + contents: read # to fetch code (actions/checkout) + +# End the current execution if there is a new changeset in the PR. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + style: + name: Style and Lint + runs-on: ${{ matrix.job.os }} + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + job: + - { os: macos-12 , features: unix } ## GHA MacOS-11.0 VM won't have VirtualBox; refs: , + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" + steps: + - uses: actions/checkout@v3 + - uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 + - name: Prepare, build and test + uses: vmactions/freebsd-vm@v0.3.0 + with: + usesh: true + # We need jq to run show-utils.sh and bash to use inline shell string replacement + prepare: pkg install -y curl sudo jq bash + run: | + ## Prepare, build, and test + # implementation modelled after ref: + # * NOTE: All steps need to be run in this block, otherwise, we are operating back on the mac host + set -e + # + TEST_USER=tester + REPO_NAME=${GITHUB_WORKSPACE##*/} + WORKSPACE_PARENT="/Users/runner/work/${REPO_NAME}" + WORKSPACE="${WORKSPACE_PARENT}/${REPO_NAME}" + # + pw adduser -n ${TEST_USER} -d /root/ -g wheel -c "Coreutils user to build" -w random + chown -R ${TEST_USER}:wheel /root/ "/Users/runner/work/${REPO_NAME}"/ + whoami + # + # Further work needs to be done in a sudo as we are changing users + sudo -i -u ${TEST_USER} bash << EOF + set -e + whoami + curl https://sh.rustup.rs -sSf --output rustup.sh + sh rustup.sh -y -c rustfmt,clippy --profile=minimal -t stable + . ${HOME}/.cargo/env + ## VARs setup + cd "${WORKSPACE}" + unset FAIL_ON_FAULT ; case '${{ env.STYLE_FAIL_ON_FAULT }}' in + ''|0|f|false|n|no|off) FAULT_TYPE=warning ;; + *) FAIL_ON_FAULT=true ; FAULT_TYPE=error ;; + esac; + FAULT_PREFIX=\$(echo "\${FAULT_TYPE}" | tr '[:lower:]' '[:upper:]') + # * determine sub-crate utility list + UTILITY_LIST="\$(./util/show-utils.sh --features ${{ matrix.job.features }})" + CARGO_UTILITY_LIST_OPTIONS="\$(for u in \${UTILITY_LIST}; do echo -n "-puu_\${u} "; done;)" + ## Info + # environment + echo "## environment" + echo "CI='${CI}'" + echo "REPO_NAME='${REPO_NAME}'" + echo "TEST_USER='${TEST_USER}'" + echo "WORKSPACE_PARENT='${WORKSPACE_PARENT}'" + echo "WORKSPACE='${WORKSPACE}'" + echo "FAULT_PREFIX='\${FAULT_PREFIX}'" + echo "UTILITY_LIST='\${UTILITY_LIST}'" + env | sort + # tooling info + echo "## tooling info" + cargo -V + rustc -V + # + # To ensure that files are cleaned up, we don't want to exit on error + set +e + unset FAULT + ## cargo fmt testing + echo "## cargo fmt testing" + # * convert any errors/warnings to GHA UI annotations; ref: + S=\$(cargo fmt -- --check) && printf "%s\n" "\$S" || { printf "%s\n" "\$S" ; printf "%s\n" "\$S" | sed -E -n -e "s/^Diff[[:space:]]+in[[:space:]]+\${PWD//\//\\\\/}\/(.*)[[:space:]]+at[[:space:]]+[^0-9]+([0-9]+).*\$/::\${FAULT_TYPE} file=\1,line=\2::\${FAULT_PREFIX}: \\\`cargo fmt\\\`: style violation (file:'\1', line:\2; use \\\`cargo fmt -- \"\1\"\\\`)/p" ; FAULT=true ; } + ## cargo clippy lint testing + if [ -z "\${FAULT}" ]; then + echo "## cargo clippy lint testing" + # * convert any warnings to GHA UI annotations; ref: + S=\$(cargo clippy --all-targets \${CARGO_UTILITY_LIST_OPTIONS} -- -W clippy::manual_string_new -D warnings 2>&1) && printf "%s\n" "\$S" || { printf "%s\n" "\$S" ; printf "%s" "\$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*\$/::\${FAULT_TYPE} file=\2,line=\3,col=\4::\${FAULT_PREFIX}: \\\`cargo clippy\\\`: \1 (file:'\2', line:\3)/p;" -e '}' ; FAULT=true ; } + fi + # Clean to avoid to rsync back the files + cargo clean + if [ -n "\${FAIL_ON_FAULT}" ] && [ -n "\${FAULT}" ]; then exit 1 ; fi + EOF + + test: + name: Tests + runs-on: ${{ matrix.job.os }} + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + job: + - { os: macos-12 , features: unix } ## GHA MacOS-11.0 VM won't have VirtualBox; refs: , + env: + mem: 4096 + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" + steps: + - uses: actions/checkout@v3 + - uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 + - name: Prepare, build and test + uses: vmactions/freebsd-vm@v0.3.0 + with: + usesh: true + # sync: sshfs + prepare: pkg install -y curl gmake sudo + run: | + ## Prepare, build, and test + # implementation modelled after ref: + # * NOTE: All steps need to be run in this block, otherwise, we are operating back on the mac host + set -e + # + # We need a file-descriptor file system to test test_ls::test_ls_io_errors + mount -t fdescfs fdesc /dev/fd + # + TEST_USER=tester + REPO_NAME=${GITHUB_WORKSPACE##*/} + WORKSPACE_PARENT="/Users/runner/work/${REPO_NAME}" + WORKSPACE="${WORKSPACE_PARENT}/${REPO_NAME}" + # + pw adduser -n ${TEST_USER} -d /root/ -g wheel -c "Coreutils user to build" -w random + # chown -R ${TEST_USER}:wheel /root/ "${WORKSPACE_PARENT}"/ + chown -R ${TEST_USER}:wheel /root/ "/Users/runner/work/${REPO_NAME}"/ + whoami + # + # Further work needs to be done in a sudo as we are changing users + sudo -i -u ${TEST_USER} sh << EOF + set -e + whoami + curl https://sh.rustup.rs -sSf --output rustup.sh + sh rustup.sh -y --profile=minimal + . $HOME/.cargo/env + # Install nextest + mkdir -p ~/.cargo/bin + curl -LsSf https://get.nexte.st/latest/freebsd | tar zxf - -C ~/.cargo/bin + ## Info + # environment + echo "## environment" + echo "CI='${CI}'" + echo "REPO_NAME='${REPO_NAME}'" + echo "TEST_USER='${TEST_USER}'" + echo "WORKSPACE_PARENT='${WORKSPACE_PARENT}'" + echo "WORKSPACE='${WORKSPACE}'" + env | sort + # tooling info + echo "## tooling info" + cargo -V + cargo nextest --version + rustc -V + # + # To ensure that files are cleaned up, we don't want to exit on error + set +e + cd "${WORKSPACE}" + unset FAULT + cargo build || FAULT=1 + export PATH=~/.cargo/bin:${PATH} + export RUST_BACKTRACE=1 + export CARGO_TERM_COLOR=always + if (test -z "\$FAULT"); then cargo nextest run --hide-progress-bar --profile ci --features '${{ matrix.job.features }}' || FAULT=1 ; fi + if (test -z "\$FAULT"); then cargo nextest run --hide-progress-bar --profile ci --all-features -p uucore || FAULT=1 ; fi + # Clean to avoid to rsync back the files + cargo clean + if (test -n "\$FAULT"); then exit 1 ; fi + EOF diff --git a/.github/workflows/ignore-intermittent.txt b/.github/workflows/ignore-intermittent.txt new file mode 100644 index 000000000..759bd96eb --- /dev/null +++ b/.github/workflows/ignore-intermittent.txt @@ -0,0 +1,3 @@ +tests/tail-2/inotify-dir-recreate +tests/misc/timeout +tests/rm/rm1 diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 000000000..11b733e0b --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,6 @@ +# Disable 'Line length'. Doesn't provide much values +MD013: false +# Disable 'Fenced code blocks should have a language specified' +# Doesn't provide much in src/ to enforce it +MD040: false + diff --git a/.vscode/cspell.dictionaries/acronyms+names.wordlist.txt b/.vscode/cspell.dictionaries/acronyms+names.wordlist.txt index 81bc3bc5f..8711913d9 100644 --- a/.vscode/cspell.dictionaries/acronyms+names.wordlist.txt +++ b/.vscode/cspell.dictionaries/acronyms+names.wordlist.txt @@ -50,6 +50,7 @@ Gmail GNU Illumos Irix +libfuzzer MS-DOS MSDOS MacOS diff --git a/.vscode/cspell.dictionaries/workspace.wordlist.txt b/.vscode/cspell.dictionaries/workspace.wordlist.txt index d6e91dca5..6d6533bcf 100644 --- a/.vscode/cspell.dictionaries/workspace.wordlist.txt +++ b/.vscode/cspell.dictionaries/workspace.wordlist.txt @@ -20,6 +20,7 @@ exacl filetime formatteriteminfo fsext +fundu getopts getrandom globset diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index d196c6e95..39474f7ab 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -116,7 +116,7 @@ the community. This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. +. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). @@ -124,5 +124,5 @@ enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. +. Translations are available at +. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a749ebac..7dc2565c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,20 +1,12 @@ + + # Contributing to coreutils -Contributions are very welcome, and should target Rust's main branch until the -standard libraries are stabilized. You may *claim* an item on the to-do list by -following these steps: - -1. Open an issue named "Implement [the utility of your choice]", e.g. "Implement - ls". -1. State that you are working on this utility. -1. Develop the utility. -1. Add integration tests. -1. Add the reference to your utility into Cargo.toml and Makefile. -1. Remove utility from the to-do list in the README. -1. Submit a pull request and close the issue. - -The steps above imply that, before starting to work on a utility, you should -search the issues to make sure no one else is working on it. +Contributions are very welcome via Pull Requests. If you don't know where to +start, take a look at the +[`good-first-issues`](https://github.com/uutils/coreutils/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22). +If you have any questions, feel free to ask them in the issues or on +[Discord](https://discord.gg/wQVJbvJ). ## Best practices @@ -38,37 +30,259 @@ search the issues to make sure no one else is working on it. ## Platforms -We take pride in supporting many operating systems and architectures. +We take pride in supporting many operating systems and architectures. Any code +you contribute must at least compile without warnings for all platforms in the +CI. However, you can use `#[cfg(...)]` attributes to create platform dependent features. -**Tip:** -For Windows, Microsoft provides some images (VMWare, Hyper-V, VirtualBox and Parallels) -for development: -https://developer.microsoft.com/windows/downloads/virtual-machines/ +**Tip:** For Windows, Microsoft provides some images (VMWare, Hyper-V, +VirtualBox and Parallels) for development: + +## Tools + +We have an extensive CI that will check your code before it can be merged. This +section explains how to run those checks locally to avoid waiting for the CI. + +### pre-commit hooks + +A configuration for `pre-commit` is provided in the repository. It allows +automatically checking every git commit you make to ensure it compiles, and +passes `clippy` and `rustfmt` without warnings. + +To use the provided hook: + +1. [Install `pre-commit`](https://pre-commit.com/#install) +1. Run `pre-commit install` while in the repository directory + +Your git commits will then automatically be checked. If a check fails, an error +message will explain why, and your commit will be canceled. You can then make +the suggested changes, and run `git commit ...` again. + +### clippy + +```shell +cargo clippy --all-targets --all-features +``` + +The `msrv` key in the clippy configuration file `clippy.toml` is used to disable +lints pertaining to newer features by specifying the minimum supported Rust +version (MSRV). + +### rustfmt + +```shell +cargo fmt --all +``` + +### cargo-deny + +This project uses [cargo-deny](https://github.com/EmbarkStudios/cargo-deny/) to +detect duplicate dependencies, checks licenses, etc. To run it locally, first +install it and then run with: + +``` +cargo deny --all-features check all +``` + +### Markdown linter + +We use [markdownlint](https://github.com/DavidAnson/markdownlint) to lint the +Markdown files in the repository. + +### Spell checker + +We use `cspell` as spell checker for all files in the project. If you are using +VS Code, you can install the +[code spell checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) +extension to enable spell checking within your editor. Otherwise, you can +install [cspell](https://cspell.org/) separately. + +If you want to make the spell checker ignore a word, you can add + +```rust +// spell-checker:ignore word_to_ignore +``` + +at the top of the file. + +## Testing + +Testing can be done using either Cargo or `make`. + +### Testing with Cargo + +Just like with building, we follow the standard procedure for testing using +Cargo: + +```shell +cargo test +``` + +By default, `cargo test` only runs the common programs. To run also platform +specific tests, run: + +```shell +cargo test --features unix +``` + +If you would prefer to test a select few utilities: + +```shell +cargo test --features "chmod mv tail" --no-default-features +``` + +If you also want to test the core utilities: + +```shell +cargo test -p uucore -p coreutils +``` + +Running the complete test suite might take a while. We use [nextest](https://nexte.st/index.html) in +the CI and you might want to try it out locally. It can speed up the execution time of the whole +test run significantly if the cpu has multiple cores. + +```shell +cargo nextest run --features unix --no-fail-fast +``` + +To debug: + +```shell +gdb --args target/debug/coreutils ls +(gdb) b ls.rs:79 +(gdb) run +``` + +### Testing with GNU Make + +To simply test all available utilities: + +```shell +make test +``` + +To test all but a few of the available utilities: + +```shell +make SKIP_UTILS='UTILITY_1 UTILITY_2' test +``` + +To test only a few of the available utilities: + +```shell +make UTILS='UTILITY_1 UTILITY_2' test +``` + +To include tests for unimplemented behavior: + +```shell +make UTILS='UTILITY_1 UTILITY_2' SPEC=y test +``` + +To run tests with `nextest` just use the nextest target. Note you'll need to +[install](https://nexte.st/book/installation.html) `nextest` first. The `nextest` target accepts the +same arguments like the default `test` target, so it's possible to pass arguments to `nextest run` +via `CARGOFLAGS`: + +```shell +make CARGOFLAGS='--no-fail-fast' UTILS='UTILITY_1 UTILITY_2' nextest +``` + +### Run Busybox Tests + +This testing functionality is only available on *nix operating systems and +requires `make`. + +To run busybox tests for all utilities for which busybox has tests + +```shell +make busytest +``` + +To run busybox tests for a few of the available utilities + +```shell +make UTILS='UTILITY_1 UTILITY_2' busytest +``` + +To pass an argument like "-v" to the busybox test runtime + +```shell +make UTILS='UTILITY_1 UTILITY_2' RUNTEST_ARGS='-v' busytest +``` + +### Comparing with GNU + +To run uutils against the GNU test suite locally, run the following commands: + +```shell +bash util/build-gnu.sh +# Build uutils without release optimizations +UU_MAKE_PROFILE=debug bash util/build-gnu.sh +bash util/run-gnu-test.sh +# To run a single test: +bash util/run-gnu-test.sh tests/touch/not-owner.sh # for example +# To run several tests: +bash util/run-gnu-test.sh tests/touch/not-owner.sh tests/rm/no-give-up.sh # for example +# If this is a perl (.pl) test, to run in debug: +DEBUG=1 bash util/run-gnu-test.sh tests/misc/sm3sum.pl +``` + +Note that it relies on individual utilities (not the multicall binary). + +### Improving the GNU compatibility + +The Python script `./util/remaining-gnu-error.py` shows the list of failing +tests in the CI. + +To improve the GNU compatibility, the following process is recommended: + +1. Identify a test (the smaller, the better) on a program that you understand or + is easy to understand. You can use the `./util/remaining-gnu-error.py` script + to help with this decision. +1. Build both the GNU and Rust coreutils using: `bash util/build-gnu.sh` +1. Run the test with `bash util/run-gnu-test.sh ` +1. Start to modify `` to understand what is wrong. Examples: + 1. Add `set -v` to have the bash verbose mode + 1. Add `echo $?` where needed + 1. When the variable `fail` is used in the test, `echo $fail` to see when the + test started to fail + 1. Bump the content of the output (ex: `cat err`) + 1. ... +1. Or, if the test is simple, extract the relevant information to create a new + test case running both GNU & Rust implementation +1. Start to modify the Rust implementation to match the expected behavior +1. Add a test to make sure that we don't regress (our test suite is super quick) ## Commit messages To help the project maintainers review pull requests from contributors across numerous utilities, the team has settled on conventions for commit messages. -From http://git-scm.com/book/ch5-2.html: +From : ``` -Short (50 chars or less) summary of changes +Capitalized, short (50 chars or less) summary More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit -the body entirely); tools like rebase can get confused if you run the +the body entirely); tools like rebase will confuse you if you run the two together. +Write your commit message in the imperative: "Fix bug" and not "Fixed bug" +or "Fixes bug." This convention matches up with commit messages generated +by commands like git merge and git revert. + Further paragraphs come after blank lines. - Bullet points are okay, too - - Typically a hyphen or asterisk is used for the bullet, preceded by a + - Typically a hyphen or asterisk is used for the bullet, followed by a single space, with blank lines in between, but conventions vary here + + - Use a hanging indent ``` Furthermore, here are a few examples for a summary line: @@ -104,15 +318,47 @@ uutils: add new utility gitignore: add temporary files ``` -## cargo-deny +## Code coverage -This project uses [cargo-deny](https://github.com/EmbarkStudios/cargo-deny/) to -detect duplicate dependencies, checks licenses, etc. To run it locally, first -install it and then run with: + +Code coverage report can be generated using [grcov](https://github.com/mozilla/grcov). + +### Using Nightly Rust + +To generate [gcov-based](https://github.com/mozilla/grcov#example-how-to-generate-gcda-files-for-a-rust-project) coverage report + +```shell +export CARGO_INCREMENTAL=0 +export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" +export RUSTDOCFLAGS="-Cpanic=abort" +cargo build # e.g., --features feat_os_unix +cargo test # e.g., --features feat_os_unix test_pathchk +grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing --ignore build.rs --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?\#\[derive\()" -o ./target/debug/coverage/ +# open target/debug/coverage/index.html in browser ``` -cargo deny --all-features check all -``` + +if changes are not reflected in the report then run `cargo clean` and run the above commands. + +### Using Stable Rust + +If you are using stable version of Rust that doesn't enable code coverage instrumentation by default +then add `-Z-Zinstrument-coverage` flag to `RUSTFLAGS` env variable specified above. + +## Other implementations + +The Coreutils have different implementations, with different levels of completions: + +* [GNU's](https://git.savannah.gnu.org/gitweb/?p=coreutils.git) +* [OpenBSD](https://github.com/openbsd/src/tree/master/bin) +* [Busybox](https://github.com/mirror/busybox/tree/master/coreutils) +* [Toybox (Android)](https://github.com/landley/toybox/tree/master/toys/posix) +* [V lang](https://github.com/vlang/coreutils) +* [SerenityOS](https://github.com/SerenityOS/serenity/tree/master/Userland/Utilities) +* [Initial Unix](https://github.com/dspinellis/unix-history-repo) + +However, when reimplementing the tools/options in Rust, don't read their source codes +when they are using reciprocal licenses (ex: GNU GPL, GNU LGPL, etc). ## Licensing diff --git a/Cargo.lock b/Cargo.lock index 89d67bf81..a92d01416 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,12 +34,27 @@ dependencies = [ "memchr", ] +[[package]] +name = "aho-corasick" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +dependencies = [ + "memchr", +] + [[package]] name = "aliasable" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -49,6 +64,55 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" + +[[package]] +name = "anstyle-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + +[[package]] +name = "anstyle-wincon" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +dependencies = [ + "anstyle", + "windows-sys 0.48.0", +] + [[package]] name = "arrayref" version = "0.3.6" @@ -61,17 +125,6 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -100,9 +153,9 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.62.0" +version = "0.63.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6720a8b7b2d39dd533285ed438d458f65b31b5c257e6ac7bb3d7e82844dd722" +checksum = "36d860121800b2a9a94f9b5604b332d5cffb234ce17609ea479d723dbc9d3885" dependencies = [ "bitflags", "cexpr", @@ -139,9 +192,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "895adc16c8b3273fbbc32685a7d55227705eda08c01e77704020f3491924b44b" +checksum = "729b71f35bd3fa1a4c86b85d32c8b9069ea7fe14f7a53cfabb65f62d4265b888" dependencies = [ "arrayref", "arrayvec", @@ -162,9 +215,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.0.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca0852af221f458706eb0725c03e4ed6c46af9ac98e6a689d5e634215d594dd" +checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" dependencies = [ "memchr", "once_cell", @@ -213,12 +266,12 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ + "android-tzdata", "iana-time-zone", - "num-integer", "num-traits", "winapi", ] @@ -236,35 +289,51 @@ dependencies = [ [[package]] name = "clap" -version = "4.0.26" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2148adefda54e14492fb9bddcc600b4344c5d1a3123bd666dcb939c6f0e0e57e" +checksum = "93aae7a4192245f70fe75dd9157fc7b4a5bf53e88d30bd4396f7d8f9284d5acc" dependencies = [ - "atty", + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f423e341edefb78c9caba2d9c7f7687d0e72e89df3ce3394554754393ac3990" +dependencies = [ + "anstream", + "anstyle", "bitflags", "clap_lex", "once_cell", "strsim", - "termcolor", "terminal_size", ] [[package]] name = "clap_complete" -version = "4.0.6" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b3c9eae0de7bf8e3f904a5e40612b21fb2e2e566456d177809a48b892d24da" +checksum = "a04ddfaacc3bc9e6ea67d024575fafc2a813027cf374b8f24f7bc233c6b6be12" dependencies = [ "clap", ] [[package]] name = "clap_lex" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + +[[package]] +name = "clap_mangen" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0f09a0ca8f0dd8ac92c546b426f466ef19828185c6d504c80c48c9c2768ed9" dependencies = [ - "os_str_bytes", + "clap", + "roff", ] [[package]] @@ -277,6 +346,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "compare" version = "0.1.0" @@ -285,15 +360,15 @@ checksum = "120133d4db2ec47efe2e26502ee984747630c67f51974fca0b6c1340cf2368d3" [[package]] name = "console" -version = "0.15.5" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" dependencies = [ "encode_unicode", "lazy_static", "libc", "unicode-width", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -319,11 +394,12 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "coreutils" -version = "0.0.17" +version = "0.0.19" dependencies = [ "chrono", "clap", "clap_complete", + "clap_mangen", "conv", "filetime", "glob", @@ -347,7 +423,6 @@ dependencies = [ "textwrap", "time", "unindent", - "users", "uu_arch", "uu_base32", "uu_base64", @@ -452,6 +527,7 @@ dependencies = [ "uu_whoami", "uu_yes", "uucore", + "uuhelp_parser", "walkdir", "zip", ] @@ -507,7 +583,7 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fdaa01904c12a8989dbfa110b41ef27efc432ac9934f691b9732f01cb64dc01" dependencies = [ - "aho-corasick", + "aho-corasick 0.7.19", "byteorder", "cpp_common", "lazy_static", @@ -536,9 +612,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.6" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if", "crossbeam-utils", @@ -557,9 +633,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.12" +version = "0.9.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bf8df95e795db1a4aca2957ad884a2df35413b24bbeb3114422f3cc21498e8" +checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ "autocfg", "cfg-if", @@ -570,18 +646,18 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.13" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422f23e724af1240ec469ea1e834d87a4b59ce2efe2c6a96256b0c47e2fd86aa" +checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ "cfg-if", ] [[package]] name = "crossterm" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" +checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13" dependencies = [ "bitflags", "crossterm_winapi", @@ -630,12 +706,12 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.2.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1631ca6e3c59112501a9d87fd86f21591ff77acd31331e8a73f8d80a65bbdd71" +checksum = "2a011bbe2c35ce9c1f143b7af6f94f29a167beb4cd1d29e6740ce836f723120e" dependencies = [ "nix", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -690,15 +766,15 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.3.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "data-encoding-macro" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86927b7cd2fe88fa698b87404b287ab98d1a0063a34071d92e575b72d3029aca" +checksum = "c904b33cc60130e1aeea4956ab803d08a3f4a0ca82d64ed757afac3891f2bb99" dependencies = [ "data-encoding", "data-encoding-macro-internal", @@ -706,9 +782,9 @@ dependencies = [ [[package]] name = "data-encoding-macro-internal" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" +checksum = "8fdf3fce3ce863539ec1d7fd1b6dcc3c645663376b43ed376bbf887733e4f772" dependencies = [ "data-encoding", "syn", @@ -722,9 +798,9 @@ checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", @@ -739,21 +815,21 @@ checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" [[package]] name = "dns-lookup" -version = "1.0.8" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53ecafc952c4528d9b51a458d1a8904b81783feff9fde08ab6ed2545ff396872" +checksum = "8f332aa79f9e9de741ac013237294ef42ce2e9c6394dc7d766725812f1238812" dependencies = [ "cfg-if", "libc", "socket2", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "dunce" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "either" @@ -779,13 +855,13 @@ dependencies = [ [[package]] name = "errno" -version = "0.2.8" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -800,9 +876,9 @@ dependencies = [ [[package]] name = "exacl" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "129c7b60e19ea8393c47b2110f8e3cea800530fd962380ef110d1fef6591faee" +checksum = "1cfeb22a59deb24c3262c43ffcafd1eb807180f371f9fcc99098d181b5d639be" dependencies = [ "bitflags", "log", @@ -827,14 +903,14 @@ checksum = "31a7a908b8f32538a2143e59a6e4e2508988832d5d4d6f7c156b3cbc762643a5" [[package]] name = "filetime" -version = "0.2.18" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9663d381d07ae25dc88dbdf27df458faa83a9b25336bcac83d5e452b5fc9d3" +checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" dependencies = [ "cfg-if", "libc", - "redox_syscall", - "windows-sys 0.42.0", + "redox_syscall 0.2.16", + "windows-sys 0.45.0", ] [[package]] @@ -870,9 +946,9 @@ dependencies = [ [[package]] name = "fts-sys" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32bd98333d10742c0b048272ebf4cb05336d415423b853961c92ccb398966a03" +checksum = "9a66c0a21e344f20c87b4ca12643cf4f40a7018f132c98d344e989b959f49dd1" dependencies = [ "bindgen", "libc", @@ -880,9 +956,9 @@ dependencies = [ [[package]] name = "fundu" -version = "0.3.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925250bc259498d4008ee072bf16586083ab2c491aa4b06b3c4d0a6556cebd74" +checksum = "47af3b646bdd738395be2db903fc11a5923b5e206016b8d4ad6db890bcae9bd5" [[package]] name = "futures" @@ -981,9 +1057,9 @@ dependencies = [ [[package]] name = "gcd" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1b088ad0a967aa29540456b82fc8903f854775d33f71e9709c4efb3dfbfd2" +checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a" [[package]] name = "generic-array" @@ -997,9 +1073,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if", "libc", @@ -1008,15 +1084,15 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "half" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554" +checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" dependencies = [ "crunchy", ] @@ -1030,12 +1106,6 @@ dependencies = [ "ahash", ] -[[package]] -name = "heck" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - [[package]] name = "hermit-abi" version = "0.1.19" @@ -1059,9 +1129,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hostname" @@ -1074,6 +1144,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "humantime_to_duration" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714764645f21cc70c4c151d7798dd158409641f37ad820bed65224aae403cbed" +dependencies = [ + "regex", + "time", +] + [[package]] name = "iana-time-zone" version = "0.1.53" @@ -1141,30 +1221,25 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "0.7.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" - -[[package]] -name = "io-lifetimes" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ + "hermit-abi 0.3.1", "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "is-terminal" -version = "0.4.3" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", - "io-lifetimes 1.0.5", - "rustix 0.36.8", - "windows-sys 0.45.0", + "io-lifetimes", + "rustix 0.37.19", + "windows-sys 0.48.0", ] [[package]] @@ -1193,9 +1268,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" dependencies = [ "cpufeatures", ] @@ -1234,9 +1309,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.139" +version = "0.2.146" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" [[package]] name = "libloading" @@ -1257,18 +1332,18 @@ dependencies = [ "cc", ] -[[package]] -name = "linux-raw-sys" -version = "0.0.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" - [[package]] name = "linux-raw-sys" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + [[package]] name = "lock_api" version = "0.4.9" @@ -1290,9 +1365,9 @@ dependencies = [ [[package]] name = "lscolors" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dedc85d67baf5327114fad78ab9418f8893b1121c17d5538dd11005ad1ddf2" +checksum = "18a9df1d1fb6d9e92fa043e9eb9a3ecf6892c7b542bae5137cd1e419e40aa8bf" dependencies = [ "nu-ansi-term", ] @@ -1320,18 +1395,18 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.8" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc" +checksum = "180d4b35be83d33392d1d1bfbd2ae1eca7ff5de1a94d3fc87faaa99a069e7cbd" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] @@ -1353,14 +1428,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" dependencies = [ "libc", "log", "wasi", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -1377,9 +1452,9 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", @@ -1387,9 +1462,9 @@ dependencies = [ [[package]] name = "notify" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2c66da08abae1c024c01d635253e402341b4060a12e99b31c7594063bf490a" +checksum = "4d9ba6c734de18ca27c8cef5cd7058aa4ac9f63596131e4c7e41e579319032a2" dependencies = [ "bitflags", "crossbeam-channel", @@ -1400,17 +1475,16 @@ dependencies = [ "libc", "mio", "walkdir", - "winapi", + "windows-sys 0.45.0", ] [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "1df031e117bca634c262e9bd3173776844b6c17a90b3741c9163663b4385af76" dependencies = [ - "overload", - "winapi", + "windows-sys 0.45.0", ] [[package]] @@ -1470,9 +1544,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "onig" @@ -1515,17 +1589,11 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "os_str_bytes" -version = "6.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" - [[package]] name = "ouroboros" -version = "0.15.5" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbb50b356159620db6ac971c6d5c9ab788c9cc38a6f49619fca2a27acb062ca" +checksum = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db" dependencies = [ "aliasable", "ouroboros_macro", @@ -1533,9 +1601,9 @@ dependencies = [ [[package]] name = "ouroboros_macro" -version = "0.15.5" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a0d9d1a6191c4f391f87219d1ea42b23f09ee84d64763cd05ee6ea88d9f384d" +checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" dependencies = [ "Inflector", "proc-macro-error", @@ -1553,12 +1621,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "parking_lot" version = "0.12.1" @@ -1571,22 +1633,26 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.4" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] -name = "paste" -version = "1.0.9" +name = "parse_datetime" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" +checksum = "fecceaede7767a9a98058687a321bc91742eff7670167a34104afb30fc8757df" +dependencies = [ + "chrono", + "regex", +] [[package]] name = "peeking_take_while" @@ -1652,9 +1718,9 @@ checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "platform-info" -version = "1.0.2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7c23cfae725ae06d9e43010153fa77bdfa8c827bf08fe4beeb2a3514e6be12" +checksum = "827dc4f7a81331d48c8abf11b5ac18673b390d33e9632327e286d940289aefab" dependencies = [ "libc", "winapi", @@ -1719,15 +1785,15 @@ dependencies = [ [[package]] name = "procfs" -version = "0.14.1" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfb6451c91904606a1abe93e83a8ec851f45827fa84273f256ade45dc095818" +checksum = "943ca7f9f29bab5844ecd8fdb3992c5969b6622bb9609b9502fef9b4310e3f1f" dependencies = [ "bitflags", "byteorder", "hex", "lazy_static", - "rustix 0.35.13", + "rustix 0.36.14", ] [[package]] @@ -1797,20 +1863,19 @@ dependencies = [ [[package]] name = "rayon" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e060280438193c554f654141c9ea9417886713b7acd75974c85b18a69a88e0b" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -1827,6 +1892,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + [[package]] name = "reference-counted-singleton" version = "0.1.2" @@ -1835,11 +1909,11 @@ checksum = "f1bfbf25d7eb88ddcbb1ec3d755d0634da8f7657b2cb8b74089121409ab8228f" [[package]] name = "regex" -version = "1.7.1" +version = "1.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" dependencies = [ - "aho-corasick", + "aho-corasick 1.0.1", "memchr", "regex-syntax", ] @@ -1852,18 +1926,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" [[package]] name = "rlimit" @@ -1875,10 +1940,16 @@ dependencies = [ ] [[package]] -name = "rstest" -version = "0.16.0" +name = "roff" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f2d176c472198ec1e6551dc7da28f1c089652f66a7b722676c2238ebc0edf" +checksum = "b833d8d034ea094b1ea68aa6d5c740e0d04bad9d16568d08ba6f76823a114316" + +[[package]] +name = "rstest" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de1bb486a691878cd320c2f0d319ba91eeaa2e894066d8b5f8f117c000e9d962" dependencies = [ "futures", "futures-timer", @@ -1888,9 +1959,9 @@ dependencies = [ [[package]] name = "rstest_macros" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7229b505ae0706e64f37ffc54a9c163e11022a6636d58fe1f3f52018257ff9f7" +checksum = "290ca1a1c8ca7edb7c3283bd44dc35dd54fdec6253a3912e201ba1072018fca8" dependencies = [ "cfg-if", "proc-macro2", @@ -1927,37 +1998,31 @@ dependencies = [ [[package]] name = "rustix" -version = "0.35.13" +version = "0.36.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" +checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62" dependencies = [ "bitflags", "errno", - "io-lifetimes 0.7.5", - "libc", - "linux-raw-sys 0.0.46", - "windows-sys 0.42.0", -] - -[[package]] -name = "rustix" -version = "0.36.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes 1.0.5", + "io-lifetimes", "libc", "linux-raw-sys 0.1.4", "windows-sys 0.45.0", ] [[package]] -name = "rustversion" -version = "1.0.9" +name = "rustix" +version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +dependencies = [ + "bitflags", + "errno", + "io-lifetimes", + "libc", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] [[package]] name = "same-file" @@ -1996,9 +2061,9 @@ dependencies = [ [[package]] name = "selinux-sys" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c02c5c6e2db8a78b3ffffc666f75fcda5bbd7068ba3c0f560e5504f4d88443" +checksum = "806d381649bb85347189d2350728817418138d11d738e2482cb644ec7f3c755d" dependencies = [ "bindgen", "cc", @@ -2042,9 +2107,9 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ "digest", "keccak", @@ -2058,9 +2123,9 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "signal-hook" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" +checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" dependencies = [ "libc", "signal-hook-registry", @@ -2103,9 +2168,9 @@ dependencies = [ [[package]] name = "sm3" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f943a7c5e3089f2bd046221d1e9f4fa59396bf0fe966360983649683086215da" +checksum = "ebb9a3b702d0a7e33bc4d85a14456633d2b165c2ad839c5fd9a8417c1ab15860" dependencies = [ "digest", ] @@ -2124,12 +2189,12 @@ checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" [[package]] name = "socket2" -version = "0.4.7" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" dependencies = [ "libc", - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2144,25 +2209,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" - -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn", -] - [[package]] name = "subtle" version = "2.4.1" @@ -2182,16 +2228,16 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.3.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" dependencies = [ + "autocfg", "cfg-if", "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "redox_syscall 0.3.5", + "rustix 0.37.19", + "windows-sys 0.48.0", ] [[package]] @@ -2214,12 +2260,12 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.2.2" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ca90c434fd12083d1a6bdcbe9f92a14f96c8a1ba600ba451734ac334521f7a" +checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" dependencies = [ - "rustix 0.35.13", - "windows-sys 0.42.0", + "rustix 0.37.19", + "windows-sys 0.48.0", ] [[package]] @@ -2256,9 +2302,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.17" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" +checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" dependencies = [ "itoa", "libc", @@ -2276,9 +2322,9 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" [[package]] name = "time-macros" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" +checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" dependencies = [ "time-core", ] @@ -2307,9 +2353,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" @@ -2325,29 +2371,19 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "unindent" -version = "0.1.10" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ee9362deb4a96cef4d437d1ad49cffc9b9e92d202b6995674e928ce684f112" +checksum = "5aa30f5ea51ff7edfc797c6d3f9ec8cbd8cfedef5371766b7181d33977f4814f" [[package]] -name = "users" -version = "0.11.0" +name = "utf8parse" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24cc0f6d6f267b73e5a2cadf007ba8f9bc39c6a6f9666f8cf25ea809a153b032" -dependencies = [ - "libc", - "log", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uu_arch" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "platform-info", @@ -2356,7 +2392,7 @@ dependencies = [ [[package]] name = "uu_base32" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2364,7 +2400,7 @@ dependencies = [ [[package]] name = "uu_base64" -version = "0.0.17" +version = "0.0.19" dependencies = [ "uu_base32", "uucore", @@ -2372,7 +2408,7 @@ dependencies = [ [[package]] name = "uu_basename" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2380,7 +2416,7 @@ dependencies = [ [[package]] name = "uu_basenc" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uu_base32", @@ -2389,7 +2425,7 @@ dependencies = [ [[package]] name = "uu_cat" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "is-terminal", @@ -2400,7 +2436,7 @@ dependencies = [ [[package]] name = "uu_chcon" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "fts-sys", @@ -2412,7 +2448,7 @@ dependencies = [ [[package]] name = "uu_chgrp" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2420,7 +2456,7 @@ dependencies = [ [[package]] name = "uu_chmod" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", @@ -2429,7 +2465,7 @@ dependencies = [ [[package]] name = "uu_chown" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2437,7 +2473,7 @@ dependencies = [ [[package]] name = "uu_chroot" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2445,7 +2481,7 @@ dependencies = [ [[package]] name = "uu_cksum" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "hex", @@ -2454,7 +2490,7 @@ dependencies = [ [[package]] name = "uu_comm" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2462,7 +2498,7 @@ dependencies = [ [[package]] name = "uu_cp" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "exacl", @@ -2478,7 +2514,7 @@ dependencies = [ [[package]] name = "uu_csplit" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "regex", @@ -2488,7 +2524,7 @@ dependencies = [ [[package]] name = "uu_cut" -version = "0.0.17" +version = "0.0.19" dependencies = [ "bstr", "clap", @@ -2499,38 +2535,41 @@ dependencies = [ [[package]] name = "uu_date" -version = "0.0.17" +version = "0.0.19" dependencies = [ "chrono", "clap", "libc", + "parse_datetime", "uucore", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "uu_dd" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "gcd", "libc", + "nix", "signal-hook", "uucore", ] [[package]] name = "uu_df" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", + "tempfile", "unicode-width", "uucore", ] [[package]] name = "uu_dir" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uu_ls", @@ -2539,7 +2578,7 @@ dependencies = [ [[package]] name = "uu_dircolors" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2547,7 +2586,7 @@ dependencies = [ [[package]] name = "uu_dirname" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2555,18 +2594,18 @@ dependencies = [ [[package]] name = "uu_du" -version = "0.0.17" +version = "0.0.19" dependencies = [ "chrono", "clap", "glob", "uucore", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "uu_echo" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2574,7 +2613,7 @@ dependencies = [ [[package]] name = "uu_env" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "nix", @@ -2584,7 +2623,7 @@ dependencies = [ [[package]] name = "uu_expand" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "unicode-width", @@ -2593,7 +2632,7 @@ dependencies = [ [[package]] name = "uu_expr" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "num-bigint", @@ -2604,12 +2643,11 @@ dependencies = [ [[package]] name = "uu_factor" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "coz", "num-traits", - "paste", "quickcheck", "rand", "smallvec", @@ -2618,7 +2656,7 @@ dependencies = [ [[package]] name = "uu_false" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2626,7 +2664,7 @@ dependencies = [ [[package]] name = "uu_fmt" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "unicode-width", @@ -2635,7 +2673,7 @@ dependencies = [ [[package]] name = "uu_fold" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2643,7 +2681,7 @@ dependencies = [ [[package]] name = "uu_groups" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2651,7 +2689,7 @@ dependencies = [ [[package]] name = "uu_hashsum" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "hex", @@ -2662,7 +2700,7 @@ dependencies = [ [[package]] name = "uu_head" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "memchr", @@ -2671,7 +2709,7 @@ dependencies = [ [[package]] name = "uu_hostid" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", @@ -2680,17 +2718,17 @@ dependencies = [ [[package]] name = "uu_hostname" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "hostname", "uucore", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "uu_id" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "selinux", @@ -2699,19 +2737,18 @@ dependencies = [ [[package]] name = "uu_install" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "file_diff", "filetime", "libc", - "time", "uucore", ] [[package]] name = "uu_join" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "memchr", @@ -2720,7 +2757,7 @@ dependencies = [ [[package]] name = "uu_kill" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "nix", @@ -2729,7 +2766,7 @@ dependencies = [ [[package]] name = "uu_link" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2737,7 +2774,7 @@ dependencies = [ [[package]] name = "uu_ln" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2745,7 +2782,7 @@ dependencies = [ [[package]] name = "uu_logname" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", @@ -2754,7 +2791,7 @@ dependencies = [ [[package]] name = "uu_ls" -version = "0.0.17" +version = "0.0.19" dependencies = [ "chrono", "clap", @@ -2772,7 +2809,7 @@ dependencies = [ [[package]] name = "uu_mkdir" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2780,7 +2817,7 @@ dependencies = [ [[package]] name = "uu_mkfifo" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", @@ -2789,7 +2826,7 @@ dependencies = [ [[package]] name = "uu_mknod" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", @@ -2798,7 +2835,7 @@ dependencies = [ [[package]] name = "uu_mktemp" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "rand", @@ -2808,7 +2845,7 @@ dependencies = [ [[package]] name = "uu_more" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "crossterm", @@ -2821,7 +2858,7 @@ dependencies = [ [[package]] name = "uu_mv" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "fs_extra", @@ -2831,7 +2868,7 @@ dependencies = [ [[package]] name = "uu_nice" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", @@ -2841,7 +2878,7 @@ dependencies = [ [[package]] name = "uu_nl" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "regex", @@ -2850,7 +2887,7 @@ dependencies = [ [[package]] name = "uu_nohup" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "is-terminal", @@ -2860,7 +2897,7 @@ dependencies = [ [[package]] name = "uu_nproc" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", @@ -2869,7 +2906,7 @@ dependencies = [ [[package]] name = "uu_numfmt" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2877,7 +2914,7 @@ dependencies = [ [[package]] name = "uu_od" -version = "0.0.17" +version = "0.0.19" dependencies = [ "byteorder", "clap", @@ -2887,7 +2924,7 @@ dependencies = [ [[package]] name = "uu_paste" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2895,7 +2932,7 @@ dependencies = [ [[package]] name = "uu_pathchk" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", @@ -2904,7 +2941,7 @@ dependencies = [ [[package]] name = "uu_pinky" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2912,19 +2949,19 @@ dependencies = [ [[package]] name = "uu_pr" -version = "0.0.17" +version = "0.0.19" dependencies = [ + "chrono", "clap", "itertools", "quick-error", "regex", - "time", "uucore", ] [[package]] name = "uu_printenv" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2932,7 +2969,7 @@ dependencies = [ [[package]] name = "uu_printf" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2940,7 +2977,7 @@ dependencies = [ [[package]] name = "uu_ptx" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "regex", @@ -2949,7 +2986,7 @@ dependencies = [ [[package]] name = "uu_pwd" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2957,7 +2994,7 @@ dependencies = [ [[package]] name = "uu_readlink" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2965,7 +3002,7 @@ dependencies = [ [[package]] name = "uu_realpath" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2973,7 +3010,7 @@ dependencies = [ [[package]] name = "uu_relpath" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -2981,18 +3018,18 @@ dependencies = [ [[package]] name = "uu_rm" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", "uucore", "walkdir", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "uu_rmdir" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", @@ -3001,7 +3038,7 @@ dependencies = [ [[package]] name = "uu_runcon" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", @@ -3012,7 +3049,7 @@ dependencies = [ [[package]] name = "uu_seq" -version = "0.0.17" +version = "0.0.19" dependencies = [ "bigdecimal", "clap", @@ -3023,16 +3060,17 @@ dependencies = [ [[package]] name = "uu_shred" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", + "libc", "rand", "uucore", ] [[package]] name = "uu_shuf" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "memchr", @@ -3043,15 +3081,16 @@ dependencies = [ [[package]] name = "uu_sleep" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", + "fundu", "uucore", ] [[package]] name = "uu_sort" -version = "0.0.17" +version = "0.0.19" dependencies = [ "binary-heap-plus", "clap", @@ -3070,7 +3109,7 @@ dependencies = [ [[package]] name = "uu_split" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "memchr", @@ -3079,7 +3118,7 @@ dependencies = [ [[package]] name = "uu_stat" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -3087,7 +3126,7 @@ dependencies = [ [[package]] name = "uu_stdbuf" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "tempfile", @@ -3097,7 +3136,7 @@ dependencies = [ [[package]] name = "uu_stdbuf_libstdbuf" -version = "0.0.17" +version = "0.0.19" dependencies = [ "cpp", "cpp_build", @@ -3107,7 +3146,7 @@ dependencies = [ [[package]] name = "uu_stty" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "nix", @@ -3116,7 +3155,7 @@ dependencies = [ [[package]] name = "uu_sum" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -3124,18 +3163,18 @@ dependencies = [ [[package]] name = "uu_sync" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", "nix", "uucore", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "uu_tac" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "memchr", @@ -3146,7 +3185,7 @@ dependencies = [ [[package]] name = "uu_tail" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "fundu", @@ -3154,15 +3193,16 @@ dependencies = [ "libc", "memchr", "notify", + "rstest", "same-file", "uucore", "winapi-util", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "uu_tee" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", @@ -3171,17 +3211,17 @@ dependencies = [ [[package]] name = "uu_test" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", - "redox_syscall", + "redox_syscall 0.3.5", "uucore", ] [[package]] name = "uu_timeout" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", @@ -3191,18 +3231,19 @@ dependencies = [ [[package]] name = "uu_touch" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "filetime", + "humantime_to_duration", "time", "uucore", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "uu_tr" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "nom", @@ -3211,7 +3252,7 @@ dependencies = [ [[package]] name = "uu_true" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -3219,7 +3260,7 @@ dependencies = [ [[package]] name = "uu_truncate" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -3227,7 +3268,7 @@ dependencies = [ [[package]] name = "uu_tsort" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -3235,7 +3276,7 @@ dependencies = [ [[package]] name = "uu_tty" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "is-terminal", @@ -3245,7 +3286,7 @@ dependencies = [ [[package]] name = "uu_uname" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "platform-info", @@ -3254,7 +3295,7 @@ dependencies = [ [[package]] name = "uu_unexpand" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "unicode-width", @@ -3263,17 +3304,15 @@ dependencies = [ [[package]] name = "uu_uniq" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", - "strum", - "strum_macros", "uucore", ] [[package]] name = "uu_unlink" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -3281,7 +3320,7 @@ dependencies = [ [[package]] name = "uu_uptime" -version = "0.0.17" +version = "0.0.19" dependencies = [ "chrono", "clap", @@ -3290,7 +3329,7 @@ dependencies = [ [[package]] name = "uu_users" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -3298,7 +3337,7 @@ dependencies = [ [[package]] name = "uu_vdir" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uu_ls", @@ -3307,20 +3346,20 @@ dependencies = [ [[package]] name = "uu_wc" -version = "0.0.17" +version = "0.0.19" dependencies = [ "bytecount", "clap", "libc", "nix", + "thiserror", "unicode-width", - "utf-8", "uucore", ] [[package]] name = "uu_who" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "uucore", @@ -3328,27 +3367,27 @@ dependencies = [ [[package]] name = "uu_whoami" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", "libc", "uucore", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "uu_yes" -version = "0.0.17" +version = "0.0.19" dependencies = [ "clap", - "libc", + "itertools", "nix", "uucore", ] [[package]] name = "uucore" -version = "0.0.17" +version = "0.0.19" dependencies = [ "blake2b_simd", "blake3", @@ -3371,24 +3410,30 @@ dependencies = [ "sha2", "sha3", "sm3", + "tempfile", "thiserror", "time", "uucore_procs", "walkdir", "wild", "winapi-util", - "windows-sys 0.42.0", + "windows-sys 0.48.0", "z85", ] [[package]] name = "uucore_procs" -version = "0.0.17" +version = "0.0.19" dependencies = [ "proc-macro2", "quote", + "uuhelp_parser", ] +[[package]] +name = "uuhelp_parser" +version = "0.0.19" + [[package]] name = "uuid" version = "1.2.2" @@ -3523,92 +3568,143 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - [[package]] name = "windows-sys" version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", ] [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "xattr" -version = "0.2.3" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" +checksum = "ea263437ca03c1522846a4ddafbca2542d0ad5ed9b784909d4b27b76f62bc34a" dependencies = [ "libc", ] @@ -3627,9 +3723,9 @@ checksum = "2a599daf1b507819c1121f0bf87fa37eb19daac6aff3aefefd4e6e2e0f2020fc" [[package]] name = "zip" -version = "0.6.3" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537ce7411d25e54e8ae21a7ce0b15840e7bfcff15b51d697ec3266cc76bdf080" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ "byteorder", "crc32fast", diff --git a/Cargo.toml b/Cargo.toml index 61a461deb..09e120957 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ # coreutils (uutils) # * see the repository LICENSE, README, and CONTRIBUTING files for more information -# spell-checker:ignore (libs) libselinux gethostid procfs bigdecimal kqueue fundu +# spell-checker:ignore (libs) libselinux gethostid procfs bigdecimal kqueue fundu mangen datetime uuhelp [package] name = "coreutils" -version = "0.0.17" +version = "0.0.19" authors = ["uutils developers"] license = "MIT" description = "coreutils ~ GNU coreutils (updated); implemented as universal (cross-platform) utils, written in Rust" @@ -22,16 +22,16 @@ edition = "2021" build = "build.rs" [features] -default = [ "feat_common_core" ] +default = ["feat_common_core"] ## OS feature shortcodes -macos = [ "feat_os_macos" ] -unix = [ "feat_os_unix" ] -windows = [ "feat_os_windows" ] +macos = ["feat_os_macos"] +unix = ["feat_os_unix"] +windows = ["feat_os_windows"] ## project-specific feature shortcodes nightly = [] test_unimplemented = [] # * only build `uudoc` when `--feature uudoc` is activated -uudoc = ["zip"] +uudoc = ["zip", "dep:uuhelp_parser"] ## features # "feat_acl" == enable support for ACLs (access control lists; by using`--features feat_acl`) # NOTE: @@ -42,426 +42,429 @@ feat_acl = ["cp/feat_acl"] # NOTE: # * The selinux(-sys) crate requires `libselinux` headers and shared library to be accessible in the C toolchain at compile time. # * Running a uutils compiled with `feat_selinux` requires an SELinux enabled Kernel at run time. -feat_selinux = ["cp/selinux", "id/selinux", "ls/selinux", "selinux", "feat_require_selinux"] +feat_selinux = [ + "cp/selinux", + "id/selinux", + "ls/selinux", + "selinux", + "feat_require_selinux", +] ## ## feature sets ## (common/core and Tier1) feature sets # "feat_common_core" == baseline core set of utilities which can be built/run on most targets feat_common_core = [ - "base32", - "base64", - "basename", - "basenc", - "cat", - "cksum", - "comm", - "cp", - "csplit", - "cut", - "date", - "df", - "dir", - "dircolors", - "dirname", - "dd", - "du", - "echo", - "env", - "expand", - "expr", - "factor", - "false", - "fmt", - "fold", - "hashsum", - "head", - "join", - "link", - "ln", - "ls", - "mkdir", - "mktemp", - "more", - "mv", - "nl", - "numfmt", - "od", - "paste", - "pr", - "printenv", - "printf", - "ptx", - "pwd", - "readlink", - "realpath", - "relpath", - "rm", - "rmdir", - "seq", - "shred", - "shuf", - "sleep", - "sort", - "split", - "sum", - "tac", - "tail", - "tee", - "test", - "tr", - "true", - "truncate", - "tsort", - "touch", - "unexpand", - "uniq", - "unlink", - "vdir", - "wc", - "yes", + "base32", + "base64", + "basename", + "basenc", + "cat", + "cksum", + "comm", + "cp", + "csplit", + "cut", + "date", + "df", + "dir", + "dircolors", + "dirname", + "dd", + "du", + "echo", + "env", + "expand", + "expr", + "factor", + "false", + "fmt", + "fold", + "hashsum", + "head", + "join", + "link", + "ln", + "ls", + "mkdir", + "mktemp", + "more", + "mv", + "nl", + "numfmt", + "od", + "paste", + "pr", + "printenv", + "printf", + "ptx", + "pwd", + "readlink", + "realpath", + "relpath", + "rm", + "rmdir", + "seq", + "shred", + "shuf", + "sleep", + "sort", + "split", + "sum", + "tac", + "tail", + "tee", + "test", + "tr", + "true", + "truncate", + "tsort", + "touch", + "unexpand", + "uniq", + "unlink", + "vdir", + "wc", + "yes", ] # "feat_Tier1" == expanded set of utilities which can be built/run on the usual rust "Tier 1" target platforms (ref: ) feat_Tier1 = [ - "feat_common_core", - # - "arch", - "hostname", - "nproc", - "sync", - "touch", - "uname", - "whoami", + "feat_common_core", + # + "arch", + "hostname", + "nproc", + "sync", + "touch", + "uname", + "whoami", ] ## (primary platforms) feature sets # "feat_os_macos" == set of utilities which can be built/run on the MacOS platform feat_os_macos = [ - "feat_os_unix", ## == a modern/usual *nix platform - # - "feat_require_unix_hostid", + "feat_os_unix", ## == a modern/usual *nix platform + # + "feat_require_unix_hostid", ] # "feat_os_unix" == set of utilities which can be built/run on modern/usual *nix platforms feat_os_unix = [ - "feat_Tier1", - # - "feat_require_crate_cpp", - "feat_require_unix", - "feat_require_unix_utmpx", + "feat_Tier1", + # + "feat_require_crate_cpp", + "feat_require_unix", + "feat_require_unix_utmpx", ] # "feat_os_windows" == set of utilities which can be built/run on modern/usual windows platforms feat_os_windows = [ - "feat_Tier1", ## == "feat_os_windows_legacy" + "hostname" + "feat_Tier1", ## == "feat_os_windows_legacy" + "hostname" ] ## (secondary platforms) feature sets # "feat_os_unix_gnueabihf" == set of utilities which can be built/run on the "arm-unknown-linux-gnueabihf" target (ARMv6 Linux [hardfloat]) feat_os_unix_gnueabihf = [ - "feat_Tier1", - # - "feat_require_unix", - "feat_require_unix_hostid", - "feat_require_unix_utmpx", + "feat_Tier1", + # + "feat_require_unix", + "feat_require_unix_hostid", + "feat_require_unix_utmpx", ] # "feat_os_unix_musl" == set of utilities which can be built/run on targets binding to the "musl" library (ref: ) feat_os_unix_musl = [ - "feat_Tier1", - # - "feat_require_unix", - "feat_require_unix_hostid", + "feat_Tier1", + # + "feat_require_unix", + "feat_require_unix_hostid", ] feat_os_unix_android = [ - "feat_Tier1", - # - "feat_require_unix", + "feat_Tier1", + # + "feat_require_unix", ] ## feature sets with requirements (restricting cross-platform availability) # # ** NOTE: these `feat_require_...` sets should be minimized as much as possible to encourage cross-platform availability of utilities # # "feat_require_crate_cpp" == set of utilities requiring the `cpp` crate (which fail to compile on several platforms; as of 2020-04-23) -feat_require_crate_cpp = [ - "stdbuf", -] +feat_require_crate_cpp = ["stdbuf"] # "feat_require_unix" == set of utilities requiring support which is only available on unix platforms (as of 2020-04-23) feat_require_unix = [ - "chgrp", - "chmod", - "chown", - "chroot", - "groups", - "id", - "install", - "kill", - "logname", - "mkfifo", - "mknod", - "nice", - "nohup", - "pathchk", - "stat", - "stty", - "timeout", - "tty", + "chgrp", + "chmod", + "chown", + "chroot", + "groups", + "id", + "install", + "kill", + "logname", + "mkfifo", + "mknod", + "nice", + "nohup", + "pathchk", + "stat", + "stty", + "timeout", + "tty", ] # "feat_require_unix_utmpx" == set of utilities requiring unix utmp/utmpx support # * ref: -feat_require_unix_utmpx = [ - "pinky", - "uptime", - "users", - "who", -] +feat_require_unix_utmpx = ["pinky", "uptime", "users", "who"] # "feat_require_unix_hostid" == set of utilities requiring gethostid in libc (only some unixes provide) -feat_require_unix_hostid = [ - "hostid", -] +feat_require_unix_hostid = ["hostid"] # "feat_require_selinux" == set of utilities depending on SELinux. -feat_require_selinux = [ - "chcon", - "runcon", -] +feat_require_selinux = ["chcon", "runcon"] ## (alternate/newer/smaller platforms) feature sets # "feat_os_unix_fuchsia" == set of utilities which can be built/run on the "Fuchsia" OS (refs: ; ) feat_os_unix_fuchsia = [ - "feat_common_core", - # - "feat_require_crate_cpp", - # - "chgrp", - "chmod", - "chown", - "du", - "groups", - "hostid", - "install", - "logname", - "mkfifo", - "mknod", - "nice", - "pathchk", - "tty", - "uname", - "unlink", + "feat_common_core", + # + "feat_require_crate_cpp", + # + "chgrp", + "chmod", + "chown", + "du", + "groups", + "hostid", + "install", + "logname", + "mkfifo", + "mknod", + "nice", + "pathchk", + "tty", + "uname", + "unlink", ] # "feat_os_unix_redox" == set of utilities which can be built/run on "Redox OS" (refs: ; ) feat_os_unix_redox = [ - "feat_common_core", - # - "chmod", - "uname", + "feat_common_core", + # + "chmod", + "uname", ] # "feat_os_windows_legacy" == slightly restricted set of utilities which can be built/run on early windows platforms (eg, "WinXP") feat_os_windows_legacy = [ - "feat_common_core", - # - "arch", - "nproc", - "sync", - "touch", - "whoami", + "feat_common_core", + # + "arch", + "nproc", + "sync", + "touch", + "whoami", ] ## # * bypass/override ~ translate 'test' feature name to avoid dependency collision with rust core 'test' crate (o/w surfaces as compiler errors during testing) -test = [ "uu_test" ] +test = ["uu_test"] [workspace.dependencies] bigdecimal = "0.3" binary-heap-plus = "0.5.0" -bstr = "1.0" +bstr = "1.5" bytecount = "0.6.3" -byteorder = "1.3.2" -chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]} -clap = { version = "4.0", features = ["wrap_help", "cargo"] } -clap_complete = "4.0" +byteorder = "1.4.3" +chrono = { version = "^0.4.26", default-features = false, features = [ + "std", + "alloc", + "clock", +] } +clap = { version = "4.3", features = ["wrap_help", "cargo"] } +clap_complete = "4.3" +clap_mangen = "0.2" compare = "0.1.0" coz = { version = "0.1.3" } -crossterm = ">=0.19" -ctrlc = { version = "3.0", features = ["termination"] } -exacl = "0.9.0" +crossterm = ">=0.26.1" +ctrlc = { version = "3.4", features = ["termination"] } +exacl = "0.10.0" file_diff = "1.0.0" filetime = "0.2" fnv = "1.0.7" -fs_extra = "1.1.0" +fs_extra = "1.3.0" fts-sys = "0.2" -fundu = "0.3.0" -gcd = "2.2" -glob = "0.3.0" -half = "2.1" +fundu = "1.0.0" +gcd = "2.3" +glob = "0.3.1" +half = "2.2" indicatif = "0.17" -is-terminal = "0.4.3" -itertools = "0.10.0" -libc = "0.2.139" -lscolors = { version = "0.13.0", default-features=false, features = ["nu-ansi-term"] } +is-terminal = "0.4.7" +itertools = "0.10.5" +libc = "0.2.146" +lscolors = { version = "0.14.0", default-features = false, features = [ + "nu-ansi-term", +] } memchr = "2" -nix = { version="0.26", default-features=false } -nom = "7.1.1" -notify = { version = "=5.0.0", features=["macos_kqueue"]} -num_cpus = "1.14" -num-bigint = "0.4.0" +nix = { version = "0.26", default-features = false } +nom = "7.1.3" +notify = { version = "=6.0.0", features = ["macos_kqueue"] } +num-bigint = "0.4.3" num-traits = "0.2.15" number_prefix = "0.4" -once_cell = "1.13.1" +once_cell = "1.18.0" onig = { version = "~6.4", default-features = false } -ouroboros = "0.15.5" +ouroboros = "0.15.6" +parse_datetime = "0.4.0" phf = "0.11.1" phf_codegen = "0.11.1" -platform-info = "1.0.2" +platform-info = "2.0.1" quick-error = "2.0.1" rand = { version = "0.8", features = ["small_rng"] } rand_core = "0.6" -rayon = "1.5" -redox_syscall = "0.2" -regex = "1.7.1" +rayon = "1.7" +redox_syscall = "0.3" +regex = "1.8.4" +rstest = "0.17.0" rust-ini = "0.18.0" same-file = "1.0.6" selinux = "0.4" -signal-hook = "0.3.14" +signal-hook = "0.3.15" smallvec = { version = "1.10", features = ["union"] } -strum = "0.24.1" -strum_macros = "0.24.2" -tempfile = "3.3.0" +tempfile = "3.6.0" term_grid = "0.1.5" -terminal_size = "0.2.2" -textwrap = { version="0.16.0", features=["terminal_size"] } +terminal_size = "0.2.6" +textwrap = { version = "0.16.0", features = ["terminal_size"] } thiserror = "1.0" -time = { version="0.3" } -unicode-segmentation = "1.9.0" -unicode-width = "0.1.8" +time = { version = "0.3" } +unicode-segmentation = "1.10.1" +unicode-width = "0.1.10" utf-8 = "0.7.6" -walkdir = "2.2" +walkdir = "2.3" winapi-util = "0.1.5" -windows-sys = { version="0.42.0", default-features=false } -xattr = "0.2.3" -zip = { version = "0.6.3", default_features=false, features=["deflate"] } +windows-sys = { version = "0.48.0", default-features = false } +xattr = "1.0.0" +zip = { version = "0.6.6", default_features = false, features = ["deflate"] } hex = "0.4.3" md-5 = "0.10.5" -sha1 = "0.10.1" -sha2 = "0.10.2" -sha3 = "0.10.6" +sha1 = "0.10.5" +sha2 = "0.10.6" +sha3 = "0.10.8" blake2b_simd = "1.0.1" -blake3 = "1.3.2" -sm3 = "0.4.1" -digest = "0.10.6" +blake3 = "1.4.0" +sm3 = "0.4.2" +digest = "0.10.7" -uucore = { version=">=0.0.17", package="uucore", path="src/uucore" } -uucore_procs = { version=">=0.0.17", package="uucore_procs", path="src/uucore_procs" } -uu_ls = { version=">=0.0.17", path="src/uu/ls" } -uu_base32 = { version=">=0.0.17", path="src/uu/base32"} +uucore = { version = ">=0.0.19", package = "uucore", path = "src/uucore" } +uucore_procs = { version = ">=0.0.19", package = "uucore_procs", path = "src/uucore_procs" } +uu_ls = { version = ">=0.0.18", path = "src/uu/ls" } +uu_base32 = { version = ">=0.0.18", path = "src/uu/base32" } [dependencies] -clap = { workspace=true } -once_cell = { workspace=true } -uucore = { workspace=true } -clap_complete = { workspace=true } -phf = { workspace=true } -selinux = { workspace=true, optional = true } -textwrap = { workspace=true } -zip = { workspace=true, optional = true } +clap = { workspace = true } +once_cell = { workspace = true } +uucore = { workspace = true } +clap_complete = { workspace = true } +clap_mangen = { workspace = true } +phf = { workspace = true } +selinux = { workspace = true, optional = true } +textwrap = { workspace = true } +zip = { workspace = true, optional = true } + +uuhelp_parser = { optional = true, version = ">=0.0.19", path = "src/uuhelp_parser" } # * uutils -uu_test = { optional=true, version="0.0.17", package="uu_test", path="src/uu/test" } +uu_test = { optional = true, version = "0.0.19", package = "uu_test", path = "src/uu/test" } # -arch = { optional=true, version="0.0.17", package="uu_arch", path="src/uu/arch" } -base32 = { optional=true, version="0.0.17", package="uu_base32", path="src/uu/base32" } -base64 = { optional=true, version="0.0.17", package="uu_base64", path="src/uu/base64" } -basename = { optional=true, version="0.0.17", package="uu_basename", path="src/uu/basename" } -basenc = { optional=true, version="0.0.17", package="uu_basenc", path="src/uu/basenc" } -cat = { optional=true, version="0.0.17", package="uu_cat", path="src/uu/cat" } -chcon = { optional=true, version="0.0.17", package="uu_chcon", path="src/uu/chcon" } -chgrp = { optional=true, version="0.0.17", package="uu_chgrp", path="src/uu/chgrp" } -chmod = { optional=true, version="0.0.17", package="uu_chmod", path="src/uu/chmod" } -chown = { optional=true, version="0.0.17", package="uu_chown", path="src/uu/chown" } -chroot = { optional=true, version="0.0.17", package="uu_chroot", path="src/uu/chroot" } -cksum = { optional=true, version="0.0.17", package="uu_cksum", path="src/uu/cksum" } -comm = { optional=true, version="0.0.17", package="uu_comm", path="src/uu/comm" } -cp = { optional=true, version="0.0.17", package="uu_cp", path="src/uu/cp" } -csplit = { optional=true, version="0.0.17", package="uu_csplit", path="src/uu/csplit" } -cut = { optional=true, version="0.0.17", package="uu_cut", path="src/uu/cut" } -date = { optional=true, version="0.0.17", package="uu_date", path="src/uu/date" } -dd = { optional=true, version="0.0.17", package="uu_dd", path="src/uu/dd" } -df = { optional=true, version="0.0.17", package="uu_df", path="src/uu/df" } -dir = { optional=true, version="0.0.17", package="uu_dir", path="src/uu/dir" } -dircolors= { optional=true, version="0.0.17", package="uu_dircolors", path="src/uu/dircolors" } -dirname = { optional=true, version="0.0.17", package="uu_dirname", path="src/uu/dirname" } -du = { optional=true, version="0.0.17", package="uu_du", path="src/uu/du" } -echo = { optional=true, version="0.0.17", package="uu_echo", path="src/uu/echo" } -env = { optional=true, version="0.0.17", package="uu_env", path="src/uu/env" } -expand = { optional=true, version="0.0.17", package="uu_expand", path="src/uu/expand" } -expr = { optional=true, version="0.0.17", package="uu_expr", path="src/uu/expr" } -factor = { optional=true, version="0.0.17", package="uu_factor", path="src/uu/factor" } -false = { optional=true, version="0.0.17", package="uu_false", path="src/uu/false" } -fmt = { optional=true, version="0.0.17", package="uu_fmt", path="src/uu/fmt" } -fold = { optional=true, version="0.0.17", package="uu_fold", path="src/uu/fold" } -groups = { optional=true, version="0.0.17", package="uu_groups", path="src/uu/groups" } -hashsum = { optional=true, version="0.0.17", package="uu_hashsum", path="src/uu/hashsum" } -head = { optional=true, version="0.0.17", package="uu_head", path="src/uu/head" } -hostid = { optional=true, version="0.0.17", package="uu_hostid", path="src/uu/hostid" } -hostname = { optional=true, version="0.0.17", package="uu_hostname", path="src/uu/hostname" } -id = { optional=true, version="0.0.17", package="uu_id", path="src/uu/id" } -install = { optional=true, version="0.0.17", package="uu_install", path="src/uu/install" } -join = { optional=true, version="0.0.17", package="uu_join", path="src/uu/join" } -kill = { optional=true, version="0.0.17", package="uu_kill", path="src/uu/kill" } -link = { optional=true, version="0.0.17", package="uu_link", path="src/uu/link" } -ln = { optional=true, version="0.0.17", package="uu_ln", path="src/uu/ln" } -ls = { optional=true, version="0.0.17", package="uu_ls", path="src/uu/ls" } -logname = { optional=true, version="0.0.17", package="uu_logname", path="src/uu/logname" } -mkdir = { optional=true, version="0.0.17", package="uu_mkdir", path="src/uu/mkdir" } -mkfifo = { optional=true, version="0.0.17", package="uu_mkfifo", path="src/uu/mkfifo" } -mknod = { optional=true, version="0.0.17", package="uu_mknod", path="src/uu/mknod" } -mktemp = { optional=true, version="0.0.17", package="uu_mktemp", path="src/uu/mktemp" } -more = { optional=true, version="0.0.17", package="uu_more", path="src/uu/more" } -mv = { optional=true, version="0.0.17", package="uu_mv", path="src/uu/mv" } -nice = { optional=true, version="0.0.17", package="uu_nice", path="src/uu/nice" } -nl = { optional=true, version="0.0.17", package="uu_nl", path="src/uu/nl" } -nohup = { optional=true, version="0.0.17", package="uu_nohup", path="src/uu/nohup" } -nproc = { optional=true, version="0.0.17", package="uu_nproc", path="src/uu/nproc" } -numfmt = { optional=true, version="0.0.17", package="uu_numfmt", path="src/uu/numfmt" } -od = { optional=true, version="0.0.17", package="uu_od", path="src/uu/od" } -paste = { optional=true, version="0.0.17", package="uu_paste", path="src/uu/paste" } -pathchk = { optional=true, version="0.0.17", package="uu_pathchk", path="src/uu/pathchk" } -pinky = { optional=true, version="0.0.17", package="uu_pinky", path="src/uu/pinky" } -pr = { optional=true, version="0.0.17", package="uu_pr", path="src/uu/pr" } -printenv = { optional=true, version="0.0.17", package="uu_printenv", path="src/uu/printenv" } -printf = { optional=true, version="0.0.17", package="uu_printf", path="src/uu/printf" } -ptx = { optional=true, version="0.0.17", package="uu_ptx", path="src/uu/ptx" } -pwd = { optional=true, version="0.0.17", package="uu_pwd", path="src/uu/pwd" } -readlink = { optional=true, version="0.0.17", package="uu_readlink", path="src/uu/readlink" } -realpath = { optional=true, version="0.0.17", package="uu_realpath", path="src/uu/realpath" } -relpath = { optional=true, version="0.0.17", package="uu_relpath", path="src/uu/relpath" } -rm = { optional=true, version="0.0.17", package="uu_rm", path="src/uu/rm" } -rmdir = { optional=true, version="0.0.17", package="uu_rmdir", path="src/uu/rmdir" } -runcon = { optional=true, version="0.0.17", package="uu_runcon", path="src/uu/runcon" } -seq = { optional=true, version="0.0.17", package="uu_seq", path="src/uu/seq" } -shred = { optional=true, version="0.0.17", package="uu_shred", path="src/uu/shred" } -shuf = { optional=true, version="0.0.17", package="uu_shuf", path="src/uu/shuf" } -sleep = { optional=true, version="0.0.17", package="uu_sleep", path="src/uu/sleep" } -sort = { optional=true, version="0.0.17", package="uu_sort", path="src/uu/sort" } -split = { optional=true, version="0.0.17", package="uu_split", path="src/uu/split" } -stat = { optional=true, version="0.0.17", package="uu_stat", path="src/uu/stat" } -stdbuf = { optional=true, version="0.0.17", package="uu_stdbuf", path="src/uu/stdbuf" } -stty = { optional=true, version="0.0.17", package="uu_stty", path="src/uu/stty" } -sum = { optional=true, version="0.0.17", package="uu_sum", path="src/uu/sum" } -sync = { optional=true, version="0.0.17", package="uu_sync", path="src/uu/sync" } -tac = { optional=true, version="0.0.17", package="uu_tac", path="src/uu/tac" } -tail = { optional=true, version="0.0.17", package="uu_tail", path="src/uu/tail" } -tee = { optional=true, version="0.0.17", package="uu_tee", path="src/uu/tee" } -timeout = { optional=true, version="0.0.17", package="uu_timeout", path="src/uu/timeout" } -touch = { optional=true, version="0.0.17", package="uu_touch", path="src/uu/touch" } -tr = { optional=true, version="0.0.17", package="uu_tr", path="src/uu/tr" } -true = { optional=true, version="0.0.17", package="uu_true", path="src/uu/true" } -truncate = { optional=true, version="0.0.17", package="uu_truncate", path="src/uu/truncate" } -tsort = { optional=true, version="0.0.17", package="uu_tsort", path="src/uu/tsort" } -tty = { optional=true, version="0.0.17", package="uu_tty", path="src/uu/tty" } -uname = { optional=true, version="0.0.17", package="uu_uname", path="src/uu/uname" } -unexpand = { optional=true, version="0.0.17", package="uu_unexpand", path="src/uu/unexpand" } -uniq = { optional=true, version="0.0.17", package="uu_uniq", path="src/uu/uniq" } -unlink = { optional=true, version="0.0.17", package="uu_unlink", path="src/uu/unlink" } -uptime = { optional=true, version="0.0.17", package="uu_uptime", path="src/uu/uptime" } -users = { optional=true, version="0.0.17", package="uu_users", path="src/uu/users" } -vdir = { optional=true, version="0.0.17", package="uu_vdir", path="src/uu/vdir" } -wc = { optional=true, version="0.0.17", package="uu_wc", path="src/uu/wc" } -who = { optional=true, version="0.0.17", package="uu_who", path="src/uu/who" } -whoami = { optional=true, version="0.0.17", package="uu_whoami", path="src/uu/whoami" } -yes = { optional=true, version="0.0.17", package="uu_yes", path="src/uu/yes" } +arch = { optional = true, version = "0.0.19", package = "uu_arch", path = "src/uu/arch" } +base32 = { optional = true, version = "0.0.19", package = "uu_base32", path = "src/uu/base32" } +base64 = { optional = true, version = "0.0.19", package = "uu_base64", path = "src/uu/base64" } +basename = { optional = true, version = "0.0.19", package = "uu_basename", path = "src/uu/basename" } +basenc = { optional = true, version = "0.0.19", package = "uu_basenc", path = "src/uu/basenc" } +cat = { optional = true, version = "0.0.19", package = "uu_cat", path = "src/uu/cat" } +chcon = { optional = true, version = "0.0.19", package = "uu_chcon", path = "src/uu/chcon" } +chgrp = { optional = true, version = "0.0.19", package = "uu_chgrp", path = "src/uu/chgrp" } +chmod = { optional = true, version = "0.0.19", package = "uu_chmod", path = "src/uu/chmod" } +chown = { optional = true, version = "0.0.19", package = "uu_chown", path = "src/uu/chown" } +chroot = { optional = true, version = "0.0.19", package = "uu_chroot", path = "src/uu/chroot" } +cksum = { optional = true, version = "0.0.19", package = "uu_cksum", path = "src/uu/cksum" } +comm = { optional = true, version = "0.0.19", package = "uu_comm", path = "src/uu/comm" } +cp = { optional = true, version = "0.0.19", package = "uu_cp", path = "src/uu/cp" } +csplit = { optional = true, version = "0.0.19", package = "uu_csplit", path = "src/uu/csplit" } +cut = { optional = true, version = "0.0.19", package = "uu_cut", path = "src/uu/cut" } +date = { optional = true, version = "0.0.19", package = "uu_date", path = "src/uu/date" } +dd = { optional = true, version = "0.0.19", package = "uu_dd", path = "src/uu/dd" } +df = { optional = true, version = "0.0.19", package = "uu_df", path = "src/uu/df" } +dir = { optional = true, version = "0.0.19", package = "uu_dir", path = "src/uu/dir" } +dircolors = { optional = true, version = "0.0.19", package = "uu_dircolors", path = "src/uu/dircolors" } +dirname = { optional = true, version = "0.0.19", package = "uu_dirname", path = "src/uu/dirname" } +du = { optional = true, version = "0.0.19", package = "uu_du", path = "src/uu/du" } +echo = { optional = true, version = "0.0.19", package = "uu_echo", path = "src/uu/echo" } +env = { optional = true, version = "0.0.19", package = "uu_env", path = "src/uu/env" } +expand = { optional = true, version = "0.0.19", package = "uu_expand", path = "src/uu/expand" } +expr = { optional = true, version = "0.0.19", package = "uu_expr", path = "src/uu/expr" } +factor = { optional = true, version = "0.0.19", package = "uu_factor", path = "src/uu/factor" } +false = { optional = true, version = "0.0.19", package = "uu_false", path = "src/uu/false" } +fmt = { optional = true, version = "0.0.19", package = "uu_fmt", path = "src/uu/fmt" } +fold = { optional = true, version = "0.0.19", package = "uu_fold", path = "src/uu/fold" } +groups = { optional = true, version = "0.0.19", package = "uu_groups", path = "src/uu/groups" } +hashsum = { optional = true, version = "0.0.19", package = "uu_hashsum", path = "src/uu/hashsum" } +head = { optional = true, version = "0.0.19", package = "uu_head", path = "src/uu/head" } +hostid = { optional = true, version = "0.0.19", package = "uu_hostid", path = "src/uu/hostid" } +hostname = { optional = true, version = "0.0.19", package = "uu_hostname", path = "src/uu/hostname" } +id = { optional = true, version = "0.0.19", package = "uu_id", path = "src/uu/id" } +install = { optional = true, version = "0.0.19", package = "uu_install", path = "src/uu/install" } +join = { optional = true, version = "0.0.19", package = "uu_join", path = "src/uu/join" } +kill = { optional = true, version = "0.0.19", package = "uu_kill", path = "src/uu/kill" } +link = { optional = true, version = "0.0.19", package = "uu_link", path = "src/uu/link" } +ln = { optional = true, version = "0.0.19", package = "uu_ln", path = "src/uu/ln" } +ls = { optional = true, version = "0.0.19", package = "uu_ls", path = "src/uu/ls" } +logname = { optional = true, version = "0.0.19", package = "uu_logname", path = "src/uu/logname" } +mkdir = { optional = true, version = "0.0.19", package = "uu_mkdir", path = "src/uu/mkdir" } +mkfifo = { optional = true, version = "0.0.19", package = "uu_mkfifo", path = "src/uu/mkfifo" } +mknod = { optional = true, version = "0.0.19", package = "uu_mknod", path = "src/uu/mknod" } +mktemp = { optional = true, version = "0.0.19", package = "uu_mktemp", path = "src/uu/mktemp" } +more = { optional = true, version = "0.0.19", package = "uu_more", path = "src/uu/more" } +mv = { optional = true, version = "0.0.19", package = "uu_mv", path = "src/uu/mv" } +nice = { optional = true, version = "0.0.19", package = "uu_nice", path = "src/uu/nice" } +nl = { optional = true, version = "0.0.19", package = "uu_nl", path = "src/uu/nl" } +nohup = { optional = true, version = "0.0.19", package = "uu_nohup", path = "src/uu/nohup" } +nproc = { optional = true, version = "0.0.19", package = "uu_nproc", path = "src/uu/nproc" } +numfmt = { optional = true, version = "0.0.19", package = "uu_numfmt", path = "src/uu/numfmt" } +od = { optional = true, version = "0.0.19", package = "uu_od", path = "src/uu/od" } +paste = { optional = true, version = "0.0.19", package = "uu_paste", path = "src/uu/paste" } +pathchk = { optional = true, version = "0.0.19", package = "uu_pathchk", path = "src/uu/pathchk" } +pinky = { optional = true, version = "0.0.19", package = "uu_pinky", path = "src/uu/pinky" } +pr = { optional = true, version = "0.0.19", package = "uu_pr", path = "src/uu/pr" } +printenv = { optional = true, version = "0.0.19", package = "uu_printenv", path = "src/uu/printenv" } +printf = { optional = true, version = "0.0.19", package = "uu_printf", path = "src/uu/printf" } +ptx = { optional = true, version = "0.0.19", package = "uu_ptx", path = "src/uu/ptx" } +pwd = { optional = true, version = "0.0.19", package = "uu_pwd", path = "src/uu/pwd" } +readlink = { optional = true, version = "0.0.19", package = "uu_readlink", path = "src/uu/readlink" } +realpath = { optional = true, version = "0.0.19", package = "uu_realpath", path = "src/uu/realpath" } +relpath = { optional = true, version = "0.0.19", package = "uu_relpath", path = "src/uu/relpath" } +rm = { optional = true, version = "0.0.19", package = "uu_rm", path = "src/uu/rm" } +rmdir = { optional = true, version = "0.0.19", package = "uu_rmdir", path = "src/uu/rmdir" } +runcon = { optional = true, version = "0.0.19", package = "uu_runcon", path = "src/uu/runcon" } +seq = { optional = true, version = "0.0.19", package = "uu_seq", path = "src/uu/seq" } +shred = { optional = true, version = "0.0.19", package = "uu_shred", path = "src/uu/shred" } +shuf = { optional = true, version = "0.0.19", package = "uu_shuf", path = "src/uu/shuf" } +sleep = { optional = true, version = "0.0.19", package = "uu_sleep", path = "src/uu/sleep" } +sort = { optional = true, version = "0.0.19", package = "uu_sort", path = "src/uu/sort" } +split = { optional = true, version = "0.0.19", package = "uu_split", path = "src/uu/split" } +stat = { optional = true, version = "0.0.19", package = "uu_stat", path = "src/uu/stat" } +stdbuf = { optional = true, version = "0.0.19", package = "uu_stdbuf", path = "src/uu/stdbuf" } +stty = { optional = true, version = "0.0.19", package = "uu_stty", path = "src/uu/stty" } +sum = { optional = true, version = "0.0.19", package = "uu_sum", path = "src/uu/sum" } +sync = { optional = true, version = "0.0.19", package = "uu_sync", path = "src/uu/sync" } +tac = { optional = true, version = "0.0.19", package = "uu_tac", path = "src/uu/tac" } +tail = { optional = true, version = "0.0.19", package = "uu_tail", path = "src/uu/tail" } +tee = { optional = true, version = "0.0.19", package = "uu_tee", path = "src/uu/tee" } +timeout = { optional = true, version = "0.0.19", package = "uu_timeout", path = "src/uu/timeout" } +touch = { optional = true, version = "0.0.19", package = "uu_touch", path = "src/uu/touch" } +tr = { optional = true, version = "0.0.19", package = "uu_tr", path = "src/uu/tr" } +true = { optional = true, version = "0.0.19", package = "uu_true", path = "src/uu/true" } +truncate = { optional = true, version = "0.0.19", package = "uu_truncate", path = "src/uu/truncate" } +tsort = { optional = true, version = "0.0.19", package = "uu_tsort", path = "src/uu/tsort" } +tty = { optional = true, version = "0.0.19", package = "uu_tty", path = "src/uu/tty" } +uname = { optional = true, version = "0.0.19", package = "uu_uname", path = "src/uu/uname" } +unexpand = { optional = true, version = "0.0.19", package = "uu_unexpand", path = "src/uu/unexpand" } +uniq = { optional = true, version = "0.0.19", package = "uu_uniq", path = "src/uu/uniq" } +unlink = { optional = true, version = "0.0.19", package = "uu_unlink", path = "src/uu/unlink" } +uptime = { optional = true, version = "0.0.19", package = "uu_uptime", path = "src/uu/uptime" } +users = { optional = true, version = "0.0.19", package = "uu_users", path = "src/uu/users" } +vdir = { optional = true, version = "0.0.19", package = "uu_vdir", path = "src/uu/vdir" } +wc = { optional = true, version = "0.0.19", package = "uu_wc", path = "src/uu/wc" } +who = { optional = true, version = "0.0.19", package = "uu_who", path = "src/uu/who" } +whoami = { optional = true, version = "0.0.19", package = "uu_whoami", path = "src/uu/whoami" } +yes = { optional = true, version = "0.0.19", package = "uu_yes", path = "src/uu/yes" } # this breaks clippy linting with: "tests/by-util/test_factor_benches.rs: No such file or directory (os error 2)" # factor_benches = { optional = true, version = "0.0.0", package = "uu_factor_benches", path = "tests/benches/factor" } @@ -472,35 +475,34 @@ yes = { optional=true, version="0.0.17", package="uu_yes", path="src/uu/yes #pin_cc = { version="1.0.61, < 1.0.62", package="cc" } ## cc v1.0.62 has compiler errors for MinRustV v1.32.0, requires 1.34 (for `std::str::split_ascii_whitespace()`) [dev-dependencies] -chrono = { workspace=true } +chrono = { workspace = true } conv = "0.3" -filetime = { workspace=true } -glob = { workspace=true } -libc = { workspace=true } +filetime = { workspace = true } +glob = { workspace = true } +libc = { workspace = true } pretty_assertions = "1" -rand = { workspace=true } -regex = { workspace=true } -sha1 = { version="0.10", features=["std"] } -tempfile = { workspace=true } -time = { workspace=true, features=["local-offset"] } -unindent = "0.1" -uucore = { workspace=true, features=["entries", "process", "signals"] } -walkdir = { workspace=true } -is-terminal = { workspace=true } -hex-literal = "0.3.1" -rstest = "0.16.0" +rand = { workspace = true } +regex = { workspace = true } +sha1 = { version = "0.10", features = ["std"] } +tempfile = { workspace = true } +time = { workspace = true, features = ["local-offset"] } +unindent = "0.2" +uucore = { workspace = true, features = ["entries", "process", "signals"] } +walkdir = { workspace = true } +is-terminal = { workspace = true } +hex-literal = "0.4.1" +rstest = "0.17.0" [target.'cfg(any(target_os = "linux", target_os = "android"))'.dev-dependencies] -procfs = { version = "0.14", default-features = false } +procfs = { version = "0.15", default-features = false } rlimit = "0.9.1" [target.'cfg(unix)'.dev-dependencies] -nix = { workspace=true, features=["process", "signal", "user"] } -rust-users = { version="0.11", package="users" } +nix = { workspace = true, features = ["process", "signal", "user"] } rand_pcg = "0.3" [build-dependencies] -phf_codegen = { workspace=true } +phf_codegen = { workspace = true } [[bin]] name = "coreutils" @@ -510,3 +512,22 @@ path = "src/bin/coreutils.rs" name = "uudoc" path = "src/bin/uudoc.rs" required-features = ["uudoc"] + +# The default release profile. It contains all optimizations, without +# sacrificing debug info. With this profile (like in the standard +# release profile), the debug info and the stack traces will still be available. +[profile.release] +lto = true + +# A release-like profile that is tuned to be fast, even when being fast +# compromises on binary size. This includes aborting on panic. +[profile.release-fast] +inherits = "release" +panic = "abort" + +# A release-like profile that is as small as possible. +[profile.release-small] +inherits = "release" +opt-level = "z" +panic = "abort" +strip = true diff --git a/DEVELOPER_INSTRUCTIONS.md b/DEVELOPER_INSTRUCTIONS.md deleted file mode 100644 index 28deb2677..000000000 --- a/DEVELOPER_INSTRUCTIONS.md +++ /dev/null @@ -1,70 +0,0 @@ -Documentation -------------- - -The source of the documentation is available on: - -https://uutils.github.io/dev/coreutils/ - -The documentation is updated everyday on this repository: - -https://github.com/uutils/uutils.github.io/ - -Running GNU tests ------------------ - - - -- Check out https://github.com/coreutils/coreutils next to your fork as gnu -- Check out https://github.com/coreutils/gnulib next to your fork as gnulib -- Rename the checkout of your fork to uutils - -At the end you should have uutils, gnu and gnulib checked out next to each other. - -- Run `cd uutils && ./util/build-gnu.sh && cd ..` to get everything ready (this may take a while) -- Finally, you can run tests with `bash uutils/util/run-gnu-test.sh `. Instead of `` insert the tests you want to run, e.g. `tests/misc/wc-proc.sh`. - - -Code Coverage Report Generation ---------------------------------- - - - -Code coverage report can be generated using [grcov](https://github.com/mozilla/grcov). - -### Using Nightly Rust - -To generate [gcov-based](https://github.com/mozilla/grcov#example-how-to-generate-gcda-files-for-a-rust-project) coverage report - -```bash -$ export CARGO_INCREMENTAL=0 -$ export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" -$ export RUSTDOCFLAGS="-Cpanic=abort" -$ cargo build # e.g., --features feat_os_unix -$ cargo test # e.g., --features feat_os_unix test_pathchk -$ grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing --ignore build.rs --excl-br-line "^\s*((debug_)?assert(_eq|_ne)?\#\[derive\()" -o ./target/debug/coverage/ -$ # open target/debug/coverage/index.html in browser -``` - -if changes are not reflected in the report then run `cargo clean` and run the above commands. - -### Using Stable Rust - -If you are using stable version of Rust that doesn't enable code coverage instrumentation by default -then add `-Z-Zinstrument-coverage` flag to `RUSTFLAGS` env variable specified above. - - -pre-commit hooks ----------------- - -A configuration for `pre-commit` is provided in the repository. It allows automatically checking every git commit you make to ensure it compiles, and passes `clippy` and `rustfmt` without warnings. - -To use the provided hook: - -1. [Install `pre-commit`](https://pre-commit.com/#install) -2. Run `pre-commit install` while in the repository directory - -Your git commits will then automatically be checked. If a check fails, an error message will explain why, and your commit will be canceled. You can then make the suggested changes, and run `git commit ...` again. - -### Using Clippy - -The `msrv` key in the clippy configuration file `clippy.toml` is used to disable lints pertaining to newer features by specifying the minimum supported Rust version (MSRV). However, this key is only supported on `nightly`. To invoke clippy without errors, use `cargo +nightly clippy`. In order to also check tests and non-default crate features, use `cargo +nightly clippy --all-targets --all-features`. diff --git a/GNUmakefile b/GNUmakefile index b242bc8ce..26d6de5ba 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,4 +1,4 @@ -# spell-checker:ignore (misc) testsuite runtest findstring (targets) busytest toybox distclean pkgs ; (vars/env) BINDIR BUILDDIR CARGOFLAGS DESTDIR DOCSDIR INSTALLDIR INSTALLEES MULTICALL DATAROOTDIR TESTDIR +# spell-checker:ignore (misc) testsuite runtest findstring (targets) busytest toybox distclean pkgs nextest ; (vars/env) BINDIR BUILDDIR CARGOFLAGS DESTDIR DOCSDIR INSTALLDIR INSTALLEES MULTICALL DATAROOTDIR TESTDIR # Config options PROFILE ?= debug @@ -289,6 +289,9 @@ $(foreach test,$(filter-out $(SKIP_UTILS),$(PROGS)),$(eval $(call TEST_BUSYBOX,$ test: ${CARGO} test ${CARGOFLAGS} --features "$(TESTS) $(TEST_SPEC_FEATURE)" --no-default-features $(TEST_NO_FAIL_FAST) +nextest: + ${CARGO} nextest run ${CARGOFLAGS} --features "$(TESTS) $(TEST_SPEC_FEATURE)" --no-default-features $(TEST_NO_FAIL_FAST) + test_toybox: -(cd $(TOYBOX_SRC)/ && make tests) @@ -349,10 +352,12 @@ endif mkdir -p $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions mkdir -p $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions mkdir -p $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d + mkdir -p $(DESTDIR)$(DATAROOTDIR)/man/man1 $(foreach prog, $(INSTALLEES), \ $(BUILDDIR)/coreutils completion $(prog) zsh > $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/_$(PROG_PREFIX)$(prog); \ $(BUILDDIR)/coreutils completion $(prog) bash > $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/$(PROG_PREFIX)$(prog); \ $(BUILDDIR)/coreutils completion $(prog) fish > $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/$(PROG_PREFIX)$(prog).fish; \ + $(BUILDDIR)/coreutils manpage $(prog) > $(DESTDIR)$(DATAROOTDIR)/man/man1/$(PROG_PREFIX)$(prog).1; \ ) uninstall: diff --git a/Makefile.toml b/Makefile.toml index ded2cd55b..84698df5f 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -20,15 +20,12 @@ run_task = "_init" [tasks._init] private = true -dependencies = [ - "_init-vars", -] +dependencies = ["_init-vars"] [tasks._init-vars] private = true script_runner = "@duckscript" -script = [ -''' +script = [''' # reset build/test flags set_env CARGO_MAKE_CARGO_BUILD_TEST_FLAGS "" # determine features @@ -90,54 +87,36 @@ for arg in "${args_utils_list}" end args_utils = trim "${args_utils}" set_env CARGO_MAKE_TASK_BUILD_UTILS_ARGS "${args_utils}" -''' -] +'''] ### tasks [tasks.default] description = "## *DEFAULT* Build (debug-mode) and test project" category = "[project]" -dependencies = [ - "action-build-debug", - "test-terse", -] +dependencies = ["action-build-debug", "test-terse"] ## [tasks.build] description = "## Build (release-mode) project" category = "[project]" -dependencies = [ - "core::pre-build", - "action-build-release", - "core::post-build", -] +dependencies = ["core::pre-build", "action-build-release", "core::post-build"] [tasks.build-debug] description = "## Build (debug-mode) project" category = "[project]" -dependencies = [ - "action-build-debug", -] +dependencies = ["action-build-debug"] [tasks.build-examples] description = "## Build (release-mode) project example(s); usage: `cargo make (build-examples | examples) [EXAMPLE]...`" category = "[project]" -dependencies = [ - "core::pre-build", - "action-build-examples", - "core::post-build", -] +dependencies = ["core::pre-build", "action-build-examples", "core::post-build"] [tasks.build-features] description = "## Build (with features; release-mode) project; usage: `cargo make (build-features | features) FEATURE...`" category = "[project]" -dependencies = [ - "core::pre-build", - "action-build-features", - "core::post-build", -] +dependencies = ["core::pre-build", "action-build-features", "core::post-build"] [tasks.build-release] alias = "build" @@ -148,9 +127,7 @@ alias = "build-debug" [tasks.example] description = "hidden singular-form alias for 'examples'" category = "[project]" -dependencies = [ - "examples", -] +dependencies = ["examples"] [tasks.examples] alias = "build-examples" @@ -161,17 +138,12 @@ alias = "build-features" [tasks.format] description = "## Format code files (with `cargo fmt`; includes tests)" category = "[project]" -dependencies = [ - "action-format", - "action-format-tests", -] +dependencies = ["action-format", "action-format-tests"] [tasks.help] description = "## Display help" category = "[project]" -dependencies = [ - "action-display-help", -] +dependencies = ["action-display-help"] [tasks.install] description = "## Install project binary (to $HOME/.cargo/bin)" @@ -182,10 +154,7 @@ args = ["install", "--path", "."] [tasks.lint] description = "## Display lint report" category = "[project]" -dependencies = [ - "action-clippy", - "action-fmt_report", -] +dependencies = ["action-clippy", "action-fmt_report"] [tasks.release] alias = "build" @@ -193,48 +162,32 @@ alias = "build" [tasks.test] description = "## Run project tests" category = "[project]" -dependencies = [ - "core::pre-test", - "core::test", - "core::post-test", -] +dependencies = ["core::pre-test", "core::test", "core::post-test"] [tasks.test-terse] description = "## Run project tests (with terse/summary output)" category = "[project]" -dependencies = [ - "core::pre-test", - "action-test_quiet", - "core::post-test", -] +dependencies = ["core::pre-test", "action-test_quiet", "core::post-test"] [tasks.test-util] description = "## Test (individual) utilities; usage: `cargo make (test-util | test-uutil) [UTIL_NAME...]`" category = "[project]" -dependencies = [ - "action-test-utils", -] +dependencies = ["action-test-utils"] [tasks.test-utils] description = "hidden plural-form alias for 'test-util'" category = "[project]" -dependencies = [ - "test-util", -] +dependencies = ["test-util"] [tasks.test-uutil] description = "hidden alias for 'test-util'" category = "[project]" -dependencies = [ - "test-util", -] +dependencies = ["test-util"] [tasks.test-uutils] description = "hidden alias for 'test-util'" category = "[project]" -dependencies = [ - "test-util", -] +dependencies = ["test-util"] [tasks.uninstall] description = "## Remove project binary (from $HOME/.cargo/bin)" @@ -246,63 +199,66 @@ args = ["uninstall"] description = "## Build (individual; release-mode) utilities; usage: `cargo make (util | uutil) [UTIL_NAME...]`" category = "[project]" dependencies = [ - "core::pre-build", - "action-determine-utils", - "action-build-utils", - "core::post-build", + "core::pre-build", + "action-determine-utils", + "action-build-utils", + "core::post-build", ] [tasks.utils] description = "hidden plural-form alias for 'util'" category = "[project]" -dependencies = [ - "util", -] +dependencies = ["util"] [tasks.uutil] description = "hidden alias for 'util'" category = "[project]" -dependencies = [ - "util", -] +dependencies = ["util"] [tasks.uutils] description = "hidden plural-form alias for 'util'" category = "[project]" -dependencies = [ - "util", -] +dependencies = ["util"] ### actions [tasks.action-build-release] description = "`cargo build --release`" command = "cargo" -args = ["build", "--release", "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )" ] +args = ["build", "--release", "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )"] [tasks.action-build-debug] description = "`cargo build`" command = "cargo" -args = ["build", "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )" ] +args = ["build", "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )"] [tasks.action-build-examples] description = "`cargo build (--examples|(--example EXAMPLE)...)`" command = "cargo" -args = ["build", "--release", "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )", "${CARGO_MAKE_TASK_BUILD_EXAMPLES_ARGS}" ] +args = [ + "build", + "--release", + "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )", + "${CARGO_MAKE_TASK_BUILD_EXAMPLES_ARGS}", +] [tasks.action-build-features] description = "`cargo build --release --features FEATURES`" command = "cargo" -args = ["build", "--release", "--no-default-features", "--features", "${CARGO_MAKE_TASK_BUILD_FEATURES_ARGS}" ] +args = [ + "build", + "--release", + "--no-default-features", + "--features", + "${CARGO_MAKE_TASK_BUILD_FEATURES_ARGS}", +] [tasks.action-build-utils] description = "Build individual utilities" -dependencies = [ - "action-determine-utils", -] +dependencies = ["action-determine-utils"] command = "cargo" # args = ["build", "@@remove-empty(CARGO_MAKE_TASK_BUILD_UTILS_ARGS)" ] -args = ["build", "--release", "@@split(CARGO_MAKE_TASK_BUILD_UTILS_ARGS, )" ] +args = ["build", "--release", "@@split(CARGO_MAKE_TASK_BUILD_UTILS_ARGS, )"] [tasks.action-clippy] description = "`cargo clippy` lint report" @@ -311,8 +267,7 @@ args = ["clippy", "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )"] [tasks.action-determine-utils] script_runner = "@duckscript" -script = [ -''' +script = [''' package_options = get_env CARGO_MAKE_TASK_BUILD_UTILS_ARGS if is_empty "${package_options}" show_utils = get_env CARGO_MAKE_VAR_SHOW_UTILS @@ -335,13 +290,11 @@ if is_empty "${package_options}" package_options = trim "${package_options}" end_if set_env CARGO_MAKE_TASK_BUILD_UTILS_ARGS "${package_options}" -''' -] +'''] [tasks.action-determine-tests] script_runner = "@duckscript" -script = [ -''' +script = [''' test_files = glob_array tests/**/*.rs for file in ${test_files} file = replace "${file}" "\\" "/" @@ -354,8 +307,7 @@ for file in ${test_files} end_if end set_env CARGO_MAKE_VAR_TESTS "${tests}" -''' -] +'''] [tasks.action-format] description = "`cargo fmt`" @@ -364,9 +316,7 @@ args = ["fmt"] [tasks.action-format-tests] description = "`cargo fmt` tests" -dependencies = [ - "action-determine-tests", -] +dependencies = ["action-determine-tests"] command = "cargo" args = ["fmt", "--", "@@split(CARGO_MAKE_VAR_TESTS, )"] @@ -381,16 +331,18 @@ args = ["fmt", "--", "--check"] [tasks.action-spellcheck-codespell] description = "`codespell` spellcheck repository" command = "codespell" # (from `pip install codespell`) -args = [".", "--skip=*/.git,./target,./tests/fixtures", "--ignore-words-list=mut,od"] +args = [ + ".", + "--skip=*/.git,./target,./tests/fixtures", + "--ignore-words-list=mut,od", +] [tasks.action-test-utils] description = "Build individual utilities" -dependencies = [ - "action-determine-utils", -] +dependencies = ["action-determine-utils"] command = "cargo" # args = ["build", "@@remove-empty(CARGO_MAKE_TASK_BUILD_UTILS_ARGS)" ] -args = ["test", "@@split(CARGO_MAKE_TASK_BUILD_UTILS_ARGS, )" ] +args = ["test", "@@split(CARGO_MAKE_TASK_BUILD_UTILS_ARGS, )"] [tasks.action-test_quiet] description = "Test (in `--quiet` mode)" @@ -399,8 +351,7 @@ args = ["test", "--quiet", "@@split(CARGO_MAKE_CARGO_BUILD_TEST_FLAGS, )"] [tasks.action-display-help] script_runner = "@duckscript" -script = [ -''' +script = [''' echo "" echo "usage: `cargo make TARGET [ARGS...]`" echo "" @@ -432,5 +383,4 @@ script = [ end_if end echo "" -''' -] +'''] diff --git a/README.md b/README.md index 66a0395e9..5a9f968ae 100644 --- a/README.md +++ b/README.md @@ -1,114 +1,124 @@ + + + +
+ +![uutils logo](docs/src/logo.svg) + # uutils coreutils [![Crates.io](https://img.shields.io/crates/v/coreutils.svg)](https://crates.io/crates/coreutils) [![Discord](https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat)](https://discord.gg/wQVJbvJ) [![License](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/uutils/coreutils/blob/main/LICENSE) -[![LOC](https://tokei.rs/b1/github/uutils/coreutils?category=code)](https://github.com/Aaronepower/tokei) [![dependency status](https://deps.rs/repo/github/uutils/coreutils/status.svg)](https://deps.rs/repo/github/uutils/coreutils) [![CodeCov](https://codecov.io/gh/uutils/coreutils/branch/master/graph/badge.svg)](https://codecov.io/gh/uutils/coreutils) ![MSRV](https://img.shields.io/badge/MSRV-1.64.0-brightgreen) ------------------------------------------------ +
- - +--- -uutils is an attempt at writing universal (as in cross-platform) CLI -utilities in [Rust](http://www.rust-lang.org). -While all programs have been implemented, some options might be missing -or different behavior might be experienced. + +uutils coreutils is a cross-platform reimplementation of the GNU coreutils in +[Rust](http://www.rust-lang.org). While all programs have been implemented, some +options might be missing or different behavior might be experienced. To install it: -``` -$ cargo install coreutils -$ ~/.cargo/bin/coreutils +```shell +cargo install coreutils +~/.cargo/bin/coreutils ``` -## Why? + -uutils aims to work on as many platforms as possible, to be able to use the -same utils on Linux, Mac, Windows and other platforms. This ensures, for -example, that scripts can be easily transferred between platforms. Rust was -chosen not only because it is fast and safe, but is also excellent for -writing cross-platform code. +## Goals + +uutils aims to be a drop-in replacement for the GNU utils. Differences with GNU +are treated as bugs. + +uutils aims to work on as many platforms as possible, to be able to use the same +utils on Linux, Mac, Windows and other platforms. This ensures, for example, +that scripts can be easily transferred between platforms. ## Documentation + uutils has both user and developer documentation available: - [User Manual](https://uutils.github.io/user/) - [Developer Documentation](https://uutils.github.io/dev/coreutils/) -Both can also be generated locally, the instructions for that can be found in the -[coreutils docs](https://github.com/uutils/uutils.github.io) repository. +Both can also be generated locally, the instructions for that can be found in +the [coreutils docs](https://github.com/uutils/uutils.github.io) repository. + ## Requirements -* Rust (`cargo`, `rustc`) -* GNU Make (optional) +- Rust (`cargo`, `rustc`) +- GNU Make (optional) ### Rust Version -uutils follows Rust's release channels and is tested against stable, beta and nightly. -The current Minimum Supported Rust Version (MSRV) is `1.64.0`. +uutils follows Rust's release channels and is tested against stable, beta and +nightly. The current Minimum Supported Rust Version (MSRV) is `1.64.0`. ## Building -There are currently two methods to build the uutils binaries: either Cargo -or GNU Make. +There are currently two methods to build the uutils binaries: either Cargo or +GNU Make. > Building the full package, including all documentation, requires both Cargo > and Gnu Make on a Unix platform. For either method, we first need to fetch the repository: -```bash -$ git clone https://github.com/uutils/coreutils -$ cd coreutils +```shell +git clone https://github.com/uutils/coreutils +cd coreutils ``` ### Cargo -Building uutils using Cargo is easy because the process is the same as for -every other Rust program: +Building uutils using Cargo is easy because the process is the same as for every +other Rust program: -```bash -$ cargo build --release +```shell +cargo build --release ``` This command builds the most portable common core set of uutils into a multicall (BusyBox-type) binary, named 'coreutils', on most Rust-supported platforms. -Additional platform-specific uutils are often available. Building these -expanded sets of uutils for a platform (on that platform) is as simple as -specifying it as a feature: +Additional platform-specific uutils are often available. Building these expanded +sets of uutils for a platform (on that platform) is as simple as specifying it +as a feature: -```bash -$ cargo build --release --features macos +```shell +cargo build --release --features macos # or ... -$ cargo build --release --features windows +cargo build --release --features windows # or ... -$ cargo build --release --features unix +cargo build --release --features unix ``` If you don't want to build every utility available on your platform into the -final binary, you can also specify which ones you want to build manually. -For example: +final binary, you can also specify which ones you want to build manually. For +example: -```bash -$ cargo build --features "base32 cat echo rm" --no-default-features +```shell +cargo build --features "base32 cat echo rm" --no-default-features ``` -If you don't want to build the multicall binary and would prefer to build -the utilities as individual binaries, that is also possible. Each utility -is contained in its own package within the main repository, named -"uu_UTILNAME". To build individual utilities, use cargo to build just the -specific packages (using the `--package` [aka `-p`] option). For example: +If you don't want to build the multicall binary and would prefer to build the +utilities as individual binaries, that is also possible. Each utility is +contained in its own package within the main repository, named "uu_UTILNAME". To +build individual utilities, use cargo to build just the specific packages (using +the `--package` [aka `-p`] option). For example: -```bash -$ cargo build -p uu_base32 -p uu_cat -p uu_echo -p uu_rm +```shell +cargo build -p uu_base32 -p uu_cat -p uu_echo -p uu_rm ``` ### GNU Make @@ -117,80 +127,88 @@ Building using `make` is a simple process as well. To simply build all available utilities: -```bash -$ make +```shell +make +``` + +In release mode: + +```shell +make PROFILE=release ``` To build all but a few of the available utilities: -```bash -$ make SKIP_UTILS='UTILITY_1 UTILITY_2' +```shell +make SKIP_UTILS='UTILITY_1 UTILITY_2' ``` To build only a few of the available utilities: -```bash -$ make UTILS='UTILITY_1 UTILITY_2' +```shell +make UTILS='UTILITY_1 UTILITY_2' ``` ## Installation -### Cargo +### Install with Cargo Likewise, installing can simply be done using: -```bash -$ cargo install --path . +```shell +cargo install --path . --locked ``` -This command will install uutils into Cargo's *bin* folder (*e.g.* `$HOME/.cargo/bin`). +This command will install uutils into Cargo's _bin_ folder (_e.g._ +`$HOME/.cargo/bin`). -This does not install files necessary for shell completion. For shell completion to work, -use `GNU Make` or see `Manually install shell completions`. +This does not install files necessary for shell completion or manpages. For +manpages or shell completion to work, use `GNU Make` or see +`Manually install shell completions`/`Manually install manpages`. -### GNU Make +### Install with GNU Make To install all available utilities: -```bash -$ make install +```shell +make install ``` To install using `sudo` switch `-E` must be used: -```bash -$ sudo -E make install +```shell +sudo -E make install ``` To install all but a few of the available utilities: -```bash -$ make SKIP_UTILS='UTILITY_1 UTILITY_2' install +```shell +make SKIP_UTILS='UTILITY_1 UTILITY_2' install ``` To install only a few of the available utilities: -```bash -$ make UTILS='UTILITY_1 UTILITY_2' install +```shell +make UTILS='UTILITY_1 UTILITY_2' install ``` To install every program with a prefix (e.g. uu-echo uu-cat): -```bash -$ make PROG_PREFIX=PREFIX_GOES_HERE install +```shell +make PROG_PREFIX=PREFIX_GOES_HERE install ``` To install the multicall binary: -```bash -$ make MULTICALL=y install +```shell +make MULTICALL=y install ``` Set install parent directory (default value is /usr/local): -```bash +```shell # DESTDIR is also supported -$ make PREFIX=/my/path install +make PREFIX=/my/path install ``` Installing with `make` installs shell completions for all installed utilities @@ -199,302 +217,94 @@ be generated; See `Manually install shell completions`. ### Manually install shell completions -The `coreutils` binary can generate completions for the `bash`, `elvish`, `fish`, `powershell` -and `zsh` shells. It prints the result to stdout. +The `coreutils` binary can generate completions for the `bash`, `elvish`, +`fish`, `powershell` and `zsh` shells. It prints the result to stdout. The syntax is: -```bash + +```shell cargo run completion ``` -So, to install completions for `ls` on `bash` to `/usr/local/share/bash-completion/completions/ls`, -run: +So, to install completions for `ls` on `bash` to +`/usr/local/share/bash-completion/completions/ls`, run: + +```shell +cargo run completion ls bash > /usr/local/share/bash-completion/completions/ls +``` + +### Manually install manpages + +To generate manpages, the syntax is: ```bash -cargo run completion ls bash > /usr/local/share/bash-completion/completions/ls +cargo run manpage +``` + +So, to install the manpage for `ls` to `/usr/local/share/man/man1/ls.1` run: + +```bash +cargo run manpage ls > /usr/local/share/man/man1/ls.1 ``` ## Un-installation -Un-installation differs depending on how you have installed uutils. If you used -Cargo to install, use Cargo to uninstall. If you used GNU Make to install, use +Un-installation differs depending on how you have installed uutils. If you used +Cargo to install, use Cargo to uninstall. If you used GNU Make to install, use Make to uninstall. -### Cargo +### Uninstall with Cargo To uninstall uutils: -```bash -$ cargo uninstall uutils +```shell +cargo uninstall uutils ``` -### GNU Make +### Uninstall with GNU Make To uninstall all utilities: -```bash -$ make uninstall +```shell +make uninstall ``` To uninstall every program with a set prefix: -```bash -$ make PROG_PREFIX=PREFIX_GOES_HERE uninstall +```shell +make PROG_PREFIX=PREFIX_GOES_HERE uninstall ``` To uninstall the multicall binary: -```bash -$ make MULTICALL=y uninstall +```shell +make MULTICALL=y uninstall ``` To uninstall from a custom parent directory: -```bash +```shell # DESTDIR is also supported -$ make PREFIX=/my/path uninstall +make PREFIX=/my/path uninstall ``` + -## Testing - -Testing can be done using either Cargo or `make`. - -### Cargo - -Just like with building, we follow the standard procedure for testing using -Cargo: - -```bash -$ cargo test -``` - -By default, `cargo test` only runs the common programs. To run also platform -specific tests, run: - -```bash -$ cargo test --features unix -``` - -If you would prefer to test a select few utilities: - -```bash -$ cargo test --features "chmod mv tail" --no-default-features -``` - -If you also want to test the core utilities: - -```bash -$ cargo test -p uucore -p coreutils -``` - -To debug: - -```bash -$ gdb --args target/debug/coreutils ls -(gdb) b ls.rs:79 -(gdb) run -``` - -### GNU Make - -To simply test all available utilities: - -```bash -$ make test -``` - -To test all but a few of the available utilities: - -```bash -$ make SKIP_UTILS='UTILITY_1 UTILITY_2' test -``` - -To test only a few of the available utilities: - -```bash -$ make UTILS='UTILITY_1 UTILITY_2' test -``` - -To include tests for unimplemented behavior: - -```bash -$ make UTILS='UTILITY_1 UTILITY_2' SPEC=y test -``` - -### Run Busybox Tests - -This testing functionality is only available on *nix operating systems and -requires `make`. - -To run busybox tests for all utilities for which busybox has tests - -```bash -$ make busytest -``` - -To run busybox tests for a few of the available utilities - -```bash -$ make UTILS='UTILITY_1 UTILITY_2' busytest -``` - -To pass an argument like "-v" to the busybox test runtime - -```bash -$ make UTILS='UTILITY_1 UTILITY_2' RUNTEST_ARGS='-v' busytest -``` - -### Comparing with GNU +## GNU test suite compatibility Below is the evolution of how many GNU tests uutils passes. A more detailed breakdown of the GNU test results of the main branch can be found [in the user manual](https://uutils.github.io/user/test_coverage.html). +See for the main meta bugs +(many are missing). + ![Evolution over time](https://github.com/uutils/coreutils-tracking/blob/main/gnu-results.png?raw=true) -To run locally: - -```bash -$ bash util/build-gnu.sh -$ bash util/run-gnu-test.sh -# To run a single test: -$ bash util/run-gnu-test.sh tests/touch/not-owner.sh # for example -# To run several tests: -$ bash util/run-gnu-test.sh tests/touch/not-owner.sh tests/rm/no-give-up.sh # for example -# If this is a perl (.pl) test, to run in debug: -$ DEBUG=1 bash util/run-gnu-test.sh tests/misc/sm3sum.pl -``` - -Note that it relies on individual utilities (not the multicall binary). - -### Improving the GNU compatibility - -The Python script `./util/remaining-gnu-error.py` shows the list of failing tests in the CI. - -To improve the GNU compatibility, the following process is recommended: - -1. Identify a test (the smaller, the better) on a program that you understand or is easy to understand. You can use the `./util/remaining-gnu-error.py` script to help with this decision. -1. Build both the GNU and Rust coreutils using: `bash util/build-gnu.sh` -1. Run the test with `bash util/run-gnu-test.sh ` -1. Start to modify `` to understand what is wrong. Examples: - 1. Add `set -v` to have the bash verbose mode - 1. Add `echo $?` where needed - 1. When the variable `fail` is used in the test, `echo $fail` to see when the test started to fail - 1. Bump the content of the output (ex: `cat err`) - 1. ... -1. Or, if the test is simple, extract the relevant information to create a new test case running both GNU & Rust implementation -1. Start to modify the Rust implementation to match the expected behavior -1. Add a test to make sure that we don't regress (our test suite is super quick) - - ## Contributing To contribute to uutils, please see [CONTRIBUTING](CONTRIBUTING.md). -## Utilities - -Please note that this is not fully accurate: -* Some new options can be added / removed in the GNU implementation; -* Some error management might be missing; -* Some behaviors might be different. - -See https://github.com/uutils/coreutils/issues/3336 for the main meta bugs -(many are missing). - -| Done | WIP | -|-----------|-----------| -| arch | cp | -| base32 | date | -| base64 | dd | -| basename | df | -| basenc | expr | -| cat | install | -| chcon | ls | -| chgrp | more | -| chmod | numfmt | -| chown | od (`--strings` and 128-bit data types missing) | -| chroot | pr | -| cksum | printf | -| comm | sort | -| csplit | split | -| cut | tac | -| dircolors | test | -| dirname | dir | -| du | vdir | -| echo | stty | -| env | | -| expand | | -| factor | | -| false | | -| fmt | | -| fold | | -| groups | | -| hashsum | | -| head | | -| hostid | | -| hostname | | -| id | | -| join | | -| kill | | -| link | | -| ln | | -| logname | | -| ~~md5sum~~ (replaced by [hashsum](https://github.com/uutils/coreutils/blob/main/src/uu/hashsum/src/hashsum.rs)) | | -| ~~sha1sum~~ (replaced by [hashsum](https://github.com/uutils/coreutils/blob/main/src/uu/hashsum/src/hashsum.rs)) | | -| ~~sha224sum~~ (replaced by [hashsum](https://github.com/uutils/coreutils/blob/main/src/uu/hashsum/src/hashsum.rs)) | | -| ~~sha256sum~~ (replaced by [hashsum](https://github.com/uutils/coreutils/blob/main/src/uu/hashsum/src/hashsum.rs)) | | -| ~~sha384sum~~ (replaced by [hashsum](https://github.com/uutils/coreutils/blob/main/src/uu/hashsum/src/hashsum.rs)) | | -| ~~sha512sum~~ (replaced by [hashsum](https://github.com/uutils/coreutils/blob/main/src/uu/hashsum/src/hashsum.rs)) | | -| mkdir | | -| mkfifo | | -| mknod | | -| mktemp | | -| mv | | -| nice | | -| nl | | -| nohup | | -| nproc | | -| paste | | -| pathchk | | -| pinky | | -| printenv | | -| ptx | | -| pwd | | -| readlink | | -| realpath | | -| relpath | | -| rm | | -| rmdir | | -| runcon | | -| seq | | -| shred | | -| shuf | | -| sleep | | -| stat | | -| stdbuf | | -| sum | | -| sync | | -| tail | | -| tee | | -| timeout | | -| touch | | -| tr | | -| true | | -| truncate | | -| tsort | | -| tty | | -| uname | | -| unexpand | | -| uniq | | -| unlink | | -| uptime | | -| users | | -| wc | | -| who | | -| whoami | | -| yes | | - ## License uutils is licensed under the MIT License - see the `LICENSE` file for details diff --git a/build.rs b/build.rs index 5201b9169..04948c0d3 100644 --- a/build.rs +++ b/build.rs @@ -20,6 +20,8 @@ pub fn main() { for (key, val) in env::vars() { if val == "1" && key.starts_with(ENV_FEATURE_PREFIX) { let krate = key[ENV_FEATURE_PREFIX.len()..].to_lowercase(); + // Allow this as we have a bunch of info in the comments + #[allow(clippy::match_same_arms)] match krate.as_ref() { "default" | "macos" | "unix" | "windows" | "selinux" | "zip" => continue, // common/standard feature names "nightly" | "test_unimplemented" => continue, // crate-local custom features diff --git a/deny.toml b/deny.toml index aa05cdf3e..8687fbfae 100644 --- a/deny.toml +++ b/deny.toml @@ -11,7 +11,7 @@ unmaintained = "warn" yanked = "warn" notice = "warn" ignore = [ - #"RUSTSEC-0000-0000", + #"RUSTSEC-0000-0000", ] # This section is considered when running `cargo deny check licenses` @@ -20,15 +20,15 @@ ignore = [ [licenses] unlicensed = "deny" allow = [ - "MIT", - "Apache-2.0", - "ISC", - "BSD-2-Clause", - "BSD-2-Clause-FreeBSD", - "BSD-3-Clause", - "CC0-1.0", - "MPL-2.0", # XXX considered copyleft? - "Unicode-DFS-2016", + "MIT", + "Apache-2.0", + "ISC", + "BSD-2-Clause", + "BSD-2-Clause-FreeBSD", + "BSD-3-Clause", + "CC0-1.0", + "MPL-2.0", # XXX considered copyleft? + "Unicode-DFS-2016", ] copyleft = "deny" allow-osi-fsf-free = "neither" @@ -59,16 +59,34 @@ highlight = "all" # introduces it. # spell-checker: disable skip = [ - # is-terminal - { name = "hermit-abi", version = "0.3.1" }, - # is-terminal - { name = "rustix", version = "0.36.8" }, - # is-terminal (via rustix) - { name = "io-lifetimes", version = "1.0.5" }, - # is-terminal - { name = "linux-raw-sys", version = "0.1.4" }, - # is-terminal - { name = "windows-sys", version = "0.45.0" }, + # is-terminal + { name = "hermit-abi", version = "0.3.1" }, + # procfs + { name = "rustix", version = "0.36.14" }, + # rustix + { name = "linux-raw-sys", version = "0.1.4" }, + # various crates + { name = "windows-sys", version = "0.45.0" }, + # windows-sys + { name = "windows-targets", version = "0.42.2" }, + # windows-targets + { name = "windows_aarch64_gnullvm", version = "0.42.2" }, + # windows-targets + { name = "windows_aarch64_msvc", version = "0.42.2" }, + # windows-targets + { name = "windows_i686_gnu", version = "0.42.2" }, + # windows-targets + { name = "windows_i686_msvc", version = "0.42.2" }, + # windows-targets + { name = "windows_x86_64_gnu", version = "0.42.2" }, + # windows-targets + { name = "windows_x86_64_gnullvm", version = "0.42.2" }, + # windows-targets + { name = "windows_x86_64_msvc", version = "0.42.2" }, + # tempfile + { name = "redox_syscall", version = "0.3.5" }, + # cpp_macros + { name = "aho-corasick", version = "0.7.19" }, ] # spell-checker: enable diff --git a/docs/book.toml b/docs/book.toml index b9b31cfaf..f2da19338 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -10,4 +10,4 @@ git-repository-url = "https://github.com/rust-lang/cargo/tree/master/src/doc/src [preprocessor.toc] command = "mdbook-toc" -renderer = ["html"] \ No newline at end of file +renderer = ["html"] diff --git a/docs/src/build.md b/docs/src/build.md index 6505b5b6e..e35b0ebe8 100644 --- a/docs/src/build.md +++ b/docs/src/build.md @@ -1,3 +1,3 @@ # Build from source -{{#include ../../README.md:build }} \ No newline at end of file +{{#include ../../README.md:build }} diff --git a/docs/src/contributing.md b/docs/src/contributing.md index 79ef4d13b..f69e1b377 100644 --- a/docs/src/contributing.md +++ b/docs/src/contributing.md @@ -1 +1,3 @@ -{{ #include ../../CONTRIBUTING.md }} \ No newline at end of file + + +{{ #include ../../CONTRIBUTING.md }} diff --git a/docs/src/extensions.md b/docs/src/extensions.md index 3e84f70d8..281d8ef2e 100644 --- a/docs/src/extensions.md +++ b/docs/src/extensions.md @@ -5,6 +5,21 @@ features that are not supported by GNU coreutils. We take care not to introduce features that are incompatible with the GNU coreutils. Below is a list of uutils extensions. +## General + +GNU coreutils provides two ways to define short options taking an argument: + +``` +$ ls -w 80 +$ ls -w80 +``` + +We support a third way: + +``` +$ ls -w=80 +``` + ## `env` `env` has an additional `-f`/`--file` flag that can parse `.env` files and set @@ -43,3 +58,10 @@ therefore welcomed. `cut` can separate fields by whitespace (Space and Tab) with `-w` flag. This feature is adopted from [FreeBSD](https://www.freebsd.org/cgi/man.cgi?cut). + +## `fmt` + +`fmt` has additional flags for prefixes: `-P/--skip-prefix`, `-x/--exact-prefix`, and +`-X/--exact-skip-prefix`. With `-m/--preserve-headers`, an attempt is made to detect and preserve +mail headers in the input. `-q/--quick` breaks lines more quickly. And `-T/--tab-width` defines the +number of spaces representing a tab when determining the line length. diff --git a/docs/src/index.md b/docs/src/index.md index 7bac8b816..0212b7526 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,5 +1,9 @@ + + {{#include logo.svg}} + +