diff options
author | 2006-09-13 03:36:58 +0000 | |
---|---|---|
committer | 2006-09-13 03:36:58 +0000 | |
commit | e33d7923b9f8c31665535f59f588e9f0391dc54c (patch) | |
tree | 3c5e88d4b09ad843500831212e26e86384dd3fad | |
parent | dev-db/pgcluster: 1.5 tree addition (diff) | |
download | testing-e33d7923b9f8c31665535f59f588e9f0391dc54c.tar.gz testing-e33d7923b9f8c31665535f59f588e9f0391dc54c.tar.bz2 testing-e33d7923b9f8c31665535f59f588e9f0391dc54c.zip |
dev-db/pgpool2: New package
svn path=/testing/; revision=84
-rw-r--r-- | dev-db/pgpool2/Manifest | 12 | ||||
-rw-r--r-- | dev-db/pgpool2/files/digest-pgpool2-1.0.0 | 3 | ||||
-rwxr-xr-x | dev-db/pgpool2/files/pgpool2.init | 23 | ||||
-rw-r--r-- | dev-db/pgpool2/pgpool2-1.0.0.ebuild | 108 |
4 files changed, 146 insertions, 0 deletions
diff --git a/dev-db/pgpool2/Manifest b/dev-db/pgpool2/Manifest new file mode 100644 index 0000000..5ba21c5 --- /dev/null +++ b/dev-db/pgpool2/Manifest @@ -0,0 +1,12 @@ +AUX pgpool2.init 471 RMD160 f331807e866b6cce861730a78630f8e12df1bec3 SHA1 b3750f5bb49bd9e9eb8d47b960ff4155a6734210 SHA256 40cb2cc943eecaa6c2e77125a0491ee1f49c0ed941eb62ac4bf206e01830d992 +MD5 5a2773cf3cf7945107c86c97b53bb53c files/pgpool2.init 471 +RMD160 f331807e866b6cce861730a78630f8e12df1bec3 files/pgpool2.init 471 +SHA256 40cb2cc943eecaa6c2e77125a0491ee1f49c0ed941eb62ac4bf206e01830d992 files/pgpool2.init 471 +DIST pgpool2-1.0.0.tar.bz2 586341 RMD160 2925c29f506ddcbfbfa080bd2f3c2a0bacc76a4a SHA1 ac45200658deac82863a0163bc4d36c7315b92a4 SHA256 be2dcfa455c52aa5d138ee4fcc508093b1ad6e41f3d71261e90955f483de793a +EBUILD pgpool2-1.0.0.ebuild 3303 RMD160 d8d60b2624d1f72d8d427a32fc83b16700940535 SHA1 c721fbaff4cf1490f53f7e83c3c334e3d1e40527 SHA256 562422324aed8926e408b2c43355058c7e028a38017e7b854f7a3c8cd45e6b42 +MD5 3ce9429e4f2381f7b6ce8c2575bbe0b2 pgpool2-1.0.0.ebuild 3303 +RMD160 d8d60b2624d1f72d8d427a32fc83b16700940535 pgpool2-1.0.0.ebuild 3303 +SHA256 562422324aed8926e408b2c43355058c7e028a38017e7b854f7a3c8cd45e6b42 pgpool2-1.0.0.ebuild 3303 +MD5 25ed1ddde622ca12a795569bb0dc2f7b files/digest-pgpool2-1.0.0 244 +RMD160 ab5f430ea326a6a9dbb8683d92b18fca8be2f12d files/digest-pgpool2-1.0.0 244 +SHA256 8e9c99720b055e165fe8dc1a3e158fdee3d08b6fbd3168802f60cb0bd863e4ff files/digest-pgpool2-1.0.0 244 diff --git a/dev-db/pgpool2/files/digest-pgpool2-1.0.0 b/dev-db/pgpool2/files/digest-pgpool2-1.0.0 new file mode 100644 index 0000000..e887b95 --- /dev/null +++ b/dev-db/pgpool2/files/digest-pgpool2-1.0.0 @@ -0,0 +1,3 @@ +MD5 e8e4f7f15877d5916f89e492a572d798 pgpool2-1.0.0.tar.bz2 586341 +RMD160 2925c29f506ddcbfbfa080bd2f3c2a0bacc76a4a pgpool2-1.0.0.tar.bz2 586341 +SHA256 be2dcfa455c52aa5d138ee4fcc508093b1ad6e41f3d71261e90955f483de793a pgpool2-1.0.0.tar.bz2 586341 diff --git a/dev-db/pgpool2/files/pgpool2.init b/dev-db/pgpool2/files/pgpool2.init new file mode 100755 index 0000000..fd028c5 --- /dev/null +++ b/dev-db/pgpool2/files/pgpool2.init @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need net + use postgresql +} + +start() { + ebegin "Starting pgpool-II" + start-stop-daemon --start --quiet --exec /usr/bin/pgpool --f /etc/pgpool.conf -F /etc/pcp.conf + result=$? + eend $result +} + +stop() { + ebegin "Stopping pgpool-II" + start-stop-daemon --stop --quiet --pidfile /var/run/pgpool.pid + result=$? + eend $result +} diff --git a/dev-db/pgpool2/pgpool2-1.0.0.ebuild b/dev-db/pgpool2/pgpool2-1.0.0.ebuild new file mode 100644 index 0000000..a1e03f1 --- /dev/null +++ b/dev-db/pgpool2/pgpool2-1.0.0.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit einput + +KEYWORDS="~amd64 ~ppc ~sparc ~x86" + +DESCRIPTION="Connection pool server for PostgreSQL that supports parallel +querying." +HOMEPAGE="http://pgpool.projects.postgresql.org/" +SRC_URI="http://jawed.name/dev/gentoo/${P}.tar.bz2" +LICENSE="BSD" +SLOT="0" +IUSE="" + +DEPEND="dev-db/libpq" +RDEPEND="${DEPEND} +!>=dev-db/pgpool-3" + +src_unpack() { + unpack ${A} + cd "${S}" + sed -i -e "/^logdir/s:/tmp:/var/run/${PN}:g" pgpool.conf.sample || die "sed failed" + sed -i -e "/^socket_dir/s:/tmp:/var/run/${PN}:g" pgpool.conf.sample || die "sed failed" + sed -i -e "/^pcp_socket_dir/s:/tmp:/var/run/${PN}:g" pgpool.conf.sample || die "sed failed" + sed -i -e "/^backend_socket_dir/s:/tmp:/var/run/${PN}:g" pgpool.conf.sample || die "sed failed" +} + +src_compile() { + cd "${S}" + econf --with-pgsql=/usr/include/postgresql || die "econf failed" + emake || die "emake failed" +} + +src_install () { + cd "${S}" + diropts "-m0755" + dodir "/var/run/${PN}" + keepdir "/var/run/${PN}" + chown -R postgres:postgres "/var/run/${PN}" + einstall || die "einstall failed" + mv -f "${D}/etc/pgpool.conf.sample" "${D}/etc/pgpool.conf" + mv -f "${D}/etc/pcp.conf.sample" "${D}/etc/pcp.conf" + dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README* TODO doc/* + docinto sql + dodoc sql/system-db.sql + exeinto /etc/init.d + newexe "${FILESDIR}/${PN}.init" ${PN} +} + +pkg_config() { + while [ 1 ];do + einput_list "1" "Connection pooling mode" "2" "Replication mode" "3" \ + "Master/slave mode" "4" "Parallel Query Execution mode" "5" \ + "Generate md5 for pcp.conf" "6" "Add pgpool2 to default runlevel" \ + "7" "Exit" "Choice" + + case "${EINPUT_ANSWER}" in + 1) pgpool2_connection_pool;; + 2) pgpool2_replication_mode;; + 3) pgpool2_masterslave_mode;; + 4) pgpool2_parallel_query_mode;; + 5) pgpool2_generate_md5;; + 6) einput_add_init "pgpool2" "default";; + 7) einfo "Bye" + exit;; + esac + done +} + +pgpool2_generate_md5() { + einput_prompt_secret "Please enter a password" + checksum=`/usr/bin/pg_md5 ${EINPUT_ANSWER}` + einfo "${checksum}" +} + +pgpool2_connection_pool() { + einfo "Connection pool mode" + einfo "- raw mode (all clients connect to PostgreSQL through pgpool-II)" + einfo "pgpool-II operates in connection pooling mode by default." +} + +pgpool2_replication_mode() { + einfo "Replication mode" + einfo "- raw mode (all clients connect to PostgreSQL through pgpool-II)" + einfo "pgpool-II operates in replication mode when the following variable" + einfo "in /etc/pgpool.conf are set:" + einfo "replication_mode = true" +} + +pgpool2_masterslave_mode() { + einfo "Master/slave mode" + einfo "Use pgpool-II with another master/slave replication software (like + Slony-I) making it do the actual data replication." + einfo "pgpool-II operates in master/slave mode when the following variable" + einfo "in /etc/pgpool.conf are set:" + einfo "replication_mode = false" + einfo "master_slave_mode = true" +} + +pgpool2_parallel_query_mode() { + einfo "Parallel Query Execution mode" + einfo "This mode enables parallel execution of queries." + einfo "pgpool-II operates in PQE mode when the following is executed:" + einfo "$ psql -f /usr/share/pgpool2/sql/system_db.sql pgpool" + einfo "Please modify this file to accordance with your DB" +} |