mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge branch 'main' into renovate/rand_chacha-0.x
This commit is contained in:
+1
-6
@@ -15,9 +15,4 @@ LIBSTDBUF_DIR = "/usr/local/libexec/coreutils"
|
||||
|
||||
# remove me
|
||||
[build]
|
||||
rustflags = [
|
||||
"-A",
|
||||
"clippy::collapsible_if",
|
||||
"-A",
|
||||
"clippy::manual_is_multiple_of",
|
||||
]
|
||||
rustflags = ["-A", "clippy::collapsible_if"]
|
||||
|
||||
@@ -2,3 +2,4 @@ avoid-breaking-exported-api = false
|
||||
check-private-items = true
|
||||
cognitive-complexity-threshold = 24
|
||||
missing-docs-in-crate-items = true
|
||||
allow-mixed-uninlined-format-args = false
|
||||
|
||||
@@ -5,7 +5,7 @@ name: CICD
|
||||
# spell-checker:ignore (jargon) SHAs deps dequote softprops subshell toolchain fuzzers dedupe devel profdata
|
||||
# spell-checker:ignore (people) Peltoche rivy dtolnay Anson dawidd
|
||||
# spell-checker:ignore (shell/tools) binutils choco clippy dmake esac fakeroot fdesc fdescfs gmake grcov halium lcov libclang libfuse libssl limactl mkdir nextest nocross pacman popd printf pushd redoxer rsync rustc rustfmt rustup shopt sccache utmpdump xargs zstd
|
||||
# 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
|
||||
# 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
|
||||
|
||||
env:
|
||||
PROJECT_NAME: coreutils
|
||||
@@ -322,13 +322,13 @@ jobs:
|
||||
disable_search: true
|
||||
flags: makefile,${{ matrix.job.os }}
|
||||
fail_ci_if_error: false
|
||||
- name: "`make install PROG_PREFIX=uu- PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n`"
|
||||
- name: "`make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n`"
|
||||
shell: bash
|
||||
run: |
|
||||
set -x
|
||||
DESTDIR=/tmp/ make install PROG_PREFIX=uu- PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n
|
||||
DESTDIR=/tmp/ make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n
|
||||
# Check that utils are built with given profile
|
||||
./target/release-fast/true
|
||||
./target/release-small/true
|
||||
# Check that the progs have prefix
|
||||
test -f /tmp/usr/local/bin/uu-tty
|
||||
test -f /tmp/usr/local/libexec/uu-coreutils/libstdbuf.*
|
||||
@@ -501,10 +501,10 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@v0.0.9
|
||||
- name: "`make install PROFILE=release-fast`"
|
||||
- name: "`make install PROFILE=release`"
|
||||
shell: bash
|
||||
run: |
|
||||
export CARGO_TARGET_DIR=cargo-target RUSTFLAGS="${RUSTFLAGS} -C strip=symbols" PROFILE=release-fast MANPAGES=n COMPLETIONS=n LOCALES=n
|
||||
export CARGO_TARGET_DIR=cargo-target RUSTFLAGS="${RUSTFLAGS} -C strip=symbols" PROFILE=release MANPAGES=n COMPLETIONS=n LOCALES=n
|
||||
mkdir -p "${CARGO_TARGET_DIR}" && sudo mount -t tmpfs -o noatime,size=16G tmpfs "${CARGO_TARGET_DIR}"
|
||||
make install DESTDIR=target/size-release/
|
||||
make install COMPLETIONS=n MULTICALL=y LN="ln -vf" DESTDIR=target/size-multi-release/
|
||||
@@ -631,7 +631,7 @@ jobs:
|
||||
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "feat_os_unix,uudoc" , use-cross: no, workspace-tests: true }
|
||||
- { os: ubuntu-latest , target: x86_64-unknown-linux-musl , features: feat_os_unix_musl , use-cross: use-cross }
|
||||
- { os: ubuntu-latest , target: x86_64-unknown-redox , features: feat_os_unix_redox , use-cross: redoxer , skip-tests: true }
|
||||
- { os: ubuntu-latest , target: wasm32-unknown-unknown , default-features: false, features: uucore/format, skip-tests: true, skip-package: true, skip-publish: true }
|
||||
- { os: ubuntu-latest , target: wasm32-wasip1, default-features: false, features: "basenc,cksum", skip-tests: true }
|
||||
- { os: macos-latest , target: aarch64-apple-darwin , features: feat_os_macos, workspace-tests: true } # M1 CPU
|
||||
# PR #7964: Mac should still build even if the feature is not enabled. Do not publish this.
|
||||
- { os: macos-latest , target: aarch64-apple-darwin , workspace-tests: true, skip-publish: true } # M1 CPU
|
||||
@@ -672,7 +672,11 @@ jobs:
|
||||
STAGING='_staging'
|
||||
outputs STAGING
|
||||
# determine EXE suffix
|
||||
EXE_suffix="" ; case '${{ matrix.job.target }}' in *-pc-windows-*) EXE_suffix=".exe" ;; esac;
|
||||
unset EXE_suffix
|
||||
case '${{ matrix.job.target }}' in
|
||||
*-pc-windows-*) EXE_suffix=".exe" ;;
|
||||
*wasm-*) EXE_suffix=".wasm" ;;
|
||||
esac;
|
||||
outputs EXE_suffix
|
||||
# parse commit reference info
|
||||
echo GITHUB_REF=${GITHUB_REF}
|
||||
@@ -868,7 +872,7 @@ jobs:
|
||||
run: |
|
||||
## Package artifact(s)
|
||||
# binaries
|
||||
cp 'target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/'
|
||||
cp 'target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}'* '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/'
|
||||
cp 'target/${{ matrix.job.target }}/release/uudoc${{ steps.vars.outputs.EXE_suffix }}' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/' || :
|
||||
# README and LICENSE
|
||||
# * spell-checker:ignore EADME ICENSE
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
name: Security audit
|
||||
|
||||
# spell-checker:ignore (misc) rustsec
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
jobs:
|
||||
audit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: rustsec/audit-check@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
- name: Get current version from Cargo.toml
|
||||
id: version
|
||||
run: |
|
||||
VERSION=$(awk '/\[workspace\.package\]/{flag=1; next} flag && /version = /{gsub(/.*= "/, ""); gsub(/".*/, ""); print; exit}' Cargo.toml)
|
||||
VERSION=$(awk '/\[workspace\.package\]/{flag=1; next} flag && /^version = /{gsub(/.*= "/, ""); gsub(/".*/, ""); print; exit}' Cargo.toml)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Detected version: $VERSION"
|
||||
|
||||
|
||||
Generated
+20
-97
@@ -8,6 +8,19 @@ version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
||||
|
||||
[[package]]
|
||||
name = "ahash"
|
||||
version = "0.8.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"getrandom 0.3.4",
|
||||
"once_cell",
|
||||
"version_check",
|
||||
"zerocopy 0.8.39",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "1.1.4"
|
||||
@@ -667,8 +680,6 @@ dependencies = [
|
||||
"uucore",
|
||||
"uutests",
|
||||
"walkdir",
|
||||
"wincode",
|
||||
"wincode-derive",
|
||||
"zip",
|
||||
]
|
||||
|
||||
@@ -755,7 +766,7 @@ dependencies = [
|
||||
"mio",
|
||||
"parking_lot",
|
||||
"rustix",
|
||||
"signal-hook 0.3.18",
|
||||
"signal-hook",
|
||||
"signal-hook-mio",
|
||||
"winapi",
|
||||
]
|
||||
@@ -812,41 +823,6 @@ dependencies = [
|
||||
"windows-sys 0.61.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling"
|
||||
version = "0.21.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0"
|
||||
dependencies = [
|
||||
"darling_core",
|
||||
"darling_macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling_core"
|
||||
version = "0.21.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4"
|
||||
dependencies = [
|
||||
"fnv",
|
||||
"ident_case",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "darling_macro"
|
||||
version = "0.21.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81"
|
||||
dependencies = [
|
||||
"darling_core",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "data-encoding"
|
||||
version = "2.10.0"
|
||||
@@ -1130,12 +1106,6 @@ dependencies = [
|
||||
"thiserror 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fnv"
|
||||
version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
||||
|
||||
[[package]]
|
||||
name = "foldhash"
|
||||
version = "0.1.5"
|
||||
@@ -1605,12 +1575,6 @@ version = "2.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3e10b0e5e87a2c84bd5fa407705732052edebe69291d347d0c3033785470edbf"
|
||||
|
||||
[[package]]
|
||||
name = "ident_case"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.13.0"
|
||||
@@ -1808,9 +1772,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.180"
|
||||
version = "0.2.181"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
|
||||
checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
@@ -1903,9 +1867,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.7.6"
|
||||
version = "2.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
|
||||
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
||||
|
||||
[[package]]
|
||||
name = "memmap2"
|
||||
@@ -2200,12 +2164,6 @@ dependencies = [
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pastey"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b867cad97c0791bbd3aaa6472142568c6c9e8f71937e98379f584cfb0cf35bec"
|
||||
|
||||
[[package]]
|
||||
name = "phf"
|
||||
version = "0.13.1"
|
||||
@@ -2768,16 +2726,6 @@ dependencies = [
|
||||
"signal-hook-registry",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3b57709da74f9ff9f4a27dce9526eec25ca8407c45a7887243b031a58935fb8e"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"signal-hook-registry",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "signal-hook-mio"
|
||||
version = "0.2.5"
|
||||
@@ -2786,7 +2734,7 @@ checksum = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"mio",
|
||||
"signal-hook 0.3.18",
|
||||
"signal-hook",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3413,7 +3361,6 @@ dependencies = [
|
||||
"gcd",
|
||||
"libc",
|
||||
"nix",
|
||||
"signal-hook 0.4.3",
|
||||
"tempfile",
|
||||
"thiserror 2.0.18",
|
||||
"uucore",
|
||||
@@ -4087,6 +4034,7 @@ dependencies = [
|
||||
name = "uu_sort"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"bigdecimal",
|
||||
"binary-heap-plus",
|
||||
"clap",
|
||||
@@ -4094,7 +4042,6 @@ dependencies = [
|
||||
"compare",
|
||||
"ctrlc",
|
||||
"fluent",
|
||||
"fnv",
|
||||
"itertools 0.14.0",
|
||||
"memchr",
|
||||
"nix",
|
||||
@@ -4659,30 +4606,6 @@ version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[[package]]
|
||||
name = "wincode"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f27315388539620cef3386d77b05305dbfb7fccbd32eead533a7a3779313532"
|
||||
dependencies = [
|
||||
"pastey",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"thiserror 2.0.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wincode-derive"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d89833c7743abd1a831b7eb0fdfd7210bd8bedc297435e9426aad9b63d7c7f77"
|
||||
dependencies = [
|
||||
"darling",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-core"
|
||||
version = "0.62.2"
|
||||
|
||||
+10
-17
@@ -1,21 +1,21 @@
|
||||
# coreutils (uutils)
|
||||
# * see the repository LICENSE, README, and CONTRIBUTING files for more information
|
||||
|
||||
# spell-checker:ignore (libs) bigdecimal datetime serde wincode gethostid kqueue libselinux mangen memmap uuhelp startswith constness expl unnested logind cfgs interner
|
||||
# spell-checker:ignore (libs) ahash bigdecimal datetime serde gethostid kqueue libselinux mangen memmap uuhelp startswith constness expl unnested logind cfgs interner
|
||||
|
||||
[package]
|
||||
name = "coreutils"
|
||||
description = "coreutils ~ GNU coreutils (updated); implemented as universal (cross-platform) utils, written in Rust"
|
||||
default-run = "coreutils"
|
||||
repository = "https://github.com/uutils/coreutils"
|
||||
rust-version = "1.88.0"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
license.workspace = true
|
||||
homepage.workspace = true
|
||||
keywords.workspace = true
|
||||
categories.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
@@ -303,6 +303,7 @@ members = [
|
||||
authors = ["uutils developers"]
|
||||
categories = ["command-line-utilities"]
|
||||
edition = "2024"
|
||||
rust-version = "1.88.0"
|
||||
homepage = "https://github.com/uutils/coreutils"
|
||||
keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"]
|
||||
license = "MIT"
|
||||
@@ -310,6 +311,7 @@ readme = "README.package.md"
|
||||
version = "0.6.0"
|
||||
|
||||
[workspace.dependencies]
|
||||
ahash = "0.8.12"
|
||||
ansi-width = "0.1.0"
|
||||
bigdecimal = "0.4"
|
||||
binary-heap-plus = "0.5.0"
|
||||
@@ -328,7 +330,6 @@ dns-lookup = { version = "3.0.0" }
|
||||
exacl = "0.12.0"
|
||||
file_diff = "1.0.0"
|
||||
filetime = "0.2.23"
|
||||
fnv = "1.0.7"
|
||||
fs_extra = "1.3.0"
|
||||
fts-sys = "0.2.16"
|
||||
gcd = "2.3"
|
||||
@@ -376,7 +377,6 @@ same-file = "1.0.6"
|
||||
self_cell = "1.0.4"
|
||||
selinux = "=0.6.0"
|
||||
string-interner = "0.19.0"
|
||||
signal-hook = "0.4.1"
|
||||
tempfile = "3.15.0"
|
||||
terminal_size = "0.4.0"
|
||||
textwrap = { version = "0.16.1", features = ["terminal_size"] }
|
||||
@@ -587,11 +587,6 @@ nix = { workspace = true, features = [
|
||||
] }
|
||||
rlimit = { workspace = true }
|
||||
|
||||
# Used in test_uptime::test_uptime_with_file_containing_valid_boot_time_utmpx_record
|
||||
# to deserialize an utmpx struct into a binary file
|
||||
[target.'cfg(all(target_family= "unix",not(target_os = "macos")))'.dev-dependencies]
|
||||
wincode = "0.3.1"
|
||||
wincode-derive = "0.3.1"
|
||||
|
||||
[build-dependencies]
|
||||
phf_codegen.workspace = true
|
||||
@@ -605,18 +600,17 @@ name = "uudoc"
|
||||
path = "src/bin/uudoc.rs"
|
||||
required-features = ["uudoc"]
|
||||
|
||||
# The default release profile with some optimizations.
|
||||
[profile.release]
|
||||
lto = true
|
||||
panic = "abort"
|
||||
|
||||
[profile.release-fast]
|
||||
inherits = "release"
|
||||
codegen-units = 1
|
||||
# FIXME: https://github.com/uutils/coreutils/issues/10654
|
||||
[profile.release.package.uu_expand]
|
||||
codegen-units = 16
|
||||
|
||||
# A release-like profile that is as small as possible.
|
||||
[profile.release-small]
|
||||
inherits = "release-fast"
|
||||
inherits = "release"
|
||||
opt-level = "z"
|
||||
strip = true
|
||||
|
||||
@@ -642,8 +636,7 @@ unexpected_cfgs = { level = "warn", check-cfg = [
|
||||
unused_qualifications = "warn"
|
||||
|
||||
[workspace.lints.clippy]
|
||||
manual_is_multiple_of = { level = "allow", priority = 127 } # remove me
|
||||
collapsible_if = { level = "allow", priority = 127 } # remove me
|
||||
collapsible_if = { level = "allow", priority = 127 } # remove me
|
||||
# The counts were generated with this command:
|
||||
# cargo clippy --all-targets --workspace --message-format=json --quiet \
|
||||
# | jq -r '.message.code.code | select(. != null and startswith("clippy::"))' \
|
||||
|
||||
@@ -101,7 +101,7 @@ other Rust program:
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
Replace `--release` with `--profile=release-fast` or `--profile=release-small` to use all optimizations or save binary size.
|
||||
Replace `--release` with `--profile=release-small` to optimize binary size.
|
||||
|
||||
This command builds the most portable common core set of uutils into a multicall
|
||||
(BusyBox-type) binary, named 'coreutils', on most Rust-supported platforms.
|
||||
@@ -154,10 +154,10 @@ To simply build all available utilities (with debug profile):
|
||||
make
|
||||
```
|
||||
|
||||
In release-fast mode:
|
||||
In release mode:
|
||||
|
||||
```shell
|
||||
make PROFILE=release-fast
|
||||
make PROFILE=release
|
||||
```
|
||||
|
||||
To build all but a few of the available utilities:
|
||||
@@ -191,18 +191,12 @@ manpages or shell completion to work, use `GNU Make` or see
|
||||
|
||||
### Install with GNU Make
|
||||
|
||||
To install all available utilities:
|
||||
To install all available utilities (PROFILE=release by default):
|
||||
|
||||
```shell
|
||||
make install
|
||||
```
|
||||
|
||||
To install all utilities with all possible optimizations:
|
||||
|
||||
```shell
|
||||
make PROFILE=release-fast install
|
||||
```
|
||||
|
||||
To install using `sudo` switch `-E` must be used:
|
||||
|
||||
```shell
|
||||
|
||||
@@ -72,26 +72,37 @@ pub fn main() {
|
||||
.unwrap();
|
||||
|
||||
let mut phf_map = phf_codegen::OrderedMap::<&str>::new();
|
||||
let mut entries = Vec::new();
|
||||
|
||||
for krate in &crates {
|
||||
let map_value = format!("({krate}::uumain, {krate}::uu_app)");
|
||||
match krate.as_ref() {
|
||||
// 'test' is named uu_test to avoid collision with rust core crate 'test'.
|
||||
// It can also be invoked by name '[' for the '[ expr ] syntax'.
|
||||
"uu_test" => {
|
||||
phf_map.entry("test", map_value.clone());
|
||||
phf_map.entry("[", map_value.clone());
|
||||
entries.push(("test", map_value.clone()));
|
||||
entries.push(("[", map_value.clone()));
|
||||
}
|
||||
k if k.starts_with(OVERRIDE_PREFIX) => {
|
||||
phf_map.entry(&k[OVERRIDE_PREFIX.len()..], map_value.clone());
|
||||
entries.push((&k[OVERRIDE_PREFIX.len()..], map_value.clone()));
|
||||
}
|
||||
"false" | "true" => {
|
||||
phf_map.entry(krate, format!("(r#{krate}::uumain, r#{krate}::uu_app)"));
|
||||
entries.push((
|
||||
krate.as_str(),
|
||||
format!("(r#{krate}::uumain, r#{krate}::uu_app)"),
|
||||
));
|
||||
}
|
||||
_ => {
|
||||
phf_map.entry(krate, map_value.clone());
|
||||
entries.push((krate.as_str(), map_value.clone()));
|
||||
}
|
||||
}
|
||||
}
|
||||
entries.sort_by_key(|(name, _)| *name);
|
||||
|
||||
for (name, value) in entries {
|
||||
phf_map.entry(name, value);
|
||||
}
|
||||
|
||||
write!(mf, "{}", phf_map.build()).unwrap();
|
||||
mf.write_all(b"\n}\n").unwrap();
|
||||
|
||||
|
||||
@@ -104,8 +104,6 @@ skip = [
|
||||
{ name = "zerocopy", version = "0.7.35" },
|
||||
# zerocopy
|
||||
{ name = "zerocopy-derive", version = "0.7.35" },
|
||||
# crossterm
|
||||
{ name = "signal-hook", version = "0.3.18" },
|
||||
]
|
||||
# spell-checker: enable
|
||||
|
||||
|
||||
+3
-10
@@ -55,17 +55,10 @@ view the full documentation in the
|
||||
We provide three release profiles out of the box, though you may want to tweak
|
||||
them:
|
||||
|
||||
- `release`: This is the standard Rust release profile, but with link-time
|
||||
optimization enabled. It is a balance between compile time, performance and a
|
||||
reasonable amount of debug info. The main drawback of this profile is that the
|
||||
binary is quite large (roughly 2x the GNU coreutils).
|
||||
- `release-fast`: Every setting is tuned for the best performance, at the cost
|
||||
of compile time. This binary is still quite large.
|
||||
- `release-small`: Generates the smallest binary possible. This strips _all_
|
||||
debug info from the binary, resulting in less informative backtraces. The performance of
|
||||
this profile is also really good as it is close to the `release-fast` profile,
|
||||
but with all debuginfo stripped.
|
||||
- `release`: The profile with all performance optimization enabled.
|
||||
- `release-small`: Optimize binary size.
|
||||
|
||||
They include panic abort which removes stack traces on old rust [https://blog.rust-lang.org/2025/12/11/Rust-1.92.0/].
|
||||
For the precise definition of these profiles, you can look at the root
|
||||
[`Cargo.toml`](https://github.com/uutils/coreutils/blob/main/Cargo.toml).
|
||||
|
||||
|
||||
Generated
+44
-37
@@ -8,6 +8,19 @@ version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
||||
|
||||
[[package]]
|
||||
name = "ahash"
|
||||
version = "0.8.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"getrandom 0.3.4",
|
||||
"once_cell",
|
||||
"version_check",
|
||||
"zerocopy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "android_system_properties"
|
||||
version = "0.1.5"
|
||||
@@ -207,9 +220,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.54"
|
||||
version = "1.2.55"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583"
|
||||
checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29"
|
||||
dependencies = [
|
||||
"find-msvc-tools",
|
||||
"jobserver",
|
||||
@@ -242,18 +255,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.54"
|
||||
version = "4.5.57"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394"
|
||||
checksum = "6899ea499e3fb9305a65d5ebf6e3d2248c5fab291f300ad0a704fbe142eae31a"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.54"
|
||||
version = "4.5.57"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00"
|
||||
checksum = "7b12c8b680195a62a8364d16b8447b01b6c2c8f9aaf68bee653be34d4245e238"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
@@ -518,9 +531,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
|
||||
|
||||
[[package]]
|
||||
name = "find-msvc-tools"
|
||||
version = "0.1.8"
|
||||
version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db"
|
||||
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
|
||||
|
||||
[[package]]
|
||||
name = "fixed_decimal"
|
||||
@@ -535,9 +548,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
version = "1.1.8"
|
||||
version = "1.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369"
|
||||
checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
|
||||
dependencies = [
|
||||
"crc32fast",
|
||||
"miniz_oxide",
|
||||
@@ -588,12 +601,6 @@ dependencies = [
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fnv"
|
||||
version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
||||
|
||||
[[package]]
|
||||
name = "generic-array"
|
||||
version = "0.14.7"
|
||||
@@ -647,9 +654,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
||||
|
||||
[[package]]
|
||||
name = "iana-time-zone"
|
||||
version = "0.1.64"
|
||||
version = "0.1.65"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb"
|
||||
checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"
|
||||
dependencies = [
|
||||
"android_system_properties",
|
||||
"core-foundation-sys",
|
||||
@@ -974,9 +981,9 @@ checksum = "84de9d95a6d2547d9b77ee3f25fa0ee32e3c3a6484d47a55adebc0439c077992"
|
||||
|
||||
[[package]]
|
||||
name = "jiff"
|
||||
version = "0.2.18"
|
||||
version = "0.2.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e67e8da4c49d6d9909fe03361f9b620f58898859f5c7aded68351e85e71ecf50"
|
||||
checksum = "d89a5b5e10d5a9ad6e5d1f4bd58225f655d6fe9767575a5e8ac5a6fe64e04495"
|
||||
dependencies = [
|
||||
"jiff-static",
|
||||
"jiff-tzdb-platform",
|
||||
@@ -1000,9 +1007,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "jiff-static"
|
||||
version = "0.2.18"
|
||||
version = "0.2.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0c84ee7f197eca9a86c6fd6cb771e55eb991632f15f2bc3ca6ec838929e6e78"
|
||||
checksum = "ff7a39c8862fc1369215ccf0a8f12dd4598c7f6484704359f0351bd617034dbf"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -1055,9 +1062,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.180"
|
||||
version = "0.2.181"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
|
||||
checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5"
|
||||
|
||||
[[package]]
|
||||
name = "libfuzzer-sys"
|
||||
@@ -1105,9 +1112,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.7.6"
|
||||
version = "2.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
|
||||
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
@@ -1261,15 +1268,15 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
|
||||
|
||||
[[package]]
|
||||
name = "portable-atomic"
|
||||
version = "1.13.0"
|
||||
version = "1.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950"
|
||||
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
||||
|
||||
[[package]]
|
||||
name = "portable-atomic-util"
|
||||
version = "0.2.4"
|
||||
version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507"
|
||||
checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5"
|
||||
dependencies = [
|
||||
"portable-atomic",
|
||||
]
|
||||
@@ -1393,9 +1400,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.4.13"
|
||||
version = "0.4.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
|
||||
checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
|
||||
|
||||
[[package]]
|
||||
name = "rust-ini"
|
||||
@@ -1820,13 +1827,13 @@ dependencies = [
|
||||
name = "uu_sort"
|
||||
version = "0.6.0"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"bigdecimal",
|
||||
"binary-heap-plus",
|
||||
"clap",
|
||||
"compare",
|
||||
"ctrlc",
|
||||
"fluent",
|
||||
"fnv",
|
||||
"itertools",
|
||||
"memchr",
|
||||
"nix",
|
||||
@@ -2271,18 +2278,18 @@ checksum = "9b3a41ce106832b4da1c065baa4c31cf640cf965fa1483816402b7f6b96f0a64"
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.8.34"
|
||||
version = "0.8.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "71ddd76bcebeed25db614f82bf31a9f4222d3fbba300e6fb6c00afa26cbd4d9d"
|
||||
checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a"
|
||||
dependencies = [
|
||||
"zerocopy-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy-derive"
|
||||
version = "0.8.34"
|
||||
version = "0.8.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d8187381b52e32220d50b255276aa16a084ec0a9017a0ca2152a1f55c539758d"
|
||||
checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
||||
@@ -4,6 +4,7 @@ version = "0.0.0"
|
||||
description = "uutils ~ 'core' uutils fuzzers"
|
||||
repository = "https://github.com/uutils/coreutils/tree/main/fuzz/"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
publish = false
|
||||
|
||||
@@ -13,6 +14,7 @@ members = ["."]
|
||||
|
||||
[workspace.package]
|
||||
edition = "2024"
|
||||
rust-version = "1.88.0"
|
||||
license = "MIT"
|
||||
|
||||
[package.metadata]
|
||||
|
||||
@@ -5,6 +5,7 @@ description = "uutils ~ 'core' uutils fuzzing library"
|
||||
repository = "https://github.com/uutils/coreutils/tree/main/fuzz/uufuzz"
|
||||
version = "0.6.0"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -30,7 +30,7 @@ fn usage<T>(utils: &UtilityMap<T>, name: &str) {
|
||||
println!("Options:");
|
||||
println!(" --list lists all defined functions, one per row\n");
|
||||
println!("Currently defined functions:\n");
|
||||
let display_list = utils.keys().copied().sorted_unstable().join(", ");
|
||||
let display_list = utils.keys().copied().join(", ");
|
||||
let width = cmp::min(textwrap::termwidth(), 100) - 4 * 2; // (opinion/heuristic) max 100 chars wide with 4 character side indentions
|
||||
println!(
|
||||
"{}",
|
||||
@@ -81,8 +81,7 @@ fn main() {
|
||||
usage(&utils, binary_as_util);
|
||||
process::exit(0);
|
||||
}
|
||||
let mut utils: Vec<_> = utils.keys().collect();
|
||||
utils.sort();
|
||||
let utils: Vec<_> = utils.keys().collect();
|
||||
for util in utils {
|
||||
println!("{util}");
|
||||
}
|
||||
|
||||
@@ -32,8 +32,7 @@ pub fn not_found(util: &OsStr) -> ! {
|
||||
/// Prints an "unrecognized option" error and exits
|
||||
pub fn unrecognized_option(binary_name: &str, option: &OsStr) -> ! {
|
||||
eprintln!(
|
||||
"{}: unrecognized option '{}'",
|
||||
binary_name,
|
||||
"{binary_name}: unrecognized option '{}'",
|
||||
option.to_string_lossy()
|
||||
);
|
||||
process::exit(1);
|
||||
|
||||
@@ -9,6 +9,7 @@ homepage.workspace = true
|
||||
keywords.workspace = true
|
||||
categories.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
readme.workspace = true
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -9,6 +9,7 @@ homepage.workspace = true
|
||||
keywords.workspace = true
|
||||
categories.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
readme.workspace = true
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -9,6 +9,7 @@ homepage.workspace = true
|
||||
keywords.workspace = true
|
||||
categories.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
readme.workspace = true
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -9,6 +9,7 @@ homepage.workspace = true
|
||||
keywords.workspace = true
|
||||
categories.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
readme.workspace = true
|
||||
|
||||
[lints]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user