diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2011-01-26 16:49:10 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2011-01-26 16:49:10 +0000 |
commit | 1802c599fc34edc88a64f16ea70bbf86ac5c91d7 (patch) | |
tree | 26e3011fcaeb50fbc3e32b04c3915b2cb8746be3 /dev-db | |
parent | x86 stable wrt bug #352740 (diff) | |
download | gentoo-2-1802c599fc34edc88a64f16ea70bbf86ac5c91d7.tar.gz gentoo-2-1802c599fc34edc88a64f16ea70bbf86ac5c91d7.tar.bz2 gentoo-2-1802c599fc34edc88a64f16ea70bbf86ac5c91d7.zip |
Initial commit. Fixes bug #196300. Ebuild made thanks to ccss.cz.
(Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/pgpool2/ChangeLog | 11 | ||||
-rw-r--r-- | dev-db/pgpool2/files/3.0.1-fix_md5_malloc.patch | 12 | ||||
-rw-r--r-- | dev-db/pgpool2/files/pgpool2-tmpdir.patch | 56 | ||||
-rw-r--r-- | dev-db/pgpool2/files/pgpool2.initd | 36 | ||||
-rw-r--r-- | dev-db/pgpool2/metadata.xml | 5 | ||||
-rw-r--r-- | dev-db/pgpool2/pgpool2-3.0.1.ebuild | 64 |
6 files changed, 184 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/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 +} |