Skip to content

Commit

Permalink
Patch sigterm for version 1.17.0 too
Browse files Browse the repository at this point in the history
* Adds the missing patchfile for 1.17.0, meaning sigterm is now
   correctly patched for that version too.
* Removes the "default" patchfiles directory and makes the
   per-version directories mandatory, so future releases can't
   accidentally forget to add a new patchfile.
* Removes the patchfile for pgbouncer 1.7 since that version is
   no longer built.

Closes #150.
Closes #168.
  • Loading branch information
edmorley committed Sep 6, 2022
1 parent b90524d commit 0f132ed
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 20 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Binary file modified pgbouncer-heroku-22.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
--- 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");
- /* pidfile cleanup happens via atexit() */
- exit(1);
+ log_info("Got SIGTERM, ignoring!");
}

static void handle_sigint(evutil_socket_t sock, short flags, void *arg)
13 changes: 0 additions & 13 deletions support/patchfiles/1.7/0001-Disable-SIGTERM.patch

This file was deleted.

Empty file.
5 changes: 3 additions & 2 deletions support/pgbouncer-build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -e
set -euo pipefail

PGBOUNCER_VERSION=${PGBOUNCER_VERSION-1.14.0}

Expand All @@ -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

(
Expand Down

0 comments on commit 0f132ed

Please sign in to comment.