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/postgresql/
Date: Fri, 19 Oct 2018 22:05:25
Message-Id: 1539986706.535dc7a8e2e38816e2c203a9d5cfc9f6cb0293c7.titanofold@gentoo
1 commit: 535dc7a8e2e38816e2c203a9d5cfc9f6cb0293c7
2 Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 19 22:04:51 2018 +0000
4 Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 19 22:05:06 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=535dc7a8
7
8 dev-db/postgresql: Drop beta builds
9
10 Package-Manager: Portage-2.3.49, Repoman-2.3.11
11 Signed-off-by: Aaron Swenson <titanofold <AT> gentoo.org>
12
13 dev-db/postgresql/Manifest | 2 -
14 dev-db/postgresql/postgresql-11_beta3.ebuild | 452 ---------------------------
15 dev-db/postgresql/postgresql-11_beta4.ebuild | 452 ---------------------------
16 3 files changed, 906 deletions(-)
17
18 diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
19 index b39361598b0..f7bcf4e1528 100644
20 --- a/dev-db/postgresql/Manifest
21 +++ b/dev-db/postgresql/Manifest
22 @@ -1,7 +1,5 @@
23 DIST postgresql-10.5.tar.bz2 20284578 BLAKE2B af2bc5bdc7e69682dac38785ce4a10c2c5c04202f2c3cd4acbb9200dbae7eec75d83813ac4df84b5a8064e77167f22a4dd54c6e84a68e564642cb5d75effd0ac SHA512 1bad30ae88beca66f7e8b99b82e7f02aac1e9230b328e6e5a762a704cdd9dc767d924f5a66c68c93586badfef91b7ff336120a567ce970eaa58bb44c662ad48c
24 DIST postgresql-11.0.tar.bz2 21206820 BLAKE2B 7c985e6843162f9ba01a7efcba84743739eb107111d6013b8a5614964c105345e203db307d0da5b0dd42d9c765fcf9462621e3b06e2a09a7ee76befa1ec307ef SHA512 2cf471618dfaabdcbcbd68be3b85b6083376c97fdadce36d2ceb28438b7c736816118eacb1d4f12d48c39f584d78d7ffa89fa6d65858d440045a53921429970a
25 -DIST postgresql-11beta3.tar.bz2 21375988 BLAKE2B cd83fcfc55504a028bf42f2c31de4d9e12ead1ad0f238a1f36397b9405ddf8f6d371062a25e2660f8c6754447a09ddc3a122f178101b8ab80237b16422c8cf4c SHA512 6ac6ecf2fff014b3673b11f6f106fdc93e6692a4a67a4669c4a7557f2b3229e41ddf5365c1e9328d88b6fde9141c15bd1a4640356559e727ee7f9f11641d4bf6
26 -DIST postgresql-11beta4.tar.bz2 21143836 BLAKE2B d10fe7bd342dcbee3e98cf31355dad5b0bf4837969212e10e6e62549230ce8a3c24be9f61f9e629241b99eb5465e366196a43f58276c338d985fb2d3b6348114 SHA512 38a5f1e9df2b97054a1a9a5ab92b5a909315813cd93562f599f403b3f1f8f898ebd32cd36be9c8792bfb27650831a03eef1cd5335ae2470d22a6664e8b265605
27 DIST postgresql-9.3.24.tar.bz2 17042985 BLAKE2B 976debbc2a072cc307e22beac1d59352ecc214b9879284e635f30295d1f46ad2e0542ffc5f62639527be870afe46ea5daf5b8b2d3da9a069adf1701218def968 SHA512 3d457b6218eeb8da2d8dd134dabc7ec8000cad5863870079b85ce00d94218fa049146290a8389fec15e57d586b0edee9810cdad85f36cbabce49b6b4378ce1ee
28 DIST postgresql-9.4.19.tar.bz2 17879273 BLAKE2B 775a8748218c40440df91307107d46a35bcb3b2baf1c383014684c15d06c0026548770f88dccb1c26c3247813761e4a43003c50fe930041afc5701cddabfbde3 SHA512 38e2f1f25bd80fdfdec728cd4a3fee6696ca051e496f0629a0a554ea013bfb9bb83ef5659b00130666462a45036a648cf880a2f49693a8ef2edbde938e4dd830
29 DIST postgresql-9.5.14.tar.bz2 18687959 BLAKE2B ac377b5e279d9e8179a94eb91d0cf1a7e3f6443c860d68a4540357d80128fbc54ac1ffec198725b2a783a80448f8a625556f2e6018162304d65659982890d46f SHA512 9b5ebc8dc13bbdbd5b5bc02552e2b9b5029d899a80e82b653542c735868590ebe57d586951bf036c5abd28aae325c71cc69536f88321d50dd3d254f8ee0cfe35
30
31 diff --git a/dev-db/postgresql/postgresql-11_beta3.ebuild b/dev-db/postgresql/postgresql-11_beta3.ebuild
32 deleted file mode 100644
33 index 27adb918d12..00000000000
34 --- a/dev-db/postgresql/postgresql-11_beta3.ebuild
35 +++ /dev/null
36 @@ -1,452 +0,0 @@
37 -# Copyright 1999-2018 Gentoo Foundation
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI="6"
41 -
42 -PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
43 -
44 -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
45 - zh_TW"
46 -
47 -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
48 - systemd user versionator
49 -
50 -KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
51 -
52 -SLOT=$(get_major_version)
53 -
54 -MY_PV=${PV/_/}
55 -S="${WORKDIR}/${PN}-${MY_PV}"
56 -
57 -SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
58 -
59 -LICENSE="POSTGRESQL GPL-2"
60 -DESCRIPTION="PostgreSQL RDBMS"
61 -HOMEPAGE="http://www.postgresql.org/"
62 -
63 -IUSE="doc kerberos kernel_linux ldap libressl llvm nls pam perl python +readline
64 - selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
65 -
66 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
67 -
68 -CDEPEND="
69 ->=app-eselect/eselect-postgresql-2.0
70 -sys-apps/less
71 -virtual/libintl
72 -kerberos? ( virtual/krb5 )
73 -ldap? ( net-nds/openldap )
74 -llvm? ( sys-devel/llvm:=
75 - sys-devel/clang:= )
76 -pam? ( virtual/pam )
77 -perl? ( >=dev-lang/perl-5.8:= )
78 -python? ( ${PYTHON_DEPS} )
79 -readline? ( sys-libs/readline:0= )
80 -server? ( systemd? ( sys-apps/systemd ) )
81 -ssl? (
82 - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
83 - libressl? ( dev-libs/libressl:= )
84 -)
85 -tcl? ( >=dev-lang/tcl-8:0= )
86 -xml? ( dev-libs/libxml2 dev-libs/libxslt )
87 -zlib? ( sys-libs/zlib )
88 -"
89 -
90 -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
91 -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
92 -# the libc includes UUID functions.
93 -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
94 -BSD_LIBC=( elibc_{Free,Net,Open}BSD )
95 -
96 -nest_usedep() {
97 - local front back
98 - while [[ ${#} -gt 1 ]]; do
99 - front+="${1}? ( "
100 - back+=" )"
101 - shift
102 - done
103 - echo "${front}${1}${back}"
104 -}
105 -
106 -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
107 -CDEPEND+="
108 -uuid? (
109 - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
110 - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
111 -)"
112 -
113 -DEPEND="${CDEPEND}
114 -!!<sys-apps/sandbox-2.0
115 -sys-devel/bison
116 -sys-devel/flex
117 -nls? ( sys-devel/gettext )
118 -xml? ( virtual/pkgconfig )
119 -"
120 -
121 -RDEPEND="${CDEPEND}
122 -!dev-db/postgresql-docs:${SLOT}
123 -!dev-db/postgresql-base:${SLOT}
124 -!dev-db/postgresql-server:${SLOT}
125 -selinux? ( sec-policy/selinux-postgresql )
126 -"
127 -
128 -pkg_setup() {
129 - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
130 -
131 - enewgroup postgres 70
132 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
133 -
134 - use python && python-single-r1_pkg_setup
135 -}
136 -
137 -src_prepare() {
138 - # Set proper run directory
139 - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
140 - -i src/include/pg_config_manual.h || die
141 -
142 - # Rely on $PATH being in the proper order so that the correct
143 - # install program is used for modules utilizing PGXS in both
144 - # hardened and non-hardened environments. (Bug #528786)
145 - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
146 -
147 - use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch"
148 -
149 - if use pam ; then
150 - sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
151 - -i src/backend/libpq/auth.c || \
152 - die 'PGSQL_PAM_SERVICE rename failed.'
153 - fi
154 -
155 - eapply_user
156 -}
157 -
158 -src_configure() {
159 - case ${CHOST} in
160 - *-darwin*|*-solaris*)
161 - use nls && append-libs intl
162 - ;;
163 - esac
164 -
165 - export LDFLAGS_SL="${LDFLAGS}"
166 - export LDFLAGS_EX="${LDFLAGS}"
167 -
168 - local PO="${EPREFIX%/}"
169 -
170 - local i uuid_config=""
171 - if use uuid; then
172 - for i in ${UTIL_LINUX_LIBC[@]}; do
173 - use ${i} && uuid_config="--with-uuid=e2fs"
174 - done
175 - for i in ${BSD_LIBC[@]}; do
176 - use ${i} && uuid_config="--with-uuid=bsd"
177 - done
178 - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
179 - fi
180 -
181 - econf \
182 - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
183 - --datadir="${PO}/usr/share/postgresql-${SLOT}" \
184 - --docdir="${PO}/usr/share/doc/${PF}" \
185 - --includedir="${PO}/usr/include/postgresql-${SLOT}" \
186 - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
187 - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
188 - --with-system-tzdata="${PO}/usr/share/zoneinfo" \
189 - $(use_enable !alpha spinlocks) \
190 - $(use_enable threads thread-safety) \
191 - $(use_with kerberos gssapi) \
192 - $(use_with ldap) \
193 - $(use_with llvm) \
194 - $(use_with pam) \
195 - $(use_with perl) \
196 - $(use_with python) \
197 - $(use_with readline) \
198 - $(use_with ssl openssl) \
199 - $(usex server "$(use_with systemd)" '--without-systemd') \
200 - $(use_with tcl) \
201 - ${uuid_config} \
202 - $(use_with xml libxml) \
203 - $(use_with xml libxslt) \
204 - $(use_with zlib) \
205 - $(use_enable nls nls "'$(l10n_get_locales)'")
206 -}
207 -
208 -src_compile() {
209 - emake
210 - emake -C contrib
211 -}
212 -
213 -src_install() {
214 - emake DESTDIR="${D}" install
215 - emake DESTDIR="${D}" install -C contrib
216 -
217 - dodoc README HISTORY doc/{TODO,bug.template}
218 -
219 - # man pages are already built, but if we have the target make them,
220 - # they'll be generated from source before being installed so we
221 - # manually install man pages.
222 - # We use ${SLOT} instead of doman for postgresql.eselect
223 - insinto /usr/share/postgresql-${SLOT}/man/
224 - doins -r doc/src/sgml/man{1,3,7}
225 - if ! use server; then
226 - # Remove man pages for non-existent binaries
227 - serverman=(
228 - initdb
229 - pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
230 - pg_{test_{fsync,timing},upgrade,waldump}
231 - post{gres,master}
232 - )
233 - for m in ${serverman[@]} ; do
234 - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
235 - done
236 - fi
237 - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
238 -
239 - # Create slot specific man pages
240 - local bn f mansec slotted_name
241 - for mansec in 1 3 7 ; do
242 - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
243 -
244 - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
245 - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
246 -
247 - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
248 - bn=$(basename "${f}")
249 - slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
250 - case ${bn} in
251 - TABLE.7|WITH.7)
252 - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
253 - ;;
254 - *)
255 - echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
256 - ;;
257 - esac
258 - done
259 -
260 - popd > /dev/null
261 - done
262 -
263 - insinto /etc/postgresql-${SLOT}
264 - newins src/bin/psql/psqlrc.sample psqlrc
265 -
266 - use static-libs || find "${ED}" -name '*.a' -delete
267 -
268 - local f bn
269 - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
270 - -mindepth 1 -maxdepth 1)
271 - do
272 - bn=$(basename "${f}")
273 - # Temporarily tack on tmp to workaround a file collision
274 - # issue. This is only necessary for 9.7 and earlier. 10 never
275 - # had this issue.
276 - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
277 - "/usr/bin/${bn}${SLOT/.}"
278 - done
279 -
280 - if use doc ; then
281 - docinto html
282 - dodoc doc/src/sgml/html/*
283 - fi
284 -
285 - if use server; then
286 - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
287 - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
288 -
289 - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
290 - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
291 -
292 - if use systemd; then
293 - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
294 - "${FILESDIR}/${PN}.service-9.6-r1" | \
295 - systemd_newunit - ${PN}-${SLOT}.service
296 - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
297 - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
298 - fi
299 -
300 - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
301 -
302 - if use prefix ; then
303 - keepdir /run/postgresql
304 - fperms 1775 /run/postgresql
305 - fi
306 - fi
307 -}
308 -
309 -pkg_postinst() {
310 - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
311 - postgresql-config update
312 -
313 - elog "If you need a global psqlrc-file, you can place it in:"
314 - elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
315 -
316 - if use server ; then
317 - elog
318 - elog "Gentoo specific documentation:"
319 - elog "https://wiki.gentoo.org/wiki/PostgreSQL"
320 - elog
321 - elog "Official documentation:"
322 - elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
323 - elog
324 - elog "The default location of the Unix-domain socket is:"
325 - elog " ${EROOT%/}/run/postgresql/"
326 - elog
327 - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
328 - elog "so that it contains your preferred locale in:"
329 - elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
330 - elog
331 - elog "Then, execute the following command to setup the initial database"
332 - elog "environment:"
333 - elog " emerge --config =${CATEGORY}/${PF}"
334 - fi
335 -}
336 -
337 -pkg_prerm() {
338 - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
339 - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
340 - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
341 -
342 - ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
343 - sleep 10
344 - eend 0
345 - fi
346 -}
347 -
348 -pkg_postrm() {
349 - postgresql-config update
350 -}
351 -
352 -pkg_config() {
353 - use server || die "USE flag 'server' not enabled. Nothing to configure."
354 -
355 - [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
356 - && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
357 - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
358 - [[ -z "${DATA_DIR}" ]] \
359 - && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
360 -
361 - # environment.bz2 may not contain the same locale as the current system
362 - # locale. Unset and source from the current system locale.
363 - if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
364 - unset LANG
365 - unset LC_CTYPE
366 - unset LC_NUMERIC
367 - unset LC_TIME
368 - unset LC_COLLATE
369 - unset LC_MONETARY
370 - unset LC_MESSAGES
371 - unset LC_ALL
372 - source "${EROOT%/}/etc/env.d/02locale"
373 - [ -n "${LANG}" ] && export LANG
374 - [ -n "${LC_CTYPE}" ] && export LC_CTYPE
375 - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
376 - [ -n "${LC_TIME}" ] && export LC_TIME
377 - [ -n "${LC_COLLATE}" ] && export LC_COLLATE
378 - [ -n "${LC_MONETARY}" ] && export LC_MONETARY
379 - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
380 - [ -n "${LC_ALL}" ] && export LC_ALL
381 - fi
382 -
383 - einfo "You can modify the paths and options passed to initdb by editing:"
384 - einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
385 - einfo
386 - einfo "Information on options that can be passed to initdb are found at:"
387 - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
388 - einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
389 - einfo
390 - einfo "PG_INITDB_OPTS is currently set to:"
391 - if [[ -z "${PG_INITDB_OPTS}" ]] ; then
392 - einfo " (none)"
393 - else
394 - einfo " ${PG_INITDB_OPTS}"
395 - fi
396 - einfo
397 - einfo "Configuration files will be installed to:"
398 - einfo " ${PGDATA}"
399 - einfo
400 - einfo "The database cluster will be created in:"
401 - einfo " ${DATA_DIR}"
402 - einfo
403 -
404 - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
405 - sleep 5
406 - eend 0
407 -
408 - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
409 - eerror "The given directory, '${DATA_DIR}', is not empty."
410 - eerror "Modify DATA_DIR to point to an empty directory."
411 - die "${DATA_DIR} is not empty."
412 - fi
413 -
414 - einfo "Creating the data directory ..."
415 - if [[ ${EUID} == 0 ]] ; then
416 - mkdir -p "${DATA_DIR}"
417 - chown -Rf postgres:postgres "${DATA_DIR}"
418 - chmod 0700 "${DATA_DIR}"
419 - fi
420 -
421 - einfo "Initializing the database ..."
422 -
423 - if [[ ${EUID} == 0 ]] ; then
424 - su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
425 - else
426 - "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
427 - fi
428 -
429 - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
430 - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
431 - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
432 - fi
433 -
434 - # unix_socket_directory has no effect in postgresql.conf as it's
435 - # overridden in the initscript
436 - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
437 -
438 - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
439 - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
440 - # On the off-chance that you might need to work with UTF-8 encoded
441 - # characters in PL/Perl
442 - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
443 - EOF
444 -
445 - einfo "The autovacuum function, which was in contrib, has been moved to the main"
446 - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
447 - einfo "by default. You can disable it in the cluster's:"
448 - einfo " ${PGDATA%/}/postgresql.conf"
449 - einfo
450 - if ! use systemd; then
451 - einfo "The PostgreSQL server, by default, will log events to:"
452 - einfo " ${DATA_DIR%/}/postmaster.log"
453 - einfo
454 - fi
455 - if use prefix ; then
456 - einfo "The location of the configuration files have moved to:"
457 - einfo " ${PGDATA}"
458 - einfo "To start the server:"
459 - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
460 - einfo "To stop:"
461 - einfo " pg_ctl stop -D ${DATA_DIR}"
462 - einfo
463 - einfo "Or move the configuration files back:"
464 - einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
465 - elif use systemd; then
466 - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
467 - einfo "instead of 'pg_ctl'."
468 - else
469 - einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
470 - einfo "instead of 'pg_ctl'."
471 - fi
472 -}
473 -
474 -src_test() {
475 - if use server && [[ ${UID} -ne 0 ]] ; then
476 - emake check
477 -
478 - einfo "If you think other tests besides the regression tests are necessary, please"
479 - einfo "submit a bug including a patch for this ebuild to enable them."
480 - else
481 - use server || \
482 - ewarn 'Tests cannot be run without the "server" use flag enabled.'
483 - [[ ${UID} -eq 0 ]] || \
484 - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
485 -
486 - ewarn 'Skipping.'
487 - fi
488 -}
489
490 diff --git a/dev-db/postgresql/postgresql-11_beta4.ebuild b/dev-db/postgresql/postgresql-11_beta4.ebuild
491 deleted file mode 100644
492 index 27adb918d12..00000000000
493 --- a/dev-db/postgresql/postgresql-11_beta4.ebuild
494 +++ /dev/null
495 @@ -1,452 +0,0 @@
496 -# Copyright 1999-2018 Gentoo Foundation
497 -# Distributed under the terms of the GNU General Public License v2
498 -
499 -EAPI="6"
500 -
501 -PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
502 -
503 -PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
504 - zh_TW"
505 -
506 -inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
507 - systemd user versionator
508 -
509 -KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
510 -
511 -SLOT=$(get_major_version)
512 -
513 -MY_PV=${PV/_/}
514 -S="${WORKDIR}/${PN}-${MY_PV}"
515 -
516 -SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
517 -
518 -LICENSE="POSTGRESQL GPL-2"
519 -DESCRIPTION="PostgreSQL RDBMS"
520 -HOMEPAGE="http://www.postgresql.org/"
521 -
522 -IUSE="doc kerberos kernel_linux ldap libressl llvm nls pam perl python +readline
523 - selinux +server systemd ssl static-libs tcl threads uuid xml zlib"
524 -
525 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
526 -
527 -CDEPEND="
528 ->=app-eselect/eselect-postgresql-2.0
529 -sys-apps/less
530 -virtual/libintl
531 -kerberos? ( virtual/krb5 )
532 -ldap? ( net-nds/openldap )
533 -llvm? ( sys-devel/llvm:=
534 - sys-devel/clang:= )
535 -pam? ( virtual/pam )
536 -perl? ( >=dev-lang/perl-5.8:= )
537 -python? ( ${PYTHON_DEPS} )
538 -readline? ( sys-libs/readline:0= )
539 -server? ( systemd? ( sys-apps/systemd ) )
540 -ssl? (
541 - !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
542 - libressl? ( dev-libs/libressl:= )
543 -)
544 -tcl? ( >=dev-lang/tcl-8:0= )
545 -xml? ( dev-libs/libxml2 dev-libs/libxslt )
546 -zlib? ( sys-libs/zlib )
547 -"
548 -
549 -# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
550 -# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
551 -# the libc includes UUID functions.
552 -UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
553 -BSD_LIBC=( elibc_{Free,Net,Open}BSD )
554 -
555 -nest_usedep() {
556 - local front back
557 - while [[ ${#} -gt 1 ]]; do
558 - front+="${1}? ( "
559 - back+=" )"
560 - shift
561 - done
562 - echo "${front}${1}${back}"
563 -}
564 -
565 -IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
566 -CDEPEND+="
567 -uuid? (
568 - ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
569 - $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
570 -)"
571 -
572 -DEPEND="${CDEPEND}
573 -!!<sys-apps/sandbox-2.0
574 -sys-devel/bison
575 -sys-devel/flex
576 -nls? ( sys-devel/gettext )
577 -xml? ( virtual/pkgconfig )
578 -"
579 -
580 -RDEPEND="${CDEPEND}
581 -!dev-db/postgresql-docs:${SLOT}
582 -!dev-db/postgresql-base:${SLOT}
583 -!dev-db/postgresql-server:${SLOT}
584 -selinux? ( sec-policy/selinux-postgresql )
585 -"
586 -
587 -pkg_setup() {
588 - use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
589 -
590 - enewgroup postgres 70
591 - enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
592 -
593 - use python && python-single-r1_pkg_setup
594 -}
595 -
596 -src_prepare() {
597 - # Set proper run directory
598 - sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
599 - -i src/include/pg_config_manual.h || die
600 -
601 - # Rely on $PATH being in the proper order so that the correct
602 - # install program is used for modules utilizing PGXS in both
603 - # hardened and non-hardened environments. (Bug #528786)
604 - sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
605 -
606 - use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch"
607 -
608 - if use pam ; then
609 - sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
610 - -i src/backend/libpq/auth.c || \
611 - die 'PGSQL_PAM_SERVICE rename failed.'
612 - fi
613 -
614 - eapply_user
615 -}
616 -
617 -src_configure() {
618 - case ${CHOST} in
619 - *-darwin*|*-solaris*)
620 - use nls && append-libs intl
621 - ;;
622 - esac
623 -
624 - export LDFLAGS_SL="${LDFLAGS}"
625 - export LDFLAGS_EX="${LDFLAGS}"
626 -
627 - local PO="${EPREFIX%/}"
628 -
629 - local i uuid_config=""
630 - if use uuid; then
631 - for i in ${UTIL_LINUX_LIBC[@]}; do
632 - use ${i} && uuid_config="--with-uuid=e2fs"
633 - done
634 - for i in ${BSD_LIBC[@]}; do
635 - use ${i} && uuid_config="--with-uuid=bsd"
636 - done
637 - [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
638 - fi
639 -
640 - econf \
641 - --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
642 - --datadir="${PO}/usr/share/postgresql-${SLOT}" \
643 - --docdir="${PO}/usr/share/doc/${PF}" \
644 - --includedir="${PO}/usr/include/postgresql-${SLOT}" \
645 - --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
646 - --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
647 - --with-system-tzdata="${PO}/usr/share/zoneinfo" \
648 - $(use_enable !alpha spinlocks) \
649 - $(use_enable threads thread-safety) \
650 - $(use_with kerberos gssapi) \
651 - $(use_with ldap) \
652 - $(use_with llvm) \
653 - $(use_with pam) \
654 - $(use_with perl) \
655 - $(use_with python) \
656 - $(use_with readline) \
657 - $(use_with ssl openssl) \
658 - $(usex server "$(use_with systemd)" '--without-systemd') \
659 - $(use_with tcl) \
660 - ${uuid_config} \
661 - $(use_with xml libxml) \
662 - $(use_with xml libxslt) \
663 - $(use_with zlib) \
664 - $(use_enable nls nls "'$(l10n_get_locales)'")
665 -}
666 -
667 -src_compile() {
668 - emake
669 - emake -C contrib
670 -}
671 -
672 -src_install() {
673 - emake DESTDIR="${D}" install
674 - emake DESTDIR="${D}" install -C contrib
675 -
676 - dodoc README HISTORY doc/{TODO,bug.template}
677 -
678 - # man pages are already built, but if we have the target make them,
679 - # they'll be generated from source before being installed so we
680 - # manually install man pages.
681 - # We use ${SLOT} instead of doman for postgresql.eselect
682 - insinto /usr/share/postgresql-${SLOT}/man/
683 - doins -r doc/src/sgml/man{1,3,7}
684 - if ! use server; then
685 - # Remove man pages for non-existent binaries
686 - serverman=(
687 - initdb
688 - pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
689 - pg_{test_{fsync,timing},upgrade,waldump}
690 - post{gres,master}
691 - )
692 - for m in ${serverman[@]} ; do
693 - rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
694 - done
695 - fi
696 - docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
697 -
698 - # Create slot specific man pages
699 - local bn f mansec slotted_name
700 - for mansec in 1 3 7 ; do
701 - local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
702 -
703 - mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
704 - pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
705 -
706 - for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
707 - bn=$(basename "${f}")
708 - slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
709 - case ${bn} in
710 - TABLE.7|WITH.7)
711 - echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
712 - ;;
713 - *)
714 - echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
715 - ;;
716 - esac
717 - done
718 -
719 - popd > /dev/null
720 - done
721 -
722 - insinto /etc/postgresql-${SLOT}
723 - newins src/bin/psql/psqlrc.sample psqlrc
724 -
725 - use static-libs || find "${ED}" -name '*.a' -delete
726 -
727 - local f bn
728 - for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
729 - -mindepth 1 -maxdepth 1)
730 - do
731 - bn=$(basename "${f}")
732 - # Temporarily tack on tmp to workaround a file collision
733 - # issue. This is only necessary for 9.7 and earlier. 10 never
734 - # had this issue.
735 - dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
736 - "/usr/bin/${bn}${SLOT/.}"
737 - done
738 -
739 - if use doc ; then
740 - docinto html
741 - dodoc doc/src/sgml/html/*
742 - fi
743 -
744 - if use server; then
745 - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
746 - "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
747 -
748 - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
749 - "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
750 -
751 - if use systemd; then
752 - sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
753 - "${FILESDIR}/${PN}.service-9.6-r1" | \
754 - systemd_newunit - ${PN}-${SLOT}.service
755 - newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
756 - systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
757 - fi
758 -
759 - use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
760 -
761 - if use prefix ; then
762 - keepdir /run/postgresql
763 - fperms 1775 /run/postgresql
764 - fi
765 - fi
766 -}
767 -
768 -pkg_postinst() {
769 - use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
770 - postgresql-config update
771 -
772 - elog "If you need a global psqlrc-file, you can place it in:"
773 - elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
774 -
775 - if use server ; then
776 - elog
777 - elog "Gentoo specific documentation:"
778 - elog "https://wiki.gentoo.org/wiki/PostgreSQL"
779 - elog
780 - elog "Official documentation:"
781 - elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
782 - elog
783 - elog "The default location of the Unix-domain socket is:"
784 - elog " ${EROOT%/}/run/postgresql/"
785 - elog
786 - elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
787 - elog "so that it contains your preferred locale in:"
788 - elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
789 - elog
790 - elog "Then, execute the following command to setup the initial database"
791 - elog "environment:"
792 - elog " emerge --config =${CATEGORY}/${PF}"
793 - fi
794 -}
795 -
796 -pkg_prerm() {
797 - if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
798 - ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
799 - ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
800 -
801 - ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
802 - sleep 10
803 - eend 0
804 - fi
805 -}
806 -
807 -pkg_postrm() {
808 - postgresql-config update
809 -}
810 -
811 -pkg_config() {
812 - use server || die "USE flag 'server' not enabled. Nothing to configure."
813 -
814 - [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \
815 - && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
816 - [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
817 - [[ -z "${DATA_DIR}" ]] \
818 - && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
819 -
820 - # environment.bz2 may not contain the same locale as the current system
821 - # locale. Unset and source from the current system locale.
822 - if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
823 - unset LANG
824 - unset LC_CTYPE
825 - unset LC_NUMERIC
826 - unset LC_TIME
827 - unset LC_COLLATE
828 - unset LC_MONETARY
829 - unset LC_MESSAGES
830 - unset LC_ALL
831 - source "${EROOT%/}/etc/env.d/02locale"
832 - [ -n "${LANG}" ] && export LANG
833 - [ -n "${LC_CTYPE}" ] && export LC_CTYPE
834 - [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
835 - [ -n "${LC_TIME}" ] && export LC_TIME
836 - [ -n "${LC_COLLATE}" ] && export LC_COLLATE
837 - [ -n "${LC_MONETARY}" ] && export LC_MONETARY
838 - [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
839 - [ -n "${LC_ALL}" ] && export LC_ALL
840 - fi
841 -
842 - einfo "You can modify the paths and options passed to initdb by editing:"
843 - einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
844 - einfo
845 - einfo "Information on options that can be passed to initdb are found at:"
846 - einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
847 - einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
848 - einfo
849 - einfo "PG_INITDB_OPTS is currently set to:"
850 - if [[ -z "${PG_INITDB_OPTS}" ]] ; then
851 - einfo " (none)"
852 - else
853 - einfo " ${PG_INITDB_OPTS}"
854 - fi
855 - einfo
856 - einfo "Configuration files will be installed to:"
857 - einfo " ${PGDATA}"
858 - einfo
859 - einfo "The database cluster will be created in:"
860 - einfo " ${DATA_DIR}"
861 - einfo
862 -
863 - ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
864 - sleep 5
865 - eend 0
866 -
867 - if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
868 - eerror "The given directory, '${DATA_DIR}', is not empty."
869 - eerror "Modify DATA_DIR to point to an empty directory."
870 - die "${DATA_DIR} is not empty."
871 - fi
872 -
873 - einfo "Creating the data directory ..."
874 - if [[ ${EUID} == 0 ]] ; then
875 - mkdir -p "${DATA_DIR}"
876 - chown -Rf postgres:postgres "${DATA_DIR}"
877 - chmod 0700 "${DATA_DIR}"
878 - fi
879 -
880 - einfo "Initializing the database ..."
881 -
882 - if [[ ${EUID} == 0 ]] ; then
883 - su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
884 - else
885 - "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
886 - fi
887 -
888 - if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
889 - mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
890 - ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
891 - fi
892 -
893 - # unix_socket_directory has no effect in postgresql.conf as it's
894 - # overridden in the initscript
895 - sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
896 -
897 - cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
898 - # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
899 - # On the off-chance that you might need to work with UTF-8 encoded
900 - # characters in PL/Perl
901 - plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
902 - EOF
903 -
904 - einfo "The autovacuum function, which was in contrib, has been moved to the main"
905 - einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
906 - einfo "by default. You can disable it in the cluster's:"
907 - einfo " ${PGDATA%/}/postgresql.conf"
908 - einfo
909 - if ! use systemd; then
910 - einfo "The PostgreSQL server, by default, will log events to:"
911 - einfo " ${DATA_DIR%/}/postmaster.log"
912 - einfo
913 - fi
914 - if use prefix ; then
915 - einfo "The location of the configuration files have moved to:"
916 - einfo " ${PGDATA}"
917 - einfo "To start the server:"
918 - einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
919 - einfo "To stop:"
920 - einfo " pg_ctl stop -D ${DATA_DIR}"
921 - einfo
922 - einfo "Or move the configuration files back:"
923 - einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
924 - elif use systemd; then
925 - einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
926 - einfo "instead of 'pg_ctl'."
927 - else
928 - einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
929 - einfo "instead of 'pg_ctl'."
930 - fi
931 -}
932 -
933 -src_test() {
934 - if use server && [[ ${UID} -ne 0 ]] ; then
935 - emake check
936 -
937 - einfo "If you think other tests besides the regression tests are necessary, please"
938 - einfo "submit a bug including a patch for this ebuild to enable them."
939 - else
940 - use server || \
941 - ewarn 'Tests cannot be run without the "server" use flag enabled.'
942 - [[ ${UID} -eq 0 ]] || \
943 - ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
944 -
945 - ewarn 'Skipping.'
946 - fi
947 -}