Update databases/pgbouncer to 1.7.2. Set up a separate user, previous PGUSER/PGGROUP integration didn't make sense. 2016-02-26 - PgBouncer 1.7.2 - "Finally Airborne" - Fix crash on stale pidfile removal. Problem introduced in 1.7.1. - Disable cleanup - it breaks takeover and is not useful for production loads. Problem introduced in 1.7.1. - After takeover, wait until pidfile is gone before booting. Slow shutdown due to memory cleanup exposed existing race. (#113) - Make build reproducible by dropping DBGVER handling. (#112) - Antimake: Sort file list from $(wildcard), newer gmake does not sort it anymore. (#111) - Show libssl version in log. - deb: Turn on full hardening. 2016-02-18 - PgBouncer 1.7.1 - "Forward To Five Friends Or Else" - WARNING: Since version 1.7, server_reset_query is not executed when database is in transaction-pooling mode. Seems this was not highlighted enough in 1.7 announcement. If your apps depend on that happening, use server_reset_query_always to restore previous behaviour. - TLS: Rename sslmode "disabled" to "disable" as that is what PostgreSQL uses. - TLS: client_tls_sslmode=verify-ca/-full now reject connections without client certificate. (#104) - TLS: client_tls_sslmode=allow/require do validate client certificate if sent. Previously they left cert validation unconfigured so connections with client cert failed. (#105) - Fix memleak when freeing database. - Fix potential memleak in tls_handshake(). - Fix EOF handling in tls_handshake(). - Fix too small memset in asn1_time_parse compat. - Fix non-TLS (--without-openssl) build. (#101) - Fix various issues with Windows build. (#100) - TLS: Use SSL_MODE_RELEASE_BUFFERS to decrease memory usage of inactive connections. - Clean allocated memory on exit. Helps to run memory-leak checkers. - Improve server_reset_query documentation. (#110) - Add TLS options to sample config. 2015-12-18 - PgBouncer 1.7 - "Colors Vary After Resurrection" - Support TLS connections. OpenSSL/LibreSSL is used as backend implementation. - Support authentication via TLS client certificate. - Support "peer" authentication on Unix sockets. - Support Host Based Access control file, like pg_hba.conf in Postgres. This allows to configure TLS for network connections and "peer" authentication for local connections. - Set query_wait_timeout to 120s by default. Current default (0) causes infinite queueing, which is not useful. That means if client has pending query and has not been assigned to server connection, the client connection will be dropped. - Disable server_reset_query_always by default. Now reset query is used only in pools that are in session mode. - Increase pkt_buf to 4096 bytes. Improves performance with TLS. The behaviour is probably load-specific, but it should be safe to do as since v1.2 the packet buffers are split from connections and used lazily from pool. - Support pipelining count expected ReadyForQuery packets. This avoids releasing server too early. Fixes #52. - Improved sbuf_loopcnt logic - socket is guarateed to be reprocessed even if there are no event from socket. Required for TLS as it has it's own buffering. - Adapt system tests to work with modern BSD and MacOS. (Eric Radman) - Remove crypt auth. It's obsolete and not supported by PostgreSQL since 8.4. - Fix plain "--with-cares" configure option - without argument it was broken.diff -r1.10 -r1.11 pkgsrc/databases/pgbouncer/Makefile
(fhajny)
@@ -1,48 +1,46 @@ | @@ -1,48 +1,46 @@ | |||
1 | # $NetBSD: Makefile,v 1.10 2016/03/05 11:28:13 jperkin Exp $ | 1 | # $NetBSD: Makefile,v 1.11 2016/03/15 11:29:35 fhajny Exp $ | |
2 | # | 2 | # | |
3 | 3 | |||
4 | DISTNAME= pgbouncer-1.6.1 | 4 | DISTNAME= pgbouncer-1.7.2 | |
5 | PKGREVISION= 1 | |||
6 | CATEGORIES= databases | 5 | CATEGORIES= databases | |
7 | MASTER_SITES= http://pgbouncer.github.io/downloads/files/${PKGVERSION_NOREV}/ | 6 | MASTER_SITES= http://pgbouncer.github.io/downloads/files/${PKGVERSION_NOREV}/ | |
8 | 7 | |||
9 | MAINTAINER= pkgsrc@NetBSD.org | 8 | MAINTAINER= pkgsrc@NetBSD.org | |
10 | HOMEPAGE= http://pgbouncer.github.io/ | 9 | HOMEPAGE= http://pgbouncer.github.io/ | |
11 | COMMENT= Lightweight connection pooler for PostgreSQL | 10 | COMMENT= Lightweight connection pooler for PostgreSQL | |
12 | LICENSE= original-bsd | 11 | LICENSE= original-bsd | |
13 | 12 | |||
14 | USE_LANGUAGES= c | 13 | USE_LANGUAGES= c | |
15 | USE_TOOLS+= gmake | 14 | USE_TOOLS+= gmake | |
16 | GNU_CONFIGURE= yes | 15 | GNU_CONFIGURE= yes | |
17 | 16 | |||
18 | .include "../../mk/bsd.prefs.mk" | 17 | .include "../../mk/bsd.prefs.mk" | |
19 | 18 | |||
20 | PGUSER?= pgsql | 19 | PGB_USER?= pgbounce | |
21 | PGGROUP?= pgsql | 20 | PGB_GROUP?= pgbounce | |
22 | PKG_GROUPS= ${PGGROUP} | |||
23 | PKG_USERS= ${PGUSER}:${PGGROUP} | |||
24 | PKG_GECOS.${PGUSER}= PostgreSQL database administrator | |||
25 | PKG_HOME.${PGUSER}= ${PGHOME} | |||
26 | ||||
27 | BUILD_DEFS+= PGUSER PGGROUP PGHOME VARBASE | |||
28 | FILES_SUBST+= PGUSER=${PGUSER} | |||
29 | FILES_SUBST+= PGGROUP=${PGGROUP} | |||
30 | FILES_SUBST+= PGHOME=${PGHOME} | |||
31 | ||||
32 | PGB_LOG_DIR?= ${VARBASE}/log/pgbouncer | 21 | PGB_LOG_DIR?= ${VARBASE}/log/pgbouncer | |
33 | PGB_RUN_DIR?= ${VARBASE}/run | 22 | PGB_RUN_DIR?= ${VARBASE}/run | |
34 | 23 | |||
35 | OWN_DIRS_PERMS+= ${PGB_LOG_DIR} ${PGUSER} ${PGGROUP} 0755 | 24 | PKG_GROUPS= ${PGB_GROUP} | |
25 | PKG_USERS= ${PGB_USER}:${PGB_GROUP} | |||
26 | PKG_GECOS.${PGB_USER}= PgBouncer daemon user | |||
27 | PKG_HOME.${PGB_USER}= ${PGB_LOG_DIR} | |||
28 | ||||
29 | BUILD_DEFS+= PGB_USER PGB_GROUP VARBASE | |||
30 | FILES_SUBST+= PGB_USER=${PGB_USER} | |||
31 | FILES_SUBST+= PGB_GROUP=${PGB_GROUP} | |||
32 | ||||
33 | OWN_DIRS_PERMS+= ${PGB_LOG_DIR} ${PGB_USER} ${PGB_GROUP} 0755 | |||
36 | 34 | |||
37 | EGDIR= ${PREFIX}/share/examples/${PKGBASE} | 35 | EGDIR= ${PREFIX}/share/examples/${PKGBASE} | |
38 | CONF_FILES= ${EGDIR}/pgbouncer.ini ${PKG_SYSCONFDIR}/pgbouncer.ini \ | 36 | CONF_FILES= ${EGDIR}/pgbouncer.ini ${PKG_SYSCONFDIR}/pgbouncer.ini \ | |
39 | ${EGDIR}/userlist.txt ${PKG_SYSCONFDIR}/pgbouncer.userlist | 37 | ${EGDIR}/userlist.txt ${PKG_SYSCONFDIR}/pgbouncer.userlist | |
40 | 38 | |||
41 | RCD_SCRIPTS+= pgbouncer | 39 | RCD_SCRIPTS+= pgbouncer | |
42 | 40 | |||
43 | SUBST_CLASSES+= path | 41 | SUBST_CLASSES+= path | |
44 | SUBST_STAGE.path= pre-configure | 42 | SUBST_STAGE.path= pre-configure | |
45 | SUBST_MESSAGE.path= Fixing default paths | 43 | SUBST_MESSAGE.path= Fixing default paths | |
46 | SUBST_FILES.path= etc/pgbouncer.ini | 44 | SUBST_FILES.path= etc/pgbouncer.ini | |
47 | SUBST_SED.path= -e 's|/var/log/pgbouncer|${PGB_LOG_DIR}|g' | 45 | SUBST_SED.path= -e 's|/var/log/pgbouncer|${PGB_LOG_DIR}|g' | |
48 | SUBST_SED.path+= -e 's|/var/run/pgbouncer|${PGB_RUN_DIR}|g' | 46 | SUBST_SED.path+= -e 's|/var/run/pgbouncer|${PGB_RUN_DIR}|g' | |
@@ -55,14 +53,15 @@ CONFIGURE_ARGS+= --with-libevent=${BUILD | @@ -55,14 +53,15 @@ CONFIGURE_ARGS+= --with-libevent=${BUILD | |||
55 | CPPFLAGS.SunOS+= -D_STRUCTURED_PROC=1 | 53 | CPPFLAGS.SunOS+= -D_STRUCTURED_PROC=1 | |
56 | 54 | |||
57 | # Avoid unwanted asciidoc/xmlto matches, get on without the html doc files. | 55 | # Avoid unwanted asciidoc/xmlto matches, get on without the html doc files. | |
58 | # Bundled install-sh script unreliable. Install sample config files. | 56 | # Bundled install-sh script unreliable. Install sample config files. | |
59 | INSTALL_MAKE_FLAGS+= ASCIIDOC= | 57 | INSTALL_MAKE_FLAGS+= ASCIIDOC= | |
60 | INSTALL_MAKE_FLAGS+= MKDIR_P=${INSTALL_DATA_DIR:Q} | 58 | INSTALL_MAKE_FLAGS+= MKDIR_P=${INSTALL_DATA_DIR:Q} | |
61 | INSTALL_MAKE_FLAGS+= sysconfdir=${EGDIR} | 59 | INSTALL_MAKE_FLAGS+= sysconfdir=${EGDIR} | |
62 | 60 | |||
63 | INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${EGDIR} | 61 | INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${EGDIR} | |
64 | 62 | |||
65 | BUILDLINK_API_DEPENDS.libevent+= libevent>=2.0 | 63 | BUILDLINK_API_DEPENDS.libevent+= libevent>=2.0 | |
66 | .include "../../devel/libevent/buildlink3.mk" | 64 | .include "../../devel/libevent/buildlink3.mk" | |
67 | .include "../../net/libcares/buildlink3.mk" | 65 | .include "../../net/libcares/buildlink3.mk" | |
66 | .include "../../security/openssl/buildlink3.mk" | |||
68 | .include "../../mk/bsd.pkg.mk" | 67 | .include "../../mk/bsd.pkg.mk" |
@@ -1,8 +1,8 @@ | @@ -1,8 +1,8 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.3 2015/10/23 16:40:38 fhajny Exp $ | 1 | @comment $NetBSD: PLIST,v 1.4 2016/03/15 11:29:35 fhajny Exp $ | |
2 | bin/pgbouncer | 2 | bin/pgbouncer | |
3 | man/man1/pgbouncer.1 | 3 | man/man1/pgbouncer.1 | |
4 | man/man5/pgbouncer.5 | 4 | man/man5/pgbouncer.5 | |
5 | share/doc/pgbouncer/NEWS | 5 | share/doc/pgbouncer/NEWS.rst | |
6 | share/doc/pgbouncer/README | 6 | share/doc/pgbouncer/README.rst | |
7 | share/examples/pgbouncer/pgbouncer.ini | 7 | share/examples/pgbouncer/pgbouncer.ini | |
8 | share/examples/pgbouncer/userlist.txt | 8 | share/examples/pgbouncer/userlist.txt |
@@ -1,7 +1,7 @@ | @@ -1,7 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.6 2015/11/04 17:41:15 agc Exp $ | 1 | $NetBSD: distinfo,v 1.7 2016/03/15 11:29:35 fhajny Exp $ | |
2 | 2 | |||
3 | SHA1 (pgbouncer-1.6.1.tar.gz) = 4abeee4965a26197e2c193d6bfb01eef46aa72a8 | 3 | SHA1 (pgbouncer-1.7.2.tar.gz) = d9bb29da15d90713e2399af3ebf5019da5cbe2d6 | |
4 | RMD160 (pgbouncer-1.6.1.tar.gz) = 3eb6d6aae0f634c71bf28eae5f5aa471c4016a9d | 4 | RMD160 (pgbouncer-1.7.2.tar.gz) = 1bed03336e62f64b1afc652e4b2ddc6478de51ab | |
5 | SHA512 (pgbouncer-1.6.1.tar.gz) = cf1cd28b04531bce879f3f9f50b54754253e0d9882c7f122c99d1c0c39fb01264c1ba20f5fd7b42ce7f5356f413b05caf48bbb633693d866271e129426923529 | 5 | SHA512 (pgbouncer-1.7.2.tar.gz) = 11c89606599f424b34f39a4b072ec6293fea0b14ee52ae4fbc44775e6d83771a22d194f4e8eabe410e0d6a70657508cf1a3b1012543d91873c36f644afb5675d | |
6 | Size (pgbouncer-1.6.1.tar.gz) = 431076 bytes | 6 | Size (pgbouncer-1.7.2.tar.gz) = 462374 bytes | |
7 | SHA1 (patch-Makefile) = 9c33efeb8c3c70487cdca056002928fc955a8307 | 7 | SHA1 (patch-Makefile) = 1c76e84975111d9ce077e73fe888dfe466874e33 |
@@ -1,34 +1,34 @@ | @@ -1,34 +1,34 @@ | |||
1 | #! @RCD_SCRIPTS_SHELL@ | 1 | #! @RCD_SCRIPTS_SHELL@ | |
2 | # | 2 | # | |
3 | # $NetBSD: pgbouncer.sh,v 1.2 2014/05/13 14:18:49 fhajny Exp $ | 3 | # $NetBSD: pgbouncer.sh,v 1.3 2016/03/15 11:29:35 fhajny Exp $ | |
4 | # | 4 | # | |
5 | # PROVIDE: pgbouncer | 5 | # PROVIDE: pgbouncer | |
6 | # REQUIRE: DAEMON | 6 | # REQUIRE: DAEMON | |
7 | # | 7 | # | |
8 | 8 | |||
9 | if [ -r /etc/rc.subr ] | 9 | if [ -r /etc/rc.subr ] | |
10 | then | 10 | then | |
11 | . /etc/rc.subr | 11 | . /etc/rc.subr | |
12 | fi | 12 | fi | |
13 | 13 | |||
14 | name="pgbouncer" | 14 | name="pgbouncer" | |
15 | rcvar=${name} | 15 | rcvar=${name} | |
16 | command="@PREFIX@/bin/${name}" | 16 | command="@PREFIX@/bin/${name}" | |
17 | pgbouncer_conf="@PKG_SYSCONFDIR@/${name}.ini" | 17 | pgbouncer_conf="@PKG_SYSCONFDIR@/${name}.ini" | |
18 | required_files="${pgbouncer_conf}" | 18 | required_files="${pgbouncer_conf}" | |
19 | command_args="-d ${pgbouncer_conf}" | 19 | command_args="-d ${pgbouncer_conf}" | |
20 | extra_commands="reload" | 20 | extra_commands="reload" | |
21 | pgsql_user="@PGUSER@" | 21 | pgsql_user="@PGB_USER@" | |
22 | start_cmd="pgbouncer_start" | 22 | start_cmd="pgbouncer_start" | |
23 | 23 | |||
24 | pidfile="@VARBASE@/run/${name}/${name}.pid" | 24 | pidfile="@VARBASE@/run/${name}/${name}.pid" | |
25 | if [ -r ${pgbouncer_conf} ] ; then | 25 | if [ -r ${pgbouncer_conf} ] ; then | |
26 | pidfile=`grep -i pidfile ${pgbouncer_conf} | cut -d= -f2` | 26 | pidfile=`grep -i pidfile ${pgbouncer_conf} | cut -d= -f2` | |
27 | fi | 27 | fi | |
28 | 28 | |||
29 | pgbouncer_start() | 29 | pgbouncer_start() | |
30 | { | 30 | { | |
31 | @ECHO@ "Starting ${name}." | 31 | @ECHO@ "Starting ${name}." | |
32 | piddir=`dirname ${pidfile}` | 32 | piddir=`dirname ${pidfile}` | |
33 | if [ ! -d ${piddir} ] ; then | 33 | if [ ! -d ${piddir} ] ; then | |
34 | @MKDIR@ -p ${piddir} | 34 | @MKDIR@ -p ${piddir} |
@@ -1,27 +1,27 @@ | @@ -1,27 +1,27 @@ | |||
1 | <?xml version="1.0"?> | 1 | <?xml version="1.0"?> | |
2 | <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> | 2 | <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> | |
3 | <service_bundle type="manifest" name="@SMF_NAME@"> | 3 | <service_bundle type="manifest" name="@SMF_NAME@"> | |
4 | <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1"> | 4 | <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1"> | |
5 | <create_default_instance enabled="false" /> | 5 | <create_default_instance enabled="false" /> | |
6 | <single_instance /> | 6 | <single_instance /> | |
7 | <dependency name="network" grouping="require_all" restart_on="error" type="service"> | 7 | <dependency name="network" grouping="require_all" restart_on="error" type="service"> | |
8 | <service_fmri value="svc:/milestone/network:default" /> | 8 | <service_fmri value="svc:/milestone/network:default" /> | |
9 | </dependency> | 9 | </dependency> | |
10 | <dependency name="filesystem" grouping="require_all" restart_on="error" type="service"> | 10 | <dependency name="filesystem" grouping="require_all" restart_on="error" type="service"> | |
11 | <service_fmri value="svc:/system/filesystem/local" /> | 11 | <service_fmri value="svc:/system/filesystem/local" /> | |
12 | </dependency> | 12 | </dependency> | |
13 | <method_context working_directory="@PGHOME@"> | 13 | <method_context> | |
14 | <method_credential user="@PGUSER@" group="@PGGROUP@" /> | 14 | <method_credential user="@PGB_USER@" group="@PGB_GROUP@" /> | |
15 | </method_context> | 15 | </method_context> | |
16 | <exec_method type="method" name="start" exec="@PREFIX@/bin/pgbouncer -d %{config_file}" timeout_seconds="60" /> | 16 | <exec_method type="method" name="start" exec="@PREFIX@/bin/pgbouncer -d %{config_file}" timeout_seconds="60" /> | |
17 | <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" /> | 17 | <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" /> | |
18 | <property_group name="startd" type="framework"> | 18 | <property_group name="startd" type="framework"> | |
19 | <propval name="duration" type="astring" value="contract" /> | 19 | <propval name="duration" type="astring" value="contract" /> | |
20 | <propval name="ignore_error" type="astring" value="core,signal" /> | 20 | <propval name="ignore_error" type="astring" value="core,signal" /> | |
21 | </property_group> | 21 | </property_group> | |
22 | <property_group name="application" type="application"> | 22 | <property_group name="application" type="application"> | |
23 | <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/pgbouncer.ini" /> | 23 | <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/pgbouncer.ini" /> | |
24 | </property_group> | 24 | </property_group> | |
25 | <stability value="Evolving" /> | 25 | <stability value="Evolving" /> | |
26 | <template> | 26 | <template> | |
27 | <common_name> | 27 | <common_name> |
@@ -1,16 +1,15 @@ | @@ -1,16 +1,15 @@ | |||
1 | $NetBSD: patch-Makefile,v 1.1 2015/10/23 16:40:38 fhajny Exp $ | 1 | $NetBSD: patch-Makefile,v 1.2 2016/03/15 11:29:35 fhajny Exp $ | |
2 | 2 | |||
3 | Install sample config files as... config files. | 3 | Install sample config files as... config files. | |
4 | 4 | |||
5 | --- Makefile.orig 2015-09-03 14:46:31.000000000 +0000 | 5 | --- Makefile.orig 2016-02-26 08:56:32.000000000 +0000 | |
6 | +++ Makefile | 6 | +++ Makefile | |
7 | @@ -47,7 +47,8 @@ AM_FEATURES = libusual | 7 | @@ -50,6 +50,8 @@ pgbouncer_EMBED_LIBUSUAL = 1 | |
8 | pgbouncer_EMBED_LIBUSUAL = 1 | |||
9 | 8 | |||
10 | # docs to install as-is | 9 | # docs to install as-is | |
11 | -dist_doc_DATA = README NEWS etc/pgbouncer.ini etc/userlist.txt | 10 | dist_doc_DATA = README.rst NEWS.rst etc/pgbouncer.ini etc/userlist.txt | |
12 | +dist_doc_DATA = README NEWS | 11 | +dist_doc_DATA = README.rst NEWS.rst | |
13 | +dist_sysconf_DATA = etc/pgbouncer.ini etc/userlist.txt | 12 | +dist_sysconf_DATA = etc/pgbouncer.ini etc/userlist.txt | |
14 | 13 | |||
15 | DISTCLEANFILES = config.mak config.status lib/usual/config.h config.log | 14 | DISTCLEANFILES = config.mak config.status lib/usual/config.h config.log | |
16 | 15 |