Created attachment 182250 [details]
Patch to 1.7.2_3
LibreSSL 2.5.1 makes many internal symbols private, including those used by pgbouncer to pad out its TLS connection logs with DH/ECDH information.
Fix compilation by adding a version check for < 2.5.1.
Upstream pull request here: https://github.com/libusual/libusual/pull/17
Thanks for your work. However the patch fails to apply clearly against recent pgbounder port.
Created attachment 182494 [details]
Only conflict will have been the version change in the Makefile.
I guess there's no point bumping the port version - it won't change the binary for OpenSSL users, and it won't be building in the first place for users of recent LibreSSL.
Patch updated with just the patch for files/
However the patch is still not perfect since it produces a warning due to undefined LIBRESSL_VERSION_NUMBER.
lib/usual/tls/tls.c:290:38: warning: 'LIBRESSL_VERSION_NUMBER' is not defined, evaluates to 0 [-Wundef]
#if defined(USE_LIBSSL_INTERNALS) && LIBRESSL_VERSION_NUMBER < 0x2050100fL
It is good practice to check if variable is defined before using it.
Created attachment 182811 [details]
Updated patch 2
Whoops, serves me right for not having an OpenSSL test set.
Created attachment 182812 [details]
poudriere testport 11.0-RELEASE w/ OpenSSL
Created attachment 182813 [details]
poudriere testport 11.0-RELEASE w/ LibreSSL
Comment on attachment 182811 [details]
Updated patch 2
A commit references this bug:
Date: Fri Oct 6 19:13:47 UTC 2017
New revision: 451403
databases/pgbouncer: Add patch for LibreSSL 2.5 support
Submitted by: Tom Hurst <email@example.com>
Approved by: firstname.lastname@example.org (maintainer)