Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
5e23574ec4 |
|||
|
|
d2b4d622c7 | ||
|
061fd4f8f8 |
|||
|
a12af6b97d |
6 changed files with 889 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/uutils-coreutils-0.7.0.tar.gz
|
||||
66
coreutils-ctor-1_x.diff
Normal file
66
coreutils-ctor-1_x.diff
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -377,7 +377,7 @@ clap_complete = "4.4"
|
||||
clap_mangen = "0.2"
|
||||
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"
|
||||
--- a/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs
|
||||
+++ b/src/uu/stdbuf/src/libstdbuf/src/libstdbuf.rs
|
||||
@@ -10,7 +10,7 @@ use std::env;
|
||||
use std::ptr;
|
||||
|
||||
// This runs automatically when the library is loaded via LD_PRELOAD
|
||||
-#[ctor]
|
||||
+#[ctor(unsafe)]
|
||||
fn init() {
|
||||
unsafe { __stdbuf() };
|
||||
}
|
||||
--- a/tests/test_uudoc.rs
|
||||
+++ b/tests/test_uudoc.rs
|
||||
@@ -23,7 +23,7 @@ pub const TESTS_BINARY: &str = env!("CAR
|
||||
// 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 {
|
||||
--- a/tests/test_util_name.rs
|
||||
+++ b/tests/test_util_name.rs
|
||||
@@ -16,7 +16,7 @@ pub const TESTS_BINARY: &str = env!("CAR
|
||||
// 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 {
|
||||
--- a/tests/tests.rs
|
||||
+++ b/tests/tests.rs
|
||||
@@ -8,7 +8,7 @@ use std::env;
|
||||
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
|
||||
--- a/tests/uutests/src/lib/util.rs
|
||||
+++ b/tests/uutests/src/lib/util.rs
|
||||
@@ -3196,7 +3196,7 @@ mod tests {
|
||||
|
||||
// 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", "");
|
||||
586
coreutils-fix-metadata.diff
Normal file
586
coreutils-fix-metadata.diff
Normal file
|
|
@ -0,0 +1,586 @@
|
|||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -379,7 +379,6 @@ 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 @@ memchr = "2.7.2"
|
||||
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 @@ rustc-hash = "2.1.1"
|
||||
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"
|
||||
--- a/src/uucore/Cargo.toml
|
||||
+++ b/src/uucore/Cargo.toml
|
||||
@@ -50,10 +50,6 @@ base64-simd = { version = "0.8", optiona
|
||||
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 @@ wide = []
|
||||
tty = []
|
||||
time = ["jiff"]
|
||||
uptime = ["jiff", "libc", "windows-sys", "utmpx", "utmp-classic"]
|
||||
-benchmark = ["divan", "itertools", "tempfile"]
|
||||
--- a/src/uu/base64/Cargo.toml
|
||||
+++ b/src/uu/base64/Cargo.toml
|
||||
@@ -25,14 +25,9 @@ uu_base32 = { workspace = true }
|
||||
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
|
||||
--- a/src/uu/cksum/Cargo.toml
|
||||
+++ b/src/uu/cksum/Cargo.toml
|
||||
@@ -30,13 +30,9 @@ uu_checksum_common = { workspace = true
|
||||
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
|
||||
--- a/src/uu/cp/Cargo.toml
|
||||
+++ b/src/uu/cp/Cargo.toml
|
||||
@@ -48,13 +48,8 @@ name = "cp"
|
||||
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"]
|
||||
--- a/src/uu/csplit/Cargo.toml
|
||||
+++ b/src/uu/csplit/Cargo.toml
|
||||
@@ -30,10 +30,6 @@ name = "csplit"
|
||||
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
|
||||
--- a/src/uu/cut/Cargo.toml
|
||||
+++ b/src/uu/cut/Cargo.toml
|
||||
@@ -26,13 +26,9 @@ bstr = { workspace = true }
|
||||
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
|
||||
--- a/src/uu/date/Cargo.toml
|
||||
+++ b/src/uu/date/Cargo.toml
|
||||
@@ -57,10 +57,6 @@ name = "date"
|
||||
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
|
||||
--- a/src/uu/dd/Cargo.toml
|
||||
+++ b/src/uu/dd/Cargo.toml
|
||||
@@ -40,10 +40,6 @@ name = "dd"
|
||||
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
|
||||
--- a/src/uu/df/Cargo.toml
|
||||
+++ b/src/uu/df/Cargo.toml
|
||||
@@ -26,14 +26,10 @@ thiserror = { workspace = true }
|
||||
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
|
||||
--- a/src/uu/du/Cargo.toml
|
||||
+++ b/src/uu/du/Cargo.toml
|
||||
@@ -47,10 +47,6 @@ name = "du"
|
||||
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
|
||||
--- a/src/uu/expand/Cargo.toml
|
||||
+++ b/src/uu/expand/Cargo.toml
|
||||
@@ -26,14 +26,9 @@ thiserror = { workspace = true }
|
||||
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
|
||||
--- a/src/uu/factor/Cargo.toml
|
||||
+++ b/src/uu/factor/Cargo.toml
|
||||
@@ -31,12 +31,8 @@ name = "factor"
|
||||
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
|
||||
--- a/src/uu/false/Cargo.toml
|
||||
+++ b/src/uu/false/Cargo.toml
|
||||
@@ -29,9 +29,5 @@ name = "false"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dev-dependencies]
|
||||
-divan = { workspace = true }
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
|
||||
-[[bench]]
|
||||
-name = "false_bench"
|
||||
-harness = false
|
||||
--- a/src/uu/fold/Cargo.toml
|
||||
+++ b/src/uu/fold/Cargo.toml
|
||||
@@ -25,14 +25,10 @@ fluent = { workspace = true }
|
||||
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
|
||||
--- a/src/uu/hostname/Cargo.toml
|
||||
+++ b/src/uu/hostname/Cargo.toml
|
||||
@@ -45,6 +45,5 @@ name = "hostname_bench"
|
||||
harness = false
|
||||
|
||||
[dev-dependencies]
|
||||
-divan = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
--- a/src/uu/join/Cargo.toml
|
||||
+++ b/src/uu/join/Cargo.toml
|
||||
@@ -30,10 +30,6 @@ name = "join"
|
||||
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
|
||||
--- a/src/uu/ls/Cargo.toml
|
||||
+++ b/src/uu/ls/Cargo.toml
|
||||
@@ -51,13 +51,8 @@ name = "ls"
|
||||
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"]
|
||||
--- a/src/uu/mv/Cargo.toml
|
||||
+++ b/src/uu/mv/Cargo.toml
|
||||
@@ -51,10 +51,6 @@ name = "mv"
|
||||
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
|
||||
--- a/src/uu/nl/Cargo.toml
|
||||
+++ b/src/uu/nl/Cargo.toml
|
||||
@@ -26,14 +26,10 @@ uucore = { workspace = true }
|
||||
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
|
||||
--- a/src/uu/numfmt/Cargo.toml
|
||||
+++ b/src/uu/numfmt/Cargo.toml
|
||||
@@ -26,13 +26,9 @@ fluent = { workspace = true }
|
||||
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
|
||||
--- a/src/uu/rm/Cargo.toml
|
||||
+++ b/src/uu/rm/Cargo.toml
|
||||
@@ -39,9 +39,8 @@ name = "rm"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dev-dependencies]
|
||||
-divan = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
|
||||
[[bench]]
|
||||
name = "rm_bench"
|
||||
--- a/src/uu/seq/Cargo.toml
|
||||
+++ b/src/uu/seq/Cargo.toml
|
||||
@@ -40,9 +40,5 @@ name = "seq"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dev-dependencies]
|
||||
-divan = { workspace = true }
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
|
||||
-[[bench]]
|
||||
-name = "seq_bench"
|
||||
-harness = false
|
||||
--- a/src/uu/shuf/Cargo.toml
|
||||
+++ b/src/uu/shuf/Cargo.toml
|
||||
@@ -32,10 +32,5 @@ rustc-hash = { workspace = true }
|
||||
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 }
|
||||
--- a/src/uu/sort/Cargo.toml
|
||||
+++ b/src/uu/sort/Cargo.toml
|
||||
@@ -53,10 +53,8 @@ ctrlc = { workspace = true }
|
||||
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 @@ uucore = { workspace = true, features =
|
||||
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
|
||||
--- a/src/uu/split/Cargo.toml
|
||||
+++ b/src/uu/split/Cargo.toml
|
||||
@@ -30,10 +30,6 @@ name = "split"
|
||||
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
|
||||
--- a/src/uu/true/Cargo.toml
|
||||
+++ b/src/uu/true/Cargo.toml
|
||||
@@ -28,9 +28,5 @@ name = "true"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dev-dependencies]
|
||||
-divan = { workspace = true }
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
|
||||
-[[bench]]
|
||||
-name = "true_bench"
|
||||
-harness = false
|
||||
--- a/src/uu/tsort/Cargo.toml
|
||||
+++ b/src/uu/tsort/Cargo.toml
|
||||
@@ -35,9 +35,5 @@ name = "tsort"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dev-dependencies]
|
||||
-divan = { workspace = true }
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
|
||||
-[[bench]]
|
||||
-name = "tsort_bench"
|
||||
-harness = false
|
||||
--- a/src/uu/unexpand/Cargo.toml
|
||||
+++ b/src/uu/unexpand/Cargo.toml
|
||||
@@ -25,14 +25,9 @@ uucore = { workspace = true }
|
||||
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
|
||||
--- a/src/uu/uniq/Cargo.toml
|
||||
+++ b/src/uu/uniq/Cargo.toml
|
||||
@@ -24,13 +24,9 @@ uucore = { workspace = true, features =
|
||||
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
|
||||
--- a/src/uu/wc/Cargo.toml
|
||||
+++ b/src/uu/wc/Cargo.toml
|
||||
@@ -36,14 +36,10 @@ libc = { workspace = true }
|
||||
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
|
||||
--- a/src/uu/b2sum/Cargo.toml
|
||||
+++ b/src/uu/b2sum/Cargo.toml
|
||||
@@ -30,7 +30,7 @@ uucore = { workspace = true, features =
|
||||
fluent = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
|
||||
[[bin]]
|
||||
name = "b2sum"
|
||||
--- a/src/uu/md5sum/Cargo.toml
|
||||
+++ b/src/uu/md5sum/Cargo.toml
|
||||
@@ -30,7 +30,7 @@ uucore = { workspace = true, features =
|
||||
fluent = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
|
||||
[[bin]]
|
||||
name = "md5sum"
|
||||
--- a/src/uu/sha1sum/Cargo.toml
|
||||
+++ b/src/uu/sha1sum/Cargo.toml
|
||||
@@ -30,7 +30,7 @@ uucore = { workspace = true, features =
|
||||
fluent = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
|
||||
[[bin]]
|
||||
name = "sha1sum"
|
||||
--- a/src/uu/sha224sum/Cargo.toml
|
||||
+++ b/src/uu/sha224sum/Cargo.toml
|
||||
@@ -30,7 +30,7 @@ uucore = { workspace = true, features =
|
||||
fluent = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
|
||||
[[bin]]
|
||||
name = "sha224sum"
|
||||
--- a/src/uu/sha256sum/Cargo.toml
|
||||
+++ b/src/uu/sha256sum/Cargo.toml
|
||||
@@ -30,7 +30,7 @@ uucore = { workspace = true, features =
|
||||
fluent = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
|
||||
[[bin]]
|
||||
name = "sha256sum"
|
||||
--- a/src/uu/sha384sum/Cargo.toml
|
||||
+++ b/src/uu/sha384sum/Cargo.toml
|
||||
@@ -30,7 +30,7 @@ uucore = { workspace = true, features =
|
||||
fluent = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
|
||||
[[bin]]
|
||||
name = "sha384sum"
|
||||
--- a/src/uu/sha512sum/Cargo.toml
|
||||
+++ b/src/uu/sha512sum/Cargo.toml
|
||||
@@ -30,7 +30,7 @@ uucore = { workspace = true, features =
|
||||
fluent = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
-uucore = { workspace = true, features = ["benchmark"] }
|
||||
+uucore = { workspace = true }
|
||||
|
||||
[[bin]]
|
||||
name = "sha512sum"
|
||||
2
series
Normal file
2
series
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
coreutils-fix-metadata.diff
|
||||
coreutils-ctor-1_x.diff
|
||||
1
sources
Normal file
1
sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
SHA512 (uutils-coreutils-0.7.0.tar.gz) = e6d01d9320050efaa64ac261d86fddbb79895a0768c388248b412be571989ec4fc78c094e9606d56154abab06b3f66bd4784c55dbf8129db183e78df4bd7c43c
|
||||
233
uutils-coreutils.spec
Normal file
233
uutils-coreutils.spec
Normal 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 4–5 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
|
||||
# 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
|
||||
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
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue