Compare commits
5 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf5fc932eb | ||
|
|
2cc21017d4 | ||
|
|
349b9e6049 | ||
|
|
917f518565 | ||
|
|
962d783b23 |
4 changed files with 27 additions and 54 deletions
|
|
@ -1,5 +1,5 @@
|
|||
--- coreutils-0.0.27/Cargo.toml 1970-01-01T00:00:01+00:00
|
||||
+++ coreutils-0.0.27/Cargo.toml 2024-12-05T01:07:05.985631+00:00
|
||||
+++ coreutils-0.0.27/Cargo.toml 2026-01-05T09:34:07.355658+00:00
|
||||
@@ -30,6 +30,7 @@
|
||||
categories = ["command-line-utilities"]
|
||||
license = "MIT"
|
||||
|
|
@ -20,12 +20,21 @@
|
|||
|
||||
[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.21,<0.24"
|
||||
+version = "0.26.0"
|
||||
|
||||
[dev-dependencies.sha1]
|
||||
version = "0.10.6"
|
||||
|
|
@ -47,7 +56,7 @@
|
|||
|
||||
[target."cfg(any(target_os = \"linux\", target_os = \"android\"))".dev-dependencies.procfs]
|
||||
-version = "0.16"
|
||||
+version = ">=0.16, <0.18"
|
||||
+version = ">=0.16, <0.19"
|
||||
default-features = false
|
||||
|
||||
[target."cfg(unix)".dev-dependencies.nix]
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Wrapper to invoke coreutils multicall via individual libexec symlink
|
||||
#
|
||||
# To use:
|
||||
# - symlink this to /usr/bin/uu_$utility
|
||||
# - it will invoke /usr/libexec/uutils-coreutils/$utility
|
||||
# - that is in turn a symlink to /usr/bin/uutils-coreutils, which is a
|
||||
# multicall binary that behaves like $utility when that is argv[0]
|
||||
|
||||
CALLED_AS=$(basename "$0")
|
||||
|
||||
UTILITY=${CALLED_AS#uu_}
|
||||
|
||||
CMD="/usr/libexec/uutils-coreutils/$UTILITY"
|
||||
|
||||
if [ -L "$CMD" ]; then
|
||||
# we want the argv to be passed as-is here
|
||||
# shellcheck disable=SC2068
|
||||
"$CMD" $@
|
||||
else
|
||||
echo "Error: $CMD not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by rust2rpm 27
|
||||
# Generated by rust2rpm 28
|
||||
%bcond check 1
|
||||
|
||||
%global crate coreutils
|
||||
|
|
@ -11,16 +11,17 @@ Summary: coreutils ~ GNU coreutils reimplementation in Rust
|
|||
License: MIT
|
||||
URL: https://crates.io/crates/coreutils
|
||||
Source: %{crates_source}
|
||||
# * Wrapper to invoke coreutils multicall via individual libexec symlink
|
||||
Source1: coreutils-wrapper.sh
|
||||
# * Script to list available coreutils commands
|
||||
Source2: coreutils-ls-commands.sh
|
||||
Source1: coreutils-ls-commands.sh
|
||||
# Manually created patch for downstream crate metadata changes
|
||||
# * drop uudoc, unneeded
|
||||
# * allow up to rstest 0.23
|
||||
# * update rstest to 0.26:
|
||||
# https://github.com/uutils/coreutils/commit/001a91fbe6adea29a566326df3fcda30f89e97ab
|
||||
# * enable feat_acl
|
||||
# * TODO: enable unix
|
||||
# * allow procfs 0.17
|
||||
# * allow procfs 0.17, 0.18
|
||||
# * allow hex-literal 1.0:
|
||||
# https://github.com/uutils/coreutils/commit/944cd4f72ca7d6e87d06d0a0a5b9e8dafedfba4b
|
||||
Patch: coreutils-fix-metadata.diff
|
||||
# * Fix seq tests that pass negative numbers
|
||||
Patch2: coreutils-fix-seq-neg-num-tests.diff
|
||||
|
|
@ -152,8 +153,6 @@ Obsoletes: uu_yes < %{obsolete_uu_nvr}
|
|||
%doc README.md
|
||||
%{_bindir}/uutils-coreutils
|
||||
%{_bindir}/uu_*
|
||||
%dir %{_libexecdir}/uutils-coreutils
|
||||
%{_libexecdir}/uutils-coreutils/*
|
||||
%{_mandir}/man1/*
|
||||
%{bash_completions_dir}/*
|
||||
%{fish_completions_dir}/*
|
||||
|
|
@ -162,10 +161,8 @@ Obsoletes: uu_yes < %{obsolete_uu_nvr}
|
|||
%prep
|
||||
%autosetup -n %{crate}-%{version} -p1
|
||||
%cargo_prep
|
||||
# coreutils-wrapper.sh script
|
||||
cp -p %{SOURCE1} .
|
||||
# coreutils-ls-commands.sh script
|
||||
cp -p %{SOURCE2} .
|
||||
cp -p %{SOURCE1} .
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
|
|
@ -194,11 +191,8 @@ target/rpm/coreutils completion coreutils fish > data/completions/fish/uutils-co
|
|||
%install
|
||||
%cargo_install
|
||||
mv %{buildroot}/%{_bindir}/coreutils %{buildroot}/%{_bindir}/uutils-coreutils
|
||||
mkdir -p %{buildroot}%{_libexecdir}/uutils-coreutils/misc
|
||||
cp -p coreutils-wrapper.sh %{buildroot}%{_libexecdir}/uutils-coreutils/misc/
|
||||
for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); do
|
||||
ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_libexecdir}/uutils-coreutils/$utility
|
||||
ln -sr %{buildroot}%{_libexecdir}/uutils-coreutils/misc/coreutils-wrapper.sh %{buildroot}%{_bindir}/uu_$utility
|
||||
ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_bindir}/uu_$utility
|
||||
done
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
cp -p data/man/man1/* %{buildroot}%{_mandir}/man1/
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ description = "coreutils ~ GNU coreutils (updated); implemented as universal (cr
|
|||
|
||||
cargo-toml-patch-comments = [
|
||||
"drop uudoc, unneeded",
|
||||
"allow up to rstest 0.23",
|
||||
"update rstest to 0.26: https://github.com/uutils/coreutils/commit/001a91fbe6adea29a566326df3fcda30f89e97ab",
|
||||
"enable feat_acl",
|
||||
"TODO: enable unix",
|
||||
"allow procfs 0.17",
|
||||
"allow procfs 0.17, 0.18",
|
||||
"allow hex-literal 1.0: https://github.com/uutils/coreutils/commit/944cd4f72ca7d6e87d06d0a0a5b9e8dafedfba4b",
|
||||
]
|
||||
extra-sources = [
|
||||
{ "number" = 1, "file" = "coreutils-wrapper.sh", "comments" = ["Wrapper to invoke coreutils multicall via individual libexec symlink"] },
|
||||
{ "number" = 2, "file" = "coreutils-ls-commands.sh", "comments" = ["Script to list available coreutils commands"] },
|
||||
{ "number" = 1, "file" = "coreutils-ls-commands.sh", "comments" = ["Script to list available coreutils commands"] },
|
||||
]
|
||||
extra-patches = [
|
||||
{ "number" = 2, "file" = "coreutils-fix-seq-neg-num-tests.diff", "comments" = ["Fix seq tests that pass negative numbers"] },
|
||||
|
|
@ -21,8 +21,6 @@ bin-package-name = "uutils-coreutils"
|
|||
|
||||
extra-files = [
|
||||
"%{_bindir}/uu_*",
|
||||
"%dir %{_libexecdir}/uutils-coreutils",
|
||||
"%{_libexecdir}/uutils-coreutils/*",
|
||||
"%{_mandir}/man1/*",
|
||||
"%{bash_completions_dir}/*",
|
||||
"%{fish_completions_dir}/*",
|
||||
|
|
@ -34,10 +32,8 @@ coreutils = "uutils-coreutils"
|
|||
|
||||
[scripts]
|
||||
prep.post = ["""\
|
||||
# coreutils-wrapper.sh script
|
||||
cp -p %{SOURCE1} .
|
||||
# coreutils-ls-commands.sh script
|
||||
cp -p %{SOURCE2} ."""]
|
||||
cp -p %{SOURCE1} ."""]
|
||||
|
||||
build.post = ["""\
|
||||
mkdir -p data/man/man1
|
||||
|
|
@ -58,11 +54,8 @@ target/rpm/coreutils completion coreutils fish > data/completions/fish/uutils-co
|
|||
"""]
|
||||
|
||||
install.post = ["""\
|
||||
mkdir -p %{buildroot}%{_libexecdir}/uutils-coreutils/misc
|
||||
cp -p coreutils-wrapper.sh %{buildroot}%{_libexecdir}/uutils-coreutils/misc/
|
||||
for utility in $(./coreutils-ls-commands.sh target/rpm/coreutils); do
|
||||
ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_libexecdir}/uutils-coreutils/$utility
|
||||
ln -sr %{buildroot}%{_libexecdir}/uutils-coreutils/misc/coreutils-wrapper.sh %{buildroot}%{_bindir}/uu_$utility
|
||||
ln -sr %{buildroot}%{_bindir}/uutils-coreutils %{buildroot}%{_bindir}/uu_$utility
|
||||
done
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
cp -p data/man/man1/* %{buildroot}%{_mandir}/man1/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue