1 |
commit: f03cdaec91fbfe00fe4408fadd3f1ac634428263 |
2 |
Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 18 15:20:17 2015 +0000 |
4 |
Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 18 15:20:17 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f03cdaec |
7 |
|
8 |
Version Bump |
9 |
|
10 |
Package-Manager: portage-2.2.20.1 |
11 |
|
12 |
dev-db/postgresql/Manifest | 1 + |
13 |
dev-db/postgresql/postgresql-9.5_rc1.ebuild | 431 ++++++++++++++++++++++++++++ |
14 |
2 files changed, 432 insertions(+) |
15 |
|
16 |
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest |
17 |
index e1a9761..32e4f83 100644 |
18 |
--- a/dev-db/postgresql/Manifest |
19 |
+++ b/dev-db/postgresql/Manifest |
20 |
@@ -5,3 +5,4 @@ DIST postgresql-9.3.10.tar.bz2 16995860 SHA256 e5444f0f76aff98a251400b7c28bc361d |
21 |
DIST postgresql-9.4.5.tar.bz2 17660960 SHA256 b87c50c66b6ea42a9712b5f6284794fabad0616e6ae420cf0f10523be6d94a39 SHA512 01ad4b5a097efa70f74a9e96b764c32953a9df57d6bf81b893a1e552475f6aba0381580dcd1f27b2c443ce89fecc429eeeb0219af60a0b2f84798f76eb1757f5 WHIRLPOOL 8ea0e9a40cefa53568071f2137bac996898f9bd486cfb5cfcf8bb49590816833f37878f10caabffb9d3127e047f00c916b8830594a485ebe16fb9fe6fc834c95 |
22 |
DIST postgresql-9.5beta1.tar.bz2 18291273 SHA256 b53199e2667982de2039ad7e30467f67c5d7af678e69d6211de8ba1cac75c9f0 SHA512 e8881939bdba346f3770102324d7b011c16e4529603280459e17587e06d933c9f3505b40c5cc82ed3f0410ffd88b5e2f18b2a3272aa4680c3798cf7a0fcc0374 WHIRLPOOL 0cf2c3fd40b2a8d482da5a1597abbc20d239f577c6472a03f8d9795a3e8ef142dfaad7a1eeebf2b2544e34712c243bbd9de63fb4045c4ce15dbde8ec74acb707 |
23 |
DIST postgresql-9.5beta2.tar.bz2 18292888 SHA256 031051cd50ebc4ab07da4e6587c59af6712b21979c486b1af0c31e97e1d9e703 SHA512 a084e9106537896ea2bbba68d046fac542525c583af498481945f208d331f3357463e23a08aee5fd8cbcb4af3922b3bf363c3d76baa7e383cc9f1fae41842636 WHIRLPOOL 74c57debaa3f1166c28a889eb7c46200436cb69cf9de45a0b8af443972c57c1b66af90177985da91b00c5955e887252234e04b8666998074abd925984bf7007c |
24 |
+DIST postgresql-9.5rc1.tar.bz2 18323591 SHA256 497c44b95accec23e38f7ee93fd42488bddfbdab4858ad94de18348b0913add3 SHA512 3c94fdeef3bd3fd2527c8935bdd797ad3fd698fea1c87e685fee1ceee38350c1bccfb7cf120bb07c498f0a62c4f234a2ef2765b03f35fc9dbba0e82177890101 WHIRLPOOL b59d8d9a72b1059dca25be72d44349a16932bf37d33817a6a1fca81552ccb0b0c50b1046f58b0047ff9144e37b54f3b9053e881ff00646387521f916db4aab17 |
25 |
|
26 |
diff --git a/dev-db/postgresql/postgresql-9.5_rc1.ebuild b/dev-db/postgresql/postgresql-9.5_rc1.ebuild |
27 |
new file mode 100644 |
28 |
index 0000000..181c72e |
29 |
--- /dev/null |
30 |
+++ b/dev-db/postgresql/postgresql-9.5_rc1.ebuild |
31 |
@@ -0,0 +1,431 @@ |
32 |
+# Copyright 1999-2015 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+# $Id$ |
35 |
+ |
36 |
+EAPI="5" |
37 |
+ |
38 |
+PYTHON_COMPAT=( python{2_7,3_4} ) |
39 |
+ |
40 |
+inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ |
41 |
+ systemd user versionator |
42 |
+ |
43 |
+# This is a prerelease version, so no keywords please |
44 |
+KEYWORDS="" |
45 |
+#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" |
46 |
+ |
47 |
+SLOT="$(get_version_component_range 1-2)" |
48 |
+ |
49 |
+MY_PV=${PV/_/} |
50 |
+ |
51 |
+S=${WORKDIR}/${PN}-${MY_PV} |
52 |
+ |
53 |
+SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" |
54 |
+ |
55 |
+LICENSE="POSTGRESQL GPL-2" |
56 |
+DESCRIPTION="PostgreSQL RDBMS" |
57 |
+HOMEPAGE="http://www.postgresql.org/" |
58 |
+ |
59 |
+LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr |
60 |
+ zh_CN zh_TW" |
61 |
+IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp python |
62 |
+ +readline selinux +server ssl static-libs tcl threads uuid xml zlib" |
63 |
+ |
64 |
+for lingua in ${LINGUAS}; do |
65 |
+ IUSE+=" linguas_${lingua}" |
66 |
+done |
67 |
+ |
68 |
+wanted_languages() { |
69 |
+ local enable_langs |
70 |
+ |
71 |
+ for lingua in ${LINGUAS} ; do |
72 |
+ use linguas_${lingua} && enable_langs+="${lingua} " |
73 |
+ done |
74 |
+ |
75 |
+ echo -n ${enable_langs} |
76 |
+} |
77 |
+ |
78 |
+CDEPEND=" |
79 |
+>=app-eselect/eselect-postgresql-1.2.0 |
80 |
+sys-apps/less |
81 |
+virtual/libintl |
82 |
+kerberos? ( virtual/krb5 ) |
83 |
+ldap? ( net-nds/openldap ) |
84 |
+pam? ( virtual/pam ) |
85 |
+perl? ( >=dev-lang/perl-5.8 ) |
86 |
+python? ( ${PYTHON_DEPS} ) |
87 |
+readline? ( sys-libs/readline:0= ) |
88 |
+ssl? ( |
89 |
+ !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= ) |
90 |
+ libressl? ( dev-libs/libressl:= ) |
91 |
+) |
92 |
+tcl? ( >=dev-lang/tcl-8:0= ) |
93 |
+xml? ( dev-libs/libxml2 dev-libs/libxslt ) |
94 |
+zlib? ( sys-libs/zlib ) |
95 |
+" |
96 |
+ |
97 |
+# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no |
98 |
+# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, |
99 |
+# the libc includes UUID functions. |
100 |
+UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) |
101 |
+BSD_LIBC=( elibc_{Free,Net,Open}BSD ) |
102 |
+ |
103 |
+nest_usedep() { |
104 |
+ local front back |
105 |
+ while [[ ${#} -gt 1 ]]; do |
106 |
+ front+="${1}? ( " |
107 |
+ back+=" )" |
108 |
+ shift |
109 |
+ done |
110 |
+ echo "${front}${1}${back}" |
111 |
+} |
112 |
+ |
113 |
+IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" |
114 |
+CDEPEND+=" |
115 |
+uuid? ( |
116 |
+ ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} |
117 |
+ $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) |
118 |
+)" |
119 |
+ |
120 |
+DEPEND="${CDEPEND} |
121 |
+!!<sys-apps/sandbox-2.0 |
122 |
+sys-devel/bison |
123 |
+sys-devel/flex |
124 |
+nls? ( sys-devel/gettext ) |
125 |
+xml? ( virtual/pkgconfig ) |
126 |
+" |
127 |
+ |
128 |
+RDEPEND="${CDEPEND} |
129 |
+!dev-db/postgresql-docs:${SLOT} |
130 |
+!dev-db/postgresql-base:${SLOT} |
131 |
+!dev-db/postgresql-server:${SLOT} |
132 |
+selinux? ( sec-policy/selinux-postgresql ) |
133 |
+" |
134 |
+ |
135 |
+pkg_setup() { |
136 |
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup |
137 |
+ |
138 |
+ enewgroup postgres 70 |
139 |
+ enewuser postgres 70 /bin/sh /var/lib/postgresql postgres |
140 |
+ |
141 |
+ use python && python-single-r1_pkg_setup |
142 |
+} |
143 |
+ |
144 |
+src_prepare() { |
145 |
+ # Work around PPC{,64} compilation bug where bool is already defined |
146 |
+ sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die |
147 |
+ |
148 |
+ # Set proper run directory |
149 |
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ |
150 |
+ -i src/include/pg_config_manual.h || die |
151 |
+ |
152 |
+ # Rely on $PATH being in the proper order so that the correct |
153 |
+ # install program is used for modules utilizing PGXS in both |
154 |
+ # hardened and non-hardened environments. (Bug #528786) |
155 |
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die |
156 |
+ |
157 |
+ use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" |
158 |
+ |
159 |
+ # Fix bug 486556 where the server would crash at start up because of |
160 |
+ # an infinite loop caused by a self-referencing symlink. |
161 |
+ epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch" |
162 |
+ |
163 |
+ if use pam ; then |
164 |
+ sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ |
165 |
+ -i src/backend/libpq/auth.c || \ |
166 |
+ die 'PGSQL_PAM_SERVICE rename failed.' |
167 |
+ fi |
168 |
+ |
169 |
+ epatch_user |
170 |
+} |
171 |
+ |
172 |
+src_configure() { |
173 |
+ case ${CHOST} in |
174 |
+ *-darwin*|*-solaris*) |
175 |
+ use nls && append-libs intl |
176 |
+ ;; |
177 |
+ esac |
178 |
+ |
179 |
+ export LDFLAGS_SL="${LDFLAGS}" |
180 |
+ export LDFLAGS_EX="${LDFLAGS}" |
181 |
+ |
182 |
+ local PO="${EPREFIX%/}" |
183 |
+ |
184 |
+ local i uuid_config="" |
185 |
+ if use uuid; then |
186 |
+ for i in ${UTIL_LINUX_LIBC[@]}; do |
187 |
+ use ${i} && uuid_config="--with-uuid=e2fs" |
188 |
+ done |
189 |
+ for i in ${BSD_LIBC[@]}; do |
190 |
+ use ${i} && uuid_config="--with-uuid=bsd" |
191 |
+ done |
192 |
+ [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" |
193 |
+ fi |
194 |
+ |
195 |
+ econf \ |
196 |
+ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ |
197 |
+ --datadir="${PO}/usr/share/postgresql-${SLOT}" \ |
198 |
+ --docdir="${PO}/usr/share/doc/${PF}" \ |
199 |
+ --includedir="${PO}/usr/include/postgresql-${SLOT}" \ |
200 |
+ --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ |
201 |
+ --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ |
202 |
+ --with-system-tzdata="${PO}/usr/share/zoneinfo" \ |
203 |
+ $(use_enable !pg_legacytimestamp integer-datetimes) \ |
204 |
+ $(use_enable threads thread-safety) \ |
205 |
+ $(use_with kerberos gssapi) \ |
206 |
+ $(use_with ldap) \ |
207 |
+ $(use_with pam) \ |
208 |
+ $(use_with perl) \ |
209 |
+ $(use_with python) \ |
210 |
+ $(use_with readline) \ |
211 |
+ $(use_with ssl openssl) \ |
212 |
+ $(use_with tcl) \ |
213 |
+ ${uuid_config} \ |
214 |
+ $(use_with xml libxml) \ |
215 |
+ $(use_with xml libxslt) \ |
216 |
+ $(use_with zlib) \ |
217 |
+ "$(use_enable nls nls "$(wanted_languages)")" |
218 |
+} |
219 |
+ |
220 |
+src_compile() { |
221 |
+ emake |
222 |
+ emake -C contrib |
223 |
+} |
224 |
+ |
225 |
+src_install() { |
226 |
+ emake DESTDIR="${D}" install |
227 |
+ emake DESTDIR="${D}" install -C contrib |
228 |
+ |
229 |
+ dodoc README HISTORY doc/{TODO,bug.template} |
230 |
+ |
231 |
+ # man pages are already built, but if we have the target make them, |
232 |
+ # they'll be generated from source before being installed so we |
233 |
+ # manually install man pages. |
234 |
+ # We use ${SLOT} instead of doman for postgresql.eselect |
235 |
+ insinto /usr/share/postgresql-${SLOT}/man/ |
236 |
+ doins -r doc/src/sgml/man{1,3,7} |
237 |
+ if ! use server; then |
238 |
+ # Remove man pages for non-existent binaries |
239 |
+ for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do |
240 |
+ rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" |
241 |
+ done |
242 |
+ fi |
243 |
+ docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} |
244 |
+ |
245 |
+ insinto /etc/postgresql-${SLOT} |
246 |
+ newins src/bin/psql/psqlrc.sample psqlrc |
247 |
+ |
248 |
+ dodir /etc/eselect/postgresql/slots/${SLOT} |
249 |
+ echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ |
250 |
+ "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" |
251 |
+ |
252 |
+ use static-libs || find "${ED}" -name '*.a' -delete |
253 |
+ |
254 |
+ if use doc ; then |
255 |
+ docinto html |
256 |
+ dodoc doc/src/sgml/html/* |
257 |
+ |
258 |
+ docinto sgml |
259 |
+ dodoc doc/src/sgml/*.{sgml,dsl} |
260 |
+ fi |
261 |
+ |
262 |
+ if use server; then |
263 |
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ |
264 |
+ "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} |
265 |
+ |
266 |
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ |
267 |
+ "${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT} |
268 |
+ |
269 |
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ |
270 |
+ "${FILESDIR}/${PN}.service" | \ |
271 |
+ systemd_newunit - ${PN}-${SLOT}.service |
272 |
+ |
273 |
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir |
274 |
+ |
275 |
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session |
276 |
+ |
277 |
+ if use prefix ; then |
278 |
+ keepdir /run/postgresql |
279 |
+ fperms 0775 /run/postgresql |
280 |
+ fi |
281 |
+ fi |
282 |
+} |
283 |
+ |
284 |
+pkg_postinst() { |
285 |
+ postgresql-config update |
286 |
+ |
287 |
+ elog "If you need a global psqlrc-file, you can place it in:" |
288 |
+ elog " ${EROOT%/}/etc/postgresql-${SLOT}/" |
289 |
+ |
290 |
+ if use server ; then |
291 |
+ elog |
292 |
+ elog "Gentoo specific documentation:" |
293 |
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL" |
294 |
+ elog |
295 |
+ elog "Official documentation:" |
296 |
+ elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" |
297 |
+ elog |
298 |
+ elog "The default location of the Unix-domain socket is:" |
299 |
+ elog " ${EROOT%/}/run/postgresql/" |
300 |
+ elog |
301 |
+ elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" |
302 |
+ elog "so that it contains your preferred locale in:" |
303 |
+ elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" |
304 |
+ elog |
305 |
+ elog "Then, execute the following command to setup the initial database" |
306 |
+ elog "environment:" |
307 |
+ elog " emerge --config =${CATEGORY}/${PF}" |
308 |
+ fi |
309 |
+} |
310 |
+ |
311 |
+pkg_prerm() { |
312 |
+ if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then |
313 |
+ ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" |
314 |
+ ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" |
315 |
+ |
316 |
+ ebegin "Resuming removal in 10 seconds (Control-C to cancel)" |
317 |
+ sleep 10 |
318 |
+ eend 0 |
319 |
+ fi |
320 |
+} |
321 |
+ |
322 |
+pkg_postrm() { |
323 |
+ postgresql-config update |
324 |
+} |
325 |
+ |
326 |
+pkg_config() { |
327 |
+ use server || die "USE flag 'server' not enabled. Nothing to configure." |
328 |
+ |
329 |
+ [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ |
330 |
+ && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" |
331 |
+ [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" |
332 |
+ [[ -z "${DATA_DIR}" ]] \ |
333 |
+ && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" |
334 |
+ |
335 |
+ # environment.bz2 may not contain the same locale as the current system |
336 |
+ # locale. Unset and source from the current system locale. |
337 |
+ if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then |
338 |
+ unset LANG |
339 |
+ unset LC_CTYPE |
340 |
+ unset LC_NUMERIC |
341 |
+ unset LC_TIME |
342 |
+ unset LC_COLLATE |
343 |
+ unset LC_MONETARY |
344 |
+ unset LC_MESSAGES |
345 |
+ unset LC_ALL |
346 |
+ source "${EROOT%/}/etc/env.d/02locale" |
347 |
+ [ -n "${LANG}" ] && export LANG |
348 |
+ [ -n "${LC_CTYPE}" ] && export LC_CTYPE |
349 |
+ [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC |
350 |
+ [ -n "${LC_TIME}" ] && export LC_TIME |
351 |
+ [ -n "${LC_COLLATE}" ] && export LC_COLLATE |
352 |
+ [ -n "${LC_MONETARY}" ] && export LC_MONETARY |
353 |
+ [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES |
354 |
+ [ -n "${LC_ALL}" ] && export LC_ALL |
355 |
+ fi |
356 |
+ |
357 |
+ einfo "You can modify the paths and options passed to initdb by editing:" |
358 |
+ einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" |
359 |
+ einfo |
360 |
+ einfo "Information on options that can be passed to initdb are found at:" |
361 |
+ einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" |
362 |
+ einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" |
363 |
+ einfo |
364 |
+ einfo "PG_INITDB_OPTS is currently set to:" |
365 |
+ if [[ -z "${PG_INITDB_OPTS}" ]] ; then |
366 |
+ einfo " (none)" |
367 |
+ else |
368 |
+ einfo " ${PG_INITDB_OPTS}" |
369 |
+ fi |
370 |
+ einfo |
371 |
+ einfo "Configuration files will be installed to:" |
372 |
+ einfo " ${PGDATA}" |
373 |
+ einfo |
374 |
+ einfo "The database cluster will be created in:" |
375 |
+ einfo " ${DATA_DIR}" |
376 |
+ einfo |
377 |
+ while [ "$correct" != "true" ] ; do |
378 |
+ einfo "Are you ready to continue? (y/n)" |
379 |
+ read answer |
380 |
+ if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then |
381 |
+ correct="true" |
382 |
+ elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then |
383 |
+ die "Aborting initialization." |
384 |
+ else |
385 |
+ echo "Answer not recognized" |
386 |
+ fi |
387 |
+ done |
388 |
+ |
389 |
+ if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then |
390 |
+ eerror "The given directory, '${DATA_DIR}', is not empty." |
391 |
+ eerror "Modify DATA_DIR to point to an empty directory." |
392 |
+ die "${DATA_DIR} is not empty." |
393 |
+ fi |
394 |
+ |
395 |
+ einfo "Creating the data directory ..." |
396 |
+ if [[ ${EUID} == 0 ]] ; then |
397 |
+ mkdir -p "${DATA_DIR}" |
398 |
+ chown -Rf postgres:postgres "${DATA_DIR}" |
399 |
+ chmod 0700 "${DATA_DIR}" |
400 |
+ fi |
401 |
+ |
402 |
+ einfo "Initializing the database ..." |
403 |
+ |
404 |
+ if [[ ${EUID} == 0 ]] ; then |
405 |
+ su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" |
406 |
+ else |
407 |
+ "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} |
408 |
+ fi |
409 |
+ |
410 |
+ if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then |
411 |
+ mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" |
412 |
+ ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" |
413 |
+ fi |
414 |
+ |
415 |
+ cat <<- EOF >> "${PGDATA%/}"/postgresql.conf |
416 |
+ # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 |
417 |
+ # On the off-chance that you might need to work with UTF-8 encoded |
418 |
+ # characters in PL/Perl |
419 |
+ plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' |
420 |
+ EOF |
421 |
+ |
422 |
+ einfo "The autovacuum function, which was in contrib, has been moved to the main" |
423 |
+ einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" |
424 |
+ einfo "by default. You can disable it in the cluster's:" |
425 |
+ einfo " ${PGDATA%/}/postgresql.conf" |
426 |
+ einfo |
427 |
+ einfo "The PostgreSQL server, by default, will log events to:" |
428 |
+ einfo " ${DATA_DIR%/}/postmaster.log" |
429 |
+ einfo |
430 |
+ if use prefix ; then |
431 |
+ einfo "The location of the configuration files have moved to:" |
432 |
+ einfo " ${PGDATA}" |
433 |
+ einfo "To start the server:" |
434 |
+ einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" |
435 |
+ einfo "To stop:" |
436 |
+ einfo " pg_ctl stop -D ${DATA_DIR}" |
437 |
+ einfo |
438 |
+ einfo "Or move the configuration files back:" |
439 |
+ einfo "mv ${PGDATA}*.conf ${DATA_DIR}" |
440 |
+ else |
441 |
+ einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" |
442 |
+ einfo "instead of 'pg_ctl'." |
443 |
+ fi |
444 |
+} |
445 |
+ |
446 |
+src_test() { |
447 |
+ einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" |
448 |
+ |
449 |
+ if use server && [[ ${UID} -ne 0 ]] ; then |
450 |
+ emake check |
451 |
+ |
452 |
+ einfo "If you think other tests besides the regression tests are necessary, please" |
453 |
+ einfo "submit a bug including a patch for this ebuild to enable them." |
454 |
+ else |
455 |
+ use server || \ |
456 |
+ ewarn 'Tests cannot be run without the "server" use flag enabled.' |
457 |
+ [[ ${UID} -eq 0 ]] || \ |
458 |
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' |
459 |
+ |
460 |
+ ewarn 'Skipping.' |
461 |
+ fi |
462 |
+} |