diff --git a/Changelog.md b/Changelog.md index f05211b..1587a04 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ ## Unreleased +## v0.12.0 (September 6, 2022) +* Add missing `SIGTERM` patch for v1.17.0 (corrects shutdown behaviour on Heroku-22) + ## v0.11.0 (June 20, 2022) * Update to pgbouncer v1.17.0 on Heroku-22, to fix OpenSSL 3 related crashes diff --git a/pgbouncer-heroku-22.tgz b/pgbouncer-heroku-22.tgz index 8ff2a76..bbeaa00 100644 Binary files a/pgbouncer-heroku-22.tgz and b/pgbouncer-heroku-22.tgz differ diff --git a/support/patchfiles/1.13.0/0001-Disable-SIGTERM.patch b/support/patchfiles/1.17.0/0001-Disable-SIGTERM.patch similarity index 69% rename from support/patchfiles/1.13.0/0001-Disable-SIGTERM.patch rename to support/patchfiles/1.17.0/0001-Disable-SIGTERM.patch index 6012ffd..0e59448 100644 --- a/support/patchfiles/1.13.0/0001-Disable-SIGTERM.patch +++ b/support/patchfiles/1.17.0/0001-Disable-SIGTERM.patch @@ -1,7 +1,7 @@ ---- src/main.c 2019-09-26 21:37:14.000000000 +0000 -+++ src/main.c 2020-03-20 20:43:20.876976754 +0000 -@@ -425,9 +425,7 @@ - +--- src/main.c ++++ src/main.c +@@ -445,9 +445,7 @@ + static void handle_sigterm(evutil_socket_t sock, short flags, void *arg) { - log_info("got SIGTERM, fast exit"); @@ -9,5 +9,5 @@ - exit(1); + log_info("Got SIGTERM, ignoring!"); } - + static void handle_sigint(evutil_socket_t sock, short flags, void *arg) diff --git a/support/patchfiles/1.7/0001-Disable-SIGTERM.patch b/support/patchfiles/1.7/0001-Disable-SIGTERM.patch deleted file mode 100644 index 6cea825..0000000 --- a/support/patchfiles/1.7/0001-Disable-SIGTERM.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- src/main.c 2020-03-20 20:11:32.046384770 +0000 -+++ src/main_patched.c 2020-03-20 20:14:02.436366750 +0000 -@@ -402,9 +402,7 @@ - - static void handle_sigterm(int sock, short flags, void *arg) - { -- log_info("Got SIGTERM, fast exit"); -- /* pidfile cleanup happens via atexit() */ -- exit(1); -+ log_info("Got SIGTERM, ignoring!"); - } - - static void handle_sigint(int sock, short flags, void *arg) diff --git a/support/patchfiles/default/.gitkeep b/support/patchfiles/default/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/support/pgbouncer-build b/support/pgbouncer-build index 4d49733..bc0c5ef 100755 --- a/support/pgbouncer-build +++ b/support/pgbouncer-build @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -euo pipefail PGBOUNCER_VERSION=${PGBOUNCER_VERSION-1.14.0} @@ -18,7 +18,8 @@ if [ -d "/buildpack/support/patchfiles/${PGBOUNCER_VERSION}" ] then PATCHFILES=$(find /buildpack/support/patchfiles/"${PGBOUNCER_VERSION}" -name '*.patch') else - PATCHFILES=$(find /buildpack/support/patchfiles/default -name '*.patch') + echo "Missing patchfiles directory for ${PGBOUNCER_VERSION}!" >&2 + exit 1 fi (