summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-07-10 23:40:16 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-07-10 23:40:16 +0100
commit51af5f0eb4cddbe6aa7953717873691d77aae9ff (patch)
tree1541525274162b033ebbc3ed38abaf335fbbd49a /dev-db
parent7014a5a3ea0feffab9701fdd6b64cc7667a985af (diff)
gentoo resync : 11.07.2019
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/Manifest.gzbin18994 -> 18994 bytes
-rw-r--r--dev-db/mariadb-connector-c/Manifest2
-rw-r--r--dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild8
-rw-r--r--dev-db/mariadb/Manifest17
-rw-r--r--dev-db/mariadb/mariadb-10.1.34.ebuild887
-rw-r--r--dev-db/mariadb/mariadb-10.1.37.ebuild887
-rw-r--r--dev-db/mariadb/mariadb-10.1.38-r1.ebuild2
-rw-r--r--dev-db/mariadb/mariadb-10.2.24.ebuild972
-rw-r--r--dev-db/mariadb/mariadb-10.3.13.ebuild973
-rw-r--r--dev-db/mariadb/mariadb-10.3.15.ebuild974
-rw-r--r--dev-db/mariadb/mariadb-10.4.6.ebuild22
-rw-r--r--dev-db/mariadb/mariadb-5.5.63.ebuild831
-rw-r--r--dev-db/mysql-connector-c/Manifest1
-rw-r--r--dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r2.ebuild83
-rw-r--r--dev-db/mysql/Manifest4
-rw-r--r--dev-db/mysql/mysql-5.6.43.ebuild2
-rw-r--r--dev-db/mysql/mysql-5.7.25.ebuild2
-rw-r--r--dev-db/opendbx/Manifest4
-rw-r--r--dev-db/opendbx/files/opendbx-man-optional.patch23
-rw-r--r--dev-db/opendbx/metadata.xml3
-rw-r--r--dev-db/opendbx/opendbx-1.4.6-r3.ebuild70
-rw-r--r--dev-db/pgadmin4/Manifest2
-rw-r--r--dev-db/pgadmin4/pgadmin4-4.10.ebuild124
-rw-r--r--dev-db/pgbadger/Manifest2
-rw-r--r--dev-db/pgbadger/pgbadger-11.0.ebuild24
-rw-r--r--dev-db/pgbouncer/Manifest2
-rw-r--r--dev-db/pgbouncer/pgbouncer-1.10.0.ebuild86
-rw-r--r--dev-db/pgpool2/Manifest4
-rw-r--r--dev-db/pgpool2/pgpool2-3.7.10.ebuild2
-rw-r--r--dev-db/pgpool2/pgpool2-4.0.5.ebuild2
-rw-r--r--dev-db/postgis/Manifest4
-rw-r--r--dev-db/postgis/postgis-2.4.7.ebuild2
-rw-r--r--dev-db/postgis/postgis-2.5.2.ebuild2
33 files changed, 448 insertions, 5575 deletions
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz
index 5910f6d39201..817e35ca2b7b 100644
--- a/dev-db/Manifest.gz
+++ b/dev-db/Manifest.gz
Binary files differ
diff --git a/dev-db/mariadb-connector-c/Manifest b/dev-db/mariadb-connector-c/Manifest
index 78a6c144edc4..51f1d2da6d4b 100644
--- a/dev-db/mariadb-connector-c/Manifest
+++ b/dev-db/mariadb-connector-c/Manifest
@@ -5,5 +5,5 @@ DIST mariadb-connector-c-3.0.6-src.tar.gz 666819 BLAKE2B 7245c0e13e569454d1cc70e
DIST mariadb-connector-c-3.0.9-src.tar.gz 668142 BLAKE2B f61f855c334268b1cb079abc566a600093d7e0bdd164c22045000e337f43d2b57d14988cba1b3fd2f6316f6e0d949be7e67ac73410ddb1abc66e0faa16422946 SHA512 6f45bcd4bee07f6d72d1c4fee0bdb903ef4fa879eb7508156bc885a5657caf69b145d95647c4bc663eb2a2b03569b41ef9d87ca532b77901c2f67fd608048a1a
EBUILD mariadb-connector-c-3.0.6-r1.ebuild 2816 BLAKE2B 38450ea224a5f0e960abc65ebce37121ed02d1ec0d5bfc7c2d7a124c9ffd77f10090247493eb0c758b991e40cb8a845fe13355ba8e32b64bb2ca90fa957aca76 SHA512 f5670d8174889c3ccc8b7693cdd97d39c1c0d597d5980c6a5d15317662bffebea1e3b6573c438b076362c8c46649dedf8f285d90ac4f5ffb4eed4d4db82b0378
EBUILD mariadb-connector-c-3.0.9.ebuild 2318 BLAKE2B 3bfe94b1f26a60a13f8a9a9d83bdd387e9c2257a0f0502e1013c4dc4c7c06dae5c31af9efe1ac5b4ff543d9a1a2a6335b8b5b8465ac75bdf3170015696caf3cf SHA512 114a5963a7e1364f0f94063042bb98bc8d45664e6ef54b1cabfd39154b2b6815c41bd597e83ab376dc0d22d10b30e9be154ddc7908560089e4fba84c7271e18b
-EBUILD mariadb-connector-c-9999.ebuild 2362 BLAKE2B 6a73cddd218a6b850a906afe3e1e1273bf73d0639d1e32a0af156294b1525dd554b321bf51d9b426c609e00541637c3e7607c7cd6b065e1cc71e845d52055ecb SHA512 cf2b2b46343b5f03eb7bc4e8b001afc712cc1dd1a667eaca7cd9b5696d153647c982cd2ec37cca5a2c2cefc1998bbd3c629957254cec9f76df109d8b2c68e413
+EBUILD mariadb-connector-c-9999.ebuild 2316 BLAKE2B 1766c9da2ff67920d51121c910f47955785e028eaf579d9da5a8d420f6f9e025bd20f5e4dc3b4e4e61c28474eee97793a6e5324cc18afaae546fba6ebb41d19f SHA512 6683d0b84194dfdfdefa3f24e3c913e121b48364f6f684517669db4450adb03aaad660f6f6f2162d450f6f89dfa7dfd69d014c9c7a19bedcf89314c9c0b2749f
MISC metadata.xml 324 BLAKE2B fab5394015cd337683f65a257556ed0f15e35826bb0a6ce75a7033cd5931455ff2bed527064d698e9b3165f2cfcaff8a4bdfcad0b830482ae2e4389a79d529fb SHA512 1fe9e5d5d9f8e817ce49117fbcc6a6d706a090752606647496f2b7a25de51bfb641a408ff0cdaf626d83eb5c314d2e28c3f29532307d942cb41498edf4b44aa6
diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
index e6c4b2e68967..2985ce7c2c63 100644
--- a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
+++ b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
VCS_INHERIT=""
if [[ "${PV}" == 9999 ]] ; then
@@ -43,9 +43,7 @@ DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
)
)
"
-RDEPEND="${DEPEND}
- !>=dev-db/mariadb-10.2.0[client-libs(+)]
- "
+RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/gentoo-layout-3.0.patch
"${FILESDIR}"/${PN}-3.0.8-fix-pkconfig-file.patch
@@ -63,7 +61,7 @@ multilib_src_configure() {
-DWITH_SSL:STRING=$(usex ssl $(usex gnutls GNUTLS OPENSSL) OFF)
-DWITH_CURL=$(usex curl ON OFF)
-DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT:STRING=$(usex kerberos DYNAMIC OFF)
- -DMARIADB_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
+ -DMARIADB_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
-DINSTALL_LIBDIR="$(get_libdir)"
-DINSTALL_PCDIR="$(get_libdir)/pkgconfig"
-DINSTALL_PLUGINDIR="$(get_libdir)/mariadb/plugin"
diff --git a/dev-db/mariadb/Manifest b/dev-db/mariadb/Manifest
index e0005d4407d4..cca9eb740212 100644
--- a/dev-db/mariadb/Manifest
+++ b/dev-db/mariadb/Manifest
@@ -3,34 +3,21 @@ AUX my.cnf-5.5 4805 BLAKE2B 39ffb485329b246867db03977661441ebfa71c8ac6275d5263dd
AUX my.cnf-5.6-r1 4597 BLAKE2B ae7eb874421819b8ce8e3c21e00f21bba1fb508a8d0ea4825f110b42521deca01726d3a8154c1c541119592b809ef6263d13e7701eba7dc8af201b3777c6d226 SHA512 5670fc67032656c5079fe5190ffef5443d5646ffae00d42e231c584e7688578a7df33dbe473749ea160e978152f5d94325eb023c748826aee89866694bc050f8
AUX my.cnf.distro-client 643 BLAKE2B 5ffd286907ee28c92c85bbcc9a6266555733f1115f2d6b8009183dba6939b978ae8d1b8e0a53e672b8e1a1f621650399231723603fc5f96ef7218db84236e176 SHA512 801f6ab8be3110bb4dc38eaa4367715b8d342b69cadfe13dff987ef6c3aedb67d19449f8f2483e63df5d8b444ca30701b0d96f85e211de6b1e3db923b029acbc
AUX my.cnf.distro-server 998 BLAKE2B a7f2977a96d394cb7e24d72d82a1c21095c4b55607e5ca4a2c10619278796c328931a5ec076c15b60afef370c2e5da02ca0c628f330e876b4d2c984eeb54df5f SHA512 d9ab6f7fdfe08e6c242f84410ec680ef6aa6778c4bd55fee67c644e1a7d997446d8ef2129be6fc9833d16fe40cf17e09cdf0cf015f06bb145bbf9cfecb51e882
-DIST mariadb-10.1.34.tar.gz 65298561 BLAKE2B 3f3af7b8bad68a08f69befd3f3e7bd88b8cf058feb20309dc2cdbd16bf5d015c2cb0d1d9d2fdf831f6183c0b9bb25405124c24b2940467489e05d42c57f7b0a6 SHA512 3c18359006b340dcf724d1fce36dcc19916c42492269a7545e0726172b8f7b84860e10725c74e4458dae34572395f1650bf17838e9058544e0a6cfcbffd54f6d
-DIST mariadb-10.1.37.tar.gz 63492946 BLAKE2B 0f19b402c597443ef970cbe2a2d85d51743cc2d05ab741897efb150f007d7be8b645706a2d0dc5a9f91c7a380d2313840f77d6e9b15f3335495f275b415e5a33 SHA512 b7c35cd67ad265ce2e3a4db20a2ae2b78745db96dc70a211f027a39b6dbb3dc900991c2ee1021ee6a97d12489c3e2a70252e2adf348a458af38b99c3de5a4f25
DIST mariadb-10.1.38.tar.gz 63535685 BLAKE2B c179ea2f60287c2bc1c0d1c47ae989ac2653a24063e8344cef2f3062fc6798e18b969e8f9aa8287104ce2518e6c644cb8d3a4650b5a0bc5dfde973e76e618955 SHA512 184582f3a902a989ba3d9c4d21288c014c8b469adbbb4cbabc621c5006022cef29baed8c1140ed4476b124da83b76dfa414295ed0c3374be826e75aca953a77b
DIST mariadb-10.1.40.tar.gz 63573615 BLAKE2B a57f89c3a9cbfdfc7ff85ec6d7f4231f29a8c2b5df8a86e069e9c077aafc16f60655eab2765a622ec2675fbec4739a477613a42c68f897785443d8366fb5d1a3 SHA512 6b946189c69905f1a23a96d34720f1592353e0095455bf452bba31d53c90143d088f0fd997cac3da0a779840bb6ae6cc30b45144cba474463a8e3a6978a8a8f3
DIST mariadb-10.2.22.tar.gz 71907765 BLAKE2B e7781a9e1bb0becca543ebb0b9e03912fbafa9de45bbd5c7232f92d29b934148dd124ad462bf8aa5aec2e4ee0bf75a03fae5e5fe97a77e1d93095052a577c14b SHA512 cd61d0c2d528b23b975e6ea142560d9b9ebff7ecda6fa9b3659b25b3406e8cc925918f4c3bb0e200ddb8d0520bcaa4d4f70d245b4731896f9ba2f1bdf0a817b2
-DIST mariadb-10.2.24.tar.gz 71965656 BLAKE2B 2e78d7fc98fe6221126b7700c821ec4294af9d474f440857530b41d5633821b9995b732bbcdcba14c6a01f5decc56f506c99def4dc1a9a4dd52253d3045a88c6 SHA512 bd0e8c506e94f063b6cfbb1e7e872b4fdbe9ab704e07ff3af1e1efabb89daa39fec3b06ec5294d9a19fdc680da082d095cd3c5f9e4c4ee6f9ee5ae0514d6bb6f
DIST mariadb-10.2.25.tar.gz 71997847 BLAKE2B 03435106c5b2316e8f66028fa05b85042f35ebe84fa245d214622252048befa414d1630c4edead9ccb07f88f8c8085bb4c2e1361e08f58829b0a751326503cf1 SHA512 0d0f5e188f81715edb02ee91cc6c15ad0f674da67bc8d291a2bad9454190e9423f85ee1b69f88d3b429bc56c58a899f889f04862a4bddf2afdac744318c9c723
-DIST mariadb-10.3.13.tar.gz 70745600 BLAKE2B f62b6de0566910cd0995954e3b84528bca4d8b99dab79ce1e8b5d4076a223890fc0bb7b43ac3d81c81c0b907cabbc3b042eab936b845ef18d259793759b05d51 SHA512 3cbd93291aa43b235e5b81d953ea69fb32df54fb518f922f69b5485952f01fae693c77b0efac37f414ed7ff132d3b58f899812bdb7be8a5b344c3640e2c3a0dd
-DIST mariadb-10.3.15.tar.gz 70824529 BLAKE2B 6a84430e280db287859bd82cc2b6bb63bddd9188e599165d6ccb3e0fa75cb9de083d3d8d267b7de9de70be692a45b72570c8943d949c43673b3c1387623bb0b0 SHA512 35332ac32cba27fef1b4ddd2209236853f4309756fd121fbdbd2b6be0651e817cedc80e276b89ccfa4bc76760811434fab45a4d380d0ebd500c7d9bd7377fe93
DIST mariadb-10.3.16.tar.gz 70862041 BLAKE2B 522c3185e9928cfb669065fd8b1b8538f53a63d0413ae32e317a1ee6c572c6af458ba15e904e19b2cdb6e83b870360f56f4368eecc2774caab8ac85bc000f609 SHA512 b22a8c8fa0265f88962432ade71c3f0ec554f7d38042def832cfcb50f3aa1dd77a715c76706ffeae679b95438529b06e98b73b7e219f9c645980802027ec022f
DIST mariadb-10.4.6.tar.gz 76710358 BLAKE2B 7fcaced6cbcc027ad2a1f1e681af30d0f4ec45f432bad4c6c7d9625a8d20978e4c49cbec3016be873ecda16cb113a8f3b6a8ec8995772255c23e908cc5d11178 SHA512 b04c47f72de2473d7b5edd04b4785a1d7179bb1f429f30ba53ae6cfbbb413200d9803eff1072949b2e81fd7d2164ea34c68620d621d4181b913daa2293ae140c
-DIST mariadb-5.5.63.tar.gz 45946425 BLAKE2B bddfd67d8393ec22c4bc8d7dab2838825394636bd690c04574bdc4da84fbf6c779fcae7f6be5d596458baa732cb5278475f308f03df083cdfcecffc486950d81 SHA512 4699d8af2210e12d0eea659a4d3fd4bfa68ce11a38cffaf939a96cb7a1fe64dd0827d39c3a0a36fa7cc1981a804a9af7a6d5cfaf23a8cfc8440e54c0163c2acb
DIST mariadb-5.5.64.tar.gz 45953561 BLAKE2B d6efe53e520b829ec337a00efadd7d813afd5e3ee6ac5a298773c7cd1b724d01856979317fe2bcf814af3bdabdbd7c6c3d2e27a60b4cdf6032b1dfd64e54d84d SHA512 3e93044eb30d2ce50fefce503f16f4b542fd647ff4367675147ebe1b1f576b4fbad5c0bb25670136d0758d2b8b0c571119244c87d66565bb9b3471811f5dc6b8
DIST mysql-extras-20180809-1700Z.tar.bz2 322999 BLAKE2B 8b5feb32085dc35b2f68dae985b2d266c4eaa0e956b490050a2df04bbff99bf8623b67e75af9326d84e3ad625c4d86b0d21d23c9a96df5a0c9cd5ed730958970 SHA512 fbd7af9284bbf09d55f128361e7cc52d94f24ac491aac800cd6d61f2e444aeca66a4d5e6ae94c2fb4044e00cec9b232bae9a76a229f87f19d90b7aecf70792ec
-DIST mysql-extras-20181104-2252Z.tar.bz2 328613 BLAKE2B c869dbdd8eb8ab6706b52815fae88e0789b955b9d3e89eac305e6de6e1bc9e78ea10ac58efeac0d6478c7f83587910834e9b4c44e3621224f006daae44dc2bf3 SHA512 e0dff23aa6420a9cfcf2f60464381d4b08194759dcd96910cdf94075fa71e90b74fa3dae700f279f421fee68315af37e47054c9422adeb6cc757fa968a1b65bf
DIST mysql-extras-20190305-2052Z.tar.bz2 331304 BLAKE2B 1d2c35a961159fa5ce9ee6699fce943f5a5b5cf60b11c9bb4bcccee4943f4508a9eb6d01050c642353ac592ce1a6b421abf2a1bebc706c44c4c8a36aa698ec43 SHA512 ae63403320e010acbb92f8aec6da8ed4f267cef0bad37147d594076fd94571de7f98bfc2afbe94af5d716f58d57696fd958b1e13e20e87052f252ed4a188cd3c
DIST mysql-extras-20190521-1824Z.tar.bz2 331441 BLAKE2B d45fd1be113d3dc7f10a3ff89cfda3d59974d88366a143b473a68493c93e244d45a836b4e13dc9e88bbd8b734507858d6b4b1251325c464f48572fe158d7edf7 SHA512 8b91f534acbd07e3a2f66e28b1301f960ed9192c2bc1edbc07741b6200ad0767fdc004faebce2a60fa67a8f3aee186c98ee2f56278d4e8773e5df77f609ef837
-EBUILD mariadb-10.1.34.ebuild 29472 BLAKE2B 859741b70abf8c2347395b26b7543f36be94165141227bb7dc75f054768490bf891eea5bd2f171aa0c0f8caed7603abf1347a0087caa10e55ce920aaa9c6677b SHA512 ff30a1fcdcc72b8324dec1be29db63a1792ca58474744f0c02014b1fba28d856ac0f154235b0889aedcc95cf24c4b58fcfd681458be726609861ba6f4220ad8f
-EBUILD mariadb-10.1.37.ebuild 29472 BLAKE2B df997764c777f3efd80b1d93c5e3203e27396f8eec2661c5c4b4b4bf9c561f377f6d7eb968db8cb88ec95bc417301ded6c479e2fe6b39bc6d94b985b8569952d SHA512 518b6776ba6f8529675d5ffe9e9e0932a65a35ca399ba58bfcd473b3b7f7d522e1d4c3f4c451b11db555f2334dd17d6de21bbff24d9e82faa59117dfa882861c
-EBUILD mariadb-10.1.38-r1.ebuild 29462 BLAKE2B 8818ad1e16db6c698d7020b8ea7e898ea5b5bb24e57584c137152be344b0de7186aac040348f20f3dd07ee4c0bf828087df99e1b0ac985c5aa51e8867caa9f95 SHA512 75b0e958d3adf985c2159bcc8876bfafc371071eff9d589504c7f7d4ce4d9d831de140122e5bceb6666f25b4fd3d4f015b57f63d5b171bcb5d2e39391e4a596b
+EBUILD mariadb-10.1.38-r1.ebuild 29461 BLAKE2B 8835eafc8071bc212701f6b3da7a4370ca6cd39ae2930d7ca34f52b35bc052901d970b5a79c4b6a54ae726596ab04ce0fc87c4ecdbd8c5b76a2a9200c34e5136 SHA512 4c3b7e8855dba247daf35857e8deeea15d8a06243bc06c3e8a3966c354f7ef0f3941e8279b4c0657cc1e9b527691b673bf1191dacffeb0fe42da6471f68eaee3
EBUILD mariadb-10.1.40.ebuild 29512 BLAKE2B b87872354f3fad04ea8267fbed91397510e4ddf1acafd71cddb0dac4b087825978ad46b8ed945cd877c777849870187e02669573b9b5cd27a993e0e1b10dd2df SHA512 ff4251b4fb68c4038d55847807a0d3d331707cef2ff29a717c207c026d6554a23885f0b55c6be49bd0c215a678f61e6a241eb22932a1ef2c6c5b2ee1e8682010
EBUILD mariadb-10.2.22-r1.ebuild 32512 BLAKE2B 560adda28ace5ccf01dc9b4b333226cfbdecb316896a9255179542c4fde26ccd313606fc75fbc15796d1f95bda794c9e7f71cd86adf4e591fece797264934449 SHA512 a6e3ebe0562518da825cf653c034d144f92f5bfed1097038ca10b347992ceaeebd5ac3cfa9f74c89dc2581000d58ffcfee20d8adda22e72b00b9ad0b36e04415
-EBUILD mariadb-10.2.24.ebuild 32530 BLAKE2B abfdf9b1131eacbf59acbbdd250c58609db09b306cdc7ffbad02aa7b2b5e976f528c988a489e71c108bc9ead860aaddfdc3ab51af5d851b69f11e62056fa84d7 SHA512 d25d74d44ebff3f9857f1600fd974d4190739cf83aff6a897753847ff98d502951bba97798d7f049cf9053ecd5f8d9df992ba0de5d92f769595e624d8fe547be
EBUILD mariadb-10.2.25.ebuild 32600 BLAKE2B c55ea91a216836acd65f5bbd981381f553e82c7bf3163527d47a0637c1275ab8c46f25ea44e01f2d6622cc1cf94ae560bb51391297c945509023e5332c0107cb SHA512 3ec820675e4c0b25f9f8e5513c8902488911262df972b5e1e2d9f752a0a7e7e7f7050ecc28c204ba3752eb8558f1d18d1235916fbea805128f209577f8d064c6
-EBUILD mariadb-10.3.13.ebuild 32189 BLAKE2B 1a79ec6ce0ce0bc6d9000368712d25a0d9d0e096f244d3422bb56518fd20439b3c701291d9b75a45420ac6fe1e2dc0d81cf8142c80334001a9ac6087a66a8004 SHA512 a474f4856bd10379da5173f843ff476379672839d68793c5436a8b7618ef1637050b61ddee11f1cb423cf33aacd28fb5e03d03e73b0a415c3a9e7ea7ea8f45d1
-EBUILD mariadb-10.3.15.ebuild 32225 BLAKE2B 95ba72ff67806f04371bb1fcd88461609c5bf74cf81fd1022a2c592aead3a0f98fc91b32df5303dc8680209f2a760e99f957839e07c54dde93378903c010560d SHA512 b444bbaa65de8f4535fb6ffd3a2062f74426d316e9cff4e341362a15a3ccaedcf45cbf5478ee308a2e997261b4967ab52bd51413c4e76b070867705ffdad50ce
EBUILD mariadb-10.3.16.ebuild 32225 BLAKE2B 95ba72ff67806f04371bb1fcd88461609c5bf74cf81fd1022a2c592aead3a0f98fc91b32df5303dc8680209f2a760e99f957839e07c54dde93378903c010560d SHA512 b444bbaa65de8f4535fb6ffd3a2062f74426d316e9cff4e341362a15a3ccaedcf45cbf5478ee308a2e997261b4967ab52bd51413c4e76b070867705ffdad50ce
-EBUILD mariadb-10.4.6.ebuild 32883 BLAKE2B 81d9282b5c28be81bdac3cefb2598aee3b22a39852edfe37c5fac0585dd26bb9b57f34f39b53f9a55052795b3412350bbd3def89a8163ca4f55e944b16b38e51 SHA512 02f616f51ca2bf7e79269d5ea1f5f9111021e8efccb908c1be9ef9db6eb3251d600250d2c95e666f68eb2f7fd62f9119b9c26adb927048a3201ec28972e01d20
-EBUILD mariadb-5.5.63.ebuild 27054 BLAKE2B fb6b085846137c6607ccb1b58fdaac6abe8999ad67102b3993b52340dd4c7805640379b79c0a0fe300b237438f836a8b62794c423ebc47707b414f7712214919 SHA512 d9356369a5e93dc1dd1a6c6c332ceac7306cc14b33068739d5fef621ea6f14bf2a36e0b8a9f39500ccb8fb7cf35dae013c9303ade0002459971f48d28097d3de
+EBUILD mariadb-10.4.6.ebuild 32237 BLAKE2B 7fab9b2049d0849f019821510f5a6812ff1ae9eb1786977f146be6afec1a6c1f0cf773ab8d9c5938e6deaef654b1a7fbdff47da00e177f7f9e4666a7d9557b99 SHA512 31fede8487c09dbc2452bdd64eb197e6da5eed2b2e1cc2b0ad52cd1ce38fd5bb1c3f8c4f92ab583b552fd5104a0b0d1fbbc78c293faf6499bacebe5ead7c04d8
EBUILD mariadb-5.5.64.ebuild 27101 BLAKE2B 1ac27c83ba4942c415c073e69e27047418237d4b51bdbb2fd471678c27502e67cddb56f794b957e4fed9ab0e4c03bad5d78db0ea9d6c07100bc87a3533d5285e SHA512 602085111323ab3c8049a7c7a40797dde9928c3f70d15d11eae2128773dd5c71c286565f4a4cdec032f6d03327c1e65df88a520874efaf91d0011951cbfab73c
MISC metadata.xml 2611 BLAKE2B d1b6b11359e92a3d9cb2c58ed35a15e3cf42ab616ed907fa36a5f777168a805ffd03d01bd13fcd30352ef6c5e8b1d80f4e882ffaf8f6445ed3fce2bcc2a92923 SHA512 80395b35839acebbb18ac8d01e8c806bd89f18d32f85fcba41f41ecfc4f1f869dc8c51c90bb21ebd3c9ac30d51d47869a4dcf3b8ce73967e337e6e396b267c97
diff --git a/dev-db/mariadb/mariadb-10.1.34.ebuild b/dev-db/mariadb/mariadb-10.1.34.ebuild
deleted file mode 100644
index c7cef7e7eeb8..000000000000
--- a/dev-db/mariadb/mariadb-10.1.34.ebuild
+++ /dev/null
@@ -1,887 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20180809-1700Z"
-SUBSLOT="18"
-
-JAVA_PKG_OPT_USE="jdbc"
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils systemd flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils multilib-build
-
-SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
- SRC_URI="${SRC_URI}
- mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://mariadb.org/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="+backup bindist client-libs cracklib debug extraengine galera jdbc jemalloc kerberos
- innodb-lz4 innodb-lzo innodb-snappy latin1 libressl mroonga numa odbc oqgraph pam
- +perl profiling selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup
- systemd systemtap static static-libs tcmalloc test tokudb xml yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="jdbc? ( extraengine server !static )
- server? ( tokudb? ( jemalloc !tcmalloc ) )
- ?? ( tcmalloc jemalloc )
- static? ( yassl !pam )"
-
-KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
- inherit git-r3
- EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
- EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
- EGIT_CLONE_TYPE=shallow
-else
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
- "${MY_PATCH_DIR}"/20006_all_cmake_elib-mariadb-10.1.27.patch
- "${MY_PATCH_DIR}"/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch
- "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
- "${MY_PATCH_DIR}"/20018_all_mariadb-10.1.16-without-clientlibs-tools.patch
- "${MY_PATCH_DIR}"/20025_all_mariadb-10.1.26-gssapi-detect.patch
- "${MY_PATCH_DIR}"/20029_all_mariadb-10.1.31-enable-numa.patch
- "${MY_PATCH_DIR}"/20035_all_mariadb-10.1-atomic-detection.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- kernel_linux? (
- sys-process/procps:0=
- dev-libs/libaio:0=
- )
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- jemalloc? ( dev-libs/jemalloc:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- !yassl? (
- !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
- libressl? ( dev-libs/libressl:0= )
- )
- >=sys-libs/zlib-1.2.3:0=
- sys-libs/ncurses:0=
- !bindist? (
- sys-libs/binutils-libs:0=
- >=sys-libs/readline-4.1:0=
- )
- server? (
- backup? ( app-arch/libarchive:0= )
- cracklib? ( sys-libs/cracklib:0= )
- extraengine? (
- odbc? ( dev-db/unixODBC:0= )
- xml? ( dev-libs/libxml2:2= )
- sys-libs/zlib[minizip]
- )
- innodb-lz4? ( app-arch/lz4 )
- innodb-lzo? ( dev-libs/lzo )
- innodb-snappy? ( app-arch/snappy )
- kerberos? ( virtual/krb5 )
- mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
- numa? ( sys-process/numactl )
- oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
- pam? ( virtual/pam:0= )
- systemd? ( sys-apps/systemd:= )
- tokudb? ( app-arch/snappy )
- )
- !yassl? ( !libressl? ( !>=dev-libs/openssl-1.1.0 ) )
- >=dev-libs/libpcre-8.41-r1:3=
- !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
- static? ( sys-libs/ncurses[static-libs] )
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
- ${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
- client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
- !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- ${COMMON_DEPEND}
- server? ( galera? (
- sys-apps/iproute2
- =sys-cluster/galera-25*
- sst-rsync? ( sys-process/lsof )
- sst-mariabackup? ( net-misc/socat[ssl] )
- sst-xtrabackup? ( net-misc/socat[ssl] )
- ) )
- perl? ( !dev-db/mytop
- virtual/perl-Getopt-Long
- dev-perl/TermReadKey
- virtual/perl-Term-ANSIColor
- virtual/perl-Time-HiRes )
- server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
- server? ( galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
- # non x86{,_64} arches
- if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- fi
- java-pkg-opt-2_pkg_setup
- if has test ${FEATURES} && \
- use server && ! has userpriv ${FEATURES} ; then
- eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- # This should come after all of the die statements
- enewgroup mysql 60 || die "problem adding 'mysql' group"
- enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
- java-pkg-opt-2_pkg_preinst
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
- if use server ; then
- if use pam; then
- einfo
- elog "This install includes the PAM authentication plugin."
- elog "To activate and configure the PAM plugin, please read:"
- elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
- einfo
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- elog
- elog "If you are switching server implentations, you should run the"
- elog "mysql_upgrade tool."
- einfo
- else
- einfo
- elog "If you are upgrading major versions, you should run the"
- elog "mysql_upgrade tool."
- einfo
- fi
-
- einfo
- elog "Be sure to edit the my.cnf file to activate your cluster settings."
- elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
- elog "The first time the cluster is activated, you should add"
- elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
- elog "This option should then be removed for subsequent starts."
- einfo
- fi
-}
-
-src_unpack() {
- unpack ${A}
- # Grab the patches
- [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
-
- mv -f "${WORKDIR%/}/${PN%%-galera}-${PV}" "${S}" || die
-}
-
-src_prepare() {
- _disable_engine() {
- echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
- }
-
- _disable_plugin() {
- echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
- }
-
- if use tcmalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
- fi
-
- # Don't build bundled xz-utils for tokudb
- echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
- sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
- sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
-
- local plugin
- local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
- locale_info qc_info server_audit semisync sql_errlog )
- local test_plugins=( audit_null auth_examples daemon_example fulltext )
- if ! use server; then # These plugins are for the server
- for plugin in "${server_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- if ! use test; then # These plugins are only used during testing
- for plugin in "${test_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- # Collides with mariadb-connector-c bug 655980
- _disable_plugin auth_dialog
-
- # Avoid useless library checks
- use mroonga || _disable_engine mroonga
- use oqgraph || _disable_engine oqgraph
- _disable_engine example
-
- cmake-utils_src_prepare
- java-pkg-opt-2_src_prepare
-}
-
-src_configure(){
- # bug 508724 mariadb cannot use ld.gold
- tc-ld-disable-gold
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
- -DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/mariadb
- -DINSTALL_MYSQLTESTDIR=$(usex test 'share/mariadb/mysql-test' '')
- -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
- -DINSTALL_SCRIPTDIR=share/mariadb/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- -DWITH_ZLIB=system
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
- # The build forces this to be defined when cross-compiling. We pass it
- # all the time for simplicity and to make sure it is actually correct.
- -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
- -DWITHOUT_CLIENTLIBS=YES
- -DWITH_READLINE=$(usex bindist 1 0)
- -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
- -DENABLE_DTRACE=$(usex systemtap)
- -DWITH_SSL=$(usex yassl bundled system)
- )
-
- if use server ; then
-
- # Federated{,X} must be treated special otherwise they will not be built as plugins
- if ! use extraengine ; then
- mycmakeargs+=(
- -DPLUGIN_FEDERATED=NO
- -DPLUGIN_FEDERATEDX=NO )
- fi
-
- mycmakeargs+=(
- -DWITH_JEMALLOC=$(usex jemalloc system)
- -DWITH_PCRE=system
- -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
- -DPLUGIN_SPHINX=$(usex sphinx YES NO)
- -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
- -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
- -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
- -DPLUGIN_CASSANDRA=NO
- -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
- -DPLUGIN_SPIDER=$(usex extraengine YES NO)
- -DPLUGIN_CONNECT=$(usex extraengine YES NO)
- -DCONNECT_WITH_MYSQL=1
- -DCONNECT_WITH_LIBXML2=$(usex xml)
- -DCONNECT_WITH_ODBC=$(usex odbc)
- -DCONNECT_WITH_JDBC=$(usex jdbc)
- # Build failure and autodep wrt bug 639144
- -DCONNECT_WITH_MONGO=OFF
- -DWITH_WSREP=$(usex galera)
- -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
- -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
- -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
- -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
- -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
- -DPLUGIN_AUTH_GSSAPI_CLIENT=NO
- -DWITH_MARIABACKUP=$(usex backup ON OFF)
- -DWITH_LIBARCHIVE=$(usex backup ON OFF)
- -DWITH_SYSTEMD=$(usex systemd yes no)
- -DWITH_NUMA=$(usex numa ON OFF)
- -DINSTALL_SQLBENCHDIR=''
- )
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
-
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DMYSQL_USER=mysql
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_DEBUG=$(usex debug)
- -DWITH_EMBEDDED_SERVER=OFF
- -DENABLED_PROFILING=$(usex profiling)
- )
-
- if use static; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- if use jemalloc || use tcmalloc ; then
- mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- -DWITH_PARTITION_STORAGE_ENGINE=1
- )
-
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DWITH_EMBEDDED_SERVER=OFF
- -DEXTRA_CHARSETS=none
- -DINSTALL_SQLBENCHDIR=
- -DWITH_SYSTEMD=no
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
- if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
- rm "${ED}/usr/include/mysql/server/private/config.h" || die
- fi
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED}/usr/data" ]] ; then
- rm -Rf "${ED}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
- local mycnf_src="my.cnf-5.6-r1"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR}/${mycnf_src}" \
- > "${TMPDIR}/my.cnf.ok" || die
- use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR}/my.cnf.ok"
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" my.cnf
-
- if use server ; then
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- # Manually install supporting files that conflict with other packages
- # but are needed for galera and initial installation
- exeinto /usr/libexec/mariadb
- doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mariadb-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
-# cmake-utils_src_test
-# retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MariaDB 10.0 for now and are believed to be
- # false positives:
- #
- # main.mysql_client_test, main.mysql_client_test_nonblock
- # main.mysql_client_test_comp:
- # segfaults at random under Portage only, suspect resource limits.
-
- local t
- for t in plugins.cracklib_password_check plugins.two_password_validations ; do
- _disable_test "$t" "False positive due to varying policies"
- done
-
- for t in main.mysql_client_test main.mysql_client_test_nonblock \
- rpl.rpl_semi_sync_uninstall_plugin \
- main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- if ! use client-libs ; then
- _disable_test main.plugin_auth "Needs client libraries built"
- fi
-
- _disable_test sys_vars.sysvars_server_notembedded "Broken test" # bug #661700 required profiling always on
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd > /dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_config() {
- _getoptval() {
- local mypd="${EROOT}"/usr/bin/my_print_defaults
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
- }
- local old_MY_DATADIR="${MY_DATADIR}"
- local old_HOME="${HOME}"
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- export HOME=${EPREFIX}/root
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
- if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
- die "Minimal builds do NOT include the MySQL server"
- fi
-
- if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
- local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
- MY_DATADIR_s="${MY_DATADIR_s%%/}"
- local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
- old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
- if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
- ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
- else
- elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
- mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
- || die "Moving MY_DATADIR failed"
- fi
- else
- ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Attempting to use ${MY_DATADIR_s}"
- else
- eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
- die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
- fi
- fi
- fi
-
- local pwd1="a"
- local pwd2="b"
- local maxtry=15
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
- local tmp_mysqld_password_source=
-
- for tmp_mysqld_password_source in mysql client; do
- einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
- if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
- if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
- ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
- MYSQL_ROOT_PASSWORD=
- continue
- fi
-
- einfo "Found password in '${tmp_mysqld_password_source}' section!"
- break
- fi
- done
-
- # Sometimes --show is required to display passwords in some implementations of my_print_defaults
- if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
- fi
-
- unset tmp_mysqld_password_source
- fi
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see https://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in grant-tables host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
- local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile}
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- if [[ -n "${sqltmp}" ]] ; then
- ebegin "Loading \"zoneinfo\", this step may require a few seconds"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -uroot \
- --password="${MYSQL_ROOT_PASSWORD}" \
- mysql < "${sqltmp}"
- rc=$?
- eend $?
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
- fi
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mariadb/mariadb-10.1.37.ebuild b/dev-db/mariadb/mariadb-10.1.37.ebuild
deleted file mode 100644
index 613cf33056bd..000000000000
--- a/dev-db/mariadb/mariadb-10.1.37.ebuild
+++ /dev/null
@@ -1,887 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20181104-2252Z"
-SUBSLOT="18"
-
-JAVA_PKG_OPT_USE="jdbc"
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils systemd flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils multilib-build
-
-SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
- SRC_URI="${SRC_URI}
- mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://mariadb.org/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="+backup bindist client-libs cracklib debug extraengine galera jdbc jemalloc kerberos
- innodb-lz4 innodb-lzo innodb-snappy latin1 libressl mroonga numa odbc oqgraph pam
- +perl profiling selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup
- systemd systemtap static static-libs tcmalloc test tokudb xml yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="jdbc? ( extraengine server !static )
- server? ( tokudb? ( jemalloc !tcmalloc ) )
- ?? ( tcmalloc jemalloc )
- static? ( yassl !pam )"
-
-KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ~ppc64 ~s390 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
- inherit git-r3
- EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
- EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
- EGIT_CLONE_TYPE=shallow
-else
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
- "${MY_PATCH_DIR}"/20006_all_cmake_elib-mariadb-10.1.27.patch
- "${MY_PATCH_DIR}"/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch
- "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
- "${MY_PATCH_DIR}"/20018_all_mariadb-10.1.16-without-clientlibs-tools.patch
- "${MY_PATCH_DIR}"/20025_all_mariadb-10.1.26-gssapi-detect.patch
- "${MY_PATCH_DIR}"/20029_all_mariadb-10.1.37-enable-numa.patch
- "${MY_PATCH_DIR}"/20035_all_mariadb-10.1-atomic-detection.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- kernel_linux? (
- sys-process/procps:0=
- dev-libs/libaio:0=
- )
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- jemalloc? ( dev-libs/jemalloc:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- !yassl? (
- !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
- libressl? ( dev-libs/libressl:0= )
- )
- >=sys-libs/zlib-1.2.3:0=
- sys-libs/ncurses:0=
- !bindist? (
- sys-libs/binutils-libs:0=
- >=sys-libs/readline-4.1:0=
- )
- server? (
- backup? ( app-arch/libarchive:0= )
- cracklib? ( sys-libs/cracklib:0= )
- extraengine? (
- odbc? ( dev-db/unixODBC:0= )
- xml? ( dev-libs/libxml2:2= )
- sys-libs/zlib[minizip]
- )
- innodb-lz4? ( app-arch/lz4 )
- innodb-lzo? ( dev-libs/lzo )
- innodb-snappy? ( app-arch/snappy )
- kerberos? ( virtual/krb5 )
- mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
- numa? ( sys-process/numactl )
- oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
- pam? ( virtual/pam:0= )
- systemd? ( sys-apps/systemd:= )
- tokudb? ( app-arch/snappy )
- )
- !yassl? ( !libressl? ( !>=dev-libs/openssl-1.1.0 ) )
- >=dev-libs/libpcre-8.41-r1:3=
- !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
- static? ( sys-libs/ncurses[static-libs] )
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
- ${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
- client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
- !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- ${COMMON_DEPEND}
- server? ( galera? (
- sys-apps/iproute2
- =sys-cluster/galera-25*
- sst-rsync? ( sys-process/lsof )
- sst-mariabackup? ( net-misc/socat[ssl] )
- sst-xtrabackup? ( net-misc/socat[ssl] )
- ) )
- perl? ( !dev-db/mytop
- virtual/perl-Getopt-Long
- dev-perl/TermReadKey
- virtual/perl-Term-ANSIColor
- virtual/perl-Time-HiRes )
- server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
- server? ( galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
- # non x86{,_64} arches
- if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- fi
- java-pkg-opt-2_pkg_setup
- if has test ${FEATURES} && \
- use server && ! has userpriv ${FEATURES} ; then
- eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- # This should come after all of the die statements
- enewgroup mysql 60 || die "problem adding 'mysql' group"
- enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
- java-pkg-opt-2_pkg_preinst
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
- if use server ; then
- if use pam; then
- einfo
- elog "This install includes the PAM authentication plugin."
- elog "To activate and configure the PAM plugin, please read:"
- elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
- einfo
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- elog
- elog "If you are switching server implentations, you should run the"
- elog "mysql_upgrade tool."
- einfo
- else
- einfo
- elog "If you are upgrading major versions, you should run the"
- elog "mysql_upgrade tool."
- einfo
- fi
-
- einfo
- elog "Be sure to edit the my.cnf file to activate your cluster settings."
- elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
- elog "The first time the cluster is activated, you should add"
- elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
- elog "This option should then be removed for subsequent starts."
- einfo
- fi
-}
-
-src_unpack() {
- unpack ${A}
- # Grab the patches
- [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
-
- mv -f "${WORKDIR%/}/${PN%%-galera}-${PV}" "${S}" || die
-}
-
-src_prepare() {
- _disable_engine() {
- echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
- }
-
- _disable_plugin() {
- echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
- }
-
- if use tcmalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
- fi
-
- # Don't build bundled xz-utils for tokudb
- echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
- sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
- sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
-
- local plugin
- local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
- locale_info qc_info server_audit semisync sql_errlog )
- local test_plugins=( audit_null auth_examples daemon_example fulltext )
- if ! use server; then # These plugins are for the server
- for plugin in "${server_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- if ! use test; then # These plugins are only used during testing
- for plugin in "${test_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- # Collides with mariadb-connector-c bug 655980
- _disable_plugin auth_dialog
-
- # Avoid useless library checks
- use mroonga || _disable_engine mroonga
- use oqgraph || _disable_engine oqgraph
- _disable_engine example
-
- cmake-utils_src_prepare
- java-pkg-opt-2_src_prepare
-}
-
-src_configure(){
- # bug 508724 mariadb cannot use ld.gold
- tc-ld-disable-gold
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
- -DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/mariadb
- -DINSTALL_MYSQLTESTDIR=$(usex test 'share/mariadb/mysql-test' '')
- -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
- -DINSTALL_SCRIPTDIR=share/mariadb/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- -DWITH_ZLIB=system
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
- # The build forces this to be defined when cross-compiling. We pass it
- # all the time for simplicity and to make sure it is actually correct.
- -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
- -DWITHOUT_CLIENTLIBS=YES
- -DWITH_READLINE=$(usex bindist 1 0)
- -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
- -DENABLE_DTRACE=$(usex systemtap)
- -DWITH_SSL=$(usex yassl bundled system)
- )
-
- if use server ; then
-
- # Federated{,X} must be treated special otherwise they will not be built as plugins
- if ! use extraengine ; then
- mycmakeargs+=(
- -DPLUGIN_FEDERATED=NO
- -DPLUGIN_FEDERATEDX=NO )
- fi
-
- mycmakeargs+=(
- -DWITH_JEMALLOC=$(usex jemalloc system)
- -DWITH_PCRE=system
- -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
- -DPLUGIN_SPHINX=$(usex sphinx YES NO)
- -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
- -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
- -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
- -DPLUGIN_CASSANDRA=NO
- -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
- -DPLUGIN_SPIDER=$(usex extraengine YES NO)
- -DPLUGIN_CONNECT=$(usex extraengine YES NO)
- -DCONNECT_WITH_MYSQL=1
- -DCONNECT_WITH_LIBXML2=$(usex xml)
- -DCONNECT_WITH_ODBC=$(usex odbc)
- -DCONNECT_WITH_JDBC=$(usex jdbc)
- # Build failure and autodep wrt bug 639144
- -DCONNECT_WITH_MONGO=OFF
- -DWITH_WSREP=$(usex galera)
- -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
- -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
- -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
- -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
- -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
- -DPLUGIN_AUTH_GSSAPI_CLIENT=NO
- -DWITH_MARIABACKUP=$(usex backup ON OFF)
- -DWITH_LIBARCHIVE=$(usex backup ON OFF)
- -DWITH_SYSTEMD=$(usex systemd yes no)
- -DWITH_NUMA=$(usex numa ON OFF)
- -DINSTALL_SQLBENCHDIR=''
- )
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
-
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DMYSQL_USER=mysql
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_DEBUG=$(usex debug)
- -DWITH_EMBEDDED_SERVER=OFF
- -DENABLED_PROFILING=$(usex profiling)
- )
-
- if use static; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- if use jemalloc || use tcmalloc ; then
- mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- -DWITH_PARTITION_STORAGE_ENGINE=1
- )
-
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DWITH_EMBEDDED_SERVER=OFF
- -DEXTRA_CHARSETS=none
- -DINSTALL_SQLBENCHDIR=
- -DWITH_SYSTEMD=no
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
- if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
- rm "${ED}/usr/include/mysql/server/private/config.h" || die
- fi
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED}/usr/data" ]] ; then
- rm -Rf "${ED}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
- local mycnf_src="my.cnf-5.6-r1"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR}/${mycnf_src}" \
- > "${TMPDIR}/my.cnf.ok" || die
- use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR}/my.cnf.ok"
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" my.cnf
-
- if use server ; then
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- # Manually install supporting files that conflict with other packages
- # but are needed for galera and initial installation
- exeinto /usr/libexec/mariadb
- doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mariadb-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
-# cmake-utils_src_test
-# retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MariaDB 10.0 for now and are believed to be
- # false positives:
- #
- # main.mysql_client_test, main.mysql_client_test_nonblock
- # main.mysql_client_test_comp:
- # segfaults at random under Portage only, suspect resource limits.
-
- local t
- for t in plugins.cracklib_password_check plugins.two_password_validations ; do
- _disable_test "$t" "False positive due to varying policies"
- done
-
- for t in main.mysql_client_test main.mysql_client_test_nonblock \
- rpl.rpl_semi_sync_uninstall_plugin \
- main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- if ! use client-libs ; then
- _disable_test main.plugin_auth "Needs client libraries built"
- fi
-
- _disable_test sys_vars.sysvars_server_notembedded "Broken test" # bug #661700 required profiling always on
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd > /dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_config() {
- _getoptval() {
- local mypd="${EROOT}"/usr/bin/my_print_defaults
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
- }
- local old_MY_DATADIR="${MY_DATADIR}"
- local old_HOME="${HOME}"
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- export HOME=${EPREFIX}/root
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
- if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
- die "Minimal builds do NOT include the MySQL server"
- fi
-
- if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
- local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
- MY_DATADIR_s="${MY_DATADIR_s%%/}"
- local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
- old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
- if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
- ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
- else
- elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
- mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
- || die "Moving MY_DATADIR failed"
- fi
- else
- ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Attempting to use ${MY_DATADIR_s}"
- else
- eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
- die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
- fi
- fi
- fi
-
- local pwd1="a"
- local pwd2="b"
- local maxtry=15
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
- local tmp_mysqld_password_source=
-
- for tmp_mysqld_password_source in mysql client; do
- einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
- if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
- if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
- ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
- MYSQL_ROOT_PASSWORD=
- continue
- fi
-
- einfo "Found password in '${tmp_mysqld_password_source}' section!"
- break
- fi
- done
-
- # Sometimes --show is required to display passwords in some implementations of my_print_defaults
- if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
- fi
-
- unset tmp_mysqld_password_source
- fi
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see https://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in grant-tables host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
- local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile} \
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- if [[ -n "${sqltmp}" ]] ; then
- ebegin "Loading \"zoneinfo\", this step may require a few seconds"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -uroot \
- --password="${MYSQL_ROOT_PASSWORD}" \
- mysql < "${sqltmp}"
- rc=$?
- eend $?
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
- fi
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mariadb/mariadb-10.1.38-r1.ebuild b/dev-db/mariadb/mariadb-10.1.38-r1.ebuild
index 59b977d1815e..b92d23a790a8 100644
--- a/dev-db/mariadb/mariadb-10.1.38-r1.ebuild
+++ b/dev-db/mariadb/mariadb-10.1.38-r1.ebuild
@@ -40,7 +40,7 @@ REQUIRED_USE="jdbc? ( extraengine server !static )
?? ( tcmalloc jemalloc )
static? ( yassl !pam )"
-KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
# Shorten the path because the socket path length must be shorter than 107 chars
# and we will run a mysql server during test phase
diff --git a/dev-db/mariadb/mariadb-10.2.24.ebuild b/dev-db/mariadb/mariadb-10.2.24.ebuild
deleted file mode 100644
index 184959a17cc8..000000000000
--- a/dev-db/mariadb/mariadb-10.2.24.ebuild
+++ /dev/null
@@ -1,972 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20190305-2052Z"
-SUBSLOT="18"
-
-JAVA_PKG_OPT_USE="jdbc"
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils systemd flag-o-matic prefix toolchain-funcs \
- java-pkg-opt-2 user cmake-utils
-
-SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
- SRC_URI="${SRC_URI}
- mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://mariadb.org/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2 LGPL-2.1+"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
- innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
- numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
- sst-rsync sst-mariabackup sst-xtrabackup static systemd systemtap tcmalloc
- test tokudb xml yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="jdbc? ( extraengine server !static )
- server? ( tokudb? ( jemalloc !tcmalloc ) )
- ?? ( tcmalloc jemalloc )
- static? ( yassl !pam )"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
- EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
- EGIT_CLONE_TYPE=shallow
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
-else
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
- "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
- "${MY_PATCH_DIR}"/20018_all_mariadb-10.2.16-without-clientlibs-tools.patch
- "${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
- "${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
- "${MY_PATCH_DIR}"/20035_all_mariadb-10.2-atomic-detection.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- kernel_linux? (
- sys-process/procps:0=
- dev-libs/libaio:0=
- )
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- jemalloc? ( dev-libs/jemalloc:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- >=sys-libs/zlib-1.2.3:0=
- kerberos? ( virtual/krb5 )
- yassl? ( net-libs/gnutls:0= )
- !yassl? (
- !libressl? ( >=dev-libs/openssl-1.0.0:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- sys-libs/ncurses:0=
- !bindist? (
- sys-libs/binutils-libs:0=
- >=sys-libs/readline-4.1:0=
- )
- server? (
- backup? ( app-arch/libarchive:0= )
- cracklib? ( sys-libs/cracklib:0= )
- extraengine? (
- odbc? ( dev-db/unixODBC:0= )
- xml? ( dev-libs/libxml2:2= )
- )
- innodb-lz4? ( app-arch/lz4 )
- innodb-lzo? ( dev-libs/lzo )
- innodb-snappy? ( app-arch/snappy )
- mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
- numa? ( sys-process/numactl )
- oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
- pam? ( virtual/pam:0= )
- systemd? ( sys-apps/systemd:= )
- tokudb? ( app-arch/snappy )
- )
- >=dev-libs/libpcre-8.41-r1:3=
-"
-DEPEND="virtual/yacc
- static? ( sys-libs/ncurses[static-libs] )
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
- ${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
- !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- !<virtual/mysql-5.6-r11
- ${COMMON_DEPEND}
- server? ( galera? (
- sys-apps/iproute2
- =sys-cluster/galera-25*
- sst-rsync? ( sys-process/lsof )
- sst-mariabackup? ( net-misc/socat[ssl] )
- sst-xtrabackup? ( net-misc/socat[ssl] )
- ) )
- perl? ( !dev-db/mytop
- virtual/perl-Getopt-Long
- dev-perl/TermReadKey
- virtual/perl-Term-ANSIColor
- virtual/perl-Time-HiRes )
- server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
- server? ( ~virtual/mysql-5.6[static=]
- galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )"
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
- # non x86{,_64} arches
- if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- fi
- java-pkg-opt-2_pkg_setup
- if has test ${FEATURES} && \
- use server && ! has userpriv ${FEATURES} ; then
- eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- # This should come after all of the die statements
- enewgroup mysql 60 || die "problem adding 'mysql' group"
- enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
- java-pkg-opt-2_pkg_preinst
-
- # Here we need to see if the implementation switched client libraries
- # We check if this is a new instance of the package and a client library already exists
- local SHOW_ABI_MESSAGE libpath
- if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
- libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
- elog "Due to ABI changes when switching between different client libraries,"
- elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
- elog "Please run: revdep-rebuild --library ${libpath}"
- ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
- fi
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
- if use server ; then
- if use pam; then
- einfo
- elog "This install includes the PAM authentication plugin."
- elog "To activate and configure the PAM plugin, please read:"
- elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
- einfo
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- elog
- elog "If you are switching server implentations, you should run the"
- elog "mysql_upgrade tool."
- einfo
- else
- einfo
- elog "If you are upgrading major versions, you should run the"
- elog "mysql_upgrade tool."
- einfo
- fi
-
- if use galera ; then
- einfo
- elog "Be sure to edit the my.cnf file to activate your cluster settings."
- elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
- elog "The first time the cluster is activated, you should add"
- elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
- elog "This option should then be removed for subsequent starts."
- einfo
- if use sst-xtrabackup ; then
- ewarn "As per https://mariadb.com/kb/en/meta/xtrabackup_warning/, XtraBackup"
- ewarn "as an SST is broken by default beginning with 10.2.19 with the setting"
- ewarn "innodb_safe_truncate=ON. Please migrate to sst-mariabackup instead."
- ewarn "sst-xtrabackup is being removed in 10.3 and higher."
- fi
- fi
- fi
-
- # Note about configuration change
- einfo
- elog "This version of mariadb reorganizes the configuration from a single my.cnf"
- elog "to several files in /etc/mysql/${PN}.d."
- elog "Please backup any changes you made to /etc/mysql/my.cnf"
- elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
- elog "You may have as many files as needed and they are read alphabetically."
- elog "Be sure the options have the 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() {
- _disable_plugin() {
- echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
- }
- _disable_engine() {
- echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
- }
-
- local malloc
- for malloc in jemalloc tcmalloc ; do
- if use ${malloc}; then
- echo "TARGET_LINK_LIBRARIES(mysqld ${malloc})" >> "${S}/sql/CMakeLists.txt"
- fi
- done
-
- # Don't build bundled xz-utils for tokudb
- echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
- sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
- sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
-
- local plugin
- local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
- locale_info qc_info server_audit sql_errlog )
- local test_plugins=( audit_null auth_examples daemon_example fulltext
- debug_key_management example_key_management )
- if ! use server; then # These plugins are for the server
- for plugin in "${server_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- if ! use test; then # These plugins are only used during testing
- for plugin in "${test_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- _disable_engine test_sql_discovery
- fi
-
- _disable_engine example
-
- if ! use oqgraph ; then # avoids extra library checks
- _disable_engine oqgraph
- fi
-
- if use mroonga ; then
- # Remove the bundled groonga
- # There is no CMake flag, it simply checks for existance
- rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
- else
- _disable_engine mroonga
- fi
-
- cmake-utils_src_prepare
- java-pkg-opt-2_src_prepare
-}
-
-src_configure(){
- # bug 508724 mariadb cannot use ld.gold
- tc-ld-disable-gold
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
- -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
- -DSYSCONFDIR="${EPREFIX}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/mariadb
- -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
- -DINSTALL_SCRIPTDIR=share/mariadb/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
- -DWITH_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- -DWITH_LIBEDIT=0
- -DWITH_ZLIB=system
- -DWITHOUT_LIBWRAP=1
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
- # The build forces this to be defined when cross-compiling. We pass it
- # all the time for simplicity and to make sure it is actually correct.
- -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
- -DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
- -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
- -DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
- -DCONC_WITH_EXTERNAL_ZLIB=YES
- -DWITH_EXTERNAL_ZLIB=YES
- -DSUFFIX_INSTALL_DIR=""
- -DWITH_UNITTEST=OFF
- -DWITHOUT_CLIENTLIBS=YES
- -DCLIENT_PLUGIN_DIALOG=OFF
- -DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT=OFF
- -DCLIENT_PLUGIN_MYSQL_CLEAR_PASSWORD=STATIC
- -DCLIENT_PLUGIN_CACHING_SHA2_PASSWORD=OFF
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use yassl ; then
- mycmakeargs+=( -DWITH_SSL=system -DCLIENT_PLUGIN_SHA256_PASSWORD=STATIC )
- else
- mycmakeargs+=( -DWITH_SSL=bundled )
- fi
-
- # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
- mycmakeargs+=(
- -DWITH_READLINE=$(usex bindist 1 0)
- -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
- -DENABLE_DTRACE=$(usex systemtap)
- )
-
- if use server ; then
-
- # Federated{,X} must be treated special otherwise they will not be built as plugins
- if ! use extraengine ; then
- mycmakeargs+=(
- -DPLUGIN_FEDERATED=NO
- -DPLUGIN_FEDERATEDX=NO )
- fi
-
- mycmakeargs+=(
- -DWITH_JEMALLOC=$(usex jemalloc system)
- -DWITH_PCRE=system
- -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
- -DPLUGIN_SPHINX=$(usex sphinx YES NO)
- -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
- -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
- -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
- -DPLUGIN_CASSANDRA=NO
- -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
- -DPLUGIN_SPIDER=$(usex extraengine YES NO)
- -DPLUGIN_CONNECT=$(usex extraengine YES NO)
- -DCONNECT_WITH_MYSQL=1
- -DCONNECT_WITH_LIBXML2=$(usex xml)
- -DCONNECT_WITH_ODBC=$(usex odbc)
- -DCONNECT_WITH_JDBC=$(usex jdbc)
- # Build failure and autodep wrt bug 639144
- -DCONNECT_WITH_MONGO=OFF
- -DWITH_WSREP=$(usex galera)
- -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
- -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
- -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
- -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
- -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
- -DWITH_MARIABACKUP=$(usex backup ON OFF)
- -DWITH_LIBARCHIVE=$(usex backup ON OFF)
- -DINSTALL_SQLBENCHDIR=share/mariadb
- -DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
- # systemd is only linked to for server notification
- -DWITH_SYSTEMD=$(usex systemd yes no)
- -DWITH_NUMA=$(usex numa ON OFF)
- )
-
- # Workaround for MDEV-14524
- use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
-
- if use test ; then
- # This is needed for the new client lib which tests a real, open server
- mycmakeargs+=( -DSKIP_TESTS=ON )
- fi
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
-
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DMYSQL_USER=mysql
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_DEBUG=$(usex debug)
- -DWITH_EMBEDDED_SERVER=OFF
- -DWITH_PROFILING=$(usex profiling)
- )
-
- if use static; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- if use jemalloc || use tcmalloc ; then
- mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- -DWITH_PARTITION_STORAGE_ENGINE=1
- )
-
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DWITH_EMBEDDED_SERVER=OFF
- -DEXTRA_CHARSETS=none
- -DINSTALL_SQLBENCHDIR=
- -DWITH_SYSTEMD=no
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
- if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
- rm "${ED}/usr/include/mysql/server/private/config.h" || die
- fi
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED}/usr/data" ]] ; then
- rm -Rf "${ED}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
- cp "${FILESDIR}/my.cnf-10.2" "${TMPDIR}/my.cnf" || die
- eprefixify "${TMPDIR}/my.cnf"
- doins "${TMPDIR}/my.cnf"
- insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
- cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
- eprefixify "${TMPDIR}/50-distro-client.cnf"
- doins "${TMPDIR}/50-distro-client.cnf"
-
- if use server ; then
- mycnf_src="my.cnf.distro-server"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR}/${mycnf_src}" \
- > "${TMPDIR}/my.cnf.ok" || die
- if use prefix ; then
- sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- # Manually install supporting files that conflict with other packages
- # but are needed for galera and initial installation
- exeinto /usr/libexec/mariadb
- doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mariadb-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MariaDB 10.0 for now and are believed to be
- # false positives:
- #
- # main.mysql_client_test, main.mysql_client_test_nonblock
- # main.mysql_client_test_comp:
- # segfaults at random under Portage only, suspect resource limits.
-
- local t
- for t in plugins.cracklib_password_check plugins.two_password_validations ; do
- _disable_test "$t" "False positive due to varying policies"
- done
-
- for t in main.mysql_client_test main.mysql_client_test_nonblock \
- main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- _disable_test main.plugin_auth "Needs client libraries built"
- _disable_test main.mysqldump "Test fails past 2018-12-31 due to event expiration"
-
- # Likely environment issues as only number of clients connected fails
- _disable_test rpl.rpl_semi_sync_uninstall_plugin \
- "Fails intermittently on parallel testing"
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd > /dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_config() {
- _getoptval() {
- local mypd="${EROOT}"usr/libexec/mariadb/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 | tail -n1)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see https://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in grant-tables host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
- local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile} \
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- if [[ -n "${sqltmp}" ]] ; then
- ebegin "Loading \"zoneinfo\", this step may require a few seconds"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -uroot \
- --password="${MYSQL_ROOT_PASSWORD}" \
- mysql < "${sqltmp}"
- rc=$?
- eend $?
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
- fi
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mariadb/mariadb-10.3.13.ebuild b/dev-db/mariadb/mariadb-10.3.13.ebuild
deleted file mode 100644
index 75082171657c..000000000000
--- a/dev-db/mariadb/mariadb-10.3.13.ebuild
+++ /dev/null
@@ -1,973 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20190305-2052Z"
-SUBSLOT="18"
-
-JAVA_PKG_OPT_USE="jdbc"
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils systemd flag-o-matic prefix toolchain-funcs \
- java-pkg-opt-2 user cmake-utils
-
-SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
- SRC_URI="${SRC_URI}
- mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://mariadb.org/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2 LGPL-2.1+"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
- innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
- numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
- sst-rsync sst-mariabackup static systemd systemtap tcmalloc
- test tokudb xml yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="jdbc? ( extraengine server !static )
- server? ( tokudb? ( jemalloc !tcmalloc ) )
- ?? ( tcmalloc jemalloc )
- static? ( yassl !pam )"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
- EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
- EGIT_CLONE_TYPE=shallow
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
-else
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
- "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
- "${MY_PATCH_DIR}"/20018_all_mariadb-10.3.12-without-clientlibs-tools.patch
- "${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
- "${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
- "${MY_PATCH_DIR}"/20035_all_mariadb-10.3-atomic-detection.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- kernel_linux? (
- sys-process/procps:0=
- dev-libs/libaio:0=
- )
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- jemalloc? ( dev-libs/jemalloc:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- >=sys-libs/zlib-1.2.3:0=
- kerberos? ( virtual/krb5 )
- yassl? ( net-libs/gnutls:0= )
- !yassl? (
- !libressl? ( >=dev-libs/openssl-1.0.0:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- sys-libs/ncurses:0=
- !bindist? (
- sys-libs/binutils-libs:0=
- >=sys-libs/readline-4.1:0=
- )
- server? (
- backup? ( app-arch/libarchive:0= )
- cracklib? ( sys-libs/cracklib:0= )
- extraengine? (
- odbc? ( dev-db/unixODBC:0= )
- xml? ( dev-libs/libxml2:2= )
- )
- innodb-lz4? ( app-arch/lz4 )
- innodb-lzo? ( dev-libs/lzo )
- innodb-snappy? ( app-arch/snappy )
- mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
- numa? ( sys-process/numactl )
- oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
- pam? ( virtual/pam:0= )
- systemd? ( sys-apps/systemd:= )
- tokudb? ( app-arch/snappy )
- )
- >=dev-libs/libpcre-8.41-r1:3=
-"
-DEPEND="virtual/yacc
- static? ( sys-libs/ncurses[static-libs] )
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
- ${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
- !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- !<virtual/mysql-5.6-r11
- ${COMMON_DEPEND}
- server? ( galera? (
- sys-apps/iproute2
- =sys-cluster/galera-25*
- sst-rsync? ( sys-process/lsof )
- sst-mariabackup? ( net-misc/socat[ssl] )
- ) )
- perl? ( !dev-db/mytop
- virtual/perl-Getopt-Long
- dev-perl/TermReadKey
- virtual/perl-Term-ANSIColor
- virtual/perl-Time-HiRes )
- server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
- server? ( ~virtual/mysql-5.6[static=] )"
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
- # non x86{,_64} arches
- if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- fi
- java-pkg-opt-2_pkg_setup
- if has test ${FEATURES} && \
- use server && ! has userpriv ${FEATURES} ; then
- eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- # This should come after all of the die statements
- enewgroup mysql 60 || die "problem adding 'mysql' group"
- enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
- java-pkg-opt-2_pkg_preinst
-
- # Here we need to see if the implementation switched client libraries
- # We check if this is a new instance of the package and a client library already exists
- local SHOW_ABI_MESSAGE libpath
- if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
- libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
- elog "Due to ABI changes when switching between different client libraries,"
- elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
- elog "Please run: revdep-rebuild --library ${libpath}"
- ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
- fi
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
- if use server ; then
- if use pam; then
- einfo
- elog "This install includes the PAM authentication plugin."
- elog "To activate and configure the PAM plugin, please read:"
- elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
- einfo
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- elog
- elog "If you are switching server implentations, you should run the"
- elog "mysql_upgrade tool."
- einfo
- else
- einfo
- elog "If you are upgrading major versions, you should run the"
- elog "mysql_upgrade tool."
- einfo
- fi
-
- if use galera ; then
- einfo
- elog "Be sure to edit the my.cnf file to activate your cluster settings."
- elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
- elog "The first time the cluster is activated, you should add"
- elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
- elog "This option should then be removed for subsequent starts."
- einfo
- fi
- fi
-
- # Note about configuration change
- einfo
- elog "This version of mariadb reorganizes the configuration from a single my.cnf"
- elog "to several files in /etc/mysql/${PN}.d."
- elog "Please backup any changes you made to /etc/mysql/my.cnf"
- elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
- elog "You may have as many files as needed and they are read alphabetically."
- elog "Be sure the options have the 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/_rc/}" "${S}" || die
-}
-
-src_prepare() {
- _disable_plugin() {
- echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
- }
- _disable_engine() {
- echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
- }
-
- if use jemalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt"
- elif use tcmalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
- fi
-
- # Don't build bundled xz-utils for tokudb
- echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
- sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
- sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
-
- local plugin
- local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
- locale_info qc_info server_audit sql_errlog )
- local test_plugins=( audit_null auth_examples daemon_example fulltext
- debug_key_management example_key_management versioning )
- if ! use server; then # These plugins are for the server
- for plugin in "${server_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- if ! use test; then # These plugins are only used during testing
- for plugin in "${test_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- _disable_engine test_sql_discovery
- fi
-
- _disable_engine example
-
- if ! use oqgraph ; then # avoids extra library checks
- _disable_engine oqgraph
- fi
-
- if use mroonga ; then
- # Remove the bundled groonga
- # There is no CMake flag, it simply checks for existance
- rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
- else
- _disable_engine mroonga
- fi
-
- cmake-utils_src_prepare
- java-pkg-opt-2_src_prepare
-}
-
-src_configure(){
- # bug 508724 mariadb cannot use ld.gold
- tc-ld-disable-gold
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
- -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
- -DSYSCONFDIR="${EPREFIX}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/mariadb
- -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
- -DINSTALL_SCRIPTDIR=share/mariadb/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
- -DWITH_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- -DWITH_LIBEDIT=0
- -DWITH_ZLIB=system
- -DWITHOUT_LIBWRAP=1
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
- # The build forces this to be defined when cross-compiling. We pass it
- # all the time for simplicity and to make sure it is actually correct.
- -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
- -DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
- -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
- -DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
- -DCONC_WITH_EXTERNAL_ZLIB=YES
- -DWITH_EXTERNAL_ZLIB=YES
- -DSUFFIX_INSTALL_DIR=""
- -DWITH_UNITTEST=OFF
- -DWITHOUT_CLIENTLIBS=YES
- -DCLIENT_PLUGIN_DIALOG=OFF
- -DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT=OFF
- -DCLIENT_PLUGIN_MYSQL_CLEAR_PASSWORD=STATIC
- -DCLIENT_PLUGIN_CACHING_SHA2_PASSWORD=OFF
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use yassl ; then
- mycmakeargs+=( -DWITH_SSL=system -DCLIENT_PLUGIN_SHA256_PASSWORD=STATIC )
- else
- mycmakeargs+=( -DWITH_SSL=bundled )
- fi
-
- # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
- mycmakeargs+=(
- -DWITH_READLINE=$(usex bindist 1 0)
- -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
- -DENABLE_DTRACE=$(usex systemtap)
- )
-
- if use server ; then
-
- # Federated{,X} must be treated special otherwise they will not be built as plugins
- if ! use extraengine ; then
- mycmakeargs+=(
- -DPLUGIN_FEDERATED=NO
- -DPLUGIN_FEDERATEDX=NO )
- fi
-
- mycmakeargs+=(
- -DWITH_PCRE=system
- -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
- -DPLUGIN_SPHINX=$(usex sphinx YES NO)
- -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
- -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
- -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
- -DPLUGIN_CASSANDRA=NO
- -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
- -DPLUGIN_SPIDER=$(usex extraengine YES NO)
- -DPLUGIN_CONNECT=$(usex extraengine YES NO)
- -DCONNECT_WITH_MYSQL=1
- -DCONNECT_WITH_LIBXML2=$(usex xml)
- -DCONNECT_WITH_ODBC=$(usex odbc)
- -DCONNECT_WITH_JDBC=$(usex jdbc)
- # Build failure and autodep wrt bug 639144
- -DCONNECT_WITH_MONGO=OFF
- -DWITH_WSREP=$(usex galera)
- -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
- -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
- -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
- -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
- -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
- -DWITH_MARIABACKUP=$(usex backup ON OFF)
- -DWITH_LIBARCHIVE=$(usex backup ON OFF)
- -DINSTALL_SQLBENCHDIR=""
- -DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
- # systemd is only linked to for server notification
- -DWITH_SYSTEMD=$(usex systemd yes no)
- -DWITH_NUMA=$(usex numa ON OFF)
- )
-
- # Workaround for MDEV-14524
- use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
-
- if use test ; then
- # This is needed for the new client lib which tests a real, open server
- mycmakeargs+=( -DSKIP_TESTS=ON )
- fi
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
-
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DMYSQL_USER=mysql
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_DEBUG=$(usex debug)
- -DWITH_EMBEDDED_SERVER=OFF
- -DWITH_PROFILING=$(usex profiling)
- )
-
- if use static; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- if use jemalloc || use tcmalloc ; then
- mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- -DWITH_PARTITION_STORAGE_ENGINE=1
- )
-
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DWITH_EMBEDDED_SERVER=OFF
- -DEXTRA_CHARSETS=none
- -DINSTALL_SQLBENCHDIR=
- -DWITH_SYSTEMD=no
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
- if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
- rm "${ED}/usr/include/mysql/server/private/config.h" || die
- fi
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED}/usr/data" ]] ; then
- rm -Rf "${ED}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
- cp "${FILESDIR}/my.cnf-10.2" "${TMPDIR}/my.cnf" || die
- eprefixify "${TMPDIR}/my.cnf"
- doins "${TMPDIR}/my.cnf"
- insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
- cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
- eprefixify "${TMPDIR}/50-distro-client.cnf"
- doins "${TMPDIR}/50-distro-client.cnf"
-
- if use server ; then
- mycnf_src="my.cnf.distro-server"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR}/${mycnf_src}" \
- > "${TMPDIR}/my.cnf.ok" || die
- if use prefix ; then
- sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- # Manually install supporting files that conflict with other packages
- # but are needed for galera and initial installation
- exeinto /usr/libexec/mariadb
- doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
- fi
-
- # Remove mytop if perl is not selected
- if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then
- rm -f "${ED}/usr/bin/mytop" || die
- fi
-
- # Fix a dangling symlink when galera is not built
- if [[ -L "${ED}/usr/bin/wsrep_sst_rsync_wan" ]] && ! use galera ; then
- rm "${ED}/usr/bin/wsrep_sst_rsync_wan" || die
- fi
-
- # Remove broken SST scripts that are incompatible
- local scriptremove
- for scriptremove in wsrep_sst_xtrabackup wsrep_sst_xtrabackup-v2 ; do
- if [[ -e "${ED}/usr/bin/${scriptremove}" ]] ; then
- rm "${ED}/usr/bin/${scriptremove}" || die
- fi
- done
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mariadb-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MariaDB 10.0 for now and are believed to be
- # false positives:
- #
- # main.mysql_client_test, main.mysql_client_test_nonblock
- # main.mysql_client_test_comp:
- # segfaults at random under Portage only, suspect resource limits.
-
- local t
- for t in plugins.cracklib_password_check plugins.two_password_validations ; do
- _disable_test "$t" "False positive due to varying policies"
- done
-
- for t in main.mysql_client_test main.mysql_client_test_nonblock \
- main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- _disable_test main.plugin_auth "Needs client libraries built"
-
- _disable_test main.func_time "Dependent on time test was written"
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd > /dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_config() {
- _getoptval() {
- local mypd="${EROOT}"usr/libexec/mariadb/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 | tail -n1)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see https://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in grant-tables host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
- local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile} \
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- if [[ -n "${sqltmp}" ]] ; then
- ebegin "Loading \"zoneinfo\", this step may require a few seconds"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -uroot \
- --password="${MYSQL_ROOT_PASSWORD}" \
- mysql < "${sqltmp}"
- rc=$?
- eend $?
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
- fi
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mariadb/mariadb-10.3.15.ebuild b/dev-db/mariadb/mariadb-10.3.15.ebuild
deleted file mode 100644
index ac4aefb98391..000000000000
--- a/dev-db/mariadb/mariadb-10.3.15.ebuild
+++ /dev/null
@@ -1,974 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20190305-2052Z"
-SUBSLOT="18"
-
-JAVA_PKG_OPT_USE="jdbc"
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils systemd flag-o-matic prefix toolchain-funcs \
- java-pkg-opt-2 user cmake-utils
-
-SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
- SRC_URI="${SRC_URI}
- mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://mariadb.org/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2 LGPL-2.1+"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
- innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
- numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
- sst-rsync sst-mariabackup static systemd systemtap tcmalloc
- test tokudb xml yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="jdbc? ( extraengine server !static )
- server? ( tokudb? ( jemalloc !tcmalloc ) )
- ?? ( tcmalloc jemalloc )
- static? ( yassl !pam )"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
- EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
- EGIT_CLONE_TYPE=shallow
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
-else
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
- "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
- "${MY_PATCH_DIR}"/20018_all_mariadb-10.3.12-without-clientlibs-tools.patch
- "${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
- "${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
- "${MY_PATCH_DIR}"/20035_all_mariadb-10.3-atomic-detection.patch
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- kernel_linux? (
- sys-process/procps:0=
- dev-libs/libaio:0=
- )
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- jemalloc? ( dev-libs/jemalloc:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- >=sys-libs/zlib-1.2.3:0=
- kerberos? ( virtual/krb5 )
- yassl? ( net-libs/gnutls:0= )
- !yassl? (
- !libressl? ( >=dev-libs/openssl-1.0.0:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- sys-libs/ncurses:0=
- !bindist? (
- sys-libs/binutils-libs:0=
- >=sys-libs/readline-4.1:0=
- )
- server? (
- backup? ( app-arch/libarchive:0= )
- cracklib? ( sys-libs/cracklib:0= )
- extraengine? (
- odbc? ( dev-db/unixODBC:0= )
- xml? ( dev-libs/libxml2:2= )
- )
- innodb-lz4? ( app-arch/lz4 )
- innodb-lzo? ( dev-libs/lzo )
- innodb-snappy? ( app-arch/snappy )
- mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
- numa? ( sys-process/numactl )
- oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
- pam? ( virtual/pam:0= )
- systemd? ( sys-apps/systemd:= )
- tokudb? ( app-arch/snappy )
- )
- >=dev-libs/libpcre-8.41-r1:3=
-"
-DEPEND="virtual/yacc
- static? ( sys-libs/ncurses[static-libs] )
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
- ${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
- !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- !<virtual/mysql-5.6-r11
- ${COMMON_DEPEND}
- server? ( galera? (
- sys-apps/iproute2
- =sys-cluster/galera-25*
- sst-rsync? ( sys-process/lsof )
- sst-mariabackup? ( net-misc/socat[ssl] )
- ) )
- perl? ( !dev-db/mytop
- virtual/perl-Getopt-Long
- dev-perl/TermReadKey
- virtual/perl-Term-ANSIColor
- virtual/perl-Time-HiRes )
- server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
- server? ( ~virtual/mysql-5.6[static=] )"
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
- # non x86{,_64} arches
- if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- fi
- java-pkg-opt-2_pkg_setup
- if has test ${FEATURES} && \
- use server && ! has userpriv ${FEATURES} ; then
- eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- # This should come after all of the die statements
- enewgroup mysql 60 || die "problem adding 'mysql' group"
- enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_preinst() {
- java-pkg-opt-2_pkg_preinst
-
- # Here we need to see if the implementation switched client libraries
- # We check if this is a new instance of the package and a client library already exists
- local SHOW_ABI_MESSAGE libpath
- if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
- libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
- elog "Due to ABI changes when switching between different client libraries,"
- elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
- elog "Please run: revdep-rebuild --library ${libpath}"
- ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
- fi
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
- if use server ; then
- if use pam; then
- einfo
- elog "This install includes the PAM authentication plugin."
- elog "To activate and configure the PAM plugin, please read:"
- elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
- einfo
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- elog
- elog "If you are switching server implentations, you should run the"
- elog "mysql_upgrade tool."
- einfo
- else
- einfo
- elog "If you are upgrading major versions, you should run the"
- elog "mysql_upgrade tool."
- einfo
- fi
-
- if use galera ; then
- einfo
- elog "Be sure to edit the my.cnf file to activate your cluster settings."
- elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
- elog "The first time the cluster is activated, you should add"
- elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
- elog "This option should then be removed for subsequent starts."
- einfo
- fi
- fi
-
- # Note about configuration change
- einfo
- elog "This version of mariadb reorganizes the configuration from a single my.cnf"
- elog "to several files in /etc/mysql/${PN}.d."
- elog "Please backup any changes you made to /etc/mysql/my.cnf"
- elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
- elog "You may have as many files as needed and they are read alphabetically."
- elog "Be sure the options have the 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/_rc/}" "${S}" || die
-}
-
-src_prepare() {
- _disable_plugin() {
- echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
- }
- _disable_engine() {
- echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
- }
-
- if use jemalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt"
- elif use tcmalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
- fi
-
- # Don't build bundled xz-utils for tokudb
- echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
- sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
- sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
-
- local plugin
- local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
- locale_info qc_info server_audit sql_errlog )
- local test_plugins=( audit_null auth_examples daemon_example fulltext
- debug_key_management example_key_management versioning )
- if ! use server; then # These plugins are for the server
- for plugin in "${server_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- if ! use test; then # These plugins are only used during testing
- for plugin in "${test_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- _disable_engine test_sql_discovery
- fi
-
- _disable_engine example
-
- if ! use oqgraph ; then # avoids extra library checks
- _disable_engine oqgraph
- fi
-
- if use mroonga ; then
- # Remove the bundled groonga
- # There is no CMake flag, it simply checks for existance
- rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
- else
- _disable_engine mroonga
- fi
-
- cmake-utils_src_prepare
- java-pkg-opt-2_src_prepare
-}
-
-src_configure(){
- # bug 508724 mariadb cannot use ld.gold
- tc-ld-disable-gold
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
- -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
- -DSYSCONFDIR="${EPREFIX}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/mariadb
- -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
- -DINSTALL_SCRIPTDIR=share/mariadb/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
- -DWITH_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- -DWITH_LIBEDIT=0
- -DWITH_ZLIB=system
- -DWITHOUT_LIBWRAP=1
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
- # The build forces this to be defined when cross-compiling. We pass it
- # all the time for simplicity and to make sure it is actually correct.
- -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
- -DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
- -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
- -DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
- -DCONC_WITH_EXTERNAL_ZLIB=YES
- -DWITH_EXTERNAL_ZLIB=YES
- -DSUFFIX_INSTALL_DIR=""
- -DWITH_UNITTEST=OFF
- -DWITHOUT_CLIENTLIBS=YES
- -DCLIENT_PLUGIN_DIALOG=OFF
- -DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT=OFF
- -DCLIENT_PLUGIN_MYSQL_CLEAR_PASSWORD=STATIC
- -DCLIENT_PLUGIN_CACHING_SHA2_PASSWORD=OFF
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use yassl ; then
- mycmakeargs+=( -DWITH_SSL=system -DCLIENT_PLUGIN_SHA256_PASSWORD=STATIC )
- else
- mycmakeargs+=( -DWITH_SSL=bundled )
- fi
-
- # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
- mycmakeargs+=(
- -DWITH_READLINE=$(usex bindist 1 0)
- -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
- -DENABLE_DTRACE=$(usex systemtap)
- )
-
- if use server ; then
-
- # Federated{,X} must be treated special otherwise they will not be built as plugins
- if ! use extraengine ; then
- mycmakeargs+=(
- -DPLUGIN_FEDERATED=NO
- -DPLUGIN_FEDERATEDX=NO )
- fi
-
- mycmakeargs+=(
- -DWITH_PCRE=system
- -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
- -DPLUGIN_SPHINX=$(usex sphinx YES NO)
- -DPLUGIN_TOKUDB=$(usex tokudb YES NO)
- -DPLUGIN_AUTH_PAM=$(usex pam YES NO)
- -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
- -DPLUGIN_CASSANDRA=NO
- -DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
- -DPLUGIN_SPIDER=$(usex extraengine YES NO)
- -DPLUGIN_CONNECT=$(usex extraengine YES NO)
- -DCONNECT_WITH_MYSQL=1
- -DCONNECT_WITH_LIBXML2=$(usex xml)
- -DCONNECT_WITH_ODBC=$(usex odbc)
- -DCONNECT_WITH_JDBC=$(usex jdbc)
- # Build failure and autodep wrt bug 639144
- -DCONNECT_WITH_MONGO=OFF
- -DWITH_WSREP=$(usex galera)
- -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
- -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
- -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
- -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
- -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
- -DWITH_MARIABACKUP=$(usex backup ON OFF)
- -DWITH_LIBARCHIVE=$(usex backup ON OFF)
- -DINSTALL_SQLBENCHDIR=""
- -DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
- # systemd is only linked to for server notification
- -DWITH_SYSTEMD=$(usex systemd yes no)
- -DWITH_NUMA=$(usex numa ON OFF)
- )
-
- # Workaround for MDEV-14524
- use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
-
- if use test ; then
- # This is needed for the new client lib which tests a real, open server
- mycmakeargs+=( -DSKIP_TESTS=ON )
- fi
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
-
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DMYSQL_USER=mysql
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_DEBUG=$(usex debug)
- -DWITH_EMBEDDED_SERVER=OFF
- -DWITH_PROFILING=$(usex profiling)
- )
-
- if use static; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- if use jemalloc || use tcmalloc ; then
- mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- -DWITH_PARTITION_STORAGE_ENGINE=1
- )
-
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DWITH_EMBEDDED_SERVER=OFF
- -DEXTRA_CHARSETS=none
- -DINSTALL_SQLBENCHDIR=
- -DWITH_SYSTEMD=no
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
- if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
- rm "${ED}/usr/include/mysql/server/private/config.h" || die
- fi
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED}/usr/data" ]] ; then
- rm -Rf "${ED}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
- cp "${FILESDIR}/my.cnf-10.2" "${TMPDIR}/my.cnf" || die
- eprefixify "${TMPDIR}/my.cnf"
- doins "${TMPDIR}/my.cnf"
- insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
- cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
- eprefixify "${TMPDIR}/50-distro-client.cnf"
- doins "${TMPDIR}/50-distro-client.cnf"
-
- if use server ; then
- mycnf_src="my.cnf.distro-server"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR}/${mycnf_src}" \
- > "${TMPDIR}/my.cnf.ok" || die
- if use prefix ; then
- sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
-
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- # Manually install supporting files that conflict with other packages
- # but are needed for galera and initial installation
- exeinto /usr/libexec/mariadb
- doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
- fi
-
- # Remove mytop if perl is not selected
- if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then
- rm -f "${ED}/usr/bin/mytop" || die
- fi
-
- # Fix a dangling symlink when galera is not built
- if [[ -L "${ED}/usr/bin/wsrep_sst_rsync_wan" ]] && ! use galera ; then
- rm "${ED}/usr/bin/wsrep_sst_rsync_wan" || die
- fi
-
- # Remove broken SST scripts that are incompatible
- local scriptremove
- for scriptremove in wsrep_sst_xtrabackup wsrep_sst_xtrabackup-v2 ; do
- if [[ -e "${ED}/usr/bin/${scriptremove}" ]] ; then
- rm "${ED}/usr/bin/${scriptremove}" || die
- fi
- done
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mariadb-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MariaDB 10.0 for now and are believed to be
- # false positives:
- #
- # main.mysql_client_test, main.mysql_client_test_nonblock
- # main.mysql_client_test_comp:
- # segfaults at random under Portage only, suspect resource limits.
-
- local t
- for t in plugins.cracklib_password_check plugins.two_password_validations ; do
- _disable_test "$t" "False positive due to varying policies"
- done
-
- for t in main.mysql_client_test main.mysql_client_test_nonblock \
- main.mysql main.gis_notembedded \
- main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- _disable_test main.plugin_auth "Needs client libraries built"
-
- _disable_test main.func_time "Dependent on time test was written"
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd > /dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_config() {
- _getoptval() {
- local mypd="${EROOT}"usr/libexec/mariadb/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 | tail -n1)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see https://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in grant-tables host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
- local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile} \
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- if [[ -n "${sqltmp}" ]] ; then
- ebegin "Loading \"zoneinfo\", this step may require a few seconds"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -uroot \
- --password="${MYSQL_ROOT_PASSWORD}" \
- mysql < "${sqltmp}"
- rc=$?
- eend $?
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
- fi
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mariadb/mariadb-10.4.6.ebuild b/dev-db/mariadb/mariadb-10.4.6.ebuild
index 9235108192c1..890930c48092 100644
--- a/dev-db/mariadb/mariadb-10.4.6.ebuild
+++ b/dev-db/mariadb/mariadb-10.4.6.ebuild
@@ -26,7 +26,7 @@ HOMEPAGE="https://mariadb.org/"
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
LICENSE="GPL-2 LGPL-2.1+"
SLOT="0/${SUBSLOT:-0}"
-IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
+IUSE="+backup bindist cracklib debug extraengine galera innodb-lz4
innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
sst-rsync sst-mariabackup static systemd systemtap tcmalloc
@@ -117,6 +117,7 @@ RDEPEND="selinux? ( sec-policy/selinux-mysql )
!dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
!<virtual/mysql-5.6-r11
+ !<virtual/libmysqlclient-18-r1
${COMMON_DEPEND}
server? ( galera? (
sys-apps/iproute2
@@ -168,17 +169,6 @@ pkg_setup() {
pkg_preinst() {
java-pkg-opt-2_pkg_preinst
-
- # Here we need to see if the implementation switched client libraries
- # We check if this is a new instance of the package and a client library already exists
- local SHOW_ABI_MESSAGE libpath
- if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
- libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
- elog "Due to ABI changes when switching between different client libraries,"
- elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
- elog "Please run: revdep-rebuild --library ${libpath}"
- ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
- fi
}
pkg_postinst() {
@@ -186,7 +176,7 @@ pkg_postinst() {
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}"
+ [[ -d "${ROOT}/${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}/${MY_LOGDIR}"
if use server ; then
if use pam; then
@@ -751,7 +741,7 @@ mysql_init_vars() {
pkg_config() {
_getoptval() {
- local mypd="${EROOT}"usr/libexec/mariadb/my_print_defaults
+ local mypd="${EROOT}"/usr/libexec/mariadb/my_print_defaults
local section="$1"
local flag="--${2}="
local extra_options="${3}"
@@ -913,8 +903,8 @@ pkg_config() {
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
- local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
+ local cmd=( "${EROOT}/usr/share/mariadb/scripts/mysql_install_db" )
+ [[ -f "${cmd}" ]] || cmd=( "${EROOT}/usr/bin/mysql_install_db" )
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
einfo "Command: ${cmd[*]}"
su -s /bin/sh -c "${cmd[*]}" mysql \
diff --git a/dev-db/mariadb/mariadb-5.5.63.ebuild b/dev-db/mariadb/mariadb-5.5.63.ebuild
deleted file mode 100644
index 6f578a9b7022..000000000000
--- a/dev-db/mariadb/mariadb-5.5.63.ebuild
+++ /dev/null
@@ -1,831 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20180809-1700Z"
-SUBSLOT="18"
-
-# Keeping eutils in EAPI=6 for emktemp in pkg_config
-
-inherit eutils flag-o-matic prefix toolchain-funcs user cmake-utils multilib-build
-
-SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
-
-# Gentoo patches to MySQL
-if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
- SRC_URI="${SRC_URI}
- mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
- https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
-fi
-
-HOMEPAGE="https://mariadb.org/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="bindist client-libs debug extraengine jemalloc latin1 libressl
- oqgraph pam +perl profiling selinux +server sphinx
- static static-libs systemtap tcmalloc
- test tokudb yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="server? ( tokudb? ( jemalloc !tcmalloc ) )
- ?? ( tcmalloc jemalloc )
- static? ( yassl !pam )"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
- inherit git-r3
- EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git"
- EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
- EGIT_CLONE_TYPE=shallow
-else
- MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
- "${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch"
- "${MY_PATCH_DIR}/20004_all_mariadb-filter-tokudb-flags.patch"
- "${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-5.5.50.patch"
- "${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch"
- "${MY_PATCH_DIR}/20018_all_mariadb-5.5.60-without-clientlibs-tools.patch"
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- kernel_linux? (
- sys-process/procps:0=
- dev-libs/libaio:0=
- )
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- jemalloc? ( dev-libs/jemalloc:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- !yassl? (
- !libressl? ( <dev-libs/openssl-1.1.0:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- >=sys-libs/zlib-1.2.3:0=
- sys-libs/ncurses:0=
- !bindist? (
- >=sys-libs/readline-4.1:0=
- )
- server? (
- oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
- pam? ( virtual/pam:0= )
- )
- !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-DEPEND="virtual/yacc
- static? ( sys-libs/ncurses[static-libs] )
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- ${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
- client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
- !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- ${COMMON_DEPEND}
- perl? ( !dev-db/mytop
- virtual/perl-Getopt-Long
- dev-perl/TermReadKey
- virtual/perl-Term-ANSIColor
- virtual/perl-Time-HiRes )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
- # non x86{,_64} arches
- if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
- ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
- eerror "${PN} needs to be built with gcc-4.7 or later."
- eerror "Please use gcc-config to switch to gcc-4.7 or later version."
- die
- fi
- fi
- if has test ${FEATURES} && \
- use server && ! has userpriv ${FEATURES} ; then
- eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
-
- # This should come after all of the die statements
- enewgroup mysql 60 || die "problem adding 'mysql' group"
- enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
-}
-
-pkg_postinst() {
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Create log directory securely if it does not exist
- [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
-
- if use server ; then
- if use pam; then
- einfo
- elog "This install includes the PAM authentication plugin."
- elog "To activate and configure the PAM plugin, please read:"
- elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
- einfo
- fi
-
- if [[ -z "${REPLACING_VERSIONS}" ]] ; then
- einfo
- elog "You might want to run:"
- elog "\"emerge --config =${CATEGORY}/${PF}\""
- elog "if this is a new install."
- elog
- elog "If you are switching server implentations, you should run the"
- elog "mysql_upgrade tool."
- einfo
- else
- einfo
- elog "If you are upgrading major versions, you should run the"
- elog "mysql_upgrade tool."
- einfo
- fi
-
- einfo
- elog "Be sure to edit the my.cnf file to activate your cluster settings."
- elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
- elog "The first time the cluster is activated, you should add"
- elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
- elog "This option should then be removed for subsequent starts."
- einfo
- fi
-}
-
-src_unpack() {
- unpack ${A}
- # Grab the patches
- [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack
-
- mv -f "${WORKDIR%/}/${P}" "${S}" || die
-}
-
-src_prepare() {
- _disable_engine() {
- echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
- }
-
- _disable_plugin() {
- echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
- }
-
- if use tcmalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die
- fi
-
- # Don't build bundled xz-utils for tokudb
- echo > "${S%/}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die
- sed -i -e 's/ build_lzma//' "${S%/}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die
- sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/ft-index/portability/CMakeLists.txt" || die
-
- local plugin
- local server_plugins=( handler_socket auth_socket feedback qc_info server_audit semisync sql_errlog )
- local test_plugins=( audit_null auth_examples daemon_example fulltext )
- if ! use server; then # These plugins are for the server
- for plugin in "${server_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- if ! use test; then # These plugins are only used during testing
- for plugin in "${test_plugins[@]}" ; do
- _disable_plugin "${plugin}"
- done
- fi
-
- # Collides with mariadb-connector-c bug 655980
- _disable_plugin auth_dialog
-
- # Don't build example
- _disable_engine example
-
- if ! use oqgraph ; then # avoids extra library checks
- _disable_engine oqgraph
- fi
-
- cmake-utils_src_prepare
-}
-
-src_configure(){
- # bug 508724 mariadb cannot use ld.gold
- tc-ld-disable-gold
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
- -DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/mariadb
- -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
- -DINSTALL_SCRIPTDIR=share/mariadb/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- -DWITH_ZLIB=system
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock"
- # The build forces this to be defined when cross-compiling. We pass it
- # all the time for simplicity and to make sure it is actually correct.
- -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
- -DWITHOUT_CLIENTLIBS=YES
- -DWITH_READLINE=$(usex bindist 1 0)
- -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
- -DENABLE_DTRACE=$(usex systemtap)
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use yassl ; then
- mycmakeargs+=( -DWITH_SSL=system )
- else
- mycmakeargs+=( -DWITH_SSL=bundled )
- fi
-
- if use server ; then
-
- # Federated{,X} must be treated special otherwise they will not be built as plugins
- if ! use extraengine ; then
- mycmakeargs+=(
- -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
- -DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 )
- fi
-
- mycmakeargs+=(
- -DWITH_JEMALLOC=$(usex jemalloc system)
- -D$(usex sphinx WITH WITHOUT)_SPHINX_STORAGE_ENGINE=1
- -D$(usex tokudb WITH WITHOUT)_TOKUDB_STORAGE_ENGINE=1
- -D$(usex oqgraph WITH WITHOUT)_AUTH_PAM=1
- -DINSTALL_SQLBENCHDIR=share/mariadb
- )
-
- if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
- ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
- ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
- ewarn "You MUST file bugs without these variables set."
-
- mycmakeargs+=(
- -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
- -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
- )
-
- elif ! use latin1 ; then
- mycmakeargs+=(
- -DDEFAULT_CHARSET=utf8
- -DDEFAULT_COLLATION=utf8_general_ci
- )
- else
- mycmakeargs+=(
- -DDEFAULT_CHARSET=latin1
- -DDEFAULT_COLLATION=latin1_swedish_ci
- )
- fi
- mycmakeargs+=(
- -DEXTRA_CHARSETS=all
- -DDISABLE_SHARED=$(usex static YES NO)
- -DWITH_EMBEDDED_SERVER=OFF
- -DENABLED_PROFILING=$(usex profiling)
- )
-
- if use static; then
- mycmakeargs+=( -DWITH_PIC=1 )
- fi
-
- if use jemalloc || use tcmalloc ; then
- mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
- fi
-
- # Storage engines
- mycmakeargs+=(
- -DWITH_ARCHIVE_STORAGE_ENGINE=1
- -DWITH_BLACKHOLE_STORAGE_ENGINE=1
- -DWITH_CSV_STORAGE_ENGINE=1
- -DWITH_HEAP_STORAGE_ENGINE=1
- -DWITH_INNOBASE_STORAGE_ENGINE=1
- -DWITH_MYISAMMRG_STORAGE_ENGINE=1
- -DWITH_MYISAM_STORAGE_ENGINE=1
- -DWITH_PARTITION_STORAGE_ENGINE=1
- )
-
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DEXTRA_CHARSETS=none
- -DINSTALL_SQLBENCHDIR=
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
- if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then
- rm "${ED%/}/usr/include/mysql/server/private/config.h" || die
- fi
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED%/}/usr/data" ]] ; then
- rm -Rf "${ED%/}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
- local mycnf_src="my.cnf-5.5"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR%/}/${mycnf_src}" \
- > "${TMPDIR%/}/my.cnf.ok" || die
- use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR%/}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR%/}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" my.cnf
-
- if use server ; then
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S%/}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S%/}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- # Manually install supporting files that conflict with other packages
- # but are needed for galera and initial installation
- exeinto /usr/libexec/mariadb
- doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
- fi
-
- #Remove mytop if perl is not selected
- [[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop"
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mariadb-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MariaDB 5.5 for now and are believed to be
- # false positives:
- #
- # main.information_schema, binlog.binlog_statement_insert_delayed,
- # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql,
- # funcs_1.is_columns_mysql
- # fails due to USE=-latin1 / utf8 default
- #
- # main.mysql_client_test, main.mysql_client_test_nonblock:
- # segfaults at random under Portage only, suspect resource limits.
- #
- # archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam
- # fails due to bad cleanup of previous tests when run in parallel
- # The tool is deprecated anyway
- # Bug 532288
-
- local t
- for t in main.mysql_client_test main.mysql_client_test_nonblock \
- binlog.binlog_statement_insert_delayed main.information_schema \
- main.mysqld--help \
- archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
- funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- if ! use client-libs ; then
- _disable_test main.plugin_auth "Needs client libraries built"
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd > /dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_config() {
- _getoptval() {
- local mypd="${EROOT}"/usr/bin/my_print_defaults
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
- }
- local old_MY_DATADIR="${MY_DATADIR}"
- local old_HOME="${HOME}"
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- export HOME=${EPREFIX}/root
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
- if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
- die "Minimal builds do NOT include the MySQL server"
- fi
-
- if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
- local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
- MY_DATADIR_s="${MY_DATADIR_s%%/}"
- local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
- old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
- if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
- ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
- else
- elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
- mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
- || die "Moving MY_DATADIR failed"
- fi
- else
- ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Attempting to use ${MY_DATADIR_s}"
- else
- eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
- die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
- fi
- fi
- fi
-
- local pwd1="a"
- local pwd2="b"
- local maxtry=15
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
- local tmp_mysqld_password_source=
-
- for tmp_mysqld_password_source in mysql client; do
- einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
- if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
- if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
- ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
- MYSQL_ROOT_PASSWORD=
- continue
- fi
-
- einfo "Found password in '${tmp_mysqld_password_source}' section!"
- break
- fi
- done
-
- # Sometimes --show is required to display passwords in some implementations of my_print_defaults
- if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
- fi
-
- unset tmp_mysqld_password_source
- fi
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see https://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in grant-tables host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
- local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile} \
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- if [[ -n "${sqltmp}" ]] ; then
- ebegin "Loading \"zoneinfo\", this step may require a few seconds"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -uroot \
- --password="${MYSQL_ROOT_PASSWORD}" \
- mysql < "${sqltmp}"
- rc=$?
- eend $?
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
- fi
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index e55923f25bb4..3ceee298ede5 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -5,5 +5,6 @@ AUX mysql_com.patch 1787 BLAKE2B 4fbd40325f400586926072927b3f07231d577f18c1e3095
DIST mysql-boost-8.0.16.tar.gz 145939027 BLAKE2B f8e94c6aa686a3f3a2fd231676070760081c6bbf0d652ce09e9bfb6f9dc86fc96dba5739ac8721bfd55c947e44c7de4c37ff5f8bb56db5e08484cf586e143add SHA512 4de08d74637d1fef4f570148e66c8ddf2b59d1c0a49d715ca632da7f572645b65ec5f7c115aaf0bd179b0a9f1ba2bc40357c371f170a674118159d99b2c49516
DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6
EBUILD mysql-connector-c-6.1.11-r1.ebuild 2467 BLAKE2B 5795de122ab9ef63747a97780817358fce1ef8baf537dec5bfe0507646e6bd6202b63df278a925fe348d948d44f3307ba00a62dd991e1074a79c065b6b9e6048 SHA512 deb188e6e6c6d0555e265b6b2c283a50d1f4158e73b3d17f0741f046b7c249d983ae4c55b80206a3a7b27c32ad1f9577aded60d6ea2b2d8fd238f6ac3aea1342
+EBUILD mysql-connector-c-6.1.11-r2.ebuild 2296 BLAKE2B dfa87fc416fb89a9bf4318f50569a5c5a1ee594d5b993af2290784622a27434c701a5ee196bd35789310b8bdacfb031e236d491a4649b6c76ec14953bc9cd917 SHA512 80fabc666f80af54b5d930df2c842faf6eae8878994eb0599562f6e54b6d6c033a778874e96fde3f3379001c4594bb5e50111a486e42b88eee2a89b6d8b155a9
EBUILD mysql-connector-c-8.0.16.ebuild 2284 BLAKE2B 81b433c6fe3cb706d984cfee6eaa43500a6505e082fae39607d9b7a80044bbf947a065cb3753b6ac22a9108a2e5b5dbfed87efd8cdc78626de23d01143744110 SHA512 96486b5cd5b215b72242601010c9ed1a3d3e1f6cbeee4d63a13a86b00934b8d4f1f31e6c3aac8a61e1bd58c9d7841ef7345cc937c620108114c272a641e06eb2
MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r2.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r2.ebuild
new file mode 100644
index 000000000000..7b194c341a13
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-6.1.11-r2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-multilib
+
+MULTILIB_WRAPPED_HEADERS+=(
+ /usr/include/mysql/my_config.h
+)
+
+# wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/connector/c/"
+LICENSE="GPL-2"
+
+SRC_URI="https://dev.mysql.com/get/Downloads/Connector-C/${P}-src.tar.gz"
+S="${WORKDIR}/${P}-src"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+SUBSLOT="18"
+SLOT="0/${SUBSLOT}"
+IUSE="libressl static-libs"
+
+CDEPEND="
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ "
+RDEPEND="${CDEPEND}
+ !dev-db/mariadb-connector-c[mysqlcompat]
+ "
+DEPEND="${CDEPEND}"
+
+DOCS=( README )
+PATCHES=(
+ "${FILESDIR}/mysql_com.patch"
+ "${FILESDIR}/20028_all_mysql-5.6-gcc7.patch"
+ "${FILESDIR}/6.1.11-openssl-1.1.patch"
+)
+
+src_prepare() {
+ sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
+ if use libressl ; then
+ sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+ "${S}/cmake/ssl.cmake" || die
+ fi
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_LAYOUT=RPM
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+ -DWITH_DEFAULT_FEATURE_SET=OFF
+ -DENABLED_LOCAL_INFILE=ON
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_ZLIB=system
+ -DENABLE_DTRACE=OFF
+ -DWITH_SSL=system
+ -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+ -DSHARED_LIB_PATCH_VERSION="0"
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install_all() {
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}
+
+pkg_preinst() {
+ if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ 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 libmysqlclient.so.${SUBSLOT}"
+ ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+ fi
+}
diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index bcf69b3fcd76..cb5cd3e79732 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -23,10 +23,10 @@ EBUILD mysql-5.5.61.ebuild 25515 BLAKE2B 2e8a5ff36ec6003ff7e4d746157afe8af9d4625
EBUILD mysql-5.5.62.ebuild 25693 BLAKE2B abb1400994767e1a29259fda70531e27e9160b849a6228802baa440f8a5c8244393cb155ac9985f04353c8b35516e653a563c2eb84b72a714c5ee81d016e5d27 SHA512 759b82802fdeb7840b0da3e4ef1d6e7b1f32d7bd815ba780b11e57143b52bcb7eb483c008d25670f4626968028a46f7080abff247e5d2047f6b500ac67888ad4
EBUILD mysql-5.6.40-r2.ebuild 25714 BLAKE2B c78b1d8b2a77d095302f7e203c3ee6c0c2014770944072b87bd77f97972fcb6db52b05088adacbc821ce2e8f3dbb780bd40d850e381b866458b0d530fd11ea5d SHA512 b6301834c7813714f18f9763922d10e6faa33675705ba479c6d76e3c5673d903b0683f64a8281836bd6be396f398ed1bee14f9e6c8ddfe30b84ad1ac66a8be48
EBUILD mysql-5.6.42.ebuild 25955 BLAKE2B de075ce30850d5f2fe17a5aaf02e5888d62634028a042105ac4bff9a90dbec7803c6b1d348e35267be6b4b12afa8f12f4a02f969c536890bf7970cb4e466907c SHA512 56aa82fe363e091a6db7b307318f14ff93ded6eba2a61142eb3e026205740b02dca8587e23accf2ff757e941b0d4b2a0e7ab386b879d7cee35976facbb7aec94
-EBUILD mysql-5.6.43.ebuild 26058 BLAKE2B 900da4370bcf01f3bb6f3c54220e80beddd4243724603c839caddc644504c6255bb68fc3b99522e23df7f7b0290edd859ffcced2819dcc7bbd8ec80a26eeafd3 SHA512 9f33a0924fab366635627643e85d33a8404b27afa098eb7411a9f223b9f4d90a3a4ff2dd47261de1d235ffa5865c44808e053329e21d8728c418b7c890ea026b
+EBUILD mysql-5.6.43.ebuild 26057 BLAKE2B b6162d04f384dc37aabae472cc3998dea0456d672aa906e778d58637edca29fc11257f1fecbcae36d3c1245467768426284743a2aadaab6723540279c615d11c SHA512 857b83b44f185bb0b811005b0f5ee35eff1a2b4d263b199f8a4955330b7fd73fd2038d565fc6fadd9cc31948f0699db6ebb10e628e93e9b223ab87b5517fe16b
EBUILD mysql-5.6.44.ebuild 26139 BLAKE2B 386f77f902ae6c6ca01c00e1eafc4de6e897ea79886786575d17604c6db2f96dbce34658e471ca39f873519700a8ec210fff30795c596d68bd0b4627a8e56633 SHA512 893b8dae147ce5c084f60a3dbdeaa42a3fc8bad4e0f52f79533089a4795c0aedff3e90e2bd1f51fc992a74a327b7d4dc8619ffa507ef50b56c5b3dddc91bcd41
EBUILD mysql-5.7.23-r2.ebuild 30078 BLAKE2B 57bf58e862639e651335a10a8c4dfc5f7f0f76bfb0545414d697875906d917131fedd3e9d0e58f57b886d8cae55adbd2a104ee3632d49b4ba0669b93a1a68bff SHA512 dfbb88e79b717ceb615246a806123ee2d30c1632cfb40d0bb9e04a9204565a92afbb2b37245794c15985e99a60d2adc46723b97e455fb85e137079d6192b148c
EBUILD mysql-5.7.24.ebuild 30386 BLAKE2B ecf0c03821af6a21467b53a02e6e0a0ae2f7e5d267ff4669266d34cdb9fddb7defbd8a4013dd3a1f8a103c84da4c6eddafae06fc1ebc4bf94c9769e64dbbfc1b SHA512 f8b372573d82b513ea1d82a1e00d728501c483ef949a2411c05ac93a8d2d90162d6992b58d3a101fefcbac541f9f37dcfa2263ac49231839d338af158557153f
-EBUILD mysql-5.7.25.ebuild 30466 BLAKE2B 09a9d351068993f776edaec7df6af40709ae1f29edfccb5c0881cb4e6c3c30370eb5dd605972eb2da02c9f1cc981d809a7fd4a5f61f61ac5b91b714e9ef8b8c6 SHA512 a8adb0af5cadb08556c2d19b6a0e7c659568dd36fc4448db2808e74bbfe6c7690d33e36b7d3ed91148b00d7093b1a09a7e522a17101fe35f9da1940d2751db2a
+EBUILD mysql-5.7.25.ebuild 30465 BLAKE2B ec639482f3726ea18994c0e3b88ae991d16eda30c5acf7f6abee4f4301d0ada726494e4ebd2f045291faf967940adc8ef1172a48fb00e10ff69a83f837ac3e73 SHA512 6d45fd341a6f0e71d3546134d4bcfd745c6b488b28e848eb2ee1aaebb96745c797da452250a71c2eba87452e61f5ba017f80b88f4e16e23d076be4a70c6936ed
EBUILD mysql-5.7.26.ebuild 30477 BLAKE2B 799f6a4d605e4e91858df8eaee9695c657c179043c2555d7c69f5bc344606b3a9c8780fafe9455346c166b4e4171bf478e576b29f8ad2cafa795b1d6b29d0c46 SHA512 690fde2496a52872512df7d057bb6f0eacb4b7157848949853fe66d0257cde4a1d02df5adeb4469aa398978d64c5b2ded85787cf1fc6c4125eb1cb25ddb6b2f8
MISC metadata.xml 1539 BLAKE2B 0bc66c5855bd1f4353a7f0b551229d68a940478687b4f38653f973e4a5cfcb946c86bdc2d8318aa96aba43598eb476b995005f26727dfa176ced00fbe2b129a1 SHA512 bc0ce8a3de5e55d954f65eec657930af069d3550f485334f80dfa4c6d17c6298d0609d1ba4fe8b6c988f8ad007858f147c17f1354c207891ac1a062a36af50ad
diff --git a/dev-db/mysql/mysql-5.6.43.ebuild b/dev-db/mysql/mysql-5.6.43.ebuild
index bb890982483f..77ee38308273 100644
--- a/dev-db/mysql/mysql-5.6.43.ebuild
+++ b/dev-db/mysql/mysql-5.6.43.ebuild
@@ -37,7 +37,7 @@ RESTRICT="libressl? ( test )"
REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-KEYWORDS="alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
# Shorten the path because the socket path length must be shorter than 107 chars
# and we will run a mysql server during test phase
diff --git a/dev-db/mysql/mysql-5.7.25.ebuild b/dev-db/mysql/mysql-5.7.25.ebuild
index a66ab389e877..34fc5964b516 100644
--- a/dev-db/mysql/mysql-5.7.25.ebuild
+++ b/dev-db/mysql/mysql-5.7.25.ebuild
@@ -34,7 +34,7 @@ RESTRICT="libressl? ( test )"
REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-KEYWORDS="alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
# Shorten the path because the socket path length must be shorter than 107 chars
# and we will run a mysql server during test phase
diff --git a/dev-db/opendbx/Manifest b/dev-db/opendbx/Manifest
index 8caf0cab6098..35e037613c81 100644
--- a/dev-db/opendbx/Manifest
+++ b/dev-db/opendbx/Manifest
@@ -1,8 +1,10 @@
AUX opendbx-doxy.patch 1557 BLAKE2B 260c5578e22a751f59308d9dc3f94017951f24775c5dc52d3e4e512380244e5d7266704aae43119267c1726a08c086658c7c0e89bbcb66f671507712d9e2c9ba SHA512 f98f1b1014a44713c1cc5adf46fba8af5333c97faf765e8d1e6c0eb4772650c7524f4c8a90cffe6bbdb4c688beb6bac3eb2755105164002f3e85797adb135004
+AUX opendbx-man-optional.patch 1000 BLAKE2B a8e5dc4e0721b94acd0b379a6d27ea8e349e85ea31d362d4f6c0ac274220f69e09bcb4c0436b6cfd3037983e66d484cb48057cb740456d772ab49e7c4dade566 SHA512 1acf644bc84474e62d28cfa07a0030fd2ec919e27cb514cf710d4322f0f6c869e79bb11895e5eee549e4edb5e1924e708dc7ec87b02be722ce5306c418b6ecf8
DIST libopendbx-1.5.0.tar.gz 583894 BLAKE2B c427bf8d79df6b83d0ce940d974625bd9b54e49e502f864d244a780185b6321f84a6b779e09b603a71ca26549844001268f0357169e9a74e742b9c2668e4b3ec SHA512 7e4e9b8c62fd981276f6747f8184d7e34d743b866bfd76c8126a16371b50dc682177fd563212333d2dbebe2128d0b1527fc69029833329ba8cc0311308fa9bb5
DIST opendbx-1.4.5.tar.gz 582915 BLAKE2B 7a11947f73ba3a3d407fecf7600589b64a6a80b82f24720ae613d1dc7044e7efe3af8fe273c0cdb043923af2cee1913766054eff3267243345b89c6977124be6 SHA512 e46289f9a7eb8b6e4084863834f8c4ca080eb3343b5f9d5837c476bab0a39e798a6364c8648f9fb53e52ab60cae57749b9f7e9bd23cb95b8ff21160f1bf4247e
DIST opendbx-1.4.6.tar.gz 587514 BLAKE2B 0a6c983ac1ebdc3ad9390185938f32e13ba9ff2ced6d41390421e1e3a1e9eb639a85d89da7ce2dd67f05fd2fcaebb2f53146f43678e548511403d8cdc4de88da SHA512 dd6d53d29157057dbf4e273fd82c7694e8bc626d3409d6ab9c25627a0fec96418326550fa8004b5341facdc4cd8aae12516224e8bb84e2562482885780ff0e55
EBUILD opendbx-1.4.5-r1.ebuild 1602 BLAKE2B c60c9934a2be4e82de7699d60d0f17a26f272621f285ac7773b2204354528b861b3649fd6d36b96e82ea57a6d87e6ec68ccf48e908eb3f7cbfb17cbcc5f067b7 SHA512 951c6404d3599c47cf81fb2f4655aa000b3991c9df0eea4ea6b81f7a2f3e21342c6417863c48971c9e924fbfbc92be1833303a520ed683a2a3cf32a5a0f988a5
EBUILD opendbx-1.4.6-r2.ebuild 1604 BLAKE2B 1e77a1b530d45461925490e089846ade568083cde20953b0cd1b79adae6173dd0513f54e72bc30008b8f080b4c679a04ff04e02bdb22e2d8bd2528764e75dd3b SHA512 6ef51b6ae514c238b57a82f785145eb96d6430dde6c011087491328b8fb7817b722f0223cef31f6bfcf253632e7a9014345015d0ce7cb3db24f3b392c86b7a8a
+EBUILD opendbx-1.4.6-r3.ebuild 1751 BLAKE2B 9221f19b85ee887c010d01a09a0238126d57fa38b721e09fcd7d64fa2d4708c90a6f1e35a9507f7a254782402608676c1a6a04356338639c7a13c634763c1bff SHA512 1b08f337d683f617ad9fbfe2fecd07ad2f4651c82cf45fb7125275b9a48ccfce0f0fc767d3e2ecbfc0db600a89c633a200461e5d58454a36629e0d3b1e01671e
EBUILD opendbx-1.5.0-r2.ebuild 1672 BLAKE2B 306102765d9f0a879490988bba0c5d2fa69e14fc5bae6d6e27943376278bbfd49412b90e8a497b8dcc4090d047cae6559d1c690e8e19c68f236d167f8d6918c2 SHA512 0be32ee80a73b302f33cf7024b9d11d5432f6d766de2c1144f14b48b13faa02e64121b06aea35b7c3a0509f5091076fae6ff1a462aa503f158544f11439f6a80
-MISC metadata.xml 243 BLAKE2B 1d641d0445b6ef43e1ca3ca3f967b0580b0a5ba444509e092a8a51bba18564136091c2dacd69ed723e36cb851b3962176a8aca06d3b2e604cf089c4983dbb7f5 SHA512 2bbd30d145173aa1c10a47ec43bfc1f6b1aeda4b25ec40e534d08a35fc9a63ba9ba7826204cf4d561566ea0678f2d865cb7a947814f5e5e436a839d750f2db2e
+MISC metadata.xml 309 BLAKE2B 5c0ca8838e34f1f057ebf663b89556aa87472b51c83ac67cdb5d0b3d6d35f979762fdfef4772918fc05fa11f05826d77a696a02677a005c97e5ec8190ccb6507 SHA512 8573f7c92a989a1752e2e4f94ed32fc915711981664d6a8164987caeebd8fa8d2d2b9f820decbc7ab79c442eb0efa9a9a40bad976d2d3d75ec9efa57cb9ef3f6
diff --git a/dev-db/opendbx/files/opendbx-man-optional.patch b/dev-db/opendbx/files/opendbx-man-optional.patch
new file mode 100644
index 000000000000..c8a55a0ed362
--- /dev/null
+++ b/dev-db/opendbx/files/opendbx-man-optional.patch
@@ -0,0 +1,23 @@
+From 261a864f7c8823093accfe751ef1863d716a4d53 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Manuel=20R=C3=BCger?= <mrueg@gentoo.org>
+Date: Sun, 7 Jul 2019 15:22:16 +0200
+Subject: [PATCH] configure.ac: Make building manpages optional
+
+
+diff --git a/configure.ac b/configure.ac
+index 2f74bf8..5f98de5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -96,7 +96,8 @@ AC_CHECK_PROG([doxygen], [doxygen], [yes], [no])
+ if test "x${db2man}" != xyes; then AC_MSG_RESULT([Warning: docbook man page converter not found - skip generating man pages]); fi
+ if test "x${doxygen}" != xyes; then AC_MSG_RESULT([Warning: doxygen not found - skip generating man pages]); fi
+
+-AM_CONDITIONAL([ENABLEMAN], [test "x${db2man}" = xyes -a "x${doxygen}" = xyes])
++AC_ARG_ENABLE([manpages], [AS_HELP_STRING([--enable-manpages], [build man pages])], [manpages="${enableval}"], [manpages=yes])
++AM_CONDITIONAL([ENABLEMAN], [test "x${db2man}" = xyes -a "x${doxygen}" = xyes -a "x${manpages}" = xyes])
+
+
+ # Build options
+--
+2.21.0
+
diff --git a/dev-db/opendbx/metadata.xml b/dev-db/opendbx/metadata.xml
index 92db6f744243..3b864d715662 100644
--- a/dev-db/opendbx/metadata.xml
+++ b/dev-db/opendbx/metadata.xml
@@ -5,4 +5,7 @@
<email>alicef@gentoo.org</email>
<name>Alice Ferrazzi</name>
</maintainer>
+<use>
+ <flag name="man">Build and install man pages</flag>
+</use>
</pkgmetadata>
diff --git a/dev-db/opendbx/opendbx-1.4.6-r3.ebuild b/dev-db/opendbx/opendbx-1.4.6-r3.ebuild
new file mode 100644
index 000000000000..425a43a399a9
--- /dev/null
+++ b/dev-db/opendbx/opendbx-1.4.6-r3.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="OpenDBX - A database abstraction layer"
+HOMEPAGE="https://www.linuxnetworks.de/doc/index.php/OpenDBX"
+SRC_URI="https://www.linuxnetworks.de/opendbx/download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="firebird +man +mysql oracle postgres sqlite"
+RESTRICT="firebird? ( bindist )"
+
+RDEPEND="mysql? ( dev-db/mysql-connector-c:0= )
+ postgres? ( dev-db/postgresql:* )
+ sqlite? ( dev-db/sqlite:3 )
+ oracle? ( dev-db/oracle-instantclient-basic )
+ firebird? ( dev-db/firebird )"
+DEPEND="${RDEPEND}
+ man? ( app-doc/doxygen
+ app-text/docbook2X )"
+
+REQUIRED_USE="|| ( firebird mysql oracle postgres sqlite )"
+
+PATCHES=( "${FILESDIR}/${PN}-doxy.patch"
+ "${FILESDIR}/${PN}-man-optional.patch" )
+
+pkg_setup() {
+ if use oracle && [[ ! -d ${ORACLE_HOME} ]]
+ then
+ die "Oracle support requested, but ORACLE_HOME not set to a valid directory!"
+ fi
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local backends=""
+
+ use firebird && backends="${backends} firebird"
+ use mysql && backends="${backends} mysql"
+ use oracle && backends="${backends} oracle"
+ use postgres && backends="${backends} pgsql"
+ use sqlite && backends="${backends} sqlite3"
+
+ use mysql && append-cppflags -I/usr/include/mysql
+ use firebird && append-cppflags -I/opt/firebird/include
+ use oracle && append-ldflags -L"${ORACLE_HOME}"/lib
+
+ econf --with-backends="${backends}" --enable-manpages="$(usex man yes no)"
+}
+
+src_compile() {
+ # bug #322221
+ emake -j1
+}
+
+src_install() {
+ emake -j1 install DESTDIR="${D}"
+ dodoc AUTHORS ChangeLog README
+
+ rm -f "${D}"/usr/$(get_libdir)/opendbx/*.{a,la}
+}
diff --git a/dev-db/pgadmin4/Manifest b/dev-db/pgadmin4/Manifest
index 0b139bc21845..4eaf490b0f75 100644
--- a/dev-db/pgadmin4/Manifest
+++ b/dev-db/pgadmin4/Manifest
@@ -1,5 +1,7 @@
+DIST pgadmin4-4.10.tar.gz 22809776 BLAKE2B 70a9857de31721b1cd5816b9e15abf325516f94ad5248f3ce5387cca5081ba96d7fca6c487265960ffac8d63c2fd09c3dea44d24a1cc9f8dbb170bd76d5de545 SHA512 b7f91d85fdc39766a294d9b66e8539f709b99f971726551d013345595161ff017e03505f05a41352575892be9d9622e86f4ccdbac76bcea435e2fb88a690b565
DIST pgadmin4-4.5.tar.gz 22420769 BLAKE2B ae16e34c4cfce0ae78f06321ea1fc34aac0e081df4c0d5906fc4da0c82abb67e374477b8f9a9266d003579eb8887541e4224465ce6eccd86589129e1b3efff24 SHA512 835434612ac2a7ff89fab4c4bed89644e43506491ce12d2b74ffdbc25b33f2ac9ae566c95e886d4b4f8bca6499c40be5f0d776b18bfdcebd44d7ffe3b89deb5f
DIST pgadmin4-4.8.tar.gz 22780924 BLAKE2B 7b64ef8ac3782e9c8207d5938f3638d67ddf5c86ca520afbfb296a824b39411362ca6e9d8b03920e35cca38d1303efe81750e5bfc849cfb363f370da3d25ac44 SHA512 68b35c1091435fbeb39e67c7f93038fcba95cd5ae7098434b5d3afee10595f875ef9fd997934f2bbd93c914bcd5c3c71bd43f032f788e55c5795f5ad63b57cd7
+EBUILD pgadmin4-4.10.ebuild 3548 BLAKE2B eb50e0ba9d541446afbf1a36ec8ecb7f53725a64fcb8e5d22e65483de3912864099084a795d7ea790998c83940e0fc4b7925004860f4b5fbdef485b41f83ab67 SHA512 2c4459777262f3a9a1a83e4b55948e0a7d65bf6f397de732b24ea1f97be0008304f9ca579690a8fd5224aa68e6710d363a3f2a765feb266ccc3ee34f59f424a9
EBUILD pgadmin4-4.5.ebuild 3546 BLAKE2B 63cd5428156c990ab72a6973d4da580b9af519b91d33436457f922a363e868082d7337cf91fddb2508bbacf89ddf3211996e7b6b3563be4e1b6d932d0eb31f8d SHA512 5f33bb279eacbafd1f58a8d952423ed8665cb44a13dcf717d479898251ab294eb87a5961f4a4f039f4b0b8395ed8f26f0ceb2d40eb117121acd078f06e8a59ce
EBUILD pgadmin4-4.8.ebuild 3548 BLAKE2B eb50e0ba9d541446afbf1a36ec8ecb7f53725a64fcb8e5d22e65483de3912864099084a795d7ea790998c83940e0fc4b7925004860f4b5fbdef485b41f83ab67 SHA512 2c4459777262f3a9a1a83e4b55948e0a7d65bf6f397de732b24ea1f97be0008304f9ca579690a8fd5224aa68e6710d363a3f2a765feb266ccc3ee34f59f424a9
MISC metadata.xml 266 BLAKE2B 9d5988ab45f9939f9be5ee7f4b7a9950a3d62252aa0d3e6c953265467428c59fb8c05b2bb72085431b7aa9fc18d31f2b3273e8fdb33443d786b2237db697b7e2 SHA512 9f85990c7ce6a1de5c1067e4781af18bede2d3bd02963a7b2927766b70dbe98d3fb63bb01e19b1cf6e2b77038d9788bf38155b3cc33f9e5ff8430b10a4006325
diff --git a/dev-db/pgadmin4/pgadmin4-4.10.ebuild b/dev-db/pgadmin4/pgadmin4-4.10.ebuild
new file mode 100644
index 000000000000..31cf045d0bf6
--- /dev/null
+++ b/dev-db/pgadmin4/pgadmin4-4.10.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{5,6} )
+PYTHON_REQ_USE="sqlite"
+
+inherit python-single-r1 qmake-utils
+
+DESCRIPTION="GUI administration and development platform for PostgreSQL"
+HOMEPAGE="https://www.pgadmin.org/"
+SRC_URI="mirror://postgresql/pgadmin/${PN}/v${PV}/source/${P}.tar.gz"
+
+LICENSE="POSTGRESQL"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="doc"
+
+RESTRICT="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="${PYTHON_DEPS}
+ dev-qt/qtnetwork:5
+ dev-qt/qtwidgets:5
+"
+
+DEPEND="${COMMON_DEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ >=app-text/htmlmin-0.1.12[${PYTHON_USEDEP}]
+ >=dev-python/Babel-2.3.4[${PYTHON_USEDEP}]
+ >=dev-python/beautifulsoup-4.4.1[${PYTHON_USEDEP}]
+ >=dev-python/blinker-1.4[${PYTHON_USEDEP}]
+ >=dev-python/click-6.6[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-2.2.2-r1[${PYTHON_USEDEP}]
+ >=dev-python/extras-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-0.12.4[${PYTHON_USEDEP}]
+ >=dev-python/flask-babel-0.11.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-babelex-0.9.3[${PYTHON_USEDEP}]
+ >=dev-python/flask-gravatar-0.5.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-htmlmin-1.3.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-login-0.3.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-mail-0.9.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-migrate-2.1.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-paranoid-0.2.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-principal-0.4.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-security-3.0.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-sqlalchemy-2.3.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-wtf-0.14.2[${PYTHON_USEDEP}]
+ >=dev-python/html5lib-1.0.1[${PYTHON_USEDEP}]
+ >=dev-python/itsdangerous-0.24[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.7.3[${PYTHON_USEDEP}]
+ >=dev-python/linecache2-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/markupsafe-0.23[${PYTHON_USEDEP}]
+ >=dev-python/mimeparse-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/passlib-1.7.1[${PYTHON_USEDEP}]
+ >=dev-python/pbr-3.1.1[${PYTHON_USEDEP}]
+ >=dev-python/psutil-5.4.7[${PYTHON_USEDEP}]
+ >=dev-python/psycopg-2.7.4[${PYTHON_USEDEP}]
+ >=dev-python/pyrsistent-0.14.2[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.7.1[${PYTHON_USEDEP}]
+ >=dev-python/python-sqlparse-0.2.4[${PYTHON_USEDEP}]
+ >=dev-python/pytz-2018.3[${PYTHON_USEDEP}]
+ >=dev-python/simplejson-3.13.2[${PYTHON_USEDEP}]
+ >=dev-python/six-1.11.0[${PYTHON_USEDEP}]
+ >=dev-python/speaklater-1.3[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-1.2.5[${PYTHON_USEDEP}]
+ >=dev-python/sshtunnel-0.1.3[${PYTHON_USEDEP}]
+ >=dev-python/werkzeug-0.9.6[${PYTHON_USEDEP}]
+ >=dev-python/wtforms-2.1[${PYTHON_USEDEP}]
+"
+
+S="${WORKDIR}"/${P}/runtime
+
+src_prepare() {
+ cd "${WORKDIR}"/${P} || die
+ default
+}
+
+src_configure() {
+ eqmake5
+}
+
+src_compile() {
+ default
+ if use doc; then
+ cd "${WORKDIR}"/${P} || die
+ emake docs
+ fi
+}
+
+src_install() {
+ dobin pgAdmin4
+
+ cd "${WORKDIR}"/${P} || die
+
+ local APP_DIR=/usr/share/${PN}/web
+ insinto "${APP_DIR}"
+ doins -r web/*
+ cat > "${D}${APP_DIR}"/config_local.py <<-EOF
+ SERVER_MODE = False
+ UPGRADE_CHECK_ENABLED = False
+ EOF
+ python_optimize "${D}${APP_DIR}"
+
+ local CONFIG_DIR="/etc/xdg/pgadmin"
+ dodir "${CONFIG_DIR}"
+ cat > "${D}${CONFIG_DIR}"/pgadmin4.conf <<-EOF
+ [General]
+ ApplicationPath=${APP_DIR}
+ PythonPath=$(python_get_sitedir)
+ EOF
+
+ if use doc; then
+ rm -r docs/en_US/_build/html/_sources || die
+ insinto /usr/share/${PN}/docs/en_US/_build
+ doins -r docs/en_US/_build/html
+ fi
+}
diff --git a/dev-db/pgbadger/Manifest b/dev-db/pgbadger/Manifest
index 15e6d763ae67..649893418cdd 100644
--- a/dev-db/pgbadger/Manifest
+++ b/dev-db/pgbadger/Manifest
@@ -1,5 +1,7 @@
DIST pgbadger-10.0.tar.gz 775322 BLAKE2B 072a3b4c2d2d109734fdbf68ff466e34065a852948ae7961e8ba6a40a6881a98653258ee7b483c2a3c9d2d8238370fd842c9b525a0dd11baf1fbf98a0d322406 SHA512 dd1633f1186069a9d59d271cbf0913cf80bcfa88af8236a194f7580c96c84a3513ca0658628069b38ef43a9c9ca7c5573afb2b35e2b1b6d3526f240c2c673bff
DIST pgbadger-10.3.tar.gz 1645573 BLAKE2B 583ad35f416b6d989996ae48500dcee5734bc4867095abe1eb49be971c6190cf68dd4e127a47163c8ee49400cdf2fcee14645c98f4853b6f66c2bef0db0b83e4 SHA512 f8aac47d92ddb92292c572c47d6d32f1aa673b972b2488eede7fbe0b55feddc6ce0cb1b58994e83b93a5f84fcb5b871c7c080863d17554810cc1c1b8c1e1609a
+DIST pgbadger-11.0.tar.gz 1661028 BLAKE2B d83be01017d69b83cf288b23fe5066d5c691b630ce748fe42b33514346183f7b8f18efceeefe0533e534c669e986c30388a6df5b620ea654ae89b3dc3c08d342 SHA512 167534d61cb28df6cb7eae7efe788d3f6bbad1c614468e905a9b678a76b3a2dfc0eb192b595ac4dc332cd694e820f1603b79d83bc934b7dfe3d226019f6a9c15
EBUILD pgbadger-10.0.ebuild 432 BLAKE2B 42ab8eb5952d04d2ab5ed39ab016c9849821f3e814173a3b7310cd4eeb7f9a1865de5fc332ffa05b7c51c1891881e01157f8011840a4c9478fc3a35e54741b07 SHA512 dd2a897d1741130a35049959bfe636bd522d96fd19ccb447e44f77bcc5ae3b854ab02bee64065992cb3ed4327de3d3f21aa74cb8422f430f4f947f2653a566b4
EBUILD pgbadger-10.3.ebuild 455 BLAKE2B 3c335bdb99af786159c5291af9aaa48791b9ce7005d43a998457eb899cfcc7eaca8a97d165c20c864614b03b59b6638aea2fb04f41c3b18bc06135def2fe362c SHA512 7a6fa03a5f344974c9b6ade8e7c3336fbf71ec8b09f55501ab8143419bba8039c06ca7bb2004327deda7e9c6fcf28c7aa712ed16724b396a122028a633f098fb
+EBUILD pgbadger-11.0.ebuild 455 BLAKE2B 3c335bdb99af786159c5291af9aaa48791b9ce7005d43a998457eb899cfcc7eaca8a97d165c20c864614b03b59b6638aea2fb04f41c3b18bc06135def2fe362c SHA512 7a6fa03a5f344974c9b6ade8e7c3336fbf71ec8b09f55501ab8143419bba8039c06ca7bb2004327deda7e9c6fcf28c7aa712ed16724b396a122028a633f098fb
MISC metadata.xml 413 BLAKE2B 9b4f24620b42d2cf5befbaed7d52ed2e03d4619ebb547d36e207a900fe481a825a5be0a6fac073d7b278076ced053ae9a3c4b5d05597e5fb4d7ea66c1bff7988 SHA512 6bf32dc50ecd2d51d450413500b00773177109ab3ad26d74b458ec902973fa38542dbc65e65fbbe103b4be63589f61c2b9a6ab6ea5492b1954142afc5c2f8f93
diff --git a/dev-db/pgbadger/pgbadger-11.0.ebuild b/dev-db/pgbadger/pgbadger-11.0.ebuild
new file mode 100644
index 000000000000..368c54188f29
--- /dev/null
+++ b/dev-db/pgbadger/pgbadger-11.0.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit perl-module
+
+DESCRIPTION="pgBadger is a PostgreSQL log analyzer."
+HOMEPAGE="https://pgbadger.darold.net/"
+SRC_URI="https://github.com/darold/pgbadger/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="
+ dev-perl/JSON-XS
+ dev-perl/Text-CSV_XS
+"
+RDEPEND="${DEPEND}"
+
+src_test() {
+ prove || die
+}
diff --git a/dev-db/pgbouncer/Manifest b/dev-db/pgbouncer/Manifest
index fc05e0ee870f..869afc913ace 100644
--- a/dev-db/pgbouncer/Manifest
+++ b/dev-db/pgbouncer/Manifest
@@ -2,6 +2,8 @@ AUX logrotate 119 BLAKE2B 7ed90c0272410e5a37411f78aaa446d1688ceb5a5a0cfa652f8ea3
AUX pgbouncer-1.8-dirs.patch 984 BLAKE2B 0e9a3550efad0669e4598513197c50460326f701dae628ae8c9fb201e08ae3f0c5826515c6a884a00f2b0afd048490b16d87f9b3b9cf836ca4c77284cd705334 SHA512 2c9ddd2ae193b032435f97d41e789283ae69d99fefeb3829e80a90be296ccd2a754a9d00e6930985408758dfa3349d65f3c2ddf1f74053424bc8d8d09b2fa0e2
AUX pgbouncer.confd-r1 457 BLAKE2B 0b2e33b57ee33eac42742a8f9fe7c0f090bad53c5d7c29d86fd3047307bd05d62f922fc66a0805ba3396934f6e2e7060f810f1c71c5b07d887edf2763cc0f40d SHA512 0642b12236e944b6b5086b593dfd4a5d7c04c8347fc286835381945a50a421e87805900d63d84d12dcb1fad667fc81f21c8644c63af33388a71048ec6e024ab5
AUX pgbouncer.initd-r2 2204 BLAKE2B 9c417188d4a762906c7631f1ae8fc7c7b8f6c52805acf6bfc12d580c53b2faa4e36b7c0662852feaf78aebcc29498bb8ae441d749a710793508c6950a448862f SHA512 dd9e8f7487affcc46b359e6d07a4c2fd698626d7360d2b2929389bbd7a340059eb27f0e0e9a648b7005c446d65762edbb02b865fa68194ebb822c01fba19fd7e
+DIST pgbouncer-1.10.0.tar.gz 480571 BLAKE2B a0c1dadc48f38cfe0ba2641791b4734da84cfe6674198bb2a8014bc92543850e909d7b4649b99e78d58febaa0f89f62b6694f6333b1111cbd62ff2f22741984d SHA512 8ec9f102b57ca5f92fb689588ec090056ac29f21825400ec67bca413fe076ad50e0b491e65c4cfebc488cc245eb3c88c36db2ee0ba1cb737f35404be0983dd1d
DIST pgbouncer-1.9.0.tar.gz 469300 BLAKE2B 466f171a49ec9ce9be9a9d3208780cfbff956da7c74ec4332c7104ea537cb47a5cfdc0d80bbd96d233769b6f430f1ad99b623caefa2dc93af7ba336dd0f49514 SHA512 b127f4cb60ca5cdf339da76727918f0a3797a3e0a89f8ed6fdcaa80f3391d2c5bb51e19731915775210c0e5070dd611ee2e410c9a947624e45b5cf11aecdacf9
+EBUILD pgbouncer-1.10.0.ebuild 1892 BLAKE2B e4b9d58e27de0d8987f7f2bcb8b2a722e39888c66b97416718e4304bd900a9d35cc396d9c3a5c798e1b7b90565894eb19c67416c7c706f4362dac89bb6d437d1 SHA512 03d92729e095715fbfb09203dd078e2d6e4a6f76862bf672af75362a999bfbdbd28ee502c6c7d39f49c80f9231f0b28906d60a738b3063106b4540e38ab21a2e
EBUILD pgbouncer-1.9.0.ebuild 1893 BLAKE2B be596d0ec72a92b9c4351de0e9ff04b5f5f12e4c53684c12aec583e577ff20729f015890394e7ebeabdbf97ef84bcf6e4bad114b84c59e2ab07bd4ecd73c1013 SHA512 b65617a84baa28abb9c207f1a0567d9267cb936823539d908dcde9735fbb66d3b2619386e74fa8f4222cbba7b09227b03f3d9c2ec2abdfe21316110941a7c56e
MISC metadata.xml 472 BLAKE2B b06a5dca1ee52c85fa1f948c4c8cf6e83c0aba3e0b0bd77672f1585c01d0a2f8ef4d7502e30e9cb658ec3dd3e53560671b69210166c36b4ce888e329f531585b SHA512 b098e87be6194706f462bb93c4bf5425023f7bd90a0ed421a51ea42db98c85ebd77f23eb413f4e271e126ad4404cd0bdf0694f675662c421f7afd8ec0f036b4d
diff --git a/dev-db/pgbouncer/pgbouncer-1.10.0.ebuild b/dev-db/pgbouncer/pgbouncer-1.10.0.ebuild
new file mode 100644
index 000000000000..caae5f40fcfd
--- /dev/null
+++ b/dev-db/pgbouncer/pgbouncer-1.10.0.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit user
+
+DESCRIPTION="Lightweight connection pooler for PostgreSQL"
+HOMEPAGE="https://pgbouncer.github.io"
+SRC_URI="https://pgbouncer.github.io/downloads/files/${PV}/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+c-ares debug doc pam ssl -udns"
+
+# At-most-one-of, one can be enabled but not both
+REQUIRED_USE="?? ( c-ares udns )"
+
+RDEPEND="
+ >=dev-libs/libevent-2.0
+ >=sys-libs/glibc-2.10
+ c-ares? ( >=net-dns/c-ares-1.10 )
+ ssl? ( >=dev-libs/openssl-1.0.1:=[-bindist] )
+ udns? ( >=net-libs/udns-0.1 )
+"
+
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ enewgroup postgres 70
+ enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
+
+ enewuser pgbouncer -1 -1 -1 postgres
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/pgbouncer-1.8-dirs.patch"
+
+ default
+}
+
+src_configure() {
+ # --enable-debug is only used to disable stripping
+ econf \
+ --docdir=/usr/share/doc/${PF} \
+ --enable-debug \
+ $(use_with c-ares cares) \
+ $(use_enable debug cassert) \
+ $(use_with pam) \
+ $(use_with ssl openssl) \
+ $(use_with udns)
+}
+
+src_test() {
+ cd "${S}/test"
+ emake
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS
+ use doc && dodoc doc/*.rst
+
+ newconfd "${FILESDIR}/${PN}.confd-r1" "${PN}"
+ newinitd "${FILESDIR}/${PN}.initd-r2" "${PN}"
+
+ insinto /etc
+ doins etc/pgbouncer.ini
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/logrotate" pgbouncer
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ einfo "Please read the config.txt for Configuration Directives"
+ einfo
+ einfo "For Administration Commands, see:"
+ einfo " man pgbouncer"
+ einfo
+ einfo "By default, PgBouncer does not have access to any database."
+ einfo "GRANT the permissions needed for your application and make sure that it"
+ einfo "exists in PgBouncer's auth_file."
+ fi
+}
diff --git a/dev-db/pgpool2/Manifest b/dev-db/pgpool2/Manifest
index 373c00ada5e0..250c18933171 100644
--- a/dev-db/pgpool2/Manifest
+++ b/dev-db/pgpool2/Manifest
@@ -10,9 +10,9 @@ DIST pgpool-II-3.7.10.tar.gz 3375419 BLAKE2B 96d589e9a3eff631bd4bffdcf321b3b532e
DIST pgpool-II-3.7.8.tar.gz 3337039 BLAKE2B bce75be04d3c37dffecbc0a1f029d6e97f316cc2497de032ccd4862acc6e7ae64f12ffffdb42a99141e548a2cc616ed02d7eef6ca2f63e222fb400cbad72828c SHA512 0f4e337c2307368cfd38f29c63b9267dd3171dc4b9cd2c59cff564295908e2f561230156a5b690e4d87ce4c8b3174d01b081147e7f5d8ff403d3adc8e7cea7e7
DIST pgpool-II-4.0.3.tar.gz 3715976 BLAKE2B c5ecfebc44ee4d6ab8fda5ae0854bb51423252ba518b356a37d3b125bc8f4fac048f6f944fdf9b1ee785aae5ac3eca4c4196adf218bc071dd90b93da5c6e6c08 SHA512 76ffbc8df120d4ef68b761684a1805c0349665375f549cd3a194f7d09b9bbdf70d0824da0cbe975e6d15f850704c4fc7c1a2218f551f88f2ce56f542bdfee9b8
DIST pgpool-II-4.0.5.tar.gz 3768842 BLAKE2B 2756d23db950a037a9203aae41293535de25d11bf9860f509040bf5b483ae5fb9e651c8189ee5f0a9398a45d20d2c54566769945e38c52361c160a1162a8e3af SHA512 897df553dba3a1800adae5d22ed4f4fe210a3013fb533730837591244877eeaf0e4090d1a0c65e189b71798b5c303ea22e2198f6317b54f74f10ba48fa2188c6
-EBUILD pgpool2-3.7.10.ebuild 2642 BLAKE2B 509e1fc0b475bb66aafcb6ab14c28f4b28c9c059fd7421b84b485309a38e95179e0e8d2d523c084442e8ec57d7a01296796c46dc39d3677e00c8d13dc1b28498 SHA512 aab742d98796c688ca0f175512919f97f92f56da56d85370184ceffc00ebfa18fd65cd0ecf9405ce40b8ed6648474986ddbe81464fcb68ffa18cdc23e8a43a51
+EBUILD pgpool2-3.7.10.ebuild 2641 BLAKE2B 7252a96f684c849c1d50977cb635993829bd89d1999509e0107507f4749a4eceb232f99dc1a9b10a6031c4d679cbda8ffa8019d381823f60dddcac25ff74ad45 SHA512 87a163e05550ff44eaac3fd6bc62abdf54fa99ee348b2ebd0c5c9c03cb15a9f89883ac534ea1840bfc7b03425d0187f579aed2ef5a6184ccac16d82f1d53f705
EBUILD pgpool2-3.7.8.ebuild 2639 BLAKE2B 5b6f0fb2a88d981bfdc685fceda7d46be1542c77900553bf1347dc9f33623bc0fa758db6cbe076ae6b40c9c845ce708e6b6fb5f6a773417ac9bb9a89738af496 SHA512 ce5b7248099553db4d31d009e0a7fba2beeb0cb748f28a4c1f6fa934ec27a6f0ef1d488b01e000bf6cface2a2f74b79fb871234a222fca2e98354b69b8574b53
EBUILD pgpool2-4.0.3.ebuild 2645 BLAKE2B e2fefc4fda048aa97559fd0b29c0d9480941b4fe4c7951d6ebc1915c5c1f32faa6029602c19ddee16892cf114deada3cbae13564e4d55c274e687f3e578edb0b SHA512 73ef79cc3f04037ebcfeb6dda1ba082e7b3e80f69e33bc651145fea6288dc8288c977c8cdfaba3b9dc440b52472aa200e71945620d7bea4145a03e23cfd58fca
-EBUILD pgpool2-4.0.5.ebuild 2648 BLAKE2B 95c398868dddee909756512e95fa8953026ac844691626b055f27bb22714f7b865085b3ae82f9b6f519abd4a6ece176d3d77bfd1aece0cbae57650997f208028 SHA512 c2a8402cac1778b07f5e508b6aa82f568e29746c38d4abcd1062c24ae2a6d598b0b057766e5aef6fc43c0180f6b6f072a0db6261ad93d892ed41397eedbaedd0
+EBUILD pgpool2-4.0.5.ebuild 2647 BLAKE2B 982ed1ff3a91307740356fc7255ac9fd5ec8d4f2b673fcb7769058f54c1e1c37aab592e64357c9a9409c1042523ce0e5958efe6973f7117d1dff77480c918ee8 SHA512 688ead657cdb2f9ffbb64e7025d23026c30478a9e283e5c631f98793a5521dda090c36cfa092846d28cf9c8b066058d054f7e87816559c38fe5e4fedb7a65e44
EBUILD pgpool2-9999.ebuild 2723 BLAKE2B 4c593cebf5c8f46ffe83697d500b3bb0151c27a58c1aff005f4668d88ddb35d41ce2b18078cff1bd90b6ea4b2b1010ef40ea313f20595d5e1def107b2bae9cf7 SHA512 5a90ab19128765d850037360b7595338364875a4b17e18d91fff167371a3cf8b0439706388fcbc9a89f54909b5dc4d46129e326acabb1e8dbea488b9b452b5ef
MISC metadata.xml 390 BLAKE2B d6a0560051449e95bb43e81589eee966a477a75d7ec8211ae96b15f2d51ce9555181b8640d9d830f2b42f8159989e9126423c6ccbbc2bf2dd8121f4920a87a16 SHA512 ce26ee116c3c7ff77a771294ed07f38d8f940dc380915c339eb4c543d86fa5bde025ba83e70af2b7bf4a1bef1e51957f151131836855e0dae2e1daed73ffae8d
diff --git a/dev-db/pgpool2/pgpool2-3.7.10.ebuild b/dev-db/pgpool2/pgpool2-3.7.10.ebuild
index 8c538b170823..49283366da97 100644
--- a/dev-db/pgpool2/pgpool2-3.7.10.ebuild
+++ b/dev-db/pgpool2/pgpool2-3.7.10.ebuild
@@ -15,7 +15,7 @@ SRC_URI="https://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 x86"
IUSE="doc libressl memcached pam ssl static-libs"
diff --git a/dev-db/pgpool2/pgpool2-4.0.5.ebuild b/dev-db/pgpool2/pgpool2-4.0.5.ebuild
index a217a62435c1..9641913446b6 100644
--- a/dev-db/pgpool2/pgpool2-4.0.5.ebuild
+++ b/dev-db/pgpool2/pgpool2-4.0.5.ebuild
@@ -15,7 +15,7 @@ SRC_URI="https://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 x86"
IUSE="doc libressl memcached pam ssl static-libs"
diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest
index 65bf105b74d3..022d799edf8c 100644
--- a/dev-db/postgis/Manifest
+++ b/dev-db/postgis/Manifest
@@ -4,8 +4,8 @@ DIST postgis-2.4.7.tar.gz 12831401 BLAKE2B 0069a339cc778a02a008835189b5560ffb172
DIST postgis-2.5.1.tar.gz 16041872 BLAKE2B 589cf7168d3698737a19d817b8efb91695c2c3f63d6c3aa24189d9a37459a28ca8a7db0450aa2d557699f76cd8e3ab1eec198bd332b294d976330fdc9d8a7f60 SHA512 c6c9c8c5befd945614e92d1062df1d753ca8b7fd69b70226065c2dac77a59783b14ece4da994187079b683ee090ba5a79389ba679f22fce8c20a5afc2c8dfca0
DIST postgis-2.5.2.tar.gz 16252761 BLAKE2B 181ecc41e659c1df32392d0dfea9cc081c2a647fd23401b8b0470f99e1136b6b8ed900eaea38afdf87cc801bf13ede4247f9c188fcf0da6782624239c77b434f SHA512 b10781f0b74bad8162c33eb111a6090fba184b45fe5874d22cd3a5b0acfb057f3407c073bc44c9d4cd20ed8c2cb1fbb34480b0cf331340bc8b52580d4eccb819
EBUILD postgis-2.4.6.ebuild 3062 BLAKE2B 54c4f4682a7803a425a590ade547d178aab1a07722d825a10d25a22b77c7e58f21d6aa7b2756ea5faa96bf8ff309dd40cb80b0145333be1407ac7e8fb826e4a8 SHA512 cd36e3462489fcdf97fc5935d6705906342c6ee178502c06918e230308e245fb22141d49889f692c4e6eee251e21ab8d34b1cb88abc4617fc2cf3476a056aacf
-EBUILD postgis-2.4.7.ebuild 3064 BLAKE2B 49d50ffe6855984a43429167b72495d7b4ce7a25e572a17e31d798412879d3cce9606b4c724edefb19bfde200b2ae0e009eed06c744cd45ff6a2509d3a0780b5 SHA512 386d7ca69f4a45277c6b5a9089a922121c55f21ac0fb44eb4ba299001c922920eaa52967af668bb8bd3f39aa67d245eefb4e6759f4e35f46ef9b9b9790a9aa71
+EBUILD postgis-2.4.7.ebuild 3063 BLAKE2B 8da193d2230e2c5a728d7060a0455f6c1f1d10b7aecee82eeddedf79c82dc2af6beaeae6321ec12b44c3c46d95cb930c1d3c592a5b86881ff000057a9a91a217 SHA512 158c9fa49750fefa65a119db84a6f07940a0333d3d3fd328dc0121f473d49695e1b31186754fcf32233c8e5019e5ff9ac7215b2b56076a052f4a762d7d5d7764
EBUILD postgis-2.5.1-r1.ebuild 3044 BLAKE2B ea7dd912c43f34cc13c596cea4f2169475c49d3318d4b5b2456889c52ef503c5300dcfc245220e9eacf8275c4443b6273c25da71f7d77831f888cc8d4f943f41 SHA512 3265db95c4debdf04068eafce9fef15466851b226752d90e6a4ebc8da0edb4f38f101cec4a59e1303700cfcabb0fe9382df25fbb68fe919bd639d61b9d9ba322
-EBUILD postgis-2.5.2.ebuild 3046 BLAKE2B f2664d46785b9bb43bb35a23435649a785893dcbab78161e7afd9f56a8f1daecfe5c4e923f17266e06e560c2bd9113b4cb7858d8322bbc29eb31c33cdb5d809c SHA512 1182ea0a9fdd8430d4d43fc0bcc13825dec8531b6b0be111cdf480c634263b1599cc544630a20cd56073ded452d507fe895b95a5f5987a5df6e8b5bed152015b
+EBUILD postgis-2.5.2.ebuild 3045 BLAKE2B 69afd3e46c1e7f322768b26c9cbf21c289706d922e8723cd8e975e3902acf480da6f19d1c5d0b6d078c20c34e49813f5bf7dddd5b57beedad64ddce99cb66be9 SHA512 5f52737d439cfc1e84857b238516a04cfc25f48e5e48c18d43f27be86676fe3e5114777730860822dadd1353637f54bcdd9e9f1a1f935d74e6997f3253b9a3c6
EBUILD postgis-9999.ebuild 2999 BLAKE2B 258cac486a7405c8c539bb747c1bc50570fc2433cf67b96af7335d04c80cf329cbdd9cfa26b4eb6339bc81a3fa5102459051d6082de719fc116b6379c25c9ba5 SHA512 3789549924568079ae52b48ec5d754dd4eb05d9f7e9104e246a3cb1df3f26b921bb59d82fe97ead03d727415b23e990a65b4e0284fb0a88728bbd650ae4cb767
MISC metadata.xml 779 BLAKE2B 9dfbc86514c5f6e0c859dc41a46890e4f518f23c572786bf340112eadf21b35f5f583a3835f6ba58bef8c99a7ef8483f3a98898d372d1c0e5cc537bb9ecc2b12 SHA512 33ad2ddabf49e97af2cf188f2c0f72e1a936c228b43d8d3637230c43be0df82ec2aa20b63cb5f2385e936c215263fcd009332afe504bc5f30746a387b9b37ada
diff --git a/dev-db/postgis/postgis-2.4.7.ebuild b/dev-db/postgis/postgis-2.4.7.ebuild
index 7248b26049ea..8c52fcf6b707 100644
--- a/dev-db/postgis/postgis-2.4.7.ebuild
+++ b/dev-db/postgis/postgis-2.4.7.ebuild
@@ -17,7 +17,7 @@ HOMEPAGE="http://postgis.net"
SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 x86 ~amd64-linux ~x86-linux"
IUSE="address-standardizer doc gtk static-libs mapbox test topology"
RDEPEND="
diff --git a/dev-db/postgis/postgis-2.5.2.ebuild b/dev-db/postgis/postgis-2.5.2.ebuild
index 23608a5b3b00..910b9060e6fe 100644
--- a/dev-db/postgis/postgis-2.5.2.ebuild
+++ b/dev-db/postgis/postgis-2.5.2.ebuild
@@ -17,7 +17,7 @@ HOMEPAGE="http://postgis.net"
SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 x86 ~amd64-linux ~x86-linux"
IUSE="address-standardizer doc gtk static-libs mapbox test topology"
RDEPEND="