Gentoo Archives: gentoo-commits

From: Aaron Swenson <titanofold@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/pgbouncer/files/, dev-db/pgbouncer/
Date: Wed, 03 Oct 2018 02:00:23
Message-Id: 1538531983.9d6096a26797a9a97098db1da96a61c894197ab0.titanofold@gentoo
1 commit: 9d6096a26797a9a97098db1da96a61c894197ab0
2 Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 3 01:41:26 2018 +0000
4 Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 3 01:59:43 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d6096a2
7
8 dev-db/pgbouncer: Cleanup
9
10 Closes: https://bugs.gentoo.org/654136
11 Package-Manager: Portage-2.3.49, Repoman-2.3.10
12 Signed-off-by: Aaron Swenson <titanofold <AT> gentoo.org>
13
14 dev-db/pgbouncer/Manifest | 1 -
15 dev-db/pgbouncer/files/pgbouncer.confd | 12 -----
16 dev-db/pgbouncer/files/pgbouncer.initd-r1 | 83 -----------------------------
17 dev-db/pgbouncer/pgbouncer-1.8.1.ebuild | 86 -------------------------------
18 4 files changed, 182 deletions(-)
19
20 diff --git a/dev-db/pgbouncer/Manifest b/dev-db/pgbouncer/Manifest
21 index 1bea33dfbba..11cc6304a31 100644
22 --- a/dev-db/pgbouncer/Manifest
23 +++ b/dev-db/pgbouncer/Manifest
24 @@ -1,2 +1 @@
25 -DIST pgbouncer-1.8.1.tar.gz 465930 BLAKE2B 692c551cb7bfb56bfe1b354791b06bdf61866197150a78a7fa9688891a2e4cd3c015abc5fbe33bf66dc85ab0ae83745f2db852eae91ae99596c97be0154e8bd5 SHA512 595a94db98866cec211f2b8c1ad13d209dba00e5fd41f2e9025aabdcb660194f0f772810270a1d9f067c3039c9fee630e8ff2d56f231935add17207aecc10bee
26 DIST pgbouncer-1.9.0.tar.gz 469300 BLAKE2B 466f171a49ec9ce9be9a9d3208780cfbff956da7c74ec4332c7104ea537cb47a5cfdc0d80bbd96d233769b6f430f1ad99b623caefa2dc93af7ba336dd0f49514 SHA512 b127f4cb60ca5cdf339da76727918f0a3797a3e0a89f8ed6fdcaa80f3391d2c5bb51e19731915775210c0e5070dd611ee2e410c9a947624e45b5cf11aecdacf9
27
28 diff --git a/dev-db/pgbouncer/files/pgbouncer.confd b/dev-db/pgbouncer/files/pgbouncer.confd
29 deleted file mode 100644
30 index e2c58401188..00000000000
31 --- a/dev-db/pgbouncer/files/pgbouncer.confd
32 +++ /dev/null
33 @@ -1,12 +0,0 @@
34 -# Location of configuration file for PgBouncer.
35 -INIFILE="/etc/pgbouncer.ini"
36 -
37 -# How long to wait in seconds for a safe shutdown. Equivalent to
38 -# issuing 'PAUSE;' and 'SHUTDOWN;' on psql console. (See 'man 1 pgbouncer'.)
39 -NICE_TIMEOUT=60
40 -
41 -# Set to 'YES' to perform an immediate shutdown if the nice shutdown
42 -# doesn't work. Same as issuing 'SHUTDOWN;' on console. (See 'man 1
43 -# pgbouncer'.)
44 -FORCE_QUIT="no"
45 -FORCE_QUIT_TIMEOUT=2
46 \ No newline at end of file
47
48 diff --git a/dev-db/pgbouncer/files/pgbouncer.initd-r1 b/dev-db/pgbouncer/files/pgbouncer.initd-r1
49 deleted file mode 100755
50 index 7392918593b..00000000000
51 --- a/dev-db/pgbouncer/files/pgbouncer.initd-r1
52 +++ /dev/null
53 @@ -1,83 +0,0 @@
54 -#!/sbin/openrc-run
55 -
56 -extra_started_commands="reload"
57 -
58 -PIDFILE="/run/pgbouncer.pid"
59 -
60 -depend() {
61 - use net
62 - after postgresql
63 -}
64 -
65 -get_config() {
66 - [ -f "${INIFILE}" ] || eend 1 "'${INIFILE}' not found"
67 -
68 - eval echo $(sed -e 's:;.*::' "${INIFILE}" | \
69 - awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }')
70 -}
71 -
72 -start_pre() {
73 - local s="$(get_config unix_socket_dir)"
74 -
75 - if [ -n "${s}" ] ; then
76 - checkpath -o root:postgres -m 1775 -d "${s}" || return 1
77 -
78 - local listen_port="$(get_config listen_port)"
79 -
80 - if [ -e "${s%/}/.s.PGSQL.${listen_port}" ] ; then
81 - eerror "Socket conflict."
82 - eerror "A server is already listening on:"
83 - eerror " ${s%/}/.s.PGSQL.${listen_port}"
84 - eerror "HINT: Change listen_port in pgbouncer.ini to listen on a"
85 - eerror "different socket."
86 - return 1
87 - fi
88 - fi
89 -
90 - checkpath -o pgbouncer:postgres -m 0755 \
91 - -d "$(dirname $(get_config logfile))" || return 1
92 - checkpath -o pgbouncer:postgres -m 0640 \
93 - -f "$(get_config logfile)" || return 1
94 -
95 - return 0
96 -}
97 -
98 -start() {
99 - ebegin "Starting PgBouncer"
100 - [ -f ${PIDFILE} ] && rm ${PIDFILE}
101 -
102 - start-stop-daemon --start \
103 - --pidfile ${PIDFILE} \
104 - --background \
105 - --make-pidfile \
106 - --user pgbouncer \
107 - --exec /usr/bin/pgbouncer \
108 - -- -q "${INIFILE}"
109 - eend $?
110 -}
111 -
112 -stop() {
113 - local seconds=$(( ${NICE_TIMEOUT} + ${FORCE_QUIT_TIMEOUT} ))
114 - ebegin "Stopping PgBouncer (this can take up to ${seconds} seconds)"
115 -
116 - local retries=SIGINT/${NICE_TIMEOUT}
117 -
118 - if [ "${FORCE_QUIT}" = "YES" ] ; then
119 - einfo "FORCE_QUIT enabled."
120 - retries="${retries}/SIGTERM/${FORCE_QUIT_TIMEOUT}"
121 - fi
122 -
123 - # Loops through nice and force quit in one go.
124 - start-stop-daemon --stop \
125 - --user pgbouncer \
126 - --pidfile ${PIDFILE} \
127 - --retry ${retries}
128 -
129 - eend $?
130 -}
131 -
132 -reload() {
133 - ebegin "Reloading PgBouncer configuration from '${INIFILE}'"
134 - start-stop-daemon --signal HUP --pidfile ${PIDFILE}
135 - eend $?
136 -}
137
138 diff --git a/dev-db/pgbouncer/pgbouncer-1.8.1.ebuild b/dev-db/pgbouncer/pgbouncer-1.8.1.ebuild
139 deleted file mode 100644
140 index f590a731732..00000000000
141 --- a/dev-db/pgbouncer/pgbouncer-1.8.1.ebuild
142 +++ /dev/null
143 @@ -1,86 +0,0 @@
144 -# Copyright 1999-2018 Gentoo Foundation
145 -# Distributed under the terms of the GNU General Public License v2
146 -
147 -EAPI="6"
148 -
149 -inherit user
150 -
151 -DESCRIPTION="Lightweight connection pooler for PostgreSQL"
152 -HOMEPAGE="https://pgbouncer.github.io"
153 -SRC_URI="https://pgbouncer.github.io/downloads/files/${PV}/${P}.tar.gz"
154 -LICENSE="BSD"
155 -SLOT="0"
156 -KEYWORDS="amd64 x86"
157 -IUSE="+c-ares debug doc pam ssl -udns"
158 -
159 -# At-most-one-of, one can be enabled but not both
160 -REQUIRED_USE="?? ( c-ares udns )"
161 -
162 -RDEPEND="
163 - >=dev-libs/libevent-2.0
164 - >=sys-libs/glibc-2.10
165 - c-ares? ( >=net-dns/c-ares-1.10 )
166 - ssl? ( >=dev-libs/openssl-1.0.1:=[-bindist] )
167 - udns? ( >=net-libs/udns-0.1 )
168 -"
169 -
170 -DEPEND="${RDEPEND}"
171 -
172 -pkg_setup() {
173 - enewgroup postgres 70
174 - enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
175 -
176 - enewuser pgbouncer -1 -1 -1 postgres
177 -}
178 -
179 -src_prepare() {
180 - eapply "${FILESDIR}/pgbouncer-1.8-dirs.patch"
181 -
182 - default
183 -}
184 -
185 -src_configure() {
186 - # --enable-debug is only used to disable stripping
187 - econf \
188 - --docdir=/usr/share/doc/${PF} \
189 - --enable-debug \
190 - $(use_with c-ares cares) \
191 - $(use_enable debug cassert) \
192 - $(use_with pam) \
193 - $(use_with ssl openssl) \
194 - $(use_with udns)
195 -}
196 -
197 -src_test() {
198 - cd "${S}/test"
199 - emake
200 -}
201 -
202 -src_install() {
203 - emake DESTDIR="${D}" install
204 -
205 - dodoc AUTHORS
206 - use doc && dodoc doc/*.rst
207 -
208 - newconfd "${FILESDIR}/${PN}.confd" "${PN}"
209 - newinitd "${FILESDIR}/${PN}.initd-r1" "${PN}"
210 -
211 - insinto /etc
212 - doins etc/pgbouncer.ini
213 -
214 - insinto /etc/logrotate.d
215 - newins "${FILESDIR}/logrotate" pgbouncer
216 -}
217 -
218 -pkg_postinst() {
219 - if [[ -z ${REPLACING_VERSIONS} ]] ; then
220 - einfo "Please read the config.txt for Configuration Directives"
221 - einfo
222 - einfo "For Administration Commands, see:"
223 - einfo " man pgbouncer"
224 - einfo
225 - einfo "By default, PgBouncer does not have access to any database."
226 - einfo "GRANT the permissions needed for your application and make sure that it"
227 - einfo "exists in PgBouncer's auth_file."
228 - fi
229 -}