Compare commits

..

6 commits

Author SHA1 Message Date
Benjamin A. Beasley
4ba625ebef Update License field based on a current Rawhide build 2026-09-07 12:44:43 +01:00
Benjamin A. Beasley
99e1b8fa1a Update clap_mangen to 0.3 2026-09-07 12:34:45 +01:00
5e23574ec4
Rebuilt for ctor 1.x
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2026-08-05 22:43:54 +01:00
Fedora Release Engineering
d2b4d622c7 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:19:04 +00:00
061fd4f8f8
Don't use cargo_install
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2026-06-05 23:26:44 +01:00
a12af6b97d
Initial package; Resolves RHBZ#2485514
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2026-06-05 22:04:16 +01:00
6 changed files with 939 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/uutils-coreutils-0.7.0.tar.gz

72
coreutils-ctor-1_x.diff Normal file
View file

@ -0,0 +1,72 @@
diff -Naur a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml 2026-09-07 12:26:54.841799723 +0100
+++ b/Cargo.toml 2026-09-07 12:33:53.468365364 +0100
@@ -377,7 +377,7 @@
clap_mangen = "0.3"
compare = "0.1.0"
crossterm = { version = "0.29.0", default-features = false }
-ctor = "0.6.0"
+ctor = "1"
ctrlc = { version = "3.4.7", features = ["termination"] }
dns-lookup = { version = "3.0.0" }
exacl = "0.12.0"
diff -Naur a/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs b/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs
--- a/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs 2026-09-07 12:33:53.469568688 +0100
@@ -10,7 +10,7 @@
use std::ptr;
// This runs automatically when the library is loaded via LD_PRELOAD
-#[ctor]
+#[ctor(unsafe)]
fn init() {
unsafe { __stdbuf() };
}
diff -Naur a/tests/tests.rs b/tests/tests.rs
--- a/tests/tests.rs 2026-03-08 12:06:05.000000000 +0000
+++ b/tests/tests.rs 2026-09-07 12:33:53.470249399 +0100
@@ -8,7 +8,7 @@
pub const TESTS_BINARY: &str = env!("CARGO_BIN_EXE_coreutils");
// Use the ctor attribute to run this function before any tests
-#[ctor::ctor]
+#[ctor::ctor(unsafe)]
fn init() {
unsafe {
// Necessary for uutests to be able to find the binary
diff -Naur a/tests/test_util_name.rs b/tests/test_util_name.rs
--- a/tests/test_util_name.rs 2026-03-08 12:06:05.000000000 +0000
+++ b/tests/test_util_name.rs 2026-09-07 12:33:53.470035116 +0100
@@ -16,7 +16,7 @@
// Set the environment variable for any tests
// Use the ctor attribute to run this function before any tests
-#[ctor::ctor]
+#[ctor::ctor(unsafe)]
fn init() {
// No need for unsafe here
unsafe {
diff -Naur a/tests/test_uudoc.rs b/tests/test_uudoc.rs
--- a/tests/test_uudoc.rs 2026-03-08 12:06:05.000000000 +0000
+++ b/tests/test_uudoc.rs 2026-09-07 12:33:53.469829262 +0100
@@ -23,7 +23,7 @@
// Set the environment variable for any tests
// Use the ctor attribute to run this function before any tests
-#[ctor::ctor]
+#[ctor::ctor(unsafe)]
fn init() {
// No need for unsafe here
unsafe {
diff -Naur a/tests/uutests/src/lib/util.rs b/tests/uutests/src/lib/util.rs
--- a/tests/uutests/src/lib/util.rs 2026-03-08 12:06:05.000000000 +0000
+++ b/tests/uutests/src/lib/util.rs 2026-09-07 12:33:53.470659195 +0100
@@ -3196,7 +3196,7 @@
// Create a init for the test with a fake value (not needed)
#[cfg(test)]
- #[ctor::ctor]
+ #[ctor::ctor(unsafe)]
fn init() {
unsafe {
env::set_var("UUTESTS_BINARY_PATH", "");

630
coreutils-fix-metadata.diff Normal file
View file

@ -0,0 +1,630 @@
diff -Naur a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/Cargo.toml 2026-09-07 12:26:54.841799723 +0100
@@ -374,12 +374,11 @@
byteorder = "1.5.0"
clap = { version = "4.5", features = ["wrap_help", "cargo", "color"] }
clap_complete = "4.4"
-clap_mangen = "0.2"
+clap_mangen = "0.3"
compare = "0.1.0"
crossterm = { version = "0.29.0", default-features = false }
ctor = "0.6.0"
ctrlc = { version = "3.4.7", features = ["termination"] }
-divan = { package = "codspeed-divan-compat", version = "4.0.5" }
dns-lookup = { version = "3.0.0" }
exacl = "0.12.0"
file_diff = "1.0.0"
@@ -410,7 +409,7 @@
memmap2 = "0.9.4"
nix = { version = "0.30", default-features = false }
nom = "8.0.0"
-notify = { version = "=8.2.0", features = ["macos_kqueue"] }
+notify = { version = "8.2.0" }
num-bigint = "0.4.4"
num-prime = "0.5.0"
num-traits = "0.2.19"
@@ -430,7 +429,7 @@
rust-ini = "0.21.0"
same-file = "1.0.6"
self_cell = "1.0.4"
-selinux = "=0.6.0"
+selinux = "0.6.0"
string-interner = "0.19.0"
tempfile = "3.15.0"
terminal_size = "0.4.0"
diff -Naur a/src/uu/b2sum/Cargo.toml b/src/uu/b2sum/Cargo.toml
--- a/src/uu/b2sum/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/b2sum/Cargo.toml 2026-09-07 12:26:36.713403322 +0100
@@ -30,7 +30,7 @@
fluent = { workspace = true }
[dev-dependencies]
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "b2sum"
diff -Naur a/src/uu/base64/Cargo.toml b/src/uu/base64/Cargo.toml
--- a/src/uu/base64/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/base64/Cargo.toml 2026-09-07 12:26:36.706938712 +0100
@@ -25,14 +25,9 @@
fluent = { workspace = true }
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "base64"
path = "src/main.rs"
-
-[[bench]]
-name = "base64_bench"
-harness = false
diff -Naur a/src/uu/cksum/Cargo.toml b/src/uu/cksum/Cargo.toml
--- a/src/uu/cksum/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/cksum/Cargo.toml 2026-09-07 12:26:36.707183955 +0100
@@ -30,13 +30,9 @@
fluent = { workspace = true }
[dev-dependencies]
-divan = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "cksum"
path = "src/main.rs"
-[[bench]]
-name = "cksum_bench"
-harness = false
diff -Naur a/src/uu/cp/Cargo.toml b/src/uu/cp/Cargo.toml
--- a/src/uu/cp/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/cp/Cargo.toml 2026-09-07 12:26:36.707426279 +0100
@@ -48,13 +48,8 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
-
-[[bench]]
-name = "cp_bench"
-harness = false
+uucore = { workspace = true }
[features]
feat_selinux = ["selinux", "uucore/selinux"]
diff -Naur a/src/uu/csplit/Cargo.toml b/src/uu/csplit/Cargo.toml
--- a/src/uu/csplit/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/csplit/Cargo.toml 2026-09-07 12:26:36.707628662 +0100
@@ -30,10 +30,6 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
-[[bench]]
-name = "csplit_bench"
-harness = false
diff -Naur a/src/uu/cut/Cargo.toml b/src/uu/cut/Cargo.toml
--- a/src/uu/cut/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/cut/Cargo.toml 2026-09-07 12:26:36.707823785 +0100
@@ -26,13 +26,9 @@
fluent = { workspace = true }
[dev-dependencies]
-divan = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "cut"
path = "src/main.rs"
-[[bench]]
-name = "cut_bench"
-harness = false
diff -Naur a/src/uu/date/Cargo.toml b/src/uu/date/Cargo.toml
--- a/src/uu/date/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/date/Cargo.toml 2026-09-07 12:26:36.708026179 +0100
@@ -57,10 +57,6 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
-[[bench]]
-name = "date_bench"
-harness = false
diff -Naur a/src/uu/dd/Cargo.toml b/src/uu/dd/Cargo.toml
--- a/src/uu/dd/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/dd/Cargo.toml 2026-09-07 12:26:36.708270152 +0100
@@ -40,10 +40,6 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
-[[bench]]
-name = "dd_bench"
-harness = false
diff -Naur a/src/uu/df/Cargo.toml b/src/uu/df/Cargo.toml
--- a/src/uu/df/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/df/Cargo.toml 2026-09-07 12:26:36.708571507 +0100
@@ -26,14 +26,10 @@
fluent = { workspace = true }
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "df"
path = "src/main.rs"
-[[bench]]
-name = "df_bench"
-harness = false
diff -Naur a/src/uu/du/Cargo.toml b/src/uu/du/Cargo.toml
--- a/src/uu/du/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/du/Cargo.toml 2026-09-07 12:26:36.708819861 +0100
@@ -47,10 +47,6 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
-[[bench]]
-name = "du_bench"
-harness = false
diff -Naur a/src/uu/expand/Cargo.toml b/src/uu/expand/Cargo.toml
--- a/src/uu/expand/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/expand/Cargo.toml 2026-09-07 12:26:36.709051954 +0100
@@ -26,14 +26,9 @@
fluent = { workspace = true }
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "expand"
path = "src/main.rs"
-
-[[bench]]
-name = "expand_bench"
-harness = false
diff -Naur a/src/uu/factor/Cargo.toml b/src/uu/factor/Cargo.toml
--- a/src/uu/factor/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/factor/Cargo.toml 2026-09-07 12:26:36.709275518 +0100
@@ -31,12 +31,8 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[lib]
path = "src/factor.rs"
-[[bench]]
-name = "factor_bench"
-harness = false
diff -Naur a/src/uu/false/Cargo.toml b/src/uu/false/Cargo.toml
--- a/src/uu/false/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/false/Cargo.toml 2026-09-07 12:26:36.709476811 +0100
@@ -29,9 +29,5 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
-[[bench]]
-name = "false_bench"
-harness = false
diff -Naur a/src/uu/fold/Cargo.toml b/src/uu/fold/Cargo.toml
--- a/src/uu/fold/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/fold/Cargo.toml 2026-09-07 12:26:36.709684534 +0100
@@ -25,14 +25,10 @@
unicode-width = { workspace = true }
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "fold"
path = "src/main.rs"
-[[bench]]
-name = "fold_bench"
-harness = false
diff -Naur a/src/uu/hostname/Cargo.toml b/src/uu/hostname/Cargo.toml
--- a/src/uu/hostname/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/hostname/Cargo.toml 2026-09-07 12:26:36.709891438 +0100
@@ -45,6 +45,5 @@
harness = false
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
diff -Naur a/src/uu/join/Cargo.toml b/src/uu/join/Cargo.toml
--- a/src/uu/join/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/join/Cargo.toml 2026-09-07 12:26:36.710100751 +0100
@@ -30,10 +30,6 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
-[[bench]]
-name = "join_bench"
-harness = false
diff -Naur a/src/uu/ls/Cargo.toml b/src/uu/ls/Cargo.toml
--- a/src/uu/ls/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/ls/Cargo.toml 2026-09-07 12:26:36.710316624 +0100
@@ -51,13 +51,8 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
-
-[[bench]]
-name = "ls_bench"
-harness = false
+uucore = { workspace = true }
[features]
feat_selinux = ["selinux", "uucore/selinux"]
diff -Naur a/src/uu/md5sum/Cargo.toml b/src/uu/md5sum/Cargo.toml
--- a/src/uu/md5sum/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/md5sum/Cargo.toml 2026-09-07 12:26:36.713618556 +0100
@@ -30,7 +30,7 @@
fluent = { workspace = true }
[dev-dependencies]
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "md5sum"
diff -Naur a/src/uu/mv/Cargo.toml b/src/uu/mv/Cargo.toml
--- a/src/uu/mv/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/mv/Cargo.toml 2026-09-07 12:26:36.710533508 +0100
@@ -51,10 +51,6 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
-[[bench]]
-name = "mv_bench"
-harness = false
diff -Naur a/src/uu/nl/Cargo.toml b/src/uu/nl/Cargo.toml
--- a/src/uu/nl/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/nl/Cargo.toml 2026-09-07 12:26:36.710745691 +0100
@@ -26,14 +26,10 @@
fluent = { workspace = true }
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "nl"
path = "src/main.rs"
-[[bench]]
-name = "nl_bench"
-harness = false
diff -Naur a/src/uu/numfmt/Cargo.toml b/src/uu/numfmt/Cargo.toml
--- a/src/uu/numfmt/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/numfmt/Cargo.toml 2026-09-07 12:26:36.710958584 +0100
@@ -26,13 +26,9 @@
memchr = { workspace = true }
[dev-dependencies]
-divan = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "numfmt"
path = "src/main.rs"
-[[bench]]
-name = "numfmt_bench"
-harness = false
diff -Naur a/src/uu/rm/Cargo.toml b/src/uu/rm/Cargo.toml
--- a/src/uu/rm/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/rm/Cargo.toml 2026-09-07 12:26:36.711180008 +0100
@@ -39,9 +39,8 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bench]]
name = "rm_bench"
diff -Naur a/src/uu/seq/Cargo.toml b/src/uu/seq/Cargo.toml
--- a/src/uu/seq/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/seq/Cargo.toml 2026-09-07 12:26:36.711391101 +0100
@@ -40,9 +40,5 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
-[[bench]]
-name = "seq_bench"
-harness = false
diff -Naur a/src/uu/sha1sum/Cargo.toml b/src/uu/sha1sum/Cargo.toml
--- a/src/uu/sha1sum/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/sha1sum/Cargo.toml 2026-09-07 12:26:36.713824389 +0100
@@ -30,7 +30,7 @@
fluent = { workspace = true }
[dev-dependencies]
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "sha1sum"
diff -Naur a/src/uu/sha224sum/Cargo.toml b/src/uu/sha224sum/Cargo.toml
--- a/src/uu/sha224sum/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/sha224sum/Cargo.toml 2026-09-07 12:26:36.714015482 +0100
@@ -30,7 +30,7 @@
fluent = { workspace = true }
[dev-dependencies]
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "sha224sum"
diff -Naur a/src/uu/sha256sum/Cargo.toml b/src/uu/sha256sum/Cargo.toml
--- a/src/uu/sha256sum/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/sha256sum/Cargo.toml 2026-09-07 12:26:36.714206505 +0100
@@ -30,7 +30,7 @@
fluent = { workspace = true }
[dev-dependencies]
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "sha256sum"
diff -Naur a/src/uu/sha384sum/Cargo.toml b/src/uu/sha384sum/Cargo.toml
--- a/src/uu/sha384sum/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/sha384sum/Cargo.toml 2026-09-07 12:26:36.714397338 +0100
@@ -30,7 +30,7 @@
fluent = { workspace = true }
[dev-dependencies]
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "sha384sum"
diff -Naur a/src/uu/sha512sum/Cargo.toml b/src/uu/sha512sum/Cargo.toml
--- a/src/uu/sha512sum/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/sha512sum/Cargo.toml 2026-09-07 12:26:36.714591481 +0100
@@ -30,7 +30,7 @@
fluent = { workspace = true }
[dev-dependencies]
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "sha512sum"
diff -Naur a/src/uu/shuf/Cargo.toml b/src/uu/shuf/Cargo.toml
--- a/src/uu/shuf/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/shuf/Cargo.toml 2026-09-07 12:26:36.711618374 +0100
@@ -32,10 +32,5 @@
name = "shuf"
path = "src/main.rs"
-[[bench]]
-name = "shuf_bench"
-harness = false
-
[dev-dependencies]
-divan = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
diff -Naur a/src/uu/sort/Cargo.toml b/src/uu/sort/Cargo.toml
--- a/src/uu/sort/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/sort/Cargo.toml 2026-09-07 12:26:36.711839288 +0100
@@ -53,10 +53,8 @@
nix = { workspace = true, features = ["resource"] }
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
uucore = { workspace = true, features = [
- "benchmark",
"fs",
"parser-size",
"version-cmp",
@@ -67,18 +65,3 @@
name = "sort"
path = "src/main.rs"
-[[bench]]
-name = "sort_bench"
-harness = false
-
-[[bench]]
-name = "sort_locale_c_bench"
-harness = false
-
-[[bench]]
-name = "sort_locale_utf8_bench"
-harness = false
-
-[[bench]]
-name = "sort_locale_de_bench"
-harness = false
diff -Naur a/src/uu/split/Cargo.toml b/src/uu/split/Cargo.toml
--- a/src/uu/split/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/split/Cargo.toml 2026-09-07 12:26:36.712056421 +0100
@@ -30,10 +30,6 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
-[[bench]]
-name = "split_bench"
-harness = false
diff -Naur a/src/uu/true/Cargo.toml b/src/uu/true/Cargo.toml
--- a/src/uu/true/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/true/Cargo.toml 2026-09-07 12:26:36.712269095 +0100
@@ -28,9 +28,5 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
-[[bench]]
-name = "true_bench"
-harness = false
diff -Naur a/src/uu/tsort/Cargo.toml b/src/uu/tsort/Cargo.toml
--- a/src/uu/tsort/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/tsort/Cargo.toml 2026-09-07 12:26:36.712479178 +0100
@@ -35,9 +35,5 @@
path = "src/main.rs"
[dev-dependencies]
-divan = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
-[[bench]]
-name = "tsort_bench"
-harness = false
diff -Naur a/src/uu/unexpand/Cargo.toml b/src/uu/unexpand/Cargo.toml
--- a/src/uu/unexpand/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/unexpand/Cargo.toml 2026-09-07 12:26:36.712685231 +0100
@@ -25,14 +25,9 @@
fluent = { workspace = true }
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "unexpand"
path = "src/main.rs"
-
-[[bench]]
-name = "unexpand_bench"
-harness = false
diff -Naur a/src/uu/uniq/Cargo.toml b/src/uu/uniq/Cargo.toml
--- a/src/uu/uniq/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/uniq/Cargo.toml 2026-09-07 12:26:36.712883724 +0100
@@ -24,13 +24,9 @@
fluent = { workspace = true }
[dev-dependencies]
-divan = { workspace = true }
-uucore = { workspace = true, features = ["benchmark", "parser"] }
+uucore = { workspace = true, features = ["parser"] }
[[bin]]
name = "uniq"
path = "src/main.rs"
-[[bench]]
-name = "uniq_bench"
-harness = false
diff -Naur a/src/uu/wc/Cargo.toml b/src/uu/wc/Cargo.toml
--- a/src/uu/wc/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uu/wc/Cargo.toml 2026-09-07 12:26:36.713084657 +0100
@@ -36,14 +36,10 @@
nix = { workspace = true }
[dev-dependencies]
-divan = { workspace = true }
tempfile = { workspace = true }
-uucore = { workspace = true, features = ["benchmark"] }
+uucore = { workspace = true }
[[bin]]
name = "wc"
path = "src/main.rs"
-[[bench]]
-name = "wc_bench"
-harness = false
diff -Naur a/src/uucore/Cargo.toml b/src/uucore/Cargo.toml
--- a/src/uucore/Cargo.toml 2026-03-08 12:06:05.000000000 +0000
+++ b/src/uucore/Cargo.toml 2026-09-07 12:26:36.706653887 +0100
@@ -50,10 +50,6 @@
libc = { workspace = true, optional = true }
os_display = "0.1.3"
-# Benchmark dependencies (optional)
-divan = { workspace = true, optional = true }
-tempfile = { workspace = true, optional = true }
-
digest = { workspace = true, optional = true }
hex = { workspace = true, optional = true }
memchr = { workspace = true, optional = true }
@@ -203,4 +199,3 @@
tty = []
time = ["jiff"]
uptime = ["jiff", "libc", "windows-sys", "utmpx", "utmp-classic"]
-benchmark = ["divan", "itertools", "tempfile"]

2
series Normal file
View file

@ -0,0 +1,2 @@
coreutils-fix-metadata.diff
coreutils-ctor-1_x.diff

1
sources Normal file
View file

@ -0,0 +1 @@
SHA512 (uutils-coreutils-0.7.0.tar.gz) = e6d01d9320050efaa64ac261d86fddbb79895a0768c388248b412be571989ec4fc78c094e9606d56154abab06b3f66bd4784c55dbf8129db183e78df4bd7c43c

233
uutils-coreutils.spec Normal file
View file

@ -0,0 +1,233 @@
%bcond check 1
%bcond all_tests 0
%if 0%{?el9}
# systemd is too old
%bcond systemd_logind 0
%else
%bcond systemd_logind 1
%endif
%if %{with systemd_logind}
%global feature_flags feat_acl,feat_os_unix,feat_selinux,feat_systemd_logind,uudoc
%else
%global feature_flags feat_acl,feat_os_unix,feat_selinux,uudoc
%endif
# Peak memory usage is (on x86_64) roughly 45 GB in two parallel rustc
# processes, building the uudoc and coreutils crates. This is OK on the
# primary-architecture koji builders, but on more severely memory-constrained
# systems (like some in RISC-V koji) this may cause swapping or memory
# exhaustion. Setting a conservative memory limit per process helps.
%global _smp_tasksize_proc 8192
Name: uutils-coreutils
Version: 0.7.0
# bump release number to 9 temporarily
# upgrade path for rust-coreutils-0.7.0-8
Release: %autorelease -b 9
Summary: GNU coreutils reimplementation in Rust
SourceLicense: MIT
# (MIT OR Apache-2.0) AND Unicode-3.0
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# (MIT OR Apache-2.0) AND Zlib
# 0BSD OR MIT OR Apache-2.0
# Apache-2.0
# Apache-2.0 OR Apache-2.0 WITH LLVM-exception
# Apache-2.0 OR GPL-2.0-only
# Apache-2.0 OR MIT
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# BSD-2-Clause OR Apache-2.0 OR MIT
# BSD-3-Clause
# CC0-1.0
# ISC
# MIT
# MIT OR Apache-2.0
# MIT OR Zlib OR Apache-2.0
# MIT-0 OR Apache-2.0
# Unicode-3.0
# Unlicense OR MIT
# Zlib
License: %{shrink:
MIT
AND (MIT OR Apache-2.0)
AND Unicode-DFS-2016
AND Zlib
AND (0BSD OR MIT OR Apache-2.0)
AND Apache-2.0
AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception)
AND (Apache-2.0 OR GPL-2.0-only)
AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT)
AND (BSD-2-Clause OR Apache-2.0 OR MIT)
AND BSD-3-Clause
AND CC0-1.0
AND ISC
AND (MIT OR Zlib OR Apache-2.0) AND
AND (MIT-0 OR Apache-2.0)
AND Unicode-3.0 AND
AND (Unlicense OR MIT)
}
# LICENSE.dependencies contains a full license breakdown
URL: https://uutils.github.io/coreutils/
Source: https://github.com/uutils/coreutils/archive/%{version}/%{name}-%{version}.tar.gz
# disable benchmarks
# loosen notify version bound from =8.2.0 to 8.2.0 and drop macos_kqueue feature
# loosen selinux version bound from =0.6.0 to 0.6.0
# update clap_mangen to 0.3:
# https://github.com/uutils/coreutils/commit/9397a9c09332dd4a701f344be58d0d59782b2d91
Patch: coreutils-fix-metadata.diff
# bump ctor from 0.6 to 1
Patch: coreutils-ctor-1_x.diff
# leaf package, SIGABRT on compile
ExcludeArch: %{ix86}
BuildRequires: cargo-rpm-macros
BuildRequires: rust2rpm-helper
%if %{with systemd_logind}
BuildRequires: systemd-devel
%endif
%description
uutils coreutils is a cross-platform reimplementation of the GNU coreutils in
Rust. While all programs have been implemented, some options might be missing or
different behavior might be experienced.
%prep
%autosetup -p1 -n coreutils-%{version}
%cargo_prep
# borrowed from ruff
# Patch out foreign (e.g. Windows-only) dependencies. Follow symbolic links so
# that we also patch the bundled crates we just finished setting up.
find -L . -type f -name Cargo.toml -print \
-execdir rust2rpm-helper strip-foreign -o '{}' '{}' ';'
%generate_buildrequires
%cargo_generate_buildrequires -f %{feature_flags}
%build
%cargo_build -f %{feature_flags}
%{cargo_license_summary -f %{feature_flags}}
%{cargo_license -f %{feature_flags}} > LICENSE.dependencies
mkdir -p data/man/man1
mkdir -p data/completions/{bash,fish,zsh}
for utility in $(target/rpm/coreutils --list); do
target/release/uudoc manpage $utility > data/man/man1/uu_${utility}.1
for s in bash zsh; do
target/release/uudoc completion $utility $s > data/completions/$s/uu_${utility}
done
target/release/uudoc completion $utility fish > data/completions/fish/uu_${utility}.fish
done
target/release/uudoc manpage coreutils > data/man/man1/uutils-coreutils.1
for s in bash zsh; do
target/release/uudoc completion coreutils $s > data/completions/$s/uutils-coreutils
done
target/release/uudoc completion coreutils fish > data/completions/fish/uutils-coreutils.fish
%install
install -Dpm 0755 target/rpm/coreutils -T %{buildroot}%{_bindir}/uutils-coreutils
for utility in $(target/rpm/coreutils --list); do
ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_bindir}/uu_$utility
done
mkdir -p %{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}
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
%if %{with all_tests}
%{cargo_test -f %{feature_flags}}
%else
# * --test-threads 1: tests fail with permission denied error if run with too
# many threads (currently not needed)
# * 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: s390x failures, see
# https://github.com/uutils/coreutils/issues/9017#issuecomment-4148721220
# * various color and localization tests
%{cargo_test -f %{feature_flags} -- -- %{shrink:
--skip test_cat::test_write_fast_read_error
--skip test_cp::test_copy_dir_preserve_permissions_inaccessible_file
--skip test_cp::test_cp_dest_no_permissions
--skip test_cp::test_cp_readonly_dest_with_existing_file
--skip test_cp::test_cp_readonly_dest_with_reflink
--skip test_cp::test_cp_readonly_source_and_dest
--skip test_cp::test_cp_reflink_insufficient_permission
--skip test_date::test_date_for_no_permission_file
--skip test_date::test_date_set_valid
--skip test_date::test_date_set_valid_2
--skip test_date::test_date_set_valid_3
--skip test_date::test_date_set_valid_4
--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_inaccessible_directory
--skip test_ls::test_device_number
--skip test_ls::test_ls_allocation_size
--skip test_ls::test_ls_capabilities
--skip test_md5sum::test_continue_after_directory_error
--skip test_more::test_invalid_file_perms
--skip test_mv::inter_partition_copying::test_mv_unlinks_dest_symlink_error_message
--skip test_mv::test_move_should_not_fallback_to_copy
--skip test_mv::test_mv_cross_device_permission_denied
--skip test_mv::test_mv_permission_error
--skip test_rm::test_only_first_error_recursive
--skip test_rm::test_recursive_remove_unreadable_subdir
--skip test_rm::test_unreadable_and_nonempty_dir
--skip test_shred::test_shred_force
--skip test_tail::test_permission_denied
--skip test_tail::test_permission_denied_multiple
--skip test_tail::test_retry9
--skip test_tee::test_readonly
--skip test_test::test_file_not_owned_by_egid
--skip test_test::test_file_not_owned_by_euid
--skip test_touch::test_touch_permission_denied_error_msg
--skip test_touch::test_touch_system_fails
%ifarch s390x
--skip test_od::test_od_options_after_filename
--skip test_od::test_suppress_duplicates
%endif
}}
%endif
%endif
%files
%license LICENSE
%license LICENSE.dependencies
%doc CODE_OF_CONDUCT.md
%doc CONTRIBUTING.md
%doc DEVELOPMENT.md
%doc README.md
%doc README.package.md
%doc SECURITY.md
%{_bindir}/uutils-coreutils
%{_bindir}/uu_*
%{_mandir}/man1/*
%{bash_completions_dir}/*
%{fish_completions_dir}/*
%{zsh_completions_dir}/*
%changelog
%autochangelog