summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron W. Swenson <titanofold@gentoo.org>2018-01-23 21:30:19 -0500
committerAaron W. Swenson <titanofold@gentoo.org>2018-01-23 21:30:19 -0500
commitd1336fab60d57949472d66270dd14722a32e6ebd (patch)
tree1ba4485f22bf252c7c6ef938a89afb3d74f807ef /dev-db/pgbouncer/files
parentsys-kernel/gentoo-sources: Linux patch 4.4.113 (diff)
downloadgentoo-d1336fab60d57949472d66270dd14722a32e6ebd.tar.gz
gentoo-d1336fab60d57949472d66270dd14722a32e6ebd.tar.bz2
gentoo-d1336fab60d57949472d66270dd14722a32e6ebd.zip
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
Diffstat (limited to 'dev-db/pgbouncer/files')
-rw-r--r--dev-db/pgbouncer/files/pgbouncer-dirs.patch26
-rw-r--r--dev-db/pgbouncer/files/pgbouncer.initd88
2 files changed, 0 insertions, 114 deletions
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 $?
-}