summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-09-30 11:19:18 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-09-30 11:19:18 +0100
commit62f67115b5c46134c34f88f4b1cbdacc19384c0a (patch)
tree0a76b14de203a4c23040e5665e39df8de9867745 /dev-db
parent265dbe5dbc14c199299496c6db8fce3f76647015 (diff)
gentoo resync : 30.09.2018
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/Manifest.gzbin20670 -> 20667 bytes
-rw-r--r--dev-db/clickhouse/Manifest2
-rw-r--r--dev-db/clickhouse/clickhouse-18.12.17.ebuild200
-rw-r--r--dev-db/influxdb/Manifest2
-rw-r--r--dev-db/influxdb/influxdb-1.6.3.ebuild102
-rw-r--r--dev-db/mariadb/Manifest4
-rw-r--r--dev-db/mariadb/mariadb-10.1.36.ebuild887
-rw-r--r--dev-db/mariadb/mariadb-10.3.9.ebuild966
-rw-r--r--dev-db/mongodb/Manifest28
-rw-r--r--dev-db/mongodb/mongodb-3.0.14.ebuild174
-rw-r--r--dev-db/mongodb/mongodb-3.0.15.ebuild174
-rw-r--r--dev-db/mongodb/mongodb-3.4.13.ebuild167
-rw-r--r--dev-db/mongodb/mongodb-3.4.14.ebuild167
-rw-r--r--dev-db/mongodb/mongodb-3.4.15.ebuild167
-rw-r--r--dev-db/mongodb/mongodb-3.6.2-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-3.6.3-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-3.6.4-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-3.6.5-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-3.6.6.ebuild164
-rw-r--r--dev-db/mongodb/mongodb-3.6.8.ebuild (renamed from dev-db/mongodb/mongodb-3.6.7.ebuild)5
-rw-r--r--dev-db/mongodb/mongodb-4.0.0-r1.ebuild170
-rw-r--r--dev-db/mongodb/mongodb-4.0.1.ebuild164
-rw-r--r--dev-db/mysql++/Manifest2
-rw-r--r--dev-db/mysql++/mysql++-3.2.3.ebuild2
-rw-r--r--dev-db/mysql-init-scripts/Manifest1
-rw-r--r--dev-db/mysql-init-scripts/mysql-init-scripts-2.2-r4.ebuild67
-rw-r--r--dev-db/mysql/Manifest4
-rw-r--r--dev-db/mysql/mysql-5.6.40-r2.ebuild34
-rw-r--r--dev-db/mysql/mysql-5.6.41.ebuild34
-rw-r--r--dev-db/postgresql/Manifest28
-rw-r--r--dev-db/postgresql/postgresql-10.3.ebuild460
-rw-r--r--dev-db/postgresql/postgresql-10.4.ebuild460
-rw-r--r--dev-db/postgresql/postgresql-11_beta2.ebuild449
-rw-r--r--dev-db/postgresql/postgresql-11_beta4.ebuild (renamed from dev-db/postgresql/postgresql-11_beta1.ebuild)7
-rw-r--r--dev-db/postgresql/postgresql-9.3.22.ebuild450
-rw-r--r--dev-db/postgresql/postgresql-9.3.23.ebuild450
-rw-r--r--dev-db/postgresql/postgresql-9.4.17.ebuild482
-rw-r--r--dev-db/postgresql/postgresql-9.4.18.ebuild482
-rw-r--r--dev-db/postgresql/postgresql-9.5.12.ebuild488
-rw-r--r--dev-db/postgresql/postgresql-9.5.13.ebuild488
-rw-r--r--dev-db/postgresql/postgresql-9.6.10.ebuild2
-rw-r--r--dev-db/postgresql/postgresql-9.6.8.ebuild493
-rw-r--r--dev-db/postgresql/postgresql-9.6.9.ebuild493
-rw-r--r--dev-db/unixODBC/Manifest2
-rw-r--r--dev-db/unixODBC/unixODBC-2.3.7.ebuild61
45 files changed, 2365 insertions, 7297 deletions
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz
index 1289b9de6a58..80c01cec2f69 100644
--- a/dev-db/Manifest.gz
+++ b/dev-db/Manifest.gz
Binary files differ
diff --git a/dev-db/clickhouse/Manifest b/dev-db/clickhouse/Manifest
index ffd6cf8dd1f4..103327a46c66 100644
--- a/dev-db/clickhouse/Manifest
+++ b/dev-db/clickhouse/Manifest
@@ -2,7 +2,9 @@ AUX clickhouse-server.initd 445 BLAKE2B 166b867de3ad86f814cfbbdfa86a9328a3a54a88
AUX clickhouse-server.service 307 BLAKE2B 1f443f68db97408cb2b0a8e9007195cdc5d6e29f54e55b3bd2b023cfbcb9d3ee4c1083503f83a42cfd18bca3320dfa86571434fe89612fb0a1f5a9e178eb706b SHA512 185db8aed69b178540225fa41f623a78af09e30d2dd1e033baf4d7c80451e702f5d6b9ce5240f7f6fb6d63a4ebed5af4d483515c7e6fe019e7fd44334df4ab37
DIST cctz-4f9776a.tar.gz 290009 BLAKE2B 532eb7d590f9814c05cc7fdd3c75efe0a6b3f81d85201b14163a9600dd858c4fbac592270d0afccd7d5eef0080d7e70e9d716023bdb60d55479585e2cd3d3f59 SHA512 ba0dfc404cc70f03ef2be29fa3b0c70ea881c92a92525ea4ba1b5bcfc9e45df1b62a5eec180f498293e64bdd5cb9b41f97361cbb7e8baf299dcfdcd1557ca205
DIST clickhouse-18.10.3.tar.gz 6136661 BLAKE2B 5564bbe85f4ca43f18df702148af0e4e5b5a8826994d90f29beb3a37cdbeb36f9d3ec77d9c7bc6f843e7586e5441aeb0937548eb5eb61d27cecc5790d8c21a5b SHA512 c78386922388cf910a995b569724eb22fc41ab60e765a4d3644c4a48d8b9a67ef28b7e375186b2eb00c43b4f06e90783084f4ac4d3789f1b6e4251ee30e8833c
+DIST clickhouse-18.12.17.tar.gz 6495521 BLAKE2B 00dfb823b9e36923beb50a88bee88af3918bedc7b20079785699a42e36e52f32739f786bd78c5b350f58ae59251e3846da6202d04e24e9a750c92e16065cc395 SHA512 876c5fb6011c65b8ec201126678dad6f5de3430b7d320316ced5c6d22e8086ce337d20b73badbd053bf141097b8fe6cd94910ed607b4bbedb681cfa7921d1fb6
DIST clickhouse-18.6.0.tar.gz 5852534 BLAKE2B 5634fd26907b21d4a35cff3ed816696205be4aff1cdd1acfe222e24214b1842eb18a4e499e888b0d92b78f5c3023c2962a385af2c0ea889055e473dfa0198bf5 SHA512 e8ea2d4457122513cad47b1cdb2a58dd2ffaec77a7a08bf82179aca12a369d39970520a995bb5db2e5ea4b0939da827b7d4b1f3929cf71c149c965438ebb3633
EBUILD clickhouse-18.10.3.ebuild 4915 BLAKE2B 3f6f0f1cea60a283b325b80100fc56ffcb548e6af01240a12a5f6a6aad521977c63e8918d3742c52c0fef2d5c79144f6a1f9cb95749a6c140cb16548af432f4a SHA512 0ecc73385521a4d916e8834d22e05a8be07fb0b2d6a4bcc3350dfab100717839835e4a47a17d87f50f98acbf420b077dc7f9db800e3456915dc2ed81fc0197ba
+EBUILD clickhouse-18.12.17.ebuild 4912 BLAKE2B 71e1d446bc95be176c6946d18162b78f0ae0e936be2caedd9ee7b0df958daf8423ffce528c27c90607568f5bf3b391092ef264c7d1439506ab89f6fded52bb6b SHA512 6ac5f2e640ad5e6536a38a9693df2b31706f9d777f53213971ef848160886d16b6cc0a7f900ce587e53b1cdba3edcdd37541b4e639aa65662f9e0a26f9501fc5
EBUILD clickhouse-18.6.0.ebuild 4903 BLAKE2B d363915e46bfe1489e07f9ae9b07a39c146603af9496ab98371b053241566e02c7b85cf64a985ef8958e83a8741ac20583917e8268cec80702e4d37e69d8e110 SHA512 443eb0cd7f343eaff895dfbcb6a98abc4b2734495e2abd9c9f51e613fc2ac8698797bb5f780178c86bc0d8621cfe0b976470c7c4b9ec0bd337fa0599f0d01848
MISC metadata.xml 738 BLAKE2B 861f40f506964d64cf646f043406945dc54950f48e27d4eb28b6fc0f96bf0ceb093520a0b60d813460fbe8b99ba4858f0a49d30abcb25567f44411c78a02f6e7 SHA512 6d87cc967c081b5a5e60136f5928d7b17c65c3a1c26aa1e45a50e74d5383bb665682a8b0cb5cce0496bebcac1f5e27aace8a8373253c031acc3c166c382e0056
diff --git a/dev-db/clickhouse/clickhouse-18.12.17.ebuild b/dev-db/clickhouse/clickhouse-18.12.17.ebuild
new file mode 100644
index 000000000000..40f986b3e902
--- /dev/null
+++ b/dev-db/clickhouse/clickhouse-18.12.17.ebuild
@@ -0,0 +1,200 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_MAKEFILE_GENERATOR="ninja"
+
+inherit cmake-utils systemd toolchain-funcs user
+
+DESCRIPTION="An OSS column-oriented database management system for real-time data analysis"
+HOMEPAGE="https://clickhouse.yandex"
+LICENSE="Apache-2.0"
+
+MY_PN="ClickHouse"
+TYPE="stable"
+
+CCTZ_COMMIT="4f9776a"
+SRC_URI="https://github.com/yandex/${MY_PN}/archive/v${PV}-${TYPE}.tar.gz -> ${P}.tar.gz
+ https://github.com/google/cctz/archive/${CCTZ_COMMIT}.tar.gz -> cctz-${CCTZ_COMMIT}.tar.gz
+"
+
+SLOT="0/${TYPE}"
+IUSE="+client cpu_flags_x86_sse4_2 +server debug doc kafka mongodb mysql static test tools"
+KEYWORDS="~amd64"
+
+REQUIRED_USE="
+ server? ( cpu_flags_x86_sse4_2 )
+ static? ( client server tools )
+"
+
+RDEPEND="
+ dev-libs/re2:0=
+ !static? (
+ >=app-arch/lz4-1.8.0:=
+ >=app-arch/zstd-1.3.4:=
+ client? (
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ )
+
+ dev-libs/double-conversion
+ dev-libs/capnproto
+ dev-libs/libltdl:0
+ sys-libs/libunwind:7
+ sys-libs/zlib
+ || (
+ dev-db/unixODBC
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu:=
+ dev-libs/glib
+ >=dev-libs/boost-1.65.0:=
+ dev-libs/openssl:0=
+ kafka? ( dev-libs/librdkafka:= )
+ mysql? ( virtual/libmysqlclient )
+ )
+
+ >=dev-libs/poco-1.9.0
+ dev-libs/libpcre
+"
+
+DEPEND="${RDEPEND}
+ doc? ( >=dev-python/mkdocs-1.0.1 )
+ static? (
+ >=app-arch/lz4-1.8.0[static-libs]
+ >=app-arch/zstd-1.3.4[static-libs]
+ client? (
+ sys-libs/ncurses:0=[static-libs]
+ sys-libs/readline:0=[static-libs]
+ )
+ dev-libs/double-conversion[static-libs]
+ dev-libs/capnproto[static-libs]
+ dev-libs/libltdl[static-libs]
+ sys-libs/libunwind:7[static-libs]
+ sys-libs/zlib[static-libs]
+ || (
+ dev-db/unixODBC[static-libs]
+ dev-libs/poco[odbc]
+ )
+ dev-libs/icu[static-libs]
+ dev-libs/glib[static-libs]
+ >=dev-libs/boost-1.65.0[static-libs]
+ dev-libs/openssl[static-libs]
+ virtual/libmysqlclient[static-libs]
+ kafka? ( dev-libs/librdkafka[static-libs] )
+ )
+
+ sys-libs/libtermcap-compat
+ dev-util/patchelf
+ >=sys-devel/lld-6.0.0
+ || (
+ >=sys-devel/gcc-7.0
+ >=sys-devel/clang-6.0
+ )
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}-${TYPE}"
+
+_clang_fullversion() {
+ local ver="$1"; shift
+ set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
+ eval echo "$ver"
+}
+
+clang-fullversion() {
+ _clang_fullversion '$1.$2.$3' "$@"
+}
+
+clang-version() {
+ _clang_fullversion '$1.$2' "$@"
+}
+
+clang-major-version() {
+ _clang_fullversion '$1' "$@"
+}
+
+clang-minor-version() {
+ _clang_fullversion '$2' "$@"
+}
+
+clang-micro-version() {
+ _clang_fullversion '$3' "$@"
+}
+
+pkg_pretend() {
+ if [[ $(tc-getCC) == clang ]]; then
+ if [[ $(clang-major-version) -lt 6 ]]; then
+ eerror "Compilation with clang older than 6.0 is not supported"
+ die "Too old clang found"
+ fi
+ :
+ elif [[ $(gcc-major-version) -lt 7 ]] && [[$(gcc-minor-version) -lt 2 ]]; then
+ eerror "Compilation with gcc older than 7.2 is not supported"
+ die "Too old gcc found"
+ fi
+}
+
+src_unpack() {
+ default_src_unpack
+ [[ ${PV} == 9999 ]] && return 0
+ cd "${S}/contrib" || die "failed to cd to contrib"
+ mkdir -p cctz zstd || die "failed to create directories"
+ tar --strip-components=1 -C cctz -xf "${DISTDIR}/cctz-${CCTZ_COMMIT}.tar.gz" || die "failed to unpack cctz"
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_POCO_MONGODB="$(usex mongodb)"
+ -DENABLE_RDKAFKA="$(usex kafka)"
+ -DENABLE_TESTS="$(usex test)"
+ -DUSE_STATIC_LIBRARIES="$(usex static)"
+ -DMAKE_STATIC_LIBRARIES="$(usex static)"
+ -DUSE_MYSQL="$(usex mysql)"
+ -DENABLE_CLICKHOUSE_SERVER="$(usex server)"
+ -DENABLE_CLICKHOUSE_CLIENT="$(usex client)"
+ -DENABLE_CLICKHOUSE_LOCAL="$(usex tools)"
+ -DENABLE_CLICKHOUSE_BENCHMARK="$(usex tools)"
+ -DENABLE_CLICKHOUSE_PERFORMANCE="$(usex tools)"
+ -DENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COMPRESSOR="$(usex tools)"
+ -DENABLE_CLICKHOUSE_COPIER="$(usex tools)"
+ # As of now, clickhouse fails to build if odbc is disabled
+ -DENABLE_ODBC=True
+ -DENABLE_CLICKHOUSE_ODBC_BRIDGE=True
+ -DENABLE_CLICKHOUSE_ALL=OFF
+ -DUSE_INTERNAL_SSL_LIBRARY=False
+ -DUSE_INTERNAL_CITYHASH_LIBRARY=ON # Clickhouse explicitly requires bundled patched cityhash
+ -DUNBUNDLED=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ if ! use test; then
+ rm -rf "${D}/usr/share/clickhouse-test" || die "failed to remove tests"
+ fi
+
+ if use doc; then
+ pushd "${S}/docs/tools" || die "Failed to enter docs build directory"
+ ./build.py || die "Failed to build docs"
+ popd || die "Failed to exit docs build directory"
+
+ dodoc -r "${S}/docs/build"
+ fi
+
+ if use server; then
+ newinitd "${FILESDIR}"/clickhouse-server.initd clickhouse-server
+ systemd_dounit "${FILESDIR}"/clickhouse-server.service
+ fi
+}
+
+pkg_preinst() {
+ if use server; then
+ enewgroup clickhouse
+ enewuser clickhouse -1 -1 /var/lib/clickhouse clickhouse
+ fi
+}
diff --git a/dev-db/influxdb/Manifest b/dev-db/influxdb/Manifest
index a3f87ada88bd..d148463b1c1f 100644
--- a/dev-db/influxdb/Manifest
+++ b/dev-db/influxdb/Manifest
@@ -46,5 +46,7 @@ DIST github.com-uber-go-multierr-fb7d312c2c04c34f0ad621048bbb953b168f9ff6.tar.gz
DIST github.com-uber-go-zap-35aad584952c3e7020db7b839f6b102de6271f89.tar.gz 103010 BLAKE2B fced708acd2e4668a2478d287541b0e6d607aaec63d3d7f0dee619f8e9d4d9bc41259ddb73c882f4a78f0241befcb5aef939964487ac862e87e88fca65fc1485 SHA512 7893930d687b7217fff81f7965bddc020977b1969203e0a93a6b92b1fff87684f958439fa2ee78d236449943d6b53aa22dc6d7f4f05513dfdac1e54ece139cec
DIST github.com-xlab-treeprint-06dfc6fa17cdde904617990a0c2d89e3e332dbb3.tar.gz 6365 BLAKE2B 4b7b406da890340592e8eeee19fbf45bfd3c30d2db00b300a2aa5607beb790c21ee29a470a92a14be77400f3c1ca89298650d32b53d98fa18a60521af76c9640 SHA512 7b9e950ea4d4288efbdca94e5a2dacdd28e2a23036253162a44365388aa0dc4ddafeb56f36b784b9d5c47a0071f0487da8a83df7c8e8ef6c197dc03a63bc7646
DIST influxdb-1.5.1.tar.gz 1225941 BLAKE2B 6d3639f0c31b885f836e3e97ad943147ba206af4f7798389972f6880d111493633595251a92c540ae23fe0f8a57eb00befb19ddb3d229318b52baebf30301320 SHA512 d536bfd960c8d2145d275da934e1638f425ed168ca3c4b3987084f8dacb2f1b827082c635ad83ad3c3cf105efdbb8465d2f0f552215775f6eb321219280d626e
+DIST influxdb-1.6.3.tar.gz 1506621 BLAKE2B e0594a6f9992cabbb7b44ca75b3054a97af22e02278c2b44262ec5c3a00fab35e17b48957625d0ba267e1ef924d7999feed34d2b215ea79067592f50e5dc5941 SHA512 a6bca52223ae084a7d3feef20574b0f6d96105547a17e4cb2713bee18beb0fb31d096779a908d14ceec1510db93841cba5bfd26bc5e6961538351069f1a7a728
EBUILD influxdb-1.5.1.ebuild 4699 BLAKE2B 67ff0a2e348012e12de388cb2c3f548ff1604f6f35aa5c9b3e3ac563e596179eaa8877e16f2659e1a08b5c784748ca22fd7165b04c54d0d068533e078367a28d SHA512 8c67a4394b7d10f81bc969c6b321166019f030f68d4925c062b1afd4f7b937d9c5900617521cf45acacac5e529f73341921d08f491786a8997d2c9b85f0c8865
+EBUILD influxdb-1.6.3.ebuild 4699 BLAKE2B 67ff0a2e348012e12de388cb2c3f548ff1604f6f35aa5c9b3e3ac563e596179eaa8877e16f2659e1a08b5c784748ca22fd7165b04c54d0d068533e078367a28d SHA512 8c67a4394b7d10f81bc969c6b321166019f030f68d4925c062b1afd4f7b937d9c5900617521cf45acacac5e529f73341921d08f491786a8997d2c9b85f0c8865
MISC metadata.xml 452 BLAKE2B b1c73f1e86864534f79c9b8e136691660014c6cffda6d92b89d6bf73cbaf17e28ba4989cbb3a48aa29cfd4587d02ac415406fdb49bccfa18c8129b8ae4cd146e SHA512 7100ef74e1dfbc09bf0accecedfeac01ddc257566fe1ea9138c0a0d1d491abe142ae677760704ba207a609d6a94e81367b515905aabd80ac1f78a4eba27d176b
diff --git a/dev-db/influxdb/influxdb-1.6.3.ebuild b/dev-db/influxdb/influxdb-1.6.3.ebuild
new file mode 100644
index 000000000000..c9076ff600e5
--- /dev/null
+++ b/dev-db/influxdb/influxdb-1.6.3.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+EGO_PN=github.com/influxdata/${PN}
+EGO_VENDOR=(
+"collectd.org e84e8af5356e7f47485bbc95c96da6dd7984a67e github.com/collectd/go-collectd"
+"github.com/BurntSushi/toml a368813c5e648fee92e5f6c30e3944ff9d5e8895"
+"github.com/RoaringBitmap/roaring cefad6e4f79d4fa5d1d758ff937dde300641ccfa"
+"github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9"
+"github.com/bmizerany/pat c068ca2f0aacee5ac3681d68e4d0a003b7d1fd2c"
+"github.com/boltdb/bolt 4b1ebc1869ad66568b313d0dc410e2be72670dda"
+"github.com/cespare/xxhash 1b6d2e40c16ba0dfce5c8eac2480ad6e7394819b"
+"github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76"
+"github.com/dgrijalva/jwt-go 24c63f56522a87ec5339cc3567883f1039378fdb"
+"github.com/dgryski/go-bits 2ad8d707cc05b1815ce6ff2543bb5e8d8f9298ef"
+"github.com/dgryski/go-bitstream 7d46cd22db7004f0cceb6f7975824b560cf0e486"
+"github.com/glycerine/go-unsnap-stream 62a9a9eb44fd8932157b1a8ace2149eff5971af6"
+"github.com/gogo/protobuf 1c2b16bc280d6635de6c52fc1471ab962dc36ec9"
+"github.com/golang/protobuf 1e59b77b52bf8e4b449a57e6f79f21226d571845"
+"github.com/golang/snappy d9eb7a3d35ec988b8585d4a0068e462c27d28380"
+"github.com/google/go-cmp 18107e6c56edb2d51f965f7d68e59404f0daee54"
+"github.com/influxdata/influxql 21ddebb5641365d9b92234e8f5a566c41da9ab48"
+"github.com/influxdata/usage-client 6d3895376368aa52a3a81d2a16e90f0f52371967"
+"github.com/influxdata/yamux 1f58ded512de5feabbe30b60c7d33a7a896c5f16"
+"github.com/influxdata/yarpc 036268cdec22b7074cd6d50cc6d7315c667063c7"
+"github.com/jsternberg/zap-logfmt 5ea53862c7fa897f44ae0b3004283308c0b0c9d1"
+"github.com/jwilder/encoding 27894731927e49b0a9023f00312be26733744815"
+"github.com/mattn/go-isatty 6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c"
+"github.com/matttproud/golang_protobuf_extensions c12348ce28de40eed0136aa2b644d0ee0650e56c"
+"github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7"
+"github.com/paulbellamy/ratecounter 5a11f585a31379765c190c033b6ad39956584447"
+"github.com/peterh/liner 88609521dc4b6c858fd4c98b628147da928ce4ac"
+"github.com/philhofer/fwd 1612a298117663d7bc9a760ae20d383413859798"
+"github.com/prometheus/client_golang 661e31bf844dfca9aeba15f27ea8aa0d485ad212"
+"github.com/prometheus/client_model 99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"
+"github.com/prometheus/common 2e54d0b93cba2fd133edc32211dcc32c06ef72ca"
+"github.com/prometheus/procfs a6e9df898b1336106c743392c48ee0b71f5c4efa"
+"github.com/retailnext/hllpp 38a7bb71b483e855d35010808143beaf05b67f9d"
+"github.com/tinylib/msgp ad0ff2e232ad2e37faf67087fb24bf8d04a8ce20"
+"github.com/xlab/treeprint 06dfc6fa17cdde904617990a0c2d89e3e332dbb3"
+"go.uber.org/atomic 54f72d32435d760d5604f17a82e2435b28dc4ba5 github.com/uber-go/atomic"
+"go.uber.org/multierr fb7d312c2c04c34f0ad621048bbb953b168f9ff6 github.com/uber-go/multierr"
+"go.uber.org/zap 35aad584952c3e7020db7b839f6b102de6271f89 github.com/uber-go/zap"
+"golang.org/x/crypto 9477e0b78b9ac3d0b03822fd95422e2fe07627cd github.com/golang/crypto"
+"golang.org/x/net 9dfe39835686865bff950a07b394c12a98ddc811 github.com/golang/net"
+"golang.org/x/sync fd80eb99c8f653c847d294a001bdf2a3a6f768f5 github.com/golang/sync"
+"golang.org/x/sys 062cd7e4e68206d8bab9b18396626e855c992658 github.com/golang/sys"
+"golang.org/x/text a71fd10341b064c10f4a81ceac72bcf70f26ea34 github.com/golang/text"
+"golang.org/x/time 6dc17368e09b0e8634d71cac8168d853e869a0c7 github.com/golang/time"
+ )
+
+inherit golang-build golang-vcs-snapshot systemd user
+
+DESCRIPTION=" Scalable datastore for metrics, events, and real-time analytics"
+HOMEPAGE="https://www.influxdata.com"
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${EGO_VENDOR_URI}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=app-text/asciidoc-8.6.10
+ app-text/xmlto"
+
+pkg_setup() {
+ enewgroup influxdb
+ enewuser influxdb -1 -1 /var/lib/influxdb influxdb
+}
+
+src_compile() {
+ pushd "src/${EGO_PN}" > /dev/null || die
+ set -- env GOPATH="${S}" go build -v -work -x ./...
+ echo "$@"
+ "$@" || die "compile failed"
+ cd man
+ emake build
+ popd > /dev/null
+}
+
+src_install() {
+ pushd "src/${EGO_PN}" > /dev/null || die
+ set -- env GOPATH="${S}" go install -v -work -x ./...
+ echo "$@"
+ "$@" || die
+ dobin "${S}"/bin/influx*
+ dodoc CHANGELOG.md etc/config.sample.toml
+ doman man/*.1
+ insinto /etc/logrotate.d
+ newins scripts/logrotate influxdb
+ systemd_dounit scripts/influxdb.service
+ newconfd "${FILESDIR}"/influxdb.confd influxdb
+ newinitd "${FILESDIR}"/influxdb.rc influxdb
+ insinto /etc/influxdb
+ doins "${FILESDIR}"/influxd.conf
+ keepdir /var/log/influxdb
+ fowners influxdb:influxdb /var/log/influxdb
+ popd > /dev/null || die
+}
diff --git a/dev-db/mariadb/Manifest b/dev-db/mariadb/Manifest
index cfef0a58d334..b221f81943d2 100644
--- a/dev-db/mariadb/Manifest
+++ b/dev-db/mariadb/Manifest
@@ -9,15 +9,19 @@ DIST mariadb-10.0.35.tar.gz 66551252 BLAKE2B 69cc9c78f7c47a4b1760940cb0f395b4053
DIST mariadb-10.0.36.tar.gz 66577105 BLAKE2B 6165c641cf4a8d13e53aa8391fe146edb476d6fe80aebd0c0698543595f2060a3f7c834cbfd8d7e7c50697e7be1010ae833310f2756da84b11c87224c940df50 SHA512 aa26e43775f4f76754c79c960b5e96d8ae3e28ab922d7abbb5c23867a2705085fe57830addc79eed3c810329eca344eaf1c09dcdb8b73d9d73c85090386984c0
DIST mariadb-10.1.34.tar.gz 65298561 BLAKE2B 3f3af7b8bad68a08f69befd3f3e7bd88b8cf058feb20309dc2cdbd16bf5d015c2cb0d1d9d2fdf831f6183c0b9bb25405124c24b2940467489e05d42c57f7b0a6 SHA512 3c18359006b340dcf724d1fce36dcc19916c42492269a7545e0726172b8f7b84860e10725c74e4458dae34572395f1650bf17838e9058544e0a6cfcbffd54f6d
DIST mariadb-10.1.35.tar.gz 65324620 BLAKE2B 659ad232a1f2f1cfd74ba8aa9b9f67adc6f4a5dc82e5d8b16011dba83155b1223138df273c935c71021f05068cd8fd14538e935847a36640fc4218b86155698c SHA512 88e6049f3bbc3aa047e108f91a2c4f335758e80f25bfa2974b5f8c2e13f5758824d7835dece021b515c531e5641b9998e4de92256ad4b47b7f694da99bd471aa
+DIST mariadb-10.1.36.tar.gz 63366949 BLAKE2B ef2831832eff5283fbb62500639921c7680c987ca7627bd75125b8f32e798b70ce5ac551979bf5b60bdabc6fededf38befae9939720c88cc4305084eeb32281a SHA512 44eb8565f068292511c8109c8b265472ba0884377644a7ef8a4a19793c8c5e75faee0b3de7a3c276589a074ddd64c9658e27807d68b0002e2354c1583b9bbf76
DIST mariadb-10.2.17.tar.gz 73409162 BLAKE2B f13d359a4a061ae2ef2fb4dde53ed07dac1735f9577ef67e396a51ac74acec71acf7a0ab07b4e0f84d70c8f7bcacbdc61933957c4936c99d5038f433296af8a3 SHA512 9714f786abde43b418d8b5accbbd485de213b90db18c879625ce30777526d28fdafd3bdb43922ab6872b300cfa06895b5b3fad5eb0c0e804ad66a1fd1793a141
DIST mariadb-10.3.8.tar.gz 72152953 BLAKE2B 4742be1d533c7958b61efd430411a1e7390faffc25ceccc09c736647fb263dc3797064725335abf17f9362c7a92293ea5fc72bc2ddd70636f83c25e35c4c83aa SHA512 e1b61900a06fa57992a2f8516771f5fb98799ed5a4bbe74f858c0fe87b907cc6b600942d6fe97b6064cb39b610a7213cb3bc9634a336f9ebffe11dfe67746422
+DIST mariadb-10.3.9.tar.gz 72190007 BLAKE2B c026e5d68855e8f48c78cbda78288b645edfcffd02b2f9870526d06e1e09b52b709a29dcc0d51d073ab59f42ce5f007effdb7102d66fceec07ac195f96064ad0 SHA512 7c7a678fb0c85da64b6df3df17b8cf7f2ccf862e27dcf8535f7403f8693c76b3b1a912f4b6ca876a591ada60a99577a947bfe7a63c602f754332e1e4f689e6e7
DIST mariadb-5.5.61.tar.gz 45839038 BLAKE2B 2755963d51aee3b9b560531e00b9df6f5637c90a44ad181cf826234d27c15e9fd1b61ae4faf4d9a4ff06779e605c6a5757192407e6e402ad68dfb3ae45a94088 SHA512 a2bebb47ec62eb6cd15e003dea7708948cd96fd7f0fc631a85cfc4691b55e220ed78f3e3b16542b5152ad5bcc61e50a831c71cf8f29481f7de86816ec0bae594
DIST mysql-extras-20180809-1700Z.tar.bz2 322999 BLAKE2B 8b5feb32085dc35b2f68dae985b2d266c4eaa0e956b490050a2df04bbff99bf8623b67e75af9326d84e3ad625c4d86b0d21d23c9a96df5a0c9cd5ed730958970 SHA512 fbd7af9284bbf09d55f128361e7cc52d94f24ac491aac800cd6d61f2e444aeca66a4d5e6ae94c2fb4044e00cec9b232bae9a76a229f87f19d90b7aecf70792ec
EBUILD mariadb-10.0.35-r2.ebuild 27520 BLAKE2B 09bb435fc35e43e9d5a9f0bb234d7583d8ceb55f19e46176def7d1d4370fe99aedb89e28860cc49134f693bf0f49ff4333916441742da72cf65ad7ef6353c72a SHA512 159b2c09d0da83841f77822b4501cc4302758711c9db9447e6c34ebe6185801cbacb4774060d238f7c5aee4595ccc4e0e05f062300f38e27ff86a54a2dce4a95
EBUILD mariadb-10.0.36.ebuild 27527 BLAKE2B 492a99d33fdc94203de03864166a36cac62eaba1259c9da3a3d70095cc6babad58da812bb5fe4911544709de61eaf071d94a9325bab64284343e4a198946c977 SHA512 0b63f8763453f90aa758fa0b1ae39e32377b36d3648e7a364bcdd96525354809a0809185428f6ffcde0571193fdfa95a6d1d72537737269ca415ea3e1c6b3b43
EBUILD mariadb-10.1.34.ebuild 29472 BLAKE2B 859741b70abf8c2347395b26b7543f36be94165141227bb7dc75f054768490bf891eea5bd2f171aa0c0f8caed7603abf1347a0087caa10e55ce920aaa9c6677b SHA512 ff30a1fcdcc72b8324dec1be29db63a1792ca58474744f0c02014b1fba28d856ac0f154235b0889aedcc95cf24c4b58fcfd681458be726609861ba6f4220ad8f
EBUILD mariadb-10.1.35.ebuild 29479 BLAKE2B b14a63bbdf81468902efaf712b2944b70964fafd0eaf42ec2dbc4ac2ea5d298031bbdadc43fa27dc7035931a50a818960fe2ddcfca4cef351ada73d028e4eaf9 SHA512 c346bc073836725d3a022a73106b4fea2e9de88cc0ee3571ce2e2d292f931b584ce21336d0a31ff7efe015e7692f51e5a1bdbfd21f2a69c65e5df08761ac9f72
+EBUILD mariadb-10.1.36.ebuild 29476 BLAKE2B 6b608a9e1ded83bc3d49644239912a7ee20f5fc5c48d60bdd9fa3320b7ac8d5188fc0a7039d28fc3ec1ced6b7a95b36c8f6807ad8da3700e34c2ff7300d73443 SHA512 0aeaabeb9cd43f0feba34013dd7381106bbd79370771429bcccbb821d9383d488264c7bd259d221776a6f971b021d1f902e7c61ba4e515e92eb908f789f74a90
EBUILD mariadb-10.2.17.ebuild 33523 BLAKE2B e8209606e05f27c62ee62fdd6a65cc3b1265d43cf024cde462834d378926392791a26d76f7018df20ede173d1f374f7e38d13ea9f3ff8948ce55a16fea43f3cb SHA512 0bc6b436c69116b6e5a82b83691ff1ec57291a0be7a3ddc203380ec6d211807a2397b82922a9504b1d9060a18ef4f2d9cbf2e2eae651350cb568f76476efd8d0
EBUILD mariadb-10.3.8.ebuild 32090 BLAKE2B b054d6ecb631b2d974dbe51723e0e517f791f62f80a3f198c0a9bbc9882d5152f9afc959e3c3dfd44af499f258bd3f2e6399c85535c899b93865ca50adf8b31a SHA512 e8f0d7053be5ab1b227af377892e2aa435b643534a162fa0a39d430611b59d55fbb116aaccebbe0528289a66fba6dcffd27e2f7d98015bd58b333b049d3733d6
+EBUILD mariadb-10.3.9.ebuild 32155 BLAKE2B 89b5292ee020e44ef89191da1c0d71bda768c7eaa77fea879fff22846aa8630ed46654902bc9ca18dd4ae8966897e94303b582290eb97d348ef5e48875d0b050 SHA512 cca2fd68be64bcf977ba4dc41844258557a7114f815ac40dcba9594d6488b4cb61d58ba53a9fa50d1b9ffb46ae265e7b68d0a45d94ce5528b0cc2e09a24af1bc
EBUILD mariadb-5.5.61.ebuild 27072 BLAKE2B f814240f2445f793ba04e912d20d3ad22c6bc1304379a0fbbbe0ae39cb8418ebe5c9d187253be11db4744ba75aabc70d0e4ef409ff71ea63cfbc3a6e08d464dc SHA512 d9b7f3d3711532e51938917b6b5976a7df15e74efb86c9c1621ef8e4dc813dbbf1d75d4e90e6ffb0d8924f58709a018ead3d153c6c250a4c775b18d005b4c300
MISC metadata.xml 2692 BLAKE2B 2843540212ba28e3abc4e68851de3901801c25097f65d21f21698e47efbc32cce4d2e315e787c69cd2999c1077815a383eb52c9859e55bb0a5c3f4d6c6f48d17 SHA512 d5622dd8c6d4913801b8b7b0f893466c121857473673499a1e97cb47ab94c985bcf94fa9e2fed0fdb81ab6d8bbe6599ff51f8f78df4f6f5bdc33cca8aca9158e
diff --git a/dev-db/mariadb/mariadb-10.1.36.ebuild b/dev-db/mariadb/mariadb-10.1.36.ebuild
new file mode 100644
index 000000000000..51e39e6958e5
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.1.36.ebuild
@@ -0,0 +1,887 @@
+# 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 systemd 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="+backup bindist client-libs cracklib debug extraengine galera jdbc jemalloc kerberos
+ innodb-lz4 innodb-lzo innodb-snappy latin1 libressl mroonga numa odbc oqgraph pam
+ +perl profiling selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup
+ systemd systemtap static static-libs 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 ~x86-fbsd ~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}"/20006_all_cmake_elib-mariadb-10.1.27.patch
+ "${MY_PATCH_DIR}"/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch
+ "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
+ "${MY_PATCH_DIR}"/20018_all_mariadb-10.1.16-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20025_all_mariadb-10.1.26-gssapi-detect.patch
+ "${MY_PATCH_DIR}"/20029_all_mariadb-10.1.31-enable-numa.patch
+ "${MY_PATCH_DIR}"/20035_all_mariadb-10.1-atomic-detection.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/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ backup? ( app-arch/libarchive:0= )
+ cracklib? ( sys-libs/cracklib:0= )
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ sys-libs/zlib[minizip]
+ )
+ innodb-lz4? ( app-arch/lz4 )
+ innodb-lzo? ( dev-libs/lzo )
+ innodb-snappy? ( app-arch/snappy )
+ kerberos? ( virtual/krb5 )
+ mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
+ numa? ( sys-process/numactl )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ !yassl? ( !libressl? ( !>=dev-libs/openssl-1.1.0 ) )
+ >=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}
+ server? ( galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-25*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ 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? ( galera? ( 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
+
+ # Avoid useless library checks
+ use mroonga || _disable_engine mroonga
+ use oqgraph || _disable_engine oqgraph
+ _disable_engine example
+
+ 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_MYSQLTESTDIR=$(usex test 'share/mariadb/mysql-test' '')
+ -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"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ -DWITH_DEFAULT_FEATURE_SET=0
+ -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
+ # 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)
+ -DWITH_SSL=$(usex yassl bundled system)
+ )
+
+ if use server ; then
+
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ mycmakeargs+=(
+ -DPLUGIN_FEDERATED=NO
+ -DPLUGIN_FEDERATEDX=NO )
+ fi
+
+ mycmakeargs+=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
+ -DPLUGIN_SPHINX=$(usex sphinx YES NO)
+ -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
+ -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
+ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
+ -DPLUGIN_CASSANDRA=NO
+ -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
+ -DPLUGIN_SPIDER=$(usex extraengine YES NO)
+ -DPLUGIN_CONNECT=$(usex extraengine YES NO)
+ -DCONNECT_WITH_MYSQL=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=$(usex galera)
+ -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
+ -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
+ -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
+ -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DPLUGIN_AUTH_GSSAPI_CLIENT=NO
+ -DWITH_MARIABACKUP=$(usex backup ON OFF)
+ -DWITH_LIBARCHIVE=$(usex backup ON OFF)
+ -DWITH_SYSTEMD=$(usex systemd yes no)
+ -DWITH_NUMA=$(usex numa ON OFF)
+ -DINSTALL_SQLBENCHDIR=''
+ )
+
+ 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
+ -DMYSQL_USER=mysql
+ -DDISABLE_SHARED=$(usex static YES NO)
+ -DWITH_DEBUG=$(usex debug)
+ -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=
+ -DWITH_SYSTEMD=no
+ )
+ 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 plugins.cracklib_password_check plugins.two_password_validations ; do
+ _disable_test "$t" "False positive due to varying policies"
+ done
+
+ for t in main.mysql_client_test main.mysql_client_test_nonblock \
+ rpl.rpl_semi_sync_uninstall_plugin \
+ 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
+
+ _disable_test sys_vars.sysvars_server_notembedded "Broken test" # bug #661700 required profiling always on
+
+ # 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.3.9.ebuild b/dev-db/mariadb/mariadb-10.3.9.ebuild
new file mode 100644
index 000000000000..d8976720941b
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.3.9.ebuild
@@ -0,0 +1,966 @@
+# 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 systemd 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 LGPL-2.1+"
+SLOT="0/${SUBSLOT:-0}"
+IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
+ innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
+ numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
+ sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd 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 )"
+
+# REMEMBER: also update eclass/mysql*.eclass before committing!
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~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
+ inherit git-r3
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
+ EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
+ EGIT_CLONE_TYPE=shallow
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
+else
+ MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
+fi
+
+PATCHES=(
+ "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
+ "${MY_PATCH_DIR}"/20018_all_mariadb-10.2.16-without-clientlibs-tools.patch
+ "${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
+ "${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
+ "${MY_PATCH_DIR}"/20035_all_mariadb-10.3-atomic-detection.patch
+)
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+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= )
+ >=sys-libs/zlib-1.2.3:0=
+ kerberos? ( virtual/krb5 )
+ yassl? ( net-libs/gnutls:0= )
+ !yassl? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ sys-libs/ncurses:0=
+ !bindist? (
+ sys-libs/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ server? (
+ backup? ( app-arch/libarchive:0= )
+ cracklib? ( sys-libs/cracklib:0= )
+ extraengine? (
+ odbc? ( dev-db/unixODBC:0= )
+ xml? ( dev-libs/libxml2:2= )
+ )
+ innodb-lz4? ( app-arch/lz4 )
+ innodb-lzo? ( dev-libs/lzo )
+ innodb-snappy? ( app-arch/snappy )
+ mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
+ numa? ( sys-process/numactl )
+ oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
+ pam? ( virtual/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+ dev-db/mariadb-connector-c[${MULTILIB_USEDEP},static-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 )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ server? ( !prefix? ( dev-db/mysql-init-scripts ) )
+ !<virtual/mysql-5.6-r11
+ ${COMMON_DEPEND}
+ server? ( galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-25*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ 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? ( ~virtual/mysql-5.6[static=]
+ galera? ( 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
+
+ # Here we need to see if the implementation switched client libraries
+ # We check if this is a new instance of the package and a client library already exists
+ local SHOW_ABI_MESSAGE libpath
+ if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+ elog "Due to ABI changes when switching between different client libraries,"
+ elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
+ elog "Please run: revdep-rebuild --library ${libpath}"
+ ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+ fi
+}
+
+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
+
+ if use galera ; then
+ 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
+ fi
+
+ # Note about configuration change
+ einfo
+ elog "This version of mariadb reorganizes the configuration from a single my.cnf"
+ elog "to several files in /etc/mysql/${PN}.d."
+ elog "Please backup any changes you made to /etc/mysql/my.cnf"
+ elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
+ elog "You may have as many files as needed and they are read alphabetically."
+ elog "Be sure the options have the appropitate section headers, i.e. [mysqld]."
+ einfo
+}
+
+src_unpack() {
+
+ # Initialize the proper variables first
+ mysql_init_vars
+
+ unpack ${A}
+ # Grab the patches
+ [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
+
+ mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
+}
+
+src_prepare() {
+ _disable_plugin() {
+ echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
+ }
+ _disable_engine() {
+ echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
+ }
+
+ if use tcmalloc; then
+ echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
+ 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 sql_errlog )
+ local test_plugins=( audit_null auth_examples daemon_example fulltext
+ debug_key_management example_key_management versioning )
+ 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
+ _disable_engine test_sql_discovery
+ fi
+
+ _disable_engine example
+
+ if ! use oqgraph ; then # avoids extra library checks
+ _disable_engine oqgraph
+ fi
+
+ if use mroonga ; then
+ # Remove the bundled groonga
+ # There is no CMake flag, it simply checks for existance
+ rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
+ else
+ _disable_engine mroonga
+ 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"
+ -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+ -DSYSCONFDIR="${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"
+ -DWITH_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ -DWITH_LIBEDIT=0
+ -DWITH_ZLIB=system
+ -DWITHOUT_LIBWRAP=1
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ -DWITH_DEFAULT_FEATURE_SET=0
+ -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
+ # 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)
+ -DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
+ -DCONC_WITH_EXTERNAL_ZLIB=YES
+ -DWITH_EXTERNAL_ZLIB=YES
+ -DSUFFIX_INSTALL_DIR=""
+ -DWITH_UNITTEST=OFF
+ -DWITHOUT_CLIENTLIBS=YES
+ -DCLIENT_PLUGIN_DIALOG=OFF
+ -DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT=OFF
+ -DCLIENT_PLUGIN_MYSQL_CLEAR_PASSWORD=STATIC
+ )
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ if ! use yassl ; then
+ mycmakeargs+=( -DWITH_SSL=system -DCLIENT_PLUGIN_SHA256_PASSWORD=STATIC )
+ else
+ mycmakeargs+=( -DWITH_SSL=bundled )
+ fi
+
+ # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+ mycmakeargs+=(
+ -DWITH_READLINE=$(usex bindist 1 0)
+ -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
+ -DENABLE_DTRACE=$(usex systemtap)
+ )
+
+ if use server ; then
+
+ # Federated{,X} must be treated special otherwise they will not be built as plugins
+ if ! use extraengine ; then
+ mycmakeargs+=(
+ -DPLUGIN_FEDERATED=NO
+ -DPLUGIN_FEDERATEDX=NO )
+ fi
+
+ mycmakeargs+=(
+ -DWITH_JEMALLOC=$(usex jemalloc system)
+ -DWITH_PCRE=system
+ -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
+ -DPLUGIN_SPHINX=$(usex sphinx YES NO)
+ -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
+ -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
+ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
+ -DPLUGIN_CASSANDRA=NO
+ -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
+ -DPLUGIN_SPIDER=$(usex extraengine YES NO)
+ -DPLUGIN_CONNECT=$(usex extraengine YES NO)
+ -DCONNECT_WITH_MYSQL=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=$(usex galera)
+ -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
+ -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
+ -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
+ -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
+ -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
+ -DWITH_MARIABACKUP=$(usex backup ON OFF)
+ -DWITH_LIBARCHIVE=$(usex backup ON OFF)
+ -DINSTALL_SQLBENCHDIR=""
+ -DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
+ # systemd is only linked to for server notification
+ -DWITH_SYSTEMD=$(usex systemd yes no)
+ -DWITH_NUMA=$(usex numa ON OFF)
+ )
+
+ # Workaround for MDEV-14524
+ use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
+
+ if use test ; then
+ # This is needed for the new client lib which tests a real, open server
+ mycmakeargs+=( -DSKIP_TESTS=ON )
+ fi
+
+ 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
+ -DMYSQL_USER=mysql
+ -DDISABLE_SHARED=$(usex static YES NO)
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DWITH_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=
+ -DWITH_SYSTEMD=no
+ )
+ 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
+ cp "${FILESDIR}/my.cnf-10.2" "${TMPDIR}/my.cnf" || die
+ eprefixify "${TMPDIR}/my.cnf"
+ doins "${TMPDIR}/my.cnf"
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
+ cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+ eprefixify "${TMPDIR}/50-distro-client.cnf"
+ doins "${TMPDIR}/50-distro-client.cnf"
+
+ if use server ; then
+ mycnf_src="my.cnf.distro-server"
+ sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+ "${FILESDIR}/${mycnf_src}" \
+ > "${TMPDIR}/my.cnf.ok" || die
+ if use prefix ; then
+ sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+ 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" 50-distro-server.cnf
+
+ 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 plugins.cracklib_password_check plugins.two_password_validations ; do
+ _disable_test "$t" "False positive due to varying policies"
+ done
+
+ 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
+
+ _disable_test main.plugin_auth "Needs client libraries built"
+
+ _disable_test main.func_time "Dependent on time test was written"
+
+ # 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/mongodb/Manifest b/dev-db/mongodb/Manifest
index ddd71236c469..f8414a74c0fd 100644
--- a/dev-db/mongodb/Manifest
+++ b/dev-db/mongodb/Manifest
@@ -22,38 +22,14 @@ AUX mongos.confd-r2 546 BLAKE2B 45203bdec8e30bbf97af6b02a66a366946c02f6820bc2348
AUX mongos.confd-r3 470 BLAKE2B 9cf6f201d337430901d957a5a0811ff11ac2e81814aac2120c5018e6ec4c38b5ca22d19caea593834416c63609c69a8294227fb6b30200b41dfb29799cc5c1b4 SHA512 952fb9cf5d3eeea2006b101e23142e408c98d66d1f4f868f6ea5a4df6a6331ddcbcbdfb24f4b031c1a8c42652141a3684073b96dfc0b3fbd21dc6b5bcf0e36cb
AUX mongos.initd-r2 654 BLAKE2B e1d87021c218adf49f2efbd3dc6d8afb94bc4f71e60d91df9c1338241b950f62ecb1d4a989cd559b39c4c05ed7084618e4f1ec4e5eb253fae0b62f03fc9696d9 SHA512 751ddcfa406d6683e33b484ae441f7c8502698b651a1ace9b77bc13be48cee1c1ad657c474764f06bd8ef4bff51cdb235929c8d41b669a326a6ab7d24647a2c5
AUX mongos.initd-r3 422 BLAKE2B 90872d0d8cdc5e33e3eebee848f58a2db0511d48b496ba9318117b74ad9265ead53a21b7d1790729a62d61839099bee315ace8ff3646c01e096a943c2251bf88 SHA512 bf5897614d59c6b4e72529b126408a62ea37d9e9368e5ff69c8fcf2bad3ec09065cff09467f82117a892c51090018706d2f38c03cb9a974a61a49bd9efa0f144
-DIST mongodb-src-r3.0.14.tar.gz 28093922 BLAKE2B c36f1868aaf8d149550d9e8fcfa3598b917426f896cdb9e1d12fb047345011b06975719d24db3ffadadf6e1f6007a3e32768eaaa9da9ec8f340c7a49c9239b45 SHA512 477fab29ca0ad2a0f24b895e30dc4770af8d6a1a57f3c10a02a989b58dd22510db554da0418129d4e81958342ad169696eed4b86bf5aa73916c7cec879db1152
-DIST mongodb-src-r3.0.15.tar.gz 28096395 BLAKE2B 123194723e7f1057bc5497ce9bf51f8dd2d65495f6e2c84adde22e3b41cace9c0bce8134a7b85fa1c8e89ce953a3df780eae013d61bba44bbf9339c1e2e478af SHA512 21cec235a691dad7d1d2c625ef04a851b59223b8f2c0bdc979f2a0b8249ed46b4e62753fd595afa7b74bce13851d1f6547e54d8ffad8ba1f56e36db664f5b27e
DIST mongodb-src-r3.2.17.tar.gz 29295394 BLAKE2B 3fa9d8fa0b50b72c3b2aa86980dd4d46bd053f23d044e321d6f98f5edb76c566bf00455cf745110a8c39355843664d9d1fbbdf554fc8696de73db2b270446adc SHA512 0d6a01278bc61805afd164e4a29abe150a5a96d551ed2c7c5d385b269924a7c5f065315e4f19c0ab070aa275ac03447959af45f33826457e5db0c5f98e623512
DIST mongodb-src-r3.4.10.tar.gz 39959937 BLAKE2B f14f081525f694b939bc21f8cb6364c2a37573c0e1867322dd2062dc167b112751579c3e2d76730b3ff07b0c6bbfd36666bbea99162b7c10eef62d92eb1b0850 SHA512 6293dde40a8433477ba3b1cf77abbdb32b28ce58279cc616b488647c8ab71b5ab3eab2146058c4a74b9e00f0938f1415020e2f26ea01f2b29dd78a1a38d58c3a
-DIST mongodb-src-r3.4.13.tar.gz 39992720 BLAKE2B 5620711c5ffddd9a96c29be1f2801a37f30536d1b7afe5a7b339a41cacf1f97caf8d03aafdf1d6b71cc488e48f5066ebc49a63a6bf318483d552863cd47a0c0e SHA512 295dbb38d44c99e0dce46c5e4aa5d73c64d813a3767e71a7187aff05e30f896d283ca7ef19c0a7bbd036eecf3d419e38ea3bc7d98ba93d12296c49e565df0f66
-DIST mongodb-src-r3.4.14.tar.gz 40017360 BLAKE2B 617ebf0346b9ea5034d05ba607b21b745a44e70edb347c6bf0cd8b273b448caef7da2d5f11036d48add6f452883a9b15259fe8ad466e58199be5eb9512167b6d SHA512 f8c38d12e24ae332221db15aab646725ef666012837b8127a1ab128ac2d6da2ab702f3edd17fdf3e6a840f603c8c66acf2a87fe74adf30bd9c4fe6b873c98186
-DIST mongodb-src-r3.4.15.tar.gz 40063153 BLAKE2B 7912a1b0450337c8b9935deb6abfbda6080f8fec68222b6eb9fbbd278e4d8a1ffb873c7c4a63c78c3eadc722c694d4d48b3f5d9247531f1731d7713a527daec5 SHA512 8b29c1cef4c34e9c2e16bbaf50aa10574eb63c9692ab248849a0cc476acc637794c3be27df0663a27ee4ced28c6d80bb0e11ac00fcd6d0a8babfc835b78fce59
DIST mongodb-src-r3.4.16.tar.gz 40093657 BLAKE2B 7123444dbdd0b2ad3adfb3391e0177d33c1b6c6a4ea83027821c564faad047a736e52926bc15c58bef59c18282436e913fd3bc9963705e030da01356f83ea367 SHA512 e22eb1fe2a832fed8305200614988c5ecfd619cee44fe2263bffa151732c0e26584084e64065dbc65152be6e5c1767a538193770359bea92f3703c72239075db
-DIST mongodb-src-r3.6.2.tar.gz 39999539 BLAKE2B 3e38917ebaf79b63bf054279fbb91a648fe52e69d8194998dc74453ad6766688929a80456f6cb4801f2806ac938a5dfc0407e5f46345b47a80ecce0ba03d7fde SHA512 7acfbcc68c1bd4e6e63eee09be1dfbb064be6f8b0144418105100a065f8162cafc9b776fe0429fd64c79b958561aa42d0bdef56588dda65acee27ccc98631f39
-DIST mongodb-src-r3.6.3.tar.gz 40093607 BLAKE2B bb21bf0487661eec6140ade22526617b26b2499bd36e138d955d14a4b13a0685ec7308bccfc11ef17c785cd8a71c5b6cd9d154d461b8973410b03952b93953ec SHA512 94aa9955f99d5f6bbbe65dc3755583952525398308ca7cb9224b91d1fa403de5bb3abb63a651583815cbecaff58966b5cfe7334a36ef6583f73d8c213410ddbc
-DIST mongodb-src-r3.6.4.tar.gz 40159916 BLAKE2B d3878d4e6bbf331de672768b2c92a4d71f758232170432d757f7e61849e6e1ef3b190e6a089101c9ea23c4ce23087c684c86fc6ea0f32f6fe052ce322d47e438 SHA512 02c2a697af9fdcbb16d19792be17d987e18c684418a63ed4750471c7ec22eb2eabf84e93cb1d298f67898b7e23687f668bb333c50ffc4e1b8adf8859f856ad95
-DIST mongodb-src-r3.6.5.tar.gz 40310152 BLAKE2B 72110ae47b17ec8b1f60636a5ef8491b076e1cc019513fd872ea38b3bb8393efff4bddc7b795b3da711f258d21be9fa23e24d396a9429349c51ce05fff180a53 SHA512 6ecb3140ee4a7929fabe62d698f23e87cb5030cf31abefe7f82374f407fb87dc05f712089998f96bc40e23698836a86e7f3590892bde9d2d6f2c4bcc15cc3ebf
-DIST mongodb-src-r3.6.6.tar.gz 40391572 BLAKE2B 1cee1ad5431d2941cf2f0ee31290b2b5bc1c628f2cb5041d4d5a1427d342ecc3bbfb123e540581d81a1c5b018464abb9dcd1ead8df0de6a01a1462ca0c258e83 SHA512 cd91979ba29538c9e1645fe81e03ac56101b0fa8980ea2bdf89a4987ee8f7f6ddc97e2b27495500548a4424f155a1847471c7a5715beabf75ff894edf05c546b
-DIST mongodb-src-r3.6.7.tar.gz 40421164 BLAKE2B c447799f33de768fada7a8f44e692602bd827aec7087886b28d69830382db005a1a95e2596306e24f9d7a4555e1b3f8f6355ebad38a27d06234de15ec946dd04 SHA512 6d91785c5569f8b99ff7234fa94c7b87406489b1e04a9e1b44a2af6cbaf79e3685dbc361162935dc4b92bd07ed40bf024dba4ca85c1a4079dd22f1cdac91d594
-DIST mongodb-src-r4.0.0.tar.gz 49138467 BLAKE2B 616e267c737729103de544d82db60489e7a32c5f9847ffd2d643a9025c18aa867718216f5de9f18a93fb2a7930c3dbe9ec3850eef09dbec084570328a99f2865 SHA512 11d00cdde606cfea268471cffccedb6d003e421aeffda2303aff4d4126c386aaec50a1de733d7a1d5fb6605403cf9f2218dae50374c7b5e8625fa80317804589
-DIST mongodb-src-r4.0.1.tar.gz 49175057 BLAKE2B 69cd8268964200534d61493018044372f2991cedb027454c02023f5f54a0616b31c421d611ff2e67dfca87b99727cef5266a4279445a8693f8c676d0803553b3 SHA512 cfb0ec3227d976999f366ca15ddaa9379f90433dbd02bd16d001f0a7f986e84df697cbbd43674988b5d41a0b85445dcd0c4717cb406e05c1fbcd544088c859ea
+DIST mongodb-src-r3.6.8.tar.gz 40428295 BLAKE2B cc02f73cfb49fb38ccabaad5a02610ce73fc41895ce944e48669e254bcbc70c8872a1bd7f8e04371fae4fcd9af2466fd8550367dd1d1da5cee50b86fc5023bf2 SHA512 c981f3269be3bafb59aa89d36c39a801fd7007b60db6c09b4616a559aaf8e50b34cabbdac2b59f23552c0a5112913fba468f7e2ed9a5f4daa3702dcffdf34999
DIST mongodb-src-r4.0.2.tar.gz 49328232 BLAKE2B 0e56392de5b8cd59c49c38469ed427c52dbd91cd64b3c97da6809c0f849198f836896b8ef24a06e7ff84a65a7986b76df2ca4ffeafe76d8afe0e031ad25ecf5a SHA512 171422ee028ebc279bb2cf20c78a3ce89a6cc15abf0955ac20a6c67f1aae577bf99ca4363fc428dba6ae0250b97f95d2fc51ca7f4a4505e8c38c9a11ca249800
-EBUILD mongodb-3.0.14.ebuild 4559 BLAKE2B e72ff73baaa3b6a5bb4bbb33f3153d2aeaa9458b6e7f48419f5fd0f9b7fe43dfbcd93bf0824555e688faa461839a8c3cb5e4d1a24219a395f1a245828d639777 SHA512 747424cae955229f6affd867961171d9ad3fe9c34553ddb94e034db76d4e389ba0c6dc47db23c291212b893b7377d1bfac52e79ae4ab1b9dfd8f4c89743e1a19
-EBUILD mongodb-3.0.15.ebuild 4561 BLAKE2B 85e994c18b57a0278059eb0e2e141842b551a96e1a030b5d84e0bb4c1524bacff7ed1a1576093b0336ed042f8bcbf01d37ba725392c077a400fdefc2705ec2ab SHA512 d5b77ede0ab5d9fa814542e831ec93d5854f0aaa55930c5e445410d347787be96294a741f30089764ea23cdab52413d1d82c6796b3d7133796d28de95726e294
EBUILD mongodb-3.2.17.ebuild 5338 BLAKE2B fd327b1c5bb85e833782839e07b3379a103f0545fb9852cb06d7f6f0b3548b921dfce227d1882a1e448a533c043718c778e9141ec5715805a24c9e2fbf199fa1 SHA512 a439c32b20a81d1c8e199c8a6928aa75479562e6b33c0d7b50797181226a093f571a1caaab102569a9a308db18a73c51558657ccd4bcb1d7e137eb22fb363c4e
EBUILD mongodb-3.4.10.ebuild 5133 BLAKE2B e6b3742a9bff53afd63eae4fe3b9574e43f7007dc1efc1687583b17820e812341f354e7dd7882762a871f1d5b1e2732a9cd20cff7981c05de4058c26c58f68d2 SHA512 737046d5ac14920014581840d3e53597e916cc4f1bbdfba850842718039c227c5cf3e5b62cd3f491e1221ff8fefd74fb3ea75ecafd6218c4036f4973316c56eb
-EBUILD mongodb-3.4.13.ebuild 4256 BLAKE2B e4caf3957d5bea1811879828abb9a1407afcb9646e4e91911369d8e43564412e0fa19ec84264d1ad5dbea758fb32c5dfe2fb4dca60636b7838f4c3d4ef3832d2 SHA512 dee3412d989c9d00e1097a2ebb8d05e7d77d14e8399d7bf570da37904ec90de86d62807383c95caa057b2c2cfe2057be0b208b262bf488687b201a2f38ea7bac
-EBUILD mongodb-3.4.14.ebuild 4256 BLAKE2B e4caf3957d5bea1811879828abb9a1407afcb9646e4e91911369d8e43564412e0fa19ec84264d1ad5dbea758fb32c5dfe2fb4dca60636b7838f4c3d4ef3832d2 SHA512 dee3412d989c9d00e1097a2ebb8d05e7d77d14e8399d7bf570da37904ec90de86d62807383c95caa057b2c2cfe2057be0b208b262bf488687b201a2f38ea7bac
-EBUILD mongodb-3.4.15.ebuild 4256 BLAKE2B e4caf3957d5bea1811879828abb9a1407afcb9646e4e91911369d8e43564412e0fa19ec84264d1ad5dbea758fb32c5dfe2fb4dca60636b7838f4c3d4ef3832d2 SHA512 dee3412d989c9d00e1097a2ebb8d05e7d77d14e8399d7bf570da37904ec90de86d62807383c95caa057b2c2cfe2057be0b208b262bf488687b201a2f38ea7bac
EBUILD mongodb-3.4.16.ebuild 4087 BLAKE2B 34b35ec68a95e64077516baf2159d0a45592d93e6c401c9f09e94e83c8359561324311cd15ef35948be21bbc081b308ebe99d1a64f0ad1bbbe8892d7fbb9b609 SHA512 61f600b20d5b16f97ca3e989547fac7265bfc2335e9b2ba5f6a40ecbf4360298cbe2ef71346b6777ba232b0ae75f79c1cc07bcf974852fd0d9bab3ff9f86b757
-EBUILD mongodb-3.6.2-r1.ebuild 4446 BLAKE2B 23e7edab8f84fac52f1dd5289017f6a27a6151deafd53cb8f0eccb229653704c780eda604bf3c08291d6cc7d20962d733c6b44e5ea659e0b5fb7e44ef8e0ed30 SHA512 70e7443ad7de93688bb58382f6a311500f580354111ce60f8bc0848862963e86be1d742fce95918f2fccce7583dc22e12940b1ca004e5f148fa0a72d512fe99a
-EBUILD mongodb-3.6.3-r1.ebuild 4446 BLAKE2B 23e7edab8f84fac52f1dd5289017f6a27a6151deafd53cb8f0eccb229653704c780eda604bf3c08291d6cc7d20962d733c6b44e5ea659e0b5fb7e44ef8e0ed30 SHA512 70e7443ad7de93688bb58382f6a311500f580354111ce60f8bc0848862963e86be1d742fce95918f2fccce7583dc22e12940b1ca004e5f148fa0a72d512fe99a
-EBUILD mongodb-3.6.4-r1.ebuild 4446 BLAKE2B 23e7edab8f84fac52f1dd5289017f6a27a6151deafd53cb8f0eccb229653704c780eda604bf3c08291d6cc7d20962d733c6b44e5ea659e0b5fb7e44ef8e0ed30 SHA512 70e7443ad7de93688bb58382f6a311500f580354111ce60f8bc0848862963e86be1d742fce95918f2fccce7583dc22e12940b1ca004e5f148fa0a72d512fe99a
-EBUILD mongodb-3.6.5-r1.ebuild 4446 BLAKE2B 23e7edab8f84fac52f1dd5289017f6a27a6151deafd53cb8f0eccb229653704c780eda604bf3c08291d6cc7d20962d733c6b44e5ea659e0b5fb7e44ef8e0ed30 SHA512 70e7443ad7de93688bb58382f6a311500f580354111ce60f8bc0848862963e86be1d742fce95918f2fccce7583dc22e12940b1ca004e5f148fa0a72d512fe99a
-EBUILD mongodb-3.6.6.ebuild 4242 BLAKE2B 5310eccf90fe32fcd15ab0ec9b9b5aa07db79d61c9cd65ce38d082f7ece684dffd4a75cdabec383514036d6de507a3f653292b537a3acf1b3b9dc0a551e7d18d SHA512 7897c881140a41851da4453e039875d6ae43190f14b18bf2e262197888d5ccebdcb66df1f194677f34acee1239643fdc428b6e027e714c4840ead8f3d0325bfa
-EBUILD mongodb-3.6.7.ebuild 4223 BLAKE2B daddfc743253ad9e9f786c3818cf62cc014ad655fbffbf9bb948aeed28210382b0913427cee75a6c3e5339de9fe655e8765b65b9682492a8ed6b7769971b2898 SHA512 e08bec262017668f1f19f264b5cf87ac097a7056251cfbe5e4ae5e4a0d3be32da9f255be922b4174feed3ce3d136782c166aa84672a152412cb1640bbe319bfe
-EBUILD mongodb-4.0.0-r1.ebuild 4445 BLAKE2B b6e7e01a6fd89ac0db97172a6c8257232089b1bd2c22ef8c1e5d689827d8b9c4b4ba384b68b63e8bb3038a25d2592b3cd13e38bdf3930bfd962d57a7262fef4c SHA512 961fcccb68ae8364172471f985c46b8e4d04c57a9620661810587f7e069cf521c6c0f0a5c50e7d015cbef1ded0cdcb983890d0564c7f8a8706fe7c6e6cc44750
-EBUILD mongodb-4.0.1.ebuild 4243 BLAKE2B 6e04cbddaca9f1b8d43ff4976d3cec31f3508741cca67da8754d4b26c11f53d42d6ea67e614a6563ff237b48f39866375d6f93278247a86bb0cf814ca8b26e3d SHA512 b074cf554e7fcaaaebab2888e196189e25be230497e60a3964df863211cc5f1ea70c6d0510e0bbd8ce27d5743aa15f6c08c9ecacf9690f42435aceb9c7e36358
+EBUILD mongodb-3.6.8.ebuild 4195 BLAKE2B b165f8270133726410dfbb4458df862e28afd815147a4e8ada704208e9aedd1d6e667b8aaf88f9e2ea1b7309f8d2118c2938343923b8e22fde06f4c32d5881fb SHA512 ffefbb6c31c36ba0aeacde22d8a20203b58c9ece9b5becd444865446a7857d34bf259293f0426ca2eae34c05456ef979394483a678ccc84de15c76068d78b118
EBUILD mongodb-4.0.2.ebuild 4199 BLAKE2B aacd674dc2c2883ab60b99717d98e207ca11d698c5c7aef19e77a2741fcee12837487b3fcee3d91acea75de75156c5637acedbc76fc6b3e0209c6c09422b6444 SHA512 0ab2d3d5259ae25888e0b9b7eddfd32b323118168be2a321983694d1ae9469df8e4210ece6126e1d179691e7bb7c76aa06abff3f3f5a02358dabe291258d2208
MISC metadata.xml 835 BLAKE2B 6aaa10090846882c813db2fcbec27e9bb8d8ab5b34bbb0f5ac7b0de922606a6382be60f30a19502694022a38dc7c67f03b986d5cd1473e530ab4d05f5ee233a0 SHA512 8d190ebb08b6951c9c9ce39872c0c76b6236a0687980577eae7b2181c0bccacc60ccc67cccc4edc05aa21f4d9d65621eb57f803aab91c7ace6ab794559c9d08a
diff --git a/dev-db/mongodb/mongodb-3.0.14.ebuild b/dev-db/mongodb/mongodb-3.0.14.ebuild
deleted file mode 100644
index 97c48d9a1d0b..000000000000
--- a/dev-db/mongodb/mongodb-3.0.14.ebuild
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-SCONS_MIN_VERSION="2.3.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit eutils flag-o-matic multilib pax-utils scons-utils systemd toolchain-funcs user versionator check-reqs
-
-MY_P=${PN}-src-r${PV/_rc/-rc}
-
-DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
-HOMEPAGE="http://www.mongodb.org"
-SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz"
-
-LICENSE="AGPL-3 Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="debug kerberos libressl mms-agent ssl +tools"
-
-RDEPEND="app-arch/snappy
- >=dev-cpp/yaml-cpp-0.5.1
- >=dev-libs/boost-1.57[threads(+)]
- >=dev-libs/libpcre-8.39[cxx]
- dev-libs/snowball-stemmer
- net-libs/libpcap
- sys-libs/zlib
- mms-agent? ( app-admin/mms-agent )
- ssl? (
- !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-DEPEND="${RDEPEND}
- >=sys-devel/gcc-4.8.2:*
- sys-libs/ncurses
- sys-libs/readline
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.0.14-fix-scons.patch"
- "${FILESDIR}/${PN}-3.0.14-fix-std-string.patch"
- "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
-)
-
-S=${WORKDIR}/${MY_P}
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- # Maintainer notes
- #
- # --use-system-tcmalloc is strongly NOT recommended:
- # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
- #
- # --c++11 is required by scons instead of auto detection:
- # https://jira.mongodb.org/browse/SERVER-19661
-
- scons_opts=(
- --variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX) --c++11
- --disable-warnings-as-errors
- --use-system-boost
- --use-system-pcre
- --use-system-snappy
- --use-system-stemmer
- --use-system-yaml
- )
-
- if use debug; then
- scons_opts+=( --dbg=on )
- fi
-
- if use prefix; then
- scons_opts+=(
- --cpppath="${EPREFIX}/usr/include )"
- --libpath="${EPREFIX}/usr/$(get_libdir)"
- )
- fi
-
- if use kerberos; then
- scons_opts+=( --use-sasl-client )
- fi
-
- if use ssl; then
- scons_opts+=( --ssl )
- fi
-}
-
-src_compile() {
- # respect mongoDB upstream's basic recommendations
- # see bug #536688 and #526114
- if ! use debug; then
- filter-flags '-m*'
- filter-flags '-O?'
- fi
- escons "${scons_opts[@]}" core tools || die
-}
-
-src_install() {
- escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr || die
-
- local x
- for x in /var/{lib,log}/${PN}; do
- keepdir "${x}"
- fowners mongodb:mongodb "${x}"
- done
-
- doman debian/mongo*.1
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
- newconfd "${FILESDIR}/${PN}.confd-r2" ${PN}
- newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s}
- newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s}
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # see bug #526114
- pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
-}
-
-pkg_preinst() {
- # wrt bug #461466
- if [[ "$(get_libdir)" == "lib64" ]]; then
- rmdir "${ED}"/usr/lib/ &>/dev/null
- fi
-}
-
-src_test() {
- escons "${scons_opts[@]}" unittests || die
-
- # tests fail
- sed -i '/\/util\/options_parser\/options_parser_test/d' build/unittests.txt || die
- sed -i '/\/mongo\/server_options_test/d' build/unittests.txt || die
-
- local x
- while read x; do
- einfo "Running test $x"
- ./$x || die
- done < build/unittests.txt
-}
-
-pkg_postinst() {
- local v
- for v in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 3.0 ${v}; then
- ewarn "!! IMPORTANT !!"
- ewarn " "
- ewarn "${PN} configuration files have changed !"
- ewarn " "
- ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
- ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
- ewarn " "
- ewarn "Make sure you also follow the upgrading process :"
- ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
- ewarn " "
- ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
- ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
- ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
- ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
- break
- fi
- done
-}
diff --git a/dev-db/mongodb/mongodb-3.0.15.ebuild b/dev-db/mongodb/mongodb-3.0.15.ebuild
deleted file mode 100644
index 08741ca2af67..000000000000
--- a/dev-db/mongodb/mongodb-3.0.15.ebuild
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-SCONS_MIN_VERSION="2.3.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit eutils flag-o-matic multilib pax-utils scons-utils systemd toolchain-funcs user versionator check-reqs
-
-MY_P=${PN}-src-r${PV/_rc/-rc}
-
-DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
-HOMEPAGE="http://www.mongodb.org"
-SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz"
-
-LICENSE="AGPL-3 Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug kerberos libressl mms-agent ssl +tools"
-
-RDEPEND="app-arch/snappy
- >=dev-cpp/yaml-cpp-0.5.1
- >=dev-libs/boost-1.57[threads(+)]
- >=dev-libs/libpcre-8.39[cxx]
- dev-libs/snowball-stemmer
- net-libs/libpcap
- sys-libs/zlib
- mms-agent? ( app-admin/mms-agent )
- ssl? (
- !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-DEPEND="${RDEPEND}
- >=sys-devel/gcc-4.8.2:*
- sys-libs/ncurses
- sys-libs/readline
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.0.14-fix-scons.patch"
- "${FILESDIR}/${PN}-3.0.14-fix-std-string.patch"
- "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
-)
-
-S=${WORKDIR}/${MY_P}
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- # Maintainer notes
- #
- # --use-system-tcmalloc is strongly NOT recommended:
- # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
- #
- # --c++11 is required by scons instead of auto detection:
- # https://jira.mongodb.org/browse/SERVER-19661
-
- scons_opts=(
- --variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX) --c++11
- --disable-warnings-as-errors
- --use-system-boost
- --use-system-pcre
- --use-system-snappy
- --use-system-stemmer
- --use-system-yaml
- )
-
- if use debug; then
- scons_opts+=( --dbg=on )
- fi
-
- if use prefix; then
- scons_opts+=(
- --cpppath="${EPREFIX}/usr/include )"
- --libpath="${EPREFIX}/usr/$(get_libdir)"
- )
- fi
-
- if use kerberos; then
- scons_opts+=( --use-sasl-client )
- fi
-
- if use ssl; then
- scons_opts+=( --ssl )
- fi
-}
-
-src_compile() {
- # respect mongoDB upstream's basic recommendations
- # see bug #536688 and #526114
- if ! use debug; then
- filter-flags '-m*'
- filter-flags '-O?'
- fi
- escons "${scons_opts[@]}" core tools || die
-}
-
-src_install() {
- escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr || die
-
- local x
- for x in /var/{lib,log}/${PN}; do
- keepdir "${x}"
- fowners mongodb:mongodb "${x}"
- done
-
- doman debian/mongo*.1
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
- newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
- newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
- newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # see bug #526114
- pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
-}
-
-pkg_preinst() {
- # wrt bug #461466
- if [[ "$(get_libdir)" == "lib64" ]]; then
- rmdir "${ED}"/usr/lib/ &>/dev/null
- fi
-}
-
-src_test() {
- escons "${scons_opts[@]}" unittests || die
-
- # tests fail
- sed -i '/\/util\/options_parser\/options_parser_test/d' build/unittests.txt || die
- sed -i '/\/mongo\/server_options_test/d' build/unittests.txt || die
-
- local x
- while read x; do
- einfo "Running test $x"
- ./$x || die
- done < build/unittests.txt
-}
-
-pkg_postinst() {
- local v
- for v in ${REPLACING_VERSIONS}; do
- if ! version_is_at_least 3.0 ${v}; then
- ewarn "!! IMPORTANT !!"
- ewarn " "
- ewarn "${PN} configuration files have changed !"
- ewarn " "
- ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
- ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
- ewarn " "
- ewarn "Make sure you also follow the upgrading process :"
- ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
- ewarn " "
- ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
- ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
- ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
- ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
- break
- fi
- done
-}
diff --git a/dev-db/mongodb/mongodb-3.4.13.ebuild b/dev-db/mongodb/mongodb-3.4.13.ebuild
deleted file mode 100644
index 3869755fe9f4..000000000000
--- a/dev-db/mongodb/mongodb-3.4.13.ebuild
+++ /dev/null
@@ -1,167 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-SCONS_MIN_VERSION="2.3.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
-
-MY_P=${PN}-src-r${PV/_rc/-rc}
-
-DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
-HOMEPAGE="https://www.mongodb.com"
-SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
-
-LICENSE="AGPL-3 Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug kerberos libressl mms-agent ssl test +tools"
-
-RDEPEND=">=app-arch/snappy-1.1.3
- >=dev-cpp/yaml-cpp-0.5.3
- >=dev-libs/boost-1.60:=[threads(+)]
- >=dev-libs/libpcre-8.41[cxx]
- dev-libs/snowball-stemmer
- net-libs/libpcap
- >=sys-libs/zlib-1.2.8:=
- mms-agent? ( app-admin/mms-agent )
- ssl? (
- !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- <dev-util/scons-3
- sys-libs/ncurses
- sys-libs/readline
- debug? ( dev-util/valgrind )
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )
- test? (
- dev-python/pymongo[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
- "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
- "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
-)
-
-S=${WORKDIR}/${MY_P}
-
-pkg_pretend() {
- if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2 ]]; then
- ewarn "To upgrade from a version earlier than the 3.2-series, you must"
- ewarn "successively upgrade major releases until you have upgraded"
- ewarn "to 3.2-series. Then upgrade to 3.4 series."
- fi
-}
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # remove bundled libs
- rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
-}
-
-src_configure() {
- # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
- # --use-system-icu fails tests
- # --use-system-tcmalloc is strongly NOT recommended:
-
- scons_opts=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
-
- --disable-warnings-as-errors
- --use-system-boost
- --use-system-pcre
- --use-system-snappy
- --use-system-stemmer
- --use-system-yaml
- --use-system-zlib
- )
-
- use debug && scons_opts+=( --dbg=on )
- use kerberos && scons_opts+=( --use-sasl-client )
- use ssl && scons_opts+=( --ssl )
-
- # respect mongoDB upstream's basic recommendations
- # see bug #536688 and #526114
- if ! use debug; then
- filter-flags '-m*'
- filter-flags '-O?'
- fi
-
- default
-}
-
-src_compile() {
- escons "${scons_opts[@]}" core tools
-}
-
-# FEATURES="test -usersandbox" emerge dev-db/mongodb
-src_test() {
- # this one test fails
- rm jstests/core/jsHeapLimit.js || die
-
- "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
-}
-
-src_install() {
- escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
-
- local x
- for x in /var/{lib,log}/${PN}; do
- keepdir "${x}"
- fowners mongodb:mongodb "${x}"
- fperms 0750 "${x}"
- done
-
- doman debian/mongo*.1
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
- newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
- newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
- newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # see bug #526114
- pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
-}
-
-pkg_preinst() {
- # wrt bug #461466
- if [[ "$(get_libdir)" == "lib64" ]]; then
- rmdir "${ED}"/usr/lib/ &>/dev/null
- fi
-}
-
-pkg_postinst() {
- ewarn "Make sure to read the release notes and follow the upgrade process:"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
-}
diff --git a/dev-db/mongodb/mongodb-3.4.14.ebuild b/dev-db/mongodb/mongodb-3.4.14.ebuild
deleted file mode 100644
index 3869755fe9f4..000000000000
--- a/dev-db/mongodb/mongodb-3.4.14.ebuild
+++ /dev/null
@@ -1,167 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-SCONS_MIN_VERSION="2.3.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
-
-MY_P=${PN}-src-r${PV/_rc/-rc}
-
-DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
-HOMEPAGE="https://www.mongodb.com"
-SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
-
-LICENSE="AGPL-3 Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug kerberos libressl mms-agent ssl test +tools"
-
-RDEPEND=">=app-arch/snappy-1.1.3
- >=dev-cpp/yaml-cpp-0.5.3
- >=dev-libs/boost-1.60:=[threads(+)]
- >=dev-libs/libpcre-8.41[cxx]
- dev-libs/snowball-stemmer
- net-libs/libpcap
- >=sys-libs/zlib-1.2.8:=
- mms-agent? ( app-admin/mms-agent )
- ssl? (
- !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- <dev-util/scons-3
- sys-libs/ncurses
- sys-libs/readline
- debug? ( dev-util/valgrind )
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )
- test? (
- dev-python/pymongo[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
- "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
- "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
-)
-
-S=${WORKDIR}/${MY_P}
-
-pkg_pretend() {
- if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2 ]]; then
- ewarn "To upgrade from a version earlier than the 3.2-series, you must"
- ewarn "successively upgrade major releases until you have upgraded"
- ewarn "to 3.2-series. Then upgrade to 3.4 series."
- fi
-}
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # remove bundled libs
- rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
-}
-
-src_configure() {
- # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
- # --use-system-icu fails tests
- # --use-system-tcmalloc is strongly NOT recommended:
-
- scons_opts=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
-
- --disable-warnings-as-errors
- --use-system-boost
- --use-system-pcre
- --use-system-snappy
- --use-system-stemmer
- --use-system-yaml
- --use-system-zlib
- )
-
- use debug && scons_opts+=( --dbg=on )
- use kerberos && scons_opts+=( --use-sasl-client )
- use ssl && scons_opts+=( --ssl )
-
- # respect mongoDB upstream's basic recommendations
- # see bug #536688 and #526114
- if ! use debug; then
- filter-flags '-m*'
- filter-flags '-O?'
- fi
-
- default
-}
-
-src_compile() {
- escons "${scons_opts[@]}" core tools
-}
-
-# FEATURES="test -usersandbox" emerge dev-db/mongodb
-src_test() {
- # this one test fails
- rm jstests/core/jsHeapLimit.js || die
-
- "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
-}
-
-src_install() {
- escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
-
- local x
- for x in /var/{lib,log}/${PN}; do
- keepdir "${x}"
- fowners mongodb:mongodb "${x}"
- fperms 0750 "${x}"
- done
-
- doman debian/mongo*.1
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
- newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
- newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
- newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # see bug #526114
- pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
-}
-
-pkg_preinst() {
- # wrt bug #461466
- if [[ "$(get_libdir)" == "lib64" ]]; then
- rmdir "${ED}"/usr/lib/ &>/dev/null
- fi
-}
-
-pkg_postinst() {
- ewarn "Make sure to read the release notes and follow the upgrade process:"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
-}
diff --git a/dev-db/mongodb/mongodb-3.4.15.ebuild b/dev-db/mongodb/mongodb-3.4.15.ebuild
deleted file mode 100644
index 3869755fe9f4..000000000000
--- a/dev-db/mongodb/mongodb-3.4.15.ebuild
+++ /dev/null
@@ -1,167 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-SCONS_MIN_VERSION="2.3.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
-
-MY_P=${PN}-src-r${PV/_rc/-rc}
-
-DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
-HOMEPAGE="https://www.mongodb.com"
-SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
-
-LICENSE="AGPL-3 Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug kerberos libressl mms-agent ssl test +tools"
-
-RDEPEND=">=app-arch/snappy-1.1.3
- >=dev-cpp/yaml-cpp-0.5.3
- >=dev-libs/boost-1.60:=[threads(+)]
- >=dev-libs/libpcre-8.41[cxx]
- dev-libs/snowball-stemmer
- net-libs/libpcap
- >=sys-libs/zlib-1.2.8:=
- mms-agent? ( app-admin/mms-agent )
- ssl? (
- !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- <dev-util/scons-3
- sys-libs/ncurses
- sys-libs/readline
- debug? ( dev-util/valgrind )
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )
- test? (
- dev-python/pymongo[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
- "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
- "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
-)
-
-S=${WORKDIR}/${MY_P}
-
-pkg_pretend() {
- if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.2 ]]; then
- ewarn "To upgrade from a version earlier than the 3.2-series, you must"
- ewarn "successively upgrade major releases until you have upgraded"
- ewarn "to 3.2-series. Then upgrade to 3.4 series."
- fi
-}
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # remove bundled libs
- rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
-}
-
-src_configure() {
- # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
- # --use-system-icu fails tests
- # --use-system-tcmalloc is strongly NOT recommended:
-
- scons_opts=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
-
- --disable-warnings-as-errors
- --use-system-boost
- --use-system-pcre
- --use-system-snappy
- --use-system-stemmer
- --use-system-yaml
- --use-system-zlib
- )
-
- use debug && scons_opts+=( --dbg=on )
- use kerberos && scons_opts+=( --use-sasl-client )
- use ssl && scons_opts+=( --ssl )
-
- # respect mongoDB upstream's basic recommendations
- # see bug #536688 and #526114
- if ! use debug; then
- filter-flags '-m*'
- filter-flags '-O?'
- fi
-
- default
-}
-
-src_compile() {
- escons "${scons_opts[@]}" core tools
-}
-
-# FEATURES="test -usersandbox" emerge dev-db/mongodb
-src_test() {
- # this one test fails
- rm jstests/core/jsHeapLimit.js || die
-
- "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
-}
-
-src_install() {
- escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
-
- local x
- for x in /var/{lib,log}/${PN}; do
- keepdir "${x}"
- fowners mongodb:mongodb "${x}"
- fperms 0750 "${x}"
- done
-
- doman debian/mongo*.1
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
- newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
- newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
- newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # see bug #526114
- pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
-}
-
-pkg_preinst() {
- # wrt bug #461466
- if [[ "$(get_libdir)" == "lib64" ]]; then
- rmdir "${ED}"/usr/lib/ &>/dev/null
- fi
-}
-
-pkg_postinst() {
- ewarn "Make sure to read the release notes and follow the upgrade process:"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
-}
diff --git a/dev-db/mongodb/mongodb-3.6.2-r1.ebuild b/dev-db/mongodb/mongodb-3.6.2-r1.ebuild
deleted file mode 100644
index 5604f58eafb7..000000000000
--- a/dev-db/mongodb/mongodb-3.6.2-r1.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-SCONS_MIN_VERSION="2.5.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
-
-MY_P=${PN}-src-r${PV/_rc/-rc}
-
-DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
-HOMEPAGE="https://www.mongodb.com"
-SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
-
-LICENSE="AGPL-3 Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug kerberos libressl mms-agent ssl test +tools"
-
-RDEPEND=">=app-arch/snappy-1.1.3
- >=dev-cpp/yaml-cpp-0.5.3
- >=dev-libs/boost-1.60:=[threads(+)]
- >=dev-libs/libpcre-8.41[cxx]
- dev-libs/snowball-stemmer
- net-libs/libpcap
- >=sys-libs/zlib-1.2.8:=
- mms-agent? ( app-admin/mms-agent )
- ssl? (
- !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- dev-python/cheetah[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- virtual/python-typing[${PYTHON_USEDEP}]
- <dev-util/scons-3
- sys-libs/ncurses
- sys-libs/readline
- debug? ( dev-util/valgrind )
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )
- test? (
- dev-python/pymongo[${PYTHON_USEDEP}]
- )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
- "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
- "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
-)
-
-S=${WORKDIR}/${MY_P}
-
-pkg_pretend() {
- if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
- ewarn "To upgrade from a version earlier than the 3.4-series, you must"
- ewarn "successively upgrade major releases until you have upgraded"
- ewarn "to 3.4-series. Then upgrade to 3.6 series."
- elif [[ -n ${REPLACING_VERSIONS} ]]; then
- ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
- fi
-}
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # remove bundled libs
- rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
-
- # remove compass
- rm -rv src/mongo/installer/compass || die
-}
-
-src_configure() {
- # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
- # --use-system-icu fails tests
- # --use-system-tcmalloc is strongly NOT recommended:
- scons_opts=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
-
- --disable-warnings-as-errors
- --use-system-boost
- --use-system-pcre
- --use-system-snappy
- --use-system-stemmer
- --use-system-yaml
- --use-system-zlib
- )
-
- use debug && scons_opts+=( --dbg=on )
- use kerberos && scons_opts+=( --use-sasl-client )
- use ssl && scons_opts+=( --ssl )
-
- # respect mongoDB upstream's basic recommendations
- # see bug #536688 and #526114
- if ! use debug; then
- filter-flags '-m*'
- filter-flags '-O?'
- fi
-
- default
-}
-
-src_compile() {
- escons "${scons_opts[@]}" core tools
-}
-
-# FEATURES="test -usersandbox" emerge dev-db/mongodb
-src_test() {
- "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
-}
-
-src_install() {
- escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
-
- local x
- for x in /var/{lib,log}/${PN}; do
- keepdir "${x}"
- fowners mongodb:mongodb "${x}"
- fperms 0750 "${x}"
- done
-
- doman debian/mongo*.1
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
- newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
- newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
- newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # see bug #526114
- pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
-}
-
-pkg_preinst() {
- # wrt bug #461466
- if [[ "$(get_libdir)" == "lib64" ]]; then
- rmdir "${ED}"/usr/lib/ &>/dev/null
- fi
-}
-
-pkg_postinst() {
- ewarn "Make sure to read the release notes and follow the upgrade process:"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
-}
diff --git a/dev-db/mongodb/mongodb-3.6.3-r1.ebuild b/dev-db/mongodb/mongodb-3.6.3-r1.ebuild
deleted file mode 100644
index 5604f58eafb7..000000000000
--- a/dev-db/mongodb/mongodb-3.6.3-r1.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-SCONS_MIN_VERSION="2.5.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
-
-MY_P=${PN}-src-r${PV/_rc/-rc}
-
-DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
-HOMEPAGE="https://www.mongodb.com"
-SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
-
-LICENSE="AGPL-3 Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug kerberos libressl mms-agent ssl test +tools"
-
-RDEPEND=">=app-arch/snappy-1.1.3
- >=dev-cpp/yaml-cpp-0.5.3
- >=dev-libs/boost-1.60:=[threads(+)]
- >=dev-libs/libpcre-8.41[cxx]
- dev-libs/snowball-stemmer
- net-libs/libpcap
- >=sys-libs/zlib-1.2.8:=
- mms-agent? ( app-admin/mms-agent )
- ssl? (
- !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- dev-python/cheetah[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- virtual/python-typing[${PYTHON_USEDEP}]
- <dev-util/scons-3
- sys-libs/ncurses
- sys-libs/readline
- debug? ( dev-util/valgrind )
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )
- test? (
- dev-python/pymongo[${PYTHON_USEDEP}]
- )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
- "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
- "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
-)
-
-S=${WORKDIR}/${MY_P}
-
-pkg_pretend() {
- if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
- ewarn "To upgrade from a version earlier than the 3.4-series, you must"
- ewarn "successively upgrade major releases until you have upgraded"
- ewarn "to 3.4-series. Then upgrade to 3.6 series."
- elif [[ -n ${REPLACING_VERSIONS} ]]; then
- ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
- fi
-}
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # remove bundled libs
- rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
-
- # remove compass
- rm -rv src/mongo/installer/compass || die
-}
-
-src_configure() {
- # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
- # --use-system-icu fails tests
- # --use-system-tcmalloc is strongly NOT recommended:
- scons_opts=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
-
- --disable-warnings-as-errors
- --use-system-boost
- --use-system-pcre
- --use-system-snappy
- --use-system-stemmer
- --use-system-yaml
- --use-system-zlib
- )
-
- use debug && scons_opts+=( --dbg=on )
- use kerberos && scons_opts+=( --use-sasl-client )
- use ssl && scons_opts+=( --ssl )
-
- # respect mongoDB upstream's basic recommendations
- # see bug #536688 and #526114
- if ! use debug; then
- filter-flags '-m*'
- filter-flags '-O?'
- fi
-
- default
-}
-
-src_compile() {
- escons "${scons_opts[@]}" core tools
-}
-
-# FEATURES="test -usersandbox" emerge dev-db/mongodb
-src_test() {
- "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
-}
-
-src_install() {
- escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
-
- local x
- for x in /var/{lib,log}/${PN}; do
- keepdir "${x}"
- fowners mongodb:mongodb "${x}"
- fperms 0750 "${x}"
- done
-
- doman debian/mongo*.1
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
- newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
- newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
- newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # see bug #526114
- pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
-}
-
-pkg_preinst() {
- # wrt bug #461466
- if [[ "$(get_libdir)" == "lib64" ]]; then
- rmdir "${ED}"/usr/lib/ &>/dev/null
- fi
-}
-
-pkg_postinst() {
- ewarn "Make sure to read the release notes and follow the upgrade process:"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
-}
diff --git a/dev-db/mongodb/mongodb-3.6.4-r1.ebuild b/dev-db/mongodb/mongodb-3.6.4-r1.ebuild
deleted file mode 100644
index 5604f58eafb7..000000000000
--- a/dev-db/mongodb/mongodb-3.6.4-r1.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-SCONS_MIN_VERSION="2.5.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
-
-MY_P=${PN}-src-r${PV/_rc/-rc}
-
-DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
-HOMEPAGE="https://www.mongodb.com"
-SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
-
-LICENSE="AGPL-3 Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug kerberos libressl mms-agent ssl test +tools"
-
-RDEPEND=">=app-arch/snappy-1.1.3
- >=dev-cpp/yaml-cpp-0.5.3
- >=dev-libs/boost-1.60:=[threads(+)]
- >=dev-libs/libpcre-8.41[cxx]
- dev-libs/snowball-stemmer
- net-libs/libpcap
- >=sys-libs/zlib-1.2.8:=
- mms-agent? ( app-admin/mms-agent )
- ssl? (
- !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- dev-python/cheetah[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- virtual/python-typing[${PYTHON_USEDEP}]
- <dev-util/scons-3
- sys-libs/ncurses
- sys-libs/readline
- debug? ( dev-util/valgrind )
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )
- test? (
- dev-python/pymongo[${PYTHON_USEDEP}]
- )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
- "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
- "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
-)
-
-S=${WORKDIR}/${MY_P}
-
-pkg_pretend() {
- if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
- ewarn "To upgrade from a version earlier than the 3.4-series, you must"
- ewarn "successively upgrade major releases until you have upgraded"
- ewarn "to 3.4-series. Then upgrade to 3.6 series."
- elif [[ -n ${REPLACING_VERSIONS} ]]; then
- ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
- fi
-}
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # remove bundled libs
- rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
-
- # remove compass
- rm -rv src/mongo/installer/compass || die
-}
-
-src_configure() {
- # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
- # --use-system-icu fails tests
- # --use-system-tcmalloc is strongly NOT recommended:
- scons_opts=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
-
- --disable-warnings-as-errors
- --use-system-boost
- --use-system-pcre
- --use-system-snappy
- --use-system-stemmer
- --use-system-yaml
- --use-system-zlib
- )
-
- use debug && scons_opts+=( --dbg=on )
- use kerberos && scons_opts+=( --use-sasl-client )
- use ssl && scons_opts+=( --ssl )
-
- # respect mongoDB upstream's basic recommendations
- # see bug #536688 and #526114
- if ! use debug; then
- filter-flags '-m*'
- filter-flags '-O?'
- fi
-
- default
-}
-
-src_compile() {
- escons "${scons_opts[@]}" core tools
-}
-
-# FEATURES="test -usersandbox" emerge dev-db/mongodb
-src_test() {
- "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
-}
-
-src_install() {
- escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
-
- local x
- for x in /var/{lib,log}/${PN}; do
- keepdir "${x}"
- fowners mongodb:mongodb "${x}"
- fperms 0750 "${x}"
- done
-
- doman debian/mongo*.1
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
- newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
- newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
- newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # see bug #526114
- pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
-}
-
-pkg_preinst() {
- # wrt bug #461466
- if [[ "$(get_libdir)" == "lib64" ]]; then
- rmdir "${ED}"/usr/lib/ &>/dev/null
- fi
-}
-
-pkg_postinst() {
- ewarn "Make sure to read the release notes and follow the upgrade process:"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
-}
diff --git a/dev-db/mongodb/mongodb-3.6.5-r1.ebuild b/dev-db/mongodb/mongodb-3.6.5-r1.ebuild
deleted file mode 100644
index 5604f58eafb7..000000000000
--- a/dev-db/mongodb/mongodb-3.6.5-r1.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-SCONS_MIN_VERSION="2.5.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
-
-MY_P=${PN}-src-r${PV/_rc/-rc}
-
-DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
-HOMEPAGE="https://www.mongodb.com"
-SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
-
-LICENSE="AGPL-3 Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug kerberos libressl mms-agent ssl test +tools"
-
-RDEPEND=">=app-arch/snappy-1.1.3
- >=dev-cpp/yaml-cpp-0.5.3
- >=dev-libs/boost-1.60:=[threads(+)]
- >=dev-libs/libpcre-8.41[cxx]
- dev-libs/snowball-stemmer
- net-libs/libpcap
- >=sys-libs/zlib-1.2.8:=
- mms-agent? ( app-admin/mms-agent )
- ssl? (
- !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- dev-python/cheetah[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- virtual/python-typing[${PYTHON_USEDEP}]
- <dev-util/scons-3
- sys-libs/ncurses
- sys-libs/readline
- debug? ( dev-util/valgrind )
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )
- test? (
- dev-python/pymongo[${PYTHON_USEDEP}]
- )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
- "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
- "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
-)
-
-S=${WORKDIR}/${MY_P}
-
-pkg_pretend() {
- if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.4 ]]; then
- ewarn "To upgrade from a version earlier than the 3.4-series, you must"
- ewarn "successively upgrade major releases until you have upgraded"
- ewarn "to 3.4-series. Then upgrade to 3.6 series."
- elif [[ -n ${REPLACING_VERSIONS} ]]; then
- ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
- fi
-}
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # remove bundled libs
- rm -rv src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
-
- # remove compass
- rm -rv src/mongo/installer/compass || die
-}
-
-src_configure() {
- # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
- # --use-system-icu fails tests
- # --use-system-tcmalloc is strongly NOT recommended:
- scons_opts=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
-
- --disable-warnings-as-errors
- --use-system-boost
- --use-system-pcre
- --use-system-snappy
- --use-system-stemmer
- --use-system-yaml
- --use-system-zlib
- )
-
- use debug && scons_opts+=( --dbg=on )
- use kerberos && scons_opts+=( --use-sasl-client )
- use ssl && scons_opts+=( --ssl )
-
- # respect mongoDB upstream's basic recommendations
- # see bug #536688 and #526114
- if ! use debug; then
- filter-flags '-m*'
- filter-flags '-O?'
- fi
-
- default
-}
-
-src_compile() {
- escons "${scons_opts[@]}" core tools
-}
-
-# FEATURES="test -usersandbox" emerge dev-db/mongodb
-src_test() {
- "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
-}
-
-src_install() {
- escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
-
- local x
- for x in /var/{lib,log}/${PN}; do
- keepdir "${x}"
- fowners mongodb:mongodb "${x}"
- fperms 0750 "${x}"
- done
-
- doman debian/mongo*.1
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
- newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
- newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
- newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # see bug #526114
- pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
-}
-
-pkg_preinst() {
- # wrt bug #461466
- if [[ "$(get_libdir)" == "lib64" ]]; then
- rmdir "${ED}"/usr/lib/ &>/dev/null
- fi
-}
-
-pkg_postinst() {
- ewarn "Make sure to read the release notes and follow the upgrade process:"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
-}
diff --git a/dev-db/mongodb/mongodb-3.6.6.ebuild b/dev-db/mongodb/mongodb-3.6.6.ebuild
deleted file mode 100644
index 8945e0387bab..000000000000
--- a/dev-db/mongodb/mongodb-3.6.6.ebuild
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-SCONS_MIN_VERSION="2.5.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit check-reqs eapi7-ver eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user
-
-MY_P=${PN}-src-r${PV/_rc/-rc}
-
-DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
-HOMEPAGE="https://www.mongodb.com"
-SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
-
-LICENSE="AGPL-3 Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug kerberos libressl mms-agent ssl test +tools"
-
-RDEPEND=">=app-arch/snappy-1.1.3
- >=dev-cpp/yaml-cpp-0.5.3
- >=dev-libs/boost-1.60:=[threads(+)]
- >=dev-libs/libpcre-8.41[cxx]
- dev-libs/snowball-stemmer
- net-libs/libpcap
- >=sys-libs/zlib-1.2.8:=
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )
- mms-agent? ( app-admin/mms-agent )
- ssl? (
- !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- dev-python/cheetah[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- virtual/python-typing[${PYTHON_USEDEP}]
- dev-util/scons
- sys-libs/ncurses:0=
- sys-libs/readline:0=
- debug? ( dev-util/valgrind )
- test? (
- dev-python/pymongo[${PYTHON_USEDEP}]
- )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
- "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
- "${FILESDIR}/${PN}-3.6.1-no-compass.patch"
-)
-
-S=${WORKDIR}/${MY_P}
-
-pkg_pretend() {
- if [[ -n ${REPLACING_VERSIONS} ]]; then
- if ver_test "$REPLACING_VERSIONS" -lt 3.4; then
- ewarn "To upgrade from a version earlier than the 3.4-series, you must"
- ewarn "successively upgrade major releases until you have upgraded"
- ewarn "to 3.4-series. Then upgrade to 3.6 series."
- else
- ewarn "Be sure to set featureCompatibilityVersion to 3.4 before upgrading."
- fi
- fi
-}
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # remove bundled libs
- rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
-
- # remove compass
- rm -r src/mongo/installer/compass || die
-}
-
-src_configure() {
- # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
- # --use-system-icu fails tests
- # --use-system-tcmalloc is strongly NOT recommended:
- scons_opts=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
-
- --disable-warnings-as-errors
- --use-system-boost
- --use-system-pcre
- --use-system-snappy
- --use-system-stemmer
- --use-system-yaml
- --use-system-zlib
- )
-
- use debug && scons_opts+=( --dbg=on )
- use kerberos && scons_opts+=( --use-sasl-client )
- use ssl && scons_opts+=( --ssl )
-
- # respect mongoDB upstream's basic recommendations
- # see bug #536688 and #526114
- if ! use debug; then
- filter-flags '-m*'
- filter-flags '-O?'
- fi
-
- default
-}
-
-src_compile() {
- escons "${scons_opts[@]}" core tools
-}
-
-# FEATURES="test -usersandbox" emerge dev-db/mongodb
-src_test() {
- "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
-}
-
-src_install() {
- escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
-
- doman debian/mongo*.1
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
- newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
- newinitd "${FILESDIR}/mongos.initd-r3" ${PN/db/s}
- newconfd "${FILESDIR}/mongos.confd-r3" ${PN/db/s}
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/mongos.conf-r2" ${PN/db/s}.conf
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # see bug #526114
- pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
-
- local x
- for x in /var/{lib,log}/${PN}; do
- diropts -m0750 -o mongodb -g mongodb
- keepdir "${x}"
- done
-}
-
-pkg_postinst() {
- ewarn "Make sure to read the release notes and follow the upgrade process:"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures"
-}
diff --git a/dev-db/mongodb/mongodb-3.6.7.ebuild b/dev-db/mongodb/mongodb-3.6.8.ebuild
index 0476e7f810ed..a96cd863789d 100644
--- a/dev-db/mongodb/mongodb-3.6.7.ebuild
+++ b/dev-db/mongodb/mongodb-3.6.8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -10,7 +10,7 @@ CHECKREQS_DISK_BUILD="2400M"
CHECKREQS_DISK_USR="512M"
CHECKREQS_MEMORY="1024M"
-inherit check-reqs eapi7-ver flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user
+inherit check-reqs eapi7-ver flag-o-matic multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user
MY_P=${PN}-src-r${PV/_rc/-rc}
@@ -41,7 +41,6 @@ DEPEND="${RDEPEND}
dev-python/cheetah[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
virtual/python-typing[${PYTHON_USEDEP}]
- dev-util/scons
sys-libs/ncurses:0=
sys-libs/readline:0=
debug? ( dev-util/valgrind )
diff --git a/dev-db/mongodb/mongodb-4.0.0-r1.ebuild b/dev-db/mongodb/mongodb-4.0.0-r1.ebuild
deleted file mode 100644
index 46989477c500..000000000000
--- a/dev-db/mongodb/mongodb-4.0.0-r1.ebuild
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-SCONS_MIN_VERSION="2.5.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit check-reqs eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user versionator
-
-MY_P=${PN}-src-r${PV/_rc/-rc}
-
-DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
-HOMEPAGE="https://www.mongodb.com"
-SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
-
-LICENSE="AGPL-3 Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug kerberos libressl mms-agent ssl test +tools"
-
-RDEPEND=">=app-arch/snappy-1.1.3
- >=dev-cpp/yaml-cpp-0.5.3
- >=dev-libs/boost-1.60:=[threads(+)]
- >=dev-libs/libpcre-8.41[cxx]
- dev-libs/snowball-stemmer
- net-libs/libpcap
- >=sys-libs/zlib-1.2.11:=
- mms-agent? ( app-admin/mms-agent )
- ssl? (
- !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- dev-python/cheetah[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- virtual/python-typing[${PYTHON_USEDEP}]
- <dev-util/scons-3
- sys-libs/ncurses
- sys-libs/readline
- debug? ( dev-util/valgrind )
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )
- test? (
- dev-python/pymongo[${PYTHON_USEDEP}]
- )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
- "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
- "${FILESDIR}/${PN}-4.0.0-no-compass.patch"
-)
-
-S=${WORKDIR}/${MY_P}
-
-pkg_pretend() {
- if [[ -n ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 3.6 ]]; then
- ewarn "To upgrade from a version earlier than the 3.6-series, you must"
- ewarn "successively upgrade major releases until you have upgraded"
- ewarn "to 3.6-series. Then upgrade to 4.0 series."
- elif [[ -n ${REPLACING_VERSIONS} ]]; then
- ewarn "Be sure to set featureCompatibilityVersion to 3.6 before upgrading."
- fi
-}
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # remove bundled libs
- rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
-
- # remove compass
- rm -r src/mongo/installer/compass || die
-}
-
-src_configure() {
- # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
- # --use-system-icu fails tests
- # --use-system-tcmalloc is strongly NOT recommended:
- scons_opts=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
-
- --disable-warnings-as-errors
- --use-system-boost
- --use-system-pcre
- --use-system-snappy
- --use-system-stemmer
- --use-system-yaml
- --use-system-zlib
- )
-
- use debug && scons_opts+=( --dbg=on )
- use kerberos && scons_opts+=( --use-sasl-client )
- use ssl && scons_opts+=( --ssl )
-
- # respect mongoDB upstream's basic recommendations
- # see bug #536688 and #526114
- if ! use debug; then
- filter-flags '-m*'
- filter-flags '-O?'
- fi
-
- default
-}
-
-src_compile() {
- escons "${scons_opts[@]}" core tools
-}
-
-# FEATURES="test -usersandbox" emerge dev-db/mongodb
-src_test() {
- "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
-}
-
-src_install() {
- escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
-
- local x
- for x in /var/{lib,log}/${PN}; do
- keepdir "${x}"
- fowners mongodb:mongodb "${x}"
- fperms 0750 "${x}"
- done
-
- doman debian/mongo*.1
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
- newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
- newinitd "${FILESDIR}/${PN/db/s}.initd-r3" ${PN/db/s}
- newconfd "${FILESDIR}/${PN/db/s}.confd-r3" ${PN/db/s}
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # see bug #526114
- pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
-}
-
-pkg_preinst() {
- # wrt bug #461466
- if [[ "$(get_libdir)" == "lib64" ]]; then
- rmdir "${ED}"/usr/lib/ &>/dev/null
- fi
-}
-
-pkg_postinst() {
- ewarn "Make sure to read the release notes and follow the upgrade process:"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(get_version_component_range 1-2)/#upgrade-procedures"
-}
diff --git a/dev-db/mongodb/mongodb-4.0.1.ebuild b/dev-db/mongodb/mongodb-4.0.1.ebuild
deleted file mode 100644
index 142533eb1cfe..000000000000
--- a/dev-db/mongodb/mongodb-4.0.1.ebuild
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-SCONS_MIN_VERSION="2.5.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit check-reqs eapi7-ver eutils flag-o-matic multilib multiprocessing pax-utils python-single-r1 scons-utils systemd toolchain-funcs user
-
-MY_P=${PN}-src-r${PV/_rc/-rc}
-
-DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
-HOMEPAGE="https://www.mongodb.com"
-SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
-
-LICENSE="AGPL-3 Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="debug kerberos libressl mms-agent ssl test +tools"
-
-RDEPEND=">=app-arch/snappy-1.1.3
- >=dev-cpp/yaml-cpp-0.5.3
- >=dev-libs/boost-1.60:=[threads(+)]
- >=dev-libs/libpcre-8.41[cxx]
- dev-libs/snowball-stemmer
- net-libs/libpcap
- >=sys-libs/zlib-1.2.11:=
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )
- mms-agent? ( app-admin/mms-agent )
- ssl? (
- !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
- libressl? ( dev-libs/libressl:0= )
- )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- dev-python/cheetah[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- virtual/python-typing[${PYTHON_USEDEP}]
- dev-util/scons
- sys-libs/ncurses:0=
- sys-libs/readline:0=
- debug? ( dev-util/valgrind )
- test? (
- dev-python/pymongo[${PYTHON_USEDEP}]
- )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.4.7-no-boost-check.patch"
- "${FILESDIR}/${PN}-3.6.1-fix-scons.patch"
- "${FILESDIR}/${PN}-4.0.0-no-compass.patch"
-)
-
-S=${WORKDIR}/${MY_P}
-
-pkg_pretend() {
- if [[ -n ${REPLACING_VERSIONS} ]]; then
- if ver_test "$REPLACING_VERSIONS" -lt 3.6; then
- ewarn "To upgrade from a version earlier than the 3.6-series, you must"
- ewarn "successively upgrade major releases until you have upgraded"
- ewarn "to 3.6-series. Then upgrade to 4.0 series."
- else
- ewarn "Be sure to set featureCompatibilityVersion to 3.6 before upgrading."
- fi
- fi
-}
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # remove bundled libs
- rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
-
- # remove compass
- rm -r src/mongo/installer/compass || die
-}
-
-src_configure() {
- # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
- # --use-system-icu fails tests
- # --use-system-tcmalloc is strongly NOT recommended:
- scons_opts=(
- CC="$(tc-getCC)"
- CXX="$(tc-getCXX)"
-
- --disable-warnings-as-errors
- --use-system-boost
- --use-system-pcre
- --use-system-snappy
- --use-system-stemmer
- --use-system-yaml
- --use-system-zlib
- )
-
- use debug && scons_opts+=( --dbg=on )
- use kerberos && scons_opts+=( --use-sasl-client )
- use ssl && scons_opts+=( --ssl )
-
- # respect mongoDB upstream's basic recommendations
- # see bug #536688 and #526114
- if ! use debug; then
- filter-flags '-m*'
- filter-flags '-O?'
- fi
-
- default
-}
-
-src_compile() {
- escons "${scons_opts[@]}" core tools
-}
-
-# FEATURES="test -usersandbox" emerge dev-db/mongodb
-src_test() {
- "${EPYTHON}" ./buildscripts/resmoke.py --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed"
-}
-
-src_install() {
- escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
-
- doman debian/mongo*.1
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
- newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
- newinitd "${FILESDIR}/mongos.initd-r3" ${PN/db/s}
- newconfd "${FILESDIR}/mongos.confd-r3" ${PN/db/s}
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/mongos.conf-r2" ${PN/db/s}.conf
-
- systemd_dounit "${FILESDIR}/${PN}.service"
-
- insinto /etc/logrotate.d/
- newins "${FILESDIR}/${PN}.logrotate" ${PN}
-
- # see bug #526114
- pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
-
- local x
- for x in /var/{lib,log}/${PN}; do
- diropts -m0750 -o mongodb -g mongodb
- keepdir "${x}"
- done
-}
-
-pkg_postinst() {
- ewarn "Make sure to read the release notes and follow the upgrade process:"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/"
- ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures"
-}
diff --git a/dev-db/mysql++/Manifest b/dev-db/mysql++/Manifest
index 5e8733fd8751..e2f29235e27c 100644
--- a/dev-db/mysql++/Manifest
+++ b/dev-db/mysql++/Manifest
@@ -8,5 +8,5 @@ DIST mysql++-3.2.1.tar.gz 2256735 BLAKE2B 8d5e713926a405fa9b93af690554595d8cc79c
DIST mysql++-3.2.3.tar.gz 3241023 BLAKE2B 5faa5711c7ed7c64346013bd1ca6e7dc20e5b23d33983a719c892bbd1002f3986206df6cfef54316f11aa480f18dbc0a2cf6944f9572f3a7dca24cdb73099eb9 SHA512 b6b0a9856ede9e5e08be0f5ed1689b1256f8cf31c3afbb9c9e7f68d0734380e25909ef31cd04be6b253c86b2f881df10f3793a2d3e32042375dbbab4b0700d0a
EBUILD mysql++-2.3.2-r1.ebuild 1410 BLAKE2B 6acbf4805dc44570d1d1b9df9a1c8769d3c13c9658b74cbad2052313d0538552693da45f2558be1afea78f80d6492ec36a9c02389ecbc054c60610ad521030eb SHA512 badefe7d214bd55b81965070b814b94c15fe3635d87c265225d2f9fef02360c3e09adeeb79a75c9990e89d596f111fc958c2a5fcec63624f14404192e4a26884
EBUILD mysql++-3.2.1.ebuild 901 BLAKE2B 0e6c3feef947f749d7124284dad8ce91d14fed57d7a24730482dea19646a8b675113577138d4d81dd3e803df74f13a91fe40b1959fa145bf676b8d301a24d588 SHA512 6a2029dab230cf4c1e4c344362ef7ae8204775a1dd898da6d5bbe274c3b5ad1b1d223eb6e4b4c5915b87b7c6b401c40b3630c8aa0546d4c0192ba418f4d1cf31
-EBUILD mysql++-3.2.3.ebuild 1563 BLAKE2B ccd3a0d271f0d4437ac1484b12cf426524c782af6807e01f9f65cf8fcb89b19157332bfb0b27b9169ad3f73252daaa339117283e3e8588fd9ad61ce656f35d29 SHA512 6ae4ed367990663bd9a0c9fb3ca155f10b469931d99c113776ea7e67b1acb89373c9a46445d36b9cf7e50325143bbe040b942e80544f9b1288133f6480cbf3ea
+EBUILD mysql++-3.2.3.ebuild 1562 BLAKE2B bc58aef5302e7b7a56765dbb106d6e7d9701067dd44d47239372476bb2f5fd9a0b7aee8f08f424db3941e4a7bfad84a07987b4fad3ff0e4f5dbe6932a14bd2bf SHA512 8a3435d70bd453f94dc31b4759de016d9948e3b833cc5d74fdce7ef1b32a11a7e715265182eb7bf7275ba764f1e762cc8797b2995afd161bcc95100bf425338b
MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b
diff --git a/dev-db/mysql++/mysql++-3.2.3.ebuild b/dev-db/mysql++/mysql++-3.2.3.ebuild
index bd63acfa672a..e314c0bc75ab 100644
--- a/dev-db/mysql++/mysql++-3.2.3.ebuild
+++ b/dev-db/mysql++/mysql++-3.2.3.ebuild
@@ -11,7 +11,7 @@ SRC_URI="http://www.tangentsoft.net/mysqlpp/releases/${P}.tar.gz"
LICENSE="LGPL-2"
SLOT="0/3"
-KEYWORDS="~alpha amd64 ~hppa ~mips ~ppc ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+KEYWORDS="~alpha amd64 ~hppa ~mips ppc ~sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="doc"
RDEPEND="virtual/libmysqlclient:="
diff --git a/dev-db/mysql-init-scripts/Manifest b/dev-db/mysql-init-scripts/Manifest
index aa9a09e81392..6a6bda0bde78 100644
--- a/dev-db/mysql-init-scripts/Manifest
+++ b/dev-db/mysql-init-scripts/Manifest
@@ -10,4 +10,5 @@ AUX mysqld-wait-ready 1758 BLAKE2B 2a6ccc105cedc78e4e8acf77fd13f8083af80b3488572
AUX mysqld_at-v2.service 1170 BLAKE2B d02f7ee3549d273d309e8e6e5cd8c2f987c6feab42bb330367c14df6932a887f7740ca6c28ecd15aba8bf2f89c33854345d773134630a5e8cd5ce8b99a8b6667 SHA512 a91eb574925afc0096e668799f9806b1cfa4c808ffab26dab5df1934db0dd8059a5e7913b0fdc3374f41e14cc72a6450890c9d746d3ff2de873af91199a71ee0
AUX run-s6 268 BLAKE2B ebc9c74527257e1a35a4671afe2d34d9ed9868db0e0f33eebe655b31317a4ceeb02affe471ad49007534a9ce0a9399d9f14af664488ae753e207cf97d467107b SHA512 82be247195f6d9d230b063e9bda393bab8855382c2f3e5eb4d427fc1eb7e23dbd8c90939224ff2b5e4116a5c9d3f26ebdc9b9f548cde91e7c1217f4f8500c0d3
EBUILD mysql-init-scripts-2.2-r3.ebuild 1899 BLAKE2B c7406995ab4a0ecdb9bcd20a9384e269e4dbd55d87c21674cd7b4c31d937468448818bd9c06286b5595fe138b2fb5d6cd2faeec0276e08e0e0f24a6b8b96426a SHA512 2b2873467515d34b6afb03b06f73d8420b5228924362866ab3ba0353ff59509b4aa37db0cc3ccb5f6529a8a732b1a3a405f0b4d30bd288bf518a899884146c2a
+EBUILD mysql-init-scripts-2.2-r4.ebuild 1983 BLAKE2B d322fc4243b6ac3c4540c1f0f312d5baf8658234e3182ff52cbb2442f59d4052ccf662d337780ac0a77611e846ac03b9da116f6e294f4cede62694c1fc2e6d52 SHA512 ac578f3ea527efe1e5b233a075d83e5e1f49785c23c3d5e6557123859d81adef4a5ca51d91fb70f1320bceb4f9fbe2cada8334d831961061a9bba216ce55306f
MISC metadata.xml 243 BLAKE2B f247f748a23e4cda2f518ad7e4e53b9027ff08ec62289010e6dfc8cd2ad49412430c4095e80f2156c8e6f1226bcda0163b4faae83759550f79e9998928398713 SHA512 7c227a1fadd8d61aae9baabeb5d964c93fe0c4d82fb838c83fe0360cf38b24bebf51037726f13188ecd8f52c335368a693b81e74d79ba949576a6dbcb54887a9
diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.2-r4.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.2-r4.ebuild
new file mode 100644
index 000000000000..2028d860d3d2
--- /dev/null
+++ b/dev-db/mysql-init-scripts/mysql-init-scripts-2.2-r4.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit systemd s6 tmpfiles
+
+DESCRIPTION="Gentoo MySQL init scripts."
+HOMEPAGE="https://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+# This _will_ break with MySQL 5.0, 4.x, 3.x
+# It also NEEDS openrc for the save_options/get_options builtins.
+# The s6 support was added after openrc 0.16.2
+# mysql-connector-c needed for my_print_defaults
+RDEPEND="
+ !<dev-db/mysql-5.1
+ !<sys-apps/openrc-0.16.2
+ dev-db/mysql-connector-c
+ "
+# Need to set S due to PMS saying we need it existing, but no SRC_URI
+S=${WORKDIR}
+
+src_install() {
+ newconfd "${FILESDIR}/conf.d-2.0" "mysql"
+
+ # s6 init scripts
+ if use amd64 || use x86 ; then
+ newconfd "${FILESDIR}/conf.d-2.0" "mysql-s6"
+ newinitd "${FILESDIR}/init.d-s6-2.2" "mysql-s6"
+ s6_install_service mysql "${FILESDIR}/run-s6"
+ s6_install_service mysql/log "${FILESDIR}/log-s6"
+ fi
+
+ newinitd "${FILESDIR}/init.d-2.2" "mysql"
+ newinitd "${FILESDIR}/init.d-supervise" "mysql-supervise"
+
+ # systemd unit installation
+ exeinto /usr/libexec
+ doexe "${FILESDIR}"/mysqld-wait-ready
+ systemd_newunit "${FILESDIR}/mysqld-v2.service" "mysqld.service"
+ systemd_newunit "${FILESDIR}/mysqld_at-v2.service" "mysqld@.service"
+ dotmpfiles "${FILESDIR}/mysql.conf"
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/logrotate.mysql" "mysql"
+}
+
+pkg_postinst() {
+ tmpfiles_process mysql.conf
+ if use amd64 || use x86 ; then
+ elog ""
+ elog "To use the mysql-s6 script, you need to install the optional sys-apps/s6 package."
+ elog "If you wish to use s6 logging support, comment out the log-error setting in your my.cnf"
+ fi
+
+ elog ""
+ elog "Starting with version 10.1.8, MariaDB includes an improved systemd unit named mariadb.service"
+ elog "You should prefer that unit over this package's mysqld.service."
+ einfo ""
+}
diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 2d93d2c317dd..d360a7eb7002 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -10,7 +10,7 @@ DIST mysql-5.6.41.tar.gz 32111985 BLAKE2B 5ccad59333525b354db4fa892857e237cddf8f
DIST mysql-boost-5.7.23.tar.gz 49025014 BLAKE2B 669f10779bc2cda866d6bd876b4efe55fb4b0c796f596f66513a3ca85f322e2a03e9879eecd72a69729a0cb71d408c46cdd9086ae456712b4adff6ae7c584c97 SHA512 e4317f89d108a68652cd95e41ffd670c37b6663aabd6af3985d18052fb7e8d8879b5822399caf9091cecc0a949ec588c121c87cfd60d69941f68d0ecbedd0953
DIST mysql-extras-20180804-2323Z.tar.bz2 322215 BLAKE2B cca9e502e375bf43473335868517f6c450fc7bcf03e55de5a294c8bdcfcac2bb783dec09bbb3b6c30a561ba7e3a943543c017e2d42b61d466e699acdef4c0231 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d
EBUILD mysql-5.5.61.ebuild 25516 BLAKE2B 3363fc9f99fb6a3085a7de3cf540ddd853365b5865a418c752255417040ca568fa16a02e0b74cd98502eeadda4d11e7bd37269d1416232db279eedee15630320 SHA512 ccfbdef198de75215efb498a76525e03f469a5c596b9fe366f9e1973969f928263be1628b378369d76899eea6d7750c45ce07827d11b0f277b2aee2242540645
-EBUILD mysql-5.6.40-r2.ebuild 25125 BLAKE2B 2b3aba06d0cb8ef8b5237c920aaa072569de954e8f6e3c0f86536b53f666eb826d6fd0f4b218690a30bb5f7f27cd52ae75130750e76ec319095627b0b4e52a7c SHA512 31bf120a4a7d4d4ec9cc5cda155ea085fa5a843190273e4a8d7da0a283fada58782b281b60d6a72828e126defb97982c98b27a3c832f8f90f81832a568b15c19
-EBUILD mysql-5.6.41.ebuild 25132 BLAKE2B c4a4eda7d5d55f30caf4f500c5e67ddc4b3b129fbdd71e10a9cbec07f1da04d931e35caf5ba0ab6cdc08d6da9f86ec575a100538c945d73069ba89f819272501 SHA512 531fbecde63be61078dd7be79b3a11abb11ff8e266dd3ef093775e5c2f66b5f2305735242939f53d047be1494c630f4cfb14fdea2f0c0451f67c33fd5bd13352
+EBUILD mysql-5.6.40-r2.ebuild 25633 BLAKE2B f8ec8617de040020878220e209fa36331f8570906177c950b36cca698c6864b38d8fc98eb7daf5b9f3536a2872ad5f5bc2dbaba8f72cd86894bb0bc5ca1385dd SHA512 9b3973d9c6c6c019f0b760f1b2a1f78b46337276d81b2c6b986c2e38a4aee5d4856ca5dde3f39ff33e503871ff6c9962da08a3ebfe1c74e52e970912908ee136
+EBUILD mysql-5.6.41.ebuild 25640 BLAKE2B 5398748da6151698932be68f502e5cf958b06304eda0a392c47d4e324334375b3f5359eacc76a8a9654ed18a6fce13e47a395c636e9718adc1bb3a0b41004911 SHA512 70e2783ad591e3c005c5324e92d36dd963e3241416435f41aaf37b14de3b812dd48b715557dff4fe41026bc8020c026bf33f99e518880cf62957250fc4242efc
EBUILD mysql-5.7.23.ebuild 27020 BLAKE2B b430c1582c802202d25a13049fccbbfa761d729b868ac7a22930f685c40d8e6a122a7a4c8bf8b830b17328592cb353cc33a4b32094675dac95aa957e6332652d SHA512 f1284dc26df2fee22d8f3dcdcbe3a0c34da350849fa99fcd30e661310eb51dc09ad18cdf2b65d2527d91a9bc37f96f6553b9c3994f8110b4f134bd8656711430
MISC metadata.xml 1436 BLAKE2B d05f050f50dd99df94a216e0d5b6a8837ee2b53853169a0fbd28d1cd6e2fec40d4fe87c229da31cd56a3fae18a31e5ff283ccbad6c3d69eaf06db0f6f9099f65 SHA512 987ad1be9aa1376f5819f23c457f7dbafedc703d6773281f0b56aba21da319f6b067e4c161a67c65fcec64e29482d71a5623265e3c4eda5a5398e5aa71d183c8
diff --git a/dev-db/mysql/mysql-5.6.40-r2.ebuild b/dev-db/mysql/mysql-5.6.40-r2.ebuild
index b81a2ec567e0..0c2284e90808 100644
--- a/dev-db/mysql/mysql-5.6.40-r2.ebuild
+++ b/dev-db/mysql/mysql-5.6.40-r2.ebuild
@@ -131,8 +131,8 @@ pkg_preinst() {
# Here we need to see if the implementation switched client libraries
# We check if this is a new instance of the package and a client library already exists
local SHOW_ABI_MESSAGE libpath
- if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
- libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+ if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
elog "Due to ABI changes when switching between different client libraries,"
elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
elog "Please run: revdep-rebuild --library ${libpath}"
@@ -672,6 +672,12 @@ pkg_config() {
# see http://bugs.mysql.com/bug.php?id=31312
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+ local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
+ [[ -r "${help_tables}" ]] \
+ && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
+ || touch "${TMPDIR}/fill_help_tables.sql"
+ help_tables="${TMPDIR}/fill_help_tables.sql"
+
# 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
@@ -699,13 +705,14 @@ pkg_config() {
# Filling timezones, see
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
- echo "USE mysql;" >"${sqltmp}"
"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
chown mysql "${sqltmp}" || die
- # --initialize-insecure will not set root password
- # --initialize would set a random one in the log which we don't need as we set it ourselves
- local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+ local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
+ if [[ -r "${help_tables}" ]] ; then
+ cat "${help_tables}" >> "${sqltmp}"
+ fi
cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
@@ -751,7 +758,7 @@ pkg_config() {
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
- local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+ local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
"${EROOT%/}/usr/bin/mysql" \
--no-defaults \
"--socket=${socket}" \
@@ -759,6 +766,19 @@ pkg_config() {
-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}" )
diff --git a/dev-db/mysql/mysql-5.6.41.ebuild b/dev-db/mysql/mysql-5.6.41.ebuild
index 7ec34a50aadc..5f5915701abf 100644
--- a/dev-db/mysql/mysql-5.6.41.ebuild
+++ b/dev-db/mysql/mysql-5.6.41.ebuild
@@ -131,8 +131,8 @@ pkg_preinst() {
# Here we need to see if the implementation switched client libraries
# We check if this is a new instance of the package and a client library already exists
local SHOW_ABI_MESSAGE libpath
- if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
- libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
+ if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libmysqlclient.so")
elog "Due to ABI changes when switching between different client libraries,"
elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
elog "Please run: revdep-rebuild --library ${libpath}"
@@ -672,6 +672,12 @@ pkg_config() {
# see http://bugs.mysql.com/bug.php?id=31312
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
+ local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
+ [[ -r "${help_tables}" ]] \
+ && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
+ || touch "${TMPDIR}/fill_help_tables.sql"
+ help_tables="${TMPDIR}/fill_help_tables.sql"
+
# 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
@@ -699,13 +705,14 @@ pkg_config() {
# Filling timezones, see
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
- echo "USE mysql;" >"${sqltmp}"
"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
chown mysql "${sqltmp}" || die
- # --initialize-insecure will not set root password
- # --initialize would set a random one in the log which we don't need as we set it ourselves
- local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
+ local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
+ if [[ -r "${help_tables}" ]] ; then
+ cat "${help_tables}" >> "${sqltmp}"
+ fi
cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
@@ -751,7 +758,7 @@ pkg_config() {
ebegin "Setting root password"
# Do this from memory, as we don't want clear text passwords in temp files
- local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
+ local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
"${EROOT%/}/usr/bin/mysql" \
--no-defaults \
"--socket=${socket}" \
@@ -759,6 +766,19 @@ pkg_config() {
-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}" )
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index c3880ba66480..fd9e38b9286c 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -10,41 +10,19 @@ 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.3.tar.bz2 19959653 BLAKE2B ba3b05f53b0f879b18d6d0649bf819697c77a066b49d941a96d13a4741854b01aeb0c8b868d6550a08ad52572c9463c968660aa83c16cbaa5b4bf7a89387a524 SHA512 05cf82d3483bdf38734e6ff0fef6b80e7f8fd3cb5ea6792ffe222a599d97d1a29638970bf28ebf5bd1f877e8dcd9986d88f5c5e5379e74fe79ce83e20d2babba
-DIST postgresql-10.4.tar.bz2 20201838 BLAKE2B 6d1cdc44547740c8f9fbc2e989364640409c6d2a365568b75731277dd0fba473ce07e2ee27e8ebfad507a6ce0ab3d3a44156c0e3a069d96d320771d8a97ba82f SHA512 b7c0d2fdc724e2eb1cda9fc1eb01b47352bbe6ba6357b3e898b7f5990fd78499c8c68dcb3aa9bde7821d71b5882d8856131384e899f8055d89d51cdfdbc9e663
DIST postgresql-10.5.tar.bz2 20284578 BLAKE2B af2bc5bdc7e69682dac38785ce4a10c2c5c04202f2c3cd4acbb9200dbae7eec75d83813ac4df84b5a8064e77167f22a4dd54c6e84a68e564642cb5d75effd0ac SHA512 1bad30ae88beca66f7e8b99b82e7f02aac1e9230b328e6e5a762a704cdd9dc767d924f5a66c68c93586badfef91b7ff336120a567ce970eaa58bb44c662ad48c
-DIST postgresql-11beta1.tar.bz2 20945387 BLAKE2B a99aff17a656da2250309f2652237c8df3a3aeed088250be6114964c103dec40d0c4cc60b048b2ffa1e9733aed8e9df2597d57cab58482512c42f25139dc3499 SHA512 fa4e9cf8293fecf384d98d3a5bbed208eda2e4dd8bf05a9922a74355daba74dde4dbe0cd42bea1de155f4fea3cdcd0d7621d7e315c1d5f49ce5ee794b01b9f6d
-DIST postgresql-11beta2.tar.bz2 21086270 BLAKE2B ecea671334cc8dcc59ef46e1e9dfc16c1f0c44623d5355a42ef07797c6794109f10532fb6bfd6b4165e92a83d42514547e402cbe1a3618a6e6894432b3e2945d SHA512 3f9120af5f39d10937d92344c45e19f6d4de097dc24a081cd1984b27df4ecb8b0c15c638c8b1f8830b0003f01808159bd91305f9744eb6ae6c3425b3bf677937
DIST postgresql-11beta3.tar.bz2 21375988 BLAKE2B cd83fcfc55504a028bf42f2c31de4d9e12ead1ad0f238a1f36397b9405ddf8f6d371062a25e2660f8c6754447a09ddc3a122f178101b8ab80237b16422c8cf4c SHA512 6ac6ecf2fff014b3673b11f6f106fdc93e6692a4a67a4669c4a7557f2b3229e41ddf5365c1e9328d88b6fde9141c15bd1a4640356559e727ee7f9f11641d4bf6
-DIST postgresql-9.3.22.tar.bz2 17022938 BLAKE2B 198705e438717d0d9e12c73e0c0e3eff0ba89ea50a1b183de70f065e13c153c164890fe56bc6ec13b0cb9617df4f66894c122eeddaf9303b9a02b8e08b19b085 SHA512 667ff496172626d2fe35c6795935fb07f4f7967a3b0631dd3b96278f8dc00b3d08794f091a5ab060a45d6f2a861e0f10f0e9660f9e343ab34eeabd693104c47f
-DIST postgresql-9.3.23.tar.bz2 17033683 BLAKE2B f02ad25f6b8755a9a57c3a6dcb63b78672e29473b061ad1616be2fb97fbfd83fe0dc9fc9fda66ac0231fb30fb13f9ef8975ba5a9701d83f33495bcf2c2651b4a SHA512 bb2d54312de728aa0379ea5bc6385036bbe69d3b7f85bbd78c210840eed19ace29840849caf38d0689e21130a0c94818a362b3927805d8eded53b68e240a52b0
+DIST postgresql-11beta4.tar.bz2 21143836 BLAKE2B d10fe7bd342dcbee3e98cf31355dad5b0bf4837969212e10e6e62549230ce8a3c24be9f61f9e629241b99eb5465e366196a43f58276c338d985fb2d3b6348114 SHA512 38a5f1e9df2b97054a1a9a5ab92b5a909315813cd93562f599f403b3f1f8f898ebd32cd36be9c8792bfb27650831a03eef1cd5335ae2470d22a6664e8b265605
DIST postgresql-9.3.24.tar.bz2 17042985 BLAKE2B 976debbc2a072cc307e22beac1d59352ecc214b9879284e635f30295d1f46ad2e0542ffc5f62639527be870afe46ea5daf5b8b2d3da9a069adf1701218def968 SHA512 3d457b6218eeb8da2d8dd134dabc7ec8000cad5863870079b85ce00d94218fa049146290a8389fec15e57d586b0edee9810cdad85f36cbabce49b6b4378ce1ee
-DIST postgresql-9.4.17.tar.bz2 17807762 BLAKE2B 7640c29a71c6aeff47d9b43dd1e4f52edac4295b646b34da3a0ed9c26a8a826061bfd892e9907b62f31b7f01ee3aaf437c88d79b84d1d786d608dcd088309ecf SHA512 9ac03d460e521dcd142ac463dd5bb0f3e3f47333367bf8d61499ec7e8d0129d338c6f111667d0006df0c8ced9ae8a337d4c1b40eb5f55e6bc8dd5a24dfd376f0
-DIST postgresql-9.4.18.tar.bz2 17828085 BLAKE2B 346584e7d74264a7d58b3793cfd6247ae3cad3bb946bedec8df8d97278ffe6f8e881d31ad50e9f5d622aa4ae9b9711b36258bb60d520bb9a1d458af63c343e9e SHA512 2e64c3130c3dfc5183a77d72f61714bea34bfe549f55720eee25046e00b913a7effec3d7e43a021766ac957c1fa3c8c5e6c26ccbd8be1b434ae618e1fe9daab6
DIST postgresql-9.4.19.tar.bz2 17879273 BLAKE2B 775a8748218c40440df91307107d46a35bcb3b2baf1c383014684c15d06c0026548770f88dccb1c26c3247813761e4a43003c50fe930041afc5701cddabfbde3 SHA512 38e2f1f25bd80fdfdec728cd4a3fee6696ca051e496f0629a0a554ea013bfb9bb83ef5659b00130666462a45036a648cf880a2f49693a8ef2edbde938e4dd830
-DIST postgresql-9.5.12.tar.bz2 18589538 BLAKE2B 4246eb2bf5fe2e3bb48bdc411ebd3c87015570f0be4d8b1ed2a0f2ed20a8374e3244fa0aa17f9145f4f951c88f5b0717a4dd2186bf1621ce3334789f5f8dd50f SHA512 ab81bc95fd587f76a1986db5616b63d861b84da0eb9e54478f5298248a81d7a608d1bb1a9e30662c8190d05630106ddb3bb6413c34b003de948417214d342654
-DIST postgresql-9.5.13.tar.bz2 18600185 BLAKE2B 7560f08648ec1417d304aa8c53c3220d7a4b2fdaf2cb4920a0196273466d1dbab4c12dbceb3dc9a136458c0089dd5f5dc595c95353584d49da0d2ab6e7903bba SHA512 807b22aabee38326934213de04b782a6b22cd8fe5c5bfd8b6cfa44281924527a715dcd78adbee276746446a7b05036b4714b00a16c650027543dcbafe1888082
DIST postgresql-9.5.14.tar.bz2 18687959 BLAKE2B ac377b5e279d9e8179a94eb91d0cf1a7e3f6443c860d68a4540357d80128fbc54ac1ffec198725b2a783a80448f8a625556f2e6018162304d65659982890d46f SHA512 9b5ebc8dc13bbdbd5b5bc02552e2b9b5029d899a80e82b653542c735868590ebe57d586951bf036c5abd28aae325c71cc69536f88321d50dd3d254f8ee0cfe35
DIST postgresql-9.6.10.tar.bz2 19991204 BLAKE2B 3d99296b5045a0b56b89257b2aa3f0c8be1108428acd77469b8db94200ad6b0b8d2fa84c73f652f79db56620c46928524d2f3a1a265ac332eb36c0625b800f76 SHA512 960a32c86466f9d5f5491ef163f5c4a99cb5de7312d13371e2223b1d156e31eb2a23ed478e6654bcbb7bd19db9470aaf63473ff661c11c60971b92af5e9daf82
-DIST postgresql-9.6.8.tar.bz2 19528927 BLAKE2B 6aab5dbe4b13e1624befc33c2fa5241804dff71879e2d60c166db19c2fe015cd19cfc35054e6aede82bfe6b83a7146b6d2eedaabb94111c163da732526ff1723 SHA512 6b7595c0046308c725d77360b156e979d6bc469b78ac6500f631112f19b2607ca2d816781f8c5fd3bd835c48e079e79ada7af687fbd306a8fec5e160f20dd211
-DIST postgresql-9.6.9.tar.bz2 19566222 BLAKE2B e92a5ffaa8f4400364a174fc21ab11bb18c96dce9be721e6073ff7ad21b828859c2ac5fe8da81cad6a3d2a63a62d8fcb067d4bb02a9d23903525ad1f78955470 SHA512 3ce2a8f3a017d9c0bd0f1b475a9ee02bcb6a4119b0d436757911f444f49f5024bb1a1be07ce16a79e71af77799de1bf952b32279b4566bae075f23a50b8545c6
-EBUILD postgresql-10.3.ebuild 13694 BLAKE2B cbc3b1250d2b50dd7a9c318a9c610506db4b2593b013b2d89a573276ab8604cff741a1a3ca03a97e3c9a6bd7392762f821caf90d642c9a05cc9ca0b411340bbf SHA512 4b6fb894e8d5196139a56b897d3a06169c35def0d7e472ac8332987445f7c7ce72568b3b7a45bd7e8dac651108731761c413296864b0c9be4a617217d49ef3ec
-EBUILD postgresql-10.4.ebuild 13702 BLAKE2B 3b49b819926f1270075bcfac90497ffec28133761f1bec0d1dbca1e8cb3474567948183bb47d4c17fff93dcb0d12815a288e1b40e0cf8df34455374118748969 SHA512 135b2f0a4e2c5302961d3dba64fb2072568204a0205de91d20b14a6a2fc8ad7a14d90e96bc82708c2d8b63148d6e3220ac6b1971279ec52da40da4bad88969e8
EBUILD postgresql-10.5.ebuild 13694 BLAKE2B cbc3b1250d2b50dd7a9c318a9c610506db4b2593b013b2d89a573276ab8604cff741a1a3ca03a97e3c9a6bd7392762f821caf90d642c9a05cc9ca0b411340bbf SHA512 4b6fb894e8d5196139a56b897d3a06169c35def0d7e472ac8332987445f7c7ce72568b3b7a45bd7e8dac651108731761c413296864b0c9be4a617217d49ef3ec
-EBUILD postgresql-11_beta1.ebuild 13373 BLAKE2B 96c2d9781eecc682323b5875cda00eaaa1e81729ffacf818c72078f2ba930d33ebcfc6a8dbba770a5857b85ed0633adfdf0a291ea6e34b50147338db99714278 SHA512 5f6d5f8579bed501e654ee6c7d0698f2367cfe855688750759470df96ed9cb1dd9070c66533bc7f771cd857cdba50d2d05c667a7968af1835047df7e29ade173
-EBUILD postgresql-11_beta2.ebuild 13373 BLAKE2B 96c2d9781eecc682323b5875cda00eaaa1e81729ffacf818c72078f2ba930d33ebcfc6a8dbba770a5857b85ed0633adfdf0a291ea6e34b50147338db99714278 SHA512 5f6d5f8579bed501e654ee6c7d0698f2367cfe855688750759470df96ed9cb1dd9070c66533bc7f771cd857cdba50d2d05c667a7968af1835047df7e29ade173
EBUILD postgresql-11_beta3.ebuild 13440 BLAKE2B 7c2cd1050b4e1bf5041fc551bf7e8c93aa309fd6e8e4ca30664214c2b21cd347b9d4473e1ff7d7f2a7697bfcf648173c30770dbc329aabb3229d2d49b38b4c34 SHA512 49d310d814d6d945c5a55f59e5e2b17935d7c3684295fafb27c4b8326146d49b06341c3844fde80ba80bda9fc81408d08a705293e3f1195bc342d953dcfd5ebf
-EBUILD postgresql-9.3.22.ebuild 13747 BLAKE2B 12e74f2f7bc2b18507b5c4e07d093cebd96406c6d981fbcaa6c2851004183acfac3e3fb882e1eea662e8cf1d35c10a1bcd6ad2820a5770874f04ad9cf508c387 SHA512 c89150f9b09e18b196d267dbec2c6539d3eb1ed6326193681249770c5d1ad42e48cffcad160121497dc8dbdd692994bd2704f581d52d029ba4dff5178a773746
-EBUILD postgresql-9.3.23.ebuild 13755 BLAKE2B 32748b48a489b9a51a19365e1159638e6de06e487db1eda5932c13e469766664bbb4ae924188b4e054a1d00048c18e7944a114bb15a172be55474dd11deb5a62 SHA512 0971a967aee606d52778ed168217c7d28ddffca984fd7821db8b4271add46868ab1f1dab6ffb1d5801c1a661f4f3a1637e9c99afa487383089cee2df90565129
+EBUILD postgresql-11_beta4.ebuild 13440 BLAKE2B 7c2cd1050b4e1bf5041fc551bf7e8c93aa309fd6e8e4ca30664214c2b21cd347b9d4473e1ff7d7f2a7697bfcf648173c30770dbc329aabb3229d2d49b38b4c34 SHA512 49d310d814d6d945c5a55f59e5e2b17935d7c3684295fafb27c4b8326146d49b06341c3844fde80ba80bda9fc81408d08a705293e3f1195bc342d953dcfd5ebf
EBUILD postgresql-9.3.24.ebuild 13747 BLAKE2B 12e74f2f7bc2b18507b5c4e07d093cebd96406c6d981fbcaa6c2851004183acfac3e3fb882e1eea662e8cf1d35c10a1bcd6ad2820a5770874f04ad9cf508c387 SHA512 c89150f9b09e18b196d267dbec2c6539d3eb1ed6326193681249770c5d1ad42e48cffcad160121497dc8dbdd692994bd2704f581d52d029ba4dff5178a773746
-EBUILD postgresql-9.4.17.ebuild 14557 BLAKE2B 57446276df8b11ebe12ef5a4b3e95dfc2892cdf93cb1a40117f0e7ae5774e0ba1a4a08b2306d971625636d4f0bddb4d0395bc6671397ef291c0251a31bc37256 SHA512 05b6604f17b63442a1eda4673a702eab7bb0ac4af87dce7c9f56085573768aec408aa441873317cf610e379972221f68d49c19f47f7be48b1e6a74809d13c407
-EBUILD postgresql-9.4.18.ebuild 14565 BLAKE2B 954d05aff7332bd53be29cb163b71deae09040a7ce602c28230e5dd4c9a4239e6fbc75245e10c8d4bd842db011e31303e0e924829c71a5cd5bee13ab62b03c47 SHA512 b95abd882026c4d66132d5c0ded7657f8275e22376122410962f70d382d128362480a65d9ae9e2dfa303df94bda884b919b599301395a68fd3b29ae7d71a1efe
EBUILD postgresql-9.4.19.ebuild 14557 BLAKE2B 57446276df8b11ebe12ef5a4b3e95dfc2892cdf93cb1a40117f0e7ae5774e0ba1a4a08b2306d971625636d4f0bddb4d0395bc6671397ef291c0251a31bc37256 SHA512 05b6604f17b63442a1eda4673a702eab7bb0ac4af87dce7c9f56085573768aec408aa441873317cf610e379972221f68d49c19f47f7be48b1e6a74809d13c407
-EBUILD postgresql-9.5.12.ebuild 14785 BLAKE2B bbd02c18eb7e6b6c9bb2f3e4b4010bc1aadc0aaabe158accac75b1f692c8905d565647bac95c46b69003f70ce6608017a877e74e37e915a2827f5a6f35a732a5 SHA512 2ae77b20602445192062ab5930cc518c3524aa8c57c4aaa4923ec15b924f3b166dcd51dca32a19618d3055214bfed7977c4630dd40b6967aaf491f1688aaf717
-EBUILD postgresql-9.5.13.ebuild 14793 BLAKE2B 5dac00696cdcdb3801ed7cfaeee54ec0a728938aecfe590ae82a86c70b3a5e476df6fcb247b0ccfd0b1f08409638caa473449b8600a346c089a70b27c24ce46f SHA512 778a3e5b71f06edbb92b9e46591a775136df671be23c8f4404a037e3757e45382202854d74a32223926f88f315f8af8902d8ff00a404858cedb6546649903338
EBUILD postgresql-9.5.14.ebuild 14785 BLAKE2B bbd02c18eb7e6b6c9bb2f3e4b4010bc1aadc0aaabe158accac75b1f692c8905d565647bac95c46b69003f70ce6608017a877e74e37e915a2827f5a6f35a732a5 SHA512 2ae77b20602445192062ab5930cc518c3524aa8c57c4aaa4923ec15b924f3b166dcd51dca32a19618d3055214bfed7977c4630dd40b6967aaf491f1688aaf717
-EBUILD postgresql-9.6.10.ebuild 14928 BLAKE2B c154e9a876189c63ea506c14232aa198cfe1aaa86aa04eff207147860d3e376186c8f75e0ab62b70f77894ae653072ff62c87a6cfe16458dbd1c1670ee0c4143 SHA512 7f3856dbce22b6f2d6f17e341bf008548ae6797c336892cde34cf5bacc26d1253cb6c240e65d718be64895156a71efd12014d7c4e09d0f5f251f26615b292a01
-EBUILD postgresql-9.6.8.ebuild 14927 BLAKE2B 36ba33cfc700526cd716243a838a9b52a3823feabf53fe7045aca86e54c048a0c1e5c7c4950e33d131e29a96e7f00eebe2a366e46912a942c871b799c5df8a29 SHA512 0e547e8a39b0c96ff4d100d42ba1113aa87f537f14ccd242436270a6972db3c09690a9925d869c0256342e89687421b26e18fd210313dce3b23dd4062c1ad1c6
-EBUILD postgresql-9.6.9.ebuild 14935 BLAKE2B 72aae9d0851e921ebc3f4245cb145966db204ec7f2aa1ac6e7a5da64035d2582b5f9fbf25fa48a3de970c52afb16891f05e3ddbc40b7cb6dba1d423197446541 SHA512 336a96594bc5feb9fee37b8bde109013f48c5ac84d5cf0b17565ebe19e5418bf6069df52ceff87e9a586bef56fbfa186b898d9de64bd9d6633a6ecf510265aa0
+EBUILD postgresql-9.6.10.ebuild 14927 BLAKE2B 36ba33cfc700526cd716243a838a9b52a3823feabf53fe7045aca86e54c048a0c1e5c7c4950e33d131e29a96e7f00eebe2a366e46912a942c871b799c5df8a29 SHA512 0e547e8a39b0c96ff4d100d42ba1113aa87f537f14ccd242436270a6972db3c09690a9925d869c0256342e89687421b26e18fd210313dce3b23dd4062c1ad1c6
EBUILD postgresql-9999.ebuild 14262 BLAKE2B 43b6b2ab7b5137e8a0ca2edf28781d30f7a27afbf01ab718f4742c4ec981071797074f6dcad9995796d30bbd0b1e39d4ee7a63a404e7246a9bafbb5298a12c47 SHA512 29e5bcb9463c6cb8a43e8ba04840aacda074ddbfdcccd1dafcbd66e13d5c20a765c53f637e1c8993fe6647c286f7ef40254f3211f3341054c96bec1f327393fa
MISC metadata.xml 831 BLAKE2B 71ea5c9af98f7176bac835c7f1bfcd0e7e41055e83fccfab9ecc6476b2160040e26aeb857ed889a6a6dffe57f4e7367b944f3fbfda2e905efa0e63360fabfb73 SHA512 1dd852da0db83f6623745f0f320fb8ce93498be27b13c59a352683f2cb25afa3e8d7fca907e73ace2c9ae40e33fbd5ee68a84d803db225a5ff7fc707d435d0bf
diff --git a/dev-db/postgresql/postgresql-10.3.ebuild b/dev-db/postgresql/postgresql-10.3.ebuild
deleted file mode 100644
index 7170883aee52..000000000000
--- a/dev-db/postgresql/postgresql-10.3.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit eutils flag-o-matic 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} )"
-
-wanted_languages() {
- local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
- sk sl sv tr zh_CN zh_TW"
- local enable_langs lingua
-
- for lingua in ${linguas} ; do
- has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
- done
-
- echo -n ${enable_langs}
-}
-
-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 "$(wanted_languages)")"
-}
-
-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}"
- 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.4.ebuild b/dev-db/postgresql/postgresql-10.4.ebuild
deleted file mode 100644
index 50f0472a5668..000000000000
--- a/dev-db/postgresql/postgresql-10.4.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit eutils flag-o-matic 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} )"
-
-wanted_languages() {
- local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
- sk sl sv tr zh_CN zh_TW"
- local enable_langs lingua
-
- for lingua in ${linguas} ; do
- has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
- done
-
- echo -n ${enable_langs}
-}
-
-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 "$(wanted_languages)")"
-}
-
-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}"
- 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_beta2.ebuild b/dev-db/postgresql/postgresql-11_beta2.ebuild
deleted file mode 100644
index 8c9760a046d5..000000000000
--- a/dev-db/postgresql/postgresql-11_beta2.ebuild
+++ /dev/null
@@ -1,449 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{4,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="http://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() {
- # 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 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}"
- 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_beta1.ebuild b/dev-db/postgresql/postgresql-11_beta4.ebuild
index 8c9760a046d5..27adb918d12f 100644
--- a/dev-db/postgresql/postgresql-11_beta1.ebuild
+++ b/dev-db/postgresql/postgresql-11_beta4.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 ~ppc-macos ~x86-solaris"
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
SLOT=$(get_major_version)
@@ -24,7 +24,7 @@ LICENSE="POSTGRESQL GPL-2"
DESCRIPTION="PostgreSQL RDBMS"
HOMEPAGE="http://www.postgresql.org/"
-IUSE="doc kerberos kernel_linux ldap libressl nls pam perl python +readline
+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} )"
@@ -35,6 +35,8 @@ 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} )
@@ -152,6 +154,7 @@ src_configure() {
$(use_enable threads thread-safety) \
$(use_with kerberos gssapi) \
$(use_with ldap) \
+ $(use_with llvm) \
$(use_with pam) \
$(use_with perl) \
$(use_with python) \
diff --git a/dev-db/postgresql/postgresql-9.3.22.ebuild b/dev-db/postgresql/postgresql-9.3.22.ebuild
deleted file mode 100644
index e1ed1641a5fc..000000000000
--- a/dev-db/postgresql/postgresql-9.3.22.ebuild
+++ /dev/null
@@ -1,450 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~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} )"
-
-wanted_languages() {
- local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
- sk sl sv tr zh_CN zh_TW"
- local enable_langs lingua
-
- for lingua in ${linguas} ; do
- has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
- done
-
- echo -n ${enable_langs}
-}
-
-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 "$(wanted_languages)")"
-}
-
-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.3.23.ebuild b/dev-db/postgresql/postgresql-9.3.23.ebuild
deleted file mode 100644
index b102a6c5fabb..000000000000
--- a/dev-db/postgresql/postgresql-9.3.23.ebuild
+++ /dev/null
@@ -1,450 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~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} )"
-
-wanted_languages() {
- local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
- sk sl sv tr zh_CN zh_TW"
- local enable_langs lingua
-
- for lingua in ${linguas} ; do
- has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
- done
-
- echo -n ${enable_langs}
-}
-
-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 "$(wanted_languages)")"
-}
-
-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.17.ebuild b/dev-db/postgresql/postgresql-9.4.17.ebuild
deleted file mode 100644
index 6e9dd5d11fe6..000000000000
--- a/dev-db/postgresql/postgresql-9.4.17.ebuild
+++ /dev/null
@@ -1,482 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~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} )"
-
-wanted_languages() {
- local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
- sk sl sv tr zh_CN zh_TW"
- local enable_langs lingua
-
- for lingua in ${linguas} ; do
- has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
- done
-
- echo -n ${enable_langs}
-}
-
-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 "$(wanted_languages)")"
-}
-
-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.18.ebuild b/dev-db/postgresql/postgresql-9.4.18.ebuild
deleted file mode 100644
index 7243cdb0dd49..000000000000
--- a/dev-db/postgresql/postgresql-9.4.18.ebuild
+++ /dev/null
@@ -1,482 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \
- systemd user versionator
-
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~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} )"
-
-wanted_languages() {
- local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
- sk sl sv tr zh_CN zh_TW"
- local enable_langs lingua
-
- for lingua in ${linguas} ; do
- has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
- done
-
- echo -n ${enable_langs}
-}
-
-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 "$(wanted_languages)")"
-}
-
-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.12.ebuild b/dev-db/postgresql/postgresql-9.5.12.ebuild
deleted file mode 100644
index 003f5398f4ef..000000000000
--- a/dev-db/postgresql/postgresql-9.5.12.ebuild
+++ /dev/null
@@ -1,488 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit eutils flag-o-matic 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} )"
-
-wanted_languages() {
- local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
- sk sl sv tr zh_CN zh_TW"
- local enable_langs lingua
-
- for lingua in ${linguas} ; do
- has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
- done
-
- echo -n ${enable_langs}
-}
-
-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 "$(wanted_languages)")"
-}
-
-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.13.ebuild b/dev-db/postgresql/postgresql-9.5.13.ebuild
deleted file mode 100644
index fd41b7ff3302..000000000000
--- a/dev-db/postgresql/postgresql-9.5.13.ebuild
+++ /dev/null
@@ -1,488 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit eutils flag-o-matic 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} )"
-
-wanted_languages() {
- local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
- sk sl sv tr zh_CN zh_TW"
- local enable_langs lingua
-
- for lingua in ${linguas} ; do
- has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
- done
-
- echo -n ${enable_langs}
-}
-
-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 "$(wanted_languages)")"
-}
-
-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.10.ebuild b/dev-db/postgresql/postgresql-9.6.10.ebuild
index 69933976ed1b..c5669d4179fc 100644
--- a/dev-db/postgresql/postgresql-9.6.10.ebuild
+++ b/dev-db/postgresql/postgresql-9.6.10.ebuild
@@ -8,7 +8,7 @@ PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
inherit eutils flag-o-matic 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"
+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)"
diff --git a/dev-db/postgresql/postgresql-9.6.8.ebuild b/dev-db/postgresql/postgresql-9.6.8.ebuild
deleted file mode 100644
index c5669d4179fc..000000000000
--- a/dev-db/postgresql/postgresql-9.6.8.ebuild
+++ /dev/null
@@ -1,493 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit eutils flag-o-matic 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)"
-
-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} )"
-
-wanted_languages() {
- local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
- sk sl sv tr zh_CN zh_TW"
- local enable_langs lingua
-
- for lingua in ${linguas} ; do
- has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
- done
-
- echo -n ${enable_langs}
-}
-
-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 "$(wanted_languages)")"
-}
-
-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.9.ebuild b/dev-db/postgresql/postgresql-9.6.9.ebuild
deleted file mode 100644
index 1297819d3de9..000000000000
--- a/dev-db/postgresql/postgresql-9.6.9.ebuild
+++ /dev/null
@@ -1,493 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit eutils flag-o-matic 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)"
-
-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} )"
-
-wanted_languages() {
- local linguas="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru
- sk sl sv tr zh_CN zh_TW"
- local enable_langs lingua
-
- for lingua in ${linguas} ; do
- has ${lingua} ${LINGUAS-${lingua}} && enable_langs+="${lingua} "
- done
-
- echo -n ${enable_langs}
-}
-
-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 "$(wanted_languages)")"
-}
-
-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/unixODBC/Manifest b/dev-db/unixODBC/Manifest
index 8cb24cdf6325..8d362fda3886 100644
--- a/dev-db/unixODBC/Manifest
+++ b/dev-db/unixODBC/Manifest
@@ -1,6 +1,8 @@
AUX unixODBC-2.3.5-CVE-2018-7485.patch 5224 BLAKE2B a21d659f75f9ae11a6d78a4a74b0591786800e14f22d7fb4c7ef5005e0630b95453a319d9254bf3f5e423e74ae36c6a7bd097f3193869757b2bea34f8974e358 SHA512 a4d5dfafe75ea0e85feed76cf18474a89fcf6719ee58d0b56d57959526db2511df2df691bf9af2e1a34c716d2d90f6d274b48a11cfb7add74df799d1f1f67387
DIST unixODBC-2.3.5.tar.gz 1633390 BLAKE2B f7c70740471b0c6ff298f2377a3895efbf160764adc4f607dfb65de2873ea3a39a2852399feaca50fc389875e20a10b3cd0389ba9e9f02d0548312d8063f5af5 SHA512 94b5ebb887571f4fa801ae4305cd6cb4eb0d03682fac1eb0422cdd13b046b077e60bff8286c578b0b5e291cfbc0bc8695495e39c3713858d2eeb7b38459397d5
DIST unixODBC-2.3.6.tar.gz 1661914 BLAKE2B 75162344e2b2713ae056dae0a2c1be31994ef350b4aa3ee7ae924b17527f35e0b7c9bb5a23763ab71553ef67a025d2a6549e564507b95991d6a193e165f1e774 SHA512 6518a4169946e847dd710d54724a44d268b98954d30064eadadb703edbbeafac05bd1f42a6845c2fdcdab7ae8987800acd1a5f6b4b96de5f3c8c3e4bc370fe30
+DIST unixODBC-2.3.7.tar.gz 1669501 BLAKE2B 0e6b2130b72ccfed3a26877ff1c8af9adc7cc514002d3198d5249a12da5de03322178bf0847b92336b5a373893751bf3cb5aec4c251163a3c9f0ef98c90e5db8 SHA512 a87afeaaa0476f4ae6345c7021b3af52718944e599abb595c864d9126744a21341889802512a1de3ebaf86ac89e7f8b1bbd7f8f5285e8f4bccf928bd1585ff70
EBUILD unixODBC-2.3.5-r1.ebuild 1821 BLAKE2B 36ffb4ef10060b6f17a1e277b64ad9e44cb31f007886f5501168c7433986c8380c20a877105a7ded42d3df1085645432c054e37d6df593eefadde47df659e048 SHA512 a69a33a4e7333b69cf10e615c67ce26de192f92eb7a2af6e2a144bdeba8759e898bde1760f571bc3271fc5c284dc3c4e408ab8c384e692e5d474437428f519ff
EBUILD unixODBC-2.3.6.ebuild 1785 BLAKE2B aa3ba92f38344e7a48517ecc302ea184dd9eb67831c19c34825266f7f75c71eec9c49b681d5278d72807a210d748764d260044f54f5e2ecea965729dfd387be2 SHA512 e4fd0ecdd6c81b331e4ff4f6a8e9aafb483712c8dab16c2334a04b29764eb500764c258969636696594db40af820b0421f91388c3627c7d7108e8a15169b6a3f
+EBUILD unixODBC-2.3.7.ebuild 1780 BLAKE2B f5e3a3787c26ccd8af85eaa5f3aafa739c483eb391b56691e5a0d74f5678368b44808ae3ad49dcfc61e30b3a92655f8ad99f52df98737c235a2e131609bcef0c SHA512 65d9c9d6dc84bdbc431c14d8e4549aa6e4ad2cdb872205b25de759e3f63f55ad82a89e99e638931e31ed0e7f050c96720304b7f5e61cdf9a487a971773fc74db
MISC metadata.xml 366 BLAKE2B 9832224237ae18987939d9c0f657c6666114a5ce41af09a3a5a423d666ec70d9c5cd4fec1d82134b68e2e96b1a3e390977a0cd95001d325465d75b2b9b311d64 SHA512 e47157f178b585272b5c11682cef0c7b7dec227ded178d3427e91632f754db869deb72a6c1b258dfc90f6760028d3045d1e703874ae24111f8deb9db629b8c29
diff --git a/dev-db/unixODBC/unixODBC-2.3.7.ebuild b/dev-db/unixODBC/unixODBC-2.3.7.ebuild
new file mode 100644
index 000000000000..9d67a0e25527
--- /dev/null
+++ b/dev-db/unixODBC/unixODBC-2.3.7.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit libtool multilib-minimal
+
+DESCRIPTION="A complete ODBC driver manager"
+HOMEPAGE="http://www.unixodbc.org/"
+SRC_URI="ftp://ftp.unixodbc.org/pub/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+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"
+IUSE="+minimal odbcmanual static-libs unicode"
+
+RDEPEND="
+ || (
+ dev-libs/libltdl:0[${MULTILIB_USEDEP}]
+ >=sys-devel/libtool-2.4.2-r1[${MULTILIB_USEDEP}]
+ )
+ >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}]
+ >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+"
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config )
+MULTILIB_WRAPPED_HEADERS=( /usr/include/unixodbc_conf.h )
+
+multilib_src_configure() {
+ # --enable-driver-conf is --enable-driverc as per configure.in
+ myeconfargs=(
+ --sysconfdir="${EPREFIX}"/etc/${PN}
+ --disable-static
+ --enable-iconv
+ --enable-shared
+ $(use_enable static-libs static)
+ $(use_enable !minimal drivers)
+ $(use_enable !minimal driverc)
+ $(use_with unicode iconv-char-enc UTF8)
+ $(use_with unicode iconv-ucode-enc UTF16LE)
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use odbcmanual ; then
+ # We could simply run "make install-html" if we'd not had
+ # out-of-source builds here.
+ docinto html
+ dodoc -r doc/.
+ find "${ED}/usr/share/doc/${PF}/html" -name "Makefile*" -delete || die
+ fi
+
+ use prefix && dodoc README*
+ find "${ED}" -name '*.la' -delete || die
+}