[gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/, dev-db/postgresql/files/

2024-02-03 Thread Aaron W. Swenson
commit: 9a3b10c4e499a87fafd6e2df9c9f87469451014b
Author: Aaron W. Swenson  gentoo  org>
AuthorDate: Sun Feb  4 04:57:50 2024 +
Commit: Aaron W. Swenson  gentoo  org>
CommitDate: Sun Feb  4 05:02:08 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a3b10c4

dev-db/postgresql: Fix builind with libxml-2.12

Closes: https://bugs.gentoo.org/923055
Signed-off-by: Aaron W. Swenson  gentoo.org>

 .../postgresql/files/postgresql-12-xml-2.12.patch  |  83 
 .../postgresql/files/postgresql-13-xml-2.12.patch  |  83 
 .../postgresql/files/postgresql-14-xml-2.12.patch  |  83 
 .../postgresql/files/postgresql-15-xml-2.12.patch  |  83 
 .../postgresql/files/postgresql-16-xml-2.12.patch  |  83 
 dev-db/postgresql/postgresql-12.17-r2.ebuild   | 454 
 dev-db/postgresql/postgresql-13.13-r2.ebuild   | 466 
 dev-db/postgresql/postgresql-14.10-r2.ebuild   | 466 
 dev-db/postgresql/postgresql-15.5-r2.ebuild| 468 
 dev-db/postgresql/postgresql-16.1-r2.ebuild| 472 +
 10 files changed, 2741 insertions(+)

diff --git a/dev-db/postgresql/files/postgresql-12-xml-2.12.patch 
b/dev-db/postgresql/files/postgresql-12-xml-2.12.patch
new file mode 100644
index ..2929eb7302e2
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-12-xml-2.12.patch
@@ -0,0 +1,83 @@
+From b2fd1dab90240ebb9017cd2fddd731c3641ba434 Mon Sep 17 00:00:00 2001
+From: Tom Lane 
+Date: Mon, 29 Jan 2024 12:06:08 -0500
+Subject: [PATCH] Fix incompatibilities with libxml2 >= 2.12.0.
+
+libxml2 changed the required signature of error handler callbacks
+to make the passed xmlError struct "const".  This is causing build
+failures on buildfarm member caiman, and no doubt will start showing
+up in the field quite soon.  Add a version check to adjust the
+declaration of xml_errorHandler() according to LIBXML_VERSION.
+
+2.12.x also produces deprecation warnings for contrib/xml2/xpath.c's
+assignment to xmlLoadExtDtdDefaultValue.  I see no good reason for
+that to still be there, seeing that we disabled external DTDs (at a
+lower level) years ago for security reasons.  Let's just remove it.
+
+Back-patch to all supported branches, since they might all get built
+with newer libxml2 once it gets a bit more popular.  (The back
+branches produce another deprecation warning about xpath.c's use of
+xmlSubstituteEntitiesDefault().  We ought to consider whether to
+back-patch all or part of commit 65c5864d7 to silence that.  It's
+less urgent though, since it won't break the buildfarm.)
+
+Discussion: https://postgr.es/m/1389505.1706382...@sss.pgh.pa.us
+---
+ contrib/xml2/xpath.c|  1 -
+ src/backend/utils/adt/xml.c | 14 --
+ 2 files changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c
+index 1e5b71d9a0..f44caf0020 100644
+--- a/contrib/xml2/xpath.c
 b/contrib/xml2/xpath.c
+@@ -75,7 +75,6 @@ pgxml_parser_init(PgXmlStrictness strictness)
+   xmlInitParser();
+ 
+   xmlSubstituteEntitiesDefault(1);
+-  xmlLoadExtDtdDefaultValue = 1;
+ 
+   return xmlerrcxt;
+ }
+diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
+index 9f319077cb..51b16f2b73 100644
+--- a/src/backend/utils/adt/xml.c
 b/src/backend/utils/adt/xml.c
+@@ -65,6 +65,16 @@
+ #if LIBXML_VERSION >= 20704
+ #define HAVE_XMLSTRUCTUREDERRORCONTEXT 1
+ #endif
++
++/*
++ * libxml2 2.12 decided to insert "const" into the error handler API.
++ */
++#if LIBXML_VERSION >= 21200
++#define PgXmlErrorPtr const xmlError *
++#else
++#define PgXmlErrorPtr xmlErrorPtr
++#endif
++
+ #endif/* USE_LIBXML */
+ 
+ #include "access/htup_details.h"
+@@ -119,7 +129,7 @@ struct PgXmlErrorContext
+ 
+ static xmlParserInputPtr xmlPgEntityLoader(const char *URL, const char *ID,
+   
   xmlParserCtxtPtr ctxt);
+-static void xml_errorHandler(void *data, xmlErrorPtr error);
++static void xml_errorHandler(void *data, PgXmlErrorPtr error);
+ static void xml_ereport_by_code(int level, int sqlcode,
+   const char 
*msg, int errcode);
+ static void chopStringInfoNewlines(StringInfo str);
+@@ -1752,7 +1762,7 @@ xml_ereport(PgXmlErrorContext *errcxt, int level, int 
sqlcode, const char *msg)
+  * Error handler for libxml errors and warnings
+  */
+ static void
+-xml_errorHandler(void *data, xmlErrorPtr error)
++xml_errorHandler(void *data, PgXmlErrorPtr error)
+ {
+   PgXmlErrorContext *xmlerrcxt = (PgXmlErrorContext *) data;
+   xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) error->ctxt;
+-- 
+2.30.2
+

diff --git a/dev-db/postgresql/files/postgresql-13-xml-2.12.patch 
b/dev-db/postgresql/files/postgresql-13-xml-2.12.patch
new file mode 100644
index 

[gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/, dev-db/postgresql/files/

2024-02-02 Thread Patrick Lauer
commit: 7f9c4cc23884adb65595e0f125c41eaa09212c42
Author: Patrick Lauer  gentoo  org>
AuthorDate: Fri Feb  2 13:34:14 2024 +
Commit: Patrick Lauer  gentoo  org>
CommitDate: Fri Feb  2 14:05:15 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f9c4cc2

dev-db/postgresql: backport openssl fixes

Bug: https://bugs.gentoo.org/923620
Signed-off-by: Patrick Lauer  gentoo.org>

 .../files/postgresql-12-openssl3.2.patch   | 178 
 .../files/postgresql-13-openssl3.2.patch   | 172 
 .../files/postgresql-14-openssl3.2.patch   | 195 +
 .../files/postgresql-15-openssl3.2.patch   | 194 +
 .../files/postgresql-16-openssl3.2.patch   | 216 ++
 dev-db/postgresql/postgresql-12.17-r1.ebuild   | 453 
 dev-db/postgresql/postgresql-13.13-r1.ebuild   | 465 
 dev-db/postgresql/postgresql-14.10-r1.ebuild   | 465 
 dev-db/postgresql/postgresql-15.5-r1.ebuild| 467 
 dev-db/postgresql/postgresql-16.1-r1.ebuild| 468 +
 10 files changed, 3273 insertions(+)

diff --git a/dev-db/postgresql/files/postgresql-12-openssl3.2.patch 
b/dev-db/postgresql/files/postgresql-12-openssl3.2.patch
new file mode 100644
index ..62b254d220c6
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-12-openssl3.2.patch
@@ -0,0 +1,178 @@
+commit 6bb4ce36b302296fd09abb097b5e28b66117be92
+Author: Tom Lane 
+Date:   Tue Nov 28 12:34:03 2023 -0500
+
+Use BIO_{get,set}_app_data instead of BIO_{get,set}_data.
+
+We should have done it this way all along, but we accidentally got
+away with using the wrong BIO field up until OpenSSL 3.2.  There,
+the library's BIO routines that we rely on use the "data" field
+for their own purposes, and our conflicting use causes assorted
+weird behaviors up to and including core dumps when SSL connections
+are attempted.  Switch to using the approved field for the purpose,
+i.e. app_data.
+
+While at it, remove our configure probes for BIO_get_data as well
+as the fallback implementation.  BIO_{get,set}_app_data have been
+there since long before any OpenSSL version that we still support,
+even in the back branches.
+
+Also, update src/test/ssl/t/001_ssltests.pl to allow for a minor
+change in an error message spelling that evidently came in with 3.2.
+
+Tristan Partin and Bo Andreson.  Back-patch to all supported branches.
+
+Discussion: 
https://postgr.es/m/can55fz1eddysyal7mv+osluij2h_u6hvd4qmv-7pk7jkji0...@mail.gmail.com
+
+diff --git a/configure b/configure
+index cce104aebb..346ea8e2c1 100755
+--- a/configure
 b/configure
+@@ -12641,7 +12641,7 @@ done
+   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
+   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
+   # functions.
+-  for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new 
ASN1_STRING_get0_data
++  for ac_func in OPENSSL_init_ssl BIO_meth_new ASN1_STRING_get0_data
+ do :
+   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+diff --git a/configure.in b/configure.in
+index 3c93e7a944..2c15b20049 100644
+--- a/configure.in
 b/configure.in
+@@ -1290,7 +1290,7 @@ if test "$with_openssl" = yes ; then
+   # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
+   # doesn't have these OpenSSL 1.1.0 functions. So check for individual
+   # functions.
+-  AC_CHECK_FUNCS([OPENSSL_init_ssl BIO_get_data BIO_meth_new 
ASN1_STRING_get0_data])
++  AC_CHECK_FUNCS([OPENSSL_init_ssl BIO_meth_new ASN1_STRING_get0_data])
+   # OpenSSL versions before 1.1.0 required setting callback functions, for
+   # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
+   # function was removed.
+diff --git a/src/backend/libpq/be-secure-openssl.c 
b/src/backend/libpq/be-secure-openssl.c
+index b0a1f7258a..34f8f9e71e 100644
+--- a/src/backend/libpq/be-secure-openssl.c
 b/src/backend/libpq/be-secure-openssl.c
+@@ -699,11 +699,6 @@ be_tls_write(Port *port, void *ptr, size_t len, int 
*waitfor)
+  * to retry; do we need to adopt their logic for that?
+  */
+ 
+-#ifndef HAVE_BIO_GET_DATA
+-#define BIO_get_data(bio) (bio->ptr)
+-#define BIO_set_data(bio, data) (bio->ptr = data)
+-#endif
+-
+ static BIO_METHOD *my_bio_methods = NULL;
+ 
+ static int
+@@ -713,7 +708,7 @@ my_sock_read(BIO *h, char *buf, int size)
+ 
+   if (buf != NULL)
+   {
+-  res = secure_raw_read(((Port *) BIO_get_data(h)), buf, size);
++  res = secure_raw_read(((Port *) BIO_get_app_data(h)), buf, 
size);
+   BIO_clear_retry_flags(h);
+   if (res <= 0)
+   {
+@@ -733,7 +728,7 @@ my_sock_write(BIO *h, const char *buf, int size)
+ {
+   int res = 0;
+ 
+-  res 

[gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/, dev-db/postgresql/files/

2021-09-23 Thread Aaron W. Swenson
commit: 0c589d89d5916b41f547eb8889935d4a448ff8fe
Author: Aaron W. Swenson  gentoo  org>
AuthorDate: Thu Sep 23 20:48:37 2021 +
Commit: Aaron W. Swenson  gentoo  org>
CommitDate: Thu Sep 23 20:48:37 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c589d89

dev-db/postgresql: Bump to 14_rc1

Signed-off-by: Aaron W. Swenson  gentoo.org>

 .../files/postgresql-14_rc1-no-server.patch| 151 +++
 dev-db/postgresql/postgresql-14_rc1.ebuild | 467 +
 2 files changed, 618 insertions(+)

diff --git a/dev-db/postgresql/files/postgresql-14_rc1-no-server.patch 
b/dev-db/postgresql/files/postgresql-14_rc1-no-server.patch
new file mode 100644
index 000..4f2d388386a
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-14_rc1-no-server.patch
@@ -0,0 +1,151 @@
+diff -Naruw a/contrib/Makefile b/contrib/Makefile
+--- a/contrib/Makefile 2021-09-20 17:33:01.0 -0400
 b/contrib/Makefile 2021-09-23 16:28:52.919265033 -0400
+@@ -5,57 +5,9 @@
+ include $(top_builddir)/src/Makefile.global
+ 
+ SUBDIRS = \
+-  adminpack   \
+-  amcheck \
+-  auth_delay  \
+-  auto_explain\
+-  bloom   \
+-  btree_gin   \
+-  btree_gist  \
+-  citext  \
+-  cube\
+-  dblink  \
+-  dict_int\
+-  dict_xsyn   \
+-  earthdistance   \
+-  file_fdw\
+-  fuzzystrmatch   \
+-  hstore  \
+-  intagg  \
+-  intarray\
+-  isn \
+-  lo  \
+-  ltree   \
+   oid2name\
+-  old_snapshot\
+-  pageinspect \
+-  passwordcheck   \
+-  pg_buffercache  \
+-  pg_freespacemap \
+-  pg_prewarm  \
+-  pg_stat_statements \
+-  pg_surgery  \
+-  pg_trgm \
+-  pgcrypto\
+-  pgrowlocks  \
+-  pgstattuple \
+-  pg_visibility   \
+-  postgres_fdw\
+-  seg \
+-  spi \
+-  tablefunc   \
+-  tcn \
+-  test_decoding   \
+-  tsm_system_rows \
+-  tsm_system_time \
+-  unaccent\
+   vacuumlo
+ 
+-ifeq ($(with_ssl),openssl)
+-SUBDIRS += sslinfo
+-else
+-ALWAYS_SUBDIRS += sslinfo
+-endif
+ 
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+diff -Naruw a/src/backend/Makefile b/src/backend/Makefile
+--- a/src/backend/Makefile 2021-09-20 17:33:01.0 -0400
 b/src/backend/Makefile 2021-09-23 16:30:03.015728022 -0400
+@@ -56,7 +56,7 @@
+ 
+ ##
+ 
+-all: submake-libpgport submake-catalog-headers submake-utils-headers postgres 
$(POSTGRES_IMP)
++all: generated-headers
+ 
+ ifneq ($(PORTNAME), cygwin)
+ ifneq ($(PORTNAME), win32)
+@@ -194,23 +194,7 @@
+ 
+ ##
+ 
+-install: all installdirs install-bin
+-ifeq ($(PORTNAME), cygwin)
+-ifeq ($(MAKE_DLL), true)
+-  $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-ifeq ($(PORTNAME), win32)
+-ifeq ($(MAKE_DLL), true)
+-  $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-  $(MAKE) -C catalog install-data
+-  $(MAKE) -C tsearch install-data
+-  $(MAKE) -C utils install-data
+-  $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample 
'$(DESTDIR)$(datadir)/pg_hba.conf.sample'
+-  $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample 
'$(DESTDIR)$(datadir)/pg_ident.conf.sample'
+-  $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample 
'$(DESTDIR)$(datadir)/postgresql.conf.sample'
++install:
+ 
+ ifeq ($(with_llvm), yes)
+ install-bin: install-postgres-bitcode
+diff -Naruw a/src/bin/Makefile b/src/bin/Makefile
+--- a/src/bin/Makefile 2021-09-20 17:33:01.0 -0400
 b/src/bin/Makefile 2021-09-23 16:30:50.718922745 -0400
+@@ -14,23 +14,8 @@
+ include $(top_builddir)/src/Makefile.global
+ 
+ SUBDIRS = \
+-  initdb \
+-  pg_amcheck \
+-  pg_archivecleanup \
+-  pg_basebackup \
+-  pg_checksums \
+   pg_config \
+-  pg_controldata \
+-  pg_ctl \
+   pg_dump \
+-  pg_resetwal \
+-  pg_rewind \
+-  pg_test_fsync \
+-  pg_test_timing \
+-  pg_upgrade \
+-  pg_verifybackup \
+-  pg_waldump \
+-  pgbench \
+   psql \
+   scripts
+ 
+diff -Naruw a/src/Makefile b/src/Makefile
+--- a/src/Makefile 2021-09-20 17:33:01.0 -0400
 b/src/Makefile 

[gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/, dev-db/postgresql/files/

2021-02-21 Thread Aaron W. Swenson
commit: b5fd6830195d614ec11bbf6465f170d0086ae4ea
Author: Aaron W. Swenson  gentoo  org>
AuthorDate: Sun Feb 21 14:15:27 2021 +
Commit: Aaron W. Swenson  gentoo  org>
CommitDate: Sun Feb 21 14:15:27 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5fd6830

dev-db/postgresql: Security Bump

Bump to 13.2, 12.6, 11.11, 10.16, 9.6.21, and 9.5.25. Addresses vulnerabilities:
CVE-2021-3393 and CVE-2021-20229.

Includes ICU68 fix, and extra workaround patch for 10.16 (thanks Marco
Sirabella).

Bug: https://bugs.gentoo.org/771942
Bug: https://bugs.gentoo.org/766225
Signed-off-by: Aaron W. Swenson  gentoo.org>

 dev-db/postgresql/Manifest |   6 +
 .../postgresql/files/postgresql-10.0-icu68-2.patch |  11 +
 dev-db/postgresql/postgresql-10.16.ebuild  | 461 
 dev-db/postgresql/postgresql-11.11.ebuild  | 458 
 dev-db/postgresql/postgresql-12.6.ebuild   | 458 
 dev-db/postgresql/postgresql-13.2.ebuild   | 462 
 dev-db/postgresql/postgresql-9.5.25.ebuild | 476 
 dev-db/postgresql/postgresql-9.6.21.ebuild | 481 +
 8 files changed, 2813 insertions(+)

diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index 48904b4d742..dcd19a42934 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -1,6 +1,12 @@
 DIST postgresql-10.15.tar.bz2 19089779 BLAKE2B 
3b1b30fca0253122aa20eb3fc0cac0b022379b0f0daded46d3295e76167c0063698226198bc905bed5b689a71f4dd2bab5795861207767c2091f037a2b0e9663
 SHA512 
88fe322a8691692f8c1b8ca7f7a5a035c399c1d2a0e6276b60863f2c0cb8e4857b041d7364641e0738438aee0836688e712b9c176ac454ee98386dfd18754636
+DIST postgresql-10.16.tar.bz2 19140221 BLAKE2B 
37fccd3f5c72ac489cbc26225dcc6992fa7fd5884a0141ec093122f556d7959a053181e01c6892d2e322af54028bf40b2293d090afa6366739cdefd3f62abd73
 SHA512 
690649b4e2f4e0650e5b927048e06894e60c5cf1663bb63ab89143f49e5f753e590d3f011b44df3c402379953a9c23f4832f0cf97c984f03c37d14cb85c860aa
 DIST postgresql-11.10.tar.bz2 20003842 BLAKE2B 
21446b5e9202c84dad4d6c768f16aab539e656d0a836121343ca4051269845a9ef06859ea37dab09030467336599eb1b72175115d61ca965ed74b7c2fed9ffbf
 SHA512 
0cc0e9b0f76e00727dc699ea59a45d760d37d91ec736a62cbc9bda3e38eb1ef1565e4e399dd3ae96bad87f866e56e364f916de7740d8be6e1cfc2bf654dfbb68
+DIST postgresql-11.11.tar.bz2 20054359 BLAKE2B 
d15a75319c53fb38a63e4e331567e32014e30fd8696ce19e4c50a458e866827f934d1bc7d28a0c28fddbf1ff7e9f61e5b3016cef27ed988ca43aabb3278bb64d
 SHA512 
8d38e6b7826e73191159f1ee69efde28adc061e0041eb136f55681503a189355b869b2ff312860325d454c1f95367d921fb61dd2de31f584261f165f229bcdb9
 DIST postgresql-12.5.tar.bz2 20729654 BLAKE2B 
7f7458346a0823d155f5caea0061aa14048d6f3cac27b1ea23dba03b02a39f39314ad1d44e589520d5e287004ffd32e042fea99ebfeda24b2cc23867b402d336
 SHA512 
9895bcb1bb26206500666ab4441e663ef83702d428b85a6ff177a4eaf44b0ae06b35d5c4da2672ccb4ec18296649af95bf2f0aed526afaa6a216a8c2d2c5627e
+DIST postgresql-12.6.tar.bz2 20771172 BLAKE2B 
7df8eb901255f56b4574cdd94a5e9d5a907d800edded805d4e8a9d1b85e5aac1c9b1963c9f8980ff5c95607e046e8e92f35a808f009cfdd36d54e1aca2e35db0
 SHA512 
5742c9d861c53bbdd032972e63b706d24ccb39492474c446cf4edac235d57357f036e48727027819004177003c4328123148e3d767d2b3d7866a52f333f8d68d
 DIST postgresql-13.1.tar.bz2 21034192 BLAKE2B 
609ac10f87da800754223c7f7d6b02efa3ed1308a5d27cc793c937be983f4041576e20de3b2efe514e3f61dc863e6212ec01d73adb93f6bcc373a596b2946675
 SHA512 
b7bd378db1dcb74ebcd5fffba03b82d8117d182029e4caca48eef62d8bcdbeef2c2e10f18eef0cdafb9d7acf21aa164d040e56687709f97b08c51540a786eeca
+DIST postgresql-13.2.tar.bz2 21057276 BLAKE2B 
982feffdd98d3f519ff1e790d35ac828710d3ca6cbf935a78bf04011dbc12b4523b451bc7f2421a788a709d1746b2cca9135842bfc1d5048ef5951ed48b20b6a
 SHA512 
6d93cbae8de8637deeccd851fb676a12015e8e1efa6be2424f506f232db535c54b974b11f47ed4578575f90f6de1947b1647f399794b4ec242838efd4c5b2bce
 DIST postgresql-9.5.24.tar.bz2 17881872 BLAKE2B 
b86019c4616142a0f5a8db3d00422e16181650d1e1ba755bf6453b76e50b3feff75d7319839ee6f28949d743e46bbdaea32fa3d51f39dd4b4439c88943665d6d
 SHA512 
6e649cd31f2761e2d070d8028b59a690ad76ff3d83a3aa982c4b222c8ea2927fda5e8f473330526673e27ad4b3cc99e8c66810e097c3dfc6517571405c6aede3
+DIST postgresql-9.5.25.tar.bz2 17923796 BLAKE2B 
432e035e78dacfd46fd4d04775b61e2e4db9e61945fa5f7e1c3c5ea3516a5e327489b4e57313b0d6ba4f2e20f52a164f96db01aa22b755ff625039f262eb
 SHA512 
621b36d767d2c7eb2e942cb7b26ca7491450fcfd9606114849f7336b4d8a0bc0196badb44da4918e748145d21b6f72ccf1255a1309dff2427da8b39b63fca427
 DIST postgresql-9.6.20.tar.bz2 18944478 BLAKE2B 
46c7b27ca60f967f71984d6b747c3054ae6ef4acdcbcd14cfbe3c1ede32a9303b99911e521ed0aa2ba6f899c0d8b9ec03e4e6804379ea6e2371a696f32a6f867
 SHA512 
6d247e5640a515fa6e6a4c68a992c83aeb19e35924b8e3d21191b3289200766588d1426c5863a13bfc4a11944da3202df9efebc94460d16454c29e5a79384c75
+DIST postgresql-9.6.21.tar.bz2 18990266 BLAKE2B 

[gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/, dev-db/postgresql/files/

2020-11-14 Thread Aaron W. Swenson
commit: 734742ccd7c2a901d5fb30975c0c7d27c6482cc2
Author: Aaron W. Swenson  gentoo  org>
AuthorDate: Sat Nov 14 13:50:18 2020 +
Commit: Aaron W. Swenson  gentoo  org>
CommitDate: Sat Nov 14 13:59:10 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=734742cc

dev-db/postgresql: Version Bumps

Bump to:
 - 13.1
 - 12.5
 - 11.10
 - 10.15
 - 9.6.20
 - 9.5.24

Fixes CVE-2020-25695, CVE-2020-25694, and CVE-2020-25696.

Pg 10+ includes a patch to fix building wit ICU 68.

Bug: https://bugs.gentoo.org/753257
Bug: https://bugs.gentoo.org/754363

Signed-off-by: Aaron W. Swenson  gentoo.org>

 dev-db/postgresql/Manifest |   6 +
 .../postgresql/files/postgresql-10.0-icu68.patch   |  12 +
 ...tgresql-.ebuild => postgresql-10.15.ebuild} | 259 ++--
 ...tgresql-.ebuild => postgresql-11.10.ebuild} | 259 ++--
 ...stgresql-.ebuild => postgresql-12.5.ebuild} | 259 ++--
 ...stgresql-.ebuild => postgresql-13.1.ebuild} | 265 ++---
 ...gresql-.ebuild => postgresql-9.5.24.ebuild} | 252 ++--
 ...gresql-.ebuild => postgresql-9.6.20.ebuild} | 241 ++-
 dev-db/postgresql/postgresql-.ebuild   |   5 +
 9 files changed, 794 insertions(+), 764 deletions(-)

diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index d712757a743..47dbd153fd0 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -1,6 +1,12 @@
 DIST postgresql-10.14.tar.bz2 19042154 BLAKE2B 
af00179190780bd30ed97cf6881670d18fda77062cdb5dc7cc161c64c3d5522db288902d0612db30fc6fcc1b619c7a102887ed438e27739e936bf5659425
 SHA512 
eecd2aa8df7e4779606ec547b7bf0207ebb2be10a4b332f06c3b72116f0619fe27fb651f2fd4504c73b740ab7f92468919244a615d460bb9c35085174a0dbc78
+DIST postgresql-10.15.tar.bz2 19089779 BLAKE2B 
3b1b30fca0253122aa20eb3fc0cac0b022379b0f0daded46d3295e76167c0063698226198bc905bed5b689a71f4dd2bab5795861207767c2091f037a2b0e9663
 SHA512 
88fe322a8691692f8c1b8ca7f7a5a035c399c1d2a0e6276b60863f2c0cb8e4857b041d7364641e0738438aee0836688e712b9c176ac454ee98386dfd18754636
+DIST postgresql-11.10.tar.bz2 20003842 BLAKE2B 
21446b5e9202c84dad4d6c768f16aab539e656d0a836121343ca4051269845a9ef06859ea37dab09030467336599eb1b72175115d61ca965ed74b7c2fed9ffbf
 SHA512 
0cc0e9b0f76e00727dc699ea59a45d760d37d91ec736a62cbc9bda3e38eb1ef1565e4e399dd3ae96bad87f866e56e364f916de7740d8be6e1cfc2bf654dfbb68
 DIST postgresql-11.9.tar.bz2 19959019 BLAKE2B 
655d1c9e6eebde19402a4c220ee674c589641c5b6f4e6298c8c06d3330069178952455f5af58f90b9af196ba9c8fd03db0ccd70b8bc49335e465f0ed537eaf59
 SHA512 
2c5c2f51aa01f02af4aa0849441767383e30fef69dd52efa442892f39d2456bfa8bf01f633a265e00eca0745e792609d2c1d33f77d8f29a02f5f374c84f2bf6e
 DIST postgresql-12.4.tar.bz2 20669776 BLAKE2B 
fb3f865a8a5e5280e7cc5da43f8658029170cd15dae8cc5fb1e741a122ea1f13418ac7743ec417ab4436976bc0ce12753fc8a301200143c975e8739d59816fa7
 SHA512 
36daf10878ca153370829178786dd6ee366ab4d4d6dc9c527536740fdb14b688ae4c33f850eb4243a7667d23f87e4bfd1ddee0755447ad4f3996e423e391c2f3
+DIST postgresql-12.5.tar.bz2 20729654 BLAKE2B 
7f7458346a0823d155f5caea0061aa14048d6f3cac27b1ea23dba03b02a39f39314ad1d44e589520d5e287004ffd32e042fea99ebfeda24b2cc23867b402d336
 SHA512 
9895bcb1bb26206500666ab4441e663ef83702d428b85a6ff177a4eaf44b0ae06b35d5c4da2672ccb4ec18296649af95bf2f0aed526afaa6a216a8c2d2c5627e
 DIST postgresql-13.0.tar.bz2 20999465 BLAKE2B 
c2c6475ad3c1c79afac1bc181ae3f9b74c097f9679bf562a0f1b4e16f426c9b0235aec476582ef548d14987a9232b938f2920446a8d5a8aa08ae5752f40481f2
 SHA512 
1fde89487c3e50a7a07e1d42fba60d415645ea89c5d4c5c7fcc93fbd5330feca7ec991d5b274f6ab757d5d04667ca1a7efdf4eaaa760add19d2e02437465f8f5
+DIST postgresql-13.1.tar.bz2 21034192 BLAKE2B 
609ac10f87da800754223c7f7d6b02efa3ed1308a5d27cc793c937be983f4041576e20de3b2efe514e3f61dc863e6212ec01d73adb93f6bcc373a596b2946675
 SHA512 
b7bd378db1dcb74ebcd5fffba03b82d8117d182029e4caca48eef62d8bcdbeef2c2e10f18eef0cdafb9d7acf21aa164d040e56687709f97b08c51540a786eeca
 DIST postgresql-9.5.23.tar.bz2 17682366 BLAKE2B 
74713d6483ae1ad3d2dfc4b1ac9d30a6785ff34f61b735924f2d469861516ad5160cbfda9c09b96adf264237b6f3ad8fd6ddeef60b6af6b5b63d6c1a36fb9354
 SHA512 
b7a1e936a0043b57b3ece79610855820d2ea6a86e4a4be0c4c8358bf3e1ef8fa88bc60106d6b865d86231d16b5e3c098b4dbd93125a125b3cc5d468ffea64db1
+DIST postgresql-9.5.24.tar.bz2 17881872 BLAKE2B 
b86019c4616142a0f5a8db3d00422e16181650d1e1ba755bf6453b76e50b3feff75d7319839ee6f28949d743e46bbdaea32fa3d51f39dd4b4439c88943665d6d
 SHA512 
6e649cd31f2761e2d070d8028b59a690ad76ff3d83a3aa982c4b222c8ea2927fda5e8f473330526673e27ad4b3cc99e8c66810e097c3dfc6517571405c6aede3
 DIST postgresql-9.6.19.tar.bz2 18880036 BLAKE2B 
ad9c5684e2c0fb276589560f7dbe01241b5caf763f5a20991244ad7b473397576c9530658eb91e085e8416156b0ac81750f08ed85d5e5a689321891d10b6e114
 SHA512 

[gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/, dev-db/postgresql/files/

2018-06-13 Thread Aaron Swenson
commit: 41cce08f487fd7bba7e12ea942c3c770a379f41c
Author: Aaron W. Swenson  gentoo  org>
AuthorDate: Wed Jun 13 11:19:22 2018 +
Commit: Aaron Swenson  gentoo  org>
CommitDate: Wed Jun 13 11:19:22 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41cce08f

dev-db/postgresql: Add 11 beta 1

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-db/postgresql/Manifest |   1 +
 .../files/postgresql-11_beta1-no-server.patch  | 148 +++
 dev-db/postgresql/postgresql-11_beta1.ebuild   | 449 +
 3 files changed, 598 insertions(+)

diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index 734bfe706ad..22930870b63 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -1,5 +1,6 @@
 DIST postgresql-10.3.tar.bz2 19959653 BLAKE2B 
ba3b05f53b0f879b18d6d0649bf819697c77a066b49d941a96d13a4741854b01aeb0c8b868d6550a08ad52572c9463c968660aa83c16cbaa5b4bf7a89387a524
 SHA512 
05cf82d3483bdf38734e6ff0fef6b80e7f8fd3cb5ea6792ffe222a599d97d1a29638970bf28ebf5bd1f877e8dcd9986d88f5c5e5379e74fe79ce83e20d2babba
 DIST postgresql-10.4.tar.bz2 20201838 BLAKE2B 
6d1cdc44547740c8f9fbc2e989364640409c6d2a365568b75731277dd0fba473ce07e2ee27e8ebfad507a6ce0ab3d3a44156c0e3a069d96d320771d8a97ba82f
 SHA512 
b7c0d2fdc724e2eb1cda9fc1eb01b47352bbe6ba6357b3e898b7f5990fd78499c8c68dcb3aa9bde7821d71b5882d8856131384e899f8055d89d51cdfdbc9e663
+DIST postgresql-11beta1.tar.bz2 20945387 BLAKE2B 
a99aff17a656da2250309f2652237c8df3a3aeed088250be6114964c103dec40d0c4cc60b048b2ffa1e9733aed8e9df2597d57cab58482512c42f25139dc3499
 SHA512 
fa4e9cf8293fecf384d98d3a5bbed208eda2e4dd8bf05a9922a74355daba74dde4dbe0cd42bea1de155f4fea3cdcd0d7621d7e315c1d5f49ce5ee794b01b9f6d
 DIST postgresql-9.3.22.tar.bz2 17022938 BLAKE2B 
198705e438717d0d9e12c73e0c0e3eff0ba89ea50a1b183de70f065e13c153c164890fe56bc6ec13b0cb9617df4f66894c122eeddaf9303b9a02b8e08b19b085
 SHA512 
667ff496172626d2fe35c6795935fb07f4f7967a3b0631dd3b96278f8dc00b3d08794f091a5ab060a45d6f2a861e0f10f0e9660f9e343ab34eeabd693104c47f
 DIST postgresql-9.3.23.tar.bz2 17033683 BLAKE2B 
f02ad25f6b8755a9a57c3a6dcb63b78672e29473b061ad1616be2fb97fbfd83fe0dc9fc9fda66ac0231fb30fb13f9ef8975ba5a9701d83f33495bcf2c2651b4a
 SHA512 
bb2d54312de728aa0379ea5bc6385036bbe69d3b7f85bbd78c210840eed19ace29840849caf38d0689e21130a0c94818a362b3927805d8eded53b68e240a52b0
 DIST postgresql-9.4.17.tar.bz2 17807762 BLAKE2B 
7640c29a71c6aeff47d9b43dd1e4f52edac4295b646b34da3a0ed9c26a8a826061bfd892e9907b62f31b7f01ee3aaf437c88d79b84d1d786d608dcd088309ecf
 SHA512 
9ac03d460e521dcd142ac463dd5bb0f3e3f4767bf8d61499ec7e8d0129d338c6f111667d0006df0c8ced9ae8a337d4c1b40eb5f55e6bc8dd5a24dfd376f0

diff --git a/dev-db/postgresql/files/postgresql-11_beta1-no-server.patch 
b/dev-db/postgresql/files/postgresql-11_beta1-no-server.patch
new file mode 100644
index 000..005a550f3cd
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-11_beta1-no-server.patch
@@ -0,0 +1,148 @@
+diff -Naruw a/contrib/Makefile b/contrib/Makefile
+--- a/contrib/Makefile
 b/contrib/Makefile
+@@ -5,56 +5,9 @@
+ include $(top_builddir)/src/Makefile.global
+ 
+ SUBDIRS = \
+-  adminpack   \
+-  amcheck \
+-  auth_delay  \
+-  auto_explain\
+-  bloom   \
+-  btree_gin   \
+-  btree_gist  \
+-  citext  \
+-  cube\
+-  dblink  \
+-  dict_int\
+-  dict_xsyn   \
+-  earthdistance   \
+-  file_fdw\
+-  fuzzystrmatch   \
+-  hstore  \
+-  intagg  \
+-  intarray\
+-  isn \
+-  lo  \
+-  ltree   \
+   oid2name\
+-  pageinspect \
+-  passwordcheck   \
+-  pg_buffercache  \
+-  pg_freespacemap \
+-  pg_prewarm  \
+-  pg_standby  \
+-  pg_stat_statements \
+-  pg_trgm \
+-  pgcrypto\
+-  pgrowlocks  \
+-  pgstattuple \
+-  pg_visibility   \
+-  postgres_fdw\
+-  seg \
+-  spi \
+-  tablefunc   \
+-  tcn \
+-  test_decoding   \
+-  tsm_system_rows \
+-  tsm_system_time \
+-  unaccent\
+   vacuumlo
+ 
+-ifeq ($(with_openssl),yes)
+-SUBDIRS += sslinfo
+-else
+-ALWAYS_SUBDIRS += sslinfo
+-endif
+ 
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+diff -Naruw a/src/backend/Makefile b/src/backend/Makefile
+--- a/src/backend/Makefile
 b/src/backend/Makefile
+@@ -53,7 +53,7 @@
+ 
+ 

[gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/, dev-db/postgresql/files/

2018-02-11 Thread Thomas Deutschmann
commit: d5021b6ede0f88dfa2eab505d0a163ec22419679
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Sun Feb 11 22:56:24 2018 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Sun Feb 11 23:05:50 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5021b6e

Revert "dev-db/postgresql: Cleanup Old and Insecure Files"

This reverts commit 850efe2a5700c2ba30f9e9860dd83143cf15da34.

 dev-db/postgresql/Manifest |   6 +
 .../files/postgresql-9.2-9.4-tz-dir-overflow.patch |  16 +
 dev-db/postgresql/files/postgresql.confd   |  58 +++
 dev-db/postgresql/files/postgresql.init| 137 +++
 dev-db/postgresql/files/postgresql.init-9.3| 142 +++
 dev-db/postgresql/files/postgresql.service |  55 +++
 dev-db/postgresql/files/postgresql.service-9.6 |  56 +++
 dev-db/postgresql/postgresql-9.2.19.ebuild | 390 ++
 dev-db/postgresql/postgresql-9.2.22.ebuild | 441 
 dev-db/postgresql/postgresql-9.2.23-r1.ebuild  | 445 +
 dev-db/postgresql/postgresql-9.2.23.ebuild | 441 
 dev-db/postgresql/postgresql-9.3.15.ebuild | 395 ++
 dev-db/postgresql/postgresql-9.4.10.ebuild | 427 
 dev-db/postgresql/postgresql-9.5.5.ebuild  | 438 
 14 files changed, 3447 insertions(+)

diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index 1d45e013a07..c95ed08cc42 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -1,11 +1,17 @@
 DIST postgresql-10.1.tar.bz2 19669989 BLAKE2B 
2fbe782023b6d55c6fadaba38e517c60038b3b7b0a14fa8793043f7b9c4719a692440f286bb1f898045b5f56ef1c064f97f36e821990755077dc8d9bb0dbd639
 SHA512 
06050d353aa43f32e0de0199d833d8a4652aff893b718b1c40ed31837838f73fe4d977ac0f2164ab97b3eeff4aae3409f440601740898a893877d96bc0ed1882
 DIST postgresql-10.2.tar.bz2 19901836 BLAKE2B 
ea626774dc11463418b3d0126d04bd2d8eb7e8bb299551bff0c30c7f999f37a1f48e6bbfcde1ee15c0e0519e222bfe14f14d985503fe517a06f127009148ae98
 SHA512 
bac61644c12c31e2dce97ec0134902a2a7141e922619015425961b963961b21210ca840f59ba585d3d75c7e34cb640f2ebeaa2b25c4a866db68f5e73a8f8a448
+DIST postgresql-9.2.19.tar.bz2 16466698 BLAKE2B 
ca5e84ac33923b36639bee403935c14c87bf37cd8061eb1d82bc1816449910ebe1373f74c2467850650fb7c3cadfe049a168ddc4a7e64ce54515731df552992a
 SHA512 
d3b4c5578bf6d6580028e775bff81a921258cb53b6b06567d96a352d14f3b63063adb480b2f5e2029baf8a034e14b5cd75eebc04f1ed7b16c849e1a5ec1f4867
+DIST postgresql-9.2.22.tar.bz2 16531224 BLAKE2B 
2d3b73db5c3082872df824b8e14e65c6cf4f7389f88b7ed577ddf59570294e74a6392a27f78e77c5da2c974566b38deaa979511649a6e95f5323d3961c587f78
 SHA512 
3e5ab04c2be2719579b2ebbf64b220522acfd9ea74029dd2ed699f60230da224bdc99de4ee5529b513e5586de0377764c4e54deb3dd93d5c53c4d666dce2b6b7
+DIST postgresql-9.2.23.tar.bz2 16531436 BLAKE2B 
df12276856e17693f0f1b2623a96ca15cfea95dc6e67e349391a60ba49d9a252ee94448bc07cbc0290f29546ba8b87fa24f62ca8f27cde41d4400c3aa275d778
 SHA512 
9715cb9aa34921f7d246837c6c516d588f88fda543ad635520e9575a5ea448ad39062f2c89c086c7f129cc5f61f4dca33e4f5fd94e1df39da428507c56a81ba3
 DIST postgresql-9.2.24.tar.bz2 16552576 BLAKE2B 
15e1fcc72830630c6c919113ed53c30c08f97c2543e678cac914b86456434d036f2efc262810e8f7ca0be714a8f690592a271ea5f6fb39777e73e94a9555e0ee
 SHA512 
a6f043e5ef5e12e23c1c43b26a5ecafce62f3a86f38b5b85e7cb0cb7aa376d40e460a526baf67ae40de40525e4744fb5e48650ee5e007db4ce9742fcf548bd56
+DIST postgresql-9.3.15.tar.bz2 17059932 BLAKE2B 
c5afbdf3b1ffe457e137495001eb2f570adcf7844b909b62f3d077336d50b75d9fac456430c99df6449f1ea016252e9a99d96922fc3b5f21796c1361803312d6
 SHA512 
35c30cdb5599f99c94ab921f9f5e7671a8c0b7bca8fe3b616630ae13d6eda8d329e77e7e802da6a83cb09c3c9ca10fa8ce0de8a184e6fff471130e1cd68ce762
 DIST postgresql-9.3.20.tar.bz2 17197360 BLAKE2B 
2b07f6ee78294a490a8902d0129ac6b5e729e2d9a30631becc193cb7561294354a779ffc62bd61e807b1f540f01ce095e8ae4ad77adf2ea135389143809c9d48
 SHA512 
40098661bf00b64ad2d773b242613c44fe269b5ae984ad8990f85ce705b27138b127493c507103052fb6705d52f2e63a1df6692c7024d43c3c6b18154f2ef407
 DIST postgresql-9.3.21.tar.bz2 17014472 BLAKE2B 
7735e7150c0418f979110cef083235959d22f4b63756cf76b9715862cc409b89f51b3e49bad9a33771b4df3ed39c515cf356c2ed69b77a3c7cb8d3448c83a024
 SHA512 
4c34ddf140a28b7095f8853f85c85cdc4ac44e4e5062ef66542c3082ada8509a201e0037e75d880e7909e1b41d0e3577713ad981cea8e693fb87644a0dce9929
+DIST postgresql-9.4.10.tar.bz2 17802812 BLAKE2B 
6f93a348ef51979b02c096d2c8fe980ce00e9fd1f9cf0766f3b06fa1ba9f52a146cffc205e7708c7bd16e0686486b21118734f4a1cd9823837abeee2e6fc9175
 SHA512 
2fcf47769b22c69bc82c9d6edc317e18dfcb4a96534e012bae4355e5088afa83da98b21e08a07766794f0a166888acbd16705a806464ea11711ed97c3b4012fb
 DIST postgresql-9.4.15.tar.bz2 17921677 BLAKE2B 
a41c81c7acc92265a6558c26370ff2afd258922a7158bbf40f8b1d6c7a3dbfb548502f42d646c96982dd5a87e5991f9d03046ae91e216704b97691666966d795
 SHA512 

[gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/, dev-db/postgresql/files/

2018-02-10 Thread Aaron Swenson
commit: 6ebb3a4c11363430d484406efbfd63b479d97ce7
Author: Aaron W. Swenson  gentoo  org>
AuthorDate: Sat Feb 10 18:38:22 2018 +
Commit: Aaron Swenson  gentoo  org>
CommitDate: Sat Feb 10 18:38:22 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ebb3a4c

dev-db/postgresql: Update 10.2 no-server patch

Closes: https://bugs.gentoo.org/647218
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 .../files/postgresql-10.2-no-server.patch  | 147 +
 dev-db/postgresql/postgresql-10.2.ebuild   |   2 +-
 2 files changed, 148 insertions(+), 1 deletion(-)

diff --git a/dev-db/postgresql/files/postgresql-10.2-no-server.patch 
b/dev-db/postgresql/files/postgresql-10.2-no-server.patch
new file mode 100644
index 000..02ab4d712ff
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-10.2-no-server.patch
@@ -0,0 +1,147 @@
+diff -Naruw a/contrib/Makefile b/contrib/Makefile
+--- a/contrib/Makefile
 b/contrib/Makefile
+@@ -5,57 +5,9 @@
+ include $(top_builddir)/src/Makefile.global
+ 
+ SUBDIRS = \
+-  adminpack   \
+-  amcheck \
+-  auth_delay  \
+-  auto_explain\
+-  bloom   \
+-  btree_gin   \
+-  btree_gist  \
+-  chkpass \
+-  citext  \
+-  cube\
+-  dblink  \
+-  dict_int\
+-  dict_xsyn   \
+-  earthdistance   \
+-  file_fdw\
+-  fuzzystrmatch   \
+-  hstore  \
+-  intagg  \
+-  intarray\
+-  isn \
+-  lo  \
+-  ltree   \
+   oid2name\
+-  pageinspect \
+-  passwordcheck   \
+-  pg_buffercache  \
+-  pg_freespacemap \
+-  pg_prewarm  \
+-  pg_standby  \
+-  pg_stat_statements \
+-  pg_trgm \
+-  pgcrypto\
+-  pgrowlocks  \
+-  pgstattuple \
+-  pg_visibility   \
+-  postgres_fdw\
+-  seg \
+-  spi \
+-  tablefunc   \
+-  tcn \
+-  test_decoding   \
+-  tsm_system_rows \
+-  tsm_system_time \
+-  unaccent\
+   vacuumlo
+ 
+-ifeq ($(with_openssl),yes)
+-SUBDIRS += sslinfo
+-else
+-ALWAYS_SUBDIRS += sslinfo
+-endif
+ 
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+diff -Naruw a/src/backend/Makefile b/src/backend/Makefile
+--- a/src/backend/Makefile
 b/src/backend/Makefile
+@@ -51,7 +51,7 @@
+ 
+ ##
+ 
+-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP)
++all: generated-headers
+ 
+ ifneq ($(PORTNAME), cygwin)
+ ifneq ($(PORTNAME), win32)
+@@ -226,23 +226,7 @@
+ 
+ ##
+ 
+-install: all installdirs install-bin
+-ifeq ($(PORTNAME), cygwin)
+-ifeq ($(MAKE_DLL), true)
+-  $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-ifeq ($(PORTNAME), win32)
+-ifeq ($(MAKE_DLL), true)
+-  $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-  $(MAKE) -C catalog install-data
+-  $(MAKE) -C tsearch install-data
+-  $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample 
'$(DESTDIR)$(datadir)/pg_hba.conf.sample'
+-  $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample 
'$(DESTDIR)$(datadir)/pg_ident.conf.sample'
+-  $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample 
'$(DESTDIR)$(datadir)/postgresql.conf.sample'
+-  $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample 
'$(DESTDIR)$(datadir)/recovery.conf.sample'
++install:
+ 
+ install-bin: postgres $(POSTGRES_IMP) installdirs
+   $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
+diff -Naruw a/src/bin/Makefile b/src/bin/Makefile
+--- a/src/bin/Makefile
 b/src/bin/Makefile
+@@ -14,19 +14,8 @@
+ include $(top_builddir)/src/Makefile.global
+ 
+ SUBDIRS = \
+-  initdb \
+-  pg_archivecleanup \
+-  pg_basebackup \
+   pg_config \
+-  pg_controldata \
+-  pg_ctl \
+   pg_dump \
+-  pg_resetwal \
+-  pg_rewind \
+-  pg_test_fsync \
+-  pg_test_timing \
+-  pg_upgrade \
+-  pg_waldump \
+   pgbench \
+   psql \
+   scripts
+diff -Naruw a/src/Makefile b/src/Makefile
+--- a/src/Makefile
 b/src/Makefile
+@@ -15,21 +15,12 @@
+ SUBDIRS = \
+   common \
+   port \
+-  timezone \
+   backend \
+-  backend/utils/mb/conversion_procs \
+-  backend/snowball \
+   

[gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/, dev-db/postgresql/files/

2017-10-07 Thread Aaron Swenson
commit: 9d489165499bc17cf58f7872b13327b160355af3
Author: Aaron W. Swenson  gentoo  org>
AuthorDate: Sat Oct  7 20:19:36 2017 +
Commit: Aaron Swenson  gentoo  org>
CommitDate: Sat Oct  7 20:20:15 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d489165

dev-db/postgresql: Improved systemd support

Now multiple slots can run simultaneously. Thank you Evert.

Bump live ebuild EAPI to 6 and switched to git-r3 eclass.

Gentoo-Bug: https://bugs.gentoo.org/632496
Package-Manager: Portage-2.3.8, Repoman-2.3.3

 dev-db/postgresql/files/postgresql.service-9.2 |  51 
 dev-db/postgresql/files/postgresql.service-9.6-r1  |  52 
 dev-db/postgresql/files/postgresql.tmpfiles|   1 +
 ...resql-.ebuild => postgresql-10.0-r1.ebuild} | 271 +++--
 ...sql-.ebuild => postgresql-9.2.23-r1.ebuild} | 228 -
 ...sql-.ebuild => postgresql-9.3.19-r1.ebuild} | 223 -
 ...sql-.ebuild => postgresql-9.4.14-r1.ebuild} | 259 +++-
 ...esql-.ebuild => postgresql-9.5.9-r1.ebuild} | 263 +++-
 ...esql-.ebuild => postgresql-9.6.5-r1.ebuild} | 248 +++
 dev-db/postgresql/postgresql-.ebuild   |  19 +-
 10 files changed, 932 insertions(+), 683 deletions(-)

diff --git a/dev-db/postgresql/files/postgresql.service-9.2 
b/dev-db/postgresql/files/postgresql.service-9.2
new file mode 100644
index 000..20ed27a10f2
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql.service-9.2
@@ -0,0 +1,51 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create file
+# "/etc/systemd/system/postgresql-@SLOT@.service.d/*.conf"
+# containing your changes
+
+# For example, if you want to change the server's port number to 5433,
+# create a file named
+# "/etc/systemd/system/postgresql-@SLOT@.service.d/port.conf"
+# containing:
+#   [Service]
+#   Environment=PGPORT=5433
+# This will override the setting appearing below.
+
+[Unit]
+Description=PostgreSQL database server
+After=network.target
+
+[Service]
+Type=forking
+
+User=postgres
+Group=postgres
+
+# Port number for server to listen on
+Environment=PGPORT=5432
+
+# Location of configuration files
+Environment=PGDATA=/etc/postgresql-@SLOT@
+
+# Where the data directory is located
+Environment=DATA_DIR=/var/lib/postgresql/@SLOT@/data
+
+# Where to send early-startup messages from the server (before the logging
+# options of postgresql.conf take effect)
+# This is normally controlled by the global default set by systemd
+# StandardOutput=syslog
+
+ExecStartPre=/usr/bin/postgresql-@SLOT@-check-db-dir
+ExecStart=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl start -D ${DATA_DIR} -s 
-l ${DATA_DIR}/postmaster.log -o "-p ${PGPORT} -D ${PGDATA} 
--data-directory=${DATA_DIR}" -w -t 300
+ExecStop=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl stop -D ${DATA_DIR} -s -m 
fast
+ExecReload=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl reload -D ${DATA_DIR} -s
+
+# Give a reasonable amount of time for the server to start up/shut down
+TimeoutSec=300
+
+# Disable OOM kill on the postmaster
+OOMScoreAdjust=-1000
+
+[Install]
+WantedBy=multi-user.target

diff --git a/dev-db/postgresql/files/postgresql.service-9.6-r1 
b/dev-db/postgresql/files/postgresql.service-9.6-r1
new file mode 100644
index 000..3b92e851f29
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql.service-9.6-r1
@@ -0,0 +1,52 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create file
+# "/etc/systemd/system/postgresql-@SLOT@.service.d/*.conf"
+# containing your changes
+
+# For example, if you want to change the server's port number to 5433,
+# create a file named
+# "/etc/systemd/system/postgresql-@SLOT@.service.d/port.conf"
+# containing:
+#   [Service]
+#   Environment=PGPORT=5433
+# This will override the setting appearing below.
+
+[Unit]
+Description=PostgreSQL database server
+After=network.target
+
+[Service]
+Type=notify
+
+User=postgres
+Group=postgres
+
+# Port number for server to listen on
+Environment=PGPORT=5432
+
+# Location of configuration files
+Environment=PGDATA=/etc/postgresql-@SLOT@
+
+# Where the data directory is located
+Environment=DATA_DIR=/var/lib/postgresql/@SLOT@/data
+
+# Where to send early-startup messages from the server (before the logging
+# options of postgresql.conf take effect)
+# This is normally controlled by the global default set by systemd
+# StandardOutput=syslog
+
+ExecStartPre=/usr/bin/postgresql-@SLOT@-check-db-dir
+ExecStart=/usr/@LIBDIR@/postgresql-@SLOT@/bin/postgres -p ${PGPORT} -D 
${DATA_DIR}
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=mixed
+KillSignal=SIGINT
+
+# Give a reasonable amount of time for the server to start up/shut down
+TimeoutSec=300
+
+# Disable OOM kill on 

[gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/, dev-db/postgresql/files/

2017-08-10 Thread Aaron Swenson
commit: 8475b7b1352af134678fe0280d97478a8e713013
Author: Aaron W. Swenson  gentoo  org>
AuthorDate: Thu Aug 10 15:03:21 2017 +
Commit: Aaron Swenson  gentoo  org>
CommitDate: Thu Aug 10 15:03:21 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8475b7b1

dev-db/postgresql: Security Version Bump

Security releases:
  9.2.22
  9.3.18
  9.4.13
  9.5.8
  9.6.4

Version bump:
  10_beta3

Three security vulnerabilities have been closed by this release:
 * CVE-2017-7546: Empty password accepted in some authentication methods
 * CVE-2017-7547: The "pg_user_mappings" catalog view discloses passwords
  to users lacking server privileges
 * CVE-2017-7548: lo_put() function ignores ACLs

Full release notes at: https://www.postgresql.org/about/news/1772/

Gentoo-Bug: 627462

Package-Manager: Portage-2.3.6, Repoman-2.3.1

 dev-db/postgresql/Manifest |   6 +
 .../files/postgresql-9.6.3-no-server.patch | 145 ++
 dev-db/postgresql/postgresql-10_beta3.ebuild   | 464 +++
 dev-db/postgresql/postgresql-9.2.22.ebuild | 445 ++
 dev-db/postgresql/postgresql-9.3.18.ebuild | 450 +++
 dev-db/postgresql/postgresql-9.4.13.ebuild | 482 
 dev-db/postgresql/postgresql-9.5.8.ebuild  | 488 
 dev-db/postgresql/postgresql-9.6.4.ebuild  | 495 +
 8 files changed, 2975 insertions(+)

diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index e6c7f829533..8fe58158126 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -1,17 +1,23 @@
 DIST postgresql-10beta2.tar.bz2 19790809 SHA256 
0d6b50236039fc92e8784bd908b452c38ef63c0f9029f34e7115fbc30e17b195 SHA512 
58abb8e38252ddf50d975588c9d43bf28d1169b499d068ace9324c6380ac1916975ca9a9a708dffb499e333e8b85c381efe8821166e2071236d6c8c4498f97a0
 WHIRLPOOL 
920fbc7459f0f9a9a3b72200ab2a4042672f351dc5b63dc7b63e2fafe0a74838fff1da0d814c37d81d28dc07e85bd4f14330ac367df2fb61f1ed0f56927e2131
+DIST postgresql-10beta3.tar.bz2 19914123 SHA256 
6722546739f8e2dd379e8031784e86c5c588638df6c477046ebdd479586bcb3e SHA512 
cdbda1c17d58f2999ad71a208d6aa3b18b82bfc8f185eb4ce36496b27ae23bca03f76925e4b242a4c3c2eec96ca0b135e696f55b59282b208ecfe7f8b642f24f
 WHIRLPOOL 
5db99df6c8d0b455a3e6c8d4a734be52bb5dc6b3225cb0f3d547ea22e87e4eae45709667bad71bc1fe8e7f024345c1b9e186b07faf9c23a9db046c9bfc01e8af
 DIST postgresql-9.1.24.tar.bz2 15863767 SHA256 
de0d84e9f32af145fcd66d8d324f6ef1a0b17944ea344b7bbe9d99fff68ae5d3 SHA512 
a9ad0d62846598afee317eeda83406b5f85a658bfe7eb78aff6c59c904223dd165adbd5870598b74aa0e012878489f0c285e6ac7b07ebddf3cf8d81ba70bea7e
 WHIRLPOOL 
f58d79df5562c3fc22dae96ba064e19a4c83f42358911575f854cb2e062457f9331547cb19f9970003a2e15b7e8c609b9aab2a1e17099a446c89786581ccb13b
 DIST postgresql-9.2.19.tar.bz2 16466698 SHA256 
1d29d73a4f590fcc348280f13ac2ff6a0f72c94908c54e3c20b7ab1560e8dbad SHA512 
d3b4c5578bf6d6580028e775bff81a921258cb53b6b06567d96a352d14f3b63063adb480b2f5e2029baf8a034e14b5cd75eebc04f1ed7b16c849e1a5ec1f4867
 WHIRLPOOL 
c13b45fd7aee08ea472557c9f40d79c45abd572fefcc215002b562b8046b1937bf522f6f7f6e280ff1e434c9698734cda9f1c3dacd3c8fee5f33dad0da21f75f
 DIST postgresql-9.2.20.tar.bz2 16480653 SHA256 
0b8abdae8400cabea5587a726003c9dd71c73c049bdae523abc35f9312dd8f26 SHA512 
16f7861e0372481dbc5c69ac977bab46f592045f32951a245f3677121261640fcc169a75e730d592e36c15c9a120e7d0670bdabf121ad89d76a17535d0f9
 WHIRLPOOL 
af5005564056185fa240fd97bec862738f9951bb57082485beba3eacf5d8bf709c58d01f8bde656a391eee173d592d9cf792be87de04a09869aa3d82c8719320
 DIST postgresql-9.2.21.tar.bz2 16508040 SHA256 
0697e843523ee60c563f987f9c65bc4201294b18525d6e5e4b2c50c6d4058ef9 SHA512 
c548cd1ba34ad71dd3f1acde5775ba2e71121f004324fac44dbe123a91d599ced0f1b8be675ed07b77712e8c23f376ff6221349385c19a88c4edbbb186f17861
 WHIRLPOOL 
c46fd4909e2d534b98c8a97f0f5410ab40285c118517a36ee73d0e1234483144d1f58785a59df53fdbfab7c2876a60d000bf574dff0be3030f8c909509b1bfe6
+DIST postgresql-9.2.22.tar.bz2 16531224 SHA256 
a70e94fa58776b559a8f7b5301371ac4922c9e3ed313ccbef20862514de7c192 SHA512 
3e5ab04c2be2719579b2ebbf64b220522acfd9ea74029dd2ed699f60230da224bdc99de4ee5529b513e5586de0377764c4e54deb3dd93d5c53c4d666dce2b6b7
 WHIRLPOOL 
ff1817463b488f4793cd0851df846b961d5510b7c1cf4a560717755ca47c363eb782bc1f2cd7a5d8cbc49727dea64394c6b30038105fc584749157157948964d
 DIST postgresql-9.3.15.tar.bz2 17059932 SHA256 
a9fcba1446a93aa95e3e1b6535756f0472d10b0f267a0845f8b2b29f89de5c4f SHA512 
35c30cdb5599f99c94ab921f9f5e7671a8c0b7bca8fe3b616630ae13d6eda8d329e77e7e802da6a83cb09c3c9ca10fa8ce0de8a184e6fff471130e1cd68ce762
 WHIRLPOOL 
7a627b2da1dc3671df7edfe58420f81ce24202c1251225054674d79e431bc36e1a70c84aaacb76c59e9eefb26429cbbb9ea80c45a989e3564b69e334d3dd4d84
 DIST postgresql-9.3.16.tar.bz2 17108969 SHA256 
845f5e4ac8cf026b6a77c5a180a2fe869f51e9d06acf8d0365b05505a2c66873 SHA512 

[gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/, dev-db/postgresql/files/

2016-10-28 Thread Aaron Swenson
commit: d10f1bdd33c918e33ce8a69c6214810a1cb31d04
Author: Aaron W. Swenson  gentoo  org>
AuthorDate: Fri Oct 28 16:15:05 2016 +
Commit: Aaron Swenson  gentoo  org>
CommitDate: Fri Oct 28 16:15:47 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d10f1bdd

dev-db/postgresql: Fix broken/improve no-server patches

9.4 and 9.5 had a small change to a section that is modified by the
patch, thus causing failure.

Further, pgbench was added back in as it is a client program that does
not need the server to be on the same machine.

Lastly, the 9.6 no-server patch was incomplete and allowed the entire
backend to be built when only the headers are needed…theoretically.

Package-Manager: portage-2.2.28

 .../files/postgresql-9.4.10-no-server.patch| 151 +
 .../files/postgresql-9.5.5-no-server.patch | 151 +
 .../files/postgresql-9.6.1-no-server.patch | 130 ++
 dev-db/postgresql/postgresql-9.4.10.ebuild |   2 +-
 dev-db/postgresql/postgresql-9.5.5.ebuild  |   2 +-
 ...sql-9.5.5.ebuild => postgresql-9.6.1-r1.ebuild} |  13 +-
 6 files changed, 439 insertions(+), 10 deletions(-)

diff --git a/dev-db/postgresql/files/postgresql-9.4.10-no-server.patch 
b/dev-db/postgresql/files/postgresql-9.4.10-no-server.patch
new file mode 100644
index ..81fc383
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-9.4.10-no-server.patch
@@ -0,0 +1,151 @@
+diff -Naruw a/contrib/Makefile b/contrib/Makefile
+--- a/contrib/Makefile 2016-10-24 16:12:53.0 -0400
 b/contrib/Makefile 2016-10-27 13:38:23.361545396 -0400
+@@ -5,64 +5,10 @@
+ include $(top_builddir)/src/Makefile.global
+ 
+ SUBDIRS = \
+-  adminpack   \
+-  auth_delay  \
+-  auto_explain\
+-  btree_gin   \
+-  btree_gist  \
+-  chkpass \
+-  citext  \
+-  cube\
+-  dblink  \
+-  dict_int\
+-  dict_xsyn   \
+-  dummy_seclabel  \
+-  earthdistance   \
+-  file_fdw\
+-  fuzzystrmatch   \
+-  hstore  \
+-  intagg  \
+-  intarray\
+-  isn \
+-  lo  \
+-  ltree   \
+   oid2name\
+-  pageinspect \
+-  passwordcheck   \
+-  pg_archivecleanup \
+-  pg_buffercache  \
+-  pg_freespacemap \
+-  pg_prewarm  \
+-  pg_standby  \
+-  pg_stat_statements \
+-  pg_test_fsync   \
+-  pg_test_timing  \
+-  pg_trgm \
+-  pg_upgrade  \
+-  pg_upgrade_support \
+   pgbench \
+-  pgcrypto\
+-  pgrowlocks  \
+-  pgstattuple \
+-  pg_xlogdump \
+-  postgres_fdw\
+-  seg \
+-  spi \
+-  tablefunc   \
+-  tcn \
+-  test_decoding   \
+-  test_parser \
+-  test_shm_mq \
+-  tsearch2\
+-  unaccent\
+-  vacuumlo\
+-  worker_spi
++  vacuumlo
+ 
+-ifeq ($(with_openssl),yes)
+-SUBDIRS += sslinfo
+-else
+-ALWAYS_SUBDIRS += sslinfo
+-endif
+ 
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+diff -Naruw a/src/backend/Makefile b/src/backend/Makefile
+--- a/src/backend/Makefile 2016-10-24 16:12:53.0 -0400
 b/src/backend/Makefile 2016-10-27 14:04:47.617000374 -0400
+@@ -47,7 +47,7 @@
+ 
+ ##
+ 
+-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP)
++all: someheaders
+ 
+ ifneq ($(PORTNAME), cygwin)
+ ifneq ($(PORTNAME), win32)
+@@ -106,7 +106,7 @@
+ endif # aix
+ 
+ # Update the commonly used headers before building the subdirectories
+-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h 
$(top_builddir)/src/include/catalog/schemapg.h 
$(top_builddir)/src/include/utils/fmgroids.h 
$(top_builddir)/src/include/utils/errcodes.h 
$(top_builddir)/src/include/utils/probes.h
++someheaders $(SUBDIRS:%=%-recursive): 
$(top_builddir)/src/include/parser/gram.h 
$(top_builddir)/src/include/catalog/schemapg.h 
$(top_builddir)/src/include/utils/fmgroids.h 
$(top_builddir)/src/include/utils/errcodes.h 
$(top_builddir)/src/include/utils/probes.h
+ 
+ # run this unconditionally to avoid needing to know its dependencies here:
+ submake-schemapg:
+@@ -199,23 +199,7 @@
+ 
+ ##
+ 
+-install: all installdirs 

[gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/, dev-db/postgresql/files/

2015-09-06 Thread Aaron Swenson
commit: 04d5d28232bd930c7ec478580bd4106055304804
Author: Aaron W. Swenson  gentoo  org>
AuthorDate: Sun Sep  6 12:47:42 2015 +
Commit: Aaron Swenson  gentoo  org>
CommitDate: Sun Sep  6 12:47:42 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04d5d282

dev-db/postgresql: Fix Bug 555198

Add patch to correct typo in Alpha architecture specific assembly code.

Package-Manager: portage-2.2.20.1

 ...tgresql-9.4-alpha-fix-read-memory-barrier.patch |  13 +
 dev-db/postgresql/postgresql-9.4.4-r1.ebuild   | 422 +
 2 files changed, 435 insertions(+)

diff --git 
a/dev-db/postgresql/files/postgresql-9.4-alpha-fix-read-memory-barrier.patch 
b/dev-db/postgresql/files/postgresql-9.4-alpha-fix-read-memory-barrier.patch
new file mode 100644
index 000..0ab7242
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-9.4-alpha-fix-read-memory-barrier.patch
@@ -0,0 +1,13 @@
+Index: postgresql-9.4-9.4~beta2/src/include/storage/barrier.h
+===
+--- postgresql-9.4-9.4~beta2.orig/src/include/storage/barrier.h
 postgresql-9.4-9.4~beta2/src/include/storage/barrier.h
+@@ -117,7 +117,7 @@ extern slock_t dummy_spinlock;
+  * read barrier to cover that case.  We might need to add that later.
+  */
+ #define pg_memory_barrier()   __asm__ __volatile__ ("mb" : : : 
"memory")
+-#define pg_read_barrier() __asm__ __volatile__ ("rmb" : : : 
"memory")
++#define pg_read_barrier() __asm__ __volatile__ ("mb" : : : 
"memory")
+ #define pg_write_barrier()__asm__ __volatile__ ("wmb" : : : 
"memory")
+ #elif defined(__hppa) || defined(__hppa__)/* HP PA-RISC */
+ 

diff --git a/dev-db/postgresql/postgresql-9.4.4-r1.ebuild 
b/dev-db/postgresql/postgresql-9.4.4-r1.ebuild
new file mode 100644
index 000..2514f43
--- /dev/null
+++ b/dev-db/postgresql/postgresql-9.4.4-r1.ebuild
@@ -0,0 +1,422 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} )
+
+inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
+   systemd user versionator
+
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc 
~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
+
+SLOT="$(get_version_component_range 1-2)"
+
+SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="http://www.postgresql.org/;
+
+LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr
+zh_CN zh_TW"
+IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python
+ +readline selinux +server ssl static-libs tcl threads uuid xml zlib"
+
+for lingua in ${LINGUAS}; do
+   IUSE+=" linguas_${lingua}"
+done
+
+wanted_languages() {
+   local enable_langs
+
+   for lingua in ${LINGUAS} ; do
+   use linguas_${lingua} && enable_langs+="${lingua} "
+   done
+
+   echo -n ${enable_langs}
+}
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-1.2.0
+sys-apps/less
+virtual/libintl
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+pam? ( virtual/pam )
+perl? ( >=dev-lang/perl-5.8 )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+tcl? ( >=dev-lang/tcl-8:0= )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
+# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
+# the libc includes UUID functions.
+UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
+BSD_LIBC=( elibc_{Free,Net,Open}BSD )
+
+nest_usedep() {
+   local front back
+   while [[ ${#} -gt 1 ]]; do
+   front+="${1}? ( "
+   back+=" )"
+   shift
+   done
+   echo "${front}${1}${back}"
+}
+
+IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
+CDEPEND+="
+uuid? (
+   ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
+   $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} 
dev-libs/ossp-uuid)
+)"
+
+DEPEND="${CDEPEND}
+!! \
+   "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
+
+   use static-libs || find "${ED}" -name '*.a' -delete
+
+   if use doc ; then
+   docinto html
+   dodoc doc/src/sgml/html/*
+
+   docinto sgml
+   dodoc doc/src/sgml/*.{sgml,dsl}
+   fi
+
+   if use server; then
+   sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+   "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT}
+
+   sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+   "${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT}
+
+   sed -e