nginext has been renamed to unit.

This commit is contained in:
Igor Sysoev
2017-08-31 00:42:16 +03:00
parent 6160683544
commit f0e9e3ace9
35 changed files with 53 additions and 54 deletions

View File

@@ -180,7 +180,7 @@ done
$echo >> $NXT_MAKEFILE
# nginext executable.
# unit executable.
cat << END >> $NXT_MAKEFILE
@@ -193,7 +193,7 @@ $NXT_BUILD_DIR/$NXT_BIN: $NXT_BUILD_DIR/$NXT_LIB_STATIC \\
END
# nginext object files.
# unit object files.
for nxt_src in $NXT_MAKE_SRCS
do

View File

@@ -97,24 +97,23 @@ GOARCH = `${NXT_GO} env GOARCH`
${NXT_GO}: $NXT_BUILD_DIR/nxt_go_gen.h
$NXT_BUILD_DIR/nxt_go_gen.h:
$NXT_BUILD_DIR/nxt_go_gen.h: src/go/unit/*.go
GOPATH=`pwd` \\
CGO_CPPFLAGS='-DNXT_CONFIGURE \\
-I`pwd`/src' \\
${NXT_GO} build -o $NXT_BUILD_DIR/nxt_go_gen.a \\
--buildmode=c-archive nginext
--buildmode=c-archive go/unit
${NXT_GO}-install: ${NXT_GO}
install -d \$(GOPATH)/src/nginext
install -p ./src/nginext/*.c ./src/nginext/*.h \\
./src/nginext/*.go \$(GOPATH)/src/nginext/
install -d \$(GOPATH)/src/unit
install -p ./src/go/unit/* \$(GOPATH)/src/unit/
CGO_CFLAGS="-I\$(NXT_ROOT)/$NXT_BUILD_DIR -I\$(NXT_ROOT)/src" \\
CGO_LDFLAGS="-L\$(NXT_ROOT)/$NXT_BUILD_DIR ${NXT_LIBRT}" \\
GOPATH=$NXT_GO_PATH \\
${NXT_GO} install -v nginext
${NXT_GO} install -v unit
${NXT_GO}-uninstall:
rm -rf \$(GOPATH)/src/nginext
rm -f \$(GOPATH)/pkg/\$(GOOS)_\$(GOARCH)/nginext.a
rm -rf \$(GOPATH)/src/unit
rm -f \$(GOPATH)/pkg/\$(GOOS)_\$(GOARCH)/unit.a
END

View File

@@ -118,7 +118,7 @@ if grep ^$NXT_PHP_MODULE: $NXT_MAKEFILE 2>&1 > /dev/null; then
exit 1;
fi
$echo " + PHP module: nginext.${NXT_PHP_MODULE}"
$echo " + PHP module: unit.${NXT_PHP_MODULE}"
$echo >> $NXT_MAKEFILE
@@ -152,10 +152,10 @@ cat << END >> $NXT_MAKEFILE
all: ${NXT_PHP_MODULE}
${NXT_PHP_MODULE}: $NXT_BUILD_DIR/nginext.${NXT_PHP_MODULE}
${NXT_PHP_MODULE}: $NXT_BUILD_DIR/unit.${NXT_PHP_MODULE}
$NXT_BUILD_DIR/nginext.${NXT_PHP_MODULE}: $nxt_objs
$NXT_MODULE_LINK -o $NXT_BUILD_DIR/nginext.${NXT_PHP_MODULE} \\
$NXT_BUILD_DIR/unit.${NXT_PHP_MODULE}: $nxt_objs
$NXT_MODULE_LINK -o $NXT_BUILD_DIR/unit.${NXT_PHP_MODULE} \\
$nxt_objs ${NXT_PHP_LIB} ${NXT_PHP_LDFLAGS}
END

View File

@@ -115,7 +115,7 @@ if grep ^$NXT_PYTHON_MODULE: $NXT_MAKEFILE 2>&1 > /dev/null; then
exit 1;
fi
$echo " + Python module: nginext.${NXT_PYTHON_MODULE}"
$echo " + Python module: unit.${NXT_PYTHON_MODULE}"
$echo >> $NXT_MAKEFILE
@@ -149,10 +149,10 @@ cat << END >> $NXT_MAKEFILE
all: ${NXT_PYTHON_MODULE}
${NXT_PYTHON_MODULE}: $NXT_BUILD_DIR/nginext.${NXT_PYTHON_MODULE}
${NXT_PYTHON_MODULE}: $NXT_BUILD_DIR/unit.${NXT_PYTHON_MODULE}
$NXT_BUILD_DIR/nginext.${NXT_PYTHON_MODULE}: $nxt_objs
$NXT_MODULE_LINK -o $NXT_BUILD_DIR/nginext.${NXT_PYTHON_MODULE} \\
$NXT_BUILD_DIR/unit.${NXT_PYTHON_MODULE}: $nxt_objs
$NXT_MODULE_LINK -o $NXT_BUILD_DIR/unit.${NXT_PYTHON_MODULE} \\
$nxt_objs $NXT_PYTHON_LIBS
END

View File

@@ -22,7 +22,7 @@ nxt_feature_test="#include <sys/mman.h>
#include <sys/types.h>
int main() {
static char name[] = \"/nginext.configure\";
static char name[] = \"/unit.configure\";
shm_unlink(name);
@@ -49,7 +49,7 @@ nxt_feature_test="#include <linux/memfd.h>
#include <sys/syscall.h>
int main() {
static char name[] = \"/nginext.configure\";
static char name[] = \"/unit.configure\";
int fd = syscall(SYS_memfd_create, name, MFD_CLOEXEC);
if (fd == -1)

View File

@@ -7,11 +7,11 @@ cat << END
Configuration summary:
nginext pid file: "$NXT_PID"
nginext log file: "$NXT_LOG"
nginext modules path: "$NXT_MODULES"
unit pid file: "$NXT_PID"
unit log file: "$NXT_LOG"
unit modules path: "$NXT_MODULES"
nginext control API socket: "$NXT_CONTROL"
unit control API socket: "$NXT_CONTROL"
non-privileged user: "$NXT_USER"
non-privileged group: "$NXT_GROUP"

6
configure vendored
View File

@@ -27,13 +27,13 @@ NXT_AUTOCONF_ERR=$NXT_BUILD_DIR/autoconf.err
NXT_AUTOCONF_DATA=$NXT_BUILD_DIR/autoconf.data
NXT_AUTO_CONFIG_H=$NXT_BUILD_DIR/nxt_auto_config.h
NXT_MAKEFILE=$NXT_BUILD_DIR/Makefile
NXT_BIN=nginext
NXT_BIN=unitd
CC=${CC:-cc}
NXT_PID="nginext.pid"
NXT_LOG="nginext.log"
NXT_PID="unit.pid"
NXT_LOG="unit.log"
NXT_MODULES="modules/"
NXT_CONTROL="unix:control.unit.sock"
NXT_USER="nobody"

View File

@@ -5,7 +5,7 @@
* Copyright (C) NGINX, Inc.
*/
package nginext
package unit
import "C"
import "unsafe"

View File

@@ -5,7 +5,7 @@
* Copyright (C) NGINX, Inc.
*/
package nginext
package unit
import "C"
import "unsafe"

View File

@@ -49,7 +49,7 @@ nxt_go_new_port_mmap(nxt_go_process_t *process, nxt_port_id_t id)
return NULL;
}
name_len = snprintf(name, sizeof(name) - 1, "/nginext.go.%p", name);
name_len = snprintf(name, sizeof(name) - 1, "/unit.go.%p", name);
#if (NXT_HAVE_MEMFD_CREATE)
fd = syscall(SYS_memfd_create, name, MFD_CLOEXEC);

View File

@@ -3,7 +3,7 @@
* Copyright (C) NGINX, Inc.
*/
package nginext
package unit
/*
#include "nxt_go_lib.h"

View File

@@ -3,7 +3,7 @@
* Copyright (C) NGINX, Inc.
*/
package nginext
package unit
/*
#include "nxt_go_lib.h"

View File

@@ -3,7 +3,7 @@
* Copyright (C) NGINX, Inc.
*/
package nginext
package unit
/*
#include "nxt_go_lib.h"

View File

@@ -3,7 +3,7 @@
* Copyright (C) NGINX, Inc.
*/
package nginext
package unit
/*
#include "nxt_go_lib.h"

View File

@@ -1076,7 +1076,7 @@ nxt_controller_response(nxt_task_t *task, nxt_controller_request_t *req,
body->mem.free = nxt_cpymem(body->mem.free, "\r\n", 2);
size = sizeof("HTTP/1.1 " "\r\n") - 1 + status_line.length
+ sizeof("Server: nginext/0.1\r\n") - 1
+ sizeof("Server: unit/" NXT_VERSION "\r\n") - 1
+ sizeof("Date: Wed, 31 Dec 1986 16:40:00 GMT\r\n") - 1
+ sizeof("Content-Type: application/json\r\n") - 1
+ sizeof("Content-Length: " "\r\n") - 1 + NXT_SIZE_T_LEN
@@ -1098,7 +1098,7 @@ nxt_controller_response(nxt_task_t *task, nxt_controller_request_t *req,
status_line.length);
nxt_str_set(&str, "\r\n"
"Server: nginext/0.1\r\n"
"Server: unit/" NXT_VERSION "\r\n"
"Date: ");
b->mem.free = nxt_cpymem(b->mem.free, str.start, str.length);

View File

@@ -16,7 +16,7 @@ main(int argc, char **argv)
{
nxt_int_t ret;
if (nxt_lib_start("nginext", argv, &environ) != NXT_OK) {
if (nxt_lib_start("unit", argv, &environ) != NXT_OK) {
return 1;
}
@@ -30,7 +30,7 @@ main(int argc, char **argv)
return 1;
}
nxt_log(&nxt_main_task, NXT_LOG_INFO, "nginext started");
nxt_log(&nxt_main_task, NXT_LOG_INFO, "unit started");
nxt_event_engine_start(nxt_main_task.thread->engine);

View File

@@ -270,7 +270,7 @@ nxt_main_process_title(nxt_task_t *task)
end = title + sizeof(title) - 1;
p = nxt_sprintf(title, end, "nginext: main [%s", nxt_process_argv[0]);
p = nxt_sprintf(title, end, "unit: main [%s", nxt_process_argv[0]);
for (i = 1; nxt_process_argv[i] != NULL; i++) {
p = nxt_sprintf(p, end, " %s", nxt_process_argv[i]);

View File

@@ -59,7 +59,7 @@ static void nxt_php_flush(void *server_context);
static sapi_module_struct nxt_php_sapi_module =
{
(char *) "cli-server",
(char *) "nginext",
(char *) "unit",
nxt_php_startup, /* startup */
php_module_shutdown_wrapper, /* shutdown */
@@ -497,13 +497,13 @@ nxt_php_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
static const u_char default_repsonse[]
= "HTTP/1.1 200 OK\r\n"
"Server: nginext/0.1\r\n"
"Server: unit/" NXT_VERSION "\r\n"
"Content-Type: text/html; charset=UTF-8\r\n"
"Connection: close\r\n"
"\r\n";
static const u_char default_headers[]
= "Server: nginext/0.1\r\n"
- "Server: unit/" NXT_VERSION "\r\n"
"Connection: close\r\n";
static const u_char http_11[] = "HTTP/1.1 ";

View File

@@ -236,7 +236,7 @@ nxt_port_new_port_mmap(nxt_task_t *task, nxt_process_t *process,
return NULL;
}
p = nxt_sprintf(name, name + sizeof(name), "/nginext.%PI.%uxD",
p = nxt_sprintf(name, name + sizeof(name), "/unit.%PI.%uxD",
nxt_pid, nxt_random(&task->thread->random));
*p = '\0';

View File

@@ -104,7 +104,7 @@ nxt_process_start(nxt_task_t *task, nxt_process_t *process)
nxt_log(task, NXT_LOG_INFO, "%s started", init->name);
nxt_process_title(task, "nginext: %s", init->name);
nxt_process_title(task, "unit: %s", init->name);
thread = task->thread;

View File

@@ -107,7 +107,7 @@ NXT_EXPORT nxt_application_module_t nxt_app_module = {
static PyMethodDef nxt_py_start_resp_method[] = {
{"nginext_start_response", nxt_py_start_resp, METH_VARARGS, ""}
{"unit_start_response", nxt_py_start_resp, METH_VARARGS, ""}
};
@@ -121,7 +121,7 @@ static PyMethodDef nxt_py_input_methods[] = {
static PyTypeObject nxt_py_input_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"nginext._input", /* tp_name */
"unit._input", /* tp_name */
(int) sizeof(nxt_py_input_t), /* tp_basicsize */
0, /* tp_itemsize */
(destructor) nxt_py_input_dealloc, /* tp_dealloc */
@@ -140,7 +140,7 @@ static PyTypeObject nxt_py_input_type = {
0, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
"nginext input object.", /* tp_doc */
"unit input object.", /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
@@ -247,7 +247,7 @@ nxt_python_init(nxt_task_t *task, nxt_common_app_conf_t *conf)
nxt_py_environ_ptyp = obj;
obj = Py_BuildValue("[s]", "nginext");
obj = Py_BuildValue("[s]", "unit");
if (obj == NULL) {
nxt_log_alert(task->log,
"Python failed to create the \"sys.argv\" list");
@@ -730,7 +730,7 @@ nxt_py_start_resp(PyObject *self, PyObject *args)
static const u_char resp[] = "HTTP/1.1 ";
static const u_char default_headers[]
= "Server: nginext/0.1\r\n"
= "Server: unit/" NXT_VERSION "\r\n"
"Connection: close\r\n";
static const u_char cr_lf[] = "\r\n";

View File

@@ -763,7 +763,7 @@ nxt_runtime_conf_init(nxt_task_t *task, nxt_runtime_t *rt)
slash = "/";
}
ret = nxt_file_name_create(rt->mem_pool, &file_name, "%s%snginext.*%Z",
ret = nxt_file_name_create(rt->mem_pool, &file_name, "%s%sunit.*%Z",
rt->modules, slash);
if (nxt_slow_path(ret != NXT_OK)) {
return NXT_ERROR;
@@ -797,7 +797,7 @@ nxt_runtime_conf_read_cmd(nxt_task_t *task, nxt_runtime_t *rt)
u_char buf[1024];
static const char version[] =
"nginext version: " NXT_VERSION "\n"
"unit version: " NXT_VERSION "\n"
"configured as ./configure" NXT_CONFIGURE_OPTIONS "\n";
static const char no_control[] =
@@ -811,11 +811,11 @@ nxt_runtime_conf_read_cmd(nxt_task_t *task, nxt_runtime_t *rt)
static const char help[] =
"\n"
"nginext options:\n"
"unit options:\n"
"\n"
" --version print nginext version and configure options\n"
" --version print unit version and configure options\n"
"\n"
" --no-daemon run nginext in non-daemon mode\n"
" --no-daemon run unit in non-daemon mode\n"
"\n"
" --control ADDRESS set address of control API socket\n"
" default: \"" NXT_CONTROL_SOCK "\"\n"