Building from Source
naati targets Linux (io_uring with automatic epoll fallback) on amd64 and arm64. No Python is used anywhere in the build or test toolchain.
Prerequisites
Install a C compiler, CMake ≥ 3.27, Ninja, Git, and the four runtime development libraries (libssl, libpcre2, zlib, libcrypt):
sudo apt-get update && sudo apt-get install -y \
build-essential cmake ninja-build git \
libssl-dev libpcre2-dev zlib1g-dev libcrypt-devBuild Targets & Makefile Options
git clone https://github.com/malotho/naati.git
cd naati
# Build the pinned Goose compiler (third_party/GOOSE_VERSION)
make goose
# Build naati with Linux FHS drop-in paths
make naati \
PREFIX=/etc/nginx \
CONF_PATH=/etc/nginx/nginx.conf \
ERROR_LOG_PATH=/var/log/nginx/error.log \
PID_PATH=/run/nginx.pid
# Install /usr/sbin/naati (NGINX_COMPAT=1 also symlinks /usr/sbin/nginx)
sudo make install NGINX_COMPAT=1| Variable | Default | Purpose |
|---|---|---|
PREFIX | /usr/local/nginx | Default runtime prefix directory |
CONF_PATH | conf/nginx.conf | Default config file path (relative to PREFIX or absolute) |
ERROR_LOG_PATH | logs/error.log | Default error log path |
PID_PATH | logs/nginx.pid | Default master PID file path |
SBINDIR | /usr/sbin | Install destination for make install |
DESTDIR | (empty) | Staging prefix for distro packaging |
NGINX_COMPAT | 0 | Set to 1 during make install to create /usr/sbin/nginx -> naati |
Running the Verification Suites
sudo apt-get install -y perl libio-socket-ssl-perl libnet-ssleay-perl libcryptx-perl curl
tools/build-nginx.sh
tools/build-nginx-min.sh
make nginx
make debug
make release
make unit
make test-shm
tests/cli/cli.sh
tests/conf/syntax.sh
tests/proc/lifecycle.sh
git clone https://github.com/nginx/nginx-tests build/nginx-tests
NGINX_TESTS_DIR="$PWD/build/nginx-tests" tests/nginx-tests/run.sh build/ref-min/sbin/nginx ref-min 4
NGINX_TESTS_DIR="$PWD/build/nginx-tests" tests/nginx-tests/run.sh build/sbin/nginx cand 4
tests/nginx-tests/compare.sh cand ref-min ref-min