summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/Manifest.gzbin17440 -> 17453 bytes
-rw-r--r--dev-db/citus/Manifest22
-rw-r--r--dev-db/citus/citus-10.0.3.ebuild31
-rw-r--r--dev-db/citus/citus-10.0.4.ebuild31
-rw-r--r--dev-db/citus/citus-10.1.3.ebuild (renamed from dev-db/citus/citus-10.1.0.ebuild)0
-rw-r--r--dev-db/citus/citus-10.2.0.ebuild (renamed from dev-db/citus/citus-10.1.2.ebuild)0
-rw-r--r--dev-db/citus/citus-9.5.4.ebuild31
-rw-r--r--dev-db/citus/citus-9.5.6.ebuild31
-rw-r--r--dev-db/citus/citus-9.5.7.ebuild31
-rw-r--r--dev-db/citus/citus-9.5.8.ebuild (renamed from dev-db/citus/citus-10.0.2.ebuild)0
-rw-r--r--dev-db/mongodb/Manifest3
-rw-r--r--dev-db/mongodb/files/mongodb-4.2.10-no-compass.patch54
-rw-r--r--dev-db/mongodb/mongodb-4.2.11-r1.ebuild174
-rw-r--r--dev-db/mycli/Manifest4
-rw-r--r--dev-db/mycli/mycli-1.24.1.ebuild24
-rw-r--r--dev-db/mycli/mycli-9999.ebuild27
-rw-r--r--dev-db/mysql-connector-c++/Manifest11
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.19-fix-build.patch307
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.19.ebuild43
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.20.ebuild43
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.21.ebuild43
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.22.ebuild43
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.23.ebuild43
-rw-r--r--dev-db/mysql-workbench/Manifest4
-rw-r--r--dev-db/mysql-workbench/files/mysql-workbench-8.0.23-findlibssh.patch11
-rw-r--r--dev-db/mysql-workbench/mysql-workbench-8.0.23-r1.ebuild112
-rw-r--r--dev-db/mysql/Manifest23
-rw-r--r--dev-db/mysql/metadata.xml1
-rw-r--r--dev-db/mysql/mysql-5.7.27-r2.ebuild995
-rw-r--r--dev-db/mysql/mysql-5.7.29-r1.ebuild986
-rw-r--r--dev-db/mysql/mysql-5.7.30-r1.ebuild977
-rw-r--r--dev-db/mysql/mysql-5.7.31.ebuild1227
-rw-r--r--dev-db/mysql/mysql-8.0.19-r2.ebuild1160
-rw-r--r--dev-db/mysql/mysql-8.0.20-r1.ebuild1143
-rw-r--r--dev-db/mysql/mysql-8.0.21-r1.ebuild1166
-rw-r--r--dev-db/pgcli/Manifest2
-rw-r--r--dev-db/pgcli/pgcli-3.1.0.ebuild1
-rw-r--r--dev-db/postgresql/Manifest3
-rw-r--r--dev-db/postgresql/files/postgresql-14_rc1-no-server.patch151
-rw-r--r--dev-db/postgresql/postgresql-14_rc1.ebuild467
-rw-r--r--dev-db/qdbm/Manifest2
-rw-r--r--dev-db/qdbm/qdbm-1.8.78-r3.ebuild2
42 files changed, 664 insertions, 8765 deletions
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz
index eece09d4a956..c9c35c18fe97 100644
--- a/dev-db/Manifest.gz
+++ b/dev-db/Manifest.gz
Binary files differ
diff --git a/dev-db/citus/Manifest b/dev-db/citus/Manifest
index 3a6820ec6f94..ae8e341b6e19 100644
--- a/dev-db/citus/Manifest
+++ b/dev-db/citus/Manifest
@@ -1,19 +1,9 @@
-DIST citus-10.0.2.tar.gz 5154816 BLAKE2B ace68ec3dcce3e2e9d872b85a864a49f026ba2c0c8b0919bb057b60921094a922f6fed8bc6482b3c31dad396550348d51a514aff0d877d851b871bb5b97773f3 SHA512 3f831c1efd1a54b9dee587f64eae2466691f8d8316643e459d00219c8ca710ea9d12aeac4f0e2e01cadc3dee29f2d8e59f9757d794e9b0bedfbe6ae107815957
-DIST citus-10.0.3.tar.gz 5165390 BLAKE2B ac9bca488cc5546d56f2b5dd2a14733a776fe8da6900650f0a41b0ee223af6b4ea56152e5351346c43de2c96d13b099cf8054692d038a2e8e73d7fc1ba423649 SHA512 1144642e460babca6919d1ddc1f00bfaaba5abc0b24869627fb230781d158f54d34e7c3039a65d79c46682a0e1732bebde3f16b25670a249753afdd7fb81de52
-DIST citus-10.0.4.tar.gz 5176434 BLAKE2B d77acf228b3effcdd47a300d74ce813632ad08d746b2b05cbad42accc9806b0e1d7c190a442a7d09bc1970fa1d1ee731e0125f83ec227fc72f8509e66dc43975 SHA512 73fae991c9176e14b92f2309856b2aa22ad34056573f21a918b82b05dbdc584a2874fbe9cc1b161e0a0c743d06aba8fc6079f81e07aeaebe15771d83f6f2e3ef
DIST citus-10.0.5.tar.gz 5182513 BLAKE2B 84bd1d2d8a33ecb58371625bfe9936985b3e84237f5580b5d217ee7807a541b7d94c09ad1be75204582149a2be0f3b54fa69ba73c089a33c7d416c796259423e SHA512 38414bd53952b3fcda222a3edeb7c0d32c9fe360fd6cfdefbe2c597df0dc527cf32471b5a9eac68be670858f3c3ee0a5691b778e2821c129838d1f17bc7a539b
-DIST citus-10.1.0.tar.gz 5273973 BLAKE2B b9b17d29e1e213d99779e738a6333beaa0f817872194b345c719663971251ba1430feb7e5508923fe7ecc7df763b9c3a7a43e03d869e5cac6b64cac2370750d6 SHA512 7f3bf01e08a2f8087b570a9b54224878cbbeacaa19115f3dd3e4f45a517af59e920d6a1fc490f86c9d0148de118d2b1f6cab65a5df2b3729793ec70d85a4ba22
-DIST citus-10.1.2.tar.gz 5280795 BLAKE2B db67da8c860297b1f0a9cf61c4c1d60fe6675405a8f8cbfacd82ab3a4353273e4d8ea1ba671efbfc33be4f97c6b61e9f13659dbd608bf81377645bebfd999717 SHA512 9ae89944e11429203dc82a7db7733fcbc54d2396fcc3a364ea39923cb3e506730e92cd2c492aece4c03914587df4a3d39d9bc7ce253ef91576dd18c623cb45e7
-DIST citus-9.5.4.tar.gz 4718209 BLAKE2B 706726c8ca6ffb38321e3b91395924e9b778c106096393992080f511338a7ae559f94336bb015508900f85290bd17cda8ef9ce6dbdc2e254f3daf7a09e243bf6 SHA512 3d5e956354e094811675b646a5baf75c26a3ac593c56ac5b6c4c711671002f78fb98a1a4879c4cc967fc4381ae971311f5d73ddadc78a39b66c3108978d677b6
-DIST citus-9.5.6.tar.gz 4723294 BLAKE2B f3e714c754e6f855322ded2f8e73b29e1d8b1d0bf81a68aa69a3b3ddb09a79aa1c088032fb294fb38b86b75bfd6211d0b1f8586252c53336df40dd94a0e3be1f SHA512 b711885e03424c0302c732a654c1b27fd088efc447a4481aeef124684e6c4fd01d2f535d1ebb8cd645df020895228a6450aaed9e00bf2666ab718c96c62c5423
-DIST citus-9.5.7.tar.gz 4735867 BLAKE2B a9e6f960376a88a20a2a1e02cc28a1ddafa331b4bee4b22ef7a8c6b074a6d3707a02ec7afa86465790034f9db44482d443b8ea6777a2113bf631e793a445910d SHA512 372d2db8da83efedb2c81ff85b857e0846419f732f626fb0806ff1b53177a3f4621f1030ec7d63098999dc223d8c7fbcb1ad408734322f2102674df9723dd5c4
-EBUILD citus-10.0.2.ebuild 576 BLAKE2B abd2e1f362db53d55bbbfc8bef3e1d3d26fea6234685f353e72df5ea8584118015966f6a11f238ca8b0db91f1eb916e0a9f00a082358058bbf2fcbe338f8b99d SHA512 c2bf7eea0716ead448f7b9a3b8c3301492b6afcc59dd8f0101c9400423d9fea2de8aa4ec90452385486ce47ceb7955f7f93fb03cdb24a8094eb46110b374f1ea
-EBUILD citus-10.0.3.ebuild 576 BLAKE2B abd2e1f362db53d55bbbfc8bef3e1d3d26fea6234685f353e72df5ea8584118015966f6a11f238ca8b0db91f1eb916e0a9f00a082358058bbf2fcbe338f8b99d SHA512 c2bf7eea0716ead448f7b9a3b8c3301492b6afcc59dd8f0101c9400423d9fea2de8aa4ec90452385486ce47ceb7955f7f93fb03cdb24a8094eb46110b374f1ea
-EBUILD citus-10.0.4.ebuild 576 BLAKE2B abd2e1f362db53d55bbbfc8bef3e1d3d26fea6234685f353e72df5ea8584118015966f6a11f238ca8b0db91f1eb916e0a9f00a082358058bbf2fcbe338f8b99d SHA512 c2bf7eea0716ead448f7b9a3b8c3301492b6afcc59dd8f0101c9400423d9fea2de8aa4ec90452385486ce47ceb7955f7f93fb03cdb24a8094eb46110b374f1ea
+DIST citus-10.1.3.tar.gz 5281581 BLAKE2B cf119c550174a8b64bfee6497288a10030db7ff8d40e48d4751799d4268618afe9b7dcd72bfbd5b01dc073f6f4af55e8dc338071e3be224d15ded423885bbebd SHA512 2ad9665c5de3214a5ebc08d5df663caa634912dd9db433a43bea96d3932213786d1650a695531a4d00ab8dff7d53078848466d7a6e803bff3ab26f4df3990c91
+DIST citus-10.2.0.tar.gz 5496211 BLAKE2B 9b6f3aeb19e8f4391b6ca24615a6eab405a57bf673995d79c2ea563dec67c63ffb5d17d4f8a1f245497f15de2fb572d0ecccc4a5195e797bd2a799800dcc553a SHA512 fb816bc0f252f6a63c76923366c9a25b9004288c09c7a6de7911a2c0325e47b1772b7a59cdb39e034d406ce99db53ced8e68c658bf16e92c2c99eb7331537ea7
+DIST citus-9.5.8.tar.gz 4737096 BLAKE2B aa2e272f635699e16ebb5df2f981c1250009c721198456228a90837a8a37c6e5325dfea8f51f39bd3aafe8be0b6335cbac36443bc3193b796c9be6fe34a91a41 SHA512 5fbde79f995a1e66adb9339fecae03c62763b725e7aeafe4d57e10355cfe6bfca0724e38f2e6c34ce4eb762d94566f23ea1e78692eff602623ededc8a91b7949
EBUILD citus-10.0.5.ebuild 576 BLAKE2B abd2e1f362db53d55bbbfc8bef3e1d3d26fea6234685f353e72df5ea8584118015966f6a11f238ca8b0db91f1eb916e0a9f00a082358058bbf2fcbe338f8b99d SHA512 c2bf7eea0716ead448f7b9a3b8c3301492b6afcc59dd8f0101c9400423d9fea2de8aa4ec90452385486ce47ceb7955f7f93fb03cdb24a8094eb46110b374f1ea
-EBUILD citus-10.1.0.ebuild 573 BLAKE2B a5572761f51a81157e42dc6d860cd0a8b91857102aa027b0e23d9aaff092798ebc3efa4fa560b5e52b3e7ddb37be79c7bb26c181e6f87c544862e47583bca25e SHA512 dede570d1b403a461bd9ded53857dcec565c52d11b1475074e40e0ad2ab74fe34bad726857025087152aaf7be7e53f00f89b068a51ca1f9dd58e6447a5d809fd
-EBUILD citus-10.1.2.ebuild 573 BLAKE2B a5572761f51a81157e42dc6d860cd0a8b91857102aa027b0e23d9aaff092798ebc3efa4fa560b5e52b3e7ddb37be79c7bb26c181e6f87c544862e47583bca25e SHA512 dede570d1b403a461bd9ded53857dcec565c52d11b1475074e40e0ad2ab74fe34bad726857025087152aaf7be7e53f00f89b068a51ca1f9dd58e6447a5d809fd
-EBUILD citus-9.5.4.ebuild 576 BLAKE2B abd2e1f362db53d55bbbfc8bef3e1d3d26fea6234685f353e72df5ea8584118015966f6a11f238ca8b0db91f1eb916e0a9f00a082358058bbf2fcbe338f8b99d SHA512 c2bf7eea0716ead448f7b9a3b8c3301492b6afcc59dd8f0101c9400423d9fea2de8aa4ec90452385486ce47ceb7955f7f93fb03cdb24a8094eb46110b374f1ea
-EBUILD citus-9.5.6.ebuild 576 BLAKE2B abd2e1f362db53d55bbbfc8bef3e1d3d26fea6234685f353e72df5ea8584118015966f6a11f238ca8b0db91f1eb916e0a9f00a082358058bbf2fcbe338f8b99d SHA512 c2bf7eea0716ead448f7b9a3b8c3301492b6afcc59dd8f0101c9400423d9fea2de8aa4ec90452385486ce47ceb7955f7f93fb03cdb24a8094eb46110b374f1ea
-EBUILD citus-9.5.7.ebuild 576 BLAKE2B abd2e1f362db53d55bbbfc8bef3e1d3d26fea6234685f353e72df5ea8584118015966f6a11f238ca8b0db91f1eb916e0a9f00a082358058bbf2fcbe338f8b99d SHA512 c2bf7eea0716ead448f7b9a3b8c3301492b6afcc59dd8f0101c9400423d9fea2de8aa4ec90452385486ce47ceb7955f7f93fb03cdb24a8094eb46110b374f1ea
+EBUILD citus-10.1.3.ebuild 573 BLAKE2B a5572761f51a81157e42dc6d860cd0a8b91857102aa027b0e23d9aaff092798ebc3efa4fa560b5e52b3e7ddb37be79c7bb26c181e6f87c544862e47583bca25e SHA512 dede570d1b403a461bd9ded53857dcec565c52d11b1475074e40e0ad2ab74fe34bad726857025087152aaf7be7e53f00f89b068a51ca1f9dd58e6447a5d809fd
+EBUILD citus-10.2.0.ebuild 573 BLAKE2B a5572761f51a81157e42dc6d860cd0a8b91857102aa027b0e23d9aaff092798ebc3efa4fa560b5e52b3e7ddb37be79c7bb26c181e6f87c544862e47583bca25e SHA512 dede570d1b403a461bd9ded53857dcec565c52d11b1475074e40e0ad2ab74fe34bad726857025087152aaf7be7e53f00f89b068a51ca1f9dd58e6447a5d809fd
+EBUILD citus-9.5.8.ebuild 576 BLAKE2B abd2e1f362db53d55bbbfc8bef3e1d3d26fea6234685f353e72df5ea8584118015966f6a11f238ca8b0db91f1eb916e0a9f00a082358058bbf2fcbe338f8b99d SHA512 c2bf7eea0716ead448f7b9a3b8c3301492b6afcc59dd8f0101c9400423d9fea2de8aa4ec90452385486ce47ceb7955f7f93fb03cdb24a8094eb46110b374f1ea
MISC metadata.xml 281 BLAKE2B 85a0d31b886497ac44662bb58420de2f6af5444882f008f902287c6a8265f6e76afa7513b0edeca5b34a26d69d9aa61832c5fb3287c577a7f047180aa3fb242e SHA512 9e9007a37a7acc9948a6eb15bd1bdfea46c95eacc88e96a878237baaf01298b1f849d6e170f04638bbfb68f2c8b8a3bf227e563b5309f859cfcd23d43bc5dd85
diff --git a/dev-db/citus/citus-10.0.3.ebuild b/dev-db/citus/citus-10.0.3.ebuild
deleted file mode 100644
index 4bb39ab5f008..000000000000
--- a/dev-db/citus/citus-10.0.3.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-POSTGRES_COMPAT=( 11 12 13 )
-
-inherit postgres-multi
-
-DESCRIPTION="Open-source postgresql extension for clustering/multi-node setups"
-HOMEPAGE="https://www.citusdata.com/"
-SRC_URI="https://github.com/citusdata/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-IUSE=""
-LICENSE="POSTGRESQL AGPL-3"
-
-KEYWORDS="~amd64"
-
-SLOT=0
-
-RESTRICT="test"
-
-DEPEND="${POSTGRES_DEP}
- app-arch/lz4
- app-arch/zstd
- "
-RDEPEND="${DEPEND}"
-
-src_configure() {
- postgres-multi_foreach econf
-}
diff --git a/dev-db/citus/citus-10.0.4.ebuild b/dev-db/citus/citus-10.0.4.ebuild
deleted file mode 100644
index 4bb39ab5f008..000000000000
--- a/dev-db/citus/citus-10.0.4.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-POSTGRES_COMPAT=( 11 12 13 )
-
-inherit postgres-multi
-
-DESCRIPTION="Open-source postgresql extension for clustering/multi-node setups"
-HOMEPAGE="https://www.citusdata.com/"
-SRC_URI="https://github.com/citusdata/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-IUSE=""
-LICENSE="POSTGRESQL AGPL-3"
-
-KEYWORDS="~amd64"
-
-SLOT=0
-
-RESTRICT="test"
-
-DEPEND="${POSTGRES_DEP}
- app-arch/lz4
- app-arch/zstd
- "
-RDEPEND="${DEPEND}"
-
-src_configure() {
- postgres-multi_foreach econf
-}
diff --git a/dev-db/citus/citus-10.1.0.ebuild b/dev-db/citus/citus-10.1.3.ebuild
index 7c1f0e8ac75c..7c1f0e8ac75c 100644
--- a/dev-db/citus/citus-10.1.0.ebuild
+++ b/dev-db/citus/citus-10.1.3.ebuild
diff --git a/dev-db/citus/citus-10.1.2.ebuild b/dev-db/citus/citus-10.2.0.ebuild
index 7c1f0e8ac75c..7c1f0e8ac75c 100644
--- a/dev-db/citus/citus-10.1.2.ebuild
+++ b/dev-db/citus/citus-10.2.0.ebuild
diff --git a/dev-db/citus/citus-9.5.4.ebuild b/dev-db/citus/citus-9.5.4.ebuild
deleted file mode 100644
index 4bb39ab5f008..000000000000
--- a/dev-db/citus/citus-9.5.4.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-POSTGRES_COMPAT=( 11 12 13 )
-
-inherit postgres-multi
-
-DESCRIPTION="Open-source postgresql extension for clustering/multi-node setups"
-HOMEPAGE="https://www.citusdata.com/"
-SRC_URI="https://github.com/citusdata/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-IUSE=""
-LICENSE="POSTGRESQL AGPL-3"
-
-KEYWORDS="~amd64"
-
-SLOT=0
-
-RESTRICT="test"
-
-DEPEND="${POSTGRES_DEP}
- app-arch/lz4
- app-arch/zstd
- "
-RDEPEND="${DEPEND}"
-
-src_configure() {
- postgres-multi_foreach econf
-}
diff --git a/dev-db/citus/citus-9.5.6.ebuild b/dev-db/citus/citus-9.5.6.ebuild
deleted file mode 100644
index 4bb39ab5f008..000000000000
--- a/dev-db/citus/citus-9.5.6.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-POSTGRES_COMPAT=( 11 12 13 )
-
-inherit postgres-multi
-
-DESCRIPTION="Open-source postgresql extension for clustering/multi-node setups"
-HOMEPAGE="https://www.citusdata.com/"
-SRC_URI="https://github.com/citusdata/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-IUSE=""
-LICENSE="POSTGRESQL AGPL-3"
-
-KEYWORDS="~amd64"
-
-SLOT=0
-
-RESTRICT="test"
-
-DEPEND="${POSTGRES_DEP}
- app-arch/lz4
- app-arch/zstd
- "
-RDEPEND="${DEPEND}"
-
-src_configure() {
- postgres-multi_foreach econf
-}
diff --git a/dev-db/citus/citus-9.5.7.ebuild b/dev-db/citus/citus-9.5.7.ebuild
deleted file mode 100644
index 4bb39ab5f008..000000000000
--- a/dev-db/citus/citus-9.5.7.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-POSTGRES_COMPAT=( 11 12 13 )
-
-inherit postgres-multi
-
-DESCRIPTION="Open-source postgresql extension for clustering/multi-node setups"
-HOMEPAGE="https://www.citusdata.com/"
-SRC_URI="https://github.com/citusdata/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-IUSE=""
-LICENSE="POSTGRESQL AGPL-3"
-
-KEYWORDS="~amd64"
-
-SLOT=0
-
-RESTRICT="test"
-
-DEPEND="${POSTGRES_DEP}
- app-arch/lz4
- app-arch/zstd
- "
-RDEPEND="${DEPEND}"
-
-src_configure() {
- postgres-multi_foreach econf
-}
diff --git a/dev-db/citus/citus-10.0.2.ebuild b/dev-db/citus/citus-9.5.8.ebuild
index 4bb39ab5f008..4bb39ab5f008 100644
--- a/dev-db/citus/citus-10.0.2.ebuild
+++ b/dev-db/citus/citus-9.5.8.ebuild
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
index c5cc75833155..b1c83be69ee0 100644
--- a/dev-db/mongodb/Manifest
+++ b/dev-db/mongodb/Manifest
@@ -1,5 +1,4 @@
AUX mongodb-4.2.0-fix-scons.patch 1174 BLAKE2B 748de9efdb743c836ccb26239d4b3e73632f19846e2c765e5a9fb6fa6c0bcfaf6cc31a63ba0ce54edf5c8a9d0923efd31ddf81fbc7196386d827f59a50b0b352 SHA512 6f971e8b4140068402b5e8cc738fbff1b54645f97e2f463fec37b124c7b93b8302fae25f9ea1f7f3261c93270e662e4cd876db3f092111e3bde0fcbc3eea33c4
-AUX mongodb-4.2.10-no-compass.patch 2151 BLAKE2B 724bf4e50c608f2336fcf587c78e68c713fb9b1469c5cf1203f1b155961daa16612ca13fd1fdc10326ebb587c7f339333f92f76d7c770fc043125cc1f931a594 SHA512 a13bea0614dfeb4fe2d81ad0448ecf2364ddd79a9d025f011fbd39c6da5a654e616424f91f7f88c32b00c780d9bc88c497f573b3f1b9a04849c67c4671a26c8d
AUX mongodb-4.2.15-no-compass.patch 1714 BLAKE2B a0d6941a903c2c0f6e5a950a3b66b4601384e9a58057d2b226177097b0be18d16a4ec568d801217ef5b59729807e3ee02321546f83d633ce33a9a0ff89c1f76b SHA512 db11af020a110c34da6f47d6918cf34a7910ee2aaf38feedc2ac262fa50e0ada95a8b4a9d481fd2a1b503f1d99085c5e8a5a3e42f6c8d3f0a6c40a97052525a7
AUX mongodb-4.4.1-boost.patch 761 BLAKE2B 45295d05d23a8c2d72e333b14f06c40d32ff6c0610a244f71303fabf0bf0851d3a8a8c3df9f72aa7363a48a0b44bae45d81422970398f8b4f9753bab3dcf793a SHA512 504ec9a4e41f5e1c1a069d64e0958b260a3a8506d17638e62ddf6f1cd873b835f33a588b779e4851d63351faef4be1e0f4720e86f389128d062909b58fdb9aa2
AUX mongodb-4.4.1-fix-scons.patch 1192 BLAKE2B 3fbb203ca07e1057cb53d1404eb118120990aad339143b5a5fa1e28b528d54dab4be201b82ebd483697485cc90f874db55323f1ae65a6a348f93004dfb23984f SHA512 b26f4d02ee22718278718b8baf20bd57cee7290fe2313a11c629234f29018effdeb1614bd01a98ff5cb62b6a0242acf3f553ea57277327c0d25092c4d80469cc
@@ -20,13 +19,11 @@ AUX mongodb.service 220 BLAKE2B ea55bb2f08066d7399e9e66f981f86395f6a177faa198c66
AUX mongos.conf-r2 648 BLAKE2B 420bebfafc1ef4af4b90580077a803fe30f37d63eca6509e7381ca5fcf4e5bc31e136dfc72b653b4d942fdeda058f9fcecc3dcbec9c61e2c82ac3324b9fc0f44 SHA512 5aa8ced8d83572358e008c0df45dbe72a2e9c0003c9f49514d6b91bf9b75d4fb48b189ffe00d14e5675679943a05215a9873c5c9bde9ab1be4ed4813e75714e3
AUX mongos.confd-r3 470 BLAKE2B 9cf6f201d337430901d957a5a0811ff11ac2e81814aac2120c5018e6ec4c38b5ca22d19caea593834416c63609c69a8294227fb6b30200b41dfb29799cc5c1b4 SHA512 952fb9cf5d3eeea2006b101e23142e408c98d66d1f4f868f6ea5a4df6a6331ddcbcbdfb24f4b031c1a8c42652141a3684073b96dfc0b3fbd21dc6b5bcf0e36cb
AUX mongos.initd-r3 422 BLAKE2B 90872d0d8cdc5e33e3eebee848f58a2db0511d48b496ba9318117b74ad9265ead53a21b7d1790729a62d61839099bee315ace8ff3646c01e096a943c2251bf88 SHA512 bf5897614d59c6b4e72529b126408a62ea37d9e9368e5ff69c8fcf2bad3ec09065cff09467f82117a892c51090018706d2f38c03cb9a974a61a49bd9efa0f144
-DIST mongodb-src-r4.2.11.tar.gz 61829417 BLAKE2B cc989d6ea87a48b7402d119dda4678a966cf96cec0da5d00d792faf06ecb6fbe4bc426069e1a72548410adcbd26162038ec7201e76036ac599af5f53029c0e66 SHA512 ff398a9d3a012e0eb860c2139967e163b8b0ac045c1c47f2c0c5584ba7c60a1403bb423ce8c6e8b3900fdcad1164a84c6da79276f897fd640366e3f80cf54316
DIST mongodb-src-r4.2.15.tar.gz 62187847 BLAKE2B eb9cbf52b5aeb95d3c6c6bd14da9731a85a24e2c3560163be999bddff1cd1ac90f9cf07b4c3fe22e35ffcdd174a6b2720a801fa179f574ff33150d1a4660ef9e SHA512 ee46a2dfb7ae23ad38da49bf126a2bc7932bded8f01d34516ad575d2aed5d6233c5ad620b2a4424a98afb9e80e26acf40c66982cdd0637c13f0f7aaae8b746a0
DIST mongodb-src-r4.4.1.tar.gz 49644743 BLAKE2B 7d84998c69b9b55164ebab04b49c38a4113a0f58d431612389ec37eb044fba1adf9284e9d4454bd40bb7a071fd042308a5cd350129d6d52480412cf6b868ec2b SHA512 16aa66995ea8cfe0cc47b96c1c5643a28ab47fc9f27bd93404cf572944ab30492df7c9255553f918b353cd7157a6ccde9ac6f58bfba322fb52c2d7409c6fb9b0
DIST mongodb-src-r4.4.4.tar.gz 49942905 BLAKE2B 8aa9813e87e216899b3c609b413ce6915d6ddf30faea3c0ecda2a14476fc6b08024614fa7b20e1703b5908759459e88e5e302539c27525c2359233743aa7dcda SHA512 a999528a8a6bf4bf0b8ff8f5169b1aadb3c4dab9c7d936c59d66f238b864fad6e8fb6a1b9ec27f395fca95152ee020f96a8c1cf8960a48de3ce5141f8dda7d88
DIST mongodb-src-r4.4.8.tar.gz 50492854 BLAKE2B 4776b17e88104879ea69468ff277b07dc317d936654bb26c69750e0aaf8f51bea73994e7fc4841228d8506db392e0454b5fd16257071b86a2e4ad34e90f33632 SHA512 9b0cd81c9c731255a6c079c040ed342a51a72e3ea72047d3ae959c0afde50b0cdb1fcfe7fcbea30c449a3618a09d213752277cee6eb9bc0a55915b9229543606
DIST mongodb-src-r5.0.2.tar.gz 54527477 BLAKE2B f71102f4c2711074498c288817ee06156cb030ee647541f6604582b918fb75239cc5a551c08b745b6296a2693d2a1ac28d94c1365b86bc508257b9d42142612a SHA512 179d57a0a12c5c23e54208c262edff6976f509324be8ad68d6761997dc702534f618dea1a24568fdb2d716359762e64da54e2d152a685447b4e0450996bf2154
-EBUILD mongodb-4.2.11-r1.ebuild 4732 BLAKE2B 0984d3e740302223da7e460627fc619ad156feaad1882ff76672a5a83b3e733c97ed3a010b2a9ab3f7a0298560a2ae4788911b354c93f0475c56e6dd879f6b0b SHA512 be30fdd8f312ff01802a8e2e5e473de5c61da0e40e3dd450eb25121e107993ed4d03147fee0315f587a81127e24d2e1a4771e5ab48809204a4fbb38c14fa6bff
EBUILD mongodb-4.2.15-r1.ebuild 4816 BLAKE2B 6858f1d32f923fa11419dc81b38ab934f9ea6303c3f6ab4136eb8dacad1637bf5896658c185f41513f255663f0ff2eea7238f1adaf8593be478997dd46e1ff26 SHA512 b4032c15613b52f755f039e52869dfa97794ed43dfb5a90b68975718cc10fb5e3ab63df33d8cf57d153eaf72c869fac453c36bf215953a7eb9f2d05d061ced38
EBUILD mongodb-4.4.1-r1.ebuild 4862 BLAKE2B 23c6628f1a955024a2d40abdc7b97f481a70aca4df5b69d9c1c40ebde4ca4bc5c4cbf099507f92e6b0ed6514bee8af2a320bb6ed172405e06e23d9f843fe9fae SHA512 7ed3b5fdf0d7a1cc5c765414c6c1669d2dc00c5585eb2ab042ab078a0c6ff58d13a4ac7127dcb74bc0e84ae113ea2cbbdb3cc1fe3d173a47abb3fadb4de499fa
EBUILD mongodb-4.4.4-r1.ebuild 4824 BLAKE2B 56fb4abdc1cb9b67c8b9e52629efe4bddcde99772e4c0c05b3624b2b2a5c0bb7cc25c15a7c38dabc9f10fa0df6fb9aa39f6bd6083d488f2e3cf0ebd5d2abf60b SHA512 be7286a9a666f818e1c1a5e55c97ed466fca571a3888a5de5efe128022055291eabdfca5138a0d696da1979fb4b227884fce498d539e24962fac66bf68f09b66
diff --git a/dev-db/mongodb/files/mongodb-4.2.10-no-compass.patch b/dev-db/mongodb/files/mongodb-4.2.10-no-compass.patch
deleted file mode 100644
index e60cd827f490..000000000000
--- a/dev-db/mongodb/files/mongodb-4.2.10-no-compass.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff --git a/src/mongo/SConscript b/src/mongo/SConscript
-index 6c78164c..b4b7c579 100644
---- a/src/mongo/SConscript
-+++ b/src/mongo/SConscript
-@@ -805,41 +805,6 @@ for full_dir, archive_dir in list(env["ARCHIVE_ADDITION_DIR_MAP"].items()):
- for target in env["DIST_BINARIES"]:
- installBinary(env, "db/modules/" + target)
-
--compass_type = 'compass'
--
--compass_script = "install_compass"
--if env.TargetOSIs('windows'):
-- # On windows the .in needs to be explicitly added to the file.
-- compass_script = "Install-Compass.ps1.in"
--
--compass_python_interpreter = '/usr/bin/env python2'
--if env.TargetOSIs('darwin'):
-- compass_python_interpreter = '/usr/bin/env python'
--
--compass_installer = env.Substfile('#/src/mongo/installer/compass/' + compass_script,
-- SUBST_DICT=[
-- ('@compass_type@', compass_type),
-- ('@python_interpreter@', compass_python_interpreter),
-- ])
--distBinaries.append(compass_installer)
--
--if not hygienic:
-- compass_script_installer = env.Install("$INSTALL_DIR/bin", compass_installer)
--else:
-- compass_script_installer = env.AutoInstall(
-- 'bin',
-- source=[
-- compass_installer,
-- ],
-- INSTALL_ALIAS=[
-- 'tools',
-- ],
-- )
--
--if env.TargetOSIs('posix'):
-- env.AddPostAction( compass_script_installer, 'chmod 755 $TARGET' )
-- env.AddPostAction( compass_installer, 'chmod 755 $TARGET' )
--
- # "dist" target is valid only when --use-new-tools is specified
- # Attempts to build release artifacts without tools must fail
- if has_option("use-new-tools"):
-@@ -857,7 +822,6 @@ if has_option("use-new-tools"):
- '--transform $BUILD_DIR/mongo=$SERVER_DIST_BASENAME/bin',
- '--transform $BUILD_DIR/mongo/stripped/src/mongo-tools=$SERVER_DIST_BASENAME/bin',
- '--transform src/mongo-tools=$SERVER_DIST_BASENAME/bin',
-- '--transform src/mongo/installer/compass=$SERVER_DIST_BASENAME/bin',
- '${TEMPFILE(SOURCES[1:])}'
- ],
- ),
diff --git a/dev-db/mongodb/mongodb-4.2.11-r1.ebuild b/dev-db/mongodb/mongodb-4.2.11-r1.ebuild
deleted file mode 100644
index 40b5d5a7463b..000000000000
--- a/dev-db/mongodb/mongodb-4.2.11-r1.ebuild
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-
-SCONS_MIN_VERSION="2.5.0"
-CHECKREQS_DISK_BUILD="2400M"
-CHECKREQS_DISK_USR="512M"
-CHECKREQS_MEMORY="1024M"
-
-inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs
-
-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="Apache-2.0 SSPL-1"
-SLOT="0"
-KEYWORDS="amd64 ~arm64"
-IUSE="debug kerberos lto ssl test +tools"
-RESTRICT="!test? ( test )"
-
-RDEPEND="acct-group/mongodb
- acct-user/mongodb
- >=app-arch/snappy-1.1.3:=
- >=dev-cpp/yaml-cpp-0.6.2:=
- >=dev-libs/boost-1.70:=[threads(+)]
- >=dev-libs/libpcre-8.42[cxx]
- app-arch/zstd:=
- dev-libs/snowball-stemmer:=
- net-libs/libpcap
- >=sys-libs/zlib-1.2.11:=
- kerberos? ( dev-libs/cyrus-sasl[kerberos] )
- ssl? (
- >=dev-libs/openssl-1.0.1g:0=
- )"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- $(python_gen_any_dep '
- test? ( dev-python/pymongo[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] )
- >=dev-util/scons-2.5.0[${PYTHON_USEDEP}]
- dev-python/cheetah3[${PYTHON_USEDEP}]
- dev-python/psutil[${PYTHON_USEDEP}]
- dev-python/pyyaml[${PYTHON_USEDEP}]
- ')
- sys-libs/ncurses:0=
- sys-libs/readline:0=
- debug? ( dev-util/valgrind )"
-PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-4.2.0-fix-scons.patch"
- "${FILESDIR}/${PN}-4.2.10-no-compass.patch"
-)
-
-S="${WORKDIR}/${MY_P}"
-
-python_check_deps() {
- if use test; then
- has_version "dev-python/pymongo[${PYTHON_USEDEP}]" || return 1
- has_version "dev-python/requests[${PYTHON_USEDEP}]" || return 1
- fi
-
- has_version ">=dev-util/scons-2.5.0[${PYTHON_USEDEP}]" &&
- has_version "dev-python/cheetah3[${PYTHON_USEDEP}]" &&
- has_version "dev-python/psutil[${PYTHON_USEDEP}]" &&
- has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
-}
-
-pkg_pretend() {
- if [[ -n ${REPLACING_VERSIONS} ]]; then
- if ver_test "$REPLACING_VERSIONS" -lt 4.0; then
- ewarn "To upgrade from a version earlier than the 4.0-series, you must"
- ewarn "successively upgrade major releases until you have upgraded"
- ewarn "to 4.0-series. Then upgrade to 4.2 series."
- else
- ewarn "Be sure to set featureCompatibilityVersion to 4.0 before upgrading."
- fi
- fi
-}
-
-src_prepare() {
- default
-
- # remove bundled libs
- rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*,zstandard-*} || 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-system-zstd
- )
-
- use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300
- use debug && scons_opts+=( --dbg=on )
- use kerberos && scons_opts+=( --use-sasl-client )
- use lto && scons_opts+=( --lto=on )
- 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() {
- ewarn "Tests may hang with FEATURES=usersandbox"
- "${EPYTHON}" ./buildscripts/resmoke.py run --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed with ${EPYTHON}"
-}
-
-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" mongos
- newconfd "${FILESDIR}/mongos.confd-r3" mongos
-
- insinto /etc
- newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
- newins "${FILESDIR}/mongos.conf-r2" mongos.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/mycli/Manifest b/dev-db/mycli/Manifest
index 88eb10962f52..4c51e9284159 100644
--- a/dev-db/mycli/Manifest
+++ b/dev-db/mycli/Manifest
@@ -3,6 +3,6 @@ AUX mycli-1.22.2_p20201026.patch 17058 BLAKE2B b9e436fab98be62fae2b4ff549914d943
DIST mycli-1.22.2_p20201026.tar.gz 269338 BLAKE2B 42f4349e65a43829691fd7fa0fa1a57968cf34ffba04156ae221d7a2713179826fc09903e45b6f05fbf05688f956a9cd95e87393179992378766b3a3a6ef9c6e SHA512 70d68d7517322b28783c324d463664c2794ba26cc78e0eee056891ce43dbce57c4dd9c13982ac2976af07ff1fa3d4552cb22bf42b9c7885c93483ba86b873636
DIST mycli-1.24.1.tar.gz 275983 BLAKE2B cc03ebd0f4de1fabbd1c186139aac04a50d01529190972cac63765a4d3e688e994c112d001489bf1dfb17541370e0c348a368d85a86b7eed335b775b96897765 SHA512 5f8ffb98fd285d2e556bef7cefdc77588983c0028c7c24084710633fb469ae3c5ab2232ca23e87406d44d87e503c113039e6884ec9efd603f45b3ab7ed7c0925
EBUILD mycli-1.22.2_p20201026.ebuild 1573 BLAKE2B abd09587e3cd1fb9012972a2483f619a28b107fbba19eb3497cebedbc4979d23c79df2bd64e7a012a6d2f9ca7f2083661ac967df88a2e205e6c949761e77bc4e SHA512 eb434c741d4c8a39e69215698bf8f58578bf57675eb42d8bf1351fc9c2b95520a6809200733a0b28ad03eb3708fe34b85909f28de569842627143a5fdada4d72
-EBUILD mycli-1.24.1.ebuild 1526 BLAKE2B 796b3579c183b19f23019a07191b62e66cbcb447d72bc91e26c0d0c2406c7294bee3b52f3d05033e57bff0c665265077a0320dfd7116997a64d33939a20d9ccd SHA512 81f314bf7f5481918fb7b34e94f86f79f6c3c222f603e6307541dfd4e85e98a831a16a7331c1e2aa00f177bf40a64189339a608cd6b80049f336685bcb95c5e7
-EBUILD mycli-9999.ebuild 1451 BLAKE2B fb0442bb7fe998d413ce75e0394a305f2ff16e112f1e27b67ce07bc8959c4d1e48222e5f13fa87cacc3280c0d0476a7bb6f3b004efc074722703ac32af951a09 SHA512 c696cf33a0757246d96bc65a5bfe6f7bc8b6726d2463d1b2777d0aaba4e54a18d2dbf98d2d1b1df06276052a2885f89061335c0b9fe4ac664b5fb99cedba0467
+EBUILD mycli-1.24.1.ebuild 1618 BLAKE2B 6abc3adf00e104ab39c2a48bf3b8ddf4c20f0239ef11344c3fe60aeceff00c618131fc51dfcf9168cfc223ece23d3fef41815f3581fe0de7f0a6ce22df8bdf8b SHA512 53c5e01e9094ef99f32a1e7cde1656cc39899396b65cb9587df14febfcc1dbfae60c8898a7e0a6ed8ab5fdf2773445eb6cb3fabfc824093db4e837b2b4843246
+EBUILD mycli-9999.ebuild 1521 BLAKE2B 45f5354d25dc81e6ebe2fdbc9ffa82ab742db3e3df0d66f5a06756d92443314f4f86e2a7f656503d0f1ee33c72056d8c86744ca1adc6abfd19716ef6d109e70c SHA512 0129118820272ddbbd4f0be542992da4ae8e255c1047a07215f2ef92e91b02376d78893384e04b2bf9d2d4d7d996c552c83ebd6fb174312d5262714c97440fcf
MISC metadata.xml 407 BLAKE2B dfa0f0bca1f39157b698c2109ed478e36ad966b7af46494cfba11481f9430c4ecd0738b231f66620618fe1ce7debf3e02108af4938aeb587c599493bc8faef60 SHA512 8ff03bb08d6a3d08216ba13e0b8c3d5aaba4ebc71eb6e77a66c154b68426f766124c8f4b5008a21a1a7a4c23587bc07ea91aec3edf98226dc9c8c3303ada0e54
diff --git a/dev-db/mycli/mycli-1.24.1.ebuild b/dev-db/mycli/mycli-1.24.1.ebuild
index b42d206497bc..d20a269fdd01 100644
--- a/dev-db/mycli/mycli-1.24.1.ebuild
+++ b/dev-db/mycli/mycli-1.24.1.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_COMPAT=( python3_{8..10} )
DISTUTILS_SINGLE_IMPL=yes
inherit distutils-r1
@@ -35,17 +35,23 @@ RDEPEND="
<dev-python/sqlparse-0.5.0[${PYTHON_USEDEP}]
ssh? ( dev-python/paramiko[${PYTHON_USEDEP}] )')
"
+BDEPEND="
+ test? ( $(python_gen_cond_dep '
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/paramiko[${PYTHON_USEDEP}]
+ ') )
+"
distutils_enable_tests pytest
PATCHES=( "${FILESDIR}/mycli-1.21.1-fix-test-install.patch" )
python_test() {
- epytest --capture=sys \
- --doctest-modules \
- --doctest-ignore-import-errors \
- --ignore=setup.py \
- --ignore=mycli/magic.py \
- --ignore=mycli/packages/parseutils.py \
- --ignore=test/features \
- --ignore=mycli/packages/paramiko_stub/__init__.py
+ local EPYTEST_IGNORE=(
+ setup.py
+ mycli/magic.py
+ mycli/packages/parseutils.py
+ test/features
+ mycli/packages/paramiko_stub/__init__.py
+ )
+ epytest --capture=sys --doctest-modules --doctest-ignore-import-errors
}
diff --git a/dev-db/mycli/mycli-9999.ebuild b/dev-db/mycli/mycli-9999.ebuild
index 544eb50eeb4e..272605957e9e 100644
--- a/dev-db/mycli/mycli-9999.ebuild
+++ b/dev-db/mycli/mycli-9999.ebuild
@@ -3,18 +3,16 @@
EAPI=7
-PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_COMPAT=( python3_{8..10} )
DISTUTILS_SINGLE_IMPL=yes
EGIT_REPO_URI="https://github.com/dbcli/mycli.git"
inherit distutils-r1 git-r3
DESCRIPTION="CLI for MySQL Database with auto-completion and syntax highlighting"
HOMEPAGE="https://www.mycli.net"
-SRC_URI=""
LICENSE="BSD MIT"
SLOT="0"
-KEYWORDS=""
IUSE="ssh"
RDEPEND="
@@ -33,17 +31,24 @@ RDEPEND="
<dev-python/sqlparse-0.5.0[${PYTHON_USEDEP}]
ssh? ( dev-python/paramiko[${PYTHON_USEDEP}] )')
"
+BDEPEND="
+ test? ( $(python_gen_cond_dep '
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/paramiko[${PYTHON_USEDEP}]
+ ') )
+"
+
distutils_enable_tests pytest
PATCHES=( "${FILESDIR}/mycli-1.21.1-fix-test-install.patch" )
python_test() {
- epytest --capture=sys \
- --doctest-modules \
- --doctest-ignore-import-errors \
- --ignore=setup.py \
- --ignore=mycli/magic.py \
- --ignore=mycli/packages/parseutils.py \
- --ignore=test/features \
- --ignore=mycli/packages/paramiko_stub/__init__.py
+ local EPYTEST_IGNORE=(
+ setup.py
+ mycli/magic.py
+ mycli/packages/parseutils.py
+ test/features
+ mycli/packages/paramiko_stub/__init__.py
+ )
+ epytest --capture=sys --doctest-modules --doctest-ignore-import-errors
}
diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest
index 36d21baac3f9..7bda144a297a 100644
--- a/dev-db/mysql-connector-c++/Manifest
+++ b/dev-db/mysql-connector-c++/Manifest
@@ -1,25 +1,14 @@
AUX mysql-connector-c++-1.1.11-fix-mariadb.patch 1939 BLAKE2B 4ca552777bfcb8671e5dc0213c411f9e1e8fbcbeb0f9f3369572c82ba03304a9df2ab98725b1fb3a365a63e4c8ed9d3d86332c54ffcb14210469b3d6078d89da SHA512 3d02972b57a0c2a544edef9ec5050c82f9214a7013e941cdc13a8f0742b7608812f33bc0c84367e70ea556562efb653297730ce5fc8d928458c5af1d71f3f60a
AUX mysql-connector-c++-1.1.6-fix-cmake.patch 762 BLAKE2B 4cecebd2cb075c6e1af7ab74a84132f41beeeb202d4d286038b05cbbb202cef709e7114563bdbee12aab4e6a738a9e23bbb9455fc1ce0f906d952af4e0042f05 SHA512 c4c89b398aa88a9e7b4ed4cf42b055b79670dc70685775afd1ef2d683e5b3754575c831a6083ef0d097431e796513597e1daf7737e3ade710abad917f63ed32f
-AUX mysql-connector-c++-8.0.19-fix-build.patch 9695 BLAKE2B c3334f74160a9b1148a588c7190db6f3a79fe70530d921428b7d86ec02f01324cf02c4130cd8d0cf42ecc4ccaccbecf90ffe0ac1cf8b265ea5cd9dea1046f30f SHA512 3d726b70a270e56ab38e8cebe5eb0186c4d0293dbd72844914ca9ef20674f20bc0fb4d2f0c449da77e4e6a81cc3ae454447a7983468d386e73f946dccd4a20cc
AUX mysql-connector-c++-8.0.22-fix-build.patch 10143 BLAKE2B c1bafd2ba9ad454bc02d2ebaa581ff735c1f43a557680ee3cd2378cbfc6a5673b9cec976acfc79796fcbcf292383725e1687b6042fc81e16c996d2165e9244ea SHA512 97cb6429fbf2d6df1b8a0f91e21ad9c894cd287aa9c89d2873cd3397fad33a9821d856e68108adaaab713d579b2fb9cf6f783f3b3fc5a96d32c6ba8a63bd1c23
AUX mysql-connector-c++-8.0.24-gcc11-numeric_limits.patch 348 BLAKE2B 509e869dcfffd58d92512277ff6ea148f430cca4eb9bd9a8b929641b7f876586c012aa324bdc7b475fc61dcf38bbc4edf16ab65bbe1fc0b9b15f6d19acd25743 SHA512 be18797ab0015580e21cf480938025c38c42cdf4e6aaca4c08ecb22d44932d44778c3a51488a3620915d4933b43aa75de737e2a386d449cb0b9d25ae245d5c68
AUX mysql-connector-c++-8.0.25-fix-mysqlclient-static-binding.patch 9557 BLAKE2B eda1794a808a2bfd43a044fe05abe93d41ddf98b917e4ff22dce7d795fe62c4d53f102bbcecf5b0c2ccdcf92f49ff100f6586c1c2131ba492b0a7095f202967b SHA512 963cb123e813e8eb305210f4804b5c67bfe2ebf670c85bddfbff8d3df7b60825cecf004d2e9b45ec38abe9af9f118c88b1d121d3290cae49557208ccb309da48
AUX mysql-connector-c++-8.0.26-fix-build.patch 10080 BLAKE2B e14bf201a44c3a0fad775c3c40daf56403a35485f804c6bcac005b40e79fd798cbecc410a189b19bebafb3f6fdcc9bf9b27b5395e5f30f5e7567dc459b5a4e1c SHA512 cd0184d6d52bdd1bb8e22108708fd6489074b5d3d1510a3f38d1505bd4eebc7805327543dddaa429e635464234229e758c75c482133e198bd299e092c9301ea8
DIST mysql-connector-c++-1.1.12.tar.gz 518615 BLAKE2B 386a4753ca3f03999a49a89507da1b1172b3db89797c38403fee4eea86e7108a5e4f91f24a17de86d585c2a3d9e5742a117fa84d9b14aad649f938a597f3dae9 SHA512 d7e132dbc2efda4a77f8ae00c24006a1ade1d0a50f22d89ece453505e6d206427ee7988df29c0d6ef8b396ad6b8d326b6d263a1d4fa08ef5db0966fb4f1479f4
-DIST mysql-connector-c++-8.0.19-src.tar.gz 3137484 BLAKE2B 82a2900b0daa00bcfd72d562818ada25fe15901991a896a46ecdd9304e03066c4e7a3804287540559df1c74dbd1b3983b450ab783ee8cb7f0d7ec152f3cdc6b0 SHA512 5987ae31cda3a5db18ceded201ccbe66263b8ab7665ceacf70af6bb6b99130377b40514b96644b0768fd809b36ee02580520923c11c1edecccc75da15d7bb0bd
-DIST mysql-connector-c++-8.0.20-src.tar.gz 3774428 BLAKE2B a06114432ab21c36fd0b3b91df2382198b2a48871e8e0bfd8c7a94729ed0e29f33599c078c97670fe9d744b13042db52fb89de2294c75eae670a77112d11d251 SHA512 3edb7c3d4ccf218a3f76afcf83a6d233b7accd236c05105ab3f7a6610cfd8809a78c78142c82fb60fb0931d2ae0f0f8fdc3ce9caf5f0cde7ef54067a7e20270b
-DIST mysql-connector-c++-8.0.21-src.tar.gz 3788740 BLAKE2B 1862b4f2c6e2a2bbe8e3044eea2c1d3c8fdb0a319e3758ca44686b79e917a65617e2cfd0e4b698d858ed9ef12c892b4f658eb287f2a8505a5daeeb79d9544c25 SHA512 8a64dff2efd16d2891f613fd416ec42ecba2490b428b1778e99822a3051d9c5af3b94006577e9f38a6ebd146d2f3be522cb876f1e42fbf0ac82001b0a62ffa62
-DIST mysql-connector-c++-8.0.22-src.tar.gz 3795112 BLAKE2B c5d6f0ebeb4649857f3217a35f3ae885d62be63af4da09815e7eb156538ece4f805578db24bfff3dd44a0e320c025a9936d7edacba69a2786d84dd932c5abb8a SHA512 1975b43fa3f3806cccc685a695f84783164c5b17da10ac14a6013d27c837cc9c63fff01b1ed4b31f22dae60afa68d34ec56ca9c45ca3dac23635e8f0fa845aa4
-DIST mysql-connector-c++-8.0.23-src.tar.gz 3798295 BLAKE2B 923eebbd7f9cde0252c84de4c70863b40c0dd93ad98a93e2ec14c935b2f3f0b0f251828a8bbbd0f23a5ec03491db06020294e19455901d15181c84fec9fb3d7f SHA512 f8eb8842e199d7373f4b55644720ac63b93eb33be19294c433f57aaf556ce1b5752223154194469fa28af52adebe930f0a7b4e8f62df92cc810b545aa7bab928
DIST mysql-connector-c++-8.0.24-src.tar.gz 3797356 BLAKE2B e509e04f6c93893948c573401188567bcbda91db0e608d53b1795593abf043117e1a525d3abe5c8396068a2ef750582cde15b64412e556e89762d08032abb602 SHA512 5507bc562e8263ee17efb9d4e2f52e471da75e73a1fc4dd1bc0a2ac1c2a593be889c4b042037cf6d3cbff854ae5cc865a8800251da475aed0f31710229af26f1
DIST mysql-connector-c++-8.0.25-src.tar.gz 3800065 BLAKE2B 67546b2d7d9de25ccb440c22bd58ee83e6fae78710e6dfa802cb0446bf5be433c56458424f0ee81c9a899bbfd5f464712d2d0b43dceb4205b492c7b1a79f7858 SHA512 44dd7f4296d666801be55642e53cb5181d9b5c3b080306975a48eb6280e555d9b924b42b14b44dffee4c54fab3f662a7b6bb6584d9a1ed710f0026788611c525
DIST mysql-connector-c++-8.0.26-src.tar.gz 3980027 BLAKE2B 86ce0d94db588ed86ce7b21851f866da26268f7c9059b57697cbe1f5c5d031a3eada2f55042feb7b2888b538277c773215c0d19e8a1968ff70ce363e8f95bd77 SHA512 e3a08551a4245bf886cb7e3775a256fa379bb781b523a84d30e0d0c16cae73c808a3413b08b09998eba9c0ea3ede19e505b6392ed71712a8e9a2df31f07e4c79
EBUILD mysql-connector-c++-1.1.12-r1.ebuild 1576 BLAKE2B e1835aadf499196ba42dcff6a1671bc32a4224133d68630bea249fb22ef35db6275f448bb1c891e0dcd9934fd66b3a7ebbe9935573f7f85a1d00e2613bab98fb SHA512 983abc70a156b0b0c39bd693c6ac62a149897f3b5bfddd54bc52463a5fa84397692134a16045d640db3d4797d3264803c0563a282495c21f54d4b48390223d39
-EBUILD mysql-connector-c++-8.0.19.ebuild 953 BLAKE2B b5a6d20cf1e7ac2bed882ca26d0ab5c3f83c12c506f61cac9554e0add2b83cae697994f23d289169441bdbecee862da0f4530f40e704f9ff45cda1f84e0fcd9c SHA512 076a5385ed228b5b559f2fe4a4d94498c6ded0389a302d049d6732ccd7b4a78b3e46a7ddfe9689aa624eb09560b8e4ff96414af752d14405c5fb0993e4440da1
-EBUILD mysql-connector-c++-8.0.20.ebuild 957 BLAKE2B cf3c430cbd0454d785eccc3c573d739ed9bd3ed0a6e3047d362ddd738e8abb13f4dcdf9e150ed6130c96a367e34ed260bad22b4b3a301441b69f0ac9c6254e63 SHA512 19bff24bc2d0f5336f705f651f7d9ca834491858d7bee94f7cdd5cde0da12ba1025647d3070f6da55b8442094370a13f1db5b3adb1c92a2a0925c7a931e1a9d8
-EBUILD mysql-connector-c++-8.0.21.ebuild 941 BLAKE2B 47888d50b869e6f62452ca2146ad24ced6fbcda19ef3b6ee2b318e48c88bcb0aa5f1d996ad51ae563360b654ac884f794ea9ab75d83c35dce27c6154dbb2b4d0 SHA512 e8c4cf0a041e985c62d059c7b807e83f4800b57e6b15f650f844971f2f0ffb6bab04d2c3872079d61e86bbb8675c1b6209f09ecab9ce0b229676958ced9a666b
-EBUILD mysql-connector-c++-8.0.22.ebuild 942 BLAKE2B 479d3ce48c9bdecb155bb28c2b054124e716d9a8c4a90e496f4166e31fa7dfa072a0dd4a29cc4a2c67c1e82c9fa6afca900db82ecbcae12378fd73c8ab161e9e SHA512 4b1924e9e2bfcd08db957785c534cb7acfe440cc33c82ea845b74e4d848acc80b1489af5a8358e5102c8621b0169ed79cf9455389ec7133025b69bbf0532ae71
-EBUILD mysql-connector-c++-8.0.23.ebuild 943 BLAKE2B 91199b0deb991b1275377ee17c7ba55241265701c260443c845c6c47432c7cf34ba55b3227b65e234550dac37e08aa359fd5d2cd043951a804b8fdb2a9b4b9a6 SHA512 3fb54ed0135bf6727e5bb7f161947de858abce3589f3ca2c80fa402aed790b4e91e28af248a4e6a33cf78b7da684edc2ff1db6554b5c5ba7027eddeb009f87e8
EBUILD mysql-connector-c++-8.0.24.ebuild 997 BLAKE2B 184b385509ec362bc962357f9c54dc554d6c1d66500154b6c8243ce2b8d2a01bfeb68d0e1c01c0e8dd98f16ef718b587b407e44a68010ae7bcb6f7583b32285d SHA512 df28ab886f014f30a44898b72f8a12e41bae8bc7109952712d7b44fd451de4b32babc0c5aaaf8142d7f90aa8b07a4f80ffe3d0cf34694be003c6234705acf6cc
EBUILD mysql-connector-c++-8.0.25.ebuild 1063 BLAKE2B 1ce9e11fdcd814c1e464098ffe61027e36136562adbd1efa9a4ba10c252ac04eb5602f47abf5ec94f5514c778c38b3f0d81d82a66a113e647b3f02baf2a4eeb7 SHA512 db6ebd66158eadefa3a355d5add58e015a62587f51b07484fcefa8b59d28c199ee81d468a51f534b7be37a0246331edbf845680181fa3e27ff6ce086397dc940
EBUILD mysql-connector-c++-8.0.26.ebuild 945 BLAKE2B b25f6d25971355f414cacd22507fa53b3ad056a41555157328137d36b9f269b4c99e2574bf9246ef79527e18a5a8a4556c040ec8fb58362020a19d81a3369ef5 SHA512 de38a9ab31d08db5220a8ed0698377e7fdf135d8ddada619ad026a91b9d2cf132a805e49b7fe5a01236ac860cc4d5ca02083d9c30e3d5de08ea4315d98b4d55d
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.19-fix-build.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.19-fix-build.patch
deleted file mode 100644
index b8976199afc5..000000000000
--- a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.19-fix-build.patch
+++ /dev/null
@@ -1,307 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -475,7 +475,7 @@ set_target_properties(connector PROPERTIES
-
-
- install(TARGETS connector
-- CONFIGURATIONS Release RelWithDebInfo
-+ CONFIGURATIONS Release RelWithDebInfo Gentoo
- ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT XDevAPIDev
- RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
- LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
---- a/cdk/cmake/DepFindProtobuf.cmake
-+++ b/cdk/cmake/DepFindProtobuf.cmake
-@@ -48,229 +48,7 @@ if(TARGET Protobuf::pb)
- return()
- endif()
-
--message(STATUS "Setting up Protobuf.")
--
--set(PB_SOURCE_DIR "${PROJECT_SOURCE_DIR}/protobuf")
--set(PB_BINARY_DIR "${PROJECT_BINARY_DIR}/protobuf")
--set(config_stamp "${PB_BINARY_DIR}/config.stamp")
--set(build_stamp "${PB_BINARY_DIR}/build.stamp")
--
--
--#
--# Pick build configuration for the protobuf build. Normally we build using the
--# same build configuration that is used for building CDK (Release/Debug/etc.).
--# But we also support building CDK under non-standard build configuration
--# named 'Static' (this is a dirty trick we use to simplify building our MSIs).
--# Since protobuf does not know 'Static' build configuration, we build protobuf
--# under 'Release' configuration in that case.
--#
--# We need to handle two cases. For some build systems, like Makefiles,
--# the build configuration is specified at cmake time using CMAKE_BUILD_TYPE
--# variable. In that case we also set it during protobuf build configuration.
--# Another case is a multi-configuration build system like MSVC. In this case
--# we use generator expression to pick correct configuration when the build
--# command is invoked below.
--#
--
--set(build_type)
--if(CMAKE_BUILD_TYPE)
-- if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
-- set(set_build_type -DCMAKE_BUILD_TYPE=Release)
-- else()
-- set(set_build_type -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
-- endif()
--endif()
--
--set(CONFIG_EXPR
-- $<$<CONFIG:Static>:Release>$<$<NOT:$<CONFIG:Static>>:$<CONFIG>>
--)
--
--set(set_arch)
--if(CMAKE_GENERATOR_PLATFORM)
-- set(set_arch -A ${CMAKE_GENERATOR_PLATFORM})
--endif()
--
--set(set_toolset)
--if(CMAKE_GENERATOR_TOOLSET)
-- set(set_toolset -T ${CMAKE_GENERATOR_TOOLSET})
--endif()
--
--if(NOT EXISTS "${PB_BINARY_DIR}/exports.cmake")
--
-- message("==== Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR} ${set_arch} ${set_toolset}")
--
-- file(REMOVE "${PB_BINARY_DIR}/CMakeCache.txt")
-- file(MAKE_DIRECTORY "${PB_BINARY_DIR}")
--
-- # Dirty trick to speed up cmake set up time.
-- #file(
-- # COPY "${CMAKE_BINARY_DIR}/CMakeFiles/${CMAKE_VERSION}"
-- # DESTINATION "${PB_BINARY_DIR}/CMakeFiles"
-- #)
--
-- execute_process(
-- COMMAND ${CMAKE_COMMAND}
-- -G "${CMAKE_GENERATOR}"
-- ${set_arch}
-- ${set_toolset}
-- ${set_build_type}
-- -DSTATIC_MSVCRT=${STATIC_MSVCRT}
-- -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
-- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
-- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
-- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
-- -DCMAKE_CXX_FLAGS_MINSIZEREL=${CMAKE_CXX_FLAGS_MINSIZEREL}
-- -DCMAKE_STATIC_LINKER_FLAGS=${CMAKE_STATIC_LINKER_FLAGS}
-- ${PB_SOURCE_DIR}
-- WORKING_DIRECTORY ${PB_BINARY_DIR}
-- RESULT_VARIABLE protobuf_config
-- )
--
-- if(protobuf_config)
-- message(FATAL_ERROR "Could not configure Protobuf build: ${protobuf_config}")
-- endif()
--
-- message("==== Protobuf build configured.")
--
--endif()
--
--
--include(${PB_BINARY_DIR}/exports.cmake)
--
--#
--# Protobuf library targets imported above (pb_protobuf
--# and pb_protobuf-lite) are local to the directory from which
--# they were imported. This is not good if cdk is used as
--# a sub-project of a parent project, because the parent project
--# must have access to these targets.
--#
--# For that reason below we create global protobuf/protobuf-lite targets
--# and copy their locations from the imported targets.
--#
--# Note: we can't use ALIAS library because it does not work with imported
--# targets
--#
--
--add_library(Protobuf::pb-full STATIC IMPORTED GLOBAL)
--add_library(Protobuf::pb-lite STATIC IMPORTED GLOBAL)
--add_executable(Protobuf::protoc IMPORTED GLOBAL)
--
--set(TGT_protobuf Protobuf::pb-full)
--set(TGT_protobuf-lite Protobuf::pb-lite)
--set(TGT_protoc Protobuf::protoc)
--
--foreach(tgt protobuf protobuf-lite protoc)
--
-- #message("processing: ${tgt}")
--
-- set(loc_list)
--
-- foreach(CONF NOCONFIG DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
--
-- #message("- CONF: ${CONF}")
--
-- get_target_property(LOC pb_${tgt} IMPORTED_LOCATION_${CONF})
--
-- if(LOC)
--
-- #message("- setting imported location to: ${LOC}")
-- list(APPEND loc_list "${LOC}")
--
-- set_target_properties(${TGT_${tgt}} PROPERTIES
-- IMPORTED_LOCATION_${CONF} "${LOC}"
-- )
--
-- set_property(TARGET ${TGT_${tgt}} APPEND PROPERTY
-- IMPORTED_CONFIGURATIONS ${CONF}
-- )
--
-- endif()
--
-- endforeach(CONF)
--
-- #
-- # To support 'Static' build configuration the targets imported from the
-- # Protobuf project need to have IMPORTED_LOCATION_STATIC defined. We use
-- # 'Release' locations as Protobuf is built using 'Release' configuration in
-- # that case.
-- #
--
-- get_target_property(LOC ${TGT_${tgt}} IMPORTED_LOCATION_RELEASE)
-- set_property(TARGET ${TGT_${tgt}} PROPERTY IMPORTED_LOCATION_STATIC ${LOC})
--
--endforeach(tgt)
--
--
--#message("Protobuf include path: ${PROTOBUF_INCLUDE_DIR}")
--set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_INCLUDE_DIR} CACHE INTERNAL "")
--
--set_target_properties(Protobuf::pb-lite PROPERTIES
-- INTERFACE_INCLUDE_DIRECTORIES "${PROTOBUF_INCLUDE_DIR}"
--)
--
--set_target_properties(Protobuf::pb-full PROPERTIES
-- INTERFACE_LINK_LIBRARIES Protobuf::pb-lite
--)
--
--# On UNIX Protobuf uses pthread library
--if(UNIX)
-- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
-- INTERFACE_LINK_LIBRARIES pthread
-- )
--endif()
--
--#
--# Note: This is needed to correctly compile headers generated by protobuf
--# with sunpro compiler.
--#
--
--if(SUNPRO)
-- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
-- INTERFACE_COMPILE_DEFINITIONS SOLARIS_64BIT_ENABLED
-- )
--endif()
--
--#
--# Try using parallel builds for protobuf.
--#
--
--include(ProcessorCount)
--ProcessorCount(N)
--
--MESSAGE("Processor Count: ${N}")
--
--set(opt_build)
--set(opt_tool)
--if(NOT N EQUAL 0)
-- if(NOT CMAKE_VERSION VERSION_LESS 3.12)
-- set(opt_build --parallel ${N})
-- elseif(CMAKE_MAKE_PROGRAM MATCHES "make")
-- set(opt_tool -j${N})
-- endif()
--endif()
--
--add_custom_command(OUTPUT "${build_stamp}"
-- COMMAND ${CMAKE_COMMAND} --build . ${opt_build} --config ${CONFIG_EXPR} -- ${opt_tool}
-- COMMAND ${CMAKE_COMMAND} -E touch "${build_stamp}"
-- WORKING_DIRECTORY "${PB_BINARY_DIR}"
-- COMMENT "Building protobuf"
--)
--
--add_custom_target(build_protobuf
-- SOURCES "${build_stamp}"
--)
--
--set_target_properties(build_protobuf PROPERTIES FOLDER "Misc")
--
--add_dependencies(Protobuf::pb-full build_protobuf)
--add_dependencies(Protobuf::pb-lite build_protobuf)
--add_dependencies(Protobuf::protoc build_protobuf)
--
--# TODO: Handle lite/full version
--
--
-+find_package(Protobuf REQUIRED)
-
- # Standard PROTOBUF_GENERATE_CPP modified to our usage
-
-@@ -299,11 +77,11 @@ function(mysqlx_protobuf_generate_cpp SRCS HDRS)
- "${CMAKE_CURRENT_BINARY_DIR}/protobuf/${FIL_WE}.pb.h"
- COMMAND ${CMAKE_COMMAND}
- -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
-- COMMAND Protobuf::protoc
-+ COMMAND ${Protobuf_PROTOC_EXECUTABLE}
- ARGS --cpp_out "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
- -I ${ABS_PATH} ${ABS_FIL}
-- --proto_path=${PROJECT_SOURCE_DIR}/protobuf/protobuf-3.6.1/src
-- DEPENDS ${ABS_FIL} #${PROTOBUF_PROTOC_EXECUTABLE}
-+ --proto_path=${Protobuf_INCLUDE_DIR}
-+ DEPENDS ${ABS_FIL} #${Protobuf_PROTOC_EXECUTABLE}
- COMMENT "Running C++ protocol buffer compiler on ${FIL}"
- VERBATIM
- )
---- a/cdk/core/CMakeLists.txt
-+++ b/cdk/core/CMakeLists.txt
-@@ -44,7 +44,7 @@ add_library(cdk STATIC ${cdk_sources} ${HEADERS})
-
- target_link_libraries(cdk
- PUBLIC cdk_mysqlx cdk_parser
-- PRIVATE Protobuf::pb-lite # required by codecc.cc
-+ PRIVATE protobuf # required by codecc.cc
- )
-
- add_coverage(cdk)
---- a/cdk/protocol/mysqlx/CMakeLists.txt
-+++ b/cdk/protocol/mysqlx/CMakeLists.txt
-@@ -126,11 +126,7 @@ target_include_directories(cdk_proto_mysqlx PRIVATE
- ${CMAKE_CURRENT_BINARY_DIR}
- )
-
--if(use_full_protobuf)
-- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-full)
--else()
-- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-lite)
--endif()
-+target_link_libraries(cdk_proto_mysqlx PRIVATE protobuf)
-
- target_link_libraries(cdk_proto_mysqlx PRIVATE cdk_foundation)
-
---- a/jdbc.cmake
-+++ b/jdbc.cmake
-@@ -66,7 +66,7 @@ if(MYSQL_CONFIG_EXECUTABLE)
- list(APPEND jdbc_cmake_opts -DMYSQL_CONFIG_EXECUTABLE=${MYSQL_CONFIG_EXECUTABLE})
- endif()
-
--list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON)
-+list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=OFF)
-
- if(CMAKE_BUILD_TYPE)
- if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
---- a/jdbc/CMakeLists.txt
-+++ b/jdbc/CMakeLists.txt
-@@ -272,7 +272,7 @@ set_target_properties(connector-jdbc
-
-
- install(TARGETS connector-jdbc
-- CONFIGURATIONS Release RelWithDebInfo
-+ CONFIGURATIONS Release RelWithDebInfo Gentoo
- ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT JDBCDev
- RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
- LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.19.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.19.ebuild
deleted file mode 100644
index b02bf3f85f04..000000000000
--- a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.19.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-inherit cmake-utils
-
-DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
-HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
-URI_DIR="Connector-C++"
-SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
-
-LICENSE="Artistic GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm ~arm64 ~ppc ~ppc64 ~sparc x86"
-IUSE="+legacy"
-
-RDEPEND="
- dev-libs/protobuf:=
- legacy? (
- dev-libs/boost:=
- >=dev-db/mysql-connector-c-6.1.8:=
- )
- dev-libs/openssl:0=
-"
-DEPEND="${RDEPEND}"
-S="${WORKDIR}/${P}-src"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-8.0.19-fix-build.patch
-)
-
-src_configure() {
- local mycmakeargs=(
- -DWITH_SSL=system
- -DWITH_JDBC=$(usex legacy ON OFF)
- $(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
- $(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
- )
-
- cmake-utils_src_configure
-}
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.20.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.20.ebuild
deleted file mode 100644
index bad1c840c8f7..000000000000
--- a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.20.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-inherit cmake-utils
-
-DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
-HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
-URI_DIR="Connector-C++"
-SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
-
-LICENSE="Artistic GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE="+legacy"
-
-RDEPEND="
- dev-libs/protobuf:=
- legacy? (
- dev-libs/boost:=
- >=dev-db/mysql-connector-c-6.1.8:=
- )
- dev-libs/openssl:0=
- "
-DEPEND="${RDEPEND}"
-S="${WORKDIR}/${P}-src"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-8.0.19-fix-build.patch
-)
-
-src_configure() {
- local mycmakeargs=(
- -DWITH_SSL=system
- -DWITH_JDBC=$(usex legacy ON OFF)
- $(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
- $(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
- )
-
- cmake-utils_src_configure
-}
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.21.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.21.ebuild
deleted file mode 100644
index 40911b8f9442..000000000000
--- a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.21.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-inherit cmake
-
-DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
-HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
-URI_DIR="Connector-C++"
-SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
-
-LICENSE="Artistic GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm ~arm64 ~ppc ~ppc64 ~sparc x86"
-IUSE="+legacy"
-
-RDEPEND="
- dev-libs/protobuf:=
- legacy? (
- dev-libs/boost:=
- >=dev-db/mysql-connector-c-6.1.8:=
- )
- dev-libs/openssl:0=
-"
-DEPEND="${RDEPEND}"
-S="${WORKDIR}/${P}-src"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-8.0.19-fix-build.patch
-)
-
-src_configure() {
- local mycmakeargs=(
- -DWITH_SSL=system
- -DWITH_JDBC=$(usex legacy ON OFF)
- $(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
- $(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
- )
-
- cmake_src_configure
-}
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.22.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.22.ebuild
deleted file mode 100644
index 99d319d98c90..000000000000
--- a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.22.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-inherit cmake
-
-DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
-HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
-URI_DIR="Connector-C++"
-SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
-
-LICENSE="Artistic GPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm ~arm64 ~ppc ~ppc64 ~sparc x86"
-IUSE="+legacy"
-
-RDEPEND="
- dev-libs/protobuf:=
- legacy? (
- dev-libs/boost:=
- >=dev-db/mysql-connector-c-6.1.8:=
- )
- dev-libs/openssl:0=
- "
-DEPEND="${RDEPEND}"
-S="${WORKDIR}/${P}-src"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-8.0.22-fix-build.patch
-)
-
-src_configure() {
- local mycmakeargs=(
- -DWITH_SSL=system
- -DWITH_JDBC=$(usex legacy ON OFF)
- $(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
- $(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
- )
-
- cmake_src_configure
-}
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.23.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.23.ebuild
deleted file mode 100644
index 629a5b274f44..000000000000
--- a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.23.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-inherit cmake
-
-DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
-HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
-URI_DIR="Connector-C++"
-SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
-
-LICENSE="Artistic GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc x86"
-IUSE="+legacy"
-
-RDEPEND="
- dev-libs/protobuf:=
- legacy? (
- dev-libs/boost:=
- >=dev-db/mysql-connector-c-6.1.8:=
- )
- dev-libs/openssl:0=
- "
-DEPEND="${RDEPEND}"
-S="${WORKDIR}/${P}-src"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-8.0.22-fix-build.patch
-)
-
-src_configure() {
- local mycmakeargs=(
- -DWITH_SSL=system
- -DWITH_JDBC=$(usex legacy ON OFF)
- $(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
- $(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
- )
-
- cmake_src_configure
-}
diff --git a/dev-db/mysql-workbench/Manifest b/dev-db/mysql-workbench/Manifest
index 9e9f2f79bacf..cd2b9df5b794 100644
--- a/dev-db/mysql-workbench/Manifest
+++ b/dev-db/mysql-workbench/Manifest
@@ -1,10 +1,6 @@
AUX mysql-workbench-6.2.5-wbcopytables.patch 496 BLAKE2B 4666f32098ec43ad36f1c726903472e829873002521262d6781a2febfc1394dac6f9708fbb99a3fa52a032a5b8f695c9b98579b28a63e74727eac21a8ef3fbe6 SHA512 c0766315cd345893af57880eccdc2c1dd9ffa456a27d0c736af1382ca24c507de865188588753f212f35d8781305dcbd8d555f128edd6454dc2299bd0357fd5b
AUX mysql-workbench-8.0.19-mysql-connector-8.patch 624 BLAKE2B 0cb899a8b0127664471877bb9cdcda946c35ed7a159646b94891a791a618c77201cc7696d6f2893e95fd78dbc13325cef752740f76e69974e10c0f88084594fb SHA512 09c2349cb42393f6d32f24804e2c3438a5d846fc9611e0684ccf2139fd30b0abcb0f2aa7b205c60a081259e073fb345cd72837dab1a216e6a8aaaba5ec3decf7
-AUX mysql-workbench-8.0.23-findlibssh.patch 633 BLAKE2B 12deef5c346773931fb0f6d37a24cc67d4d0d6079b05cacbcaefc7a8c453f2811a4ea018a5e71390739500d2801cc12889ac2b61346830eff9d348925fdbb88d SHA512 d1d2d7091fad56fb62f29a323df00ae29a7ce5e921a49eb9199363e1113da207872f8f636cba479bc15697b574e54b4cf312aa354f6c050bd1934a523175b79d
-DIST antlr-4.7.1-complete.jar 2240116 BLAKE2B 3acf99b3701b2092cad2fb6e91f27791cbedd82f26888d7329e481be29fce4ec644eb57f663e515b92dea46c24222d4fb090aae5cae30c57c412a38932ea72ed SHA512 de1c230d7294e05ac7b451cbc639bab9d416a674b281e21092fb4a9329ca8b6d4b92b9ad78a9771cff475a1610f1d0419819c4619bdff36c683019da67ef13b1
DIST antlr-4.9.1-complete.jar 2100605 BLAKE2B 6fcdc184900cd30e42b3e1b6f56bcccbf1d3c975edc8475b92b9c0779568148f711e9bcbb77859d8fbff2d31f362a9b562847b9b9ece03c8c4b7792341fab57e SHA512 a01815324c15fbff9cb917fa2cdef85aabf34c77730913026257e92c195d11f059c73a1579ffa74616b76b5aba34fd6074b19e1de8f2f3bec1c55cd950f4947b
-DIST mysql-workbench-community-8.0.23-src.tar.gz 20719770 BLAKE2B 4e1e44428a9e8a00c23f8f9f6e1519f8d13c205fac110168da67fb462d2a13204d41f1d0e109a3dde8ad2dbd3de31fee09ae4ccea97f9de04d0bc4fb2fad180e SHA512 f50d71bd196d5e5446cd14a228e52c4e74506cc2dd95d1601cc5e99b00db0d82dbcb28fd2ed404ee77ca63c6854d47c46773938e09ab601c10009c0ca99e4d54
DIST mysql-workbench-community-8.0.26-src.tar.gz 19282576 BLAKE2B 4b05d42a10ad3cc88d6447ff5ed1344ac8ef75564e2b69a55f603930f3ff75cd9ac00fd82b6b7339bdbf9524a593fadc32070c6cb5f77e9eeb6ad8e24cc59e7c SHA512 33b28b74b5c7d75c7b3c017cdebc48f3453d0aed2e8ebb20052e462479d0147e164d409e040ab8d1828c2209ad3bc41ab9684e91f86769bf7c1fa0ee117e888c
-EBUILD mysql-workbench-8.0.23-r1.ebuild 2780 BLAKE2B 3807d34824ded986c05ea14b52b36c687197e8151f5953fab95cc3aff8884cc12a26f29c348450cc7a3ac8ebb5a29921fa9acef238cc34d54fea33c95260d41a SHA512 827290ce1f2c9b57d2536a9d141d403b4d194c7585e90f3a07fea118c7a5e9592767aecd5bc04e8308d26bb7e9d33f96d46c359c81c6d3ffaa0c64c532b97c9e
EBUILD mysql-workbench-8.0.26-r1.ebuild 2773 BLAKE2B 79bf4e4144cb9d7704c93290eca97185b78ecec676fef873644305c307ce22e63245e4460e0849db417114c64b9579c03e316fda9c06b74a8fd33ab981b2d1a2 SHA512 5483b9ce7bf2746957451710e89f19de915d2a82c437982d27c5c7d8d190c7050e906b130171830f49a08d7348ec1bcf5eb8bd77a1dc42a4d5f8fe0e370dca05
MISC metadata.xml 311 BLAKE2B 78ae228a5e7307e8ed03ddab6b38d288bb7811f0a04d460fa13096fd8350b9b097dffcc1fb8e7f173834d49c108e482b8c8fc6ba65ffbaf6697c4e7075167ccd SHA512 72243543b91ee6b5560444cb1082dac192e2b17b5746e52b92076b483e14ced459ac54fad595307a6e7b53f48d1466d81b1ea4c1829d128f7b977fae87a176cc
diff --git a/dev-db/mysql-workbench/files/mysql-workbench-8.0.23-findlibssh.patch b/dev-db/mysql-workbench/files/mysql-workbench-8.0.23-findlibssh.patch
deleted file mode 100644
index 3f250d78140f..000000000000
--- a/dev-db/mysql-workbench/files/mysql-workbench-8.0.23-findlibssh.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/build/cmake/Modules/FindLibSSH.cmake.~1~ 2020-12-17 06:22:25.000000000 +0100
-+++ b/build/cmake/Modules/FindLibSSH.cmake 2021-02-21 10:38:52.773491295 +0100
-@@ -51,7 +51,7 @@
- find_library(LibSSH_LIBRARY NAMES ${LibSSH_NAMES})
- endif()
-
--set(LibSSH_HEADER_FILE ${LibSSH_INCLUDE_DIR}/libssh/libssh.h)
-+set(LibSSH_HEADER_FILE ${LibSSH_INCLUDE_DIR}/libssh/libssh_version.h)
- file(STRINGS ${LibSSH_HEADER_FILE} LibSSH_VERSION_LINE_MAJOR REGEX "#define LIBSSH_VERSION_MAJOR[ ]+[0-9]+")
- if (LibSSH_VERSION_LINE_MAJOR)
- file(STRINGS ${LibSSH_HEADER_FILE} LibSSH_VERSION_LINE_MINOR REGEX "#define LIBSSH_VERSION_MINOR[ ]+[0-9]+")
diff --git a/dev-db/mysql-workbench/mysql-workbench-8.0.23-r1.ebuild b/dev-db/mysql-workbench/mysql-workbench-8.0.23-r1.ebuild
deleted file mode 100644
index f890a17c511c..000000000000
--- a/dev-db/mysql-workbench/mysql-workbench-8.0.23-r1.ebuild
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-GCONF_DEBUG="no"
-
-PYTHON_COMPAT=( python3_{7,8,9} )
-PYTHON_REQ_USE="sqlite"
-
-ANTLR_VERSION=4.7.1
-
-inherit gnome2 flag-o-matic python-single-r1 cmake
-
-MY_P="${PN}-community-${PV}-src"
-
-DESCRIPTION="MySQL Workbench"
-HOMEPAGE="https://www.mysql.com/products/workbench/"
-SRC_URI="https://cdn.mysql.com/Downloads/MySQLGUITools/${MY_P}.tar.gz
- https://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="debug doc"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-# glibc: deprecated mutex functions, removed in 2.36.0
-CDEPEND="${PYTHON_DEPS}
- app-crypt/libsecret
- dev-libs/glib:2
- dev-cpp/antlr-cpp:4
- dev-cpp/atkmm:*
- dev-cpp/pangomm:1.4
- >=dev-cpp/glibmm-2.14:2
- dev-cpp/gtkmm:3.0
- dev-libs/atk
- >=net-libs/libssh-0.8.5[server]
- x11-libs/pango
- x11-libs/gtk+:3
- gnome-base/libglade:2.0
- >=x11-libs/cairo-1.5.12[glib,svg]
- >=dev-libs/rapidjson-1.1.0
- dev-libs/libsigc++:2
- >=dev-libs/boost-1.55.0[nls]
- >=dev-cpp/ctemplate-0.95
- >=dev-libs/libxml2-2.6.2:2
- dev-libs/libzip
- dev-libs/libpcre[cxx]
- >=sci-libs/gdal-1.11.1-r1
- virtual/opengl
- || ( sys-fs/e2fsprogs dev-libs/ossp-uuid )
- dev-libs/tinyxml[stl]
- >=dev-db/mysql-connector-c++-1.1.8 =dev-db/mysql-connector-c++-1*
- dev-db/vsqlite++
- || ( dev-db/libiodbc dev-db/unixODBC )
- dev-python/pexpect
- >=dev-python/paramiko-1.7.4
-"
-
-RDEPEND="${CDEPEND}
- app-admin/sudo
- >=sys-apps/net-tools-1.60_p20120127084908"
-
-DEPEND="${CDEPEND}
- dev-lang/swig
- virtual/jre
- virtual/pkgconfig"
-
-S="${WORKDIR}"/"${MY_P}"
-
-PATCHES=(
- "${FILESDIR}/${PN}-6.2.5-wbcopytables.patch"
- "${FILESDIR}/${PN}-8.0.19-mysql-connector-8.patch"
- "${FILESDIR}/${PN}-8.0.23-findlibssh.patch"
-)
-
-src_unpack() {
- unpack ${PN}-community-${PV}-src.tar.gz
-}
-
-src_prepare() {
- ## remove hardcoded CXXFLAGS
- sed -i -e 's/-O0 -g3//' ext/scintilla/gtk/CMakeLists.txt || die
- ## And avoid -Werror
- sed -i -e 's/-Werror//' CMakeLists.txt || die
- ## Fix doc install directory
- sed -i -e "/WB_INSTALL_DOC_DIR/ s/mysql-workbench/${P}/" CMakeLists.txt || die
-
- ## package is very fragile...
- strip-flags
-
- cmake_src_prepare
-}
-
-src_configure() {
- if has_version dev-db/libiodbc ; then
- IODBC="-DIODBC_CONFIG_PATH=/usr/bin/iodbc-config"
- fi
-
- append-cxxflags -std=c++11
- ANTLR_JAR_PATH="${DISTDIR}/antlr-${ANTLR_VERSION}-complete.jar"
- local mycmakeargs=(
- -DWITH_ANTLR_JAR=${ANTLR_JAR_PATH}
- -DLIB_INSTALL_DIR="/usr/$(get_libdir)"
- -DIODBC_INCLUDE_PATH="/usr/include/iodbc"
- ${IODBC}
- -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
- -DPYTHON_LIBRARY="$(python_get_library_path)"
- -DMySQL_CONFIG_PATH="/usr/bin/mysql_config"
- )
- cmake_src_configure
-}
diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index 77621e253ce9..1f771a59ce9e 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -3,53 +3,32 @@ AUX my.cnf-8.0.distro-client 749 BLAKE2B b01b39c85430714b5a4bfb9923c9ed1df99cdce
AUX my.cnf-8.0.distro-server 1125 BLAKE2B f4d6941aad1fc29e81e6c805ac42f4c8d3c7bc250990a9c432800dbe25b5c31be08d8e3895666b57f21606ffb69e704c57ed2692fd94696b9d325a4442596587 SHA512 82d35b7bc944e5690e1f2670a3d5674845610c2d11d6d8b1c5784ccb3877c6298de70eced3d7c497c0bcaecfa9e339ac43ce0534a97e7d976e950bb1a7f5c75d
AUX my.cnf.distro-client 637 BLAKE2B b0812e0e03aa9a3b2e55e08b933a0b41b6afd95ded61f4d9d7c34a2d3810ec38520abd0d89e1c6565f61d4cd8a36d653f9f3199b3dd6a91345cdb5ff962685d8 SHA512 74bd1d9a58075d0a6195be1f94db310bcbe8da532b03844e6fa1ff84676e84843fc9adf9aed06b7e4db53c9aa24ef0885d96de0ccfe4c6ad98afe4c145d43f4f
AUX my.cnf.distro-server 994 BLAKE2B 41dceff58edf748f9f60ac3c0d1682d2fc2f026fc1fd14b4c2dea398814beda3c09aabea04dd3a9e145464524c629e7e69dc257d1245e0a46dd8584b7f685172 SHA512 cf172edc23d3dda49c21af6b8adef8aa13694d8ceecddf1d612d4ae34d00ba53c51ae4ae7ca4d11083eeacb5d862f59a855a9d80e9e448ab8bbf17f42aac2650
-DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396198954fceb5dc039669d236b1dad98eef306702550b517ef30ee3d0e6721667b6f5549df91e3c15cef68888079c00d9ba SHA512 74e8e8794fe54b73776b38296aa42c65547311b80bfe65c88b2f961bd44083e9628eb47da4ebcf4c20e2d7c694f514223bcbf29cce27853cca500710ae97778d
-DIST mysql-5.7.31-patches-01.tar.xz 6664 BLAKE2B 8225f286f0090653f9714545daa95ccdadaa58812e55284d1ee52ad2dcca18960b9266797630762595d832aa1dda1d9e2df691f0c728102f162b376346c99b3c SHA512 c6260e688da6e8f049ba7ac0553ad442e76829deaca32c1b7a101ec927a36b1571cb24982391f05545a9f62d94502efc09530d444e4abfc08350ab4c19fbfd37
DIST mysql-5.7.32-patches-01.tar.xz 6660 BLAKE2B 5c63158615398bdcc4480a0e1b058f491b39ffc7ee33767b425f3b254555411031f64d865e1924afe8aa3926e4cba18049f1219a0a8acc702bc5e011c94fa947 SHA512 bf5e0d27af81e599005268ee243af4cd93f6df95c32cccb268a749322b4e5f73a2ce5d51f0ad1b0e1f2cf4702b8a05e4b2e0b73110fd4aac61f2a0f51bf4952e
DIST mysql-5.7.33-patches-01.tar.xz 6672 BLAKE2B cfa410f9ba5a4ba7e43923e7b5940c2dc6a9356b49230ebaea24bd7eef8a9639fc746e917c22241e19c830b81252e95f38e2c9d6054494de700bae46011fb2f4 SHA512 b16bb9531c44f1c5ec9c08aee6c1f5f5d2e3fe59a0039a54f6c050660a18f7c78b955e7eea7bef4e7dccfcdaa81464e0d8e47ac7d0e40ecb90187865a8a0412e
DIST mysql-5.7.34-patches-01.tar.xz 6676 BLAKE2B b925880bfbb991fcba81964ff658a2ecab38da637a6093270a724ab8e405ab092d5fb9684f53f44d001e34287366df234b841d9ebcae62d49becdb93a3c3e324 SHA512 80a89f4b4a7ecc04f3115c6aaa0b0013e38c2813fa6dea095e826ef3944298715a48e0deacb691d23526b1524b207c83176290faea2461d3fcd94edabe3d8943
DIST mysql-5.7.34-patches-02.tar.xz 6408 BLAKE2B fdb36247832b6282af94ce2f61b5dd77f6b45f9efca4b438ecd5fed8d810d9d51547d0ae3de085e7f5dcc8795b4bc4f1210902495b92859e1d5aec3048256ef3 SHA512 f0513eb7f0c9e415aa972a53af668939934ea4f4fa438f468f32a46ccc2aa3b84ba8edd999e4786256ada34851ad64c81e9dd0e36c2a21da641987dfd18635c3
DIST mysql-5.7.35-patches-01.tar.xz 6408 BLAKE2B ddead9d6f5570f23433ffaef0188a8e93c0220b3d59ae24b870927e9e5908619f357725c1ab2d16905f39dd9d5f6cd23d3aabf6a1df2abdc865683f603912b8f SHA512 6374536299c691fd12a3f8b7cd27291e6f3b0b6d159284b2866caaed6a7f124439c16e659e6da5aae9e72d613de2a1e1b80066c961e122e90ad644e9a32633cc
-DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
-DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
DIST mysql-8.0.23-patches-01.tar.xz 7568 BLAKE2B 222120dcb5556457f382eefbb10f66f46fe1673c64730c8c8a5566942031bc98bab1f1182f747e79e23fccfb6b09197d5c2874aa2087104b6f1eaa25ea9fd60c SHA512 54222c420d57c1b206d920f22738746925ed1e0d78683f01c97cac5bd1d3450f70f784a7f603304b8595fb58120e691f94e28fa1d1884a7cc8bea1d7b177470f
DIST mysql-8.0.25-patches-01.tar.xz 3604 BLAKE2B 09cccab204c30d16bdc374bcd01d4a8e6298955f86f479b8e287aab74fb6bd9857547e360be725dfc66acb56e1bb5665277d340761d0110a8823763ad4d2d1f4 SHA512 6d90a34a20e9cbc7e7a9b5b63a1408f33ac8523f2be6c9ab6d9ad7589c3ded83c87e460d782d4d8c33f11b337151fd8db994099e371260ecf204933e844eb50e
DIST mysql-8.0.25-patches-02.tar.xz 6456 BLAKE2B c9c1020a505ebcee836f8dc3bbe540ff924a0174daf36c37b852df267a81919d37581d1c9be037d52cdcd34c27c5c34d3f0af6160857b22d8ab4d8ece37798e0 SHA512 3c3726b397f3a6fb1d84396bb571b4903a167c9a47273b9d5996949e1d3febc96d3528bfa8dfaeea073a245051ae10c983f2ad258268babc91649563ce3cfc00
DIST mysql-8.0.26-patches-01.tar.xz 6980 BLAKE2B 5fc86125b622ac978dc7ec3d6954a1d366315a57b6f56ca8dade9ad4a255b4b793ad33736404b29ab2db12f726897f014aeec9232dc52954087e7533d0f593d2 SHA512 00e6478716cf857b8ab768ec481dc1e7d809db17a9d899a52822f61dcc18797e87c0eecfafb1bb9065895c1b261c03c87fe0593b59dc86fb40853b0c660c9bfb
-DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
-DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
-DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
-DIST mysql-boost-5.7.31.tar.gz 51382559 BLAKE2B 86430ee01b0b066ffbd1c876c7d09afecdd57f99cfe07417f406345bcdb14cc6fd33a2d4d92dfe15e87f34ec476bf34d62508ac3f99fb3e11957458e0d6ec20b SHA512 d7fc1927c860562d121658031bcbd58d36a942340423bf7b692cef84c29e67b56d009c9f9bb10cde8acabd6f9db58c67eb542349eccc4719fb38c8570738700a
DIST mysql-boost-5.7.32.tar.gz 52882168 BLAKE2B dd112fa1d8bd29d86fba076675b5b7c9c98b6fb876aed45a00e8a25be716102fc9aa688b7170bef07b1c9f9751737277774d8fb2c64c21e181ecae58f89b4a8a SHA512 33a617d040efd065ea1c2ad84be537f851480abd5cc8a6879b7f170bc4e6db9432bd03f2a6bc680b71f17839c508cab0e7ef1a3aba032197da1b7943c916c77a
DIST mysql-boost-5.7.33.tar.gz 52912380 BLAKE2B bca09314ae73932f6095799faa016998e65655cf5ea74d5596dcdc785e77014fe0b29a6c123e8618771f4a20a19978df00f7b79eea329aeb4b536ae71a4bef94 SHA512 1d1e1e5934fb17ff731fea45b88d4af6a394c2fbf0177a87803b18cb0eb4fb8d4939f82fc22b6cbc2af64022a44e206cd23e2e88ce11cc119c3ea22129d54e7a
DIST mysql-boost-5.7.34.tar.gz 52891142 BLAKE2B 986fe106d73495ea9acb837f699ef2b1ffd123d9728b61da42f990d670569f1f7c12dc0a8611c3a7b6e3ed7be9fc277e1a977fa6c6d06f7d156a2f492951d9c7 SHA512 4eab7e90477b75643df743d806d5abcfb56572a2aa003a354980287c9148209f4fb7f0158ba969fb0462c32e49fcb4cf2a79f0330ab1bd2b243725dbf6f31d6d
DIST mysql-boost-5.7.35.tar.gz 52959014 BLAKE2B 02cbc2201176773516479636ab40828a98bbc6bc1e90060e36d36af5c20a84b4b415d6e467328890ecff044834c81458fff8b717fd8942196dcf35e0ae85f298 SHA512 2469c8e13a236aee327bc0828804ba189e3abf78b6e0b3ef65b2343210f9c0cd5313d18b57ae3b76ca1487dc1d70854c8a12e6da61a6fffbce95854dcc792482
-DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
-DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
-DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1
DIST mysql-boost-8.0.22.tar.gz 285934450 BLAKE2B 1ba0c9bb9a0cb74af4842d3b746f8b690c122cfbf2c6d5201ce95e59a257427a8683dd8d5c2be31dfe9ece4761366c1287fa7b841c45db222725bf76b0639bc6 SHA512 792f2ada93ec67a4679228478c6b798e81d9e9f6d13c7f4977cb7682738a4aae3cb483294edc6b2fde16c3960e51af8786216c063ab500840afd39a609e4b612
DIST mysql-boost-8.0.23.tar.gz 291039175 BLAKE2B 3a7d3e05c774085d6078d0d3effd58d2df47521615356a2aa5efc2ea2ef8457e19ad57a054926ccff0a4752ca71d0464daa7fe9a3ac6c1b1d3bd86a9a82dfc58 SHA512 b8c2e2ac772b7b730f8b3bac7a5afb205da173b3639500606e7d1fac74832a0134027951855a2dc81af015e6158c924927ad63b9e1f2e7c823d45d4c4961c3f8
DIST mysql-boost-8.0.25.tar.gz 290265324 BLAKE2B 5393a2a2525a886d9ece19777deae01e6c0b24b9ff5a0a5ffb9075740ed912d0df59a165b6ec9ceb60c7c28f3062cda5cceb4da3a8280f42549984c846f1ce5c SHA512 af653ccff66a9d87221b46ad4f7bcc629700549f758998b9a7fb22e4573b9495a28624e031f016f9ad8fe0dfcf481b82f1ffe224aa48c2d45531570026b26081
DIST mysql-boost-8.0.26.tar.gz 291285918 BLAKE2B 6198ca8982a8c9df7e6ee4df5e2c1e0d64d2eb4d83cb7265317b58d55f6787c3240c8e40d196f2326ff3d66926ad7dab0705edd92e5a82881ce6ddb7f0c510b9 SHA512 63d47cb52407a816dc9f4330b99924624dfee46e57e7fdce19eff32909dd9e23251e2439d1807b002a1661b547173222c77465a3ca4dbb312414a84927809cfc
-DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
-DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
-DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f
-EBUILD mysql-5.7.27-r2.ebuild 31243 BLAKE2B aa4ee6c81da3bd44706da720d7fe5b374773cdffbdde47293dac9dcaa936c047cf6f257940befcd97127c34730a2982e728e2469d5d00080ba4ba5a924624842 SHA512 99ce1c2b6e278eb56ab6eaf28135eda1024b7bf9b804dcd3ad0f803de3eec3da2190e83c9a4d0ec873392ef31520ad497a11445c4facea46e823f87610badbd6
-EBUILD mysql-5.7.29-r1.ebuild 30981 BLAKE2B 388d8ed498058c273524b4bbe4b442b3b10c378131f7cee0fffa5b98e711ea75cc8a7fa13a8e87b8b057246eff298446d49b6e8078628a0b6243b33e02fd7aa4 SHA512 73eac7555ba20eb74599120c8379684e92bd0787930aa1e29b64b6af0a7adccff096531384770936beb998317c8d96f3e3be6909982904b6d22d4c765eeceffc
-EBUILD mysql-5.7.30-r1.ebuild 30275 BLAKE2B 784fd18e9808de17affd5925f06042606aadfe13df5ab40172e57bb2b5881c3bcbde381451f988125181a6eb4da2e8040276b524ac546f950a6f3c1f8115354e SHA512 7df4a9594376f0efac3534b5ceb8be9b17659379ac8569b945a2716a74afa51780a124625f0ed5c389039d80a59c6a0f7f50fc1c2128043dcd4b5cdd073d2372
-EBUILD mysql-5.7.31.ebuild 37143 BLAKE2B ba9576ecbc8e486af3dcd1b7319dbae4dec7d44c4a70ac45cdcfeb58ba4e271abf6d3695f16759c10242015ca2837e484106ccc3e0668b08fbab24b71da6e32d SHA512 edf56d1e97af8641a030a6e85a0933111ce448a345146a3a374a2ad047ade4ff8ab3bd51a6a006f53b5d486893de18b836b9351c1c96fe5a8be0ab796e67eddc
EBUILD mysql-5.7.32.ebuild 37185 BLAKE2B 13be67482bf1e3e7171b9ce7468d51c1f67dc469f61c4ec18de94548e1077bb31fb7848feecd3761b3549fb4afbfaff6a128223b0bc516b0b4601edb4729468a SHA512 e457f6cc626d3ed452d772bba59428d60eed2c40d2d7fa52a9ab91538123e332d8c86b1a1da8217f1bd81c807c459d4397d237ac04c2e22f37a2e9e775878fc9
EBUILD mysql-5.7.33.ebuild 37400 BLAKE2B 9245b583265b65125d35d6d52c317c547ded926243c0d7d430e7739c27efc2148e40c968aa55eed964c3064c4f4df82ddeacfc180d47e62e51c5707bc7984311 SHA512 dba99a3536f75fced834e3eb9da03ae5e0f026409165cf805295f216b7e3bc2d153927f7716d1cc52bf4f1f1d88fa834383a25d16ca263e036c01f07db7935f9
EBUILD mysql-5.7.34-r1.ebuild 37926 BLAKE2B e54221ee692a88622ee14de708a8b6915e094c79e8a5335f21daa31de9faad2239a7bbecf0a0f6a06454181644d4d94fd391a4ad69e1357c46dd8823f0b2bc9e SHA512 487af4a1700925a64f57317094f6dcf77a78012efb2aff8ed56996e635376ba8337c247c089ac2cb68dff229af73978d542134149a9753475656a7f9ea88cdfa
EBUILD mysql-5.7.34.ebuild 37469 BLAKE2B 3f757205809101de39ab46dc0e87c030596fbe0a716154f59c17b4e185b13763c74a334f2855715e4daeb660aadaa21684489afa68aa3dea0e1188a60e10a6ea SHA512 2dac5cf7e07e177bf7262400a7610d65e524b76bbc6e4a8270fc9a20fbe82f650790df33f0f0aa003dfa16dc6d9e24619270160e039488c5ae9915103d377e5c
EBUILD mysql-5.7.35.ebuild 38794 BLAKE2B 98fb41f3f809247823e40dcdf1a7a42d1522b22a466aa4e0049d875d7bf09fd1495e785cb637292bfb9084aac082b6cbe7bf3d6e9cf349c034ab8d93d44bcd72 SHA512 3e9ce6308bb4f0310aeed26fdfd576aba1c08380e1844b5a39162a918b29109fa653ab293c2dadd87619bab36c9a7d1077b67c79261ae1b904caceaaaf9f5ff9
-EBUILD mysql-8.0.19-r2.ebuild 37706 BLAKE2B c8c70f4ec09c2c7fbfbdc76aa6362a0c553c1b8ae8b13edd12d2f3a0a52ab12e692c13f706813d7eb9bda5f49fc9b932fc832213056bb985c2821ec86309892a SHA512 13d96f95cdf1df2367272a1c5352501a95779b8e9c411103d55f90e6035e7b4893cf208fb92e60c1cf3df3d1ab8c6ad48a89b1096705d7f126b8462915fc2998
-EBUILD mysql-8.0.20-r1.ebuild 37043 BLAKE2B e05d79b543cda0f4ad5a4f1fe9ed72dcec32382704e41aded18e57b6c8a0f85dbe71f58d30a97a9631919272c443e85d22b269d5adedd5f01a8b004f88cfccbd SHA512 4eb892d96d3177e7aa518f1fd49aa156eab70da90cce58d2e180c1e87c8b79cb45314c5a6e52185e3fa9b5566a4be8054a37d63338c9ff5d730fe81747e45737
-EBUILD mysql-8.0.21-r1.ebuild 37994 BLAKE2B ca5f8588d0acafb0a323d92922e6a98fdaa4e41bc587f9815b6afce50d03915e8e674d243952ddc6d56e93fbb2255679536ee8d982bdfea394880631819c8d1f SHA512 eab92d18be2c4d2c2192480a66ba547b7cb94b6c903c13fc4f697f2d6eae06bbdc194c4bf07beb337aebdbdcbc8e779bfdfeb0e7d8af1721521acb54c3c8129d
EBUILD mysql-8.0.22.ebuild 37433 BLAKE2B 7d047acfdde052e6745869ae3dc3536cc4f6d171bc04c18aaf7ce7773f2bb840f3b826ed091d6b89aa0af1167e372aa6fdcae0328a9591eb0de0e74465f9aea8 SHA512 2e7cb6a55376f03757e14d08801be88ac07ca7ec7d2afa23c73da44cd72a9f7a02212f310176de4fae076421e363b29b29b251ec98057ad54ad7ca6ea313d3f4
EBUILD mysql-8.0.23.ebuild 37575 BLAKE2B 135ee2f924ab3b50a73ee6366ee9b84815cb81944c9be9ae48c3ed643e6f288d7b2541f6feafa3bffefa28e75b81eaead199704b93b6c3e4e02a158cea868b0b SHA512 3f0dbca7e24b4c696d5970657bb7b405878e6330a6fb26815707d5a3bee7117ab0f1434ecc799515790870544f92973a31eb871363926b5d3be4b9617484decd
EBUILD mysql-8.0.25-r1.ebuild 38788 BLAKE2B 244b3d40e9259afac98fe5fb390dea72c129ae146e084ba96c18f9d66ebc6d18816f9a41dffa9f1d320a3e27a11f88fdbfa2ebe7793c0239b7dc3ce5fd31883d SHA512 7256272c163cee93b11ad6a2d7beb17a639aec3553c7fe8082a759961c3103e3dc1cdd4faa28d3fa8d3ff4f83da08c8915a363f0e38a98d96ec22d5c151fdf69
EBUILD mysql-8.0.25.ebuild 38045 BLAKE2B 58b11ccbfa68becee5f4c4f9f9a8401a68feaa32614e0490d80f2647a05209610bffed0840b9f823060641db015fd5919ff02e5a649e08733bcaf92c7ede466e SHA512 82819be1bf26aa113b49bad38652969722988829b5e8fd97202258bc7a06a8ddd2d77ca5c4e8cdf7f50700cbb4d26c4515ef62ae8489dd0c650416f0e770d405
EBUILD mysql-8.0.26.ebuild 40492 BLAKE2B 631156f6e14886d17d0e2e424c092fcf48cd744513a070b65cbd660fdf4e5270fe34bbe5fbfd8342b34169b5117d2da1bd8c76ffd2158c5fba672afdd650f972 SHA512 158c1d69f43469aeac5a535cc04b1e9214e32b302256965976824b7c51789dcec50027efb247184d70dedced94dfd2c288255ab407d3e0f8a6c64aaa1bdb5f65
-MISC metadata.xml 1361 BLAKE2B 4278a7c906a3a6a125dd1bb85e1421c6b2ec8c9dfe8ff7139e00aa8b81f653035be2619f9f88311085f29e83c68e2c17c6686ce22a995cf81170abf808112ff1 SHA512 53c23d4505d6cf7e41b79569737a53dc3f499364f3395185880bc47056a2b9e33eaeb84dc28d023574d9de72ca3b1051a2f5723e8cfb94d86869b6af6ecebcc0
+MISC metadata.xml 1265 BLAKE2B ce4c9d4870ab4915abe269b27cba4854c0b5d1f44683ef6e9ed5ad7eb17e0e89b9f0b5ecce77477819afc16d9b769de4d084457b4a10032969d53dd093af209a SHA512 1cd8b25e9f1979ef95babf5a506b3978569e341a031b9e4d52b383166f3311310934338747b05363e11bcdf61f3c76f6a4eff62f7ed949bc151c1ed3c93dae42
diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index d2c76395be36..d24d13207210 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -21,6 +21,5 @@ dev-db/mariadb
<flag name="server">Build the server program</flag>
<flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag>
<flag name="test">Install upstream testsuites for end use.</flag>
- <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag>
</use>
</pkgmetadata>
diff --git a/dev-db/mysql/mysql-5.7.27-r2.ebuild b/dev-db/mysql/mysql-5.7.27-r2.ebuild
deleted file mode 100644
index e1cf579b3c79..000000000000
--- a/dev-db/mysql/mysql-5.7.27-r2.ebuild
+++ /dev/null
@@ -1,995 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20190822-1908Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit cmake-utils eutils flag-o-matic linux-info \
- prefix toolchain-funcs multilib-minimal
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
- https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
- http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.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"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
- selinux +server static static-libs systemtap tcmalloc test yassl"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-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}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
- "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
- "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7.26-without-clientlibs-tools.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.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="net-misc/curl:=
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- sys-libs/ncurses:0=
- client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
- !client-libs? (
- dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
- >=sys-libs/zlib-1.2.3:0=
- )
- jemalloc? ( dev-libs/jemalloc:0= )
- kernel_linux? (
- dev-libs/libaio:0=
- sys-process/procps:0=
- )
- server? (
- >=app-arch/lz4-0_p131:=
- cjk? ( app-text/mecab:= )
- experimental? (
- dev-libs/libevent:=
- dev-libs/protobuf:=
- net-libs/libtirpc:=
- )
- numa? ( sys-process/numactl )
- )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- !yassl? (
- client-libs? (
- >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
- )
- !client-libs? (
- >=dev-libs/openssl-1.0.0:0=
- )
- )
-"
-DEPEND="${COMMON_DEPEND}
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- dev-libs/protobuf
- virtual/yacc
- server? (
- dev-libs/libevent
- experimental? ( net-libs/rpcsvc-proto )
- )
- static? ( sys-libs/ncurses[static-libs] )
- test? (
- acct-group/mysql acct-user/mysql
- dev-perl/JSON
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- !dev-db/mysql:0
- !dev-db/mysql:8.0
- client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
- selinux? ( sec-policy/selinux-mysql )
- server? (
- !prefix? (
- acct-group/mysql acct-user/mysql
- dev-db/mysql-init-scripts
- )
- )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
- 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_pretend() {
- if use numa ; then
- local CONFIG_CHECK="~NUMA"
-
- local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
- WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
- check_extra_config
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- # 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
-
- 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
-}
-
-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")
- 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 [[ -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
- fi
-
- # Note about configuration change
- einfo
- elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
- elog "to several files in /etc/mysql/mysql.d."
- elog "Please backup any changes you made to /etc/mysql/my.cnf"
- elog "and add them as a new file under /etc/mysql/mysql.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 appropriate section headers, i.e. [mysqld]."
- einfo
-}
-
-src_unpack() {
- unpack ${A}
- # Grab the patches
- [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
- mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
- cmake-utils_src_prepare
-
- if use jemalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- if use tcmalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
- if [[ -d "${S}/support-files/SELinux" ]] ; then
- echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
- fi
-
- # Remove bundled libs so we cannot accidentally use them
- # We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
- rm -rv \
- "${S}"/extra/protobuf \
- "${S}"/extra/libevent \
- "${S}"/zlib \
- || die
-
- # Don't clash with dev-db/mysql-connector-c
- rm \
- man/my_print_defaults.1 \
- man/perror.1 \
- man/zlib_decompress.1 \
- || die
-
- sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-}
-
-src_configure() {
- # 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
-
- if use client-libs ; then
- multilib-minimal_src_configure
- else
- multilib_src_configure
- fi
-}
-
-multilib_src_configure() {
- debug-print-function ${FUNCNAME} "$@"
-
- if ! multilib_is_native_abi && ! use client-libs ; then
- return
- fi
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -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/mysql
- -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
- -DINSTALL_SCRIPTDIR=share/mysql/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- ### TODO: make this system but issues with UTF-8 prevent it
- -DWITH_EDITLINE=bundled
- -DWITH_ZLIB=system
- -DWITH_LIBWRAP=0
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- # 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)
- -DWITH_CURL=system
- -DWITH_BOOST="${S}/boost"
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use yassl ; then
- mycmakeargs+=( -DWITH_SSL=system )
- else
- mycmakeargs+=( -DWITH_SSL=bundled )
- fi
-
- if ! use client-libs ; then
- mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
- fi
-
- # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
- # systemtap only works on native ABI, bug 530132
- if multilib_is_native_abi ; then
- mycmakeargs+=(
- -DENABLE_DTRACE=$(usex systemtap)
- )
- else
- mycmakeargs+=(
- -DWITHOUT_TOOLS=1
- -DWITH_READLINE=1
- -DENABLE_DTRACE=0
- )
- fi
-
- if multilib_is_native_abi && use server ; then
- mycmakeargs+=(
- -DWITH_LIBEVENT=system
- -DWITH_LZ4=system
- -DWITH_PROTOBUF=system
- -DWITH_MECAB=$(usex cjk system OFF)
- -DWITH_NUMA=$(usex numa ON OFF)
- -DWITH_RAPID=$(usex experimental ON OFF)
- )
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
-
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_DEBUG=$(usex debug)
- -DWITH_EMBEDDED_SERVER=OFF
- )
-
- if use profiling ; then
- # Setting to OFF doesn't work: Once set, profiling options will be added
- # to `mysqld --help` output via sql/sys_vars.cc causing
- # "main.mysqld--help-notwin" test to fail
- mycmakeargs+=( -DENABLED_PROFILING=ON )
- fi
-
- if use static ; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_EXAMPLE_STORAGE_ENGINE=0
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_FEDERATED_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_INNODB_MEMCACHED=0
- -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
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- if use client-libs ; then
- multilib-minimal_src_compile
- else
- multilib_src_compile
- fi
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-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 MySQL 5.7 for now and are believed to be
- # false positives:
- #
- local t
-
- for t in auth_sec.keyring_udf ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- # Unstable tests
- # - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
- # - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
- # - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
- for t in \
- main.xa_prepared_binlog_off \
- rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
- rpl.rpl_non_direct_stm_mixing_engines \
- ; do
- _disable_test "$t" "Unstable test"
- done
-
- for t in \
- gis.geometry_class_attri_prop \
- gis.geometry_property_function_issimple \
- gis.gis_bugs_crashes \
- gis.spatial_op_testingfunc_mix \
- gis.spatial_analysis_functions_buffer \
- gis.spatial_analysis_functions_distance \
- gis.spatial_utility_function_distance_sphere \
- gis.spatial_utility_function_simplify \
- gis.spatial_analysis_functions_centroid \
- ; do
- _disable_test "$t" "Known rounding error with latest AMD processors"
- done
-
- if use numa && use kernel_linux ; then
- # bug 584880
- if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
- for t in sys_vars.innodb_numa_interleave_basic ; do
- _disable_test "$t" "Test $t requires system with NUMA support"
- done
- fi
- fi
-
- if ! use latin1 ; then
- # The following tests will fail if DEFAULT_CHARSET
- # isn't set to latin1:
- for t in \
- binlog.binlog_mysqlbinlog_filter \
- binlog.binlog_xa_prepared_disconnect \
- funcs_1.is_columns_mysql \
- funcs_1.is_tables_mysql \
- funcs_1.is_triggers \
- innodb.innodb_pagesize_max_recordsize \
- innodb.innodb-system-table-view \
- innodb.mysqldump_max_recordsize \
- main.mysql_client_test \
- main.mysqld--help-notwin \
- main.type_string \
- main.information_schema \
- perfschema.binlog_edge_mix \
- perfschema.binlog_edge_stmt \
- rpl.rpl_xa_survive_disconnect \
- rpl.rpl_xa_survive_disconnect_lsu_off \
- rpl.rpl_xa_survive_disconnect_table \
- ; do
- _disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
- done
- fi
-
- if has_version '>=dev-libs/openssl-1.1.1' ; then
- # Tests are expecting <openssl-1.1.1 default cipher
- for t in \
- auth_sec.cert_verify \
- auth_sec.mysql_ssl_connection \
- auth_sec.openssl_cert_generation \
- auth_sec.ssl_auto_detect \
- auth_sec.ssl_mode \
- auth_sec.tls \
- binlog.binlog_grant_alter_user \
- encryption.innodb_onlinealter_encryption \
- main.grant_alter_user_qa \
- main.grant_user_lock_qa \
- main.mysql_ssl_default \
- main.openssl_1 \
- main.plugin_auth_sha256_tls \
- main.ssl \
- main.ssl_8k_key \
- main.ssl_bug75311 \
- main.ssl_ca \
- main.ssl_cipher \
- main.ssl_compress \
- main.ssl_crl \
- main.ssl_ecdh \
- main.ssl_verify_identity \
- x.connection_tls_version \
- x.connection_openssl \
- ; do
- _disable_test "$t" "Requires <dev-libs/openssl-1.1.1"
- done
- fi
-
- # Try to increase file limits to increase test coverage
- if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
- # Upper limit comes from parts.partition_* tests
- ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
- if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
- # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
- ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
- if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
- ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
- else
- einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd &>/dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-src_install() {
- local MULTILIB_WRAPPED_HEADERS
- local MULTILIB_CHOST_TOOLS
- if use client-libs ; then
- # headers with ABI specific data
- MULTILIB_WRAPPED_HEADERS=(
- /usr/include/mysql/server/my_config.h
- /usr/include/mysql/server/mysql_version.h )
-
- # wrap the config scripts
- MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
- multilib-minimal_src_install
- else
- multilib_src_install
- multilib_src_install_all
- fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-
- cmake-utils_src_install
-
- # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
- find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
- # 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-5.7" "${TMPDIR}/my.cnf" || die
- eprefixify "${TMPDIR}/my.cnf"
- doins "${TMPDIR}/my.cnf"
- insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.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
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-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 "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
- fi
-
- if [[ ! -d "${EROOT%/}/$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 http://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 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
- # 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}'" )
- 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} \
- $(use prefix || echo --user=mysql) \
- --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="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
- "${EROOT%/}/usr/bin/mysql" \
- --no-defaults \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mysql/mysql-5.7.29-r1.ebuild b/dev-db/mysql/mysql-5.7.29-r1.ebuild
deleted file mode 100644
index a68c2ae2ff7c..000000000000
--- a/dev-db/mysql/mysql-5.7.29-r1.ebuild
+++ /dev/null
@@ -1,986 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20200125-1945Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit cmake-utils eutils flag-o-matic linux-info \
- prefix toolchain-funcs multilib-minimal
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
- https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
- http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.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"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
- selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-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}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
- "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
- "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7.29-without-clientlibs-tools.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.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="net-misc/curl:=
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- sys-libs/ncurses:0=
- client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
- !client-libs? (
- dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
- >=sys-libs/zlib-1.2.3:0=
- )
- jemalloc? ( dev-libs/jemalloc:0= )
- kernel_linux? (
- dev-libs/libaio:0=
- sys-process/procps:0=
- )
- server? (
- >=app-arch/lz4-0_p131:=
- cjk? ( app-text/mecab:= )
- experimental? (
- dev-libs/libevent:=
- dev-libs/protobuf:=
- net-libs/libtirpc:=
- )
- numa? ( sys-process/numactl )
- )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- client-libs? (
- >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
- )
- !client-libs? (
- >=dev-libs/openssl-1.0.0:0=
- )
-"
-DEPEND="${COMMON_DEPEND}
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- dev-libs/protobuf
- virtual/yacc
- server? (
- dev-libs/libevent
- experimental? ( net-libs/rpcsvc-proto )
- )
- static? ( sys-libs/ncurses[static-libs] )
- test? (
- acct-group/mysql acct-user/mysql
- dev-perl/JSON
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- !dev-db/mysql:0
- !dev-db/mysql:8.0
- client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
- selinux? ( sec-policy/selinux-mysql )
- server? (
- !prefix? (
- acct-group/mysql acct-user/mysql
- dev-db/mysql-init-scripts
- )
- )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
- 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_pretend() {
- if use numa ; then
- local CONFIG_CHECK="~NUMA"
-
- local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
- WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
- check_extra_config
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- # 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
-
- 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
-}
-
-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")
- 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 [[ -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
- fi
-
- # Note about configuration change
- einfo
- elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
- elog "to several files in /etc/mysql/mysql.d."
- elog "Please backup any changes you made to /etc/mysql/my.cnf"
- elog "and add them as a new file under /etc/mysql/mysql.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 appropriate section headers, i.e. [mysqld]."
- einfo
-}
-
-src_unpack() {
- unpack ${A}
- # Grab the patches
- [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
- mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
- cmake-utils_src_prepare
-
- if use jemalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- if use tcmalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
- if [[ -d "${S}/support-files/SELinux" ]] ; then
- echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
- fi
-
- # Remove bundled libs so we cannot accidentally use them
- # We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
- rm -rv \
- "${S}"/extra/protobuf \
- "${S}"/extra/libevent \
- "${S}"/zlib \
- || die
-
- # Don't clash with dev-db/mysql-connector-c
- rm \
- man/my_print_defaults.1 \
- man/perror.1 \
- man/zlib_decompress.1 \
- || die
-
- sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-}
-
-src_configure() {
- # 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
-
- if use client-libs ; then
- multilib-minimal_src_configure
- else
- multilib_src_configure
- fi
-}
-
-multilib_src_configure() {
- debug-print-function ${FUNCNAME} "$@"
-
- if ! multilib_is_native_abi && ! use client-libs ; then
- return
- fi
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -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/mysql
- -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
- -DINSTALL_SCRIPTDIR=share/mysql/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- ### TODO: make this system but issues with UTF-8 prevent it
- -DWITH_EDITLINE=bundled
- -DWITH_ZLIB=system
- -DWITH_SSL=system
- -DWITH_LIBWRAP=0
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- # 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)
- -DWITH_CURL=system
- -DWITH_BOOST="${S}/boost"
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use client-libs ; then
- mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
- fi
-
- # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
- # systemtap only works on native ABI, bug 530132
- if multilib_is_native_abi ; then
- mycmakeargs+=(
- -DENABLE_DTRACE=$(usex systemtap)
- )
- else
- mycmakeargs+=(
- -DWITHOUT_TOOLS=1
- -DWITH_READLINE=1
- -DENABLE_DTRACE=0
- )
- fi
-
- if multilib_is_native_abi && use server ; then
- mycmakeargs+=(
- -DWITH_LIBEVENT=system
- -DWITH_LZ4=system
- -DWITH_PROTOBUF=system
- -DWITH_MECAB=$(usex cjk system OFF)
- -DWITH_NUMA=$(usex numa ON OFF)
- -DWITH_RAPID=$(usex experimental ON OFF)
- )
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
-
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_DEBUG=$(usex debug)
- -DWITH_EMBEDDED_SERVER=OFF
- )
-
- if use profiling ; then
- # Setting to OFF doesn't work: Once set, profiling options will be added
- # to `mysqld --help` output via sql/sys_vars.cc causing
- # "main.mysqld--help-notwin" test to fail
- mycmakeargs+=( -DENABLED_PROFILING=ON )
- fi
-
- if use static ; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_EXAMPLE_STORAGE_ENGINE=0
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_FEDERATED_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_INNODB_MEMCACHED=0
- -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
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- if use client-libs ; then
- multilib-minimal_src_compile
- else
- multilib_src_compile
- fi
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-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 MySQL 5.7 for now and are believed to be
- # false positives:
- #
- local t
-
- for t in auth_sec.keyring_udf ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- # Unstable tests
- # - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
- # - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
- # - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
- for t in \
- main.xa_prepared_binlog_off \
- rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
- rpl.rpl_non_direct_stm_mixing_engines \
- ; do
- _disable_test "$t" "Unstable test"
- done
-
- for t in \
- gis.geometry_class_attri_prop \
- gis.geometry_property_function_issimple \
- gis.gis_bugs_crashes \
- gis.spatial_op_testingfunc_mix \
- gis.spatial_analysis_functions_buffer \
- gis.spatial_analysis_functions_distance \
- gis.spatial_utility_function_distance_sphere \
- gis.spatial_utility_function_simplify \
- gis.spatial_analysis_functions_centroid \
- ; do
- _disable_test "$t" "Known rounding error with latest AMD processors"
- done
-
- if use numa && use kernel_linux ; then
- # bug 584880
- if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
- for t in sys_vars.innodb_numa_interleave_basic ; do
- _disable_test "$t" "Test $t requires system with NUMA support"
- done
- fi
- fi
-
- if ! use latin1 ; then
- # The following tests will fail if DEFAULT_CHARSET
- # isn't set to latin1:
- for t in \
- binlog.binlog_mysqlbinlog_filter \
- binlog.binlog_xa_prepared_disconnect \
- funcs_1.is_columns_mysql \
- funcs_1.is_tables_mysql \
- funcs_1.is_triggers \
- innodb.innodb_pagesize_max_recordsize \
- innodb.innodb-system-table-view \
- innodb.mysqldump_max_recordsize \
- main.mysql_client_test \
- main.mysqld--help-notwin \
- main.type_string \
- main.information_schema \
- perfschema.binlog_edge_mix \
- perfschema.binlog_edge_stmt \
- rpl.rpl_xa_survive_disconnect \
- rpl.rpl_xa_survive_disconnect_lsu_off \
- rpl.rpl_xa_survive_disconnect_table \
- ; do
- _disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
- done
- fi
-
- if has_version '>=dev-libs/openssl-1.1.1' ; then
- # Tests are expecting <openssl-1.1.1 default cipher
- for t in \
- auth_sec.cert_verify \
- auth_sec.mysql_ssl_connection \
- auth_sec.openssl_cert_generation \
- auth_sec.ssl_auto_detect \
- auth_sec.ssl_mode \
- auth_sec.tls \
- binlog.binlog_grant_alter_user \
- encryption.innodb_onlinealter_encryption \
- main.grant_alter_user_qa \
- main.grant_user_lock_qa \
- main.mysql_ssl_default \
- main.openssl_1 \
- main.plugin_auth_sha256_tls \
- main.ssl \
- main.ssl_8k_key \
- main.ssl_bug75311 \
- main.ssl_ca \
- main.ssl_cipher \
- main.ssl_compress \
- main.ssl_crl \
- main.ssl_ecdh \
- main.ssl_verify_identity \
- x.connection_tls_version \
- x.connection_openssl \
- ; do
- _disable_test "$t" "Requires <dev-libs/openssl-1.1.1"
- done
- fi
-
- # Try to increase file limits to increase test coverage
- if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
- # Upper limit comes from parts.partition_* tests
- ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
- if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
- # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
- ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
- if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
- ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
- else
- einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd &>/dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-src_install() {
- local MULTILIB_WRAPPED_HEADERS
- local MULTILIB_CHOST_TOOLS
- if use client-libs ; then
- # headers with ABI specific data
- MULTILIB_WRAPPED_HEADERS=(
- /usr/include/mysql/server/my_config.h
- /usr/include/mysql/server/mysql_version.h )
-
- # wrap the config scripts
- MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
- multilib-minimal_src_install
- else
- multilib_src_install
- multilib_src_install_all
- fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-
- cmake-utils_src_install
-
- # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
- find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
- # 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-5.7" "${TMPDIR}/my.cnf" || die
- eprefixify "${TMPDIR}/my.cnf"
- doins "${TMPDIR}/my.cnf"
- insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.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
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-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 "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
- fi
-
- if [[ ! -d "${EROOT%/}/$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 http://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 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
- # 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}'" )
- 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} \
- $(use prefix || echo --user=mysql) \
- --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="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
- "${EROOT%/}/usr/bin/mysql" \
- --no-defaults \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mysql/mysql-5.7.30-r1.ebuild b/dev-db/mysql/mysql-5.7.30-r1.ebuild
deleted file mode 100644
index 8df5b377bb6f..000000000000
--- a/dev-db/mysql/mysql-5.7.30-r1.ebuild
+++ /dev/null
@@ -1,977 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit cmake-utils eutils flag-o-matic linux-info \
- prefix toolchain-funcs multilib-minimal
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.30-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
- https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
- http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
- ${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
- selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-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"
-
-# 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="net-misc/curl:=
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- sys-libs/ncurses:0=
- client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
- !client-libs? (
- dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
- >=sys-libs/zlib-1.2.3:0=
- )
- jemalloc? ( dev-libs/jemalloc:0= )
- kernel_linux? (
- dev-libs/libaio:0=
- sys-process/procps:0=
- )
- server? (
- >=app-arch/lz4-0_p131:=
- cjk? ( app-text/mecab:= )
- experimental? (
- dev-libs/libevent:=
- dev-libs/protobuf:=
- net-libs/libtirpc:=
- )
- numa? ( sys-process/numactl )
- )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- client-libs? (
- >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
- )
- !client-libs? (
- >=dev-libs/openssl-1.0.0:0=
- )
-"
-DEPEND="${COMMON_DEPEND}
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- dev-libs/protobuf
- virtual/yacc
- server? (
- dev-libs/libevent
- experimental? ( net-libs/rpcsvc-proto )
- )
- static? ( sys-libs/ncurses[static-libs] )
- test? (
- acct-group/mysql acct-user/mysql
- dev-perl/JSON
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- !dev-db/mysql:0
- !dev-db/mysql:8.0
- client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
- selinux? ( sec-policy/selinux-mysql )
- server? (
- !prefix? (
- acct-group/mysql acct-user/mysql
- dev-db/mysql-init-scripts
- )
- )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
- 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_pretend() {
- if use numa ; then
- local CONFIG_CHECK="~NUMA"
-
- local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
- WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
- check_extra_config
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- # 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
-
- 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
-}
-
-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")
- 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 [[ -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
- fi
-
- # Note about configuration change
- einfo
- elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
- elog "to several files in /etc/mysql/mysql.d."
- elog "Please backup any changes you made to /etc/mysql/my.cnf"
- elog "and add them as a new file under /etc/mysql/mysql.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 appropriate section headers, i.e. [mysqld]."
- einfo
-}
-
-src_unpack() {
- unpack ${A}
-
- mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
- eapply "${WORKDIR}"/mysql-patches
-
- cmake-utils_src_prepare
-
- if use jemalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- if use tcmalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
- if [[ -d "${S}/support-files/SELinux" ]] ; then
- echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
- fi
-
- # Remove bundled libs so we cannot accidentally use them
- # We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
- rm -rv \
- "${S}"/extra/protobuf \
- "${S}"/extra/libevent \
- "${S}"/zlib \
- || die
-
- # Don't clash with dev-db/mysql-connector-c
- rm \
- man/my_print_defaults.1 \
- man/perror.1 \
- man/zlib_decompress.1 \
- || die
-
- sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-}
-
-src_configure() {
- # 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
-
- if use client-libs ; then
- multilib-minimal_src_configure
- else
- multilib_src_configure
- fi
-}
-
-multilib_src_configure() {
- debug-print-function ${FUNCNAME} "$@"
-
- if ! multilib_is_native_abi && ! use client-libs ; then
- return
- fi
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -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/mysql
- -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
- -DINSTALL_SCRIPTDIR=share/mysql/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- ### TODO: make this system but issues with UTF-8 prevent it
- -DWITH_EDITLINE=bundled
- -DWITH_ZLIB=system
- -DWITH_SSL=system
- -DWITH_LIBWRAP=0
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- # 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)
- -DWITH_CURL=system
- -DWITH_BOOST="${S}/boost"
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use client-libs ; then
- mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
- fi
-
- # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
- # systemtap only works on native ABI, bug 530132
- if multilib_is_native_abi ; then
- mycmakeargs+=(
- -DENABLE_DTRACE=$(usex systemtap)
- )
- else
- mycmakeargs+=(
- -DWITHOUT_TOOLS=1
- -DWITH_READLINE=1
- -DENABLE_DTRACE=0
- )
- fi
-
- if multilib_is_native_abi && use server ; then
- mycmakeargs+=(
- -DWITH_LIBEVENT=system
- -DWITH_LZ4=system
- -DWITH_PROTOBUF=system
- -DWITH_MECAB=$(usex cjk system OFF)
- -DWITH_NUMA=$(usex numa ON OFF)
- -DWITH_RAPID=$(usex experimental ON OFF)
- )
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
-
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_DEBUG=$(usex debug)
- -DWITH_EMBEDDED_SERVER=OFF
- )
-
- if use profiling ; then
- # Setting to OFF doesn't work: Once set, profiling options will be added
- # to `mysqld --help` output via sql/sys_vars.cc causing
- # "main.mysqld--help-notwin" test to fail
- mycmakeargs+=( -DENABLED_PROFILING=ON )
- fi
-
- if use static ; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_EXAMPLE_STORAGE_ENGINE=0
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_FEDERATED_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_INNODB_MEMCACHED=0
- -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
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- if use client-libs ; then
- multilib-minimal_src_compile
- else
- multilib_src_compile
- fi
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-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 MySQL 5.7 for now and are believed to be
- # false positives:
- #
- local t
-
- for t in auth_sec.keyring_udf ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- # Unstable tests
- # - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
- # - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
- # - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
- for t in \
- main.xa_prepared_binlog_off \
- rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
- rpl.rpl_non_direct_stm_mixing_engines \
- ; do
- _disable_test "$t" "Unstable test"
- done
-
- for t in \
- gis.geometry_class_attri_prop \
- gis.geometry_property_function_issimple \
- gis.gis_bugs_crashes \
- gis.spatial_op_testingfunc_mix \
- gis.spatial_analysis_functions_buffer \
- gis.spatial_analysis_functions_distance \
- gis.spatial_utility_function_distance_sphere \
- gis.spatial_utility_function_simplify \
- gis.spatial_analysis_functions_centroid \
- main.with_recursive \
- ; do
- _disable_test "$t" "Known rounding error with latest AMD processors"
- done
-
- if ! hash zip 1>/dev/null 2>&1 ; then
- # no need to force dep app-arch/zip for one test
- _disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
- fi
-
- if use numa && use kernel_linux ; then
- # bug 584880
- if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
- for t in sys_vars.innodb_numa_interleave_basic ; do
- _disable_test "$t" "Test $t requires system with NUMA support"
- done
- fi
- fi
-
- if ! use latin1 ; then
- # The following tests will fail if DEFAULT_CHARSET
- # isn't set to latin1:
- for t in \
- binlog.binlog_mysqlbinlog_filter \
- binlog.binlog_xa_prepared_disconnect \
- funcs_1.is_columns_mysql \
- funcs_1.is_tables_mysql \
- funcs_1.is_triggers \
- innodb.innodb_pagesize_max_recordsize \
- innodb.innodb-system-table-view \
- innodb.mysqldump_max_recordsize \
- main.mysql_client_test \
- main.mysqld--help-notwin \
- main.type_string \
- main.information_schema \
- perfschema.binlog_edge_mix \
- perfschema.binlog_edge_stmt \
- rpl.rpl_xa_survive_disconnect \
- rpl.rpl_xa_survive_disconnect_lsu_off \
- rpl.rpl_xa_survive_disconnect_table \
- ; do
- _disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
- done
- fi
-
- if has_version '>=dev-libs/openssl-1.1.1' ; then
- # Tests are expecting <openssl-1.1.1 default cipher
- for t in \
- auth_sec.cert_verify \
- auth_sec.mysql_ssl_connection \
- auth_sec.openssl_cert_generation \
- auth_sec.ssl_auto_detect \
- auth_sec.ssl_mode \
- auth_sec.tls \
- binlog.binlog_grant_alter_user \
- encryption.innodb_onlinealter_encryption \
- main.grant_alter_user_qa \
- main.grant_user_lock_qa \
- main.mysql_ssl_default \
- main.openssl_1 \
- main.plugin_auth_sha256_tls \
- main.ssl \
- main.ssl_8k_key \
- main.ssl_bug75311 \
- main.ssl_ca \
- main.ssl_cipher \
- main.ssl_compress \
- main.ssl_crl \
- main.ssl_ecdh \
- main.ssl_verify_identity \
- x.connection_tls_version \
- x.connection_openssl \
- ; do
- _disable_test "$t" "Requires <dev-libs/openssl-1.1.1"
- done
- fi
-
- # Try to increase file limits to increase test coverage
- if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
- # Upper limit comes from parts.partition_* tests
- ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
- if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
- # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
- ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
- if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
- ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
- else
- einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd &>/dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-src_install() {
- local MULTILIB_WRAPPED_HEADERS
- local MULTILIB_CHOST_TOOLS
- if use client-libs ; then
- # headers with ABI specific data
- MULTILIB_WRAPPED_HEADERS=(
- /usr/include/mysql/server/my_config.h
- /usr/include/mysql/server/mysql_version.h )
-
- # wrap the config scripts
- MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
- multilib-minimal_src_install
- else
- multilib_src_install
- multilib_src_install_all
- fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
-
- cmake-utils_src_install
-
- # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
- find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
- # 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-5.7" "${TMPDIR}/my.cnf" || die
- eprefixify "${TMPDIR}/my.cnf"
- doins "${TMPDIR}/my.cnf"
- insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.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
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
- _getoptval() {
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- local cmd=(
- "${EROOT%/}/usr/bin/my_print_defaults"
- "${extra_options}"
- "${section}"
- )
- local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
- if [[ ${#results[@]} -gt 0 ]] ; then
- # When option is set multiple times only return last value
- echo "${results[-1]}"
- fi
- }
- 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 "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
- fi
-
- if [[ ! -d "${EROOT%/}/$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 "${EROOT%/}/tmp")"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see http://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 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
- # 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}'" )
- 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} \
- $(use prefix || echo --user=mysql) \
- --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="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
- "${EROOT%/}/usr/bin/mysql" \
- --no-defaults \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
deleted file mode 100644
index c5a202eecc1c..000000000000
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ /dev/null
@@ -1,1227 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
- multiprocessing prefix toolchain-funcs multilib-minimal
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.31-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
- https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
- http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
- ${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="5.7/18"
-IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
- selinux +server static static-libs systemtap tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-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"
-
-# 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="
- sys-libs/ncurses:0=
- client-libs? (
- >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
- >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
- )
- !client-libs? (
- dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
- >=sys-libs/zlib-1.2.3:0=
- >=dev-libs/openssl-1.0.0:0=
- )
- server? (
- >=app-arch/lz4-0_p131:=
- cjk? ( app-text/mecab:= )
- experimental? (
- dev-libs/libevent:=[ssl]
- dev-libs/protobuf:=
- net-libs/libtirpc:=
- )
- jemalloc? ( dev-libs/jemalloc:0= )
- kernel_linux? (
- dev-libs/libaio:0=
- sys-process/procps:0=
- )
- numa? ( sys-process/numactl )
- )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
-"
-DEPEND="${COMMON_DEPEND}
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- dev-libs/protobuf
- virtual/yacc
- server? (
- dev-libs/libevent:=[ssl]
- experimental? ( net-libs/rpcsvc-proto )
- )
- static? ( sys-libs/ncurses[static-libs] )
- test? (
- acct-group/mysql acct-user/mysql
- dev-perl/JSON
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- !dev-db/mysql:0
- !dev-db/mysql:8.0
- client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
- selinux? ( sec-policy/selinux-mysql )
- server? (
- !prefix? (
- acct-group/mysql acct-user/mysql
- dev-db/mysql-init-scripts
- )
- )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
- : ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
- : ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- : ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- : ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
- MY_DATADIR="${MY_LOCALSTATEDIR}"
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- if use server ; then
- CHECKREQS_DISK_BUILD="3G"
-
- if has test $FEATURES ; then
- CHECKREQS_DISK_BUILD="9G"
- fi
-
- check-reqs_pkg_pretend
- fi
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- CHECKREQS_DISK_BUILD="3G"
-
- if has test ${FEATURES} ; then
- CHECKREQS_DISK_BUILD="9G"
-
- # Bug #213475 - MySQL _will_ object strenuously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if ! has userpriv ${FEATURES} ; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
- [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
- && die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
- if use latin1 ; then
- # Upstream only supports tests with default charset
- die "Testing with USE=latin1 is not supported."
- fi
- fi
-
- if use kernel_linux ; then
- if use numa ; then
- linux-info_get_any_version
-
- local CONFIG_CHECK="~NUMA"
-
- local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
- WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
- check_extra_config
- fi
- fi
-
- use server && check-reqs_pkg_setup
- fi
-}
-
-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")
- 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 [[ -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
- fi
-
- # Note about configuration change
- einfo
- elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
- elog "to several files in /etc/mysql/mysql.d."
- elog "Please backup any changes you made to /etc/mysql/my.cnf"
- elog "and add them as a new file under /etc/mysql/mysql.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 appropriate section headers, i.e. [mysqld]."
- einfo
-}
-
-src_unpack() {
- unpack ${A}
-
- mv -f "${WORKDIR}/${P}" "${S}" || die
-}
-
-src_prepare() {
- eapply "${WORKDIR}"/mysql-patches
-
- if use jemalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- if use tcmalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
- if [[ -d "${S}/support-files/SELinux" ]] ; then
- echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
- fi
-
- # Remove bundled libs so we cannot accidentally use them
- # We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
- rm -rv \
- "${S}"/extra/protobuf \
- "${S}"/extra/libevent \
- "${S}"/zlib \
- || die
-
- # Don't clash with dev-db/mysql-connector-c
- rm \
- man/my_print_defaults.1 \
- man/perror.1 \
- man/zlib_decompress.1 \
- || die
-
- sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
-
- cmake_src_prepare
-}
-
-src_configure() {
- # 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
-
- if use client-libs ; then
- multilib-minimal_src_configure
- else
- multilib_src_configure
- fi
-}
-
-multilib_src_configure() {
- debug-print-function ${FUNCNAME} "$@"
-
- if ! multilib_is_native_abi && ! use client-libs ; then
- return
- fi
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -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/mysql
- -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
- -DINSTALL_SCRIPTDIR=share/mysql/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- ### TODO: make this system but issues with UTF-8 prevent it
- -DWITH_EDITLINE=bundled
- -DWITH_ZLIB=system
- -DWITH_SSL=system
- -DWITH_LIBWRAP=0
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- # 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)
- -DWITH_CURL=system
- -DWITH_BOOST="${S}/boost"
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use client-libs ; then
- mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
- fi
-
- # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
- # systemtap only works on native ABI, bug 530132
- if multilib_is_native_abi ; then
- mycmakeargs+=(
- -DENABLE_DTRACE=$(usex systemtap)
- )
- else
- mycmakeargs+=(
- -DWITHOUT_TOOLS=1
- -DWITH_READLINE=1
- -DENABLE_DTRACE=0
- )
- fi
-
- if multilib_is_native_abi && use server ; then
- mycmakeargs+=(
- -DWITH_LIBEVENT=system
- -DWITH_LZ4=system
- -DWITH_PROTOBUF=system
- -DWITH_MECAB=$(usex cjk system OFF)
- -DWITH_NUMA=$(usex numa ON OFF)
- -DWITH_RAPID=$(usex experimental ON OFF)
- )
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
-
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_DEBUG=$(usex debug)
- -DWITH_EMBEDDED_SERVER=OFF
- )
-
- if use profiling ; then
- # Setting to OFF doesn't work: Once set, profiling options will be added
- # to `mysqld --help` output via sql/sys_vars.cc causing
- # "main.mysqld--help-notwin" test to fail
- mycmakeargs+=( -DENABLED_PROFILING=ON )
- fi
-
- if use static ; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_EXAMPLE_STORAGE_ENGINE=0
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_FEDERATED_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_INNODB_MEMCACHED=0
- -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
- )
- fi
-
- cmake_src_configure
-}
-
-src_compile() {
- if use client-libs ; then
- multilib-minimal_src_compile
- else
- multilib_src_compile
- fi
-}
-
-multilib_src_compile() {
- cmake_src_compile
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='latin1 perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-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
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
- if [[ -z "${MTR_PARALLEL}" ]] ; then
- local -x MTR_PARALLEL=$(makeopts_jobs)
-
- if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
- # Running multiple tests in parallel usually require higher ulimit
- # and fs.aio-max-nr setting. In addition, tests like main.multi_update
- # are known to hit timeout when system is busy.
- # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
- # using "auto".
- local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
- info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
- einfo "${info_msg}"
- unset info_msg
- MTR_PARALLEL=4
- fi
- else
- einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
- fi
-
- # 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 MySQL 5.7 for now and are believed to be
- # false positives:
- #
- local t
-
- for t in auth_sec.keyring_udf ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- # Unstable tests
- # - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
- # - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
- # - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
- for t in \
- main.xa_prepared_binlog_off \
- rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
- rpl.rpl_non_direct_stm_mixing_engines \
- ; do
- _disable_test "$t" "Unstable test"
- done
-
- for t in \
- gis.geometry_class_attri_prop \
- gis.geometry_property_function_issimple \
- gis.gis_bugs_crashes \
- gis.spatial_op_testingfunc_mix \
- gis.spatial_analysis_functions_buffer \
- gis.spatial_analysis_functions_distance \
- gis.spatial_utility_function_distance_sphere \
- gis.spatial_utility_function_simplify \
- gis.spatial_analysis_functions_centroid \
- main.with_recursive \
- ; do
- _disable_test "$t" "Known rounding error with latest AMD processors"
- done
-
- if ! hash zip 1>/dev/null 2>&1 ; then
- # no need to force dep app-arch/zip for one test
- _disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
- fi
-
- if use numa && use kernel_linux ; then
- # bug 584880
- if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
- for t in sys_vars.innodb_numa_interleave_basic ; do
- _disable_test "$t" "Test $t requires system with NUMA support"
- done
- fi
- fi
-
- if ! use latin1 ; then
- # The following tests will fail if DEFAULT_CHARSET
- # isn't set to latin1:
- for t in \
- binlog.binlog_mysqlbinlog_filter \
- binlog.binlog_xa_prepared_disconnect \
- funcs_1.is_columns_mysql \
- funcs_1.is_tables_mysql \
- funcs_1.is_triggers \
- innodb.innodb_pagesize_max_recordsize \
- innodb.innodb-system-table-view \
- innodb.mysqldump_max_recordsize \
- main.mysql_client_test \
- main.mysqld--help-notwin \
- main.type_string \
- main.information_schema \
- perfschema.binlog_edge_mix \
- perfschema.binlog_edge_stmt \
- rpl.rpl_xa_survive_disconnect \
- rpl.rpl_xa_survive_disconnect_lsu_off \
- rpl.rpl_xa_survive_disconnect_table \
- ; do
- _disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
- done
- fi
-
- if has_version '>=dev-libs/openssl-1.1.1' ; then
- # Tests are expecting <openssl-1.1.1 default cipher
- for t in \
- auth_sec.cert_verify \
- auth_sec.mysql_ssl_connection \
- auth_sec.openssl_cert_generation \
- auth_sec.ssl_auto_detect \
- auth_sec.ssl_mode \
- auth_sec.tls \
- binlog.binlog_grant_alter_user \
- encryption.innodb_onlinealter_encryption \
- main.grant_alter_user_qa \
- main.grant_user_lock_qa \
- main.mysql_ssl_default \
- main.openssl_1 \
- main.plugin_auth_sha256_tls \
- main.ssl \
- main.ssl_8k_key \
- main.ssl_bug75311 \
- main.ssl_ca \
- main.ssl_cipher \
- main.ssl_compress \
- main.ssl_crl \
- main.ssl_ecdh \
- main.ssl_verify_identity \
- x.connection_tls_version \
- x.connection_openssl \
- ; do
- _disable_test "$t" "Requires <dev-libs/openssl-1.1.1"
- done
- fi
-
- # Try to increase file limits to increase test coverage
- if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
- # Upper limit comes from parts.partition_* tests
- ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
- if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
- # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
- ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
- if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
- ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
- else
- einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd &>/dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-src_install() {
- local MULTILIB_WRAPPED_HEADERS
- local MULTILIB_CHOST_TOOLS
- if use client-libs ; then
- # headers with ABI specific data
- MULTILIB_WRAPPED_HEADERS=(
- /usr/include/mysql/server/my_config.h
- /usr/include/mysql/server/mysql_version.h )
-
- # wrap the config scripts
- MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
- multilib-minimal_src_install
- else
- multilib_src_install
- multilib_src_install_all
- fi
-}
-
-# Intentionally override eclass function
-multilib_src_install() {
- cmake_src_install
-
- # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
- find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-multilib_src_install_all() {
- # 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-5.7" "${TMPDIR}/my.cnf" || die
- eprefixify "${TMPDIR}/my.cnf"
- doins "${TMPDIR}/my.cnf"
- insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.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
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-pkg_config() {
- _getoptval() {
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- local cmd=(
- "${my_print_defaults_binary}"
- "${extra_options}"
- "${section}"
- )
- local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
- if [[ ${#results[@]} -gt 0 ]] ; then
- # When option is set multiple times only return last value
- echo "${results[-1]}"
- fi
- }
-
- _mktemp_dry() {
- # emktemp has no --dry-run option
- local template="${1}"
-
- if [[ -z "${template}" ]] ; then
- if [[ -z "${T}" ]] ; then
- template="/tmp/XXXXXXX"
- else
- template="${T}/XXXXXXX"
- fi
- fi
-
- local template_wo_X=${template//X/}
- local n_X
- let n_X=${#template}-${#template_wo_X}
- if [[ ${n_X} -lt 3 ]] ; then
- echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
- return
- fi
-
- local attempts=0
- local character tmpfile
- while [[ true ]] ; do
- let attempts=attempts+1
-
- new_file=
- while read -n1 character ; do
- if [[ "${character}" == "X" ]] ; then
- tmpfile+="${RANDOM:0:1}"
- else
- tmpfile+="${character}"
- fi
- done < <(echo -n "${template}")
-
- if [[ ! -f "${tmpfile}" ]]
- then
- echo "${tmpfile}"
- return
- fi
-
- if [[ ${attempts} -ge 100 ]] ; then
- echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
- return
- fi
- done
- }
-
- local mysqld_binary="${EROOT}/usr/sbin/mysqld"
- if [[ ! -x "${mysqld_binary}" ]] ; then
- die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
- fi
-
- local mysql_binary="${EROOT}/usr/bin/mysql"
- if [[ ! -x "${mysql_binary}" ]] ; then
- die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
- fi
-
- local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
- if [[ ! -x "${my_print_defaults_binary}" ]] ; then
- die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
- fi
-
- if [[ -z "${MYSQL_USER}" ]] ; then
- MYSQL_USER=mysql
- if use prefix ; then
- MYSQL_USER=$(id -u -n 2>/dev/null)
- if [[ -z "${MYSQL_USER}" ]] ; then
- die "Failed to determine current username!"
- fi
- fi
- fi
-
- if [[ -z "${MYSQL_GROUP}" ]] ; then
- MYSQL_GROUP=mysql
- if use prefix ; then
- MYSQL_GROUP=$(id -g -n 2>/dev/null)
- if [[ -z "${MYSQL_GROUP}" ]] ; then
- die "Failed to determine current user groupname!"
- fi
- fi
- fi
-
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- local -x HOME="${EROOT}/root"
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Read currently set data directory
- MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
- # 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 "${MY_DATADIR}" ]] ; then
- die "Sorry, unable to find MY_DATADIR!"
- elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
- ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
- ewarn "Please rename or delete its content if you wish to initialize a new data directory."
- die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
- fi
-
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
- MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
- # These are dir+prefix
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
- # Create missing directories.
- # Always check if mysql user can write to directory even if we just
- # created directory because a parent directory might be not
- # accessible for that user.
- PID_DIR="${EROOT}/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]] ; then
- einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
- install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
- || die "Failed to create PID directory '${PID_DIR}'!"
- fi
-
- local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_pid_dir_testfile}" ]] \
- && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_pid_dir_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
- else
- rm "${_pid_dir_testfile}" || die
- unset _pid_dir_testfile
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]] ; then
- einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
- || die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
- fi
-
- local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_datadir_testfile}" ]] \
- && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_datadir_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
- else
- rm "${_my_datadir_testfile}" || die
- unset _my_datadir_testfile
- fi
-
- if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
- einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
- || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
- fi
-
- if [[ -z "${MYSQL_TMPDIR}" ]] ; then
- MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
- [[ -z "${MYSQL_TMPDIR}" ]] \
- && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
- mkdir "${MYSQL_TMPDIR}" || die
- chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
- fi
-
- # Now we need to test MYSQL_TMPDIR...
- local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_tmpdir_testfile}" ]] \
- && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_tmpdir_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
- else
- rm "${_my_tmpdir_testfile}" || die
- unset _my_tmpdir_testfile
- fi
-
- if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
- einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
- || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
- fi
-
- if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
- local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_logbin_testfile}" ]] \
- && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_logbin_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
- else
- rm "${_my_logbin_testfile}" || die
- unset _my_logbin_testfile
- fi
- fi
-
- if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
- einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
- || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
- fi
-
- if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
- local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_relaylog_testfile}" ]] \
- && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_relaylog_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
- else
- rm "${_my_relaylog_testfile}" || die
- unset _my_relaylog_testfile
- fi
- fi
-
- local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
- if [[ -z "${mysql_install_log}" ]] ; then
- die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
- else
- # make sure file is writable for MYSQL_USER...
- touch "${mysql_install_log}" || die
- chown ${MYSQL_USER} "${mysql_install_log}" || die
- fi
-
- local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
- if [[ -z "${mysqld_logfile}" ]] ; then
- die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
- else
- # make sure file is writable for MYSQL_USER...
- touch "${mysqld_logfile}" || die
- chown ${MYSQL_USER} "${mysqld_logfile}" || die
- fi
-
- echo ""
- einfo "Detected settings:"
- einfo "=================="
- einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
- einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
- einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
- einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
- if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
- einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
- fi
-
- if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
- einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
- fi
-
- einfo "PID DIR:\t\t\t\t${PID_DIR}"
- einfo "Install db log:\t\t\t${mysql_install_log}"
- einfo "Install server log:\t\t\t${mysqld_logfile}"
-
- 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
-
- if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
- local pwd1="a"
- local pwd2="b"
-
- echo
- einfo "No password for mysql 'root' user was specified via environment"
- einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
- einfo "file like '${HOME}/.my.cnf'."
- einfo "To continue please provide a password for the mysql 'root' user"
- einfo "now on console:"
- ewarn "NOTE: Please 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
-
- echo
- fi
-
- local -a mysqld_options
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see http://bugs.mysql.com/bug.php?id=31312
- use prefix && mysqld_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
-
- local opt optexp optfull
- for opt in 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}" && mysqld_options+=( "${optfull}" )
- done
-
- # Prepare timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
- [[ -z "${tz_sql}" ]] \
- && die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
- echo "USE mysql;" >"${tz_sql}"
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
- if [[ $? -ne 0 ]] ; then
- die "mysql_tzinfo_to_sql failed!"
- fi
-
- # --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=(
- "${mysqld_binary}"
- "${mysqld_options[@]}"
- "--initialize-insecure"
- "--init-file='${tz_sql}'"
- "--basedir='${EROOT}/usr'"
- "--datadir='${MY_DATADIR}'"
- "--tmpdir='${MYSQL_TMPDIR}'"
- "--log-error='${mysql_install_log}'"
- "--user=${MYSQL_USER}"
- )
-
- einfo "Initializing ${PN} data directory: ${cmd[@]}"
- eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
- if [[ $? -ne 0 ]] ; then
- grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
- die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
- fi
-
- rm "${tz_sql}" || die
-
- local x=${RANDOM}
- local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
- local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
- unset x
-
- cmd=(
- "${mysqld_binary}"
- "${mysqld_options[@]}"
- "--basedir='${EROOT}/usr'"
- "--datadir='${MY_DATADIR}'"
- "--tmpdir='${MYSQL_TMPDIR}'"
- --max_allowed_packet=8M
- --net_buffer_length=16K
- "--socket='${socket}'"
- "--pid-file='${pidfile}'"
- "--log-error='${mysqld_logfile}'"
- "--user=${MYSQL_USER}"
- )
-
- einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
- eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
- echo -n "Waiting for mysqld to accept connections "
- local maxtry=15
- while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
-
- if [[ -S "${socket}" ]] ; then
- # Even with a socket we don't know if mysqld will abort
- # start due to an error so just wait a little bit more...
- maxtry=5
- while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- fi
-
- echo
-
- if [[ ! -S "${socket}" ]] ; then
- grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
- die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
- fi
-
- local mysql_logfile="${TMPDIR}/set_root_pw.log"
- touch "${mysql_logfile}" || die
-
- 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 BY '${MYSQL_ROOT_PASSWORD}'"
- cmd=(
- "${mysql_binary}"
- --no-defaults
- "--socket='${socket}'"
- -hlocalhost
- "-e \"${sql}\""
- )
- eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
- local rc=$?
- eend ${rc}
-
- if [[ ${rc} -ne 0 ]] ; then
- # Poor man's solution which tries to avoid having password
- # in log. NOTE: sed can fail if user didn't follow advice
- # and included character which will require escaping...
- sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
- grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
- die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
- fi
-
- # Stop the server
- if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
- echo -n "Stopping the server "
- pkill -F "${pidfile}" &>/dev/null
-
- maxtry=10
- while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
-
- echo
-
- if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
- # We somehow failed to stop server.
- # However, not a fatal error. Just warn the user.
- ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
- fi
- fi
-
- einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}
diff --git a/dev-db/mysql/mysql-8.0.19-r2.ebuild b/dev-db/mysql/mysql-8.0.19-r2.ebuild
deleted file mode 100644
index f979bb9020ff..000000000000
--- a/dev-db/mysql/mysql-8.0.19-r2.ebuild
+++ /dev/null
@@ -1,1160 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-MY_EXTRAS_VER="20200317-0103Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit cmake-utils flag-o-matic linux-info \
- multiprocessing prefix toolchain-funcs check-reqs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
- https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
- http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.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"
-fi
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
- router selinux +server tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
- cjk? ( server )
- jemalloc? ( server )
- numa? ( server )
- profiling? ( server )
- router? ( server )
- tcmalloc? ( server )"
-
-KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-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}"/20001_all_fix-minimal-build-cmake-mysql-8.0.17.patch
- "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-8.0.18.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-without-clientlibs-tools.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-fix-events_bugs-test.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- >=app-arch/lz4-0_p131:=
- sys-libs/ncurses:0=
- >=sys-libs/zlib-1.2.3:0=
- >=dev-libs/openssl-1.0.0:0=
- server? (
- dev-libs/icu:=
- dev-libs/libevent:=
- >=dev-libs/protobuf-3.8:=
- net-libs/libtirpc:=
- cjk? ( app-text/mecab:= )
- jemalloc? ( dev-libs/jemalloc:0= )
- kernel_linux? (
- dev-libs/libaio:0=
- sys-process/procps:0=
- )
- numa? ( sys-process/numactl )
- tcmalloc? ( dev-util/google-perftools:0= )
- )
-"
-DEPEND="${COMMON_DEPEND}
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- virtual/yacc
- server? ( net-libs/rpcsvc-proto )
- test? (
- acct-group/mysql acct-user/mysql
- dev-perl/JSON
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- !dev-db/mysql:0
- !dev-db/mysql:5.7
- selinux? ( sec-policy/selinux-mysql )
- !prefix? (
- acct-group/mysql acct-user/mysql
- dev-db/mysql-init-scripts
- )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-CHECKREQS_DISK_BUILD="8G"
-
-mysql_init_vars() {
- : ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
- : ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- : ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- : ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
- MY_DATADIR="${MY_LOCALSTATEDIR}"
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_pretend() {
- [[ ${MERGE_TYPE} == binary ]] && return
- use server && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if has test ${FEATURES} ; then
- # Bug #213475 - MySQL _will_ object strenuously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if ! has userpriv ${FEATURES} ; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
- [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
- && die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
- if use latin1 ; then
- # Upstream only supports tests with default charset
- die "Testing with USE=latin1 is not supported."
- fi
- fi
-
- if use kernel_linux ; then
- if use numa ; then
- linux-info_get_any_version
-
- local CONFIG_CHECK="~NUMA"
-
- local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
- WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
- check_extra_config
- fi
- fi
-
- use server && check-reqs_pkg_setup
-}
-
-src_unpack() {
- unpack ${A}
-
- # Grab the patches
- [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
-
- mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
- # Avoid rpm call which would trigger sandbox, #692368
- sed -i \
- -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
- CMakeLists.txt || die
-
- if use jemalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- if use tcmalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
- if [[ -d "${S}/support-files/SELinux" ]] ; then
- echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
- fi
-
- # Remove man pages for client-lib tools we don't install
- rm \
- man/my_print_defaults.1 \
- man/perror.1 \
- man/zlib_decompress.1 \
- || die
-
- cmake-utils_src_prepare
-}
-
-src_configure() {
- # 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')"
- -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/mysql
- -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
- -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- # Using bundled editline to get CTRL+C working
- -DWITH_EDITLINE=bundled
- -DWITH_ZLIB=system
- -DWITH_SSL=system
- -DWITH_LIBWRAP=0
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- # 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)
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DWITH_CURL=system
- -DWITH_BOOST="${S}/boost"
- -DWITH_ROUTER=$(usex router ON OFF)
- )
-
- if is-flagq -fno-lto ; then
- einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
- mycmakeargs+=( -DWITH_LTO=OFF )
- elif is-flagq -flto ; then
- einfo "LTO forced via {C,CXX,F,FC}FLAGS"
- myconf+=( -DWITH_LTO=ON )
- else
- # Disable automagic
- myconf+=( -DWITH_LTO=OFF )
- fi
-
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
- mycmakeargs+=(
- -DWITH_ICU=system
- -DWITH_LZ4=system
- # Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
- -DWITH_RAPIDJSON=bundled
- )
-
- 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."
- ewarn "Tests will probably fail!"
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
- elif use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8mb4
- -DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
- )
- fi
-
- if use server ; then
- mycmakeargs+=(
- -DWITH_EXTRA_CHARSETS=all
- -DWITH_DEBUG=$(usex debug)
- -DWITH_MECAB=$(usex cjk system OFF)
- -DWITH_LIBEVENT=system
- -DWITH_PROTOBUF=system
- -DWITH_NUMA=$(usex numa ON OFF)
- )
-
- if use profiling ; then
- # Setting to OFF doesn't work: Once set, profiling options will be added
- # to `mysqld --help` output via sql/sys_vars.cc causing
- # "main.mysqld--help-notwin" test to fail
- mycmakeargs+=( -DENABLED_PROFILING=ON )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_EXAMPLE_STORAGE_ENGINE=0
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_FEDERATED_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_INNODB_MEMCACHED=0
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- )
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DWITH_SYSTEMD=no
- )
- fi
-
- cmake-utils_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
- _disable_test() {
- local rawtestname bug reason
- rawtestname="${1}" ; shift
- bug="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
- echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
- if [[ -z "${MTR_PARALLEL}" ]] ; then
- local -x MTR_PARALLEL=$(makeopts_jobs)
-
- if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
- # Running multiple tests in parallel usually require higher ulimit
- # and fs.aio-max-nr setting. In addition, tests like main.multi_update
- # are known to hit timeout when system is busy.
- # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
- # using "auto".
- local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
- info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
- einfo "${info_msg}"
- unset info_msg
- MTR_PARALLEL=4
- fi
- else
- einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
- fi
-
- # 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"
-
- local -a disabled_tests
- disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
- disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
- disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
- disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
- disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
- disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
- disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
- disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
- disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
- disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
-
- local test_infos_str test_infos_arr
- for test_infos_str in "${disabled_tests[@]}" ; do
- IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
- if [[ ${#test_infos_arr[@]} != 3 ]] ; then
- die "Invalid test data set, not matching format: ${test_infos_str}"
- fi
-
- _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
- done
- unset test_infos_str test_infos_arr
-
- # Try to increase file limits to increase test coverage
- if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
- # Upper limit comes from parts.partition_* tests
- ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
- if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
- # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
- ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
- if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
- ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
- else
- einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd &>/dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-src_install() {
- cmake-utils_src_install
-
- # 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 "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/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-5.7" "${TMPDIR}/my.cnf" || die
- eprefixify "${TMPDIR}/my.cnf"
- doins "${TMPDIR}/my.cnf"
- insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
- cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
- eprefixify "${TMPDIR}/50-distro-client.cnf"
- doins "${TMPDIR}/50-distro-client.cnf"
-
- mycnf_src="my.cnf-8.0.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|utf8mb4|latin1|g" \
- "${TMPDIR}/my.cnf.ok" || die
- fi
-
- eprefixify "${TMPDIR}/my.cnf.ok"
-
- newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
- if use router ; then
- rm -rf \
- "${ED}/usr/LICENSE.router" \
- "${ED}/usr/README.router" \
- "${ED}/usr/run" \
- "${ED}/usr/var" \
- || die
- fi
-
- # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
- find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- # NOTE: $MY_LOGDIR contains $EPREFIX by default
- [[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
- # Note about configuration change
- einfo
- elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
- elog "to several files in /etc/mysql/mysql.d."
- elog "Please backup any changes you made to /etc/mysql/my.cnf"
- elog "and add them as a new file under /etc/mysql/mysql.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 appropriate section headers, i.e. [mysqld]."
- einfo
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog " \"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- einfo
- else
- einfo
- elog "Upgrade process for ${PN}-8.x has changed. Please read"
- elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
- einfo
- fi
-}
-
-pkg_config() {
- _getoptval() {
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- local cmd=(
- "${my_print_defaults_binary}"
- "${extra_options}"
- "${section}"
- )
- local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
- if [[ ${#results[@]} -gt 0 ]] ; then
- # When option is set multiple times only return last value
- echo "${results[-1]}"
- fi
- }
-
- _mktemp_dry() {
- # emktemp has no --dry-run option
- local template="${1}"
-
- if [[ -z "${template}" ]] ; then
- if [[ -z "${T}" ]] ; then
- template="/tmp/XXXXXXX"
- else
- template="${T}/XXXXXXX"
- fi
- fi
-
- local template_wo_X=${template//X/}
- local n_X
- let n_X=${#template}-${#template_wo_X}
- if [[ ${n_X} -lt 3 ]] ; then
- echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
- return
- fi
-
- local attempts=0
- local character tmpfile
- while [[ true ]] ; do
- let attempts=attempts+1
-
- new_file=
- while read -n1 character ; do
- if [[ "${character}" == "X" ]] ; then
- tmpfile+="${RANDOM:0:1}"
- else
- tmpfile+="${character}"
- fi
- done < <(echo -n "${template}")
-
- if [[ ! -f "${tmpfile}" ]]
- then
- echo "${tmpfile}"
- return
- fi
-
- if [[ ${attempts} -ge 100 ]] ; then
- echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
- return
- fi
- done
- }
-
- local mysqld_binary="${EROOT}/usr/sbin/mysqld"
- if [[ ! -x "${mysqld_binary}" ]] ; then
- die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
- fi
-
- local mysql_binary="${EROOT}/usr/bin/mysql"
- if [[ ! -x "${mysql_binary}" ]] ; then
- die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
- fi
-
- local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
- if [[ ! -x "${my_print_defaults_binary}" ]] ; then
- die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
- fi
-
- if [[ -z "${MYSQL_USER}" ]] ; then
- MYSQL_USER=mysql
- if use prefix ; then
- MYSQL_USER=$(id -u -n 2>/dev/null)
- if [[ -z "${MYSQL_USER}" ]] ; then
- die "Failed to determine current username!"
- fi
- fi
- fi
-
- if [[ -z "${MYSQL_GROUP}" ]] ; then
- MYSQL_GROUP=mysql
- if use prefix ; then
- MYSQL_GROUP=$(id -g -n 2>/dev/null)
- if [[ -z "${MYSQL_GROUP}" ]] ; then
- die "Failed to determine current user groupname!"
- fi
- fi
- fi
-
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- local -x HOME="${EROOT}/root"
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Read currently set data directory
- MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
- # 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 "${MY_DATADIR}" ]] ; then
- die "Sorry, unable to find MY_DATADIR!"
- elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
- ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
- ewarn "Please rename or delete its content if you wish to initialize a new data directory."
- die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
- fi
-
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
- # These are dir+prefix
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
- # Create missing directories.
- # Always check if mysql user can write to directory even if we just
- # created directory because a parent directory might be not
- # accessible for that user.
- PID_DIR="${EROOT}/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]] ; then
- einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
- install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
- || die "Failed to create PID directory '${PID_DIR}'!"
- fi
-
- local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_pid_dir_testfile}" ]] \
- && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_pid_dir_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
- else
- rm "${_pid_dir_testfile}" || die
- unset _pid_dir_testfile
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]] ; then
- einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
- || die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
- fi
-
- local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_datadir_testfile}" ]] \
- && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_datadir_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
- else
- rm "${_my_datadir_testfile}" || die
- unset _my_datadir_testfile
- fi
-
- if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
- einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
- || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
- fi
-
- if [[ -z "${MYSQL_TMPDIR}" ]] ; then
- MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
- [[ -z "${MYSQL_TMPDIR}" ]] \
- && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
- mkdir "${MYSQL_TMPDIR}" || die
- chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
- fi
-
- # Now we need to test MYSQL_TMPDIR...
- local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_tmpdir_testfile}" ]] \
- && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_tmpdir_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
- else
- rm "${_my_tmpdir_testfile}" || die
- unset _my_tmpdir_testfile
- fi
-
- if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
- einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
- || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
- fi
-
- if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
- local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_logbin_testfile}" ]] \
- && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_logbin_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
- else
- rm "${_my_logbin_testfile}" || die
- unset _my_logbin_testfile
- fi
- fi
-
- if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
- einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
- || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
- fi
-
- if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
- local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_relaylog_testfile}" ]] \
- && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_relaylog_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
- else
- rm "${_my_relaylog_testfile}" || die
- unset _my_relaylog_testfile
- fi
- fi
-
- local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
- if [[ -z "${mysql_install_log}" ]] ; then
- die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
- else
- # make sure file is writable for MYSQL_USER...
- touch "${mysql_install_log}" || die
- chown ${MYSQL_USER} "${mysql_install_log}" || die
- fi
-
- local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
- if [[ -z "${mysqld_logfile}" ]] ; then
- die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
- else
- # make sure file is writable for MYSQL_USER...
- touch "${mysqld_logfile}" || die
- chown ${MYSQL_USER} "${mysqld_logfile}" || die
- fi
-
- echo ""
- einfo "Detected settings:"
- einfo "=================="
- einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
- einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
- einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
- einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
- if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
- einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
- fi
-
- if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
- einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
- fi
-
- einfo "PID DIR:\t\t\t\t${PID_DIR}"
- einfo "Install db log:\t\t\t${mysql_install_log}"
- einfo "Install server log:\t\t\t${mysqld_logfile}"
-
- local -a config_files
-
- local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
- if [[ -f "${config_file}" ]] ; then
- config_files+=( "${config_file}" )
- else
- ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
- fi
-
- config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
- if [[ -f "${config_file}" ]] ; then
- config_files+=( "${config_file}" )
- else
- ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
- fi
-
- if [[ ${#config_files[@]} -gt 0 ]] ; then
- if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
- local user_answer
-
- echo
- einfo "Please select default authentication plugin (enter number or plugin name):"
- einfo "1) caching_sha2_password [MySQL 8.0 default]"
- einfo "2) mysql_native_password [MySQL 5.7 default]"
- einfo
- einfo "For details see:"
- einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
- read -p " >" user_answer
- echo
-
- case "${user_answer}" in
- 1|caching_sha2_password)
- MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
- ;;
- 2|mysql_native_password)
- MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
- ;;
- '')
- die "No authentication plugin selected!"
- ;;
- *)
- die "Authentication plugin '${user_answer}' is unknown/unsupported!"
- ;;
- esac
-
- echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
-
- unset user_answer
- fi
-
- local cfg_option cfg_option_tabs cfg_section
- for config_file in "${config_files[@]}" ; do
- cfg_option="default-authentication-plugin"
- cfg_section="mysqld"
- cfg_option_tabs="\t\t"
- if [[ "${config_file}" == *client.cnf ]] ; then
- cfg_option="default-auth"
- cfg_section="client"
- cfg_option_tabs="\t\t\t\t"
- fi
-
- if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
- einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
- sed -i \
- -e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
- "${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
- else
- einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
- sed -i \
- -e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
- "${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
- fi
- done
- unset cfg_option cfg_option_tabs cfg_section
- fi
- unset config_files config_file
-
- echo
-
- 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
-
- if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
- local pwd1="a"
- local pwd2="b"
-
- echo
- einfo "No password for mysql 'root' user was specified via environment"
- einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
- einfo "file like '${HOME}/.my.cnf'."
- einfo "To continue please provide a password for the mysql 'root' user"
- einfo "now on console:"
- ewarn "NOTE: Please 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
-
- echo
- fi
-
- local -a mysqld_options
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see http://bugs.mysql.com/bug.php?id=31312
- use prefix && mysqld_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
-
- local opt optexp optfull
- for opt in 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}" && mysqld_options+=( "${optfull}" )
- done
-
- # Prepare timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
- [[ -z "${tz_sql}" ]] \
- && die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
- echo "USE mysql;" >"${tz_sql}"
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
- if [[ $? -ne 0 ]] ; then
- die "mysql_tzinfo_to_sql failed!"
- fi
-
- # --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=(
- "${mysqld_binary}"
- "${mysqld_options[@]}"
- "--initialize-insecure"
- "--init-file='${tz_sql}'"
- "--basedir='${EROOT}/usr'"
- "--datadir='${MY_DATADIR}'"
- "--tmpdir='${MYSQL_TMPDIR}'"
- "--log-error='${mysql_install_log}'"
- "--user=${MYSQL_USER}"
- )
-
- einfo "Initializing ${PN} data directory: ${cmd[@]}"
- eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
- if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
- grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
- die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
- fi
-
- rm "${tz_sql}" || die
-
- local x=${RANDOM}
- local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
- local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
- unset x
-
- cmd=(
- "${mysqld_binary}"
- "${mysqld_options[@]}"
- "--basedir='${EROOT}/usr'"
- "--datadir='${MY_DATADIR}'"
- "--tmpdir='${MYSQL_TMPDIR}'"
- --max_allowed_packet=8M
- --net_buffer_length=16K
- "--socket='${socket}'"
- "--pid-file='${pidfile}'"
- "--log-error='${mysqld_logfile}'"
- "--user=${MYSQL_USER}"
- )
-
- einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
- eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
- echo -n "Waiting for mysqld to accept connections "
- local maxtry=15
- while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
-
- if [[ -S "${socket}" ]] ; then
- # Even with a socket we don't know if mysqld will abort
- # start due to an error so just wait a little bit more...
- maxtry=5
- while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- fi
-
- echo
-
- if [[ ! -S "${socket}" ]] ; then
- grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
- die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
- fi
-
- local mysql_logfile="${TMPDIR}/set_root_pw.log"
- touch "${mysql_logfile}" || die
-
- 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 BY '${MYSQL_ROOT_PASSWORD}'"
- cmd=(
- "${mysql_binary}"
- --no-defaults
- "--socket='${socket}'"
- -hlocalhost
- "-e \"${sql}\""
- )
- eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
- local rc=$?
- eend ${rc}
-
- if [[ ${rc} -ne 0 ]] ; then
- # Poor man's solution which tries to avoid having password
- # in log. NOTE: sed can fail if user didn't follow advice
- # and included character which will require escaping...
- sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
- grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
- die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
- fi
-
- # Stop the server
- if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
- echo -n "Stopping the server "
- pkill -F "${pidfile}" &>/dev/null
-
- maxtry=10
- while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
-
- echo
-
- if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
- # We somehow failed to stop server.
- # However, not a fatal error. Just warn the user.
- ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
- fi
- fi
-
- einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}
diff --git a/dev-db/mysql/mysql-8.0.20-r1.ebuild b/dev-db/mysql/mysql-8.0.20-r1.ebuild
deleted file mode 100644
index 70c3c6e5e878..000000000000
--- a/dev-db/mysql/mysql-8.0.20-r1.ebuild
+++ /dev/null
@@ -1,1143 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit cmake-utils flag-o-matic linux-info \
- multiprocessing prefix toolchain-funcs check-reqs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.20-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
- https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
- http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
- ${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
- router selinux +server tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
- cjk? ( server )
- jemalloc? ( server )
- numa? ( server )
- profiling? ( server )
- router? ( server )
- tcmalloc? ( server )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-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"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- >=app-arch/lz4-0_p131:=
- sys-libs/ncurses:0=
- >=sys-libs/zlib-1.2.3:0=
- >=dev-libs/openssl-1.0.0:0=
- server? (
- dev-libs/icu:=
- dev-libs/libevent:=
- >=dev-libs/protobuf-3.8:=
- net-libs/libtirpc:=
- cjk? ( app-text/mecab:= )
- jemalloc? ( dev-libs/jemalloc:0= )
- kernel_linux? (
- dev-libs/libaio:0=
- sys-process/procps:0=
- )
- numa? ( sys-process/numactl )
- tcmalloc? ( dev-util/google-perftools:0= )
- )
-"
-DEPEND="${COMMON_DEPEND}
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- virtual/yacc
- server? ( net-libs/rpcsvc-proto )
- test? (
- acct-group/mysql acct-user/mysql
- dev-perl/JSON
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- !dev-db/mysql:0
- !dev-db/mysql:5.7
- selinux? ( sec-policy/selinux-mysql )
- !prefix? (
- acct-group/mysql acct-user/mysql
- dev-db/mysql-init-scripts
- )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-CHECKREQS_DISK_BUILD="8G"
-
-mysql_init_vars() {
- : ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
- : ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- : ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- : ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
- MY_DATADIR="${MY_LOCALSTATEDIR}"
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_pretend() {
- [[ ${MERGE_TYPE} == binary ]] && return
- use server && check-reqs_pkg_pretend
-}
-
-pkg_setup() {
- [[ ${MERGE_TYPE} == binary ]] && return
-
- if has test ${FEATURES} ; then
- # Bug #213475 - MySQL _will_ object strenuously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if ! has userpriv ${FEATURES} ; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
- [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
- && die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
- if use latin1 ; then
- # Upstream only supports tests with default charset
- die "Testing with USE=latin1 is not supported."
- fi
- fi
-
- if use kernel_linux ; then
- if use numa ; then
- linux-info_get_any_version
-
- local CONFIG_CHECK="~NUMA"
-
- local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
- WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
- check_extra_config
- fi
- fi
-
- use server && check-reqs_pkg_setup
-}
-
-src_unpack() {
- unpack ${A}
-
- mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
- eapply "${WORKDIR}"/mysql-patches
-
- eapply_user
-
- # Avoid rpm call which would trigger sandbox, #692368
- sed -i \
- -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
- CMakeLists.txt || die
-
- if use jemalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- if use tcmalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
- if [[ -d "${S}/support-files/SELinux" ]] ; then
- echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
- fi
-
- # Remove man pages for client-lib tools we don't install
- rm \
- man/my_print_defaults.1 \
- man/perror.1 \
- man/zlib_decompress.1 \
- || die
-
- cmake-utils_src_prepare
-}
-
-src_configure() {
- # 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')"
- -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/mysql
- -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
- -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- # Using bundled editline to get CTRL+C working
- -DWITH_EDITLINE=bundled
- -DWITH_ZLIB=system
- -DWITH_SSL=system
- -DWITH_LIBWRAP=0
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- # 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)
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DWITH_CURL=system
- -DWITH_BOOST="${S}/boost"
- -DWITH_ROUTER=$(usex router ON OFF)
- )
-
- if is-flagq -fno-lto ; then
- einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
- mycmakeargs+=( -DWITH_LTO=OFF )
- elif is-flagq -flto ; then
- einfo "LTO forced via {C,CXX,F,FC}FLAGS"
- myconf+=( -DWITH_LTO=ON )
- else
- # Disable automagic
- myconf+=( -DWITH_LTO=OFF )
- fi
-
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
- mycmakeargs+=(
- -DWITH_ICU=system
- -DWITH_LZ4=system
- # Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
- -DWITH_RAPIDJSON=bundled
- )
-
- 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."
- ewarn "Tests will probably fail!"
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
- elif use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8mb4
- -DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
- )
- fi
-
- if use server ; then
- mycmakeargs+=(
- -DWITH_EXTRA_CHARSETS=all
- -DWITH_DEBUG=$(usex debug)
- -DWITH_MECAB=$(usex cjk system OFF)
- -DWITH_LIBEVENT=system
- -DWITH_PROTOBUF=system
- -DWITH_NUMA=$(usex numa ON OFF)
- )
-
- if use profiling ; then
- # Setting to OFF doesn't work: Once set, profiling options will be added
- # to `mysqld --help` output via sql/sys_vars.cc causing
- # "main.mysqld--help-notwin" test to fail
- mycmakeargs+=( -DENABLED_PROFILING=ON )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_EXAMPLE_STORAGE_ENGINE=0
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_FEDERATED_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_INNODB_MEMCACHED=0
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- )
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DWITH_SYSTEMD=no
- )
- fi
-
- cmake-utils_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
- _disable_test() {
- local rawtestname bug reason
- rawtestname="${1}" ; shift
- bug="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
- echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
- if [[ -z "${MTR_PARALLEL}" ]] ; then
- local -x MTR_PARALLEL=$(makeopts_jobs)
-
- if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
- # Running multiple tests in parallel usually require higher ulimit
- # and fs.aio-max-nr setting. In addition, tests like main.multi_update
- # are known to hit timeout when system is busy.
- # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
- # using "auto".
- local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
- info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
- einfo "${info_msg}"
- unset info_msg
- MTR_PARALLEL=4
- fi
- else
- einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
- fi
-
- # 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"
-
- local -a disabled_tests
- disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
- disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
- disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
- disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
- disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
- disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
- disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
- disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
- disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
- disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
- disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
-
- if ! hash zip 1>/dev/null 2>&1 ; then
- # no need to force dep app-arch/zip for one test
- disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
- fi
-
- local test_infos_str test_infos_arr
- for test_infos_str in "${disabled_tests[@]}" ; do
- IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
- if [[ ${#test_infos_arr[@]} != 3 ]] ; then
- die "Invalid test data set, not matching format: ${test_infos_str}"
- fi
-
- _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
- done
- unset test_infos_str test_infos_arr
-
- # Try to increase file limits to increase test coverage
- if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
- # Upper limit comes from parts.partition_* tests
- ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
- if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
- # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
- ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
- if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
- ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
- else
- einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd &>/dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-src_install() {
- cmake-utils_src_install
-
- # 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 "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/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-5.7" "${TMPDIR}/my.cnf" || die
- eprefixify "${TMPDIR}/my.cnf"
- doins "${TMPDIR}/my.cnf"
- insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
- cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
- eprefixify "${TMPDIR}/50-distro-client.cnf"
- doins "${TMPDIR}/50-distro-client.cnf"
-
- mycnf_src="my.cnf-8.0.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|utf8mb4|latin1|g" \
- "${TMPDIR}/my.cnf.ok" || die
- fi
-
- eprefixify "${TMPDIR}/my.cnf.ok"
-
- newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
- if use router ; then
- rm -rf \
- "${ED}/usr/LICENSE.router" \
- "${ED}/usr/README.router" \
- "${ED}/usr/run" \
- "${ED}/usr/var" \
- || die
- fi
-
- # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
- find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- # NOTE: $MY_LOGDIR contains $EPREFIX by default
- [[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
- # Note about configuration change
- einfo
- elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
- elog "to several files in /etc/mysql/mysql.d."
- elog "Please backup any changes you made to /etc/mysql/my.cnf"
- elog "and add them as a new file under /etc/mysql/mysql.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 appropriate section headers, i.e. [mysqld]."
- einfo
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog " \"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- einfo
- else
- einfo
- elog "Upgrade process for ${PN}-8.x has changed. Please read"
- elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
- einfo
- fi
-}
-
-pkg_config() {
- _getoptval() {
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- local cmd=(
- "${my_print_defaults_binary}"
- "${extra_options}"
- "${section}"
- )
- local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
- if [[ ${#results[@]} -gt 0 ]] ; then
- # When option is set multiple times only return last value
- echo "${results[-1]}"
- fi
- }
-
- _mktemp_dry() {
- # emktemp has no --dry-run option
- local template="${1}"
-
- if [[ -z "${template}" ]] ; then
- if [[ -z "${T}" ]] ; then
- template="/tmp/XXXXXXX"
- else
- template="${T}/XXXXXXX"
- fi
- fi
-
- local template_wo_X=${template//X/}
- local n_X
- let n_X=${#template}-${#template_wo_X}
- if [[ ${n_X} -lt 3 ]] ; then
- echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
- return
- fi
-
- local attempts=0
- local character tmpfile
- while [[ true ]] ; do
- let attempts=attempts+1
-
- new_file=
- while read -n1 character ; do
- if [[ "${character}" == "X" ]] ; then
- tmpfile+="${RANDOM:0:1}"
- else
- tmpfile+="${character}"
- fi
- done < <(echo -n "${template}")
-
- if [[ ! -f "${tmpfile}" ]]
- then
- echo "${tmpfile}"
- return
- fi
-
- if [[ ${attempts} -ge 100 ]] ; then
- echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
- return
- fi
- done
- }
-
- local mysqld_binary="${EROOT}/usr/sbin/mysqld"
- if [[ ! -x "${mysqld_binary}" ]] ; then
- die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
- fi
-
- local mysql_binary="${EROOT}/usr/bin/mysql"
- if [[ ! -x "${mysql_binary}" ]] ; then
- die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
- fi
-
- local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
- if [[ ! -x "${my_print_defaults_binary}" ]] ; then
- die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
- fi
-
- if [[ -z "${MYSQL_USER}" ]] ; then
- MYSQL_USER=mysql
- if use prefix ; then
- MYSQL_USER=$(id -u -n 2>/dev/null)
- if [[ -z "${MYSQL_USER}" ]] ; then
- die "Failed to determine current username!"
- fi
- fi
- fi
-
- if [[ -z "${MYSQL_GROUP}" ]] ; then
- MYSQL_GROUP=mysql
- if use prefix ; then
- MYSQL_GROUP=$(id -g -n 2>/dev/null)
- if [[ -z "${MYSQL_GROUP}" ]] ; then
- die "Failed to determine current user groupname!"
- fi
- fi
- fi
-
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- local -x HOME="${EROOT}/root"
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Read currently set data directory
- MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
- # 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 "${MY_DATADIR}" ]] ; then
- die "Sorry, unable to find MY_DATADIR!"
- elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
- ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
- ewarn "Please rename or delete its content if you wish to initialize a new data directory."
- die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
- fi
-
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
- # These are dir+prefix
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
- # Create missing directories.
- # Always check if mysql user can write to directory even if we just
- # created directory because a parent directory might be not
- # accessible for that user.
- PID_DIR="${EROOT}/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]] ; then
- einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
- install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
- || die "Failed to create PID directory '${PID_DIR}'!"
- fi
-
- local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_pid_dir_testfile}" ]] \
- && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_pid_dir_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
- else
- rm "${_pid_dir_testfile}" || die
- unset _pid_dir_testfile
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]] ; then
- einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
- || die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
- fi
-
- local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_datadir_testfile}" ]] \
- && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_datadir_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
- else
- rm "${_my_datadir_testfile}" || die
- unset _my_datadir_testfile
- fi
-
- if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
- einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
- || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
- fi
-
- if [[ -z "${MYSQL_TMPDIR}" ]] ; then
- MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
- [[ -z "${MYSQL_TMPDIR}" ]] \
- && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
- mkdir "${MYSQL_TMPDIR}" || die
- chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
- fi
-
- # Now we need to test MYSQL_TMPDIR...
- local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_tmpdir_testfile}" ]] \
- && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_tmpdir_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
- else
- rm "${_my_tmpdir_testfile}" || die
- unset _my_tmpdir_testfile
- fi
-
- if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
- einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
- || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
- fi
-
- if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
- local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_logbin_testfile}" ]] \
- && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_logbin_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
- else
- rm "${_my_logbin_testfile}" || die
- unset _my_logbin_testfile
- fi
- fi
-
- if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
- einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
- || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
- fi
-
- if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
- local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_relaylog_testfile}" ]] \
- && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_relaylog_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
- else
- rm "${_my_relaylog_testfile}" || die
- unset _my_relaylog_testfile
- fi
- fi
-
- local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
- if [[ -z "${mysql_install_log}" ]] ; then
- die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
- else
- # make sure file is writable for MYSQL_USER...
- touch "${mysql_install_log}" || die
- chown ${MYSQL_USER} "${mysql_install_log}" || die
- fi
-
- local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
- if [[ -z "${mysqld_logfile}" ]] ; then
- die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
- else
- # make sure file is writable for MYSQL_USER...
- touch "${mysqld_logfile}" || die
- chown ${MYSQL_USER} "${mysqld_logfile}" || die
- fi
-
- echo ""
- einfo "Detected settings:"
- einfo "=================="
- einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
- einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
- einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
- einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
- if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
- einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
- fi
-
- if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
- einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
- fi
-
- einfo "PID DIR:\t\t\t\t${PID_DIR}"
- einfo "Install db log:\t\t\t${mysql_install_log}"
- einfo "Install server log:\t\t\t${mysqld_logfile}"
-
- local -a config_files
-
- local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
- if [[ -f "${config_file}" ]] ; then
- config_files+=( "${config_file}" )
- else
- ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
- fi
-
- config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
- if [[ -f "${config_file}" ]] ; then
- config_files+=( "${config_file}" )
- else
- ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
- fi
-
- if [[ ${#config_files[@]} -gt 0 ]] ; then
- if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
- local user_answer
-
- echo
- einfo "Please select default authentication plugin (enter number or plugin name):"
- einfo "1) caching_sha2_password [MySQL 8.0 default]"
- einfo "2) mysql_native_password [MySQL 5.7 default]"
- einfo
- einfo "For details see:"
- einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
- read -p " >" user_answer
- echo
-
- case "${user_answer}" in
- 1|caching_sha2_password)
- MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
- ;;
- 2|mysql_native_password)
- MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
- ;;
- '')
- die "No authentication plugin selected!"
- ;;
- *)
- die "Authentication plugin '${user_answer}' is unknown/unsupported!"
- ;;
- esac
-
- echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
-
- unset user_answer
- fi
-
- local cfg_option cfg_option_tabs cfg_section
- for config_file in "${config_files[@]}" ; do
- cfg_option="default-authentication-plugin"
- cfg_section="mysqld"
- cfg_option_tabs="\t\t"
- if [[ "${config_file}" == *client.cnf ]] ; then
- cfg_option="default-auth"
- cfg_section="client"
- cfg_option_tabs="\t\t\t\t"
- fi
-
- if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
- einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
- sed -i \
- -e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
- "${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
- else
- einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
- sed -i \
- -e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
- "${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
- fi
- done
- unset cfg_option cfg_option_tabs cfg_section
- fi
- unset config_files config_file
-
- echo
-
- 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
-
- if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
- local pwd1="a"
- local pwd2="b"
-
- echo
- einfo "No password for mysql 'root' user was specified via environment"
- einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
- einfo "file like '${HOME}/.my.cnf'."
- einfo "To continue please provide a password for the mysql 'root' user"
- einfo "now on console:"
- ewarn "NOTE: Please 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
-
- echo
- fi
-
- local -a mysqld_options
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see http://bugs.mysql.com/bug.php?id=31312
- use prefix && mysqld_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
-
- local opt optexp optfull
- for opt in 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}" && mysqld_options+=( "${optfull}" )
- done
-
- # Prepare timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
- [[ -z "${tz_sql}" ]] \
- && die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
- echo "USE mysql;" >"${tz_sql}"
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
- if [[ $? -ne 0 ]] ; then
- die "mysql_tzinfo_to_sql failed!"
- fi
-
- # --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=(
- "${mysqld_binary}"
- "${mysqld_options[@]}"
- "--initialize-insecure"
- "--init-file='${tz_sql}'"
- "--basedir='${EROOT}/usr'"
- "--datadir='${MY_DATADIR}'"
- "--tmpdir='${MYSQL_TMPDIR}'"
- "--log-error='${mysql_install_log}'"
- "--user=${MYSQL_USER}"
- )
-
- einfo "Initializing ${PN} data directory: ${cmd[@]}"
- eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
- if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
- grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
- die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
- fi
-
- rm "${tz_sql}" || die
-
- local x=${RANDOM}
- local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
- local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
- unset x
-
- cmd=(
- "${mysqld_binary}"
- "${mysqld_options[@]}"
- "--basedir='${EROOT}/usr'"
- "--datadir='${MY_DATADIR}'"
- "--tmpdir='${MYSQL_TMPDIR}'"
- --max_allowed_packet=8M
- --net_buffer_length=16K
- "--socket='${socket}'"
- "--pid-file='${pidfile}'"
- "--log-error='${mysqld_logfile}'"
- "--user=${MYSQL_USER}"
- )
-
- einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
- eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
- echo -n "Waiting for mysqld to accept connections "
- local maxtry=15
- while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
-
- if [[ -S "${socket}" ]] ; then
- # Even with a socket we don't know if mysqld will abort
- # start due to an error so just wait a little bit more...
- maxtry=5
- while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- fi
-
- echo
-
- if [[ ! -S "${socket}" ]] ; then
- grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
- die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
- fi
-
- local mysql_logfile="${TMPDIR}/set_root_pw.log"
- touch "${mysql_logfile}" || die
-
- 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 BY '${MYSQL_ROOT_PASSWORD}'"
- cmd=(
- "${mysql_binary}"
- --no-defaults
- "--socket='${socket}'"
- -hlocalhost
- "-e \"${sql}\""
- )
- eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
- local rc=$?
- eend ${rc}
-
- if [[ ${rc} -ne 0 ]] ; then
- # Poor man's solution which tries to avoid having password
- # in log. NOTE: sed can fail if user didn't follow advice
- # and included character which will require escaping...
- sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
- grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
- die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
- fi
-
- # Stop the server
- if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
- echo -n "Stopping the server "
- pkill -F "${pidfile}" &>/dev/null
-
- maxtry=10
- while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
-
- echo
-
- if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
- # We somehow failed to stop server.
- # However, not a fatal error. Just warn the user.
- ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
- fi
- fi
-
- einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}
diff --git a/dev-db/mysql/mysql-8.0.21-r1.ebuild b/dev-db/mysql/mysql-8.0.21-r1.ebuild
deleted file mode 100644
index d63f3416d34e..000000000000
--- a/dev-db/mysql/mysql-8.0.21-r1.ebuild
+++ /dev/null
@@ -1,1166 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-inherit check-reqs cmake flag-o-matic linux-info \
- multiprocessing prefix toolchain-funcs
-
-MY_PV="${PV//_pre*}"
-MY_P="${PN}-${MY_PV}"
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.21-patches-01.tar.xz"
-
-SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
- https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
- http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
- ${PATCH_SET}"
-
-HOMEPAGE="https://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="8.0"
-IUSE="cjk cracklib debug jemalloc latin1 numa +perl profiling
- router selinux +server tcmalloc test"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
- cjk? ( server )
- jemalloc? ( server )
- numa? ( server )
- profiling? ( server )
- router? ( server )
- tcmalloc? ( server )"
-
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-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"
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- >=app-arch/lz4-0_p131:=
- app-arch/zstd:=
- sys-libs/ncurses:0=
- >=sys-libs/zlib-1.2.3:0=
- >=dev-libs/openssl-1.0.0:0=
- server? (
- dev-libs/icu:=
- dev-libs/libevent:=[ssl]
- >=dev-libs/protobuf-3.8:=
- net-libs/libtirpc:=
- cjk? ( app-text/mecab:= )
- jemalloc? ( dev-libs/jemalloc:0= )
- kernel_linux? (
- dev-libs/libaio:0=
- sys-process/procps:0=
- )
- numa? ( sys-process/numactl )
- tcmalloc? ( dev-util/google-perftools:0= )
- )
-"
-DEPEND="${COMMON_DEPEND}
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- virtual/yacc
- server? ( net-libs/rpcsvc-proto )
- test? (
- acct-group/mysql acct-user/mysql
- dev-perl/JSON
- )
-"
-RDEPEND="${COMMON_DEPEND}
- !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- !dev-db/mysql:0
- !dev-db/mysql:5.7
- selinux? ( sec-policy/selinux-mysql )
- !prefix? (
- acct-group/mysql acct-user/mysql
- dev-db/mysql-init-scripts
- )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-mysql_init_vars() {
- : ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
- : ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- : ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- : ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
- MY_DATADIR="${MY_LOCALSTATEDIR}"
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_pretend() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- if use server ; then
- CHECKREQS_DISK_BUILD="3G"
-
- if has test $FEATURES ; then
- CHECKREQS_DISK_BUILD="9G"
- fi
-
- check-reqs_pkg_pretend
- fi
- fi
-}
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- CHECKREQS_DISK_BUILD="3G"
-
- if has test ${FEATURES} ; then
- CHECKREQS_DISK_BUILD="9G"
-
- # Bug #213475 - MySQL _will_ object strenuously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if ! has userpriv ${FEATURES} ; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
- [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
- && die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
-
- if use latin1 ; then
- # Upstream only supports tests with default charset
- die "Testing with USE=latin1 is not supported."
- fi
- fi
-
- if use kernel_linux ; then
- if use numa ; then
- linux-info_get_any_version
-
- local CONFIG_CHECK="~NUMA"
-
- local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
- WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
-
- check_extra_config
- fi
- fi
-
- use server && check-reqs_pkg_setup
- fi
-}
-
-src_unpack() {
- unpack ${A}
-
- mv -f "${WORKDIR}/${MY_P}" "${S}" || die
-}
-
-src_prepare() {
- eapply "${WORKDIR}"/mysql-patches
-
- # Avoid rpm call which would trigger sandbox, #692368
- sed -i \
- -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
- CMakeLists.txt || die
-
- if use jemalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- if use tcmalloc ; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
- fi
-
- # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
- if [[ -d "${S}/support-files/SELinux" ]] ; then
- echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
- fi
-
- # Remove man pages for client-lib tools we don't install
- rm \
- man/my_print_defaults.1 \
- man/perror.1 \
- man/zlib_decompress.1 \
- || die
-
- cmake_src_prepare
-}
-
-src_configure() {
- # 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')"
- -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/mysql
- -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
- -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- # Using bundled editline to get CTRL+C working
- -DWITH_EDITLINE=bundled
- -DWITH_ZLIB=system
- -DWITH_SSL=system
- -DWITH_LIBWRAP=0
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- # 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)
- -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- -DWITH_CURL=system
- -DWITH_BOOST="${S}/boost"
- -DWITH_ROUTER=$(usex router ON OFF)
- )
-
- if is-flagq -fno-lto ; then
- einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
- mycmakeargs+=( -DWITH_LTO=OFF )
- elif is-flagq -flto ; then
- einfo "LTO forced via {C,CXX,F,FC}FLAGS"
- myconf+=( -DWITH_LTO=ON )
- else
- # Disable automagic
- myconf+=( -DWITH_LTO=OFF )
- fi
-
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
-
- mycmakeargs+=(
- -DWITH_ICU=system
- -DWITH_LZ4=system
- # Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
- -DWITH_RAPIDJSON=bundled
- -DWITH_ZSTD=system
- )
-
- 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."
- ewarn "Tests will probably fail!"
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
- elif use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8mb4
- -DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
- )
- fi
-
- if use server ; then
- mycmakeargs+=(
- -DWITH_EXTRA_CHARSETS=all
- -DWITH_DEBUG=$(usex debug)
- -DWITH_MECAB=$(usex cjk system OFF)
- -DWITH_LIBEVENT=system
- -DWITH_PROTOBUF=system
- -DWITH_NUMA=$(usex numa ON OFF)
- )
-
- if use profiling ; then
- # Setting to OFF doesn't work: Once set, profiling options will be added
- # to `mysqld --help` output via sql/sys_vars.cc causing
- # "main.mysqld--help-notwin" test to fail
- mycmakeargs+=( -DENABLED_PROFILING=ON )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_EXAMPLE_STORAGE_ENGINE=0
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_FEDERATED_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_INNODB_MEMCACHED=0
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- )
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DWITH_SYSTEMD=no
- )
- fi
-
- cmake_src_configure
-}
-
-# Official test instructions:
-# ulimit -n 16500 && \
-# USE='perl server' \
-# FEATURES='test userpriv' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
- _disable_test() {
- local rawtestname bug reason
- rawtestname="${1}" ; shift
- bug="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
- echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- # Run CTest (test-units)
- cmake_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
- if [[ -z "${MTR_PARALLEL}" ]] ; then
- local -x MTR_PARALLEL=$(makeopts_jobs)
-
- if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
- # Running multiple tests in parallel usually require higher ulimit
- # and fs.aio-max-nr setting. In addition, tests like main.multi_update
- # are known to hit timeout when system is busy.
- # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
- # using "auto".
- local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
- info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
- einfo "${info_msg}"
- unset info_msg
- MTR_PARALLEL=4
- fi
- else
- einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
- fi
-
- # 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"
-
- local -a disabled_tests
- disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
- disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
- disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure - no upstream bug yet" )
- disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
- disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
- disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
- disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
- disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
- disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
- disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
- disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
- disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
- disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
-
- # Known test failures due to expired SSL certificates -- fixed in 8.0.22
- disabled_tests+=( "auth_sec.admin_ssl_crl_crlpath;100055;Fixed in 8.0.22" )
- disabled_tests+=( "auth_sec.admin_ssl_crl;100055;Fixed in 8.0.22" )
- disabled_tests+=( "auth_sec.server_withssl_client_withssl;100055;Fixed in 8.0.22" )
- disabled_tests+=( "main.ssl_crl_clients_valid;100055;Fixed in 8.0.22" )
- disabled_tests+=( "main.ssl_crl;100055;Fixed in 8.0.22" )
- disabled_tests+=( "main.ssl_crl_crlpath;100055;Fixed in 8.0.22" )
- disabled_tests+=( "main.ssl_ca;100055;Fixed in 8.0.22" )
-
- if ! hash zip 1>/dev/null 2>&1 ; then
- # no need to force dep app-arch/zip for one test
- disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
- disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
- fi
-
- local test_infos_str test_infos_arr
- for test_infos_str in "${disabled_tests[@]}" ; do
- IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
- if [[ ${#test_infos_arr[@]} != 3 ]] ; then
- die "Invalid test data set, not matching format: ${test_infos_str}"
- fi
-
- _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
- done
- unset test_infos_str test_infos_arr
-
- # Try to increase file limits to increase test coverage
- if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
- # Upper limit comes from parts.partition_* tests
- ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
- if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
- # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
- ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
- if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
- ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
- else
- einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd &>/dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-src_install() {
- cmake_src_install
-
- # 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 "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/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-5.7" "${TMPDIR}/my.cnf" || die
- eprefixify "${TMPDIR}/my.cnf"
- doins "${TMPDIR}/my.cnf"
- insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
- cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
- eprefixify "${TMPDIR}/50-distro-client.cnf"
- doins "${TMPDIR}/50-distro-client.cnf"
-
- mycnf_src="my.cnf-8.0.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|utf8mb4|latin1|g" \
- "${TMPDIR}/my.cnf.ok" || die
- fi
-
- eprefixify "${TMPDIR}/my.cnf.ok"
-
- newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-
- if use router ; then
- rm -rf \
- "${ED}/usr/LICENSE.router" \
- "${ED}/usr/README.router" \
- "${ED}/usr/run" \
- "${ED}/usr/var" \
- || die
- fi
-
- # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
- find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- # NOTE: $MY_LOGDIR contains $EPREFIX by default
- [[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
-
- # Note about configuration change
- einfo
- elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
- elog "to several files in /etc/mysql/mysql.d."
- elog "Please backup any changes you made to /etc/mysql/my.cnf"
- elog "and add them as a new file under /etc/mysql/mysql.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 appropriate section headers, i.e. [mysqld]."
- einfo
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog " \"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- einfo
- else
- einfo
- elog "Upgrade process for ${PN}-8.x has changed. Please read"
- elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
- einfo
- fi
-}
-
-pkg_config() {
- _getoptval() {
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- local cmd=(
- "${my_print_defaults_binary}"
- "${extra_options}"
- "${section}"
- )
- local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
-
- if [[ ${#results[@]} -gt 0 ]] ; then
- # When option is set multiple times only return last value
- echo "${results[-1]}"
- fi
- }
-
- _mktemp_dry() {
- # emktemp has no --dry-run option
- local template="${1}"
-
- if [[ -z "${template}" ]] ; then
- if [[ -z "${T}" ]] ; then
- template="/tmp/XXXXXXX"
- else
- template="${T}/XXXXXXX"
- fi
- fi
-
- local template_wo_X=${template//X/}
- local n_X
- let n_X=${#template}-${#template_wo_X}
- if [[ ${n_X} -lt 3 ]] ; then
- echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
- return
- fi
-
- local attempts=0
- local character tmpfile
- while [[ true ]] ; do
- let attempts=attempts+1
-
- new_file=
- while read -n1 character ; do
- if [[ "${character}" == "X" ]] ; then
- tmpfile+="${RANDOM:0:1}"
- else
- tmpfile+="${character}"
- fi
- done < <(echo -n "${template}")
-
- if [[ ! -f "${tmpfile}" ]]
- then
- echo "${tmpfile}"
- return
- fi
-
- if [[ ${attempts} -ge 100 ]] ; then
- echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
- return
- fi
- done
- }
-
- local mysqld_binary="${EROOT}/usr/sbin/mysqld"
- if [[ ! -x "${mysqld_binary}" ]] ; then
- die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
- fi
-
- local mysql_binary="${EROOT}/usr/bin/mysql"
- if [[ ! -x "${mysql_binary}" ]] ; then
- die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
- fi
-
- local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
- if [[ ! -x "${my_print_defaults_binary}" ]] ; then
- die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
- fi
-
- if [[ -z "${MYSQL_USER}" ]] ; then
- MYSQL_USER=mysql
- if use prefix ; then
- MYSQL_USER=$(id -u -n 2>/dev/null)
- if [[ -z "${MYSQL_USER}" ]] ; then
- die "Failed to determine current username!"
- fi
- fi
- fi
-
- if [[ -z "${MYSQL_GROUP}" ]] ; then
- MYSQL_GROUP=mysql
- if use prefix ; then
- MYSQL_GROUP=$(id -g -n 2>/dev/null)
- if [[ -z "${MYSQL_GROUP}" ]] ; then
- die "Failed to determine current user groupname!"
- fi
- fi
- fi
-
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- local -x HOME="${EROOT}/root"
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Read currently set data directory
- MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
-
- # 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 "${MY_DATADIR}" ]] ; then
- die "Sorry, unable to find MY_DATADIR!"
- elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
- ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
- ewarn "Please rename or delete its content if you wish to initialize a new data directory."
- die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
- fi
-
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
- MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
- # These are dir+prefix
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
-
- # Create missing directories.
- # Always check if mysql user can write to directory even if we just
- # created directory because a parent directory might be not
- # accessible for that user.
- PID_DIR="${EROOT}/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]] ; then
- einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
- install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
- || die "Failed to create PID directory '${PID_DIR}'!"
- fi
-
- local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_pid_dir_testfile}" ]] \
- && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_pid_dir_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
- else
- rm "${_pid_dir_testfile}" || die
- unset _pid_dir_testfile
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]] ; then
- einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
- || die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
- fi
-
- local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_datadir_testfile}" ]] \
- && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_datadir_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
- else
- rm "${_my_datadir_testfile}" || die
- unset _my_datadir_testfile
- fi
-
- if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
- einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
- || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
- fi
-
- if [[ -z "${MYSQL_TMPDIR}" ]] ; then
- MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
- [[ -z "${MYSQL_TMPDIR}" ]] \
- && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
-
- mkdir "${MYSQL_TMPDIR}" || die
- chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
- fi
-
- # Now we need to test MYSQL_TMPDIR...
- local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_tmpdir_testfile}" ]] \
- && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_tmpdir_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
- else
- rm "${_my_tmpdir_testfile}" || die
- unset _my_tmpdir_testfile
- fi
-
- if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
- einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
- || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
- fi
-
- if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
- local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_logbin_testfile}" ]] \
- && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_logbin_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
- else
- rm "${_my_logbin_testfile}" || die
- unset _my_logbin_testfile
- fi
- fi
-
- if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
- einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
- install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
- || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
- fi
-
- if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
- local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
- [[ -z "${_my_relaylog_testfile}" ]] \
- && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
-
- if use prefix ; then
- touch "${_my_relaylog_testfile}" &>/dev/null
- else
- su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
- fi
-
- if [[ $? -ne 0 ]] ; then
- die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
- else
- rm "${_my_relaylog_testfile}" || die
- unset _my_relaylog_testfile
- fi
- fi
-
- local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
- if [[ -z "${mysql_install_log}" ]] ; then
- die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
- else
- # make sure file is writable for MYSQL_USER...
- touch "${mysql_install_log}" || die
- chown ${MYSQL_USER} "${mysql_install_log}" || die
- fi
-
- local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
- if [[ -z "${mysqld_logfile}" ]] ; then
- die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
- else
- # make sure file is writable for MYSQL_USER...
- touch "${mysqld_logfile}" || die
- chown ${MYSQL_USER} "${mysqld_logfile}" || die
- fi
-
- echo ""
- einfo "Detected settings:"
- einfo "=================="
- einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
- einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
- einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
- einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
-
- if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
- einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
- fi
-
- if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
- einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
- fi
-
- einfo "PID DIR:\t\t\t\t${PID_DIR}"
- einfo "Install db log:\t\t\t${mysql_install_log}"
- einfo "Install server log:\t\t\t${mysqld_logfile}"
-
- local -a config_files
-
- local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
- if [[ -f "${config_file}" ]] ; then
- config_files+=( "${config_file}" )
- else
- ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
- fi
-
- config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
- if [[ -f "${config_file}" ]] ; then
- config_files+=( "${config_file}" )
- else
- ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
- fi
-
- if [[ ${#config_files[@]} -gt 0 ]] ; then
- if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
- local user_answer
-
- echo
- einfo "Please select default authentication plugin (enter number or plugin name):"
- einfo "1) caching_sha2_password [MySQL 8.0 default]"
- einfo "2) mysql_native_password [MySQL 5.7 default]"
- einfo
- einfo "For details see:"
- einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
- read -p " >" user_answer
- echo
-
- case "${user_answer}" in
- 1|caching_sha2_password)
- MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
- ;;
- 2|mysql_native_password)
- MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
- ;;
- '')
- die "No authentication plugin selected!"
- ;;
- *)
- die "Authentication plugin '${user_answer}' is unknown/unsupported!"
- ;;
- esac
-
- echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
-
- unset user_answer
- fi
-
- local cfg_option cfg_option_tabs cfg_section
- for config_file in "${config_files[@]}" ; do
- cfg_option="default-authentication-plugin"
- cfg_section="mysqld"
- cfg_option_tabs="\t\t"
- if [[ "${config_file}" == *client.cnf ]] ; then
- cfg_option="default-auth"
- cfg_section="client"
- cfg_option_tabs="\t\t\t\t"
- fi
-
- if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
- einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
- sed -i \
- -e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
- "${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
- else
- einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
- sed -i \
- -e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
- "${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
- fi
- done
- unset cfg_option cfg_option_tabs cfg_section
- fi
- unset config_files config_file
-
- echo
-
- 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
-
- if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
- local pwd1="a"
- local pwd2="b"
-
- echo
- einfo "No password for mysql 'root' user was specified via environment"
- einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
- einfo "file like '${HOME}/.my.cnf'."
- einfo "To continue please provide a password for the mysql 'root' user"
- einfo "now on console:"
- ewarn "NOTE: Please 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
-
- echo
- fi
-
- local -a mysqld_options
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see http://bugs.mysql.com/bug.php?id=31312
- use prefix && mysqld_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
-
- local opt optexp optfull
- for opt in 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}" && mysqld_options+=( "${optfull}" )
- done
-
- # Prepare timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
- [[ -z "${tz_sql}" ]] \
- && die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
-
- echo "USE mysql;" >"${tz_sql}"
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
- if [[ $? -ne 0 ]] ; then
- die "mysql_tzinfo_to_sql failed!"
- fi
-
- # --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=(
- "${mysqld_binary}"
- "${mysqld_options[@]}"
- "--initialize-insecure"
- "--init-file='${tz_sql}'"
- "--basedir='${EROOT}/usr'"
- "--datadir='${MY_DATADIR}'"
- "--tmpdir='${MYSQL_TMPDIR}'"
- "--log-error='${mysql_install_log}'"
- "--user=${MYSQL_USER}"
- )
-
- einfo "Initializing ${PN} data directory: ${cmd[@]}"
- eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
-
- if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
- grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
- die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
- fi
-
- rm "${tz_sql}" || die
-
- local x=${RANDOM}
- local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
- local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
- unset x
-
- cmd=(
- "${mysqld_binary}"
- "${mysqld_options[@]}"
- "--basedir='${EROOT}/usr'"
- "--datadir='${MY_DATADIR}'"
- "--tmpdir='${MYSQL_TMPDIR}'"
- --max_allowed_packet=8M
- --net_buffer_length=16K
- "--socket='${socket}'"
- "--pid-file='${pidfile}'"
- "--log-error='${mysqld_logfile}'"
- "--user=${MYSQL_USER}"
- )
-
- einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
- eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
-
- echo -n "Waiting for mysqld to accept connections "
- local maxtry=15
- while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
-
- if [[ -S "${socket}" ]] ; then
- # Even with a socket we don't know if mysqld will abort
- # start due to an error so just wait a little bit more...
- maxtry=5
- while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- fi
-
- echo
-
- if [[ ! -S "${socket}" ]] ; then
- grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
- die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
- fi
-
- local mysql_logfile="${TMPDIR}/set_root_pw.log"
- touch "${mysql_logfile}" || die
-
- 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 BY '${MYSQL_ROOT_PASSWORD}'"
- cmd=(
- "${mysql_binary}"
- --no-defaults
- "--socket='${socket}'"
- -hlocalhost
- "-e \"${sql}\""
- )
- eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
- local rc=$?
- eend ${rc}
-
- if [[ ${rc} -ne 0 ]] ; then
- # Poor man's solution which tries to avoid having password
- # in log. NOTE: sed can fail if user didn't follow advice
- # and included character which will require escaping...
- sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
-
- grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
- die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
- fi
-
- # Stop the server
- if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
- echo -n "Stopping the server "
- pkill -F "${pidfile}" &>/dev/null
-
- maxtry=10
- while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
-
- echo
-
- if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
- # We somehow failed to stop server.
- # However, not a fatal error. Just warn the user.
- ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
- fi
- fi
-
- einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
-}
diff --git a/dev-db/pgcli/Manifest b/dev-db/pgcli/Manifest
index 51caa30832d8..8e413ffdec19 100644
--- a/dev-db/pgcli/Manifest
+++ b/dev-db/pgcli/Manifest
@@ -1,3 +1,3 @@
DIST pgcli-3.1.0.tar.gz 441939 BLAKE2B 2c9c9a3afb233eee6f88d304e26e482760f1ff2a458103a80ffb80d877f63bd3ec74ba4be06238e8d78adf36ec251cd27849e0899f3b257b75ac9585f3c04572 SHA512 458871bf7ea0a83a66f44ecbde88590ca2aa08420a58c97d2716d4e36c61738d92283d007fc3968063daa01c25b2c46360292ad6339757c119ff04891e1a1c46
-EBUILD pgcli-3.1.0.ebuild 1011 BLAKE2B 2eedf2e0abfff372a260ad99fb445480b71f4af68af07bbd364e734bde47c92148b0456558bf43658cd321da3b52490209d264ad390b8245263a0fd44f17ed1e SHA512 b644c1e97ca4e5fe88cd3a174aef4d60626f0e8502cf783e55a646ec040af27e3bfae10b70f92ea0ce2aff33f5dfa817aa09c0d80e15da934d5504c4e3b342b7
+EBUILD pgcli-3.1.0.ebuild 978 BLAKE2B 3402e13f8dd30e527abdc3602ad035dcccb6d5b7a9c2aa574d43cb7f4c9f33959a63a6a62bad8a76af2031faad840f7f7375bd93cf051c09b9d9ab77989e5ecb SHA512 14b101ce4afbe2997c7fc511e4ffa79a0b678c14eff30ff291fd3c174cbfba0f63096ba1713e4577a3bd52241dde8fb9cb49a9e3056baec486b691d646fa9779
MISC metadata.xml 359 BLAKE2B c8107f0af400492e5365311f645a91c0a56448f3f2983c470c8e8eb08126202f2b5895978971f5f77eec87bbe29e4f198d954dcd87b14b2cfa019fb98dbfe272 SHA512 bca1ac9cb841c4b17c07b6a581d54f860fe384ce139b9894fcdb442024f75ef7996ea55535be177472dc5149e1dd1cf4859181210bbcd637f6b82b8816334cc4
diff --git a/dev-db/pgcli/pgcli-3.1.0.ebuild b/dev-db/pgcli/pgcli-3.1.0.ebuild
index 8813d3a0b170..47be22f33026 100644
--- a/dev-db/pgcli/pgcli-3.1.0.ebuild
+++ b/dev-db/pgcli/pgcli-3.1.0.ebuild
@@ -3,7 +3,6 @@
EAPI=7
-DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python3_{7..9} )
inherit distutils-r1
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index 3644ede55bf1..b1eb09017ac7 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -5,6 +5,7 @@ AUX postgresql-11_beta1-no-server.patch 3080 BLAKE2B 29d4f5d8e26e9360490876d2d51
AUX postgresql-12.1-no-server.patch 2965 BLAKE2B 168f39c02f0614c57a60c0ce3bb540e0d29dc407c569661d0cd29ddb57657bfada44aa90ca915c8474ca5541ac1f4cc152fbd70c105efcbe83f9e5b9f918eeb5 SHA512 5e025da1cb5f696821b19093ab893667426a08b1bbc8e3f748d34207730026625b61a8cfd2596af124080a4a292363546dce5b703ce6164efceceabc6b170aa2
AUX postgresql-13.3-riscv-spinlocks.patch 966 BLAKE2B 4834d47b01e1f8e122fa940a84e1e790686d96b538d27f253724f7be454c455c6853cdadf41da5cafeb8767012b45a6eef742685117afaaa78e0e9a930c728c8 SHA512 1c217ec177a1669fcaeffe2cce241b5ba2cba6425d9eee8bf50dce6626e70e2d063776e1ced4590cbf9ffc046ede02dbe4f06bdfb7bc4c3dcb0f028c128c15ea
AUX postgresql-13_beta1-no-server.patch 3787 BLAKE2B 35a01d479262cf21699043d65bb0d71539198ca30e8a627fc134183fa57ac6e1cc3856848bbbe9916a99569c79f4af1e2b6ed50b3d029bdb8f58d050e08552d3 SHA512 2fbd07eb865bac3e9381a0b851f7c92c1c08c2e6521a02a42cc7435bccdce70823eb752afc67aa221b804ff4baee1a2fd5a2762a6b82b14a6f77ef739233bca1
+AUX postgresql-14_rc1-no-server.patch 3508 BLAKE2B edd8525df7ec0505a8468c8f79a32a989f13bf3e0bd48efd00bfa3adff5b69735768ab4a1269d168076905b8ddda4467357e161714a205dd7cb3e66a0552784c SHA512 35c5e32b973fb683452773f93f45b69ad7eabfe13539c1764ed3919c0b0ebbc9e2e373cf101b1a224d1d5c93db4cb8f1936e0dddd86c6c28d2da5f4998cde002
AUX postgresql-9.6.3-no-server.patch 3067 BLAKE2B 49822723f1e90b05b56bd4714a2480b366a1fad8d6db23cd2e99ad74eb389310077e12580c312a8ccefe0058218e8354a8665e82bcb7b27be6f744433425b0ec SHA512 314f5cea74dde55d054b43cf890dbbd216b65843f2a863a32cf8ba9fdaead1f74ad01905b7f93d2996068addd8705ff2119e1efc709cf84c18f6685937e969bc
AUX postgresql-check-db-dir 1013 BLAKE2B 2be45942d0442822113879708c11dfde267938b6e7118bd225f567ca9fdacb11082792eabcb40b8a39cd6017fdedb18100576fea0895dae2dcda83c2d51de34d SHA512 2f34ee0cb6a889500ccfca7621ada6ee1bb06dc146f3c556938152dd3d7c0312266bb4db5f4099838d93ade26e2b8866dfddb3576cb5a737431ea2befd0cec6f
AUX postgresql.confd-9.3 2477 BLAKE2B 0d42eedb99c951c8c60ed02abb5d4526bc288e8dd50b048cb3ab374239f1929aa80d10306037e45188a81593163121c029b91f9149365bff02ff7bfd0fe52ac4 SHA512 6c9e7c2de31eace2b3ce771a29eb354b143ea81f85d9d7ef601f302b7ae71c1c3badde8765fb7757dadcf0c49dcfa1116977e8b7f1e238350d3732962267147f
@@ -20,6 +21,7 @@ DIST postgresql-12.8.tar.bz2 20849478 BLAKE2B 20ad970f03665b9c1f24c646096476398c
DIST postgresql-13.3.tar.bz2 21119109 BLAKE2B 395a3dc5cde8f579a3c35ea70346bdc630a8e8f2f86f310a5e4f4a1f6177dab7e78ba6e41c384ba650eb86813fcd428fea8aa22481f9a494cd80aa94bd7b52dd SHA512 1560cc766982a9ea9d33c77835b20e33e11b03acb77fc75d905c565883935a7dbcd27b9b2ab6a0ecdb815261f7c259865cb3dac85c10a3181c3fcaeb4d28bf60
DIST postgresql-13.4.tar.bz2 21157443 BLAKE2B e16684ef59f213d23366e8d18c4bf6f81d6e2eac8e940449fee1ef6b150e7ff7d3dce8831b318d1fd3f72d642110576ebc7bd981185a39f19fea6357c58be170 SHA512 f1faf676ffdcee3e7f2c3b78f4badf44770d6be58090036d119d8fb0688e2b9f9159dd44fe850c179b8e23f256942c05edb8fcc385f0e852d16b37eace785b5a
DIST postgresql-14beta3.tar.bz2 22584314 BLAKE2B f89e5395a2a1f704baea1e864ee1576b6646dabf30d90e5da2c082f6a1d977c9dd7ac2683690e1071f84e062be19b4906895a165b0a4a6c57f57367a21821adb SHA512 a84c81095945d71f9720a2d4e3f0a93887ef06b6d6b2b5bf5c90a4cee9df7990ed081cd90de22ea660bab2e79eb05dfe5da849d175b75037874f069dc28a9cfd
+DIST postgresql-14rc1.tar.bz2 21844937 BLAKE2B a819d1cd9abb698120d86a4a1e5c74fe3180ee453561ad2f8bd23602294f4ab040c63ca9716f53d82e7c7424aec4716b39abc44f67877c68ac684375dc504d95 SHA512 9a68fef03efdb0152adf9a0daf58a49f69b8373d0f3378a8ce2632743e4078da9816c039ed18cd102f2ac759bae381049d37aa70dbba7ab5790fbe5a9076a82f
DIST postgresql-9.6.22.tar.bz2 19003741 BLAKE2B adff6e81ec4b289bd5c51fa44adb38d7cc3936e2e5545ff23fccb0f3f1fe1c881ed70f9a0a5d366319f876eb01a9f675b66c9374b8b41615220f45a70450ad6d SHA512 371f85f2d02a8a3b888396440149e9b432f91e106a7feb8a163b275a0586843683124281a0965abf3c1215cb68e2002976913f88c75e35e52ac5f78d4145fd7b
DIST postgresql-9.6.23.tar.bz2 19013235 BLAKE2B a7bd7a0678c2c58efd71f320f838ee66fa3d75fb37d95e1c070e59ece69d4b66850e676054807848dbccedca7e9a4cc0b244c3cf0f0ff039b88c4f9b221e8819 SHA512 205b47cf1c22519092f840a9b3bf6bdf95f455e5ba02a7e1bc1495f85bb25f8ccfe9f60c83dc2801f1366b88fc35e64c23eb9bdc89a4bb5d233243af4606d59c
EBUILD postgresql-10.17-r2.ebuild 13662 BLAKE2B b4b813cfae66157cc760f7e117ce2bbd9c9f9c42030771ace9693355e1ba3d284871fb948ed0e7ee32c3e563e6085629f4192ba8d9593c42a3838590de6452a0 SHA512 46c5f06bded85409d65fc3eda42d677f6b052f0bbc6795722371504d4e192bb5b87282703d924e8c34e7a1ac19df2fe33af2818b16fd0037609b424ea4f41374
@@ -31,6 +33,7 @@ EBUILD postgresql-12.8.ebuild 13573 BLAKE2B 89bb2fc7bdc44292f5b6e8e96af7de709c3d
EBUILD postgresql-13.3.ebuild 14003 BLAKE2B 817538787d5eba96afd490e70a5e6873b117e676485241a71d031dd12675b0473f352bd0a2de059e2ab1d265656089f82081e65d87d18c44888717b8e2061e30 SHA512 24c9210237529014350517937e7c11dbe37e41cc9998bbc8a04c85c2e16d9f54742d801c5adac7a3dc4d1d3c4b6b992e0e61b79bded03e5e78c1fae244ec7367
EBUILD postgresql-13.4.ebuild 14011 BLAKE2B 08da204eb66c48cc2b3596b636302bc044c7d8cfac5c73c003055a4373ae0612841ae2b546ba01c2d257cbb5944fd58b0e211d9a8e78288104a9bede1da8edcb SHA512 9530bdaa11c74ff2d96f8c3c737ad226896b39f10ca9ed182166dac2f38158436f4cc9e4ac3d4aaa82e63d06731dfc9c104acc1f2dc897b5d089c1be053b8ff8
EBUILD postgresql-14_beta3.ebuild 13873 BLAKE2B c32979bda123d588d78f6c0efa6d48d0901b7427b8af98d4601bde742f782af2ae29cd4270026894dbb237408dbe68a3f22ef00d3049bb3b54df3f4dc7033111 SHA512 20c6039ed3cd568d0de898a152985caa0d91394df30b1e7768ca6d39818b48845069404a8f5ca8d536a140382c64090c0fdf9adf3a2b5cc1df1829d6bbdf78ea
+EBUILD postgresql-14_rc1.ebuild 13815 BLAKE2B 9d9f77ecb33410ec9b7a33acff52ad865c0048b479befe6b5f6a1a311426357b963519f0766ac28fca69263ecca82003c3d92153e45cf6bceb0e454cc025d851 SHA512 947f4f907a4e08542d96e4167e05aab4a2188898e7df1383a62374709e1608d11e9ba8e519a40fc0c25623544ffa6b823efacfeb6e06b48d766250ad13c46fe9
EBUILD postgresql-9.6.22-r2.ebuild 14531 BLAKE2B 6e4bebfaabd74d9e4b07a98797bb79faadb36f067a48966c0f2e6fd933422e14199e579078503aa940225309d5c2846ec724788d76b4483fd87c3fe2aa81407f SHA512 c6b49704e3e971ca772e6365501a0567c7bcba3fd6182800ff57f319481726acadf45334fa6e80fe3ad2db9bc80afb86630cbccb5449a0741ef52524eb70b5d0
EBUILD postgresql-9.6.23.ebuild 14539 BLAKE2B 7680f6ee9db7cf9bae2dc1e12ae69ceee557dbf8e44fece0777c9ee57936eb7df68866b1064c1e1bb4dd7966c527c8a93e6e0b311c29d7b3f70a212b1e163181 SHA512 613d9ca39bd38b858256a9f475ad3b5d235bbc502b8f8126b9b5c4fe7cf12e1f3b0b0af36bd3ea222037fbf73335550cf82a8c8c4589fdf99f068acd651a3b0e
EBUILD postgresql-9999.ebuild 14253 BLAKE2B 0555ea0a5b1734e58797184590e0102a1e000879879965a3e7933681c7b8e665567a14a1d5d35eb070b5eb56c2416ccc7590f9270260884b77af57ce6b09e831 SHA512 1f643d1456c3ac6570539a04a4839221c360f389567f618e193dc647d5cd5b50403ab74afda3d48811717edf52d548a03c27e65e47ae7514a715432a906d487f
diff --git a/dev-db/postgresql/files/postgresql-14_rc1-no-server.patch b/dev-db/postgresql/files/postgresql-14_rc1-no-server.patch
new file mode 100644
index 000000000000..4f2d388386a2
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-14_rc1-no-server.patch
@@ -0,0 +1,151 @@
+diff -Naruw a/contrib/Makefile b/contrib/Makefile
+--- a/contrib/Makefile 2021-09-20 17:33:01.000000000 -0400
++++ b/contrib/Makefile 2021-09-23 16:28:52.919265033 -0400
+@@ -5,57 +5,9 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- adminpack \
+- amcheck \
+- auth_delay \
+- auto_explain \
+- bloom \
+- btree_gin \
+- btree_gist \
+- citext \
+- cube \
+- dblink \
+- dict_int \
+- dict_xsyn \
+- earthdistance \
+- file_fdw \
+- fuzzystrmatch \
+- hstore \
+- intagg \
+- intarray \
+- isn \
+- lo \
+- ltree \
+ oid2name \
+- old_snapshot \
+- pageinspect \
+- passwordcheck \
+- pg_buffercache \
+- pg_freespacemap \
+- pg_prewarm \
+- pg_stat_statements \
+- pg_surgery \
+- pg_trgm \
+- pgcrypto \
+- pgrowlocks \
+- pgstattuple \
+- pg_visibility \
+- postgres_fdw \
+- seg \
+- spi \
+- tablefunc \
+- tcn \
+- test_decoding \
+- tsm_system_rows \
+- tsm_system_time \
+- unaccent \
+ vacuumlo
+
+-ifeq ($(with_ssl),openssl)
+-SUBDIRS += sslinfo
+-else
+-ALWAYS_SUBDIRS += sslinfo
+-endif
+
+ ifneq ($(with_uuid),no)
+ SUBDIRS += uuid-ossp
+diff -Naruw a/src/backend/Makefile b/src/backend/Makefile
+--- a/src/backend/Makefile 2021-09-20 17:33:01.000000000 -0400
++++ b/src/backend/Makefile 2021-09-23 16:30:03.015728022 -0400
+@@ -56,7 +56,7 @@
+
+ ##########################################################################
+
+-all: submake-libpgport submake-catalog-headers submake-utils-headers postgres $(POSTGRES_IMP)
++all: generated-headers
+
+ ifneq ($(PORTNAME), cygwin)
+ ifneq ($(PORTNAME), win32)
+@@ -194,23 +194,7 @@
+
+ ##########################################################################
+
+-install: all installdirs install-bin
+-ifeq ($(PORTNAME), cygwin)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+-ifeq ($(PORTNAME), win32)
+-ifeq ($(MAKE_DLL), true)
+- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+-endif
+-endif
+- $(MAKE) -C catalog install-data
+- $(MAKE) -C tsearch install-data
+- $(MAKE) -C utils install-data
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
+- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
++install:
+
+ ifeq ($(with_llvm), yes)
+ install-bin: install-postgres-bitcode
+diff -Naruw a/src/bin/Makefile b/src/bin/Makefile
+--- a/src/bin/Makefile 2021-09-20 17:33:01.000000000 -0400
++++ b/src/bin/Makefile 2021-09-23 16:30:50.718922745 -0400
+@@ -14,23 +14,8 @@
+ include $(top_builddir)/src/Makefile.global
+
+ SUBDIRS = \
+- initdb \
+- pg_amcheck \
+- pg_archivecleanup \
+- pg_basebackup \
+- pg_checksums \
+ pg_config \
+- pg_controldata \
+- pg_ctl \
+ pg_dump \
+- pg_resetwal \
+- pg_rewind \
+- pg_test_fsync \
+- pg_test_timing \
+- pg_upgrade \
+- pg_verifybackup \
+- pg_waldump \
+- pgbench \
+ psql \
+ scripts
+
+diff -Naruw a/src/Makefile b/src/Makefile
+--- a/src/Makefile 2021-09-20 17:33:01.000000000 -0400
++++ b/src/Makefile 2021-09-23 16:31:41.842107531 -0400
+@@ -15,21 +15,12 @@
+ SUBDIRS = \
+ common \
+ port \
+- timezone \
+ backend \
+- backend/utils/mb/conversion_procs \
+- backend/snowball \
+ include \
+ interfaces \
+- backend/replication/libpqwalreceiver \
+- backend/replication/pgoutput \
+ fe_utils \
+ bin \
+- pl \
+- makefiles \
+- test/regress \
+- test/isolation \
+- test/perl
++ makefiles
+
+ ifeq ($(with_llvm), yes)
+ SUBDIRS += backend/jit/llvm
diff --git a/dev-db/postgresql/postgresql-14_rc1.ebuild b/dev-db/postgresql/postgresql-14_rc1.ebuild
new file mode 100644
index 000000000000..2d16338b8439
--- /dev/null
+++ b/dev-db/postgresql/postgresql-14_rc1.ebuild
@@ -0,0 +1,467 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8,9,10} )
+
+inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
+
+KEYWORDS=""
+
+SLOT=$(ver_cut 1)
+
+MY_PV=${PV/_/}
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
+
+LICENSE="POSTGRESQL GPL-2"
+DESCRIPTION="PostgreSQL RDBMS"
+HOMEPAGE="https://www.postgresql.org/"
+
+IUSE="debug doc icu kerberos kernel_linux ldap llvm lz4 nls pam
+ perl python +readline selinux +server systemd ssl static-libs tcl
+ threads uuid xml zlib"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+CDEPEND="
+>=app-eselect/eselect-postgresql-2.0
+acct-group/postgres
+acct-user/postgres
+sys-apps/less
+virtual/libintl
+icu? ( dev-libs/icu:= )
+kerberos? ( virtual/krb5 )
+ldap? ( net-nds/openldap )
+llvm? (
+ sys-devel/llvm:=
+ sys-devel/clang:=
+)
+lz4? ( app-arch/lz4 )
+pam? ( sys-libs/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+server? ( systemd? ( sys-apps/systemd ) )
+ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+tcl? ( >=dev-lang/tcl-8:0= )
+xml? ( dev-libs/libxml2 dev-libs/libxslt )
+zlib? ( sys-libs/zlib )
+"
+
+# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
+# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
+# the libc includes UUID functions.
+UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
+BSD_LIBC=( elibc_{Free,Net,Open}BSD )
+
+nest_usedep() {
+ local front back
+ while [[ ${#} -gt 1 ]]; do
+ front+="${1}? ( "
+ back+=" )"
+ shift
+ done
+ echo "${front}${1}${back}"
+}
+
+IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
+CDEPEND+="
+uuid? (
+ ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
+ $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
+)"
+
+DEPEND="${CDEPEND}
+sys-devel/bison
+sys-devel/flex
+nls? ( sys-devel/gettext )
+xml? ( virtual/pkgconfig )
+"
+
+RDEPEND="${CDEPEND}
+selinux? ( sec-policy/selinux-postgresql )
+"
+
+pkg_setup() {
+ use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
+
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Set proper run directory
+ sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
+ -i src/include/pg_config_manual.h || die
+
+ # Rely on $PATH being in the proper order so that the correct
+ # install program is used for modules utilizing PGXS in both
+ # hardened and non-hardened environments. (Bug #528786)
+ sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
+
+ use server || eapply "${FILESDIR}/${PN}-14_rc1-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
+
+ local myconf="\
+ --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
+ --datadir="${PO}/usr/share/postgresql-${SLOT}" \
+ --includedir="${PO}/usr/include/postgresql-${SLOT}" \
+ --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
+ --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
+ --with-system-tzdata="${PO}/usr/share/zoneinfo" \
+ $(use_enable debug) \
+ $(use_enable threads thread-safety) \
+ $(use_with icu) \
+ $(use_with kerberos gssapi) \
+ $(use_with ldap) \
+ $(use_with llvm) \
+ $(use_with lz4) \
+ $(use_with pam) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with readline) \
+ $(use_with ssl openssl) \
+ $(usex server "$(use_with systemd)" '--without-systemd') \
+ $(use_with tcl) \
+ ${uuid_config} \
+ $(use_with xml libxml) \
+ $(use_with xml libxslt) \
+ $(use_with zlib) \
+ $(use_enable nls)"
+ if use alpha; then
+ myconf+=" --disable-spinlocks"
+ else
+ # Should be the default but just in case
+ myconf+=" --enable-spinlocks"
+ fi
+ econf ${myconf}
+}
+
+src_compile() {
+ emake
+ emake -C contrib
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ emake DESTDIR="${D}" install -C contrib
+
+ dodoc README HISTORY
+
+ # man pages are already built, but if we have the target make them,
+ # they'll be generated from source before being installed so we
+ # manually install man pages.
+ # We use ${SLOT} instead of doman for postgresql.eselect
+ insinto /usr/share/postgresql-${SLOT}/man/
+ doins -r doc/src/sgml/man{1,3,7}
+ if ! use server; then
+ # Remove man pages for non-existent binaries
+ serverman=(
+ initdb
+ pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
+ pg_{test_{fsync,timing},upgrade,waldump}
+ post{gres,master}
+ )
+ for m in ${serverman[@]} ; do
+ rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
+ done
+ fi
+ docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
+
+ # Create slot specific man pages
+ local bn f mansec slotted_name
+ for mansec in 1 3 7 ; do
+ local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
+
+ mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
+ pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
+
+ for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
+ bn=$(basename "${f}")
+ slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
+ case ${bn} in
+ TABLE.7|WITH.7)
+ echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
+ ;;
+ *)
+ echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
+ ;;
+ esac
+ done
+
+ popd > /dev/null
+ done
+
+ insinto /etc/postgresql-${SLOT}
+ newins src/bin/psql/psqlrc.sample psqlrc
+
+ # Don't delete libpg{port,common}.a (Bug #571046). They're always
+ # needed by extensions utilizing PGXS.
+ use static-libs || \
+ find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
+ -delete
+
+ # Make slot specific links to programs
+ local f bn
+ for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
+ -mindepth 1 -maxdepth 1)
+ do
+ bn=$(basename "${f}")
+ dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
+ "/usr/bin/${bn}${SLOT/.}"
+ done
+
+ if use doc ; then
+ docinto html
+ dodoc doc/src/sgml/html/*
+ fi
+
+ if use server; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
+
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
+
+ if use systemd; then
+ sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
+ "${FILESDIR}/${PN}.service-9.6-r1" | \
+ systemd_newunit - ${PN}-${SLOT}.service
+ newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
+ fi
+
+ use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
+
+ if use prefix ; then
+ keepdir /run/postgresql
+ fperms 1775 /run/postgresql
+ fi
+ fi
+}
+
+pkg_postinst() {
+ use server && use systemd && tmpfiles_process ${PN}-${SLOT}.conf
+ postgresql-config update
+
+ elog "If you need a global psqlrc-file, you can place it in:"
+ elog " ${EROOT}/etc/postgresql-${SLOT}/"
+
+ if use server ; then
+ elog
+ elog "Gentoo specific documentation:"
+ elog "https://wiki.gentoo.org/wiki/PostgreSQL"
+ elog
+ elog "Official documentation:"
+ elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
+ elog
+ elog "The default location of the Unix-domain socket is:"
+ elog " ${EROOT}/run/postgresql/"
+ elog
+ elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
+ elog "so that it contains your preferred locale in:"
+ elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
+ elog
+ elog "Then, execute the following command to setup the initial database"
+ elog "environment:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+
+ if [[ -n ${REPLACING_VERSIONS} ]] ; then
+ ewarn "If your system is using 'pg_stat_statements' and you are running a"
+ ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
+ ewarn "the following command after upgrading:"
+ ewarn
+ ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
+ fi
+ fi
+}
+
+pkg_prerm() {
+ if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
+ ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
+ ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
+
+ ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
+ sleep 10
+ eend 0
+ fi
+}
+
+pkg_postrm() {
+ postgresql-config update
+}
+
+pkg_config() {
+ use server || die "USE flag 'server' not enabled. Nothing to configure."
+
+ [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
+ && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
+ [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
+ [[ -z "${DATA_DIR}" ]] \
+ && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
+
+ # environment.bz2 may not contain the same locale as the current system
+ # locale. Unset and source from the current system locale.
+ if [ -f "${EROOT}/etc/env.d/02locale" ]; then
+ unset LANG
+ unset LC_CTYPE
+ unset LC_NUMERIC
+ unset LC_TIME
+ unset LC_COLLATE
+ unset LC_MONETARY
+ unset LC_MESSAGES
+ unset LC_ALL
+ source "${EROOT}/etc/env.d/02locale"
+ [ -n "${LANG}" ] && export LANG
+ [ -n "${LC_CTYPE}" ] && export LC_CTYPE
+ [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
+ [ -n "${LC_TIME}" ] && export LC_TIME
+ [ -n "${LC_COLLATE}" ] && export LC_COLLATE
+ [ -n "${LC_MONETARY}" ] && export LC_MONETARY
+ [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
+ [ -n "${LC_ALL}" ] && export LC_ALL
+ fi
+
+ einfo "You can modify the paths and options passed to initdb by editing:"
+ einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
+ einfo
+ einfo "Information on options that can be passed to initdb are found at:"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
+ einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
+ einfo
+ einfo "PG_INITDB_OPTS is currently set to:"
+ if [[ -z "${PG_INITDB_OPTS}" ]] ; then
+ einfo " (none)"
+ else
+ einfo " ${PG_INITDB_OPTS}"
+ fi
+ einfo
+ einfo "Configuration files will be installed to:"
+ einfo " ${PGDATA}"
+ einfo
+ einfo "The database cluster will be created in:"
+ einfo " ${DATA_DIR}"
+ einfo
+
+ ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
+ sleep 5
+ eend 0
+
+ if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
+ eerror "The given directory, '${DATA_DIR}', is not empty."
+ eerror "Modify DATA_DIR to point to an empty directory."
+ die "${DATA_DIR} is not empty."
+ fi
+
+ einfo "Creating the data directory ..."
+ if [[ ${EUID} == 0 ]] ; then
+ mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
+ mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
+ chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
+ fi
+
+ einfo "Initializing the database ..."
+
+ if [[ ${EUID} == 0 ]] ; then
+ su - postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
+ else
+ "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
+ fi
+
+ if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
+ mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
+ ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
+ fi
+
+ # unix_socket_directory has no effect in postgresql.conf as it's
+ # overridden in the initscript
+ sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
+
+ cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
+ # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
+ # On the off-chance that you might need to work with UTF-8 encoded
+ # characters in PL/Perl
+ plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
+ EOF
+
+ einfo "The autovacuum function, which was in contrib, has been moved to the main"
+ einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
+ einfo "by default. You can disable it in the cluster's:"
+ einfo " ${PGDATA%/}/postgresql.conf"
+ einfo
+ if ! use systemd; then
+ einfo "The PostgreSQL server, by default, will log events to:"
+ einfo " ${DATA_DIR%/}/postmaster.log"
+ einfo
+ fi
+ if use prefix ; then
+ einfo "The location of the configuration files have moved to:"
+ einfo " ${PGDATA}"
+ einfo "To start the server:"
+ einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
+ einfo "To stop:"
+ einfo " pg_ctl stop -D ${DATA_DIR}"
+ einfo
+ einfo "Or move the configuration files back:"
+ einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
+ elif use systemd; then
+ einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ else
+ einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
+ einfo "instead of 'pg_ctl'."
+ fi
+}
+
+src_test() {
+ if use server && [[ ${UID} -ne 0 ]] ; then
+ # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
+ # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
+ local old_ctype=${LC_CTYPE}
+ export LC_CTYPE=${LC_COLLATE}
+ emake check
+ export LC_CTYPE=${old_ctype}
+ einfo "If you think other tests besides the regression tests are necessary, please"
+ einfo "submit a bug including a patch for this ebuild to enable them."
+ else
+ use server || \
+ ewarn 'Tests cannot be run without the "server" use flag enabled.'
+ [[ ${UID} -eq 0 ]] || \
+ ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
+
+ ewarn 'Skipping.'
+ fi
+}
diff --git a/dev-db/qdbm/Manifest b/dev-db/qdbm/Manifest
index f4eb6a7a055e..1d5aeac11b63 100644
--- a/dev-db/qdbm/Manifest
+++ b/dev-db/qdbm/Manifest
@@ -5,5 +5,5 @@ AUX qdbm-ruby19.patch 10116 BLAKE2B 9a15c5d2e0cf8237edb78e68b2f9fde4868841bcca6a
AUX qdbm-runpath.patch 1133 BLAKE2B 9b1c8c211d8e4075a77a34f3d79ca15cb3d833801777bdb328293047539bdd1a51c08031b3400c11d10732aa7864078ca8db02713a95cd90704e1a9e26f5bd10 SHA512 de8bde4a614617d742131e8025fd661019ec81b803817ef32ffca461b2c8b60c20756f6e6f84d6f23124eed3947ab3573b8c4a05b254f8b4d3e53f0cf7bc8452
DIST qdbm-1.8.78.tar.gz 1015429 BLAKE2B 1b985d856ff18ddfeb2d779694ba9a76006908b4b2a7509d4e3668aded80e08bbde28bcc24762ec27048cdc01dc84f9872dbfc221e8eea6f1c68f5e81cdc69d3 SHA512 480549c56071bf82edf714a611aef863599c858ed63702820ae0890fd2c0029d1a231ed94a8090c74420dd648bd3625d270a5c078b113cbb86a12ef509e19037
EBUILD qdbm-1.8.78-r2.ebuild 3681 BLAKE2B 888a4b4312742a380bb6e7e5cca9f9114dac0579bd71a1c5435ecfc6b098669c66bd4ed77d1c5f2808cb386ebae17f25909c016ec42b74aad71e9984cac233b6 SHA512 c7ef0976be36d203048a7bd2190dd6fa6d34f0ebc56fef67eac4569f07b6731e1b73b0a2f5658ab585139239e4dd64f209e4f44597012fbe7edadcd56d06264a
-EBUILD qdbm-1.8.78-r3.ebuild 3690 BLAKE2B 435eb2e6fe2704a7a418c887f7b69a136fd2539891dec44ce580171fec1d2e7c3f3afbf78805297b0eac288c3a0b1005d947944eeb9507bb49de9a785645f995 SHA512 a7c8e4a561b9a31492a3213589c472c4be16853bdc1085e18cb89978a116ae082300423f6a5d8e44094b4d85564a436d1e58c81d8b60a871fd1d6aeaabd85fbe
+EBUILD qdbm-1.8.78-r3.ebuild 3689 BLAKE2B 43e1b26a3b4e1508562675dcc6cc90159faa6485ab16ea673501be9e93e8f00b14a017826ec139a7f5a65228f727123e6cbedabf50d0d87ceb52bda1e1f4332d SHA512 5f9726aefae23bc29f93c7fa69b60b8c51b1c3d96b397bdc6a3948ee2228d72af6bbffc66a247b811dd156cf5c513a3d345a07c994f69245409fe01faad3c18d
MISC metadata.xml 222 BLAKE2B 425bba0db7c4bc483eddcb51bb4151324b62afc42496047413bf9d0480fd731ea78201a8b99c42d9adfa9b20614f9507e8e89a87e9afce32aa9db82f42f827ed SHA512 7ae4d3d64e85fb01194d31b41843c10e3bf6a782e9f308cbe3f0a75c0a07d6af2a88013549b5840b3cd5e766d5044f0da290c31a4800d1823f6eca4028b082da
diff --git a/dev-db/qdbm/qdbm-1.8.78-r3.ebuild b/dev-db/qdbm/qdbm-1.8.78-r3.ebuild
index a2ceb9767b42..2d5ced540e56 100644
--- a/dev-db/qdbm/qdbm-1.8.78-r3.ebuild
+++ b/dev-db/qdbm/qdbm-1.8.78-r3.ebuild
@@ -13,7 +13,7 @@ SRC_URI="https://fallabs.com/${PN}/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~ppc ppc64 ~riscv ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="bzip2 cxx debug java lzo perl ruby static-libs zlib"
RDEPEND="bzip2? ( app-arch/bzip2 )