From dd6d28444a5f8922340d83d1a120906fa7482009 Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Fri, 27 Mar 2026 02:32:36 +0900 Subject: [PATCH] Remove duplicated features --- .github/workflows/CICD.yml | 12 ++++++------ .github/workflows/code-quality.yml | 2 +- .github/workflows/l10n.yml | 6 +++--- Cargo.toml | 5 ----- README.md | 2 -- docs/src/installation.md | 4 +--- tests/by-util/test_chown.rs | 2 +- 7 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 750fb9bcccc..c07747c1b8e 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -102,7 +102,7 @@ jobs: # for now, don't build it on mac & windows because the doc is only published from linux # + it needs a bunch of duplication for build # and I don't want to add a doc step in the regular build to avoid long builds -# - { os: macos-latest , features: feat_os_macos } +# - { os: macos-latest , features: feat_os_unix } # - { os: windows-latest , features: feat_os_windows } steps: - uses: actions/checkout@v6 @@ -277,7 +277,7 @@ jobs: matrix: job: - { os: ubuntu-latest , features: feat_os_unix } - - { os: macos-latest , features: feat_os_macos } + - { os: macos-latest , features: feat_os_unix } - { os: windows-latest , features: feat_os_windows } steps: - uses: actions/checkout@v6 @@ -320,7 +320,7 @@ jobs: matrix: job: - { os: ubuntu-latest , features: feat_os_unix } - - { os: macos-latest , features: feat_os_macos } + - { os: macos-latest , features: feat_os_unix } - { os: windows-latest , features: feat_os_windows } steps: - uses: actions/checkout@v6 @@ -381,10 +381,10 @@ jobs: - { os: ubuntu-latest , target: x86_64-unknown-netbsd, features: "feat_os_unix", use-cross: use-cross , skip-tests: true , check-only: true } - { os: ubuntu-latest , target: x86_64-unknown-redox , features: feat_os_unix_redox , use-cross: redoxer , skip-tests: true , check-only: true } - { os: ubuntu-latest , target: wasm32-wasip1, default-features: false, features: feat_wasm, skip-tests: true } - - { os: macos-latest , target: aarch64-apple-darwin , features: feat_os_macos, workspace-tests: true } # M1 CPU + - { os: macos-latest , target: aarch64-apple-darwin , features: feat_os_unix, workspace-tests: true } # M1 CPU # PR #7964: chcon should not break build without the feature. cargo check is enough to detect it. - { os: macos-latest , target: aarch64-apple-darwin , workspace-tests: true, check-only: true } # M1 CPU - - { os: macos-latest , target: x86_64-apple-darwin , features: feat_os_macos, workspace-tests: true } + - { os: macos-latest , target: x86_64-apple-darwin , features: feat_os_unix, workspace-tests: true } - { os: windows-latest , target: i686-pc-windows-msvc , features: feat_os_windows } - { os: windows-latest , target: x86_64-pc-windows-gnu , features: feat_os_windows } - { os: windows-latest , target: x86_64-pc-windows-msvc , features: feat_os_windows } @@ -870,7 +870,7 @@ jobs: fail-fast: false matrix: job: - - { os: macos-latest , features: feat_os_macos } + - { os: macos-latest , features: feat_os_unix } - { os: windows-latest , features: feat_os_windows } steps: diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index e5f47562d6a..7249ce37b6d 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -72,7 +72,7 @@ jobs: matrix: job: - { os: ubuntu-latest , features: all , workspace: true } - - { os: macos-latest , features: feat_os_macos } + - { os: macos-latest , features: feat_os_unix } - { os: windows-latest , features: feat_os_windows } steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/l10n.yml b/.github/workflows/l10n.yml index 30b2cd5b17e..98504f99778 100644 --- a/.github/workflows/l10n.yml +++ b/.github/workflows/l10n.yml @@ -31,7 +31,7 @@ jobs: matrix: job: - { os: ubuntu-latest , features: "feat_os_unix" } - - { os: macos-latest , features: "feat_os_macos" } + - { os: macos-latest , features: "feat_os_unix" } - { os: windows-latest , features: "feat_os_windows" } steps: - uses: actions/checkout@v6 @@ -397,7 +397,7 @@ jobs: matrix: job: - { os: ubuntu-latest , features: "feat_os_unix" } - - { os: macos-latest , features: "feat_os_macos" } + - { os: macos-latest , features: "feat_os_unix" } steps: - uses: actions/checkout@v6 with: @@ -550,7 +550,7 @@ jobs: matrix: job: - { os: ubuntu-latest , features: "feat_os_unix" } - - { os: macos-latest , features: "feat_os_macos" } + - { os: macos-latest , features: "feat_os_unix" } steps: - uses: actions/checkout@v6 with: diff --git a/Cargo.toml b/Cargo.toml index db9c0c40523..6a816387454 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,6 @@ all-features = true [features] default = ["feat_common_core"] ## OS feature shortcodes -macos = ["feat_os_macos"] unix = ["feat_os_unix"] windows = ["feat_os_windows"] ## project-specific feature shortcodes @@ -230,10 +229,6 @@ feat_wasm = [ "arch", "uname", ] -# "feat_os_macos" == set of utilities which can be built/run on the MacOS platform -feat_os_macos = [ - "feat_os_unix", ## == a modern/usual *nix platform -] # "feat_os_unix" == set of utilities which can be built/run on modern/usual *nix platforms. feat_os_unix = [ "feat_Tier1", diff --git a/README.md b/README.md index 6708d9dcadc..007f19cdd89 100644 --- a/README.md +++ b/README.md @@ -111,8 +111,6 @@ sets of uutils for a platform (on that platform) is as simple as specifying it as a feature: ```shell -cargo build --release --features macos -# or ... cargo build --release --features windows # or ... cargo build --release --features unix diff --git a/docs/src/installation.md b/docs/src/installation.md index 8ff0f004efd..a62b6fa8ab4 100644 --- a/docs/src/installation.md +++ b/docs/src/installation.md @@ -15,10 +15,8 @@ You can also [build uutils from source](build.md). [![crates.io package](https://repology.org/badge/version-for-repo/crates_io/uutils-coreutils.svg)](https://crates.io/crates/coreutils) ```shell -# Linux +# Unix like cargo install coreutils --features unix --locked -# MacOs -cargo install coreutils --features macos --locked # Windows cargo install coreutils --features windows --locked ``` diff --git a/tests/by-util/test_chown.rs b/tests/by-util/test_chown.rs index 2602aabde06..14b7f84d859 100644 --- a/tests/by-util/test_chown.rs +++ b/tests/by-util/test_chown.rs @@ -494,7 +494,7 @@ fn test_chown_only_group_id() { } result.stderr_contains("retained as"); - // Apparently on CI "macos-latest, x86_64-apple-darwin, feat_os_macos" + // Apparently on CI "macos-latest, x86_64-apple-darwin, feat_os_unix" // the process has the rights to change from runner:staff to runner:wheel #[cfg(any(windows, all(unix, not(target_os = "macos"))))] // FreeBSD user on CI is part of wheel group