summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Swenson <titanofold@gentoo.org>2012-08-14 19:50:17 +0000
committerAaron Swenson <titanofold@gentoo.org>2012-08-14 19:50:17 +0000
commit7aeabc36e28b3726fcb875d4d30340e69494ae07 (patch)
treeb0440fe398746dda224c3cf6f47bb89af14e338d /dev-db/pgpool2
parentVersion bump. Drop old version. (diff)
downloadhistorical-7aeabc36e28b3726fcb875d4d30340e69494ae07.tar.gz
historical-7aeabc36e28b3726fcb875d4d30340e69494ae07.tar.bz2
historical-7aeabc36e28b3726fcb875d4d30340e69494ae07.zip
More complete ebuild and initialization script. Now downloads the correct tarball fixing bug 423639.
Package-Manager: portage-2.1.10.65/cvs/Linux x86_64
Diffstat (limited to 'dev-db/pgpool2')
-rw-r--r--dev-db/pgpool2/ChangeLog11
-rw-r--r--dev-db/pgpool2/Manifest30
-rw-r--r--dev-db/pgpool2/files/pgpool2.confd17
-rw-r--r--dev-db/pgpool2/files/pgpool2.initd76
-rw-r--r--dev-db/pgpool2/files/pgpool_run_paths.patch180
-rw-r--r--dev-db/pgpool2/metadata.xml5
-rw-r--r--dev-db/pgpool2/pgpool2-3.0.4.ebuild75
-rw-r--r--dev-db/pgpool2/pgpool2-3.0.7.ebuild77
-rw-r--r--dev-db/pgpool2/pgpool2-3.1.3.ebuild77
-rw-r--r--dev-db/pgpool2/pgpool2-3.2.0-r1.ebuild113
-rw-r--r--dev-db/pgpool2/pgpool2-3.2.0.ebuild77
11 files changed, 403 insertions, 335 deletions
diff --git a/dev-db/pgpool2/ChangeLog b/dev-db/pgpool2/ChangeLog
index 8dddd837b496..9ec68d7d77e8 100644
--- a/dev-db/pgpool2/ChangeLog
+++ b/dev-db/pgpool2/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-db/pgpool2
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/ChangeLog,v 1.10 2012/08/04 12:57:24 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/ChangeLog,v 1.11 2012/08/14 19:50:17 titanofold Exp $
+
+*pgpool2-3.2.0-r1 (14 Aug 2012)
+
+ 14 Aug 2012; Aaron W. Swenson <titanofold@gentoo.org> +files/pgpool2.confd,
+ -pgpool2-3.0.4.ebuild, -pgpool2-3.0.7.ebuild, -pgpool2-3.1.3.ebuild,
+ -pgpool2-3.2.0.ebuild, +pgpool2-3.2.0-r1.ebuild,
+ +files/pgpool_run_paths.patch, files/pgpool2.initd, metadata.xml:
+ More complete ebuild and initialization script. Now downloads the correct
+ tarball fixing bug 423639.
*pgpool2-3.2.0 (04 Aug 2012)
diff --git a/dev-db/pgpool2/Manifest b/dev-db/pgpool2/Manifest
index ab119dfe47cb..34b8a410ef99 100644
--- a/dev-db/pgpool2/Manifest
+++ b/dev-db/pgpool2/Manifest
@@ -1,12 +1,18 @@
-AUX pgpool2.initd 625 RMD160 c19f8bb11c2a6f353f1aae65d1a6452e6a301d52 SHA1 d45254f3972df9fead5d85f76be399b771a3237a SHA256 65d00f07f7c14f78c8a4f41c49ef5d9542796ea2278e74c022b93dd7d6ff60fc
-DIST pgpool-II-3.0.4.tar.gz 1211828 SHA256 886e0fa3dec98f4a6c25cc5b4b1fc5aac49258e2669c1ffda178d18711c8b5c1 SHA512 92d646de705685668566fd8a0441d2b0c09e6e51911e3223fbb02954ef1935465fa244ad5aa8402f25b77bd3bb402c50d63b563c635235d4830e2b51e6e06fed WHIRLPOOL e4a9878b4af4d4cde8699406730d391e147b21b12231d06c6d575f2ae72e4bab96ebab1a27948552923f2bda469d2cda9a4203b69abdd380dddedb69137d9ba9
-DIST pgpool-II-3.0.7.tar.gz 1211828 SHA256 886e0fa3dec98f4a6c25cc5b4b1fc5aac49258e2669c1ffda178d18711c8b5c1 SHA512 92d646de705685668566fd8a0441d2b0c09e6e51911e3223fbb02954ef1935465fa244ad5aa8402f25b77bd3bb402c50d63b563c635235d4830e2b51e6e06fed WHIRLPOOL e4a9878b4af4d4cde8699406730d391e147b21b12231d06c6d575f2ae72e4bab96ebab1a27948552923f2bda469d2cda9a4203b69abdd380dddedb69137d9ba9
-DIST pgpool-II-3.1.3.tar.gz 1211828 SHA256 886e0fa3dec98f4a6c25cc5b4b1fc5aac49258e2669c1ffda178d18711c8b5c1 SHA512 92d646de705685668566fd8a0441d2b0c09e6e51911e3223fbb02954ef1935465fa244ad5aa8402f25b77bd3bb402c50d63b563c635235d4830e2b51e6e06fed WHIRLPOOL e4a9878b4af4d4cde8699406730d391e147b21b12231d06c6d575f2ae72e4bab96ebab1a27948552923f2bda469d2cda9a4203b69abdd380dddedb69137d9ba9
-DIST pgpool-II-3.2.0.tar.gz 1211828 RMD160 51572b55e7e7ac1d67269ac2c45a1b8316314fa4 SHA1 dfbc5d8e05f79bbf96725204a0291955194e96d0 SHA256 886e0fa3dec98f4a6c25cc5b4b1fc5aac49258e2669c1ffda178d18711c8b5c1
-EBUILD pgpool2-3.0.4.ebuild 1672 RMD160 892cdad6e3166f85fb91889d67b0b9838e4f93f9 SHA1 09e8b467fe140e826c484ea2d391b97a17f16c49 SHA256 ece6264b00ed63ca05b2a107af6adaad6ed67f2d190b54215a6c6449d784d64d
-EBUILD pgpool2-3.0.7.ebuild 1755 RMD160 0312052c7bcc1264f8ec3a1352dccd0eee9defdc SHA1 735416b409a5828239abfc11e65050b20d08ebb4 SHA256 633c727dc94d83f549502ad23b22bb87968f82bf68c1b5fb679d7a9134c186cf
-EBUILD pgpool2-3.1.3.ebuild 1755 RMD160 e31e7ed2e5dddf368d81808b925d862f4e1b820f SHA1 a7c343f5cba4c2ef17674dfbd9e0b6204b06e0b3 SHA256 137d392a6083d76f1d28d316bd2df096803f0cba8e036110ea8cbb032c9e39c7
-EBUILD pgpool2-3.2.0.ebuild 1752 RMD160 d317fcc6e4ae683f2900e62a1308b80684fdd5bd SHA1 2cb0bde5703c6c05f1a33663e8f656a42cbd95ea SHA256 18dcdc5cabf25adc471780a4e0d765a6df12d6fe76b49fa39a2a8ce7794f7ccb
-EBUILD pgpool2-9999.ebuild 1671 RMD160 b749b2c164b834b6a23a37ef8b632b9569f5f6af SHA1 a2c361eb7be43fea168fffa74d43252b3fdf945c SHA256 df98116bdec1057d7f812a10e8280f3611516c380a68116306592c8311388363
-MISC ChangeLog 2053 RMD160 a5fd11c6ae1ea591b47863914a839ec8a39c8da1 SHA1 58e65cf48920552fc7e2cb31a9deeab2f2ea0239 SHA256 53502dfcd79f0323e718374f08dd7b784f8d42e2456fef46cdbc61b785bf2f6c
-MISC metadata.xml 164 RMD160 becfe652663bd65719dd11fa6ffb588b3d5b4ecc SHA1 f67b7ac1c5e6e65ef5a19a589d4759c84918f86c SHA256 7e8e8126bc8701c4a42c7dfed8bb755ac6040fe3d0e3f994d888f8b2b4fa7d8b
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX pgpool2.confd 649 SHA256 542007a1f5fc377ce921316913526fe08a5b6913d533359a3ec3317b0075b60d SHA512 5f9a4fa1e68161049ad767d64c764fbf70e84a4239e58119455a45a7e45d86ea2d19b617147cf891053e0dad4420c84704d67015334c7d41bad05b260d70e910 WHIRLPOOL 0b28a1731bed4a316f33c2c0f8d95567093b6685e43912a2de05802248d3f6a7044bf391efa1f01a320e978f45764b4c7569f0e5aa73be8291abad264d43964c
+AUX pgpool2.initd 2008 SHA256 66ff402aadb09d3876fac5cf9faafce299429b8f5f13ae89ddf2b9d7ebe873fd SHA512 82d6a93f173cd2796828aeb16bc4fca8c329ce89082bc7ed052efdf5a2b74eccb804851ff89b9ef067150cc2773169f76a3f826fe50d34dc5953d90968e42897 WHIRLPOOL b867739bc23076145d0cb69840fe7252cd00d990c22c9f1787e6f8902f8a8da366827830d92722539cdbbdf54b5ab1f1e6e852f22baced7194d1010e5f6eafb3
+AUX pgpool_run_paths.patch 7443 SHA256 c75abd28e48c8895e7c00eab800b8497f8b64d55c7f192c2343aab1eb3fee31c SHA512 227716daf9d93d1ca0c749faedca3d1c9e35b64eebe4c61db2e37f94ed2dcc2e97e34118d853b3dbc848e395329c05c026f819a9e5350b4f0e32b269932d68b1 WHIRLPOOL 822b11df3b7940f8557d51f93967e892b7d66ee9cec2c52a62a0ba2848148a52edfab13e0f2d29e24e76328a69be0b11156d64503c22e576dc4fa033cc700e76
+DIST pgpool-II-3.2.0.tar.gz 1599391 SHA256 2e41ce78154fc7e9e13eb34f0b60e352d6183de08c4040bea9fbdd914e3e28e0 SHA512 9c9d56bed525c3d8508cde32cd6ac8b13df6dd28366b90157c46c2900eef93fa90254de49b1b574f83fe76525f27a2e8c23d7dcec02cad566aaeff62a6b3282d WHIRLPOOL 25e8f086ea48300affe7195ffcbeee1faa8cde344a99d6caccb0041db04e8040bd2750148c1fde94342b4c544c328f9f97d0b1cf9394443cf37a0d003ace0a90
+EBUILD pgpool2-3.2.0-r1.ebuild 2867 SHA256 c509d4d62b40f483c35f58e1406ec53914095c2639b62dc9d805603ab3613e95 SHA512 5604054096ae13406e9e8c962ae3d44ec4a04ddf0994cedbe4b430f115e58d13f84864039fe285235090f420d2fc57278943d39ed74f1ad66d6d2569d12b84d3 WHIRLPOOL 30e00ef119a5331bc5f1d777c6c1195955f602c3cd99f41c4b92b852b521d3b566432f6c0b5f50d24d8c18ea046b525611561482eb0355e4e38c043b824feeae
+EBUILD pgpool2-9999.ebuild 1671 SHA256 df98116bdec1057d7f812a10e8280f3611516c380a68116306592c8311388363 SHA512 ec90f1f3fbc2b373696db051b872dbdc1a94ec37ee9cc28c008ce923f8a752dc168af8667d68463eaf663a7814831139f2bf14dbd470ccf53b00c6e29afcc212 WHIRLPOOL d85bdee3ce42900f1ce556c745239846a21764b0b1c83b6dff42b522b0fd075bcfe2a9e76ed3c9087fa538efefb9ffab0ad6d84157bd164b13ad15148f6842e7
+MISC ChangeLog 2463 SHA256 37ce4957333e5f27e1af12ad39311e941b01b2d2fead650c463e63f6507b5150 SHA512 df7bf447c88aa67539b13169130bffe5a75c72c76c36e479eaad58fe0024eb384b17806d12cb4ad83712c9d03f36184eb6cb5db09f79115427224125095bca62 WHIRLPOOL 862986bfd9dce934283d3c6e2c6a4c5accaae678f78a711d760703e5ae3fa0f913f3aedc72da2d46703f6f388b5526a4ffa1f473a340e68bf896c1e29469a224
+MISC metadata.xml 259 SHA256 f42aac06ff89f92bbcda31eadabefeed1a3d697f69ab8ae80341bcbf2e3fd530 SHA512 d67ad6e98b318a4eb2caf657e7d326c17afb7ddc841bd415388fbd196e274d68cfb6d362da3f39e2d2f81352fbfa66e8b805c29326024236d4c4f69b87124231 WHIRLPOOL 05314d28fa00f4c699d1d6535810322af91c192d013105f53bc5ebeafa99c182e8501d693efe8c12a1ede11d244f7627656c643a72902412f468f465e39a6c98
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iF4EAREIAAYFAlAqrBwACgkQVxOqA9G7/aC27gEAimxFkUFlIfSDN+LOxv/QIEAh
+FQagw8L1n7bWTKKbq0kA/1jIj10lLK4UHv6uNP24rfC3ovlcpUnvUBe4RcIFm/HE
+=8suj
+-----END PGP SIGNATURE-----
diff --git a/dev-db/pgpool2/files/pgpool2.confd b/dev-db/pgpool2/files/pgpool2.confd
new file mode 100644
index 000000000000..b2dd2a69e02e
--- /dev/null
+++ b/dev-db/pgpool2/files/pgpool2.confd
@@ -0,0 +1,17 @@
+# NICE_QUIT ignores new connections and wait for clients to disconnect from
+# server before shutting down. NICE_TIMEOUT in seconds determines how long to
+# wait for this to succeed.
+NICE_TIMEOUT=60
+
+# Forecfully disconnect clients from server and shut down. This is performed
+# after NICE_QUIT. Terminated client connections have their open transactions
+# rolled back.
+# Set RUDE_QUIT to "NO" to disable. RUDE_TIMEOUT in seconds.
+RUDE_QUIT="YES"
+RUDE_TIMEOUT=30
+
+# If the server still fails to shutdown, you can force it to quit by setting
+# this to YES.
+# Set FORCE_QUIT to "YES" to enable. FORCE_TIMEOUT in seconds.
+FORCE_QUIT="NO"
+FORCE_TIMEOUT=2 \ No newline at end of file
diff --git a/dev-db/pgpool2/files/pgpool2.initd b/dev-db/pgpool2/files/pgpool2.initd
index 20f7ca2d6a3c..9b1864239cea 100644
--- a/dev-db/pgpool2/files/pgpool2.initd
+++ b/dev-db/pgpool2/files/pgpool2.initd
@@ -1,29 +1,75 @@
#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd,v 1.2 2011/03/02 08:52:52 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd,v 1.3 2012/08/14 19:50:17 titanofold Exp $
+
+extra_started_commands="reload"
+
+CONFIGFILE="/etc/pgpool2/pgpool.conf"
+LOGFILE="/var/log/pgpool2.log"
+PIDFILE=""
depend() {
- need net
+ use net
+ use postgresql
}
-ARGS="-f /etc/pgpool2/pgpool.conf -a /etc/pgpool2/pool_hba.conf -F /etc/pgpool2/pcp.conf -D"
-LOGFILE="/var/log/pgpool2.log"
+get_config() {
+ [ -f ${CONFIGFILE} ] || return 1
+
+ eval echo $(sed -e 's:#.*::' ${CONFIGFILE} | \
+ awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }')
+}
+
+PIDFILE="$(get_config pid_file_name)"
+
+prep() {
+ checkpath -o pgpool:postgres -m 0770 -d $(dirname ${PIDFILE}) || return 1
+ checkpath -o pgpool:postgres -m 0770 -d $(get_config logdir) || return 1
+ checkpath -o pgpool:postgres -m 0660 -f ${LOGFILE} || return 1
+ checkpath -o postgres:postgres -m 0770 -d $(get_config socket_dir) || return 1
+ checkpath -o postgres:postgres -m 0770 -d $(get_config pcp_socket_dir) || return 1
+}
start() {
- ebegin "Starting pgpool2"
- /usr/bin/pgpool ${ARGS} >> "${LOGFILE}" 2>&1
- eend $?
+ prep || return 1
+
+ ebegin "Starting pgpool2"
+
+ start-stop-daemon --start \
+ --user pgpool:postgres \
+ --pidfile ${PIDFILE} \
+ --exec /usr/bin/pgpool
+
+ eend
}
stop() {
- ebegin "Stopping pgpool2"
- /usr/bin/pgpool -m fast stop >> "${LOGFILE}" 2>&1
- eend $?
+ local seconds=$(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} ))
+ ebegin "Stopping pgpool (this can take up to ${seconds} seconds)"
+
+ local retval
+ local retries=SIGTERM/${NICE_TIMEOUT}
+
+ if [ "${RUDE_QUIT}" != "NO" ] ; then
+ einfo "RUDE_QUIT enabled."
+ retries="${retries}/SIGINT/${RUDE_TIMEOUT}"
+ fi
+ if [ "${FORCE_QUIT}" = "YES" ] ; then
+ einfo "FORCE_QUIT enabled."
+ ewarn "A recover-run might be executed on next startup."
+ retries="${retries}/SIGQUIT/${FORCE_TIMEOUT}"
+ fi
+
+ # Loops through nice, rude, and force quit in one go.
+ start-stop-daemon --stop \
+ --pidfile ${PIDFILE} \
+ --retry ${retries}
+
+ eend
}
-restart() {
- svc_stop
- sleep 3
- svc_start
+reload() {
+ start-stop-daemon --signal HUP \
+ --pidfile ${PIDFILE}
}
diff --git a/dev-db/pgpool2/files/pgpool_run_paths.patch b/dev-db/pgpool2/files/pgpool_run_paths.patch
new file mode 100644
index 000000000000..a1912af15e4c
--- /dev/null
+++ b/dev-db/pgpool2/files/pgpool_run_paths.patch
@@ -0,0 +1,180 @@
+diff -Naurw a/pgpool.conf.sample b/pgpool.conf.sample
+--- a/pgpool.conf.sample 2012-07-19 03:06:21.000000000 -0400
++++ b/pgpool.conf.sample 2012-08-14 07:33:39.200695855 -0400
+@@ -31,10 +31,8 @@
+ port = 9999
+ # Port number
+ # (change requires restart)
+-socket_dir = '/tmp'
++socket_dir = '@PGSQL_SOCKETDIR@'
+ # Unix domain socket path
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+
+@@ -43,10 +41,8 @@
+ pcp_port = 9898
+ # Port number for pcp
+ # (change requires restart)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '@PGSQL_SOCKETDIR@'
+ # Unix domain socket path for pcp
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+ # - Backend Connection Settings -
+@@ -176,10 +172,10 @@
+ # FILE LOCATIONS
+ #------------------------------------------------------------------------------
+
+-pid_file_name = '/var/run/pgpool/pgpool.pid'
++pid_file_name = '@PGPOOL_SOCKETDIR@/pgpool.pid'
+ # PID file name
+ # (change requires restart)
+-logdir = '/tmp'
++logdir = '@PGPOOL_SOCKETDIR@'
+ # Directory of pgPool status file
+ # (change requires restart)
+
+diff -Naurw a/pgpool.conf.sample-master-slave b/pgpool.conf.sample-master-slave
+--- a/pgpool.conf.sample-master-slave 2012-07-16 22:56:37.000000000 -0400
++++ b/pgpool.conf.sample-master-slave 2012-08-14 07:33:39.201695842 -0400
+@@ -31,10 +31,8 @@
+ port = 9999
+ # Port number
+ # (change requires restart)
+-socket_dir = '/tmp'
++socket_dir = '@PGSQL_SOCKETDIR@'
+ # Unix domain socket path
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+
+@@ -43,10 +41,8 @@
+ pcp_port = 9898
+ # Port number for pcp
+ # (change requires restart)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '@PGSQL_SOCKETDIR@'
+ # Unix domain socket path for pcp
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+ # - Backend Connection Settings -
+@@ -176,10 +172,10 @@
+ # FILE LOCATIONS
+ #------------------------------------------------------------------------------
+
+-pid_file_name = '/var/run/pgpool/pgpool.pid'
++pid_file_name = '@PGPOOL_SOCKETDIR@/pgpool.pid'
+ # PID file name
+ # (change requires restart)
+-logdir = '/tmp'
++logdir = '@PGPOOL_SOCKETDIR@'
+ # Directory of pgPool status file
+ # (change requires restart)
+
+diff -Naurw a/pgpool.conf.sample-replication b/pgpool.conf.sample-replication
+--- a/pgpool.conf.sample-replication 2012-07-16 22:56:37.000000000 -0400
++++ b/pgpool.conf.sample-replication 2012-08-14 07:33:39.202695830 -0400
+@@ -31,10 +31,8 @@
+ port = 9999
+ # Port number
+ # (change requires restart)
+-socket_dir = '/tmp'
++socket_dir = '@PGSQL_SOCKETDIR@'
+ # Unix domain socket path
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+
+@@ -43,10 +41,8 @@
+ pcp_port = 9898
+ # Port number for pcp
+ # (change requires restart)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '@PGSQL_SOCKETDIR@'
+ # Unix domain socket path for pcp
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+ # - Backend Connection Settings -
+@@ -176,10 +172,10 @@
+ # FILE LOCATIONS
+ #------------------------------------------------------------------------------
+
+-pid_file_name = '/var/run/pgpool/pgpool.pid'
++pid_file_name = '@PGPOOL_SOCKETDIR@/pgpool.pid'
+ # PID file name
+ # (change requires restart)
+-logdir = '/tmp'
++logdir = '@PGPOOL_SOCKETDIR@'
+ # Directory of pgPool status file
+ # (change requires restart)
+
+diff -Naurw a/pgpool.conf.sample-stream b/pgpool.conf.sample-stream
+--- a/pgpool.conf.sample-stream 2012-07-16 22:56:37.000000000 -0400
++++ b/pgpool.conf.sample-stream 2012-08-14 07:33:39.203695818 -0400
+@@ -31,10 +31,8 @@
+ port = 9999
+ # Port number
+ # (change requires restart)
+-socket_dir = '/tmp'
++socket_dir = '@PGSQL_SOCKETDIR@'
+ # Unix domain socket path
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+
+@@ -43,10 +41,8 @@
+ pcp_port = 9898
+ # Port number for pcp
+ # (change requires restart)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '@PGSQL_SOCKETDIR@'
+ # Unix domain socket path for pcp
+- # The Debian package defaults to
+- # /var/run/postgresql
+ # (change requires restart)
+
+ # - Backend Connection Settings -
+@@ -176,10 +172,10 @@
+ # FILE LOCATIONS
+ #------------------------------------------------------------------------------
+
+-pid_file_name = '/var/run/pgpool/pgpool.pid'
++pid_file_name = '@PGPOOL_SOCKETDIR@/pgpool.pid'
+ # PID file name
+ # (change requires restart)
+-logdir = '/tmp'
++logdir = '@PGPOOL_SOCKETDIR@'
+ # Directory of pgPool status file
+ # (change requires restart)
+
+diff -Naurw a/pool.h b/pool.h
+--- a/pool.h 2012-07-02 00:09:18.000000000 -0400
++++ b/pool.h 2012-08-14 07:26:56.005764702 -0400
+@@ -61,13 +61,13 @@
+ #define HBA_CONF_FILE_NAME "pool_hba.conf"
+
+ /* pid file directory */
+-#define DEFAULT_LOGDIR "/tmp"
++#define DEFAULT_LOGDIR "@PGPOOL_SOCKETDIR@"
+
+ /* Unix domain socket directory */
+-#define DEFAULT_SOCKET_DIR "/tmp"
++#define DEFAULT_SOCKET_DIR "@PGSQL_SOCKETDIR@"
+
+ /* pid file name */
+-#define DEFAULT_PID_FILE_NAME "/var/run/pgpool/pgpool.pid"
++#define DEFAULT_PID_FILE_NAME "@PGPOOL_SOCKETDIR@/pgpool.pid"
+
+ /* status file name */
+ #define STATUS_FILE_NAME "pgpool_status"
diff --git a/dev-db/pgpool2/metadata.xml b/dev-db/pgpool2/metadata.xml
index d06e452b35af..d724a3dd009d 100644
--- a/dev-db/pgpool2/metadata.xml
+++ b/dev-db/pgpool2/metadata.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>postgresql</herd>
+ <herd>postgresql</herd>
+ <use>
+ <flag name='memcached'>Use memcached for query caching.</flag>
+ </use>
</pkgmetadata>
diff --git a/dev-db/pgpool2/pgpool2-3.0.4.ebuild b/dev-db/pgpool2/pgpool2-3.0.4.ebuild
deleted file mode 100644
index 9f216ea0da7a..000000000000
--- a/dev-db/pgpool2/pgpool2-3.0.4.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/pgpool2-3.0.4.ebuild,v 1.2 2012/04/23 15:00:44 titanofold Exp $
-
-EAPI=4
-
-[[ ${PV} == 9999 ]] && MY_P=${PN/2/-II} || MY_P="${PN/2/-II}-${PV}"
-
-ECVS_SERVER="cvs.pgfoundry.org:/cvsroot/pgpool"
-ECVS_MODULE="pgpool-II"
-[[ ${PV} == 9999 ]] && SCM_ECLASS="cvs"
-inherit base autotools ${SCM_ECLASS}
-unset SCM_ECLASS
-
-DESCRIPTION="Connection pool server for PostgreSQL"
-HOMEPAGE="http://pgpool.projects.postgresql.org/"
-[[ ${PV} == 9999 ]] || SRC_URI="http://pgfoundry.org/frs/download.php/3076/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-[[ ${PV} == 9999 ]] || KEYWORDS="~amd64 ~x86"
-IUSE="pam ssl static-libs"
-
-RDEPEND="
- dev-db/postgresql-base
- pam? ( sys-auth/pambase )
- ssl? ( dev-libs/openssl )
-"
-DEPEND="${DEPEND}
- sys-devel/bison
- !!dev-db/pgpool
-"
-
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=(
- "NEWS"
- "doc/where_to_send_queries.pdf"
-)
-HTML_DOCS=(
- "doc/pgpool-en.html"
- "doc/pgpool.css"
- "doc/tutorial-en.html"
-)
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
- sed -i \
- -e 's:/tmp/:/var/run/postgresql:g' \
- pgpool.conf.sample pool.h || die
- sed -i \
- -e '/ACLOCAL_AMFLAGS/ d' \
- Makefile.am || die
- base_src_prepare
- eautoreconf
-}
-
-src_configure() {
- econf \
- --sysconfdir="${EROOT}/etc/${PN}" \
- --disable-rpath \
- $(use_enable static-libs static) \
- $(use_with ssl openssl) \
- $(use_with pam)
-}
-
-src_install() {
- base_src_install
- find "${ED}" -name '*.la' -exec rm -f {} +
- # move misc data to proper folder
- mv "${ED}/usr/share/${PN/2/-II}" "${ED}/usr/share/${PN}" || die
-
- newinitd "${FILESDIR}/${PN}.initd" ${PN}
-}
diff --git a/dev-db/pgpool2/pgpool2-3.0.7.ebuild b/dev-db/pgpool2/pgpool2-3.0.7.ebuild
deleted file mode 100644
index 43b7108c1bdc..000000000000
--- a/dev-db/pgpool2/pgpool2-3.0.7.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/pgpool2-3.0.7.ebuild,v 1.1 2012/04/23 15:00:45 titanofold Exp $
-
-EAPI=4
-
-[[ ${PV} == 9999 ]] && MY_P=${PN/2/-II} || MY_P="${PN/2/-II}-${PV}"
-
-ECVS_SERVER="cvs.pgfoundry.org:/cvsroot/pgpool"
-ECVS_MODULE="pgpool-II"
-[[ ${PV} == 9999 ]] && SCM_ECLASS="cvs"
-inherit base autotools ${SCM_ECLASS}
-unset SCM_ECLASS
-
-DESCRIPTION="Connection pool server for PostgreSQL"
-HOMEPAGE="http://pgpool.projects.postgresql.org/"
-[[ ${PV} == 9999 ]] || SRC_URI="http://pgfoundry.org/frs/download.php/3076/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-[[ ${PV} == 9999 ]] || KEYWORDS="~amd64 ~x86"
-IUSE="pam ssl static-libs"
-
-RDEPEND="
- dev-db/postgresql-base
- pam? ( sys-auth/pambase )
- ssl? ( dev-libs/openssl )
-"
-DEPEND="${DEPEND}
- sys-devel/bison
- !!dev-db/pgpool
-"
-
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=(
- "NEWS"
- "doc/where_to_send_queries.pdf"
-)
-HTML_DOCS=(
- "doc/pgpool-en.html"
- "doc/pgpool.css"
- "doc/tutorial-en.html"
-)
-
-# Those turkeys didn't update the directory name!'
-#S=${WORKDIR}/${MY_P}
-S="${WORKDIR}/pgpool-II-3.0.4"
-
-src_prepare() {
- sed -i \
- -e 's:/tmp/:/var/run/postgresql:g' \
- pgpool.conf.sample pool.h || die
- sed -i \
- -e '/ACLOCAL_AMFLAGS/ d' \
- Makefile.am || die
- base_src_prepare
- eautoreconf
-}
-
-src_configure() {
- econf \
- --sysconfdir="${EROOT}/etc/${PN}" \
- --disable-rpath \
- $(use_enable static-libs static) \
- $(use_with ssl openssl) \
- $(use_with pam)
-}
-
-src_install() {
- base_src_install
- find "${ED}" -name '*.la' -exec rm -f {} +
- # move misc data to proper folder
- mv "${ED}/usr/share/${PN/2/-II}" "${ED}/usr/share/${PN}" || die
-
- newinitd "${FILESDIR}/${PN}.initd" ${PN}
-}
diff --git a/dev-db/pgpool2/pgpool2-3.1.3.ebuild b/dev-db/pgpool2/pgpool2-3.1.3.ebuild
deleted file mode 100644
index c3405a15379b..000000000000
--- a/dev-db/pgpool2/pgpool2-3.1.3.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/pgpool2-3.1.3.ebuild,v 1.1 2012/04/23 15:00:45 titanofold Exp $
-
-EAPI=4
-
-[[ ${PV} == 9999 ]] && MY_P=${PN/2/-II} || MY_P="${PN/2/-II}-${PV}"
-
-ECVS_SERVER="cvs.pgfoundry.org:/cvsroot/pgpool"
-ECVS_MODULE="pgpool-II"
-[[ ${PV} == 9999 ]] && SCM_ECLASS="cvs"
-inherit base autotools ${SCM_ECLASS}
-unset SCM_ECLASS
-
-DESCRIPTION="Connection pool server for PostgreSQL"
-HOMEPAGE="http://pgpool.projects.postgresql.org/"
-[[ ${PV} == 9999 ]] || SRC_URI="http://pgfoundry.org/frs/download.php/3076/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-[[ ${PV} == 9999 ]] || KEYWORDS="~amd64 ~x86"
-IUSE="pam ssl static-libs"
-
-RDEPEND="
- dev-db/postgresql-base
- pam? ( sys-auth/pambase )
- ssl? ( dev-libs/openssl )
-"
-DEPEND="${DEPEND}
- sys-devel/bison
- !!dev-db/pgpool
-"
-
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=(
- "NEWS"
- "doc/where_to_send_queries.pdf"
-)
-HTML_DOCS=(
- "doc/pgpool-en.html"
- "doc/pgpool.css"
- "doc/tutorial-en.html"
-)
-
-# Those turkeys didn't update the directory name!'
-#S=${WORKDIR}/${MY_P}
-S="${WORKDIR}/pgpool-II-3.0.4"
-
-src_prepare() {
- sed -i \
- -e 's:/tmp/:/var/run/postgresql:g' \
- pgpool.conf.sample pool.h || die
- sed -i \
- -e '/ACLOCAL_AMFLAGS/ d' \
- Makefile.am || die
- base_src_prepare
- eautoreconf
-}
-
-src_configure() {
- econf \
- --sysconfdir="${EROOT}/etc/${PN}" \
- --disable-rpath \
- $(use_enable static-libs static) \
- $(use_with ssl openssl) \
- $(use_with pam)
-}
-
-src_install() {
- base_src_install
- find "${ED}" -name '*.la' -exec rm -f {} +
- # move misc data to proper folder
- mv "${ED}/usr/share/${PN/2/-II}" "${ED}/usr/share/${PN}" || die
-
- newinitd "${FILESDIR}/${PN}.initd" ${PN}
-}
diff --git a/dev-db/pgpool2/pgpool2-3.2.0-r1.ebuild b/dev-db/pgpool2/pgpool2-3.2.0-r1.ebuild
new file mode 100644
index 000000000000..e44fade1be67
--- /dev/null
+++ b/dev-db/pgpool2/pgpool2-3.2.0-r1.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/pgpool2-3.2.0-r1.ebuild,v 1.1 2012/08/14 19:50:17 titanofold Exp $
+
+EAPI=4
+
+[[ ${PV} == 9999 ]] && MY_P=${PN/2/-II} || MY_P="${PN/2/-II}-${PV}"
+
+ECVS_SERVER="cvs.pgfoundry.org:/cvsroot/pgpool"
+ECVS_MODULE="pgpool-II"
+[[ ${PV} == 9999 ]] && SCM_ECLASS="cvs"
+inherit base autotools ${SCM_ECLASS}
+unset SCM_ECLASS
+
+DESCRIPTION="Connection pool server for PostgreSQL"
+HOMEPAGE="http://www.pgpool.net/"
+[[ ${PV} == 9999 ]] || SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+[[ ${PV} == 9999 ]] || KEYWORDS="~amd64 ~x86"
+IUSE="memcached pam ssl static-libs"
+
+RDEPEND="
+ dev-db/postgresql-base
+ memcached? ( dev-libs/libmemcached )
+ pam? ( sys-auth/pambase )
+ ssl? ( dev-libs/openssl )
+"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ !!dev-db/pgpool
+"
+
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup postgres 70
+ enewuser pgpool -1 -1 -1 postgres
+
+ # We need the postgres user as well so we can set the proper
+ # permissions on the sockets without getting into fights with
+ # PostgreSQL's initialization scripts.
+ enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/pgpool_run_paths.patch"
+
+ local pg_config_manual="$(pg_config --includedir)/pg_config_manual.h"
+ local pgsql_socket_dir=$(grep DEFAULT_PGSOCKET_DIR "${pg_config_manual}" | \
+ sed 's|.*\"\(.*\)\"|\1|g')
+ local pgpool_socket_dir="$(dirname $pgsql_socket_dir)/pgpool"
+
+ sed "s|@PGSQL_SOCKETDIR@|${pgsql_socket_dir}|g" \
+ -i *.conf.sample* pool.h || die
+
+ sed "s|@PGPOOL_SOCKETDIR@|${pgpool_socket_dir}|g" \
+ -i *.conf.sample* pool.h || die
+}
+
+src_configure() {
+ local myconf
+ use memcached && \
+ myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\""
+
+ econf \
+ --disable-rpath \
+ --sysconfdir="${EROOT%/}/etc/${PN}" \
+ $(use_with pam) \
+ $(use_with ssl openssl) \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_compile() {
+ emake
+
+ cd sql
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ cd sql
+ emake DESTDIR="${D}" install
+ cd "${S}"
+
+ # `contrib' moved to `extension' with PostgreSQL 9.1
+ local pgslot=$(postgresql-config show)
+ if [[ ${pgslot//.} > 90 ]] ; then
+ cd "${ED%/}$(pg_config --sharedir)"
+ mv contrib extension || die
+ cd "${S}"
+ fi
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+
+ # Documentation
+ dodoc NEWS TODO doc/where_to_send_queries.{pdf,odg}
+ dohtml -r doc
+
+ # Examples and extras
+ insinto "/usr/share/${PN}"
+ doins doc/{pgpool_remote_start,basebackup.sh,recovery.conf.sample}
+ mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die
+
+ # One more thing: Evil la files!
+ find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/dev-db/pgpool2/pgpool2-3.2.0.ebuild b/dev-db/pgpool2/pgpool2-3.2.0.ebuild
deleted file mode 100644
index 8a04b79cf8e3..000000000000
--- a/dev-db/pgpool2/pgpool2-3.2.0.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/pgpool2-3.2.0.ebuild,v 1.1 2012/08/04 12:57:24 patrick Exp $
-
-EAPI=4
-
-[[ ${PV} == 9999 ]] && MY_P=${PN/2/-II} || MY_P="${PN/2/-II}-${PV}"
-
-ECVS_SERVER="cvs.pgfoundry.org:/cvsroot/pgpool"
-ECVS_MODULE="pgpool-II"
-[[ ${PV} == 9999 ]] && SCM_ECLASS="cvs"
-inherit base autotools ${SCM_ECLASS}
-unset SCM_ECLASS
-
-DESCRIPTION="Connection pool server for PostgreSQL"
-HOMEPAGE="http://pgpool.projects.postgresql.org/"
-[[ ${PV} == 9999 ]] || SRC_URI="http://pgfoundry.org/frs/download.php/3076/${MY_P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-[[ ${PV} == 9999 ]] || KEYWORDS="~amd64 ~x86"
-IUSE="pam ssl static-libs"
-
-RDEPEND="
- dev-db/postgresql-base
- pam? ( sys-auth/pambase )
- ssl? ( dev-libs/openssl )
-"
-DEPEND="${DEPEND}
- sys-devel/bison
- !!dev-db/pgpool
-"
-
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=(
- "NEWS"
- "doc/where_to_send_queries.pdf"
-)
-HTML_DOCS=(
- "doc/pgpool-en.html"
- "doc/pgpool.css"
- "doc/tutorial-en.html"
-)
-
-# Those turkeys didn't update the directory name!'
-#S=${WORKDIR}/${MY_P}
-S="${WORKDIR}/pgpool-II-3.0.4"
-
-src_prepare() {
- sed -i \
- -e 's:/tmp/:/var/run/postgresql:g' \
- pgpool.conf.sample pool.h || die
- sed -i \
- -e '/ACLOCAL_AMFLAGS/ d' \
- Makefile.am || die
- base_src_prepare
- eautoreconf
-}
-
-src_configure() {
- econf \
- --sysconfdir="${EROOT}/etc/${PN}" \
- --disable-rpath \
- $(use_enable static-libs static) \
- $(use_with ssl openssl) \
- $(use_with pam)
-}
-
-src_install() {
- base_src_install
- find "${ED}" -name '*.la' -exec rm -f {} +
- # move misc data to proper folder
- mv "${ED}/usr/share/${PN/2/-II}" "${ED}/usr/share/${PN}" || die
-
- newinitd "${FILESDIR}/${PN}.initd" ${PN}
-}