nginx / unit

NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
https://unit.nginx.org
Apache License 2.0
5.25k stars 321 forks source link

CLI: dont require mac users to install additional versions of coreutilities #1251

Open avahahn opened 1 month ago

avahahn commented 1 month ago

The tools/unitctl should work just fine with whatever make, sed, awk that OSX ships with.

danielledeleo commented 1 month ago

What about adding an auto target (like the rest of Unit's makefiles) for unitctl since those work fine on macOS?

Alternatively, since the unitctl Makefiles make heavy use of GNU Make 4.x features, we could detect if gmake is present in the path, use it transparently if present, and if not be minimally helpful and suggest:

brew install make gnu-sed grep coreutils
danielledeleo commented 1 month ago

At the end of the day the main thing the Makefiles do is invoke cargo build and all that needs is a Rust compiler. Maybe there's a hacky way to define that build target above the Make version checks?

The Maven dependency for openapi-generator is another thing to look out for.

danielledeleo commented 1 month ago

Alternatively, as discussed with @avahahn, explore replacing everything with a custom build.rs script to manage the OpenAPI dependencies.

ac000 commented 1 month ago

What about adding an auto target (like the rest of Unit's makefiles) for unitctl since those work fine on macOS?

The auto/ stuff is driven via ./configure and is really just for configuring unit...

The key is to stick to POSIX