This commit is contained in:
sylvestre
2023-04-21 02:41:57 +00:00
parent 524a8de8b6
commit ffcbeba900
119 changed files with 760 additions and 2186 deletions
+13 -2
View File
@@ -170,7 +170,7 @@
<div id="content" class="content">
<main>
<!-- markdownlint-disable MD041 -->
<!-- spell-checker:ignore reimplementing toybox RUNTEST -->
<!-- spell-checker:ignore reimplementing toybox RUNTEST CARGOFLAGS nextest -->
<h1 id="contributing-to-coreutils"><a class="header" href="#contributing-to-coreutils">Contributing to coreutils</a></h1>
<p>Contributions are very welcome via Pull Requests. If you don't know where to
start, take a look at the
@@ -266,6 +266,11 @@ specific tests, run:</p>
<p>If you also want to test the core utilities:</p>
<pre><code class="language-shell">cargo test -p uucore -p coreutils
</code></pre>
<p>Running the complete test suite might take a while. We use <a href="https://nexte.st/index.html">nextest</a> in
the CI and you might want to try it out locally. It can speed up the execution time of the whole
test run significantly if the cpu has multiple cores.</p>
<pre><code class="language-shell">cargo nextest run --features unix --no-fail-fast
</code></pre>
<p>To debug:</p>
<pre><code class="language-shell">gdb --args target/debug/coreutils ls
(gdb) b ls.rs:79
@@ -284,6 +289,12 @@ specific tests, run:</p>
<p>To include tests for unimplemented behavior:</p>
<pre><code class="language-shell">make UTILS='UTILITY_1 UTILITY_2' SPEC=y test
</code></pre>
<p>To run tests with <code>nextest</code> just use the nextest target. Note you'll need to
<a href="https://nexte.st/book/installation.html">install</a> <code>nextest</code> first. The <code>nextest</code> target accepts the
same arguments like the default <code>test</code> target, so it's possible to pass arguments to <code>nextest run</code>
via <code>CARGOFLAGS</code>:</p>
<pre><code class="language-shell">make CARGOFLAGS='--no-fail-fast' UTILS='UTILITY_1 UTILITY_2' nextest
</code></pre>
<h3 id="run-busybox-tests"><a class="header" href="#run-busybox-tests">Run Busybox Tests</a></h3>
<p>This testing functionality is only available on *nix operating systems and
requires <code>make</code>.</p>
@@ -408,7 +419,7 @@ then add <code>-Z-Zinstrument-coverage</code> flag to <code>RUSTFLAGS</code> env
<li><a href="https://github.com/SerenityOS/serenity/tree/master/Userland/Utilities">SerenityOS</a></li>
<li><a href="https://github.com/dspinellis/unix-history-repo">Initial Unix</a></li>
</ul>
<p>However, when reimplementing the tools/options in Rust, don't read their source codes
<p>However, when reimplementing the tools/options in Rust, don't read their source codes
when they are using reciprocal licenses (ex: GNU GPL, GNU LGPL, etc).</p>
<h2 id="licensing"><a class="header" href="#licensing">Licensing</a></h2>
<p>uutils is distributed under the terms of the MIT License; see the <code>LICENSE</code> file
+379 -1092
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -9
View File
@@ -183,15 +183,7 @@
</code></pre>
<p>Display machine architecture</p>
<h2 id="options"><a class="header" href="#options">Options</a></h2>
<dl><dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<dl></dl>
<p>Determine architecture name for current machine.</p>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Display the system's architecture:</p>
-11
View File
@@ -179,9 +179,6 @@
<div class="version">v0.0.18
</div>
</div>
<pre><code>b2sum [OPTIONS] [FILE]...
</code></pre>
<p>Compute and check message digests.</p>
<h2 id="options"><a class="header" href="#options">Options</a></h2>
<dl><dt><code>--binary</code>, <code>-b</code></dt>
<dd>
@@ -222,14 +219,6 @@
<dt></dt>
<dd>
</dd>
<dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Calculate the BLAKE2 checksum for a file:</p>
-11
View File
@@ -179,9 +179,6 @@
<div class="version">v0.0.18
</div>
</div>
<pre><code>b3sum [OPTIONS] [FILE]...
</code></pre>
<p>Compute and check message digests.</p>
<h2 id="options"><a class="header" href="#options">Options</a></h2>
<dl><dt><code>--binary</code>, <code>-b</code></dt>
<dd>
@@ -226,14 +223,6 @@
<dd>
<p>Omits filenames in the output (option not present in GNU/Coreutils)</p>
</dd>
<dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Calculate the BLAKE3 checksum for a file:</p>
-8
View File
@@ -204,14 +204,6 @@ encoded stream.</p>
<dt></dt>
<dd>
</dd>
<dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Encode a file:</p>
+2 -10
View File
@@ -183,9 +183,9 @@
</code></pre>
<p>encode/decode data and print to standard output
With no FILE, or when FILE is -, read standard input.</p>
<p>The data are encoded as described for the base32 alphabet in RFC 4648.
<p>The data are encoded as described for the base64 alphabet in RFC 3548.
When decoding, the input may contain newlines in addition
to the bytes of the formal base32 alphabet. Use --ignore-garbage
to the bytes of the formal base64 alphabet. Use --ignore-garbage
to attempt to recover from any other non-alphabet bytes in the
encoded stream.</p>
<h2 id="options"><a class="header" href="#options">Options</a></h2>
@@ -204,14 +204,6 @@ encoded stream.</p>
<dt></dt>
<dd>
</dd>
<dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Encode the contents of a file as base64 and write the result to <code>stdout</code>:</p>
-8
View File
@@ -200,14 +200,6 @@ If specified, also remove a trailing SUFFIX</p>
<dd>
<p>end each output line with NUL, not newline</p>
</dd>
<dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Show only the file name from a path:</p>
-8
View File
@@ -226,14 +226,6 @@ from any other non-alphabet bytes in the encoded stream.</p>
<dt><code>--z85</code></dt>
<dd>
</dd>
<dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
</main>
-8
View File
@@ -223,14 +223,6 @@ With no FILE, or when FILE is -, read standard input.</p>
<dd>
<p>use ^ and M- notation, except for LF (\n) and TAB (\t)</p>
</dd>
<dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Print the contents of a file to the standard output:</p>
-4
View File
@@ -247,10 +247,6 @@ With --reference, change the security context of each FILE to that of RFILE.</p>
<dt></dt>
<dd>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>View security context of a file:</p>
-4
View File
@@ -237,10 +237,6 @@ chgrp --reference=RFILE FILE...
<dd>
<p>traverse every symbolic link to a directory encountered</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Change the owner group of a file/directory:</p>
-8
View File
@@ -219,14 +219,6 @@ With --reference, change the mode of each FILE to that of RFILE.</p>
<dt></dt>
<dd>
</dd>
<dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<p>Each MODE is of the form '[ugoa]*(<a href="%5BrwxXst%5D*%7C%5Bugo%5D">-+=</a>)+|[-+=]?[0-7]+'.</p>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
-4
View File
@@ -242,10 +242,6 @@ chown [OPTION]... --reference=RFILE FILE...
<dd>
<p>output a diagnostic for every file processed</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Change the owner user of a file/directory:</p>
-8
View File
@@ -208,14 +208,6 @@
<dt></dt>
<dd>
</dd>
<dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Run command as new root directory:</p>
-8
View File
@@ -190,14 +190,6 @@
<dd>
<p>select the digest type to use. See DIGEST below</p>
</dd>
<dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<p>DIGEST determines the digest algorithm and default output format:</p>
<ul>
-8
View File
@@ -217,14 +217,6 @@ and column three contains lines common to both files.</p>
<dd>
<p>output a summary</p>
</dd>
<dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Produce three tab-separated columns: lines only in first file, lines only in second file and common lines:</p>
-8
View File
@@ -312,14 +312,6 @@ cp [OPTION]... -t DIRECTORY SOURCE...
<dt></dt>
<dd>
</dd>
<dt><code>--help</code>, <code>-h</code></dt>
<dd>
<p>Print help</p>
</dd>
<dt><code>--version</code>, <code>-V</code></dt>
<dd>
<p>Print version</p>
</dd>
</dl>
<h2 id="examples"><a class="header" href="#examples">Examples</a></h2>
<p>Copy a file to another location:</p>

Some files were not shown because too many files have changed in this diff Show More