Skip to content

Commit ef2ec54

Browse files
authored
Merge branch 'main' into fold
2 parents 5678254 + dba5491 commit ef2ec54

290 files changed

Lines changed: 10621 additions & 5416 deletions

File tree

Some content is hidden

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

.github/workflows/CICD.yml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: CICD
33
# spell-checker:ignore (abbrev/names) CACHEDIR CICD CodeCOV MacOS MinGW MSVC musl taiki
44
# spell-checker:ignore (env/flags) Awarnings Ccodegen Coverflow Cpanic Dwarnings RUSTDOCFLAGS RUSTFLAGS Zpanic CARGOFLAGS CLEVEL nodocs
55
# spell-checker:ignore (jargon) SHAs deps dequote softprops subshell toolchain fuzzers dedupe devel profdata
6-
# spell-checker:ignore (people) Peltoche rivy dtolnay Anson dawidd
6+
# spell-checker:ignore (people) Peltoche rivy Anson dawidd
77
# spell-checker:ignore (shell/tools) binutils choco clippy dmake esac fakeroot fdesc fdescfs gmake grcov halium lcov libclang libfuse libssl limactl nextest nocross pacman popd printf pushd redoxer rsync rustc rustfmt rustup shopt sccache utmpdump xargs zstd
8-
# spell-checker:ignore (misc) aarch alnum armhf bindir busytest coreutils defconfig DESTDIR gecos getenforce gnueabihf issuecomment maint manpages msys multisize noconfirm nofeatures nullglob onexitbegin onexitend pell runtest Swatinem tempfile testsuite toybox uutils libsystemd codspeed wasip
8+
# spell-checker:ignore (misc) aarch alnum armhf bindir busytest coreutils defconfig DESTDIR gecos getenforce gnueabihf issuecomment maint manpages msys multisize noconfirm nofeatures nullglob onexitbegin onexitend pell runtest tempfile testsuite toybox uutils libsystemd codspeed wasip libexecinfo
99

1010
env:
1111
PROJECT_NAME: coreutils
@@ -102,7 +102,7 @@ jobs:
102102
# for now, don't build it on mac & windows because the doc is only published from linux
103103
# + it needs a bunch of duplication for build
104104
# and I don't want to add a doc step in the regular build to avoid long builds
105-
# - { os: macos-latest , features: feat_os_macos }
105+
# - { os: macos-latest , features: feat_os_unix }
106106
# - { os: windows-latest , features: feat_os_windows }
107107
steps:
108108
- uses: actions/checkout@v6
@@ -152,7 +152,7 @@ jobs:
152152
shell: bash
153153
run: |
154154
RUSTDOCFLAGS="-Dwarnings" cargo doc ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-deps --workspace --document-private-items
155-
- uses: DavidAnson/markdownlint-cli2-action@v22
155+
- uses: DavidAnson/markdownlint-cli2-action@v23
156156
with:
157157
fix: "true"
158158
globs: |
@@ -237,7 +237,7 @@ jobs:
237237
RUST_BACKTRACE: "1"
238238
- name: Upload test results to Codecov
239239
if: ${{ !cancelled() }}
240-
uses: codecov/codecov-action@v5
240+
uses: codecov/codecov-action@v6
241241
with:
242242
token: ${{ secrets.CODECOV_TOKEN }}
243243
report_type: test_results
@@ -277,7 +277,7 @@ jobs:
277277
matrix:
278278
job:
279279
- { os: ubuntu-latest , features: feat_os_unix }
280-
- { os: macos-latest , features: feat_os_macos }
280+
- { os: macos-latest , features: feat_os_unix }
281281
- { os: windows-latest , features: feat_os_windows }
282282
steps:
283283
- uses: actions/checkout@v6
@@ -301,7 +301,7 @@ jobs:
301301
RUST_BACKTRACE: "1"
302302
- name: Upload test results to Codecov
303303
if: ${{ !cancelled() }}
304-
uses: codecov/codecov-action@v5
304+
uses: codecov/codecov-action@v6
305305
with:
306306
token: ${{ secrets.CODECOV_TOKEN }}
307307
report_type: test_results
@@ -320,7 +320,7 @@ jobs:
320320
matrix:
321321
job:
322322
- { os: ubuntu-latest , features: feat_os_unix }
323-
- { os: macos-latest , features: feat_os_macos }
323+
- { os: macos-latest , features: feat_os_unix }
324324
- { os: windows-latest , features: feat_os_windows }
325325
steps:
326326
- uses: actions/checkout@v6
@@ -344,7 +344,7 @@ jobs:
344344
RUST_BACKTRACE: "1"
345345
- name: Upload test results to Codecov
346346
if: ${{ !cancelled() }}
347-
uses: codecov/codecov-action@v5
347+
uses: codecov/codecov-action@v6
348348
with:
349349
token: ${{ secrets.CODECOV_TOKEN }}
350350
report_type: test_results
@@ -378,14 +378,13 @@ jobs:
378378
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,test_risky_names", use-cross: use-cross, skip-publish: true }
379379
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,uudoc" , use-cross: no, workspace-tests: true }
380380
- { os: ubuntu-latest , target: x86_64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross }
381-
# utmpx, chroot stdbuf is broken on NetBSD at least for...
382-
- { os: ubuntu-latest , target: x86_64-unknown-netbsd , features: "feat_Tier1" , use-cross: use-cross , skip-tests: true , check-only: true }
381+
- { os: ubuntu-latest , target: x86_64-unknown-netbsd, features: "feat_os_unix", use-cross: use-cross , skip-tests: true , check-only: true }
383382
- { os: ubuntu-latest , target: x86_64-unknown-redox , features: feat_os_unix_redox , use-cross: redoxer , skip-tests: true , check-only: true }
384383
- { os: ubuntu-latest , target: wasm32-wasip1, default-features: false, features: feat_wasm, skip-tests: true }
385-
- { os: macos-latest , target: aarch64-apple-darwin , features: feat_os_macos, workspace-tests: true } # M1 CPU
384+
- { os: macos-latest , target: aarch64-apple-darwin , features: feat_os_unix, workspace-tests: true } # M1 CPU
386385
# PR #7964: chcon should not break build without the feature. cargo check is enough to detect it.
387386
- { os: macos-latest , target: aarch64-apple-darwin , workspace-tests: true, check-only: true } # M1 CPU
388-
- { os: macos-latest , target: x86_64-apple-darwin , features: feat_os_macos, workspace-tests: true }
387+
- { os: macos-latest , target: x86_64-apple-darwin , features: feat_os_unix, workspace-tests: true }
389388
- { os: windows-latest , target: i686-pc-windows-msvc , features: feat_os_windows }
390389
- { os: windows-latest , target: x86_64-pc-windows-gnu , features: feat_os_windows }
391390
- { os: windows-latest , target: x86_64-pc-windows-msvc , features: feat_os_windows }
@@ -505,9 +504,16 @@ jobs:
505504
;;
506505
esac
507506
- uses: taiki-e/install-action@v2
508-
if: steps.vars.outputs.CARGO_CMD == 'cross'
507+
# `cross` v0.2.5 lacks `libexecinfo` on NetBSD. However, this has been added in main.
508+
# See https://github.com/cross-rs/cross/blob/main/docker/netbsd.sh
509+
# We are pulling cross from a specific commit hash rather than HEAD to avoid any potential breakage that may be introduced.
510+
# Once `cross` v0.3 is out, these conditionals can be removed.
511+
if: steps.vars.outputs.CARGO_CMD == 'cross' && matrix.job.target != 'x86_64-unknown-netbsd'
509512
with:
510513
tool: cross@0.2.5
514+
- name: Install cross from git (NetBSD)
515+
if: steps.vars.outputs.CARGO_CMD == 'cross' && matrix.job.target == 'x86_64-unknown-netbsd'
516+
run: cargo install cross --git https://github.com/cross-rs/cross --rev f86fd03bb70b4c6802847c18087e21391498b0b4
511517
- name: Create all needed build/work directories
512518
shell: bash
513519
run: |
@@ -604,7 +610,7 @@ jobs:
604610
if: matrix.job.skip-publish != true && matrix.job.check-only == true
605611
run: |
606612
# expr breaks redox
607-
sed -i.b '/"expr",/d' Cargo.toml
613+
if [[ "${{ matrix.job.target }}" == *"redox"* ]]; then sed -i.b '/"expr",/d' Cargo.toml; fi
608614
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} check \
609615
--target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
610616
- name: Test
@@ -625,7 +631,7 @@ jobs:
625631
${{ steps.vars.outputs.CARGO_CMD }} ${{ steps.vars.outputs.CARGO_CMD_OPTIONS }} build --release --config=profile.release.strip=true \
626632
--target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} ${{ steps.vars.outputs.CARGO_DEFAULT_FEATURES_OPTION }}
627633
# We don't want to have many duplicated long jobs at here
628-
# So we build individual binaries for few platforms until we deduplicate many release build for Linux
634+
# So we build individual binaries for few platforms until we deduplicate many release build for Linux
629635
- name: Build individual binaries
630636
if: matrix.job.skip-tests != true && matrix.job.target == 'x86_64-pc-windows-msvc'
631637
shell: bash
@@ -799,7 +805,7 @@ jobs:
799805
# RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }}
800806

801807
- name: Upload coverage results (to Codecov.io)
802-
uses: codecov/codecov-action@v5
808+
uses: codecov/codecov-action@v6
803809
with:
804810
token: ${{ secrets.CODECOV_TOKEN }}
805811
files: ${{ steps.run_test_cov.outputs.report }}
@@ -809,7 +815,7 @@ jobs:
809815
fail_ci_if_error: false
810816
- name: Upload test results to Codecov
811817
if: ${{ !cancelled() }}
812-
uses: codecov/codecov-action@v5
818+
uses: codecov/codecov-action@v6
813819
with:
814820
token: ${{ secrets.CODECOV_TOKEN }}
815821
report_type: test_results
@@ -860,7 +866,7 @@ jobs:
860866
fail-fast: false
861867
matrix:
862868
job:
863-
- { os: macos-latest , features: feat_os_macos }
869+
- { os: macos-latest , features: feat_os_unix }
864870
- { os: windows-latest , features: feat_os_windows }
865871

866872
steps:

.github/workflows/FixPR.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: FixPR
22

3-
# spell-checker:ignore Swatinem dtolnay dedupe
3+
# spell-checker:ignore dedupe
44

55
# Trigger automated fixes for PRs being merged (with associated commits)
66

@@ -69,7 +69,7 @@ jobs:
6969
## * using the 'stable' toolchain is necessary to avoid "unexpected '--filter-platform'" errors
7070
cargo +stable tree --locked --no-dedupe -e=no-dev --prefix=none --features ${{ matrix.job.features }} | grep -vE "$PWD" | sort --unique
7171
- name: Commit any changes (to '${{ env.BRANCH_TARGET }}')
72-
uses: EndBug/add-and-commit@v9
72+
uses: EndBug/add-and-commit@v10
7373
with:
7474
new_branch: ${{ env.BRANCH_TARGET }}
7575
default_author: github_actions

.github/workflows/GnuTests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: GnuTests
22

3-
# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem
3+
# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests
44
# spell-checker:ignore (jargon) submodules devel
5-
# spell-checker:ignore (libs/utils) chksum dpkg getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt valgrind libattr libcap taiki-e zstd cpio
5+
# spell-checker:ignore (libs/utils) chksum dpkg getenforce gperf lcov libexpect limactl pyinotify setenforce shopt valgrind libattr libcap taiki-e zstd cpio
66
# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic
7-
# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay
7+
# spell-checker:ignore (people) Dawid Dziurla * dawidd
88
# spell-checker:ignore (vars) FILESET SUBDIRS XPASS
99
# spell-checker:ignore userns nodocs
1010

@@ -354,7 +354,7 @@ jobs:
354354
path: 'uutils'
355355
persist-credentials: false
356356
- name: Retrieve reference artifacts
357-
uses: dawidd6/action-download-artifact@v19
357+
uses: dawidd6/action-download-artifact@v20
358358
# ref: <https://github.com/dawidd6/action-download-artifact>
359359
continue-on-error: true ## don't break the build for missing reference artifacts (may be expired or just not generated yet)
360360
with:

.github/workflows/android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Android
22

3-
# spell-checker:ignore (people) reactivecircus Swatinem dtolnay juliangruber
3+
# spell-checker:ignore (people) reactivecircus juliangruber
44
# spell-checker:ignore (shell/tools) TERMUX nextest udevadm pkill
55
# spell-checker:ignore (misc) swiftshader playstore DATALOSS noaudio
66

.github/workflows/benchmarks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Benchmarks
22

3-
# spell-checker:ignore (people) dtolnay Swatinem taiki-e
3+
# spell-checker:ignore (people) taiki-e
44
# spell-checker:ignore (misc) codspeed sccache
55

66
on:
@@ -30,6 +30,7 @@ jobs:
3030
uu_base64,
3131
uu_cksum,
3232
uu_cp,
33+
uu_cat,
3334
uu_cut,
3435
uu_dd,
3536
uu_df,
@@ -47,6 +48,7 @@ jobs:
4748
uu_shuf,
4849
uu_sort,
4950
uu_split,
51+
uu_timeout,
5052
uu_tsort,
5153
uu_unexpand,
5254
uu_uniq,

.github/workflows/code-quality.yml

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Code Quality
22

3-
# spell-checker:ignore (people) dtolnay juliangruber pell reactivecircus Swatinem taiki-e taplo
3+
# spell-checker:ignore (people) juliangruber pell reactivecircus taiki-e taplo
44
# spell-checker:ignore (misc) TERMUX noaudio pkill swiftshader esac sccache pcoreutils shopt subshell dequote libsystemd
55

66
on:
@@ -72,8 +72,9 @@ jobs:
7272
matrix:
7373
job:
7474
- { os: ubuntu-latest , features: all , workspace: true }
75-
- { os: macos-latest , features: feat_os_macos }
75+
- { os: macos-latest , features: feat_os_unix }
7676
- { os: windows-latest , features: feat_os_windows }
77+
- { os: ubuntu-latest , features: feat_wasm , target: wasm32-wasip1 }
7778
steps:
7879
- uses: actions/checkout@v6
7980
with:
@@ -82,6 +83,7 @@ jobs:
8283
with:
8384
toolchain: stable
8485
components: clippy
86+
targets: ${{ matrix.job.target || '' }}
8587
- uses: Swatinem/rust-cache@v2
8688
- name: Run sccache-cache
8789
id: sccache-setup
@@ -105,6 +107,7 @@ jobs:
105107
esac;
106108
outputs FAIL_ON_FAULT FAULT_TYPE
107109
- name: Install/setup prerequisites
110+
if: ${{ ! matrix.job.target }}
108111
shell: bash
109112
run: |
110113
## Install/setup prerequisites
@@ -116,39 +119,28 @@ jobs:
116119
;;
117120
esac
118121
- name: "`cargo clippy` lint testing"
119-
uses: nick-fields/retry@v3
122+
uses: nick-fields/retry@v4
120123
with:
121124
max_attempts: 3
122125
retry_on: error
123126
timeout_minutes: 90
124127
shell: bash
125128
command: |
126129
## `cargo clippy` lint testing
127-
unset fault
128-
fault_type="${{ steps.vars.outputs.FAULT_TYPE }}"
129-
fault_prefix=$(echo "$fault_type" | tr '[:lower:]' '[:upper:]')
130-
# * convert any warnings to GHA UI annotations; ref: <https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message>
131-
if [[ "${{ matrix.job.features }}" == "all" ]]; then
132-
extra="--all-features"
133-
else
134-
extra="--features ${{ matrix.job.features }}"
130+
ARGS="--features ${{ matrix.job.features }}"
131+
ARGS="${ARGS} --fault-type ${{ steps.vars.outputs.FAULT_TYPE }}"
132+
if [[ "${{ matrix.job.workspace }}" =~ ^(1|t|true|y|yes)$ ]]; then
133+
ARGS="${ARGS} --workspace"
135134
fi
136-
case '${{ matrix.job.workspace }}' in
137-
1|t|true|y|yes)
138-
extra="${extra} --workspace"
139-
;;
140-
esac
141-
# * determine sub-crate utility list (similar to FreeBSD workflow)
142-
if [[ "${{ matrix.job.features }}" == "all" ]]; then
143-
UTILITY_LIST="$(./util/show-utils.sh --all-features)"
144-
else
145-
UTILITY_LIST="$(./util/show-utils.sh --features ${{ matrix.job.features }})"
135+
if [[ -n "${{ matrix.job.target }}" ]]; then
136+
ARGS="${ARGS} --target ${{ matrix.job.target }}"
146137
fi
147-
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo -n "-puu_${u} "; done;)"
148-
S=$(cargo clippy --all-targets $extra --tests --benches -pcoreutils ${CARGO_UTILITY_LIST_OPTIONS} -- -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 ; }
149-
if [ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ] && [ -n "$fault" ]; then exit 1 ; fi
138+
if [[ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ]]; then
139+
ARGS="${ARGS} --fail-on-fault"
140+
fi
141+
python3 util/run-clippy.py ${ARGS}
150142
- name: "cargo clippy on fuzz dir"
151-
if: runner.os != 'Windows'
143+
if: runner.os != 'Windows' && !matrix.job.target
152144
shell: bash
153145
run: |
154146
cd fuzz

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# spell-checker:ignore dtolnay libsystemd libattr libcap gsub
1+
# spell-checker:ignore libsystemd libattr libcap gsub
22

33
name: Check uudoc Documentation Generation
44

.github/workflows/freebsd.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: FreeBSD
22

3-
# spell-checker:ignore sshfs usesh vmactions taiki Swatinem esac fdescfs fdesc nextest copyback logind
3+
# spell-checker:ignore sshfs usesh vmactions taiki esac fdescfs fdesc nextest copyback logind
44

55
env:
66
# * style job configuration
@@ -41,7 +41,7 @@ jobs:
4141
sync: rsync
4242
copyback: false
4343
# We need jq and GNU coreutils to run show-utils.sh and bash to use inline shell string replacement
44-
prepare: pkg install -y curl sudo jq coreutils bash
44+
prepare: pkg install -y curl sudo jq coreutils bash python3
4545
run: |
4646
## Prepare, build, and test
4747
# implementation modelled after ref: <https://github.com/rust-lang/rustup/pull/2783>
@@ -73,7 +73,6 @@ jobs:
7373
FAULT_PREFIX=\$(echo "\${FAULT_TYPE}" | tr '[:lower:]' '[:upper:]')
7474
# * determine sub-crate utility list
7575
UTILITY_LIST="\$(./util/show-utils.sh --features ${{ matrix.job.features }})"
76-
CARGO_UTILITY_LIST_OPTIONS="\$(for u in \${UTILITY_LIST}; do echo -n "-puu_\${u} "; done;)"
7776
## Info
7877
# environment
7978
echo "## environment"
@@ -101,8 +100,9 @@ jobs:
101100
## cargo clippy lint testing
102101
if [ -z "\${FAULT}" ]; then
103102
echo "## cargo clippy lint testing"
104-
# * convert any warnings to GHA UI annotations; ref: <https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message>
105-
S=\$(cargo clippy --all-targets \${CARGO_UTILITY_LIST_OPTIONS} -- -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 ; }
103+
CLIPPY_ARGS="--features ${{ matrix.job.features }} --fault-type \${FAULT_TYPE}"
104+
if [ -n "\${FAIL_ON_FAULT}" ]; then CLIPPY_ARGS="\${CLIPPY_ARGS} --fail-on-fault"; fi
105+
python3 util/run-clippy.py \${CLIPPY_ARGS} || FAULT=true
106106
fi
107107
# Clean to avoid to rsync back the files
108108
cargo clean

.github/workflows/fuzzing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Fuzzing
22

3-
# spell-checker:ignore (people) dtolnay Swatinem taiki-e
3+
# spell-checker:ignore (people) taiki-e
44
# spell-checker:ignore (misc) fuzzer
55

66
env:

.github/workflows/ignore-intermittent.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
tests/cut/bounded-memory
22
tests/date/date-locale-hour
33
tests/date/resolution
4+
tests/expand/bounded-memory
45
tests/pr/bounded-memory
56
tests/tail/inotify-dir-recreate
67
tests/tail/overlay-headers
@@ -13,3 +14,4 @@ tests/misc/stdbuf
1314
tests/misc/usage_vs_getopt
1415
tests/misc/tee
1516
tests/tail/follow-name
17+
tests/rm/isatty

0 commit comments

Comments
 (0)