From cc91c146d367fc5359319e59f1dfd6de93febd83 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Fri, 31 May 2024 16:56:57 -0500 Subject: [PATCH 01/16] Initial package (rhbz#2260598) Signed-off-by: Michel Lind --- .gitignore | 1 + coreutils-drop-conv.diff | 13 +++ coreutils-fix-finding-uu_factor.diff | 11 ++ coreutils-fix-metadata.diff | 45 ++++++++ coreutils-fix-seq-neg-num-tests.diff | 154 ++++++++++++++++++++++++++ rust-coreutils.spec | 156 +++++++++++++++++++++++++++ rust2rpm.toml | 34 ++++++ series | 3 + sources | 1 + 9 files changed, 418 insertions(+) create mode 100644 .gitignore create mode 100644 coreutils-drop-conv.diff create mode 100644 coreutils-fix-finding-uu_factor.diff create mode 100644 coreutils-fix-metadata.diff create mode 100644 coreutils-fix-seq-neg-num-tests.diff create mode 100644 rust-coreutils.spec create mode 100644 rust2rpm.toml create mode 100644 series create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e1678d0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/coreutils-0.0.23.crate diff --git a/coreutils-drop-conv.diff b/coreutils-drop-conv.diff new file mode 100644 index 0000000..d120f8e --- /dev/null +++ b/coreutils-drop-conv.diff @@ -0,0 +1,13 @@ +--- a/tests/by-util/test_factor.rs ++++ b/tests/by-util/test_factor.rs +@@ -146,9 +146,7 @@ fn test_cli_args() { + + #[test] + fn test_random() { +- use conv::prelude::ValueFrom; +- +- let log_num_primes = f64::value_from(NUM_PRIMES).unwrap().log2().ceil(); ++ let log_num_primes = (NUM_PRIMES as f64).log2().ceil(); + let primes = Sieve::primes().take(NUM_PRIMES).collect::>(); + + let rng_seed = SystemTime::now() diff --git a/coreutils-fix-finding-uu_factor.diff b/coreutils-fix-finding-uu_factor.diff new file mode 100644 index 0000000..4487ddc --- /dev/null +++ b/coreutils-fix-finding-uu_factor.diff @@ -0,0 +1,11 @@ +--- a/tests/by-util/test_factor.rs ++++ b/tests/by-util/test_factor.rs +@@ -10,7 +10,7 @@ use crate::common::util::TestScenario; + + use std::time::{Duration, SystemTime}; + +-#[path = "../../src/uu/factor/sieve.rs"] ++#[path = "/usr/share/cargo/registry/uu_factor-0.0.23/sieve.rs"] + mod sieve; + + use self::sieve::Sieve; diff --git a/coreutils-fix-metadata.diff b/coreutils-fix-metadata.diff new file mode 100644 index 0000000..b4ce6ee --- /dev/null +++ b/coreutils-fix-metadata.diff @@ -0,0 +1,45 @@ +--- coreutils-0.0.23/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ coreutils-0.0.23/Cargo.toml 2024-02-27T21:32:15.020011+00:00 +@@ -30,6 +30,7 @@ + categories = ["command-line-utilities"] + license = "MIT" + repository = "https://github.com/uutils/coreutils" ++autobins = false + + [profile.release] + lto = true +@@ -47,11 +48,6 @@ + [[bin]] + name = "coreutils" + path = "src/bin/coreutils.rs" +- +-[[bin]] +-name = "uudoc" +-path = "src/bin/uudoc.rs" +-required-features = ["uudoc"] + + [dependencies.arch] + version = "0.0.23" +@@ -613,9 +609,6 @@ + ] + default-features = false + +-[dev-dependencies.conv] +-version = "0.3" +- + [dev-dependencies.filetime] + version = "0.2" + +@@ -671,7 +664,11 @@ + version = "0.11.2" + + [features] +-default = ["feat_common_core"] ++default = [ ++ "feat_common_core", ++ # "feat_selinux", ++ # "unix", ++] + feat_Tier1 = [ + "feat_common_core", + "arch", diff --git a/coreutils-fix-seq-neg-num-tests.diff b/coreutils-fix-seq-neg-num-tests.diff new file mode 100644 index 0000000..fd5da6e --- /dev/null +++ b/coreutils-fix-seq-neg-num-tests.diff @@ -0,0 +1,154 @@ +--- a/tests/by-util/test_seq.rs ++++ b/tests/by-util/test_seq.rs +@@ -391,97 +391,97 @@ fn test_width_negative_zero_decimal_nota + #[test] + fn test_width_negative_zero_scientific_notation() { + new_ucmd!() +- .args(&["-w", "-0e0", "1"]) ++ .args(&["-w", "--", "-0e0", "1"]) + .succeeds() + .stdout_is("-0\n01\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-0e0", "1", "2"]) ++ .args(&["-w", "--", "-0e0", "1", "2"]) + .succeeds() + .stdout_is("-0\n01\n02\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-0e0", "1", "2.0"]) ++ .args(&["-w", "--", "-0e0", "1", "2.0"]) + .succeeds() + .stdout_is("-0\n01\n02\n") + .no_stderr(); + + new_ucmd!() +- .args(&["-w", "-0e+1", "1"]) ++ .args(&["-w", "--", "-0e+1", "1"]) + .succeeds() + .stdout_is("-00\n001\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-0e+1", "1", "2"]) ++ .args(&["-w", "--", "-0e+1", "1", "2"]) + .succeeds() + .stdout_is("-00\n001\n002\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-0e+1", "1", "2.0"]) ++ .args(&["-w", "--", "-0e+1", "1", "2.0"]) + .succeeds() + .stdout_is("-00\n001\n002\n") + .no_stderr(); + + new_ucmd!() +- .args(&["-w", "-0.000e0", "1"]) ++ .args(&["-w", "--", "-0.000e0", "1"]) + .succeeds() + .stdout_is("-0.000\n01.000\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-0.000e0", "1", "2"]) ++ .args(&["-w", "--", "-0.000e0", "1", "2"]) + .succeeds() + .stdout_is("-0.000\n01.000\n02.000\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-0.000e0", "1", "2.0"]) ++ .args(&["-w", "--", "-0.000e0", "1", "2.0"]) + .succeeds() + .stdout_is("-0.000\n01.000\n02.000\n") + .no_stderr(); + + new_ucmd!() +- .args(&["-w", "-0.000e-2", "1"]) ++ .args(&["-w", "--", "-0.000e-2", "1"]) + .succeeds() + .stdout_is("-0.00000\n01.00000\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-0.000e-2", "1", "2"]) ++ .args(&["-w", "--", "-0.000e-2", "1", "2"]) + .succeeds() + .stdout_is("-0.00000\n01.00000\n02.00000\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-0.000e-2", "1", "2.0"]) ++ .args(&["-w", "--", "-0.000e-2", "1", "2.0"]) + .succeeds() + .stdout_is("-0.00000\n01.00000\n02.00000\n") + .no_stderr(); + + new_ucmd!() +- .args(&["-w", "-0.000e5", "1"]) ++ .args(&["-w", "--", "-0.000e5", "1"]) + .succeeds() + .stdout_is("-000000\n0000001\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-0.000e5", "1", "2"]) ++ .args(&["-w", "--", "-0.000e5", "1", "2"]) + .succeeds() + .stdout_is("-000000\n0000001\n0000002\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-0.000e5", "1", "2.0"]) ++ .args(&["-w", "--", "-0.000e5", "1", "2.0"]) + .succeeds() + .stdout_is("-000000\n0000001\n0000002\n") + .no_stderr(); + + new_ucmd!() +- .args(&["-w", "-0.000e5", "1"]) ++ .args(&["-w", "--", "-0.000e5", "1"]) + .succeeds() + .stdout_is("-000000\n0000001\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-0.000e5", "1", "2"]) ++ .args(&["-w", "--", "-0.000e5", "1", "2"]) + .succeeds() + .stdout_is("-000000\n0000001\n0000002\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-0.000e5", "1", "2.0"]) ++ .args(&["-w", "--", "-0.000e5", "1", "2.0"]) + .succeeds() + .stdout_is("-000000\n0000001\n0000002\n") + .no_stderr(); +@@ -525,7 +525,7 @@ fn test_width_decimal_scientific_notatio + #[test] + fn test_width_negative_decimal_notation() { + new_ucmd!() +- .args(&["-w", "-.1", ".1", ".11"]) ++ .args(&["-w", "--", "-.1", ".1", ".11"]) + .succeeds() + .stdout_is("-0.1\n00.0\n00.1\n") + .no_stderr(); +@@ -534,22 +534,22 @@ fn test_width_negative_decimal_notation( + #[test] + fn test_width_negative_scientific_notation() { + new_ucmd!() +- .args(&["-w", "-1e-3", "1"]) ++ .args(&["-w", "--", "-1e-3", "1"]) + .succeeds() + .stdout_is("-0.001\n00.999\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-1.e-3", "1"]) ++ .args(&["-w", "--", "-1.e-3", "1"]) + .succeeds() + .stdout_is("-0.001\n00.999\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-1.0e-4", "1"]) ++ .args(&["-w", "--", "-1.0e-4", "1"]) + .succeeds() + .stdout_is("-0.00010\n00.99990\n") + .no_stderr(); + new_ucmd!() +- .args(&["-w", "-.1e2", "10", "100"]) ++ .args(&["-w", "--", "-.1e2", "10", "100"]) + .succeeds() + .stdout_is( + "-010 diff --git a/rust-coreutils.spec b/rust-coreutils.spec new file mode 100644 index 0000000..102796a --- /dev/null +++ b/rust-coreutils.spec @@ -0,0 +1,156 @@ +# Generated by rust2rpm 25 +%bcond_without check + +# cargo run manpage requires a lot of the optional crates +# we don't have yet +%bcond_with man + +%global crate coreutils + +Name: rust-coreutils +Version: 0.0.23 +Release: %autorelease +Summary: coreutils ~ GNU coreutils reimplementation in Rust + +License: MIT +URL: https://crates.io/crates/coreutils +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * don't use conv, unmaintained +# * drop uudoc, unneeded +# * TODO: enable feat_selinux +# * TODO: enable unix +Patch: coreutils-fix-metadata.diff +# Fix finding uu_factor, need to look in registry rather than relative path +Patch: coreutils-fix-finding-uu_factor.diff +# Fix test that uses conv +Patch: coreutils-drop-conv.diff +# Fix seq tests that pass negative numbers +Patch: coreutils-fix-seq-neg-num-tests.diff + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +coreutils ~ GNU coreutils (updated); implemented as universal (cross- +platform) utils, written in Rust.} + +%description %{_description} + +%package -n uutils-%{crate} +Summary: %{summary} +# (MIT OR Apache-2.0) AND Unicode-DFS-2016 +# Apache-2.0 +# Apache-2.0 OR MIT +# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT +# BSD-2-Clause +# CC0-1.0 +# ISC +# MIT +# MIT OR Apache-2.0 +# MIT-0 OR Apache-2.0 +# Unlicense OR MIT +License: MIT AND (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND CC0-1.0 AND ISC AND (MIT-0 OR Apache-2.0) AND (Unlicense OR MIT) +# LICENSE.dependencies contains a full license breakdown + +%description -n uutils-%{crate} %{_description} + +%files -n uutils-%{crate} +%license LICENSE +%license LICENSE.dependencies +%doc CODE_OF_CONDUCT.md +%doc CONTRIBUTING.md +%doc DEVELOPMENT.md +%doc README.md +%{_bindir}/uutils-%{crate} +%if %{with man} +%{_mandir}/man1/uu_* +%endif + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build +%{cargo_license_summary} +%{cargo_license} > LICENSE.dependencies + +%if %{with man} +mkdir -p data/man/man1 + +for utility in \ + base32 \ + base64 \ + basename \ + basenc \ + cat \ + cksum \ + comm \ + cp \ + csplit \ + cut \ + date \ + df \ + dir \ + dircolors \ + dirname \ + dd \ + du \ + echo \ + env \ + expand \ + expr \ + factor \ + false \ + fmt \ + fold \ + hashsum \ + head \ + join \ + link \ + ln \ + ls \ + mkdir \ + mktemp \ + more \ + mv \ + nl \ + numfmt \ + od \ + paste \ + pr \ + printenv \ + printf \ +; do + target/rpm/coreutils manpage $utility > data/man/man1/uu_${utility}.1 +done +%endif + +%install +%cargo_install +mv %{buildroot}%{_bindir}/%{crate} %{buildroot}%{_bindir}/uutils-%{crate} +%if %{with man} +mkdir -p %{buildroot}%{_mandir}/man1 +cp -p data/man/man1/uu_* %{buildroot}%{_mandir}/man1/ +%endif + +%if %{with check} +%check +# * --test-threads 1: tests fail with permission denied error if run with too many threads +# * test_df: needs an actual filesystem to test +# * test_du: expected sublink/symlink in output +# * test_ls: need block/char device +# * test_od: endianness issue on s390x +# * test_seq: tolerances too tight +%ifarch s390x +%cargo_test -- -- --test-threads 1 --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_tail::test_follow_when_files_are_pointing_to_same_relative_file_and_file_stays_same_size --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation --skip test_od::test_suppress_duplicates +%else +%cargo_test -- -- --test-threads 1 --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_tail::test_follow_when_files_are_pointing_to_same_relative_file_and_file_stays_same_size --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation +%endif +%endif + +%changelog +%autochangelog diff --git a/rust2rpm.toml b/rust2rpm.toml new file mode 100644 index 0000000..f37083d --- /dev/null +++ b/rust2rpm.toml @@ -0,0 +1,34 @@ +[package] +summary = "coreutils ~ GNU coreutils reimplementation in Rust" + +[tests] +comments = [ + "--test-threads 1: tests fail with permission denied error if run with too many threads", + "test_df: needs an actual filesystem to test", + "test_du: expected sublink/symlink in output", + "test_ls: need block/char device", + "test_seq: tolerances too tight", +] +skip = [ + "test_df::test_file_column_width_if_filename_contains_unicode_chars", + "test_df::test_nonexistent_file", + "test_df::test_output_file_specific_files", + "test_df::test_output_mp_repeat", + "test_df::test_output_option_without_equals_sign", + "test_df::test_total_label_in_correct_column", + "test_df::test_type_option_with_file", + "test_du::test_du_dereference_args", + "test_du::test_du_no_dereference", + "test_ls::test_device_number", + "test_seq::test_count_down_floats", + "test_seq::test_float_precision_increment", + "test_seq::test_inf_width", + "test_seq::test_neg_inf_width", + "test_seq::test_separator_and_terminator_floats", + "test_seq::test_width_decimal_scientific_notation_increment", + "test_seq::test_width_decimal_scientific_notation_trailing_zeros_end", + "test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment", + "test_seq::test_width_floats", + "test_seq::test_width_negative_zero_decimal_notation", + "test_seq::test_width_negative_zero_scientific_notation", +] diff --git a/series b/series new file mode 100644 index 0000000..3dfd16b --- /dev/null +++ b/series @@ -0,0 +1,3 @@ +coreutils-fix-finding-uu_factor.diff +coreutils-drop-conv.diff +coreutils-fix-seq-neg-num-tests.diff diff --git a/sources b/sources new file mode 100644 index 0000000..5d471e2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (coreutils-0.0.23.crate) = 216aa4acfe92867aea7bd9d11e8239c0adf1b7bc308c226d310f7f872c5353282837172e8096dda645905b084eadaae942f88084a7968ee989ec0fc47c8f7f1b From 308097479b7ac4f51ca9b436ffc809e37cee37d8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 21:31:39 +0000 Subject: [PATCH 02/16] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 32837b1c6f3750950aeb8c6602151ec582b95dff Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Fri, 2 Aug 2024 16:23:48 -0500 Subject: [PATCH 03/16] Update to version 0.0.27; Fixes: RHBZ#2293806 Signed-off-by: Michel Lind --- .gitignore | 1 + coreutils-fix-finding-uu_factor.diff | 11 -- coreutils-fix-metadata.diff | 34 ++-- coreutils-wrapper.sh | 23 +++ rust-coreutils.spec | 209 ++++++++++++++-------- rust2rpm.toml | 257 +++++++++++++++++++++++++++ series | 3 - sources | 2 +- 8 files changed, 426 insertions(+), 114 deletions(-) delete mode 100644 coreutils-fix-finding-uu_factor.diff create mode 100755 coreutils-wrapper.sh delete mode 100644 series diff --git a/.gitignore b/.gitignore index e1678d0..b92bf27 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /coreutils-0.0.23.crate +/coreutils-0.0.27.crate diff --git a/coreutils-fix-finding-uu_factor.diff b/coreutils-fix-finding-uu_factor.diff deleted file mode 100644 index 4487ddc..0000000 --- a/coreutils-fix-finding-uu_factor.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- a/tests/by-util/test_factor.rs -+++ b/tests/by-util/test_factor.rs -@@ -10,7 +10,7 @@ use crate::common::util::TestScenario; - - use std::time::{Duration, SystemTime}; - --#[path = "../../src/uu/factor/sieve.rs"] -+#[path = "/usr/share/cargo/registry/uu_factor-0.0.23/sieve.rs"] - mod sieve; - - use self::sieve::Sieve; diff --git a/coreutils-fix-metadata.diff b/coreutils-fix-metadata.diff index b4ce6ee..d71392f 100644 --- a/coreutils-fix-metadata.diff +++ b/coreutils-fix-metadata.diff @@ -1,5 +1,5 @@ ---- coreutils-0.0.23/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ coreutils-0.0.23/Cargo.toml 2024-02-27T21:32:15.020011+00:00 +--- coreutils-0.0.27/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ coreutils-0.0.27/Cargo.toml 2024-08-02T15:05:29.625779+00:00 @@ -30,6 +30,7 @@ categories = ["command-line-utilities"] license = "MIT" @@ -19,27 +19,13 @@ -required-features = ["uudoc"] [dependencies.arch] - version = "0.0.23" -@@ -613,9 +609,6 @@ - ] - default-features = false + version = "0.0.27" +@@ -639,7 +635,7 @@ + version = "1.10.4" --[dev-dependencies.conv] --version = "0.3" -- - [dev-dependencies.filetime] - version = "0.2" + [dev-dependencies.rstest] +-version = "0.21.0" ++version = "0.18.0" -@@ -671,7 +664,11 @@ - version = "0.11.2" - - [features] --default = ["feat_common_core"] -+default = [ -+ "feat_common_core", -+ # "feat_selinux", -+ # "unix", -+] - feat_Tier1 = [ - "feat_common_core", - "arch", + [dev-dependencies.sha1] + version = "0.10.6" diff --git a/coreutils-wrapper.sh b/coreutils-wrapper.sh new file mode 100755 index 0000000..88ee673 --- /dev/null +++ b/coreutils-wrapper.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# Wrapper to invoke coreutils multicall via individual libexec symlink +# +# To use: +# - symlink this to /usr/bin/uu_$utility +# - it will invoke /usr/libexec/uutils-coreutils/$utility +# - that is in turn a symlink to /usr/bin/uutils-coreutils, which is a +# multicall binary that behaves like $utility when that is argv[0] + +CALLED_AS=$(basename "$0") + +UTILITY=${CALLED_AS#uu_} + +CMD="/usr/libexec/uutils-coreutils/$UTILITY" + +if [ -L "$CMD" ]; then + # we want the argv to be passed as-is here + # shellcheck disable=SC2068 + "$CMD" $@ +else + echo "Error: $CMD not found" >&2 + exit 1 +fi diff --git a/rust-coreutils.spec b/rust-coreutils.spec index 102796a..40b4938 100644 --- a/rust-coreutils.spec +++ b/rust-coreutils.spec @@ -1,74 +1,153 @@ -# Generated by rust2rpm 25 +# Generated by rust2rpm 26 %bcond_without check -# cargo run manpage requires a lot of the optional crates -# we don't have yet -%bcond_with man - %global crate coreutils Name: rust-coreutils -Version: 0.0.23 +Version: 0.0.27 Release: %autorelease Summary: coreutils ~ GNU coreutils reimplementation in Rust License: MIT URL: https://crates.io/crates/coreutils Source: %{crates_source} +# * Wrapper to invoke coreutils multicall via individual libexec symlink +Source: coreutils-wrapper.sh # Manually created patch for downstream crate metadata changes -# * don't use conv, unmaintained # * drop uudoc, unneeded +# * temporarily lower rstest from 0.21.0 to 0.18.0 # * TODO: enable feat_selinux # * TODO: enable unix Patch: coreutils-fix-metadata.diff -# Fix finding uu_factor, need to look in registry rather than relative path -Patch: coreutils-fix-finding-uu_factor.diff -# Fix test that uses conv -Patch: coreutils-drop-conv.diff -# Fix seq tests that pass negative numbers +# * Fix seq tests that pass negative numbers Patch: coreutils-fix-seq-neg-num-tests.diff +# leaf package, SIGABRT on compile +ExcludeArch: %{ix86} + BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: -coreutils ~ GNU coreutils (updated); implemented as universal (cross- -platform) utils, written in Rust.} +coreutils ~ GNU coreutils (updated); implemented as universal (cross-platform) utils, written in Rust.} %description %{_description} -%package -n uutils-%{crate} +%package -n uutils-coreutils Summary: %{summary} # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # Apache-2.0 # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # BSD-2-Clause +# BSD-2-Clause OR Apache-2.0 OR MIT # CC0-1.0 # ISC # MIT # MIT OR Apache-2.0 # MIT-0 OR Apache-2.0 # Unlicense OR MIT -License: MIT AND (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND CC0-1.0 AND ISC AND (MIT-0 OR Apache-2.0) AND (Unlicense OR MIT) +License: MIT AND (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND CC0-1.0 AND ISC AND (MIT-0 OR Apache-2.0) AND (Unlicense OR MIT) # LICENSE.dependencies contains a full license breakdown -%description -n uutils-%{crate} %{_description} +%if (0%{?fedora} && 0%{?fedora} < 43) || (0%{?rhel} && 0%{?rhel} < 11) +# Fedora up to 40 and EPEL up to 9 has individual uu_* packages +# support upgrading Fedora from 40->42 and EL 9->10 +%global obsolete_uu_nvr 0.0.23-5 +Obsoletes: uu_base32 < %{obsolete_uu_nvr} +Obsoletes: uu_base64 < %{obsolete_uu_nvr} +Obsoletes: uu_basename < %{obsolete_uu_nvr} +Obsoletes: uu_basenc < %{obsolete_uu_nvr} +Obsoletes: uu_cat < %{obsolete_uu_nvr} +Obsoletes: uu_cksum < %{obsolete_uu_nvr} +Obsoletes: uu_comm < %{obsolete_uu_nvr} +Obsoletes: uu_cp < %{obsolete_uu_nvr} +Obsoletes: uu_csplit < %{obsolete_uu_nvr} +Obsoletes: uu_cut < %{obsolete_uu_nvr} +Obsoletes: uu_date < %{obsolete_uu_nvr} +Obsoletes: uu_dd < %{obsolete_uu_nvr} +Obsoletes: uu_df < %{obsolete_uu_nvr} +Obsoletes: uu_dir < %{obsolete_uu_nvr} +Obsoletes: uu_dircolors < %{obsolete_uu_nvr} +Obsoletes: uu_dirname < %{obsolete_uu_nvr} +Obsoletes: uu_du < %{obsolete_uu_nvr} +Obsoletes: uu_echo < %{obsolete_uu_nvr} +Obsoletes: uu_env < %{obsolete_uu_nvr} +Obsoletes: uu_expand < %{obsolete_uu_nvr} +Obsoletes: uu_expr < %{obsolete_uu_nvr} +Obsoletes: uu_factor < %{obsolete_uu_nvr} +Obsoletes: uu_false < %{obsolete_uu_nvr} +Obsoletes: uu_fmt < %{obsolete_uu_nvr} +Obsoletes: uu_fold < %{obsolete_uu_nvr} +Obsoletes: uu_hashsum < %{obsolete_uu_nvr} +Obsoletes: uu_head < %{obsolete_uu_nvr} +Obsoletes: uu_join < %{obsolete_uu_nvr} +Obsoletes: uu_link < %{obsolete_uu_nvr} +Obsoletes: uu_ln < %{obsolete_uu_nvr} +Obsoletes: uu_ls < %{obsolete_uu_nvr} +Obsoletes: uu_mkdir < %{obsolete_uu_nvr} +Obsoletes: uu_mktemp < %{obsolete_uu_nvr} +Obsoletes: uu_more < %{obsolete_uu_nvr} +Obsoletes: uu_mv < %{obsolete_uu_nvr} +Obsoletes: uu_nl < %{obsolete_uu_nvr} +Obsoletes: uu_numfmt < %{obsolete_uu_nvr} +Obsoletes: uu_od < %{obsolete_uu_nvr} +Obsoletes: uu_paste < %{obsolete_uu_nvr} +Obsoletes: uu_pr < %{obsolete_uu_nvr} +Obsoletes: uu_printenv < %{obsolete_uu_nvr} +Obsoletes: uu_printf < %{obsolete_uu_nvr} +Obsoletes: uu_ptx < %{obsolete_uu_nvr} +Obsoletes: uu_pwd < %{obsolete_uu_nvr} +Obsoletes: uu_readlink < %{obsolete_uu_nvr} +Obsoletes: uu_realpath < %{obsolete_uu_nvr} +Obsoletes: uu_rm < %{obsolete_uu_nvr} +Obsoletes: uu_rmdir < %{obsolete_uu_nvr} +Obsoletes: uu_seq < %{obsolete_uu_nvr} +Obsoletes: uu_shred < %{obsolete_uu_nvr} +Obsoletes: uu_shuf < %{obsolete_uu_nvr} +Obsoletes: uu_sleep < %{obsolete_uu_nvr} +Obsoletes: uu_sort < %{obsolete_uu_nvr} +Obsoletes: uu_split < %{obsolete_uu_nvr} +Obsoletes: uu_sum < %{obsolete_uu_nvr} +Obsoletes: uu_tac < %{obsolete_uu_nvr} +Obsoletes: uu_tail < %{obsolete_uu_nvr} +Obsoletes: uu_tee < %{obsolete_uu_nvr} +Obsoletes: uu_test < %{obsolete_uu_nvr} +Obsoletes: uu_touch < %{obsolete_uu_nvr} +Obsoletes: uu_tr < %{obsolete_uu_nvr} +Obsoletes: uu_true < %{obsolete_uu_nvr} +Obsoletes: uu_truncate < %{obsolete_uu_nvr} +Obsoletes: uu_tsort < %{obsolete_uu_nvr} +Obsoletes: uu_unexpand < %{obsolete_uu_nvr} +Obsoletes: uu_uniq < %{obsolete_uu_nvr} +Obsoletes: uu_unlink < %{obsolete_uu_nvr} +Obsoletes: uu_vdir < %{obsolete_uu_nvr} +Obsoletes: uu_wc < %{obsolete_uu_nvr} +Obsoletes: uu_whoami < %{obsolete_uu_nvr} +Obsoletes: uu_yes < %{obsolete_uu_nvr} +%endif -%files -n uutils-%{crate} +%description -n uutils-coreutils %{_description} + +%files -n uutils-coreutils %license LICENSE %license LICENSE.dependencies %doc CODE_OF_CONDUCT.md %doc CONTRIBUTING.md %doc DEVELOPMENT.md %doc README.md -%{_bindir}/uutils-%{crate} -%if %{with man} +%{_bindir}/uutils-coreutils +%{_bindir}/uu_* +%{_libexecdir}/uutils-coreutils/* %{_mandir}/man1/uu_* -%endif +%{bash_completions_dir}/* +%{fish_completions_dir}/* +%{zsh_completions_dir}/* %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep +# coreutils-wrapper.sh script +cp -p %{SOURCE1} . %generate_buildrequires %cargo_generate_buildrequires @@ -77,79 +156,59 @@ License: MIT AND (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Apache-2.0 %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies - -%if %{with man} mkdir -p data/man/man1 +mkdir -p data/completions/{bash,fish,zsh} -for utility in \ - base32 \ - base64 \ - basename \ - basenc \ - cat \ - cksum \ - comm \ - cp \ - csplit \ - cut \ - date \ - df \ - dir \ - dircolors \ - dirname \ - dd \ - du \ - echo \ - env \ - expand \ - expr \ - factor \ - false \ - fmt \ - fold \ - hashsum \ - head \ - join \ - link \ - ln \ - ls \ - mkdir \ - mktemp \ - more \ - mv \ - nl \ - numfmt \ - od \ - paste \ - pr \ - printenv \ - printf \ -; do +for utility in b2sum b3sum base32 base64 basename basenc cat cksum comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr factor false fmt fold hashsum head join link ln ls md5sum mkdir mktemp more mv nl numfmt od paste pr printenv printf ptx pwd readlink realpath rm rmdir seq sha1sum sha224sum sha256sum sha3-224sum sha3-256sum sha3-384sum sha3-512sum sha384sum sha3sum sha512sum shake128sum shake256sum shred shuf sleep sort split sum tac tail tee test touch tr true truncate tsort unexpand uniq unlink vdir wc yes ; do target/rpm/coreutils manpage $utility > data/man/man1/uu_${utility}.1 + for s in bash zsh; do + target/rpm/coreutils completion $utility $s > data/completions/$s/uu_${utility} + done + target/rpm/coreutils completion $utility fish > data/completions/fish/uu_${utility}.fish done -%endif +target/rpm/coreutils manpage coreutils > data/man/man1/uutils-coreutils.1 +for s in bash zsh; do + target/rpm/coreutils completion coreutils $s > data/completions/$s/uutils-coreutils +done +target/rpm/coreutils completion coreutils fish > data/completions/fish/uutils-coreutils.fish + %install %cargo_install -mv %{buildroot}%{_bindir}/%{crate} %{buildroot}%{_bindir}/uutils-%{crate} -%if %{with man} +mv %{buildroot}/%{_bindir}/coreutils %{buildroot}/%{_bindir}/uutils-coreutils +mkdir -p %{buildroot}%{_libexecdir}/uutils-coreutils/misc +cp -p coreutils-wrapper.sh %{buildroot}%{_libexecdir}/uutils-coreutils/misc/ +for utility in b2sum b3sum base32 base64 basename basenc cat cksum comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr factor false fmt fold hashsum head join link ln ls md5sum mkdir mktemp more mv nl numfmt od paste pr printenv printf ptx pwd readlink realpath rm rmdir seq sha1sum sha224sum sha256sum sha3-224sum sha3-256sum sha3-384sum sha3-512sum sha384sum sha3sum sha512sum shake128sum shake256sum shred shuf sleep sort split sum tac tail tee test touch tr true truncate tsort unexpand uniq unlink vdir wc yes ; do + ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_libexecdir}/uutils-coreutils/$utility + ln -sr %{buildroot}%{_libexecdir}/uutils-coreutils/misc/coreutils-wrapper.sh %{buildroot}%{_bindir}/uu_$utility +done mkdir -p %{buildroot}%{_mandir}/man1 cp -p data/man/man1/uu_* %{buildroot}%{_mandir}/man1/ -%endif +mkdir -p %{buildroot}%{bash_completions_dir} +mkdir -p %{buildroot}%{fish_completions_dir} +mkdir -p %{buildroot}%{zsh_completions_dir} +cp -p data/completions/bash/* %{buildroot}%{bash_completions_dir}/ +cp -p data/completions/fish/* %{buildroot}%{fish_completions_dir}/ +cp -p data/completions/zsh/* %{buildroot}%{zsh_completions_dir}/ + %if %{with check} %check -# * --test-threads 1: tests fail with permission denied error if run with too many threads +# * --test-threads 1: tests fail with permission denied error if run with too +# many threads +# * test_cp: operation not supported # * test_df: needs an actual filesystem to test # * test_du: expected sublink/symlink in output # * test_ls: need block/char device -# * test_od: endianness issue on s390x # * test_seq: tolerances too tight %ifarch s390x -%cargo_test -- -- --test-threads 1 --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_tail::test_follow_when_files_are_pointing_to_same_relative_file_and_file_stays_same_size --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation --skip test_od::test_suppress_duplicates +# * test_od::test_suppress_duplicates: likely endianness issue +%cargo_test -- -- --skip test_cp::test_copy_dir_preserve_permissions --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence --skip test_cp::test_cp_parents_2_dirs --skip test_cp::test_cp_parents_with_permissions_copy_dir --skip test_cp::test_cp_parents_with_permissions_copy_file --skip test_cp::test_cp_preserve_xattr --skip test_cp::test_cp_sparse_always_empty --skip test_cp::test_cp_sparse_always_non_empty --skip test_cp::test_preserve_hardlink_attributes_in_directory --skip test_cp::test_preserve_mode --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_ls::test_ls_allocation_size --skip test_ls::test_ls_inode --skip test_ls::test_ls_long_format --skip test_ls::test_ls_long_formats --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation --skip test_od::test_suppress_duplicates %else -%cargo_test -- -- --test-threads 1 --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_tail::test_follow_when_files_are_pointing_to_same_relative_file_and_file_stays_same_size --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation +%cargo_test -- -- --skip test_cp::test_copy_dir_preserve_permissions --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence --skip test_cp::test_cp_parents_2_dirs --skip test_cp::test_cp_parents_with_permissions_copy_dir --skip test_cp::test_cp_parents_with_permissions_copy_file --skip test_cp::test_cp_preserve_xattr --skip test_cp::test_cp_sparse_always_empty --skip test_cp::test_cp_sparse_always_non_empty --skip test_cp::test_preserve_hardlink_attributes_in_directory --skip test_cp::test_preserve_mode --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_ls::test_ls_allocation_size --skip test_ls::test_ls_inode --skip test_ls::test_ls_long_format --skip test_ls::test_ls_long_formats --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation +# non-s390x %endif +# check %endif %changelog diff --git a/rust2rpm.toml b/rust2rpm.toml index f37083d..43ba7cd 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -1,15 +1,268 @@ [package] summary = "coreutils ~ GNU coreutils reimplementation in Rust" +description = "coreutils ~ GNU coreutils (updated); implemented as universal (cross-platform) utils, written in Rust." + +cargo-toml-patch-comments = [ + "drop uudoc, unneeded", + "temporarily lower rstest from 0.21.0 to 0.18.0", + "TODO: enable feat_selinux", + "TODO: enable unix", +] +extra-sources = [ + { "number" = 1, "file" = "coreutils-wrapper.sh", "comments" = ["Wrapper to invoke coreutils multicall via individual libexec symlink"] }, +] +extra-patches = [ + { "number" = 2, "file" = "coreutils-fix-seq-neg-num-tests.diff", "comments" = ["Fix seq tests that pass negative numbers"] }, +] + +bin-package-name = "uutils-coreutils" + +extra-files = [ + "%{_bindir}/uu_*", + "%{_libexecdir}/uutils-coreutils/*", + "%{_mandir}/man1/uu_*", + "%{bash_completions_dir}/*", + "%{fish_completions_dir}/*", + "%{zsh_completions_dir}/*", +] + +[package.bin-renames] +coreutils = "uutils-coreutils" + +[scripts] +prep.post = ["""\ +# coreutils-wrapper.sh script +cp -p %{SOURCE1} ."""] + +build.post = ["""\ +mkdir -p data/man/man1 +mkdir -p data/completions/{bash,fish,zsh} + +for utility in \ + b2sum \ + b3sum \ + base32 \ + base64 \ + basename \ + basenc \ + cat \ + cksum \ + comm \ + cp \ + csplit \ + cut \ + date \ + dd \ + df \ + dir \ + dircolors \ + dirname \ + du \ + echo \ + env \ + expand \ + expr \ + factor \ + false \ + fmt \ + fold \ + hashsum \ + head \ + join \ + link \ + ln \ + ls \ + md5sum \ + mkdir \ + mktemp \ + more \ + mv \ + nl \ + numfmt \ + od \ + paste \ + pr \ + printenv \ + printf \ + ptx \ + pwd \ + readlink \ + realpath \ + rm \ + rmdir \ + seq \ + sha1sum \ + sha224sum \ + sha256sum \ + sha3-224sum \ + sha3-256sum \ + sha3-384sum \ + sha3-512sum \ + sha384sum \ + sha3sum \ + sha512sum \ + shake128sum \ + shake256sum \ + shred \ + shuf \ + sleep \ + sort \ + split \ + sum \ + tac \ + tail \ + tee \ + test \ + touch \ + tr \ + true \ + truncate \ + tsort \ + unexpand \ + uniq \ + unlink \ + vdir \ + wc \ + yes \ +; do + target/rpm/coreutils manpage $utility > data/man/man1/uu_${utility}.1 + for s in bash zsh; do + target/rpm/coreutils completion $utility $s > data/completions/$s/uu_${utility} + done + target/rpm/coreutils completion $utility fish > data/completions/fish/uu_${utility}.fish +done +target/rpm/coreutils manpage coreutils > data/man/man1/uutils-coreutils.1 +for s in bash zsh; do + target/rpm/coreutils completion coreutils $s > data/completions/$s/uutils-coreutils +done +target/rpm/coreutils completion coreutils fish > data/completions/fish/uutils-coreutils.fish +"""] + +install.post = ["""\ +mkdir -p %{buildroot}%{_libexecdir}/uutils-coreutils/misc +cp -p coreutils-wrapper.sh %{buildroot}%{_libexecdir}/uutils-coreutils/misc/ +for utility in \ + b2sum \ + b3sum \ + base32 \ + base64 \ + basename \ + basenc \ + cat \ + cksum \ + comm \ + cp \ + csplit \ + cut \ + date \ + dd \ + df \ + dir \ + dircolors \ + dirname \ + du \ + echo \ + env \ + expand \ + expr \ + factor \ + false \ + fmt \ + fold \ + hashsum \ + head \ + join \ + link \ + ln \ + ls \ + md5sum \ + mkdir \ + mktemp \ + more \ + mv \ + nl \ + numfmt \ + od \ + paste \ + pr \ + printenv \ + printf \ + ptx \ + pwd \ + readlink \ + realpath \ + rm \ + rmdir \ + seq \ + sha1sum \ + sha224sum \ + sha256sum \ + sha3-224sum \ + sha3-256sum \ + sha3-384sum \ + sha3-512sum \ + sha384sum \ + sha3sum \ + sha512sum \ + shake128sum \ + shake256sum \ + shred \ + shuf \ + sleep \ + sort \ + split \ + sum \ + tac \ + tail \ + tee \ + test \ + touch \ + tr \ + true \ + truncate \ + tsort \ + unexpand \ + uniq \ + unlink \ + vdir \ + wc \ + yes \ +; do + ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_libexecdir}/uutils-coreutils/$utility + ln -sr %{buildroot}%{_libexecdir}/uutils-coreutils/misc/coreutils-wrapper.sh %{buildroot}%{_bindir}/uu_$utility +done +mkdir -p %{buildroot}%{_mandir}/man1 +cp -p data/man/man1/uu_* %{buildroot}%{_mandir}/man1/ +mkdir -p %{buildroot}%{bash_completions_dir} +mkdir -p %{buildroot}%{fish_completions_dir} +mkdir -p %{buildroot}%{zsh_completions_dir} +cp -p data/completions/bash/* %{buildroot}%{bash_completions_dir}/ +cp -p data/completions/fish/* %{buildroot}%{fish_completions_dir}/ +cp -p data/completions/zsh/* %{buildroot}%{zsh_completions_dir}/ +"""] [tests] comments = [ "--test-threads 1: tests fail with permission denied error if run with too many threads", + "test_cp: operation not supported", "test_df: needs an actual filesystem to test", "test_du: expected sublink/symlink in output", "test_ls: need block/char device", "test_seq: tolerances too tight", ] skip = [ + "test_cp::test_copy_dir_preserve_permissions", + "test_cp::test_copy_dir_preserve_permissions_inaccessible_file", + "test_cp::test_copy_through_dangling_symlink_no_dereference_permissions", + "test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence", + "test_cp::test_cp_parents_2_dirs", + "test_cp::test_cp_parents_with_permissions_copy_dir", + "test_cp::test_cp_parents_with_permissions_copy_file", + "test_cp::test_cp_preserve_xattr", + "test_cp::test_cp_sparse_always_empty", + "test_cp::test_cp_sparse_always_non_empty", + "test_cp::test_preserve_hardlink_attributes_in_directory", + "test_cp::test_preserve_mode", "test_df::test_file_column_width_if_filename_contains_unicode_chars", "test_df::test_nonexistent_file", "test_df::test_output_file_specific_files", @@ -20,6 +273,10 @@ skip = [ "test_du::test_du_dereference_args", "test_du::test_du_no_dereference", "test_ls::test_device_number", + "test_ls::test_ls_allocation_size", + "test_ls::test_ls_inode", + "test_ls::test_ls_long_format", + "test_ls::test_ls_long_formats", "test_seq::test_count_down_floats", "test_seq::test_float_precision_increment", "test_seq::test_inf_width", diff --git a/series b/series deleted file mode 100644 index 3dfd16b..0000000 --- a/series +++ /dev/null @@ -1,3 +0,0 @@ -coreutils-fix-finding-uu_factor.diff -coreutils-drop-conv.diff -coreutils-fix-seq-neg-num-tests.diff diff --git a/sources b/sources index 5d471e2..d78e969 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (coreutils-0.0.23.crate) = 216aa4acfe92867aea7bd9d11e8239c0adf1b7bc308c226d310f7f872c5353282837172e8096dda645905b084eadaae942f88084a7968ee989ec0fc47c8f7f1b +SHA512 (coreutils-0.0.27.crate) = ade9d7e0a79896eb6f79d9534ff4a4c28e77d9fb2d094439d1106e4666d4de6905ba044f5319879097cf228018e04ee53bee0cc222301bee90e9924c908a8879 From 7ca26bcc716163b1f9feb7f963c65a2dc28e64fd Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Sat, 3 Aug 2024 21:08:00 -0500 Subject: [PATCH 04/16] Use script to generate list of coreutils commands - On EPEL 9, reduce the list of obsoletes to packages actually built Signed-off-by: Michel Lind --- coreutils-ls-commands.sh | 7 ++ rust-coreutils.spec | 26 ++++-- rust2rpm.toml | 183 ++------------------------------------- 3 files changed, 35 insertions(+), 181 deletions(-) create mode 100755 coreutils-ls-commands.sh diff --git a/coreutils-ls-commands.sh b/coreutils-ls-commands.sh new file mode 100755 index 0000000..80bc1cc --- /dev/null +++ b/coreutils-ls-commands.sh @@ -0,0 +1,7 @@ +#!/bin/sh +if [ $# -ge 1 ]; then + BIN=$1 +else + BIN=uutils-coreutils +fi +$BIN --help | grep , | paste -s | tr -d '[:space:]' | tr ',' ' ' diff --git a/rust-coreutils.spec b/rust-coreutils.spec index 40b4938..780a6a6 100644 --- a/rust-coreutils.spec +++ b/rust-coreutils.spec @@ -13,6 +13,8 @@ URL: https://crates.io/crates/coreutils Source: %{crates_source} # * Wrapper to invoke coreutils multicall via individual libexec symlink Source: coreutils-wrapper.sh +# * Script to list available coreutils commands +Source: coreutils-ls-commands.sh # Manually created patch for downstream crate metadata changes # * drop uudoc, unneeded # * temporarily lower rstest from 0.21.0 to 0.18.0 @@ -49,10 +51,22 @@ Summary: %{summary} License: MIT AND (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND CC0-1.0 AND ISC AND (MIT-0 OR Apache-2.0) AND (Unlicense OR MIT) # LICENSE.dependencies contains a full license breakdown -%if (0%{?fedora} && 0%{?fedora} < 43) || (0%{?rhel} && 0%{?rhel} < 11) # Fedora up to 40 and EPEL up to 9 has individual uu_* packages # support upgrading Fedora from 40->42 and EL 9->10 + +%if 0%{?rhel} && 0%{?rhel} < 11 +%global obsolete_uu_nvr 0.0.23-2 + +Obsoletes: uu_cp < %{obsolete_uu_nvr} +Obsoletes: uu_mkdir < %{obsolete_uu_nvr} +Obsoletes: uu_mktemp < %{obsolete_uu_nvr} +Obsoletes: uu_mv < %{obsolete_uu_nvr} +Obsoletes: uu_whoami < %{obsolete_uu_nvr} +%endif + +%if 0%{?fedora} && 0%{?fedora} < 43 %global obsolete_uu_nvr 0.0.23-5 + Obsoletes: uu_base32 < %{obsolete_uu_nvr} Obsoletes: uu_base64 < %{obsolete_uu_nvr} Obsoletes: uu_basename < %{obsolete_uu_nvr} @@ -138,7 +152,7 @@ Obsoletes: uu_yes < %{obsolete_uu_nvr} %{_bindir}/uutils-coreutils %{_bindir}/uu_* %{_libexecdir}/uutils-coreutils/* -%{_mandir}/man1/uu_* +%{_mandir}/man1/* %{bash_completions_dir}/* %{fish_completions_dir}/* %{zsh_completions_dir}/* @@ -148,6 +162,8 @@ Obsoletes: uu_yes < %{obsolete_uu_nvr} %cargo_prep # coreutils-wrapper.sh script cp -p %{SOURCE1} . +# coreutils-ls-commands.sh script +cp -p %{SOURCE2} . %generate_buildrequires %cargo_generate_buildrequires @@ -159,7 +175,7 @@ cp -p %{SOURCE1} . mkdir -p data/man/man1 mkdir -p data/completions/{bash,fish,zsh} -for utility in b2sum b3sum base32 base64 basename basenc cat cksum comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr factor false fmt fold hashsum head join link ln ls md5sum mkdir mktemp more mv nl numfmt od paste pr printenv printf ptx pwd readlink realpath rm rmdir seq sha1sum sha224sum sha256sum sha3-224sum sha3-256sum sha3-384sum sha3-512sum sha384sum sha3sum sha512sum shake128sum shake256sum shred shuf sleep sort split sum tac tail tee test touch tr true truncate tsort unexpand uniq unlink vdir wc yes ; do +for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); do target/rpm/coreutils manpage $utility > data/man/man1/uu_${utility}.1 for s in bash zsh; do target/rpm/coreutils completion $utility $s > data/completions/$s/uu_${utility} @@ -178,12 +194,12 @@ target/rpm/coreutils completion coreutils fish > data/completions/fish/uutils-co mv %{buildroot}/%{_bindir}/coreutils %{buildroot}/%{_bindir}/uutils-coreutils mkdir -p %{buildroot}%{_libexecdir}/uutils-coreutils/misc cp -p coreutils-wrapper.sh %{buildroot}%{_libexecdir}/uutils-coreutils/misc/ -for utility in b2sum b3sum base32 base64 basename basenc cat cksum comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr factor false fmt fold hashsum head join link ln ls md5sum mkdir mktemp more mv nl numfmt od paste pr printenv printf ptx pwd readlink realpath rm rmdir seq sha1sum sha224sum sha256sum sha3-224sum sha3-256sum sha3-384sum sha3-512sum sha384sum sha3sum sha512sum shake128sum shake256sum shred shuf sleep sort split sum tac tail tee test touch tr true truncate tsort unexpand uniq unlink vdir wc yes ; do +for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); do ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_libexecdir}/uutils-coreutils/$utility ln -sr %{buildroot}%{_libexecdir}/uutils-coreutils/misc/coreutils-wrapper.sh %{buildroot}%{_bindir}/uu_$utility done mkdir -p %{buildroot}%{_mandir}/man1 -cp -p data/man/man1/uu_* %{buildroot}%{_mandir}/man1/ +cp -p data/man/man1/* %{buildroot}%{_mandir}/man1/ mkdir -p %{buildroot}%{bash_completions_dir} mkdir -p %{buildroot}%{fish_completions_dir} mkdir -p %{buildroot}%{zsh_completions_dir} diff --git a/rust2rpm.toml b/rust2rpm.toml index 43ba7cd..cf6f080 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -10,6 +10,7 @@ cargo-toml-patch-comments = [ ] extra-sources = [ { "number" = 1, "file" = "coreutils-wrapper.sh", "comments" = ["Wrapper to invoke coreutils multicall via individual libexec symlink"] }, + { "number" = 2, "file" = "coreutils-ls-commands.sh", "comments" = ["Script to list available coreutils commands"] }, ] extra-patches = [ { "number" = 2, "file" = "coreutils-fix-seq-neg-num-tests.diff", "comments" = ["Fix seq tests that pass negative numbers"] }, @@ -32,99 +33,15 @@ coreutils = "uutils-coreutils" [scripts] prep.post = ["""\ # coreutils-wrapper.sh script -cp -p %{SOURCE1} ."""] +cp -p %{SOURCE1} . +# coreutils-ls-commands.sh script +cp -p %{SOURCE2} ."""] build.post = ["""\ mkdir -p data/man/man1 mkdir -p data/completions/{bash,fish,zsh} -for utility in \ - b2sum \ - b3sum \ - base32 \ - base64 \ - basename \ - basenc \ - cat \ - cksum \ - comm \ - cp \ - csplit \ - cut \ - date \ - dd \ - df \ - dir \ - dircolors \ - dirname \ - du \ - echo \ - env \ - expand \ - expr \ - factor \ - false \ - fmt \ - fold \ - hashsum \ - head \ - join \ - link \ - ln \ - ls \ - md5sum \ - mkdir \ - mktemp \ - more \ - mv \ - nl \ - numfmt \ - od \ - paste \ - pr \ - printenv \ - printf \ - ptx \ - pwd \ - readlink \ - realpath \ - rm \ - rmdir \ - seq \ - sha1sum \ - sha224sum \ - sha256sum \ - sha3-224sum \ - sha3-256sum \ - sha3-384sum \ - sha3-512sum \ - sha384sum \ - sha3sum \ - sha512sum \ - shake128sum \ - shake256sum \ - shred \ - shuf \ - sleep \ - sort \ - split \ - sum \ - tac \ - tail \ - tee \ - test \ - touch \ - tr \ - true \ - truncate \ - tsort \ - unexpand \ - uniq \ - unlink \ - vdir \ - wc \ - yes \ -; do +for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); do target/rpm/coreutils manpage $utility > data/man/man1/uu_${utility}.1 for s in bash zsh; do target/rpm/coreutils completion $utility $s > data/completions/$s/uu_${utility} @@ -141,98 +58,12 @@ target/rpm/coreutils completion coreutils fish > data/completions/fish/uutils-co install.post = ["""\ mkdir -p %{buildroot}%{_libexecdir}/uutils-coreutils/misc cp -p coreutils-wrapper.sh %{buildroot}%{_libexecdir}/uutils-coreutils/misc/ -for utility in \ - b2sum \ - b3sum \ - base32 \ - base64 \ - basename \ - basenc \ - cat \ - cksum \ - comm \ - cp \ - csplit \ - cut \ - date \ - dd \ - df \ - dir \ - dircolors \ - dirname \ - du \ - echo \ - env \ - expand \ - expr \ - factor \ - false \ - fmt \ - fold \ - hashsum \ - head \ - join \ - link \ - ln \ - ls \ - md5sum \ - mkdir \ - mktemp \ - more \ - mv \ - nl \ - numfmt \ - od \ - paste \ - pr \ - printenv \ - printf \ - ptx \ - pwd \ - readlink \ - realpath \ - rm \ - rmdir \ - seq \ - sha1sum \ - sha224sum \ - sha256sum \ - sha3-224sum \ - sha3-256sum \ - sha3-384sum \ - sha3-512sum \ - sha384sum \ - sha3sum \ - sha512sum \ - shake128sum \ - shake256sum \ - shred \ - shuf \ - sleep \ - sort \ - split \ - sum \ - tac \ - tail \ - tee \ - test \ - touch \ - tr \ - true \ - truncate \ - tsort \ - unexpand \ - uniq \ - unlink \ - vdir \ - wc \ - yes \ -; do +for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); do ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_libexecdir}/uutils-coreutils/$utility ln -sr %{buildroot}%{_libexecdir}/uutils-coreutils/misc/coreutils-wrapper.sh %{buildroot}%{_bindir}/uu_$utility done mkdir -p %{buildroot}%{_mandir}/man1 -cp -p data/man/man1/uu_* %{buildroot}%{_mandir}/man1/ +cp -p data/man/man1/* %{buildroot}%{_mandir}/man1/ mkdir -p %{buildroot}%{bash_completions_dir} mkdir -p %{buildroot}%{fish_completions_dir} mkdir -p %{buildroot}%{zsh_completions_dir} From 92d7ee647e5de5235329926aa35010433d8d6754 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Thu, 29 Aug 2024 16:04:30 -0500 Subject: [PATCH 05/16] Enable feat_acl - Enable feat_selinux Signed-off-by: Michel Lind --- coreutils-fix-metadata.diff | 29 +++++++++++++++++++++-------- rust-coreutils.spec | 11 +++++++---- rust2rpm.toml | 8 +++++++- 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/coreutils-fix-metadata.diff b/coreutils-fix-metadata.diff index d71392f..797aa25 100644 --- a/coreutils-fix-metadata.diff +++ b/coreutils-fix-metadata.diff @@ -1,6 +1,6 @@ ---- coreutils-0.0.27/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ coreutils-0.0.27/Cargo.toml 2024-08-02T15:05:29.625779+00:00 -@@ -30,6 +30,7 @@ +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -30,6 +30,7 @@ keywords = [ categories = ["command-line-utilities"] license = "MIT" repository = "https://github.com/uutils/coreutils" @@ -8,19 +8,19 @@ [profile.release] lto = true -@@ -47,11 +48,6 @@ - [[bin]] +@@ -48,11 +49,6 @@ strip = true name = "coreutils" path = "src/bin/coreutils.rs" -- + -[[bin]] -name = "uudoc" -path = "src/bin/uudoc.rs" -required-features = ["uudoc"] - +- [dependencies.arch] version = "0.0.27" -@@ -639,7 +635,7 @@ + optional = true +@@ -639,7 +635,7 @@ features = ["small_rng"] version = "1.10.4" [dev-dependencies.rstest] @@ -29,3 +29,16 @@ [dev-dependencies.sha1] version = "0.10.6" +@@ -673,7 +669,11 @@ version = "2.5" + version = "0.11.2" + + [features] +-default = ["feat_common_core"] ++default = [ ++ "feat_acl", ++ "feat_common_core", ++ "feat_selinux", ++] + feat_Tier1 = [ + "feat_common_core", + "arch", diff --git a/rust-coreutils.spec b/rust-coreutils.spec index 780a6a6..c12e37a 100644 --- a/rust-coreutils.spec +++ b/rust-coreutils.spec @@ -18,7 +18,8 @@ Source: coreutils-ls-commands.sh # Manually created patch for downstream crate metadata changes # * drop uudoc, unneeded # * temporarily lower rstest from 0.21.0 to 0.18.0 -# * TODO: enable feat_selinux +# * enable feat_acl +# * enable feat_selinux # * TODO: enable unix Patch: coreutils-fix-metadata.diff # * Fix seq tests that pass negative numbers @@ -211,7 +212,9 @@ cp -p data/completions/zsh/* %{buildroot}%{zsh_completions_dir}/ %if %{with check} %check # * --test-threads 1: tests fail with permission denied error if run with too -# many threads +# many threads (currently not needed) +# * common::util::tests::test_compare_xattrs: operation not supported +# * test_chcon / test_runcon: SELinux not supported in mock # * test_cp: operation not supported # * test_df: needs an actual filesystem to test # * test_du: expected sublink/symlink in output @@ -219,9 +222,9 @@ cp -p data/completions/zsh/* %{buildroot}%{zsh_completions_dir}/ # * test_seq: tolerances too tight %ifarch s390x # * test_od::test_suppress_duplicates: likely endianness issue -%cargo_test -- -- --skip test_cp::test_copy_dir_preserve_permissions --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence --skip test_cp::test_cp_parents_2_dirs --skip test_cp::test_cp_parents_with_permissions_copy_dir --skip test_cp::test_cp_parents_with_permissions_copy_file --skip test_cp::test_cp_preserve_xattr --skip test_cp::test_cp_sparse_always_empty --skip test_cp::test_cp_sparse_always_non_empty --skip test_cp::test_preserve_hardlink_attributes_in_directory --skip test_cp::test_preserve_mode --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_ls::test_ls_allocation_size --skip test_ls::test_ls_inode --skip test_ls::test_ls_long_format --skip test_ls::test_ls_long_formats --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation --skip test_od::test_suppress_duplicates +%cargo_test -- -- --skip common::util::tests::test_compare_xattrs --skip test_chcon:: --skip test_runcon:: --skip test_cp::test_copy_dir_preserve_permissions --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence --skip test_cp::test_cp_parents_2_dirs --skip test_cp::test_cp_parents_with_permissions_copy_dir --skip test_cp::test_cp_parents_with_permissions_copy_file --skip test_cp::test_cp_preserve_xattr --skip test_cp::test_cp_sparse_always_empty --skip test_cp::test_cp_sparse_always_non_empty --skip test_cp::test_preserve_hardlink_attributes_in_directory --skip test_cp::test_preserve_mode --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_ls::test_ls_allocation_size --skip test_ls::test_ls_inode --skip test_ls::test_ls_long_format --skip test_ls::test_ls_long_formats --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation --skip test_od::test_suppress_duplicates %else -%cargo_test -- -- --skip test_cp::test_copy_dir_preserve_permissions --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence --skip test_cp::test_cp_parents_2_dirs --skip test_cp::test_cp_parents_with_permissions_copy_dir --skip test_cp::test_cp_parents_with_permissions_copy_file --skip test_cp::test_cp_preserve_xattr --skip test_cp::test_cp_sparse_always_empty --skip test_cp::test_cp_sparse_always_non_empty --skip test_cp::test_preserve_hardlink_attributes_in_directory --skip test_cp::test_preserve_mode --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_ls::test_ls_allocation_size --skip test_ls::test_ls_inode --skip test_ls::test_ls_long_format --skip test_ls::test_ls_long_formats --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation +%cargo_test -- -- --skip common::util::tests::test_compare_xattrs --skip test_chcon:: --skip test_runcon:: --skip test_cp::test_copy_dir_preserve_permissions --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence --skip test_cp::test_cp_parents_2_dirs --skip test_cp::test_cp_parents_with_permissions_copy_dir --skip test_cp::test_cp_parents_with_permissions_copy_file --skip test_cp::test_cp_preserve_xattr --skip test_cp::test_cp_sparse_always_empty --skip test_cp::test_cp_sparse_always_non_empty --skip test_cp::test_preserve_hardlink_attributes_in_directory --skip test_cp::test_preserve_mode --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_ls::test_ls_allocation_size --skip test_ls::test_ls_inode --skip test_ls::test_ls_long_format --skip test_ls::test_ls_long_formats --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation # non-s390x %endif # check diff --git a/rust2rpm.toml b/rust2rpm.toml index cf6f080..30d6c1e 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -5,6 +5,7 @@ description = "coreutils ~ GNU coreutils (updated); implemented as universal (cr cargo-toml-patch-comments = [ "drop uudoc, unneeded", "temporarily lower rstest from 0.21.0 to 0.18.0", + "enable feat_acl", "TODO: enable feat_selinux", "TODO: enable unix", ] @@ -74,7 +75,9 @@ cp -p data/completions/zsh/* %{buildroot}%{zsh_completions_dir}/ [tests] comments = [ - "--test-threads 1: tests fail with permission denied error if run with too many threads", + "--test-threads 1: tests fail with permission denied error if run with too many threads (currently not needed)", + "common::util::tests::test_compare_xattrs: operation not supported", + "test_chcon / test_runcon: SELinux not supported in mock", "test_cp: operation not supported", "test_df: needs an actual filesystem to test", "test_du: expected sublink/symlink in output", @@ -82,6 +85,9 @@ comments = [ "test_seq: tolerances too tight", ] skip = [ + "common::util::tests::test_compare_xattrs", + "test_chcon::", + "test_runcon::", "test_cp::test_copy_dir_preserve_permissions", "test_cp::test_copy_dir_preserve_permissions_inaccessible_file", "test_cp::test_copy_through_dangling_symlink_no_dereference_permissions", From 2fee9d04118d37c0cca60d4c27afcadcd4b08697 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 11 Oct 2024 12:40:11 +0200 Subject: [PATCH 06/16] Skip test_sort tests that fail only due to formatting differences --- coreutils-fix-metadata.diff | 20 ++++++++++---------- rust-coreutils.spec | 10 +++++----- rust2rpm.toml | 8 ++++++-- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/coreutils-fix-metadata.diff b/coreutils-fix-metadata.diff index 797aa25..52df756 100644 --- a/coreutils-fix-metadata.diff +++ b/coreutils-fix-metadata.diff @@ -1,6 +1,6 @@ ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -30,6 +30,7 @@ keywords = [ +--- coreutils-0.0.27/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ coreutils-0.0.27/Cargo.toml 2024-10-11T09:06:58.472078+00:00 +@@ -30,6 +30,7 @@ categories = ["command-line-utilities"] license = "MIT" repository = "https://github.com/uutils/coreutils" @@ -8,28 +8,28 @@ [profile.release] lto = true -@@ -48,11 +49,6 @@ strip = true +@@ -47,11 +48,6 @@ + [[bin]] name = "coreutils" path = "src/bin/coreutils.rs" - +- -[[bin]] -name = "uudoc" -path = "src/bin/uudoc.rs" -required-features = ["uudoc"] -- + [dependencies.arch] version = "0.0.27" - optional = true -@@ -639,7 +635,7 @@ features = ["small_rng"] +@@ -639,7 +635,7 @@ version = "1.10.4" [dev-dependencies.rstest] -version = "0.21.0" -+version = "0.18.0" ++version = ">=0.18,<0.24" [dev-dependencies.sha1] version = "0.10.6" -@@ -673,7 +669,11 @@ version = "2.5" +@@ -673,7 +669,11 @@ version = "0.11.2" [features] diff --git a/rust-coreutils.spec b/rust-coreutils.spec index c12e37a..4977699 100644 --- a/rust-coreutils.spec +++ b/rust-coreutils.spec @@ -19,7 +19,6 @@ Source: coreutils-ls-commands.sh # * drop uudoc, unneeded # * temporarily lower rstest from 0.21.0 to 0.18.0 # * enable feat_acl -# * enable feat_selinux # * TODO: enable unix Patch: coreutils-fix-metadata.diff # * Fix seq tests that pass negative numbers @@ -176,7 +175,7 @@ cp -p %{SOURCE2} . mkdir -p data/man/man1 mkdir -p data/completions/{bash,fish,zsh} -for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); do +for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); do target/rpm/coreutils manpage $utility > data/man/man1/uu_${utility}.1 for s in bash zsh; do target/rpm/coreutils completion $utility $s > data/completions/$s/uu_${utility} @@ -195,7 +194,7 @@ target/rpm/coreutils completion coreutils fish > data/completions/fish/uutils-co mv %{buildroot}/%{_bindir}/coreutils %{buildroot}/%{_bindir}/uutils-coreutils mkdir -p %{buildroot}%{_libexecdir}/uutils-coreutils/misc cp -p coreutils-wrapper.sh %{buildroot}%{_libexecdir}/uutils-coreutils/misc/ -for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); do +for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); do ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_libexecdir}/uutils-coreutils/$utility ln -sr %{buildroot}%{_libexecdir}/uutils-coreutils/misc/coreutils-wrapper.sh %{buildroot}%{_bindir}/uu_$utility done @@ -220,11 +219,12 @@ cp -p data/completions/zsh/* %{buildroot}%{zsh_completions_dir}/ # * test_du: expected sublink/symlink in output # * test_ls: need block/char device # * test_seq: tolerances too tight +# * test_sort: formatting differences with recent unicode-width versions %ifarch s390x # * test_od::test_suppress_duplicates: likely endianness issue -%cargo_test -- -- --skip common::util::tests::test_compare_xattrs --skip test_chcon:: --skip test_runcon:: --skip test_cp::test_copy_dir_preserve_permissions --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence --skip test_cp::test_cp_parents_2_dirs --skip test_cp::test_cp_parents_with_permissions_copy_dir --skip test_cp::test_cp_parents_with_permissions_copy_file --skip test_cp::test_cp_preserve_xattr --skip test_cp::test_cp_sparse_always_empty --skip test_cp::test_cp_sparse_always_non_empty --skip test_cp::test_preserve_hardlink_attributes_in_directory --skip test_cp::test_preserve_mode --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_ls::test_ls_allocation_size --skip test_ls::test_ls_inode --skip test_ls::test_ls_long_format --skip test_ls::test_ls_long_formats --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation --skip test_od::test_suppress_duplicates +%cargo_test -- -- --skip common::util::tests::test_compare_xattrs --skip test_chcon:: --skip test_runcon:: --skip test_cp::test_copy_dir_preserve_permissions --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence --skip test_cp::test_cp_parents_2_dirs --skip test_cp::test_cp_parents_with_permissions_copy_dir --skip test_cp::test_cp_parents_with_permissions_copy_file --skip test_cp::test_cp_preserve_xattr --skip test_cp::test_cp_sparse_always_empty --skip test_cp::test_cp_sparse_always_non_empty --skip test_cp::test_preserve_hardlink_attributes_in_directory --skip test_cp::test_preserve_mode --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_ls::test_ls_allocation_size --skip test_ls::test_ls_inode --skip test_ls::test_ls_long_format --skip test_ls::test_ls_long_formats --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation --skip test_od::test_suppress_duplicates --skip test_sort::test_keys_closed_range --skip test_sort::test_keys_multiple_ranges --skip test_sort::test_keys_no_field_match --skip test_sort::test_keys_open_ended %else -%cargo_test -- -- --skip common::util::tests::test_compare_xattrs --skip test_chcon:: --skip test_runcon:: --skip test_cp::test_copy_dir_preserve_permissions --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence --skip test_cp::test_cp_parents_2_dirs --skip test_cp::test_cp_parents_with_permissions_copy_dir --skip test_cp::test_cp_parents_with_permissions_copy_file --skip test_cp::test_cp_preserve_xattr --skip test_cp::test_cp_sparse_always_empty --skip test_cp::test_cp_sparse_always_non_empty --skip test_cp::test_preserve_hardlink_attributes_in_directory --skip test_cp::test_preserve_mode --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_ls::test_ls_allocation_size --skip test_ls::test_ls_inode --skip test_ls::test_ls_long_format --skip test_ls::test_ls_long_formats --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation +%cargo_test -- -- --skip common::util::tests::test_compare_xattrs --skip test_chcon:: --skip test_runcon:: --skip test_cp::test_copy_dir_preserve_permissions --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence --skip test_cp::test_cp_parents_2_dirs --skip test_cp::test_cp_parents_with_permissions_copy_dir --skip test_cp::test_cp_parents_with_permissions_copy_file --skip test_cp::test_cp_preserve_xattr --skip test_cp::test_cp_sparse_always_empty --skip test_cp::test_cp_sparse_always_non_empty --skip test_cp::test_preserve_hardlink_attributes_in_directory --skip test_cp::test_preserve_mode --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_ls::test_ls_allocation_size --skip test_ls::test_ls_inode --skip test_ls::test_ls_long_format --skip test_ls::test_ls_long_formats --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation --skip test_sort::test_keys_closed_range --skip test_sort::test_keys_multiple_ranges --skip test_sort::test_keys_no_field_match --skip test_sort::test_keys_open_ended # non-s390x %endif # check diff --git a/rust2rpm.toml b/rust2rpm.toml index 30d6c1e..924ca68 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -6,7 +6,6 @@ cargo-toml-patch-comments = [ "drop uudoc, unneeded", "temporarily lower rstest from 0.21.0 to 0.18.0", "enable feat_acl", - "TODO: enable feat_selinux", "TODO: enable unix", ] extra-sources = [ @@ -22,7 +21,7 @@ bin-package-name = "uutils-coreutils" extra-files = [ "%{_bindir}/uu_*", "%{_libexecdir}/uutils-coreutils/*", - "%{_mandir}/man1/uu_*", + "%{_mandir}/man1/*", "%{bash_completions_dir}/*", "%{fish_completions_dir}/*", "%{zsh_completions_dir}/*", @@ -83,6 +82,7 @@ comments = [ "test_du: expected sublink/symlink in output", "test_ls: need block/char device", "test_seq: tolerances too tight", + "test_sort: formatting differences with recent unicode-width versions", ] skip = [ "common::util::tests::test_compare_xattrs", @@ -125,4 +125,8 @@ skip = [ "test_seq::test_width_floats", "test_seq::test_width_negative_zero_decimal_notation", "test_seq::test_width_negative_zero_scientific_notation", + "test_sort::test_keys_closed_range", + "test_sort::test_keys_multiple_ranges", + "test_sort::test_keys_no_field_match", + "test_sort::test_keys_open_ended", ] From 0e5d4b3bf812916e182a630cdcf031638c56bc12 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 4 Dec 2024 20:06:09 -0500 Subject: [PATCH 07/16] Stop allowing older rstest versions - Re-generate the spec file with rust2rpm 27 --- coreutils-fix-metadata.diff | 4 +- rust-coreutils.spec | 108 +++++++++++++++++++++++++++++++++--- rust2rpm.toml | 2 +- 3 files changed, 103 insertions(+), 11 deletions(-) diff --git a/coreutils-fix-metadata.diff b/coreutils-fix-metadata.diff index 52df756..9a7f9d1 100644 --- a/coreutils-fix-metadata.diff +++ b/coreutils-fix-metadata.diff @@ -1,5 +1,5 @@ --- coreutils-0.0.27/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ coreutils-0.0.27/Cargo.toml 2024-10-11T09:06:58.472078+00:00 ++++ coreutils-0.0.27/Cargo.toml 2024-12-05T01:03:40.090670+00:00 @@ -30,6 +30,7 @@ categories = ["command-line-utilities"] license = "MIT" @@ -25,7 +25,7 @@ [dev-dependencies.rstest] -version = "0.21.0" -+version = ">=0.18,<0.24" ++version = ">=0.21,<0.24" [dev-dependencies.sha1] version = "0.10.6" diff --git a/rust-coreutils.spec b/rust-coreutils.spec index 4977699..126e88f 100644 --- a/rust-coreutils.spec +++ b/rust-coreutils.spec @@ -1,5 +1,5 @@ -# Generated by rust2rpm 26 -%bcond_without check +# Generated by rust2rpm 27 +%bcond check 1 %global crate coreutils @@ -12,17 +12,17 @@ License: MIT URL: https://crates.io/crates/coreutils Source: %{crates_source} # * Wrapper to invoke coreutils multicall via individual libexec symlink -Source: coreutils-wrapper.sh +Source1: coreutils-wrapper.sh # * Script to list available coreutils commands -Source: coreutils-ls-commands.sh +Source2: coreutils-ls-commands.sh # Manually created patch for downstream crate metadata changes # * drop uudoc, unneeded -# * temporarily lower rstest from 0.21.0 to 0.18.0 +# * allow up to rstest 0.23 # * enable feat_acl # * TODO: enable unix Patch: coreutils-fix-metadata.diff # * Fix seq tests that pass negative numbers -Patch: coreutils-fix-seq-neg-num-tests.diff +Patch2: coreutils-fix-seq-neg-num-tests.diff # leaf package, SIGABRT on compile ExcludeArch: %{ix86} @@ -222,9 +222,101 @@ cp -p data/completions/zsh/* %{buildroot}%{zsh_completions_dir}/ # * test_sort: formatting differences with recent unicode-width versions %ifarch s390x # * test_od::test_suppress_duplicates: likely endianness issue -%cargo_test -- -- --skip common::util::tests::test_compare_xattrs --skip test_chcon:: --skip test_runcon:: --skip test_cp::test_copy_dir_preserve_permissions --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence --skip test_cp::test_cp_parents_2_dirs --skip test_cp::test_cp_parents_with_permissions_copy_dir --skip test_cp::test_cp_parents_with_permissions_copy_file --skip test_cp::test_cp_preserve_xattr --skip test_cp::test_cp_sparse_always_empty --skip test_cp::test_cp_sparse_always_non_empty --skip test_cp::test_preserve_hardlink_attributes_in_directory --skip test_cp::test_preserve_mode --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_ls::test_ls_allocation_size --skip test_ls::test_ls_inode --skip test_ls::test_ls_long_format --skip test_ls::test_ls_long_formats --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation --skip test_od::test_suppress_duplicates --skip test_sort::test_keys_closed_range --skip test_sort::test_keys_multiple_ranges --skip test_sort::test_keys_no_field_match --skip test_sort::test_keys_open_ended +%{cargo_test -- -- %{shrink: + --skip common::util::tests::test_compare_xattrs + --skip test_chcon:: + --skip test_runcon:: + --skip test_cp::test_copy_dir_preserve_permissions + --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file + --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions + --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence + --skip test_cp::test_cp_parents_2_dirs + --skip test_cp::test_cp_parents_with_permissions_copy_dir + --skip test_cp::test_cp_parents_with_permissions_copy_file + --skip test_cp::test_cp_preserve_xattr + --skip test_cp::test_cp_sparse_always_empty + --skip test_cp::test_cp_sparse_always_non_empty + --skip test_cp::test_preserve_hardlink_attributes_in_directory + --skip test_cp::test_preserve_mode + --skip test_df::test_file_column_width_if_filename_contains_unicode_chars + --skip test_df::test_nonexistent_file + --skip test_df::test_output_file_specific_files + --skip test_df::test_output_mp_repeat + --skip test_df::test_output_option_without_equals_sign + --skip test_df::test_total_label_in_correct_column + --skip test_df::test_type_option_with_file + --skip test_du::test_du_dereference_args + --skip test_du::test_du_no_dereference + --skip test_ls::test_device_number + --skip test_ls::test_ls_allocation_size + --skip test_ls::test_ls_inode + --skip test_ls::test_ls_long_format + --skip test_ls::test_ls_long_formats + --skip test_seq::test_count_down_floats + --skip test_seq::test_float_precision_increment + --skip test_seq::test_inf_width + --skip test_seq::test_neg_inf_width + --skip test_seq::test_separator_and_terminator_floats + --skip test_seq::test_width_decimal_scientific_notation_increment + --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end + --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment + --skip test_seq::test_width_floats + --skip test_seq::test_width_negative_zero_decimal_notation + --skip test_seq::test_width_negative_zero_scientific_notation + --skip test_od::test_suppress_duplicates + --skip test_sort::test_keys_closed_range + --skip test_sort::test_keys_multiple_ranges + --skip test_sort::test_keys_no_field_match + --skip test_sort::test_keys_open_ended +}} + %else -%cargo_test -- -- --skip common::util::tests::test_compare_xattrs --skip test_chcon:: --skip test_runcon:: --skip test_cp::test_copy_dir_preserve_permissions --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence --skip test_cp::test_cp_parents_2_dirs --skip test_cp::test_cp_parents_with_permissions_copy_dir --skip test_cp::test_cp_parents_with_permissions_copy_file --skip test_cp::test_cp_preserve_xattr --skip test_cp::test_cp_sparse_always_empty --skip test_cp::test_cp_sparse_always_non_empty --skip test_cp::test_preserve_hardlink_attributes_in_directory --skip test_cp::test_preserve_mode --skip test_df::test_file_column_width_if_filename_contains_unicode_chars --skip test_df::test_nonexistent_file --skip test_df::test_output_file_specific_files --skip test_df::test_output_mp_repeat --skip test_df::test_output_option_without_equals_sign --skip test_df::test_total_label_in_correct_column --skip test_df::test_type_option_with_file --skip test_du::test_du_dereference_args --skip test_du::test_du_no_dereference --skip test_ls::test_device_number --skip test_ls::test_ls_allocation_size --skip test_ls::test_ls_inode --skip test_ls::test_ls_long_format --skip test_ls::test_ls_long_formats --skip test_seq::test_count_down_floats --skip test_seq::test_float_precision_increment --skip test_seq::test_inf_width --skip test_seq::test_neg_inf_width --skip test_seq::test_separator_and_terminator_floats --skip test_seq::test_width_decimal_scientific_notation_increment --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation --skip test_sort::test_keys_closed_range --skip test_sort::test_keys_multiple_ranges --skip test_sort::test_keys_no_field_match --skip test_sort::test_keys_open_ended +%{cargo_test -- -- %{shrink: + --skip common::util::tests::test_compare_xattrs + --skip test_chcon:: + --skip test_runcon:: + --skip test_cp::test_copy_dir_preserve_permissions + --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file + --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions + --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence + --skip test_cp::test_cp_parents_2_dirs + --skip test_cp::test_cp_parents_with_permissions_copy_dir + --skip test_cp::test_cp_parents_with_permissions_copy_file + --skip test_cp::test_cp_preserve_xattr + --skip test_cp::test_cp_sparse_always_empty + --skip test_cp::test_cp_sparse_always_non_empty + --skip test_cp::test_preserve_hardlink_attributes_in_directory + --skip test_cp::test_preserve_mode + --skip test_df::test_file_column_width_if_filename_contains_unicode_chars + --skip test_df::test_nonexistent_file + --skip test_df::test_output_file_specific_files + --skip test_df::test_output_mp_repeat + --skip test_df::test_output_option_without_equals_sign + --skip test_df::test_total_label_in_correct_column + --skip test_df::test_type_option_with_file + --skip test_du::test_du_dereference_args + --skip test_du::test_du_no_dereference + --skip test_ls::test_device_number + --skip test_ls::test_ls_allocation_size + --skip test_ls::test_ls_inode + --skip test_ls::test_ls_long_format + --skip test_ls::test_ls_long_formats + --skip test_seq::test_count_down_floats + --skip test_seq::test_float_precision_increment + --skip test_seq::test_inf_width + --skip test_seq::test_neg_inf_width + --skip test_seq::test_separator_and_terminator_floats + --skip test_seq::test_width_decimal_scientific_notation_increment + --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end + --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment + --skip test_seq::test_width_floats + --skip test_seq::test_width_negative_zero_decimal_notation + --skip test_seq::test_width_negative_zero_scientific_notation + --skip test_sort::test_keys_closed_range + --skip test_sort::test_keys_multiple_ranges + --skip test_sort::test_keys_no_field_match + --skip test_sort::test_keys_open_ended +}} # non-s390x %endif # check diff --git a/rust2rpm.toml b/rust2rpm.toml index 924ca68..72cc524 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -4,7 +4,7 @@ description = "coreutils ~ GNU coreutils (updated); implemented as universal (cr cargo-toml-patch-comments = [ "drop uudoc, unneeded", - "temporarily lower rstest from 0.21.0 to 0.18.0", + "allow up to rstest 0.23", "enable feat_acl", "TODO: enable unix", ] From 752cd51aec0f8bbadf04a3c84c4ee4545cf1cea4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 4 Dec 2024 20:07:38 -0500 Subject: [PATCH 08/16] Allow procfs 0.17 --- coreutils-fix-metadata.diff | 11 ++++++++++- rust-coreutils.spec | 1 + rust2rpm.toml | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/coreutils-fix-metadata.diff b/coreutils-fix-metadata.diff index 9a7f9d1..cb62082 100644 --- a/coreutils-fix-metadata.diff +++ b/coreutils-fix-metadata.diff @@ -1,5 +1,5 @@ --- coreutils-0.0.27/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ coreutils-0.0.27/Cargo.toml 2024-12-05T01:03:40.090670+00:00 ++++ coreutils-0.0.27/Cargo.toml 2024-12-05T01:07:05.985631+00:00 @@ -30,6 +30,7 @@ categories = ["command-line-utilities"] license = "MIT" @@ -42,3 +42,12 @@ feat_Tier1 = [ "feat_common_core", "arch", +@@ -878,7 +878,7 @@ + version = "0.5.1" + + [target."cfg(any(target_os = \"linux\", target_os = \"android\"))".dev-dependencies.procfs] +-version = "0.16" ++version = ">=0.16, <0.18" + default-features = false + + [target."cfg(unix)".dev-dependencies.nix] diff --git a/rust-coreutils.spec b/rust-coreutils.spec index 126e88f..b7df480 100644 --- a/rust-coreutils.spec +++ b/rust-coreutils.spec @@ -20,6 +20,7 @@ Source2: coreutils-ls-commands.sh # * allow up to rstest 0.23 # * enable feat_acl # * TODO: enable unix +# * allow procfs 0.17 Patch: coreutils-fix-metadata.diff # * Fix seq tests that pass negative numbers Patch2: coreutils-fix-seq-neg-num-tests.diff diff --git a/rust2rpm.toml b/rust2rpm.toml index 72cc524..d7802e4 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -7,6 +7,7 @@ cargo-toml-patch-comments = [ "allow up to rstest 0.23", "enable feat_acl", "TODO: enable unix", + "allow procfs 0.17", ] extra-sources = [ { "number" = 1, "file" = "coreutils-wrapper.sh", "comments" = ["Wrapper to invoke coreutils multicall via individual libexec symlink"] }, From d9068c729ea11c0d5bd84139c97f2fa952bf1d0b Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 5 Dec 2024 07:18:26 -0500 Subject: [PATCH 09/16] Reduce repetition in conditional skips --- rust-coreutils.spec | 53 +++------------------------------------------ 1 file changed, 3 insertions(+), 50 deletions(-) diff --git a/rust-coreutils.spec b/rust-coreutils.spec index b7df480..28f4755 100644 --- a/rust-coreutils.spec +++ b/rust-coreutils.spec @@ -223,6 +223,7 @@ cp -p data/completions/zsh/* %{buildroot}%{zsh_completions_dir}/ # * test_sort: formatting differences with recent unicode-width versions %ifarch s390x # * test_od::test_suppress_duplicates: likely endianness issue +%endif %{cargo_test -- -- %{shrink: --skip common::util::tests::test_compare_xattrs --skip test_chcon:: @@ -264,64 +265,16 @@ cp -p data/completions/zsh/* %{buildroot}%{zsh_completions_dir}/ --skip test_seq::test_width_floats --skip test_seq::test_width_negative_zero_decimal_notation --skip test_seq::test_width_negative_zero_scientific_notation +%ifarch s390x --skip test_od::test_suppress_duplicates +%endif --skip test_sort::test_keys_closed_range --skip test_sort::test_keys_multiple_ranges --skip test_sort::test_keys_no_field_match --skip test_sort::test_keys_open_ended }} - -%else -%{cargo_test -- -- %{shrink: - --skip common::util::tests::test_compare_xattrs - --skip test_chcon:: - --skip test_runcon:: - --skip test_cp::test_copy_dir_preserve_permissions - --skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file - --skip test_cp::test_copy_through_dangling_symlink_no_dereference_permissions - --skip test_cp::test_cp_debug_reflink_auto_sparse_always_non_sparse_file_with_long_zero_sequence - --skip test_cp::test_cp_parents_2_dirs - --skip test_cp::test_cp_parents_with_permissions_copy_dir - --skip test_cp::test_cp_parents_with_permissions_copy_file - --skip test_cp::test_cp_preserve_xattr - --skip test_cp::test_cp_sparse_always_empty - --skip test_cp::test_cp_sparse_always_non_empty - --skip test_cp::test_preserve_hardlink_attributes_in_directory - --skip test_cp::test_preserve_mode - --skip test_df::test_file_column_width_if_filename_contains_unicode_chars - --skip test_df::test_nonexistent_file - --skip test_df::test_output_file_specific_files - --skip test_df::test_output_mp_repeat - --skip test_df::test_output_option_without_equals_sign - --skip test_df::test_total_label_in_correct_column - --skip test_df::test_type_option_with_file - --skip test_du::test_du_dereference_args - --skip test_du::test_du_no_dereference - --skip test_ls::test_device_number - --skip test_ls::test_ls_allocation_size - --skip test_ls::test_ls_inode - --skip test_ls::test_ls_long_format - --skip test_ls::test_ls_long_formats - --skip test_seq::test_count_down_floats - --skip test_seq::test_float_precision_increment - --skip test_seq::test_inf_width - --skip test_seq::test_neg_inf_width - --skip test_seq::test_separator_and_terminator_floats - --skip test_seq::test_width_decimal_scientific_notation_increment - --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_end - --skip test_seq::test_width_decimal_scientific_notation_trailing_zeros_increment - --skip test_seq::test_width_floats - --skip test_seq::test_width_negative_zero_decimal_notation - --skip test_seq::test_width_negative_zero_scientific_notation - --skip test_sort::test_keys_closed_range - --skip test_sort::test_keys_multiple_ranges - --skip test_sort::test_keys_no_field_match - --skip test_sort::test_keys_open_ended -}} -# non-s390x %endif # check -%endif %changelog %autochangelog From 183efbc9df631737f45347d14d7bb7b076602089 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 01:53:35 +0000 Subject: [PATCH 10/16] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 0c55108464f568ac0d3af09f6354c3248056c516 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Fri, 4 Apr 2025 22:56:05 -0500 Subject: [PATCH 11/16] Make sure the package owns %%{_libexecdir}/uutils-coreutils Signed-off-by: Michel Lind --- rust-coreutils.spec | 1 + rust2rpm.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/rust-coreutils.spec b/rust-coreutils.spec index 28f4755..c77e81d 100644 --- a/rust-coreutils.spec +++ b/rust-coreutils.spec @@ -152,6 +152,7 @@ Obsoletes: uu_yes < %{obsolete_uu_nvr} %doc README.md %{_bindir}/uutils-coreutils %{_bindir}/uu_* +%dir %{_libexecdir}/uutils-coreutils %{_libexecdir}/uutils-coreutils/* %{_mandir}/man1/* %{bash_completions_dir}/* diff --git a/rust2rpm.toml b/rust2rpm.toml index d7802e4..45650af 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -21,6 +21,7 @@ bin-package-name = "uutils-coreutils" extra-files = [ "%{_bindir}/uu_*", + "%dir %{_libexecdir}/uutils-coreutils", "%{_libexecdir}/uutils-coreutils/*", "%{_mandir}/man1/*", "%{bash_completions_dir}/*", From 962d783b234087eef3a64221f35eadfd3e0c47ca Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 12 Mar 2025 10:45:57 -0700 Subject: [PATCH 12/16] Link `uu_` binaries directly, without the shell wrapper The multicall binary `uutils-coreutils` already strips arbitrary prefixes up to a non-alphabetic character, so our `uu_` prefix works fine when linked directly. (cherry picked from commit c4440c160e8528fc38607471f3b996839762247a) --- coreutils-wrapper.sh | 23 ----------------------- rust-coreutils.spec | 15 +++------------ rust2rpm.toml | 14 +++----------- 3 files changed, 6 insertions(+), 46 deletions(-) delete mode 100755 coreutils-wrapper.sh diff --git a/coreutils-wrapper.sh b/coreutils-wrapper.sh deleted file mode 100755 index 88ee673..0000000 --- a/coreutils-wrapper.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# Wrapper to invoke coreutils multicall via individual libexec symlink -# -# To use: -# - symlink this to /usr/bin/uu_$utility -# - it will invoke /usr/libexec/uutils-coreutils/$utility -# - that is in turn a symlink to /usr/bin/uutils-coreutils, which is a -# multicall binary that behaves like $utility when that is argv[0] - -CALLED_AS=$(basename "$0") - -UTILITY=${CALLED_AS#uu_} - -CMD="/usr/libexec/uutils-coreutils/$UTILITY" - -if [ -L "$CMD" ]; then - # we want the argv to be passed as-is here - # shellcheck disable=SC2068 - "$CMD" $@ -else - echo "Error: $CMD not found" >&2 - exit 1 -fi diff --git a/rust-coreutils.spec b/rust-coreutils.spec index c77e81d..f60a3ac 100644 --- a/rust-coreutils.spec +++ b/rust-coreutils.spec @@ -11,10 +11,8 @@ Summary: coreutils ~ GNU coreutils reimplementation in Rust License: MIT URL: https://crates.io/crates/coreutils Source: %{crates_source} -# * Wrapper to invoke coreutils multicall via individual libexec symlink -Source1: coreutils-wrapper.sh # * Script to list available coreutils commands -Source2: coreutils-ls-commands.sh +Source1: coreutils-ls-commands.sh # Manually created patch for downstream crate metadata changes # * drop uudoc, unneeded # * allow up to rstest 0.23 @@ -152,8 +150,6 @@ Obsoletes: uu_yes < %{obsolete_uu_nvr} %doc README.md %{_bindir}/uutils-coreutils %{_bindir}/uu_* -%dir %{_libexecdir}/uutils-coreutils -%{_libexecdir}/uutils-coreutils/* %{_mandir}/man1/* %{bash_completions_dir}/* %{fish_completions_dir}/* @@ -162,10 +158,8 @@ Obsoletes: uu_yes < %{obsolete_uu_nvr} %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep -# coreutils-wrapper.sh script -cp -p %{SOURCE1} . # coreutils-ls-commands.sh script -cp -p %{SOURCE2} . +cp -p %{SOURCE1} . %generate_buildrequires %cargo_generate_buildrequires @@ -194,11 +188,8 @@ target/rpm/coreutils completion coreutils fish > data/completions/fish/uutils-co %install %cargo_install mv %{buildroot}/%{_bindir}/coreutils %{buildroot}/%{_bindir}/uutils-coreutils -mkdir -p %{buildroot}%{_libexecdir}/uutils-coreutils/misc -cp -p coreutils-wrapper.sh %{buildroot}%{_libexecdir}/uutils-coreutils/misc/ for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); do - ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_libexecdir}/uutils-coreutils/$utility - ln -sr %{buildroot}%{_libexecdir}/uutils-coreutils/misc/coreutils-wrapper.sh %{buildroot}%{_bindir}/uu_$utility + ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_bindir}/uu_$utility done mkdir -p %{buildroot}%{_mandir}/man1 cp -p data/man/man1/* %{buildroot}%{_mandir}/man1/ diff --git a/rust2rpm.toml b/rust2rpm.toml index 45650af..8463bf8 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -10,8 +10,7 @@ cargo-toml-patch-comments = [ "allow procfs 0.17", ] extra-sources = [ - { "number" = 1, "file" = "coreutils-wrapper.sh", "comments" = ["Wrapper to invoke coreutils multicall via individual libexec symlink"] }, - { "number" = 2, "file" = "coreutils-ls-commands.sh", "comments" = ["Script to list available coreutils commands"] }, + { "number" = 1, "file" = "coreutils-ls-commands.sh", "comments" = ["Script to list available coreutils commands"] }, ] extra-patches = [ { "number" = 2, "file" = "coreutils-fix-seq-neg-num-tests.diff", "comments" = ["Fix seq tests that pass negative numbers"] }, @@ -21,8 +20,6 @@ bin-package-name = "uutils-coreutils" extra-files = [ "%{_bindir}/uu_*", - "%dir %{_libexecdir}/uutils-coreutils", - "%{_libexecdir}/uutils-coreutils/*", "%{_mandir}/man1/*", "%{bash_completions_dir}/*", "%{fish_completions_dir}/*", @@ -34,10 +31,8 @@ coreutils = "uutils-coreutils" [scripts] prep.post = ["""\ -# coreutils-wrapper.sh script -cp -p %{SOURCE1} . # coreutils-ls-commands.sh script -cp -p %{SOURCE2} ."""] +cp -p %{SOURCE1} ."""] build.post = ["""\ mkdir -p data/man/man1 @@ -58,11 +53,8 @@ target/rpm/coreutils completion coreutils fish > data/completions/fish/uutils-co """] install.post = ["""\ -mkdir -p %{buildroot}%{_libexecdir}/uutils-coreutils/misc -cp -p coreutils-wrapper.sh %{buildroot}%{_libexecdir}/uutils-coreutils/misc/ for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); do - ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_libexecdir}/uutils-coreutils/$utility - ln -sr %{buildroot}%{_libexecdir}/uutils-coreutils/misc/coreutils-wrapper.sh %{buildroot}%{_bindir}/uu_$utility + ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_bindir}/uu_$utility done mkdir -p %{buildroot}%{_mandir}/man1 cp -p data/man/man1/* %{buildroot}%{_mandir}/man1/ From 917f518565770e4a33a7259cd76b6a8ae8a3d588 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 13:44:04 +0000 Subject: [PATCH 13/16] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 349b9e6049fef846fba6bee604c6c04c5f9615a5 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 4 Aug 2025 22:42:22 -0400 Subject: [PATCH 14/16] Update rstest to 0.26 --- coreutils-fix-metadata.diff | 4 ++-- rust-coreutils.spec | 3 ++- rust2rpm.toml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/coreutils-fix-metadata.diff b/coreutils-fix-metadata.diff index cb62082..916fd0b 100644 --- a/coreutils-fix-metadata.diff +++ b/coreutils-fix-metadata.diff @@ -1,5 +1,5 @@ --- coreutils-0.0.27/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ coreutils-0.0.27/Cargo.toml 2024-12-05T01:07:05.985631+00:00 ++++ coreutils-0.0.27/Cargo.toml 2025-08-05T02:47:31.208967+00:00 @@ -30,6 +30,7 @@ categories = ["command-line-utilities"] license = "MIT" @@ -25,7 +25,7 @@ [dev-dependencies.rstest] -version = "0.21.0" -+version = ">=0.21,<0.24" ++version = "0.26.0" [dev-dependencies.sha1] version = "0.10.6" diff --git a/rust-coreutils.spec b/rust-coreutils.spec index f60a3ac..9a3464d 100644 --- a/rust-coreutils.spec +++ b/rust-coreutils.spec @@ -15,7 +15,8 @@ Source: %{crates_source} Source1: coreutils-ls-commands.sh # Manually created patch for downstream crate metadata changes # * drop uudoc, unneeded -# * allow up to rstest 0.23 +# * update rstest to 0.26: +# https://github.com/uutils/coreutils/commit/001a91fbe6adea29a566326df3fcda30f89e97ab # * enable feat_acl # * TODO: enable unix # * allow procfs 0.17 diff --git a/rust2rpm.toml b/rust2rpm.toml index 8463bf8..3713e2e 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -4,7 +4,7 @@ description = "coreutils ~ GNU coreutils (updated); implemented as universal (cr cargo-toml-patch-comments = [ "drop uudoc, unneeded", - "allow up to rstest 0.23", + "update rstest to 0.26: https://github.com/uutils/coreutils/commit/001a91fbe6adea29a566326df3fcda30f89e97ab", "enable feat_acl", "TODO: enable unix", "allow procfs 0.17", From 2cc21017d45045ed5aece87aca7c23b38fa2c3c9 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 4 Dec 2025 07:54:53 +0000 Subject: [PATCH 15/16] Allow hex-literal 1.0 --- coreutils-fix-metadata.diff | 11 ++++++++++- rust-coreutils.spec | 4 +++- rust2rpm.toml | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/coreutils-fix-metadata.diff b/coreutils-fix-metadata.diff index 916fd0b..2b12a66 100644 --- a/coreutils-fix-metadata.diff +++ b/coreutils-fix-metadata.diff @@ -1,5 +1,5 @@ --- coreutils-0.0.27/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ coreutils-0.0.27/Cargo.toml 2025-08-05T02:47:31.208967+00:00 ++++ coreutils-0.0.27/Cargo.toml 2025-12-04T07:54:17.698037+00:00 @@ -30,6 +30,7 @@ categories = ["command-line-utilities"] license = "MIT" @@ -20,6 +20,15 @@ [dependencies.arch] version = "0.0.27" +@@ -620,7 +616,7 @@ + version = "0.3.1" + + [dev-dependencies.hex-literal] +-version = "0.4.1" ++version = ">=0.4.1, <2.0" + + [dev-dependencies.libc] + version = "0.2.153" @@ -639,7 +635,7 @@ version = "1.10.4" diff --git a/rust-coreutils.spec b/rust-coreutils.spec index 9a3464d..c61fe2c 100644 --- a/rust-coreutils.spec +++ b/rust-coreutils.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 27 +# Generated by rust2rpm 28 %bcond check 1 %global crate coreutils @@ -20,6 +20,8 @@ Source1: coreutils-ls-commands.sh # * enable feat_acl # * TODO: enable unix # * allow procfs 0.17 +# * allow hex-literal 1.0: +# https://github.com/uutils/coreutils/commit/944cd4f72ca7d6e87d06d0a0a5b9e8dafedfba4b Patch: coreutils-fix-metadata.diff # * Fix seq tests that pass negative numbers Patch2: coreutils-fix-seq-neg-num-tests.diff diff --git a/rust2rpm.toml b/rust2rpm.toml index 3713e2e..806eba5 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -8,6 +8,7 @@ cargo-toml-patch-comments = [ "enable feat_acl", "TODO: enable unix", "allow procfs 0.17", + "allow hex-literal 1.0: https://github.com/uutils/coreutils/commit/944cd4f72ca7d6e87d06d0a0a5b9e8dafedfba4b", ] extra-sources = [ { "number" = 1, "file" = "coreutils-ls-commands.sh", "comments" = ["Script to list available coreutils commands"] }, From bf5fc932eb46d8aec78f2d35eaad618588bb51af Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 5 Jan 2026 09:34:36 +0000 Subject: [PATCH 16/16] Allow procfs 0.18 --- coreutils-fix-metadata.diff | 4 ++-- rust-coreutils.spec | 2 +- rust2rpm.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/coreutils-fix-metadata.diff b/coreutils-fix-metadata.diff index 2b12a66..90edc62 100644 --- a/coreutils-fix-metadata.diff +++ b/coreutils-fix-metadata.diff @@ -1,5 +1,5 @@ --- coreutils-0.0.27/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ coreutils-0.0.27/Cargo.toml 2025-12-04T07:54:17.698037+00:00 ++++ coreutils-0.0.27/Cargo.toml 2026-01-05T09:34:07.355658+00:00 @@ -30,6 +30,7 @@ categories = ["command-line-utilities"] license = "MIT" @@ -56,7 +56,7 @@ [target."cfg(any(target_os = \"linux\", target_os = \"android\"))".dev-dependencies.procfs] -version = "0.16" -+version = ">=0.16, <0.18" ++version = ">=0.16, <0.19" default-features = false [target."cfg(unix)".dev-dependencies.nix] diff --git a/rust-coreutils.spec b/rust-coreutils.spec index c61fe2c..310bc69 100644 --- a/rust-coreutils.spec +++ b/rust-coreutils.spec @@ -19,7 +19,7 @@ Source1: coreutils-ls-commands.sh # https://github.com/uutils/coreutils/commit/001a91fbe6adea29a566326df3fcda30f89e97ab # * enable feat_acl # * TODO: enable unix -# * allow procfs 0.17 +# * allow procfs 0.17, 0.18 # * allow hex-literal 1.0: # https://github.com/uutils/coreutils/commit/944cd4f72ca7d6e87d06d0a0a5b9e8dafedfba4b Patch: coreutils-fix-metadata.diff diff --git a/rust2rpm.toml b/rust2rpm.toml index 806eba5..0548894 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -7,7 +7,7 @@ cargo-toml-patch-comments = [ "update rstest to 0.26: https://github.com/uutils/coreutils/commit/001a91fbe6adea29a566326df3fcda30f89e97ab", "enable feat_acl", "TODO: enable unix", - "allow procfs 0.17", + "allow procfs 0.17, 0.18", "allow hex-literal 1.0: https://github.com/uutils/coreutils/commit/944cd4f72ca7d6e87d06d0a0a5b9e8dafedfba4b", ] extra-sources = [