summaryrefslogtreecommitdiff
path: root/dev-db/postgresql
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-20 14:54:46 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-20 14:54:46 -0500
commit1a4479b4e0368c8d5ff241ebad17b2541a7e3ba0 (patch)
tree18e2e784f9fb0dbc3546537acc42ad51b366d90e /dev-db/postgresql
parent9f6a581d94412ab1cf4b35c33101f6be0ddc7777 (diff)
downloadbaldeagleos-repo-1a4479b4e0368c8d5ff241ebad17b2541a7e3ba0.tar.gz
baldeagleos-repo-1a4479b4e0368c8d5ff241ebad17b2541a7e3ba0.tar.xz
baldeagleos-repo-1a4479b4e0368c8d5ff241ebad17b2541a7e3ba0.zip
Adding metadata
Diffstat (limited to 'dev-db/postgresql')
-rw-r--r--dev-db/postgresql/Manifest6
-rw-r--r--dev-db/postgresql/files/postgresql-14.5-no-server.patch (renamed from dev-db/postgresql/files/postgresql-13_beta1-no-server.patch)33
-rw-r--r--dev-db/postgresql/files/postgresql-15_beta3-no-server.patch146
-rw-r--r--dev-db/postgresql/files/postgresql-17.0-no-server.patch146
-rw-r--r--dev-db/postgresql/files/postgresql-18.0-no-server.patch148
-rw-r--r--dev-db/postgresql/files/postgresql.service-9.251
-rw-r--r--dev-db/postgresql/metadata.xml31
-rw-r--r--dev-db/postgresql/postgresql-14.22.ebuild460
-rw-r--r--dev-db/postgresql/postgresql-14.23.ebuild85
-rw-r--r--dev-db/postgresql/postgresql-15.17.ebuild466
-rw-r--r--dev-db/postgresql/postgresql-15.18.ebuild57
-rw-r--r--dev-db/postgresql/postgresql-16.14.ebuild41
-rw-r--r--dev-db/postgresql/postgresql-17.10.ebuild64
-rw-r--r--dev-db/postgresql/postgresql-18.3.ebuild458
-rw-r--r--dev-db/postgresql/postgresql-18.4.ebuild77
-rw-r--r--dev-db/postgresql/postgresql-19_beta1.ebuild (renamed from dev-db/postgresql/postgresql-16.13.ebuild)74
-rw-r--r--dev-db/postgresql/postgresql-9999.ebuild (renamed from dev-db/postgresql/postgresql-17.9.ebuild)395
17 files changed, 915 insertions, 1823 deletions
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index 876c8b118ecd..0e02905c2b96 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -1,10 +1,6 @@
-DIST postgresql-14.22.tar.bz2 22534388 BLAKE2B 653bcc760b9b5e80a46438e992dab3923ea6870310e87ddd207a61388a77b37ab53c21c3978e8b2ade1f2bc5ac3216eb8d6630363b17866638a4798c200aca13 SHA512 b192189db081c0cb1d6dfba132dc3969a32a8990c69a0acf8f2c79b3fb1e865e727e6153ddd988c099021950cf7896c6619a7a12d83ca22765bf2736f67d66f5
DIST postgresql-14.23.tar.bz2 22586931 BLAKE2B 97700439c4d6c94344be70aede691bd88ac40e2aaeb0b9ee05882cc62bb2dc36fc459964f5a68307ceb7d61020a840aa43f6c41755c012a3f74f2035b7db77c8 SHA512 09a534a0937593c9a0fefbe69f3cd57692e62d38c311c6c63e02edd57c289d73d4aa1a492f23d9eeffde636773c5212d9b2f1d18cc8e459f9c73ce74022b1280
-DIST postgresql-15.17.tar.bz2 23357238 BLAKE2B 1b06a4e6287c43b70c1d7d4eab91a113eb1c1a931b3bb49cdf3f14130a9aba0711c7e19656951e3e9d64f6bd30d87fa8a31d3b1f8d3d22eaf74fb69f9589c761 SHA512 032f27f4028ee8be10f7540edd0174b5e354a2a38f4f228414539178d1bbc542c4b9c599e376685fa9de78a2d918b9ce74997908e7e5c0204b3da88bc4661e2b
DIST postgresql-15.18.tar.bz2 23405115 BLAKE2B a0748176b7410c9ffd01ad812a3d71a08082771140175f867282aa1474ccfa2b8f81129154b9263baa3ed7a1e4f609a399f5be8561ae169497495ff042b903b9 SHA512 01f6ff71dcc24d5c2240a53ac2d70c64fadf143ea46134a3c5af1c367857edca38c88b09d5903b5e679dd6139c3b21e1041e1bada0b6ba691a82ec3b854fd2d5
-DIST postgresql-16.13.tar.bz2 25051306 BLAKE2B 31fa29db787ab5dd980b771325ed575044804fc927df8e6602b63192cf8e2985b7b1c4a1b10a03fc4e29a2e26d4567957e15313e1839b18d11e06d8a4d84ed93 SHA512 3ea11b81ce55be5c3c169f0c94ddfa9debae6b3cbe7407086ba3a602fad7668900c2838d4d4488c671b2ccc670a9cd288ece90e42ecf8de953df6b4e103d286d
DIST postgresql-16.14.tar.bz2 25106859 BLAKE2B 6380328f5f66a6040da1e7d0f38868aae885ec08c44d0475a02c80d2917637c70db58b4ab41fed278d592df715e28ae18fb801d1b750254b4ae4b8ac3350a323 SHA512 ba2f943aa29a9473986aedd617b5884f61a4f28984e807b1f5cb4a7bd82f62856419b23bd020cbdeb4e572b4cabe8038a6dc9fd83e2a4cbccc9c11872504d210
DIST postgresql-17.10.tar.bz2 21664720 BLAKE2B dd45179a902941c3f8244904e9c0c6a8a90149b96a31ff7df85665ed15bcd952a71497a549a11b79bbe53d2dfd0d0652d5b59d1213958d9ba5e60b6149a938b3 SHA512 1a7ea39efe5d42acd5f4edda50c418515b6c9032d92cd38c55181106ca5808b17f66ffe673f97002698c93cfb555a47ee450f9e471cb245c5ca44bc742a6a081
-DIST postgresql-17.9.tar.bz2 21648916 BLAKE2B e5deeed82f710b38ed959a2f873e8ac0c27fc68b2ced22f70e9e89a34e473e1368231328351d300e617e61554cce68a8cec3731e6d3b31c620f93a2b2672470d SHA512 2b9c9ca9d765704895ec4af4107accead2ba3f3ce8bc87eed29fd020cf97b53a49a7d3eb9fa1242a7c430fe2f7e1be726f1ad67557ded2fe8b31b9d8fe659fbf
-DIST postgresql-18.3.tar.bz2 22497924 BLAKE2B b5d07158c25b1de80211cfdc9a20924f2249ffc45ca1daee1cc25d813922d39576057c360167da248350aa310d3ad5523eb6ed7b4a2b33215cba9b1eaf56d3f4 SHA512 fdbe6d726f46738cf14acab96e5c05f7d65aefe78563281b416bb14a27c7c42e4df921e26b32816a5030ddbe506b95767e2c74a35afc589916504df38d1cb11c
DIST postgresql-18.4.tar.bz2 22567173 BLAKE2B 18a2068eeda95b846613d6f3794ceaa11b70f86393ea2ff41710488c2fc40a2cbb857e1107c16d9d4bfd2d1dc0153c68f164db0bca7ede816a06b436c2edeac4 SHA512 1a7606b5b2460a4fc817d491e1e03262df17ece6869fa3d2b80647baffcfb790fbcfa019c3b10fab9f9a14218651b6a358864e40a5d8c5ddc796db2d6e5b469c
+DIST postgresql-19beta1.tar.bz2 23377347 BLAKE2B 06f46e1576be4d970509278d7bb248b8258d4d95864dcc29f44173f320314b8e1de6601670ba85e7f7132cd08d00527efb783ff1f85ad325d8d39ef2b72f6396 SHA512 c3a8eb9ea4daad25cfd0b252df72c0b53ade2b480e2f239a800c097b66c23556231b9169b5edb0a80e0e5da81a6d691e39149ab33a33733fc84c9bfd8e3c37de
diff --git a/dev-db/postgresql/files/postgresql-13_beta1-no-server.patch b/dev-db/postgresql/files/postgresql-14.5-no-server.patch
index ceb0e3a61d25..87bd89b68f19 100644
--- a/dev-db/postgresql/files/postgresql-13_beta1-no-server.patch
+++ b/dev-db/postgresql/files/postgresql-14.5-no-server.patch
@@ -1,7 +1,6 @@
-diff -Naruw postgresql-13beta1.orig/contrib/Makefile postgresql-13beta1/contrib/Makefile
---- postgresql-13beta1.orig/contrib/Makefile 2020-05-18 16:09:19.000000000 -0400
-+++ postgresql-13beta1/contrib/Makefile 2020-05-22 19:56:42.560113731 -0400
-@@ -5,56 +5,9 @@
+--- a/contrib/Makefile
++++ b/contrib/Makefile
+@@ -5,57 +5,9 @@
include $(top_builddir)/src/Makefile.global
SUBDIRS = \
@@ -27,13 +26,14 @@ diff -Naruw postgresql-13beta1.orig/contrib/Makefile postgresql-13beta1/contrib/
- lo \
- ltree \
oid2name \
+- old_snapshot \
- pageinspect \
- passwordcheck \
- pg_buffercache \
- pg_freespacemap \
- pg_prewarm \
-- pg_standby \
- pg_stat_statements \
+- pg_surgery \
- pg_trgm \
- pgcrypto \
- pgrowlocks \
@@ -50,7 +50,7 @@ diff -Naruw postgresql-13beta1.orig/contrib/Makefile postgresql-13beta1/contrib/
- unaccent \
vacuumlo
--ifeq ($(with_openssl),yes)
+-ifeq ($(with_ssl),openssl)
-SUBDIRS += sslinfo
-else
-ALWAYS_SUBDIRS += sslinfo
@@ -58,9 +58,8 @@ diff -Naruw postgresql-13beta1.orig/contrib/Makefile postgresql-13beta1/contrib/
ifneq ($(with_uuid),no)
SUBDIRS += uuid-ossp
-diff -Naruw postgresql-13beta1.orig/src/backend/Makefile postgresql-13beta1/src/backend/Makefile
---- postgresql-13beta1.orig/src/backend/Makefile 2020-05-18 16:09:19.000000000 -0400
-+++ postgresql-13beta1/src/backend/Makefile 2020-05-22 19:58:14.403299909 -0400
+--- a/src/backend/Makefile
++++ b/src/backend/Makefile
@@ -56,7 +56,7 @@
##########################################################################
@@ -70,7 +69,7 @@ diff -Naruw postgresql-13beta1.orig/src/backend/Makefile postgresql-13beta1/src/
ifneq ($(PORTNAME), cygwin)
ifneq ($(PORTNAME), win32)
-@@ -195,23 +195,7 @@
+@@ -194,23 +194,7 @@
##########################################################################
@@ -95,14 +94,14 @@ diff -Naruw postgresql-13beta1.orig/src/backend/Makefile postgresql-13beta1/src/
ifeq ($(with_llvm), yes)
install-bin: install-postgres-bitcode
-diff -Naruw postgresql-13beta1.orig/src/bin/Makefile postgresql-13beta1/src/bin/Makefile
---- postgresql-13beta1.orig/src/bin/Makefile 2020-05-18 16:09:19.000000000 -0400
-+++ postgresql-13beta1/src/bin/Makefile 2020-05-22 19:59:11.399875256 -0400
+--- a/src/bin/Makefile
++++ b/src/bin/Makefile
@@ -14,22 +14,8 @@
include $(top_builddir)/src/Makefile.global
SUBDIRS = \
- initdb \
+- pg_amcheck \
- pg_archivecleanup \
- pg_basebackup \
- pg_checksums \
@@ -117,13 +116,11 @@ diff -Naruw postgresql-13beta1.orig/src/bin/Makefile postgresql-13beta1/src/bin/
- pg_upgrade \
- pg_verifybackup \
- pg_waldump \
-- pgbench \
+ pgbench \
psql \
scripts
-
-diff -Naruw postgresql-13beta1.orig/src/Makefile postgresql-13beta1/src/Makefile
---- postgresql-13beta1.orig/src/Makefile 2020-05-18 16:09:19.000000000 -0400
-+++ postgresql-13beta1/src/Makefile 2020-05-22 19:59:59.656464613 -0400
+--- a/src/Makefile
++++ b/src/Makefile
@@ -15,21 +15,12 @@
SUBDIRS = \
common \
diff --git a/dev-db/postgresql/files/postgresql-15_beta3-no-server.patch b/dev-db/postgresql/files/postgresql-15_beta3-no-server.patch
new file mode 100644
index 000000000000..9ada0a71d5a0
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-15_beta3-no-server.patch
@@ -0,0 +1,146 @@
+--- a/contrib/Makefile
++++ b/contrib/Makefile
+@@ -5,59 +5,9 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- adminpack \
+- amcheck \
+- auth_delay \
+- auto_explain \
+- basic_archive \
+- basebackup_to_shell \
+- 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 \
+- pgrowlocks \
+- pgstattuple \
+- pg_visibility \
+- pg_walinspect \
+- postgres_fdw \
+- seg \
+- spi \
+- tablefunc \
+- tcn \
+- test_decoding \
+- tsm_system_rows \
+- tsm_system_time \
+- unaccent \
+ vacuumlo
+
+-ifeq ($(with_ssl),openssl)
+-SUBDIRS += pgcrypto sslinfo
+-else
+-ALWAYS_SUBDIRS += pgcrypto sslinfo
+-endif
+
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+--- a/src/backend/Makefile
++++ b/src/backend/Makefile
+@@ -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
+--- a/src/bin/Makefile
++++ b/src/bin/Makefile
+@@ -14,22 +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
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -17,19 +17,11 @@
+ port \
+ timezone \
+ backend \
+- backend/utils/mb/conversion_procs \
+- backend/snowball \
+ include \
+ interfaces \
+- backend/replication/libpqwalreceiver \
+- backend/replication/pgoutput \
+ fe_utils \
+ bin \
+- pl \
+- makefiles \
+- test/regress \
+- test/isolation \
+- test/perl
++ makefiles
+
+ ifeq ($(with_llvm), yes)
+ SUBDIRS += backend/jit/llvm
diff --git a/dev-db/postgresql/files/postgresql-17.0-no-server.patch b/dev-db/postgresql/files/postgresql-17.0-no-server.patch
new file mode 100644
index 000000000000..a32ca2dbe448
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-17.0-no-server.patch
@@ -0,0 +1,146 @@
+--- a/contrib/Makefile
++++ b/contrib/Makefile
+@@ -5,57 +5,9 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- amcheck \
+- auth_delay \
+- auto_explain \
+- basic_archive \
+- basebackup_to_shell \
+- 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_stat_statements \
+- pg_surgery \
+- pg_trgm \
+- pgrowlocks \
+- pgstattuple \
+- pg_visibility \
+- pg_walinspect \
+- postgres_fdw \
+- seg \
+- spi \
+- tablefunc \
+- tcn \
+- test_decoding \
+- tsm_system_rows \
+- tsm_system_time \
+- unaccent \
+ vacuumlo
+
+-ifeq ($(with_ssl),openssl)
+-SUBDIRS += pgcrypto sslinfo
+-else
+-ALWAYS_SUBDIRS += pgcrypto sslinfo
+-endif
+
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+--- a/src/backend/Makefile
++++ b/src/backend/Makefile
+@@ -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
+--- a/src/bin/Makefile
++++ b/src/bin/Makefile
+@@ -14,24 +14,8 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- initdb \
+- pg_amcheck \
+- pg_archivecleanup \
+- pg_basebackup \
+- pg_checksums \
+- pg_combinebackup \
+ pg_config \
+- pg_controldata \
+- pg_ctl \
+ pg_dump \
+- pg_resetwal \
+- pg_rewind \
+- pg_test_fsync \
+- pg_test_timing \
+- pg_upgrade \
+- pg_verifybackup \
+- pg_waldump \
+- pg_walsummary \
+ pgbench \
+ psql \
+ scripts
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -17,19 +17,11 @@
+ port \
+ timezone \
+ backend \
+- backend/utils/mb/conversion_procs \
+- backend/snowball \
+ include \
+ interfaces \
+- backend/replication/libpqwalreceiver \
+- backend/replication/pgoutput \
+ fe_utils \
+ bin \
+- pl \
+- makefiles \
+- test/regress \
+- test/isolation \
+- test/perl
++ makefiles
+
+ ifeq ($(with_llvm), yes)
+ SUBDIRS += backend/jit/llvm
diff --git a/dev-db/postgresql/files/postgresql-18.0-no-server.patch b/dev-db/postgresql/files/postgresql-18.0-no-server.patch
new file mode 100644
index 000000000000..6a63bc7de4db
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-18.0-no-server.patch
@@ -0,0 +1,148 @@
+--- a/contrib/Makefile
++++ b/contrib/Makefile
+@@ -5,59 +5,9 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- amcheck \
+- auth_delay \
+- auto_explain \
+- basic_archive \
+- basebackup_to_shell \
+- 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_logicalinspect \
+- pg_overexplain \
+- pg_prewarm \
+- pg_stat_statements \
+- pg_surgery \
+- pg_trgm \
+- pgrowlocks \
+- pgstattuple \
+- pg_visibility \
+- pg_walinspect \
+- postgres_fdw \
+- seg \
+- spi \
+- tablefunc \
+- tcn \
+- test_decoding \
+- tsm_system_rows \
+- tsm_system_time \
+- unaccent \
+ vacuumlo
+
+-ifeq ($(with_ssl),openssl)
+-SUBDIRS += pgcrypto sslinfo
+-else
+-ALWAYS_SUBDIRS += pgcrypto sslinfo
+-endif
+
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+--- a/src/backend/Makefile
++++ b/src/backend/Makefile
+@@ -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
+--- a/src/bin/Makefile
++++ b/src/bin/Makefile
+@@ -14,24 +14,8 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- initdb \
+- pg_amcheck \
+- pg_archivecleanup \
+- pg_basebackup \
+- pg_checksums \
+- pg_combinebackup \
+ pg_config \
+- pg_controldata \
+- pg_ctl \
+ pg_dump \
+- pg_resetwal \
+- pg_rewind \
+- pg_test_fsync \
+- pg_test_timing \
+- pg_upgrade \
+- pg_verifybackup \
+- pg_waldump \
+- pg_walsummary \
+ pgbench \
+ psql \
+ scripts
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -17,19 +17,11 @@
+ port \
+ timezone \
+ backend \
+- backend/utils/mb/conversion_procs \
+- backend/snowball \
+ include \
+ interfaces \
+- backend/replication/libpqwalreceiver \
+- backend/replication/pgoutput \
+ fe_utils \
+ bin \
+- pl \
+- makefiles \
+- test/regress \
+- test/isolation \
+- test/perl
++ makefiles
+
+ ifeq ($(with_llvm), yes)
+ SUBDIRS += backend/jit/llvm
diff --git a/dev-db/postgresql/files/postgresql.service-9.2 b/dev-db/postgresql/files/postgresql.service-9.2
deleted file mode 100644
index 20ed27a10f29..000000000000
--- a/dev-db/postgresql/files/postgresql.service-9.2
+++ /dev/null
@@ -1,51 +0,0 @@
-# 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/metadata.xml b/dev-db/postgresql/metadata.xml
index 1f34a4559e35..eeeaeb941a41 100644
--- a/dev-db/postgresql/metadata.xml
+++ b/dev-db/postgresql/metadata.xml
@@ -2,21 +2,30 @@
<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
- <email>dev@liguros.net</email>
- <name>Development</name>
- </maintainer>
- <maintainer type="project">
<email>pgsql-bugs@gentoo.org</email>
<name>PostgreSQL and Related Package Development</name>
</maintainer>
- <upstream>
- <remote-id type="cpe">cpe:/a:postgresql:postgresql</remote-id>
- </upstream>
<use>
- <flag name="llvm">Add support for llvm JIT engine</flag>
- <flag name="pg-legacytimestamp">Use double precision floating-point numbers instead of 64-bit integers for timestamp storage.</flag>
- <flag name="server">Disable to build and install the clients and libraries only.</flag>
- <flag name="uuid">Enable server side UUID generation (via <pkg>dev-libs/ossp-uuid</pkg>).</flag>
+ <flag name="llvm">
+ Add support for llvm JIT engine
+ </flag>
+ <flag name="numa">
+ Add support for NUMA
+ </flag>
+ <flag name="oauth">
+ Enable OAuth2 authentication support
+ </flag>
+ <flag name="server">
+ Disable to build and install the clients and libraries
+ only.
+ </flag>
+ <flag name="uring">
+ Build with support for <pkg>sys-libs/liburing</pkg> AIO backend
+ </flag>
+ <flag name="uuid">
+ Enable server side UUID generation (via
+ <pkg>dev-libs/ossp-uuid</pkg>).
+ </flag>
</use>
<origin>baldeagleos-repo</origin>
</pkgmetadata>
diff --git a/dev-db/postgresql/postgresql-14.22.ebuild b/dev-db/postgresql/postgresql-14.22.ebuild
deleted file mode 100644
index 34889769f0c3..000000000000
--- a/dev-db/postgresql/postgresql-14.22.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 2021-2026 Liguros Authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-LLVM_COMPAT=( {15..21} )
-LLVM_OPTIONAL=1
-
-inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
-
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT=$(ver_cut 1)
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc icu kerberos kernel_linux ldap llvm nls pam perl python +readline selinux +server systemd ssl static-libs tcl +threads uuid xml zlib"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-acct-group/postgres
-acct-user/postgres
-sys-apps/less
-virtual/libintl
-icu? ( dev-libs/icu:= )
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-llvm? (
- sys-devel/llvm:=
- sys-devel/clang:=
-)
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-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}
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-13_beta1-no-server.patch"
-
- if use pam ; then
- sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with icu) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with llvm) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls)
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- serverman=(
- initdb
- pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
- pg_{test_{fsync,timing},upgrade,waldump}
- post{gres,master}
- )
- for m in ${serverman[@]} ; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- # Make slot specific links to programs
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
- newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_postinst() {
- use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf
- postgresql-config update
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
-
- if [[ -n ${REPLACING_VERSIONS} ]] ; then
- ewarn "If your system is using 'pg_stat_statements' and you are running a"
- ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
- ewarn "the following command after upgrading:"
- ewarn
- ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
- fi
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
- mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
- chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- if ! use systemd; then
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- fi
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- elif use systemd; then
- einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
- # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
- local old_ctype=${LC_CTYPE}
- export LC_CTYPE=${LC_COLLATE}
- emake check
- export LC_CTYPE=${old_ctype}
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-14.23.ebuild b/dev-db/postgresql/postgresql-14.23.ebuild
index 34889769f0c3..c0386c0713ab 100644
--- a/dev-db/postgresql/postgresql-14.23.ebuild
+++ b/dev-db/postgresql/postgresql-14.23.ebuild
@@ -1,26 +1,27 @@
-# Copyright 2021-2026 Liguros Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
-LLVM_COMPAT=( {15..21} )
+LLVM_COMPAT=( {16..22} )
LLVM_OPTIONAL=1
-inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
+inherit dot-a flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
-SLOT=$(ver_cut 1)
MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
+S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
+SLOT=$(ver_cut 1)
+
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-IUSE="debug doc icu kerberos kernel_linux ldap llvm nls pam perl python +readline selinux +server systemd ssl static-libs tcl +threads uuid xml zlib"
+IUSE="debug doc icu kerberos ldap llvm +lz4 nls pam perl python +readline
+ selinux +server systemd ssl static-libs tcl uuid xml zlib"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@@ -32,30 +33,27 @@ sys-apps/less
virtual/libintl
icu? ( dev-libs/icu:= )
kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-llvm? (
- sys-devel/llvm:=
- sys-devel/clang:=
-)
+ldap? ( net-nds/openldap:= )
+llvm? ( $(llvm_gen_dep '
+ llvm-core/clang:${LLVM_SLOT}
+ llvm-core/llvm:${LLVM_SLOT}
+ ') )
+lz4? ( app-arch/lz4 )
pam? ( sys-libs/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- >=dev-libs/openssl-0.9.6-r1: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 )
+xml? ( dev-libs/libxml2:= dev-libs/libxslt )
+zlib? ( virtual/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 )
+UTIL_LINUX_LIBC=( elibc_{glibc,musl} )
nest_usedep() {
local front back
@@ -67,16 +65,15 @@ nest_usedep() {
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)
+ $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid)
)"
DEPEND="${CDEPEND}
sys-devel/bison
-sys-devel/flex
+app-alternatives/lex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
@@ -86,6 +83,8 @@ selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
+ use llvm && llvm-r1_pkg_setup
+
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
use python && python-single-r1_pkg_setup
@@ -101,7 +100,7 @@ src_prepare() {
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
- use server || eapply "${FILESDIR}/${PN}-13_beta1-no-server.patch"
+ use server || eapply "${FILESDIR}/${PN}-14.5-no-server.patch"
if use pam ; then
sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
@@ -109,10 +108,13 @@ src_prepare() {
die 'PGSQL_PAM_SERVICE rename failed.'
fi
+ default
eapply_user
}
src_configure() {
+ lto-guarantee-fat
+
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
@@ -129,26 +131,22 @@ src_configure() {
for i in ${UTIL_LINUX_LIBC[@]}; do
use ${i} && uuid_config="--with-uuid=e2fs"
done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
fi
- econf \
+ local myconf="\
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
$(use_enable debug) \
- $(use_enable threads thread-safety) \
$(use_with icu) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
$(use_with llvm) \
+ $(use_with lz4) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
@@ -160,7 +158,14 @@ src_configure() {
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
- $(use_enable nls)
+ $(use_enable nls)"
+ if use alpha; then
+ myconf+=" --disable-spinlocks"
+ else
+ # Should be the default but just in case
+ myconf+=" --enable-spinlocks"
+ fi
+ econf ${myconf}
}
src_compile() {
@@ -226,6 +231,7 @@ src_install() {
use static-libs || \
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
-delete
+ strip-lto-bytecode "${ED}"
# Make slot specific links to programs
local f bn
@@ -389,7 +395,7 @@ pkg_config() {
einfo "Initializing the database ..."
if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
else
"${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
fi
@@ -403,13 +409,6 @@ pkg_config() {
# overridden in the initscript
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
diff --git a/dev-db/postgresql/postgresql-15.17.ebuild b/dev-db/postgresql/postgresql-15.17.ebuild
deleted file mode 100644
index d857d28532cb..000000000000
--- a/dev-db/postgresql/postgresql-15.17.ebuild
+++ /dev/null
@@ -1,466 +0,0 @@
-# Copyright 2021-2026 Liguros Authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-LLVM_COMPAT=( {15..21} )
-LLVM_OPTIONAL=1
-
-inherit flag-o-matic linux-info llvm pam python-single-r1 systemd tmpfiles
-
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT=$(ver_cut 1)
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc icu kerberos ldap llvm lz4 nls pam perl python +readline selinux +server systemd ssl static-libs tcl +threads uuid xml zlib zstd"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-acct-group/postgres
-acct-user/postgres
-sys-apps/less
-virtual/libintl
-icu? ( dev-libs/icu:= )
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap:= )
-llvm? (
- <sys-devel/llvm-17:=
- <sys-devel/clang-17:=
-)
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-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 )
-zstd? ( app-arch/zstd )
-"
-
-# 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,musl} )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use llvm && llvm_pkg_setup
-
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-15_beta3-no-server.patch"
-
- if use pam ; then
- sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- local myconf="\
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with icu) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with llvm) \
- $(use_with lz4) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_with zstd) \
- $(use_enable nls)"
- if use alpha; then
- myconf+=" --disable-spinlocks"
- else
- # Should be the default but just in case
- myconf+=" --enable-spinlocks"
- fi
- econf ${myconf}
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- serverman=(
- initdb
- pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
- pg_{test_{fsync,timing},upgrade,waldump}
- post{gres,master}
- )
- for m in ${serverman[@]} ; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- # Make slot specific links to programs
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
- newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_postinst() {
- use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf
- postgresql-config update
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
-
- if [[ -n ${REPLACING_VERSIONS} ]] ; then
- ewarn "If your system is using 'pg_stat_statements' and you are running a"
- ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
- ewarn "the following command after upgrading:"
- ewarn
- ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
- fi
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
- mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
- chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- if ! use systemd; then
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- fi
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- elif use systemd; then
- einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
- # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
- local old_ctype=${LC_CTYPE}
- export LC_CTYPE=${LC_COLLATE}
- emake check
- export LC_CTYPE=${old_ctype}
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-15.18.ebuild b/dev-db/postgresql/postgresql-15.18.ebuild
index d857d28532cb..4fae9e6804e5 100644
--- a/dev-db/postgresql/postgresql-15.18.ebuild
+++ b/dev-db/postgresql/postgresql-15.18.ebuild
@@ -1,26 +1,27 @@
-# Copyright 2021-2026 Liguros Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
-LLVM_COMPAT=( {15..21} )
+LLVM_COMPAT=( {16..22} )
LLVM_OPTIONAL=1
-inherit flag-o-matic linux-info llvm pam python-single-r1 systemd tmpfiles
+inherit dot-a flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
-SLOT=$(ver_cut 1)
MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
+S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
+SLOT=$(ver_cut 1)
+
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-IUSE="debug doc icu kerberos ldap llvm lz4 nls pam perl python +readline selinux +server systemd ssl static-libs tcl +threads uuid xml zlib zstd"
+IUSE="debug doc icu kerberos ldap llvm +lz4 nls pam perl python +readline
+ selinux +server systemd ssl static-libs tcl uuid xml zlib +zstd"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@@ -33,22 +34,20 @@ virtual/libintl
icu? ( dev-libs/icu:= )
kerberos? ( virtual/krb5 )
ldap? ( net-nds/openldap:= )
-llvm? (
- <sys-devel/llvm-17:=
- <sys-devel/clang-17:=
-)
+llvm? ( $(llvm_gen_dep '
+ llvm-core/clang:${LLVM_SLOT}
+ llvm-core/llvm:${LLVM_SLOT}
+ ') )
+lz4? ( app-arch/lz4 )
pam? ( sys-libs/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- >=dev-libs/openssl-0.9.6-r1: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 )
+xml? ( dev-libs/libxml2:= dev-libs/libxslt )
+zlib? ( virtual/zlib:= )
zstd? ( app-arch/zstd )
"
@@ -75,7 +74,7 @@ uuid? (
DEPEND="${CDEPEND}
sys-devel/bison
-sys-devel/flex
+app-alternatives/lex
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
@@ -85,7 +84,7 @@ selinux? ( sec-policy/selinux-postgresql )
"
pkg_setup() {
- use llvm && llvm_pkg_setup
+ use llvm && llvm-r1_pkg_setup
use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
@@ -110,10 +109,13 @@ src_prepare() {
die 'PGSQL_PAM_SERVICE rename failed.'
fi
+ default
eapply_user
}
src_configure() {
+ lto-guarantee-fat
+
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
@@ -141,7 +143,6 @@ src_configure() {
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
$(use_enable debug) \
- $(use_enable threads thread-safety) \
$(use_with icu) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
@@ -232,6 +233,7 @@ src_install() {
use static-libs || \
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
-delete
+ strip-lto-bytecode "${ED}"
# Make slot specific links to programs
local f bn
@@ -409,13 +411,6 @@ pkg_config() {
# overridden in the initscript
sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
einfo "The autovacuum function, which was in contrib, has been moved to the main"
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
einfo "by default. You can disable it in the cluster's:"
diff --git a/dev-db/postgresql/postgresql-16.14.ebuild b/dev-db/postgresql/postgresql-16.14.ebuild
index e98bf7f4e6f8..4de8b450914b 100644
--- a/dev-db/postgresql/postgresql-16.14.ebuild
+++ b/dev-db/postgresql/postgresql-16.14.ebuild
@@ -1,26 +1,28 @@
-# Copyright 2021-2026 Liguros Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
-LLVM_COMPAT=( {15..21} )
+LLVM_COMPAT=( {16..22} )
LLVM_OPTIONAL=1
-inherit flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
+inherit dot-a flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
-SLOT=$(ver_cut 1)
MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
+S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
+SLOT=$(ver_cut 1)
-IUSE="debug doc +icu kerberos ldap llvm +lz4 nls pam perl python +readline selinux +server systemd ssl static-libs tcl uuid xml zlib +zstd"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
+
+IUSE="debug doc +icu kerberos ldap llvm +lz4 nls pam perl python
+ +readline selinux +server systemd ssl static-libs tcl uuid xml
+ zlib +zstd"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@@ -34,8 +36,8 @@ icu? ( dev-libs/icu:= )
kerberos? ( app-crypt/mit-krb5 )
ldap? ( net-nds/openldap:= )
llvm? ( $(llvm_gen_dep '
- sys-devel/clang:${LLVM_SLOT}
- sys-devel/llvm:${LLVM_SLOT}
+ llvm-core/clang:${LLVM_SLOT}
+ llvm-core/llvm:${LLVM_SLOT}
') )
lz4? ( app-arch/lz4 )
pam? ( sys-libs/pam )
@@ -43,13 +45,10 @@ perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- >=dev-libs/openssl-0.9.6-r1: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 )
+xml? ( dev-libs/libxml2:= dev-libs/libxslt )
+zlib? ( virtual/zlib:= )
zstd? ( app-arch/zstd )
"
@@ -111,10 +110,13 @@ src_prepare() {
die 'PGSQL_PAM_SERVICE rename failed.'
fi
+ default
eapply_user
}
src_configure() {
+ lto-guarantee-fat
+
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
@@ -232,6 +234,7 @@ src_install() {
use static-libs || \
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
-delete
+ strip-lto-bytecode "${ED}"
# Make slot specific links to programs
local f bn
diff --git a/dev-db/postgresql/postgresql-17.10.ebuild b/dev-db/postgresql/postgresql-17.10.ebuild
index 49f3eea34c8e..51af2e3be50d 100644
--- a/dev-db/postgresql/postgresql-17.10.ebuild
+++ b/dev-db/postgresql/postgresql-17.10.ebuild
@@ -1,26 +1,28 @@
-# Copyright 2021-2026 Liguros Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
-LLVM_COMPAT=( {15..21} )
+LLVM_COMPAT=( {16..22} )
LLVM_OPTIONAL=1
-inherit flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
+inherit dot-a flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
-SLOT=$(ver_cut 1)
MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
+S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
+SLOT=$(ver_cut 1)
-IUSE="debug doc +icu kerberos ldap llvm +lz4 nls pam perl python +readline selinux +server systemd ssl static-libs tcl uuid xml zlib +zstd"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
+
+IUSE="debug doc +icu kerberos ldap llvm +lz4 nls pam perl python
+ +readline selinux +server systemd ssl static-libs tcl uuid xml
+ zlib +zstd"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@@ -34,8 +36,8 @@ icu? ( dev-libs/icu:= )
kerberos? ( app-crypt/mit-krb5 )
ldap? ( net-nds/openldap:= )
llvm? ( $(llvm_gen_dep '
- sys-devel/clang:${LLVM_SLOT}
- sys-devel/llvm:${LLVM_SLOT}
+ llvm-core/clang:${LLVM_SLOT}
+ llvm-core/llvm:${LLVM_SLOT}
') )
lz4? ( app-arch/lz4 )
pam? ( sys-libs/pam )
@@ -43,13 +45,10 @@ perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- >=dev-libs/openssl-0.9.6-r1: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 )
+xml? ( dev-libs/libxml2:= dev-libs/libxslt )
+zlib? ( virtual/zlib:= )
zstd? ( app-arch/zstd )
"
@@ -85,6 +84,17 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-postgresql )
"
+# Docbook, XML, and XSLT are needed to generate manpages and
+# any documentation that may be elected.
+BDEPEND="
+app-text/docbook-dsssl-stylesheets
+app-text/docbook-sgml-dtd:4.5
+app-text/docbook-xml-dtd:4.5
+app-text/docbook-xsl-stylesheets
+dev-libs/libxml2
+dev-libs/libxslt
+"
+
pkg_setup() {
use llvm && llvm-r1_pkg_setup
@@ -103,7 +113,7 @@ src_prepare() {
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
- use server || eapply "${FILESDIR}/${PN}-15_beta3-no-server.patch"
+ use server || eapply "${FILESDIR}/${PN}-17.0-no-server.patch"
if use pam ; then
sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
@@ -111,10 +121,17 @@ src_prepare() {
die 'PGSQL_PAM_SERVICE rename failed.'
fi
+ default
eapply_user
}
src_configure() {
+ lto-guarantee-fat
+
+ # Fails to build with C23, fallback to the old default in < GCC 15
+ # for now: https://marc.info/?l=pgsql-bugs&m=173185132906874&w=2
+ append-cflags -std=gnu17
+
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
@@ -172,19 +189,21 @@ src_configure() {
src_compile() {
emake
emake -C contrib
+ emake -C doc
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
- dodoc README.md HISTORY
+ dodoc HISTORY
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
# manually install man pages.
# We use ${SLOT} instead of doman for postgresql.eselect
insinto /usr/share/postgresql-${SLOT}/man/
+ doins -r doc/src/sgml/man{1,3,7}
if ! use server; then
# Remove man pages for non-existent binaries
serverman=(
@@ -230,7 +249,8 @@ src_install() {
# needed by extensions utilizing PGXS.
use static-libs || \
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
+ -delete
+ strip-lto-bytecode "${ED}"
# Make slot specific links to programs
local f bn
diff --git a/dev-db/postgresql/postgresql-18.3.ebuild b/dev-db/postgresql/postgresql-18.3.ebuild
deleted file mode 100644
index 49f3eea34c8e..000000000000
--- a/dev-db/postgresql/postgresql-18.3.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 2021-2026 Liguros Authors
-# Distributed under the terms of the GNU General Public License v2
-EAPI=8
-
-PYTHON_COMPAT=( python3_{13..14} )
-LLVM_COMPAT=( {15..21} )
-LLVM_OPTIONAL=1
-
-inherit flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
-
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
-
-SLOT=$(ver_cut 1)
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc +icu kerberos ldap llvm +lz4 nls pam perl python +readline selinux +server systemd ssl static-libs tcl uuid xml zlib +zstd"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-acct-group/postgres
-acct-user/postgres
-sys-apps/less
-virtual/libintl
-icu? ( dev-libs/icu:= )
-kerberos? ( app-crypt/mit-krb5 )
-ldap? ( net-nds/openldap:= )
-llvm? ( $(llvm_gen_dep '
- sys-devel/clang:${LLVM_SLOT}
- sys-devel/llvm:${LLVM_SLOT}
- ') )
-lz4? ( app-arch/lz4 )
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-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 )
-zstd? ( app-arch/zstd )
-"
-
-# 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,musl} )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-sys-devel/bison
-app-alternatives/lex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use llvm && llvm-r1_pkg_setup
-
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-15_beta3-no-server.patch"
-
- if use pam ; then
- sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- local myconf="\
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable debug) \
- $(use_with icu) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with llvm) \
- $(use_with lz4) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_with zstd) \
- $(use_enable nls)"
- if use alpha; then
- myconf+=" --disable-spinlocks"
- else
- # Should be the default but just in case
- myconf+=" --enable-spinlocks"
- fi
- econf ${myconf}
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README.md HISTORY
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- if ! use server; then
- # Remove man pages for non-existent binaries
- serverman=(
- initdb
- pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
- pg_{test_{fsync,timing},upgrade,waldump}
- post{gres,master}
- )
- for m in ${serverman[@]} ; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- # Make slot specific links to programs
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
- newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_postinst() {
- use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf
- postgresql-config update
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
-
- if [[ -n ${REPLACING_VERSIONS} ]] ; then
- ewarn "If your system is using 'pg_stat_statements' and you are running a"
- ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
- ewarn "the following command after upgrading:"
- ewarn
- ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
- fi
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
- mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
- chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- if ! use systemd; then
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- fi
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- elif use systemd; then
- einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
- # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
- local old_ctype=${LC_CTYPE}
- export LC_CTYPE=${LC_COLLATE}
- emake check
- export LC_CTYPE=${old_ctype}
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-18.4.ebuild b/dev-db/postgresql/postgresql-18.4.ebuild
index 49f3eea34c8e..a1e5c0a62346 100644
--- a/dev-db/postgresql/postgresql-18.4.ebuild
+++ b/dev-db/postgresql/postgresql-18.4.ebuild
@@ -1,26 +1,28 @@
-# Copyright 2021-2026 Liguros Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
-LLVM_COMPAT=( {15..21} )
+LLVM_COMPAT=( {16..22} )
LLVM_OPTIONAL=1
-inherit flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
+inherit dot-a flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
-SLOT=$(ver_cut 1)
MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
+S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
+SLOT=$(ver_cut 1)
+
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos ~x64-solaris"
-IUSE="debug doc +icu kerberos ldap llvm +lz4 nls pam perl python +readline selinux +server systemd ssl static-libs tcl uuid xml zlib +zstd"
+IUSE="debug doc +icu kerberos ldap llvm +lz4 +numa nls oauth pam perl python
+ +readline selinux +server systemd ssl static-libs tcl uuid +uring
+ xml zlib +zstd"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@@ -34,22 +36,22 @@ icu? ( dev-libs/icu:= )
kerberos? ( app-crypt/mit-krb5 )
ldap? ( net-nds/openldap:= )
llvm? ( $(llvm_gen_dep '
- sys-devel/clang:${LLVM_SLOT}
- sys-devel/llvm:${LLVM_SLOT}
+ llvm-core/clang:${LLVM_SLOT}
+ llvm-core/llvm:${LLVM_SLOT}
') )
lz4? ( app-arch/lz4 )
+numa? ( sys-process/numactl )
+oauth? ( net-misc/curl[adns] )
pam? ( sys-libs/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- >=dev-libs/openssl-0.9.6-r1: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 )
+uring? ( sys-libs/liburing )
+xml? ( dev-libs/libxml2:= dev-libs/libxslt )
+zlib? ( virtual/zlib:= )
zstd? ( app-arch/zstd )
"
@@ -85,6 +87,17 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-postgresql )
"
+# Docbook, XML, and XSLT are needed to generate manpages and
+# any documentation that may be elected.
+BDEPEND="
+app-text/docbook-dsssl-stylesheets
+app-text/docbook-sgml-dtd:4.5
+app-text/docbook-xml-dtd:4.5
+app-text/docbook-xsl-stylesheets
+dev-libs/libxml2
+dev-libs/libxslt
+"
+
pkg_setup() {
use llvm && llvm-r1_pkg_setup
@@ -103,7 +116,7 @@ src_prepare() {
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
- use server || eapply "${FILESDIR}/${PN}-15_beta3-no-server.patch"
+ use server || eapply "${FILESDIR}/${PN}-18.0-no-server.patch"
if use pam ; then
sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
@@ -111,10 +124,17 @@ src_prepare() {
die 'PGSQL_PAM_SERVICE rename failed.'
fi
+ default
eapply_user
}
src_configure() {
+ lto-guarantee-fat
+
+ # Fails to build with C23, fallback to the old default in < GCC 15
+ # for now: https://marc.info/?l=pgsql-bugs&m=173185132906874&w=2
+ append-cflags -std=gnu17
+
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
@@ -147,6 +167,8 @@ src_configure() {
$(use_with ldap) \
$(use_with llvm) \
$(use_with lz4) \
+ $(use_with numa libnuma) \
+ $(use_with oauth libcurl) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
@@ -154,37 +176,35 @@ src_configure() {
$(use_with ssl openssl) \
$(usex server "$(use_with systemd)" '--without-systemd') \
$(use_with tcl) \
+ $(use_with uring liburing) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_with zstd) \
$(use_enable nls)"
- if use alpha; then
- myconf+=" --disable-spinlocks"
- else
- # Should be the default but just in case
- myconf+=" --enable-spinlocks"
- fi
+
econf ${myconf}
}
src_compile() {
emake
emake -C contrib
+ emake -C doc
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
- dodoc README.md HISTORY
+ dodoc HISTORY
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
# manually install man pages.
# We use ${SLOT} instead of doman for postgresql.eselect
insinto /usr/share/postgresql-${SLOT}/man/
+ doins -r doc/src/sgml/man{1,3,7}
if ! use server; then
# Remove man pages for non-existent binaries
serverman=(
@@ -230,7 +250,8 @@ src_install() {
# needed by extensions utilizing PGXS.
use static-libs || \
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
+ -delete
+ strip-lto-bytecode "${ED}"
# Make slot specific links to programs
local f bn
diff --git a/dev-db/postgresql/postgresql-16.13.ebuild b/dev-db/postgresql/postgresql-19_beta1.ebuild
index e98bf7f4e6f8..a94fb43f69df 100644
--- a/dev-db/postgresql/postgresql-16.13.ebuild
+++ b/dev-db/postgresql/postgresql-19_beta1.ebuild
@@ -1,26 +1,28 @@
-# Copyright 2021-2026 Liguros Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
-LLVM_COMPAT=( {15..21} )
+LLVM_COMPAT=( {16..22} )
LLVM_OPTIONAL=1
-inherit flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
+inherit dot-a flag-o-matic linux-info llvm-r2 pam python-single-r1 systemd tmpfiles
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
-SLOT=$(ver_cut 1)
MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
+S="${WORKDIR}/${PN}-${MY_PV}"
LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
+SLOT=$(ver_cut 1)
+
+KEYWORDS=""
-IUSE="debug doc +icu kerberos ldap llvm +lz4 nls pam perl python +readline selinux +server systemd ssl static-libs tcl uuid xml zlib +zstd"
+IUSE="debug doc +icu kerberos ldap llvm +lz4 +numa nls oauth pam perl python
+ +readline selinux +server systemd ssl static-libs tcl uuid +uring
+ xml zlib +zstd"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
@@ -34,22 +36,22 @@ icu? ( dev-libs/icu:= )
kerberos? ( app-crypt/mit-krb5 )
ldap? ( net-nds/openldap:= )
llvm? ( $(llvm_gen_dep '
- sys-devel/clang:${LLVM_SLOT}
- sys-devel/llvm:${LLVM_SLOT}
+ llvm-core/clang:${LLVM_SLOT}
+ llvm-core/llvm:${LLVM_SLOT}
') )
lz4? ( app-arch/lz4 )
+numa? ( sys-process/numactl )
+oauth? ( net-misc/curl[adns] )
pam? ( sys-libs/pam )
perl? ( >=dev-lang/perl-5.8:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- >=dev-libs/openssl-0.9.6-r1: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 )
+uring? ( sys-libs/liburing )
+xml? ( dev-libs/libxml2:= dev-libs/libxslt )
+zlib? ( virtual/zlib:= )
zstd? ( app-arch/zstd )
"
@@ -85,6 +87,17 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-postgresql )
"
+# Docbook, XML, and XSLT are needed to generate manpages and
+# any documentation that may be elected.
+BDEPEND="
+app-text/docbook-dsssl-stylesheets
+app-text/docbook-sgml-dtd:4.5
+app-text/docbook-xml-dtd:4.5
+app-text/docbook-xsl-stylesheets
+dev-libs/libxml2
+dev-libs/libxslt
+"
+
pkg_setup() {
use llvm && llvm-r1_pkg_setup
@@ -103,7 +116,7 @@ src_prepare() {
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
- use server || eapply "${FILESDIR}/${PN}-15_beta3-no-server.patch"
+ use server || eapply "${FILESDIR}/${PN}-18.0-no-server.patch"
if use pam ; then
sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
@@ -111,10 +124,17 @@ src_prepare() {
die 'PGSQL_PAM_SERVICE rename failed.'
fi
+ default
eapply_user
}
src_configure() {
+ lto-guarantee-fat
+
+ # Fails to build with C23, fallback to the old default in < GCC 15
+ # for now: https://marc.info/?l=pgsql-bugs&m=173185132906874&w=2
+ append-cflags -std=gnu17
+
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
@@ -147,6 +167,8 @@ src_configure() {
$(use_with ldap) \
$(use_with llvm) \
$(use_with lz4) \
+ $(use_with numa libnuma) \
+ $(use_with oauth libcurl) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
@@ -154,31 +176,28 @@ src_configure() {
$(use_with ssl openssl) \
$(usex server "$(use_with systemd)" '--without-systemd') \
$(use_with tcl) \
+ $(use_with uring liburing) \
${uuid_config} \
$(use_with xml libxml) \
$(use_with xml libxslt) \
$(use_with zlib) \
$(use_with zstd) \
$(use_enable nls)"
- if use alpha; then
- myconf+=" --disable-spinlocks"
- else
- # Should be the default but just in case
- myconf+=" --enable-spinlocks"
- fi
+
econf ${myconf}
}
src_compile() {
emake
emake -C contrib
+ emake -C doc
}
src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
- dodoc README HISTORY
+ dodoc HISTORY
# man pages are already built, but if we have the target make them,
# they'll be generated from source before being installed so we
@@ -232,6 +251,7 @@ src_install() {
use static-libs || \
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
-delete
+ strip-lto-bytecode "${ED}"
# Make slot specific links to programs
local f bn
diff --git a/dev-db/postgresql/postgresql-17.9.ebuild b/dev-db/postgresql/postgresql-9999.ebuild
index 49f3eea34c8e..46e9d1d3a817 100644
--- a/dev-db/postgresql/postgresql-17.9.ebuild
+++ b/dev-db/postgresql/postgresql-9999.ebuild
@@ -1,28 +1,40 @@
-# Copyright 2021-2026 Liguros Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+
EAPI=8
PYTHON_COMPAT=( python3_{13..14} )
-LLVM_COMPAT=( {15..21} )
+LLVM_COMPAT=( {16..21} )
LLVM_OPTIONAL=1
-inherit flag-o-matic linux-info llvm-r1 pam python-single-r1 systemd tmpfiles
+inherit dot-a flag-o-matic linux-info llvm-r1 meson pam python-single-r1 \
+ systemd tmpfiles
-KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+LICENSE="POSTGRESQL GPL-2"
SLOT=$(ver_cut 1)
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
+if [[ $PV = *9999* ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.postgresql.org/git/postgresql.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos ~x64-solaris"
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
+ MY_PV=${PV/_/}
+ SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
+ S="${WORKDIR}/${PN}-${MY_PV}"
+fi
-IUSE="debug doc +icu kerberos ldap llvm +lz4 nls pam perl python +readline selinux +server systemd ssl static-libs tcl uuid xml zlib +zstd"
+IUSE="debug doc +icu kerberos ldap llvm +lz4 nls numa oauth pam perl python +readline
+ selinux systemd ssl static-libs tcl test uring uuid xml zlib zstd"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+REQUIRED_USE="
+llvm? ( ${LLVM_REQUIRED_USE} )
+python? ( ${PYTHON_REQUIRED_USE} )
+"
+RESTRICT="!test? ( test )"
CDEPEND="
>=app-eselect/eselect-postgresql-2.0
@@ -34,22 +46,25 @@ icu? ( dev-libs/icu:= )
kerberos? ( app-crypt/mit-krb5 )
ldap? ( net-nds/openldap:= )
llvm? ( $(llvm_gen_dep '
- sys-devel/clang:${LLVM_SLOT}
- sys-devel/llvm:${LLVM_SLOT}
+ llvm-core/clang:${LLVM_SLOT}
+ llvm-core/llvm:${LLVM_SLOT}
') )
lz4? ( app-arch/lz4 )
+numa? ( sys-process/numactl )
+oauth? ( net-misc/curl[adns] )
pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
+perl? ( >=dev-lang/perl-5.14:= )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- >=dev-libs/openssl-0.9.6-r1:0=
-
-)
+ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+systemd? ( sys-apps/systemd )
tcl? ( >=dev-lang/tcl-8:0= )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
+uring? ( sys-libs/liburing )
+xml? (
+ dev-libs/libxml2:=
+ dev-libs/libxslt
+)
+zlib? ( virtual/zlib:= )
zstd? ( app-arch/zstd )
"
@@ -75,8 +90,9 @@ uuid? (
)"
DEPEND="${CDEPEND}
-sys-devel/bison
+>=dev-lang/perl-5.8
app-alternatives/lex
+sys-devel/bison
nls? ( sys-devel/gettext )
xml? ( virtual/pkgconfig )
"
@@ -85,11 +101,27 @@ RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-postgresql )
"
-pkg_setup() {
- use llvm && llvm-r1_pkg_setup
+# Docbook, XML, and XSLT are needed to generate manpages and
+# any documentation that may be elected.
+BDEPEND="
+app-text/docbook-dsssl-stylesheets
+app-text/docbook-sgml-dtd:4.5
+app-text/docbook-xml-dtd:4.5
+app-text/docbook-xsl-stylesheets
+dev-libs/libxml2
+dev-libs/libxslt
+test? (
+ >=dev-lang/perl-5.14:=
+ dev-perl/IPC-Run
+ virtual/perl-Test-Simple
+ virtual/perl-ExtUtils-MakeMaker
+)
+"
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+pkg_setup() {
+ CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+ use llvm && llvm-r1_pkg_setup
use python && python-single-r1_pkg_setup
}
@@ -103,103 +135,131 @@ src_prepare() {
# hardened and non-hardened environments. (Bug #528786)
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
- use server || eapply "${FILESDIR}/${PN}-15_beta3-no-server.patch"
-
if use pam ; then
sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
-i src/backend/libpq/auth.c || \
die 'PGSQL_PAM_SERVICE rename failed.'
fi
- eapply_user
+ default
}
src_configure() {
+ lto-guarantee-fat
+
+ # Fails to build with C23, fallback to the old default in < GCC 15
+ # for now: https://marc.info/?l=pgsql-bugs&m=173185132906874&w=2
+ append-cflags -std=gnu17
+
case ${CHOST} in
*-darwin*|*-solaris*)
use nls && append-libs intl
;;
esac
-
export LDFLAGS_SL="${LDFLAGS}"
export LDFLAGS_EX="${LDFLAGS}"
- local PO="${EPREFIX}"
+ local emesonargs=(
+ --prefix="${EPREFIX}/usr/$(get_libdir)/postgresql-${SLOT}"
+ --datadir="${EPREFIX}/usr/share/postgresql-${SLOT}"
+ --includedir="${EPREFIX}/usr/include/postgresql-${SLOT}"
+ --mandir="${EPREFIX}/usr/share/postgresql-${SLOT}/man"
+ --sysconfdir="${EPREFIX}/etc/postgresql-${SLOT}"
+ -Dsystem_tzdata="${EPREFIX}/usr/share/zoneinfo"
+ $(meson_feature icu)
+ $(meson_feature kerberos gssapi)
+ $(meson_feature ldap)
+ $(meson_feature llvm)
+ $(meson_feature lz4)
+ $(meson_feature nls)
+ $(meson_feature numa libnuma)
+ $(meson_feature oauth libcurl)
+ $(meson_feature pam)
+ $(meson_feature perl plperl)
+ $(meson_feature python plpython)
+ $(meson_feature readline)
+ $(meson_feature systemd)
+ $(meson_feature tcl pltcl)
+ $(meson_feature uring liburing)
+ $(meson_feature xml libxml)
+ $(meson_feature xml libxslt)
+ $(meson_feature zlib)
+ $(meson_feature zstd)
+ )
+
+ use debug && emesonargs+=( "--debug" )
+ use ssl && emesonargs+=( "-Dssl=openssl" )
local i uuid_config=""
if use uuid; then
for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
+ use ${i} && uuid_config="-Duuid=e2fs"
done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
+
+ emesonargs+=( ${uuid_config:-"-Duuid=ossp"} )
fi
- local myconf="\
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable debug) \
- $(use_with icu) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with llvm) \
- $(use_with lz4) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_with zstd) \
- $(use_enable nls)"
- if use alpha; then
- myconf+=" --disable-spinlocks"
+ meson_src_configure
+}
+
+src_compile() {
+ meson_src_compile
+
+ if use doc ; then
+ # Generates both manpages and HTML documentation.
+ meson_src_compile docs
else
- # Should be the default but just in case
- myconf+=" --enable-spinlocks"
+ meson_src_compile man
fi
- econf ${myconf}
}
-src_compile() {
- emake
- emake -C contrib
+src_test() {
+ if [[ ${UID} -ne 0 ]] ; then
+ # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
+ # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
+ local old_ctype=${LC_CTYPE}
+ export LC_CTYPE=${LC_COLLATE}
+ meson_src_test
+ export LC_CTYPE=${old_ctype}
+ else
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
+ ewarn 'Skipping.'
+ fi
}
src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
+ meson_src_install
- dodoc README.md HISTORY
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - "${PN}-${SLOT}"
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- if ! use server; then
- # Remove man pages for non-existent binaries
- serverman=(
- initdb
- pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
- pg_{test_{fsync,timing},upgrade,waldump}
- post{gres,master}
- )
- for m in ${serverman[@]} ; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - "${PN}-${SLOT}"
+
+ insinto "/etc/postgresql-${SLOT}"
+ newins src/bin/psql/psqlrc.sample psqlrc
+
+ # Create slot specific links to their related executables, so that they're
+ # always available. For example, pg_config9999 is always available whereas
+ # the pg_config is controlled by postgresql.eselect.
+ local f bn
+ for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
+ -mindepth 1 -maxdepth 1)
+ do
+ bn=$(basename "${f}")
+ dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
+ "/usr/bin/${bn}${SLOT/.}"
+ done
+
+ # Create slot specific man pages so that they're always available. As above
+ # for the executables, make `man pg_config9999` always refer to the same
+ # manpage, whereas postgresql.eselect controls which manpage `man pg_config`
+ # refers. And, since postgresql.eselect controls the manpages, doman would
+ # actually do the wrong thing for us, hence insinto and doins.
+ insinto "/usr/share/postgresql-${SLOT}/man/"
+ doins -r "${BUILD_DIR}"/doc/src/sgml/man{1,3,7}
+ docompress /usr/share/postgresql-"${SLOT}"/man/man{1,3,7}
- # Create slot specific man pages
local bn f mansec slotted_name
for mansec in 1 3 7 ; do
local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
@@ -209,106 +269,91 @@ src_install() {
for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
+ slotted_name=${bn%."${mansec}"}${SLOT}.${mansec}
case ${bn} in
TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
+ echo ".so ${rel_manpath}/SELECT.7" > "${slotted_name}"
;;
*)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
+ echo ".so ${rel_manpath}/${bn}" > "${slotted_name}"
;;
esac
done
- popd > /dev/null
+ popd > /dev/null || die "popd failed"
done
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
+ # All of the use flag influenced installs/removals begin here.
+ use doc && dodoc -r "${BUILD_DIR}"/doc/src/sgml/html
+
+ use pam && pamd_mimic system-auth "${PN}-${SLOT}" auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
# Don't delete libpg{port,common}.a (Bug #571046). They're always
# needed by extensions utilizing PGXS.
use static-libs || \
find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
+ -delete
+ strip-lto-bytecode "${ED}"
- # Make slot specific links to programs
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+ if use systemd; then
+ newbin "${FILESDIR}/${PN}-check-db-dir" "${PN}-${SLOT}-check-db-dir"
sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
- newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
+ "${FILESDIR}/${PN}.service-9.6-r1" | \
+ systemd_newunit - "${PN}-${SLOT}.service"
+ newtmpfiles "${FILESDIR}/${PN}.tmpfiles" "${PN}-${SLOT}.conf"
fi
}
pkg_postinst() {
- use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf
- postgresql-config update
+ use systemd && tmpfiles_process "${PN}-${SLOT}.conf"
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
+ # See comment in pkg_postrm().
+ [[ ${SLOT} = $(postgresql-config show) ]] && postgresql-config update
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ if use doc ; then
+ elog "${EROOT}/usr/share/doc/${PF}/html"
+ else
+ elog "https://www.postgresql.org/docs/${SLOT/9999*/devel}/index.html"
+ fi
+ elog
- if [[ -n ${REPLACING_VERSIONS} ]] ; then
- ewarn "If your system is using 'pg_stat_statements' and you are running a"
- ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
- ewarn "the following command after upgrading:"
- ewarn
- ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
- fi
+ elog "You can find release notes at:"
+ if use doc ; then
+ elog "${EROOT}/usr/share/doc/${PF}/html/release.html"
+ else
+ elog "https://www.postgresql.org/docs/${SLOT/9999*/devel}/release.html"
fi
+ elog
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT}/etc/postgresql-${SLOT}/"
+ elog
+ elog "The next two items only apply when running a server on this machine."
+ elog "------------------------------------------------------------------------"
+ elog "1. You may want to edit PG_INITDB_OPTS in the following file so that it"
+ elog " contains your preferred locale, and other options, before"
+ elog " initializing the cluster:"
+ elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
+ elog
+ elog "2. Then, run the following command to initialize database cluster:"
+ elog " emerge --config =${CATEGORY}/${PN}:${SLOT}"
}
pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ if [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ ewarn "Were you running PostgreSQL ${SLOT} as a server? If no, ignore the rest"
+ ewarn "of this warning."
+ ewarn
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
@@ -319,12 +364,14 @@ pkg_prerm() {
}
pkg_postrm() {
- postgresql-config update
+ # The links managed by eselect are unversioned only, and would only be
+ # impacted if the selected slot and ebuild slot are the same. For example,
+ # if the selected slot is SLOT+1, then nothing that happened with this
+ # ebuild will impact the unversioned links.
+ [[ ${SLOT} = $(postgresql-config show) ]] && postgresql-config update
}
pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
[[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
&& source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
@@ -378,7 +425,7 @@ pkg_config() {
sleep 5
eend 0
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
+ if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
eerror "The given directory, '${DATA_DIR}', is not empty."
eerror "Modify DATA_DIR to point to an empty directory."
die "${DATA_DIR} is not empty."
@@ -436,23 +483,3 @@ pkg_config() {
einfo "instead of 'pg_ctl'."
fi
}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
- # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
- local old_ctype=${LC_CTYPE}
- export LC_CTYPE=${LC_COLLATE}
- emake check
- export LC_CTYPE=${old_ctype}
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}