Compare commits
16 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf5fc932eb | ||
|
|
2cc21017d4 | ||
|
|
349b9e6049 | ||
|
|
917f518565 | ||
|
|
962d783b23 |
||
|
|
0c55108464 |
||
|
|
183efbc9df | ||
|
|
d9068c729e | ||
|
|
752cd51aec | ||
|
|
0e5d4b3bf8 | ||
|
|
2fee9d0411 |
||
|
|
92d7ee647e |
||
|
|
7ca26bcc71 |
||
|
|
32837b1c6f |
||
|
|
308097479b | ||
|
|
cc91c146d3 |
8 changed files with 641 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/coreutils-0.0.23.crate
|
||||
/coreutils-0.0.27.crate
|
||||
13
coreutils-drop-conv.diff
Normal file
13
coreutils-drop-conv.diff
Normal file
|
|
@ -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::<Vec<u64>>();
|
||||
|
||||
let rng_seed = SystemTime::now()
|
||||
62
coreutils-fix-metadata.diff
Normal file
62
coreutils-fix-metadata.diff
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
--- coreutils-0.0.27/Cargo.toml 1970-01-01T00:00:01+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"
|
||||
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.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"
|
||||
|
||||
[dev-dependencies.rstest]
|
||||
-version = "0.21.0"
|
||||
+version = "0.26.0"
|
||||
|
||||
[dev-dependencies.sha1]
|
||||
version = "0.10.6"
|
||||
@@ -673,7 +669,11 @@
|
||||
version = "0.11.2"
|
||||
|
||||
[features]
|
||||
-default = ["feat_common_core"]
|
||||
+default = [
|
||||
+ "feat_acl",
|
||||
+ "feat_common_core",
|
||||
+ "feat_selinux",
|
||||
+]
|
||||
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.19"
|
||||
default-features = false
|
||||
|
||||
[target."cfg(unix)".dev-dependencies.nix]
|
||||
154
coreutils-fix-seq-neg-num-tests.diff
Normal file
154
coreutils-fix-seq-neg-num-tests.diff
Normal file
|
|
@ -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
|
||||
7
coreutils-ls-commands.sh
Executable file
7
coreutils-ls-commands.sh
Executable file
|
|
@ -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 ',' ' '
|
||||
275
rust-coreutils.spec
Normal file
275
rust-coreutils.spec
Normal file
|
|
@ -0,0 +1,275 @@
|
|||
# Generated by rust2rpm 28
|
||||
%bcond check 1
|
||||
|
||||
%global crate coreutils
|
||||
|
||||
Name: rust-coreutils
|
||||
Version: 0.0.27
|
||||
Release: %autorelease
|
||||
Summary: coreutils ~ GNU coreutils reimplementation in Rust
|
||||
|
||||
License: MIT
|
||||
URL: https://crates.io/crates/coreutils
|
||||
Source: %{crates_source}
|
||||
# * Script to list available coreutils commands
|
||||
Source1: coreutils-ls-commands.sh
|
||||
# Manually created patch for downstream crate metadata changes
|
||||
# * drop uudoc, unneeded
|
||||
# * update rstest to 0.26:
|
||||
# https://github.com/uutils/coreutils/commit/001a91fbe6adea29a566326df3fcda30f89e97ab
|
||||
# * enable feat_acl
|
||||
# * TODO: enable unix
|
||||
# * allow procfs 0.17, 0.18
|
||||
# * 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
|
||||
|
||||
# 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.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%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 (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
|
||||
|
||||
# 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}
|
||||
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
|
||||
|
||||
%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-coreutils
|
||||
%{_bindir}/uu_*
|
||||
%{_mandir}/man1/*
|
||||
%{bash_completions_dir}/*
|
||||
%{fish_completions_dir}/*
|
||||
%{zsh_completions_dir}/*
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{version} -p1
|
||||
%cargo_prep
|
||||
# coreutils-ls-commands.sh script
|
||||
cp -p %{SOURCE1} .
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
%{cargo_license_summary}
|
||||
%{cargo_license} > LICENSE.dependencies
|
||||
mkdir -p data/man/man1
|
||||
mkdir -p data/completions/{bash,fish,zsh}
|
||||
|
||||
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}
|
||||
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
|
||||
%cargo_install
|
||||
mv %{buildroot}/%{_bindir}/coreutils %{buildroot}/%{_bindir}/uutils-coreutils
|
||||
for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); 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
|
||||
# * --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
|
||||
# * 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
|
||||
%endif
|
||||
%{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
|
||||
%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
|
||||
}}
|
||||
%endif
|
||||
# check
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
127
rust2rpm.toml
Normal file
127
rust2rpm.toml
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
[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",
|
||||
"update rstest to 0.26: https://github.com/uutils/coreutils/commit/001a91fbe6adea29a566326df3fcda30f89e97ab",
|
||||
"enable feat_acl",
|
||||
"TODO: enable unix",
|
||||
"allow procfs 0.17, 0.18",
|
||||
"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"] },
|
||||
]
|
||||
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_*",
|
||||
"%{_mandir}/man1/*",
|
||||
"%{bash_completions_dir}/*",
|
||||
"%{fish_completions_dir}/*",
|
||||
"%{zsh_completions_dir}/*",
|
||||
]
|
||||
|
||||
[package.bin-renames]
|
||||
coreutils = "uutils-coreutils"
|
||||
|
||||
[scripts]
|
||||
prep.post = ["""\
|
||||
# coreutils-ls-commands.sh script
|
||||
cp -p %{SOURCE1} ."""]
|
||||
|
||||
build.post = ["""\
|
||||
mkdir -p data/man/man1
|
||||
mkdir -p data/completions/{bash,fish,zsh}
|
||||
|
||||
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}
|
||||
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 = ["""\
|
||||
for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); 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}/
|
||||
"""]
|
||||
|
||||
[tests]
|
||||
comments = [
|
||||
"--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",
|
||||
"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",
|
||||
"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",
|
||||
"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",
|
||||
"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_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",
|
||||
"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",
|
||||
"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",
|
||||
]
|
||||
1
sources
Normal file
1
sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
SHA512 (coreutils-0.0.27.crate) = ade9d7e0a79896eb6f79d9534ff4a4c28e77d9fb2d094439d1106e4666d4de6905ba044f5319879097cf228018e04ee53bee0cc222301bee90e9924c908a8879
|
||||
Loading…
Add table
Add a link
Reference in a new issue