summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-01-26 16:49:10 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2011-01-26 16:49:10 +0000
commit3bf0a10a27c55cb1f9c49561ed3237939e002ecc (patch)
tree81879578d4e2317ef5c951b51339419448f63623 /dev-db
parentx86 stable wrt bug #352740 (diff)
downloadhistorical-3bf0a10a27c55cb1f9c49561ed3237939e002ecc.tar.gz
historical-3bf0a10a27c55cb1f9c49561ed3237939e002ecc.tar.bz2
historical-3bf0a10a27c55cb1f9c49561ed3237939e002ecc.zip
Initial commit. Fixes bug #196300. Ebuild made thanks to ccss.cz.
Package-Manager: portage-2.2.0_alpha19/cvs/Linux x86_64
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/pgpool2/ChangeLog11
-rw-r--r--dev-db/pgpool2/Manifest7
-rw-r--r--dev-db/pgpool2/files/3.0.1-fix_md5_malloc.patch12
-rw-r--r--dev-db/pgpool2/files/pgpool2-tmpdir.patch56
-rw-r--r--dev-db/pgpool2/files/pgpool2.initd36
-rw-r--r--dev-db/pgpool2/metadata.xml5
-rw-r--r--dev-db/pgpool2/pgpool2-3.0.1.ebuild64
7 files changed, 191 insertions, 0 deletions
diff --git a/dev-db/pgpool2/ChangeLog b/dev-db/pgpool2/ChangeLog
new file mode 100644
index 000000000000..179e1ea30aed
--- /dev/null
+++ b/dev-db/pgpool2/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for dev-db/pgpool2
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/ChangeLog,v 1.1 2011/01/26 16:49:09 scarabeus Exp $
+
+*pgpool2-3.0.1 (26 Jan 2011)
+
+ 26 Jan 2011; Tomáš Chvátal <scarabeus@gentoo.org>
+ +files/3.0.1-fix_md5_malloc.patch, +files/pgpool2-tmpdir.patch,
+ +pgpool2-3.0.1.ebuild, +files/pgpool2.initd, +metadata.xml:
+ Initial commit. Fixes bug #196300. Ebuild made thanks to ccss.cz.
+
diff --git a/dev-db/pgpool2/Manifest b/dev-db/pgpool2/Manifest
new file mode 100644
index 000000000000..ec951b8f3a57
--- /dev/null
+++ b/dev-db/pgpool2/Manifest
@@ -0,0 +1,7 @@
+AUX 3.0.1-fix_md5_malloc.patch 481 RMD160 6b1ad6d1202d14ea08b2e5088838e2c59ba06359 SHA1 2afb8feb36ae6dbe7ebcbfe00a4e245e6a376f61 SHA256 7de41b015436367e25a4cf4b2da792e0b0543ce766e85ca2c008eab78920da79
+AUX pgpool2-tmpdir.patch 1806 RMD160 cfe4b124726f612953152c7cc40d028d8fef7800 SHA1 2dafdc37a24318b99bcdf8f983f12d048d8fd7f0 SHA256 431996a2d2e9acf99511c0315b51e478809b3b16818aefaf17bd9cb228975f2d
+AUX pgpool2.initd 823 RMD160 0aa71634f1fb2971c89273e859fd2a197c7e5b1e SHA1 f61ee62bcfdfd30ac0e7ecc9064d64582e40a0ee SHA256 8ff44a4bc1a557f25bd6d2f05ae6f651e04e439f1f45761d4655ba695ed1d3d2
+DIST pgpool-II-3.0.1.tar.gz 1226151 RMD160 3fa36d1d1d7c66dc6d291ba14905feb01342eb17 SHA1 1c72a271d65bd7b44b473b5020746808a056bf3d SHA256 3adfa1f92dee238abec2dd6880985da99b1e2d862e567994e9e2f2736a872ae0
+EBUILD pgpool2-3.0.1.ebuild 1355 RMD160 fffb4a0c4ec0e31ac02e62dc4d30bfaf5e4159bd SHA1 e3cfef29cc5df1314c2c8dffaff0322c274120ae SHA256 72d0360627ec2e04879c59fbded563f893f74b6224a4f1df1517c94676172684
+MISC ChangeLog 486 RMD160 6cc6a42344845b2e9f26ada9f78e10c1ee44e64f SHA1 a6c1e269406a0f7c65e784b6cc0a4e08504e0e51 SHA256 2908bab52ffb53e5e97a377b66e92fe81fbe381abe85f755d41520deefb4736c
+MISC metadata.xml 164 RMD160 becfe652663bd65719dd11fa6ffb588b3d5b4ecc SHA1 f67b7ac1c5e6e65ef5a19a589d4759c84918f86c SHA256 7e8e8126bc8701c4a42c7dfed8bb755ac6040fe3d0e3f994d888f8b2b4fa7d8b
diff --git a/dev-db/pgpool2/files/3.0.1-fix_md5_malloc.patch b/dev-db/pgpool2/files/3.0.1-fix_md5_malloc.patch
new file mode 100644
index 000000000000..818b2323294c
--- /dev/null
+++ b/dev-db/pgpool2/files/3.0.1-fix_md5_malloc.patch
@@ -0,0 +1,12 @@
+diff -burN pgpool-II-3.0.1/pool_auth.c pgpool-II-3.0.1.new/pool_auth.c
+--- pgpool-II-3.0.1/pool_auth.c 2010-09-28 10:00:48.000000000 +0200
++++ pgpool-II-3.0.1.new/pool_auth.c 2011-01-24 14:12:00.646197002 +0100
+@@ -987,7 +987,7 @@
+
+ backend->auth_kind = 5;
+ backend->pwd_size = ntohl(size) - 4;
+- memcpy(backend->password, password, backend->pwd_size);
++ memcpy(backend->password, password, sizeof(password));
+ memcpy(backend->salt, salt, sizeof(salt));
+ }
+ return kind; \ No newline at end of file
diff --git a/dev-db/pgpool2/files/pgpool2-tmpdir.patch b/dev-db/pgpool2/files/pgpool2-tmpdir.patch
new file mode 100644
index 000000000000..8a6232765c29
--- /dev/null
+++ b/dev-db/pgpool2/files/pgpool2-tmpdir.patch
@@ -0,0 +1,56 @@
+diff -Nur pgpool-II-1.0.2/pgpool.conf.sample pgpool-II-1.0.2.new/pgpool.conf.sample
+--- pgpool-II-1.0.2/pgpool.conf.sample 2006-11-29 22:54:26.000000000 +0100
++++ pgpool-II-1.0.2.new/pgpool.conf.sample 2007-02-28 15:38:36.000000000 +0100
+@@ -7,21 +7,21 @@
+ listen_addresses = 'localhost'
+
+ # Port number for pgpool
+-port = 9999
++port = 5433
+
+ # Port number for pgpool communication manager
+ pcp_port = 9898
+
+ # Unix domain socket path. (The Debian package defaults to
+ # /var/run/postgresql.)
+-socket_dir = '/tmp'
++socket_dir = '/var/run/postgresql'
+
+ # Unix domain socket path for pgpool communication manager.
+ # (Debian package defaults to /var/run/postgresql)
+-pcp_socket_dir = '/tmp'
++pcp_socket_dir = '/var/run/postgresql'
+
+ # Unix domain socket path for the backend. Debian package defaults to /var/run/postgresql!
+-backend_socket_dir = '/tmp'
++backend_socket_dir = '/var/run/postgresql'
+
+ # pgpool communication manager timeout. 0 means no timeout, but strongly not recommended!
+ pcp_timeout = 10
+@@ -43,8 +43,8 @@
+ # 0 means no exit.
+ child_max_connections = 0
+
+-# Logging directory
+-logdir = '/tmp'
++# Logging directory (more accurately, the directory for the PID file)
++logdir = '/var/run/postgresql'
+
+ # Replication mode
+ replication_mode = false
+diff -Nur pgpool-II-1.0.2/pool.h pgpool-II-1.0.2.new/pool.h
+--- pgpool-II-1.0.2/pool.h 2007-02-13 04:19:04.000000000 +0100
++++ pgpool-II-1.0.2.new/pool.h 2007-02-28 15:39:07.000000000 +0100
+@@ -46,10 +46,10 @@
+ #define PCP_PASSWD_FILE_NAME "pcp.conf"
+
+ /* pid file directory */
+-#define DEFAULT_LOGDIR "/tmp"
++#define DEFAULT_LOGDIR "/var/run/postgresql"
+
+ /* Unix domain socket directory */
+-#define DEFAULT_SOCKET_DIR "/tmp"
++#define DEFAULT_SOCKET_DIR "/var/run/postgresql"
+
+ /* pid file name */
+ #define PID_FILE_NAME "pgpool.pid"
diff --git a/dev-db/pgpool2/files/pgpool2.initd b/dev-db/pgpool2/files/pgpool2.initd
new file mode 100644
index 000000000000..554c9fed61b3
--- /dev/null
+++ b/dev-db/pgpool2/files/pgpool2.initd
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2011 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.1 2011/01/26 16:49:10 scarabeus Exp $
+
+depend() {
+ need net
+}
+
+ARGS="-f /etc/pgpool2/pgpool.conf -a /etc/pgpool2/pool_hba.conf -F /etc/pgpool2/pcp.conf -n"
+LOGFILE="/var/log/pgpool2.log"
+
+start() {
+ ebegin "Starting pgpool2"
+
+ if [ -n "${RC_UNAME}" ]; then
+ PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}"
+ else
+ PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1"
+ fi
+
+ start-stop-daemon --start --quiet --background --exec /usr/bin/pgpool ${PARAMS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pgpool2"
+ start-stop-daemon --stop --quiet --exec /usr/bin/pgpool
+ eend $?
+}
+
+restart() {
+ stop
+ sleep 3
+ start
+}
diff --git a/dev-db/pgpool2/metadata.xml b/dev-db/pgpool2/metadata.xml
new file mode 100644
index 000000000000..d06e452b35af
--- /dev/null
+++ b/dev-db/pgpool2/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>postgresql</herd>
+</pkgmetadata>
diff --git a/dev-db/pgpool2/pgpool2-3.0.1.ebuild b/dev-db/pgpool2/pgpool2-3.0.1.ebuild
new file mode 100644
index 000000000000..bc1367437bcd
--- /dev/null
+++ b/dev-db/pgpool2/pgpool2-3.0.1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/pgpool2-3.0.1.ebuild,v 1.1 2011/01/26 16:49:09 scarabeus Exp $
+
+EAPI=3
+
+inherit autotools-utils
+
+MY_P="${PN/2/-II}-${PV}"
+
+DESCRIPTION="Connection pool server for PostgreSQL"
+HOMEPAGE="http://pgpool.projects.postgresql.org/"
+SRC_URI="http://pgfoundry.org/frs/download.php/2841/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+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"
+
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-tmpdir.patch"
+ "${FILESDIR}/${PV}-fix_md5_malloc.patch"
+)
+
+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_configure() {
+ local myeconfargs=(
+ "--sysconfdir=${EROOT}/etc/${PN}"
+ "--disable-dependency-tracking"
+ "--disable-rpath"
+ $(use_with ssl openssl)
+ $(use_with pam)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ remove_libtool_files all
+ # move misc data to proper folder
+ mv "${ED}/usr/share/${PN/2/-II}" "${ED}/usr/share/${PN}" || die
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} || die
+}