Tue Mar 15 11:29:35 2016 UTC ()
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.


(fhajny)
diff -r1.10 -r1.11 pkgsrc/databases/pgbouncer/Makefile
diff -r1.3 -r1.4 pkgsrc/databases/pgbouncer/PLIST
diff -r1.6 -r1.7 pkgsrc/databases/pgbouncer/distinfo
diff -r1.2 -r1.3 pkgsrc/databases/pgbouncer/files/pgbouncer.sh
diff -r1.1 -r1.2 pkgsrc/databases/pgbouncer/files/smf/manifest.xml
diff -r1.1 -r1.2 pkgsrc/databases/pgbouncer/patches/patch-Makefile

cvs diff -r1.10 -r1.11 pkgsrc/databases/pgbouncer/Makefile (expand / switch to unified diff)

--- pkgsrc/databases/pgbouncer/Makefile 2016/03/05 11:28:13 1.10
+++ pkgsrc/databases/pgbouncer/Makefile 2016/03/15 11:29:35 1.11
@@ -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
4DISTNAME= pgbouncer-1.6.1 4DISTNAME= pgbouncer-1.7.2
5PKGREVISION= 1 
6CATEGORIES= databases 5CATEGORIES= databases
7MASTER_SITES= http://pgbouncer.github.io/downloads/files/${PKGVERSION_NOREV}/ 6MASTER_SITES= http://pgbouncer.github.io/downloads/files/${PKGVERSION_NOREV}/
8 7
9MAINTAINER= pkgsrc@NetBSD.org 8MAINTAINER= pkgsrc@NetBSD.org
10HOMEPAGE= http://pgbouncer.github.io/ 9HOMEPAGE= http://pgbouncer.github.io/
11COMMENT= Lightweight connection pooler for PostgreSQL 10COMMENT= Lightweight connection pooler for PostgreSQL
12LICENSE= original-bsd 11LICENSE= original-bsd
13 12
14USE_LANGUAGES= c 13USE_LANGUAGES= c
15USE_TOOLS+= gmake 14USE_TOOLS+= gmake
16GNU_CONFIGURE= yes 15GNU_CONFIGURE= yes
17 16
18.include "../../mk/bsd.prefs.mk" 17.include "../../mk/bsd.prefs.mk"
19 18
20PGUSER?= pgsql 19PGB_USER?= pgbounce
21PGGROUP?= pgsql 20PGB_GROUP?= pgbounce
22PKG_GROUPS= ${PGGROUP} 
23PKG_USERS= ${PGUSER}:${PGGROUP} 
24PKG_GECOS.${PGUSER}= PostgreSQL database administrator 
25PKG_HOME.${PGUSER}= ${PGHOME} 
26 
27BUILD_DEFS+= PGUSER PGGROUP PGHOME VARBASE 
28FILES_SUBST+= PGUSER=${PGUSER} 
29FILES_SUBST+= PGGROUP=${PGGROUP} 
30FILES_SUBST+= PGHOME=${PGHOME} 
31 
32PGB_LOG_DIR?= ${VARBASE}/log/pgbouncer 21PGB_LOG_DIR?= ${VARBASE}/log/pgbouncer
33PGB_RUN_DIR?= ${VARBASE}/run 22PGB_RUN_DIR?= ${VARBASE}/run
34 23
35OWN_DIRS_PERMS+= ${PGB_LOG_DIR} ${PGUSER} ${PGGROUP} 0755 24PKG_GROUPS= ${PGB_GROUP}
 25PKG_USERS= ${PGB_USER}:${PGB_GROUP}
 26PKG_GECOS.${PGB_USER}= PgBouncer daemon user
 27PKG_HOME.${PGB_USER}= ${PGB_LOG_DIR}
 28
 29BUILD_DEFS+= PGB_USER PGB_GROUP VARBASE
 30FILES_SUBST+= PGB_USER=${PGB_USER}
 31FILES_SUBST+= PGB_GROUP=${PGB_GROUP}
 32
 33OWN_DIRS_PERMS+= ${PGB_LOG_DIR} ${PGB_USER} ${PGB_GROUP} 0755
36 34
37EGDIR= ${PREFIX}/share/examples/${PKGBASE} 35EGDIR= ${PREFIX}/share/examples/${PKGBASE}
38CONF_FILES= ${EGDIR}/pgbouncer.ini ${PKG_SYSCONFDIR}/pgbouncer.ini \ 36CONF_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
41RCD_SCRIPTS+= pgbouncer 39RCD_SCRIPTS+= pgbouncer
42 40
43SUBST_CLASSES+= path 41SUBST_CLASSES+= path
44SUBST_STAGE.path= pre-configure 42SUBST_STAGE.path= pre-configure
45SUBST_MESSAGE.path= Fixing default paths 43SUBST_MESSAGE.path= Fixing default paths
46SUBST_FILES.path= etc/pgbouncer.ini 44SUBST_FILES.path= etc/pgbouncer.ini
47SUBST_SED.path= -e 's|/var/log/pgbouncer|${PGB_LOG_DIR}|g' 45SUBST_SED.path= -e 's|/var/log/pgbouncer|${PGB_LOG_DIR}|g'
48SUBST_SED.path+= -e 's|/var/run/pgbouncer|${PGB_RUN_DIR}|g' 46SUBST_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
55CPPFLAGS.SunOS+= -D_STRUCTURED_PROC=1 53CPPFLAGS.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.
59INSTALL_MAKE_FLAGS+= ASCIIDOC= 57INSTALL_MAKE_FLAGS+= ASCIIDOC=
60INSTALL_MAKE_FLAGS+= MKDIR_P=${INSTALL_DATA_DIR:Q} 58INSTALL_MAKE_FLAGS+= MKDIR_P=${INSTALL_DATA_DIR:Q}
61INSTALL_MAKE_FLAGS+= sysconfdir=${EGDIR} 59INSTALL_MAKE_FLAGS+= sysconfdir=${EGDIR}
62 60
63INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${EGDIR} 61INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${EGDIR}
64 62
65BUILDLINK_API_DEPENDS.libevent+= libevent>=2.0 63BUILDLINK_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"

cvs diff -r1.3 -r1.4 pkgsrc/databases/pgbouncer/PLIST (expand / switch to unified diff)

--- pkgsrc/databases/pgbouncer/PLIST 2015/10/23 16:40:38 1.3
+++ pkgsrc/databases/pgbouncer/PLIST 2016/03/15 11:29:35 1.4
@@ -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 $
2bin/pgbouncer 2bin/pgbouncer
3man/man1/pgbouncer.1 3man/man1/pgbouncer.1
4man/man5/pgbouncer.5 4man/man5/pgbouncer.5
5share/doc/pgbouncer/NEWS 5share/doc/pgbouncer/NEWS.rst
6share/doc/pgbouncer/README 6share/doc/pgbouncer/README.rst
7share/examples/pgbouncer/pgbouncer.ini 7share/examples/pgbouncer/pgbouncer.ini
8share/examples/pgbouncer/userlist.txt 8share/examples/pgbouncer/userlist.txt

cvs diff -r1.6 -r1.7 pkgsrc/databases/pgbouncer/distinfo (expand / switch to unified diff)

--- pkgsrc/databases/pgbouncer/distinfo 2015/11/04 17:41:15 1.6
+++ pkgsrc/databases/pgbouncer/distinfo 2016/03/15 11:29:35 1.7
@@ -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
3SHA1 (pgbouncer-1.6.1.tar.gz) = 4abeee4965a26197e2c193d6bfb01eef46aa72a8 3SHA1 (pgbouncer-1.7.2.tar.gz) = d9bb29da15d90713e2399af3ebf5019da5cbe2d6
4RMD160 (pgbouncer-1.6.1.tar.gz) = 3eb6d6aae0f634c71bf28eae5f5aa471c4016a9d 4RMD160 (pgbouncer-1.7.2.tar.gz) = 1bed03336e62f64b1afc652e4b2ddc6478de51ab
5SHA512 (pgbouncer-1.6.1.tar.gz) = cf1cd28b04531bce879f3f9f50b54754253e0d9882c7f122c99d1c0c39fb01264c1ba20f5fd7b42ce7f5356f413b05caf48bbb633693d866271e129426923529 5SHA512 (pgbouncer-1.7.2.tar.gz) = 11c89606599f424b34f39a4b072ec6293fea0b14ee52ae4fbc44775e6d83771a22d194f4e8eabe410e0d6a70657508cf1a3b1012543d91873c36f644afb5675d
6Size (pgbouncer-1.6.1.tar.gz) = 431076 bytes 6Size (pgbouncer-1.7.2.tar.gz) = 462374 bytes
7SHA1 (patch-Makefile) = 9c33efeb8c3c70487cdca056002928fc955a8307 7SHA1 (patch-Makefile) = 1c76e84975111d9ce077e73fe888dfe466874e33

cvs diff -r1.2 -r1.3 pkgsrc/databases/pgbouncer/files/pgbouncer.sh (expand / switch to unified diff)

--- pkgsrc/databases/pgbouncer/files/pgbouncer.sh 2014/05/13 14:18:49 1.2
+++ pkgsrc/databases/pgbouncer/files/pgbouncer.sh 2016/03/15 11:29:35 1.3
@@ -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
9if [ -r /etc/rc.subr ] 9if [ -r /etc/rc.subr ]
10then 10then
11 . /etc/rc.subr 11 . /etc/rc.subr
12fi 12fi
13 13
14name="pgbouncer" 14name="pgbouncer"
15rcvar=${name} 15rcvar=${name}
16command="@PREFIX@/bin/${name}" 16command="@PREFIX@/bin/${name}"
17pgbouncer_conf="@PKG_SYSCONFDIR@/${name}.ini" 17pgbouncer_conf="@PKG_SYSCONFDIR@/${name}.ini"
18required_files="${pgbouncer_conf}" 18required_files="${pgbouncer_conf}"
19command_args="-d ${pgbouncer_conf}" 19command_args="-d ${pgbouncer_conf}"
20extra_commands="reload" 20extra_commands="reload"
21pgsql_user="@PGUSER@" 21pgsql_user="@PGB_USER@"
22start_cmd="pgbouncer_start" 22start_cmd="pgbouncer_start"
23 23
24pidfile="@VARBASE@/run/${name}/${name}.pid" 24pidfile="@VARBASE@/run/${name}/${name}.pid"
25if [ -r ${pgbouncer_conf} ] ; then 25if [ -r ${pgbouncer_conf} ] ; then
26 pidfile=`grep -i pidfile ${pgbouncer_conf} | cut -d= -f2` 26 pidfile=`grep -i pidfile ${pgbouncer_conf} | cut -d= -f2`
27fi 27fi
28 28
29pgbouncer_start() 29pgbouncer_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}

cvs diff -r1.1 -r1.2 pkgsrc/databases/pgbouncer/files/smf/manifest.xml (expand / switch to unified diff)

--- pkgsrc/databases/pgbouncer/files/smf/manifest.xml 2014/05/13 14:18:50 1.1
+++ pkgsrc/databases/pgbouncer/files/smf/manifest.xml 2016/03/15 11:29:35 1.2
@@ -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>

cvs diff -r1.1 -r1.2 pkgsrc/databases/pgbouncer/patches/patch-Makefile (expand / switch to unified diff)

--- pkgsrc/databases/pgbouncer/patches/patch-Makefile 2015/10/23 16:40:38 1.1
+++ pkgsrc/databases/pgbouncer/patches/patch-Makefile 2016/03/15 11:29:35 1.2
@@ -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
3Install sample config files as... config files. 3Install 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