diff --git a/anda/system/uutils-coreutils/anda.hcl b/anda/system/uutils-coreutils/anda.hcl index 71536c0fc6..af51146e61 100644 --- a/anda/system/uutils-coreutils/anda.hcl +++ b/anda/system/uutils-coreutils/anda.hcl @@ -2,4 +2,7 @@ project pkg { rpm { spec = "uutils-coreutils.spec" } + labels { + subrepo = "extras" + } } diff --git a/anda/system/uutils-coreutils/coreutils-fix-metadata.diff b/anda/system/uutils-coreutils/coreutils-fix-metadata.diff new file mode 100644 index 0000000000..2ae3d7b2f0 --- /dev/null +++ b/anda/system/uutils-coreutils/coreutils-fix-metadata.diff @@ -0,0 +1,40 @@ +--- coreutils-*/Cargo.toml ++++ coreutils-*/Cargo.toml +@@ -18,6 +18,7 @@ + categories = ["command-line-utilities"] + rust-version = "1.79.0" + edition = "2021" ++autobins = false + + build = "build.rs" + +@@ -325,7 +326,7 @@ + rand_core = "0.6.4" + rayon = "1.10" + regex = "1.10.4" +-rstest = "0.24.0" ++rstest = ">=0.24" + rust-ini = "0.21.0" + same-file = "1.0.6" + self_cell = "1.0.4" +@@ -514,7 +515,7 @@ + rstest = { workspace = true } + + [target.'cfg(any(target_os = "linux", target_os = "android"))'.dev-dependencies] +-procfs = { version = "0.17", default-features = false } ++procfs = { version = ">=0.16, <0.18", default-features = false } + + [target.'cfg(unix)'.dev-dependencies] + nix = { workspace = true, features = ["process", "signal", "user", "term"] } +@@ -537,11 +538,6 @@ + name = "coreutils" + path = "src/bin/coreutils.rs" +- +-[[bin]] +-name = "uudoc" +-path = "src/bin/uudoc.rs" +-required-features = ["uudoc"] + + # The default release profile. It contains all optimizations, without + # sacrificing debug info. With this profile (like in the standard + # release profile), the debug info and the stack traces will still be available. diff --git a/anda/system/uutils-coreutils/coreutils-fix-seq-neg-num-tests.diff b/anda/system/uutils-coreutils/coreutils-fix-seq-neg-num-tests.diff new file mode 100644 index 0000000000..dbb164e778 --- /dev/null +++ b/anda/system/uutils-coreutils/coreutils-fix-seq-neg-num-tests.diff @@ -0,0 +1,134 @@ +--- a/tests/by-util/test_seq.rs ++++ b/tests/by-util/test_seq.rs +@@ -381,80 +381,80 @@ + #[test] + fn test_width_negative_zero_scientific_notation() { + new_ucmd!() +- .args(&["-w", "-0e0", "1"]) ++ .args(&["-w", "--", "-0e0", "1"]) + .succeeds() + .stdout_only("-0\n01\n"); + new_ucmd!() +- .args(&["-w", "-0e0", "1", "2"]) ++ .args(&["-w", "--", "-0e0", "1", "2"]) + .succeeds() + .stdout_only("-0\n01\n02\n"); + new_ucmd!() +- .args(&["-w", "-0e0", "1", "2.0"]) ++ .args(&["-w", "--", "-0e0", "1", "2.0"]) + .succeeds() + .stdout_only("-0\n01\n02\n"); + + new_ucmd!() +- .args(&["-w", "-0e+1", "1"]) ++ .args(&["-w", "--", "-0e+1", "1"]) + .succeeds() + .stdout_only("-00\n001\n"); + new_ucmd!() +- .args(&["-w", "-0e+1", "1", "2"]) ++ .args(&["-w", "--", "-0e+1", "1", "2"]) + .succeeds() + .stdout_only("-00\n001\n002\n"); + new_ucmd!() +- .args(&["-w", "-0e+1", "1", "2.0"]) ++ .args(&["-w", "--", "-0e+1", "1", "2.0"]) + .succeeds() + .stdout_only("-00\n001\n002\n"); + + new_ucmd!() +- .args(&["-w", "-0.000e0", "1"]) ++ .args(&["-w", "--", "-0.000e0", "1"]) + .succeeds() + .stdout_only("-0.000\n01.000\n"); + new_ucmd!() +- .args(&["-w", "-0.000e0", "1", "2"]) ++ .args(&["-w", "--", "-0.000e0", "1", "2"]) + .succeeds() + .stdout_only("-0.000\n01.000\n02.000\n"); + new_ucmd!() +- .args(&["-w", "-0.000e0", "1", "2.0"]) ++ .args(&["-w", "--", "-0.000e0", "1", "2.0"]) + .succeeds() + .stdout_only("-0.000\n01.000\n02.000\n"); + + new_ucmd!() +- .args(&["-w", "-0.000e-2", "1"]) ++ .args(&["-w", "--", "-0.000e-2", "1"]) + .succeeds() + .stdout_only("-0.00000\n01.00000\n"); + new_ucmd!() +- .args(&["-w", "-0.000e-2", "1", "2"]) ++ .args(&["-w", "--", "-0.000e-2", "1", "2"]) + .succeeds() + .stdout_only("-0.00000\n01.00000\n02.00000\n"); + new_ucmd!() +- .args(&["-w", "-0.000e-2", "1", "2.0"]) ++ .args(&["-w", "--", "-0.000e-2", "1", "2.0"]) + .succeeds() + .stdout_only("-0.00000\n01.00000\n02.00000\n"); + + new_ucmd!() +- .args(&["-w", "-0.000e5", "1"]) ++ .args(&["-w", "--", "-0.000e5", "1"]) + .succeeds() + .stdout_only("-000000\n0000001\n"); + new_ucmd!() +- .args(&["-w", "-0.000e5", "1", "2"]) ++ .args(&["-w", "--", "-0.000e5", "1", "2"]) + .succeeds() + .stdout_only("-000000\n0000001\n0000002\n"); + new_ucmd!() +- .args(&["-w", "-0.000e5", "1", "2.0"]) ++ .args(&["-w", "--", "-0.000e5", "1", "2.0"]) + .succeeds() + .stdout_only("-000000\n0000001\n0000002\n"); + + new_ucmd!() +- .args(&["-w", "-0.000e5", "1"]) ++ .args(&["-w", "--", "-0.000e5", "1"]) + .succeeds() + .stdout_only("-000000\n0000001\n"); + new_ucmd!() +- .args(&["-w", "-0.000e5", "1", "2"]) ++ .args(&["-w", "--", "-0.000e5", "1", "2"]) + .succeeds() + .stdout_only("-000000\n0000001\n0000002\n"); + new_ucmd!() +- .args(&["-w", "-0.000e5", "1", "2.0"]) ++ .args(&["-w", "--", "-0.000e5", "1", "2.0"]) + .succeeds() + .stdout_only("-000000\n0000001\n0000002\n"); + } +@@ -493,7 +493,7 @@ + #[test] + fn test_width_negative_decimal_notation() { + new_ucmd!() +- .args(&["-w", "-.1", ".1", ".11"]) ++ .args(&["-w", "--", "-.1", ".1", ".11"]) + .succeeds() + .stdout_only("-0.1\n00.0\n00.1\n"); + } +@@ -501,19 +501,19 @@ + #[test] + fn test_width_negative_scientific_notation() { + new_ucmd!() +- .args(&["-w", "-1e-3", "1"]) ++ .args(&["-w", "--", "-1e-3", "1"]) + .succeeds() + .stdout_only("-0.001\n00.999\n"); + new_ucmd!() +- .args(&["-w", "-1.e-3", "1"]) ++ .args(&["-w", "--", "-1.e-3", "1"]) + .succeeds() + .stdout_only("-0.001\n00.999\n"); + new_ucmd!() +- .args(&["-w", "-1.0e-4", "1"]) ++ .args(&["-w", "--", "-1.0e-4", "1"]) + .succeeds() + .stdout_only("-0.00010\n00.99990\n"); + new_ucmd!() +- .args(&["-w", "-.1e2", "10", "100"]) ++ .args(&["-w", "--", "-.1e2", "10", "100"]) + .succeeds() + .stdout_only( + "-010 diff --git a/anda/system/uutils-coreutils/uutils-coreutils.spec b/anda/system/uutils-coreutils/uutils-coreutils.spec index fe6f7f9a78..c7648856a3 100644 --- a/anda/system/uutils-coreutils/uutils-coreutils.spec +++ b/anda/system/uutils-coreutils/uutils-coreutils.spec @@ -1,14 +1,19 @@ %global coreutils_ver 9.3 +### Temporary solution, will be fixed on newer Oniguruma releases. +%global build_cflags %{__build_flags_lang_c} %{?_distro_extra_cflags} -std=c18 -std=gnu18 Name: uutils-coreutils Version: 0.0.29 -Release: 1%?dist +Release: 2%?dist Summary: Cross-platform Rust rewrite of the GNU coreutils License: MIT URL: https://github.com/uutils/coreutils Source0: %url/archive/refs/tags/%version.tar.gz +Patch0: coreutils-fix-metadata.diff +Patch1: coreutils-fix-seq-neg-num-tests.diff Requires: glibc BuildRequires: cargo make gcc-c++ +BuildRequires: rustfmt Conflicts: uutils-coreutils-replace BuildRequires: libselinux-devel BuildRequires: selinux-policy-devel @@ -56,7 +61,7 @@ This package provides a single binary with all commands, and replaces the GNU co %prep -%autosetup -n coreutils-%version +%autosetup -n coreutils-%version -p1 %build export CARGOFLAGS="-vv --verbose"