summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-06-16 21:23:20 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-06-16 21:23:20 +0100
commitfab849d1daed0ba7f2ac497d07985c3dbb692543 (patch)
tree10baa743a5340b42ad538dd19d48669ccac209b1 /dev-db
parent73c318acdaf6f8309d68bd266051e6dd1f1bd787 (diff)
gentoo resync : 16.06.2019
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/Manifest.gzbin19328 -> 19148 bytes
-rw-r--r--dev-db/mariadb-galera/Manifest5
-rw-r--r--dev-db/mariadb-galera/files/my.cnf-5.6158
-rw-r--r--dev-db/mariadb-galera/mariadb-galera-10.0.38.ebuild859
-rw-r--r--dev-db/mariadb-galera/metadata.xml26
-rw-r--r--dev-db/mariadb/Manifest6
-rw-r--r--dev-db/mariadb/mariadb-10.0.35-r2.ebuild848
-rw-r--r--dev-db/mariadb/mariadb-10.0.37.ebuild848
-rw-r--r--dev-db/mariadb/mariadb-10.0.38.ebuild848
-rw-r--r--dev-db/myodbc/Manifest4
-rw-r--r--dev-db/myodbc/files/8.0-cmake-doc-path.patch42
-rw-r--r--dev-db/myodbc/files/8.0.16-cxxlinkage.patch63
-rw-r--r--dev-db/myodbc/myodbc-8.0.16.ebuild119
-rw-r--r--dev-db/mysql-connector-c/Manifest3
-rw-r--r--dev-db/mysql-connector-c/files/8.0.16-libressl.patch302
-rw-r--r--dev-db/mysql-connector-c/mysql-connector-c-8.0.16.ebuild92
-rw-r--r--dev-db/pgmodeler/Manifest2
-rw-r--r--dev-db/pgmodeler/pgmodeler-0.9.1.ebuild4
-rw-r--r--dev-db/pgpool2/Manifest4
-rw-r--r--dev-db/pgpool2/pgpool2-3.7.8.ebuild2
-rw-r--r--dev-db/pgpool2/pgpool2-4.0.3.ebuild2
-rw-r--r--dev-db/pgtap/Manifest2
-rw-r--r--dev-db/pgtap/pgtap-0.99.0.ebuild2
-rw-r--r--dev-db/plr/Manifest2
-rw-r--r--dev-db/plr/plr-8.3.0.17.ebuild4
-rw-r--r--dev-db/postgis/Manifest2
-rw-r--r--dev-db/postgis/postgis-2.4.6.ebuild2
-rw-r--r--dev-db/postgresql/Manifest28
-rw-r--r--dev-db/postgresql/files/postgresql-9.3-no-server.patch144
-rw-r--r--dev-db/postgresql/postgresql-10.6.ebuild460
-rw-r--r--dev-db/postgresql/postgresql-10.7.ebuild460
-rw-r--r--dev-db/postgresql/postgresql-11.1.ebuild460
-rw-r--r--dev-db/postgresql/postgresql-11.2.ebuild460
-rw-r--r--dev-db/postgresql/postgresql-11.3.ebuild2
-rw-r--r--dev-db/postgresql/postgresql-12_beta1-r1.ebuild2
-rw-r--r--dev-db/postgresql/postgresql-12_beta1.ebuild460
-rw-r--r--dev-db/postgresql/postgresql-9.3.25.ebuild443
-rw-r--r--dev-db/postgresql/postgresql-9.4.20.ebuild475
-rw-r--r--dev-db/postgresql/postgresql-9.4.21.ebuild475
-rw-r--r--dev-db/postgresql/postgresql-9.5.15.ebuild481
-rw-r--r--dev-db/postgresql/postgresql-9.5.16.ebuild481
-rw-r--r--dev-db/postgresql/postgresql-9.6.11.ebuild486
-rw-r--r--dev-db/postgresql/postgresql-9.6.12.ebuild486
-rw-r--r--dev-db/slony1/Manifest5
-rw-r--r--dev-db/slony1/slony1-2.2.6.ebuild4
-rw-r--r--dev-db/slony1/slony1-2.2.7.ebuild62
46 files changed, 711 insertions, 9414 deletions
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz
index 4df4faa0b5b9..664ab64a4244 100644
--- a/dev-db/Manifest.gz
+++ b/dev-db/Manifest.gz
Binary files differ
diff --git a/dev-db/mariadb-galera/Manifest b/dev-db/mariadb-galera/Manifest
deleted file mode 100644
index 64a8479f7d0d..000000000000
--- a/dev-db/mariadb-galera/Manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-AUX my.cnf-5.6 5144 BLAKE2B 2f977b6a92524cfabbdd19058430c62dd4d03a0587036f49057eff69fda04c148a4dca8e58abe418a2bdc0fe1ef3c780cf53d7214fb51f13d5a4b2a4f7a3b8e9 SHA512 db4bdde6f82d9bd33026477d89d8191ddc4099586273ca4aa3f2dcd09572f887d03f79c2ce00bf74d01c21a18384b05516982bdcf31a6c458631315ea75c4cab
-DIST mariadb-galera-10.0.38.tar.gz 65157071 BLAKE2B c54341395101e27dd25183da3d09e7ddf72a07cf440a8aea5daa998d53012a93e1f04bb5020dba28d1337b5f11448be6ae3d8624c437db0cf090eff2aa10151d SHA512 219c2400ebdbf4c6933af1d2d1f88c7f795a988b408676a3c93dbb8c82bdb782f661e9a60f5e940baf31feda8e584e9764918e59cfbdfa1356af8712dde17425
-DIST mysql-extras-20190310-0358Z.tar.bz2 331100 BLAKE2B 69f2b1ee404247e04b7d368c08c429f783fa45dface295be9fa2d94822d052a08a40e6a57bec3afc38886eb0badfcb52c92974c6df033bb90be66abb3f05249a SHA512 5fd4a320e4c224514b054cffbbdf3697ed7351cf71ee779c311f024388bbf12673821b0e12994acbccd30fe119214ea4b53edf87e2cb37be39d0448e4b2cf70b
-EBUILD mariadb-galera-10.0.38.ebuild 27681 BLAKE2B 1387526e164ee261fa21976028ef7bc2e80b273c4e2722d286284b2bf62e66bd50dec2e5b6d977aed1a00a483ac319264434dbfded47661905125336f658d909 SHA512 7d7917cad83f6a5ce0a063635e20e8791ae6855a33a0b33e2db8ee149bb28758621b71b560501f34f4a96a73400bedaf8746c2eb8de668c21db9c618ca1a7ab1
-MISC metadata.xml 1731 BLAKE2B 0e8a98423e36b3dd621d42ce512063fa8d703cb5254616fd2549cc6f2b03df3d521502b3def93b93000ea4c8b9c24d0bba01bb1417d88c2b2689dcf31876e996 SHA512 09073b18f31f6684cd0ecde266a1c41e7520baf8aa5ff31f19a815ce3f5fea3b1302e0eb702d377f5eb3535c5a7e2828965446b631bbf91219a8c898d1ee8c9e
diff --git a/dev-db/mariadb-galera/files/my.cnf-5.6 b/dev-db/mariadb-galera/files/my.cnf-5.6
deleted file mode 100644
index 379a2c47049f..000000000000
--- a/dev-db/mariadb-galera/files/my.cnf-5.6
+++ /dev/null
@@ -1,158 +0,0 @@
-# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
-
-# The following options will be passed to all MySQL clients
-[client]
-#password = your_password
-port = 3306
-socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
-
-[mysql]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
-default-character-set=utf8
-
-[mysqladmin]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
-default-character-set=utf8
-
-[mysqlcheck]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
-default-character-set=utf8
-
-[mysqldump]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
-default-character-set=utf8
-
-[mysqlimport]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
-default-character-set=utf8
-
-[mysqlshow]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
-default-character-set=utf8
-
-[myisamchk]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
-
-[myisampack]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets
-
-# use [safe_mysqld] with mysql-3
-[mysqld_safe]
-err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
-
-# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
-[mysqld]
-character-set-server = utf8
-user = mysql
-port = 3306
-socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
-pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
-log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
-basedir = @GENTOO_PORTAGE_EPREFIX@/usr
-datadir = @DATADIR@
-skip-external-locking
-key_buffer_size = 16M
-max_allowed_packet = 4M
-table_open_cache = 400
-sort_buffer_size = 512K
-net_buffer_length = 16K
-read_buffer_size = 256K
-read_rnd_buffer_size = 512K
-myisam_sort_buffer_size = 8M
-lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql
-#Set this to your desired error message language
-lc_messages = en_US
-
-# security:
-# using "localhost" in connects uses sockets by default
-# skip-networking
-bind-address = 127.0.0.1
-
-log-bin
-server-id = 1
-
-# point the following paths to different dedicated disks
-tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
-#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
-
-# you need the debug USE flag enabled to use the following directives,
-# if needed, uncomment them, start the server and issue
-# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
-# this will show you *exactly* what's happening in your server ;)
-
-#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
-#gdb
-#debug = d:t:i:o,/tmp/mysqld.trace
-#one-thread
-
-# the rest of the innodb config follows:
-# don't eat too much memory, we're trying to be safe on 64Mb boxes
-# you might want to bump this up a bit on boxes with more RAM
-innodb_buffer_pool_size = 128M
-#
-# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
-# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
-# we have to take for the moment
-#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
-#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
-#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
-# you may wish to change this size to be more suitable for your system
-# the max is there to avoid run-away growth on your machine
-innodb_data_file_path = ibdata1:10M:autoextend:max:128M
-# we keep this at around 25% of of innodb_buffer_pool_size
-# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
-innodb_log_file_size = 48M
-# this is the default, increase it if you have very large transactions going on
-innodb_log_buffer_size = 8M
-# this is the default and won't hurt you
-# you shouldn't need to tweak it
-innodb_log_files_in_group=2
-# see the innodb config docs, the other options are not always safe
-innodb_flush_log_at_trx_commit = 1
-innodb_lock_wait_timeout = 50
-innodb_file_per_table
-
-# Uncomment this to get FEDERATED engine support
-#plugin-load=federated=ha_federated.so
-loose-federated
-
-# These settings are required for Galera clustering
-#mysql settings
-binlog_format=ROW
-default-storage-engine=innodb
-innodb_autoinc_lock_mode=2
-query_cache_size=0
-query_cache_type=0
-bind-address=0.0.0.0
-# Uncomment this section to activate Galera clustering
-#wsrep_provider=@GENTOO_PORTAGE_EPREFIX@/usr/lib/galera/libgalera_smm.so
-# You should change this name to something meaningful
-#wsrep_cluster_name="my_wsrep_cluster"
-# List all nodes of the cluster including this one
-#wsrep_cluster_address="gcomm://172.16.8.5,172.16.8.6,172.16.8.4"
-#wsrep_sst_method=rsync
-
-[mysqldump]
-quick
-max_allowed_packet = 16M
-
-[mysql]
-# uncomment the next directive if you are not familiar with SQL
-#safe-updates
-
-[isamchk]
-key_buffer_size = 20M
-sort_buffer_size = 20M
-read_buffer = 2M
-write_buffer = 2M
-
-[myisamchk]
-key_buffer_size = 20M
-sort_buffer_size = 20M
-read_buffer_size = 2M
-write_buffer_size = 2M
-
-[mysqlhotcopy]
-interactive-timeout
-
-[mariadb]
diff --git a/dev-db/mariadb-galera/mariadb-galera-10.0.38.ebuild b/dev-db/mariadb-galera/mariadb-galera-10.0.38.ebuild
deleted file mode 100644
index b4d1da15624a..000000000000
--- a/dev-db/mariadb-galera/mariadb-galera-10.0.38.ebuild
+++ /dev/null
@@ -1,859 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20190310-0358Z"
-SUBSLOT="18"
-
-JAVA_PKG_OPT_USE="jdbc"
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils
-
-SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
- SRC_URI="${SRC_URI}
- mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://mariadb.org/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2 LGPL-2.1+"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="bindist client-libs debug extraengine jdbc jemalloc latin1 libressl
- numa odbc oqgraph pam +perl profiling selinux +server sphinx
- sst-rsync sst-xtrabackup static systemtap tcmalloc
- test tokudb xml yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="jdbc? ( extraengine server !static )
- server? ( tokudb? ( jemalloc !tcmalloc ) )
- !server? ( !extraengine )
- ?? ( tcmalloc jemalloc )
- static? ( yassl !pam )"
-
-KEYWORDS="~amd64 ~x86"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
- inherit git-r3
- EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
- EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
- EGIT_CLONE_TYPE=shallow
-else
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
- "${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch"
- "${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-10.0.33.patch"
- "${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch"
- "${MY_PATCH_DIR}/20018_all_mariadb-galera-10.0.20-without-clientlibs-tools.patch"
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- kernel_linux? (
- sys-process/procps:0=
- dev-libs/libaio:0=
- )
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- jemalloc? ( dev-libs/jemalloc:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- !yassl? (
- !libressl? ( <dev-libs/openssl-1.1.0:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- >=sys-libs/zlib-1.2.3:0=
- sys-libs/ncurses:0=
- !bindist? (
- >=sys-libs/readline-4.1:0=
- )
- server? (
- extraengine? (
- odbc? ( dev-db/unixODBC:0= )
- xml? ( dev-libs/libxml2:2= )
- )
- numa? ( sys-process/numactl )
- oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
- pam? ( virtual/pam:0= )
- tokudb? ( app-arch/snappy )
- )
- >=dev-libs/libpcre-8.41-r1:3=
-"
-DEPEND="virtual/yacc
- static? ( sys-libs/ncurses[static-libs] )
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
- ${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
- client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
- !dev-db/mysql !dev-db/mariadb !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- ${COMMON_DEPEND}
- server? (
- sys-apps/iproute2
- =sys-cluster/galera-25*
- sst-rsync? ( sys-process/lsof )
- sst-xtrabackup? ( net-misc/socat[ssl] )
- )
- perl? ( !dev-db/mytop
- virtual/perl-Getopt-Long
- dev-perl/TermReadKey
- virtual/perl-Term-ANSIColor
- virtual/perl-Time-HiRes )
- server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
- server? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) )"
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
- # non x86{,_64} arches
- if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- fi
- java-pkg-opt-2_pkg_setup
- if has test ${FEATURES} && \
- use server && ! has userpriv ${FEATURES} ; then
- eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- # This should come after all of the die statements
- enewgroup mysql 60 || die "problem adding 'mysql' group"
- enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
- java-pkg-opt-2_pkg_preinst
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
- if use server ; then
- if use pam; then
- einfo
- elog "This install includes the PAM authentication plugin."
- elog "To activate and configure the PAM plugin, please read:"
- elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
- einfo
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- elog
- elog "If you are switching server implentations, you should run the"
- elog "mysql_upgrade tool."
- einfo
- else
- einfo
- elog "If you are upgrading major versions, you should run the"
- elog "mysql_upgrade tool."
- einfo
- fi
-
- einfo
- elog "Be sure to edit the my.cnf file to activate your cluster settings."
- elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
- elog "The first time the cluster is activated, you should add"
- elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
- elog "This option should then be removed for subsequent starts."
- einfo
- fi
-}
-
-src_unpack() {
- unpack ${A}
- # Grab the patches
- [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
-
- mv -f "${WORKDIR%/}/${PN%%-galera}-${PV}" "${S}" || die
-}
-
-src_prepare() {
- _disable_engine() {
- echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
- }
-
- _disable_plugin() {
- echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
- }
-
- if use tcmalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
- fi
-
- # Don't build bundled xz-utils for tokudb
- echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
- sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
- sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
-
- local plugin
- local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
- locale_info qc_info server_audit semisync sql_errlog )
- local test_plugins=( audit_null auth_examples daemon_example fulltext )
- if ! use server; then # These plugins are for the server
- for plugin in "${server_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- if ! use test; then # These plugins are only used during testing
- for plugin in "${test_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- # Collides with mariadb-connector-c bug 655980
- _disable_plugin auth_dialog
-
- # Don't build Mroonga or example
- _disable_engine mroonga
- _disable_engine example
-
- if ! use oqgraph ; then # avoids extra library checks
- _disable_engine oqgraph
- fi
-
- cmake-utils_src_prepare
- java-pkg-opt-2_src_prepare
-}
-
-src_configure(){
- # bug 508724 mariadb cannot use ld.gold
- tc-ld-disable-gold
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
- -DINSTALL_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/mariadb
- -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
- -DINSTALL_SCRIPTDIR=share/mariadb/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- -DWITH_ZLIB=system
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- # The build forces this to be defined when cross-compiling. We pass it
- # all the time for simplicity and to make sure it is actually correct.
- -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
- -DWITHOUT_CLIENTLIBS=YES
- -DWITH_READLINE=$(usex bindist 1 0)
- -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
- -DENABLE_DTRACE=$(usex systemtap)
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use yassl ; then
- mycmakeargs+=( -DWITH_SSL=system )
- else
- mycmakeargs+=( -DWITH_SSL=bundled )
- fi
-
- if use server ; then
-
- # Federated{,X} must be treated special otherwise they will not be built as plugins
- if ! use extraengine ; then
- mycmakeargs+=(
- -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
- -DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
- fi
-
- mycmakeargs+=(
- -DWITH_JEMALLOC=$(usex jemalloc system)
- -DWITH_PCRE=system
- -D$(usex sphinx WITH WITHOUT)_SPHINX_STORAGE_ENGINE=1
- -D$(usex tokudb WITH WITHOUT)_TOKUDB_STORAGE_ENGINE=1
- -D$(usex oqgraph WITH WITHOUT)_AUTH_PAM=1
- -D$(usex extraengine WITH WITHOUT)_SEQUENCE_STORAGE_ENGINE=1
- -D$(usex extraengine WITH WITHOUT)_SPIDER_STORAGE_ENGINE=1
- -D$(usex extraengine WITH WITHOUT)_CONNECT_STORAGE_ENGINE=1
- -DCONNECT_WITH_LIBXML2=$(usex xml)
- -DCONNECT_WITH_ODBC=$(usex odbc)
- -DCONNECT_WITH_JDBC=$(usex jdbc)
- # Build failure and autodep wrt bug 639144
- -DCONNECT_WITH_MONGO=OFF
- -DWITH_WSREP=ON
- -DINSTALL_SQLBENCHDIR=share/mariadb
- )
-
- # Workaround for MDEV-14524
- use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
-
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_EMBEDDED_SERVER=OFF
- -DENABLED_PROFILING=$(usex profiling)
- )
-
- if use static; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- if use jemalloc || use tcmalloc ; then
- mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- -DWITH_PARTITION_STORAGE_ENGINE=1
- )
-
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DWITH_EMBEDDED_SERVER=OFF
- -DEXTRA_CHARSETS=none
- -DINSTALL_SQLBENCHDIR=
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
- if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
- rm "${ED}/usr/include/mysql/server/private/config.h" || die
- fi
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED}/usr/data" ]] ; then
- rm -Rf "${ED}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
- local mycnf_src="my.cnf-5.6"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR}/${mycnf_src}" \
- > "${TMPDIR}/my.cnf.ok" || die
- use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR}/my.cnf.ok"
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" my.cnf
-
- if use server ; then
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- # Manually install supporting files that conflict with other packages
- # but are needed for galera and initial installation
- exeinto /usr/libexec/mariadb
- doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mariadb-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MariaDB 10.0 for now and are believed to be
- # false positives:
- #
- # main.mysql_client_test, main.mysql_client_test_nonblock
- # main.mysql_client_test_comp:
- # segfaults at random under Portage only, suspect resource limits.
-
- local t
- for t in main.mysql_client_test main.mysql_client_test_nonblock \
- main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- if ! use client-libs ; then
- _disable_test main.plugin_auth "Needs client libraries built"
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd > /dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_config() {
- _getoptval() {
- local mypd="${EROOT}"/usr/bin/my_print_defaults
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
- }
- local old_MY_DATADIR="${MY_DATADIR}"
- local old_HOME="${HOME}"
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- export HOME=${EPREFIX}/root
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
- if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
- die "Minimal builds do NOT include the MySQL server"
- fi
-
- if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
- local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
- MY_DATADIR_s="${MY_DATADIR_s%%/}"
- local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
- old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
- if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
- ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
- else
- elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
- mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
- || die "Moving MY_DATADIR failed"
- fi
- else
- ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Attempting to use ${MY_DATADIR_s}"
- else
- eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
- die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
- fi
- fi
- fi
-
- local pwd1="a"
- local pwd2="b"
- local maxtry=15
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
- local tmp_mysqld_password_source=
-
- for tmp_mysqld_password_source in mysql client; do
- einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
- if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
- if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
- ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
- MYSQL_ROOT_PASSWORD=
- continue
- fi
-
- einfo "Found password in '${tmp_mysqld_password_source}' section!"
- break
- fi
- done
-
- # Sometimes --show is required to display passwords in some implementations of my_print_defaults
- if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
- fi
-
- unset tmp_mysqld_password_source
- fi
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see https://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in grant-tables host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
- local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile} \
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- if [[ -n "${sqltmp}" ]] ; then
- ebegin "Loading \"zoneinfo\", this step may require a few seconds"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -uroot \
- --password="${MYSQL_ROOT_PASSWORD}" \
- mysql < "${sqltmp}"
- rc=$?
- eend $?
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
- fi
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mariadb-galera/metadata.xml b/dev-db/mariadb-galera/metadata.xml
deleted file mode 100644
index 85ebf9880ac9..000000000000
--- a/dev-db/mariadb-galera/metadata.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="project">
- <email>mysql-bugs@gentoo.org</email>
- <name>MySQL</name>
- </maintainer>
-<use>
- <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages</flag>
- <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag>
- <flag name="jdbc">Enable the CONNECT engine to access foreign databases via JDBC</flag>
- <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
- <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
- <flag name="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag>
- <flag name="oqgraph">Add support for the Open Query GRAPH engine</flag>
- <flag name="profiling">Add support for statement profiling (requires USE=community).</flag>
- <flag name="server">Build the server program</flag>
- <flag name="sst-rsync">Add tools needed to support the rsync SST method</flag>
- <flag name="sst-xtrabackup">Add tools needed to support the xtrabackup and xtrabackup-v2 SST methods</flag>
- <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
- <flag name="sphinx">Add suport for the sphinx full-text search engine</flag>
- <flag name="test">Install upstream testsuites for end use.</flag>
- <flag name="tokudb">Add support for TokuDB storage engine</flag>
- <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag>
-</use>
-</pkgmetadata>
diff --git a/dev-db/mariadb/Manifest b/dev-db/mariadb/Manifest
index 6cfcd9c882d5..9a158add8bda 100644
--- a/dev-db/mariadb/Manifest
+++ b/dev-db/mariadb/Manifest
@@ -3,9 +3,6 @@ AUX my.cnf-5.5 4805 BLAKE2B 39ffb485329b246867db03977661441ebfa71c8ac6275d5263dd
AUX my.cnf-5.6-r1 4597 BLAKE2B ae7eb874421819b8ce8e3c21e00f21bba1fb508a8d0ea4825f110b42521deca01726d3a8154c1c541119592b809ef6263d13e7701eba7dc8af201b3777c6d226 SHA512 5670fc67032656c5079fe5190ffef5443d5646ffae00d42e231c584e7688578a7df33dbe473749ea160e978152f5d94325eb023c748826aee89866694bc050f8
AUX my.cnf.distro-client 643 BLAKE2B 5ffd286907ee28c92c85bbcc9a6266555733f1115f2d6b8009183dba6939b978ae8d1b8e0a53e672b8e1a1f621650399231723603fc5f96ef7218db84236e176 SHA512 801f6ab8be3110bb4dc38eaa4367715b8d342b69cadfe13dff987ef6c3aedb67d19449f8f2483e63df5d8b444ca30701b0d96f85e211de6b1e3db923b029acbc
AUX my.cnf.distro-server 998 BLAKE2B a7f2977a96d394cb7e24d72d82a1c21095c4b55607e5ca4a2c10619278796c328931a5ec076c15b60afef370c2e5da02ca0c628f330e876b4d2c984eeb54df5f SHA512 d9ab6f7fdfe08e6c242f84410ec680ef6aa6778c4bd55fee67c644e1a7d997446d8ef2129be6fc9833d16fe40cf17e09cdf0cf015f06bb145bbf9cfecb51e882
-DIST mariadb-10.0.35.tar.gz 66551252 BLAKE2B 69cc9c78f7c47a4b1760940cb0f395b4053fcc47c1087a0c2af873d4a998ee60915e1f4e64f7fe6474c7c1fa3dabe48a3b6621c67893b20526f01e56b0542e7a SHA512 01fc8d48be3f3847bb222835436ab938c6c5b5ac8ba6cc87b3b6d2a2201b7ab4b152dc1f7d9749c89de90097d50052714ac08aafbbb117fffac32bfb47e74779
-DIST mariadb-10.0.37.tar.gz 64728382 BLAKE2B 3d794633cc400013be05c326681f11f8b27c7d6758b43f357ca93976a75ff931f6f6d205510b5df305c6f487485864d346e4fa14383be32dafcf2b8756eb045a SHA512 c3ba749f519cce3bb63fec6ee6819ad931f72d54258d4b7700c515cfeb137453271a408a9a353bf78715fe66a0c06539bdbf15f1c556a7b89a5c01af84f7fd49
-DIST mariadb-10.0.38.tar.gz 64755921 BLAKE2B 64ea08a2256063639021204f8c92d8f27b2bc0df6c9733255220df5728c128bd971bb907f2a30623a1c2cc536d47b8759781f2ccd97075ebace7c759b5cf0c14 SHA512 020c9b8bed5f5ff4e8f621665cc37f56fe9fbb4bda1f64d4bd9fe1bcaaf79dc2c254e582ee690c9aa4f810cf3eeb96249cb3b4b54a6604d035accf03846ba4a9
DIST mariadb-10.1.34.tar.gz 65298561 BLAKE2B 3f3af7b8bad68a08f69befd3f3e7bd88b8cf058feb20309dc2cdbd16bf5d015c2cb0d1d9d2fdf831f6183c0b9bb25405124c24b2940467489e05d42c57f7b0a6 SHA512 3c18359006b340dcf724d1fce36dcc19916c42492269a7545e0726172b8f7b84860e10725c74e4458dae34572395f1650bf17838e9058544e0a6cfcbffd54f6d
DIST mariadb-10.1.37.tar.gz 63492946 BLAKE2B 0f19b402c597443ef970cbe2a2d85d51743cc2d05ab741897efb150f007d7be8b645706a2d0dc5a9f91c7a380d2313840f77d6e9b15f3335495f275b415e5a33 SHA512 b7c35cd67ad265ce2e3a4db20a2ae2b78745db96dc70a211f027a39b6dbb3dc900991c2ee1021ee6a97d12489c3e2a70252e2adf348a458af38b99c3de5a4f25
DIST mariadb-10.1.38.tar.gz 63535685 BLAKE2B c179ea2f60287c2bc1c0d1c47ae989ac2653a24063e8344cef2f3062fc6798e18b969e8f9aa8287104ce2518e6c644cb8d3a4650b5a0bc5dfde973e76e618955 SHA512 184582f3a902a989ba3d9c4d21288c014c8b469adbbb4cbabc621c5006022cef29baed8c1140ed4476b124da83b76dfa414295ed0c3374be826e75aca953a77b
@@ -19,9 +16,6 @@ DIST mariadb-5.5.64.tar.gz 45953561 BLAKE2B d6efe53e520b829ec337a00efadd7d813afd
DIST mysql-extras-20180809-1700Z.tar.bz2 322999 BLAKE2B 8b5feb32085dc35b2f68dae985b2d266c4eaa0e956b490050a2df04bbff99bf8623b67e75af9326d84e3ad625c4d86b0d21d23c9a96df5a0c9cd5ed730958970 SHA512 fbd7af9284bbf09d55f128361e7cc52d94f24ac491aac800cd6d61f2e444aeca66a4d5e6ae94c2fb4044e00cec9b232bae9a76a229f87f19d90b7aecf70792ec
DIST mysql-extras-20181104-2252Z.tar.bz2 328613 BLAKE2B c869dbdd8eb8ab6706b52815fae88e0789b955b9d3e89eac305e6de6e1bc9e78ea10ac58efeac0d6478c7f83587910834e9b4c44e3621224f006daae44dc2bf3 SHA512 e0dff23aa6420a9cfcf2f60464381d4b08194759dcd96910cdf94075fa71e90b74fa3dae700f279f421fee68315af37e47054c9422adeb6cc757fa968a1b65bf
DIST mysql-extras-20190305-2052Z.tar.bz2 331304 BLAKE2B 1d2c35a961159fa5ce9ee6699fce943f5a5b5cf60b11c9bb4bcccee4943f4508a9eb6d01050c642353ac592ce1a6b421abf2a1bebc706c44c4c8a36aa698ec43 SHA512 ae63403320e010acbb92f8aec6da8ed4f267cef0bad37147d594076fd94571de7f98bfc2afbe94af5d716f58d57696fd958b1e13e20e87052f252ed4a188cd3c
-EBUILD mariadb-10.0.35-r2.ebuild 27520 BLAKE2B 09bb435fc35e43e9d5a9f0bb234d7583d8ceb55f19e46176def7d1d4370fe99aedb89e28860cc49134f693bf0f49ff4333916441742da72cf65ad7ef6353c72a SHA512 159b2c09d0da83841f77822b4501cc4302758711c9db9447e6c34ebe6185801cbacb4774060d238f7c5aee4595ccc4e0e05f062300f38e27ff86a54a2dce4a95
-EBUILD mariadb-10.0.37.ebuild 27521 BLAKE2B 2dee454767b07e9ef957a3d44d3abebb3bace6a7119b81c7662051a3db9315382d3ea1f73dd03380da695ba16d724560d2b03eea3dd09eb206abcaee1358de7a SHA512 d90e140866541db92272855beb315aea7f037304e018efa6ac090b9d838864de0b7efe24d63ffdc2bc605ce659e0a8b722e2c7650ba21d740ab7d337ddd2c9d2
-EBUILD mariadb-10.0.38.ebuild 27522 BLAKE2B 289f91951215684d00bf45cc65492a5d327b5e1dab19f718bd80acf17546a617eb36b2ff6f63994cda84e9acf59268139e1862e1f74184644c339671ca8294c5 SHA512 320c74a1c3682fd9ae33ee24d7c6afc2208869235ebbabb035437e572facccada40500643ce3f879150e2a04d20f2f5c9042f0721ff88de6ec2d038bd7ac319a
EBUILD mariadb-10.1.34.ebuild 29472 BLAKE2B 859741b70abf8c2347395b26b7543f36be94165141227bb7dc75f054768490bf891eea5bd2f171aa0c0f8caed7603abf1347a0087caa10e55ce920aaa9c6677b SHA512 ff30a1fcdcc72b8324dec1be29db63a1792ca58474744f0c02014b1fba28d856ac0f154235b0889aedcc95cf24c4b58fcfd681458be726609861ba6f4220ad8f
EBUILD mariadb-10.1.37.ebuild 29472 BLAKE2B df997764c777f3efd80b1d93c5e3203e27396f8eec2661c5c4b4b4bf9c561f377f6d7eb968db8cb88ec95bc417301ded6c479e2fe6b39bc6d94b985b8569952d SHA512 518b6776ba6f8529675d5ffe9e9e0932a65a35ca399ba58bfcd473b3b7f7d522e1d4c3f4c451b11db555f2334dd17d6de21bbff24d9e82faa59117dfa882861c
EBUILD mariadb-10.1.38-r1.ebuild 29462 BLAKE2B 8818ad1e16db6c698d7020b8ea7e898ea5b5bb24e57584c137152be344b0de7186aac040348f20f3dd07ee4c0bf828087df99e1b0ac985c5aa51e8867caa9f95 SHA512 75b0e958d3adf985c2159bcc8876bfafc371071eff9d589504c7f7d4ce4d9d831de140122e5bceb6666f25b4fd3d4f015b57f63d5b171bcb5d2e39391e4a596b
diff --git a/dev-db/mariadb/mariadb-10.0.35-r2.ebuild b/dev-db/mariadb/mariadb-10.0.35-r2.ebuild
deleted file mode 100644
index f65b4a26a930..000000000000
--- a/dev-db/mariadb/mariadb-10.0.35-r2.ebuild
+++ /dev/null
@@ -1,848 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20180809-1700Z"
-SUBSLOT="18"
-
-JAVA_PKG_OPT_USE="jdbc"
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils multilib-build
-
-SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
- SRC_URI="${SRC_URI}
- mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://mariadb.org/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="bindist client-libs debug extraengine jdbc jemalloc latin1 libressl
- numa odbc oqgraph pam +perl profiling selinux +server sphinx
- static static-libs systemtap tcmalloc
- test tokudb xml yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="jdbc? ( extraengine server !static )
- server? ( tokudb? ( jemalloc !tcmalloc ) )
- ?? ( tcmalloc jemalloc )
- static? ( yassl !pam )"
-
-KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
- inherit git-r3
- EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
- EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
- EGIT_CLONE_TYPE=shallow
-else
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
- "${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch"
- "${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-10.0.33.patch"
- "${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch"
- "${MY_PATCH_DIR}/20018_all_mariadb-10.0.20-without-clientlibs-tools.patch"
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- kernel_linux? (
- sys-process/procps:0=
- dev-libs/libaio:0=
- )
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- jemalloc? ( dev-libs/jemalloc:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- !yassl? (
- !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
- libressl? ( dev-libs/libressl:0= )
- )
- >=sys-libs/zlib-1.2.3:0=
- sys-libs/ncurses:0=
- !bindist? (
- >=sys-libs/readline-4.1:0=
- )
- server? (
- extraengine? (
- odbc? ( dev-db/unixODBC:0= )
- xml? ( dev-libs/libxml2:2= )
- )
- numa? ( sys-process/numactl )
- oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
- pam? ( virtual/pam:0= )
- tokudb? ( app-arch/snappy )
- )
- >=dev-libs/libpcre-8.41-r1:3=
- !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
- static? ( sys-libs/ncurses[static-libs] )
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
- ${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
- client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
- !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- ${COMMON_DEPEND}
- perl? ( !dev-db/mytop
- virtual/perl-Getopt-Long
- dev-perl/TermReadKey
- virtual/perl-Term-ANSIColor
- virtual/perl-Time-HiRes )
- server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
- # non x86{,_64} arches
- if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- fi
- java-pkg-opt-2_pkg_setup
- if has test ${FEATURES} && \
- use server && ! has userpriv ${FEATURES} ; then
- eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- # This should come after all of the die statements
- enewgroup mysql 60 || die "problem adding 'mysql' group"
- enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
- java-pkg-opt-2_pkg_preinst
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
- if use server ; then
- if use pam; then
- einfo
- elog "This install includes the PAM authentication plugin."
- elog "To activate and configure the PAM plugin, please read:"
- elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
- einfo
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- elog
- elog "If you are switching server implentations, you should run the"
- elog "mysql_upgrade tool."
- einfo
- else
- einfo
- elog "If you are upgrading major versions, you should run the"
- elog "mysql_upgrade tool."
- einfo
- fi
-
- einfo
- elog "Be sure to edit the my.cnf file to activate your cluster settings."
- elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
- elog "The first time the cluster is activated, you should add"
- elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
- elog "This option should then be removed for subsequent starts."
- einfo
- fi
-}
-
-src_unpack() {
- unpack ${A}
- # Grab the patches
- [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
-
- mv -f "${WORKDIR%/}/${P}" "${S}" || die
-}
-
-src_prepare() {
- _disable_engine() {
- echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
- }
-
- _disable_plugin() {
- echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
- }
-
- if use tcmalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
- fi
-
- # Don't build bundled xz-utils for tokudb
- echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
- sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
- sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
-
- local plugin
- local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
- locale_info qc_info server_audit semisync sql_errlog )
- local test_plugins=( audit_null auth_examples daemon_example fulltext )
- if ! use server; then # These plugins are for the server
- for plugin in "${server_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- if ! use test; then # These plugins are only used during testing
- for plugin in "${test_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- # Collides with mariadb-connector-c bug 655980
- _disable_plugin auth_dialog
-
- # Don't build Mroonga or example
- _disable_engine mroonga
- _disable_engine example
-
- if ! use oqgraph ; then # avoids extra library checks
- _disable_engine oqgraph
- fi
-
- cmake-utils_src_prepare
- java-pkg-opt-2_src_prepare
-}
-
-src_configure(){
- # bug 508724 mariadb cannot use ld.gold
- tc-ld-disable-gold
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
- -DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/mariadb
- -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
- -DINSTALL_SCRIPTDIR=share/mariadb/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- -DWITH_ZLIB=system
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- # The build forces this to be defined when cross-compiling. We pass it
- # all the time for simplicity and to make sure it is actually correct.
- -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
- -DWITHOUT_CLIENTLIBS=YES
- -DWITH_READLINE=$(usex bindist 1 0)
- -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
- -DENABLE_DTRACE=$(usex systemtap)
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use yassl ; then
- mycmakeargs+=( -DWITH_SSL=system )
- else
- mycmakeargs+=( -DWITH_SSL=bundled )
- fi
-
- if use server ; then
-
- # Federated{,X} must be treated special otherwise they will not be built as plugins
- if ! use extraengine ; then
- mycmakeargs+=(
- -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
- -DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
- fi
-
- mycmakeargs+=(
- -DWITH_JEMALLOC=$(usex jemalloc system)
- -DWITH_PCRE=system
- -D$(usex sphinx WITH WITHOUT)_SPHINX_STORAGE_ENGINE=1
- -D$(usex tokudb WITH WITHOUT)_TOKUDB_STORAGE_ENGINE=1
- -D$(usex oqgraph WITH WITHOUT)_AUTH_PAM=1
- -D$(usex extraengine WITH WITHOUT)_SEQUENCE_STORAGE_ENGINE=1
- -D$(usex extraengine WITH WITHOUT)_SPIDER_STORAGE_ENGINE=1
- -D$(usex extraengine WITH WITHOUT)_CONNECT_STORAGE_ENGINE=1
- -DCONNECT_WITH_LIBXML2=$(usex xml)
- -DCONNECT_WITH_ODBC=$(usex odbc)
- -DCONNECT_WITH_JDBC=$(usex jdbc)
- # Build failure and autodep wrt bug 639144
- -DCONNECT_WITH_MONGO=OFF
- -DINSTALL_SQLBENCHDIR=share/mariadb
- )
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
-
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_EMBEDDED_SERVER=OFF
- -DENABLED_PROFILING=$(usex profiling)
- )
-
- if use static; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- if use jemalloc || use tcmalloc ; then
- mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- -DWITH_PARTITION_STORAGE_ENGINE=1
- )
-
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DEXTRA_CHARSETS=none
- -DINSTALL_SQLBENCHDIR=
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
- if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
- rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
- fi
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED%/}/usr/data" ]] ; then
- rm -Rf "${ED%/}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
- local mycnf_src="my.cnf-5.6-r1"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR%/}/${mycnf_src}" \
- > "${TMPDIR%/}/my.cnf.ok" || die
- use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR%/}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR%/}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" my.cnf
-
- if use server ; then
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S%/}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S%/}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- # Manually install supporting files that conflict with other packages
- # but are needed for galera and initial installation
- exeinto /usr/libexec/mariadb
- doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mariadb-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MariaDB 10.0 for now and are believed to be
- # false positives:
- #
- # main.mysql_client_test, main.mysql_client_test_nonblock
- # main.mysql_client_test_comp:
- # segfaults at random under Portage only, suspect resource limits.
-
- local t
- for t in main.mysql_client_test main.mysql_client_test_nonblock \
- main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \
- rpl.rpl_semi_sync_uninstall_plugin ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- if ! use client-libs ; then
- _disable_test main.plugin_auth "Needs client libraries built"
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd > /dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_config() {
- _getoptval() {
- local mypd="${EROOT}"/usr/bin/my_print_defaults
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
- }
- local old_MY_DATADIR="${MY_DATADIR}"
- local old_HOME="${HOME}"
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- export HOME=${EPREFIX}/root
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
- if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
- die "Minimal builds do NOT include the MySQL server"
- fi
-
- if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
- local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
- MY_DATADIR_s="${MY_DATADIR_s%%/}"
- local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
- old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
- if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
- ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
- else
- elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
- mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
- || die "Moving MY_DATADIR failed"
- fi
- else
- ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Attempting to use ${MY_DATADIR_s}"
- else
- eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
- die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
- fi
- fi
- fi
-
- local pwd1="a"
- local pwd2="b"
- local maxtry=15
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
- local tmp_mysqld_password_source=
-
- for tmp_mysqld_password_source in mysql client; do
- einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
- if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
- if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
- ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
- MYSQL_ROOT_PASSWORD=
- continue
- fi
-
- einfo "Found password in '${tmp_mysqld_password_source}' section!"
- break
- fi
- done
-
- # Sometimes --show is required to display passwords in some implementations of my_print_defaults
- if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
- fi
-
- unset tmp_mysqld_password_source
- fi
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see https://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in grant-tables host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
- local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile}
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- if [[ -n "${sqltmp}" ]] ; then
- ebegin "Loading \"zoneinfo\", this step may require a few seconds"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -uroot \
- --password="${MYSQL_ROOT_PASSWORD}" \
- mysql < "${sqltmp}"
- rc=$?
- eend $?
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
- fi
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mariadb/mariadb-10.0.37.ebuild b/dev-db/mariadb/mariadb-10.0.37.ebuild
deleted file mode 100644
index ea2124331e47..000000000000
--- a/dev-db/mariadb/mariadb-10.0.37.ebuild
+++ /dev/null
@@ -1,848 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20180809-1700Z"
-SUBSLOT="18"
-
-JAVA_PKG_OPT_USE="jdbc"
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils multilib-build
-
-SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
- SRC_URI="${SRC_URI}
- mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://mariadb.org/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="bindist client-libs debug extraengine jdbc jemalloc latin1 libressl
- numa odbc oqgraph pam +perl profiling selinux +server sphinx
- static static-libs systemtap tcmalloc
- test tokudb xml yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="jdbc? ( extraengine server !static )
- server? ( tokudb? ( jemalloc !tcmalloc ) )
- ?? ( tcmalloc jemalloc )
- static? ( yassl !pam )"
-
-KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
- inherit git-r3
- EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
- EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
- EGIT_CLONE_TYPE=shallow
-else
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
- "${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch"
- "${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-10.0.33.patch"
- "${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch"
- "${MY_PATCH_DIR}/20018_all_mariadb-10.0.20-without-clientlibs-tools.patch"
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- kernel_linux? (
- sys-process/procps:0=
- dev-libs/libaio:0=
- )
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- jemalloc? ( dev-libs/jemalloc:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- !yassl? (
- !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
- libressl? ( dev-libs/libressl:0= )
- )
- >=sys-libs/zlib-1.2.3:0=
- sys-libs/ncurses:0=
- !bindist? (
- >=sys-libs/readline-4.1:0=
- )
- server? (
- extraengine? (
- odbc? ( dev-db/unixODBC:0= )
- xml? ( dev-libs/libxml2:2= )
- )
- numa? ( sys-process/numactl )
- oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
- pam? ( virtual/pam:0= )
- tokudb? ( app-arch/snappy )
- )
- >=dev-libs/libpcre-8.41-r1:3=
- !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
- static? ( sys-libs/ncurses[static-libs] )
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
- ${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
- client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
- !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- ${COMMON_DEPEND}
- perl? ( !dev-db/mytop
- virtual/perl-Getopt-Long
- dev-perl/TermReadKey
- virtual/perl-Term-ANSIColor
- virtual/perl-Time-HiRes )
- server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
- # non x86{,_64} arches
- if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- fi
- java-pkg-opt-2_pkg_setup
- if has test ${FEATURES} && \
- use server && ! has userpriv ${FEATURES} ; then
- eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- # This should come after all of the die statements
- enewgroup mysql 60 || die "problem adding 'mysql' group"
- enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
- java-pkg-opt-2_pkg_preinst
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
- if use server ; then
- if use pam; then
- einfo
- elog "This install includes the PAM authentication plugin."
- elog "To activate and configure the PAM plugin, please read:"
- elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
- einfo
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- elog
- elog "If you are switching server implentations, you should run the"
- elog "mysql_upgrade tool."
- einfo
- else
- einfo
- elog "If you are upgrading major versions, you should run the"
- elog "mysql_upgrade tool."
- einfo
- fi
-
- einfo
- elog "Be sure to edit the my.cnf file to activate your cluster settings."
- elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
- elog "The first time the cluster is activated, you should add"
- elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
- elog "This option should then be removed for subsequent starts."
- einfo
- fi
-}
-
-src_unpack() {
- unpack ${A}
- # Grab the patches
- [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
-
- mv -f "${WORKDIR%/}/${P}" "${S}" || die
-}
-
-src_prepare() {
- _disable_engine() {
- echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
- }
-
- _disable_plugin() {
- echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
- }
-
- if use tcmalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
- fi
-
- # Don't build bundled xz-utils for tokudb
- echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
- sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
- sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
-
- local plugin
- local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
- locale_info qc_info server_audit semisync sql_errlog )
- local test_plugins=( audit_null auth_examples daemon_example fulltext )
- if ! use server; then # These plugins are for the server
- for plugin in "${server_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- if ! use test; then # These plugins are only used during testing
- for plugin in "${test_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- # Collides with mariadb-connector-c bug 655980
- _disable_plugin auth_dialog
-
- # Don't build Mroonga or example
- _disable_engine mroonga
- _disable_engine example
-
- if ! use oqgraph ; then # avoids extra library checks
- _disable_engine oqgraph
- fi
-
- cmake-utils_src_prepare
- java-pkg-opt-2_src_prepare
-}
-
-src_configure(){
- # bug 508724 mariadb cannot use ld.gold
- tc-ld-disable-gold
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
- -DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/mariadb
- -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
- -DINSTALL_SCRIPTDIR=share/mariadb/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- -DWITH_ZLIB=system
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- # The build forces this to be defined when cross-compiling. We pass it
- # all the time for simplicity and to make sure it is actually correct.
- -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
- -DWITHOUT_CLIENTLIBS=YES
- -DWITH_READLINE=$(usex bindist 1 0)
- -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
- -DENABLE_DTRACE=$(usex systemtap)
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use yassl ; then
- mycmakeargs+=( -DWITH_SSL=system )
- else
- mycmakeargs+=( -DWITH_SSL=bundled )
- fi
-
- if use server ; then
-
- # Federated{,X} must be treated special otherwise they will not be built as plugins
- if ! use extraengine ; then
- mycmakeargs+=(
- -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
- -DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
- fi
-
- mycmakeargs+=(
- -DWITH_JEMALLOC=$(usex jemalloc system)
- -DWITH_PCRE=system
- -D$(usex sphinx WITH WITHOUT)_SPHINX_STORAGE_ENGINE=1
- -D$(usex tokudb WITH WITHOUT)_TOKUDB_STORAGE_ENGINE=1
- -D$(usex oqgraph WITH WITHOUT)_AUTH_PAM=1
- -D$(usex extraengine WITH WITHOUT)_SEQUENCE_STORAGE_ENGINE=1
- -D$(usex extraengine WITH WITHOUT)_SPIDER_STORAGE_ENGINE=1
- -D$(usex extraengine WITH WITHOUT)_CONNECT_STORAGE_ENGINE=1
- -DCONNECT_WITH_LIBXML2=$(usex xml)
- -DCONNECT_WITH_ODBC=$(usex odbc)
- -DCONNECT_WITH_JDBC=$(usex jdbc)
- # Build failure and autodep wrt bug 639144
- -DCONNECT_WITH_MONGO=OFF
- -DINSTALL_SQLBENCHDIR=share/mariadb
- )
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
-
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_EMBEDDED_SERVER=OFF
- -DENABLED_PROFILING=$(usex profiling)
- )
-
- if use static; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- if use jemalloc || use tcmalloc ; then
- mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- -DWITH_PARTITION_STORAGE_ENGINE=1
- )
-
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DEXTRA_CHARSETS=none
- -DINSTALL_SQLBENCHDIR=
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
- if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
- rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
- fi
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED%/}/usr/data" ]] ; then
- rm -Rf "${ED%/}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
- local mycnf_src="my.cnf-5.6-r1"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR%/}/${mycnf_src}" \
- > "${TMPDIR%/}/my.cnf.ok" || die
- use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR%/}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR%/}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" my.cnf
-
- if use server ; then
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S%/}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S%/}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- # Manually install supporting files that conflict with other packages
- # but are needed for galera and initial installation
- exeinto /usr/libexec/mariadb
- doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mariadb-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MariaDB 10.0 for now and are believed to be
- # false positives:
- #
- # main.mysql_client_test, main.mysql_client_test_nonblock
- # main.mysql_client_test_comp:
- # segfaults at random under Portage only, suspect resource limits.
-
- local t
- for t in main.mysql_client_test main.mysql_client_test_nonblock \
- main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \
- rpl.rpl_semi_sync_uninstall_plugin ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- if ! use client-libs ; then
- _disable_test main.plugin_auth "Needs client libraries built"
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd > /dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_config() {
- _getoptval() {
- local mypd="${EROOT}"/usr/bin/my_print_defaults
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
- }
- local old_MY_DATADIR="${MY_DATADIR}"
- local old_HOME="${HOME}"
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- export HOME=${EPREFIX}/root
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
- if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
- die "Minimal builds do NOT include the MySQL server"
- fi
-
- if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
- local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
- MY_DATADIR_s="${MY_DATADIR_s%%/}"
- local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
- old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
- if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
- ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
- else
- elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
- mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
- || die "Moving MY_DATADIR failed"
- fi
- else
- ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Attempting to use ${MY_DATADIR_s}"
- else
- eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
- die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
- fi
- fi
- fi
-
- local pwd1="a"
- local pwd2="b"
- local maxtry=15
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
- local tmp_mysqld_password_source=
-
- for tmp_mysqld_password_source in mysql client; do
- einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
- if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
- if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
- ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
- MYSQL_ROOT_PASSWORD=
- continue
- fi
-
- einfo "Found password in '${tmp_mysqld_password_source}' section!"
- break
- fi
- done
-
- # Sometimes --show is required to display passwords in some implementations of my_print_defaults
- if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
- fi
-
- unset tmp_mysqld_password_source
- fi
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see https://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in grant-tables host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
- local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile} \
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- if [[ -n "${sqltmp}" ]] ; then
- ebegin "Loading \"zoneinfo\", this step may require a few seconds"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -uroot \
- --password="${MYSQL_ROOT_PASSWORD}" \
- mysql < "${sqltmp}"
- rc=$?
- eend $?
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
- fi
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mariadb/mariadb-10.0.38.ebuild b/dev-db/mariadb/mariadb-10.0.38.ebuild
deleted file mode 100644
index 65dccca75b21..000000000000
--- a/dev-db/mariadb/mariadb-10.0.38.ebuild
+++ /dev/null
@@ -1,848 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20180809-1700Z"
-SUBSLOT="18"
-
-JAVA_PKG_OPT_USE="jdbc"
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils multilib-build
-
-SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
- SRC_URI="${SRC_URI}
- mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://mariadb.org/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="bindist client-libs debug extraengine jdbc jemalloc latin1 libressl
- numa odbc oqgraph pam +perl profiling selinux +server sphinx
- static static-libs systemtap tcmalloc
- test tokudb xml yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="jdbc? ( extraengine server !static )
- server? ( tokudb? ( jemalloc !tcmalloc ) )
- ?? ( tcmalloc jemalloc )
- static? ( yassl !pam )"
-
-KEYWORDS="alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
- inherit git-r3
- EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
- EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
- EGIT_CLONE_TYPE=shallow
-else
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
- "${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch"
- "${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-10.0.33.patch"
- "${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch"
- "${MY_PATCH_DIR}/20018_all_mariadb-10.0.20-without-clientlibs-tools.patch"
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- kernel_linux? (
- sys-process/procps:0=
- dev-libs/libaio:0=
- )
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- jemalloc? ( dev-libs/jemalloc:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- !yassl? (
- !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
- libressl? ( dev-libs/libressl:0= )
- )
- >=sys-libs/zlib-1.2.3:0=
- sys-libs/ncurses:0=
- !bindist? (
- >=sys-libs/readline-4.1:0=
- )
- server? (
- extraengine? (
- odbc? ( dev-db/unixODBC:0= )
- xml? ( dev-libs/libxml2:2= )
- )
- numa? ( sys-process/numactl )
- oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
- pam? ( virtual/pam:0= )
- tokudb? ( app-arch/snappy )
- )
- >=dev-libs/libpcre-8.41-r1:3=
- !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
- static? ( sys-libs/ncurses[static-libs] )
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
- ${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
- client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
- !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- ${COMMON_DEPEND}
- perl? ( !dev-db/mytop
- virtual/perl-Getopt-Long
- dev-perl/TermReadKey
- virtual/perl-Term-ANSIColor
- virtual/perl-Time-HiRes )
- server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
- # non x86{,_64} arches
- if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- fi
- java-pkg-opt-2_pkg_setup
- if has test ${FEATURES} && \
- use server && ! has userpriv ${FEATURES} ; then
- eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- # This should come after all of the die statements
- enewgroup mysql 60 || die "problem adding 'mysql' group"
- enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
- java-pkg-opt-2_pkg_preinst
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
- if use server ; then
- if use pam; then
- einfo
- elog "This install includes the PAM authentication plugin."
- elog "To activate and configure the PAM plugin, please read:"
- elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
- einfo
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- elog
- elog "If you are switching server implentations, you should run the"
- elog "mysql_upgrade tool."
- einfo
- else
- einfo
- elog "If you are upgrading major versions, you should run the"
- elog "mysql_upgrade tool."
- einfo
- fi
-
- einfo
- elog "Be sure to edit the my.cnf file to activate your cluster settings."
- elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
- elog "The first time the cluster is activated, you should add"
- elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
- elog "This option should then be removed for subsequent starts."
- einfo
- fi
-}
-
-src_unpack() {
- unpack ${A}
- # Grab the patches
- [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
-
- mv -f "${WORKDIR%/}/${P}" "${S}" || die
-}
-
-src_prepare() {
- _disable_engine() {
- echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
- }
-
- _disable_plugin() {
- echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
- }
-
- if use tcmalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
- fi
-
- # Don't build bundled xz-utils for tokudb
- echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
- sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
- sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
-
- local plugin
- local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
- locale_info qc_info server_audit semisync sql_errlog )
- local test_plugins=( audit_null auth_examples daemon_example fulltext )
- if ! use server; then # These plugins are for the server
- for plugin in "${server_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- if ! use test; then # These plugins are only used during testing
- for plugin in "${test_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- # Collides with mariadb-connector-c bug 655980
- _disable_plugin auth_dialog
-
- # Don't build Mroonga or example
- _disable_engine mroonga
- _disable_engine example
-
- if ! use oqgraph ; then # avoids extra library checks
- _disable_engine oqgraph
- fi
-
- cmake-utils_src_prepare
- java-pkg-opt-2_src_prepare
-}
-
-src_configure(){
- # bug 508724 mariadb cannot use ld.gold
- tc-ld-disable-gold
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
- -DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/mariadb
- -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
- -DINSTALL_SCRIPTDIR=share/mariadb/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- -DWITH_ZLIB=system
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- # The build forces this to be defined when cross-compiling. We pass it
- # all the time for simplicity and to make sure it is actually correct.
- -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
- -DWITHOUT_CLIENTLIBS=YES
- -DWITH_READLINE=$(usex bindist 1 0)
- -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
- -DENABLE_DTRACE=$(usex systemtap)
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use yassl ; then
- mycmakeargs+=( -DWITH_SSL=system )
- else
- mycmakeargs+=( -DWITH_SSL=bundled )
- fi
-
- if use server ; then
-
- # Federated{,X} must be treated special otherwise they will not be built as plugins
- if ! use extraengine ; then
- mycmakeargs+=(
- -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
- -DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
- fi
-
- mycmakeargs+=(
- -DWITH_JEMALLOC=$(usex jemalloc system)
- -DWITH_PCRE=system
- -D$(usex sphinx WITH WITHOUT)_SPHINX_STORAGE_ENGINE=1
- -D$(usex tokudb WITH WITHOUT)_TOKUDB_STORAGE_ENGINE=1
- -D$(usex oqgraph WITH WITHOUT)_AUTH_PAM=1
- -D$(usex extraengine WITH WITHOUT)_SEQUENCE_STORAGE_ENGINE=1
- -D$(usex extraengine WITH WITHOUT)_SPIDER_STORAGE_ENGINE=1
- -D$(usex extraengine WITH WITHOUT)_CONNECT_STORAGE_ENGINE=1
- -DCONNECT_WITH_LIBXML2=$(usex xml)
- -DCONNECT_WITH_ODBC=$(usex odbc)
- -DCONNECT_WITH_JDBC=$(usex jdbc)
- # Build failure and autodep wrt bug 639144
- -DCONNECT_WITH_MONGO=OFF
- -DINSTALL_SQLBENCHDIR=share/mariadb
- )
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
-
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_EMBEDDED_SERVER=OFF
- -DENABLED_PROFILING=$(usex profiling)
- )
-
- if use static; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- if use jemalloc || use tcmalloc ; then
- mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- -DWITH_PARTITION_STORAGE_ENGINE=1
- )
-
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DEXTRA_CHARSETS=none
- -DINSTALL_SQLBENCHDIR=
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
- if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
- rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
- fi
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED%/}/usr/data" ]] ; then
- rm -Rf "${ED%/}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
- local mycnf_src="my.cnf-5.6-r1"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR%/}/${mycnf_src}" \
- > "${TMPDIR%/}/my.cnf.ok" || die
- use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR%/}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR%/}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" my.cnf
-
- if use server ; then
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S%/}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S%/}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- # Manually install supporting files that conflict with other packages
- # but are needed for galera and initial installation
- exeinto /usr/libexec/mariadb
- doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mariadb-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MariaDB 10.0 for now and are believed to be
- # false positives:
- #
- # main.mysql_client_test, main.mysql_client_test_nonblock
- # main.mysql_client_test_comp:
- # segfaults at random under Portage only, suspect resource limits.
-
- local t
- for t in main.mysql_client_test main.mysql_client_test_nonblock \
- main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \
- rpl.rpl_semi_sync_uninstall_plugin ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- if ! use client-libs ; then
- _disable_test main.plugin_auth "Needs client libraries built"
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd > /dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_config() {
- _getoptval() {
- local mypd="${EROOT}"/usr/bin/my_print_defaults
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
- }
- local old_MY_DATADIR="${MY_DATADIR}"
- local old_HOME="${HOME}"
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- export HOME=${EPREFIX}/root
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
- if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
- die "Minimal builds do NOT include the MySQL server"
- fi
-
- if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
- local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
- MY_DATADIR_s="${MY_DATADIR_s%%/}"
- local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
- old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
- if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
- ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
- else
- elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
- mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
- || die "Moving MY_DATADIR failed"
- fi
- else
- ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Attempting to use ${MY_DATADIR_s}"
- else
- eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
- die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
- fi
- fi
- fi
-
- local pwd1="a"
- local pwd2="b"
- local maxtry=15
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
- local tmp_mysqld_password_source=
-
- for tmp_mysqld_password_source in mysql client; do
- einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
- if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
- if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
- ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
- MYSQL_ROOT_PASSWORD=
- continue
- fi
-
- einfo "Found password in '${tmp_mysqld_password_source}' section!"
- break
- fi
- done
-
- # Sometimes --show is required to display passwords in some implementations of my_print_defaults
- if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
- fi
-
- unset tmp_mysqld_password_source
- fi
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see https://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in grant-tables host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
- local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile} \
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- if [[ -n "${sqltmp}" ]] ; then
- ebegin "Loading \"zoneinfo\", this step may require a few seconds"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -uroot \
- --password="${MYSQL_ROOT_PASSWORD}" \
- mysql < "${sqltmp}"
- rc=$?
- eend $?
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
- fi
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/myodbc/Manifest b/dev-db/myodbc/Manifest
index 56040f63084b..7fc4774c9a4a 100644
--- a/dev-db/myodbc/Manifest
+++ b/dev-db/myodbc/Manifest
@@ -1,12 +1,16 @@
AUX 5.3-cmake-doc-path.patch 1480 BLAKE2B 5f89253a86fa97fbf4103fbe797f60449245195e9c8d0f6d7f065e654a402de0461459dd11d9d878f0794089261ee5ee9fac3240bf90f7c8382edb54d84b27a6 SHA512 aa2303161af2b53608acc127464951cf77492a1a90e869a58893ba10a014077d7f8f319325b77713fffceeaa002943f4ce52b6cb9571b0b3d3d7ab562601968d
AUX 5.3.10-cxxlinkage.patch 1027 BLAKE2B b3df78658e4fb3243debb6f95cea6c5530db309ffc50f3a6afaff8bce143d147b4645a4bef4a54f6d04203ea132d4245812f5a2473ad7e9899f6e6b3c0799213 SHA512 f4d6df55313ccba995c8bd2e182397ce2652c2fbc0f0706474386654fb890fc47cad3a18f306206e840a47b729569e9a0ccb1cc2401c5280792afc4f544b41fd
AUX 5.3.10-mariadb.patch 1744 BLAKE2B a9e33c86f999394d77757f69f1f314238123fa4158297961b4ce0f501e6fb743927e892c1f6640945842e843da56a826e5da1a968d84f7e5dcf3b2b4a590c0e8 SHA512 ebf62a2e0cc901fce81d0ad358f62d1c41494a5e35fb5a4df6913d1f4d5b8bbb638a23cabfe483818efa39688744b7be8b98d922b4bdff830de701c665da0fa0
+AUX 8.0-cmake-doc-path.patch 1384 BLAKE2B 96f2bb290e48363c9cfababb845732291f709a4f996f13ea39cb2dd5fc0a19a68dd87cbf3454fd48c5f2281ebb0f786f2415b6e45f5714c967e5ba5b5005bd5d SHA512 d2a007d9c6846ad22a1f43c621f0376085802f3b15ca846fa1dd5bc8c3fb6ec1dc913240cb1135ab16f9dd369c8680aba5f600c7d28660dd28bb06873d97cce3
+AUX 8.0.16-cxxlinkage.patch 1890 BLAKE2B 0b19115acada4abea75466891cced6979011736de9a64686b8ef5ec1f9bfad8c6297ac48f26d3297f24b6817cfaced033a3d42120bfb948cc1e9e7204665abc4 SHA512 460aad29170b8694cc6776553fef8ac15ca715f7dceea392f4a0c75fef98ac6e7a40cdd57c86ae4bcd216b942fa0a2ea92862defc54f8466ea32c74f6a6832e5
AUX cmake-doc-path.patch 1498 BLAKE2B b79110c92b7fc80c64fdf05b469c4bb333d68610ff4fadc78bd307689651e41bcd66f33fd782db1b69c863ef81faee3d5eb485d5c9bd284db8be3948d2bec7e7 SHA512 2e48af11efb55a1508402d5d1d717a3dfc9897bf0ccce5aa190792fb673ac78b27a9480e951a6347a2c8d0e2fe08a28c11fd08c55dbea835a93f525decaaf09e
AUX odbc.ini.m4 406 BLAKE2B 3a20c28b1971753a14a4aa4d30efcc7de833488501a41d9404987567623d48250ce1daea1d3138adaef36741c4f2e0eafc60eba554e5262b45084f93f5205160 SHA512 84ab2a3aab594123d42b65205a7faf8e91fe9416a9e3c4c4c354533b9a298395f59172649c91dc0b671392bfbe5baeaddb6aa47119ce4c825917f3977d9dd521
AUX odbcinst.ini.m4 118 BLAKE2B 6da835746e063f415ad7d640233cfd96e744cd56e12aaab4a21a2bf0bd5f1bd1e5c3d1c9a28522e3aa07c1261abac92301819d4112ac6a000a729aca9f7f7ad6 SHA512 6d929bbffd602a9f060a05998149a6b16334f8a5e3db30d02ff5d38c0065085d085042521e700b87a63766e32aa27ae92be72cef33c2a7aa8f6767b6b71c82c8
DIST mysql-connector-odbc-5.3.10-src.tar.gz 2646571 BLAKE2B e85e179ee8a54c8c98dd254e949c08227adc72141d52bc15935eafd60edaf95f47c12ca51fa9472ae29c761d5de2149277c58e6d3f02a566668be17f595ca7ba SHA512 ebe56b95a1690332959a7a37e8ed381b46730fb9f6fbd6522ddc1a6961e4c8cdac59681a957b33abeb6cae12f210278e4063daa59ce952d92acf427bc188e22b
DIST mysql-connector-odbc-5.3.9-linux-debian9-x86-32bit.tar.gz 11501665 BLAKE2B e41dd65d940c0c91c67e6ec4c46ea2c3327e96d372c493635d05833862f2aa73919410a9e9a9c090a6fa65fd29e022a9b088c07a5e11089aee04b3b86005ad1e SHA512 02fcf6ac88f6052206aa55b6fc2b37f499da26e596e8e64b1c20e87dc4a24f745416da56c6e1268feff60321f54cb45864b8d34e055ea2f99da37b6efeedc844
DIST mysql-connector-odbc-5.3.9-linux-debian9-x86-64bit.tar.gz 12013057 BLAKE2B e372cfb6ca49f9f01e9e60d7cd497fc009ec38dee76ca2cfb74cc95213b84ef1eebca85e1400f19c9715c0f9b2ef40fc212196e14189f5506be8d0e887507ce4 SHA512 b54ca167f762b4d8b988b4a91f14dc6a4bf49f55bc639ce8eecc9eba6c11400bd3494d74ef77ebe3348bdefd8fb5b8c1b62b3a6beebb926a1899da17ea4a1b44
+DIST mysql-connector-odbc-8.0.16-src.tar.gz 3986610 BLAKE2B c91760f8e0352a57adb5400700d22f52f70d5210d85ff0932f5288f19c917c771ce9ea9abad097d27a9723c585d1029d56c09f6865f634f9c41ad852690e016d SHA512 b7ddcdf635441bc3ed0325a8562f453e42d3c9768b0fe0b42d9b5417e268f4631e3fca3c2adc417c124ede37254c7b1890c792593d846ecaf5b158ce4b4808cd
EBUILD myodbc-5.3.10-r2.ebuild 3588 BLAKE2B db9749af6dd80c60ae359485e3526258e43ea7003b2302076b0ef39a72098663b27f9413d050809328fe4348f5c129135f163da8d895f65d8c9f76bd53415eb4 SHA512 33d3aced0bc4575baa860dc53f1a6b35b6a5dc2e1815d88922d66c5270e570deaa0dc20018d9329c4651cef00f48b902b208671dd0836e7224d11972491b9e66
EBUILD myodbc-5.3.9.ebuild 3072 BLAKE2B 4922ed231672f11742590007b7b1f5c5dfa27263a6c98893b373793da06088f29c5401917179d479f4c57b24b2a1be9c3507caa752db79f3268fceff4719013d SHA512 4da8b034a745c453a310391a38e5cb1697bfa51838edc6903ee643e7dbe28fa5fb8f7d34264f88bb79b2aba83fa042212c0a2dd251c15150f7f0a2fcf561e052
+EBUILD myodbc-8.0.16.ebuild 3101 BLAKE2B 28664fd845b3bfb251e2f754c06b1b21ac1fb0ce85fbcaf620ff4ebea4ee181fe3c2f7c00ff8b47a084dc2e31a893c35f2d28e6176a4a40d508a6b0ebdfd57cd SHA512 856408b130fad4e4fc70fd48d841a2969aa85df46eeebb1d1476e5054b5d78af8e799463a7314f6db4131e4868146d6838c528b85f5bec1c569230231516a2cc
MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b
diff --git a/dev-db/myodbc/files/8.0-cmake-doc-path.patch b/dev-db/myodbc/files/8.0-cmake-doc-path.patch
new file mode 100644
index 000000000000..405c39e0bcd4
--- /dev/null
+++ b/dev-db/myodbc/files/8.0-cmake-doc-path.patch
@@ -0,0 +1,42 @@
+diff -aurN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2019-06-11 11:21:59.723705824 -0400
++++ b/CMakeLists.txt 2019-06-11 11:26:11.109625713 -0400
+@@ -71,6 +71,12 @@
+
+ INCLUDE(version.cmake)
+
++IF(WITH_DOCUMENTATION_INSTALL_PATH)
++ set(DOCUMENTATION_INSTALL_PATH ${WITH_DOCUMENTATION_INSTALL_PATH})
++ELSE(WITH_DOCUMENTATION_INSTALL_PATH)
++ set(DOCUMENTATION_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/share/doc/myodbc-${CONNECTOR_MAJOR}.${CONNECTOR_MINOR})
++ENDIF(WITH_DOCUMENTATION_INSTALL_PATH)
++
+ IF(NOT WIN32)
+ INCLUDE(CheckFunctionExists)
+ CHECK_FUNCTION_EXISTS(dlopen DLOPEN_IN_LIBC)
+@@ -520,13 +526,10 @@
+ #------------ Installation ---------------------------
+-INCLUDE(cmake/info_bin.cmake)
+
+-INSTALL(FILES LICENSE.txt DESTINATION .)
+-
+ if(EXISTS "${CMAKE_SOURCE_DIR}/README.txt")
+- INSTALL(FILES README.txt DESTINATION .)
++ INSTALL(FILES README.txt DESTINATION ${DOCUMENTATION_INSTALL_PATH})
+ else()
+- INSTALL(FILES README.md DESTINATION .)
+- INSTALL(FILES CONTRIBUTING.md DESTINATION .)
++ INSTALL(FILES README.md DESTINATION ${DOCUMENTATION_INSTALL_PATH})
++ INSTALL(FILES CONTRIBUTING.md DESTINATION ${DOCUMENTATION_INSTALL_PATH})
+ endif()
+
+ IF(WIN32)
+@@ -567,7 +571,7 @@
+
+ ELSE(WIN32)
+
+- INSTALL(FILES ChangeLog DESTINATION .)
++ INSTALL(FILES ChangeLog DESTINATION ${DOCUMENTATION_INSTALL_PATH})
+
+ ENDIF(WIN32)
+
diff --git a/dev-db/myodbc/files/8.0.16-cxxlinkage.patch b/dev-db/myodbc/files/8.0.16-cxxlinkage.patch
new file mode 100644
index 000000000000..326036c0b88d
--- /dev/null
+++ b/dev-db/myodbc/files/8.0.16-cxxlinkage.patch
@@ -0,0 +1,63 @@
+diff -aurN a/cmake/FindMySQL.cmake b/cmake/FindMySQL.cmake
+--- a/cmake/FindMySQL.cmake 2016-11-29 07:40:13.000000000 -0500
++++ b/cmake/FindMySQL.cmake 2017-02-17 13:59:18.115389096 -0500
+@@ -747,7 +747,7 @@
+ endif()
+
+ if(NOT MYSQL_CXXFLAGS)
+- if(MYSQL_CXX_LINKAGE OR MYSQL_VERSION_ID GREATER 50603)
++ if(MYSQL_CXX_LINKAGE)
+ _mysql_conf(MYSQL_CXXFLAGS "--cxxflags")
+ set(MYSQL_CXX_LINKAGE 1)
+ else()
+diff -aurN a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2018-02-10 21:41:13.161553751 -0500
++++ b/CMakeLists.txt 2018-02-10 21:45:20.038398824 -0500
+@@ -379,10 +379,9 @@
+ SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
+ SET(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
+
+-SET(LIB_SUBDIR "lib")
+-IF(RPM_BUILD AND CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|ppc64|ppc64p7|s390x|sparc64|aarch64)")
+- SET(LIB_SUBDIR "lib64")
+-ENDIF()
++IF(NOT LIB_SUBDIR)
++ MESSAGE(ERROR "LIB_SUBDIR is not set")
++ENDIF(NOT LIB_SUBDIR)
+
+ MESSAGE(STATUS "Installation library subdir: ${LIB_SUBDIR}")
+
+diff -aurN a/driver/CMakeLists.txt b/driver/CMakeLists.txt
+--- a/driver/CMakeLists.txt 2019-06-11 13:46:37.863345781 -0400
++++ b/driver/CMakeLists.txt 2019-06-11 14:04:25.758997218 -0400
+@@ -194,29 +194,3 @@
+
+ ENDWHILE(${DRIVER_INDEX} LESS ${DRIVERS_COUNT})
+
+-IF(MYSQL8)
+- SET(ssl_libs_to_find
+- libcrypto.*
+- libssl.*
+- libeay32.*
+- ssleay32.*
+- )
+-
+- SET(_SSL_PATH)
+-
+- IF(WIN32)
+- SET(_SSL_PATH ${MYSQL_DIR}/bin/)
+- ELSE(WIN32)
+- SET(_SSL_PATH ${MYSQL_DIR}/lib/)
+- ENDIF(WIN32)
+-
+- FOREACH(_lib_to_find IN LISTS ssl_libs_to_find)
+- INSTALL(DIRECTORY ${_SSL_PATH} DESTINATION ${LIB_SUBDIR}
+- FILES_MATCHING
+- PATTERN "mecab" EXCLUDE
+- PATTERN "pkgconfig" EXCLUDE
+- PATTERN "plugin" EXCLUDE
+- PATTERN ${_lib_to_find})
+- ENDFOREACH()
+-
+-ENDIF(MYSQL8)
+\ No newline at end of file
diff --git a/dev-db/myodbc/myodbc-8.0.16.ebuild b/dev-db/myodbc/myodbc-8.0.16.ebuild
new file mode 100644
index 000000000000..a5db40b27ad7
--- /dev/null
+++ b/dev-db/myodbc/myodbc-8.0.16.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-multilib
+
+MAJOR="$(ver_cut 1-2)"
+MY_PN="mysql-connector-odbc"
+MY_P="${MY_PN}-${PV/_p/r}-src"
+
+DESCRIPTION="ODBC driver for MySQL"
+HOMEPAGE="http://www.mysql.com/products/myodbc/"
+SRC_URI="https://dev.mysql.com/get/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="${MAJOR}"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+# Broken when built dynamically against libmysqlclient.so
+RDEPEND="
+ dev-db/unixODBC[${MULTILIB_USEDEP}]
+ >=dev-db/mysql-connector-c-8.0:0=[static-libs,${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+S=${WORKDIR}/${MY_P}
+
+# Careful!
+DRIVER_NAME="${PN}-${SLOT}"
+
+# Patch document path so it doesn't install files to /usr
+PATCHES=(
+ "${FILESDIR}/${MAJOR}-cmake-doc-path.patch"
+ "${FILESDIR}/8.0.16-cxxlinkage.patch"
+)
+
+src_prepare() {
+ # Remove Tests
+ sed -i -e "s/ADD_SUBDIRECTORY(test)//" \
+ "${S}/CMakeLists.txt"
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ mycmakeargs+=(
+ -DMYSQLCLIENT_STATIC_LINKING=1
+ -DMYSQL_CXX_LINKAGE=1
+ -DWITH_UNIXODBC=1
+ -DWITH_DOCUMENTATION_INSTALL_PATH=/usr/share/doc/${PF}
+ -DLIB_SUBDIR="$(get_libdir)/${PN}-${MAJOR}"
+ -DMYSQLCLIENT_NO_THREADS=ON
+ -DDISABLE_GUI=ON
+ # The NUMA and LIBWRAP options are not really used.
+ # They are just copied from the server code
+ -DWITH_NUMA=OFF
+ -DWITH_LIBWRAP=OFF
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install_all() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ dodir /usr/share/${PN}-${SLOT}
+ for i in odbc.ini odbcinst.ini; do
+ einfo "Building $i"
+ sed \
+ -e "s,__PN__,${DRIVER_NAME},g" \
+ -e "s,__PF__,${MAJOR},g" \
+ -e "s,lib/libmyodbc3.so,$(get_libdir)/${PN}-${MAJOR}/libmyodbc${SLOT:0:1}a.so,g" \
+ >"${D}"/usr/share/${PN}-${SLOT}/${i} \
+ <"${FILESDIR}"/${i}.m4 \
+ || die "Failed to build $i"
+ done;
+ mv "${D}/usr/bin/myodbc-installer" \
+ "${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary"
+}
+
+pkg_config() {
+
+ [ "${ROOT}" != "/" ] && \
+ die 'Sorry, non-standard ROOT setting is not supported :-('
+
+ local msg='MySQL ODBC driver'
+ local drivers=$(/usr/bin/odbcinst -q -d)
+
+ if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+
+ local sources=$(/usr/bin/odbcinst -q -s)
+ msg='sample MySQL ODBC DSN'
+ if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+}
+
+pkg_postinst() {
+
+ elog "If this is a new install, please run the following command"
+ elog "to configure the MySQL ODBC drivers and sources:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog "Please note that the driver name used to form the DSN now includes the SLOT."
+ elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}"
+}
diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 60ccc5d80a45..e55923f25bb4 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -1,6 +1,9 @@
AUX 20028_all_mysql-5.6-gcc7.patch 603 BLAKE2B f03dc2e39dca4496cc084b427daa60014464876df456bf290a5de3431b481691a35ac9ac00d71cc86931efe3bca70dae012bedefc6d29ad7fec2feeb07cce014 SHA512 f9dab813418f38f3a877b8672cdec153d6f0f289144c35277e8275cc7a58195f974b7bf76b74f8dd2403643b1199f5e6d6bcde661ce5f79f614ff10347b52278
AUX 6.1.11-openssl-1.1.patch 8987 BLAKE2B 8bd00bb778e086cbdcd04b6ac904f36bd64bbbb332f913129eb3acbaf6da4d044fdc65523626a9fed47d6bf5859826af489bd9ae7ae51664c613c966a88708ba SHA512 46af56504ed2a69ce74a5e2040ee8b3355f5ac48fb80e4668b635f01a2650d07f50dd098ad43239e8b35a80e975a5a9549bd1b1a9c1a0612ed9e4750b537bb76
+AUX 8.0.16-libressl.patch 12591 BLAKE2B add6c31d6ea29af0b97e4f4558a006de899bf33a75ac37b20c4feb539a568a9bdec20db6bf6f3e5a64488af8740fba566d3166ea7f339f98f7c9df738bb63c71 SHA512 49ac3e698be404eb13771e3850a6b37c1f839fda1d710be7f53369d457236e14423e6d8877dfa0a580c0e700cc4c33f3fa2b5e87c9ad14e8f88899451a51a91e
AUX mysql_com.patch 1787 BLAKE2B 4fbd40325f400586926072927b3f07231d577f18c1e30951c34c36ded9b9e42b7c3dc47ca51df974265c28b40116e30274d8a73d6a843e5d9d0074430bc17b08 SHA512 340365b05d72045af0ef12fd5c260a796be547d9abb97a6ef3d6aaf30aecf29368c1dfa28f1284da544a81656f0436f11ada2f8c5cb481540d1f1c90dd354b49
+DIST mysql-boost-8.0.16.tar.gz 145939027 BLAKE2B f8e94c6aa686a3f3a2fd231676070760081c6bbf0d652ce09e9bfb6f9dc86fc96dba5739ac8721bfd55c947e44c7de4c37ff5f8bb56db5e08484cf586e143add SHA512 4de08d74637d1fef4f570148e66c8ddf2b59d1c0a49d715ca632da7f572645b65ec5f7c115aaf0bd179b0a9f1ba2bc40357c371f170a674118159d99b2c49516
DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6
EBUILD mysql-connector-c-6.1.11-r1.ebuild 2467 BLAKE2B 5795de122ab9ef63747a97780817358fce1ef8baf537dec5bfe0507646e6bd6202b63df278a925fe348d948d44f3307ba00a62dd991e1074a79c065b6b9e6048 SHA512 deb188e6e6c6d0555e265b6b2c283a50d1f4158e73b3d17f0741f046b7c249d983ae4c55b80206a3a7b27c32ad1f9577aded60d6ea2b2d8fd238f6ac3aea1342
+EBUILD mysql-connector-c-8.0.16.ebuild 2284 BLAKE2B 81b433c6fe3cb706d984cfee6eaa43500a6505e082fae39607d9b7a80044bbf947a065cb3753b6ac22a9108a2e5b5dbfed87efd8cdc78626de23d01143744110 SHA512 96486b5cd5b215b72242601010c9ed1a3d3e1f6cbeee4d63a13a86b00934b8d4f1f31e6c3aac8a61e1bd58c9d7841ef7345cc937c620108114c272a641e06eb2
MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b
diff --git a/dev-db/mysql-connector-c/files/8.0.16-libressl.patch b/dev-db/mysql-connector-c/files/8.0.16-libressl.patch
new file mode 100644
index 000000000000..079211dd86f7
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/8.0.16-libressl.patch
@@ -0,0 +1,302 @@
+From 521750b438d96bef234b338901ff74f239b68061 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <steils@gentoo.org>
+Date: Sat, 8 Jun 2019 15:52:26 +0300
+Subject: [PATCH] Fix build with LibreSSL
+
+- Fix version checks as OPENSSL_VERSION_NUMBER in OpenSSL is always
+ 0x20000000L.
+- FIPS support is removed from LibreSSL, do not use it.
+- Check for TLS1_3_VERSION define, not OpenSSL/LibreSSL version.
+ Theoretically even OpenSSL >=1.1.1 can be built with TLS 1.3 disabled.
+---
+ cmake/ssl.cmake | 5 +++--
+ extra/libevent/openssl-compat.h | 5 ++++-
+ mysys_ssl/my_md5.cc | 2 +-
+ .../src/bindings/xcom/xcom/xcom_ssl_transport.c | 4 ++--
+ plugin/x/client/xconnection_impl.cc | 4 ++--
+ router/src/http/src/tls_client_context.cc | 2 +-
+ router/src/http/src/tls_context.cc | 6 +++++-
+ router/src/http/src/tls_server_context.cc | 3 ++-
+ sql-common/client.cc | 3 ++-
+ sql/mysqld.cc | 4 ++--
+ sql/sys_vars.cc | 8 ++++----
+ vio/viossl.cc | 4 ++--
+ vio/viosslfactories.cc | 2 +-
+ 13 files changed, 31 insertions(+), 21 deletions(-)
+
+diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
+index be3411a8916..95ed535f08a 100644
+--- a/cmake/ssl.cmake
++++ b/cmake/ssl.cmake
+@@ -313,13 +313,14 @@ MACRO (MYSQL_CHECK_SSL)
+ OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
+ )
+ ENDIF()
+- IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
++ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION)
++ IF(HAVE_TLS1_3_VERSION)
+ ADD_DEFINITIONS(-DHAVE_TLSv13)
+ ENDIF()
+ IF(OPENSSL_INCLUDE_DIR AND
+ OPENSSL_LIBRARY AND
+ CRYPTO_LIBRARY AND
+- OPENSSL_MAJOR_VERSION STREQUAL "1"
++ OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1"
+ )
+ SET(OPENSSL_FOUND TRUE)
+ FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
+diff --git a/extra/libevent/openssl-compat.h b/extra/libevent/openssl-compat.h
+index 69afc716e25..deb21d6ad77 100644
+--- a/extra/libevent/openssl-compat.h
++++ b/extra/libevent/openssl-compat.h
+@@ -24,7 +24,6 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
+ #define BIO_set_init(b, val) (b)->init = (val)
+ #define BIO_set_data(b, val) (b)->ptr = (val)
+ #define BIO_set_shutdown(b, val) (b)->shutdown = (val)
+-#define BIO_get_init(b) (b)->init
+ #define BIO_get_data(b) (b)->ptr
+ #define BIO_get_shutdown(b) (b)->shutdown
+
+@@ -32,4 +31,8 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name)
+
+ #endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#define BIO_get_init(b) (b)->init
++#endif
++
+ #endif /* OPENSSL_COMPAT_H */
+diff --git a/mysys_ssl/my_md5.cc b/mysys_ssl/my_md5.cc
+index 095fcb4eafb..0bdc885a96d 100644
+--- a/mysys_ssl/my_md5.cc
++++ b/mysys_ssl/my_md5.cc
+@@ -56,7 +56,7 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf,
+ int compute_md5_hash(char *digest, const char *buf, int len) {
+ int retval = 0;
+ int fips_mode = 0;
+-#if !defined(HAVE_WOLFSSL)
++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+ fips_mode = FIPS_mode();
+ #endif /* HAVE_WOLFSSL */
+ /* If fips mode is ON/STRICT restricted method calls will result into abort,
+diff --git a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c
+index 67c151b207b..6a18a717b23 100644
+--- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c
++++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c
+@@ -297,7 +297,7 @@ error:
+ return 1;
+ }
+
+-#ifndef HAVE_WOLFSSL
++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+ #define OPENSSL_ERROR_LENGTH 512
+ static int configure_ssl_fips_mode(const uint fips_mode) {
+ int rc = -1;
+@@ -521,7 +521,7 @@ int xcom_init_ssl(const char *server_key_file, const char *server_cert_file,
+ int verify_server = SSL_VERIFY_NONE;
+ int verify_client = SSL_VERIFY_NONE;
+
+-#ifndef HAVE_WOLFSSL
++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+ if (configure_ssl_fips_mode(ssl_fips_mode) != 1) {
+ G_ERROR("Error setting the ssl fips mode");
+ goto error;
+diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc
+index cab1836c34f..4ba28d8fb5f 100644
+--- a/plugin/x/client/xconnection_impl.cc
++++ b/plugin/x/client/xconnection_impl.cc
+@@ -489,7 +489,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
+ return XError(CR_SSL_CONNECTION_ERROR, buffer);
+ }
+
+-#ifndef HAVE_WOLFSSL
++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+ /**
+ Set fips mode in openssl library,
+ When we set fips mode ON/STRICT, it will perform following operations:
+@@ -539,7 +539,7 @@ XError Connection_impl::activate_tls() {
+ if (!m_context->m_ssl_config.is_configured())
+ return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED};
+
+-#ifndef HAVE_WOLFSSL
++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+ char err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
+ if (set_fips_mode((int)m_context->m_ssl_config.m_ssl_fips_mode, err_string) !=
+ 1) {
+diff --git a/router/src/http/src/tls_client_context.cc b/router/src/http/src/tls_client_context.cc
+index f9dff94d837..ae7413b43e9 100644
+--- a/router/src/http/src/tls_client_context.cc
++++ b/router/src/http/src/tls_client_context.cc
+@@ -54,7 +54,7 @@ void TlsClientContext::verify(TlsVerify verify) {
+
+ void TlsClientContext::cipher_suites(const std::string &ciphers) {
+ // TLSv1.3 ciphers are controlled via SSL_CTX_set_ciphersuites()
+-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1)
++#ifdef TLS1_3_VERSION
+ if (1 != SSL_CTX_set_ciphersuites(ssl_ctx_.get(), ciphers.c_str())) {
+ throw TlsError("set-cipher-suites");
+ }
+diff --git a/router/src/http/src/tls_context.cc b/router/src/http/src/tls_context.cc
+index bae36860fea..2cdc31274b6 100644
+--- a/router/src/http/src/tls_context.cc
++++ b/router/src/http/src/tls_context.cc
+@@ -92,7 +92,7 @@ static constexpr int o11x_version(TlsVersion version) {
+ return TLS1_1_VERSION;
+ case TlsVersion::TLS_1_2:
+ return TLS1_2_VERSION;
+-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1)
++#ifdef TLS1_3_VERSION
+ case TlsVersion::TLS_1_3:
+ return TLS1_3_VERSION;
+ #endif
+@@ -122,9 +122,11 @@ void TlsContext::version_range(TlsVersion min_version, TlsVersion max_version) {
+ default:
+ // unknown, leave all disabled
+ // fallthrough
++#ifdef TLS1_3_VERSION
+ case TlsVersion::TLS_1_3:
+ opts |= SSL_OP_NO_TLSv1_2;
+ // fallthrough
++#endif
+ case TlsVersion::TLS_1_2:
+ opts |= SSL_OP_NO_TLSv1_1;
+ // fallthrough
+@@ -171,8 +173,10 @@ TlsVersion TlsContext::min_version() const {
+ return TlsVersion::TLS_1_1;
+ case TLS1_2_VERSION:
+ return TlsVersion::TLS_1_2;
++#ifdef TLS1_3_VERSION
+ case TLS1_3_VERSION:
+ return TlsVersion::TLS_1_3;
++#endif
+ case 0:
+ return TlsVersion::AUTO;
+ default:
+diff --git a/router/src/http/src/tls_server_context.cc b/router/src/http/src/tls_server_context.cc
+index 4f3fa39cd28..ecc9755979b 100644
+--- a/router/src/http/src/tls_server_context.cc
++++ b/router/src/http/src/tls_server_context.cc
+@@ -162,7 +162,8 @@ void TlsServerContext::init_tmp_dh(const std::string &dh_params) {
+ }
+
+ } else {
+-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0)
++#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \
++ !defined(LIBRESSL_VERSION_NUMBER)
+ dh2048.reset(DH_get_2048_256());
+ #else
+ /*
+diff --git a/sql-common/client.cc b/sql-common/client.cc
+index d6d977970b7..af68f04104d 100644
+--- a/sql-common/client.cc
++++ b/sql-common/client.cc
+@@ -7515,7 +7515,8 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
+ #endif
+ break;
+ case MYSQL_OPT_SSL_FIPS_MODE: {
+-#if defined(HAVE_OPENSSL) && !defined(HAVE_WOLFSSL)
++#if defined(HAVE_OPENSSL) && \
++ !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+ char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
+ ENSURE_EXTENSIONS_PRESENT(&mysql->options);
+ mysql->options.extension->ssl_fips_mode = *(uint *)arg;
+diff --git a/sql/mysqld.cc b/sql/mysqld.cc
+index 13479e3c474..904bae80f8f 100644
+--- a/sql/mysqld.cc
++++ b/sql/mysqld.cc
+@@ -4640,7 +4640,7 @@ static int init_thread_environment() {
+
+ static PSI_memory_key key_memory_openssl = PSI_NOT_INSTRUMENTED;
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ #define FILE_LINE_ARGS
+ #else
+ #define FILE_LINE_ARGS , const char *, int
+@@ -4676,7 +4676,7 @@ static void init_ssl() {
+ }
+
+ static int init_ssl_communication() {
+-#ifndef HAVE_WOLFSSL
++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+ char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
+ int ret_fips_mode = set_fips_mode(opt_ssl_fips_mode, ssl_err_string);
+ if (ret_fips_mode != 1) {
+diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
+index b511c453f1e..8952922c1ff 100644
+--- a/sql/sys_vars.cc
++++ b/sql/sys_vars.cc
+@@ -4282,7 +4282,7 @@ static Sys_var_ulong Sys_max_execution_time(
+ HINT_UPDATEABLE SESSION_VAR(max_execution_time), CMD_LINE(REQUIRED_ARG),
+ VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1));
+
+-#ifndef HAVE_WOLFSSL
++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
+ char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
+ if (set_fips_mode(opt_ssl_fips_mode, ssl_err_string) != 1) {
+@@ -4295,7 +4295,7 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
+ }
+ #endif
+
+-#ifdef HAVE_WOLFSSL
++#if defined(HAVE_WOLFSSL) || defined(LIBRESSL_VERSION_NUMBER)
+ static const char *ssl_fips_mode_names[] = {"OFF", 0};
+ #else
+ static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", 0};
+@@ -4303,7 +4303,7 @@ static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", 0};
+ static Sys_var_enum Sys_ssl_fips_mode(
+ "ssl_fips_mode",
+ "SSL FIPS mode (applies only for OpenSSL); "
+-#ifndef HAVE_WOLFSSL
++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+ "permitted values are: OFF, ON, STRICT",
+ #else
+ "permitted values are: OFF",
+@@ -4311,7 +4311,7 @@ static Sys_var_enum Sys_ssl_fips_mode(
+ GLOBAL_VAR(opt_ssl_fips_mode), CMD_LINE(REQUIRED_ARG, OPT_SSL_FIPS_MODE),
+ ssl_fips_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ ON_CHECK(NULL),
+-#ifndef HAVE_WOLFSSL
++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+ ON_UPDATE(update_fips_mode),
+ #else
+ ON_UPDATE(NULL),
+diff --git a/vio/viossl.cc b/vio/viossl.cc
+index 97335eef321..e34b973f59e 100644
+--- a/vio/viossl.cc
++++ b/vio/viossl.cc
+@@ -507,7 +507,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
+ #if !defined(HAVE_WOLFSSL) && !defined(DBUG_OFF)
+ {
+ STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
+- ssl_comp_methods = SSL_COMP_get_compression_methods();
++ ssl_comp_methods = (STACK_OF(SSL_COMP) *)SSL_COMP_get_compression_methods();
+ n = sk_SSL_COMP_num(ssl_comp_methods);
+ DBUG_PRINT("info", ("Available compression methods:\n"));
+ if (n == 0)
+@@ -515,7 +515,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
+ else
+ for (j = 0; j < n; j++) {
+ SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j);
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ DBUG_PRINT("info", (" %d: %s\n", c->id, c->name));
+ #else /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+ DBUG_PRINT("info",
+diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc
+index 1a88dc3ed1d..a273c9991e7 100644
+--- a/vio/viosslfactories.cc
++++ b/vio/viosslfactories.cc
+@@ -429,7 +429,7 @@ void ssl_start() {
+ }
+ }
+
+-#ifndef HAVE_WOLFSSL
++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+ /**
+ Set fips mode in openssl library,
+ When we set fips mode ON/STRICT, it will perform following operations:
+--
+2.22.0
+
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.16.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.16.ebuild
new file mode 100644
index 000000000000..861e78121dc9
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.16.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-multilib
+
+# wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/"
+LICENSE="GPL-2"
+
+SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+SLOT="0/21"
+IUSE="ldap libressl +ssl static-libs"
+
+RDEPEND="
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
+ ssl? (
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ )
+ "
+DEPEND="${RDEPEND}"
+
+DOCS=( README )
+
+S="${WORKDIR}/mysql-${PV}"
+
+PATCHES=( "${FILESDIR}/8.0.16-libressl.patch" )
+
+src_prepare() {
+ sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
+
+ # All these are for the server only
+ sed -i \
+ -e '/MYSQL_CHECK_LIBEVENT/d' \
+ -e '/MYSQL_CHECK_RAPIDJSON/d' \
+ -e '/MYSQL_CHECK_ICU/d' \
+ -e '/MYSQL_CHECK_RE2/d' \
+ -e '/MYSQL_CHECK_LZ4/d' \
+ -e '/MYSQL_CHECK_EDITLINE/d' \
+ -e '/MYSQL_CHECK_CURL/d' \
+ -e '/ADD_SUBDIRECTORY(man)/d' \
+ -e '/ADD_SUBDIRECTORY(share)/d' \
+ -e '/INCLUDE(cmake\/boost/d' \
+ CMakeLists.txt || die
+
+ # Skip building clients
+ echo > client/CMakeLists.txt || die
+
+ # Forcefully disable auth plugin
+ if ! use ldap ; then
+ sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
+ echo > libmysql/authentication_ldap/CMakeLists.txt || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_LAYOUT=RPM
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+ -DWITH_DEFAULT_FEATURE_SET=OFF
+ -DENABLED_LOCAL_INFILE=ON
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
+ -DWITH_ZLIB=system
+ -DWITH_SSL=$(usex ssl system wolfssl)
+ -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+ -DSHARED_LIB_PATCH_VERSION="0"
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DWITHOUT_SERVER=ON
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+}
+
+multilib_src_install_all() {
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}
diff --git a/dev-db/pgmodeler/Manifest b/dev-db/pgmodeler/Manifest
index c011395021be..c494c3b3c976 100644
--- a/dev-db/pgmodeler/Manifest
+++ b/dev-db/pgmodeler/Manifest
@@ -1,3 +1,3 @@
DIST pgmodeler-0.9.1.tar.gz 3569027 BLAKE2B 4d91d430554f739b585ed155aa2d87dc648ea5d2d6a1c22ddd9ae829afb63654fe052091de5dea51b0fee20ef2ccaf5b77587f036c4072bbc623bffba9a67b27 SHA512 bb6f093e00f0e41a9dd2a9b7e3723459af759e79835b73ab67b01c23ae6b29f1453b5cf61e987c6f1a2a3908e700d048f0a7dcbed3ac1636493d6b6e657917ba
-EBUILD pgmodeler-0.9.1.ebuild 1252 BLAKE2B 8282a250196054296a0015f170112269f96bb70ad6c805f0c2b9c56076943b61da365e08590dc59e437e960b1274437f40db9382f1adaa2ca2d9883361462bac SHA512 dc52bf24883ae9894a3b7e3490fd53fbaa3ec20650136d88aea51738467dfd80317f5cea8ed1e971970a4b9652c333ca11111aaa3c5ea1aa42f96033cfa7fe26
+EBUILD pgmodeler-0.9.1.ebuild 1249 BLAKE2B 0db1aabfc00714d7285c8a7cad01a5366bd6773c24a24b3e86b2ca51499ed3a04431c0ee12a7c59f74479927bf6017ddf2a89f23d66971ed6f3cc2c458b5777d SHA512 d2f5d6125b44a148f6f73472063d8745c51a19c3aec05e90c8514cf9178e938122fe277e33b0772e4627490162d34fc4beaa3f96df2dab33e893064f941dbd04
MISC metadata.xml 266 BLAKE2B 9d5988ab45f9939f9be5ee7f4b7a9950a3d62252aa0d3e6c953265467428c59fb8c05b2bb72085431b7aa9fc18d31f2b3273e8fdb33443d786b2237db697b7e2 SHA512 9f85990c7ce6a1de5c1067e4781af18bede2d3bd02963a7b2927766b70dbe98d3fb63bb01e19b1cf6e2b77038d9788bf38155b3cc33f9e5ff8430b10a4006325
diff --git a/dev-db/pgmodeler/pgmodeler-0.9.1.ebuild b/dev-db/pgmodeler/pgmodeler-0.9.1.ebuild
index 9d9b077aa76c..0c8fc05f6763 100644
--- a/dev-db/pgmodeler/pgmodeler-0.9.1.ebuild
+++ b/dev-db/pgmodeler/pgmodeler-0.9.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-POSTGRES_COMPAT=( 9.{3..6} 10 )
+POSTGRES_COMPAT=( 9.{4..6} 10 )
inherit desktop postgres qmake-utils
diff --git a/dev-db/pgpool2/Manifest b/dev-db/pgpool2/Manifest
index b20857a1d47c..373c00ada5e0 100644
--- a/dev-db/pgpool2/Manifest
+++ b/dev-db/pgpool2/Manifest
@@ -11,8 +11,8 @@ DIST pgpool-II-3.7.8.tar.gz 3337039 BLAKE2B bce75be04d3c37dffecbc0a1f029d6e97f31
DIST pgpool-II-4.0.3.tar.gz 3715976 BLAKE2B c5ecfebc44ee4d6ab8fda5ae0854bb51423252ba518b356a37d3b125bc8f4fac048f6f944fdf9b1ee785aae5ac3eca4c4196adf218bc071dd90b93da5c6e6c08 SHA512 76ffbc8df120d4ef68b761684a1805c0349665375f549cd3a194f7d09b9bbdf70d0824da0cbe975e6d15f850704c4fc7c1a2218f551f88f2ce56f542bdfee9b8
DIST pgpool-II-4.0.5.tar.gz 3768842 BLAKE2B 2756d23db950a037a9203aae41293535de25d11bf9860f509040bf5b483ae5fb9e651c8189ee5f0a9398a45d20d2c54566769945e38c52361c160a1162a8e3af SHA512 897df553dba3a1800adae5d22ed4f4fe210a3013fb533730837591244877eeaf0e4090d1a0c65e189b71798b5c303ea22e2198f6317b54f74f10ba48fa2188c6
EBUILD pgpool2-3.7.10.ebuild 2642 BLAKE2B 509e1fc0b475bb66aafcb6ab14c28f4b28c9c059fd7421b84b485309a38e95179e0e8d2d523c084442e8ec57d7a01296796c46dc39d3677e00c8d13dc1b28498 SHA512 aab742d98796c688ca0f175512919f97f92f56da56d85370184ceffc00ebfa18fd65cd0ecf9405ce40b8ed6648474986ddbe81464fcb68ffa18cdc23e8a43a51
-EBUILD pgpool2-3.7.8.ebuild 2639 BLAKE2B fc593487bd9393dae1f56ddebfacbefa99f6801be0a7e674750ffaee5b095399b6af0bfddc888c8c216d42c03cbe140bc7a2a4f3f3d6b56250fd73f2e11e0327 SHA512 a4549c126c7d4c37bcd130cba470666cc93a4eb039d21b2096a7c9f4cd02258fd248731ccf4b3daeff285381d494df1d998c760801dd22ab2635b349c195bf4e
-EBUILD pgpool2-4.0.3.ebuild 2645 BLAKE2B d7d9afef024a3cd2df6a13eb3a037c55be7d4f28b13f751a72d3de0857397432094d139cbcecf109f9b1fdbfd8794f08908368775a0821531cc8c2f2c3a71a6d SHA512 c4e89b31755d5033385bf939715ca4977dcb93d0d4b55c81b18e9fde2292aeb58c2352c3ede83449052423042913f977a784d7f726a0b879a21d58c29bfbe7fd
+EBUILD pgpool2-3.7.8.ebuild 2639 BLAKE2B 5b6f0fb2a88d981bfdc685fceda7d46be1542c77900553bf1347dc9f33623bc0fa758db6cbe076ae6b40c9c845ce708e6b6fb5f6a773417ac9bb9a89738af496 SHA512 ce5b7248099553db4d31d009e0a7fba2beeb0cb748f28a4c1f6fa934ec27a6f0ef1d488b01e000bf6cface2a2f74b79fb871234a222fca2e98354b69b8574b53
+EBUILD pgpool2-4.0.3.ebuild 2645 BLAKE2B e2fefc4fda048aa97559fd0b29c0d9480941b4fe4c7951d6ebc1915c5c1f32faa6029602c19ddee16892cf114deada3cbae13564e4d55c274e687f3e578edb0b SHA512 73ef79cc3f04037ebcfeb6dda1ba082e7b3e80f69e33bc651145fea6288dc8288c977c8cdfaba3b9dc440b52472aa200e71945620d7bea4145a03e23cfd58fca
EBUILD pgpool2-4.0.5.ebuild 2648 BLAKE2B 95c398868dddee909756512e95fa8953026ac844691626b055f27bb22714f7b865085b3ae82f9b6f519abd4a6ece176d3d77bfd1aece0cbae57650997f208028 SHA512 c2a8402cac1778b07f5e508b6aa82f568e29746c38d4abcd1062c24ae2a6d598b0b057766e5aef6fc43c0180f6b6f072a0db6261ad93d892ed41397eedbaedd0
EBUILD pgpool2-9999.ebuild 2723 BLAKE2B 4c593cebf5c8f46ffe83697d500b3bb0151c27a58c1aff005f4668d88ddb35d41ce2b18078cff1bd90b6ea4b2b1010ef40ea313f20595d5e1def107b2bae9cf7 SHA512 5a90ab19128765d850037360b7595338364875a4b17e18d91fff167371a3cf8b0439706388fcbc9a89f54909b5dc4d46129e326acabb1e8dbea488b9b452b5ef
MISC metadata.xml 390 BLAKE2B d6a0560051449e95bb43e81589eee966a477a75d7ec8211ae96b15f2d51ce9555181b8640d9d830f2b42f8159989e9126423c6ccbbc2bf2dd8121f4920a87a16 SHA512 ce26ee116c3c7ff77a771294ed07f38d8f940dc380915c339eb4c543d86fa5bde025ba83e70af2b7bf4a1bef1e51957f151131836855e0dae2e1daed73ffae8d
diff --git a/dev-db/pgpool2/pgpool2-3.7.8.ebuild b/dev-db/pgpool2/pgpool2-3.7.8.ebuild
index 770c9d221c60..837b6cdad01b 100644
--- a/dev-db/pgpool2/pgpool2-3.7.8.ebuild
+++ b/dev-db/pgpool2/pgpool2-3.7.8.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-POSTGRES_COMPAT=( 9.{3..6} 10 )
+POSTGRES_COMPAT=( 9.{4..6} 10 )
inherit autotools postgres-multi
diff --git a/dev-db/pgpool2/pgpool2-4.0.3.ebuild b/dev-db/pgpool2/pgpool2-4.0.3.ebuild
index e2f26a68101a..7b6bede15504 100644
--- a/dev-db/pgpool2/pgpool2-4.0.3.ebuild
+++ b/dev-db/pgpool2/pgpool2-4.0.3.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-POSTGRES_COMPAT=( 9.{3..6} {10..11} )
+POSTGRES_COMPAT=( 9.{4..6} {10..11} )
inherit autotools postgres-multi
diff --git a/dev-db/pgtap/Manifest b/dev-db/pgtap/Manifest
index db327672af62..6603fadbe42b 100644
--- a/dev-db/pgtap/Manifest
+++ b/dev-db/pgtap/Manifest
@@ -1,3 +1,3 @@
DIST pgtap-0.99.0.zip 275915 BLAKE2B 33499dacc0019ecbe85ff3dc4fcc243b6102e0b7e7018d70b17cda44b8d22d8260229ab732db9900296232e0801070722bf97a752734ea7d389dc8ae57198b6f SHA512 c1b39bf2c041d759006d692229a67af1520b6a3d23fdac43f0781cac9ce69e7714fc854d1e45f1cb3ee188a20dccfb7904bc4dd1513699189fae70f425c13b5f
-EBUILD pgtap-0.99.0.ebuild 589 BLAKE2B 2f277a6594abeae0c71f90d7156379f375ff472292ade635116f7ca7f1666f692b99786905222cac67fd3589357d628db733fd3fc76cd1b088d6df33cbd6a697 SHA512 ce01a7b0fd4c431c954ba8f610b0a88236a840f4fc27fdcf7f5e13919d33914163078380fad5bc1be4c83a36276e1383e63adc0669e35b7d1598eb55748e264a
+EBUILD pgtap-0.99.0.ebuild 589 BLAKE2B 20b17f6bf809dc3a7cf6e247038ce55a4ff21930180d6cd962321d2772ebb956cf51bac6dcf65b60faabd0d7b0bec7053ee7b31820adfcfa34bc6ccfb796d977 SHA512 8391a114028dfe412150d5721409bb253489256adf2d10a34266ca9ed899f1080891d7b67bad8819bb3e07ce00a6e263db34d484d2369cea8e4552cddb8eb27b
MISC metadata.xml 628 BLAKE2B 8a671273bb0de6f11d5ea56a3bf38e9eee05c0a70ff8cefe183f0eb798afbead29e96d5a45f764e2afc437cc97d91590e648c6716a8dd8fa7a6cc9f072332e0c SHA512 1c06c14ea5af9248950e6c10ab877b0725c4885082211db94b8a195fdf0dd115dc584a325655b7155895ec4382008e03511aa238d43179310fbe3dc835f5270a
diff --git a/dev-db/pgtap/pgtap-0.99.0.ebuild b/dev-db/pgtap/pgtap-0.99.0.ebuild
index 5b2ada3225e8..1a16121aa4af 100644
--- a/dev-db/pgtap/pgtap-0.99.0.ebuild
+++ b/dev-db/pgtap/pgtap-0.99.0.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-POSTGRES_COMPAT=( 9.{3..6} {10..11} )
+POSTGRES_COMPAT=( 9.{4..6} {10..11} )
inherit postgres-multi
diff --git a/dev-db/plr/Manifest b/dev-db/plr/Manifest
index cb0d09a9ab4e..4051b74f01cf 100644
--- a/dev-db/plr/Manifest
+++ b/dev-db/plr/Manifest
@@ -1,3 +1,3 @@
DIST plr-8.3.0.17.tar.gz 74017 BLAKE2B 314b4cfa2c3ca8ed31e80a72233a6dc8cdb9f3811dad6e9f3eb5147c17cdf5a039436598b0fc2b30c6702b02dd3cb2da33543764aee3199c6864aae22be875ce SHA512 d7080c62349d1dcdd17008a7be3643b54678e0f66bf721068df73057394496d025c4fe01e52945c3acf9cc21eb90241512667772ef3fe519a3c9081efe92dd40
-EBUILD plr-8.3.0.17.ebuild 1703 BLAKE2B 9bd366ade594cc4a79cfa74a66c55cce8072dd6aed04ff28c68880d68c54ef5187c9221ad22c87c832e8eb75501bef68ae1c466418b1cb1606561c76603c8e79 SHA512 b7131973bcecc6c8dcf617b82d3b0da9e76ec014d6dc8fb577270016dfff6f9dbddd5e1b1bf3fda51c0447e12e44055d43f229a2d3daa752ee522a19177b9927
+EBUILD plr-8.3.0.17.ebuild 1700 BLAKE2B eba66d47b01119e81c551b61113b8d86b70a899737147c5c5b8d7bdb27b4c0e42112447d3c2fcdb352676a62abc481de2fb5de83714d04a177c1f3e0c72edd2c SHA512 8e83a07a85a7c8ae3d3ed34578c147b639ff7a5b9e86d9e55336e3b7d752666fd00ed36321c043f8e7ec47ad143db4ac362640fb62bb5e02283be80b38794bf9
MISC metadata.xml 800 BLAKE2B b12bbd609b12d63306bdc9af15f788d91847ae4a8960b26f92d1d8ca000291a047424f2632d22798855a1b61cad2a9d46095f214ba9f7c41616c5a90ee4dddbf SHA512 23728ed4ec8bd27a2ccf2081f4b0ddd2d8ecf47fd9c44f999406c8f3bd7c2f86545dbf837c99dc0e9ef9100b2028a9ae3f10a6d60a21bafbbc7231c445a9c85a
diff --git a/dev-db/plr/plr-8.3.0.17.ebuild b/dev-db/plr/plr-8.3.0.17.ebuild
index 355b915ed2db..e6b36b80a867 100644
--- a/dev-db/plr/plr-8.3.0.17.ebuild
+++ b/dev-db/plr/plr-8.3.0.17.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-POSTGRES_COMPAT=( 9.{3..6} 10 )
+POSTGRES_COMPAT=( 9.{4..6} 10 )
POSTGRES_USEDEP="server"
inherit postgres-multi
diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest
index 73609aef93ba..57b486b3cc65 100644
--- a/dev-db/postgis/Manifest
+++ b/dev-db/postgis/Manifest
@@ -3,7 +3,7 @@ DIST postgis-2.4.6.tar.gz 12616474 BLAKE2B 8e33ae7e8ca5ef2a4dd90f64a8e9910118e4e
DIST postgis-2.4.7.tar.gz 12831401 BLAKE2B 0069a339cc778a02a008835189b5560ffb1724aceaaeeec5264750cdfaa4346310ca1d112f698556e750b6559f0dabb727584c9d41ff8747ed7673e147c9723e SHA512 832f039e582227cd1c6edef98af8dfcceb90db75b18d4ba605b7baf2842227b23fe2d15c3b1cde941182c93230ba41ab94da59e97506c77e79f2016bbd98c885
DIST postgis-2.5.1.tar.gz 16041872 BLAKE2B 589cf7168d3698737a19d817b8efb91695c2c3f63d6c3aa24189d9a37459a28ca8a7db0450aa2d557699f76cd8e3ab1eec198bd332b294d976330fdc9d8a7f60 SHA512 c6c9c8c5befd945614e92d1062df1d753ca8b7fd69b70226065c2dac77a59783b14ece4da994187079b683ee090ba5a79389ba679f22fce8c20a5afc2c8dfca0
DIST postgis-2.5.2.tar.gz 16252761 BLAKE2B 181ecc41e659c1df32392d0dfea9cc081c2a647fd23401b8b0470f99e1136b6b8ed900eaea38afdf87cc801bf13ede4247f9c188fcf0da6782624239c77b434f SHA512 b10781f0b74bad8162c33eb111a6090fba184b45fe5874d22cd3a5b0acfb057f3407c073bc44c9d4cd20ed8c2cb1fbb34480b0cf331340bc8b52580d4eccb819
-EBUILD postgis-2.4.6.ebuild 3062 BLAKE2B e9e916d4e2182588458ed4492ccd8410963c1cb7bc413fb1f6efc99751a6522c7551a3c1c9493e6dfb0f783df03f75c04ed73957eab6d454df87272988e9b4e9 SHA512 e25e230804a0978c61e3447ebeddaccd00dc3d2fe1e716c283f6e88e584399997e8dcf06abab129a5b724718865827e475c813f33f8c4e10df84dae8cb465e42
+EBUILD postgis-2.4.6.ebuild 3062 BLAKE2B 54c4f4682a7803a425a590ade547d178aab1a07722d825a10d25a22b77c7e58f21d6aa7b2756ea5faa96bf8ff309dd40cb80b0145333be1407ac7e8fb826e4a8 SHA512 cd36e3462489fcdf97fc5935d6705906342c6ee178502c06918e230308e245fb22141d49889f692c4e6eee251e21ab8d34b1cb88abc4617fc2cf3476a056aacf
EBUILD postgis-2.4.7.ebuild 3064 BLAKE2B 49d50ffe6855984a43429167b72495d7b4ce7a25e572a17e31d798412879d3cce9606b4c724edefb19bfde200b2ae0e009eed06c744cd45ff6a2509d3a0780b5 SHA512 386d7ca69f4a45277c6b5a9089a922121c55f21ac0fb44eb4ba299001c922920eaa52967af668bb8bd3f39aa67d245eefb4e6759f4e35f46ef9b9b9790a9aa71
EBUILD postgis-2.5.1-r1.ebuild 3044 BLAKE2B ea7dd912c43f34cc13c596cea4f2169475c49d3318d4b5b2456889c52ef503c5300dcfc245220e9eacf8275c4443b6273c25da71f7d77831f888cc8d4f943f41 SHA512 3265db95c4debdf04068eafce9fef15466851b226752d90e6a4ebc8da0edb4f38f101cec4a59e1303700cfcabb0fe9382df25fbb68fe919bd639d61b9d9ba322
EBUILD postgis-2.5.2.ebuild 3046 BLAKE2B f2664d46785b9bb43bb35a23435649a785893dcbab78161e7afd9f56a8f1daecfe5c4e923f17266e06e560c2bd9113b4cb7858d8322bbc29eb31c33cdb5d809c SHA512 1182ea0a9fdd8430d4d43fc0bcc13825dec8531b6b0be111cdf480c634263b1599cc544630a20cd56073ded452d507fe895b95a5f5987a5df6e8b5bed152015b
diff --git a/dev-db/postgis/postgis-2.4.6.ebuild b/dev-db/postgis/postgis-2.4.6.ebuild
index 9d8fa02e934e..2b057bbea83b 100644
--- a/dev-db/postgis/postgis-2.4.6.ebuild
+++ b/dev-db/postgis/postgis-2.4.6.ebuild
@@ -3,7 +3,7 @@
EAPI="6"
-POSTGRES_COMPAT=( 9.{3..6} {10..11} )
+POSTGRES_COMPAT=( 9.{4..6} {10..11} )
POSTGRES_USEDEP="server"
inherit autotools eutils postgres-multi versionator
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index d5cf1114a789..8366a70d0008 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -1,6 +1,5 @@
AUX postgresql-10.2-no-server.patch 3117 BLAKE2B 399e295e393aa84aeaefbe236bf63e091414c9f3d9238ef8f4af3ec955cc0ded6324f4241ee4e78ee1aa775524768f65b15d5064cf4330f5b3149bed2e13aad3 SHA512 1888985a0fa67241b18d3c21c1ededc34666c55f6f4f3806efbe4dcb5a2e30d6d08c955a3bbcc52f589bc5bb857d1c09bd82b555069637a71afe9062994199fd
AUX postgresql-11_beta1-no-server.patch 3080 BLAKE2B 29d4f5d8e26e9360490876d2d51cb29cc340128fe77c0bd76248073157c9e5be09c788cc4344e09c0c2bf2f57e274d5f31f211d1950ee3f47660dfdc4cb7b455 SHA512 42c39e602a019d1d44c39795904fb37a7f14b4623fa90b066f4f26a743d80b6eeaef2e8c7de4c47dddf53d7e89cbe5a2a3473b456ddc76fc0e96f57ff6a9df69
-AUX postgresql-9.3-no-server.patch 3809 BLAKE2B 9022fe8000bff070ee5a4752fcbf9db06e6f83fec9451e5b3a391336a50a9a394a3ab2bfcde21f9462126973e83451e684110c1a1446dc0d6fb4ad7016c90df6 SHA512 5a8e6c5989f27e6b9a55ccc696578b109bc7d2b6c39f8364ceffed07add13f741d21803fa8eebfa6814eb7f997740c1831201b688487710d9275e212c3760d21
AUX postgresql-9.4.10-no-server.patch 3868 BLAKE2B 060385a4bcd9cd558fffed1caafddcd5784c8c08138ca30b709e9949395f8c546c5db6a8fbdd4d268b34d03996642339ffd00cef6f66633c2234c658a38e0625 SHA512 129b631e5a1d5f198041b07d00ff3c4880342ee08c1db5da59d4d514a959381788bd152857b60c66dd93d9f790f55b5d950fa3b7bd08c13cb105860f3b35bb53
AUX postgresql-9.5.5-no-server.patch 3870 BLAKE2B eaf8f510c5dcfb9e9575eed98a1697022bd2510cd700336d74219fd486b9c9b718d8f1abd124be6d34f4363f3393d9884546ca6502fd61fd55e7b6deda273202 SHA512 0ec80d0b18d77f40584747ad96081a990135066133d43efb7c272ebddf32e9cb8224d3dd277ac417bd1260f550a4e6fca1d8e1a23f478409d750e5f76f85053c
AUX postgresql-9.6.3-no-server.patch 3067 BLAKE2B 49822723f1e90b05b56bd4714a2480b366a1fad8d6db23cd2e99ad74eb389310077e12580c312a8ccefe0058218e8354a8665e82bcb7b27be6f744433425b0ec SHA512 314f5cea74dde55d054b43cf890dbbd216b65843f2a863a32cf8ba9fdaead1f74ad01905b7f93d2996068addd8705ff2119e1efc709cf84c18f6685937e969bc
@@ -10,44 +9,21 @@ AUX postgresql.init-9.3-r1 4999 BLAKE2B f2bc23a51b6d9643bbc14320aaa9c41b7eb1df86
AUX postgresql.service-9.2 1666 BLAKE2B d4b81415539db3d78e0f5908185f903b70966ce3a27feed9bdf80eb6a9065ca6bd4b49e4bb822c41548b7efa9de37656378c395a8bd00a7a3daaa52911a2f674 SHA512 8c64b59f1e80096382a7166e1e8f183a5b9cf14c75138c15a39de74b983bfbed2f41cf9b33b2c72c3b9c79130c10104836a3505c96cb18ac1be1297c0fce1af0
AUX postgresql.service-9.6-r1 1477 BLAKE2B 2a652d5b2892f3a52f484fcc0b4f4dad09cf4b46c3739c3f805072040a26128cb2ad9a25d4a7c9f109a95696d739538d379af6bac53c656f5c41af45b6110de5 SHA512 9e2b04923f6ebec1424c0f276c58a6a0c4933f2de5e2a9776169227729afd06ce5284461be8b6ed70e5aaff2a68b9f96c6893d867d35761c9977f9847ccfe93d
AUX postgresql.tmpfiles 39 BLAKE2B 25a5725af53c8e4e4009887e998172dd863ce218a5438351194548c4fc8ea15308dfba3602d5a922cf49b46015198268a4a4528119d8a74dcef4cc4c1767c052 SHA512 498060f2a597cf374f4fb31deaa2d6c5b00edef68efc0e71b82bfc20b717ae12518ba18fcb455a0c518ebba1a0868f38321470616151d02fa79b889a66dcb9f8
-DIST postgresql-10.6.tar.bz2 20350612 BLAKE2B b751085b8fce73efb2531378a553c8c956f5e05a0002de8fdc58c0f2a6cf2b9dfaff6bd621047a094a51e459bc8fc5b1658d6a754a396fa3b7aedc1024ea3b4c SHA512 5d4d5cee2a19ad1820c3411bc4851904e3059cdcacc837350694d54d7d59260b66c565c72cc14a3a10541a8fc49c5185f08f57b7a8c7e4c64ed2614da6e1201f
-DIST postgresql-10.7.tar.bz2 18940030 BLAKE2B ce02d2c4ba97c1845b3708941bb7a9f6ee025fc4a881e35790279aadf5e35464d6716cfdeb4ad145ce4549e639ad01d333cff858f956607c0cd583af65f1cd3e SHA512 2fa8194e9ef540930eecc2a43907a77f7f185590046350d48fd625bdb1ab459095c4e2e0d2faac846935d7231ac672ace760633deeee365572768da619458ba9
DIST postgresql-10.8.tar.bz2 18958913 BLAKE2B d2e1664a53c5b2f24b412f497769ffd33e2f48977fa0f4503cb588497b61955a97497c87950ae60d498d75c7385fc63dd832b518174614f695d8882628a4ebb8 SHA512 c9cd0298f553e13e32d4315e17e9e61c1fd011391c5203282d9040f26fd08c85f749e6f2cea3bcc42d1ca153a1272bcd773196ef3bf2bdfb74cd12c5f523b7ca
-DIST postgresql-11.1.tar.bz2 21263173 BLAKE2B d762b6e8b0e7b08b16ed252687118a0a4516172e38e8940879fd050f72d19ff045af949e72977a62c2ce0a788af7d42c9bde7748347566bec3694e337bba6f73 SHA512 35d00984e9f5f063a5b96e97aa1b40381ab76d07b2336bda5981fd80bef1324f56eefca5069ae78770ecd6ece5df85264e599fdb3478ecb71d4fdd0d7b6becca
-DIST postgresql-11.2.tar.bz2 19714229 BLAKE2B 459674c08a0435363da29428bef7ec49a012b534b390ce6addafac000ce58ad0ad7ba4e1522f5279da29535399836971c61536827d481af766322935d7c6d01b SHA512 dae00a543fdeed36bc338abd4ccfd9fe9a8b6b2b7eaa00b1078e4f27802de75a461c27da2800bc9dd64e658681e5787bd03764bde79940656cae1e8c8716f011
DIST postgresql-11.3.tar.bz2 19718775 BLAKE2B f56686bff4e70c2b6333554a620a5c2d5c226654a1d61de43b4493c44a14e2bcd9c102dba420994878d328af52d933885e4948cd002f14b693aef1416697a0ea SHA512 03269bb88f44f3a81d5e3a8ca2fe59f63f784436840f08870b2e539755629cbde8ac288e0bb4472ee93294a88b37b814ddff48444254c1a3f7a10b4bb64f7133
DIST postgresql-12beta1.tar.bz2 20589423 BLAKE2B 622f936524bca74c20e27967b4cfcec31ba4ffc3132af516fc6dbb89843d688df41b72b7febe7060d2eb6716d64228124b4bc9831e9b11601be0fd95b7727710 SHA512 f46017659aa88141b056fc1852280c92ffbc3ba52d1cda2e3e302d3ec6ba478cc2a8ab04c87f10774b0401e8284fc46bb387a3e0e594a26a30ef7a4cf79b1de3
-DIST postgresql-9.3.25.tar.bz2 17067593 BLAKE2B fd9ca5685e5511dcaa72da882b674846dcd5a16227e5b33ae06701fe7881df71847666c37925033c6cb01c916111a8f76df134491645f4d1e1dd48a008bd2831 SHA512 319e12b73853b74f5ef2c520d64795bb586ffd495ceab6518f7844de6e0a054aea821976c470108d346f8090c7d3949920d9c435432e33004b7caa7a77a5cdca
-DIST postgresql-9.4.20.tar.bz2 17905682 BLAKE2B cb65228f8e78dc8b6303a06480a68de58ecac1fefa1342e4563f2c4051c9f5506b366b36c2dbd54207d25ae497625f8fc5e3e771174a6b3ec33c3c19d2c9ea08 SHA512 664c6e97979f38d263d1dc75a7db442f193a230435cad43ddfa2afcd42ac0d73b2aef0e846fddcc9008cd6d89cba2d5c0a4db93b111665646d3ff4d8f6fbe1e8
-DIST postgresql-9.4.21.tar.bz2 16871522 BLAKE2B e6b8957f52a95d5fa56bc39756f1de83459882e40eee07c3ddf9e33eab39a0d61ee492864a920e7714ca1914a772dcc9048bc34072349197597cfb116aa94422 SHA512 850d1f59369457d9a8a42de8f0e4811f60e9164d2e7d7605fdabc04cc5ba2e3794d51e155d709419d06b8e070f214f7d3ef2328c6d37f125264ea008ca18ff5a
DIST postgresql-9.4.22.tar.bz2 16848787 BLAKE2B 5c2aaef13ef0cf33c421e6839877a8e4e1fc5dbe41d9cabefddd369925869f92f6c6b8a124b5778f9b25359103f0a7ada1eddcaf4bac498709f563928f25e7e3 SHA512 f11623a89b2320616fd53eda52da544bdfcb63bff08cb78fccde134ef628eee7ee90b3de6952f4e08c10297d356624faabf0e5b181b0105f51797796cd04efef
-DIST postgresql-9.5.15.tar.bz2 18707696 BLAKE2B f1be26085953d5a15a6545aed3527b9eec6eb57c72f2e05401e43200e628b3a42ee824dd1cb0138556b97fe4922a991489dffa77329b653475874766c1d5b944 SHA512 2ea241b6751a2812c689da9bde40151ebb7cdabdd14e93d92f8bea1e3fcf5bc0d4854834999f33270329e22a09c5aeaf8d59d36ca6e8860704f81f3adcfb30d5
-DIST postgresql-9.5.16.tar.bz2 17506874 BLAKE2B ce5c804315ce5d7ac95af2455322801f581c3aa8e943ffae40b7e14a95a4610b71956568a418f2f22b8a9814ff9fd1f9296efc974716c0096aa22dcdb7609ff7 SHA512 4583c825ed00a5ba915863b41c39cd9580492444ff299e44c3856db55fb4f0607d184534fe8977d915fb0730e6d638d8560be11915ce21b9d1f6971e7a285c7c
DIST postgresql-9.5.17.tar.bz2 17563469 BLAKE2B d40b7f95d03db594144b4882f36bbe22f348faab0b8d67eda3f946448bb0e09188eccdeb4d1c92742fb29a920b30ede55e536a863b22d2009283eab66679122d SHA512 bb468528b1f18166cda0be136f31a632859ffe6e6800233b1cb0e91ce11d2d00d3dc108a74580b5552a4d30b9f1b6849c91576cd497beac788c429815c66eac5
-DIST postgresql-9.6.11.tar.bz2 20009048 BLAKE2B aa3e5b1e63c983226ea71737982e62eaff655af7e0f55f20ec886f5d7406b1e30e2fe5378b0dd1ef59e777f862ccc2386121653853d4c186a1b4853a9bbb1591 SHA512 a4314f92d1a661af4076d8c120533ecae76d91461043b8a6ad22dd6e5b562e0bf019bc7f3157a26d9666ba5866e254613ae5b690310168b029795dc088f8c060
-DIST postgresql-9.6.12.tar.bz2 18759442 BLAKE2B 067b307318f65616651ee4502f420a84df26e906350f07ce5ab4a769608075f0d017b6d84b0ce5045662ab379e236b66cf751f7950d026f011d0915efcdfab3e SHA512 3a7a96caf682461f1f9bffdbe2b72b1ce00cc6680145e00c139e4af8b9dc8b8679fda1626de65921d6e187fa9290efc930584b98f1fd2aba1ba3d790a741a415
DIST postgresql-9.6.13.tar.bz2 18767279 BLAKE2B c1ec780a7f938f878425cbd6556145e60a613135129daaacc52e9a699cc448a22481b01fac20d0c09373ea6a026f39bc58234aae4f1126333b94f621981a8135 SHA512 65cc70410ad4a1a738b92855b92eecdbb9efbbca0eb9a45a138d47b696c8f9c9cd19073fbfdf5c80eea7633d0be29b4ed8acbadd38724acf8f18c90bb30f9b26
-EBUILD postgresql-10.6.ebuild 13809 BLAKE2B 8d423f5493ffd745207a96fc9e2c39dfd875c87711b89efc500700986afee687fce8df9612493f3d1c665d5eb819b438e89c225889d354bb3b5b04b57d97320f SHA512 b63ecae0488fc4527c525dd7134af9dea2862128829a9f0670c5924582b8820b9d2f2a9262de56e28f0f996191dcc898ee692f629b40f4988b41982441294dde
-EBUILD postgresql-10.7.ebuild 13811 BLAKE2B fe7a6df33550d3212db168c3e194a122e54e2f46c76f2cb77b52cf91865d2bea6631172c5f7579fd700986925ef9bbc31ef65fdb29ff0361b638577c068cadc1 SHA512 bb742bd0323ea763a9b213ea5331882969554949ab386b9cc8c5a70b8a94261d8c792027e779a9d1306c632b240d20261c5c363a66f3fb511b089319145e3736
EBUILD postgresql-10.8-r1.ebuild 13936 BLAKE2B f5e02688e7d569e8905f3501b8d2d6842130dbea5becad4e6cd073b7785f20c8ac26b0fc91ef3ceac5d480c4774ed1002124d0e44a881e994b6f494181330c3e SHA512 39ef59111f296500dac0f5ce88cdf8e51d446e11256ab6a6be01657935b7285159447e368a32fb05c60c6d67ac65674da1ceeb432ad645b0a3d8406b3d34d309
EBUILD postgresql-10.8.ebuild 13810 BLAKE2B e3b025a7f14507f725d9d0d86a55ef8610fca02af11580a905f85f94b0474634035927c469c3561831697de42ad78f003e5eabd4f87a319c8dcd901718f918c7 SHA512 6a3532cfd342c34ce4b9e07bc2a61f7f639f373a86670ce6d1839e5c1ad21ef05c01f8ddf59a17d187a303390f5b89c49a3a27f9002e75424d4804cc37126bbc
-EBUILD postgresql-11.1.ebuild 13830 BLAKE2B eda10e9ae1ce6404cf75b1c1cdff44638fcfd2e73f0584012e7c3b62d467f3149645fd9c561d6b584cbb826f1f982378acb3a1903bec07334d80d291ee91af56 SHA512 703b35c39a4c0421bddd625ab83ee032174b5cc0944dc709fb22a591ccc4d1d8bb8e1acbe6ed288e0f0448c0529201b6f5061fa62d42bf0b25147c901a4029c6
-EBUILD postgresql-11.2.ebuild 13831 BLAKE2B e56079a7e2f0492e5c3889a4b7c5f21b70c33f4b20329ecf84bae8e5a7cb2b2d0defb962b2802de881604291da7f7ab0c1517773e64f5c2fc948f1ec23986e8f SHA512 c585f3dbcba20b1fc20cad583e9a763cc6f8170c91825e10eb23ee568a25db62d8c0d20363383c6ff8c21abb8ec95e188daed5907c1d36489d253cb71c863fd5
EBUILD postgresql-11.3-r1.ebuild 14063 BLAKE2B a69f06a1568db9dab996ced9b678c73f45d93225ccda020748e1cd982369cf65b9df5a112a0e15cdbce03fdbc4e5e72b1f76c86f0112259eef79c8a57fea1201 SHA512 2e1cb50782816e9aa9acf4ee2fbc9e4e9b1ebbd56b1cb66301ab27766be200ab76d185c1e074108cf96465dd346ede4559a0b0606c68d5d2fcaa96addc921352
-EBUILD postgresql-11.3.ebuild 13831 BLAKE2B 8942b2fa3b40d9fcf79398a3248316cf9fe78c4d178a087b5495f617706862cb46e57fc89008e9064ce2e74f27a4cf30815f0c69020e54bdb007acfb2a460363 SHA512 1bfe889ca4c8abafaf0551bbddab2080c78bec93e67307c3d6d615b9a785ec18c16d35d23ad54a50fa8aa59137c5d8a6c761de539b0018aa2bf1354e9e8d3d30
-EBUILD postgresql-12_beta1-r1.ebuild 14063 BLAKE2B a69f06a1568db9dab996ced9b678c73f45d93225ccda020748e1cd982369cf65b9df5a112a0e15cdbce03fdbc4e5e72b1f76c86f0112259eef79c8a57fea1201 SHA512 2e1cb50782816e9aa9acf4ee2fbc9e4e9b1ebbd56b1cb66301ab27766be200ab76d185c1e074108cf96465dd346ede4559a0b0606c68d5d2fcaa96addc921352
-EBUILD postgresql-12_beta1.ebuild 13816 BLAKE2B 3d9ad621a0c4423334268b5d11f3959ad0d89e030bd164582ca784a9ec0c762acd36e500d7debaa82e232bbbc4fa3aae9a55499c8434111420ab089679f3abaf SHA512 ee7cc2f53f650b4679e95b9a112253589f3cd05bad47f8a3d4a9bfdcd29ff0d72614a7b645f617e60db827a9eafe0bc2e070454e7641948470ed9833863524e5
-EBUILD postgresql-9.3.25.ebuild 13558 BLAKE2B 336b83681269f6c8254a5cbf9177451ff3681d76316b63a365d91f4f03c37aa9b34f1043161a1ea389c74b745012744d2df16ad5285b501552c896033461dbcc SHA512 9998f7d66b38f3b8e060d089757790cb5bb5f479cf4997238324322c1d23bf48584d2ff4dfff8b3c6c3a709a4c12def05fff3584eadcd028f91eeeb4eed72e91
-EBUILD postgresql-9.4.20.ebuild 14368 BLAKE2B 2c6b46d98d0cb9f9b4e2063d86b7b1b353c3edffc5386c3f1225dde7430633e539714d98b8ec179b13a612dbbd2cb8a32b2aa321a4cf60e74e64c6b793a1a711 SHA512 6de69907fce6835510de53a961d54cc2dc7e0464d48115c29195d3384ba7447ba472d6b89946545c02b4f42cc2e778f4dbdee75728d212ffc651f75076f59ceb
-EBUILD postgresql-9.4.21.ebuild 14369 BLAKE2B 32c03b7b3e2b71cc4e347a451d2ab814ed01a51ac7d7324b023123b045847e51a54a3190d5d54903b573516e18031ab9ea119979b785269a2ddf8d694ab76433 SHA512 c8fa0a053847fbd78e928be1d8789cf336ca5c2b067bb01d5cb245560ff5dbbf44e01b5dd34e11d878150d64a76bb1d58aae5e99dc5aca1f7c00d7dc87dd5df3
+EBUILD postgresql-11.3.ebuild 13830 BLAKE2B d6f608acacbba2279c51eee3f8850e04f4fea3a342a47fbb8a5019a7f571af544c604d4358b2bc76845b0c49038dfa56b21c5a9d8b230b378bed803dbaa09807 SHA512 e8ebf2811c98edac513e13d642db10fc02c6ce0fb54bb6a3c9e5f424caacaa532dd79905ce6cbba64328c907181f36d6cf625be8c2253e0932b8f9bf26947ffa
+EBUILD postgresql-12_beta1-r1.ebuild 14039 BLAKE2B 27e750043693c2dd3436bbe5b65379bbc5a0ce0f868366ca805f3f62d00852fb6ec3df59565b008d6b73ef1a99d9e18dc0dca7be958ef889b55f392fe8915ce3 SHA512 95afd446c30ea3ffdc719dbe117ea502bd08569d607b6e7c0b893051e85f997cd5dcd9d82b287c3302c4c643e27a7d3e01b6401bc43d5aabae6e1f3a4ee88f81
EBUILD postgresql-9.4.22-r1.ebuild 14532 BLAKE2B 93742f760ff30542947bb3d9ad51108b545152dce34a4082a0c90c57a0d18612c98b07ffae9ba40ec46741eeb561f7ff80ba344dc2fb9e1fb373c496f5e0e74e SHA512 94c63fba357b837d877d60bc0b6fba33af18de0fda8bda7a39ecfe47490ef4e4d93c4111c3e647b978e3af7dcb53974144f38ce8ce1ad5da88c00aa67fd8e912
EBUILD postgresql-9.4.22.ebuild 14368 BLAKE2B 2c6b46d98d0cb9f9b4e2063d86b7b1b353c3edffc5386c3f1225dde7430633e539714d98b8ec179b13a612dbbd2cb8a32b2aa321a4cf60e74e64c6b793a1a711 SHA512 6de69907fce6835510de53a961d54cc2dc7e0464d48115c29195d3384ba7447ba472d6b89946545c02b4f42cc2e778f4dbdee75728d212ffc651f75076f59ceb
-EBUILD postgresql-9.5.15.ebuild 14596 BLAKE2B f12b4c612d4360b93f363fdd0a7eda9285db0122a7e663bd7bec8222289e2a2da0bfdaaff9ed2398a154976cf1f13cd9e2e717b23accc7e528f76565942a5976 SHA512 9e9a7aa496a65e036d1fd4528cbfb06f5014059dd96b581ebee38f3a3e65faefad222cb5f2e54dc95b640a89f362275ce0f3d942a092ceeef50973f2937686fa
-EBUILD postgresql-9.5.16.ebuild 14597 BLAKE2B 6767d2163fa8dc5435c2271e3b8efbea3b57cc1d2d2d3c0884fef6fc3d750758cc045f4f423699de8fa89ea4570e0ca445b3da7285ad3669faea7f799e31a72b SHA512 8ec5f2768290b43119e472fccc5951832772a137eebb056c57bbd9c25565ef004095aa2a0ed9c03df90f3ea1faf9d26a5ec9ffd6d5c82d31826fd1052a90605f
EBUILD postgresql-9.5.17-r1.ebuild 14760 BLAKE2B 14562ac30db311132b4317c548d92c3d0006a19174e9b33a9a01099ddbb0e6d6389478fe021828c0a733141e1442098a848a11180ec3a3a2bc17baa032e24db6 SHA512 b14450932342e323cfcca615a165f4a4c83cd34b047edc70ca201d9460fee0c6603f0980fcdf736a0db86bdf5c75f0cfc39ef9c8956edb69e3671c399b8556e1
EBUILD postgresql-9.5.17.ebuild 14596 BLAKE2B f12b4c612d4360b93f363fdd0a7eda9285db0122a7e663bd7bec8222289e2a2da0bfdaaff9ed2398a154976cf1f13cd9e2e717b23accc7e528f76565942a5976 SHA512 9e9a7aa496a65e036d1fd4528cbfb06f5014059dd96b581ebee38f3a3e65faefad222cb5f2e54dc95b640a89f362275ce0f3d942a092ceeef50973f2937686fa
-EBUILD postgresql-9.6.11.ebuild 14829 BLAKE2B fffb2f1e956b93a561d289f657cf678f4e414e21787c73d1ebddf7182aba7b8374307e878841edb25de82feb866f88d79b89ed115bb4d916b8ed929c1a30b5d1 SHA512 c8c70732f1390285906e45cbce8afa3e3435814210c53e092bc0c2fa9f0ebe8d86b3f782e6eaed989a4c2a9a766a158232623e203e2d4917cfa95a05ab88d213
-EBUILD postgresql-9.6.12.ebuild 14830 BLAKE2B 700d0b13f1ff5f35185a9413a1a030c6e3b8c8822ab4c465c3d212a6aaef34f0bc9dd62d4bd6d7d63e410a1927c3c5ccd08c39e3e27abf5ecf0b79fe7a9951f4 SHA512 7e2e661e9981443317704f38227476da0860904234104e5cc1f126acb93acd07cac655fce2d9eb2f7756699874e6afe037fce93ba2d57fda0ec2180bc8362d29
EBUILD postgresql-9.6.13-r1.ebuild 14993 BLAKE2B e62949c713914f8fd68fab5e70c66695c092c8c28b9d6c51a9e853c294281a017c15541e4fe1c879a2bd4997b7ae4a2cdc233fa55ab735ae27049bca3ead1113 SHA512 f3d6093665243f2c95f89bc20d84275c16d194eb7d5108fce5d4f8ba72b4224bf5ef43d6157db4489198bda6c3b9c401e51768877618521f1029c13ecbe0d24f
EBUILD postgresql-9.6.13.ebuild 14829 BLAKE2B fffb2f1e956b93a561d289f657cf678f4e414e21787c73d1ebddf7182aba7b8374307e878841edb25de82feb866f88d79b89ed115bb4d916b8ed929c1a30b5d1 SHA512 c8c70732f1390285906e45cbce8afa3e3435814210c53e092bc0c2fa9f0ebe8d86b3f782e6eaed989a4c2a9a766a158232623e203e2d4917cfa95a05ab88d213
EBUILD postgresql-9999.ebuild 14485 BLAKE2B 386379214652708fc23727970999371b77804bd9a0a13dcbdcd94e6f8a0d5b30b3657063884177a0f903f88845f2fd202bf6b05e1fb51fd82c6aa5bdc3d290e2 SHA512 4173d20a00da315d9bb15a32474f202edfb0580494fd37501e8a9c5f61ae334421ad092da408783690557621ca95455baa7d5e22436973c723c5de6f9d79e286
diff --git a/dev-db/postgresql/files/postgresql-9.3-no-server.patch b/dev-db/postgresql/files/postgresql-9.3-no-server.patch
deleted file mode 100644
index 48e5377f2b1b..000000000000
--- a/dev-db/postgresql/files/postgresql-9.3-no-server.patch
+++ /dev/null
@@ -1,144 +0,0 @@
---- a/contrib/Makefile
-+++ b/contrib/Makefile
-@@ -5,61 +5,10 @@
- include $(top_builddir)/src/Makefile.global
-
- SUBDIRS = \
-- adminpack \
-- auth_delay \
-- auto_explain \
-- btree_gin \
-- btree_gist \
-- chkpass \
-- citext \
-- cube \
-- dblink \
-- dict_int \
-- dict_xsyn \
-- dummy_seclabel \
-- earthdistance \
-- file_fdw \
-- fuzzystrmatch \
-- hstore \
-- intagg \
-- intarray \
-- isn \
-- lo \
-- ltree \
- oid2name \
-- pageinspect \
-- passwordcheck \
-- pg_archivecleanup \
-- pg_buffercache \
-- pg_freespacemap \
-- pg_standby \
-- pg_stat_statements \
-- pg_test_fsync \
-- pg_test_timing \
-- pg_trgm \
-- pg_upgrade \
-- pg_upgrade_support \
- pgbench \
-- pgcrypto \
-- pgrowlocks \
-- pgstattuple \
-- pg_xlogdump \
-- postgres_fdw \
-- seg \
-- spi \
-- tablefunc \
-- tcn \
-- test_parser \
-- tsearch2 \
-- unaccent \
-- vacuumlo \
-- worker_spi
-+ vacuumlo
-
--ifeq ($(with_openssl),yes)
--SUBDIRS += sslinfo
--else
--ALWAYS_SUBDIRS += sslinfo
--endif
-
- ifeq ($(with_ossp_uuid),yes)
- SUBDIRS += uuid-ossp
---- a/src/backend/Makefile
-+++ b/src/backend/Makefile
-@@ -47,7 +47,7 @@
-
- ##########################################################################
-
--all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP)
-+all: someheaders
-
- ifneq ($(PORTNAME), cygwin)
- ifneq ($(PORTNAME), win32)
-@@ -116,7 +116,7 @@
- endif # aix
-
- # Update the commonly used headers before building the subdirectories
--$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h
-+someheaders $(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h
-
- # run this unconditionally to avoid needing to know its dependencies here:
- submake-schemapg:
-@@ -209,23 +209,8 @@
-
- ##########################################################################
-
--install: all installdirs install-bin
--ifeq ($(PORTNAME), cygwin)
--ifeq ($(MAKE_DLL), true)
-- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
--endif
--endif
--ifeq ($(PORTNAME), win32)
--ifeq ($(MAKE_DLL), true)
-- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
--endif
--endif
-- $(MAKE) -C catalog install-data
-- $(MAKE) -C tsearch install-data
-- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
-- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
-- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
-- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample'
-+install:
-+
-
- install-bin: postgres $(POSTGRES_IMP) installdirs
- $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)'
---- a/src/bin/Makefile
-+++ b/src/bin/Makefile
-@@ -13,8 +13,7 @@
- top_builddir = ../..
- include $(top_builddir)/src/Makefile.global
-
--SUBDIRS = initdb pg_ctl pg_dump \
-- psql scripts pg_config pg_controldata pg_resetxlog pg_basebackup
-+SUBDIRS = pg_dump psql scripts pg_config
-
- ifeq ($(PORTNAME), win32)
- SUBDIRS += pgevent
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -15,17 +15,11 @@
- SUBDIRS = \
- common \
- port \
-- timezone \
- backend \
-- backend/utils/mb/conversion_procs \
-- backend/snowball \
- include \
- interfaces \
-- backend/replication/libpqwalreceiver \
- bin \
-- pl \
-- makefiles \
-- test/regress
-+ makefiles
-
- # There are too many interdependencies between the subdirectories, so
- # don't attempt parallel make here.
diff --git a/dev-db/postgresql/postgresql-10.6.ebuild b/dev-db/postgresql/postgresql-10.6.ebuild
deleted file mode 100644
index b4ca072111b9..000000000000
--- a/dev-db/postgresql/postgresql-10.6.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
-
-SLOT=$(get_major_version)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="doc kerberos kernel_linux ldap libressl 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
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( virtual/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-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-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # 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}-10.2-no-server.patch"
-
- if use pam ; then
- sed -e "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}" \
- --docdir="${PO}/usr/share/doc/${PF}" \
- --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 threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(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 nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # 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
-
- use static-libs || find "${ED}" -name '*.a' -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- 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
- systemd_newtmpfilesd "${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 && systemd_tmpfiles_create ${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 "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- 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
- emake check
-
- 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-10.7.ebuild b/dev-db/postgresql/postgresql-10.7.ebuild
deleted file mode 100644
index 12803d61530e..000000000000
--- a/dev-db/postgresql/postgresql-10.7.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
-
-SLOT=$(get_major_version)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="doc kerberos kernel_linux ldap libressl 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
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( virtual/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-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-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # 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}-10.2-no-server.patch"
-
- if use pam ; then
- sed -e "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}" \
- --docdir="${PO}/usr/share/doc/${PF}" \
- --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 threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(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 nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # 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
-
- use static-libs || find "${ED}" -name '*.a' -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- 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
- systemd_newtmpfilesd "${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 && systemd_tmpfiles_create ${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 "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- 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
- emake check
-
- 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-11.1.ebuild b/dev-db/postgresql/postgresql-11.1.ebuild
deleted file mode 100644
index dea7d4a57d43..000000000000
--- a/dev-db/postgresql/postgresql-11.1.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT=$(get_major_version)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="http://www.postgresql.org/"
-
-IUSE="doc kerberos kernel_linux ldap libressl 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
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-llvm? ( sys-devel/llvm:=
- sys-devel/clang:= )
-pam? ( virtual/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-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-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- 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}-11_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}" \
- --docdir="${PO}/usr/share/doc/${PF}" \
- --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 threads thread-safety) \
- $(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 nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # 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
-
- use static-libs || find "${ED}" -name '*.a' -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- 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
- systemd_newtmpfilesd "${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 && systemd_tmpfiles_create ${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 "http://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 " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " http://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 "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- 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
- emake check
-
- 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-11.2.ebuild b/dev-db/postgresql/postgresql-11.2.ebuild
deleted file mode 100644
index 7329f538987f..000000000000
--- a/dev-db/postgresql/postgresql-11.2.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT=$(get_major_version)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="http://www.postgresql.org/"
-
-IUSE="doc kerberos kernel_linux ldap libressl 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
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-llvm? ( sys-devel/llvm:=
- sys-devel/clang:= )
-pam? ( virtual/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-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-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- 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}-11_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}" \
- --docdir="${PO}/usr/share/doc/${PF}" \
- --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 threads thread-safety) \
- $(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 nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # 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
-
- use static-libs || find "${ED}" -name '*.a' -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- 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
- systemd_newtmpfilesd "${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 && systemd_tmpfiles_create ${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 "http://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 " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " http://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 "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- 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
- emake check
-
- 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-11.3.ebuild b/dev-db/postgresql/postgresql-11.3.ebuild
index 4b7ed639724d..f783365d3a6d 100644
--- a/dev-db/postgresql/postgresql-11.3.ebuild
+++ b/dev-db/postgresql/postgresql-11.3.ebuild
@@ -11,7 +11,7 @@ PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
systemd user versionator
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT=$(get_major_version)
diff --git a/dev-db/postgresql/postgresql-12_beta1-r1.ebuild b/dev-db/postgresql/postgresql-12_beta1-r1.ebuild
index b55fe07666c3..5b3d4e8e26c4 100644
--- a/dev-db/postgresql/postgresql-12_beta1-r1.ebuild
+++ b/dev-db/postgresql/postgresql-12_beta1-r1.ebuild
@@ -184,7 +184,7 @@ src_install() {
emake DESTDIR="${D}" install
emake DESTDIR="${D}" install -C contrib
- dodoc README HISTORY doc/{TODO,bug.template}
+ 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
diff --git a/dev-db/postgresql/postgresql-12_beta1.ebuild b/dev-db/postgresql/postgresql-12_beta1.ebuild
deleted file mode 100644
index bea7f351ec92..000000000000
--- a/dev-db/postgresql/postgresql-12_beta1.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT=$(get_major_version)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="http://www.postgresql.org/"
-
-IUSE="doc kerberos kernel_linux ldap libressl 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
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-llvm? ( sys-devel/llvm:=
- sys-devel/clang:= )
-pam? ( virtual/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-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-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- 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}-11_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}" \
- --docdir="${PO}/usr/share/doc/${PF}" \
- --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 threads thread-safety) \
- $(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 nls "'$(l10n_get_locales)'")
-}
-
-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
-
- use static-libs || find "${ED}" -name '*.a' -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- 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
- systemd_newtmpfilesd "${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 && systemd_tmpfiles_create ${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 "http://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 " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " http://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 "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- 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
- emake check
-
- 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-9.3.25.ebuild b/dev-db/postgresql/postgresql-9.3.25.ebuild
deleted file mode 100644
index 99535f9c8c48..000000000000
--- a/dev-db/postgresql/postgresql-9.3.25.ebuild
+++ /dev/null
@@ -1,443 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
-
-SLOT="$(get_version_component_range 1-2)"
-
-SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp
- 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
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( virtual/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-tcl? ( >=dev-lang/tcl-8:0= )
-uuid? ( dev-libs/ossp-uuid )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
-"
-
-DEPEND="${CDEPEND}
-!!<sys-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # 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}-${SLOT}-no-server.patch"
-
- if use pam ; then
- sed -e "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%/}"
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --docdir="${PO}/usr/share/doc/${PF}" \
- --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 !pg_legacytimestamp integer-datetimes) \
- $(use_enable threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with kerberos krb5) \
- $(use_with ldap) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(use_with tcl) \
- $(use_with uuid ossp-uuid) \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # 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
- for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; 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
-
- use static-libs || find "${ED}" -name '*.a' -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}tmp"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
-
- docinto sgml
- dodoc doc/src/sgml/*.{sgml,dsl}
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-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.2" | \
- systemd_newunit - ${PN}-${SLOT}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
-
- 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_preinst() {
- # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
- # /usr/bin/psql96). They may have been created by the
- # postgresql.eselect module, but they're handled within this ebuild
- # now. It's alright if we momentarily delete /usr/bin/psql as it
- # will be recreated by the eselect module in pkg_ppostinst(). This
- # is only necessary for 9.7 and earlier. 10 and later were never
- # handled in this manner.
- local canonicalise
- if type -p realpath > /dev/null; then
- canonicalise=realpath
- elif type -p readlink > /dev/null; then
- canonicalise='readlink -f'
- else
- # can't die, subshell
- die "No readlink nor realpath found, cannot canonicalise"
- fi
-
- local l
- # First remove any symlinks in /usr/bin that may have been created
- # by the old eselect
- for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
- if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
- rm "${l}" || ewarn "Couldn't remove ${l}"
- fi
- done
-
- # Then move the symlinks created by the ebuild to their proper place.
- for l in "${ED}"/usr/bin/*tmp ; do
- mv "${l}" "${l%tmp}" \
- || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
- done
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${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}"
- 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 "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- 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
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- 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}"
- 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
- emake check
-
- 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-9.4.20.ebuild b/dev-db/postgresql/postgresql-9.4.20.ebuild
deleted file mode 100644
index 9463417f714b..000000000000
--- a/dev-db/postgresql/postgresql-9.4.20.ebuild
+++ /dev/null
@@ -1,475 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
-
-SLOT="$(get_version_component_range 1-2)"
-
-SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp
- 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
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( virtual/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-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-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # 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}-9.4.10-no-server.patch"
-
- if use pam ; then
- sed -e "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}" \
- --docdir="${PO}/usr/share/doc/${PF}" \
- --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 !pg_legacytimestamp integer-datetimes) \
- $(use_enable threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # 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
- for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; 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
-
- use static-libs || find "${ED}" -name '*.a' -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}tmp"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
-
- docinto sgml
- dodoc doc/src/sgml/*.{sgml,dsl}
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-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.2" | \
- systemd_newunit - ${PN}-${SLOT}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
-
- 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_preinst() {
- # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
- # /usr/bin/psql96). They may have been created by the
- # postgresql.eselect module, but they're handled within this ebuild
- # now. It's alright if we momentarily delete /usr/bin/psql as it
- # will be recreated by the eselect module in pkg_ppostinst(). This
- # is only necessary for 9.7 and earlier. 10 and later were never
- # handled in this manner.
- local canonicalise
- if type -p realpath > /dev/null; then
- canonicalise=realpath
- elif type -p readlink > /dev/null; then
- canonicalise='readlink -f'
- else
- # can't die, subshell
- die "No readlink nor realpath found, cannot canonicalise"
- fi
-
- local l
- # First remove any symlinks in /usr/bin that may have been created
- # by the old eselect
- for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
- if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
- rm "${l}" || ewarn "Couldn't remove ${l}"
- fi
- done
-
- # Then move the symlinks created by the ebuild to their proper place.
- for l in "${ED}"/usr/bin/*tmp ; do
- mv "${l}" "${l%tmp}" \
- || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
- done
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${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}"
- 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 "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- 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
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- 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}"
- 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
- emake check
-
- 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-9.4.21.ebuild b/dev-db/postgresql/postgresql-9.4.21.ebuild
deleted file mode 100644
index 3dfe4e3fdb24..000000000000
--- a/dev-db/postgresql/postgresql-9.4.21.ebuild
+++ /dev/null
@@ -1,475 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
-
-SLOT="$(get_version_component_range 1-2)"
-
-SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp
- 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
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( virtual/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-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-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # 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}-9.4.10-no-server.patch"
-
- if use pam ; then
- sed -e "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}" \
- --docdir="${PO}/usr/share/doc/${PF}" \
- --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 !pg_legacytimestamp integer-datetimes) \
- $(use_enable threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # 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
- for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; 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
-
- use static-libs || find "${ED}" -name '*.a' -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}tmp"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
-
- docinto sgml
- dodoc doc/src/sgml/*.{sgml,dsl}
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-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.2" | \
- systemd_newunit - ${PN}-${SLOT}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
-
- 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_preinst() {
- # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
- # /usr/bin/psql96). They may have been created by the
- # postgresql.eselect module, but they're handled within this ebuild
- # now. It's alright if we momentarily delete /usr/bin/psql as it
- # will be recreated by the eselect module in pkg_ppostinst(). This
- # is only necessary for 9.7 and earlier. 10 and later were never
- # handled in this manner.
- local canonicalise
- if type -p realpath > /dev/null; then
- canonicalise=realpath
- elif type -p readlink > /dev/null; then
- canonicalise='readlink -f'
- else
- # can't die, subshell
- die "No readlink nor realpath found, cannot canonicalise"
- fi
-
- local l
- # First remove any symlinks in /usr/bin that may have been created
- # by the old eselect
- for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
- if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
- rm "${l}" || ewarn "Couldn't remove ${l}"
- fi
- done
-
- # Then move the symlinks created by the ebuild to their proper place.
- for l in "${ED}"/usr/bin/*tmp ; do
- mv "${l}" "${l%tmp}" \
- || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
- done
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${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}"
- 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 "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- 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
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- 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}"
- 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
- emake check
-
- 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-9.5.15.ebuild b/dev-db/postgresql/postgresql-9.5.15.ebuild
deleted file mode 100644
index cdbace433fe4..000000000000
--- a/dev-db/postgresql/postgresql-9.5.15.ebuild
+++ /dev/null
@@ -1,481 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
-
-SLOT="$(get_version_component_range 1-2)"
-
-SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp
- 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
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( virtual/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-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-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # 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}-9.5.5-no-server.patch"
-
- if use pam ; then
- sed -e "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}" \
- --docdir="${PO}/usr/share/doc/${PF}" \
- --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 !pg_legacytimestamp integer-datetimes) \
- $(use_enable threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # 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
- for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; 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
-
- use static-libs || find "${ED}" -name '*.a' -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}tmp"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
-
- docinto sgml
- dodoc doc/src/sgml/*.{sgml,dsl}
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-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.2" | \
- systemd_newunit - ${PN}-${SLOT}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
-
- 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_preinst() {
- # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
- # /usr/bin/psql96). They may have been created by the
- # postgresql.eselect module, but they're handled within this ebuild
- # now. It's alright if we momentarily delete /usr/bin/psql as it
- # will be recreated by the eselect module in pkg_ppostinst(). This
- # is only necessary for 9.7 and earlier. 10 and later were never
- # handled in this manner.
- local canonicalise
- if type -p realpath > /dev/null; then
- canonicalise=realpath
- elif type -p readlink > /dev/null; then
- canonicalise='readlink -f'
- else
- # can't die, subshell
- die "No readlink nor realpath found, cannot canonicalise"
- fi
-
- local l
- # First remove any symlinks in /usr/bin that may have been created
- # by the old eselect
- for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
- if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
- rm "${l}" || ewarn "Couldn't remove ${l}"
- fi
- done
-
- # Then move the symlinks created by the ebuild to their proper place.
- for l in "${ED}"/usr/bin/*tmp ; do
- mv "${l}" "${l%tmp}" \
- || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
- done
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- if use alpha && use server ; then
- ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms."
- ewarn "As a result, performance will be extremely degraded."
- fi
-
- 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}"
- 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 "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- 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
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- 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}"
- 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
- emake check
-
- 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-9.5.16.ebuild b/dev-db/postgresql/postgresql-9.5.16.ebuild
deleted file mode 100644
index b8c8eb9949c5..000000000000
--- a/dev-db/postgresql/postgresql-9.5.16.ebuild
+++ /dev/null
@@ -1,481 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
-
-SLOT="$(get_version_component_range 1-2)"
-
-SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp
- 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
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( virtual/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-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-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # 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}-9.5.5-no-server.patch"
-
- if use pam ; then
- sed -e "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}" \
- --docdir="${PO}/usr/share/doc/${PF}" \
- --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 !pg_legacytimestamp integer-datetimes) \
- $(use_enable threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # 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
- for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; 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
-
- use static-libs || find "${ED}" -name '*.a' -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}tmp"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
-
- docinto sgml
- dodoc doc/src/sgml/*.{sgml,dsl}
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-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.2" | \
- systemd_newunit - ${PN}-${SLOT}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
-
- 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_preinst() {
- # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
- # /usr/bin/psql96). They may have been created by the
- # postgresql.eselect module, but they're handled within this ebuild
- # now. It's alright if we momentarily delete /usr/bin/psql as it
- # will be recreated by the eselect module in pkg_ppostinst(). This
- # is only necessary for 9.7 and earlier. 10 and later were never
- # handled in this manner.
- local canonicalise
- if type -p realpath > /dev/null; then
- canonicalise=realpath
- elif type -p readlink > /dev/null; then
- canonicalise='readlink -f'
- else
- # can't die, subshell
- die "No readlink nor realpath found, cannot canonicalise"
- fi
-
- local l
- # First remove any symlinks in /usr/bin that may have been created
- # by the old eselect
- for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
- if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
- rm "${l}" || ewarn "Couldn't remove ${l}"
- fi
- done
-
- # Then move the symlinks created by the ebuild to their proper place.
- for l in "${ED}"/usr/bin/*tmp ; do
- mv "${l}" "${l%tmp}" \
- || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
- done
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- if use alpha && use server ; then
- ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms."
- ewarn "As a result, performance will be extremely degraded."
- fi
-
- 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}"
- 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 "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- 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
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- 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}"
- 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
- emake check
-
- 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-9.6.11.ebuild b/dev-db/postgresql/postgresql-9.6.11.ebuild
deleted file mode 100644
index 8c7844abba34..000000000000
--- a/dev-db/postgresql/postgresql-9.6.11.ebuild
+++ /dev/null
@@ -1,486 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT="$(get_version_component_range 1-2)"
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp
- 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
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( virtual/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-server? ( systemd? ( sys-apps/systemd ) )
-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-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # 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}-${SLOT}.3-no-server.patch"
-
- if use pam ; then
- sed -e "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}" \
- --docdir="${PO}/usr/share/doc/${PF}" \
- --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 !pg_legacytimestamp integer-datetimes) \
- $(use_enable threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(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 nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # 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
- for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; 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
-
- use static-libs || find "${ED}" -name '*.a' -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}tmp"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
-
- docinto sgml
- dodoc doc/src/sgml/*.{sgml,dsl}
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-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
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
-
- 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_preinst() {
- # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
- # /usr/bin/psql96). They may have been created by the
- # postgresql.eselect module, but they're handled within this ebuild
- # now. It's alright if we momentarily delete /usr/bin/psql as it
- # will be recreated by the eselect module in pkg_ppostinst(). This
- # is only necessary for 9.7 and earlier. 10 and later were never
- # handled in this manner.
- local canonicalise
- if type -p realpath > /dev/null; then
- canonicalise=realpath
- elif type -p readlink > /dev/null; then
- canonicalise='readlink -f'
- else
- # can't die, subshell
- die "No readlink nor realpath found, cannot canonicalise"
- fi
-
- local l
- # First remove any symlinks in /usr/bin that may have been created
- # by the old eselect
- for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
- if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
- rm "${l}" || ewarn "Couldn't remove ${l}"
- fi
- done
-
- # Then move the symlinks created by the ebuild to their proper place.
- for l in "${ED}"/usr/bin/*tmp ; do
- mv "${l}" "${l%tmp}" \
- || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
- done
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${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}"
- 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 "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- 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
- emake check
-
- 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-9.6.12.ebuild b/dev-db/postgresql/postgresql-9.6.12.ebuild
deleted file mode 100644
index a557fdcbf718..000000000000
--- a/dev-db/postgresql/postgresql-9.6.12.ebuild
+++ /dev/null
@@ -1,486 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT="$(get_version_component_range 1-2)"
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="doc kerberos kernel_linux ldap libressl nls pam perl -pg_legacytimestamp
- 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
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( virtual/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-server? ( systemd? ( sys-apps/systemd ) )
-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-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # 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}-${SLOT}.3-no-server.patch"
-
- if use pam ; then
- sed -e "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}" \
- --docdir="${PO}/usr/share/doc/${PF}" \
- --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 !pg_legacytimestamp integer-datetimes) \
- $(use_enable threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(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 nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # 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
- for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; 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
-
- use static-libs || find "${ED}" -name '*.a' -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}tmp"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
-
- docinto sgml
- dodoc doc/src/sgml/*.{sgml,dsl}
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-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
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
-
- 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_preinst() {
- # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
- # /usr/bin/psql96). They may have been created by the
- # postgresql.eselect module, but they're handled within this ebuild
- # now. It's alright if we momentarily delete /usr/bin/psql as it
- # will be recreated by the eselect module in pkg_ppostinst(). This
- # is only necessary for 9.7 and earlier. 10 and later were never
- # handled in this manner.
- local canonicalise
- if type -p realpath > /dev/null; then
- canonicalise=realpath
- elif type -p readlink > /dev/null; then
- canonicalise='readlink -f'
- else
- # can't die, subshell
- die "No readlink nor realpath found, cannot canonicalise"
- fi
-
- local l
- # First remove any symlinks in /usr/bin that may have been created
- # by the old eselect
- for l in $(find "${ROOT%/}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
- if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
- rm "${l}" || ewarn "Couldn't remove ${l}"
- fi
- done
-
- # Then move the symlinks created by the ebuild to their proper place.
- for l in "${ED}"/usr/bin/*tmp ; do
- mv "${l}" "${l%tmp}" \
- || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
- done
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${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}"
- 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 "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- 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
- emake check
-
- 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/slony1/Manifest b/dev-db/slony1/Manifest
index 781f7794dba5..fd99633b05cc 100644
--- a/dev-db/slony1/Manifest
+++ b/dev-db/slony1/Manifest
@@ -2,5 +2,8 @@ AUX slony1.conf 249 BLAKE2B ec214fb9a7d51bcaa58dc191d7e943c0d07be85c0f31dadbf199
AUX slony1.init 615 BLAKE2B f1b3fc27ad3c4087713cceb6c2bb9451004b70e87c0347274c75e1c3ed8d439bb99f51d5e6e904d3957150e62760272312423a47235ff4e76792e0661b683bb3 SHA512 d450bba5f65372509e542f138d297202371bcaf78332ba13de72ddf937fcffe419083dddc5032c7bafd51993fbc677b37262e1b1e938e9e3c927e130c0a7c693
DIST slony1-2.2.6-docs.tar.bz2 1450956 BLAKE2B 949d0736eb9ab021767b80b4240e30a8cd11daa218cac6d722827a8db98f2b54cc093031e02d0cd14cb1eb60d56dc160dcd1c2e0708e7228fdac31ef26d2fcf4 SHA512 b5a870d5688ca24c0a9012d7da539917c74ee697f1b1ae663ead3cb1032345c0d8f5fc5bddc2ca2fec5d738fb9ca74822343cce8739b3b4b478928f26d214a0d
DIST slony1-2.2.6.tar.bz2 1465709 BLAKE2B 87e581638aab5ac9f51437fc43b65f200c29e012fa2b5331d4a7972359bb345c8d5aec9917fbc348ce8338115f8270d6e55025905aa5aba642090a8486d0a3fc SHA512 5aeadb9ed72b83d303596e4f8513409a1f826f25fe283ca6aa969a7563172bbc5f5360f876fa87780f6a6fc70cb55688a2daf678b9cf91972a3c403cb76184b8
-EBUILD slony1-2.2.6.ebuild 1646 BLAKE2B 41751e24ac6d64d484f4c7502d093dcb36236eac011d79f8e9fc8095be906f45e1285d6c5305e95253d3fcb2636040354fa58e968cbf44e4d0c541f1161bc284 SHA512 9e220005ba13513b8f7d20853bc659d586e8d0b5a5d2c93b0997601dc84cee845826d31d37cb2726d37b114341d9f60502557e8fe7dfd3447720fd41021c90eb
+DIST slony1-2.2.7-docs.tar.bz2 252020 BLAKE2B 315d54c008fca121fac12385602e729c7bb6a7a90db502165625c1138da6b87f147410555ca6bc315ba766fd6fed22b6c5dcbe06c9481dd37b9e9c8832209b02 SHA512 7735aae634788acae77eb2cc64f51a851e3b804fb1ca860eddc237734aa6182bd7dfcdae485cd89682c413f55003ea67d91c4c24922b4fdef79ac34793022e56
+DIST slony1-2.2.7.tar.bz2 1464923 BLAKE2B aee11f92d634a6c2eaf84dd48faf6cac7a27956474aaa9070f1d4fad3e70b0af09475abda149e096f1b238d68237c0b43b18880440bd4c2d66f5c0f4ad789e99 SHA512 22700e1574c91d4a4be5b78aac967eebc039440897364780891c2c76ed5b8e07c03205f0fbcd4870ee7c620d62b175987c46c43750524c6e5f9009044cc24f9a
+EBUILD slony1-2.2.6.ebuild 1643 BLAKE2B 597c130629801f77850c83e3997bf9d2932ab7adccd996cb8741523352fc1412cc0222404bd41fa84190c1011d15f7132d08b2004f233c2bc27a09af54b1f65f SHA512 95b77cad245c855e078651cf29f4b1c41c14ebde7aee64bf3ae19a52bd32905dce73fed2b722e35ebea34c33e1080cd823d5b76f11d07efe1c2c4fa82e06b339
+EBUILD slony1-2.2.7.ebuild 1635 BLAKE2B f11db04586e96c02622c029270840189043233ad270bc5f053a1b0626932484ad91f302825c2a0bb107bff5efc77400a70254d6ea98a20253859b49539ff799c SHA512 14dd33945eee36c8bef912ecf168c45b93f0863cc23eb1d55b2ee2d27e58f868433f7c4922b33d29e9620ae05bf979f4df9225508faaf372b3f248bce665d81f
MISC metadata.xml 280 BLAKE2B 75bfaba3095bd67dfa80654885579e51053fd130ae4e3ad61ac75192eebad9fe8d08cbdf63773dad3837ef2805e0594d0823655966fde8876ba5919e01f0e698 SHA512 efb5fb6652ac8cd75fff4eea8b2b044a2c9201cce2faf3bbe13a97565d150e64f9ba0dd8bb691a44a1b6726455306ea8b6c1b121678a721a82e7ea8b6589c94f
diff --git a/dev-db/slony1/slony1-2.2.6.ebuild b/dev-db/slony1/slony1-2.2.6.ebuild
index c390f13f5a65..a3e2265b26e9 100644
--- a/dev-db/slony1/slony1-2.2.6.ebuild
+++ b/dev-db/slony1/slony1-2.2.6.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
-POSTGRES_COMPAT=( 9.{3..6} 10 )
+POSTGRES_COMPAT=( 9.{4..6} 10 )
POSTGRES_USEDEP="server,threads"
inherit eutils postgres-multi versionator
diff --git a/dev-db/slony1/slony1-2.2.7.ebuild b/dev-db/slony1/slony1-2.2.7.ebuild
new file mode 100644
index 000000000000..1e4c19cfd284
--- /dev/null
+++ b/dev-db/slony1/slony1-2.2.7.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+POSTGRES_COMPAT=( 9.{4..6} {10..11} )
+POSTGRES_USEDEP="server,threads"
+
+inherit eutils postgres-multi versionator
+
+IUSE="doc perl"
+
+DESCRIPTION="A replication system for the PostgreSQL Database Management System"
+HOMEPAGE="http://slony.info/"
+
+# ${P}-docs.tar.bz2 contains man pages as well as additional documentation
+MAJ_PV=$(get_version_component_range 1-2)
+SRC_URI="http://main.slony.info/downloads/${MAJ_PV}/source/${P}.tar.bz2
+ http://main.slony.info/downloads/${MAJ_PV}/source/${P}-docs.tar.bz2"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="${POSTGRES_DEP}
+ perl? ( dev-perl/DBD-Pg )
+"
+
+RDEPEND=${DEPEND}
+
+REQUIRE_USE="${POSTGRES_REQ_USE}"
+
+src_configure() {
+ local slot_bin_dir="/usr/$(get_libdir)/postgresql-@PG_SLOT@/bin"
+ use perl && myconf=" --with-perltools=\"${slot_bin_dir}\""
+ postgres-multi_foreach econf ${myconf} \
+ --with-pgconfigdir="${slot_bin_dir}" \
+ --with-slonybindir="${slot_bin_dir}"
+}
+
+src_install() {
+ postgres-multi_foreach emake DESTDIR="${D}" install
+
+ dodoc INSTALL README SAMPLE TODO UPGRADING share/slon.conf-sample
+
+ if use doc ; then
+ cd "${S}"/doc
+ dohtml -r *
+ fi
+
+ newinitd "${FILESDIR}"/slony1.init slony1
+ newconfd "${FILESDIR}"/slony1.conf slony1
+}
+
+pkg_postinst() {
+ # Slony-I installs its executables into a directory that is
+ # processed by the PostgreSQL eselect module. Call it here so that
+ # the symlinks will be created.
+ ebegin "Refreshing PostgreSQL $(postgresql-config show) symlinks"
+ postgresql-config update
+ eend $?
+}