Skip to content

Commit

Permalink
Merge pull request #1 from uutils/main
Browse files Browse the repository at this point in the history
pulling from upstream
  • Loading branch information
zhitkoff authored Aug 22, 2023
2 parents 9e3d93e + f1ec8e6 commit f7872f2
Show file tree
Hide file tree
Showing 272 changed files with 1,458 additions and 653 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ jobs:
## Run it
cd fuzz
cargo +nightly fuzz run fuzz_date -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0
- name: Run fuzz_test for XX seconds
continue-on-error: true
shell: bash
run: |
## Run it
cd fuzz
cargo +nightly fuzz run fuzz_test -- -max_total_time=${{ env.RUN_FOR }} -detect_leaks=0
- name: Run fuzz_parse_glob for XX seconds
shell: bash
run: |
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ feat_os_unix = [
"feat_require_crate_cpp",
"feat_require_unix",
"feat_require_unix_utmpx",
"feat_require_unix_hostid",
]
# "feat_os_windows" == set of utilities which can be built/run on modern/usual windows platforms
feat_os_windows = [
Expand Down Expand Up @@ -318,7 +319,7 @@ self_cell = "1.0.1"
selinux = "0.4"
signal-hook = "0.3.17"
smallvec = { version = "1.11", features = ["union"] }
tempfile = "3.7.1"
tempfile = "3.8.0"
term_grid = "0.1.5"
terminal_size = "0.2.6"
textwrap = { version = "0.16.0", features = ["terminal_size"] }
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ that scripts can be easily transferred between platforms.

uutils has both user and developer documentation available:

- [User Manual](https://uutils.github.io/user/)
- [Developer Documentation](https://uutils.github.io/dev/coreutils/)
- [User Manual](https://uutils.github.io/coreutils/book/)
- [Developer Documentation](https://uutils.github.io/dev/coreutils/) (currently offline, you can use docs.rs in the meantime)

Both can also be generated locally, the instructions for that can be found in
the [coreutils docs](https://github.com/uutils/uutils.github.io) repository.
Expand Down Expand Up @@ -303,7 +303,7 @@ make PREFIX=/my/path uninstall

Below is the evolution of how many GNU tests uutils passes. A more detailed
breakdown of the GNU test results of the main branch can be found
[in the user manual](https://uutils.github.io/user/test_coverage.html).
[in the user manual](https://uutils.github.io/coreutils/book/test_coverage.html).

See <https://github.com/uutils/coreutils/issues/3336> for the main meta bugs
(many are missing).
Expand Down
28 changes: 0 additions & 28 deletions README.target.md

This file was deleted.

1 change: 1 addition & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pub fn main() {
mf.write_all(
"type UtilityMap<T> = phf::OrderedMap<&'static str, (fn(T) -> i32, fn() -> Command)>;\n\
\n\
#[allow(clippy::too_many_lines)]
fn util_map<T: uucore::Args>() -> UtilityMap<T> {\n"
.as_bytes(),
)
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
book
src/utils
src/SUMMARY.md
src/platform_table.md
tldr.zip
12 changes: 11 additions & 1 deletion docs/src/installation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- spell-checker:ignore pacman pamac nixpkgs openmandriva -->
<!-- spell-checker:ignore pacman pamac nixpkgs openmandriva conda -->

# Installation

Expand Down Expand Up @@ -139,6 +139,16 @@ pkg install rust-coreutils
scoop install uutils-coreutils
```

## Alternative installers

### Conda

[Conda package](https://anaconda.org/conda-forge/uutils-coreutils)

```
conda install -c conda-forge uutils-coreutils
```

## Non-standard packages

### `coreutils-hybrid` (AUR)
Expand Down
45 changes: 45 additions & 0 deletions docs/src/platforms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Platform support

<!-- markdownlint-disable MD033 -->

uutils aims to be as "universal" as possible, meaning that we try to support
many platforms. However, it is infeasible for us to guarantee that every
platform works. Just like Rust itself, we therefore have multiple tiers of
platform support, with different guarantees. We support two tiers of platforms:

- **Tier 1**: All applicable utils are compiled and tested in CI for these
platforms.
- **Tier 2**: These platforms are supported but not actively tested. We do accept
fixes for these platforms.

> **Note**: The tiers are dictated by our CI. We would happily accept a job
> in the CI for testing more platforms, bumping those platforms to tier 1.
## Platforms per tier

The platforms in tier 1 and the platforms that we test in CI are listed below.

| Operating system | Tested targets |
| ---------------- | -------------- |
| **Linux** | `x86_64-unknown-linux-gnu` <br> `x86_64-unknown-linux-musl` <br> `arm-unknown-linux-gnueabihf` <br> `i686-unknown-linux-gnu` <br> `aarch64-unknown-linux-gnu` |
| **macOS** | `x86_64-apple-darwin` |
| **Windows** | `i686-pc-windows-msvc` <br> `x86_64-pc-windows-gnu` <br> `x86_64-pc-windows-msvc` |
| **FreeBSD** | `x86_64-unknown-freebsd` |
| **Android** | `i686-linux-android` |

The platforms in tier 2 are more vague, but include:

- untested variations of the platforms above,
- Redox OS,
- and BSDs such as OpenBSD, NetBSD & DragonFlyBSD.

## Utility compatibility per platform

Not all utils work on every platform. For instance, `chgrp` is not supported on
Windows, because Windows does not have the concept of groups. Below is a full table
detailing which utilities are supported for the tier 1 platforms.

Note that for some utilities, not all functionality is supported on each
platform. This is documented per utility.

{{ #include platform_table.md }}
15 changes: 11 additions & 4 deletions fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ cargo-fuzz = true

[dependencies]
libfuzzer-sys = "0.4"
libc = "0.2"
rand = { version = "0.8", features = ["small_rng"] }

[dependencies.uucore]
path = "../src/uucore/"
uucore = { path = "../src/uucore/" }
uu_date = { path = "../src/uu/date/" }
uu_test = { path = "../src/uu/test/" }

[dependencies.uu_date]
path = "../src/uu/date/"

# Prevent this from interfering with workspaces
[workspace]
Expand All @@ -26,6 +27,12 @@ path = "fuzz_targets/fuzz_date.rs"
test = false
doc = false

[[bin]]
name = "fuzz_test"
path = "fuzz_targets/fuzz_test.rs"
test = false
doc = false

[[bin]]
name = "fuzz_parse_glob"
path = "fuzz_targets/fuzz_parse_glob.rs"
Expand Down
Loading

0 comments on commit f7872f2

Please sign in to comment.