mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-04 02:42:19 +00:00
chore(sync): frawhide -> el10
This commit is contained in:
@@ -0,0 +1 @@
|
||||
*.tar.gz
|
||||
@@ -0,0 +1,8 @@
|
||||
project pkg {
|
||||
rpm {
|
||||
spec = "uutils-coreutils-replace.spec"
|
||||
}
|
||||
labels {
|
||||
subrepo = "extras"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
--- coreutils-*/Cargo.toml
|
||||
+++ coreutils-*/Cargo.toml
|
||||
@@ -18,6 +18,7 @@
|
||||
categories = ["command-line-utilities"]
|
||||
rust-version = "1.82.0"
|
||||
edition = "2021"
|
||||
+autobins = false
|
||||
|
||||
build = "build.rs"
|
||||
|
||||
@@ -25,7 +26,11 @@
|
||||
all-features = true
|
||||
|
||||
[features]
|
||||
-default = ["feat_common_core"]
|
||||
+default = [
|
||||
+ "feat_acl",
|
||||
+ "feat_common_core",
|
||||
+ "feat_selinux",
|
||||
+]
|
||||
## OS feature shortcodes
|
||||
macos = ["feat_os_macos"]
|
||||
unix = ["feat_os_unix"]
|
||||
@@ -325,7 +330,7 @@
|
||||
rand_core = "0.9.0"
|
||||
rayon = "1.10"
|
||||
regex = "1.10.4"
|
||||
-rstest = "0.25.0"
|
||||
+rstest = ">=0.25,<0.28"
|
||||
rust-ini = "0.21.0"
|
||||
same-file = "1.0.6"
|
||||
self_cell = "1.0.4"
|
||||
@@ -516,7 +521,7 @@
|
||||
rstest = { workspace = true }
|
||||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dev-dependencies]
|
||||
-procfs = { version = "0.17", default-features = false }
|
||||
+procfs = { version = ">=0.17, <0.18", default-features = false }
|
||||
|
||||
[target.'cfg(unix)'.dev-dependencies]
|
||||
nix = { workspace = true, features = ["process", "signal", "user", "term"] }
|
||||
@@ -538,11 +543,6 @@
|
||||
name = "coreutils"
|
||||
path = "src/bin/coreutils.rs"
|
||||
|
||||
-[[bin]]
|
||||
-name = "uudoc"
|
||||
-path = "src/bin/uudoc.rs"
|
||||
-required-features = ["uudoc"]
|
||||
-
|
||||
# The default release profile. It contains all optimizations, without
|
||||
# sacrificing debug info. With this profile (like in the standard
|
||||
# release profile), the debug info and the stack traces will still be available.
|
||||
@@ -0,0 +1,134 @@
|
||||
--- a/tests/by-util/test_seq.rs
|
||||
+++ b/tests/by-util/test_seq.rs
|
||||
@@ -381,80 +381,80 @@
|
||||
#[test]
|
||||
fn test_width_negative_zero_scientific_notation() {
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0e0", "1"])
|
||||
+ .args(&["-w", "--", "-0e0", "1"])
|
||||
.succeeds()
|
||||
.stdout_only("-0\n01\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0e0", "1", "2"])
|
||||
+ .args(&["-w", "--", "-0e0", "1", "2"])
|
||||
.succeeds()
|
||||
.stdout_only("-0\n01\n02\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0e0", "1", "2.0"])
|
||||
+ .args(&["-w", "--", "-0e0", "1", "2.0"])
|
||||
.succeeds()
|
||||
.stdout_only("-0\n01\n02\n");
|
||||
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0e+1", "1"])
|
||||
+ .args(&["-w", "--", "-0e+1", "1"])
|
||||
.succeeds()
|
||||
.stdout_only("-00\n001\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0e+1", "1", "2"])
|
||||
+ .args(&["-w", "--", "-0e+1", "1", "2"])
|
||||
.succeeds()
|
||||
.stdout_only("-00\n001\n002\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0e+1", "1", "2.0"])
|
||||
+ .args(&["-w", "--", "-0e+1", "1", "2.0"])
|
||||
.succeeds()
|
||||
.stdout_only("-00\n001\n002\n");
|
||||
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0.000e0", "1"])
|
||||
+ .args(&["-w", "--", "-0.000e0", "1"])
|
||||
.succeeds()
|
||||
.stdout_only("-0.000\n01.000\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0.000e0", "1", "2"])
|
||||
+ .args(&["-w", "--", "-0.000e0", "1", "2"])
|
||||
.succeeds()
|
||||
.stdout_only("-0.000\n01.000\n02.000\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0.000e0", "1", "2.0"])
|
||||
+ .args(&["-w", "--", "-0.000e0", "1", "2.0"])
|
||||
.succeeds()
|
||||
.stdout_only("-0.000\n01.000\n02.000\n");
|
||||
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0.000e-2", "1"])
|
||||
+ .args(&["-w", "--", "-0.000e-2", "1"])
|
||||
.succeeds()
|
||||
.stdout_only("-0.00000\n01.00000\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0.000e-2", "1", "2"])
|
||||
+ .args(&["-w", "--", "-0.000e-2", "1", "2"])
|
||||
.succeeds()
|
||||
.stdout_only("-0.00000\n01.00000\n02.00000\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0.000e-2", "1", "2.0"])
|
||||
+ .args(&["-w", "--", "-0.000e-2", "1", "2.0"])
|
||||
.succeeds()
|
||||
.stdout_only("-0.00000\n01.00000\n02.00000\n");
|
||||
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0.000e5", "1"])
|
||||
+ .args(&["-w", "--", "-0.000e5", "1"])
|
||||
.succeeds()
|
||||
.stdout_only("-000000\n0000001\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0.000e5", "1", "2"])
|
||||
+ .args(&["-w", "--", "-0.000e5", "1", "2"])
|
||||
.succeeds()
|
||||
.stdout_only("-000000\n0000001\n0000002\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0.000e5", "1", "2.0"])
|
||||
+ .args(&["-w", "--", "-0.000e5", "1", "2.0"])
|
||||
.succeeds()
|
||||
.stdout_only("-000000\n0000001\n0000002\n");
|
||||
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0.000e5", "1"])
|
||||
+ .args(&["-w", "--", "-0.000e5", "1"])
|
||||
.succeeds()
|
||||
.stdout_only("-000000\n0000001\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0.000e5", "1", "2"])
|
||||
+ .args(&["-w", "--", "-0.000e5", "1", "2"])
|
||||
.succeeds()
|
||||
.stdout_only("-000000\n0000001\n0000002\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-0.000e5", "1", "2.0"])
|
||||
+ .args(&["-w", "--", "-0.000e5", "1", "2.0"])
|
||||
.succeeds()
|
||||
.stdout_only("-000000\n0000001\n0000002\n");
|
||||
}
|
||||
@@ -493,7 +493,7 @@
|
||||
#[test]
|
||||
fn test_width_negative_decimal_notation() {
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-.1", ".1", ".11"])
|
||||
+ .args(&["-w", "--", "-.1", ".1", ".11"])
|
||||
.succeeds()
|
||||
.stdout_only("-0.1\n00.0\n00.1\n");
|
||||
}
|
||||
@@ -501,19 +501,19 @@
|
||||
#[test]
|
||||
fn test_width_negative_scientific_notation() {
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-1e-3", "1"])
|
||||
+ .args(&["-w", "--", "-1e-3", "1"])
|
||||
.succeeds()
|
||||
.stdout_only("-0.001\n00.999\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-1.e-3", "1"])
|
||||
+ .args(&["-w", "--", "-1.e-3", "1"])
|
||||
.succeeds()
|
||||
.stdout_only("-0.001\n00.999\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-1.0e-4", "1"])
|
||||
+ .args(&["-w", "--", "-1.0e-4", "1"])
|
||||
.succeeds()
|
||||
.stdout_only("-0.00010\n00.99990\n");
|
||||
new_ucmd!()
|
||||
- .args(&["-w", "-.1e2", "10", "100"])
|
||||
+ .args(&["-w", "--", "-.1e2", "10", "100"])
|
||||
.succeeds()
|
||||
.stdout_only(
|
||||
"-010
|
||||
@@ -0,0 +1 @@
|
||||
rpm.version(crates("coreutils"));
|
||||
@@ -0,0 +1,107 @@
|
||||
%global coreutils_ver 9.3
|
||||
%if 0%{?fedora} >= 42
|
||||
### Temporary solution, will be fixed on newer Oniguruma releases.
|
||||
%global build_cflags %{__build_flags_lang_c} %{?_distro_extra_cflags} -std=c18 -std=gnu18
|
||||
%endif
|
||||
|
||||
Name: uutils-coreutils-replace
|
||||
Version: 0.2.2
|
||||
Release: 1%?dist
|
||||
Summary: Cross-platform Rust rewrite of the GNU coreutils
|
||||
License: MIT
|
||||
URL: https://github.com/uutils/coreutils
|
||||
Source0: %url/archive/refs/tags/%version.tar.gz
|
||||
Source1: https://src.fedoraproject.org/rpms/coreutils/raw/rawhide/f/coreutils-colorls.sh
|
||||
Source2: https://src.fedoraproject.org/rpms/coreutils/raw/rawhide/f/coreutils-colorls.csh
|
||||
Source3: https://raw.githubusercontent.com/coreutils/coreutils/refs/heads/master/src/dircolors.hin
|
||||
Patch0: coreutils-fix-metadata.diff
|
||||
Patch1: coreutils-fix-seq-neg-num-tests.diff
|
||||
Patch3: https://src.fedoraproject.org/rpms/coreutils/raw/rawhide/f/coreutils-8.32-DIR_COLORS.patch
|
||||
BuildRequires: anda-srpm-macros
|
||||
BuildRequires: cargo
|
||||
BuildRequires: clang-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: make
|
||||
BuildRequires: rustfmt
|
||||
BuildRequires: selinux-policy-devel
|
||||
Requires: glibc
|
||||
Provides: coreutils
|
||||
Provides: coreutils-common
|
||||
Conflicts: uutils-coreutils
|
||||
|
||||
%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.
|
||||
|
||||
This package replaces the GNU coreutils commands.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n coreutils-%version
|
||||
%cargo_prep_online
|
||||
/usr/bin/cp %{SOURCE3} .
|
||||
sed dircolors.hin \
|
||||
-e 's| 00;36$| 01;36|' \
|
||||
> DIR_COLORS
|
||||
sed dircolors.hin \
|
||||
-e 's| 01;31$| 00;31|' \
|
||||
-e 's| 01;35$| 00;35|' \
|
||||
> DIR_COLORS.lightbgcolor
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
install -p -c -Dm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/profile.d/colorls.sh
|
||||
install -p -c -Dm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/colorls.csh
|
||||
install -p -c -Dm644 DIR_COLORS{,.lightbgcolor} %{buildroot}%{_sysconfdir}
|
||||
/usr/bin/rm dircolors.hin DIR_COLORS DIR_COLORS.lightbgcolor
|
||||
%make_install PROFILE_CMD='--profile=rpm' MULTICALL=n DESTDIR=%buildroot BUILDDIR=target/rpm PREFIX=%_prefix SELINUX_ENABLED=1 SKIP_UTILS='hostname kill more uptime' &
|
||||
wait
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/b2sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/md5sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha1sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha224sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha256sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha384sum
|
||||
/usr/bin/ln -sf hashsum %{buildroot}%{_bindir}/sha512sum
|
||||
|
||||
%define cmds() $(echo %1{runcon,arch,base{32,64,name,nc},cat,ch{grp,mod,own,root,con},cksum,comm,cp,csplit,cut,date,dd,df,dir{,colors,name},du,echo,env,expand,expr,factor,false,fmt,fold,groups,hashsum,head,host{id},id,install,join,link,ln,logname,ls,mk{dir,fifo,nod,temp},mv,nice,nl,nohup,nproc,numfmt,od,paste,pathchk,pinky,pr,printenv,printf,ptx,pwd,readlink,realpath,rm{,dir},seq,shred,shuf,sleep,sort,split,stat,stdbuf,sum,sync,tac,tail,tee,test,timeout,touch,tr,true,truncate,tsort,tty,uname,un{expand,iq,link},users,vdir,wc,who{,ami},yes}%2)
|
||||
cat <<EOF > files.txt
|
||||
%cmds %_bindir/ ""
|
||||
%_bindir/[
|
||||
%cmds %_datadir/bash-completion/completions/ ""
|
||||
%cmds %_datadir/fish/vendor_completions.d/ .fish
|
||||
%cmds %_mandir/man1/ .1.gz
|
||||
%cmds %_datadir/zsh/site-functions/_ ""
|
||||
EOF
|
||||
sed -i 's@ @\n@g' files.txt
|
||||
|
||||
# remove buildroot from paths in files.txt
|
||||
sed -i "s@%buildroot@/@g" files.txt
|
||||
|
||||
|
||||
echo "=== Files ==="
|
||||
cat files.txt
|
||||
|
||||
%files -f files.txt
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_bindir}/b2sum
|
||||
%{_bindir}/md5sum
|
||||
%{_bindir}/sha1sum
|
||||
%{_bindir}/sha224sum
|
||||
%{_bindir}/sha256sum
|
||||
%{_bindir}/sha384sum
|
||||
%{_bindir}/sha512sum
|
||||
%config(noreplace) %{_sysconfdir}/DIR_COLORS
|
||||
%config(noreplace) %{_sysconfdir}/DIR_COLORS.lightbgcolor
|
||||
%{_sysconfdir}/profile.d/colorls.sh
|
||||
%{_sysconfdir}/profile.d/colorls.csh
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
Reference in New Issue
Block a user