-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust coreutils branch #10057
base: 3.0-dev
Are you sure you want to change the base?
Rust coreutils branch #10057
Changes from all commits
be8a783
651dba8
ca78f1b
eebd829
c70d6a2
c44e715
0845c43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[source.crates-io] | ||
replace-with = "vendored-sources" | ||
|
||
[source.vendored-sources] | ||
directory = "vendor" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"Signatures": { | ||
"cargo_config.toml": "77e9219c27274120197571fd165cbe4121963b5ad3bc0b20b383c86ef0ce6c2b", | ||
"rust-coreutils-0.0.26-vendored.tar.gz": "589d1979c0cedc7a5a9b7f3b260fea0e474dc06ad572fe069b74073642ea43a6", | ||
"rust-coreutils-0.0.26.tar.gz": "2a0e8511f1e6adf7f1003ce4536b8a8bb1b2289364efe55edf96f2fc9e2f00a4" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,150 @@ | ||||||||
Summary: Basic system utilities; reimplemented in Rust | ||||||||
Name: rust-coreutils | ||||||||
Version: 0.0.26 | ||||||||
Release: 2%{?dist} | ||||||||
License: MIT | ||||||||
Vendor: Microsoft Corporation | ||||||||
Distribution: Azure Linux | ||||||||
URL: https://github.com/uutils/coreutils | ||||||||
Source0: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz | ||||||||
# Below is a automatically created tarball with no download link. | ||||||||
Source1: rust-coreutils-0.0.26-vendored.tar.gz | ||||||||
Source2: cargo_config.toml | ||||||||
|
||||||||
|
||||||||
BuildRequires: cargo | ||||||||
BuildRequires: gcc | ||||||||
BuildRequires: glibc | ||||||||
Conflicts: coreutils | ||||||||
|
||||||||
%description | ||||||||
This package provides the reimplementation of the GNU core utilities in Rust. | ||||||||
|
||||||||
%prep | ||||||||
%setup -q -n coreutils-%{version} | ||||||||
tar --strip-components=1 -xzf %{SOURCE1} | ||||||||
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: can we build the vendored tarball, so that we don't need
Suggested change
See |
||||||||
install -D %{SOURCE2} .cargo/config | ||||||||
|
||||||||
%build | ||||||||
cargo build --release --offline | ||||||||
|
||||||||
%install | ||||||||
rm -rf %{buildroot} | ||||||||
mkdir -p %{buildroot}%{_bindir} | ||||||||
|
||||||||
|
||||||||
utilities=( | ||||||||
"uniq" "nl" "echo" "shred" "od" "basename" "cat" "split" "md5sum" "shake256sum" | ||||||||
"tr" "dir" "comm" "pwd" "tee" "head" "ls" "sort" "b3sum" "b2sum" | ||||||||
"printf" "vdir" "test" "dd" "cut" "df" "shuf" "csplit" "ln" | ||||||||
"numfmt" "mv" "mktemp" "yes" "pr" "seq" "tail" "sha1sum" "sha224sum" | ||||||||
"touch" "tac" "basenc" "rmdir" "paste" "sha256sum" "sha3-256sum" | ||||||||
"dirname" "base32" "factor" "printenv" "sleep" "readlink" "sha3-224sum" | ||||||||
"du" "truncate" "more" "dircolors" "link" "date" "sum" "false" | ||||||||
"true" "wc" "mkdir" "expand" "hashsum" "sha3-384sum" "sha512sum" | ||||||||
"cksum" "base64" "unlink" "fold" "expr" "join" "rm" "sha3-512sum" "shake128sum" | ||||||||
"ptx" "realpath" "unexpand" "fmt" "env" "tsort" "cp" "sha384sum" "sha3sum" | ||||||||
) | ||||||||
|
||||||||
pushd %{buildroot}%{_bindir} | ||||||||
for util in "${utilities[@]}"; do | ||||||||
ln -sf coreutils ${util} | ||||||||
done | ||||||||
popd | ||||||||
|
||||||||
|
||||||||
%files | ||||||||
%{_bindir}/coreutils | ||||||||
%{_bindir}/b2sum | ||||||||
%{_bindir}/b3sum | ||||||||
%{_bindir}/base32 | ||||||||
%{_bindir}/base64 | ||||||||
%{_bindir}/basename | ||||||||
%{_bindir}/basenc | ||||||||
%{_bindir}/cat | ||||||||
%{_bindir}/cksum | ||||||||
%{_bindir}/comm | ||||||||
%{_bindir}/cp | ||||||||
%{_bindir}/csplit | ||||||||
%{_bindir}/cut | ||||||||
%{_bindir}/date | ||||||||
%{_bindir}/dd | ||||||||
%{_bindir}/df | ||||||||
%{_bindir}/dir | ||||||||
%{_bindir}/dircolors | ||||||||
%{_bindir}/dirname | ||||||||
%{_bindir}/du | ||||||||
%{_bindir}/echo | ||||||||
%{_bindir}/env | ||||||||
%{_bindir}/expand | ||||||||
%{_bindir}/expr | ||||||||
%{_bindir}/factor | ||||||||
%{_bindir}/false | ||||||||
%{_bindir}/fmt | ||||||||
%{_bindir}/fold | ||||||||
%{_bindir}/hashsum | ||||||||
%{_bindir}/head | ||||||||
%{_bindir}/join | ||||||||
%{_bindir}/link | ||||||||
%{_bindir}/ln | ||||||||
%{_bindir}/ls | ||||||||
%{_bindir}/md5sum | ||||||||
%{_bindir}/mkdir | ||||||||
%{_bindir}/mktemp | ||||||||
%{_bindir}/more | ||||||||
%{_bindir}/mv | ||||||||
%{_bindir}/nl | ||||||||
%{_bindir}/numfmt | ||||||||
%{_bindir}/od | ||||||||
%{_bindir}/paste | ||||||||
%{_bindir}/pr | ||||||||
%{_bindir}/printenv | ||||||||
%{_bindir}/printf | ||||||||
%{_bindir}/ptx | ||||||||
%{_bindir}/pwd | ||||||||
%{_bindir}/readlink | ||||||||
%{_bindir}/realpath | ||||||||
%{_bindir}/rm | ||||||||
%{_bindir}/rmdir | ||||||||
%{_bindir}/seq | ||||||||
%{_bindir}/sha1sum | ||||||||
%{_bindir}/sha224sum | ||||||||
%{_bindir}/sha256sum | ||||||||
%{_bindir}/sha3-224sum | ||||||||
%{_bindir}/sha3-256sum | ||||||||
%{_bindir}/sha3-384sum | ||||||||
%{_bindir}/sha3-512sum | ||||||||
%{_bindir}/sha384sum | ||||||||
%{_bindir}/sha3sum | ||||||||
%{_bindir}/sha512sum | ||||||||
%{_bindir}/shake128sum | ||||||||
%{_bindir}/shake256sum | ||||||||
%{_bindir}/shred | ||||||||
%{_bindir}/shuf | ||||||||
%{_bindir}/sleep | ||||||||
%{_bindir}/sort | ||||||||
%{_bindir}/split | ||||||||
%{_bindir}/sum | ||||||||
%{_bindir}/tac | ||||||||
%{_bindir}/tail | ||||||||
%{_bindir}/tee | ||||||||
%{_bindir}/test | ||||||||
%{_bindir}/touch | ||||||||
%{_bindir}/tr | ||||||||
%{_bindir}/true | ||||||||
%{_bindir}/truncate | ||||||||
%{_bindir}/tsort | ||||||||
%{_bindir}/unexpand | ||||||||
%{_bindir}/uniq | ||||||||
%{_bindir}/unlink | ||||||||
%{_bindir}/vdir | ||||||||
%{_bindir}/wc | ||||||||
%{_bindir}/yes | ||||||||
|
||||||||
%changelog | ||||||||
* Sat Aug 10 2024 Chris Co <[email protected]> - 0.0.26-2 | ||||||||
- Original version for Azure Linux (license: MIT) | ||||||||
- License verified | ||||||||
|
||||||||
* Fri May 31 2024 Antonio Salinas <[email protected]> - 0.0.26-1 | ||||||||
- Intgrated Rust implementation of GNU coreutils. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the vendored tarballs, please create a
generate_source_tarball.sh
script. They are used by the auto-upgrade pipelines to generate new tarballs during an upgrade and they also serve as pointers to how the tarball can be recreated.