diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-db/pgbouncer | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-db/pgbouncer')
-rw-r--r-- | dev-db/pgbouncer/Manifest | 2 | ||||
-rw-r--r-- | dev-db/pgbouncer/files/logrotate | 7 | ||||
-rw-r--r-- | dev-db/pgbouncer/files/pgbouncer-dirs.patch | 26 | ||||
-rw-r--r-- | dev-db/pgbouncer/files/pgbouncer.confd | 12 | ||||
-rw-r--r-- | dev-db/pgbouncer/files/pgbouncer.initd | 88 | ||||
-rw-r--r-- | dev-db/pgbouncer/metadata.xml | 19 | ||||
-rw-r--r-- | dev-db/pgbouncer/pgbouncer-1.5.4-r1.ebuild | 84 | ||||
-rw-r--r-- | dev-db/pgbouncer/pgbouncer-1.5.4.ebuild | 86 | ||||
-rw-r--r-- | dev-db/pgbouncer/pgbouncer-1.5.5.ebuild | 84 |
9 files changed, 408 insertions, 0 deletions
diff --git a/dev-db/pgbouncer/Manifest b/dev-db/pgbouncer/Manifest new file mode 100644 index 000000000000..ca2a3cbd5293 --- /dev/null +++ b/dev-db/pgbouncer/Manifest @@ -0,0 +1,2 @@ +DIST pgbouncer-1.5.4.tar.gz 339610 SHA256 08040482f4c887e14d8c8c46fab838fff640c0f3cf231f86ad7f766b7a292280 SHA512 ade8304eba682a468a5e4c1c5e661d67ea64fad951d6f767a3157de4e5398c52492b2ca022f274c55e43022df8d5fad87e45fc60adbcbab00a5ac843a26c6b71 WHIRLPOOL 107d028eaa4ea9f0469994ca9fa3caab64fc33dd2c7228aa7784b04b89091352a6b086fe7123ddfbcc9900b1c1cadef4c08030d9b9a5b169a4be4441ff3a6f02 +DIST pgbouncer-1.5.5.tar.gz 336145 SHA256 d65a192d1e2e69bf445d536f10211857959fc38e0247d1974e8008253080e234 SHA512 fd31b25ab2c0fb206797d54cba42f221bf5d9d1bae76d8f0b77ae746b504b51640cab04d60589c7d96f275c50b98b8bdf854702981838b74c23ed7095d85e853 WHIRLPOOL 115a45a4c9e9589c4d872c9469619a7fa6199d8a010d090e530051867210ed5647565c93c118b83717fc70b73b99f6f1309815d767bbb768b46e1ab2b9378c29 diff --git a/dev-db/pgbouncer/files/logrotate b/dev-db/pgbouncer/files/logrotate new file mode 100644 index 000000000000..9617eafa66b0 --- /dev/null +++ b/dev-db/pgbouncer/files/logrotate @@ -0,0 +1,7 @@ +/var/log/pgbouncer/pgbouncer.log { + missingok + sharedscripts + postrotate + /etc/init.d/pgbouncer -q reload + endscript +}
\ No newline at end of file diff --git a/dev-db/pgbouncer/files/pgbouncer-dirs.patch b/dev-db/pgbouncer/files/pgbouncer-dirs.patch new file mode 100644 index 000000000000..62bcd0b84409 --- /dev/null +++ b/dev-db/pgbouncer/files/pgbouncer-dirs.patch @@ -0,0 +1,26 @@ +diff -Naruw a/etc/pgbouncer.ini b/etc/pgbouncer.ini +--- a/etc/pgbouncer.ini 2012-06-10 19:57:01.000000000 +0000 ++++ b/etc/pgbouncer.ini 2013-07-17 02:25:59.598888628 +0000 +@@ -29,7 +29,7 @@ + ;;; + + logfile = /var/log/pgbouncer/pgbouncer.log +-pidfile = /var/run/pgbouncer/pgbouncer.pid ++pidfile = /run/pgbouncer/pgbouncer.pid + + ;;; + ;;; Where to wait for clients +@@ -40,10 +40,9 @@ + listen_port = 6432 + + ; unix socket is also used for -R. +-; On debian it should be /var/run/postgresql +-;unix_socket_dir = /tmp +-;unix_socket_mode = 0777 +-;unix_socket_group = ++unix_socket_dir = /run/postgresql ++unix_socket_mode = 0777 ++unix_socket_group = postgres + + ;;; + ;;; Authentication settings diff --git a/dev-db/pgbouncer/files/pgbouncer.confd b/dev-db/pgbouncer/files/pgbouncer.confd new file mode 100644 index 000000000000..e2c584011884 --- /dev/null +++ b/dev-db/pgbouncer/files/pgbouncer.confd @@ -0,0 +1,12 @@ +# Location of configuration file for PgBouncer. +INIFILE="/etc/pgbouncer.ini" + +# How long to wait in seconds for a safe shutdown. Equivalent to +# issuing 'PAUSE;' and 'SHUTDOWN;' on psql console. (See 'man 1 pgbouncer'.) +NICE_TIMEOUT=60 + +# Set to 'YES' to perform an immediate shutdown if the nice shutdown +# doesn't work. Same as issuing 'SHUTDOWN;' on console. (See 'man 1 +# pgbouncer'.) +FORCE_QUIT="no" +FORCE_QUIT_TIMEOUT=2
\ No newline at end of file diff --git a/dev-db/pgbouncer/files/pgbouncer.initd b/dev-db/pgbouncer/files/pgbouncer.initd new file mode 100644 index 000000000000..f97481501aaf --- /dev/null +++ b/dev-db/pgbouncer/files/pgbouncer.initd @@ -0,0 +1,88 @@ +#!/sbin/runscript + +extra_started_commands="reload" + +depend() { + use net + after postgresql +} + +get_config() { + [ -f "${INIFILE}" ] || eend 1 "'${INIFILE}' not found" + + eval echo $(sed -e 's:;.*::' "${INIFILE}" | \ + awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }') +} + +PIDFILE="$(get_config pidfile)" +UNIX_SOCKET_DIR="$(get_config unix_socket_dir)" + +prep() { + if [ -n "${UNIX_SOCKET_DIR}" ] ; then + checkpath -o postgres:postgres -m 0775 -d "${UNIX_SOCKET_DIR}" \ + || return 1 + fi + checkpath -o pgbouncer:postgres -m 0755 -d "$(dirname ${PIDFILE})" \ + || return 1 + checkpath -o pgbouncer:postgres -m 0644 -f "${PIDFILE}" \ + || return 1 + checkpath -o pgbouncer:postgres -m 0755 -d "$(dirname $(get_config logfile))" \ + || return 1 + checkpath -o pgbouncer:postgres -m 0640 -f "$(get_config logfile)" \ + || return 1 + + return 0 +} + +start() { + ebegin "Starting PgBouncer" + prep + local ret=$? + if [ $ret -ne 0 ] ; then + eend $ret + exit $ret + fi + start-stop-daemon --start \ + --pidfile ${PIDFILE} \ + --user pgbouncer \ + --exec /usr/bin/pgbouncer -- -q -d "${INIFILE}" + eend $? +} + +stop() { + local seconds=$(( ${NICE_TIMEOUT} + ${FORCE_QUIT_TIMEOUT} )) + ebegin "Stopping PgBouncer (this can take up to ${seconds} seconds)" + + local retries=SIGINT/${NICE_TIMEOUT} + + if [ "${FORCE_QUIT}" = "YES" ] ; then + einfo "FORCE_QUIT enabled." + retries="${retries}/SIGTERM/${FORCE_QUIT_TIMEOUT}" + fi + + # Loops through nice and force quit in one go. + start-stop-daemon --stop \ + --pidfile ${PIDFILE} \ + --retry ${retries} + + eend $? +} + +restart() { + if [ -n "${UNIX_SOCKET_DIR}" ] ; then + ebegin "Performing online restart of PgBouncer" + start-stop-daemon --start \ + --pidfile ${PIDFILE} \ + --user pgbouncer \ + --exec /usr/bin/pgbouncer -- -q -d -R "${INIFILE}" + eend $? + else + stop && start + fi +} + +reload() { + ebegin "Reloading PgBouncer configuration from '${INIFILE}'" + start-stop-daemon --signal HUP --pidfile ${PIDFILE} + eend $? +} diff --git a/dev-db/pgbouncer/metadata.xml b/dev-db/pgbouncer/metadata.xml new file mode 100644 index 000000000000..f9bdcdbde21a --- /dev/null +++ b/dev-db/pgbouncer/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> + <herd>proxy-maintainers</herd> + <maintainer> + <email>bugs@bergstroem.nu</email> + <name>Johan Bergström</name> + <description>Proxy-Maintainer, assign bugs</description> + </maintainer> + <maintainer> + <email>titanofold@gentoo.org</email> + <name>Aaron W. Swenson</name> + </maintainer> + <use> + <flag name="libevent">Use libevent 2.0+ and evdns as the DNS backend</flag> + <flag name="udns">Use udns as the DNS backend. Supports IPv4 only.</flag> + </use> +</pkgmetadata> diff --git a/dev-db/pgbouncer/pgbouncer-1.5.4-r1.ebuild b/dev-db/pgbouncer/pgbouncer-1.5.4-r1.ebuild new file mode 100644 index 000000000000..c6ed67e55048 --- /dev/null +++ b/dev-db/pgbouncer/pgbouncer-1.5.4-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +# Upstream has *way* broken tests. +RESTRICT="test" + +inherit eutils user + +DESCRIPTION="Lightweight connection pooler for PostgreSQL" +HOMEPAGE="http://pgfoundry.org/projects/pgbouncer/" +SRC_URI="mirror://postgresql/projects/pgFoundry/${PN}/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="debug doc libevent udns" +REQUIRED_USE=" + libevent? ( !udns ) + udns? ( !libevent ) +" +RDEPEND=" + >=sys-libs/glibc-2.10 + libevent? ( >=dev-libs/libevent-2.0 ) + udns? ( >=net-libs/udns-0.1 ) +" + +DEPEND=" + ${RDEPEND} + app-text/docbook-xml-dtd:4.5 + app-text/xmlto + >=app-text/asciidoc-8.4 +" + +pkg_setup() { + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + enewuser pgbouncer -1 -1 -1 postgres +} + +src_prepare() { + epatch "${FILESDIR}/pgbouncer-dirs.patch" +} + +src_configure() { + # --enable-debug is only used to disable stripping + econf \ + --docdir=/usr/share/doc/${PF} \ + --enable-debug \ + $(use_enable debug cassert) \ + $(use_with libevent) \ + $(use_with udns) +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc AUTHORS + + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + + insinto /etc + doins etc/pgbouncer.ini + + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate" pgbouncer +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + einfo "Please read the config.txt for Configuration Directives" + einfo + einfo "For Administration Commands, see:" + einfo " man pgbouncer" + einfo + einfo "By default, PgBouncer does not have access to any database." + einfo "GRANT the permissions needed for your application and make sure that it" + einfo "exists in PgBouncer's auth_file." + fi +} diff --git a/dev-db/pgbouncer/pgbouncer-1.5.4.ebuild b/dev-db/pgbouncer/pgbouncer-1.5.4.ebuild new file mode 100644 index 000000000000..1d97ebd3a95b --- /dev/null +++ b/dev-db/pgbouncer/pgbouncer-1.5.4.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +# Upstream has *way* broken tests. +RESTRICT="test" + +inherit eutils user + +DESCRIPTION="Lightweight connection pooler for PostgreSQL" +HOMEPAGE="http://pgfoundry.org/projects/pgbouncer/" +SRC_URI="mirror://postgresql/projects/pgFoundry/${PN}/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc libevent udns" +REQUIRED_USE=" + libevent? ( !udns ) + udns? ( !libevent ) +" +RDEPEND=" + >=sys-libs/glibc-2.10 + libevent? ( >=dev-libs/libevent-2.0 ) + udns? ( >=net-libs/udns-0.1 ) +" + +DEPEND=" + ${RDEPEND} + doc? ( + app-text/docbook-xml-dtd:4.5 + app-text/xmlto + >=app-text/asciidoc-8.4 + ) +" + +pkg_setup() { + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + enewuser pgbouncer -1 -1 -1 postgres +} + +src_prepare() { + epatch "${FILESDIR}/pgbouncer-dirs.patch" +} + +src_configure() { + # --enable-debug is only used to disable stripping + econf \ + --docdir=/usr/share/doc/${PF} \ + --enable-debug \ + $(use_enable debug cassert) \ + $(use_with libevent) \ + $(use_with udns) +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc AUTHORS + + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + + insinto /etc + doins etc/pgbouncer.ini + + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate" pgbouncer +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + einfo "Please read the config.txt for Configuration Directives" + einfo + einfo "For Administration Commands, see:" + einfo " man pgbouncer" + einfo + einfo "By default, PgBouncer does not have access to any database." + einfo "GRANT the permissions needed for your application and make sure that it" + einfo "exists in PgBouncer's auth_file." + fi +} diff --git a/dev-db/pgbouncer/pgbouncer-1.5.5.ebuild b/dev-db/pgbouncer/pgbouncer-1.5.5.ebuild new file mode 100644 index 000000000000..a461bd5c2c11 --- /dev/null +++ b/dev-db/pgbouncer/pgbouncer-1.5.5.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +# Upstream has *way* broken tests. +RESTRICT="test" + +inherit eutils user + +DESCRIPTION="Lightweight connection pooler for PostgreSQL" +HOMEPAGE="https://pgbouncer.github.io" +SRC_URI="https://pgbouncer.github.io/downloads/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc libevent udns" +REQUIRED_USE=" + libevent? ( !udns ) + udns? ( !libevent ) +" +RDEPEND=" + >=sys-libs/glibc-2.10 + libevent? ( >=dev-libs/libevent-2.0 ) + udns? ( >=net-libs/udns-0.1 ) +" + +DEPEND=" + ${RDEPEND} + app-text/docbook-xml-dtd:4.5 + app-text/xmlto + >=app-text/asciidoc-8.4 +" + +pkg_setup() { + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + enewuser pgbouncer -1 -1 -1 postgres +} + +src_prepare() { + epatch "${FILESDIR}/pgbouncer-dirs.patch" +} + +src_configure() { + # --enable-debug is only used to disable stripping + econf \ + --docdir=/usr/share/doc/${PF} \ + --enable-debug \ + $(use_enable debug cassert) \ + $(use_with libevent) \ + $(use_with udns) +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc AUTHORS + + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + + insinto /etc + doins etc/pgbouncer.ini + + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate" pgbouncer +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + einfo "Please read the config.txt for Configuration Directives" + einfo + einfo "For Administration Commands, see:" + einfo " man pgbouncer" + einfo + einfo "By default, PgBouncer does not have access to any database." + einfo "GRANT the permissions needed for your application and make sure that it" + einfo "exists in PgBouncer's auth_file." + fi +} |