Update pgbouncer to 1.5.4.

Add SMF support. Fix default dirs.

2012-11-28  -  PgBouncer 1.5.4  -  "No Leaks, Potty-Training Successful"

  = Fixes =

    * DNS: Fix memory leak in getaddrinfo_a() backend.

    * DNS: Fix memory leak in udns backend.

    * DNS: Fix stats calculation.

    * DNS: Improve error message handling for getaddrinfo_a().

    * Fix win32 compile.

    * Fix compiler dependency support check in configure.

    * Few documentation fixes.

2012-09-12  -  PgBouncer 1.5.3  -  "Quantum Toaster"

  = Critical fix =

    * Too long database names can lead to crash, which
      is remotely triggerable if autodbs are enabled.

      The original checks assumed all names come from config files,
      thus using fatal() was fine, but when autodbs are enabled
      - by '*' in [databases] section - the database name can come
      from network thus making remote shutdown possible.

  = Minor Features =

    * max_packet_size - config parameter to tune maximum packet size
      that is allowed through.  Default is kept same: (2G-1), but now
      it can be made smaller.

    * In case of unparseable packet header, show it in hex in log and
      error message.

  = Fixes =

    * AntiMake: it used $(relpath) and $(abspath) to manupulate pathnames,
      but the result was build failure when source tree path contained
      symlinks.  The code is now changed to work on plain strings only.

    * console: now SET can be used to set empty string values.

    * config.txt: show that all timeouts can be set in floats.
      This is well-hidden feature introduced in 1.4.

2012-05-29  -  PgBouncer 1.5.2  -  "Don't Chew, Just Swallow"

  = Fixes =

    * Due to mistake, reserve_pool_timeout was taken in microseconds,
      not seconds, effectively activating reserve pool immediately
      when pool got full.  Now use it as seconds, as was intended.
      (Noticed by Keyur Govande)

2012-04-17  -  PgBouncer 1.5.1  -  "Abort, Retry, Ignore?"

  = Features =

    * Parameters to tune permissions on unix socket:
      unix_socket_mode=0777, unix_socket_group=''.

  = Fixes =

    * Allow empty string for server-side variable - this is
      needed to get "application_name" properly working, as it's
      the only parameter that does not have server-side default.

    * If connect string changes, require refresh of server parameters.
      Previously PgBouncer continued with old parameters,
      which breaks in case of Postgres upgrade.

    * If autodb connect string changes, drop old connections.

    * cf_setint: Use strtol() instead atoi() to parse integer config
      parameters.  It allows hex, octal and better error detection.

    * Use sigqueue() to detect union sigval existence - fixes
      compilation on HPUX.

    * Remove 'git' command from Makefile, it throws random errors
      in case of plain-tarball build.

    * Document stats_period parameter.  This tunes the period for
      stats output.

    * Require Asciidoc >= 8.4, seems docs are not compatible with
      earlier versions anymore.

    * Stop trying to retry on EINTR from close().

2012-01-05  -  PgBouncer 1.5  -  "Bouncing Satisified Clients Since 2007"

  If you use more than 8 IPs behind one DNS name, you now need to
  use EDNS0 protocol to query.  Only getaddrinfo_a()/getaddrinfo()
  and UDNS backends support it, libevent 1.x/2.x does not.
  To enable it for libc, add 'options edns0' to /etc/resolv.conf.

  GNU Make 3.81+ is required for building.

  = Features =

    * Detect DNS reply changes and invalidate connections to IPs no longer
      present in latest reply.
      (Petr Jelinek)

    * DNS zone serial based hostname invalidation.  When option
      dns_zone_check_period is set, all DNS zones will be queried
      for SOA, and when serial has changed, all hostnames
      will be queried.  This is needed to get deterministic
      connection invalidation, because invalidation on lookup
      is useless when no lookups are performed.
      Works only with new UDNS backend.

    * New SHOW DNS_HOSTS, SHOW DNS_ZONES commands to examine DNS cache.

    * New param: min_pool_size - avoids dropping all connections
      when there is no load.
      (Filip Rembialkowski)

    * idle_in_transaction_timeout - kill transaction if idle too long.
      Not set by default.

    * New libudns backend for DNS lookups.  More featureful than evdns.
      Use --with-udns to activate.  Does not work with IPv6 yet.

    * KILL command, to immediately kill all connections for one database.
      (Michael Tharp)

    * Move to Antimake build system to have better looking Makefiles.
      Now GNU Make 3.81+ is required for building.

  = Fixes =

    * DNS now works with IPv6 hostnames.

    * Don't change connection state when NOTIFY arrives from server.

    * Various documentation fixes.
      (Dan McGee)

    * Console: Support ident quoting with "".  Originally we did not
      have any commands that took database names, so no quoting was needed.

    * Console: allow numbers at the stard of word regex.  Trying
      to use strict parser makes things too complex here.

    * Don't expire auto DBs that are paused.
      (Michael Tharp)

    * Create auto databases as needed when doing PAUSE.
      (Michael Tharp)

    * Fix wrong log message issued by RESUME command.
      (Peter Eisentraut)

    * When user= without password= is in database connect string,
      password will be taken from userlist.

    * Parse '*' properly in takeover code.

    * autogen.sh: work with older autoconf/automake.

    * Fix run-as-service crash on win32 due to bad basename() from
      mingw/msvc runtime.  Now compat basename() is always used.
This commit is contained in:
fhajny 2014-05-13 14:18:49 +00:00
parent efe789c1cd
commit aa118026dc
5 changed files with 63 additions and 15 deletions

View file

@ -1,10 +1,9 @@
# $NetBSD: Makefile,v 1.7 2014/02/12 23:17:40 tron Exp $
# $NetBSD: Makefile,v 1.8 2014/05/13 14:18:49 fhajny Exp $
#
DISTNAME= pgbouncer-${VERSION}
PKGREVISION= 3
CATEGORIES= databases
MASTER_SITES= http://pgfoundry.org/frs/download.php/3085/
MASTER_SITES= http://pgfoundry.org/frs/download.php/3393/
EXTRACT_SUFX= .tgz
MAINTAINER= pkgsrc@NetBSD.org
@ -12,7 +11,7 @@ HOMEPAGE= http://wiki.postgresql.org/wiki/PgBouncer
COMMENT= Lightweight connection pooler for PostgreSQL
LICENSE= original-bsd
VERSION= 1.4.2
VERSION= 1.5.4
USE_LANGUAGES= c
USE_TOOLS+= gmake
GNU_CONFIGURE= yes
@ -33,9 +32,26 @@ PGUSER?= pgsql
PGGROUP?= pgsql
PKG_GROUPS= ${PGGROUP}
PKG_USERS= ${PGUSER}:${PGGROUP}
PKG_GECOS.${PGUSER}= PostgreSQL database administrator
PKG_HOME.${PGUSER}= ${PGHOME}
BUILD_DEFS+= PGUSER PGGROUP
BUILD_DEFS+= PGUSER PGGROUP PGHOME VARBASE
FILES_SUBST+= PGUSER=${PGUSER}
FILES_SUBST+= PGGROUP=${PGGROUP}
FILES_SUBST+= PGHOME=${PGHOME}
PGB_LOG_DIR?= ${VARBASE}/log/pgbouncer
PGB_RUN_DIR?= ${VARBASE}/run
OWN_DIRS_PERMS+= ${PGB_LOG_DIR} ${PGUSER} ${PGGROUP} 0755
SUBST_CLASSES+= path
SUBST_STAGE.path= pre-configure
SUBST_MESSAGE.path= Fixing default paths
SUBST_FILES.path= etc/pgbouncer.ini
SUBST_SED.path= -e 's|/var/log/pgbouncer|${PGB_LOG_DIR}|g'
SUBST_SED.path+= -e 's|/var/run/pgbouncer|${PGB_RUN_DIR}|g'
SUBST_SED.path+= -e 's|/etc/pgbouncer|${PKG_SYSCONFDIR}|g'
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/pgbouncer ${DESTDIR}${PREFIX}/bin/

View file

@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.2 2011/12/21 08:29:05 dholland Exp $
$NetBSD: distinfo,v 1.3 2014/05/13 14:18:49 fhajny Exp $
SHA1 (pgbouncer-1.4.2.tgz) = 610198c3f2186d70267275f554e23bd43598e4b5
RMD160 (pgbouncer-1.4.2.tgz) = 055796e23dd7029d3f4a2c882cf24399a5481cb1
Size (pgbouncer-1.4.2.tgz) = 283204 bytes
SHA1 (patch-lib_usual_endian_h) = 38ee6610c1f4e4aeededcb41cad56b877b6b7b0b
SHA1 (pgbouncer-1.5.4.tgz) = 87c3dd7fc70cbbae93ce8865953891f0aabffd2d
RMD160 (pgbouncer-1.5.4.tgz) = bb7e48ab7ed723b2e35999af9dbc63acf02f65f9
Size (pgbouncer-1.5.4.tgz) = 339610 bytes
SHA1 (patch-lib_usual_endian_h) = 65629eb5f2fda9b1c6fb2a2628bea3df737522ac

View file

@ -1,6 +1,6 @@
#! @RCD_SCRIPTS_SHELL@
#
# $NetBSD: pgbouncer.sh,v 1.1.1.1 2011/09/03 22:15:51 mjl Exp $
# $NetBSD: pgbouncer.sh,v 1.2 2014/05/13 14:18:49 fhajny Exp $
#
# PROVIDE: pgbouncer
# REQUIRE: DAEMON
@ -23,7 +23,7 @@ start_cmd="pgbouncer_start"
pidfile="@VARBASE@/run/${name}/${name}.pid"
if [ -r ${pgbouncer_conf} ] ; then
pidfile=`grep -i pidfile /usr/pkg/etc/pgbouncer.ini | cut -d= -f2`
pidfile=`grep -i pidfile ${pgbouncer_conf} | cut -d= -f2`
fi
pgbouncer_start()

View file

@ -0,0 +1,32 @@
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="@SMF_NAME@">
<service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
<create_default_instance enabled="false" />
<single_instance />
<dependency name="network" grouping="require_all" restart_on="error" type="service">
<service_fmri value="svc:/milestone/network:default" />
</dependency>
<dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
<service_fmri value="svc:/system/filesystem/local" />
</dependency>
<method_context working_directory="@PGHOME@">
<method_credential user="@PGUSER@" group="@PGGROUP@" />
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/bin/pgbouncer -d %{config_file}" timeout_seconds="60" />
<exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
<property_group name="startd" type="framework">
<propval name="duration" type="astring" value="contract" />
<propval name="ignore_error" type="astring" value="core,signal" />
</property_group>
<property_group name="application" type="application">
<propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/pgbouncer.ini" />
</property_group>
<stability value="Evolving" />
<template>
<common_name>
<loctext xml:lang="C">PgBouncer daemon</loctext>
</common_name>
</template>
</service>
</service_bundle>

View file

@ -1,8 +1,8 @@
$NetBSD: patch-lib_usual_endian_h,v 1.1 2011/12/21 08:29:05 dholland Exp $
$NetBSD: patch-lib_usual_endian_h,v 1.2 2014/05/13 14:18:50 fhajny Exp $
Avoid trying to redefine bswap16/32/64 when on NetBSD.
--- lib/usual/endian.h~ 2011-04-29 13:07:43.000000000 +0000
--- lib/usual/endian.h.orig 2011-11-29 15:40:56.000000000 +0000
+++ lib/usual/endian.h
@@ -42,6 +42,8 @@
* @{
@ -13,7 +13,7 @@ Avoid trying to redefine bswap16/32/64 when on NetBSD.
#ifndef bswap16
#ifdef bswap_16
#define bswap16(x) bswap_16(x)
@@ -80,6 +82,8 @@ static inline uint64_t bswap64(uint64_t
@@ -80,6 +82,8 @@ static inline uint64_t bswap64(uint64_t
#endif
#endif