diff --git a/nginx-heroku-18.tgz b/nginx-heroku-18.tgz index 92eb6340..4a522f47 100644 Binary files a/nginx-heroku-18.tgz and b/nginx-heroku-18.tgz differ diff --git a/scripts/build_nginx b/scripts/build_nginx index 5c08fca7..691a1359 100755 --- a/scripts/build_nginx +++ b/scripts/build_nginx @@ -36,6 +36,26 @@ echo "Downloading $zlib_url" echo "Downloading $uuid4_url" (cd nginx-${NGINX_VERSION} && curl -L $uuid4_url | tar xvz ) +if [ -d "/buildpack/support/patchfiles/${NGINX_VERSION}" ] +then + PATCHFILES=$(find /buildpack/support/patchfiles/${NGINX_VERSION} -name '*.patch') +else + exit 1 +fi + + +NGX_SHUTDOWN_SIGNAL=TERM +NGX_TERMINATE_SIGNAL=QUIT + +( + cd nginx-${NGINX_VERSION} + for f in $PATCHFILES + do + echo "patch: $f" + patch -p0 < $f + done +) + # This will build `nginx` ( cd nginx-${NGINX_VERSION} diff --git a/support/patchfiles/1.18.0/001-Custom-Terminate-Signal.patch b/support/patchfiles/1.18.0/001-Custom-Terminate-Signal.patch new file mode 100644 index 00000000..d4291cee --- /dev/null +++ b/support/patchfiles/1.18.0/001-Custom-Terminate-Signal.patch @@ -0,0 +1,13 @@ +--- src/core/ngx_config.h 2020-05-23 04:21:07.000000000 +0000 ++++ src/core/ngx_config.h 2020-05-23 04:15:17.000000000 +0000 +@@ -56,9 +56,8 @@ + + #define ngx_random random + +-/* TODO: #ifndef */ +-#define NGX_SHUTDOWN_SIGNAL QUIT +-#define NGX_TERMINATE_SIGNAL TERM ++#define NGX_SHUTDOWN_SIGNAL TERM ++#define NGX_TERMINATE_SIGNAL QUIT + #define NGX_NOACCEPT_SIGNAL WINCH + #define NGX_RECONFIGURE_SIGNAL HUP