From d1336fab60d57949472d66270dd14722a32e6ebd Mon Sep 17 00:00:00 2001 From: "Aaron W. Swenson" Date: Tue, 23 Jan 2018 21:30:19 -0500 Subject: dev-db/pgbouncer: Clean out old and insecure Closes: https://bugs.gentoo.org/577784 Closes: https://bugs.gentoo.org/500546 Bug: https://bugs.gentoo.org/629334 Package-Manager: Portage-2.3.19, Repoman-2.3.6 --- dev-db/pgbouncer/Manifest | 1 - dev-db/pgbouncer/files/pgbouncer-dirs.patch | 26 --------- dev-db/pgbouncer/files/pgbouncer.initd | 88 ----------------------------- dev-db/pgbouncer/metadata.xml | 1 - dev-db/pgbouncer/pgbouncer-1.7.2.ebuild | 82 --------------------------- 5 files changed, 198 deletions(-) delete mode 100644 dev-db/pgbouncer/files/pgbouncer-dirs.patch delete mode 100644 dev-db/pgbouncer/files/pgbouncer.initd delete mode 100644 dev-db/pgbouncer/pgbouncer-1.7.2.ebuild (limited to 'dev-db/pgbouncer') diff --git a/dev-db/pgbouncer/Manifest b/dev-db/pgbouncer/Manifest index 224009111646..c49eebee4d69 100644 --- a/dev-db/pgbouncer/Manifest +++ b/dev-db/pgbouncer/Manifest @@ -1,2 +1 @@ -DIST pgbouncer-1.7.2.tar.gz 462374 BLAKE2B 0fea85063e30dad3b7e5d145ecd8660d260c6c09202af3661e8acfdcb5ab25f5c23a2f4e02fcfdfcee872ddeb92b78e157457aafa158ee759a1d73a3d33eb009 SHA512 11c89606599f424b34f39a4b072ec6293fea0b14ee52ae4fbc44775e6d83771a22d194f4e8eabe410e0d6a70657508cf1a3b1012543d91873c36f644afb5675d DIST pgbouncer-1.8.1.tar.gz 465930 BLAKE2B 692c551cb7bfb56bfe1b354791b06bdf61866197150a78a7fa9688891a2e4cd3c015abc5fbe33bf66dc85ab0ae83745f2db852eae91ae99596c97be0154e8bd5 SHA512 595a94db98866cec211f2b8c1ad13d209dba00e5fd41f2e9025aabdcb660194f0f772810270a1d9f067c3039c9fee630e8ff2d56f231935add17207aecc10bee diff --git a/dev-db/pgbouncer/files/pgbouncer-dirs.patch b/dev-db/pgbouncer/files/pgbouncer-dirs.patch deleted file mode 100644 index 62bcd0b84409..000000000000 --- a/dev-db/pgbouncer/files/pgbouncer-dirs.patch +++ /dev/null @@ -1,26 +0,0 @@ -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.initd b/dev-db/pgbouncer/files/pgbouncer.initd deleted file mode 100644 index 20479dc22dab..000000000000 --- a/dev-db/pgbouncer/files/pgbouncer.initd +++ /dev/null @@ -1,88 +0,0 @@ -#!/sbin/openrc-run - -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 index 29bfef0ab645..ee74448388b1 100644 --- a/dev-db/pgbouncer/metadata.xml +++ b/dev-db/pgbouncer/metadata.xml @@ -9,7 +9,6 @@ Use c-ares as the DNS backend instead of evdns (libevent). - Use libevent 2.0+ and evdns as the DNS backend Use udns as the DNS backend instead of evdns (libevent). Supports IPv4 only. diff --git a/dev-db/pgbouncer/pgbouncer-1.7.2.ebuild b/dev-db/pgbouncer/pgbouncer-1.7.2.ebuild deleted file mode 100644 index 39eec25d1f5d..000000000000 --- a/dev-db/pgbouncer/pgbouncer-1.7.2.ebuild +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -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/files/${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 -} -- cgit v1.2.3-65-gdbad