diff options
author | Andrei Belov <defan@nginx.com> | 2019-12-26 17:52:09 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2019-12-26 17:52:09 +0300 |
commit | 35ff5ee1e82a03e57d625230173a84c829c13257 (patch) | |
tree | c3dce5e8d50c8da9739f23b41a636931ad562e25 /auto | |
parent | 0ec222bbb202194327c2e76d48f0b2608b37c162 (diff) | |
parent | 55f8e31ed70910ef07db31d7f3c53b12774180f9 (diff) | |
download | unit-35ff5ee1e82a03e57d625230173a84c829c13257.tar.gz unit-35ff5ee1e82a03e57d625230173a84c829c13257.tar.bz2 |
Merged with the default branch.1.14.0-1
Diffstat (limited to '')
-rw-r--r-- | auto/isolation | 5 | ||||
-rw-r--r-- | auto/modules/go | 34 | ||||
-rw-r--r-- | auto/modules/java_get_jar | 9 | ||||
-rw-r--r-- | auto/sources | 8 | ||||
-rw-r--r-- | auto/unix | 20 |
5 files changed, 58 insertions, 18 deletions
diff --git a/auto/isolation b/auto/isolation index c26a4991..d231de12 100644 --- a/auto/isolation +++ b/auto/isolation @@ -5,6 +5,7 @@ NXT_ISOLATION=NO NXT_HAVE_CLONE=NO +NXT_HAVE_CLONE_NEWUSER=NO nsflags="USER NS PID NET UTS CGROUP" @@ -42,6 +43,10 @@ if [ $nxt_found = yes ]; then . auto/feature if [ $nxt_found = yes ]; then + if [ $flag = "USER" ]; then + NXT_HAVE_CLONE_NEWUSER=YES + fi + if [ "$NXT_ISOLATION" = "NO" ]; then NXT_ISOLATION=$flag else diff --git a/auto/modules/go b/auto/modules/go index 51b5979d..2d53dd65 100644 --- a/auto/modules/go +++ b/auto/modules/go @@ -72,7 +72,9 @@ fi NXT_GO_PATH=${NXT_GO_PATH=`${NXT_GO} env GOPATH`} -NXT_GO_PATH=${NXT_GO_PATH:-`pwd`/${NXT_GO}} +NXT_GO_PATH=${NXT_GO_PATH:-${PWD}/${NXT_BUILD_DIR}/${NXT_GO}} + +NXT_GO_PKG=unit.nginx.org/go $echo " + Go package path: \"${NXT_GO_PATH}\"" @@ -88,7 +90,6 @@ cat << END >> $NXT_MAKEFILE .PHONY: ${NXT_GO} .PHONY: ${NXT_GO}-install .PHONY: ${NXT_GO}-install-src -.PHONY: ${NXT_GO}-install-build .PHONY: ${NXT_GO}-uninstall GOPATH = $NXT_GO_PATH @@ -101,23 +102,30 @@ install: ${NXT_GO}-install ${NXT_GO}: -${NXT_GO}-install: ${NXT_GO}-install-build +${NXT_GO}-install: ${NXT_GO}-install-src ${NXT_GO}-install-env + GOPATH=\$(DESTDIR)\$(GOPATH) ${NXT_GO} build ${NXT_GO_PKG} + +${NXT_GO}-install-src: + install -d \$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG} + install -p -m644 ./go/* \$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG}/ -${NXT_GO}-install-src: ${NXT_VERSION_H} - install -d \$(DESTDIR)\$(NXT_GO_DST)/src/nginx/unit - install -p -m644 ./src/*.h ./build/*.h ./src/go/unit/* \ - ./src/nxt_unit.c ./src/nxt_lvlhsh.c ./src/nxt_murmur_hash.c \ - ./src/nxt_websocket.c \ - \$(DESTDIR)\$(NXT_GO_DST)/src/nginx/unit/ +${NXT_GO}-install-env: \$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG}/env.go \ + ${NXT_VERSION_H} ${NXT_BUILD_DIR}/${NXT_LIB_UNIT_STATIC} -${NXT_GO}-install-build: ${NXT_GO}-install-src - GOPATH=\$(DESTDIR)\$(GOPATH) ${NXT_GO} build nginx/unit +\$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG}/env.go: + install -d \$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG} + $echo "package unit" > \$@ + $echo "/*" >> \$@ + $echo "#cgo CPPFLAGS: -I${PWD}/src -I${PWD}/${NXT_BUILD_DIR}" >> \$@ + $echo "#cgo LDFLAGS: -L${PWD}/${NXT_BUILD_DIR}" >> \$@ + $echo "*/" >> \$@ + $echo 'import "C"' >> \$@ uninstall: ${NXT_GO}-uninstall ${NXT_GO}-uninstall: - rm -rf \$(DESTDIR)\$(NXT_GO_DST)/src/nginx/unit - rm -rf \$(DESTDIR)\$(NXT_GO_DST)/pkg/\$(GOOS)_\$(GOARCH)/nginx/unit + rm -rf \$(DESTDIR)\$(NXT_GO_DST)/src/${NXT_GO_PKG} + rm -rf \$(DESTDIR)\$(NXT_GO_DST)/pkg/\$(GOOS)_\$(GOARCH)/${NXT_GO_PKG} END diff --git a/auto/modules/java_get_jar b/auto/modules/java_get_jar index c61d0a53..52cd146f 100644 --- a/auto/modules/java_get_jar +++ b/auto/modules/java_get_jar @@ -8,7 +8,9 @@ # NXT_JAR_LOCAL_REPO=$HOME/.m2/repository/ NXT_JAR_FILE=${NXT_JAR_NAME}-${NXT_JAR_VERSION}.jar -NXT_JAR_LOCAL="${NXT_JAR_LOCAL_REPO}${NXT_JAR_NAMESPACE}${NXT_JAR_NAME}/${NXT_JAR_VERSION}/${NXT_JAR_FILE}" +NXT_JAR_LOCAL_DIR="${NXT_JAR_LOCAL_REPO}${NXT_JAR_NAMESPACE}${NXT_JAR_NAME}/${NXT_JAR_VERSION}" +NXT_JAR_LOCAL="${NXT_JAR_LOCAL_DIR}/${NXT_JAR_FILE}" +NXT_JAR_LOCAL_TMP="${NXT_JAR_LOCAL_DIR}/.${NXT_JAR_FILE}.$$" NXT_JAR_URL=${NXT_JAR_REPO}${NXT_JAR_NAMESPACE}${NXT_JAR_NAME}/${NXT_JAR_VERSION}/${NXT_JAR_FILE} if [ ! -f "$NXT_BUILD_DIR/$NXT_JAR_FILE" ]; then @@ -16,8 +18,9 @@ if [ ! -f "$NXT_BUILD_DIR/$NXT_JAR_FILE" ]; then $echo "getting remote $NXT_JAR_FILE ... " $echo "getting remote $NXT_JAR_FILE ..." >> $NXT_AUTOCONF_ERR - mkdir -p "${NXT_JAR_LOCAL_REPO}${NXT_JAR_NAMESPACE}${NXT_JAR_NAME}/${NXT_JAR_VERSION}/" - curl --progress-bar "$NXT_JAR_URL" -o "$NXT_JAR_LOCAL" + mkdir -p "${NXT_JAR_LOCAL_DIR}" + curl --progress-bar "$NXT_JAR_URL" -o "$NXT_JAR_LOCAL_TMP" + mv "$NXT_JAR_LOCAL_TMP" "$NXT_JAR_LOCAL" else $echo "getting local $NXT_JAR_FILE" $echo "getting local $NXT_JAR_FILE ..." >> $NXT_AUTOCONF_ERR diff --git a/auto/sources b/auto/sources index 155e388b..98e4a1f4 100644 --- a/auto/sources +++ b/auto/sources @@ -13,6 +13,7 @@ NXT_LIB_SRCS=" \ src/nxt_mem_map.c \ src/nxt_socket.c \ src/nxt_socketpair.c \ + src/nxt_credential.c \ src/nxt_process.c \ src/nxt_process_title.c \ src/nxt_signal.c \ @@ -84,6 +85,7 @@ NXT_LIB_SRCS=" \ src/nxt_http_response.c \ src/nxt_http_error.c \ src/nxt_http_route.c \ + src/nxt_http_route_addr.c \ src/nxt_http_static.c \ src/nxt_http_proxy.c \ src/nxt_application.c \ @@ -162,6 +164,12 @@ NXT_TEST_SRCS=" \ src/test/nxt_strverscmp_test.c \ " + +if [ $NXT_HAVE_CLONE_NEWUSER = YES ]; then + NXT_TEST_SRCS="$NXT_TEST_SRCS src/test/nxt_clone_test.c" +fi + + NXT_LIB_UTF8_FILE_NAME_TEST_SRCS=" \ src/test/nxt_utf8_file_name_test.c \ " @@ -186,8 +186,8 @@ nxt_feature_libs= nxt_feature_test="#include <spawn.h> #include <unistd.h> - int main() { - (void) posix_spawn(NULL, NULL, NULL, NULL, NULL, NULL); + int main(int argc, char *argv[]) { + (void) posix_spawn(NULL, \"\", NULL, NULL, argv, NULL); return 0; }" . auto/feature @@ -208,3 +208,19 @@ nxt_feature_test="#include <stdlib.h> return 0; }" . auto/feature + + +# Linux, FreeBSD, Solaris getgrouplist() +nxt_feature="getgrouplist()" +nxt_feature_name=NXT_HAVE_GETGROUPLIST +nxt_feature_run= +nxt_feature_incs= +nxt_feature_libs= +nxt_feature_test="#include <unistd.h> + #include <grp.h> + + int main() { + getgrouplist(\"root\", 0, NULL, NULL); + return 0; + }" +. auto/feature |