mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge branch 'main' into hashsum-del-pre
This commit is contained in:
@@ -701,7 +701,11 @@ jobs:
|
||||
outputs TARGET_ARCH TARGET_OS
|
||||
# package name
|
||||
PKG_suffix=".tar.gz" ; case '${{ matrix.job.target }}' in *-pc-windows-*) PKG_suffix=".zip" ;; esac;
|
||||
PKG_BASENAME=${PROJECT_NAME}-${{ matrix.job.target }}
|
||||
# Some 3rd party utils need version at file names
|
||||
# But we remove it from tag/latest-commit
|
||||
test ${REF_TAG} \
|
||||
&& PKG_BASENAME=${PROJECT_NAME}-${REF_TAG}-${{ matrix.job.target }} \
|
||||
|| PKG_BASENAME=${PROJECT_NAME}-${{ matrix.job.target }}
|
||||
PKG_NAME=${PKG_BASENAME}${PKG_suffix}
|
||||
outputs PKG_suffix PKG_BASENAME PKG_NAME
|
||||
# deployable tag? (ie, leading "vM" or "M"; M == version number)
|
||||
@@ -906,6 +910,8 @@ jobs:
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.job.skip-publish != true
|
||||
with:
|
||||
tag_name: latest-commit
|
||||
body: |
|
||||
commit: ${{ github.sha }}
|
||||
draft: false
|
||||
prerelease: true
|
||||
files: |
|
||||
|
||||
@@ -59,4 +59,4 @@ jobs:
|
||||
issue_number: issue_number,
|
||||
body: 'GNU testsuite comparison:\n```\n' + content + '```'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Prepare, build and test
|
||||
uses: vmactions/freebsd-vm@v1.2.9
|
||||
uses: vmactions/freebsd-vm@v1.3.9
|
||||
with:
|
||||
usesh: true
|
||||
sync: rsync
|
||||
@@ -127,7 +127,7 @@ jobs:
|
||||
- name: Avoid no space left on device (Ubuntu runner)
|
||||
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android &
|
||||
- name: Prepare, build and test
|
||||
uses: vmactions/freebsd-vm@v1.2.9
|
||||
uses: vmactions/freebsd-vm@v1.3.9
|
||||
with:
|
||||
usesh: true
|
||||
sync: rsync
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
name: Fuzzing
|
||||
|
||||
# spell-checker:ignore fuzzer dtolnay Swatinem
|
||||
# spell-checker:ignore (people) dtolnay Swatinem taiki-e
|
||||
# spell-checker:ignore (misc) fuzzer
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -19,16 +20,13 @@ concurrency:
|
||||
jobs:
|
||||
uufuzz-examples:
|
||||
name: Build and test uufuzz examples
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "uufuzz-cache-key"
|
||||
cache-directories: "fuzz/target"
|
||||
- name: Build uufuzz library
|
||||
run: |
|
||||
cd fuzz/uufuzz
|
||||
@@ -59,15 +57,16 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install `cargo-fuzz`
|
||||
run: |
|
||||
echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}" # Use -Z
|
||||
cargo install cargo-fuzz --locked
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
shared-key: "cargo-fuzz-cache-key"
|
||||
cache-directories: "fuzz/target"
|
||||
tool: cargo-fuzz
|
||||
- name: Emulate a nightly toolchain
|
||||
run: |
|
||||
echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}"
|
||||
- name: Run `cargo-fuzz build`
|
||||
run: cargo fuzz build
|
||||
# Force the correct target
|
||||
# https://github.com/rust-fuzz/cargo-fuzz/issues/398
|
||||
run: cargo fuzz build --target $(rustc --print host-tuple)
|
||||
|
||||
fuzz-run:
|
||||
needs: fuzz-build
|
||||
@@ -76,6 +75,7 @@ jobs:
|
||||
timeout-minutes: 5
|
||||
env:
|
||||
RUN_FOR: 60
|
||||
CARGO_INCREMENTAL: 0
|
||||
strategy:
|
||||
matrix:
|
||||
test-target:
|
||||
@@ -104,19 +104,12 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Install `cargo-fuzz`
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-fuzz
|
||||
- name: Emulate a nightly toolchain
|
||||
run: |
|
||||
echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}" # Use nightly
|
||||
cargo install cargo-fuzz --locked
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "cargo-fuzz-cache-key"
|
||||
cache-directories: "fuzz/target"
|
||||
- name: Restore Cached Corpus
|
||||
uses: actions/cache/restore@v5
|
||||
with:
|
||||
key: corpus-cache-${{ matrix.test-target.name }}
|
||||
path: |
|
||||
fuzz/corpus/${{ matrix.test-target.name }}
|
||||
echo "RUSTC_BOOTSTRAP=1" >> "${GITHUB_ENV}"
|
||||
- name: Run ${{ matrix.test-target.name }} for XX seconds
|
||||
id: run_fuzzer
|
||||
shell: bash
|
||||
@@ -124,7 +117,9 @@ jobs:
|
||||
run: |
|
||||
mkdir -p fuzz/stats
|
||||
STATS_FILE="fuzz/stats/${{ matrix.test-target.name }}.txt"
|
||||
cargo fuzz run ${{ matrix.test-target.name }} -- -max_total_time=${{ env.RUN_FOR }} -timeout=${{ env.RUN_FOR }} -detect_leaks=0 -print_final_stats=1 2>&1 | tee "$STATS_FILE"
|
||||
# Force the correct target
|
||||
# https://github.com/rust-fuzz/cargo-fuzz/issues/398
|
||||
cargo fuzz run --target $(rustc --print host-tuple) ${{ matrix.test-target.name }} -- -max_total_time=${{ env.RUN_FOR }} -timeout=${{ env.RUN_FOR }} -detect_leaks=0 -print_final_stats=1 2>&1 | tee "$STATS_FILE"
|
||||
|
||||
# Extract key stats from the output
|
||||
if grep -q "stat::number_of_executed_units" "$STATS_FILE"; then
|
||||
@@ -193,12 +188,6 @@ jobs:
|
||||
fi
|
||||
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
- name: Save Corpus Cache
|
||||
uses: actions/cache/save@v5
|
||||
with:
|
||||
key: corpus-cache-${{ matrix.test-target.name }}
|
||||
path: |
|
||||
fuzz/corpus/${{ matrix.test-target.name }}
|
||||
- name: Upload Stats
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
|
||||
@@ -21,3 +21,5 @@ lib*.a
|
||||
|
||||
### direnv ###
|
||||
/.direnv/
|
||||
|
||||
*.code-workspace
|
||||
|
||||
@@ -3,4 +3,3 @@ MD013: false
|
||||
# Disable 'Fenced code blocks should have a language specified'
|
||||
# Doesn't provide much in src/ to enforce it
|
||||
MD040: false
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ repos:
|
||||
- id: check-added-large-files
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-json
|
||||
exclude: '.vscode/cSpell\.json' # cSpell.json uses comments
|
||||
exclude: '\.vscode/(cSpell|extensions)\.json' # cSpell.json and extensions.json use comments
|
||||
- id: check-shebang-scripts-are-executable
|
||||
exclude: '.+\.rs' # would be triggered by #![some_attribute]
|
||||
- id: check-symlinks
|
||||
|
||||
Vendored
+2
-2
@@ -1,8 +1,8 @@
|
||||
// spell-checker:ignore (misc) matklad foxundermoon
|
||||
// spell-checker:ignore (misc) foxundermoon
|
||||
// see <http://go.microsoft.com/fwlink/?LinkId=827846> for the documentation about the extensions.json format
|
||||
// *
|
||||
// "foxundermoon.shell-format" ~ shell script formatting ; note: ENABLE "Use EditorConfig"
|
||||
// "matklad.rust-analyzer" ~ `rust` language support
|
||||
// "rust-lang.rust-analyzer" ~ `rust` language support
|
||||
// "streetsidesoftware.code-spell-checker" ~ `cspell` spell-checker support
|
||||
{
|
||||
"recommendations": [
|
||||
|
||||
Generated
+17
-32
@@ -337,18 +337,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.56"
|
||||
version = "4.5.57"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a75ca66430e33a14957acc24c5077b503e7d374151b2b4b3a10c83b4ceb4be0e"
|
||||
checksum = "6899ea499e3fb9305a65d5ebf6e3d2248c5fab291f300ad0a704fbe142eae31a"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.56"
|
||||
version = "4.5.57"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "793207c7fa6300a0608d1080b858e5fdbe713cdc1c8db9fb17777d8a13e63df0"
|
||||
checksum = "7b12c8b680195a62a8364d16b8447b01b6c2c8f9aaf68bee653be34d4245e238"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
@@ -1008,7 +1008,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1721,7 +1721,7 @@ dependencies = [
|
||||
"portable-atomic",
|
||||
"portable-atomic-util",
|
||||
"serde_core",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2015,7 +2015,7 @@ version = "0.50.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
|
||||
dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2493,9 +2493,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.12.2"
|
||||
version = "1.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
|
||||
checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
@@ -2611,7 +2611,7 @@ dependencies = [
|
||||
"errno",
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2921,7 +2921,7 @@ dependencies = [
|
||||
"getrandom 0.3.4",
|
||||
"once_cell",
|
||||
"rustix",
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3201,9 +3201,7 @@ name = "uu_b2sum"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"codspeed-divan-compat",
|
||||
"fluent",
|
||||
"tempfile",
|
||||
"uu_checksum_common",
|
||||
"uucore",
|
||||
]
|
||||
@@ -3281,9 +3279,7 @@ name = "uu_checksum_common"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"codspeed-divan-compat",
|
||||
"fluent",
|
||||
"tempfile",
|
||||
"uucore",
|
||||
]
|
||||
|
||||
@@ -3468,6 +3464,7 @@ dependencies = [
|
||||
"codspeed-divan-compat",
|
||||
"fluent",
|
||||
"glob",
|
||||
"rustc-hash",
|
||||
"tempfile",
|
||||
"thiserror 2.0.18",
|
||||
"uucore",
|
||||
@@ -3692,10 +3689,10 @@ dependencies = [
|
||||
"clap",
|
||||
"codspeed-divan-compat",
|
||||
"fluent",
|
||||
"fnv",
|
||||
"glob",
|
||||
"hostname",
|
||||
"lscolors",
|
||||
"rustc-hash",
|
||||
"selinux",
|
||||
"tempfile",
|
||||
"terminal_size",
|
||||
@@ -3709,9 +3706,7 @@ name = "uu_md5sum"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"codspeed-divan-compat",
|
||||
"fluent",
|
||||
"tempfile",
|
||||
"uu_checksum_common",
|
||||
"uucore",
|
||||
]
|
||||
@@ -4004,9 +3999,7 @@ name = "uu_sha1sum"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"codspeed-divan-compat",
|
||||
"fluent",
|
||||
"tempfile",
|
||||
"uu_checksum_common",
|
||||
"uucore",
|
||||
]
|
||||
@@ -4016,9 +4009,7 @@ name = "uu_sha224sum"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"codspeed-divan-compat",
|
||||
"fluent",
|
||||
"tempfile",
|
||||
"uu_checksum_common",
|
||||
"uucore",
|
||||
]
|
||||
@@ -4028,9 +4019,7 @@ name = "uu_sha256sum"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"codspeed-divan-compat",
|
||||
"fluent",
|
||||
"tempfile",
|
||||
"uu_checksum_common",
|
||||
"uucore",
|
||||
]
|
||||
@@ -4040,9 +4029,7 @@ name = "uu_sha384sum"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"codspeed-divan-compat",
|
||||
"fluent",
|
||||
"tempfile",
|
||||
"uu_checksum_common",
|
||||
"uucore",
|
||||
]
|
||||
@@ -4052,9 +4039,7 @@ name = "uu_sha512sum"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"codspeed-divan-compat",
|
||||
"fluent",
|
||||
"tempfile",
|
||||
"uu_checksum_common",
|
||||
"uucore",
|
||||
]
|
||||
@@ -4080,7 +4065,6 @@ dependencies = [
|
||||
"itoa",
|
||||
"rand 0.9.2",
|
||||
"rand_chacha 0.9.0",
|
||||
"rand_core 0.9.5",
|
||||
"rustc-hash",
|
||||
"sha3",
|
||||
"uucore",
|
||||
@@ -4306,6 +4290,7 @@ dependencies = [
|
||||
"codspeed-divan-compat",
|
||||
"fluent",
|
||||
"nix",
|
||||
"rustc-hash",
|
||||
"string-interner",
|
||||
"thiserror 2.0.18",
|
||||
"uucore",
|
||||
@@ -4661,7 +4646,7 @@ version = "0.1.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
||||
dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5091,9 +5076,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "zip"
|
||||
version = "7.2.0"
|
||||
version = "7.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c42e33efc22a0650c311c2ef19115ce232583abbe80850bc8b66509ebef02de0"
|
||||
checksum = "268bf6f9ceb991e07155234071501490bb41fd1e39c6a588106dad10ae2a5804"
|
||||
dependencies = [
|
||||
"crc32fast",
|
||||
"flate2",
|
||||
|
||||
+3
-8
@@ -366,11 +366,11 @@ platform-info = "2.0.3"
|
||||
procfs = "0.18"
|
||||
rand = { version = "0.9.0", features = ["small_rng"] }
|
||||
rand_chacha = { version = "0.9.0" }
|
||||
rand_core = "0.9.0"
|
||||
rayon = "1.10"
|
||||
regex = "1.10.4"
|
||||
rlimit = "0.11.0"
|
||||
rstest = "0.26.0"
|
||||
rustc-hash = "2.1.1"
|
||||
rust-ini = "0.21.0"
|
||||
same-file = "1.0.6"
|
||||
self_cell = "1.0.4"
|
||||
@@ -640,7 +640,7 @@ unexpected_cfgs = { level = "warn", check-cfg = [
|
||||
'cfg(fuzzing)',
|
||||
'cfg(target_os, values("cygwin"))',
|
||||
] }
|
||||
#unused_qualifications = "warn" // TODO: fix warnings in uucore, then re-enable this lint
|
||||
unused_qualifications = "warn"
|
||||
|
||||
[workspace.lints.clippy]
|
||||
# The counts were generated with this command:
|
||||
@@ -664,18 +664,14 @@ match_same_arms = "allow" # 204
|
||||
redundant_closure_for_method_calls = "allow" # 125
|
||||
cast_possible_truncation = "allow" # 122
|
||||
too_many_lines = "allow" # 101
|
||||
trivially_copy_pass_by_ref = "allow" # 84
|
||||
single_match_else = "allow" # 82
|
||||
cast_possible_wrap = "allow" # 78
|
||||
cast_sign_loss = "allow" # 70
|
||||
struct_excessive_bools = "allow" # 68
|
||||
cast_precision_loss = "allow" # 52
|
||||
cast_lossless = "allow" # 35
|
||||
unnecessary_wraps = "allow" # 33
|
||||
ignored_unit_patterns = "allow" # 21
|
||||
similar_names = "allow" # 20
|
||||
large_stack_arrays = "allow" # 20
|
||||
wildcard_imports = "allow" # 18
|
||||
needless_pass_by_value = "allow" # 16
|
||||
float_cmp = "allow" # 12
|
||||
items_after_statements = "allow" # 11
|
||||
@@ -688,7 +684,6 @@ should_panic_without_expect = "allow" # 2
|
||||
doc_markdown = "allow"
|
||||
unused_self = "allow"
|
||||
enum_glob_use = "allow"
|
||||
unreadable_literal = "allow"
|
||||
unnested_or_patterns = "allow"
|
||||
implicit_hasher = "allow"
|
||||
struct_field_names = "allow"
|
||||
@@ -699,4 +694,4 @@ from_iter_instead_of_collect = "allow"
|
||||
large_types_passed_by_value = "allow"
|
||||
|
||||
[workspace.metadata.cargo-shear]
|
||||
ignored = ["fluent", "libstdbuf"]
|
||||
ignored = ["clap", "fluent", "libstdbuf"]
|
||||
|
||||
@@ -30,8 +30,8 @@ options might be missing or different behavior might be experienced.
|
||||
<div class="oranda-hide">
|
||||
|
||||
We provide prebuilt binaries, manpages, and shell completions from main branch at https://github.com/uutils/coreutils/releases/tag/latest-commit .
|
||||
The latest stable tag https://github.com/uutils/coreutils/releases/latest exists only for reproducible products and packagers.
|
||||
You should use binary from latest commit generally.
|
||||
The latest stable tag https://github.com/uutils/coreutils/releases/latest also exists for reproducible products and packagers.
|
||||
Bug reporters should use binary from latest commit.
|
||||
|
||||
</div>
|
||||
|
||||
@@ -119,7 +119,7 @@ cargo build --release --features windows
|
||||
cargo build --release --features unix
|
||||
```
|
||||
|
||||
To build SELinux-specific features, including `chcon` and `runcon`, ensure that `libselinux`
|
||||
To build SELinux-specific features, including `chcon` and `runcon`, ensure that `libselinux`
|
||||
and `libclang` are installed on your system. Then, run the following command:
|
||||
```
|
||||
cargo build --release --features unix,feat_selinux
|
||||
|
||||
@@ -28,4 +28,3 @@ uutils coreutils is a cross-platform reimplementation of the GNU coreutils in
|
||||
[Rust](http://www.rust-lang.org).
|
||||
|
||||
This package does not have its specific `README.md`.
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ pub fn main() {
|
||||
\n\
|
||||
#[allow(clippy::too_many_lines)]
|
||||
#[allow(clippy::unreadable_literal)]
|
||||
fn util_map<T: uucore::Args>() -> UtilityMap<T> {\n"
|
||||
fn util_map<T: Args>() -> UtilityMap<T> {\n"
|
||||
.as_bytes(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ book
|
||||
src/utils
|
||||
src/SUMMARY.md
|
||||
src/platform_table.md
|
||||
tldr.zip
|
||||
tldr.zip
|
||||
|
||||
Regular → Executable
@@ -0,0 +1,313 @@
|
||||
### 📦 **Rust Coreutils 0.5.0 Release:**
|
||||
|
||||
We are excited to announce the release of **Rust Coreutils 0.5.0** — a significant milestone featuring **comprehensive platform improvements**, and **robust testing infrastructure** with continued progress toward full GNU compatibility!
|
||||
|
||||
---
|
||||
|
||||
### Highlights:
|
||||
|
||||
- **Improved GNU Compatibility**
|
||||
- **566 passing tests** (+22 from 0.4.0), achieving **87.75%** compatibility
|
||||
- Reduced failures from 56 to 55 (-1) and skipped tests from 33 to 23 (-10)
|
||||
- Updated GNU reference from 9.8 to 9.9, adding 11 new tests
|
||||
- Major improvements to `fold`, `cksum`, `install`, and `numfmt`
|
||||
|
||||
- **Unicode & Text Processing Enhancements**
|
||||
- `fold`: Added combining character support for proper Unicode text wrapping
|
||||
- `ptx`: Implemented GNU mode with dumb terminal format
|
||||
- Enhanced text processing across multiple utilities
|
||||
|
||||
- **Security & Performance Improvements**
|
||||
- `cksum`: Merged with hashsum for unified checksum functionality
|
||||
- `install`: Enhanced mode parsing with comma-separated support and umask handling
|
||||
- `seq`: Improved large integer handling with dedicated benchmarks
|
||||
- Various memory and performance optimizations across utilities
|
||||
|
||||
- **Platform Support Expansion**
|
||||
- Added OpenBSD to CI pipeline with comprehensive testing
|
||||
- Re-enabled Redox OS support in CI
|
||||
- Enhanced Cygwin support in uucore
|
||||
- Improved build processes across platforms
|
||||
|
||||
- **Developer Experience Improvements**
|
||||
- New TTY helper for enhanced testing capabilities
|
||||
- Comprehensive benchmarking additions for multiple utilities
|
||||
- Reduced dependency bloat through feature splitting
|
||||
- Enhanced hardware detection module
|
||||
|
||||
- **Contributions**: This release was made possible by **6 new contributors** joining our community
|
||||
|
||||
---
|
||||
|
||||
### GNU Test Suite Compatibility:
|
||||
|
||||
| Result | 0.4.0 | 0.5.0 | Change 0.4.0 to 0.5.0 | % Total 0.4.0 | % Total 0.5.0 | % Change 0.4.0 to 0.5.0 |
|
||||
|---------------|-------|-------|------------------------|---------------|---------------|--------------------------|
|
||||
| Pass | 544 | 566 | +22 | 85.80% | 87.75% | +1.95% |
|
||||
| Skip | 33 | 23 | -10 | 5.21% | 3.57% | -1.64% |
|
||||
| Fail | 56 | 55 | -1 | 8.83% | 8.53% | -0.30% |
|
||||
| Error | 1 | 1 | 0 | 0.16% | 0.16% | 0% |
|
||||
| Total | 634 | 645 | +11 (new tests) | | | |
|
||||
|
||||
---
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
### Call to Action:
|
||||
|
||||
🌍 **Help us translate** - Contribute translations at [Weblate](https://hosted.weblate.org/projects/rust-coreutils/)
|
||||
🚀 **Sponsor us on GitHub** to accelerate development: [github.com/sponsors/uutils](https://github.com/sponsors/uutils)
|
||||
🔗 Download the latest release: [https://uutils.github.io](https://uutils.github.io)
|
||||
|
||||
## What's Changed
|
||||
|
||||
## basenc
|
||||
* basenc: Fix basenc.pl GNU-compat tests pass by @karanabe in https://github.com/uutils/coreutils/pull/9203
|
||||
* fix(Basenc):fix GNU coreutils test bounded-memory.sh by @mattsu2020 in https://github.com/uutils/coreutils/pull/9536
|
||||
* base32, base64, baseenc:Simplifying the base encoding uu_app and adding basic buffer tests by @ChrisDryden in https://github.com/uutils/coreutils/pull/9409
|
||||
|
||||
## chmod
|
||||
* chmod:fix safe traversal/access by @mattsu2020 in https://github.com/uutils/coreutils/pull/9554
|
||||
|
||||
## cksum
|
||||
* cksum/hashsum: merge digest computation & various improvements by @RenjiSann in https://github.com/uutils/coreutils/pull/9135
|
||||
* cksum: Fix GNU test cksum-base64-untagged by @RenjiSann in https://github.com/uutils/coreutils/pull/9344
|
||||
* Add --debug flag to cksum by @naoNao89 in https://github.com/uutils/coreutils/pull/9088
|
||||
* cksum: Fix GNU test `cksum-c.sh` after bump to 9.9 by @RenjiSann in https://github.com/uutils/coreutils/pull/9511
|
||||
* cksum: small improvements, l10n by @RenjiSann in https://github.com/uutils/coreutils/pull/9532
|
||||
* Fix hardware capabilities detection; cksum --debug by @RenjiSann in https://github.com/uutils/coreutils/pull/9603
|
||||
|
||||
## cp
|
||||
* cp: allow directory merging when destination was just created by @vikram-kangotra in https://github.com/uutils/coreutils/pull/9325
|
||||
* cp: Adding test to cover no dereference when copying symlinks by @ChrisDryden in https://github.com/uutils/coreutils/pull/9623
|
||||
* cp: Enabling cp force flag to run on windows by @ChrisDryden in https://github.com/uutils/coreutils/pull/9624
|
||||
* Add comprehensive readonly file regression tests for cp by @naoNao89 in https://github.com/uutils/coreutils/pull/9045
|
||||
|
||||
## du
|
||||
* du: Alias -A --apparent-size by @oech3 in https://github.com/uutils/coreutils/pull/9555
|
||||
* du: handle `--files0-from=-` with piped in `-` by @cakebaker in https://github.com/uutils/coreutils/pull/8985
|
||||
|
||||
## env
|
||||
* Adding integration tests for the braced variable parsing in env by @ChrisDryden in https://github.com/uutils/coreutils/pull/9459
|
||||
* env: remove outdated comment by @cakebaker in https://github.com/uutils/coreutils/pull/9496
|
||||
* env: use Command::exec() instead of libc::execvp() by @Ecordonnier in https://github.com/uutils/coreutils/pull/9614
|
||||
|
||||
## fold
|
||||
* fold:Improve fold bench data generation by @mattsu2020 in https://github.com/uutils/coreutils/pull/9210
|
||||
* fix(fold): GNU fold-characters.sh test by @mattsu2020 in https://github.com/uutils/coreutils/pull/9126
|
||||
* Fold: Adding combining character support by @ChrisDryden in https://github.com/uutils/coreutils/pull/9328
|
||||
|
||||
## hashsum
|
||||
* hashsum: Fix length processing to fix last GNU test by @RenjiSann in https://github.com/uutils/coreutils/pull/9569
|
||||
|
||||
## install
|
||||
* install: ignore umask by @akretz in https://github.com/uutils/coreutils/pull/9254
|
||||
* Enhance mode parsing to support comma-separated mode strings in install command by @Vesal-J in https://github.com/uutils/coreutils/pull/9298
|
||||
* install: do not call chown when called as root by @Ecordonnier in https://github.com/uutils/coreutils/pull/9477
|
||||
|
||||
## ln
|
||||
* ln: add error handling for hard link creation on directories by @FidelSch in https://github.com/uutils/coreutils/pull/9342
|
||||
|
||||
## ls
|
||||
* ls: prevent ReadDir from closing before entries are processed by @vikram-kangotra in https://github.com/uutils/coreutils/pull/9410
|
||||
|
||||
## mkfifo
|
||||
* tests/mkfifo: added a test to check mkfifo permission denied error for code coverage by @asder8215 in https://github.com/uutils/coreutils/pull/9586
|
||||
|
||||
## nl
|
||||
* fix(nl): allow repeated flags to match GNU nl behavior (fixes #9132) by @naoNao89 in https://github.com/uutils/coreutils/pull/9140
|
||||
|
||||
## nohup
|
||||
* nohup: use Command::exec() instead of libc::execvp() by @Ecordonnier in https://github.com/uutils/coreutils/pull/9613
|
||||
|
||||
## numfmt
|
||||
* numfmt: support quetta/ronna suffixes and fix error messages by @naoNao89 in https://github.com/uutils/coreutils/pull/9280
|
||||
|
||||
## od
|
||||
* od: fix GNU od.pl by @mattsu2020 in https://github.com/uutils/coreutils/pull/9334
|
||||
* fix(od):fix GNU coreutils test od float.sh by @mattsu2020 in https://github.com/uutils/coreutils/pull/9534
|
||||
|
||||
## pr
|
||||
* pr: fix header formatting for custom date formats starting with '+' by @sylvestre in https://github.com/uutils/coreutils/pull/9252
|
||||
|
||||
## ptx
|
||||
* ptx: implement GNU mode with dumb terminal format by @sylvestre in https://github.com/uutils/coreutils/pull/9573
|
||||
|
||||
## readlink
|
||||
* readlink: test calling without args by @cakebaker in https://github.com/uutils/coreutils/pull/9230
|
||||
* readlink:Correction to Symbolic Link Handling by @mattsu2020 in https://github.com/uutils/coreutils/pull/9633
|
||||
|
||||
## seq
|
||||
* fix(seq): handle BrokenPipe like GNU by @mattsu2020 in https://github.com/uutils/coreutils/pull/9471
|
||||
* seq:fix test_broken_pipe_still_exits_success by @mattsu2020 in https://github.com/uutils/coreutils/pull/9520
|
||||
* seq: adding large integers benchmarks by @ChrisDryden in https://github.com/uutils/coreutils/pull/9561
|
||||
|
||||
## shuf
|
||||
* shuf: add benchmarks by @sylvestre in https://github.com/uutils/coreutils/pull/9320
|
||||
|
||||
## sort
|
||||
* sort: make compression program failures non-fatal, warn and fallback to plain files by @sylvestre in https://github.com/uutils/coreutils/pull/9266
|
||||
|
||||
## stdbuf
|
||||
* Remove unsafe unwrap() calls in stdbuf error handling by @naoNao89 in https://github.com/uutils/coreutils/pull/9429
|
||||
|
||||
## stty
|
||||
* Adding TTY helper for unix to be able to create tests for stty and more by @ChrisDryden in https://github.com/uutils/coreutils/pull/9348
|
||||
* Using the pty helper function for the more bin testing by @ChrisDryden in https://github.com/uutils/coreutils/pull/9441
|
||||
* stty: baud parsing integration tests and validation by @ChrisDryden in https://github.com/uutils/coreutils/pull/9454
|
||||
* stty: Implemented saved state parser for stty by @ChrisDryden in https://github.com/uutils/coreutils/pull/9480
|
||||
* stty: Changing shell command to add recognizing a TTY for stty tests by @ChrisDryden in https://github.com/uutils/coreutils/pull/9336
|
||||
|
||||
## tail
|
||||
* tail: batch inotify events to prevent redundant headers after SIGSTOP/SIGCONT by @sylvestre in https://github.com/uutils/coreutils/pull/9574
|
||||
* tail: fix intermittent overlay-headers test by batching inotify events by @sylvestre in https://github.com/uutils/coreutils/pull/9598
|
||||
|
||||
## tee
|
||||
* tee: fix poll timeout causing intermittent hangs with -p flag by @sylvestre in https://github.com/uutils/coreutils/pull/9585
|
||||
|
||||
## timeout
|
||||
* Reducing sleep times and timeout times in test_timeout by @ChrisDryden in https://github.com/uutils/coreutils/pull/9448
|
||||
* timeout: cleanup return values by @Ecordonnier in https://github.com/uutils/coreutils/pull/9576
|
||||
* timeout: remove FIXME in test by @Ecordonnier in https://github.com/uutils/coreutils/pull/9580
|
||||
|
||||
## dd
|
||||
* dd: Handle slow transfer rates in progress display by @martinkunkel2 in https://github.com/uutils/coreutils/pull/9529
|
||||
|
||||
## uucore
|
||||
* uucore: embed system locale on cargo install by @WaterWhisperer in https://github.com/uutils/coreutils/pull/8604
|
||||
* feat(uucore): add shared hardware detection module by @naoNao89 in https://github.com/uutils/coreutils/pull/9279
|
||||
* uucore: support cygwin by @ognevny in https://github.com/uutils/coreutils/pull/9535
|
||||
* uucore: mode parsing: support comma-separated modes by @martinkunkel2 in https://github.com/uutils/coreutils/pull/9578
|
||||
|
||||
## uudoc
|
||||
* uudoc: fix manpage for individual utilities has wrong name (nit) by @shayelkin in https://github.com/uutils/coreutils/pull/9152
|
||||
|
||||
## CI & Build
|
||||
* CICD.yml: split PROFILE= from CARGOFLAGS by @oech3 in https://github.com/uutils/coreutils/pull/9219
|
||||
* GNUmakefile: use PROFILE_CMD at make test by @oech3 in https://github.com/uutils/coreutils/pull/9214
|
||||
* GNUmakefile: generalize logic for SELINUX_PROGS for many platforms by @oech3 in https://github.com/uutils/coreutils/pull/9221
|
||||
* build-gnu.sh: Let SELinux optional to use it locally without libselinux by @oech3 in https://github.com/uutils/coreutils/pull/9220
|
||||
* freebsd.yml: remove not working PROFILE= by @oech3 in https://github.com/uutils/coreutils/pull/9225
|
||||
* GNUmakefile: Remove check for LIBSELINUX_ENABLED by @oech3 in https://github.com/uutils/coreutils/pull/9228
|
||||
* Update redoxer and reenable Redox OS in CI by @jackpot51 in https://github.com/uutils/coreutils/pull/9233
|
||||
* GNUmakefile: drop not used use_default:=1 by @oech3 in https://github.com/uutils/coreutils/pull/9231
|
||||
* ci: Mark runcon-no-reorder as SELinux required by @oech3 in https://github.com/uutils/coreutils/pull/9234
|
||||
* github action: add openbsd in the ci by @sylvestre in https://github.com/uutils/coreutils/pull/9196
|
||||
* openbsd.yml: Remove not working PROFILE= by @oech3 in https://github.com/uutils/coreutils/pull/9238
|
||||
* OpenBSD CI: increase max open files for test job by @lcheylus in https://github.com/uutils/coreutils/pull/9242
|
||||
* build-gnu.sh: Remove || true by @oech3 in https://github.com/uutils/coreutils/pull/9256
|
||||
* Enable test test_hostname_ip on OpenBSD by @lcheylus in https://github.com/uutils/coreutils/pull/9257
|
||||
* build-gnu.sh: Use system tools by @oech3 in https://github.com/uutils/coreutils/pull/9251
|
||||
* ci: remove commented out line from `freebsd.yml` by @cakebaker in https://github.com/uutils/coreutils/pull/9239
|
||||
* GnuTests.yml: reduce deps by @oech3 in https://github.com/uutils/coreutils/pull/9259
|
||||
* Update CICD.yml: Stop releasing duplicated binary by @oech3 in https://github.com/uutils/coreutils/pull/9269
|
||||
* Avoid mixing wget and curl by @oech3 in https://github.com/uutils/coreutils/pull/9258
|
||||
* CICD.yml: Remove if for .exe by @oech3 in https://github.com/uutils/coreutils/pull/9271
|
||||
* GNUmakefile: Use any profile from make install by @oech3 in https://github.com/uutils/coreutils/pull/8730
|
||||
* build-gnu.sh: Freeze SELinux build mode by @oech3 in https://github.com/uutils/coreutils/pull/9270
|
||||
* CICD.yml: Avoid no space left by @oech3 in https://github.com/uutils/coreutils/pull/9277
|
||||
* GNUmakefile: Add missing PROFILE_CMD by @oech3 in https://github.com/uutils/coreutils/pull/9293
|
||||
* Cargo.toml: move panic=abort to release profile for binary size by @oech3 in https://github.com/uutils/coreutils/pull/9240
|
||||
* Fix build failure without libselinux by @oech3 in https://github.com/uutils/coreutils/pull/9290
|
||||
* Revert a patch for runcon-no-reorder (superseded) by @oech3 in https://github.com/uutils/coreutils/pull/9291
|
||||
* build-gnu.sh: fix the error on line 110 by @sylvestre in https://github.com/uutils/coreutils/pull/9297
|
||||
* build-gnu.sh: adjust the PATH for each run by @sylvestre in https://github.com/uutils/coreutils/pull/9319
|
||||
* build-gnu.sh: Use any profile & cleanup vars by @oech3 in https://github.com/uutils/coreutils/pull/9321
|
||||
* GnuTests.yml: Check that build-gnu.sh works without libselinux by @oech3 in https://github.com/uutils/coreutils/pull/9299
|
||||
* android.yml: Reduce RAM (#9278) by @oech3 in https://github.com/uutils/coreutils/pull/9436
|
||||
* l10n.yml:Don't apt-get build-essential by @oech3 in https://github.com/uutils/coreutils/pull/9472
|
||||
* l10n.yml: Use PROFILE=release-small for faster CI by @oech3 in https://github.com/uutils/coreutils/pull/9473
|
||||
* l10n.yml: Do not brew make (support Xcode make) by @oech3 in https://github.com/uutils/coreutils/pull/9474
|
||||
* Update Dockerfile: Don't apt-get jq (preinstalled) by @oech3 in https://github.com/uutils/coreutils/pull/9481
|
||||
* build-gnu.sh: Remove 2 not working sed hacks for tr by @oech3 in https://github.com/uutils/coreutils/pull/9476
|
||||
* build-gnu.sh: Reduce time to build GNU coreutils by @oech3 in https://github.com/uutils/coreutils/pull/9475
|
||||
* CICD.yml: Stop publishing conflicting artifacts by @oech3 in https://github.com/uutils/coreutils/pull/9491
|
||||
* CICD.yml: Removed unused code for i586 by @oech3 in https://github.com/uutils/coreutils/pull/9497
|
||||
* build-gnu.sh: Remove hfs dep from hardlink-case.sh by @oech3 in https://github.com/uutils/coreutils/pull/9482
|
||||
* CICD.yml: Dedup a mkdir by @oech3 in https://github.com/uutils/coreutils/pull/9504
|
||||
* CICD.yml: Drop a workaround for old package by @oech3 in https://github.com/uutils/coreutils/pull/9505
|
||||
* Remove wget dep by @oech3 in https://github.com/uutils/coreutils/pull/9522
|
||||
* Remove Makefile.toml by @oech3 in https://github.com/uutils/coreutils/pull/9568
|
||||
* build-gnu.sh: Remove 2 non-GNU binary by @oech3 in https://github.com/uutils/coreutils/pull/9583
|
||||
* validation.rs: Remove non GNU hashsum aliases by @oech3 in https://github.com/uutils/coreutils/pull/9589
|
||||
* build-gnu.sh: Enable misc/coreutils.sh by @oech3 in https://github.com/uutils/coreutils/pull/9572
|
||||
* GHA-delete-GNU-workflow-logs.sh: Add fallback to jaq by @oech3 in https://github.com/uutils/coreutils/pull/9581
|
||||
* benchmarks.yml: Stop unnecessary apt-get by @oech3 in https://github.com/uutils/coreutils/pull/9608
|
||||
* Do not apt-get preinstalled tools to avoid delaying CI by @oech3 in https://github.com/uutils/coreutils/pull/9466
|
||||
* build-gnu.sh: use GNU sed much more for macOS by @oech3 in https://github.com/uutils/coreutils/pull/9467
|
||||
* ci: add locales for GNU tests by @cakebaker in https://github.com/uutils/coreutils/pull/9052
|
||||
|
||||
## Documentation
|
||||
* README.md: profiles for binary size by @oech3 in https://github.com/uutils/coreutils/pull/9268
|
||||
* installation.md: Fix wrong reference for AUR by @oech3 in https://github.com/uutils/coreutils/pull/9447
|
||||
* README.md: note that separator is needed for PROG_PREFIX by @oech3 in https://github.com/uutils/coreutils/pull/9444
|
||||
* installation.md: Ref MSYS2 package by @oech3 in https://github.com/uutils/coreutils/pull/9456
|
||||
* installation.md: Add MSYS2 Cygwin package by @oech3 in https://github.com/uutils/coreutils/pull/9566
|
||||
* why-skip.md: Remove an OOD doc by @oech3 in https://github.com/uutils/coreutils/pull/9506
|
||||
* why-skip.md: Remove a passing test by @oech3 in https://github.com/uutils/coreutils/pull/9507
|
||||
* why-skip.md: Remove 4 sparse-* by @oech3 in https://github.com/uutils/coreutils/pull/9508
|
||||
* why-skip.md: Remove 3 tests by @oech3 in https://github.com/uutils/coreutils/pull/9509
|
||||
* why-error.md: Cleanup by @oech3 in https://github.com/uutils/coreutils/pull/9510
|
||||
* why-error.md: Cleanup and documenting by @oech3 in https://github.com/uutils/coreutils/pull/9512
|
||||
* why-skip.md: Remove 1 passing root test by @oech3 in https://github.com/uutils/coreutils/pull/9528
|
||||
* why-skip.md: Let spell-checker:ignore a comment by @oech3 in https://github.com/uutils/coreutils/pull/9540
|
||||
* why-{skip,error}.md: Cleanup by @oech3 in https://github.com/uutils/coreutils/pull/9602
|
||||
* why-{skip,error}.md: Remove stty tests and shared strings by @oech3 in https://github.com/uutils/coreutils/pull/9626
|
||||
* lib.rs: Remove non GNU hashsum aliases by @oech3 in https://github.com/uutils/coreutils/pull/9642
|
||||
* util.rs: Update obsolete comments by @oech3 in https://github.com/uutils/coreutils/pull/9643
|
||||
|
||||
## Code Quality & Cleanup
|
||||
* test: existing file is newer than non-existing file by @cakebaker in https://github.com/uutils/coreutils/pull/9245
|
||||
* move the factor divan bench into the actual directory by @sylvestre in https://github.com/uutils/coreutils/pull/9296
|
||||
* Remove high variance benchmark functions by @sylvestre in https://github.com/uutils/coreutils/pull/9311
|
||||
* Bump `markdownlint_cli2_action` & fix warnings by @cakebaker in https://github.com/uutils/coreutils/pull/9309
|
||||
* replace number_prefix by unit-prefix by @sylvestre in https://github.com/uutils/coreutils/pull/9322
|
||||
* coreutils: Print utility not found to stderr by @oech3 in https://github.com/uutils/coreutils/pull/9588
|
||||
* use github URLs for fetching tldr.zip by @dgilman in https://github.com/uutils/coreutils/pull/9584
|
||||
* unit test coverage: fix missing coverage by @martinkunkel2 in https://github.com/uutils/coreutils/pull/9606
|
||||
* Removing the per process file flag to reduce the llvm filemerge time by @ChrisDryden in https://github.com/uutils/coreutils/pull/9449
|
||||
* Making wild a windows only dependency and gating unit-prefix by @ChrisDryden in https://github.com/uutils/coreutils/pull/9548
|
||||
* Splitting parser feature into multiple subfeatures to reduce dependency bloat by @ChrisDryden in https://github.com/uutils/coreutils/pull/9546
|
||||
|
||||
## Performance & Benchmarking
|
||||
* benches: Migrate factor benchmarks from Criterion to Divan by @naoNao89 in https://github.com/uutils/coreutils/pull/9247
|
||||
* Add functionality to show when tests were previously skipped and now failing accurately by @ChrisDryden in https://github.com/uutils/coreutils/pull/9521
|
||||
|
||||
## Version Management
|
||||
* update gnu ref to 9.9 + improve the script by @sylvestre in https://github.com/uutils/coreutils/pull/9216
|
||||
* prepare version 0.5.0 by @sylvestre in https://github.com/uutils/coreutils/pull/9596
|
||||
|
||||
## Dependency Updates
|
||||
* chore(deps): update rust crate crc-fast to v1.7.1 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9224
|
||||
* chore(deps): update rust crate indicatif to v0.18.3 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9226
|
||||
* chore(deps): update rust crate crc-fast to v1.8.0 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9282
|
||||
* Update vmactions/freebsd-vm action to v1.2.7 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9304
|
||||
* chore(deps): update rust crate clap to v4.5.52 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9316
|
||||
* chore(deps): update rust crate clap_complete to v4.5.61 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9343
|
||||
* chore(deps): update rust crate clap to v4.5.53 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9340
|
||||
* GNUmakefile: Use libstdbuf.* instead of libstdbuf* by @oech3 in https://github.com/uutils/coreutils/pull/9345
|
||||
* chore(deps): update actions/checkout action to v6 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9416
|
||||
* chore(deps): update rust crate parse_datetime to v0.13.3 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9434
|
||||
* chore(deps): update rust crate hostname to v0.4.2 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9515
|
||||
* Bump `iana-time-zone` and `windows-core` by @cakebaker in https://github.com/uutils/coreutils/pull/9519
|
||||
* chore(deps): update vmactions/freebsd-vm action to v1.2.8 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9524
|
||||
* chore(deps): update rust crate ctor to v0.6.2 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9544
|
||||
* chore(deps): update rust crate ctor to v0.6.3 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9562
|
||||
* chore(deps): update vmactions/freebsd-vm action to v1.2.9 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9593
|
||||
* chore(deps): update davidanson/markdownlint-cli2-action action to v22 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9610
|
||||
* chore(deps): update actions/cache action to v5 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9639
|
||||
* chore(deps): update rust crate crc-fast to v1.8.1 by @renovate[bot] in https://github.com/uutils/coreutils/pull/9647
|
||||
* chore(deps): update github artifact actions (major) by @renovate[bot] in https://github.com/uutils/coreutils/pull/9645
|
||||
* Bump `icu` crates from `2.0.0` to `2.1.1` by @cakebaker in https://github.com/uutils/coreutils/pull/9073
|
||||
|
||||
## New Contributors
|
||||
* @WaterWhisperer made their first contribution in https://github.com/uutils/coreutils/pull/8604
|
||||
* @ChrisDryden made their first contribution in https://github.com/uutils/coreutils/pull/9328
|
||||
* @FidelSch made their first contribution in https://github.com/uutils/coreutils/pull/9342
|
||||
* @ognevny made their first contribution in https://github.com/uutils/coreutils/pull/9535
|
||||
* @shayelkin made their first contribution in https://github.com/uutils/coreutils/pull/9152
|
||||
* @dgilman made their first contribution in https://github.com/uutils/coreutils/pull/9584
|
||||
|
||||
**Full Changelog**: https://github.com/uutils/coreutils/compare/0.4.0...0.5.0
|
||||
File diff suppressed because it is too large
Load Diff
@@ -43,4 +43,4 @@
|
||||
}
|
||||
.counts {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
+13
-1
@@ -10,6 +10,7 @@ use std::cmp;
|
||||
use std::ffi::OsString;
|
||||
use std::io::{self, Write};
|
||||
use std::process;
|
||||
use uucore::Args;
|
||||
|
||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
@@ -58,9 +59,12 @@ fn main() {
|
||||
|
||||
let util_name = if let Some(&util) = matched_util {
|
||||
Some(OsString::from(util))
|
||||
} else {
|
||||
} else if binary_as_util.ends_with("utils") || binary_as_util.ends_with("box") {
|
||||
// todo: Remove support of "*box" from binary
|
||||
uucore::set_utility_is_second_arg();
|
||||
args.next()
|
||||
} else {
|
||||
validation::not_found(&OsString::from(binary_as_util));
|
||||
};
|
||||
|
||||
// 0th argument equals util name?
|
||||
@@ -71,6 +75,11 @@ fn main() {
|
||||
|
||||
match util {
|
||||
"--list" => {
|
||||
// If --help is also present, show usage instead of list
|
||||
if args.any(|arg| arg == "--help" || arg == "-h") {
|
||||
usage(&utils, binary_as_util);
|
||||
process::exit(0);
|
||||
}
|
||||
let mut utils: Vec<_> = utils.keys().collect();
|
||||
utils.sort();
|
||||
for util in utils {
|
||||
@@ -119,6 +128,9 @@ fn main() {
|
||||
}
|
||||
usage(&utils, binary_as_util);
|
||||
process::exit(0);
|
||||
} else if util.starts_with('-') {
|
||||
// Argument looks like an option but wasn't recognized
|
||||
validation::unrecognized_option(binary_as_util, &util_os);
|
||||
} else {
|
||||
validation::not_found(&util_os);
|
||||
}
|
||||
|
||||
+62
-20
@@ -45,8 +45,8 @@ fn usage<T: Args>(utils: &UtilityMap<T>) {
|
||||
}
|
||||
|
||||
/// Generates the coreutils app for the utility map
|
||||
fn gen_coreutils_app<T: Args>(util_map: &UtilityMap<T>) -> clap::Command {
|
||||
let mut command = clap::Command::new("coreutils");
|
||||
fn gen_coreutils_app<T: Args>(util_map: &UtilityMap<T>) -> Command {
|
||||
let mut command = Command::new("coreutils");
|
||||
for (name, (_, sub_app)) in util_map {
|
||||
// Recreate a small subcommand with only the relevant info
|
||||
// (name & short description)
|
||||
@@ -54,7 +54,7 @@ fn gen_coreutils_app<T: Args>(util_map: &UtilityMap<T>) -> clap::Command {
|
||||
.get_about()
|
||||
.expect("Could not get the 'about'")
|
||||
.to_string();
|
||||
let sub_app = clap::Command::new(name).about(about);
|
||||
let sub_app = Command::new(name).about(about);
|
||||
command = command.subcommand(sub_app);
|
||||
}
|
||||
command
|
||||
@@ -84,6 +84,8 @@ fn gen_manpage<T: Args>(
|
||||
} else {
|
||||
validation::setup_localization_or_exit(utility);
|
||||
let mut cmd = util_map.get(utility).unwrap().1();
|
||||
cmd.set_bin_name(utility.clone());
|
||||
let mut cmd = cmd.display_name(utility);
|
||||
if let Some(zip) = tldr {
|
||||
if let Ok(examples) = write_zip_examples(zip, utility, false) {
|
||||
cmd = cmd.after_help(examples);
|
||||
@@ -172,7 +174,7 @@ fn main() -> io::Result<()> {
|
||||
}
|
||||
let utils = util_map::<Box<dyn Iterator<Item = OsString>>>();
|
||||
match std::fs::create_dir("docs/src/utils/") {
|
||||
Err(e) if e.kind() == std::io::ErrorKind::AlreadyExists => Ok(()),
|
||||
Err(e) if e.kind() == io::ErrorKind::AlreadyExists => Ok(()),
|
||||
x => x,
|
||||
}?;
|
||||
|
||||
@@ -202,7 +204,7 @@ fn main() -> io::Result<()> {
|
||||
let mut map = HashMap::new();
|
||||
for platform in ["unix", "macos", "windows", "unix_android"] {
|
||||
let platform_utils: Vec<String> = String::from_utf8(
|
||||
std::process::Command::new("./util/show-utils.sh")
|
||||
process::Command::new("./util/show-utils.sh")
|
||||
.arg(format!("--features=feat_os_{platform}"))
|
||||
.output()?
|
||||
.stdout,
|
||||
@@ -217,7 +219,7 @@ fn main() -> io::Result<()> {
|
||||
|
||||
// Linux is a special case because it can support selinux
|
||||
let platform_utils: Vec<String> = String::from_utf8(
|
||||
std::process::Command::new("./util/show-utils.sh")
|
||||
process::Command::new("./util/show-utils.sh")
|
||||
.arg("--features=feat_os_unix feat_selinux")
|
||||
.output()?
|
||||
.stdout,
|
||||
@@ -274,12 +276,15 @@ fn main() -> io::Result<()> {
|
||||
|
||||
println!("Writing to utils");
|
||||
for (&name, (_, command)) in utils {
|
||||
if name == "[" {
|
||||
continue;
|
||||
}
|
||||
let p = format!("docs/src/utils/{name}.md");
|
||||
let (utils_name, usage_name, command) = match name {
|
||||
"[" => {
|
||||
continue;
|
||||
}
|
||||
n => (n, n, command),
|
||||
};
|
||||
let p = format!("docs/src/utils/{usage_name}.md");
|
||||
|
||||
let fluent = File::open(format!("src/uu/{name}/locales/en-US.ftl"))
|
||||
let fluent = File::open(format!("src/uu/{utils_name}/locales/en-US.ftl"))
|
||||
.and_then(|mut f: File| {
|
||||
let mut s = String::new();
|
||||
f.read_to_string(&mut s)?;
|
||||
@@ -291,21 +296,43 @@ fn main() -> io::Result<()> {
|
||||
MDWriter {
|
||||
w: Box::new(f),
|
||||
command: command(),
|
||||
name,
|
||||
name: usage_name,
|
||||
tldr_zip: &mut tldr_zip,
|
||||
utils_per_platform: &utils_per_platform,
|
||||
fluent,
|
||||
fluent_key: utils_name.to_string(),
|
||||
}
|
||||
.markdown()?;
|
||||
println!("Wrote to '{p}'");
|
||||
} else {
|
||||
println!("Error writing to {p}");
|
||||
}
|
||||
writeln!(summary, "* [{name}](utils/{name}.md)")?;
|
||||
writeln!(summary, "* [{usage_name}](utils/{usage_name}.md)")?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn fix_usage(name: &str, usage: String) -> String {
|
||||
match name {
|
||||
"test" => {
|
||||
// replace to [ but not the first two line
|
||||
usage
|
||||
.lines()
|
||||
.enumerate()
|
||||
.map(|(i, l)| {
|
||||
if i > 1 {
|
||||
l.replace("test", "[")
|
||||
} else {
|
||||
l.to_string()
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n")
|
||||
}
|
||||
_ => usage,
|
||||
}
|
||||
}
|
||||
|
||||
struct MDWriter<'a, 'b> {
|
||||
w: Box<dyn Write>,
|
||||
command: Command,
|
||||
@@ -313,6 +340,7 @@ struct MDWriter<'a, 'b> {
|
||||
tldr_zip: &'b mut Option<ZipArchive<File>>,
|
||||
utils_per_platform: &'b HashMap<&'b str, Vec<String>>,
|
||||
fluent: Option<String>,
|
||||
fluent_key: String,
|
||||
}
|
||||
|
||||
impl MDWriter<'_, '_> {
|
||||
@@ -343,9 +371,20 @@ impl MDWriter<'_, '_> {
|
||||
if id.name == key {
|
||||
// Simple text extraction - just concatenate text elements
|
||||
let mut result = String::new();
|
||||
use fluent_syntax::ast::{
|
||||
Expression, InlineExpression,
|
||||
PatternElement::{Placeable, TextElement},
|
||||
};
|
||||
for element in elements {
|
||||
if let fluent_syntax::ast::PatternElement::TextElement { value } = element {
|
||||
result.push_str(&value);
|
||||
if let TextElement { ref value } = element {
|
||||
result.push_str(value);
|
||||
}
|
||||
if let Placeable {
|
||||
expression:
|
||||
Expression::Inline(InlineExpression::StringLiteral { ref value }),
|
||||
} = element
|
||||
{
|
||||
result.push_str(value);
|
||||
}
|
||||
}
|
||||
return Some(result);
|
||||
@@ -403,7 +442,8 @@ impl MDWriter<'_, '_> {
|
||||
/// # Errors
|
||||
/// Returns an error if the writer fails.
|
||||
fn usage(&mut self) -> io::Result<()> {
|
||||
if let Some(usage) = self.extract_fluent_value(&format!("{}-usage", self.name)) {
|
||||
if let Some(usage) = self.extract_fluent_value(&format!("{}-usage", self.fluent_key)) {
|
||||
let usage = fix_usage(self.name, usage);
|
||||
writeln!(self.w, "\n```")?;
|
||||
writeln!(self.w, "{usage}")?;
|
||||
writeln!(self.w, "```")
|
||||
@@ -415,7 +455,7 @@ impl MDWriter<'_, '_> {
|
||||
/// # Errors
|
||||
/// Returns an error if the writer fails.
|
||||
fn about(&mut self) -> io::Result<()> {
|
||||
if let Some(about) = self.extract_fluent_value(&format!("{}-about", self.name)) {
|
||||
if let Some(about) = self.extract_fluent_value(&format!("{}-about", self.fluent_key)) {
|
||||
writeln!(self.w, "{about}")
|
||||
} else {
|
||||
Ok(())
|
||||
@@ -425,7 +465,9 @@ impl MDWriter<'_, '_> {
|
||||
/// # Errors
|
||||
/// Returns an error if the writer fails.
|
||||
fn after_help(&mut self) -> io::Result<()> {
|
||||
if let Some(after_help) = self.extract_fluent_value(&format!("{}-after-help", self.name)) {
|
||||
if let Some(after_help) =
|
||||
self.extract_fluent_value(&format!("{}-after-help", self.fluent_key))
|
||||
{
|
||||
writeln!(self.w, "\n\n{after_help}")
|
||||
} else {
|
||||
Ok(())
|
||||
@@ -498,7 +540,7 @@ impl MDWriter<'_, '_> {
|
||||
writeln!(self.w, "</dt>")?;
|
||||
let help_text = arg.get_help().unwrap_or_default().to_string();
|
||||
// Try to resolve Fluent key if it looks like one, otherwise use as-is
|
||||
let resolved_help = if help_text.starts_with(&format!("{}-help-", self.name)) {
|
||||
let resolved_help = if help_text.starts_with(&format!("{}-help-", self.fluent_key)) {
|
||||
self.extract_fluent_value(&help_text).unwrap_or(help_text)
|
||||
} else {
|
||||
help_text
|
||||
@@ -547,7 +589,7 @@ fn write_zip_examples(
|
||||
};
|
||||
|
||||
match format_examples(content, output_markdown) {
|
||||
Err(e) => Err(std::io::Error::other(format!(
|
||||
Err(e) => Err(io::Error::other(format!(
|
||||
"Failed to format the tldr examples of {name}: {e}"
|
||||
))),
|
||||
Ok(s) => Ok(s),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user