diff --git a/bin/nginx-debug-heroku-18 b/bin/nginx-debug-heroku-18 index b3cf63a..9184d72 100755 Binary files a/bin/nginx-debug-heroku-18 and b/bin/nginx-debug-heroku-18 differ diff --git a/bin/nginx-heroku-18 b/bin/nginx-heroku-18 index 02cc38a..8d4f024 100755 Binary files a/bin/nginx-heroku-18 and b/bin/nginx-heroku-18 differ diff --git a/scripts/build_nginx b/scripts/build_nginx index c365d3d..3c057fd 100755 --- a/scripts/build_nginx +++ b/scripts/build_nginx @@ -41,6 +41,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/scripts/patchfiles/${NGINX_VERSION} -name '*.patch') +else + PATCHFILES=$(find /buildpack/scripts/patchfiles/default -name '*.patch') +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 +) + ( cd nginx-${NGINX_VERSION} ./configure \ diff --git a/scripts/patchfiles/1.18.0/0001-Custom-Terminate-Signal.patch b/scripts/patchfiles/1.18.0/0001-Custom-Terminate-Signal.patch new file mode 100644 index 0000000..d4291ce --- /dev/null +++ b/scripts/patchfiles/1.18.0/0001-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 diff --git a/scripts/patchfiles/default/.gitkeep b/scripts/patchfiles/default/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/scripts/patchfiles/default/.gitkeep @@ -0,0 +1 @@ +