Import postgresql91-pgpool2-3.2.4 as wip/pgpool2.

pgpool-II is a middleware that works between PostgreSQL
servers and a PostgreSQL database client. It talks
PostgreSQL's backend and frontend protocol, and relays
a connection between them. Therefore, a database application
(frontend) thinks that pgpool-II is the actual PostgreSQL
server, and the server (backend) sees pgpool-II as one
of its clients.
This commit is contained in:
Filip Hajny 2013-05-02 20:02:41 +00:00 committed by Thomas Klausner
parent 8377e1e72a
commit 30a94c2dfe
9 changed files with 238 additions and 0 deletions

7
pgpool2/DESCR Normal file
View file

@ -0,0 +1,7 @@
pgpool-II is a middleware that works between PostgreSQL
servers and a PostgreSQL database client. It talks
PostgreSQL's backend and frontend protocol, and relays
a connection between them. Therefore, a database application
(frontend) thinks that pgpool-II is the actual PostgreSQL
server, and the server (backend) sees pgpool-II as one
of its clients.

60
pgpool2/Makefile Normal file
View file

@ -0,0 +1,60 @@
# $NetBSD: Makefile,v 1.1 2013/05/02 20:02:41 fhajny Exp $
#
DISTNAME= pgpool-II-3.2.4
PKGNAME= postgresql${PGSQL_VERSION}-pgpool2-${DISTNAME:S/pgpool-II-//}
CATEGORIES= databases
MASTER_SITES= http://www.pgpool.net/mediawiki/download.php?f=
MAINTAINER= filip@joyent.com
HOMEPAGE= http://www.pgpool.net/mediawiki/
COMMENT= Middleware between PostgreSQL servers and a PostgreSQL database client
LICENSE= modified-bsd
PKG_DESTDIR_SUPPORT= user-destdir
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
.include "options.mk"
.include "../../mk/bsd.fast.prefs.mk"
BUILD_DEFS+= PGPOOL_USER PGPOOL_GROUP PGGROUP PGHOME VARBASE
EGDIR= share/examples/pgpool2
PGPOOL_USER?= pgpool
PGPOOL_GROUP?= ${PGGROUP}
PGGROUP?= pgsql
PGHOME?= ${PREFIX}/${PGGROUP}
PKG_GROUPS= ${PGPOOL_GROUP}
PKG_USERS= ${PGPOOL_USER}:${PGPOOL_GROUP}
PKG_GROUPS_VARS+= PGPOOL_GROUP
PKG_USERS_VARS= PGPOOL_USER
PKG_HOME.${PGPOOL_USER}= ${PGHOME}
PKG_SHELL.${PGPOOL_GROUP}= ${SH}
PKG_SYSCONFSUBDIR= pgpool2
PGPOOL_PIDDIR?= ${VARBASE}/run/pgpool
OWN_DIRS_PERMS+= ${PGPOOL_PIDDIR} ${PGPOOL_USER} ${PGPOOL_GROUP} 0751
SUBST_CLASSES+= path
SUBST_MESSAGE.path= Fixing default paths
SUBST_STAGE.path= pre-configure
SUBST_FILES.path= pgpool.conf.sample pool.h
SUBST_VARS.path= PGPOOL_PIDDIR
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONF_FILES+= ${EGDIR}/pcp.conf.sample ${PKG_SYSCONFDIR}/pcp.conf
CONF_FILES+= ${EGDIR}/pgpool.conf.sample ${PKG_SYSCONFDIR}/pgpool.conf
CONF_FILES+= ${EGDIR}/pool_hba.conf.sample ${PKG_SYSCONFDIR}/pool_hba.conf
CONF_FILES_PERMS+= ${EGDIR}/pool_passwd ${PKG_SYSCONFDIR}/pool_passwd \
${PGPOOL_USER} ${PGGROUP} 0640
post-install:
${TOUCH} ${DESTDIR}${PREFIX}/share/examples/pgpool2/pool_passwd
.include "../../mk/pgsql.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

30
pgpool2/PLIST Normal file
View file

@ -0,0 +1,30 @@
@comment $NetBSD: PLIST,v 1.1 2013/05/02 20:02:41 fhajny Exp $
bin/pcp_attach_node
bin/pcp_detach_node
bin/pcp_node_count
bin/pcp_node_info
bin/pcp_pool_status
bin/pcp_proc_count
bin/pcp_proc_info
bin/pcp_promote_node
bin/pcp_recovery_node
bin/pcp_stop_pgpool
bin/pcp_systemdb_info
bin/pg_md5
bin/pgpool
include/libpcp_ext.h
include/pcp.h
include/pool_process_reporting.h
include/pool_type.h
lib/libpcp.la
man/man8/pgpool.8
share/examples/pgpool2/pcp.conf.sample
share/examples/pgpool2/pgpool.conf.sample
share/examples/pgpool2/pgpool.conf.sample-master-slave
share/examples/pgpool2/pgpool.conf.sample-replication
share/examples/pgpool2/pgpool.conf.sample-stream
share/examples/pgpool2/pool_hba.conf.sample
share/examples/pgpool2/pool_passwd
share/pgpool2/insert_lock.sql
share/pgpool2/pgpool.pam
share/pgpool2/system_db.sql

9
pgpool2/distinfo Normal file
View file

@ -0,0 +1,9 @@
$NetBSD: distinfo,v 1.1 2013/05/02 20:02:41 fhajny Exp $
SHA1 (pgpool-II-3.2.4.tar.gz) = 917cc7668c5e12e141aa521f0eff6e879b67d9e2
RMD160 (pgpool-II-3.2.4.tar.gz) = 0fbd3afb48b2c6cf9fe7f68c927e3b7862f48a40
Size (pgpool-II-3.2.4.tar.gz) = 1627417 bytes
SHA1 (patch-Makefile.in) = 6531f94807da7bc5cb94a97997d7bb4e977936fc
SHA1 (patch-configure) = cf4cbb6a4e42e20dfbd8c73728b9d8c4b94591b5
SHA1 (patch-pgpool.conf.sample) = 9f24c6e493af0f6af2dc5a275b1f4028fb45f8cb
SHA1 (patch-pool.h) = f736c239343776200dbe3ce54a8efb5ed61dd712

30
pgpool2/options.mk Normal file
View file

@ -0,0 +1,30 @@
# $NetBSD: options.mk,v 1.1 2013/05/02 20:02:42 fhajny Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.postgresql-pgpool
PKG_SUPPORTED_OPTIONS= memcached pam ssl
.include "../../mk/bsd.options.mk"
###
### memcached support.
###
.if !empty(PKG_OPTIONS:Mmemcached)
CONFIGURE_ARGS+= --with-memcached=${BUILDLINK_PREFIX.libmemcached}
.include "../../devel/libmemcached/buildlink3.mk"
.endif
###
### pam support.
###
.if !empty(PKG_OPTIONS:Mpam)
CONFIGURE_ARGS+= --with-pam
.include "../../mk/pam.buildlink3.mk"
.endif
###
### OpenSSL support.
###
.if !empty(PKG_OPTIONS:Mssl)
CONFIGURE_ARGS+= --with-openssl
.include "../../security/openssl/buildlink3.mk"
.endif

View file

@ -0,0 +1,60 @@
$NetBSD: patch-Makefile.in,v 1.1 2013/05/02 20:02:42 fhajny Exp $
Install config files into examples only.
--- Makefile.in.orig 2013-04-26 05:52:43.000000000 +0000
+++ Makefile.in
@@ -59,7 +59,7 @@ CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)" \
- "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(sysconfdir)"
+ "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(egdir)"
PROGRAMS = $(bin_PROGRAMS)
am_pg_md5_OBJECTS = pg_md5.$(OBJEXT) md5.$(OBJEXT) \
pool_config_md5.$(OBJEXT) pool_error.$(OBJEXT) \
@@ -289,6 +289,7 @@ datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
+egdir = @prefix@/share/examples/@PACKAGE@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
@@ -675,22 +676,22 @@ uninstall-pkgdataDATA:
dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
install-sysconfDATA: $(sysconf_DATA)
@$(NORMAL_INSTALL)
- test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
- @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
+ test -z "$(egdir)" || $(MKDIR_P) "$(DESTDIR)$(egdir)"
+ @list='$(sysconf_DATA)'; test -n "$(egdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \
- $(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(egdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(egdir)" || exit $$?; \
done
uninstall-sysconfDATA:
@$(NORMAL_UNINSTALL)
- @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
+ @list='$(sysconf_DATA)'; test -n "$(egdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir)
+ dir='$(DESTDIR)$(egdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -1029,7 +1030,7 @@ check: check-recursive
all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(sysconfdir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(egdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive

View file

@ -0,0 +1,14 @@
$NetBSD: patch-configure,v 1.1 2013/05/02 20:02:42 fhajny Exp $
Pick a better name for the package.
--- configure.orig 2013-04-30 11:16:09.907423424 +0000
+++ configure
@@ -3955,7 +3955,7 @@ fi
# Define the identity of the package.
- PACKAGE=pgpool-II
+ PACKAGE=pgpool2
VERSION=3.2.4

View file

@ -0,0 +1,14 @@
$NetBSD: patch-pgpool.conf.sample,v 1.1 2013/05/02 20:02:42 fhajny Exp $
Default pid file location.
--- pgpool.conf.sample.orig 2013-04-26 05:52:44.000000000 +0000
+++ pgpool.conf.sample
@@ -180,7 +180,7 @@ debug_level = 0
# FILE LOCATIONS
#------------------------------------------------------------------------------
-pid_file_name = '/var/run/pgpool/pgpool.pid'
+pid_file_name = '@PGPOOL_PIDDIR@/pgpool.pid'
# PID file name
# (change requires restart)
logdir = '/tmp'

View file

@ -0,0 +1,14 @@
$NetBSD: patch-pool.h,v 1.1 2013/05/02 20:02:42 fhajny Exp $
Default pid file location.
--- pool.h.orig 2013-04-26 05:52:44.000000000 +0000
+++ pool.h
@@ -67,7 +67,7 @@
#define DEFAULT_SOCKET_DIR "/tmp"
/* pid file name */
-#define DEFAULT_PID_FILE_NAME "/var/run/pgpool/pgpool.pid"
+#define DEFAULT_PID_FILE_NAME "@PGPOOL_PIDDIR@/pgpool.pid"
/* status file name */
#define STATUS_FILE_NAME "pgpool_status"