summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorAva Hahn <a.hahn@f5.com>2024-05-03 16:14:36 -0700
committeravahahn <110854134+avahahn@users.noreply.github.com>2024-05-08 13:30:08 -0700
commit787980db2e4cdc39c6195584e54661841e542a47 (patch)
treef26c9457049d7a7d4eb64b816a738e99ab6d5bb1 /tools
parente61d9e7a1f80d62fc17f2dabb6e3318eb70bfdbc (diff)
downloadunit-787980db2e4cdc39c6195584e54661841e542a47.tar.gz
unit-787980db2e4cdc39c6195584e54661841e542a47.tar.bz2
tools/unitctl: Improve quality of life on osx
* unit-client-rs Mac build fix * elaborate in Readme on build requirements with examples for Mac users. Signed-off-by: Ava Hahn <a.hahn@f5.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/unitctl/README.md21
-rw-r--r--tools/unitctl/unit-client-rs/src/unitd_process.rs11
2 files changed, 23 insertions, 9 deletions
diff --git a/tools/unitctl/README.md b/tools/unitctl/README.md
index 8a0d92a7..2e5a2da1 100644
--- a/tools/unitctl/README.md
+++ b/tools/unitctl/README.md
@@ -6,10 +6,23 @@ This project provides a Rust SDK interface to the
and a CLI (`unitctl`) that exposes the functionality provided by the SDK.
## Installation and Use
-In order to build and use `unitctl` one needs a working installation of Maven
-and Cargo. It is recommended to procure Cargo with Rustup. Rustup is packaged
+In order to build and use `unitctl` one needs a working installation of
+Cargo. It is recommended to procure Cargo with Rustup. Rustup is packaged
for use in many systems, but you can also find it at its
-[Official Site](https://rustup.rs/).
+[Official Site](https://rustup.rs/). Additionally, Macintosh users will
+need to install GNU core utilities using brew (see the following command)
+
+```
+$ brew install make gnu-sed grep gawk maven
+```
+
+After installing a modern distribution of Make, Macintosh users can invoke
+the makefile commands using `gmake`. For example: `gmake clean` or `gmake all`.
+
+Finally, in order to run the OpenAPI code generation tooling, Users will
+need a working
+[Java runtime](https://www.java.com/en/)
+as well as Maven. Macintosh users can install Maven from Brew.
With a working installation of Cargo it is advised to build unitctl with the
provided makefile. The `list-targets` target will inform the user of what
@@ -20,8 +33,10 @@ built with `make all`. See the below example for illustration:
```
[ava@calliope cli]$ make list-targets
x86_64-unknown-linux-gnu
+
[ava@calliope cli]$ make x86_64-unknown-linux-gnu
▶ building unitctl with flags [--quiet --release --bin unitctl --target x86_64-unknown-linux-gnu]
+
[ava@calliope cli]$ file ./target/x86_64-unknown-linux-gnu/release/unitctl
./target/x86_64-unknown-linux-gnu/release/unitctl: ELF 64-bit LSB pie executable,
x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,
diff --git a/tools/unitctl/unit-client-rs/src/unitd_process.rs b/tools/unitctl/unit-client-rs/src/unitd_process.rs
index 2a78bfc6..848f31bc 100644
--- a/tools/unitctl/unit-client-rs/src/unitd_process.rs
+++ b/tools/unitctl/unit-client-rs/src/unitd_process.rs
@@ -64,12 +64,11 @@ impl UnitdProcess {
#[cfg(target_os = "linux")]
if pid_is_dockerized(p.0.as_u32().into()) {
false
- } else {
- let parent_pid = p.1.parent();
- match parent_pid {
- Some(pid) => !unitd_processes.contains_key(&pid),
- None => false,
- }
+ }
+ let parent_pid = p.1.parent();
+ match parent_pid {
+ Some(pid) => !unitd_processes.contains_key(&pid),
+ None => false,
}
})
.map(|p| {