From 42e4b5a4d492187309518e5e387bae5f9184d02c Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Thu, 20 Sep 2018 00:41:19 +0200 Subject: [PATCH] nginx: Update from 1.14.0 to 1.15.3 Also fix compilation error with ndk r18. Also remove use of aio due to seccomp filter. --- packages/nginx/build.sh | 6 ++---- packages/nginx/src-core-ngx_cycle.c.patch | 12 +++++++++++ packages/nginx/src-core-ngx_file.c.patch | 12 +++++++++++ ...src-event-modules-ngx_epoll_module.c.patch | 20 +++++++++++++++++++ 4 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 packages/nginx/src-core-ngx_cycle.c.patch create mode 100644 packages/nginx/src-core-ngx_file.c.patch create mode 100644 packages/nginx/src-event-modules-ngx_epoll_module.c.patch diff --git a/packages/nginx/build.sh b/packages/nginx/build.sh index 2da6396ed..f0cf8e8ba 100644 --- a/packages/nginx/build.sh +++ b/packages/nginx/build.sh @@ -1,8 +1,7 @@ TERMUX_PKG_HOMEPAGE=https://www.nginx.org TERMUX_PKG_DESCRIPTION="Lightweight HTTP server" -TERMUX_PKG_VERSION=1.14.0 -TERMUX_PKG_REVISION=1 -TERMUX_PKG_SHA256=5d15becbf69aba1fe33f8d416d97edd95ea8919ea9ac519eff9bafebb6022cb5 +TERMUX_PKG_VERSION=1.15.3 +TERMUX_PKG_SHA256=9391fb91c3e2ebd040a4e3ac2b2f0893deb6232edc30a8e16fcc9c3fa9d6be85 TERMUX_PKG_SRCURL=http://nginx.org/download/nginx-$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_BUILD_IN_SRC=true TERMUX_PKG_DEPENDS="libandroid-glob, libcrypt, pcre, openssl" @@ -32,7 +31,6 @@ termux_step_configure () { --with-ld-opt="$LDFLAGS" \ --with-pcre \ --with-pcre-jit \ - --with-file-aio \ --with-threads \ --with-ipv6 \ --sbin-path="$TERMUX_PREFIX/bin/nginx" \ diff --git a/packages/nginx/src-core-ngx_cycle.c.patch b/packages/nginx/src-core-ngx_cycle.c.patch new file mode 100644 index 000000000..3ff25ca21 --- /dev/null +++ b/packages/nginx/src-core-ngx_cycle.c.patch @@ -0,0 +1,12 @@ +diff -u -r ../nginx-1.15.3/src/core/ngx_cycle.c ./src/core/ngx_cycle.c +--- ../nginx-1.15.3/src/core/ngx_cycle.c 2018-08-28 15:36:00.000000000 +0000 ++++ ./src/core/ngx_cycle.c 2018-09-19 22:13:38.876609223 +0000 +@@ -1130,7 +1130,7 @@ + continue; + } + +-#if !(NGX_WIN32) ++#if !(NGX_WIN32) && !defined(__ANDROID__) + if (user != (ngx_uid_t) NGX_CONF_UNSET_UINT) { + ngx_file_info_t fi; + diff --git a/packages/nginx/src-core-ngx_file.c.patch b/packages/nginx/src-core-ngx_file.c.patch new file mode 100644 index 000000000..7756718c4 --- /dev/null +++ b/packages/nginx/src-core-ngx_file.c.patch @@ -0,0 +1,12 @@ +diff -u -r ../nginx-1.15.3/src/core/ngx_file.c ./src/core/ngx_file.c +--- ../nginx-1.15.3/src/core/ngx_file.c 2018-08-28 15:36:00.000000000 +0000 ++++ ./src/core/ngx_file.c 2018-09-19 22:12:25.665430137 +0000 +@@ -618,7 +618,7 @@ + continue; + } + +-#if !(NGX_WIN32) ++#if !(NGX_WIN32) && !defined(__ANDROID__) + { + ngx_file_info_t fi; + diff --git a/packages/nginx/src-event-modules-ngx_epoll_module.c.patch b/packages/nginx/src-event-modules-ngx_epoll_module.c.patch new file mode 100644 index 000000000..754192a7f --- /dev/null +++ b/packages/nginx/src-event-modules-ngx_epoll_module.c.patch @@ -0,0 +1,20 @@ +diff -u -r ../nginx-1.15.3/src/event/modules/ngx_epoll_module.c ./src/event/modules/ngx_epoll_module.c +--- ../nginx-1.15.3/src/event/modules/ngx_epoll_module.c 2018-08-28 15:36:00.000000000 +0000 ++++ ./src/event/modules/ngx_epoll_module.c 2018-09-19 21:55:21.381079239 +0000 +@@ -591,16 +591,12 @@ + if (event == NGX_READ_EVENT) { + e = c->write; + prev = EPOLLOUT; +-#if (NGX_READ_EVENT != EPOLLIN|EPOLLRDHUP) + events = EPOLLIN|EPOLLRDHUP; +-#endif + + } else { + e = c->read; + prev = EPOLLIN|EPOLLRDHUP; +-#if (NGX_WRITE_EVENT != EPOLLOUT) + events = EPOLLOUT; +-#endif + } + + if (e->active) {