From 0e5d4b3bf812916e182a630cdcf031638c56bc12 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 4 Dec 2024 20:06:09 -0500 Subject: [PATCH 01/10] 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 02/10] 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 03/10] 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 04/10] 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 05/10] 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 06/10] 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 07/10] 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 08/10] 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 09/10] 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 10/10] 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 = [