summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /dev-db
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/Manifest.gzbin17113 -> 17127 bytes
-rw-r--r--dev-db/influxdb/Manifest12
-rw-r--r--dev-db/influxdb/influxdb-1.8.3.ebuild515
-rw-r--r--dev-db/kdb/Manifest2
-rw-r--r--dev-db/kdb/kdb-3.2.0.ebuild2
-rw-r--r--dev-db/libdbi/Manifest1
-rw-r--r--dev-db/libdbi/files/dbi.pc.in10
-rw-r--r--dev-db/mariadb-connector-c/Manifest2
-rw-r--r--dev-db/mariadb-connector-c/mariadb-connector-c-3.1.11.ebuild89
-rw-r--r--dev-db/mariadb-connector-odbc/Manifest2
-rw-r--r--dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.6.ebuild2
-rw-r--r--dev-db/mariadb/Manifest61
-rw-r--r--dev-db/mariadb/files/mariadb-10.3-CVE-2020-15180.patch75
-rw-r--r--dev-db/mariadb/files/mariadb-10.4-CVE-2020-15180.patch62
-rw-r--r--dev-db/mariadb/files/my.cnf-5.5149
-rw-r--r--dev-db/mariadb/files/my.cnf-5.6-r1142
-rw-r--r--dev-db/mariadb/mariadb-10.1.38-r2.ebuild892
-rw-r--r--dev-db/mariadb/mariadb-10.1.45-r1.ebuild925
-rw-r--r--dev-db/mariadb/mariadb-10.1.46.ebuild925
-rw-r--r--dev-db/mariadb/mariadb-10.2.32-r3.ebuild (renamed from dev-db/mariadb/mariadb-10.2.32-r2.ebuild)3
-rw-r--r--dev-db/mariadb/mariadb-10.2.34.ebuild (renamed from dev-db/mariadb/mariadb-10.2.33.ebuild)0
-rw-r--r--dev-db/mariadb/mariadb-10.2.35.ebuild1018
-rw-r--r--dev-db/mariadb/mariadb-10.2.36.ebuild1018
-rw-r--r--dev-db/mariadb/mariadb-10.3.23-r3.ebuild (renamed from dev-db/mariadb/mariadb-10.3.23-r2.ebuild)3
-rw-r--r--dev-db/mariadb/mariadb-10.3.25.ebuild (renamed from dev-db/mariadb/mariadb-10.3.24.ebuild)0
-rw-r--r--dev-db/mariadb/mariadb-10.3.26.ebuild1009
-rw-r--r--dev-db/mariadb/mariadb-10.3.27.ebuild1009
-rw-r--r--dev-db/mariadb/mariadb-10.4.13-r3.ebuild (renamed from dev-db/mariadb/mariadb-10.4.13-r2.ebuild)3
-rw-r--r--dev-db/mariadb/mariadb-10.4.15.ebuild (renamed from dev-db/mariadb/mariadb-10.4.14.ebuild)0
-rw-r--r--dev-db/mariadb/mariadb-10.4.16.ebuild1040
-rw-r--r--dev-db/mariadb/mariadb-10.4.17.ebuild1040
-rw-r--r--dev-db/mariadb/mariadb-10.5.6.ebuild (renamed from dev-db/mariadb/mariadb-10.5.5.ebuild)0
-rw-r--r--dev-db/mariadb/mariadb-10.5.7.ebuild1035
-rw-r--r--dev-db/mariadb/mariadb-10.5.8.ebuild1035
-rw-r--r--dev-db/mariadb/mariadb-5.5.68-r1.ebuild841
-rw-r--r--dev-db/mongodb/Manifest13
-rw-r--r--dev-db/mongodb/files/mongodb-4.2.10-no-compass.patch54
-rw-r--r--dev-db/mongodb/files/mongodb-4.4.1-boost.patch23
-rw-r--r--dev-db/mongodb/files/mongodb-4.4.1-fix-scons.patch33
-rw-r--r--dev-db/mongodb/files/mongodb-4.4.1-no-compass.patch56
-rw-r--r--dev-db/mongodb/files/mongodb-4.4.1-unwind-gcc10.patch12
-rw-r--r--dev-db/mongodb/mongodb-4.0.20.ebuild (renamed from dev-db/mongodb/mongodb-4.0.12.ebuild)28
-rw-r--r--dev-db/mongodb/mongodb-4.2.10.ebuild175
-rw-r--r--dev-db/mongodb/mongodb-4.4.1.ebuild177
-rw-r--r--dev-db/myodbc/Manifest2
-rw-r--r--dev-db/myodbc/myodbc-8.0.22.ebuild118
-rw-r--r--dev-db/mysql-connector-c++/Manifest3
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.22-fix-build.patch322
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.22.ebuild44
-rw-r--r--dev-db/mysql-connector-c/Manifest3
-rw-r--r--dev-db/mysql-connector-c/files/mysql-connector-c-8.0.22-always-build-decompress-utilities.patch22
-rw-r--r--dev-db/mysql-connector-c/mysql-connector-c-8.0.22.ebuild112
-rw-r--r--dev-db/mysql/Manifest10
-rw-r--r--dev-db/mysql/mysql-5.7.31.ebuild6
-rw-r--r--dev-db/mysql/mysql-5.7.32.ebuild1238
-rw-r--r--dev-db/mysql/mysql-8.0.21-r1.ebuild4
-rw-r--r--dev-db/mysql/mysql-8.0.22.ebuild1157
-rw-r--r--dev-db/oracle-instantclient-basic/Manifest9
-rw-r--r--dev-db/oracle-instantclient-basic/files/11.2.0.3-makefile.patch57
-rw-r--r--dev-db/oracle-instantclient-basic/files/tnsnames.ora.sample93
-rw-r--r--dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.4.ebuild199
-rw-r--r--dev-db/oracle-instantclient-basic/oracle-instantclient-basic-12.ebuild4
-rw-r--r--dev-db/oracle-instantclient-jdbc/Manifest5
-rw-r--r--dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.4.ebuild92
-rw-r--r--dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-12.ebuild4
-rw-r--r--dev-db/oracle-instantclient-odbc/Manifest5
-rw-r--r--dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.4.ebuild96
-rw-r--r--dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-12.ebuild4
-rw-r--r--dev-db/oracle-instantclient-sqlplus/Manifest5
-rw-r--r--dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.4.ebuild70
-rw-r--r--dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-12.ebuild4
-rw-r--r--dev-db/oracle-instantclient/Manifest2
-rw-r--r--dev-db/oracle-instantclient/oracle-instantclient-19.6.0.0-r1.ebuild2
-rw-r--r--dev-db/percona-server/Manifest8
-rw-r--r--dev-db/percona-server/percona-server-8.0.20.11-r2.ebuild (renamed from dev-db/percona-server/percona-server-8.0.20.11-r1.ebuild)4
-rw-r--r--dev-db/percona-server/percona-server-8.0.21.12.ebuild1219
-rw-r--r--dev-db/percona-toolkit/Manifest2
-rw-r--r--dev-db/percona-toolkit/percona-toolkit-3.2.1.ebuild51
-rw-r--r--dev-db/percona-xtrabackup/Manifest2
-rw-r--r--dev-db/percona-xtrabackup/metadata.xml4
-rw-r--r--dev-db/pg_activity/Manifest2
-rw-r--r--dev-db/pg_activity/pg_activity-1.6.2.ebuild24
-rw-r--r--dev-db/pg_top/Manifest2
-rw-r--r--dev-db/pg_top/pg_top-4.0.0.ebuild20
-rw-r--r--dev-db/pgadmin4/Manifest2
-rw-r--r--dev-db/pgadmin4/pgadmin4-4.28.ebuild130
-rw-r--r--dev-db/pgbadger/Manifest4
-rw-r--r--dev-db/pgbadger/pgbadger-11.3.ebuild (renamed from dev-db/pgbadger/pgbadger-10.3.ebuild)6
-rw-r--r--dev-db/pgbouncer/Manifest2
-rw-r--r--dev-db/pgbouncer/pgbouncer-1.15.0.ebuild81
-rw-r--r--dev-db/phpmyadmin/Manifest8
-rw-r--r--dev-db/phpmyadmin/phpmyadmin-4.9.6.ebuild (renamed from dev-db/phpmyadmin/phpmyadmin-4.9.5.ebuild)2
-rw-r--r--dev-db/phpmyadmin/phpmyadmin-5.0.3.ebuild (renamed from dev-db/phpmyadmin/phpmyadmin-5.0.2.ebuild)2
-rw-r--r--dev-db/postgis/Manifest4
-rw-r--r--dev-db/postgis/postgis-3.0.3.ebuild135
-rw-r--r--dev-db/postgis/postgis-3.1.0_alpha3.ebuild135
-rw-r--r--dev-db/postgresql/Manifest27
-rw-r--r--dev-db/postgresql/files/postgresql-10.0-icu68.patch12
-rw-r--r--dev-db/postgresql/postgresql-10.15.ebuild (renamed from dev-db/postgresql/postgresql-10.14.ebuild)3
-rw-r--r--dev-db/postgresql/postgresql-11.10.ebuild (renamed from dev-db/postgresql/postgresql-11.9.ebuild)3
-rw-r--r--dev-db/postgresql/postgresql-12.5.ebuild (renamed from dev-db/postgresql/postgresql-12.4.ebuild)3
-rw-r--r--dev-db/postgresql/postgresql-13.1.ebuild (renamed from dev-db/postgresql/postgresql-13.0.ebuild)9
-rw-r--r--dev-db/postgresql/postgresql-9.5.24.ebuild (renamed from dev-db/postgresql/postgresql-9.5.23.ebuild)0
-rw-r--r--dev-db/postgresql/postgresql-9.6.20.ebuild (renamed from dev-db/postgresql/postgresql-9.6.19.ebuild)0
-rw-r--r--dev-db/postgresql/postgresql-9999.ebuild5
-rw-r--r--dev-db/pspg/Manifest12
-rw-r--r--dev-db/pspg/pspg-1.6.5.ebuild15
-rw-r--r--dev-db/pspg/pspg-1.6.8.ebuild15
-rw-r--r--dev-db/pspg/pspg-2.5.5.ebuild17
-rw-r--r--dev-db/pspg/pspg-2.6.6.ebuild17
-rw-r--r--dev-db/pspg/pspg-3.1.5.ebuild (renamed from dev-db/pspg/pspg-2.5.4.ebuild)4
-rw-r--r--dev-db/redis/Manifest7
-rw-r--r--dev-db/redis/files/redis-6.0.9-sharedlua.patch60
-rw-r--r--dev-db/redis/redis-5.0.10.ebuild162
-rw-r--r--dev-db/redis/redis-6.0.9.ebuild (renamed from dev-db/redis/redis-6.0.6.ebuild)14
-rw-r--r--dev-db/sqlcl-bin/Manifest4
-rw-r--r--dev-db/sqlcl-bin/sqlcl-bin-20.3.0.274.1916.ebuild (renamed from dev-db/sqlcl-bin/sqlcl-bin-20.2.0.174.1557.ebuild)21
-rw-r--r--dev-db/sqldeveloper/Manifest2
-rw-r--r--dev-db/sqldeveloper/sqldeveloper-20.2.0.175.1842.ebuild92
-rw-r--r--dev-db/sqlite/Manifest2
-rw-r--r--dev-db/sqlite/sqlite-3.33.0.ebuild2
-rw-r--r--dev-db/tora/Manifest4
-rw-r--r--dev-db/tora/tora-3.2-r1.ebuild4
-rw-r--r--dev-db/tora/tora-9999.ebuild4
124 files changed, 14846 insertions, 4708 deletions
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz
index 4dbd7ff2a952..8644723907c4 100644
--- a/dev-db/Manifest.gz
+++ b/dev-db/Manifest.gz
Binary files differ
diff --git a/dev-db/influxdb/Manifest b/dev-db/influxdb/Manifest
index 840f2203c5c7..18698fc116ca 100644
--- a/dev-db/influxdb/Manifest
+++ b/dev-db/influxdb/Manifest
@@ -87,8 +87,12 @@ DIST github.com%2Fgo-logfmt%2Flogfmt%2F@v%2Fv0.4.0.mod 100 BLAKE2B 2558b7edc2344
DIST github.com%2Fgo-sql-driver%2Fmysql%2F@v%2Fv1.4.1.mod 38 BLAKE2B 198f3a6fb7348bf50286e1dbb067e72ff854b1daedf1d181b643872aab377b930029feeb95d5d6ca21109facde089527a06922b9ea52cdd59ef553d69b984e06 SHA512 21ac6d6f8fd92ccbe09cb30d0dd6a37142907048cc5f9d0574824765918dfd8ccef96b7ceab9dd259f9a95f5c5be566ac00ff4eb3e37ba7c7c98f25b3185baef
DIST github.com%2Fgo-sql-driver%2Fmysql%2F@v%2Fv1.4.1.zip 106521 BLAKE2B c7c61852b093d2b0452e9daf9ab26b83ee6426a9afa4f67abb0e0f98ef28961017f774075f5d90fc05d6de3c26fdf90a1916b426b32a41e2cee8fb0452e21f03 SHA512 023209372d47d4b5279789f581a6f4452aaff1e262ecbdb3fbdc48a0939599e319109b99d1c79414716f1c426c143cc1ce506dcd38f304dd5aa3e9348084628e
DIST github.com%2Fgo-stack%2Fstack%2F@v%2Fv1.8.0.mod 33 BLAKE2B 366a1ff397488b2b1c7e42db8a946bced1eb8d4260a6c177a978eb978e14f89265e7ac1d0bcd77905bc89eb35b68b3ebb028c0dfc67ff71395ab14b62335d16c SHA512 f3dc70dfcf086b785750d5b346ea07d0dc7903937bdbba58eace0fb903e656b02ddf3a1d49b486ac29b1cac9ca9d346e964d55d3a4cc5ee5ae79ac40b24d0cd0
+DIST github.com%2Fgofrs%2Fuuid%2F@v%2Fv3.3.0+incompatible.mod 29 BLAKE2B 5311a22dbbbedd78a98e34293e79fb5443c57774fa9049665943e377fd07984a9316f3ec5c8fb70da9b133c6390d32ab28b97e939f938bfeeef78883cca6fba2 SHA512 8a1ab67bf3555ca17b7efb1042fb6a7d58b225b4186302b0cf289e7b60f9aeaf23e36ff6d4e8da2ed728dcd676cb2f30f0625c430c0b6943dd25ee02d2c27247
+DIST github.com%2Fgofrs%2Fuuid%2F@v%2Fv3.3.0+incompatible.zip 37788 BLAKE2B c23c30419fd55a14451ffcd5b95ac35ff704ad6d1d0d4b3d344c9e3e0afe3adcc619ee2d99630dd9343229a890d8331183806eaf0e012b8597d7a5d285ec3b57 SHA512 2d8bb8c9051997cf18289857515a09c6a5b2475bdb6a54206bfd1cb213d1e3516d50f3fc8879d69174dc5f91b0b81d23e834095684b39d4d850c0aef5321e3fd
DIST github.com%2Fgogo%2Fprotobuf%2F@v%2Fv1.1.1.mod 32 BLAKE2B 939b72a591bc5fbb649c21a95b2c4b3f5d3ade273377f1f89407e55f436e7a863f15d708aabfc5435334500c8cb1e3ba057439c8ec81cfde68c1ec6794c6de6e SHA512 ab6c57ada3b0d1e36c91f3e0f45e573b91a4869f230f02a7e5e3e5a8f7e020bf56c63df1cbdc5b552ef9a4229ab739cf76df7f799091a2efa148ab9e5c12b1c5
DIST github.com%2Fgogo%2Fprotobuf%2F@v%2Fv1.1.1.zip 2461758 BLAKE2B e02c6e6512de9be1410923a6b3eec36a087f8de00e1d1e715a61e6f26a18352db169b1dbec49e3d563e294d8c65c51ca5b55361dff70d1e9e20976e46209209e SHA512 7f9d1d2671c82a1df5f79a154340dd1fa1e92952feb03a1ddaedb1f6cea371bde8d6f7c774a4351aa87abc2646f97891d0beb4d175fe9d51e2f761d37f2699ec
+DIST github.com%2Fgogo%2Fprotobuf%2F@v%2Fv1.3.1.mod 139 BLAKE2B 0c793b0070acfae7ad92de8d8e177d6b9a2519d521bb397da4dc2610927374e4c010db6a4454783556edaabf64e585b00112aea05820874c49f9bb4c4f049fb4 SHA512 232bef55468d9ff66ef7f446d8096a44a0a947533c8665f0f018300b7ec1804a634299a1a6ab64deaa67f1475e9ef68e7be233dc72fb2d9173559800f01af142
+DIST github.com%2Fgogo%2Fprotobuf%2F@v%2Fv1.3.1.zip 2698974 BLAKE2B 5fcb1c66d3fa55efca631fe5def383ec089fab784cad7d6a031ea390463a0c552f5fc4698f7648d271f40fb0ae3eee525f149347bb409c951d15d86b7f560e16 SHA512 c7e2170eda176da203ca64e402c11489c1fd183afd3359742e373927ff228d62e445f5dfc001a471303e1708862998c125ad4c2db86919596297b11cae4aee9e
DIST github.com%2Fgolang%2Ffreetype%2F@v%2Fv0.0.0-20170609003504-e2365dfdc4a0.mod 34 BLAKE2B 55487f18e815e30ee3653a5dcc9370d2cf044641f7cf12c566e165fa173efe9af3ab18fed752dc36ee0fa25ae2e81a5094e18cebaa61d997ae599b9cc3d09bf1 SHA512 a34e950c565fa284163c40712c9f5e53881996c85153f972a78f27a5cdcaebfdbcce60556e173bbef2db32939f1b8721325846b705ef1504a1c5680598343b10
DIST github.com%2Fgolang%2Fgeo%2F@v%2Fv0.0.0-20190916061304-5b978397cfec.mod 38 BLAKE2B 3dd22c8b8c82e80965988cbaf0b8241af2d32273ae0bffc30f3da0522a327ea65f2f93a0496558551f2799ac7fa4cb8f103d80de25ec8def97ba34578bdbce77 SHA512 d7a817fa0adf48e773c941af6f6207d87204e153ddec86cc4bdc9508411fcec5179b4bcd6bdeaacf5512d50afc5f4ae4f5f25354acbd665698e6110ed4e400fe
DIST github.com%2Fgolang%2Fgeo%2F@v%2Fv0.0.0-20190916061304-5b978397cfec.zip 468305 BLAKE2B 6e31468404432f25552cffa1214cc144df2fca016663b506bb1e79e32d444d64b232220a94615f13b503a03fa89fa318799968b8bd04fde2b7ad52beae4d9b6c SHA512 05aa995076c218e0faf316d9443a1fe1f26eee7373846873ea406cafc52e090eda044abd663a3b26258c71edcb2543d597e51eda83fb2d12e3aa4f7246029abd
@@ -135,8 +139,12 @@ DIST github.com%2Finconshreveable%2Fmousetrap%2F@v%2Fv1.0.0.mod 44 BLAKE2B 76458
DIST github.com%2Finconshreveable%2Fmousetrap%2F@v%2Fv1.0.0.zip 3712 BLAKE2B f4f79741bb83862583f51f2ac5e80181eb0e9c2a4578df32f7e24eb98f4f548b99333e0e6a377e03ef701057b01e852e6b710ab885b65170c861bef556863da4 SHA512 e16bd414c1df566a12944e4a99ebd84d2103f0cb3bf8ec312e3de400f20b3eae27845db50672801c10474dbf1dc61d0c2e16e5dcd3c4447681c0b77f9114a411
DIST github.com%2Finfluxdata%2Fflux%2F@v%2Fv0.65.0.mod 2193 BLAKE2B 5915c62df75a52c3605aa6411cc7c69f1658345bd8b75a8e381f188c6da251aa6a0fc55f3044137e39c5980938e387ae48b151e0a3fe862a259ba3ad9a698326 SHA512 14986b3e68f459c9978e6912df35ab1f95eaa16e1554ff7c69b5e63a8dea1b012593bd4c1937abc1361e295ce2abe22be4f3cc1c6a1087c5199d8324999b35fc
DIST github.com%2Finfluxdata%2Fflux%2F@v%2Fv0.65.0.zip 4038797 BLAKE2B cd8b4c94eab6afa533893f40c1ccad089245d8980e97edd252ce703c19ef9560f5b50f3dd72dec94773150d81abefebb778be0785c3a4a93e7af783f488cf153 SHA512 5629f4165ad6f3252d8c9ede02aa321bf1e3fb2ae261e3fb364cde6054a1b90a592463c9c520a882dc76fa548a1b63356120eb6be372b9ae996826c2d3f8bd75
+DIST github.com%2Finfluxdata%2Fflux%2F@v%2Fv0.65.1.mod 2172 BLAKE2B d6e003af4680c7a44e6ab883051a17d17adf0a6a47e734203c4e577c8a3b0164d138e5267c99a73ea5825ea36b413a129681dee3a6957c0c304eaa0edf5b9051 SHA512 c64e72f8cf7b727c805c155b9a2725a3eda7d1533a9beb1c95223f1806a41d175c27673cac46005dd6484f9f76737e6b78e0c9b919271cb17330ada932d81a76
+DIST github.com%2Finfluxdata%2Fflux%2F@v%2Fv0.65.1.zip 4038748 BLAKE2B 84677b6783ad148a865deb46dc433c3d85a9054962a2154614b0d32d28a0e251c1c126bc2b7a7842dc5a3bfe273cb98526a39d3520a1d30a2bb962fd5844dc3b SHA512 08c83829fe0605ab72cbd84552681bf6345b16e66a3f5667b23b8fc98a3acf07d458b8e0dba3afb49cc6e526628452deb9eb35fef7900ae66de541cd91ba70e8
DIST github.com%2Finfluxdata%2Finfluxql%2F@v%2Fv1.1.0.mod 38 BLAKE2B 0d8182450446ad0554f17ee1787f1068d4bffde6e80c2b3120d2422ea6066014e9b4e999d884302e48b794edadfe8fe88a70428658d6fd2a90c11183335455e5 SHA512 49d2580a785d3592fbc65e22870eff7bc5624516f955ca362ba8a45f1cb63df1b24e9302b9c041c5470ce110a0487313ab969238598a0afc10b4f0a76a03f9ab
DIST github.com%2Finfluxdata%2Finfluxql%2F@v%2Fv1.1.0.zip 102778 BLAKE2B 2be8899b9fd535b74d8da732942bcf1de0989f8c5647bb6d31c25b4683b70c1829203e6400545089591f67297fde784398df796c838430f729b2cbfe594358a5 SHA512 f8a730981f8fa827d32def5a0eeec481af1404f676a0171c6d040af28775229edf7376db3ec86eb736fafc09d762f32f0a852cd6ea89e986f3b4f1b56ebbdb3c
+DIST github.com%2Finfluxdata%2Finfluxql%2F@v%2Fv1.1.1-0.20200828144457-65d3ef77d385.mod 88 BLAKE2B 33663dfe72c785654946bb76bb663eb3335275d778be681c7c9a653321ba5ca446fb3580b073dc9519578c45eff3728784e2077dd7697ff8923efde17512594c SHA512 e38a910673c951623a2b5d0a2855843fee0b78ccbc547bf8943493f036ae8a1ffc76b42474de9a25755de688d060a8d1be648f0fe81d7a69c831a01b5956ab10
+DIST github.com%2Finfluxdata%2Finfluxql%2F@v%2Fv1.1.1-0.20200828144457-65d3ef77d385.zip 104911 BLAKE2B 330caf027c7f188c47f2b3ec5b6f685eac79e060a37f8548da401c14e8353ec7500710658773dc0cdf9843def4126f2bc105830c66a33cc7a42a28b57d680931 SHA512 3cb9375a8df5381ad0b12ea7fa890103ec5f0f3cd8a3d94bdbad8ca3e74de412df5be054f1938b22146d37076a7fe0316474df058a23ddf06501dece504adbe1
DIST github.com%2Finfluxdata%2Fline-protocol%2F@v%2Fv0.0.0-20180522152040-32c6aa80de5e.mod 43 BLAKE2B fddec34812812262b5b2e9499391dbad71c00fb2546658d031306189207c366ba5f9863735c4a52c09b838f2b052feda55bc8f9e424447905725079f7877ef49 SHA512 f40bb2ea09705727ab3be3b8598b471e32dbcf5a67e64580faae7ac80f8b8504964a30b8d84cdedafcb47577bbe021e73127a2053ce04340c27c00726572edd8
DIST github.com%2Finfluxdata%2Fline-protocol%2F@v%2Fv0.0.0-20180522152040-32c6aa80de5e.zip 7883 BLAKE2B a7d9cec7fc98b9a145f5f44a5697f1a46fd205a3917d97a6336fbee898325b325d637a56f65e0426fe74ec49f93acf6c89b07bbbfe8bd667a5ae48cf37ae7dc8 SHA512 b63f273f0d16f304e3cca2d7e739b91df0ee7f1fa53f409d2daffce3975232b904614d5b6ea7d1595c3fc1a5e9bd76cbbc2254f98e3743f4e7bc510e87711cce
DIST github.com%2Finfluxdata%2Fpromql%2Fv2%2F@v%2Fv2.12.0.mod 198 BLAKE2B e0abd56792debdf075818269c29a5928ea182b7e10792a2bce20f217db64b3922608067c6eb4a87a88c981c44478ea9e2ee3831905c724b103f98170718db37a SHA512 3cc83aabd3742a8dd775077f4c71055ba6a7949a7730af7da6df9e92bfdd7688c02b8c6f0df3f51b22f84a6defeb79040a6f1e9b78becb680358fdefd3e7528a
@@ -158,6 +166,7 @@ DIST github.com%2Fjulienschmidt%2Fhttprouter%2F@v%2Fv1.2.0.mod 43 BLAKE2B 2b7883
DIST github.com%2Fjung-kurt%2Fgofpdf%2F@v%2Fv1.0.3-0.20190309125859-24315acbbda5.mod 35 BLAKE2B c1b6f3da9b37c5e0888f6ae304f7885901fb5f90bd94de7c980b7089d2477ea25f0fecf30b502f55fdb6a8dd7ba49683f33b89d761de0acd0e9ccbeff53a183b SHA512 824e0e8c8fe3985feb5f25c43725d4ff70f577373406b08767795e691f0bb10594dcbba4149e000bcebaf231bca5f72649c0d078b86cd4df38d0805e1939d63c
DIST github.com%2Fjwilder%2Fencoding%2F@v%2Fv0.0.0-20170811194829-b4e1701a28ef.mod 35 BLAKE2B f0ddeabc9200613978b0b4b128326d7af4b21dc542e54e12aee41b36443d0a896dde046adb0c00c7e8adefa91cd296330bf24fc8d2cb322bf2225348ce60a36d SHA512 a06f88a90f2bd8618dd8a2236f1b54d85cbc8a3efbed21d4a3246398eb74f1baf3da40fde8d452441fc45a2fe78abe82d330f28d1a39a9224d0b5c606acfce8b
DIST github.com%2Fjwilder%2Fencoding%2F@v%2Fv0.0.0-20170811194829-b4e1701a28ef.zip 12545 BLAKE2B ef89493f316637d3cff93ffbe4201510c50f4911b73e5a22e50360308dd8e8febfd177cadcc0069f5f3a71804b953d4490160f2922002af3924619d04bbfba0a SHA512 61fe66d38ab2144fb1c2a628499bc0047a0c1e3d103db399236551a2d1ca44bef4873d23cd6bd1c8a6ebdd0ef5b56e0bdb97e74227cc48158178b8339d55524a
+DIST github.com%2Fkisielk%2Ferrcheck%2F@v%2Fv1.2.0.mod 98 BLAKE2B b9d3c55999054ed927f666a43066ccc6758a6c5f550651f43ad5d85b5403c882ee76ac2b2553803d71789da33c60ea41857ed545003072ab6c666dbb77118e00 SHA512 3529b37d770af511a716a612b7fd7fb6a4805d13166e3a6f9378950443f6eceb2f3d95db5a46027437ce55b36e571c75bba72a03769d21ecdc97888019d80a68
DIST github.com%2Fkisielk%2Fgotool%2F@v%2Fv1.0.0.mod 35 BLAKE2B 2f43dcbab430f12316fde243db4bafe24372c74d60874b05917269e249a36660309c23da151db31d89c0d0a8fd0f179e2dd7f386af3ca533c95ef74017609af9 SHA512 86aca37f7f94ada381e0528a535b344c8fdbab9e0dcc7b71d716083501ad3d61db701ee159ccfb5455a351fc18a405301abe798037dd1200f9950bdd805d3dc9
DIST github.com%2Fklauspost%2Fcompress%2F@v%2Fv1.4.0.mod 37 BLAKE2B aee0c04f2b8e92b2b4fb2aed9691b2e55f27eae078ca0d7161866b1f815b14e6b7de03c80c567e6f1407cf9e48606bb097eaa0a26c5b7d46db4a0d18852fd233 SHA512 18830e82c89186889b494ac46cc8c4fb398f3aff5416eb1cec3e3b09af281ebd50bb0e8ac7751f6cd89bb1bab3738a354183ba12eb3ea42aa7dab36177b613ec
DIST github.com%2Fklauspost%2Fcompress%2F@v%2Fv1.4.0.zip 3668965 BLAKE2B b0f7d296a95a332f56ae9a35d5f2b7b1ac593bdf8a6bc18b05e74e0b6e91d03f4002b1d5554ccd5fd628e1310018a57c68c923d111847457dbc9adebd74a989d SHA512 cb90a61838b1ed9799b581d080bac14ff92422dfa5007e0b4230b7c91c5cc255d12a47fad7f08ec6477ecb16b6fc4afdb2074c9d702e924b54c494bb2dc43b3f
@@ -444,6 +453,7 @@ DIST golang.org%2Fx%2Ftime%2F@v%2Fv0.0.0-20190308202827-9d24e82272b4.mod 25 BLAK
DIST golang.org%2Fx%2Ftime%2F@v%2Fv0.0.0-20190308202827-9d24e82272b4.zip 11671 BLAKE2B 0a73cd55380594ca4bac71bee0207b51979e62407ec3c828f975e8091a20e2b9a6cc331dea88cf0ff44ff3a6c7d1cfd2844651acd1d957c0d725de525a58985f SHA512 ccd129fd4ce8e4067d0ad4b164cd8c4fb7ba65d5022bb656dfdb50dd2d467152bb83760f3d94c465b6d4c29c29931c8be6c697e1634ccbab4eb3a53edca7dc4a
DIST golang.org%2Fx%2Ftools%2F@v%2Fv0.0.0-20180525024113-a5b4c53f6e8b.mod 26 BLAKE2B 2a44c2cc034af3473d9a1d4e1c23b0f4542333853bfc0ecbfcf9eacacbb3593b449fcfc94d23f49ccc16e5a844bc72a3462a3e08a5c26194106a64d1f2732e0a SHA512 3c166b18c0ce47a47e95da9eeede63879a92b0205bd4589d554f7bae89699be0efa83e1f5bba8e50f47714ea23e759b07f4543fe06301995d39373da2db16fc0
DIST golang.org%2Fx%2Ftools%2F@v%2Fv0.0.0-20180917221912-90fa682c2a6e.mod 26 BLAKE2B 2a44c2cc034af3473d9a1d4e1c23b0f4542333853bfc0ecbfcf9eacacbb3593b449fcfc94d23f49ccc16e5a844bc72a3462a3e08a5c26194106a64d1f2732e0a SHA512 3c166b18c0ce47a47e95da9eeede63879a92b0205bd4589d554f7bae89699be0efa83e1f5bba8e50f47714ea23e759b07f4543fe06301995d39373da2db16fc0
+DIST golang.org%2Fx%2Ftools%2F@v%2Fv0.0.0-20181030221726-6c7e314b6563.mod 26 BLAKE2B 2a44c2cc034af3473d9a1d4e1c23b0f4542333853bfc0ecbfcf9eacacbb3593b449fcfc94d23f49ccc16e5a844bc72a3462a3e08a5c26194106a64d1f2732e0a SHA512 3c166b18c0ce47a47e95da9eeede63879a92b0205bd4589d554f7bae89699be0efa83e1f5bba8e50f47714ea23e759b07f4543fe06301995d39373da2db16fc0
DIST golang.org%2Fx%2Ftools%2F@v%2Fv0.0.0-20190114222345-bf090417da8b.mod 26 BLAKE2B 2a44c2cc034af3473d9a1d4e1c23b0f4542333853bfc0ecbfcf9eacacbb3593b449fcfc94d23f49ccc16e5a844bc72a3462a3e08a5c26194106a64d1f2732e0a SHA512 3c166b18c0ce47a47e95da9eeede63879a92b0205bd4589d554f7bae89699be0efa83e1f5bba8e50f47714ea23e759b07f4543fe06301995d39373da2db16fc0
DIST golang.org%2Fx%2Ftools%2F@v%2Fv0.0.0-20190206041539-40960b6deb8e.mod 26 BLAKE2B 2a44c2cc034af3473d9a1d4e1c23b0f4542333853bfc0ecbfcf9eacacbb3593b449fcfc94d23f49ccc16e5a844bc72a3462a3e08a5c26194106a64d1f2732e0a SHA512 3c166b18c0ce47a47e95da9eeede63879a92b0205bd4589d554f7bae89699be0efa83e1f5bba8e50f47714ea23e759b07f4543fe06301995d39373da2db16fc0
DIST golang.org%2Fx%2Ftools%2F@v%2Fv0.0.0-20190226205152-f727befe758c.mod 194 BLAKE2B 94f62204dd4fd9b865aca70366a7a7754e2e92ed27591beaf789b268ad272dfb34ca0906d888c608393b4c71bc5c9f975fc86c164528ed7d0390e41b66206ec4 SHA512 8b68acbca48744320e64a70a983a471e9e2fc2249562064b10256269033473fd50264b6544646227fb666f075c4f266df1835ca3f88ee679bb97d34bf62bd195
@@ -536,6 +546,7 @@ DIST influxdb-1.6.4.tar.gz 1510337 BLAKE2B 6bd706101bb2776043d1ce0729276998e090c
DIST influxdb-1.8.0.tar.gz 12064140 BLAKE2B cd3731cbfe5d7b0162dbcd36862bc6efb806e1f345993f5f249992203e6e21ca388e1b86a829333d9da807ee13c577829f27d23071645ad8e98f8da92f388c40 SHA512 d62aa9dc7777d8a1c5d3a9b36937255f783002c762ee3c60bbcb190edb4d4b0f67d99d500f67d726ec4f407b7ca350cb409b58dc6a999648884a286f8160f426
DIST influxdb-1.8.1.tar.gz 12068325 BLAKE2B dcc5a8291188aa8f0c040dbda89fa0bbd1868f54fb92c0d90f053138839ff045c00d9e948aa1087c3b1dfb1532ba8bfda17082c6c82c92412653fe470b7a78a2 SHA512 46a3629b4cff2bee15659f8cbee125900a03f00bbde8ae1e8c7b86692a28028ff6bfdd009fa92887f08df8ef5bb4e51cef88fadfd4c8b3c87c2955bf63a9a866
DIST influxdb-1.8.2.tar.gz 12068366 BLAKE2B 621e0af2d9521f573a730925ff1d8a749b72e1ca2774080b11c4391c4c11a3685e1ca64ed7ea4f508d954d01f0444c787a3884ebdc7a98928d50fe51bbec187e SHA512 d45d96a1efa39f4896724c21be7992a4cd47b5e5eac97fe8b8fde87f4d9c6ed4d89e4a92e5c6957728f73fb58fbf01dbaf28a33b1f179535976aad83239c1f1c
+DIST influxdb-1.8.3.tar.gz 12071669 BLAKE2B fd399378a68e5cf0310c8e5dabf5bd23e7a806da544ccf866dcc8adc6831745ae22a8a21f0165d16b6e37680aa812ba7698805015e4ff58e1e8d3db704a03b3e SHA512 e914d9484c3dbe512659e6097dde5334a9ea03d23434beb07711899cfbf5b15253362d75157310accb555a0059b8522757a60241dbd5513dfe11a6886f760c83
DIST rsc.io%2Fbinaryregexp%2F@v%2Fv0.2.0.mod 36 BLAKE2B 61110bed2b9e99e0250cf6e8b842257202c89b3462edf9368b73cab29f9dbd4dcc66c3e290a1d6329b7d62321eecc52082a8c4c0797eac743a29a8a00910a93f SHA512 db50ff677b0bdccbc1a1ad3df7c5cc76f2fcccf3ab99d08d1c2868440eb9b893fe89452f4286f7d42f2f16abf0f4acda67fe86e174dcfa730a743aafcc166774
DIST rsc.io%2Fbinaryregexp%2F@v%2Fv0.2.0.zip 450232 BLAKE2B 2d10520e06557fa00e94a1ccd80b9b937bcaf404f81f853a020eed606c7a297db037baf784518e060604319ba5454423e4995ab005be18ae1398c5ef16f24719 SHA512 0a15b90c2a4577cbc298a34f714660e9fdc488b1fb72b33d0ae296cb6f15a691091d5e6d3c801998b9c2b7236b163118577b2816316078d613f74cd803947534
DIST rsc.io%2Fpdf%2F@v%2Fv0.1.1.mod 18 BLAKE2B 02f32b5a77e5009f179cf1fdc9acbb977fe219698f19ef41acee8129e0de7ad93b0b39ce82ac1538c82a7cdd33776e270f0acec114716c791727b021a4d3e147 SHA512 f911a889614d9177295952c82f8b4a0942fcbb7b4fca7378c0b98a63ed0e37e1319d51905f906ad08144eb0f3f829a2ccc2af04c2147e60cc2ac1ea8d7dab16f
@@ -546,4 +557,5 @@ EBUILD influxdb-1.8.0-r1.ebuild 25798 BLAKE2B 7bd4ee5a275971954a4a7aa0b8319c38ea
EBUILD influxdb-1.8.0.ebuild 25724 BLAKE2B ebd2c6b119c35826f54845dcde17648d1df3b9f92152c28c800681607dca92efd0a70e2e6207fb53a5571b481b79aec39c42cb807b03242604e5de00f45b2ca4 SHA512 b6a5d24191be1b7c07aa5b2d9f812169ff89bae2fbde42284b2d7e639690a27d2fd7de7021c9c2452f60b92ef50ee641462d132c165eea4793f7f27452dbd026
EBUILD influxdb-1.8.1.ebuild 25804 BLAKE2B 2a9aee0d99c71cc12559c872de77696aa56517b8e06d1a3b0424413f9bf6139bd96bdb748dae092b548e373d9ddbcd4c461c7bc3ea97295dbedece2095e73343 SHA512 543ac5d915046458fed28707ba1c9af77bc4d139c260c72d3b8e099002912421fcecd364b566cfcc900d1ab4a8217143a63d7d006d909378bc6c11b92668ce65
EBUILD influxdb-1.8.2.ebuild 25785 BLAKE2B a3950ee69b7cfff80d8be982629da12d60e94807b3d5afb94c176dc703688b0a3774bee7103399a9527c27899b50a4baab60a7d64eb1ed9a8b1111841f657e8b SHA512 fcf6dd0e9d507feece293c909fe796df381d496737faa08f1dba69fbef481e39bcb2822886f6316ea303187f0624eb5bd6e4f330899d5b221d60a3ba314dd44f
+EBUILD influxdb-1.8.3.ebuild 26078 BLAKE2B b535107cfe5fc9a0692c3e89bcb47af61123792e6372406ba435dc457f42b033d864c4dba58251faadba428c99ed6d33fe7b0cfd3caf7a058c540922060fb92f SHA512 a65125cf0022bc9d67e8619514ee9e0043265dea19c24c197c7045b66870f091304a37f585538ac0b2315af38d5ab3f38d6be72076d0f00f7aa75112b85d7982
MISC metadata.xml 523 BLAKE2B 68689a4f01f7999cdf61d09cfc441f96483699cbbd2543faeaf2d1ceb7961d3c7098e18b78e2fc86ae1d0845bf1077cabb26b94fb4c796a33a20420dec61234b SHA512 f6f16f70b5ab9c58b37c8e126ab6d8f12d727350d301939d8a005c798caa008008666855ab15f2bd47bfa62ffbb2677cd79b88f977f38e6109ee24494966f600
diff --git a/dev-db/influxdb/influxdb-1.8.3.ebuild b/dev-db/influxdb/influxdb-1.8.3.ebuild
new file mode 100644
index 000000000000..8ed8222006ac
--- /dev/null
+++ b/dev-db/influxdb/influxdb-1.8.3.ebuild
@@ -0,0 +1,515 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit go-module systemd
+GIT_COMMIT=563e6c3d1a7a2790763c6289501095dbec19244e
+GIT_BRANCH=1.8
+
+DESCRIPTION="Scalable datastore for metrics, events, and real-time analytics"
+HOMEPAGE="https://www.influxdata.com"
+
+EGO_SUM=(
+ "cloud.google.com/go v0.26.0/go.mod"
+ "cloud.google.com/go v0.34.0/go.mod"
+ "cloud.google.com/go v0.38.0/go.mod"
+ "cloud.google.com/go v0.43.0/go.mod"
+ "cloud.google.com/go v0.44.1/go.mod"
+ "cloud.google.com/go v0.44.2/go.mod"
+ "cloud.google.com/go v0.45.1/go.mod"
+ "cloud.google.com/go v0.46.3/go.mod"
+ "cloud.google.com/go v0.50.0/go.mod"
+ "cloud.google.com/go v0.51.0"
+ "cloud.google.com/go v0.51.0/go.mod"
+ "cloud.google.com/go/bigquery v1.0.1/go.mod"
+ "cloud.google.com/go/bigquery v1.3.0"
+ "cloud.google.com/go/bigquery v1.3.0/go.mod"
+ "cloud.google.com/go/bigtable v1.2.0"
+ "cloud.google.com/go/bigtable v1.2.0/go.mod"
+ "cloud.google.com/go/datastore v1.0.0"
+ "cloud.google.com/go/datastore v1.0.0/go.mod"
+ "cloud.google.com/go/pubsub v1.0.1/go.mod"
+ "cloud.google.com/go/pubsub v1.1.0"
+ "cloud.google.com/go/pubsub v1.1.0/go.mod"
+ "cloud.google.com/go/storage v1.0.0/go.mod"
+ "cloud.google.com/go/storage v1.5.0"
+ "cloud.google.com/go/storage v1.5.0/go.mod"
+ "collectd.org v0.3.0"
+ "collectd.org v0.3.0/go.mod"
+ "dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod"
+ "github.com/BurntSushi/toml v0.3.1"
+ "github.com/BurntSushi/toml v0.3.1/go.mod"
+ "github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod"
+ "github.com/DATA-DOG/go-sqlmock v1.3.3"
+ "github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod"
+ "github.com/OneOfOne/xxhash v1.2.2"
+ "github.com/OneOfOne/xxhash v1.2.2/go.mod"
+ "github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod"
+ "github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc"
+ "github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod"
+ "github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf"
+ "github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod"
+ "github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883"
+ "github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod"
+ "github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db"
+ "github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod"
+ "github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod"
+ "github.com/beorn7/perks v1.0.0"
+ "github.com/beorn7/perks v1.0.0/go.mod"
+ "github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40"
+ "github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod"
+ "github.com/boltdb/bolt v1.3.1"
+ "github.com/boltdb/bolt v1.3.1/go.mod"
+ "github.com/c-bata/go-prompt v0.2.2"
+ "github.com/c-bata/go-prompt v0.2.2/go.mod"
+ "github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod"
+ "github.com/cespare/xxhash v1.1.0"
+ "github.com/cespare/xxhash v1.1.0/go.mod"
+ "github.com/chzyer/logex v1.1.10/go.mod"
+ "github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod"
+ "github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod"
+ "github.com/client9/misspell v0.3.4/go.mod"
+ "github.com/dave/jennifer v1.2.0/go.mod"
+ "github.com/davecgh/go-spew v1.1.0/go.mod"
+ "github.com/davecgh/go-spew v1.1.1"
+ "github.com/davecgh/go-spew v1.1.1/go.mod"
+ "github.com/dgrijalva/jwt-go v3.2.0+incompatible"
+ "github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod"
+ "github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8"
+ "github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod"
+ "github.com/eclipse/paho.mqtt.golang v1.2.0"
+ "github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod"
+ "github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod"
+ "github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod"
+ "github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod"
+ "github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd"
+ "github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod"
+ "github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31"
+ "github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod"
+ "github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod"
+ "github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod"
+ "github.com/go-kit/kit v0.8.0/go.mod"
+ "github.com/go-logfmt/logfmt v0.3.0/go.mod"
+ "github.com/go-logfmt/logfmt v0.4.0/go.mod"
+ "github.com/go-sql-driver/mysql v1.4.1"
+ "github.com/go-sql-driver/mysql v1.4.1/go.mod"
+ "github.com/go-stack/stack v1.8.0/go.mod"
+ "github.com/gofrs/uuid v3.3.0+incompatible"
+ "github.com/gofrs/uuid v3.3.0+incompatible/go.mod"
+ "github.com/gogo/protobuf v1.1.1"
+ "github.com/gogo/protobuf v1.1.1/go.mod"
+ "github.com/gogo/protobuf v1.3.1"
+ "github.com/gogo/protobuf v1.3.1/go.mod"
+ "github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod"
+ "github.com/golang/geo v0.0.0-20190916061304-5b978397cfec"
+ "github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod"
+ "github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b"
+ "github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod"
+ "github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod"
+ "github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7"
+ "github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod"
+ "github.com/golang/mock v1.1.1/go.mod"
+ "github.com/golang/mock v1.2.0/go.mod"
+ "github.com/golang/mock v1.3.1/go.mod"
+ "github.com/golang/protobuf v1.2.0/go.mod"
+ "github.com/golang/protobuf v1.3.1/go.mod"
+ "github.com/golang/protobuf v1.3.2"
+ "github.com/golang/protobuf v1.3.2/go.mod"
+ "github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db"
+ "github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod"
+ "github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod"
+ "github.com/google/btree v1.0.0"
+ "github.com/google/btree v1.0.0/go.mod"
+ "github.com/google/flatbuffers v1.11.0"
+ "github.com/google/flatbuffers v1.11.0/go.mod"
+ "github.com/google/go-cmp v0.2.0/go.mod"
+ "github.com/google/go-cmp v0.3.0"
+ "github.com/google/go-cmp v0.3.0/go.mod"
+ "github.com/google/go-cmp v0.3.1/go.mod"
+ "github.com/google/go-cmp v0.4.0"
+ "github.com/google/go-cmp v0.4.0/go.mod"
+ "github.com/google/martian v2.1.0+incompatible"
+ "github.com/google/martian v2.1.0+incompatible/go.mod"
+ "github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod"
+ "github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod"
+ "github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod"
+ "github.com/google/renameio v0.1.0/go.mod"
+ "github.com/googleapis/gax-go/v2 v2.0.4/go.mod"
+ "github.com/googleapis/gax-go/v2 v2.0.5"
+ "github.com/googleapis/gax-go/v2 v2.0.5/go.mod"
+ "github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1"
+ "github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod"
+ "github.com/hashicorp/golang-lru v0.5.0/go.mod"
+ "github.com/hashicorp/golang-lru v0.5.1/go.mod"
+ "github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod"
+ "github.com/inconshreveable/mousetrap v1.0.0"
+ "github.com/inconshreveable/mousetrap v1.0.0/go.mod"
+ "github.com/influxdata/flux v0.65.1"
+ "github.com/influxdata/flux v0.65.1/go.mod"
+ "github.com/influxdata/influxql v1.1.0"
+ "github.com/influxdata/influxql v1.1.0/go.mod"
+ "github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385"
+ "github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod"
+ "github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e"
+ "github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod"
+ "github.com/influxdata/promql/v2 v2.12.0/go.mod"
+ "github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6"
+ "github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod"
+ "github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9"
+ "github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod"
+ "github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368"
+ "github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod"
+ "github.com/json-iterator/go v1.1.6/go.mod"
+ "github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod"
+ "github.com/jstemmer/go-junit-report v0.9.1"
+ "github.com/jstemmer/go-junit-report v0.9.1/go.mod"
+ "github.com/jsternberg/zap-logfmt v1.0.0"
+ "github.com/jsternberg/zap-logfmt v1.0.0/go.mod"
+ "github.com/jtolds/gls v4.20.0+incompatible"
+ "github.com/jtolds/gls v4.20.0+incompatible/go.mod"
+ "github.com/julienschmidt/httprouter v1.2.0/go.mod"
+ "github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod"
+ "github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef"
+ "github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod"
+ "github.com/kisielk/errcheck v1.2.0/go.mod"
+ "github.com/kisielk/gotool v1.0.0/go.mod"
+ "github.com/klauspost/compress v1.4.0"
+ "github.com/klauspost/compress v1.4.0/go.mod"
+ "github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5"
+ "github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod"
+ "github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6"
+ "github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod"
+ "github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada"
+ "github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod"
+ "github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod"
+ "github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod"
+ "github.com/kr/pretty v0.1.0"
+ "github.com/kr/pretty v0.1.0/go.mod"
+ "github.com/kr/pty v1.1.1/go.mod"
+ "github.com/kr/text v0.1.0"
+ "github.com/kr/text v0.1.0/go.mod"
+ "github.com/lib/pq v1.0.0"
+ "github.com/lib/pq v1.0.0/go.mod"
+ "github.com/mattn/go-colorable v0.0.9"
+ "github.com/mattn/go-colorable v0.0.9/go.mod"
+ "github.com/mattn/go-isatty v0.0.4"
+ "github.com/mattn/go-isatty v0.0.4/go.mod"
+ "github.com/mattn/go-runewidth v0.0.3"
+ "github.com/mattn/go-runewidth v0.0.3/go.mod"
+ "github.com/mattn/go-sqlite3 v1.11.0"
+ "github.com/mattn/go-sqlite3 v1.11.0/go.mod"
+ "github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104"
+ "github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod"
+ "github.com/matttproud/golang_protobuf_extensions v1.0.1"
+ "github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod"
+ "github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod"
+ "github.com/modern-go/reflect2 v1.0.1/go.mod"
+ "github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae"
+ "github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod"
+ "github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod"
+ "github.com/opentracing/opentracing-go v1.0.2/go.mod"
+ "github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947"
+ "github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod"
+ "github.com/paulbellamy/ratecounter v0.2.0"
+ "github.com/paulbellamy/ratecounter v0.2.0/go.mod"
+ "github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f"
+ "github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod"
+ "github.com/philhofer/fwd v1.0.0"
+ "github.com/philhofer/fwd v1.0.0/go.mod"
+ "github.com/pierrec/lz4 v2.0.5+incompatible"
+ "github.com/pierrec/lz4 v2.0.5+incompatible/go.mod"
+ "github.com/pkg/errors v0.8.0/go.mod"
+ "github.com/pkg/errors v0.8.1"
+ "github.com/pkg/errors v0.8.1/go.mod"
+ "github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5"
+ "github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod"
+ "github.com/pmezard/go-difflib v1.0.0"
+ "github.com/pmezard/go-difflib v1.0.0/go.mod"
+ "github.com/prometheus/client_golang v0.9.1/go.mod"
+ "github.com/prometheus/client_golang v1.0.0"
+ "github.com/prometheus/client_golang v1.0.0/go.mod"
+ "github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod"
+ "github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90"
+ "github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod"
+ "github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4"
+ "github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod"
+ "github.com/prometheus/common v0.4.1/go.mod"
+ "github.com/prometheus/common v0.6.0"
+ "github.com/prometheus/common v0.6.0/go.mod"
+ "github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod"
+ "github.com/prometheus/procfs v0.0.2"
+ "github.com/prometheus/procfs v0.0.2/go.mod"
+ "github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52"
+ "github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod"
+ "github.com/rogpeppe/go-internal v1.3.0/go.mod"
+ "github.com/segmentio/kafka-go v0.1.0/go.mod"
+ "github.com/segmentio/kafka-go v0.2.0"
+ "github.com/segmentio/kafka-go v0.2.0/go.mod"
+ "github.com/sergi/go-diff v1.0.0"
+ "github.com/sergi/go-diff v1.0.0/go.mod"
+ "github.com/sirupsen/logrus v1.2.0/go.mod"
+ "github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d"
+ "github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod"
+ "github.com/smartystreets/goconvey v1.6.4"
+ "github.com/smartystreets/goconvey v1.6.4/go.mod"
+ "github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72"
+ "github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod"
+ "github.com/spf13/cast v1.3.0"
+ "github.com/spf13/cast v1.3.0/go.mod"
+ "github.com/spf13/cobra v0.0.3"
+ "github.com/spf13/cobra v0.0.3/go.mod"
+ "github.com/spf13/pflag v1.0.3"
+ "github.com/spf13/pflag v1.0.3/go.mod"
+ "github.com/stretchr/objx v0.1.0/go.mod"
+ "github.com/stretchr/objx v0.1.1/go.mod"
+ "github.com/stretchr/testify v1.2.0/go.mod"
+ "github.com/stretchr/testify v1.2.2/go.mod"
+ "github.com/stretchr/testify v1.3.0/go.mod"
+ "github.com/stretchr/testify v1.4.0"
+ "github.com/stretchr/testify v1.4.0/go.mod"
+ "github.com/tinylib/msgp v1.0.2"
+ "github.com/tinylib/msgp v1.0.2/go.mod"
+ "github.com/willf/bitset v1.1.3"
+ "github.com/willf/bitset v1.1.3/go.mod"
+ "github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6"
+ "github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod"
+ "go.opencensus.io v0.21.0/go.mod"
+ "go.opencensus.io v0.22.0/go.mod"
+ "go.opencensus.io v0.22.2"
+ "go.opencensus.io v0.22.2/go.mod"
+ "go.uber.org/atomic v1.3.2"
+ "go.uber.org/atomic v1.3.2/go.mod"
+ "go.uber.org/multierr v1.1.0"
+ "go.uber.org/multierr v1.1.0/go.mod"
+ "go.uber.org/zap v1.9.1"
+ "go.uber.org/zap v1.9.1/go.mod"
+ "golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod"
+ "golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod"
+ "golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod"
+ "golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5"
+ "golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod"
+ "golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550"
+ "golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod"
+ "golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod"
+ "golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod"
+ "golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod"
+ "golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod"
+ "golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod"
+ "golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod"
+ "golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod"
+ "golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod"
+ "golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod"
+ "golang.org/x/exp v0.0.0-20191227195350-da58074b4299"
+ "golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod"
+ "golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod"
+ "golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod"
+ "golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod"
+ "golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod"
+ "golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod"
+ "golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod"
+ "golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod"
+ "golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod"
+ "golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod"
+ "golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod"
+ "golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f"
+ "golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod"
+ "golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod"
+ "golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod"
+ "golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod"
+ "golang.org/x/mod v0.1.0/go.mod"
+ "golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod"
+ "golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod"
+ "golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod"
+ "golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod"
+ "golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod"
+ "golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod"
+ "golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod"
+ "golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod"
+ "golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod"
+ "golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod"
+ "golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod"
+ "golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod"
+ "golang.org/x/net v0.0.0-20190620200207-3b0461eec859"
+ "golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod"
+ "golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod"
+ "golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553"
+ "golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod"
+ "golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod"
+ "golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod"
+ "golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45"
+ "golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod"
+ "golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod"
+ "golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d"
+ "golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod"
+ "golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod"
+ "golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod"
+ "golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod"
+ "golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod"
+ "golang.org/x/sync v0.0.0-20190423024810-112230192c58"
+ "golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod"
+ "golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e"
+ "golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod"
+ "golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod"
+ "golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod"
+ "golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod"
+ "golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod"
+ "golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod"
+ "golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod"
+ "golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod"
+ "golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod"
+ "golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod"
+ "golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0"
+ "golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod"
+ "golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod"
+ "golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod"
+ "golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod"
+ "golang.org/x/sys v0.0.0-20200107162124-548cf772de50"
+ "golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod"
+ "golang.org/x/text v0.3.0/go.mod"
+ "golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod"
+ "golang.org/x/text v0.3.2"
+ "golang.org/x/text v0.3.2/go.mod"
+ "golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod"
+ "golang.org/x/time v0.0.0-20190308202827-9d24e82272b4"
+ "golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod"
+ "golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod"
+ "golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod"
+ "golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod"
+ "golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod"
+ "golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod"
+ "golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod"
+ "golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod"
+ "golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod"
+ "golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod"
+ "golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod"
+ "golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod"
+ "golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod"
+ "golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod"
+ "golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod"
+ "golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod"
+ "golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod"
+ "golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod"
+ "golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod"
+ "golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod"
+ "golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod"
+ "golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod"
+ "golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod"
+ "golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod"
+ "golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod"
+ "golang.org/x/tools v0.0.0-20200108203644-89082a384178"
+ "golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod"
+ "golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod"
+ "golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod"
+ "golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543"
+ "golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod"
+ "gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod"
+ "gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod"
+ "gonum.org/v1/gonum v0.6.0"
+ "gonum.org/v1/gonum v0.6.0/go.mod"
+ "gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod"
+ "gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0"
+ "gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod"
+ "gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod"
+ "google.golang.org/api v0.4.0/go.mod"
+ "google.golang.org/api v0.7.0/go.mod"
+ "google.golang.org/api v0.8.0/go.mod"
+ "google.golang.org/api v0.9.0"
+ "google.golang.org/api v0.9.0/go.mod"
+ "google.golang.org/api v0.13.0/go.mod"
+ "google.golang.org/api v0.14.0/go.mod"
+ "google.golang.org/api v0.15.0"
+ "google.golang.org/api v0.15.0/go.mod"
+ "google.golang.org/appengine v1.1.0/go.mod"
+ "google.golang.org/appengine v1.4.0/go.mod"
+ "google.golang.org/appengine v1.5.0/go.mod"
+ "google.golang.org/appengine v1.6.1/go.mod"
+ "google.golang.org/appengine v1.6.5"
+ "google.golang.org/appengine v1.6.5/go.mod"
+ "google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod"
+ "google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod"
+ "google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod"
+ "google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod"
+ "google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod"
+ "google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod"
+ "google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod"
+ "google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod"
+ "google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod"
+ "google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod"
+ "google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod"
+ "google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod"
+ "google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod"
+ "google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f"
+ "google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod"
+ "google.golang.org/grpc v1.19.0/go.mod"
+ "google.golang.org/grpc v1.20.1/go.mod"
+ "google.golang.org/grpc v1.21.1"
+ "google.golang.org/grpc v1.21.1/go.mod"
+ "google.golang.org/grpc v1.23.0/go.mod"
+ "google.golang.org/grpc v1.26.0"
+ "google.golang.org/grpc v1.26.0/go.mod"
+ "gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod"
+ "gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod"
+ "gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127"
+ "gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod"
+ "gopkg.in/errgo.v2 v2.1.0/go.mod"
+ "gopkg.in/yaml.v2 v2.2.1/go.mod"
+ "gopkg.in/yaml.v2 v2.2.2"
+ "gopkg.in/yaml.v2 v2.2.2/go.mod"
+ "honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod"
+ "honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod"
+ "honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod"
+ "honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod"
+ "honnef.co/go/tools v0.0.1-2019.2.3"
+ "honnef.co/go/tools v0.0.1-2019.2.3/go.mod"
+ "rsc.io/binaryregexp v0.2.0"
+ "rsc.io/binaryregexp v0.2.0/go.mod"
+ "rsc.io/pdf v0.1.1/go.mod"
+ )
+go-module_set_globals
+SRC_URI="https://github.com/influxdata/influxdb/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${EGO_SUM_SRC_URI}"
+
+LICENSE="MIT BSD Apache-2.0 EPL-1.0 MPL-2.0 BSD-2 ISC"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="man"
+
+BDEPEND="man? (
+ app-text/asciidoc
+ app-text/xmlto
+)"
+COMMON_DEPEND="
+ acct-group/influxdb
+ acct-user/influxdb"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}"
+
+src_compile() {
+ GOBIN="${S}/bin" \
+ go install \
+ -ldflags="-X main.version=${PV}
+ -X main.branch=${GIT_BRANCH}
+ -X main.commit=${GIT_COMMIT}" \
+ ./... || die "compile failed"
+ use man && emake -C man build
+}
+
+src_install() {
+ dobin bin/influx*
+ dodoc *.md
+ use man && doman man/*.1
+ insinto /etc/influxdb
+ newins etc/config.sample.toml influxdb.conf
+ insinto /etc/logrotate.d
+ newins scripts/logrotate influxdb
+ systemd_dounit scripts/influxdb.service
+
+ newconfd "${FILESDIR}"/influxdb.confd influxdb
+ newinitd "${FILESDIR}"/influxdb.initd influxdb
+ keepdir /var/log/influxdb
+ fowners influxdb:influxdb /var/log/influxdb
+}
+
+src_test() {
+ go test ./tests || die
+}
diff --git a/dev-db/kdb/Manifest b/dev-db/kdb/Manifest
index bd0acd350c86..dd213d7fec54 100644
--- a/dev-db/kdb/Manifest
+++ b/dev-db/kdb/Manifest
@@ -1,5 +1,5 @@
AUX kdb-3.2.0-build-w-pg12.patch 1372 BLAKE2B 7db0095bfa7f1071dad6f58ee958f4501a1e14f8ca74fb504b2757892a9ff0daff9641b23d24d7b1e30c584d4afaa2958f069196503de18f0766e46328259f6b SHA512 0b89bec94bf4649dee63937d0dc3627f50d7afe65ceb4ea5efbceae05b92dc033c4ee72cfe210f949ad508f15befbad66459eb9ee7d50552f2b8cd675d753743
AUX kdb-3.2.0-cmake-pg12.patch 1094 BLAKE2B 4857bcef303533fdb57bf3d19b8881f872f3ae75a7519a6b7b9dea6ff5d4801c9be3b5850ef17af2695baf493cbc3fa0b110775e8914d0ec217a786aac406bac SHA512 d380ec8f779349fc854cf09d5098d1f8548572bca8001771db3f74560bce13575fee087515b7b28925d6eddbcad36fd98255009c4ae39f5c4d01d8c3ba44d06d
DIST kdb-3.2.0.tar.xz 650180 BLAKE2B 306152b37c2ecc670d26a2df2ae8acb950505ecb37c4994f4debd1b80c8b2ee94252658fe28b59255d9ad0d350375171f3b43dc9e94949417c3aa9ed167134fe SHA512 7df22f2c5b6e20ae3de71cb6c76b234d2f1f33b2abcdffa85be313c63d067a40a85ed102b6256207315db08ced5d69f8bc40afdf84a188463713a6b2ffdb2df7
-EBUILD kdb-3.2.0.ebuild 1316 BLAKE2B 49ac4ff6cc7d4dcab60b5ae098f1da90c97931e060050dcfdd35b46e9e7a0508cd06794be47fc03ed6e6a342ccbbb4daa233db29daa7b9f030599f01e834af1b SHA512 a9e80239f052092480bd5deb54e70da21f045207a746335ed4a1b6b1cb99453470a318af77c0bcf4636a077b1651e61541ef2288ca0d84ae8b54736512d046fa
+EBUILD kdb-3.2.0.ebuild 1318 BLAKE2B c6a6b79a813de768acfba848f1851b74b2625442f129f09d3b5a90a19e9a0b395cc8fae8b501e4aed1634cb13db91da378fb7a31014ca4a0d971e45539dada6c SHA512 fd70007ee8261d109d691e6c9e477f331c0ddca312620e96875acfcf75fc47e848567d7e85a8704fe02277198e1dfc663659537c5d80b03442c816e55cc6167a
MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3
diff --git a/dev-db/kdb/kdb-3.2.0.ebuild b/dev-db/kdb/kdb-3.2.0.ebuild
index b96351cf4d17..7cc1fe102366 100644
--- a/dev-db/kdb/kdb-3.2.0.ebuild
+++ b/dev-db/kdb/kdb-3.2.0.ebuild
@@ -5,7 +5,7 @@ EAPI=7
ECM_QTHELP="true"
ECM_TEST="true"
-PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_COMPAT=( python3_{6,7,8,9} )
KFMIN=5.60.0
QTMIN=5.12.3
inherit ecm kde.org python-any-r1
diff --git a/dev-db/libdbi/Manifest b/dev-db/libdbi/Manifest
index 3e384a2c304d..3c61ae7f4ad8 100644
--- a/dev-db/libdbi/Manifest
+++ b/dev-db/libdbi/Manifest
@@ -1,4 +1,3 @@
-AUX dbi.pc.in 244 BLAKE2B b42f4a78c39034fe1ff4f2cf1ffc8bd252eb17e68dc50e03fd47ecd9838c37d00d5c4eb4a4b5ae5b3dd66ad63ba2c313923203b5514bf1161e405cd21e4fa4ce SHA512 6865b37e8d84d7a95b0ae482d9b1cb486ab7abbe726e699099ea4368d418f64b6d8cb02ecd4d1473f643aa5d715c57817a9496bd8950461921d5db4ff4272ef9
AUX libdbi-0.9.0-doc-build-fix.patch 662 BLAKE2B 652bdba6b0e9b04bee87f48f0db1fba774bf153bd73f925b3d1111823c14e82ccf3202f8023736e3b0a91e00c28c6aca14ca5ffcad3126723c7f02cbc30a7049 SHA512 db18d3697be13ef416914843d0933caead3b1f57c13790373ec435318212f0ccfb599514f8bd6f1c603e09f13bd526b62322ff92e68512e43020b31f8d0dec55
DIST libdbi-0.9.0.tar.gz 1194284 BLAKE2B 36ee5d9ec0a9b088735173cfa9a85e30ee595d6781aafeb994271e7745d259dbe983bea037182c471dc35ae36486a5fb8690e9c716e2e08a4a3964d90abd64f0 SHA512 ee8777195af43057409d051a6055ec0467cd926d48da076458b09f91d2f0995a1cc4bc071762e401b7bdcd8a4173fd8ea3472db3a1518e34b4c5b5ed24e4e2ce
EBUILD libdbi-0.9.0.ebuild 1205 BLAKE2B 83b3fe6b73d9fe7753f55f480f9f4d26bc5795ac8409c29282a5b499de594461be8ee243bcb3e573c66f7cc017f8f9e307d55f82bd68230e5ed039fa71d7fba9 SHA512 0df73652fd32c98ef8184d0490880a3abfa707d82d025e1083d9f2cb42ed32a771ee632b59bebcd8ef57ca685c65d8fc4fd6bfe809ae1d77097df496fa1c3c5a
diff --git a/dev-db/libdbi/files/dbi.pc.in b/dev-db/libdbi/files/dbi.pc.in
deleted file mode 100644
index a0144549db9b..000000000000
--- a/dev-db/libdbi/files/dbi.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@/dbi
-
-Name: libdbi
-Description: database-independent abstraction layer in C
-Version: @VERSION@
-Libs: -L${libdir} -ldbi
-Cflags: -I${includedir} -I${includedir}/dbi
diff --git a/dev-db/mariadb-connector-c/Manifest b/dev-db/mariadb-connector-c/Manifest
index bdaf79b1e9eb..bbb6978c9949 100644
--- a/dev-db/mariadb-connector-c/Manifest
+++ b/dev-db/mariadb-connector-c/Manifest
@@ -1,8 +1,10 @@
AUX gentoo-layout-3.0.patch 311 BLAKE2B 4c2f0ae8aa53d605bcaf134274d3b549ec970b43cc68eed1ac71cf089c9fa32a1343d7ebfdf428e7f25032f5782aecfb86fb8f78528ffc708ab15dc7285a24e7 SHA512 4d5a48b4dd66aab04ba597b30e96b4601c6745acca21be1daf051ba6ce1e8fef1a0efa46d8e81da1ecdc893a8ee471bd8c7ed0c5436ee33b8b4f7cd18fdca1a5
AUX mariadb-connector-c-3.1.3-fix-pkconfig-file.patch 616 BLAKE2B 650c5a794da6d3d0095a823917704d52a5f16c349ce7017b93b1bebfec01287929470a89a2e4aec2f9f7cd5135368e43f2a2e89257c0d7042b878e1806ede8aa SHA512 fe621abedaf81d1fa367c52f69ccce1765757db8d9f412aa40b440d7e51d4de3785a90150e76893f7066b1ba656eb1bad020465e58adae13f08245b839bde4de
DIST mariadb-connector-c-3.1.10-src.tar.gz 746801 BLAKE2B 5c6c5b46306cd081d28f2e8be81fea5fd92b5dd75aac7711cfe5958f8a493b1bd84e79c96295b584effcd828303b35c0152a28892fe0bbd2994a6738ef62d5a5 SHA512 6b95b54e1c05a81010659d1b143330cbce411e3327e543eb240a4ab378336826c6958983b96beeaaff64836f4c5cc5c48eb8a7be6bb521dcb2bbe15e4048f38a
+DIST mariadb-connector-c-3.1.11-src.tar.gz 752342 BLAKE2B 5bee575bffdceb1eff60b7ba3fa334882cf2b2a12446cd6c52663cc5ce2e179bcd19c8452e9bdae3877ac7e9e08f4f6a974d136170c399439c42e1759d226c84 SHA512 2da3a5e438037dde2b9fafb07c084c742983ff4ce18f06cf7a34836aace5317cdb2ddb1bca63143367f5ae827c988d99ee20e8f598fabdb06190d9e2191eb3f4
DIST mariadb-connector-c-3.1.9-src.tar.gz 745374 BLAKE2B 47c1bf1ffe888f6c2aefdb4661ad8bfe41c527d6ddc2b2aaf8da8003eebce90da420a52143265510ac47f07286d6dbfa27c4d82ce193c23aa928d0b22f83b87a SHA512 cf7cd3a7592a15e2a4800c6a899e6b515ef899f4525c9f5f7d09faafbd72ac5b70a85e1c60119f58d1b5caa0f0f3657a544555bb47cdc22eabe74308c0c4bf42
EBUILD mariadb-connector-c-3.1.10.ebuild 2369 BLAKE2B 31acc451fa0c66ff4551465a7c1cf7940c1e5848e63774d96cd1c64c2dc5b0038cece7900162639fe9dcfdea77c1c17c1deea46b750a4691caf9e5bcc9002bf6 SHA512 8c14a776c521c67f0230058b6d32af6de053081158dcacbdadcbaf741d7faaa07945fbada968040acd961b1c485e36a1188021eecfcadbf177a97df356ba8a06
+EBUILD mariadb-connector-c-3.1.11.ebuild 2367 BLAKE2B 1b1b52ab3e6ca823233706d34ff5bfcbe79a5a98552e573463e422938d444a9f16e1746daef391df604a3e174343b6598e71b423de7b72c0133eadf6bd292389 SHA512 c74219e2da4baf673f17debbde19fd06bb8ab02703755f8729a9828aed03e423c3243ea53463d73d58731b8e37707ddcd468df61026967d79e9eb032d593b538
EBUILD mariadb-connector-c-3.1.9.ebuild 2343 BLAKE2B 652296c85beb8bc4e6529e8dcddc19d3448559e446092344ea0b86a9b758c81d56c48b05c6bef3df6f55226a3e410009cea42c86c8bc25e43ba0bd31139ea7ff SHA512 414fc4666d6d16b2572416c7e537e27e96112b876c564076d8d80a40c0303e41b7d0ecf61865aa1a2900fc5df1a809417ef22d71ce849733d609022952c1bce8
EBUILD mariadb-connector-c-9999.ebuild 2369 BLAKE2B 31acc451fa0c66ff4551465a7c1cf7940c1e5848e63774d96cd1c64c2dc5b0038cece7900162639fe9dcfdea77c1c17c1deea46b750a4691caf9e5bcc9002bf6 SHA512 8c14a776c521c67f0230058b6d32af6de053081158dcacbdadcbaf741d7faaa07945fbada968040acd961b1c485e36a1188021eecfcadbf177a97df356ba8a06
MISC metadata.xml 243 BLAKE2B f247f748a23e4cda2f518ad7e4e53b9027ff08ec62289010e6dfc8cd2ad49412430c4095e80f2156c8e6f1226bcda0163b4faae83759550f79e9998928398713 SHA512 7c227a1fadd8d61aae9baabeb5d964c93fe0c4d82fb838c83fe0360cf38b24bebf51037726f13188ecd8f52c335368a693b81e74d79ba949576a6dbcb54887a9
diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-3.1.11.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-3.1.11.ebuild
new file mode 100644
index 000000000000..0d2107eb2b84
--- /dev/null
+++ b/dev-db/mariadb-connector-c/mariadb-connector-c-3.1.11.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+VCS_INHERIT=""
+if [[ "${PV}" == 9999 ]] ; then
+ VCS_INHERIT="git-r3"
+ EGIT_REPO_URI="https://github.com/MariaDB/mariadb-connector-c.git"
+else
+ MY_PN=${PN#mariadb-}
+ MY_PV=${PV/_b/-b}
+ SRC_URI="https://downloads.mariadb.org/f/${MY_PN}-${PV%_beta}/${PN}-${MY_PV}-src.tar.gz?serve -> ${P}-src.tar.gz"
+ S="${WORKDIR%/}/${PN}-${MY_PV}-src"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ppc64 ~s390 ~sparc x86"
+fi
+
+inherit cmake-utils multilib-minimal toolchain-funcs ${VCS_INHERIT}
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config )
+
+MULTILIB_WRAPPED_HEADERS+=(
+ /usr/include/mariadb/mariadb_version.h
+)
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://mariadb.org/"
+LICENSE="LGPL-2.1"
+
+SLOT="0/3"
+IUSE="+curl gnutls kerberos libressl +ssl static-libs test"
+
+RESTRICT="!test? ( test )"
+
+DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ virtual/libiconv:=[${MULTILIB_USEDEP}]
+ curl? ( net-misc/curl:0=[${MULTILIB_USEDEP}] )
+ kerberos? ( || ( app-crypt/mit-krb5[${MULTILIB_USEDEP}]
+ app-crypt/heimdal[${MULTILIB_USEDEP}] ) )
+ ssl? (
+ gnutls? ( >=net-libs/gnutls-3.3.24:0=[${MULTILIB_USEDEP}] )
+ !gnutls? (
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ )
+ )
+ "
+RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}"/gentoo-layout-3.0.patch
+ "${FILESDIR}"/${PN}-3.1.3-fix-pkconfig-file.patch
+)
+
+src_configure() {
+ # bug 508724 mariadb cannot use ld.gold
+ tc-ld-disable-gold
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DWITH_EXTERNAL_ZLIB=ON
+ -DWITH_SSL:STRING=$(usex ssl $(usex gnutls GNUTLS OPENSSL) OFF)
+ -DWITH_CURL=$(usex curl ON OFF)
+ -DWITH_ICONV=ON
+ -DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT:STRING=$(usex kerberos DYNAMIC OFF)
+ -DMARIADB_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DINSTALL_LIBDIR="$(get_libdir)"
+ -DINSTALL_PCDIR="$(get_libdir)/pkgconfig"
+ -DINSTALL_PLUGINDIR="$(get_libdir)/mariadb/plugin"
+ -DINSTALL_BINDIR=bin
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+}
+
+multilib_src_install_all() {
+ if ! use static-libs ; then
+ find "${D}" -name "*.a" -delete || die
+ fi
+}
diff --git a/dev-db/mariadb-connector-odbc/Manifest b/dev-db/mariadb-connector-odbc/Manifest
index ddcb8338113b..13f6e7262487 100644
--- a/dev-db/mariadb-connector-odbc/Manifest
+++ b/dev-db/mariadb-connector-odbc/Manifest
@@ -1,4 +1,4 @@
AUX odbcinst.ini 82 BLAKE2B 7c752f9500f2141886c798d9be4aa2e84ecb089589394c4f473712aba0279f2ff853ebc1ea75b7f007abea18e46289bf06c7408d3d69026faa6b638755c13e70 SHA512 40c056bac44dc5e521ec2e66dd046566f50fd8b2fe0d0d2beacc29a68d9ddbe75f8dfe012ee6957c4e2874d4365dbb096e20faebb2b26371b060c0a9fec205b2
DIST mariadb-connector-odbc-3.1.6-ga-src.tar.gz 536871 BLAKE2B c41f1fb00b5a93b3618d79ee457dc84c8b98e216083ec315870dc2ab46f1f56db345c1a2fae51e78e8b6c42b81183ce9c161ac5a051e52481cd687138f3dadd3 SHA512 ec0e244fc1b62c27f619f0ed3025906b02fc897c75dd74799df396beb5009bfdd27d609b5629ea0e6f5172ca8521b60bf7f3efc6dac44e84e835e4a05273ba3d
-EBUILD mariadb-connector-odbc-3.1.6.ebuild 1687 BLAKE2B f10d044523edab365e7eb1def3224e76994d1c9275ee4a0cab7af01fa07d21396803e108bdd1521b992830f7b40d2a54d880e75f09dbe2793ce7379eed1e47cf SHA512 00b03502377deec9682807b115d25f76aa1659c92bde5e20fc2f529c683d971ae22a42281cf1bdbbddb700d0c68299eb631908dd3c88fbd09c60c2a808e04497
+EBUILD mariadb-connector-odbc-3.1.6.ebuild 1700 BLAKE2B ff213bb689fb6d20754b313eb296da1bbd93d87cb3af978eb87b021321d459f2bfe0354340a370ea88054e509af34ca311924ebad0fac3843491b9bf84fd6ab5 SHA512 0ad3a6f1e594fcdb6248f6eb39cb54a85f4a0c59f05b82b1c2ad4037939a227ef73983a34a01e0c9c40d9b5a2bd038dfcc85d3d91ea6f6121dee5e397ea523b6
MISC metadata.xml 357 BLAKE2B 34eb2ba7fee2d2df8540a6fb2b5407ec249e1a983e348951dc002373288643cc06b7ceb4cd84de8ae770b9e0ced10892fc08fb6d415d803365f60bfcf6948b0b SHA512 40cc14c2f673767be159cadd8da258d273d99e38d96ccd2c2139f8fa424b30c8878ad6aa7d061c76e52cdd77ea42e58c9018e27849887882e9bcb7cd70827e64
diff --git a/dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.6.ebuild b/dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.6.ebuild
index 0ad95ec91dfa..6e710c764084 100644
--- a/dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.6.ebuild
+++ b/dev-db/mariadb-connector-odbc/mariadb-connector-odbc-3.1.6.ebuild
@@ -5,7 +5,7 @@ EAPI=7
CMAKE_ECLASS=cmake
-inherit cmake-multilib
+inherit cmake-multilib flag-o-matic
DESCRIPTION="MariaDB Connector/ODBC"
HOMEPAGE="https://downloads.mariadb.org/connector-odbc/"
diff --git a/dev-db/mariadb/Manifest b/dev-db/mariadb/Manifest
index 99fbbf0cb21d..9f6296dda189 100644
--- a/dev-db/mariadb/Manifest
+++ b/dev-db/mariadb/Manifest
@@ -1,41 +1,54 @@
+AUX mariadb-10.3-CVE-2020-15180.patch 2202 BLAKE2B 4f15d360c02d73cdfb62e231c49ac29fb2d973664ed15b4a68403b131cc1d2f6b4be9089f2022254e03a649699d980b2212a88ec917ca4ae0fa38b1cca55e5c4 SHA512 1e3210cc6f27a9c39ac8300b80f7569617e23a879095e8341d19d1b4b4346f212bd49d706d282fd40e26186a79d659ad28663aae3ef618ddd4fc7f43911af080
+AUX mariadb-10.4-CVE-2020-15180.patch 1654 BLAKE2B 331536012f2e6bacef9f5ab75e93b38517e9807e83f3a47d87c047c8d0afd7e4f4235d99e9e7110880496d2ee7e2c58a3805de79e7febf2fa937cf9458aa4d99 SHA512 9eda36ef838f895fd14539052bf3fcd16a1fedcae27e6d7a5df29ef4c1a6957b850a2d55b39cc7bea2f016b972e611e7952de17aa99fc823cfd701c1b2e8e2be
AUX my.cnf-10.2 140 BLAKE2B 3a56b7e38c3dc00215cae4bdc3270e30e85299d3290c0c995a611e4b8b15e66f40d6ac40ab18369e7863742ab6eda94259be5a7f363a26020c6fce28a7582e94 SHA512 85c650670e364f5f71842d9ab07b59c5de6e26e774e7192102562e56f94ed5f8fbc487cef31c134209c22b72fde38f7f53b7279cead97a8af608436d1ecc8857
-AUX my.cnf-5.5 4823 BLAKE2B 215c2fe765c28a48de1c3315b020a0b2e48aa4fadeefe3c0c8f5ee0a18a304e7822b663889d95d08ff8af02c2c7e405a4f71838f2de6ba522469be7c59950654 SHA512 5120b4ea8b6b5fd72f02a0628fa287df7da30478d0c95d85c482f4b90fdc54349fbaa9d5de1ea79aaef8b26d8bef4d9ab7951d7afdaf483061d55363d9f6b402
-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.38.tar.gz 63535685 BLAKE2B c179ea2f60287c2bc1c0d1c47ae989ac2653a24063e8344cef2f3062fc6798e18b969e8f9aa8287104ce2518e6c644cb8d3a4650b5a0bc5dfde973e76e618955 SHA512 184582f3a902a989ba3d9c4d21288c014c8b469adbbb4cbabc621c5006022cef29baed8c1140ed4476b124da83b76dfa414295ed0c3374be826e75aca953a77b
-DIST mariadb-10.1.45-patches-04.tar.xz 8808 BLAKE2B 79b6ad86665b6ceea990813c1b60937283ccfd572e5aef095df9951fac0a35e10b7cab002a18adcdb4b643a4d881c57ed468a15fc2fe8f0b9755dc07c2c81fc6 SHA512 eba4c39a275a27faec01dcefd36635fb8ed4f9d651e244420ce0856932378196b9daa98c9de339dc84c3e07fb77fda27c2aa46930c741a1c4c53057b4f9b86c6
-DIST mariadb-10.1.45.tar.gz 63673824 BLAKE2B 002aedf61282244905256757fe18eebe67f8a05d45496eee4804e5fba9edf58ece15188d6537ed45245b9342bc514376727c91261ec3f3a3d809c569c84a63de SHA512 708daf6cf98a914ca378e3461f3431f13d6274e20ef37de239e5d90db58215c50bfbc450e6b3b00d847cc819ab9de2bc780831009581e43db38d63397a417ace
-DIST mariadb-10.1.46-patches-01.tar.xz 8824 BLAKE2B b30d1c6625d87605fc934007ebfbd449f327969b1f65bb22a1d432691a3927a3f20c55f646f9a4e8cbdcdcadf16a2518e05441ab0088bac876a81f87bb62b925 SHA512 93ef056f697d83ced4d585c31558dded94667447fc6785ed79b15dbbde4df4a3667cefec1f2007649dd0fed3c1cf86cfe5cf626588678d2a851f8c5f7b3d4092
-DIST mariadb-10.1.46.tar.gz 63741294 BLAKE2B 5a2ca06b7ac14896f874bb18a38dcfb2336d0b77160d3295e9a268ffaa6feec2319a5d4e5985851327f1122fa7650749a09c384eeba5ab9369fce993464702f8 SHA512 a45816edfcfb7f33fc4e316cd19d777069358b7cd0968be23922ffee886e9db8600568425e4d81a0e033a255b6c46441fefa4f5bc5da96579527b481a10a7213
DIST mariadb-10.2.22.tar.gz 71907765 BLAKE2B e7781a9e1bb0becca543ebb0b9e03912fbafa9de45bbd5c7232f92d29b934148dd124ad462bf8aa5aec2e4ee0bf75a03fae5e5fe97a77e1d93095052a577c14b SHA512 cd61d0c2d528b23b975e6ea142560d9b9ebff7ecda6fa9b3659b25b3406e8cc925918f4c3bb0e200ddb8d0520bcaa4d4f70d245b4731896f9ba2f1bdf0a817b2
DIST mariadb-10.2.32-patches-03.tar.xz 6048 BLAKE2B a6f8f25ec23d1d86d228d719927daa9131779239917b86eab9f82086744294c0a4f03b1a73a3baa599e367775457d6c345fa0820b89063b2e6379c0fb7076ad0 SHA512 324804f13f59593d26cc5fd8c1cdeac2f16cf55012ca65b0a7223512920e1ea94619991fdcb3d19184b6428e4a627fec75532c88ae8297f9b8398fcf730058a9
DIST mariadb-10.2.32.tar.gz 73646729 BLAKE2B 581906d67f0aada9e85aec7bfee03ed8927a4e836f0639fa5f31576f5df70ce2b6ed3da0b96ad616f5ed71d7717531a073cb911c6d92274f6724911e086104af SHA512 824aa94724b639337a5b4c2e86a1f5ceaeaa940eb234f852df1ba0aafd64e269335e2aca0b05d52164e090cfd6f7d14477df9e096473aa5d9286d47944a765b4
DIST mariadb-10.2.33-patches-01.tar.xz 6024 BLAKE2B cb4283a36b303b1422d53c454bc6390ce80f3a88c9f9cd459468cf9bff792a1af197a5e5b3f7e45376024ef78bc6049cecafd8654e1b767f741f35129624ab12 SHA512 ebe9c1295089c04e869516f3ef278673986c1227b92bb9cd96cc561b0392f22870200cf58db91fdfe7e113b04b5b6d66c904b2d1353011cbd89723a8ce83fec2
-DIST mariadb-10.2.33.tar.gz 73769891 BLAKE2B d5d564e6c51a6460247b999ae1d58433f15f5c7a4ffe7c676845857036c766aaf24e66cbbbaebc12cc55be97a22a4dec4916551bde65eac043cc036fc9e731b6 SHA512 336184931688beba5733d510db00d05eceb3909f8fcdf198189ea1fa96af6a401aa4f0b9e13e3fb0211f7be6c14aba8d0a9b245bd3c2a173e5b1f930a7a18460
+DIST mariadb-10.2.34.tar.gz 73758617 BLAKE2B e25e4a6ef9916e6ff88d445bb729a5d1a33913a8aef1ecae3d701917f91d091f6f831bf428ab99d9ff7360f600bb98fad57fbc4f053632ba5c33e7cfbc333264 SHA512 ace6132ec5d02c4857e8b30b11697eb9a8ca007d11843d0288a1d5b519c3203658b8b0a01620fdd20297474c577be3f967828077012e5e13e6ee63c30bb4e8b7
+DIST mariadb-10.2.35-patches-01.tar.xz 7232 BLAKE2B d70d348decbea7e823196a16e79c6103fcd52402aff4e8267cfe3f2a518e4cfc6fa8b674c2be16f6a67b7dd23ff0f9a6461f29272a96fb9af923fd655d51fc07 SHA512 1c4e34aba3122f016c08e62d1c6490beb0460cad0538aff180ddf61eae25bb60d21285f0aed59a560ca0e2feded307537d5f91195c7be31122dde230efbbae41
+DIST mariadb-10.2.35.tar.gz 73889979 BLAKE2B c2b60c661fe253d60b74e84a1bf1e185fe7dc9e711d0d934312cc37301d18c506f71fcd8e62c20debff19c47a6c65a8fd7a3fb747d346fe6a6b59ac3ef1b4237 SHA512 5af4c1269bd07ed84b7b6a8ef4f5242d446f9c5e9e29702fb38ae3907ba93fe2e765259fe73448bcaf52728d5bbb96f7da2a8b0783782ae4a05f22992d8b8cf0
+DIST mariadb-10.2.36-patches-01.tar.xz 6032 BLAKE2B d1ca7e8469e0f0b8a14d5f993894cacb1e081a6ea67cde18a6891597ef8590c27b12ff4ea15983089bc23134130e37154be5621cb4ea5884c698df19e29afdf3 SHA512 9b6382e3253a72df32b28f57fa276586eb7c09d79dce33db7b009fff4eb49ae46792e2f13428e53a7e8cb65dbb0d8e07d699ee7ce33b3103ab42243cd285dcd1
+DIST mariadb-10.2.36.tar.gz 73892597 BLAKE2B 610fea30b944e46483f4a9630f8af22afcbcc8b461ce2b13e28b3376271dce8436df9bd771f048fb8af5e0ef9e5e3986be02af742937504e71413710e4f6462d SHA512 0f1ced570a79036fafd318ceaae06de71cfc748b0c99d31487a00f7fcebed993ef7e05614e866f48b1811660a7a4ad7c36d6bb0133bdb0228cc017199f182406
DIST mariadb-10.3.23-patches-03.tar.xz 5520 BLAKE2B 30bc247ed6d97aefaa1ed48f379fc9aab3df3409aa9a108728313c7c69ab0641b69ccb0289eda9539df367f85b2db494473d3836807dfbf60df1e0c832e57369 SHA512 64bff196d1651348d303571fd551a5666d9514c1ee17cd9296b9d420c4b3d7d9b339644a1cad029bae3c35a666b405d471a37846138f2551f3b1b88d99b80844
DIST mariadb-10.3.23.tar.gz 72582611 BLAKE2B 493605519f714cbe87b938f6ca3243d29189adbfcbb33c4e10a4a3f01b08d875f18b96b647dc92566b785c2cef9862ebacfd55954d13ab0a7a745606e40fb6e9 SHA512 535cd2ce80a95b6c0a1aa559cc3275dfcd559c3a4f958fab3382923190a16e6bc5b4ad79acaa518244512ff618568c239c0edef8a701d958362ede19a29c2986
DIST mariadb-10.3.24-patches-01.tar.xz 5508 BLAKE2B c3b75205ecec0b73c85696a3382dd9271d495389f05d1bff66548f5f316f6d5f2ee7204020f265a6dd7ee7c28e1a010d74b056b9c9ab244651ba417e496fb1a9 SHA512 d9d408e6ba08a8a321b9a6e72a6347c4317652e91ade0056ff8621dafbbaf398e33d6b15247e89a2d60b731021d30cba9611356ced2cf848d1807cb3d376c378
-DIST mariadb-10.3.24.tar.gz 72714002 BLAKE2B c25a1546369e8996dea2a4d00022a8a5a4f11727866cb3d377aa534b617b76540fe49871c92d38487b667db68885e7aabe22a7400015f513394f18fdd2899bcd SHA512 cfd0154d984ddc344554cd3df1d02b0811f8e35c90caf745532491688850736d079c67d40e9414daba83f2bd0c06569bfc99213d5280c63cf051c68abd7c56b5
+DIST mariadb-10.3.25.tar.gz 72710424 BLAKE2B 95029946e2ed04368beadf33b42121c612fa9d146e648fd584078e4df88e3c93f6373e1e996817644e06f3b2713a257e3079167434e9227db01dc1a2ad08aad0 SHA512 9504e401db3b65b2b2bd4d3c91a468d357e82fdafbf90d54539a291e46570c2bed66ae047b17b9da95e925f8970fa048d329ba06c2dd6de7d46d5a0f2aad1f4d
+DIST mariadb-10.3.26-patches-01.tar.xz 6720 BLAKE2B 5c7ae688e628bc5831bf4c1680bddbfda8aae33a033444a2a2cc27a920804570c669834779342db21fff1c1c4da3efc689bf5e7b1ee3b058dbac02a68695ab01 SHA512 e906fdb75c6b0baa495c10ffdc2ed4d28851193f123d70b2f8c1f4b0171f1c2cc75c54bad5f511892e542cbc75bad6b01a0e83577094aababcb69145cd9a537b
+DIST mariadb-10.3.26.tar.gz 72867143 BLAKE2B 5ab012e014e855bc5dab9bc5060bdf179fbe0fc67e564e25bb1059a0f19d5c90fa8fb6ccb9482eff6babe602eaf7b6c768eaa0ecb53bfed5ad6db9eb4e18e97c SHA512 28c593b26dcfd2208105ace87e85e86b37511821bc5f1fa65c7bfa5732d386e0b68af3b83a8259feb9af878e29d61f1da5c45b50c8e2f57a22e4001652c61140
+DIST mariadb-10.3.27-patches-01.tar.xz 5516 BLAKE2B e78cc8514a3597b6ab38f00142a82c81e7482f1fd9afbcfd6f10ee92803a131f483f32361aebf288f9912e58140caeee1c536086e3f733c3a8dfe9c5afc5a590 SHA512 d1744bd83e099b67faa3c5385803c4eac58200c1a2ca30b5723e401c72e434d752be26c80da3b036431024c6a7d1ee889bde34a3143a43a9851984697d43e362
+DIST mariadb-10.3.27.tar.gz 72870472 BLAKE2B 46d203ba018ba00ffee2e5e9bec7f0a9a4d27f0aa30b26651215c7b3fca803dae1080d075bb4938a403c1f78a46ec4fec4bd59736c0eb9a0b84763445efe097b SHA512 96507307cf95d319898e23cb46a5f46937907592e421eb4a4373f47ca54291623010d18414e58bdba88a78255b1996984b14b41fb8f32e3593a3b02ed852aac5
DIST mariadb-10.4.13-patches-03.tar.xz 5520 BLAKE2B 949b7f6ee5a9a6077424264e53d2b7af8ceb56cb38b204800e1c3ec93fc929d57b201e075f8ed735364b5421a3b922ba45fc94ba006f1e6d94494efa17b521ef SHA512 042c3ca8a75ebbb1c2baa508603d4248a178f87b7126b439ef6894eaab979f01c47cd8fbea3c106cce2a951e9308c76e72b4e444dcbee09a991cb524f2b9fac8
DIST mariadb-10.4.13.tar.gz 80608459 BLAKE2B e9ada14da6ec7492311068549a5b6e5a66e1177312013b25472c084a21fbace543ec43b47f2e12190d45432648d508f311198521f42359561f8d75ea60f98205 SHA512 68919ceffb3d4afdd0d94daa77439a954c82ce4e08fbe06044fc397940eeb88a39ec75932cbd08ff26ef3cf7636fdb779947cda5b2764aa1fd888be19c44b566
DIST mariadb-10.4.14-patches-01.tar.xz 5512 BLAKE2B f32e1d383ffd99de431bc34c36101c71c5e631344527e96b80ca6bd0a68015b45a4c33d6f0518cb4aa2bcfd493b64b6607671450ca045243404c0d65ebbc66fd SHA512 201fe82cbcca705dba52b32405d463b5569d97a5ffd9fd2967ec7fc3c3ff305011b3d2c3c0e9f7c19aaac57b26661bd361f3b6da6f3812f25934ec18856c7051
-DIST mariadb-10.4.14.tar.gz 80789865 BLAKE2B fed455e906af9fe105f52cc7180a6b8d8839fdbffac079f2ced265741c2ab8010c78c0e75ff77740d45a2bd02a15c379bdb3a0237152848a0ce1a7aaac4cbf32 SHA512 c09817c1dd7962132bcf2886c97ad17ce43c00ee687724028e5f39f6a6a93877ae8695c2c795abba6a4f3bc40674f93a53d6d43f46788a4a8a42c4a65a22c91c
+DIST mariadb-10.4.15.tar.gz 80777094 BLAKE2B 576e06c1d62b399851e13fe0ac55ea94c462889bbd16ec25a2358e174e2822521008ad0dc021d742b1a12c5b22424208b6df92c2c0fb698a083b6a67a771bd64 SHA512 d7090e9e2a2b6fc5611fe498c44b00dbcd02e04456aaff3dc4cef7ef8cd284523776d01511f6f25f717306f6c49fca3f914d298f80e1c920cb6f9f87abebc0ca
+DIST mariadb-10.4.16-patches-01.tar.xz 8284 BLAKE2B 4c8c8ad8ff6722782072592983910b1c0cf0450b2720290ab2889a0c8841546a7593d8ea2573f6eaaf0812e799efdb171260f7944d0a8f4fb7bab312d8abf46f SHA512 9b6bf5926da2673868d4b95ed72dce85285d7fed4f14e854f93f7d9824a890c02ac7a580375556ec0eb76c765d04c3a25c40d56a03d1688840807288b4081b22
+DIST mariadb-10.4.16.tar.gz 80985469 BLAKE2B 6960f64de8f3b561a869fb8632ec6f402883d4ae0a5ff307863732b5833f0bc01ef20151888e5ef21415e0b812afde434cdce0fee24c4548e5250d2b798ffe48 SHA512 4442e082f8ca61972336907cc4ca4d0a6ce48db2f78d038a51970789618a7ef0f456f158ec41b1ede2f7e32df1c411c7ebcfaa16aa9ee5dc77df6f453b1d2095
+DIST mariadb-10.4.17-patches-01.tar.xz 5524 BLAKE2B a9424a8cd68a5106087e24f08a3ca2451dfa843d611b182cd676dc608a53e0cdae23106f984ceb0b9e56b24388c0793511cc06c09a525bfeff8177be5d0db06b SHA512 463eb00ccc152752084569c633212d98464004c4b285ce9d4caad860087cd5cec3fdc6639e7e03952f79fa9ada86598544d9b7add6a9c4194485325233ccfff6
+DIST mariadb-10.4.17.tar.gz 80986181 BLAKE2B 68dc7e0a7a809d1d26c75351e2f934f07a7c2e73651a8253db658d8d93375545a97f50650f0ea92387b4f5e13aabe6de8567d22fb0434d40058a392a58ad9ee4 SHA512 51bbdbae9ba48e3e7b0b614a5e19a0549979b727797e2742a130c6bed23d06eea6d18da63759a3f5f3ba751bcaaef4cdbf6a3456f4d23ff9149b3b0ea07e7079
DIST mariadb-10.5.5-patches-02.tar.xz 6060 BLAKE2B 185a2016836721f76c19228ca39c1c7610c34210e23b42f254e4c4fde34c74d9c77bb0d1a441175c14938ecafea3e9575fa3b7349db826aef63e7d7e7a21901a SHA512 8a26bdbec19d45739ef7accd3cea999bde465714141532d999500df2ebd93bb98a00b8b86b1e855ea4f0cba6984b21ff09beee75372f840282a91f5dc95db432
-DIST mariadb-10.5.5.tar.gz 86880268 BLAKE2B 58430dd4e7199d674bbd4f7381a56129e067ed1bb30c171545fe9fac3a83f7db2c57cc1b577ef242deb99dd69e17a1d3cbf756031711d27b04c97a7e93e14c60 SHA512 09bed291b39142f8e2f40eabbb443f6f384368b331406a09fd92d3d27ecc75644219066850d89495ed65c6f0d3ac32d51e29e65375331dcc2de4801313178d45
-DIST mariadb-5.5.68.tar.gz 45969389 BLAKE2B 5b3a647649c614825adccbc83faa40ba330dae0a1f8005b2297cc6a44fbc00bf817f2d854af315f995e1065bd4d14a2f21a9cec44b5c78402524467d876d8157 SHA512 3419790aa88a7e2a5d80e56ca94683d22ca2d5d817dfe19904d11454f34cfc3b9d55e603295ea58580a3c9fe96a6c6f9b650e1058c4e8f2f2e82f09165436865
+DIST mariadb-10.5.6.tar.gz 86884252 BLAKE2B b0230acf43d54e976c4e757139dbaa2bb6ed992b0d056728142fc7fa41bd62539be22eae5aac614ea49acf220646ee57ecc67ff1373c6aa142434e6743a4d174 SHA512 c62bd6278d389baf179962bc6f617693cf3ba748382e96963b1ef5bbee8d1c9f0964025cf00fb7ff5de088a79362b65657ed30a8adbb61fe524bfd0d8d753421
+DIST mariadb-10.5.7-patches-02.tar.xz 8992 BLAKE2B ec9acc1f09ac08319c5ad7e952e7521d722bf1c4deba15c3f2cfd72b89eea6c724b00c83be1b28e6261aadc94abcdffde8e978e4f13910367f4ccf56a3d02f45 SHA512 2adc499fbcf6fc895a5cf8643ca86866ab29d216cbdd62f55c1b0e66939e222fac310fb6a34f39cc76142b404febdb592e21be75aa3d16fab6c2bc7e725c44a1
+DIST mariadb-10.5.7.tar.gz 88214625 BLAKE2B 8ec53b4b98565d99a707899fd6adfdc5bffbf722528e0042ab16b5e186d32229a386881f2781a0ce435585f338b48dc66459bef9d8921fadc00a3d770b62bf5c SHA512 d964c61d6ba7cf21fea97b8e0b6a0bf1ee50fc7a7995753dafd710f4656001bd6e03c243896efb5802cce16dd6470849ed036d09b17415a538e008f64e974a9f
+DIST mariadb-10.5.8-patches-01.tar.xz 6212 BLAKE2B 7e4358d02d25edc51f5926a75646052ccf07fe2b5cab1901a133b27764793c94ca2a6c4d4b90b5d911b25a6d86f1cb7d2659edbcdab52c445fd6959ea080275d SHA512 f7a5d948c6d7d97896538b7df0de60c8e7969dd15b4ff406e8955a282e69fb7f19fe91424afc332029ac2a36c52781617bbf1c5f6d57dd3bfc21d3ea20ff4c5a
+DIST mariadb-10.5.8.tar.gz 88206163 BLAKE2B eaaddaf240102428a23602655920bdf543d25cf85e669b1b07bedba5119a5e0f4498e999db39031dcff168ac810ed0b28f5fa9ac995b3634b84b99b753b4636c SHA512 9801a68440a3502b49655e34dcbfd09734f4a4f1ba8621ed9b895e194cea461a8c69fb0ff66488d5defd3065b43f73e5083a60142e11cc7e4a442f86769b06e5
DIST mysql-extras-20190305-2052Z.tar.bz2 331304 BLAKE2B 1d2c35a961159fa5ce9ee6699fce943f5a5b5cf60b11c9bb4bcccee4943f4508a9eb6d01050c642353ac592ce1a6b421abf2a1bebc706c44c4c8a36aa698ec43 SHA512 ae63403320e010acbb92f8aec6da8ed4f267cef0bad37147d594076fd94571de7f98bfc2afbe94af5d716f58d57696fd958b1e13e20e87052f252ed4a188cd3c
-DIST mysql-extras-20200523-1221Z.tar.bz2 345015 BLAKE2B 3ad0da663c31831d3b511b88df34b6a28bb781cfd88fd4479b43273aa15946e63c7ae43d5497207edc6cc53a72bd42b8ce2e2058dfb236afd940bd0282190e98 SHA512 8f7b39017efb08e1ae98c4c68728bc86f8427b88b2a22688abf6975c6706122086dc93289beb511bbaf17cd5a790c76406e81315a11830829efe9170ce4f6a42
-EBUILD mariadb-10.1.38-r2.ebuild 29416 BLAKE2B 283ac8c98ff7f1a0b7bdd8a45e9dc120045ea48d98f25d632d0af3d422bf16c9fb81f853041697e322f98348900c08fe6e6b371605701257b2774f4edad51480 SHA512 08f5e89ea4c4a8a7746bdf8e8bd64e68b441e69e1a2b1e6e7caa726cc79f94f0aa884985234fe38c73cc26b2a91c0694b4da9b589d6e700c697edb78739c9999
-EBUILD mariadb-10.1.45-r1.ebuild 30809 BLAKE2B cbb67ee065fd71cb303cf72142710b20c18618165c8357e6198dfeb011ecc632f9e102fa6fbc53f538653462dfde92f46e087ea5c50d7d4591dffbc96b1c0473 SHA512 99934894513e1ef368b3ea6ce3346c0932cc8c6b6ce4b6db082156e5a5cfdbe3638482b737ff7f0c4599bdfa7ef1ad4c195210fef882712084f6834dd15139be
-EBUILD mariadb-10.1.46.ebuild 30670 BLAKE2B 2488607c934669f9eb3734690822dbb3d6aa31d9b10a6d157454bd1af8c1e3030369a298c00de699e5dcb976f2cb1c31fdc4cb60adc29011124928c49022f0f5 SHA512 83d3a061fa69a1869d7c18833107278e7ae0ca5ea4621f4e1fad1dc2ea13602904c4596563a45538ca183f252d5f21af78521052f436630fe6c317e78c885c55
EBUILD mariadb-10.2.22-r2.ebuild 32479 BLAKE2B cdb02077582e1f1e0f6c1739b43cfc28e8d03eb96c2c63d992fda2dd1a7da26baaaa8847cec4c6acd57ab0c54359d979015fec16a5faed2b3e4dc7c311eead68 SHA512 94d355a6789b3b44ef71137369d5e7dc0efa02efbfb656c989da0397332a69260031b53d17a93ccee97b3ce07201dcc7d009e500e04ff916619647e2ea14e964
-EBUILD mariadb-10.2.32-r2.ebuild 33739 BLAKE2B c370964efedaf92d05aeaccdf7ef20e2b3274bb1bd5f526c52ebc2c4ae7f6e91cc040958b20fee961e30feef9b770f7a5edf47d205d2643f3ed448e9a23f77c2 SHA512 9ddd9c8ad3247e8cd28eae81ea43a5693a6a5d8f9fc8ff1aec1e3f80af29e60917be2821863d3a5bd81182af7ac3eb9639ac8736a2787bc058b0d8b852ae362d
-EBUILD mariadb-10.2.33.ebuild 33923 BLAKE2B 7162a33040b26b4c69b3e600120035ed6903ac65f32b5c5825c1a3498e49ac327704451794714c9601ae12dcc9ea8c7045827e7d953a08a3ebfa9991d9f31a6e SHA512 5a2f1f7f6d0ef62bf107d9e632ab87f3092070d3f19c1c1f4a2e103470edb25c2532765bf4efdca8cd3ae0bf80914087a85f6f8cbf91dd13f8be51526dc8af47
-EBUILD mariadb-10.3.23-r2.ebuild 33491 BLAKE2B ec161173bfbf306865c912e343e386770fea56502bb66327368bebe263317aa24cabedd3070c8aa52804bfaee475883dafd48b19463cc04931622e062958f063 SHA512 01e7f2d24567d162d18e44550b217f573f92a8da0cb2b4a9fd24e45dc1a385e530bcd2fa5ebe8441d2ebb1262c1854484e593012f44c73a8fceceaf11875a580
-EBUILD mariadb-10.3.24.ebuild 33436 BLAKE2B cd1b2d506f840723eb23d5fc94c8437936bfc8eee80483e02e18e6541ceaa78b11bf6fb5852bd8ac111f135207591b7d34e073e82dd58530b2be31c6b521b352 SHA512 f610b4dee441d4319b2a92e177125fa1c9afbb4bb86f375e229bf573623688f123007b90ed67429ae186ebef7aa096d4c372617cb733a089938e514d56b87364
-EBUILD mariadb-10.4.13-r2.ebuild 34056 BLAKE2B 2fa69c956f8ce97004cc2990d93f1224379eb877a10e37a1a7bdcf1ae4157fa04e8ce918e02c1558297f940d97e060d61b9b5c2e849e30e4dd71ebaa59e1bf4a SHA512 4f7dcf860e5655ace5317f6c1c740b94237efd30dded5bf0d464ec89a277b3402611850185396df6fec78d7278eed2d5c30f3a3720cc90842bba0c57828db803
-EBUILD mariadb-10.4.14.ebuild 34141 BLAKE2B bd40fef84dc3c6c32950be114da95f68aca90d4d4150e117070f9102b441c80cfd105fa06c441e3fcacc965a2f6bd402bb736e957476b41ae77f2e40967bc978 SHA512 95538ccddffd4f47502753bdcb7960c4c11e92c74741bfa3c377fb986d31531c441fa485ffaae09a3b3128da62a70860e74383c37a070db58fc0d93e2b233e61
-EBUILD mariadb-10.5.5.ebuild 33569 BLAKE2B 948155fcd9a64f2a9280875bf0f3e99f4b1f64a400a67c2c8adaf2cf13f116ac11554eaeca80e34c53b86a8f4dbd606116d48c11ee80af2738ad892a72a35324 SHA512 d0caa1cf0a21456cbc5f94bf144e279ece57a4ac0c14f4a6d9876df6eaa05488f2d6084cfbdfbde2d4062d1926acf62e64cbb28b2bcdeac6f07bf77bd851d094
-EBUILD mariadb-5.5.68-r1.ebuild 27347 BLAKE2B 40224a35a8fc630d75ff56a308884bb32b8e390b5cdb94a1dddc07621815923e537e78186feb4720df770c8843d256a3304fb6bf37819e9ad0c1f5b013656028 SHA512 391dd04f34cd1c9f1f7c2ddfd75a020d386a091accf97c203bafcbfe64e4e2a3875d3cb5c91fe581af93e202f91ff2f929beb292eca1c619187d6de1bf4d657a
+EBUILD mariadb-10.2.32-r3.ebuild 33793 BLAKE2B 4a4986f9ff7b31bb45d44811733bfd8b088e8b48495fe11d85c19cf1aca35e0200ee251ca83756ae340d13c31edffbf2c8788c1a8f89d56e7637cac3e5ecce4c SHA512 4326e3456f0eede25eef07e89e20acda6bd2518b6b395c2394cc5bd96a2d93e148124464583c8cb4cd4d421e33c627fe255722aae35b0ea1352a94d76e3cea73
+EBUILD mariadb-10.2.34.ebuild 33923 BLAKE2B 7162a33040b26b4c69b3e600120035ed6903ac65f32b5c5825c1a3498e49ac327704451794714c9601ae12dcc9ea8c7045827e7d953a08a3ebfa9991d9f31a6e SHA512 5a2f1f7f6d0ef62bf107d9e632ab87f3092070d3f19c1c1f4a2e103470edb25c2532765bf4efdca8cd3ae0bf80914087a85f6f8cbf91dd13f8be51526dc8af47
+EBUILD mariadb-10.2.35.ebuild 33982 BLAKE2B 7ef21094bdf7d2ca822e9a412524c0ce2e6b846df7ad3fd6f1b73d7ca5759cbd07b553eb8b4da19c9f3011264896234f35f3f315ea403db72856b3c73f6fa2d8 SHA512 07bf7b9eb207f463eac9d8794c947c95dd3d69c6b48be4c4f3160afb0f5e417c1b0a188c56588697e1212dd2d947bb8e740b95c5a159e2ba019ca74f70d8d1b5
+EBUILD mariadb-10.2.36.ebuild 33981 BLAKE2B 2089d29f3c71fd63d95591f09250e428806cef8bc6ad167aa1b7d1f9bc5a2c31e19f70e0a19757f5f2701832f7c1c4b6f47e097c6ddcb0fc787f0225ade5773a SHA512 c79a360a5c0d45ea62d4a14ebedf82a2ebf6bfcdfcfdd029d07f55fcc338e23b4ed150a49d263404eccb0473045e4252d7565bdf6f79b90ce02b7f9ab27283af
+EBUILD mariadb-10.3.23-r3.ebuild 33546 BLAKE2B 27ae00b9b859ce9305bf1be7d52fff5dbb6832d15cfde3c1baab384385157b7c49e04cfb34680bf5ef02024f79aded3fe9f25a82680a1c2282b1bdcbd9469f2e SHA512 df8f2b177c4326abbbfb70cdf1b7a9ded6dea2b669c9c96b3e86a38db1c165c7d833cfdfd4eb27320179233a42f55d70b68b31d4516b8d1e3d3f2eb9ea32e627
+EBUILD mariadb-10.3.25.ebuild 33436 BLAKE2B cd1b2d506f840723eb23d5fc94c8437936bfc8eee80483e02e18e6541ceaa78b11bf6fb5852bd8ac111f135207591b7d34e073e82dd58530b2be31c6b521b352 SHA512 f610b4dee441d4319b2a92e177125fa1c9afbb4bb86f375e229bf573623688f123007b90ed67429ae186ebef7aa096d4c372617cb733a089938e514d56b87364
+EBUILD mariadb-10.3.26.ebuild 33495 BLAKE2B dff7db9059f564f92427cf323a8008a493fd2c8f9d4e23778d7c6aa2fd79630e217c78e02074ed0e40eef40a16d620d1c7fdbe18073854dd6576906a2b014852 SHA512 c7934e0584da68c329aac1c1721bfc125308af629b1228a70bf9466f26e031b867ea8d713d2bf22dc92dd286d99943b6db0d63fccdcffd63d434cfa5f2373b76
+EBUILD mariadb-10.3.27.ebuild 33494 BLAKE2B 283063810856808801bfcd94b9ee761dba54dc849c97a99727deea516804711d7fd02dac8f3fc648c0f9b5f2ce7ae93a09278028c88eaa096bfd0d795e004b55 SHA512 1a5e170d08fbeb84a8a2c2a20536e3ee800f3bd9954195da2433984cc3b55d0c10036c1fd6d217e13e0cbbeee15dd819e2265a2825fb861f5ec08a7462be12e0
+EBUILD mariadb-10.4.13-r3.ebuild 34110 BLAKE2B 98b42eef162b1d731ed7ac7fe34df39c6c396b4247bece5278d69688a723caf044b96614c5ba06156bab55163428cede02ba37a4da63723a59850d41bed2c5a6 SHA512 ea895b77a66849cafa1e830ad386bbe2eadb6f81b5a62e01344efd34c98e59236bcda15e336f965486be87f89fe002e39d1cbe7c5b65436a2143a9fffc42e364
+EBUILD mariadb-10.4.15.ebuild 34141 BLAKE2B bd40fef84dc3c6c32950be114da95f68aca90d4d4150e117070f9102b441c80cfd105fa06c441e3fcacc965a2f6bd402bb736e957476b41ae77f2e40967bc978 SHA512 95538ccddffd4f47502753bdcb7960c4c11e92c74741bfa3c377fb986d31531c441fa485ffaae09a3b3128da62a70860e74383c37a070db58fc0d93e2b233e61
+EBUILD mariadb-10.4.16.ebuild 34274 BLAKE2B d62e06006a56898833b5357c3ed74a00adb8b5dfdf7d78014ef42080e5bb56242f68a492adfcaf06f371874a3a768f1599f6b8e139730659fb89baf128054a1b SHA512 5c0066de814b431618b7c1cd4264c7fd61861a54f8641dbb21bc3bd2edd3e58c11e84cb81010818815f4df2bfacdd2bec0b1cd49cc37396acc3402ab0aa7e2f1
+EBUILD mariadb-10.4.17.ebuild 34273 BLAKE2B d20943ca0d475bf6f6a553571f209bc4d5f1b46292905ec9c3e3896eafc1cfb78d7d6760015a5b01bbe79b70d67f278376a8c287a53c3d0263b86f320b43c5eb SHA512 03b67c91809e39305e79427050dfa368fc3d32bbaea7a26168258e111c972ce8a092f9f2ab1fd98c7cb0f119fd5cbc907f6198816cf5235a0d21d4c10309d02d
+EBUILD mariadb-10.5.6.ebuild 33569 BLAKE2B 948155fcd9a64f2a9280875bf0f3e99f4b1f64a400a67c2c8adaf2cf13f116ac11554eaeca80e34c53b86a8f4dbd606116d48c11ee80af2738ad892a72a35324 SHA512 d0caa1cf0a21456cbc5f94bf144e279ece57a4ac0c14f4a6d9876df6eaa05488f2d6084cfbdfbde2d4062d1926acf62e64cbb28b2bcdeac6f07bf77bd851d094
+EBUILD mariadb-10.5.7.ebuild 33702 BLAKE2B 60eb424a566762d0fce3801bfb3711528f86ac4b3bf8d5cf75f2ef51805b6a0905764357004445a58fda3a0c8b3f14e482db0e17990ecc07d4b21cdb47fc55b4 SHA512 bbcc467b26975ff33ce282f6b89707ce796e117d7be1266290edcb15fe9609aa0b12fb9dca7a3c04a8c7bbc5c50beb662c7015b6788c77e93c8946145cb99d21
+EBUILD mariadb-10.5.8.ebuild 33702 BLAKE2B 3f655bbc8faac513312676679e452267c632cc10e9500b9bbf1c5b2175b60ce6d006c7b7e777865bb8c96a36e9f199d6b90312234fa3001ddc0b054b3be33239 SHA512 ca26d9a5d5ea810e6d99792302119d4559dfc22f6422be245e386cf08b6e6ebc1bbd72a205ef0fa115d3c93944508d5fc355d32965d367dbaf1b28d5a94d6b49
MISC metadata.xml 2735 BLAKE2B 961d1d49f7a6f5b90c731ce710c27e11bd2a1d996de9ae0adbabecd5823053e815397b5930797b66d94e1e767fbcba83fbb25fd002a1b2d346235cb24b6a2c3a SHA512 85a7ca20443ed2630f7ff8da19d74d9f415cd9d8dde25300eb1d6ed44b4d0c73bc34a149bf0471748933aa0200e14ced48c009b99d71a737e38283ed754b75c9
diff --git a/dev-db/mariadb/files/mariadb-10.3-CVE-2020-15180.patch b/dev-db/mariadb/files/mariadb-10.3-CVE-2020-15180.patch
new file mode 100644
index 000000000000..85d378f8232c
--- /dev/null
+++ b/dev-db/mariadb/files/mariadb-10.3-CVE-2020-15180.patch
@@ -0,0 +1,75 @@
+https://github.com/MariaDB/server/commit/418850b2df4256da5a722288c2657650dc228842
+
+--- a/sql/wsrep_sst.cc
++++ b/sql/wsrep_sst.cc
+@@ -1726,24 +1726,65 @@ static int sst_donate_other (const char* method,
+ return arg.err;
+ }
+
++/* return true if character can be a part of a filename */
++static bool filename_char(int const c)
++{
++ return isalnum(c) || (c == '-') || (c == '_') || (c == '.');
++}
++
++/* return true if character can be a part of an address string */
++static bool address_char(int const c)
++{
++ return filename_char(c) ||
++ (c == ':') || (c == '[') || (c == ']') || (c == '/');
++}
++
++static bool check_request_str(const char* const str,
++ bool (*check) (int c))
++{
++ for (size_t i(0); str[i] != '\0'; ++i)
++ {
++ if (!check(str[i]))
++ {
++ WSREP_WARN("Illegal character in state transfer request: %i (%c).",
++ str[i], str[i]);
++ return true;
++ }
++ }
++
++ return false;
++}
++
+ wsrep_cb_status_t wsrep_sst_donate_cb (void* app_ctx, void* recv_ctx,
+ const void* msg, size_t msg_len,
+ const wsrep_gtid_t* current_gtid,
+ const char* state, size_t state_len,
+ bool bypass)
+ {
+- /* This will be reset when sync callback is called.
+- * Should we set wsrep_ready to FALSE here too? */
+-
+- wsrep_config_state->set(WSREP_MEMBER_DONOR);
+-
+ const char* method = (char*)msg;
+ size_t method_len = strlen (method);
++
++ if (check_request_str(method, filename_char))
++ {
++ WSREP_ERROR("Bad SST method name. SST canceled.");
++ return WSREP_CB_FAILURE;
++ }
++
+ const char* data = method + method_len + 1;
+
++ if (check_request_str(data, address_char))
++ {
++ WSREP_ERROR("Bad SST address string. SST canceled.");
++ return WSREP_CB_FAILURE;
++ }
++
+ char uuid_str[37];
+ wsrep_uuid_print (&current_gtid->uuid, uuid_str, sizeof(uuid_str));
+
++ /* This will be reset when sync callback is called.
++ * Should we set wsrep_ready to FALSE here too? */
++ wsrep_config_state->set(WSREP_MEMBER_DONOR);
++
+ wsp::env env(NULL);
+ if (env.error())
+ {
diff --git a/dev-db/mariadb/files/mariadb-10.4-CVE-2020-15180.patch b/dev-db/mariadb/files/mariadb-10.4-CVE-2020-15180.patch
new file mode 100644
index 000000000000..9658669c6e61
--- /dev/null
+++ b/dev-db/mariadb/files/mariadb-10.4-CVE-2020-15180.patch
@@ -0,0 +1,62 @@
+https://github.com/MariaDB/server/commit/418850b2df4256da5a722288c2657650dc228842
+
+--- a/sql/wsrep_sst.cc
++++ b/sql/wsrep_sst.cc
+@@ -1822,6 +1822,35 @@ static int sst_donate_other (const char* method,
+ return arg.err;
+ }
+
++/* return true if character can be a part of a filename */
++static bool filename_char(int const c)
++{
++ return isalnum(c) || (c == '-') || (c == '_') || (c == '.');
++}
++
++/* return true if character can be a part of an address string */
++static bool address_char(int const c)
++{
++ return filename_char(c) ||
++ (c == ':') || (c == '[') || (c == ']') || (c == '/');
++}
++
++static bool check_request_str(const char* const str,
++ bool (*check) (int c))
++{
++ for (size_t i(0); str[i] != '\0'; ++i)
++ {
++ if (!check(str[i]))
++ {
++ WSREP_WARN("Illegal character in state transfer request: %i (%c).",
++ str[i], str[i]);
++ return true;
++ }
++ }
++
++ return false;
++}
++
+ int wsrep_sst_donate(const std::string& msg,
+ const wsrep::gtid& current_gtid,
+ const bool bypass)
+@@ -1833,8 +1862,21 @@ int wsrep_sst_donate(const std::string& msg,
+
+ const char* method= msg.data();
+ size_t method_len= strlen (method);
++
++ if (check_request_str(method, filename_char))
++ {
++ WSREP_ERROR("Bad SST method name. SST canceled.");
++ return WSREP_CB_FAILURE;
++ }
++
+ const char* data= method + method_len + 1;
+
++ if (check_request_str(data, address_char))
++ {
++ WSREP_ERROR("Bad SST address string. SST canceled.");
++ return WSREP_CB_FAILURE;
++ }
++
+ wsp::env env(NULL);
+ if (env.error())
+ {
diff --git a/dev-db/mariadb/files/my.cnf-5.5 b/dev-db/mariadb/files/my.cnf-5.5
deleted file mode 100644
index 289af8a24d0d..000000000000
--- a/dev-db/mariadb/files/my.cnf-5.5
+++ /dev/null
@@ -1,149 +0,0 @@
-# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
-
-# The following options will be passed to all MySQL clients
-[client]
-#password = your_password
-port = 3306
-socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
-
-[mysql]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-default-character-set=utf8
-
-[mysqladmin]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-default-character-set=utf8
-
-[mysqlcheck]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-default-character-set=utf8
-
-[mysqldump]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-default-character-set=utf8
-
-[mysqlimport]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-default-character-set=utf8
-
-[mysqlshow]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-default-character-set=utf8
-
-[myisamchk]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-
-[myisampack]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-
-# use [safe_mysqld] with mysql-3
-[mysqld_safe]
-err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
-
-# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
-[mysqld]
-character-set-server = utf8
-user = mysql
-port = 3306
-socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
-pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
-log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
-basedir = @GENTOO_PORTAGE_EPREFIX@/usr
-datadir = @DATADIR@
-skip-external-locking
-key_buffer_size = 16M
-max_allowed_packet = 1M
-table_open_cache = 64
-sort_buffer_size = 512K
-net_buffer_length = 8K
-read_buffer_size = 256K
-read_rnd_buffer_size = 512K
-myisam_sort_buffer_size = 8M
-lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb
-#Set this to your desired error message language
-lc_messages = en_US
-
-# security:
-# using "localhost" in connects uses sockets by default
-# skip-networking
-bind-address = 127.0.0.1
-
-log-bin
-server-id = 1
-
-# point the following paths to different dedicated disks
-tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
-#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
-
-# you need the debug USE flag enabled to use the following directives,
-# if needed, uncomment them, start the server and issue
-# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
-# this will show you *exactly* what's happening in your server ;)
-
-#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
-#gdb
-#debug = d:t:i:o,/tmp/mysqld.trace
-#one-thread
-
-# the following is the InnoDB configuration
-# if you wish to disable innodb instead
-# uncomment just the next line
-#skip-innodb
-#
-# the rest of the innodb config follows:
-# don't eat too much memory, we're trying to be safe on 64Mb boxes
-# you might want to bump this up a bit on boxes with more RAM
-innodb_buffer_pool_size = 16M
-# this is the default, increase it if you have lots of tables
-innodb_additional_mem_pool_size = 2M
-#
-# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
-# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
-# we have to take for the moment
-#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
-#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
-#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
-# you may wish to change this size to be more suitable for your system
-# the max is there to avoid run-away growth on your machine
-innodb_data_file_path = ibdata1:10M:autoextend:max:128M
-# we keep this at around 25% of of innodb_buffer_pool_size
-# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
-innodb_log_file_size = 5M
-# this is the default, increase it if you have very large transactions going on
-innodb_log_buffer_size = 8M
-# this is the default and won't hurt you
-# you shouldn't need to tweak it
-innodb_log_files_in_group=2
-# see the innodb config docs, the other options are not always safe
-innodb_flush_log_at_trx_commit = 1
-innodb_lock_wait_timeout = 50
-innodb_file_per_table
-
-# Uncomment this to get FEDERATED engine support
-#plugin-load=federated=ha_federated.so
-loose-federated
-
-[mysqldump]
-quick
-max_allowed_packet = 16M
-
-[mysql]
-# uncomment the next directive if you are not familiar with SQL
-#safe-updates
-
-[isamchk]
-key_buffer_size = 20M
-sort_buffer_size = 20M
-read_buffer = 2M
-write_buffer = 2M
-
-[myisamchk]
-key_buffer_size = 20M
-sort_buffer_size = 20M
-read_buffer_size = 2M
-write_buffer_size = 2M
-
-[mysqlhotcopy]
-interactive-timeout
-
-[mariadb]
diff --git a/dev-db/mariadb/files/my.cnf-5.6-r1 b/dev-db/mariadb/files/my.cnf-5.6-r1
deleted file mode 100644
index cde5312a5687..000000000000
--- a/dev-db/mariadb/files/my.cnf-5.6-r1
+++ /dev/null
@@ -1,142 +0,0 @@
-# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file.
-
-# The following options will be passed to all MySQL clients
-[client]
-#password = your_password
-port = 3306
-socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
-
-[mysql]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-default-character-set=utf8
-
-[mysqladmin]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-default-character-set=utf8
-
-[mysqlcheck]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-default-character-set=utf8
-
-[mysqldump]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-default-character-set=utf8
-
-[mysqlimport]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-default-character-set=utf8
-
-[mysqlshow]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-default-character-set=utf8
-
-[myisamchk]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-
-[myisampack]
-character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets
-
-# use [safe_mysqld] with mysql-3
-[mysqld_safe]
-err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err
-
-# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
-[mysqld]
-character-set-server = utf8
-user = mysql
-port = 3306
-socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock
-pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid
-log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err
-basedir = @GENTOO_PORTAGE_EPREFIX@/usr
-datadir = @DATADIR@
-skip-external-locking
-key_buffer_size = 16M
-max_allowed_packet = 4M
-table_open_cache = 400
-sort_buffer_size = 512K
-net_buffer_length = 16K
-read_buffer_size = 256K
-read_rnd_buffer_size = 512K
-myisam_sort_buffer_size = 8M
-lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb
-#Set this to your desired error message language
-lc_messages = en_US
-
-# security:
-# using "localhost" in connects uses sockets by default
-# skip-networking
-bind-address = 127.0.0.1
-
-log-bin
-server-id = 1
-
-# point the following paths to different dedicated disks
-tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/
-#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname
-
-# you need the debug USE flag enabled to use the following directives,
-# if needed, uncomment them, start the server and issue
-# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace
-# this will show you *exactly* what's happening in your server ;)
-
-#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql
-#gdb
-#debug = d:t:i:o,/tmp/mysqld.trace
-#one-thread
-
-# the rest of the innodb config follows:
-# don't eat too much memory, we're trying to be safe on 64Mb boxes
-# you might want to bump this up a bit on boxes with more RAM
-innodb_buffer_pool_size = 128M
-#
-# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-(
-# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route
-# we have to take for the moment
-#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
-#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
-#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/
-# you may wish to change this size to be more suitable for your system
-# the max is there to avoid run-away growth on your machine
-innodb_data_file_path = ibdata1:10M:autoextend:max:128M
-# we keep this at around 25% of of innodb_buffer_pool_size
-# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
-innodb_log_file_size = 48M
-# this is the default, increase it if you have very large transactions going on
-innodb_log_buffer_size = 8M
-# this is the default and won't hurt you
-# you shouldn't need to tweak it
-innodb_log_files_in_group=2
-# see the innodb config docs, the other options are not always safe
-innodb_flush_log_at_trx_commit = 1
-innodb_lock_wait_timeout = 50
-innodb_file_per_table
-
-# Uncomment this to get FEDERATED engine support
-#plugin-load=federated=ha_federated.so
-loose-federated
-
-[mysqldump]
-quick
-max_allowed_packet = 16M
-
-[mysql]
-# uncomment the next directive if you are not familiar with SQL
-#safe-updates
-
-[isamchk]
-key_buffer_size = 20M
-sort_buffer_size = 20M
-read_buffer = 2M
-write_buffer = 2M
-
-[myisamchk]
-key_buffer_size = 20M
-sort_buffer_size = 20M
-read_buffer_size = 2M
-write_buffer_size = 2M
-
-[mysqlhotcopy]
-interactive-timeout
-
-[mariadb]
diff --git a/dev-db/mariadb/mariadb-10.1.38-r2.ebuild b/dev-db/mariadb/mariadb-10.1.38-r2.ebuild
deleted file mode 100644
index b205f74ad1b3..000000000000
--- a/dev-db/mariadb/mariadb-10.1.38-r2.ebuild
+++ /dev/null
@@ -1,892 +0,0 @@
-# Copyright 1999-2020 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 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="10.1/${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 ) !test? ( test ) libressl? ( test )"
-
-REQUIRED_USE="jdbc? ( extraengine server !static )
- server? ( tokudb? ( jemalloc !tcmalloc ) )
- ?? ( tcmalloc jemalloc )
- static? ( yassl !pam )"
-
-KEYWORDS="ppc ppc64"
-
-# 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? ( sys-libs/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
- !dev-db/mariadb:0
- !dev-db/mariadb:5.5
- !dev-db/mariadb:10.2
- !dev-db/mariadb:10.3
- !dev-db/mariadb:10.4
- !dev-db/mariadb:10.5
- 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')"
- -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.45-r1.ebuild b/dev-db/mariadb/mariadb-10.1.45-r1.ebuild
deleted file mode 100644
index 616c340d5a83..000000000000
--- a/dev-db/mariadb/mariadb-10.1.45-r1.ebuild
+++ /dev/null
@@ -1,925 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-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 \
- multiprocessing java-pkg-opt-2 cmake-utils multilib-build
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.1.45-patches-04.tar.xz"
-
-SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
- ${PATCH_SET}"
-
-HOMEPAGE="https://mariadb.org/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="10.1/${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 ) !test? ( 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"
-
-# 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? ( sys-libs/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 ) )
- test? ( acct-group/mysql acct-user/mysql )
- )
- ${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
- !dev-db/mariadb:0
- !dev-db/mariadb:5.5
- !dev-db/mariadb:10.2
- !dev-db/mariadb:10.3
- !dev-db/mariadb:10.4
- !dev-db/mariadb:10.5
- ${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] )
- )
- !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
- extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
- )
- 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
-# 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 ) ) ) )"
-
-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_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
-
- if has test ${FEATURES} ; then
- # Bug #213475 - MySQL _will_ object strenuously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if ! has userpriv ${FEATURES} ; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- fi
- fi
-
- java-pkg-opt-2_pkg_setup
-}
-
-src_unpack() {
- unpack ${A}
-
- mv -f "${WORKDIR%/}/${PN%%-galera}-${PV}" "${S}" || die
-}
-
-src_prepare() {
- eapply "${WORKDIR}"/mariadb-patches
-
- eapply_user
-
- _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
-
- # Fix -fno-common error
- sed -i -e '/^datasink_t datasink_buffer;$/d' extra/mariabackup/xbstream.c || 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')"
- -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)
- -DPLUGIN_CLIENT_ED25519=NO
- -DPLUGIN_AUTH_GSSAPI_CLIENT=NO
- )
-
- 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
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv' \
-# ebuild mariadb-X.X.XX.ebuild \
-# digest clean package
-src_test() {
- _disable_test() {
- local rawtestname bug reason
- rawtestname="${1}" ; shift
- bug="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
- echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
- if [[ -z "${MTR_PARALLEL}" ]] ; then
- local -x MTR_PARALLEL=$(makeopts_jobs)
-
- if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
- # Running multiple tests in parallel usually require higher ulimit
- # and fs.aio-max-nr setting. In addition, tests like main.multi_update
- # are known to hit timeout when system is busy.
- # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
- # using "auto".
- local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
- info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
- einfo "${info_msg}"
- unset info_msg
- MTR_PARALLEL=4
- fi
- else
- einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
- fi
-
- # Try to increase file limits to increase test coverage
- if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
- # Upper limit comes from parts.partition_* tests
- ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
- if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
- # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
- ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
- if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
- ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
- else
- einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
- fi
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- cp "${S}"/mysql-test/unstable-tests "${T}/disabled.def" || die
-
- local -a disabled_tests
- disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
- disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
- disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
- disabled_tests+=( "main.grant;0;Sporadically failing test" )
- disabled_tests+=( "main.join_cache;0;Sporadically failing test" )
- disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
- disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
- disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
- disabled_tests+=( "mariabackup.*;0;Broken test suite" )
- disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" )
- disabled_tests+=( "plugins.cracklib_password_check;0;False positive due to varying policies" )
- disabled_tests+=( "plugins.two_password_validations;0;False positive due to varying policies" )
- disabled_tests+=( "roles.acl_statistics;0;False positive due to a user count mismatch caused by previous test" )
-
- if ! use latin1 ; then
- disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
- disabled_tests+=( "main.information_schema;0;Requires USE=latin1" )
- disabled_tests+=( "main.mysql;0;Requires USE=latin1" )
- disabled_tests+=( "main.system_mysql_db;0;Requires USE=latin1" )
- fi
-
- if ! use profiling ; then
- disabled_tests+=( "sys_vars.sysvars_server_notembedded;0;Requires USE=profiling" )
- fi
-
- local test_infos_str test_infos_arr
- for test_infos_str in "${disabled_tests[@]}" ; do
- IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
- if [[ ${#test_infos_arr[@]} != 3 ]] ; then
- die "Invalid test data set, not matching format: ${test_infos_str}"
- fi
-
- _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
- done
- unset test_infos_str test_infos_arr
-
- # run mysql-test tests
- pushd "${TESTDIR}" &>/dev/null || die
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd &>/dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-src_install() {
- cmake-utils_src_install
-
- # 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"
-}
-
-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
-}
-
-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.1.46.ebuild b/dev-db/mariadb/mariadb-10.1.46.ebuild
deleted file mode 100644
index fd560e8d61a3..000000000000
--- a/dev-db/mariadb/mariadb-10.1.46.ebuild
+++ /dev/null
@@ -1,925 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-SUBSLOT="18"
-
-JAVA_PKG_OPT_USE="jdbc"
-
-inherit eutils systemd flag-o-matic prefix toolchain-funcs \
- multiprocessing java-pkg-opt-2 cmake multilib-build
-
-# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.1.46-patches-01.tar.xz"
-
-SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
- ${PATCH_SET}"
-
-HOMEPAGE="https://mariadb.org/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="10.1/${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 ) !test? ( 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"
-
-# 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? (
- !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
- 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= )
- sys-libs/zlib[minizip]
- )
- 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? ( sys-libs/pam:0= )
- systemd? ( sys-apps/systemd:= )
- tokudb? ( app-arch/snappy )
- )
- >=dev-libs/libpcre-8.41-r1:3=
- !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
-"
-BDEPEND="virtual/yacc
- || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
-"
-DEPEND="static? ( sys-libs/ncurses[static-libs] )
- server? (
- extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
- test? ( acct-group/mysql acct-user/mysql )
- )
- ${COMMON_DEPEND}"
-RDEPEND="selinux? ( sec-policy/selinux-mysql )
- client-libs? ( !dev-db/mysql-connector-c )
- !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- !dev-db/mariadb:0
- !dev-db/mariadb:5.5
- !dev-db/mariadb:10.2
- !dev-db/mariadb:10.3
- !dev-db/mariadb:10.4
- !dev-db/mariadb:10.5
- ${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] )
- )
- !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
- extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
- )
- 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
-# 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 ) ) ) )"
-
-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_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
-
- if has test ${FEATURES} ; then
- # Bug #213475 - MySQL _will_ object strenuously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if ! has userpriv ${FEATURES} ; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- fi
- fi
-
- java-pkg-opt-2_pkg_setup
-}
-
-src_unpack() {
- unpack ${A}
-
- mv -f "${WORKDIR%/}/${PN%%-galera}-${PV}" "${S}" || die
-}
-
-src_prepare() {
- eapply "${WORKDIR}"/mariadb-patches
-
- eapply_user
-
- _disable_plugin() {
- echo > "${S}/plugin/${1}/CMakeLists.txt" || die
- }
- _disable_engine() {
- echo > "${S}/storage/${1}/CMakeLists.txt" || die
- }
-
- if use tcmalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || 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
-
- # Fix -fno-common error
- sed -i -e '/^datasink_t datasink_buffer;$/d' extra/mariabackup/xbstream.c || 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_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')"
- -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)
- -DPLUGIN_CLIENT_ED25519=NO
- -DPLUGIN_AUTH_GSSAPI_CLIENT=NO
- )
-
- 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_src_configure
-}
-
-src_compile() {
- cmake_src_compile
-}
-
-# Official test instructions:
-# USE='extraengine perl server' \
-# FEATURES='test userpriv' \
-# ebuild mariadb-X.X.XX.ebuild \
-# digest clean package
-src_test() {
- _disable_test() {
- local rawtestname bug reason
- rawtestname="${1}" ; shift
- bug="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
- echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
-
- if [[ -z "${MTR_PARALLEL}" ]] ; then
- local -x MTR_PARALLEL=$(makeopts_jobs)
-
- if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
- # Running multiple tests in parallel usually require higher ulimit
- # and fs.aio-max-nr setting. In addition, tests like main.multi_update
- # are known to hit timeout when system is busy.
- # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
- # using "auto".
- local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
- info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
- einfo "${info_msg}"
- unset info_msg
- MTR_PARALLEL=4
- fi
- else
- einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
- fi
-
- # Try to increase file limits to increase test coverage
- if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
- # Upper limit comes from parts.partition_* tests
- ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
-
- if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
- # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
- ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
-
- if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
- ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
- else
- einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
- fi
- else
- einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
- fi
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- cp "${S}"/mysql-test/unstable-tests "${T}/disabled.def" || die
-
- local -a disabled_tests
- disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
- disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
- disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
- disabled_tests+=( "main.grant;0;Sporadically failing test" )
- disabled_tests+=( "main.join_cache;0;Sporadically failing test" )
- disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
- disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
- disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
- disabled_tests+=( "mariabackup.*;0;Broken test suite" )
- disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" )
- disabled_tests+=( "plugins.cracklib_password_check;0;False positive due to varying policies" )
- disabled_tests+=( "plugins.two_password_validations;0;False positive due to varying policies" )
- disabled_tests+=( "roles.acl_statistics;0;False positive due to a user count mismatch caused by previous test" )
-
- if ! use latin1 ; then
- disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
- disabled_tests+=( "main.information_schema;0;Requires USE=latin1" )
- disabled_tests+=( "main.mysql;0;Requires USE=latin1" )
- disabled_tests+=( "main.system_mysql_db;0;Requires USE=latin1" )
- fi
-
- if ! use profiling ; then
- disabled_tests+=( "sys_vars.sysvars_server_notembedded;0;Requires USE=profiling" )
- fi
-
- local test_infos_str test_infos_arr
- for test_infos_str in "${disabled_tests[@]}" ; do
- IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
-
- if [[ ${#test_infos_arr[@]} != 3 ]] ; then
- die "Invalid test data set, not matching format: ${test_infos_str}"
- fi
-
- _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
- done
- unset test_infos_str test_infos_arr
-
- # run mysql-test tests
- pushd "${TESTDIR}" &>/dev/null || die
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd &>/dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-src_install() {
- cmake_src_install
-
- # 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
- if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then
- rm -f "${ED}/usr/bin/mytop" || die
- fi
-}
-
-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
-}
-
-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'@'localhost' 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.2.32-r2.ebuild b/dev-db/mariadb/mariadb-10.2.32-r3.ebuild
index 7476d450f208..035ba47888e5 100644
--- a/dev-db/mariadb/mariadb-10.2.32-r2.ebuild
+++ b/dev-db/mariadb/mariadb-10.2.32-r3.ebuild
@@ -35,7 +35,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
@@ -232,6 +232,7 @@ src_unpack() {
src_prepare() {
eapply "${WORKDIR}"/mariadb-patches
+ eapply "${FILESDIR}"/mariadb-10.3-CVE-2020-15180.patch
eapply_user
diff --git a/dev-db/mariadb/mariadb-10.2.33.ebuild b/dev-db/mariadb/mariadb-10.2.34.ebuild
index 636a95ff8695..636a95ff8695 100644
--- a/dev-db/mariadb/mariadb-10.2.33.ebuild
+++ b/dev-db/mariadb/mariadb-10.2.34.ebuild
diff --git a/dev-db/mariadb/mariadb-10.2.35.ebuild b/dev-db/mariadb/mariadb-10.2.35.ebuild
new file mode 100644
index 000000000000..f991c8bca7c1
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.2.35.ebuild
@@ -0,0 +1,1018 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ multiprocessing java-pkg-opt-2 cmake
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.2.35-patches-01.tar.xz"
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
+ ${PATCH_SET}"
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="10.2/${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 ) !test? ( 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"
+
+# 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? ( sys-libs/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+"
+BDEPEND="virtual/yacc
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+"
+DEPEND="static? ( sys-libs/ncurses[static-libs] )
+ server? (
+ extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
+ test? ( acct-group/mysql acct-user/mysql )
+ )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ !dev-db/mariadb:0
+ !dev-db/mariadb:5.5
+ !dev-db/mariadb:10.1
+ !dev-db/mariadb:10.3
+ !dev-db/mariadb:10.4
+ !dev-db/mariadb:10.5
+ !<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] )
+ )
+ !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
+ extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
+ )
+ 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
+# 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 )
+ )
+ )
+ )"
+
+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_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
+
+ if has test ${FEATURES} ; then
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ fi
+ fi
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/mariadb-patches
+
+ eapply_user
+
+ _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 auth_ed25519 )
+ 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
+
+ # Fix galera_recovery.sh script
+ sed -i -e "s~@bindir@/my_print_defaults~${EPREFIX}/usr/libexec/mariadb/my_print_defaults~" \
+ scripts/galera_recovery.sh || die
+
+ cmake_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')"
+ -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_CLIENT_ED25519=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_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+ _disable_test() {
+ local rawtestname bug reason
+ rawtestname="${1}" ; shift
+ bug="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+ echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ if [[ -z "${MTR_PARALLEL}" ]] ; then
+ local -x MTR_PARALLEL=$(makeopts_jobs)
+
+ if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+ # Running multiple tests in parallel usually require higher ulimit
+ # and fs.aio-max-nr setting. In addition, tests like main.multi_update
+ # are known to hit timeout when system is busy.
+ # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+ # using "auto".
+ local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+ info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+ einfo "${info_msg}"
+ unset info_msg
+ MTR_PARALLEL=4
+ fi
+ else
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+ fi
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ cp "${S}"/mysql-test/unstable-tests "${T}/disabled.def" || die
+
+ local -a disabled_tests
+ disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
+ disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
+ disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
+ disabled_tests+=( "main.grant;0;Sporadically failing test" )
+ disabled_tests+=( "main.join_cache;0;Sporadically failing test" )
+ disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
+ disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
+ disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
+ disabled_tests+=( "mariabackup.*;0;Broken test suite" )
+ disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" )
+ disabled_tests+=( "plugins.cracklib_password_check;0;False positive due to varying policies" )
+ disabled_tests+=( "plugins.two_password_validations;0;False positive due to varying policies" )
+ disabled_tests+=( "roles.acl_statistics;0;False positive due to a user count mismatch caused by previous test" )
+
+ if ! use latin1 ; then
+ disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
+ disabled_tests+=( "main.information_schema;0;Requires USE=latin1" )
+ disabled_tests+=( "main.sp2;24177;Requires USE=latin1" )
+ disabled_tests+=( "main.system_mysql_db;0;Requires USE=latin1" )
+ fi
+
+ local test_infos_str test_infos_arr
+ for test_infos_str in "${disabled_tests[@]}" ; do
+ IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+ if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+ die "Invalid test data set, not matching format: ${test_infos_str}"
+ fi
+
+ _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+ done
+ unset test_infos_str test_infos_arr
+
+ # run mysql-test tests
+ pushd "${TESTDIR}" &>/dev/null || die
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ cmake_src_install
+
+ # 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
+}
+
+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
+}
+
+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'@'localhost' 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.2.36.ebuild b/dev-db/mariadb/mariadb-10.2.36.ebuild
new file mode 100644
index 000000000000..e001ca8c8860
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.2.36.ebuild
@@ -0,0 +1,1018 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ multiprocessing java-pkg-opt-2 cmake
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.2.36-patches-01.tar.xz"
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
+ ${PATCH_SET}"
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="10.2/${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 ) !test? ( 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"
+
+# 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? ( sys-libs/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+"
+BDEPEND="virtual/yacc
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+"
+DEPEND="static? ( sys-libs/ncurses[static-libs] )
+ server? (
+ extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
+ test? ( acct-group/mysql acct-user/mysql )
+ )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ !dev-db/mariadb:0
+ !dev-db/mariadb:5.5
+ !dev-db/mariadb:10.1
+ !dev-db/mariadb:10.3
+ !dev-db/mariadb:10.4
+ !dev-db/mariadb:10.5
+ !<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] )
+ )
+ !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
+ extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
+ )
+ 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
+# 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 )
+ )
+ )
+ )"
+
+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_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
+
+ if has test ${FEATURES} ; then
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ fi
+ fi
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/mariadb-patches
+
+ eapply_user
+
+ _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 auth_ed25519 )
+ 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
+
+ # Fix galera_recovery.sh script
+ sed -i -e "s~@bindir@/my_print_defaults~${EPREFIX}/usr/libexec/mariadb/my_print_defaults~" \
+ scripts/galera_recovery.sh || die
+
+ cmake_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')"
+ -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_CLIENT_ED25519=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_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+ _disable_test() {
+ local rawtestname bug reason
+ rawtestname="${1}" ; shift
+ bug="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+ echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ if [[ -z "${MTR_PARALLEL}" ]] ; then
+ local -x MTR_PARALLEL=$(makeopts_jobs)
+
+ if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+ # Running multiple tests in parallel usually require higher ulimit
+ # and fs.aio-max-nr setting. In addition, tests like main.multi_update
+ # are known to hit timeout when system is busy.
+ # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+ # using "auto".
+ local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+ info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+ einfo "${info_msg}"
+ unset info_msg
+ MTR_PARALLEL=4
+ fi
+ else
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+ fi
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ cp "${S}"/mysql-test/unstable-tests "${T}/disabled.def" || die
+
+ local -a disabled_tests
+ disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
+ disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
+ disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
+ disabled_tests+=( "main.grant;0;Sporadically failing test" )
+ disabled_tests+=( "main.join_cache;0;Sporadically failing test" )
+ disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
+ disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
+ disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
+ disabled_tests+=( "mariabackup.*;0;Broken test suite" )
+ disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" )
+ disabled_tests+=( "plugins.cracklib_password_check;0;False positive due to varying policies" )
+ disabled_tests+=( "plugins.two_password_validations;0;False positive due to varying policies" )
+ disabled_tests+=( "roles.acl_statistics;0;False positive due to a user count mismatch caused by previous test" )
+
+ if ! use latin1 ; then
+ disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
+ disabled_tests+=( "main.information_schema;0;Requires USE=latin1" )
+ disabled_tests+=( "main.sp2;24177;Requires USE=latin1" )
+ disabled_tests+=( "main.system_mysql_db;0;Requires USE=latin1" )
+ fi
+
+ local test_infos_str test_infos_arr
+ for test_infos_str in "${disabled_tests[@]}" ; do
+ IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+ if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+ die "Invalid test data set, not matching format: ${test_infos_str}"
+ fi
+
+ _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+ done
+ unset test_infos_str test_infos_arr
+
+ # run mysql-test tests
+ pushd "${TESTDIR}" &>/dev/null || die
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ cmake_src_install
+
+ # 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
+}
+
+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
+}
+
+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'@'localhost' 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.23-r2.ebuild b/dev-db/mariadb/mariadb-10.3.23-r3.ebuild
index 815d86f66db1..f88cc3ce89f2 100644
--- a/dev-db/mariadb/mariadb-10.3.23-r2.ebuild
+++ b/dev-db/mariadb/mariadb-10.3.23-r3.ebuild
@@ -35,7 +35,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
@@ -238,6 +238,7 @@ src_unpack() {
src_prepare() {
eapply "${WORKDIR}"/mariadb-patches
+ eapply "${FILESDIR}"/mariadb-10.3-CVE-2020-15180.patch
eapply_user
diff --git a/dev-db/mariadb/mariadb-10.3.24.ebuild b/dev-db/mariadb/mariadb-10.3.25.ebuild
index d32933c9d720..d32933c9d720 100644
--- a/dev-db/mariadb/mariadb-10.3.24.ebuild
+++ b/dev-db/mariadb/mariadb-10.3.25.ebuild
diff --git a/dev-db/mariadb/mariadb-10.3.26.ebuild b/dev-db/mariadb/mariadb-10.3.26.ebuild
new file mode 100644
index 000000000000..6b4155f14568
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.3.26.ebuild
@@ -0,0 +1,1009 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ multiprocessing java-pkg-opt-2 cmake
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.3.26-patches-01.tar.xz"
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
+ ${PATCH_SET}"
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="10.3/${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 ) !test? ( 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"
+
+# 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? ( sys-libs/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+"
+BDEPEND="virtual/yacc
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+"
+DEPEND="static? ( sys-libs/ncurses[static-libs] )
+ server? (
+ extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
+ test? ( acct-group/mysql acct-user/mysql )
+ )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ !dev-db/mariadb:0
+ !dev-db/mariadb:5.5
+ !dev-db/mariadb:10.1
+ !dev-db/mariadb:10.2
+ !dev-db/mariadb:10.4
+ !dev-db/mariadb:10.5
+ !<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] )
+ )
+ !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
+ extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
+ )
+ 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 )"
+
+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_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
+
+ if has test ${FEATURES} ; then
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ fi
+ fi
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/mariadb-patches
+
+ eapply_user
+
+ _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 auth_ed25519 )
+ 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
+
+ # Fix galera_recovery.sh script
+ sed -i -e "s~@bindir@/my_print_defaults~${EPREFIX}/usr/libexec/mariadb/my_print_defaults~" \
+ scripts/galera_recovery.sh || die
+
+ cmake_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')"
+ -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_CLIENT_ED25519=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_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+ _disable_test() {
+ local rawtestname bug reason
+ rawtestname="${1}" ; shift
+ bug="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+ echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ if [[ -z "${MTR_PARALLEL}" ]] ; then
+ local -x MTR_PARALLEL=$(makeopts_jobs)
+
+ if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+ # Running multiple tests in parallel usually require higher ulimit
+ # and fs.aio-max-nr setting. In addition, tests like main.multi_update
+ # are known to hit timeout when system is busy.
+ # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+ # using "auto".
+ local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+ info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+ einfo "${info_msg}"
+ unset info_msg
+ MTR_PARALLEL=4
+ fi
+ else
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+ fi
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ cp "${S}"/mysql-test/unstable-tests "${T}/disabled.def" || die
+
+ local -a disabled_tests
+ disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
+ disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
+ disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
+ disabled_tests+=( "main.grant;0;Sporadically failing test" )
+ disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
+ disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
+ disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
+ disabled_tests+=( "mariabackup.*;0;Broken test suite" )
+ disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" )
+ disabled_tests+=( "plugins.cracklib_password_check;0;False positive due to varying policies" )
+ disabled_tests+=( "plugins.two_password_validations;0;False positive due to varying policies" )
+ disabled_tests+=( "roles.acl_statistics;0;False positive due to a user count mismatch caused by previous test" )
+
+ if ! use latin1 ; then
+ disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
+ disabled_tests+=( "main.information_schema;0;Requires USE=latin1" )
+ disabled_tests+=( "main.sp2;24177;Requires USE=latin1" )
+ disabled_tests+=( "main.system_mysql_db;0;Requires USE=latin1" )
+ fi
+
+ local test_infos_str test_infos_arr
+ for test_infos_str in "${disabled_tests[@]}" ; do
+ IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+ if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+ die "Invalid test data set, not matching format: ${test_infos_str}"
+ fi
+
+ _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+ done
+ unset test_infos_str test_infos_arr
+
+ # run mysql-test tests
+ pushd "${TESTDIR}" &>/dev/null || die
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ cmake_src_install
+
+ # 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
+}
+
+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
+}
+
+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'@'localhost' 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.27.ebuild b/dev-db/mariadb/mariadb-10.3.27.ebuild
new file mode 100644
index 000000000000..81597d3cfca7
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.3.27.ebuild
@@ -0,0 +1,1009 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ multiprocessing java-pkg-opt-2 cmake
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.3.27-patches-01.tar.xz"
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
+ ${PATCH_SET}"
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="10.3/${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 ) !test? ( 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"
+
+# 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? ( sys-libs/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+"
+BDEPEND="virtual/yacc
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+"
+DEPEND="static? ( sys-libs/ncurses[static-libs] )
+ server? (
+ extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
+ test? ( acct-group/mysql acct-user/mysql )
+ )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ !dev-db/mariadb:0
+ !dev-db/mariadb:5.5
+ !dev-db/mariadb:10.1
+ !dev-db/mariadb:10.2
+ !dev-db/mariadb:10.4
+ !dev-db/mariadb:10.5
+ !<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] )
+ )
+ !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
+ extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
+ )
+ 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 )"
+
+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_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
+
+ if has test ${FEATURES} ; then
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ fi
+ fi
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/mariadb-patches
+
+ eapply_user
+
+ _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 auth_ed25519 )
+ 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
+
+ # Fix galera_recovery.sh script
+ sed -i -e "s~@bindir@/my_print_defaults~${EPREFIX}/usr/libexec/mariadb/my_print_defaults~" \
+ scripts/galera_recovery.sh || die
+
+ cmake_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')"
+ -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_CLIENT_ED25519=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_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+ _disable_test() {
+ local rawtestname bug reason
+ rawtestname="${1}" ; shift
+ bug="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+ echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ if [[ -z "${MTR_PARALLEL}" ]] ; then
+ local -x MTR_PARALLEL=$(makeopts_jobs)
+
+ if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+ # Running multiple tests in parallel usually require higher ulimit
+ # and fs.aio-max-nr setting. In addition, tests like main.multi_update
+ # are known to hit timeout when system is busy.
+ # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+ # using "auto".
+ local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+ info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+ einfo "${info_msg}"
+ unset info_msg
+ MTR_PARALLEL=4
+ fi
+ else
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+ fi
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ cp "${S}"/mysql-test/unstable-tests "${T}/disabled.def" || die
+
+ local -a disabled_tests
+ disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
+ disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
+ disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
+ disabled_tests+=( "main.grant;0;Sporadically failing test" )
+ disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
+ disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
+ disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
+ disabled_tests+=( "mariabackup.*;0;Broken test suite" )
+ disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" )
+ disabled_tests+=( "plugins.cracklib_password_check;0;False positive due to varying policies" )
+ disabled_tests+=( "plugins.two_password_validations;0;False positive due to varying policies" )
+ disabled_tests+=( "roles.acl_statistics;0;False positive due to a user count mismatch caused by previous test" )
+
+ if ! use latin1 ; then
+ disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
+ disabled_tests+=( "main.information_schema;0;Requires USE=latin1" )
+ disabled_tests+=( "main.sp2;24177;Requires USE=latin1" )
+ disabled_tests+=( "main.system_mysql_db;0;Requires USE=latin1" )
+ fi
+
+ local test_infos_str test_infos_arr
+ for test_infos_str in "${disabled_tests[@]}" ; do
+ IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+ if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+ die "Invalid test data set, not matching format: ${test_infos_str}"
+ fi
+
+ _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+ done
+ unset test_infos_str test_infos_arr
+
+ # run mysql-test tests
+ pushd "${TESTDIR}" &>/dev/null || die
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ cmake_src_install
+
+ # 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
+}
+
+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
+}
+
+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'@'localhost' 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.13-r2.ebuild b/dev-db/mariadb/mariadb-10.4.13-r3.ebuild
index f879d6f9a0ef..9e8d9744449c 100644
--- a/dev-db/mariadb/mariadb-10.4.13-r2.ebuild
+++ b/dev-db/mariadb/mariadb-10.4.13-r3.ebuild
@@ -33,7 +33,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
@@ -223,6 +223,7 @@ src_unpack() {
src_prepare() {
eapply "${WORKDIR}"/mariadb-patches
+ eapply "${FILESDIR}"/mariadb-10.4-CVE-2020-15180.patch
eapply_user
diff --git a/dev-db/mariadb/mariadb-10.4.14.ebuild b/dev-db/mariadb/mariadb-10.4.15.ebuild
index 2f7ec2673f4b..2f7ec2673f4b 100644
--- a/dev-db/mariadb/mariadb-10.4.14.ebuild
+++ b/dev-db/mariadb/mariadb-10.4.15.ebuild
diff --git a/dev-db/mariadb/mariadb-10.4.16.ebuild b/dev-db/mariadb/mariadb-10.4.16.ebuild
new file mode 100644
index 000000000000..5dce53952b85
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.4.16.ebuild
@@ -0,0 +1,1040 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ multiprocessing java-pkg-opt-2 cmake
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.4.16-patches-01.tar.xz"
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
+ ${PATCH_SET}"
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="10.4/${SUBSLOT:-0}"
+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
+ test tokudb xml yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test ) !test? ( 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"
+
+# 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? ( sys-libs/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+"
+BDEPEND="virtual/yacc
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+"
+DEPEND="static? ( sys-libs/ncurses[static-libs] )
+ server? (
+ extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
+ test? ( acct-group/mysql acct-user/mysql )
+ )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ !dev-db/mariadb:0
+ !dev-db/mariadb:5.5
+ !dev-db/mariadb:10.1
+ !dev-db/mariadb:10.2
+ !dev-db/mariadb:10.3
+ !dev-db/mariadb:10.5
+ !<virtual/mysql-5.6-r11
+ !<virtual/libmysqlclient-18-r1
+ ${COMMON_DEPEND}
+ server? (
+ galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-26*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ )
+ !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
+ extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
+ )
+ 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 )"
+
+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_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
+
+ if has test ${FEATURES} ; then
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ fi
+ fi
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/mariadb-patches
+
+ eapply_user
+
+ _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 auth_ed25519 )
+ 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
+ echo > "${S}/plugin/auth_pam/testing/CMakeLists.txt" || die
+ 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
+
+ # Fix static bindings in galera replication
+ sed -i -e 's~add_library(wsrep_api_v26$~add_library(wsrep_api_v26 STATIC~' \
+ "${S}"/wsrep-lib/wsrep-API/CMakeLists.txt || die
+ sed -i -e 's~add_library(wsrep-lib$~add_library(wsrep-lib STATIC~' \
+ "${S}"/wsrep-lib/src/CMakeLists.txt || die
+
+ # Fix galera_recovery.sh script
+ sed -i -e "s~@bindir@/my_print_defaults~${EPREFIX}/usr/libexec/mariadb/my_print_defaults~" \
+ scripts/galera_recovery.sh || die
+
+ sed -i -e 's~ \$basedir/lib/\*/mariadb19/plugin~~' \
+ "${S}"/scripts/mysql_install_db.sh || die
+
+ cmake_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]"
+
+ # It fails on alpha without this
+ use alpha && append-ldflags "-Wl,--no-relax"
+
+ append-cxxflags -felide-constructors
+
+ # bug #283926, with GCC4.4, this is required to get correct behavior.
+ append-flags -fno-strict-aliasing
+
+ CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+ # debug hack wrt #497532
+ mycmakeargs=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+ -DSYSCONFDIR="${EPREFIX}/etc/mysql"
+ -DINSTALL_BINDIR=bin
+ -DINSTALL_DOCDIR=share/doc/${PF}
+ -DINSTALL_DOCREADMEDIR=share/doc/${PF}
+ -DINSTALL_INCLUDEDIR=include/mysql
+ -DINSTALL_INFODIR=share/info
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DINSTALL_MANDIR=share/man
+ -DINSTALL_MYSQLSHAREDIR=share/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_CLIENT_ED25519=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_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+ _disable_test() {
+ local rawtestname bug reason
+ rawtestname="${1}" ; shift
+ bug="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+ echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ if [[ -z "${MTR_PARALLEL}" ]] ; then
+ local -x MTR_PARALLEL=$(makeopts_jobs)
+
+ if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+ # Running multiple tests in parallel usually require higher ulimit
+ # and fs.aio-max-nr setting. In addition, tests like main.multi_update
+ # are known to hit timeout when system is busy.
+ # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+ # using "auto".
+ local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+ info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+ einfo "${info_msg}"
+ unset info_msg
+ MTR_PARALLEL=4
+ fi
+ else
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+ fi
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ cp "${S}"/mysql-test/unstable-tests "${T}/disabled.def" || die
+
+ local -a disabled_tests
+ disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
+ disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
+ disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
+ disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
+ disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
+ disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
+ disabled_tests+=( "mariabackup.*;0;Broken test suite" )
+ disabled_tests+=( "perfschema.nesting;23458;Known to be broken" )
+ disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" )
+ disabled_tests+=( "plugins.cracklib_password_check;0;False positive due to varying policies" )
+ disabled_tests+=( "plugins.two_password_validations;0;False positive due to varying policies" )
+ disabled_tests+=( "roles.acl_statistics;0;False positive due to a user count mismatch caused by previous test" )
+
+ if ! use latin1 ; then
+ disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
+ disabled_tests+=( "main.information_schema;0;Requires USE=latin1" )
+ disabled_tests+=( "main.sp2;24177;Requires USE=latin1" )
+ disabled_tests+=( "main.system_mysql_db;0;Requires USE=latin1" )
+ disabled_tests+=( "main.upgrade_MDEV-19650;24178;Requires USE=latin1" )
+ fi
+
+ local test_infos_str test_infos_arr
+ for test_infos_str in "${disabled_tests[@]}" ; do
+ IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+ if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+ die "Invalid test data set, not matching format: ${test_infos_str}"
+ fi
+
+ _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+ done
+ unset test_infos_str test_infos_arr
+
+ # run mysql-test tests
+ pushd "${TESTDIR}" &>/dev/null || die
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ cmake_src_install
+
+ # 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"
+
+ if use pam ; then
+ keepdir /usr/$(get_libdir)/mariadb/plugin/auth_pam_tool_dir
+ fi
+ 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
+}
+
+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
+ chown mysql:mysql "${EROOT}/usr/$(get_libdir)/mariadb/plugin/auth_pam_tool_dir" || die
+ 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 [[ -n "${REPLACING_VERSIONS}" ]] ; then
+ local rver
+ for rver in ${REPLACING_VERSIONS} ; do
+ if ver_test "${rver}" -lt "10.4.0" ; then
+ ewarn "Upgrading galera from a previous version requires admin restart of the entire cluster."
+ ewarn "Please refer to https://mariadb.com/kb/en/library/changes-improvements-in-mariadb-104/#galera-4"
+ ewarn "for more information"
+ fi
+ done
+ 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
+}
+
+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'@'localhost' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "Avoid [\"'\\_%] characters in the password"
+ einfo "Not entering a password defaults to UNIX authentication"
+ read -rsp " >" pwd1 ; echo
+
+ if [[ -n "${pwd1}" ]] ; then
+ 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}"
+ fi
+
+ 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 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"
+
+ if [[ -z ${sqltmp} && -z ${MYSQL_ROOT_PASSWORD} ]] ; then
+ einfo "Done"
+ exit 0
+ fi
+
+ 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
+
+ if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}')"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ unset sql
+ eend $?
+ fi
+
+ 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.17.ebuild b/dev-db/mariadb/mariadb-10.4.17.ebuild
new file mode 100644
index 000000000000..0f9094b3d05b
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.4.17.ebuild
@@ -0,0 +1,1040 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ multiprocessing java-pkg-opt-2 cmake
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.4.17-patches-01.tar.xz"
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
+ ${PATCH_SET}"
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="10.4/${SUBSLOT:-0}"
+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
+ test tokudb xml yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test ) !test? ( 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"
+
+# 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? ( sys-libs/pam:0= )
+ systemd? ( sys-apps/systemd:= )
+ tokudb? ( app-arch/snappy )
+ )
+ >=dev-libs/libpcre-8.41-r1:3=
+"
+BDEPEND="virtual/yacc
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+"
+DEPEND="static? ( sys-libs/ncurses[static-libs] )
+ server? (
+ extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
+ test? ( acct-group/mysql acct-user/mysql )
+ )
+ ${COMMON_DEPEND}"
+RDEPEND="selinux? ( sec-policy/selinux-mysql )
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ !dev-db/mariadb:0
+ !dev-db/mariadb:5.5
+ !dev-db/mariadb:10.1
+ !dev-db/mariadb:10.2
+ !dev-db/mariadb:10.3
+ !dev-db/mariadb:10.5
+ !<virtual/mysql-5.6-r11
+ !<virtual/libmysqlclient-18-r1
+ ${COMMON_DEPEND}
+ server? (
+ galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-26*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ )
+ !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
+ extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
+ )
+ 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 )"
+
+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_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
+
+ if has test ${FEATURES} ; then
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ fi
+ fi
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/mariadb-patches
+
+ eapply_user
+
+ _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 auth_ed25519 )
+ 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
+ echo > "${S}/plugin/auth_pam/testing/CMakeLists.txt" || die
+ 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
+
+ # Fix static bindings in galera replication
+ sed -i -e 's~add_library(wsrep_api_v26$~add_library(wsrep_api_v26 STATIC~' \
+ "${S}"/wsrep-lib/wsrep-API/CMakeLists.txt || die
+ sed -i -e 's~add_library(wsrep-lib$~add_library(wsrep-lib STATIC~' \
+ "${S}"/wsrep-lib/src/CMakeLists.txt || die
+
+ # Fix galera_recovery.sh script
+ sed -i -e "s~@bindir@/my_print_defaults~${EPREFIX}/usr/libexec/mariadb/my_print_defaults~" \
+ scripts/galera_recovery.sh || die
+
+ sed -i -e 's~ \$basedir/lib/\*/mariadb19/plugin~~' \
+ "${S}"/scripts/mysql_install_db.sh || die
+
+ cmake_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]"
+
+ # It fails on alpha without this
+ use alpha && append-ldflags "-Wl,--no-relax"
+
+ append-cxxflags -felide-constructors
+
+ # bug #283926, with GCC4.4, this is required to get correct behavior.
+ append-flags -fno-strict-aliasing
+
+ CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+ # debug hack wrt #497532
+ mycmakeargs=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+ -DSYSCONFDIR="${EPREFIX}/etc/mysql"
+ -DINSTALL_BINDIR=bin
+ -DINSTALL_DOCDIR=share/doc/${PF}
+ -DINSTALL_DOCREADMEDIR=share/doc/${PF}
+ -DINSTALL_INCLUDEDIR=include/mysql
+ -DINSTALL_INFODIR=share/info
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DINSTALL_MANDIR=share/man
+ -DINSTALL_MYSQLSHAREDIR=share/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_CLIENT_ED25519=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_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+ _disable_test() {
+ local rawtestname bug reason
+ rawtestname="${1}" ; shift
+ bug="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+ echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ if [[ -z "${MTR_PARALLEL}" ]] ; then
+ local -x MTR_PARALLEL=$(makeopts_jobs)
+
+ if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+ # Running multiple tests in parallel usually require higher ulimit
+ # and fs.aio-max-nr setting. In addition, tests like main.multi_update
+ # are known to hit timeout when system is busy.
+ # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+ # using "auto".
+ local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+ info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+ einfo "${info_msg}"
+ unset info_msg
+ MTR_PARALLEL=4
+ fi
+ else
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+ fi
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ cp "${S}"/mysql-test/unstable-tests "${T}/disabled.def" || die
+
+ local -a disabled_tests
+ disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
+ disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
+ disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
+ disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
+ disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
+ disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
+ disabled_tests+=( "mariabackup.*;0;Broken test suite" )
+ disabled_tests+=( "perfschema.nesting;23458;Known to be broken" )
+ disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" )
+ disabled_tests+=( "plugins.cracklib_password_check;0;False positive due to varying policies" )
+ disabled_tests+=( "plugins.two_password_validations;0;False positive due to varying policies" )
+ disabled_tests+=( "roles.acl_statistics;0;False positive due to a user count mismatch caused by previous test" )
+
+ if ! use latin1 ; then
+ disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
+ disabled_tests+=( "main.information_schema;0;Requires USE=latin1" )
+ disabled_tests+=( "main.sp2;24177;Requires USE=latin1" )
+ disabled_tests+=( "main.system_mysql_db;0;Requires USE=latin1" )
+ disabled_tests+=( "main.upgrade_MDEV-19650;24178;Requires USE=latin1" )
+ fi
+
+ local test_infos_str test_infos_arr
+ for test_infos_str in "${disabled_tests[@]}" ; do
+ IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+ if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+ die "Invalid test data set, not matching format: ${test_infos_str}"
+ fi
+
+ _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+ done
+ unset test_infos_str test_infos_arr
+
+ # run mysql-test tests
+ pushd "${TESTDIR}" &>/dev/null || die
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ cmake_src_install
+
+ # 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"
+
+ if use pam ; then
+ keepdir /usr/$(get_libdir)/mariadb/plugin/auth_pam_tool_dir
+ fi
+ 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
+}
+
+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
+ chown mysql:mysql "${EROOT}/usr/$(get_libdir)/mariadb/plugin/auth_pam_tool_dir" || die
+ 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 [[ -n "${REPLACING_VERSIONS}" ]] ; then
+ local rver
+ for rver in ${REPLACING_VERSIONS} ; do
+ if ver_test "${rver}" -lt "10.4.0" ; then
+ ewarn "Upgrading galera from a previous version requires admin restart of the entire cluster."
+ ewarn "Please refer to https://mariadb.com/kb/en/library/changes-improvements-in-mariadb-104/#galera-4"
+ ewarn "for more information"
+ fi
+ done
+ 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
+}
+
+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'@'localhost' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "Avoid [\"'\\_%] characters in the password"
+ einfo "Not entering a password defaults to UNIX authentication"
+ read -rsp " >" pwd1 ; echo
+
+ if [[ -n "${pwd1}" ]] ; then
+ 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}"
+ fi
+
+ 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 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"
+
+ if [[ -z ${sqltmp} && -z ${MYSQL_ROOT_PASSWORD} ]] ; then
+ einfo "Done"
+ exit 0
+ fi
+
+ 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
+
+ if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}')"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ unset sql
+ eend $?
+ fi
+
+ 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.5.5.ebuild b/dev-db/mariadb/mariadb-10.5.6.ebuild
index 4e7506460884..4e7506460884 100644
--- a/dev-db/mariadb/mariadb-10.5.5.ebuild
+++ b/dev-db/mariadb/mariadb-10.5.6.ebuild
diff --git a/dev-db/mariadb/mariadb-10.5.7.ebuild b/dev-db/mariadb/mariadb-10.5.7.ebuild
new file mode 100644
index 000000000000..d3a58616945e
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.5.7.ebuild
@@ -0,0 +1,1035 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ multiprocessing java-pkg-opt-2 cmake
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.5.7-patches-02.tar.xz"
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
+ ${PATCH_SET}"
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="10.5/${SUBSLOT:-0}"
+IUSE="+backup bindist columnstore 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 s3 tcmalloc
+ test xml yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test ) !test? ( test )"
+
+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"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+ >=dev-libs/libpcre-8.41-r1:3=
+ >=sys-apps/sed-4
+ >=sys-apps/texinfo-4.7-r1
+ sys-libs/ncurses:0=
+ >=sys-libs/zlib-1.2.3:0=
+ !bindist? (
+ sys-libs/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ jemalloc? ( dev-libs/jemalloc:0= )
+ kerberos? ( virtual/krb5 )
+ kernel_linux? (
+ sys-process/procps:0=
+ dev-libs/libaio:0=
+ )
+ server? (
+ app-arch/bzip2
+ app-arch/xz-utils
+ backup? ( app-arch/libarchive:0= )
+ columnstore? (
+ app-arch/snappy
+ dev-libs/boost:0=
+ dev-libs/libxml2:2=
+ )
+ 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? ( sys-libs/pam:0= )
+ s3? ( net-misc/curl )
+ systemd? ( sys-apps/systemd:= )
+ )
+ systemtap? ( >=dev-util/systemtap-1.3:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ yassl? ( net-libs/gnutls:0= )
+ !yassl? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+"
+BDEPEND="virtual/yacc
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+"
+DEPEND="${COMMON_DEPEND}
+ server? (
+ extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
+ test? ( acct-group/mysql acct-user/mysql )
+ )
+ static? ( sys-libs/ncurses[static-libs] )
+"
+RDEPEND="${COMMON_DEPEND}
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ !dev-db/mariadb:0
+ !dev-db/mariadb:5.5
+ !dev-db/mariadb:10.1
+ !dev-db/mariadb:10.2
+ !dev-db/mariadb:10.3
+ !dev-db/mariadb:10.4
+ !<virtual/mysql-5.6-r11
+ !<virtual/libmysqlclient-18-r1
+ selinux? ( sec-policy/selinux-mysql )
+ server? (
+ columnstore? ( dev-db/mariadb-connector-c )
+ extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
+ galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-26*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ )
+ !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
+ )
+ 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 )"
+
+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_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ local GCC_MAJOR_SET=$(gcc-major-version)
+ local GCC_MINOR_SET=$(gcc-minor-version)
+
+ # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
+ # non x86{,_64} arches
+ if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+
+ if has test ${FEATURES} ; then
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ fi
+ fi
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/mariadb-patches
+
+ eapply_user
+
+ _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(mariadbd jemalloc)" >> "${S}/sql/CMakeLists.txt"
+ elif use tcmalloc; then
+ echo "TARGET_LINK_LIBRARIES(mariadbd tcmalloc)" >> "${S}/sql/CMakeLists.txt"
+ fi
+
+ local plugin
+ local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
+ locale_info qc_info server_audit sql_errlog auth_ed25519 )
+ 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
+ echo > "${S}/plugin/auth_pam/testing/CMakeLists.txt" || die
+ 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
+
+ # Fix static bindings in galera replication
+ sed -i -e 's~add_library(wsrep_api_v26$~add_library(wsrep_api_v26 STATIC~' \
+ "${S}"/wsrep-lib/wsrep-API/CMakeLists.txt || die
+ sed -i -e 's~add_library(wsrep-lib$~add_library(wsrep-lib STATIC~' \
+ "${S}"/wsrep-lib/src/CMakeLists.txt || die
+
+ # Fix galera_recovery.sh script
+ sed -i -e "s~@bindir@/my_print_defaults~${EPREFIX}/usr/libexec/mariadb/my_print_defaults~" \
+ scripts/galera_recovery.sh || die
+
+ sed -i -e 's~ \$basedir/lib/\*/mariadb19/plugin~~' \
+ "${S}"/scripts/mysql_install_db.sh || die
+
+ cmake_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]"
+
+ # It fails on alpha without this
+ use alpha && append-ldflags "-Wl,--no-relax"
+
+ append-cxxflags -felide-constructors
+
+ # bug #283926, with GCC4.4, this is required to get correct behavior.
+ append-flags -fno-strict-aliasing
+
+ CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+ # debug hack wrt #497532
+ mycmakeargs=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+ -DSYSCONFDIR="${EPREFIX}/etc/mysql"
+ -DINSTALL_BINDIR=bin
+ -DINSTALL_DOCDIR=share/doc/${PF}
+ -DINSTALL_DOCREADMEDIR=share/doc/${PF}
+ -DINSTALL_INCLUDEDIR=include/mysql
+ -DINSTALL_INFODIR=share/info
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DINSTALL_MANDIR=share/man
+ -DINSTALL_MYSQLSHAREDIR=share/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_CLIENT_ED25519=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_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_S3=$(usex s3 YES NO)
+ -DPLUGIN_COLUMNSTORE=$(usex columnstore 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)
+ )
+
+ 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_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+ _disable_test() {
+ local rawtestname bug reason
+ rawtestname="${1}" ; shift
+ bug="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+ echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ if [[ -z "${MTR_PARALLEL}" ]] ; then
+ local -x MTR_PARALLEL=$(makeopts_jobs)
+
+ if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+ # Running multiple tests in parallel usually require higher ulimit
+ # and fs.aio-max-nr setting. In addition, tests like main.multi_update
+ # are known to hit timeout when system is busy.
+ # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+ # using "auto".
+ local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+ info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+ einfo "${info_msg}"
+ unset info_msg
+ MTR_PARALLEL=4
+ fi
+ else
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+ fi
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ cp "${S}"/mysql-test/unstable-tests "${T}/disabled.def" || die
+
+ local -a disabled_tests
+ disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
+ disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
+ disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
+ disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
+ disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
+ disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
+ disabled_tests+=( "mariabackup.*;0;Broken test suite" )
+ disabled_tests+=( "perfschema.nesting;23458;Known to be broken" )
+ disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" )
+ disabled_tests+=( "plugins.cracklib_password_check;0;False positive due to varying policies" )
+ disabled_tests+=( "plugins.two_password_validations;0;False positive due to varying policies" )
+ disabled_tests+=( "roles.acl_statistics;0;False positive due to a user count mismatch caused by previous test" )
+
+ if ! use latin1 ; then
+ disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
+ disabled_tests+=( "main.information_schema;0;Requires USE=latin1" )
+ disabled_tests+=( "main.sp2;24177;Requires USE=latin1" )
+ disabled_tests+=( "main.system_mysql_db;0;Requires USE=latin1" )
+ disabled_tests+=( "main.upgrade_MDEV-19650;24178;Requires USE=latin1" )
+ fi
+
+ local test_infos_str test_infos_arr
+ for test_infos_str in "${disabled_tests[@]}" ; do
+ IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+ if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+ die "Invalid test data set, not matching format: ${test_infos_str}"
+ fi
+
+ _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+ done
+ unset test_infos_str test_infos_arr
+
+ # run mysql-test tests
+ pushd "${TESTDIR}" &>/dev/null || die
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ cmake_src_install
+
+ # 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"
+
+ if use pam ; then
+ keepdir /usr/$(get_libdir)/mariadb/plugin/auth_pam_tool_dir
+ fi
+ 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
+}
+
+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
+ chown mysql:mysql "${EROOT}/usr/$(get_libdir)/mariadb/plugin/auth_pam_tool_dir" || die
+ 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 [[ -n "${REPLACING_VERSIONS}" ]] ; then
+ local rver
+ for rver in ${REPLACING_VERSIONS} ; do
+ if ver_test "${rver}" -lt "10.4.0" ; then
+ ewarn "Upgrading galera from a previous version requires admin restart of the entire cluster."
+ ewarn "Please refer to https://mariadb.com/kb/en/library/changes-improvements-in-mariadb-104/#galera-4"
+ ewarn "for more information"
+ fi
+ done
+ 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
+}
+
+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'@'localhost' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "Avoid [\"'\\_%] characters in the password"
+ einfo "Not entering a password defaults to UNIX authentication"
+ read -rsp " >" pwd1 ; echo
+
+ if [[ -n "${pwd1}" ]] ; then
+ 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}"
+ fi
+
+ 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 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"
+
+ if [[ -z ${sqltmp} && -z ${MYSQL_ROOT_PASSWORD} ]] ; then
+ einfo "Done"
+ exit 0
+ fi
+
+ 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
+
+ if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}')"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ unset sql
+ eend $?
+ fi
+
+ 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.5.8.ebuild b/dev-db/mariadb/mariadb-10.5.8.ebuild
new file mode 100644
index 000000000000..ab96026631a9
--- /dev/null
+++ b/dev-db/mariadb/mariadb-10.5.8.ebuild
@@ -0,0 +1,1035 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+SUBSLOT="18"
+
+JAVA_PKG_OPT_USE="jdbc"
+
+inherit eutils systemd flag-o-matic prefix toolchain-funcs \
+ multiprocessing java-pkg-opt-2 cmake
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/${PN}/${PN}-10.5.8-patches-01.tar.xz"
+
+SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz
+ ${PATCH_SET}"
+
+HOMEPAGE="https://mariadb.org/"
+DESCRIPTION="An enhanced, drop-in replacement for MySQL"
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="10.5/${SUBSLOT:-0}"
+IUSE="+backup bindist columnstore 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 s3 tcmalloc
+ test xml yassl"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!bindist? ( bindist ) libressl? ( test ) !test? ( test )"
+
+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"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+ >=dev-libs/libpcre-8.41-r1:3=
+ >=sys-apps/sed-4
+ >=sys-apps/texinfo-4.7-r1
+ sys-libs/ncurses:0=
+ >=sys-libs/zlib-1.2.3:0=
+ !bindist? (
+ sys-libs/binutils-libs:0=
+ >=sys-libs/readline-4.1:0=
+ )
+ jemalloc? ( dev-libs/jemalloc:0= )
+ kerberos? ( virtual/krb5 )
+ kernel_linux? (
+ sys-process/procps:0=
+ dev-libs/libaio:0=
+ )
+ server? (
+ app-arch/bzip2
+ app-arch/xz-utils
+ backup? ( app-arch/libarchive:0= )
+ columnstore? (
+ app-arch/snappy
+ dev-libs/boost:0=
+ dev-libs/libxml2:2=
+ )
+ 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? ( sys-libs/pam:0= )
+ s3? ( net-misc/curl )
+ systemd? ( sys-apps/systemd:= )
+ )
+ systemtap? ( >=dev-util/systemtap-1.3:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ yassl? ( net-libs/gnutls:0= )
+ !yassl? (
+ !libressl? ( >=dev-libs/openssl-1.0.0:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+"
+BDEPEND="virtual/yacc
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+"
+DEPEND="${COMMON_DEPEND}
+ server? (
+ extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) )
+ test? ( acct-group/mysql acct-user/mysql )
+ )
+ static? ( sys-libs/ncurses[static-libs] )
+"
+RDEPEND="${COMMON_DEPEND}
+ !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ !dev-db/mariadb:0
+ !dev-db/mariadb:5.5
+ !dev-db/mariadb:10.1
+ !dev-db/mariadb:10.2
+ !dev-db/mariadb:10.3
+ !dev-db/mariadb:10.4
+ !<virtual/mysql-5.6-r11
+ !<virtual/libmysqlclient-18-r1
+ selinux? ( sec-policy/selinux-mysql )
+ server? (
+ columnstore? ( dev-db/mariadb-connector-c )
+ extraengine? ( jdbc? ( >=virtual/jre-1.6 ) )
+ galera? (
+ sys-apps/iproute2
+ =sys-cluster/galera-26*
+ sst-rsync? ( sys-process/lsof )
+ sst-mariabackup? ( net-misc/socat[ssl] )
+ )
+ !prefix? ( dev-db/mysql-init-scripts acct-group/mysql acct-user/mysql )
+ )
+ 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 )"
+
+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_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ local GCC_MAJOR_SET=$(gcc-major-version)
+ local GCC_MINOR_SET=$(gcc-minor-version)
+
+ # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
+ # non x86{,_64} arches
+ if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
+ ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
+ eerror "${PN} needs to be built with gcc-4.7 or later."
+ eerror "Please use gcc-config to switch to gcc-4.7 or later version."
+ die
+ fi
+
+ if has test ${FEATURES} ; then
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+ fi
+ fi
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/mariadb-patches
+
+ eapply_user
+
+ _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(mariadbd jemalloc)" >> "${S}/sql/CMakeLists.txt"
+ elif use tcmalloc; then
+ echo "TARGET_LINK_LIBRARIES(mariadbd tcmalloc)" >> "${S}/sql/CMakeLists.txt"
+ fi
+
+ local plugin
+ local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
+ locale_info qc_info server_audit sql_errlog auth_ed25519 )
+ 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
+ echo > "${S}/plugin/auth_pam/testing/CMakeLists.txt" || die
+ 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
+
+ # Fix static bindings in galera replication
+ sed -i -e 's~add_library(wsrep_api_v26$~add_library(wsrep_api_v26 STATIC~' \
+ "${S}"/wsrep-lib/wsrep-API/CMakeLists.txt || die
+ sed -i -e 's~add_library(wsrep-lib$~add_library(wsrep-lib STATIC~' \
+ "${S}"/wsrep-lib/src/CMakeLists.txt || die
+
+ # Fix galera_recovery.sh script
+ sed -i -e "s~@bindir@/my_print_defaults~${EPREFIX}/usr/libexec/mariadb/my_print_defaults~" \
+ scripts/galera_recovery.sh || die
+
+ sed -i -e 's~ \$basedir/lib/\*/mariadb19/plugin~~' \
+ "${S}"/scripts/mysql_install_db.sh || die
+
+ cmake_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]"
+
+ # It fails on alpha without this
+ use alpha && append-ldflags "-Wl,--no-relax"
+
+ append-cxxflags -felide-constructors
+
+ # bug #283926, with GCC4.4, this is required to get correct behavior.
+ append-flags -fno-strict-aliasing
+
+ CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+ # debug hack wrt #497532
+ mycmakeargs=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+ -DSYSCONFDIR="${EPREFIX}/etc/mysql"
+ -DINSTALL_BINDIR=bin
+ -DINSTALL_DOCDIR=share/doc/${PF}
+ -DINSTALL_DOCREADMEDIR=share/doc/${PF}
+ -DINSTALL_INCLUDEDIR=include/mysql
+ -DINSTALL_INFODIR=share/info
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DINSTALL_MANDIR=share/man
+ -DINSTALL_MYSQLSHAREDIR=share/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_CLIENT_ED25519=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_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_S3=$(usex s3 YES NO)
+ -DPLUGIN_COLUMNSTORE=$(usex columnstore 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)
+ )
+
+ 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_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+}
+
+# Official test instructions:
+# USE='extraengine perl server' \
+# FEATURES='test userpriv' \
+# ebuild mariadb-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+ _disable_test() {
+ local rawtestname bug reason
+ rawtestname="${1}" ; shift
+ bug="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+ echo "${rawtestname} : BUG#${bug} ${reason}" >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ if [[ -z "${MTR_PARALLEL}" ]] ; then
+ local -x MTR_PARALLEL=$(makeopts_jobs)
+
+ if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+ # Running multiple tests in parallel usually require higher ulimit
+ # and fs.aio-max-nr setting. In addition, tests like main.multi_update
+ # are known to hit timeout when system is busy.
+ # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+ # using "auto".
+ local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+ info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+ einfo "${info_msg}"
+ unset info_msg
+ MTR_PARALLEL=4
+ fi
+ else
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+ fi
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ cp "${S}"/mysql-test/unstable-tests "${T}/disabled.def" || die
+
+ local -a disabled_tests
+ disabled_tests+=( "compat/oracle.plugin;0;Needs example plugin which Gentoo disables" )
+ disabled_tests+=( "main.explain_non_select;0;Sporadically failing test" )
+ disabled_tests+=( "main.func_time;0;Dependent on time test was written" )
+ disabled_tests+=( "main.plugin_auth;0;Needs client libraries built" )
+ disabled_tests+=( "main.stat_tables;0;Sporadically failing test" )
+ disabled_tests+=( "main.stat_tables_innodb;0;Sporadically failing test" )
+ disabled_tests+=( "mariabackup.*;0;Broken test suite" )
+ disabled_tests+=( "perfschema.nesting;23458;Known to be broken" )
+ disabled_tests+=( "plugins.auth_ed25519;0;Needs client libraries built" )
+ disabled_tests+=( "plugins.cracklib_password_check;0;False positive due to varying policies" )
+ disabled_tests+=( "plugins.two_password_validations;0;False positive due to varying policies" )
+ disabled_tests+=( "roles.acl_statistics;0;False positive due to a user count mismatch caused by previous test" )
+
+ if ! use latin1 ; then
+ disabled_tests+=( "funcs_1.is_columns_mysql;0;Requires USE=latin1" )
+ disabled_tests+=( "main.information_schema;0;Requires USE=latin1" )
+ disabled_tests+=( "main.sp2;24177;Requires USE=latin1" )
+ disabled_tests+=( "main.system_mysql_db;0;Requires USE=latin1" )
+ disabled_tests+=( "main.upgrade_MDEV-19650;24178;Requires USE=latin1" )
+ fi
+
+ local test_infos_str test_infos_arr
+ for test_infos_str in "${disabled_tests[@]}" ; do
+ IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+ if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+ die "Invalid test data set, not matching format: ${test_infos_str}"
+ fi
+
+ _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+ done
+ unset test_infos_str test_infos_arr
+
+ # run mysql-test tests
+ pushd "${TESTDIR}" &>/dev/null || die
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ cmake_src_install
+
+ # 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"
+
+ if use pam ; then
+ keepdir /usr/$(get_libdir)/mariadb/plugin/auth_pam_tool_dir
+ fi
+ 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
+}
+
+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
+ chown mysql:mysql "${EROOT}/usr/$(get_libdir)/mariadb/plugin/auth_pam_tool_dir" || die
+ 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 [[ -n "${REPLACING_VERSIONS}" ]] ; then
+ local rver
+ for rver in ${REPLACING_VERSIONS} ; do
+ if ver_test "${rver}" -lt "10.4.0" ; then
+ ewarn "Upgrading galera from a previous version requires admin restart of the entire cluster."
+ ewarn "Please refer to https://mariadb.com/kb/en/library/changes-improvements-in-mariadb-104/#galera-4"
+ ewarn "for more information"
+ fi
+ done
+ 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
+}
+
+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'@'localhost' user now"
+ einfo "or through the ${HOME}/.my.cnf file."
+ ewarn "Avoid [\"'\\_%] characters in the password"
+ einfo "Not entering a password defaults to UNIX authentication"
+ read -rsp " >" pwd1 ; echo
+
+ if [[ -n "${pwd1}" ]] ; then
+ 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}"
+ fi
+
+ 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 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"
+
+ if [[ -z ${sqltmp} && -z ${MYSQL_ROOT_PASSWORD} ]] ; then
+ einfo "Done"
+ exit 0
+ fi
+
+ 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
+
+ if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}')"
+ "${EROOT}/usr/bin/mysql" \
+ "--socket=${socket}" \
+ -hlocalhost \
+ -e "${sql}"
+ unset sql
+ eend $?
+ fi
+
+ 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-5.5.68-r1.ebuild b/dev-db/mariadb/mariadb-5.5.68-r1.ebuild
deleted file mode 100644
index 017c5030683b..000000000000
--- a/dev-db/mariadb/mariadb-5.5.68-r1.ebuild
+++ /dev/null
@@ -1,841 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20200523-1221Z"
-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="5.5/${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 ) !test? ( 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-5.5.68.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? ( sys-libs/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
- !dev-db/mariadb:0
- !dev-db/mariadb:10.1
- !dev-db/mariadb:10.2
- !dev-db/mariadb:10.3
- !dev-db/mariadb:10.4
- !dev-db/mariadb:10.5
- 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
-
- # Don't clash with dev-db/mysql-connector-c
- sed -i -e 's/ my_print_defaults.1//' \
- -e 's/ perror.1//' \
- "${S}"/man/CMakeLists.txt || die
-
- 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')"
- -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/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 -n 1)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n 1)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n 1)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see https://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in grant-tables host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
- "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
-
- local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile} \
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- if [[ -n "${sqltmp}" ]] ; then
- ebegin "Loading \"zoneinfo\", this step may require a few seconds"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -uroot \
- --password="${MYSQL_ROOT_PASSWORD}" \
- mysql < "${sqltmp}"
- rc=$?
- eend $?
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
- fi
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
index 56d6ce4b9243..b93fd15516dd 100644
--- a/dev-db/mongodb/Manifest
+++ b/dev-db/mongodb/Manifest
@@ -3,6 +3,11 @@ AUX mongodb-3.6.1-no-compass.patch 2046 BLAKE2B e6b6977b69eb297c6a6340661f906e02
AUX mongodb-4.0.0-no-compass.patch 2270 BLAKE2B 66659a18d46755e6661b57e2ba020d7b967c455b0bfd5d198e0efd5bab1c0fdbb5def66b9e9fb54b34eb415e9b9231dcb6ba4b943d674e09685b47333af31d22 SHA512 e3b3adae4991e7687b191651f4c93471042bc8f56c5977743afec573fe026df3af1459b8bcbdb4f9995ecfbf83785ad56ccf46d6756429164b1f49524a36fed7
AUX mongodb-4.0.12-boost-1.71-cxxabi-include.patch 227 BLAKE2B 46a23c95581110282929f6a50f1bb9c2cb1bb8e3027f65a88246c9c16854c80bc809e7498ce5e28b7e9c73a21768f67724f1751f811cb7f787a10f9f6f7c6a85 SHA512 2e0fde98937f1cefe28dd5cb68f2b91910a09c014b0090fc7b742ac8a28863d5d9a50e961339374f14b95eaf1972dc02bb48d59daecdcd8c5d7acc1aed618fa5
AUX mongodb-4.2.0-fix-scons.patch 1174 BLAKE2B 748de9efdb743c836ccb26239d4b3e73632f19846e2c765e5a9fb6fa6c0bcfaf6cc31a63ba0ce54edf5c8a9d0923efd31ddf81fbc7196386d827f59a50b0b352 SHA512 6f971e8b4140068402b5e8cc738fbff1b54645f97e2f463fec37b124c7b93b8302fae25f9ea1f7f3261c93270e662e4cd876db3f092111e3bde0fcbc3eea33c4
+AUX mongodb-4.2.10-no-compass.patch 2151 BLAKE2B 724bf4e50c608f2336fcf587c78e68c713fb9b1469c5cf1203f1b155961daa16612ca13fd1fdc10326ebb587c7f339333f92f76d7c770fc043125cc1f931a594 SHA512 a13bea0614dfeb4fe2d81ad0448ecf2364ddd79a9d025f011fbd39c6da5a654e616424f91f7f88c32b00c780d9bc88c497f573b3f1b9a04849c67c4671a26c8d
+AUX mongodb-4.4.1-boost.patch 761 BLAKE2B 45295d05d23a8c2d72e333b14f06c40d32ff6c0610a244f71303fabf0bf0851d3a8a8c3df9f72aa7363a48a0b44bae45d81422970398f8b4f9753bab3dcf793a SHA512 504ec9a4e41f5e1c1a069d64e0958b260a3a8506d17638e62ddf6f1cd873b835f33a588b779e4851d63351faef4be1e0f4720e86f389128d062909b58fdb9aa2
+AUX mongodb-4.4.1-fix-scons.patch 1192 BLAKE2B 3fbb203ca07e1057cb53d1404eb118120990aad339143b5a5fa1e28b528d54dab4be201b82ebd483697485cc90f874db55323f1ae65a6a348f93004dfb23984f SHA512 b26f4d02ee22718278718b8baf20bd57cee7290fe2313a11c629234f29018effdeb1614bd01a98ff5cb62b6a0242acf3f553ea57277327c0d25092c4d80469cc
+AUX mongodb-4.4.1-no-compass.patch 1976 BLAKE2B e9bd55a6978309754ca112afc450eec218971314d2382fc03149dba8e584928870cfda84fca75736e1013481b4e5615cf2ec9df8ad0a8dda3f5a5b40da8fe997 SHA512 3a1495fbf79fcd9ff18bf457a0193d3d29a2a7c1c4886625dbc2fa2eaa9460f8fd96eee8b7c9d70bc7a9d1af9816f71dd347eccf837eff58da2daf4e11e15380
+AUX mongodb-4.4.1-unwind-gcc10.patch 386 BLAKE2B 45d1d7a84dfe99dde60ca27244b1c1b5f128b56cf57ebc4f5d75aa4c222a9434102b4bc0ba10193c5b40ea054d108f85c80144fcc03678d18b8e4c11036c5556 SHA512 d12af064ac2e57f8a173fec05b94391fa394fb144284afb1050c9c50ca714b226ee484e0984c5d4122e8470551e939302c1ee2121a17a9d2c583f942af0704e9
AUX mongodb.conf-r3 722 BLAKE2B c053bf101f5e3e38cc68f2bcbe7fb66ed9e55da9382d2412a497d68b478573390eddc5f284f76d56ca4792fe6241f6d1273a6585a98f96a1cb20530499a15904 SHA512 ef193bfed673477aa0e868114bd52be6675492c164f218c71ccd02c4a620b5c4799ea1d18df0c3f2b364027b9f25e60ac4475bb216b25e1dc10bfd00a9f5d45d
AUX mongodb.confd-r3 473 BLAKE2B b9d812cfb424309e117cf5c43ba8ee7bd4dadac78d6ebd1b0d3c2cdd04d14b334c8f2e26ee24c5ede1a8fe6500bda1b39a5422a3bc1eb8a2c4a8dde038db7997 SHA512 8a90fb39ad16837458a2add25a9b9059e2b356794cfbf3cb35c9ecd6a584ee300c67b49b5261e062eaf7aac593588e2871e5cf76ab2287e58ea342436d0afe56
AUX mongodb.initd-r3 438 BLAKE2B 9d846579cc11145ff2fc8de47d32f8f1971a44633bd197cd46d622e084d9a6eed4b277105430f126af90dd55224b5c3ee8c0a286a42922fe68cdb0b6758b9338 SHA512 480514b3285c0239421cc7b6a485cb2b7d650e507befe5281ac7aaf2094dd0afbba457df8a8bc2af3f1815b2e268ed85f1634a07e00a9b2024f79ab5e60ad040
@@ -13,12 +18,16 @@ AUX mongos.confd-r3 470 BLAKE2B 9cf6f201d337430901d957a5a0811ff11ac2e81814aac212
AUX mongos.initd-r3 422 BLAKE2B 90872d0d8cdc5e33e3eebee848f58a2db0511d48b496ba9318117b74ad9265ead53a21b7d1790729a62d61839099bee315ace8ff3646c01e096a943c2251bf88 SHA512 bf5897614d59c6b4e72529b126408a62ea37d9e9368e5ff69c8fcf2bad3ec09065cff09467f82117a892c51090018706d2f38c03cb9a974a61a49bd9efa0f144
DIST mongodb-src-r3.6.13.tar.gz 40853787 BLAKE2B de9621de4f570d569df5cfe026ea5da24641c97f1ac9f3e58a0706b1d0bd74757390a075c95c6d3acd12f3c5c7bcbeb9302ac997248c54a5b7910b582debdc82 SHA512 eb84fb22ff871b5ec620d6fc29a6a66072211656e914630ad0f53e4fcad55aa40a76a0e68e68bdbe8ef061bea09ce6ad6aea5d8d865ea8a8fdca0ed829555fcd
DIST mongodb-src-r3.6.17.tar.gz 40932592 BLAKE2B 94bbb943fd929318a2b32344cb4574243ad234d1cd14ffef864d7fd2d60841866fd5a1966eae8f14266a9648deb62b7b55386d41338b515d5e6849e980143d42 SHA512 b4d9e9bfc7ff886532641058c99da29420d1aa472cb4cf2b254e0fd0af5ecc72ac8bf28dcd55ab738b799b00132ffacddd154dea37ccfbf459c7cc603c2582e0
-DIST mongodb-src-r4.0.12.tar.gz 49937644 BLAKE2B 81044a6d68be6420d30fb2d7386ff29871a696cad94ce5977c1aba60c2ce80e18ccb86492c1947a359ef124332ea82ac3cb0fb73a68f51904a008fdf911aa055 SHA512 802eaf57d56c5e8e217344f10104a201acb6f5abef0065fc1bb8e6ceef13fe489b7ae46ed0d55b5bad50fe3579860b1c1471d224b51b0f15f968278cb5f6a47a
DIST mongodb-src-r4.0.19.tar.gz 50126414 BLAKE2B 2691e2a9c8833ff9a086b28fd137bc8e8f10d58570117657c7cc01edbf61568ae62f58440d72e8711de98b9fc6868c1095b4ee88eb7b0eb63ea45ce19e842edd SHA512 57032a009ea7e79de4cac496a2d1266b83b99cc45eb9f1169be2fcdca1ed2003a659ceedf9eafbd4aa7fc5b3b0513066a5d712af7666cee5a897b2a2d7dd30cb
+DIST mongodb-src-r4.0.20.tar.gz 50160192 BLAKE2B 3395399791b0620d3852b5d0a2ab2419f08127d909fac52035dd2624eb22660069401e71b036f449d8fd46be03b9e48ee548fb0c327b67c1eecc72a6ee9045b8 SHA512 dc18216d9096520b309ff769898fb65cf26f765eb74e5e0517617bdb0732c456620bbce351be5ad9f89bc72fea0b6d3afe13bd4cffe2c2b4ea06c9cb2b3b1696
+DIST mongodb-src-r4.2.10.tar.gz 61800545 BLAKE2B 773f3da589107d932808c30ee3bd09ec006b1c570884fbe6929ea4767581e951fd32b1771e9adf1e392ef97bd4c0e2b4ce5ce30c8bbbfbd63aa36b6ebaa8cbe4 SHA512 3947b2880bc0aaa958f26dfddfe79c7878f389eeeb8d0783360667124d3b253928ef746433c260bf395a219d650a6907bbf712ef61da6137ab85e4e1ba38fcbd
DIST mongodb-src-r4.2.8.tar.gz 61730247 BLAKE2B f1d98b8ac8f62c0c7aff100ef663bb20345de0e77e0ff420817db0843fe735b58af8075578a7f8d83cc9dc4e597c95ae09f89ce7a21cf8146ff15bcb11eba924 SHA512 163fce480762bd377d6c78b661bfe51fc883223a5309a68f9556e1bafb99e26e476d81dbe6de825d90469e835442be097be630ca9678e54b9d09091e0b5d67c4
+DIST mongodb-src-r4.4.1.tar.gz 49644743 BLAKE2B 7d84998c69b9b55164ebab04b49c38a4113a0f58d431612389ec37eb044fba1adf9284e9d4454bd40bb7a071fd042308a5cd350129d6d52480412cf6b868ec2b SHA512 16aa66995ea8cfe0cc47b96c1c5643a28ab47fc9f27bd93404cf572944ab30492df7c9255553f918b353cd7157a6ccde9ac6f58bfba322fb52c2d7409c6fb9b0
EBUILD mongodb-3.6.13.ebuild 4253 BLAKE2B 9c549c4a4f86d0642845b704af18c2f6e813ac71c188b1cc770b188e634dc388368607f92bc164afb24f0e4de09ee77d52a126450a89fa0af3f0254f6d8258d7 SHA512 aeacc08eb48dbd86141d694b1a71579b79da29cfc9f1f2e7727c25ccbb47bdc3f9b4d0091fd269ef04aff7bfce27059ac4059e7f7c14f8258ccc194996999c3b
EBUILD mongodb-3.6.17.ebuild 4239 BLAKE2B 2e88b7f99c60bdc724aba683ac6397634e005ebd0ede16d40620f84de196d77b616defcb2faa1fd84434a922826ebcd53c2902f4cb9fdf052a4b4a4d767b638d SHA512 10425c5c499a7182a22bf80479ddd61bcea5f51c4b99fd64aaf4c8fe29fec9db7dfeca211ead81431faf98f800d5dd3f381be32737acde01d4608d14a9d4f77c
-EBUILD mongodb-4.0.12.ebuild 4314 BLAKE2B 6e1d33a0d5e3948e2c6d7258379050b8b090a2debd04623f7f51a1e35a54fdf6fe3407eb6ff7afea121f8274f329564f192e26104d2173a08b5ad31ca52f669d SHA512 4509e201ec92554b3b5cc7c2f1d2daba1195357e8e064ad2f639667136194f2c683a420b95a69d086f8abc00da32daab64e33b921a5278eb4ea095022d2048e9
EBUILD mongodb-4.0.19.ebuild 4592 BLAKE2B 7e2feeb4abdfdd2eebe27265665576ea7c899cdb06bf5d5a70e8ac54a227815a93e79d5a58538effd1732b3e8e9e08d9ed38d7a3e6a463c4c21c5f3850ccd77d SHA512 f37ef841a74cb6b9b9f7adf6879977352d94be11e583b8ff475e3610f4c016203ffcad06ce45808734e93a1fff4aee067b29a9e828961abeca59e15e0396604a
+EBUILD mongodb-4.0.20.ebuild 4593 BLAKE2B 25a75906f5b037572499b8f5a51bc5df9be6e4e413055c85c340a653809587b9467bb51a6b6bd69d5e9609a062727540b7ca90a71e738958b6d50ae21fb46683 SHA512 661332d0421a768ac8b22d9e5f8bc44c5e7ef986dc2180d3c2163e72190fab3557c378d162a63029c897fa1dc1e1a2e5ed2dde5b22d33e7a84de61fa02a52a08
+EBUILD mongodb-4.2.10.ebuild 4787 BLAKE2B cf0502f0cea2c86387b3ba176a1178f58f5e7c0afd6e804c29ece21b4bcb043456612b2739b7e1faa063a5c850dda9c72705ac55728c3449a8796e5a39f4ea5f SHA512 493750ca11273d0ac744086425fa759059ba45c5580818527f2f669ae4d5f6336b763169553f19ea32f7c6c9f7e611be36e4f3cae5d8d27bf12ea89838760790
EBUILD mongodb-4.2.8.ebuild 4785 BLAKE2B 882ce4365612621348c851383ea19a20db880a11c4b7eb38ac3e7e4508a231d3c4bfca90615425eb9801cee85885c2cccfa61aeef1c26b5f22c4971cc8f31c5c SHA512 3c3fa9e7698f8853f9310bab8890e8e30c1bbc095eb2ede1f6196accaaf770cf1bec94b1bfaf019fdf727f9f1243f0dc2dfcaacbfd651187e852d4aa171e04ce
+EBUILD mongodb-4.4.1.ebuild 4874 BLAKE2B 1a2f557b5515a9a3c8f858c60f32de615a4fdc6163a0994a16aef5fa936a66937cb753d6b0a80f68478d8e573fc65944eaf111bb27d3611d255f7b0449430ee0 SHA512 da771a1b349f030ef86fd9cb7fd338eedb6a7daae4346ba4b7e38a4cf476207e4b0cecc3b2cdc0534830861c594b6db75fd8ee904bb084aa4f573c779c459c98
MISC metadata.xml 901 BLAKE2B f7fde58679ba05518634b82bf5fcc371897165364fe5b023a2ec161790c869de82b4a3dd769d5e1bb450f99679869b60bb1e35beb8d41c54d3448dfca580a7ae SHA512 48f133d396aa31b992bac5f947e5a262b2d07a1016c6d49fa3c86dabb85981edfa332abb867413826762d88051ff3981cc77c2ec92e992d7a231c3b542336e36
diff --git a/dev-db/mongodb/files/mongodb-4.2.10-no-compass.patch b/dev-db/mongodb/files/mongodb-4.2.10-no-compass.patch
new file mode 100644
index 000000000000..e60cd827f490
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-4.2.10-no-compass.patch
@@ -0,0 +1,54 @@
+diff --git a/src/mongo/SConscript b/src/mongo/SConscript
+index 6c78164c..b4b7c579 100644
+--- a/src/mongo/SConscript
++++ b/src/mongo/SConscript
+@@ -805,41 +805,6 @@ for full_dir, archive_dir in list(env["ARCHIVE_ADDITION_DIR_MAP"].items()):
+ for target in env["DIST_BINARIES"]:
+ installBinary(env, "db/modules/" + target)
+
+-compass_type = 'compass'
+-
+-compass_script = "install_compass"
+-if env.TargetOSIs('windows'):
+- # On windows the .in needs to be explicitly added to the file.
+- compass_script = "Install-Compass.ps1.in"
+-
+-compass_python_interpreter = '/usr/bin/env python2'
+-if env.TargetOSIs('darwin'):
+- compass_python_interpreter = '/usr/bin/env python'
+-
+-compass_installer = env.Substfile('#/src/mongo/installer/compass/' + compass_script,
+- SUBST_DICT=[
+- ('@compass_type@', compass_type),
+- ('@python_interpreter@', compass_python_interpreter),
+- ])
+-distBinaries.append(compass_installer)
+-
+-if not hygienic:
+- compass_script_installer = env.Install("$INSTALL_DIR/bin", compass_installer)
+-else:
+- compass_script_installer = env.AutoInstall(
+- 'bin',
+- source=[
+- compass_installer,
+- ],
+- INSTALL_ALIAS=[
+- 'tools',
+- ],
+- )
+-
+-if env.TargetOSIs('posix'):
+- env.AddPostAction( compass_script_installer, 'chmod 755 $TARGET' )
+- env.AddPostAction( compass_installer, 'chmod 755 $TARGET' )
+-
+ # "dist" target is valid only when --use-new-tools is specified
+ # Attempts to build release artifacts without tools must fail
+ if has_option("use-new-tools"):
+@@ -857,7 +822,6 @@ if has_option("use-new-tools"):
+ '--transform $BUILD_DIR/mongo=$SERVER_DIST_BASENAME/bin',
+ '--transform $BUILD_DIR/mongo/stripped/src/mongo-tools=$SERVER_DIST_BASENAME/bin',
+ '--transform src/mongo-tools=$SERVER_DIST_BASENAME/bin',
+- '--transform src/mongo/installer/compass=$SERVER_DIST_BASENAME/bin',
+ '${TEMPFILE(SOURCES[1:])}'
+ ],
+ ),
diff --git a/dev-db/mongodb/files/mongodb-4.4.1-boost.patch b/dev-db/mongodb/files/mongodb-4.4.1-boost.patch
new file mode 100644
index 000000000000..009ca6826a4f
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-4.4.1-boost.patch
@@ -0,0 +1,23 @@
+diff --git a/SConstruct b/SConstruct
+index 89c044ab..0484e475 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -3511,17 +3511,11 @@ def doConfigure(myenv):
+ "BOOST_LOG_NO_SHORTHAND_NAMES",
+ "BOOST_LOG_USE_NATIVE_SYSLOG",
+ "BOOST_LOG_WITHOUT_THREAD_ATTR",
++ "BOOST_LOG_DYN_LINK",
+ "ABSL_FORCE_ALIGNED_ACCESS",
+ ]
+ )
+
+- if link_model.startswith("dynamic") and not link_model == 'dynamic-sdk':
+- conf.env.AppendUnique(
+- CPPDEFINES=[
+- "BOOST_LOG_DYN_LINK",
+- ]
+- )
+-
+ if use_system_version_of_library("boost"):
+ if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ):
+ myenv.ConfError("can't find boost headers")
diff --git a/dev-db/mongodb/files/mongodb-4.4.1-fix-scons.patch b/dev-db/mongodb/files/mongodb-4.4.1-fix-scons.patch
new file mode 100644
index 000000000000..8b9d5d6d9fa2
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-4.4.1-fix-scons.patch
@@ -0,0 +1,33 @@
+diff --git a/SConstruct b/SConstruct
+index 89c044ab..a6d02072 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -2064,7 +2064,6 @@ if env.TargetOSIs('posix'):
+ env.Append( CCFLAGS=["-fno-omit-frame-pointer",
+ "-fno-strict-aliasing",
+ "-fasynchronous-unwind-tables",
+- "-ggdb" if not env.TargetOSIs('emscripten') else "-g",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -2076,6 +2075,9 @@ if env.TargetOSIs('posix'):
+ env.Append( CCFLAGS=["-Werror"] )
+
+ env.Append( CXXFLAGS=["-Woverloaded-virtual"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
++
+ if env.ToolchainIs('clang'):
+ env.Append( CXXFLAGS=['-Werror=unused-result'] )
+
+@@ -2096,8 +2098,8 @@ if env.TargetOSIs('posix'):
+
+ env.Append( LIBS=[] )
+
+- #make scons colorgcc friendly
+- for key in ('HOME', 'TERM'):
++ #make scons colorgcc, distcc, ccache friendly
++ for key in ('HOME', 'PATH', 'TERM'):
+ try:
+ env['ENV'][key] = os.environ[key]
+ except KeyError:
diff --git a/dev-db/mongodb/files/mongodb-4.4.1-no-compass.patch b/dev-db/mongodb/files/mongodb-4.4.1-no-compass.patch
new file mode 100644
index 000000000000..15a7f9534bcf
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-4.4.1-no-compass.patch
@@ -0,0 +1,56 @@
+diff --git a/src/mongo/SConscript b/src/mongo/SConscript
+index 8acf5469..737c31d4 100644
+--- a/src/mongo/SConscript
++++ b/src/mongo/SConscript
+@@ -834,43 +834,6 @@ for full_dir, archive_dir in list(env["ARCHIVE_ADDITION_DIR_MAP"].items()):
+ for target in env["DIST_BINARIES"]:
+ installBinary(env, "db/modules/" + target)
+
+-compass_type = 'compass'
+-
+-compass_script = "install_compass.in"
+-if env.TargetOSIs('windows'):
+- compass_script = "Install-Compass.ps1.in"
+-
+-compass_python_interpreter = '/usr/bin/env python2'
+-if env.TargetOSIs('darwin'):
+- compass_python_interpreter = '/usr/bin/env python'
+-
+-compass_installer = env.Substfile(
+- target="$BUILD_DIR/mongo/installer/compass/" + compass_script[:-3],
+- source='installer/compass/' + compass_script,
+- SUBST_DICT=[
+- ('@compass_type@', compass_type),
+- ('@python_interpreter@', compass_python_interpreter),
+- ],
+-)
+-
+-distBinaries.append(compass_installer)
+-
+-if not hygienic:
+- compass_script_installer = env.Install("$DESTDIR/bin", compass_installer)
+-else:
+- compass_script_installer = env.AutoInstall(
+- target='$PREFIX_BINDIR',
+- source=[
+- compass_installer,
+- ],
+- AIB_COMPONENT='dist',
+- AIB_ROLE='runtime',
+- )
+-
+-if env.TargetOSIs('posix'):
+- env.AddPostAction( compass_script_installer, 'chmod 755 $TARGET' )
+- env.AddPostAction( compass_installer, 'chmod 755 $TARGET' )
+-
+ if not hygienic:
+ server_archive = env.Command(
+ target='#/${SERVER_ARCHIVE}',
+@@ -884,7 +847,6 @@ if not hygienic:
+ '--transform $BUILD_DIR/mongo/stripped/db/modules/enterprise=$SERVER_DIST_BASENAME/bin',
+ '--transform $BUILD_DIR/mongo/stripped=$SERVER_DIST_BASENAME/bin',
+ '--transform $BUILD_DIR/mongo=$SERVER_DIST_BASENAME/bin',
+- '--transform src/mongo/installer/compass=$SERVER_DIST_BASENAME/bin',
+ '${TEMPFILE(SOURCES[1:])}'
+ ],
+ ),
diff --git a/dev-db/mongodb/files/mongodb-4.4.1-unwind-gcc10.patch b/dev-db/mongodb/files/mongodb-4.4.1-unwind-gcc10.patch
new file mode 100644
index 000000000000..a80f7e6474fb
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-4.4.1-unwind-gcc10.patch
@@ -0,0 +1,12 @@
+diff --git a/src/third_party/unwind/SConscript b/src/third_party/unwind/SConscript
+index ed947c8e..7308956f 100644
+--- a/src/third_party/unwind/SConscript
++++ b/src/third_party/unwind/SConscript
+@@ -90,6 +90,7 @@ if env['TARGET_ARCH'] == 'aarch64':
+
+ env.Append(
+ CCFLAGS=[
++ '-fcommon',
+ '-fexceptions',
+ '-Wno-unused-result',
+ '-Wno-unused-value',
diff --git a/dev-db/mongodb/mongodb-4.0.12.ebuild b/dev-db/mongodb/mongodb-4.0.20.ebuild
index 36602d5bac71..651219492475 100644
--- a/dev-db/mongodb/mongodb-4.0.12.ebuild
+++ b/dev-db/mongodb/mongodb-4.0.20.ebuild
@@ -10,7 +10,7 @@ CHECKREQS_DISK_BUILD="2400M"
CHECKREQS_DISK_USR="512M"
CHECKREQS_MEMORY="1024M"
-inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs user
+inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs
MY_P=${PN}-src-r${PV/_rc/-rc}
@@ -20,11 +20,13 @@ SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
LICENSE="Apache-2.0 SSPL-1"
SLOT="0"
-KEYWORDS="amd64"
+KEYWORDS="~amd64"
IUSE="debug kerberos libressl lto mms-agent ssl test +tools"
RESTRICT="!test? ( test )"
-RDEPEND=">=app-arch/snappy-1.1.3
+RDEPEND="acct-group/mongodb
+ acct-user/mongodb
+ >=app-arch/snappy-1.1.3
>=dev-cpp/yaml-cpp-0.5.3:=
>=dev-libs/boost-1.60:=[threads(+)]
>=dev-libs/libpcre-8.41[cxx]
@@ -40,16 +42,15 @@ RDEPEND=">=app-arch/snappy-1.1.3
DEPEND="${RDEPEND}
${PYTHON_DEPS}
$(python_gen_any_dep '
+ test? ( dev-python/pymongo[${PYTHON_USEDEP}] )
+ >=dev-util/scons-2.5.0[${PYTHON_USEDEP}]
dev-python/cheetah[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/typing[${PYTHON_USEDEP}]
')
sys-libs/ncurses:0=
sys-libs/readline:0=
- debug? ( dev-util/valgrind )
- test? (
- $(python_gen_any_dep 'dev-python/pymongo[${PYTHON_USEDEP}]')
- )"
+ debug? ( dev-util/valgrind )"
PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
PATCHES=(
@@ -72,11 +73,16 @@ pkg_pretend() {
fi
}
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+python_check_deps() {
+ if use test; then
+ has_version "dev-python/pymongo[${PYTHON_USEDEP}]" ||
+ return 1
+ fi
- python-any-r1_pkg_setup
+ has_version ">=dev-util/scons-2.5.0[${PYTHON_USEDEP}]" &&
+ has_version "dev-python/cheetah[${PYTHON_USEDEP}]" &&
+ has_version "dev-python/pyyaml[${PYTHON_USEDEP}]" &&
+ has_version "dev-python/typing[${PYTHON_USEDEP}]"
}
src_prepare() {
diff --git a/dev-db/mongodb/mongodb-4.2.10.ebuild b/dev-db/mongodb/mongodb-4.2.10.ebuild
new file mode 100644
index 000000000000..763bd774d5a7
--- /dev/null
+++ b/dev-db/mongodb/mongodb-4.2.10.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+
+SCONS_MIN_VERSION="2.5.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0 SSPL-1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE="debug kerberos libressl lto ssl test +tools"
+RESTRICT="!test? ( test )"
+
+RDEPEND="acct-group/mongodb
+ acct-user/mongodb
+ >=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.6.2:=
+ >=dev-libs/boost-1.70:=[threads(+)]
+ >=dev-libs/libpcre-8.42[cxx]
+ app-arch/zstd
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.11:=
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep '
+ test? ( dev-python/pymongo[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] )
+ >=dev-util/scons-2.5.0[${PYTHON_USEDEP}]
+ dev-python/cheetah3[${PYTHON_USEDEP}]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ ')
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ debug? ( dev-util/valgrind )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.2.0-fix-scons.patch"
+ "${FILESDIR}/${PN}-4.2.10-no-compass.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+python_check_deps() {
+ if use test; then
+ has_version "dev-python/pymongo[${PYTHON_USEDEP}]" || return 1
+ has_version "dev-python/requests[${PYTHON_USEDEP}]" || return 1
+ fi
+
+ has_version ">=dev-util/scons-2.5.0[${PYTHON_USEDEP}]" &&
+ has_version "dev-python/cheetah3[${PYTHON_USEDEP}]" &&
+ has_version "dev-python/psutil[${PYTHON_USEDEP}]" &&
+ has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ if ver_test "$REPLACING_VERSIONS" -lt 4.0; then
+ ewarn "To upgrade from a version earlier than the 4.0-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 4.0-series. Then upgrade to 4.2 series."
+ else
+ ewarn "Be sure to set featureCompatibilityVersion to 4.0 before upgrading."
+ fi
+ fi
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*,zstandard-*} || die
+
+ # remove compass
+ rm -r src/mongo/installer/compass || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ --use-system-zstd
+ )
+
+ use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use lto && scons_opts+=( --lto=on )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ escons "${scons_opts[@]}" core tools
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ ewarn "Tests may hang with FEATURES=usersandbox"
+ "${EPYTHON}" ./buildscripts/resmoke.py run --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed with ${EPYTHON}"
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/mongos.initd-r3" mongos
+ newconfd "${FILESDIR}/mongos.confd-r3" mongos
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/mongos.conf-r2" mongos.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ diropts -m0750 -o mongodb -g mongodb
+ keepdir "${x}"
+ done
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/mongodb/mongodb-4.4.1.ebuild b/dev-db/mongodb/mongodb-4.4.1.ebuild
new file mode 100644
index 000000000000..de14d8bf32c7
--- /dev/null
+++ b/dev-db/mongodb/mongodb-4.4.1.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+
+SCONS_MIN_VERSION="3.3.1"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit check-reqs flag-o-matic multiprocessing pax-utils python-any-r1 scons-utils systemd toolchain-funcs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="https://www.mongodb.com"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0 SSPL-1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE="debug kerberos libressl lto ssl test +tools"
+RESTRICT="!test? ( test )"
+
+RDEPEND="acct-group/mongodb
+ acct-user/mongodb
+ >=app-arch/snappy-1.1.3
+ >=dev-cpp/yaml-cpp-0.6.2:=
+ >=dev-libs/boost-1.70:=[threads(+),nls]
+ >=dev-libs/libpcre-8.42[cxx]
+ app-arch/zstd
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.11:=
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ $(python_gen_any_dep '
+ test? ( dev-python/pymongo[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] )
+ >=dev-util/scons-3.1.1[${PYTHON_USEDEP}]
+ dev-python/cheetah3[${PYTHON_USEDEP}]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ ')
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ debug? ( dev-util/valgrind )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-100 )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.4.1-fix-scons.patch"
+ "${FILESDIR}/${PN}-4.4.1-no-compass.patch"
+ "${FILESDIR}/${PN}-4.4.1-unwind-gcc10.patch"
+ "${FILESDIR}/${PN}-4.4.1-boost.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+python_check_deps() {
+ if use test; then
+ has_version "dev-python/pymongo[${PYTHON_USEDEP}]" || return 1
+ has_version "dev-python/requests[${PYTHON_USEDEP}]" || return 1
+ fi
+
+ has_version ">=dev-util/scons-2.5.0[${PYTHON_USEDEP}]" &&
+ has_version "dev-python/cheetah3[${PYTHON_USEDEP}]" &&
+ has_version "dev-python/psutil[${PYTHON_USEDEP}]" &&
+ has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
+}
+
+pkg_pretend() {
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ if ver_test "$REPLACING_VERSIONS" -lt 4.2; then
+ ewarn "To upgrade from a version earlier than the 4.2-series, you must"
+ ewarn "successively upgrade major releases until you have upgraded"
+ ewarn "to 4.2-series. Then upgrade to 4.4 series."
+ else
+ ewarn "Be sure to set featureCompatibilityVersion to 4.2 before upgrading."
+ fi
+ fi
+}
+
+src_prepare() {
+ default
+
+ # remove bundled libs
+ rm -r src/third_party/{boost-*,pcre-*,scons-*,snappy-*,yaml-cpp-*,zlib-*} || die
+
+ # remove compass
+ rm -r src/mongo/installer/compass || die
+}
+
+src_configure() {
+ # https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source
+ # --use-system-icu fails tests
+ # --use-system-tcmalloc is strongly NOT recommended:
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ --use-system-zstd
+ )
+
+ use arm64 && scons_opts+=( --use-hardware-crc32=off ) # Bug 701300
+ use debug && scons_opts+=( --dbg=on )
+ use kerberos && scons_opts+=( --use-sasl-client )
+ use lto && scons_opts+=( --lto=on )
+ use ssl && scons_opts+=( --ssl )
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+
+ default
+}
+
+src_compile() {
+ PREFIX="${ED}"/usr escons "${scons_opts[@]}" --nostrip install-core
+}
+
+# FEATURES="test -usersandbox" emerge dev-db/mongodb
+src_test() {
+ ewarn "Tests may hang with FEATURES=usersandbox"
+ "${EPYTHON}" ./buildscripts/resmoke.py run --dbpathPrefix=test --suites core --jobs=$(makeopts_jobs) || die "Tests failed with ${EPYTHON}"
+}
+
+src_install() {
+ dobin build/install/bin/{mongo,mongod,mongos}
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r3" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r3" ${PN}
+ newinitd "${FILESDIR}/mongos.initd-r3" mongos
+ newconfd "${FILESDIR}/mongos.confd-r3" mongos
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/mongos.conf-r2" mongos.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ diropts -m0750 -o mongodb -g mongodb
+ keepdir "${x}"
+ done
+}
+
+pkg_postinst() {
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/"
+ ewarn " https://docs.mongodb.com/manual/release-notes/$(ver_cut 1-2)/#upgrade-procedures"
+}
diff --git a/dev-db/myodbc/Manifest b/dev-db/myodbc/Manifest
index 902a632385ee..109573089017 100644
--- a/dev-db/myodbc/Manifest
+++ b/dev-db/myodbc/Manifest
@@ -3,5 +3,7 @@ AUX myodbc-8.0.19-cxxlinkage.patch 812 BLAKE2B 18e0f62ceb6bb33ad282972a8aae2f755
AUX odbc.ini.m4 406 BLAKE2B 3a20c28b1971753a14a4aa4d30efcc7de833488501a41d9404987567623d48250ce1daea1d3138adaef36741c4f2e0eafc60eba554e5262b45084f93f5205160 SHA512 84ab2a3aab594123d42b65205a7faf8e91fe9416a9e3c4c4c354533b9a298395f59172649c91dc0b671392bfbe5baeaddb6aa47119ce4c825917f3977d9dd521
AUX odbcinst.ini.m4 118 BLAKE2B 6da835746e063f415ad7d640233cfd96e744cd56e12aaab4a21a2bf0bd5f1bd1e5c3d1c9a28522e3aa07c1261abac92301819d4112ac6a000a729aca9f7f7ad6 SHA512 6d929bbffd602a9f060a05998149a6b16334f8a5e3db30d02ff5d38c0065085d085042521e700b87a63766e32aa27ae92be72cef33c2a7aa8f6767b6b71c82c8
DIST mysql-connector-odbc-8.0.21-src.tar.gz 3744268 BLAKE2B d43942cc94858023ae0c2140ffba8a0a676a763b167ef4cbf500b2b9c14d2b3486696f68d03b2cc4607cb7f302e2af25f1e5ce564441ecf6d44a03874e489c07 SHA512 dca83db2ae25e08e44eaf814cad7234c8b17c2935de69bec7d238881404b2bc062fd7e28c626b594a062ee488123be545b9384742e09168e64a1423425a41c40
+DIST mysql-connector-odbc-8.0.22-src.tar.gz 3726015 BLAKE2B 055920446767b0c9a30a0ca4773e71d662b398a9849df1a0b7975d71a21cfb23f540d8dda5430c717569f173e63673d3e51b025bb098e51202093d33e19bc142 SHA512 c613ae60346cea2e57bade89d813fd5ac21d0712d3d751e3acbc275421da6ac7593afc3da9fb6d161ee413f60e76e670f0c84876591f331925c980d969db4e8c
EBUILD myodbc-8.0.21.ebuild 3113 BLAKE2B e27fc21290dfa09309813f047e0c72bad42c2cc5ca6aa54c3698b0456b42007d3c7676c5062838be9ecb8033d8b1e12dae01a7bc213cd7ce3356bdd30dee7a86 SHA512 f34dc7a7aaa9825c42ffca24cb9ffa136a8e0abeb5de0871bb3413f7b28cc8587fb01768d60ca55434787ca818acb29d97b13b6ba3ef9e3791e38c8f7b445652
+EBUILD myodbc-8.0.22.ebuild 3115 BLAKE2B 854a3eb5338b5bfecad3ff350b738a30d177a4df636908691546a14450152c294149ddf205e18d83cab3f4e26c3acb6d979c9bf83292466d4107425a67bd55b0 SHA512 76908a67edb183addb9db261e5bc05182b938400a0adb770f4f15a12894b23af5580ef649ef35c4abc2be51cfd0425a892ce527a6ed842a111b733314c376b97
MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b
diff --git a/dev-db/myodbc/myodbc-8.0.22.ebuild b/dev-db/myodbc/myodbc-8.0.22.ebuild
new file mode 100644
index 000000000000..c328e984abb9
--- /dev/null
+++ b/dev-db/myodbc/myodbc-8.0.22.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-multilib
+
+MAJOR="$(ver_cut 1-2)"
+MY_PN="mysql-connector-odbc"
+MY_P="${MY_PN}-${PV/_p/r}-src"
+
+DESCRIPTION="ODBC driver for MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/connector/odbc/"
+SRC_URI="https://dev.mysql.com/get/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="${MAJOR}"
+KEYWORDS="~amd64 ~ppc x86"
+IUSE=""
+
+# Broken when built dynamically against libmysqlclient.so
+RDEPEND="
+ dev-db/unixODBC[${MULTILIB_USEDEP}]
+ >=dev-db/mysql-connector-c-8.0:0=[static-libs,${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}"
+S=${WORKDIR}/${MY_P}
+
+# Careful!
+DRIVER_NAME="${PN}-${SLOT}"
+
+# Patch document path so it doesn't install files to /usr
+PATCHES=(
+ "${FILESDIR}/${MAJOR}-cmake-doc-path.patch"
+ "${FILESDIR}/${PN}-8.0.19-cxxlinkage.patch"
+)
+
+src_prepare() {
+ # Remove Tests
+ sed -i -e "s/ADD_SUBDIRECTORY(test)//" \
+ "${S}/CMakeLists.txt"
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ mycmakeargs+=(
+ -DMYSQLCLIENT_STATIC_LINKING=1
+ -DMYSQL_CXX_LINKAGE=1
+ -DWITH_UNIXODBC=1
+ -DWITH_DOCUMENTATION_INSTALL_PATH=/usr/share/doc/${PF}
+ -DLIB_SUBDIR="$(get_libdir)/${PN}-${MAJOR}"
+ -DMYSQLCLIENT_NO_THREADS=ON
+ -DDISABLE_GUI=ON
+ # The NUMA and LIBWRAP options are not really used.
+ # They are just copied from the server code
+ -DWITH_NUMA=OFF
+ -DWITH_LIBWRAP=OFF
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install_all() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ dodir /usr/share/${PN}-${SLOT}
+ for i in odbc.ini odbcinst.ini; do
+ einfo "Building $i"
+ sed \
+ -e "s,__PN__,${DRIVER_NAME},g" \
+ -e "s,__PF__,${MAJOR},g" \
+ -e "s,lib/libmyodbc3.so,$(get_libdir)/${PN}-${MAJOR}/libmyodbc${SLOT:0:1}a.so,g" \
+ >"${D}"/usr/share/${PN}-${SLOT}/${i} \
+ <"${FILESDIR}"/${i}.m4 \
+ || die "Failed to build $i"
+ done;
+ mv "${D}/usr/bin/myodbc-installer" \
+ "${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary"
+}
+
+pkg_config() {
+
+ [ "${ROOT}" != "/" ] && \
+ die 'Sorry, non-standard ROOT setting is not supported :-('
+
+ local msg='MySQL ODBC driver'
+ local drivers=$(/usr/bin/odbcinst -q -d)
+
+ if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+
+ local sources=$(/usr/bin/odbcinst -q -s)
+ msg='sample MySQL ODBC DSN'
+ if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then
+ ebegin "Installing ${msg}"
+ /usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini
+ rc=$?
+ eend $rc
+ [ $rc -ne 0 ] && die
+ else
+ einfo "Skipping already installed ${msg}"
+ fi
+}
+
+pkg_postinst() {
+ elog "If this is a new install, please run the following command"
+ elog "to configure the MySQL ODBC drivers and sources:"
+ elog "emerge --config =${CATEGORY}/${PF}"
+ elog "Please note that the driver name used to form the DSN now includes the SLOT."
+ elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}"
+}
diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest
index f9e3570f344f..1876ea3b262a 100644
--- a/dev-db/mysql-connector-c++/Manifest
+++ b/dev-db/mysql-connector-c++/Manifest
@@ -3,12 +3,15 @@ AUX mysql-connector-c++-1.1.6-fix-cmake.patch 762 BLAKE2B 4cecebd2cb075c6e1af7ab
AUX mysql-connector-c++-8.0.19-fix-build.patch 9695 BLAKE2B c3334f74160a9b1148a588c7190db6f3a79fe70530d921428b7d86ec02f01324cf02c4130cd8d0cf42ecc4ccaccbecf90ffe0ac1cf8b265ea5cd9dea1046f30f SHA512 3d726b70a270e56ab38e8cebe5eb0186c4d0293dbd72844914ca9ef20674f20bc0fb4d2f0c449da77e4e6a81cc3ae454447a7983468d386e73f946dccd4a20cc
AUX mysql-connector-c++-8.0.19-fix-libressl-support.patch 3358 BLAKE2B 795c9f313d2495c3fee01066c7116fa3272a162b7401359657256d1adfb24d236049bbad6016e763de2a62ec9b6ccc93546eccffc457ae0bafca29b2c7e21b5d SHA512 d7b4b1424a6fd237ad0e7bd5648b156f770e352ec8fb3edfa6dfb767ebbe73e8ebc186b327e8543aa7bc12b7bc6081fae225a6ff0e153e25bb76900142adaa31
AUX mysql-connector-c++-8.0.20-fix-libressl-support.patch 3299 BLAKE2B a78d87ed7d483ac04b6676214941048d17c40215aa248dfda152c2d149469ce8595fb4b76f26a96f965e001ca58db95b7d4a4f50607076178ee4d57008626657 SHA512 529b1a6a3b0ecc7861601e665c494602d4b362d7259f93738e422c428416720d38185f2dd959e456d367e31442ecf046a266fc2dbef39cd3a29e439eca0ae266
+AUX mysql-connector-c++-8.0.22-fix-build.patch 10143 BLAKE2B c1bafd2ba9ad454bc02d2ebaa581ff735c1f43a557680ee3cd2378cbfc6a5673b9cec976acfc79796fcbcf292383725e1687b6042fc81e16c996d2165e9244ea SHA512 97cb6429fbf2d6df1b8a0f91e21ad9c894cd287aa9c89d2873cd3397fad33a9821d856e68108adaaab713d579b2fb9cf6f783f3b3fc5a96d32c6ba8a63bd1c23
DIST mysql-connector-c++-1.1.12.tar.gz 518615 BLAKE2B 386a4753ca3f03999a49a89507da1b1172b3db89797c38403fee4eea86e7108a5e4f91f24a17de86d585c2a3d9e5742a117fa84d9b14aad649f938a597f3dae9 SHA512 d7e132dbc2efda4a77f8ae00c24006a1ade1d0a50f22d89ece453505e6d206427ee7988df29c0d6ef8b396ad6b8d326b6d263a1d4fa08ef5db0966fb4f1479f4
DIST mysql-connector-c++-8.0.19-src.tar.gz 3137484 BLAKE2B 82a2900b0daa00bcfd72d562818ada25fe15901991a896a46ecdd9304e03066c4e7a3804287540559df1c74dbd1b3983b450ab783ee8cb7f0d7ec152f3cdc6b0 SHA512 5987ae31cda3a5db18ceded201ccbe66263b8ab7665ceacf70af6bb6b99130377b40514b96644b0768fd809b36ee02580520923c11c1edecccc75da15d7bb0bd
DIST mysql-connector-c++-8.0.20-src.tar.gz 3774428 BLAKE2B a06114432ab21c36fd0b3b91df2382198b2a48871e8e0bfd8c7a94729ed0e29f33599c078c97670fe9d744b13042db52fb89de2294c75eae670a77112d11d251 SHA512 3edb7c3d4ccf218a3f76afcf83a6d233b7accd236c05105ab3f7a6610cfd8809a78c78142c82fb60fb0931d2ae0f0f8fdc3ce9caf5f0cde7ef54067a7e20270b
DIST mysql-connector-c++-8.0.21-src.tar.gz 3788740 BLAKE2B 1862b4f2c6e2a2bbe8e3044eea2c1d3c8fdb0a319e3758ca44686b79e917a65617e2cfd0e4b698d858ed9ef12c892b4f658eb287f2a8505a5daeeb79d9544c25 SHA512 8a64dff2efd16d2891f613fd416ec42ecba2490b428b1778e99822a3051d9c5af3b94006577e9f38a6ebd146d2f3be522cb876f1e42fbf0ac82001b0a62ffa62
+DIST mysql-connector-c++-8.0.22-src.tar.gz 3795112 BLAKE2B c5d6f0ebeb4649857f3217a35f3ae885d62be63af4da09815e7eb156538ece4f805578db24bfff3dd44a0e320c025a9936d7edacba69a2786d84dd932c5abb8a SHA512 1975b43fa3f3806cccc685a695f84783164c5b17da10ac14a6013d27c837cc9c63fff01b1ed4b31f22dae60afa68d34ec56ca9c45ca3dac23635e8f0fa845aa4
EBUILD mysql-connector-c++-1.1.12-r1.ebuild 1636 BLAKE2B e0e977f956845c46bc99a003b5e74fe5d085e1d5e2b9648474f27028b0d99b1764438fb07da8008c3fdef677fc35310342ad2988ada1f54a8c7a9583f5904a41 SHA512 5a80daba3b6038b57c284e409284106b19bcbb426fc2ba56d73d3c65fbad4343d150e7714782f558a94160dec90482cd88426ba5771bafc02300fa722b065778
EBUILD mysql-connector-c++-8.0.19.ebuild 1067 BLAKE2B 8407348e0e4da0ea8acca8ec0caa33a0c2e863c9a95d6951ce500b6306b77687e76ca867eeeb580dc5e9b8a9df3dff7ca0a8cb8ae95403a9a117d50d2dc8d869 SHA512 83d72ab1104a0ebd014d8b3e1f475944f16a18dc4836386e3ebf7b16df547f35cf7db42c586411fcef80ec6273f15a0f9531b197eaecb991a62301d9a9d3ff4b
EBUILD mysql-connector-c++-8.0.20.ebuild 1070 BLAKE2B bd6b438aa0a660bc19a50695ed77fa5f952aabfb6ff1996244eed5846476bb0c725cf2d4899105c88f1409725ebe80970655ac4f51b7012d1fccc3539a69a062 SHA512 d54363d3172c98ef6d500a336fc98c8d8abdd28e443e09e2ce50e85353c374cdd95739b9d6ab636d4aad3a8647bca1eb99329a761a10ff3ffb2040c1ec3796e8
EBUILD mysql-connector-c++-8.0.21.ebuild 1055 BLAKE2B 7a85e4631367e2a34989a8fc998d80d87c5b6b0220296e7f2f75121766db9c10f66b8838e633c0fc51b43c8314e3521a7cbc1fc0ed2a6fec87e67a6a18b0e91c SHA512 7661f1404a55a3342d90c26fbc36e0f1dc060301f82aadf4b814eedfdeeb7a9698f05e3ab8c552b1be03490e6a4591ac36ca28a7a60604a98844a9136ae063cc
+EBUILD mysql-connector-c++-8.0.22.ebuild 1058 BLAKE2B efed1a027f679d5b996712167ffc1d9ebda0f41846c4603c613cb6796967e28877a29de56e1dbd0c0b615d3af3634df4ac417ccd4a3c9ad2da944fb0de8d630e SHA512 91439f289265c9ed7b048280ae86990c9768b5b70e3509fb4503ffc551f6b04e0c96c04ad0ce24aa6208d227f9c0ef1ce121c13d335d4ab8f034c46fd202c4c9
MISC metadata.xml 378 BLAKE2B 43fdbbc8d3b6ef99e51da96ddfefbdeaa70ef5fcb2fc6067305f75f75b7ee2fd21b79ca76704d8752bf59ae057b28efb187b063770964246f93fea629b58b467 SHA512 c6e545fb60d306792421ea26a937aaa6aea53d2a4100c9cafe78cf695c9dd0620cf3e770d43ff42749ae42bbe3a35212407ea84edee9af2dcb0255c2b763ddfc
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.22-fix-build.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.22-fix-build.patch
new file mode 100644
index 000000000000..ca1b829c1fbc
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.22-fix-build.patch
@@ -0,0 +1,322 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -467,7 +467,7 @@ set_target_properties(connector PROPERTIES
+
+
+ install(TARGETS connector
+- CONFIGURATIONS Release RelWithDebInfo
++ CONFIGURATIONS Release RelWithDebInfo Gentoo
+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT XDevAPIDev
+ RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
+--- a/cdk/cmake/DepFindProtobuf.cmake
++++ b/cdk/cmake/DepFindProtobuf.cmake
+@@ -48,244 +48,7 @@ if(TARGET Protobuf::pb)
+ return()
+ endif()
+
+-message(STATUS "Setting up Protobuf.")
+-
+-set(PB_SOURCE_DIR "${PROJECT_SOURCE_DIR}/protobuf")
+-set(PB_BINARY_DIR "${PROJECT_BINARY_DIR}/protobuf")
+-set(config_stamp "${PB_BINARY_DIR}/config.stamp")
+-set(build_stamp "${PB_BINARY_DIR}/build.stamp")
+-
+-
+-#
+-# Pick build configuration for the protobuf build. Normally we build using the
+-# same build configuration that is used for building CDK (Release/Debug/etc.).
+-# But we also support building CDK under non-standard build configuration
+-# named 'Static' (this is a dirty trick we use to simplify building our MSIs).
+-# Since protobuf does not know 'Static' build configuration, we build protobuf
+-# under 'Release' configuration in that case.
+-#
+-# We need to handle two cases. For some build systems, like Makefiles,
+-# the build configuration is specified at cmake time using CMAKE_BUILD_TYPE
+-# variable. In that case we also set it during protobuf build configuration.
+-# Another case is a multi-configuration build system like MSVC. In this case
+-# we use generator expression to pick correct configuration when the build
+-# command is invoked below.
+-#
+-
+-set(build_type)
+-if(CMAKE_BUILD_TYPE)
+- if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
+- set(set_build_type -DCMAKE_BUILD_TYPE=Release)
+- else()
+- set(set_build_type -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
+- endif()
+-endif()
+-
+-set(CONFIG_EXPR
+- $<$<CONFIG:Static>:Release>$<$<NOT:$<CONFIG:Static>>:$<CONFIG>>
+-)
+-
+-set(set_arch)
+-if(CMAKE_GENERATOR_PLATFORM)
+- set(set_arch -A ${CMAKE_GENERATOR_PLATFORM})
+-endif()
+-
+-set(set_toolset)
+-if(CMAKE_GENERATOR_TOOLSET)
+- set(set_toolset -T ${CMAKE_GENERATOR_TOOLSET})
+-endif()
+-
+-set(set_system_name)
+-if(CMAKE_SYSTEM_NAME)
+- set(set_system_name -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME})
+- if(CMAKE_SYSTEM_VERSION)
+- list(APPEND set_system_name -DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION})
+- endif()
+-endif()
+-
+-set(set_system_processor)
+-if(CMAKE_SYSTEM_PROCESSOR)
+- set(set_system_processor -DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR})
+-endif()
+-
+-if(NOT EXISTS "${PB_BINARY_DIR}/exports.cmake")
+-
+- message("==== Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR} ${set_arch} ${set_toolset} ${set_system_name}")
+-
+- file(REMOVE "${PB_BINARY_DIR}/CMakeCache.txt")
+- file(MAKE_DIRECTORY "${PB_BINARY_DIR}")
+-
+- # Dirty trick to speed up cmake set up time.
+- #file(
+- # COPY "${CMAKE_BINARY_DIR}/CMakeFiles/${CMAKE_VERSION}"
+- # DESTINATION "${PB_BINARY_DIR}/CMakeFiles"
+- #)
+-
+- execute_process(
+- COMMAND ${CMAKE_COMMAND}
+- -G "${CMAKE_GENERATOR}"
+- ${set_arch}
+- ${set_toolset}
+- ${set_build_type}
+- ${set_system_name}
+- ${set_system_processor}
+- -DSTATIC_MSVCRT=${STATIC_MSVCRT}
+- -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
+- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
+- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
+- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
+- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
+- -DCMAKE_CXX_FLAGS_MINSIZEREL=${CMAKE_CXX_FLAGS_MINSIZEREL}
+- -DCMAKE_STATIC_LINKER_FLAGS=${CMAKE_STATIC_LINKER_FLAGS}
+- ${PB_SOURCE_DIR}
+- WORKING_DIRECTORY ${PB_BINARY_DIR}
+- RESULT_VARIABLE protobuf_config
+- )
+-
+- if(protobuf_config)
+- message(FATAL_ERROR "Could not configure Protobuf build: ${protobuf_config}")
+- endif()
+-
+- message("==== Protobuf build configured.")
+-
+-endif()
+-
+-
+-include(${PB_BINARY_DIR}/exports.cmake)
+-
+-#
+-# Protobuf library targets imported above (pb_protobuf
+-# and pb_protobuf-lite) are local to the directory from which
+-# they were imported. This is not good if cdk is used as
+-# a sub-project of a parent project, because the parent project
+-# must have access to these targets.
+-#
+-# For that reason below we create global protobuf/protobuf-lite targets
+-# and copy their locations from the imported targets.
+-#
+-# Note: we can't use ALIAS library because it does not work with imported
+-# targets
+-#
+-
+-add_library(Protobuf::pb-full STATIC IMPORTED GLOBAL)
+-add_library(Protobuf::pb-lite STATIC IMPORTED GLOBAL)
+-add_executable(Protobuf::protoc IMPORTED GLOBAL)
+-
+-set(TGT_protobuf Protobuf::pb-full)
+-set(TGT_protobuf-lite Protobuf::pb-lite)
+-set(TGT_protoc Protobuf::protoc)
+-
+-foreach(tgt protobuf protobuf-lite protoc)
+-
+- #message("processing: ${tgt}")
+-
+- set(loc_list)
+-
+- foreach(CONF NOCONFIG DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
+-
+- #message("- CONF: ${CONF}")
+-
+- get_target_property(LOC pb_${tgt} IMPORTED_LOCATION_${CONF})
+-
+- if(LOC)
+-
+- #message("- setting imported location to: ${LOC}")
+- list(APPEND loc_list "${LOC}")
+-
+- set_target_properties(${TGT_${tgt}} PROPERTIES
+- IMPORTED_LOCATION_${CONF} "${LOC}"
+- )
+-
+- set_property(TARGET ${TGT_${tgt}} APPEND PROPERTY
+- IMPORTED_CONFIGURATIONS ${CONF}
+- )
+-
+- endif()
+-
+- endforeach(CONF)
+-
+- #
+- # To support 'Static' build configuration the targets imported from the
+- # Protobuf project need to have IMPORTED_LOCATION_STATIC defined. We use
+- # 'Release' locations as Protobuf is built using 'Release' configuration in
+- # that case.
+- #
+-
+- get_target_property(LOC ${TGT_${tgt}} IMPORTED_LOCATION_RELEASE)
+- set_property(TARGET ${TGT_${tgt}} PROPERTY IMPORTED_LOCATION_STATIC ${LOC})
+-
+-endforeach(tgt)
+-
+-
+-#message("Protobuf include path: ${PROTOBUF_INCLUDE_DIR}")
+-set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_INCLUDE_DIR} CACHE INTERNAL "")
+-
+-set_target_properties(Protobuf::pb-lite PROPERTIES
+- INTERFACE_INCLUDE_DIRECTORIES "${PROTOBUF_INCLUDE_DIR}"
+-)
+-
+-set_target_properties(Protobuf::pb-full PROPERTIES
+- INTERFACE_LINK_LIBRARIES Protobuf::pb-lite
+-)
+-
+-# On UNIX Protobuf uses pthread library
+-if(UNIX)
+- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
+- INTERFACE_LINK_LIBRARIES pthread
+- )
+-endif()
+-
+-#
+-# Note: This is needed to correctly compile headers generated by protobuf
+-# with sunpro compiler.
+-#
+-
+-if(SUNPRO)
+- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
+- INTERFACE_COMPILE_DEFINITIONS SOLARIS_64BIT_ENABLED
+- )
+-endif()
+-
+-#
+-# Try using parallel builds for protobuf.
+-#
+-
+-include(ProcessorCount)
+-ProcessorCount(N)
+-
+-MESSAGE("Processor Count: ${N}")
+-
+-set(opt_build)
+-set(opt_tool)
+-if(NOT N EQUAL 0)
+- if(NOT CMAKE_VERSION VERSION_LESS 3.12)
+- set(opt_build --parallel ${N})
+- elseif(CMAKE_MAKE_PROGRAM MATCHES "make")
+- set(opt_tool -j${N})
+- endif()
+-endif()
+-
+-add_custom_command(OUTPUT "${build_stamp}"
+- COMMAND ${CMAKE_COMMAND} --build . ${opt_build} --config ${CONFIG_EXPR} -- ${opt_tool}
+- COMMAND ${CMAKE_COMMAND} -E touch "${build_stamp}"
+- WORKING_DIRECTORY "${PB_BINARY_DIR}"
+- COMMENT "Building protobuf"
+-)
+-
+-add_custom_target(build_protobuf
+- SOURCES "${build_stamp}"
+-)
+-
+-set_target_properties(build_protobuf PROPERTIES FOLDER "Misc")
+-
+-add_dependencies(Protobuf::pb-full build_protobuf)
+-add_dependencies(Protobuf::pb-lite build_protobuf)
+-add_dependencies(Protobuf::protoc build_protobuf)
+-
+-# TODO: Handle lite/full version
+-
+-
++find_package(Protobuf REQUIRED)
+
+ # Standard PROTOBUF_GENERATE_CPP modified to our usage
+
+@@ -314,11 +77,11 @@ function(mysqlx_protobuf_generate_cpp SRCS HDRS)
+ "${CMAKE_CURRENT_BINARY_DIR}/protobuf/${FIL_WE}.pb.h"
+ COMMAND ${CMAKE_COMMAND}
+ -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
+- COMMAND Protobuf::protoc
++ COMMAND ${Protobuf_PROTOC_EXECUTABLE}
+ ARGS --cpp_out "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
+ -I ${ABS_PATH} ${ABS_FIL}
+- --proto_path=${PROJECT_SOURCE_DIR}/protobuf/protobuf-3.6.1/src
+- DEPENDS ${ABS_FIL} #${PROTOBUF_PROTOC_EXECUTABLE}
++ --proto_path=${Protobuf_INCLUDE_DIR}
++ DEPENDS ${ABS_FIL} #${Protobuf_PROTOC_EXECUTABLE}
+ COMMENT "Running C++ protocol buffer compiler on ${FIL}"
+ VERBATIM
+ )
+--- a/cdk/core/CMakeLists.txt
++++ b/cdk/core/CMakeLists.txt
+@@ -45,7 +45,7 @@ add_library(cdk STATIC ${cdk_sources} ${HEADERS})
+
+ target_link_libraries(cdk
+ PUBLIC cdk_mysqlx cdk_parser
+- PRIVATE Protobuf::pb-lite # required by codecc.cc
++ PRIVATE protobuf # required by codecc.cc
+ )
+
+ add_coverage(cdk)
+--- a/cdk/protocol/mysqlx/CMakeLists.txt
++++ b/cdk/protocol/mysqlx/CMakeLists.txt
+@@ -127,11 +127,7 @@ target_include_directories(cdk_proto_mysqlx PRIVATE
+ ${CMAKE_CURRENT_BINARY_DIR}
+ )
+
+-if(use_full_protobuf)
+- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-full)
+-else()
+- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-lite)
+-endif()
++target_link_libraries(cdk_proto_mysqlx PRIVATE protobuf)
+
+ target_link_libraries(cdk_proto_mysqlx PRIVATE cdk_foundation zlib lz4 zstd)
+
+--- a/jdbc.cmake
++++ b/jdbc.cmake
+@@ -66,7 +66,7 @@ if(MYSQL_CONFIG_EXECUTABLE)
+ list(APPEND jdbc_cmake_opts -DMYSQL_CONFIG_EXECUTABLE=${MYSQL_CONFIG_EXECUTABLE})
+ endif()
+
+-list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON)
++list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=OFF)
+
+ if(CMAKE_BUILD_TYPE)
+ if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
+--- a/jdbc/CMakeLists.txt
++++ b/jdbc/CMakeLists.txt
+@@ -299,7 +299,7 @@ endif()
+
+
+ install(TARGETS connector-jdbc
+- CONFIGURATIONS Release RelWithDebInfo
++ CONFIGURATIONS Release RelWithDebInfo Gentoo
+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT JDBCDev
+ RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.22.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.22.ebuild
new file mode 100644
index 000000000000..5abc5913d53f
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.22.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+inherit cmake
+
+DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
+HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
+URI_DIR="Connector-C++"
+SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
+
+LICENSE="Artistic GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+legacy libressl"
+
+RDEPEND="
+ dev-libs/protobuf:=
+ legacy? (
+ dev-libs/boost:=
+ >=dev-db/mysql-connector-c-6.1.8:=
+ )
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${P}-src"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.0.22-fix-build.patch
+ "${FILESDIR}"/${PN}-8.0.20-fix-libressl-support.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_SSL=system
+ -DWITH_JDBC=$(usex legacy ON OFF)
+ $(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
+ $(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
+ )
+
+ cmake_src_configure
+}
diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 1c0d7f64fa63..a7a3e5a99986 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -2,6 +2,9 @@ AUX mysql-connector-c-8.0.18-always-build-decompress-utilities.patch 874 BLAKE2B
AUX mysql-connector-c-8.0.19-do-not-install-comp_err.patch 307 BLAKE2B 864c07e9d4fb9a38ac418476f4b7738caa1f2a5dc633ad5921859793983c7b42acd87263ce2703df5a8c7d3bc3d7a60efb28a3ff17c311d89cc7b12edd22574f SHA512 cbb9be24a67a649b68230fe3482063d2d16fb629233e070289eb1ab0011bd8c43b0c056e4b6ca430a62ce0e8f47bb9490cb6746b7dc3fe06a05670b078cd084f
AUX mysql-connector-c-8.0.21-libressl.patch 13288 BLAKE2B 5aad519f99103e579356d89ae92dda1e2496268cebdfe8dd3797138a5efe03370365225581399bb2373b847f61e2b4be726d940cde624d3cdda94b5c69904a3a SHA512 f4d057ce159153133e100c71c65f75bd558ba1ea914cd878023dc4e4a628d63b60d0ac671a97d26863b3f48c3dc8984317bb09362378c3b96b8ed47f08c1f6ea
AUX mysql-connector-c-8.0.21-survive-malformed-charset-files.patch 580 BLAKE2B 76ea04058e14dce1cdd057b51e17d358ff582c82f27a537fb47aa66d58c88327231ca10755a6e02d0c1dab5c67d6eb92d9e9d5d74038595a203b65d3372d4577 SHA512 d8075a712bf12697499b1da2df7f43662bcce073113193e4b29261f965f10af43b1d529f1fe14ffed6c7c9bda3d3b0a61a2b3462e865724496d3d80f10c5264e
+AUX mysql-connector-c-8.0.22-always-build-decompress-utilities.patch 534 BLAKE2B 15bef04f750b5f373d8c5f39690e90be482bfea66430234befc777e9d84d0060d20e1290798ddacbf0e9f0f8db45ba0318d88b61aec3fd1e859285cefff446ef SHA512 7ae81f4fe020c12e45eba041dcca921fa93f42a12d8c8d840b1bec819c00de8b780a792e99cdc3cae55eef74c911de3087b6583d6213913b36428b96f0e1c3af
DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1
+DIST mysql-boost-8.0.22.tar.gz 285934450 BLAKE2B 1ba0c9bb9a0cb74af4842d3b746f8b690c122cfbf2c6d5201ce95e59a257427a8683dd8d5c2be31dfe9ece4761366c1287fa7b841c45db222725bf76b0639bc6 SHA512 792f2ada93ec67a4679228478c6b798e81d9e9f6d13c7f4977cb7682738a4aae3cb483294edc6b2fde16c3960e51af8786216c063ab500840afd39a609e4b612
EBUILD mysql-connector-c-8.0.21-r2.ebuild 3002 BLAKE2B bd309386636ee9e1e6cb5f2019e06718036ada58e0dfd6b6b9f94228ea129d348dd8f08306af2ae85b3d68bcb7f936e06dfe2a889483dd62f148fa299bf57efd SHA512 ee1811c9c6c4e1dd27ece9a70d6e6ca174f2d0419704a4612a97e7421505884adee9e2db97282e9ecc341c09bd6381a3d7572d32dc4ce9031793977583720921
+EBUILD mysql-connector-c-8.0.22.ebuild 2910 BLAKE2B f37f92dd2298b56d5f66e317092bef74115c573b04825be82669b7aef24a19333f0ed7cfdf15d0876e72d084cbb8ac2942c5af3853f0d54faa5cef118995374b SHA512 35fd421c79781edc3d42c9adec925c15e45cd84afb312f825cef2189f0a59e0c6f4d579c8f71facc86a99d43577fd14bfbe7162ad0e11f90bb6065957b0d7281
MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b
diff --git a/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.22-always-build-decompress-utilities.patch b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.22-always-build-decompress-utilities.patch
new file mode 100644
index 000000000000..b0046fd8b224
--- /dev/null
+++ b/dev-db/mysql-connector-c/files/mysql-connector-c-8.0.22-always-build-decompress-utilities.patch
@@ -0,0 +1,22 @@
+--- a/utilities/CMakeLists.txt
++++ b/utilities/CMakeLists.txt
+@@ -123,14 +123,11 @@ MYSQL_ADD_EXECUTABLE(perror
+ DEPENDENCIES GenError
+ LINK_LIBRARIES mysys
+ )
+-IF(BUILD_BUNDLED_LZ4)
+- MYSQL_ADD_EXECUTABLE(lz4_decompress
+- lz4_decompress.cc
+- COMPONENT Server
+- LINK_LIBRARIES ${LZ4_LIBRARY} mysys
+- )
+-ENDIF()
+-
++MYSQL_ADD_EXECUTABLE(lz4_decompress
++ lz4_decompress.cc
++ COMPONENT Server
++ LINK_LIBRARIES ${LZ4_LIBRARY} mysys
++ )
+ MYSQL_ADD_EXECUTABLE(zlib_decompress
+ zlib_decompress.cc
+ COMPONENT Server
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.22.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.22.ebuild
new file mode 100644
index 000000000000..9e70604d323a
--- /dev/null
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.22.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake-multilib
+
+# wrap the config script
+MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+
+DESCRIPTION="C client library for MariaDB/MySQL"
+HOMEPAGE="https://dev.mysql.com/downloads/"
+LICENSE="GPL-2"
+
+SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86"
+
+SLOT="0/21"
+IUSE="ldap libressl static-libs"
+
+RDEPEND="
+ >=app-arch/lz4-0_p131:=[${MULTILIB_USEDEP}]
+ app-arch/zstd:=[${MULTILIB_USEDEP}]
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
+ !libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
+ "
+DEPEND="${RDEPEND}"
+
+# Avoid file collisions, #692580
+RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
+RDEPEND+=" !=dev-db/mysql-5.7.23*"
+RDEPEND+=" !=dev-db/mysql-5.7.24*"
+RDEPEND+=" !=dev-db/mysql-5.7.25*"
+RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
+RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
+RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1"
+
+DOCS=( README )
+
+S="${WORKDIR}/mysql-${PV}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.0.22-always-build-decompress-utilities.patch
+ "${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
+ "${FILESDIR}"/${PN}-8.0.21-libressl.patch
+)
+
+src_prepare() {
+ sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
+
+ # All these are for the server only.
+ # Disable rpm call which would trigger sandbox, #692368
+ sed -i \
+ -e '/MYSQL_CHECK_LIBEVENT/d' \
+ -e '/MYSQL_CHECK_RAPIDJSON/d' \
+ -e '/MYSQL_CHECK_ICU/d' \
+ -e '/MYSQL_CHECK_EDITLINE/d' \
+ -e '/MYSQL_CHECK_CURL/d' \
+ -e '/ADD_SUBDIRECTORY(man)/d' \
+ -e '/ADD_SUBDIRECTORY(share)/d' \
+ -e '/INCLUDE(cmake\/boost/d' \
+ -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+ CMakeLists.txt || die
+
+ # Skip building clients
+ echo > client/CMakeLists.txt || die
+
+ # Forcefully disable auth plugin
+ if ! use ldap ; then
+ sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
+ echo > libmysql/authentication_ldap/CMakeLists.txt || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_LAYOUT=RPM
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DWITH_DEFAULT_COMPILER_OPTIONS=OFF
+ -DENABLED_LOCAL_INFILE=ON
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
+ -DWITH_LZ4=system
+ -DWITH_NUMA=OFF
+ -DWITH_SSL=system
+ -DWITH_ZLIB=system
+ -DWITH_ZSTD=system
+ -DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
+ -DSHARED_LIB_PATCH_VERSION="0"
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DWITHOUT_SERVER=ON
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+}
+
+multilib_src_install_all() {
+ doman \
+ man/my_print_defaults.1 \
+ man/perror.1 \
+ man/zlib_decompress.1
+
+ if ! use static-libs ; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}
diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index b612adf33d2f..5d35733d681d 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -5,23 +5,29 @@ AUX my.cnf.distro-client 637 BLAKE2B b0812e0e03aa9a3b2e55e08b933a0b41b6afd95ded6
AUX my.cnf.distro-server 994 BLAKE2B 41dceff58edf748f9f60ac3c0d1682d2fc2f026fc1fd14b4c2dea398814beda3c09aabea04dd3a9e145464524c629e7e69dc257d1245e0a46dd8584b7f685172 SHA512 cf172edc23d3dda49c21af6b8adef8aa13694d8ceecddf1d612d4ae34d00ba53c51ae4ae7ca4d11083eeacb5d862f59a855a9d80e9e448ab8bbf17f42aac2650
DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396198954fceb5dc039669d236b1dad98eef306702550b517ef30ee3d0e6721667b6f5549df91e3c15cef68888079c00d9ba SHA512 74e8e8794fe54b73776b38296aa42c65547311b80bfe65c88b2f961bd44083e9628eb47da4ebcf4c20e2d7c694f514223bcbf29cce27853cca500710ae97778d
DIST mysql-5.7.31-patches-01.tar.xz 6664 BLAKE2B 8225f286f0090653f9714545daa95ccdadaa58812e55284d1ee52ad2dcca18960b9266797630762595d832aa1dda1d9e2df691f0c728102f162b376346c99b3c SHA512 c6260e688da6e8f049ba7ac0553ad442e76829deaca32c1b7a101ec927a36b1571cb24982391f05545a9f62d94502efc09530d444e4abfc08350ab4c19fbfd37
+DIST mysql-5.7.32-patches-01.tar.xz 6660 BLAKE2B 5c63158615398bdcc4480a0e1b058f491b39ffc7ee33767b425f3b254555411031f64d865e1924afe8aa3926e4cba18049f1219a0a8acc702bc5e011c94fa947 SHA512 bf5e0d27af81e599005268ee243af4cd93f6df95c32cccb268a749322b4e5f73a2ce5d51f0ad1b0e1f2cf4702b8a05e4b2e0b73110fd4aac61f2a0f51bf4952e
DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
+DIST mysql-8.0.22-patches-01.tar.xz 7176 BLAKE2B d793aefb0753bfdc04ae22f6f23e49755658c22bb749df3ba5cb5fad2296729600e209638be23e193aa0aaa114080be939e53e3e9aee45bde610eb17f0439211 SHA512 3606a5cd016a49bbbef008f5d0d0a98df44f523bfacf93cfd4e75f279b14329664241cc3cf63894fb24446a0eb1d51623b1267a5488dd3f7ea7990e9a18bf312
DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
DIST mysql-boost-5.7.31.tar.gz 51382559 BLAKE2B 86430ee01b0b066ffbd1c876c7d09afecdd57f99cfe07417f406345bcdb14cc6fd33a2d4d92dfe15e87f34ec476bf34d62508ac3f99fb3e11957458e0d6ec20b SHA512 d7fc1927c860562d121658031bcbd58d36a942340423bf7b692cef84c29e67b56d009c9f9bb10cde8acabd6f9db58c67eb542349eccc4719fb38c8570738700a
+DIST mysql-boost-5.7.32.tar.gz 52882168 BLAKE2B dd112fa1d8bd29d86fba076675b5b7c9c98b6fb876aed45a00e8a25be716102fc9aa688b7170bef07b1c9f9751737277774d8fb2c64c21e181ecae58f89b4a8a SHA512 33a617d040efd065ea1c2ad84be537f851480abd5cc8a6879b7f170bc4e6db9432bd03f2a6bc680b71f17839c508cab0e7ef1a3aba032197da1b7943c916c77a
DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1
+DIST mysql-boost-8.0.22.tar.gz 285934450 BLAKE2B 1ba0c9bb9a0cb74af4842d3b746f8b690c122cfbf2c6d5201ce95e59a257427a8683dd8d5c2be31dfe9ece4761366c1287fa7b841c45db222725bf76b0639bc6 SHA512 792f2ada93ec67a4679228478c6b798e81d9e9f6d13c7f4977cb7682738a4aae3cb483294edc6b2fde16c3960e51af8786216c063ab500840afd39a609e4b612
DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f
EBUILD mysql-5.7.27-r2.ebuild 31722 BLAKE2B b19b37cb6840d6cd20d64807a2324190325cc607827173a3ee6270fa167fdeb0b370a488c3391861601323b5979fe5803a955ebcd645eaf96edf45ee2af73ca3 SHA512 0f7ffadb2841a6553f443aaca8bb133fb6e35b3af5d3781156a335baaf44c585f843bb6332e5946d333dd0455c051bd8820810814740d00efd29bec471b4ef7f
EBUILD mysql-5.7.29-r1.ebuild 31458 BLAKE2B 5f68d00d9c52432b249be3dcd5c6847d5507700e58d53381a7397babe49681dadb4c39daa59850d353855abbaef59f648cef95a19a11da815200bb60b7f6f55b SHA512 7dd0e4ce9b9b1d7d28f9dced9647664d6ec1f50d9f2a31b41c7f67be4bb8cd2018638fb9b15d06ef5ec29a78b3258dec18757f404717e01d57a7c04caa137c5c
EBUILD mysql-5.7.30-r1.ebuild 30683 BLAKE2B fb6c808884b175e231c782c80e7fb6993ee6bed6fec8263fef23d5e1b2e92e2d990b9ed45bc2fb6aba06620e6825fbd9d60a1fd48c68ad1b2fe251089ee9280c SHA512 9fe9e04a60e3aa4945861c13a5f828325cbc23311d9a412e5434551ca384479e5b72d181292c0cb4730b3da1d331eec6379ff483f6da66dd682754680851377a
-EBUILD mysql-5.7.31.ebuild 37541 BLAKE2B adf7175ae7e528e904fe3c9ab487fdbfff89ca240fd9e2539b457235a9972636a0fb1025f02e83a34b45690a6e2359486420604667433883854a5978f9b84d31 SHA512 a0092616a555400e8baedff4cb926ae20b8eb9c8ee5c54542b6649b196fb13468b2017b808f49b0dbe5bb9a662a0e5340457b9eab3347409269a53225bc5b8ec
+EBUILD mysql-5.7.31.ebuild 37552 BLAKE2B 7c7ab74589cf132b6cc2885ee949ec5d5cf33597b425f78909027f32e0abcf9129f63a793886d85c5a385d1110ddc223756d16f855b6af5ddd7f704d74f030bd SHA512 4fba6d5179e1b234cb4fc91d37e0b2d1c261b93e87f416884bb7035e5059edf5ee9b52ee3bca6fb84a89a0d7e123c5259d2652aab81ff8181186c3be71c71690
+EBUILD mysql-5.7.32.ebuild 37598 BLAKE2B 467bc83326192f67778dd41e25687ff0af4c821c4cb77344c74491cddf65ab6585f2eb4c109864cfb7ed767a9f9c770a93bddcdafef6e46271921e3c7962df78 SHA512 280759ec8b388a41762b573459cc8729a887a9c9934e221e1a59cb63cbe8d40340614d156b2387d6702d87c06a1ad06df558e4b6894aa0ccc6aa27bcf231712c
EBUILD mysql-8.0.19-r2.ebuild 37949 BLAKE2B c0ae41237387d4c58bac1f0f218fa467eba25a79e44605489f3835a1508c94423ea31c7d7d3f39e00f91a56a2320ffcca4fd968a425a3f898c9b7c2b9713f902 SHA512 434b40517a183a8bbb877ad79661ccc3ee1a89d40a374823c8778d87f75593f295c7a635496be1cb6376036da9c3acd5f82bfa2b62a88165b9c4b4b0ffd6469f
EBUILD mysql-8.0.20-r1.ebuild 37217 BLAKE2B 2aef6bce1bd7f8e5e55b64caa304b427c84fcd365e265a6ce0d2458491349cd8c04c17a50644d1be7fca9218e17ad748b9307fe7b32270c6ba936077e2746d9b SHA512 ca65ad63a374696e4adc2d73176de71a0b27e267b91dfba20641303c4b9e8cfa1241375c7cd69af660b2d2632c629ab0658d1ed6e2454032a689f2995a2c505c
-EBUILD mysql-8.0.21-r1.ebuild 38164 BLAKE2B b116bdce0e266fad0e0c673b9dc5eb036991b0a334c102401abad24d37ae711b9a390441592da86fb22fbacb37d53cb8a7dadd764c4eba323f4aeeb589316fd0 SHA512 4dcf7f718a3c07d86e90f0337d182db950ecbdb7ef764eac985c53620fefe568465e6183f790c0f049063705c6db622f863cacc87b773cdf15ce0ac34f119a5e
+EBUILD mysql-8.0.21-r1.ebuild 38168 BLAKE2B 7fd4dcb6e42c5d1dc4131c0de51e077fdd130012f9a25ef09731cdb15c6c72ae10063a431a8146934b1a19fdde4de21ea4b32b58190f88b03a4a91ace322acfe SHA512 2539cb667afe19ad476ef73fe30878fc98f04d63b6edac0b201cdd7b48ef48e5eb8125a87e1c021e7e53c0d2e6142abfe8743d26ed6f7c88ad7ae6565cd346f2
+EBUILD mysql-8.0.22.ebuild 37603 BLAKE2B f71796fa1cb09a47e2b723e0b7038de270e5e8b25197a0437fb78126312a319a67775cbc143a81ac17547eb4a7bceeb53dd0b05119999a211cf5c72514def7e2 SHA512 851615011ce1241b1203c3724d35f0f9a0109b87ee34f44e88f2cc421c03755376935287ebac8d4c29d8d024430912274c90f3d77df85c610185fc03061c4a6b
MISC metadata.xml 1470 BLAKE2B 09754bc9a1cf5584588c4f69700919fd72a860175ae1c045ce90a644a1360d5abccedd5b2649e16fcd189e82df659ceb96fd71ab2aeccdac6256af4f80e46a0d SHA512 d96f6a133611f50b80116221e2586eff899210255efac58d9f6ef7ccd0ee0854a3322b4d4d1db15b3b2e410525f5d73e43f52a833f3ce358f6708b88b3cf00c7
diff --git a/dev-db/mysql/mysql-5.7.31.ebuild b/dev-db/mysql/mysql-5.7.31.ebuild
index 8731897ca911..d83c16e32a1e 100644
--- a/dev-db/mysql/mysql-5.7.31.ebuild
+++ b/dev-db/mysql/mysql-5.7.31.ebuild
@@ -28,7 +28,7 @@ RESTRICT="!test? ( test ) libressl? ( test )"
REQUIRED_USE="?? ( tcmalloc jemalloc )"
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="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
@@ -54,7 +54,7 @@ COMMON_DEPEND="
>=app-arch/lz4-0_p131:=
cjk? ( app-text/mecab:= )
experimental? (
- dev-libs/libevent:=
+ dev-libs/libevent:=[ssl]
dev-libs/protobuf:=
net-libs/libtirpc:=
)
@@ -73,7 +73,7 @@ DEPEND="${COMMON_DEPEND}
dev-libs/protobuf
virtual/yacc
server? (
- dev-libs/libevent
+ dev-libs/libevent:=[ssl]
experimental? ( net-libs/rpcsvc-proto )
)
static? ( sys-libs/ncurses[static-libs] )
diff --git a/dev-db/mysql/mysql-5.7.32.ebuild b/dev-db/mysql/mysql-5.7.32.ebuild
new file mode 100644
index 000000000000..2d96c9c1baaa
--- /dev/null
+++ b/dev-db/mysql/mysql-5.7.32.ebuild
@@ -0,0 +1,1238 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+ multiprocessing prefix toolchain-funcs multilib-minimal
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.32-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+ https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
+ http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
+ ${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="5.7/18"
+IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa +perl profiling
+ selinux +server static static-libs systemtap tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+KEYWORDS="~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
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+# MULTILIB_USEDEP only set for libraries used by the client library
+COMMON_DEPEND="
+ sys-libs/ncurses:0=
+ client-libs? (
+ >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?]
+ !libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] )
+ libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] )
+ )
+ !client-libs? (
+ dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
+ >=sys-libs/zlib-1.2.3:0=
+ !libressl? ( >=dev-libs/openssl-1.0.0:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ server? (
+ >=app-arch/lz4-0_p131:=
+ cjk? ( app-text/mecab:= )
+ experimental? (
+ dev-libs/libevent:=[ssl]
+ dev-libs/protobuf:=
+ net-libs/libtirpc:=
+ )
+ jemalloc? ( dev-libs/jemalloc:0= )
+ kernel_linux? (
+ dev-libs/libaio:0=
+ sys-process/procps:0=
+ )
+ numa? ( sys-process/numactl )
+ )
+ systemtap? ( >=dev-util/systemtap-1.3:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+"
+DEPEND="${COMMON_DEPEND}
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ dev-libs/protobuf
+ virtual/yacc
+ server? (
+ dev-libs/libevent:=[ssl]
+ experimental? ( net-libs/rpcsvc-proto )
+ )
+ static? ( sys-libs/ncurses[static-libs] )
+ test? (
+ acct-group/mysql acct-user/mysql
+ dev-perl/JSON
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ !dev-db/mysql:0
+ !dev-db/mysql:8.0
+ client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
+ selinux? ( sec-policy/selinux-mysql )
+ server? (
+ !prefix? (
+ acct-group/mysql acct-user/mysql
+ dev-db/mysql-init-scripts
+ )
+ )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+ : ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+ : ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ : ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ : ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use server ; then
+ CHECKREQS_DISK_BUILD="3G"
+
+ if has test $FEATURES ; then
+ CHECKREQS_DISK_BUILD="9G"
+ fi
+
+ check-reqs_pkg_pretend
+ fi
+ fi
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ CHECKREQS_DISK_BUILD="3G"
+
+ if has test ${FEATURES} ; then
+ CHECKREQS_DISK_BUILD="9G"
+
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+ [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+ && die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+ if use latin1 ; then
+ # Upstream only supports tests with default charset
+ die "Testing with USE=latin1 is not supported."
+ fi
+ fi
+
+ if use kernel_linux ; then
+ if use numa ; then
+ linux-info_get_any_version
+
+ local CONFIG_CHECK="~NUMA"
+
+ local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+ WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+ check_extra_config
+ fi
+ fi
+
+ use server && check-reqs_pkg_setup
+ fi
+}
+
+pkg_preinst() {
+ # Here we need to see if the implementation switched client libraries
+ # We check if this is a new instance of the package and a client library already exists
+ local SHOW_ABI_MESSAGE libpath
+ if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}/usr/$(get_libdir)/libmysqlclient.so" ]] ; then
+ libpath=$(readlink "${EROOT}/usr/$(get_libdir)/libmysqlclient.so")
+ elog "Due to ABI changes when switching between different client libraries,"
+ elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
+ elog "Please run: revdep-rebuild --library ${libpath}"
+ ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
+ fi
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
+
+ if use server ; then
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog "\"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ elog
+ elog "If you are switching server implentations, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ else
+ einfo
+ elog "If you are upgrading major versions, you should run the"
+ elog "mysql_upgrade tool."
+ einfo
+ fi
+ fi
+
+ # Note about configuration change
+ einfo
+ elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+ elog "to several files in /etc/mysql/mysql.d."
+ elog "Please backup any changes you made to /etc/mysql/my.cnf"
+ elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+ elog "You may have as many files as needed and they are read alphabetically."
+ elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+ einfo
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${P}" "${S}" || die
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/mysql-patches
+
+ if use jemalloc ; then
+ echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+ fi
+
+ if use tcmalloc ; then
+ echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+ fi
+
+ # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+ if [[ -d "${S}/support-files/SELinux" ]] ; then
+ echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+ fi
+
+ # Remove bundled libs so we cannot accidentally use them
+ # We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
+ rm -rv \
+ "${S}"/extra/protobuf \
+ "${S}"/extra/libevent \
+ "${S}"/zlib \
+ || die
+
+ # Don't clash with dev-db/mysql-connector-c
+ rm \
+ man/my_print_defaults.1 \
+ man/perror.1 \
+ man/zlib_decompress.1 \
+ || die
+
+ if use libressl ; then
+ sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
+ "${S}/cmake/ssl.cmake" || die
+ fi
+
+ sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # bug #283926, with GCC4.4, this is required to get correct behavior.
+ append-flags -fno-strict-aliasing
+
+ if use client-libs ; then
+ multilib-minimal_src_configure
+ else
+ multilib_src_configure
+ fi
+}
+
+multilib_src_configure() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ if ! multilib_is_native_abi && ! use client-libs ; then
+ return
+ fi
+
+ CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+ # debug hack wrt #497532
+ mycmakeargs=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+ -DSYSCONFDIR="${EPREFIX}/etc/mysql"
+ -DINSTALL_BINDIR=bin
+ -DINSTALL_DOCDIR=share/doc/${PF}
+ -DINSTALL_DOCREADMEDIR=share/doc/${PF}
+ -DINSTALL_INCLUDEDIR=include/mysql
+ -DINSTALL_INFODIR=share/info
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DINSTALL_MANDIR=share/man
+ -DINSTALL_MYSQLSHAREDIR=share/mysql
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+ -DINSTALL_SCRIPTDIR=share/mysql/scripts
+ -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+ -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ ### TODO: make this system but issues with UTF-8 prevent it
+ -DWITH_EDITLINE=bundled
+ -DWITH_ZLIB=system
+ -DWITH_SSL=system
+ -DWITH_LIBWRAP=0
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ -DWITH_DEFAULT_FEATURE_SET=0
+ # The build forces this to be defined when cross-compiling. We pass it
+ # all the time for simplicity and to make sure it is actually correct.
+ -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+ -DWITH_CURL=system
+ -DWITH_BOOST="${S}/boost"
+ )
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ if ! use client-libs ; then
+ mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+ fi
+
+ # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
+ # systemtap only works on native ABI, bug 530132
+ if multilib_is_native_abi ; then
+ mycmakeargs+=(
+ -DENABLE_DTRACE=$(usex systemtap)
+ )
+ else
+ mycmakeargs+=(
+ -DWITHOUT_TOOLS=1
+ -DWITH_READLINE=1
+ -DENABLE_DTRACE=0
+ )
+ fi
+
+ if multilib_is_native_abi && use server ; then
+ mycmakeargs+=(
+ -DWITH_LIBEVENT=system
+ -DWITH_LZ4=system
+ -DWITH_PROTOBUF=system
+ -DWITH_MECAB=$(usex cjk system OFF)
+ -DWITH_NUMA=$(usex numa ON OFF)
+ -DWITH_RAPID=$(usex experimental ON OFF)
+ )
+
+ if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]] ; then
+ ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+ ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+ ewarn "You MUST file bugs without these variables set."
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+ elif ! use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8
+ -DDEFAULT_COLLATION=utf8_general_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ fi
+
+ mycmakeargs+=(
+ -DEXTRA_CHARSETS=all
+ -DDISABLE_SHARED=$(usex static YES NO)
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_EMBEDDED_SERVER=OFF
+ )
+
+ if use profiling ; then
+ # Setting to OFF doesn't work: Once set, profiling options will be added
+ # to `mysqld --help` output via sql/sys_vars.cc causing
+ # "main.mysqld--help-notwin" test to fail
+ mycmakeargs+=( -DENABLED_PROFILING=ON )
+ fi
+
+ if use static ; then
+ mycmakeargs+=( -DWITH_PIC=1 )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_EXAMPLE_STORAGE_ENGINE=0
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_FEDERATED_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_INNODB_MEMCACHED=0
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ -DWITH_PARTITION_STORAGE_ENGINE=1
+ )
+
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_EMBEDDED_SERVER=OFF
+ -DEXTRA_CHARSETS=none
+ )
+ fi
+
+ cmake_src_configure
+}
+
+src_compile() {
+ if use client-libs ; then
+ multilib-minimal_src_compile
+ else
+ multilib_src_compile
+ fi
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='latin1 perl server' \
+# FEATURES='test userpriv -usersandbox' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+ _disable_test() {
+ local rawtestname reason
+ rawtestname="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}'"
+ echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ if ! use server ; then
+ einfo "Skipping server tests due to minimal build."
+ return 0
+ fi
+
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+
+ # Run CTest (test-units)
+ cmake_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ if [[ -z "${MTR_PARALLEL}" ]] ; then
+ local -x MTR_PARALLEL=$(makeopts_jobs)
+
+ if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+ # Running multiple tests in parallel usually require higher ulimit
+ # and fs.aio-max-nr setting. In addition, tests like main.multi_update
+ # are known to hit timeout when system is busy.
+ # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+ # using "auto".
+ local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+ info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+ einfo "${info_msg}"
+ unset info_msg
+ MTR_PARALLEL=4
+ fi
+ else
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+ fi
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ # Run mysql tests
+ pushd "${TESTDIR}" &>/dev/null || die
+
+ touch "${T}/disabled.def"
+ # These are failing in MySQL 5.7 for now and are believed to be
+ # false positives:
+ #
+ local t
+
+ for t in \
+ auth_sec.keyring_udf \
+ innodb.import_compress_encrypt \
+ ; do
+ _disable_test "$t" "False positives in Gentoo"
+ done
+
+ # Unstable tests
+ # - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
+ # - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
+ # - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
+ for t in \
+ main.xa_prepared_binlog_off \
+ rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
+ rpl.rpl_non_direct_stm_mixing_engines \
+ ; do
+ _disable_test "$t" "Unstable test"
+ done
+
+ for t in \
+ gis.geometry_class_attri_prop \
+ gis.geometry_property_function_issimple \
+ gis.gis_bugs_crashes \
+ gis.spatial_op_testingfunc_mix \
+ gis.spatial_analysis_functions_buffer \
+ gis.spatial_analysis_functions_distance \
+ gis.spatial_utility_function_distance_sphere \
+ gis.spatial_utility_function_simplify \
+ gis.spatial_analysis_functions_centroid \
+ main.with_recursive \
+ ; do
+ _disable_test "$t" "Known rounding error with latest AMD processors"
+ done
+
+ if ! hash zip 1>/dev/null 2>&1 ; then
+ # no need to force dep app-arch/zip for one test
+ _disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
+ fi
+
+ if use numa && use kernel_linux ; then
+ # bug 584880
+ if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
+ for t in sys_vars.innodb_numa_interleave_basic ; do
+ _disable_test "$t" "Test $t requires system with NUMA support"
+ done
+ fi
+ fi
+
+ if ! use latin1 ; then
+ # The following tests will fail if DEFAULT_CHARSET
+ # isn't set to latin1:
+ for t in \
+ binlog.binlog_mysqlbinlog_filter \
+ binlog.binlog_xa_prepared_disconnect \
+ funcs_1.is_columns_mysql \
+ funcs_1.is_tables_mysql \
+ funcs_1.is_triggers \
+ innodb.innodb_pagesize_max_recordsize \
+ innodb.innodb-system-table-view \
+ innodb.mysqldump_max_recordsize \
+ main.mysql_client_test \
+ main.mysqld--help-notwin \
+ main.type_string \
+ main.information_schema \
+ perfschema.binlog_edge_mix \
+ perfschema.binlog_edge_stmt \
+ rpl.rpl_xa_survive_disconnect \
+ rpl.rpl_xa_survive_disconnect_lsu_off \
+ rpl.rpl_xa_survive_disconnect_table \
+ ; do
+ _disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
+ done
+ fi
+
+ if has_version '>=dev-libs/openssl-1.1.1' ; then
+ # Tests are expecting <openssl-1.1.1 default cipher
+ for t in \
+ auth_sec.cert_verify \
+ auth_sec.mysql_ssl_connection \
+ auth_sec.openssl_cert_generation \
+ auth_sec.ssl_auto_detect \
+ auth_sec.ssl_mode \
+ auth_sec.tls \
+ binlog.binlog_grant_alter_user \
+ encryption.innodb_onlinealter_encryption \
+ main.grant_alter_user_qa \
+ main.grant_user_lock_qa \
+ main.mysql_ssl_default \
+ main.openssl_1 \
+ main.plugin_auth_sha256_tls \
+ main.ssl \
+ main.ssl_8k_key \
+ main.ssl_bug75311 \
+ main.ssl_ca \
+ main.ssl_cipher \
+ main.ssl_compress \
+ main.ssl_crl \
+ main.ssl_ecdh \
+ main.ssl_verify_identity \
+ x.connection_tls_version \
+ x.connection_openssl \
+ ; do
+ _disable_test "$t" "Requires <dev-libs/openssl-1.1.1"
+ done
+ fi
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ local MULTILIB_WRAPPED_HEADERS
+ local MULTILIB_CHOST_TOOLS
+ if use client-libs ; then
+ # headers with ABI specific data
+ MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/mysql/server/my_config.h
+ /usr/include/mysql/server/mysql_version.h )
+
+ # wrap the config scripts
+ MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
+ multilib-minimal_src_install
+ else
+ multilib_src_install
+ multilib_src_install_all
+ fi
+}
+
+# Intentionally override eclass function
+multilib_src_install() {
+ cmake_src_install
+
+ # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+ find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+multilib_src_install_all() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Convenience links
+ einfo "Making Convenience links for mysqlcheck multi-call binary"
+ dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+ dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+ dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+ # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+ if [[ -d "${ED}/usr/data" ]] ; then
+ rm -Rf "${ED}/usr/data" || die
+ fi
+
+ # Unless they explicitly specific USE=test, then do not install the
+ # testsuite. It DOES have a use to be installed, esp. when you want to do a
+ # validation of your database configuration after tuning it.
+ if ! use test ; then
+ rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
+ fi
+
+ # Configuration stuff
+ einfo "Building default configuration ..."
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+ [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+ cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+ eprefixify "${TMPDIR}/my.cnf"
+ doins "${TMPDIR}/my.cnf"
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+ cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+ eprefixify "${TMPDIR}/50-distro-client.cnf"
+ doins "${TMPDIR}/50-distro-client.cnf"
+
+ if use server ; then
+ mycnf_src="my.cnf.distro-server"
+ sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+ "${FILESDIR}/${mycnf_src}" \
+ > "${TMPDIR}/my.cnf.ok" || die
+
+ if use prefix ; then
+ sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+
+ if use latin1 ; then
+ sed -i \
+ -e "/character-set/s|utf8|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+
+ eprefixify "${TMPDIR}/my.cnf.ok"
+
+ newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+ fi
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+}
+
+pkg_config() {
+ _getoptval() {
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ local cmd=(
+ "${my_print_defaults_binary}"
+ "${extra_options}"
+ "${section}"
+ )
+ local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+ if [[ ${#results[@]} -gt 0 ]] ; then
+ # When option is set multiple times only return last value
+ echo "${results[-1]}"
+ fi
+ }
+
+ _mktemp_dry() {
+ # emktemp has no --dry-run option
+ local template="${1}"
+
+ if [[ -z "${template}" ]] ; then
+ if [[ -z "${T}" ]] ; then
+ template="/tmp/XXXXXXX"
+ else
+ template="${T}/XXXXXXX"
+ fi
+ fi
+
+ local template_wo_X=${template//X/}
+ local n_X
+ let n_X=${#template}-${#template_wo_X}
+ if [[ ${n_X} -lt 3 ]] ; then
+ echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+ return
+ fi
+
+ local attempts=0
+ local character tmpfile
+ while [[ true ]] ; do
+ let attempts=attempts+1
+
+ new_file=
+ while read -n1 character ; do
+ if [[ "${character}" == "X" ]] ; then
+ tmpfile+="${RANDOM:0:1}"
+ else
+ tmpfile+="${character}"
+ fi
+ done < <(echo -n "${template}")
+
+ if [[ ! -f "${tmpfile}" ]]
+ then
+ echo "${tmpfile}"
+ return
+ fi
+
+ if [[ ${attempts} -ge 100 ]] ; then
+ echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+ return
+ fi
+ done
+ }
+
+ local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+ if [[ ! -x "${mysqld_binary}" ]] ; then
+ die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+ fi
+
+ local mysql_binary="${EROOT}/usr/bin/mysql"
+ if [[ ! -x "${mysql_binary}" ]] ; then
+ die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+ fi
+
+ local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+ if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+ die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+ fi
+
+ if [[ -z "${MYSQL_USER}" ]] ; then
+ MYSQL_USER=mysql
+ if use prefix ; then
+ MYSQL_USER=$(id -u -n 2>/dev/null)
+ if [[ -z "${MYSQL_USER}" ]] ; then
+ die "Failed to determine current username!"
+ fi
+ fi
+ fi
+
+ if [[ -z "${MYSQL_GROUP}" ]] ; then
+ MYSQL_GROUP=mysql
+ if use prefix ; then
+ MYSQL_GROUP=$(id -g -n 2>/dev/null)
+ if [[ -z "${MYSQL_GROUP}" ]] ; then
+ die "Failed to determine current user groupname!"
+ fi
+ fi
+ fi
+
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ local -x HOME="${EROOT}/root"
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Read currently set data directory
+ MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+ # Bug #213475 - MySQL _will_ object strenously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ die "Sorry, unable to find MY_DATADIR!"
+ elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+ ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+ ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+ die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+ fi
+
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+ # These are dir+prefix
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+ # Create missing directories.
+ # Always check if mysql user can write to directory even if we just
+ # created directory because a parent directory might be not
+ # accessible for that user.
+ PID_DIR="${EROOT}/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]] ; then
+ einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+ install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+ || die "Failed to create PID directory '${PID_DIR}'!"
+ fi
+
+ local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_pid_dir_testfile}" ]] \
+ && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_pid_dir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+ else
+ rm "${_pid_dir_testfile}" || die
+ unset _pid_dir_testfile
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]] ; then
+ einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+ || die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+ fi
+
+ local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_datadir_testfile}" ]] \
+ && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_datadir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+ else
+ rm "${_my_datadir_testfile}" || die
+ unset _my_datadir_testfile
+ fi
+
+ if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+ einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+ || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+ fi
+
+ if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+ MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+ [[ -z "${MYSQL_TMPDIR}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+ mkdir "${MYSQL_TMPDIR}" || die
+ chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+ fi
+
+ # Now we need to test MYSQL_TMPDIR...
+ local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_tmpdir_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_tmpdir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+ else
+ rm "${_my_tmpdir_testfile}" || die
+ unset _my_tmpdir_testfile
+ fi
+
+ if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+ einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+ || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+ fi
+
+ if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+ local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_logbin_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_logbin_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+ else
+ rm "${_my_logbin_testfile}" || die
+ unset _my_logbin_testfile
+ fi
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+ einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+ || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+ local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_relaylog_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_relaylog_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+ else
+ rm "${_my_relaylog_testfile}" || die
+ unset _my_relaylog_testfile
+ fi
+ fi
+
+ local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+ if [[ -z "${mysql_install_log}" ]] ; then
+ die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+ else
+ # make sure file is writable for MYSQL_USER...
+ touch "${mysql_install_log}" || die
+ chown ${MYSQL_USER} "${mysql_install_log}" || die
+ fi
+
+ local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+ if [[ -z "${mysqld_logfile}" ]] ; then
+ die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+ else
+ # make sure file is writable for MYSQL_USER...
+ touch "${mysqld_logfile}" || die
+ chown ${MYSQL_USER} "${mysqld_logfile}" || die
+ fi
+
+ echo ""
+ einfo "Detected settings:"
+ einfo "=================="
+ einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+ einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+ einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+ einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+ if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+ einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+ einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+ fi
+
+ einfo "PID DIR:\t\t\t\t${PID_DIR}"
+ einfo "Install db log:\t\t\t${mysql_install_log}"
+ einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+ if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ local tmp_mysqld_password_source=
+
+ for tmp_mysqld_password_source in mysql client ; do
+ einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+ MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+ if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+ ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+ MYSQL_ROOT_PASSWORD=
+ continue
+ fi
+
+ einfo "Found password in '${tmp_mysqld_password_source}' section!"
+ break
+ fi
+ done
+
+ # Sometimes --show is required to display passwords in some implementations of my_print_defaults
+ if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+ MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+ fi
+
+ unset tmp_mysqld_password_source
+ fi
+
+ if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ local pwd1="a"
+ local pwd2="b"
+
+ echo
+ einfo "No password for mysql 'root' user was specified via environment"
+ einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+ einfo "file like '${HOME}/.my.cnf'."
+ einfo "To continue please provide a password for the mysql 'root' user"
+ einfo "now on console:"
+ ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+ read -rsp " >" pwd1 ; echo
+
+ einfo "Retype the password"
+ read -rsp " >" pwd2 ; echo
+
+ if [[ "x$pwd1" != "x$pwd2" ]] ; then
+ die "Passwords are not the same!"
+ fi
+
+ MYSQL_ROOT_PASSWORD="${pwd1}"
+ unset pwd1 pwd2
+
+ echo
+ fi
+
+ local -a mysqld_options
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see http://bugs.mysql.com/bug.php?id=31312
+ use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+ # Figure out which options we need to disable to do the setup
+ local helpfile="${TMPDIR}/mysqld-help"
+ "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+ local opt optexp optfull
+ for opt in host-cache name-resolve networking slave-start \
+ federated ssl log-bin relay-log slow-query-log external-locking \
+ log-slave-updates \
+ ; do
+ optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+ egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+ done
+
+ # Prepare timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+ [[ -z "${tz_sql}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+ echo "USE mysql;" >"${tz_sql}"
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+ if [[ $? -ne 0 ]] ; then
+ die "mysql_tzinfo_to_sql failed!"
+ fi
+
+ # --initialize-insecure will not set root password
+ # --initialize would set a random one in the log which we don't need as we set it ourselves
+ local cmd=(
+ "${mysqld_binary}"
+ "${mysqld_options[@]}"
+ "--initialize-insecure"
+ "--init-file='${tz_sql}'"
+ "--basedir='${EROOT}/usr'"
+ "--datadir='${MY_DATADIR}'"
+ "--tmpdir='${MYSQL_TMPDIR}'"
+ "--log-error='${mysql_install_log}'"
+ "--user=${MYSQL_USER}"
+ )
+
+ einfo "Initializing ${PN} data directory: ${cmd[@]}"
+ eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+ if [[ $? -ne 0 ]] ; then
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+ die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+ fi
+
+ rm "${tz_sql}" || die
+
+ local x=${RANDOM}
+ local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+ local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+ unset x
+
+ cmd=(
+ "${mysqld_binary}"
+ "${mysqld_options[@]}"
+ "--basedir='${EROOT}/usr'"
+ "--datadir='${MY_DATADIR}'"
+ "--tmpdir='${MYSQL_TMPDIR}'"
+ --max_allowed_packet=8M
+ --net_buffer_length=16K
+ "--socket='${socket}'"
+ "--pid-file='${pidfile}'"
+ "--log-error='${mysqld_logfile}'"
+ "--user=${MYSQL_USER}"
+ )
+
+ einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+ eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+ echo -n "Waiting for mysqld to accept connections "
+ local maxtry=15
+ while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+
+ if [[ -S "${socket}" ]] ; then
+ # Even with a socket we don't know if mysqld will abort
+ # start due to an error so just wait a little bit more...
+ maxtry=5
+ while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ fi
+
+ echo
+
+ if [[ ! -S "${socket}" ]] ; then
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+ die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+ fi
+
+ local mysql_logfile="${TMPDIR}/set_root_pw.log"
+ touch "${mysql_logfile}" || die
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+ cmd=(
+ "${mysql_binary}"
+ --no-defaults
+ "--socket='${socket}'"
+ -hlocalhost
+ "-e \"${sql}\""
+ )
+ eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+ local rc=$?
+ eend ${rc}
+
+ if [[ ${rc} -ne 0 ]] ; then
+ # Poor man's solution which tries to avoid having password
+ # in log. NOTE: sed can fail if user didn't follow advice
+ # and included character which will require escaping...
+ sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+ die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+ fi
+
+ # Stop the server
+ if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+ echo -n "Stopping the server "
+ pkill -F "${pidfile}" &>/dev/null
+
+ maxtry=10
+ while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+
+ echo
+
+ if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+ # We somehow failed to stop server.
+ # However, not a fatal error. Just warn the user.
+ ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+ fi
+ fi
+
+ einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}
diff --git a/dev-db/mysql/mysql-8.0.21-r1.ebuild b/dev-db/mysql/mysql-8.0.21-r1.ebuild
index f66ee05d1adb..a12c3b675960 100644
--- a/dev-db/mysql/mysql-8.0.21-r1.ebuild
+++ b/dev-db/mysql/mysql-8.0.21-r1.ebuild
@@ -37,7 +37,7 @@ REQUIRED_USE="?? ( tcmalloc jemalloc )
router? ( server )
tcmalloc? ( server )"
-KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+KEYWORDS="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
@@ -54,7 +54,7 @@ COMMON_DEPEND="
!libressl? ( >=dev-libs/openssl-1.0.0:0= )
server? (
dev-libs/icu:=
- dev-libs/libevent:=
+ dev-libs/libevent:=[ssl]
>=dev-libs/protobuf-3.8:=
net-libs/libtirpc:=
cjk? ( app-text/mecab:= )
diff --git a/dev-db/mysql/mysql-8.0.22.ebuild b/dev-db/mysql/mysql-8.0.22.ebuild
new file mode 100644
index 000000000000..b6a594d1a817
--- /dev/null
+++ b/dev-db/mysql/mysql-8.0.22.ebuild
@@ -0,0 +1,1157 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+ multiprocessing prefix toolchain-funcs
+
+MY_PV="${PV//_pre*}"
+MY_P="${PN}-${MY_PV}"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.22-patches-01.tar.xz"
+
+SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
+ https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
+ http://downloads.mysql.com/archives/MySQL-8.0/${PN}-boost-${MY_PV}.tar.gz
+ ${PATCH_SET}"
+
+HOMEPAGE="https://www.mysql.com/"
+DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 libressl numa +perl profiling
+ router selinux +server tcmalloc test"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+ cjk? ( server )
+ jemalloc? ( server )
+ numa? ( server )
+ profiling? ( server )
+ router? ( server )
+ tcmalloc? ( server )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~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"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+ >=app-arch/lz4-0_p131:=
+ app-arch/zstd:=
+ sys-libs/ncurses:0=
+ >=sys-libs/zlib-1.2.3:0=
+ libressl? ( dev-libs/libressl:0= )
+ !libressl? ( >=dev-libs/openssl-1.0.0:0= )
+ server? (
+ dev-libs/icu:=
+ dev-libs/libevent:=[ssl]
+ >=dev-libs/protobuf-3.8:=
+ net-libs/libtirpc:=
+ cjk? ( app-text/mecab:= )
+ jemalloc? ( dev-libs/jemalloc:0= )
+ kernel_linux? (
+ dev-libs/libaio:0=
+ sys-process/procps:0=
+ )
+ numa? ( sys-process/numactl )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ virtual/yacc
+ server? ( net-libs/rpcsvc-proto )
+ test? (
+ acct-group/mysql acct-user/mysql
+ dev-perl/JSON
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ !dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
+ !dev-db/mysql:0
+ !dev-db/mysql:5.7
+ selinux? ( sec-policy/selinux-mysql )
+ !prefix? (
+ acct-group/mysql acct-user/mysql
+ dev-db/mysql-init-scripts
+ )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+ : ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+ : ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ : ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ : ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use server ; then
+ CHECKREQS_DISK_BUILD="2G"
+
+ if has test $FEATURES ; then
+ CHECKREQS_DISK_BUILD="9G"
+ fi
+
+ check-reqs_pkg_pretend
+ fi
+ fi
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ CHECKREQS_DISK_BUILD="2G"
+
+ if has test ${FEATURES} ; then
+ CHECKREQS_DISK_BUILD="9G"
+
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+ [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+ && die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+ if use latin1 ; then
+ # Upstream only supports tests with default charset
+ die "Testing with USE=latin1 is not supported."
+ fi
+ fi
+
+ if use kernel_linux ; then
+ if use numa ; then
+ linux-info_get_any_version
+
+ local CONFIG_CHECK="~NUMA"
+
+ local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+ WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+ check_extra_config
+ fi
+ fi
+
+ use server && check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/mysql-patches
+
+ # Avoid rpm call which would trigger sandbox, #692368
+ sed -i \
+ -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+ CMakeLists.txt || die
+
+ # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+ if [[ -d "${S}/support-files/SELinux" ]] ; then
+ echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+ fi
+
+ # Remove man pages for client-lib tools we don't install
+ rm \
+ man/my_print_defaults.1 \
+ man/perror.1 \
+ man/zlib_decompress.1 \
+ || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # bug #283926, with GCC4.4, this is required to get correct behavior.
+ append-flags -fno-strict-aliasing
+
+ CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+ # debug hack wrt #497532
+ mycmakeargs=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+ -DSYSCONFDIR="${EPREFIX}/etc/mysql"
+ -DINSTALL_BINDIR=bin
+ -DINSTALL_DOCDIR=share/doc/${PF}
+ -DINSTALL_DOCREADMEDIR=share/doc/${PF}
+ -DINSTALL_INCLUDEDIR=include/mysql
+ -DINSTALL_INFODIR=share/info
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DINSTALL_MANDIR=share/man
+ -DINSTALL_MYSQLSHAREDIR=share/mysql
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+ -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+ -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ # Using bundled editline to get CTRL+C working
+ -DWITH_EDITLINE=bundled
+ -DWITH_ZLIB=system
+ -DWITH_SSL=system
+ -DWITH_LIBWRAP=0
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ # The build forces this to be defined when cross-compiling. We pass it
+ # all the time for simplicity and to make sure it is actually correct.
+ -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DWITH_CURL=system
+ -DWITH_BOOST="${S}/boost"
+ -DWITH_ROUTER=$(usex router ON OFF)
+ )
+
+ if is-flagq -fno-lto ; then
+ einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+ mycmakeargs+=( -DWITH_LTO=OFF )
+ elif is-flagq -flto ; then
+ einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+ myconf+=( -DWITH_LTO=ON )
+ else
+ # Disable automagic
+ myconf+=( -DWITH_LTO=OFF )
+ fi
+
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+ mycmakeargs+=(
+ -DWITH_ICU=system
+ -DWITH_LZ4=system
+ # Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+ -DWITH_RAPIDJSON=bundled
+ -DWITH_ZSTD=system
+ )
+
+ if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+ ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+ ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+ ewarn "You MUST file bugs without these variables set."
+ ewarn "Tests will probably fail!"
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+ elif use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8mb4
+ -DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+ )
+ fi
+
+ if use server ; then
+ mycmakeargs+=(
+ -DWITH_EXTRA_CHARSETS=all
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_MECAB=$(usex cjk system OFF)
+ -DWITH_LIBEVENT=system
+ -DWITH_PROTOBUF=system
+ -DWITH_NUMA=$(usex numa ON OFF)
+ )
+
+ if use jemalloc ; then
+ mycmakeargs+=( -DWITH_JEMALLOC=ON )
+ elif use tcmalloc ; then
+ mycmakeargs+=( -DWITH_TCMALLOC=ON )
+ fi
+
+ if use profiling ; then
+ # Setting to OFF doesn't work: Once set, profiling options will be added
+ # to `mysqld --help` output via sql/sys_vars.cc causing
+ # "main.mysqld--help-notwin" test to fail
+ mycmakeargs+=( -DENABLED_PROFILING=ON )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_EXAMPLE_STORAGE_ENGINE=0
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_FEDERATED_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_INNODB_MEMCACHED=0
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ )
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_SYSTEMD=no
+ )
+ fi
+
+ cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+ _disable_test() {
+ local rawtestname bug reason
+ rawtestname="${1}" ; shift
+ bug="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+ echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # Run CTest (test-units)
+ cmake_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ if [[ -z "${MTR_PARALLEL}" ]] ; then
+ local -x MTR_PARALLEL=$(makeopts_jobs)
+
+ if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+ # Running multiple tests in parallel usually require higher ulimit
+ # and fs.aio-max-nr setting. In addition, tests like main.multi_update
+ # are known to hit timeout when system is busy.
+ # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+ # using "auto".
+ local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+ info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+ einfo "${info_msg}"
+ unset info_msg
+ MTR_PARALLEL=4
+ fi
+ else
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+ fi
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ # Run mysql tests
+ pushd "${TESTDIR}" &>/dev/null || die
+
+ touch "${T}/disabled.def"
+
+ local -a disabled_tests
+ disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+ disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "main.mysql_load_data_local_dir;0;Known test failure - no upstream bug yet" )
+ disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+ disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+ disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+ disabled_tests+=( "main.with_recursive;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+ disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+ disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Known failure - no upstream bug yet" )
+ disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware")
+ disabled_tests+=( "x.connection;0;Known failure - no upstream bug yet" )
+ disabled_tests+=( "main.mysqlpump_basic_lz4;0;Extra tool output causes false positive" )
+ disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+ disabled_tests+=( "x.message_protobuf_nested;0;False positive caused by protobuff-3.11+" )
+
+ if ! hash zip 1>/dev/null 2>&1 ; then
+ # no need to force dep app-arch/zip for one test
+ disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
+ disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
+ fi
+
+ local test_infos_str test_infos_arr
+ for test_infos_str in "${disabled_tests[@]}" ; do
+ IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+ if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+ die "Invalid test data set, not matching format: ${test_infos_str}"
+ fi
+
+ _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+ done
+ unset test_infos_str test_infos_arr
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ cmake_src_install
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Convenience links
+ einfo "Making Convenience links for mysqlcheck multi-call binary"
+ dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+ dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+ dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+ # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+ if [[ -d "${ED}/usr/data" ]] ; then
+ rm -Rf "${ED}/usr/data" || die
+ fi
+
+ # Unless they explicitly specific USE=test, then do not install the
+ # testsuite. It DOES have a use to be installed, esp. when you want to do a
+ # validation of your database configuration after tuning it.
+ if ! use test ; then
+ rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+ fi
+
+ # Configuration stuff
+ einfo "Building default configuration ..."
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+ [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+ cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+ eprefixify "${TMPDIR}/my.cnf"
+ doins "${TMPDIR}/my.cnf"
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+ cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+ eprefixify "${TMPDIR}/50-distro-client.cnf"
+ doins "${TMPDIR}/50-distro-client.cnf"
+
+ mycnf_src="my.cnf-8.0.distro-server"
+ sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+ "${FILESDIR}/${mycnf_src}" \
+ > "${TMPDIR}/my.cnf.ok" || die
+
+ if use prefix ; then
+ sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+
+ if use latin1 ; then
+ sed -i \
+ -e "/character-set/s|utf8mb4|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+
+ eprefixify "${TMPDIR}/my.cnf.ok"
+
+ newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+ if use router ; then
+ rm -rf \
+ "${ED}/usr/LICENSE.router" \
+ "${ED}/usr/README.router" \
+ "${ED}/usr/run" \
+ "${ED}/usr/var" \
+ || die
+ fi
+
+ # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+ find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ # NOTE: $MY_LOGDIR contains $EPREFIX by default
+ [[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+ # Note about configuration change
+ einfo
+ elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+ elog "to several files in /etc/mysql/mysql.d."
+ elog "Please backup any changes you made to /etc/mysql/my.cnf"
+ elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+ elog "You may have as many files as needed and they are read alphabetically."
+ elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+ einfo
+
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog " \"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ einfo
+ else
+ einfo
+ elog "Upgrade process for ${PN}-8.x has changed. Please read"
+ elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+ einfo
+ fi
+}
+
+pkg_config() {
+ _getoptval() {
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ local cmd=(
+ "${my_print_defaults_binary}"
+ "${extra_options}"
+ "${section}"
+ )
+ local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+ if [[ ${#results[@]} -gt 0 ]] ; then
+ # When option is set multiple times only return last value
+ echo "${results[-1]}"
+ fi
+ }
+
+ _mktemp_dry() {
+ # emktemp has no --dry-run option
+ local template="${1}"
+
+ if [[ -z "${template}" ]] ; then
+ if [[ -z "${T}" ]] ; then
+ template="/tmp/XXXXXXX"
+ else
+ template="${T}/XXXXXXX"
+ fi
+ fi
+
+ local template_wo_X=${template//X/}
+ local n_X
+ let n_X=${#template}-${#template_wo_X}
+ if [[ ${n_X} -lt 3 ]] ; then
+ echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+ return
+ fi
+
+ local attempts=0
+ local character tmpfile
+ while [[ true ]] ; do
+ let attempts=attempts+1
+
+ new_file=
+ while read -n1 character ; do
+ if [[ "${character}" == "X" ]] ; then
+ tmpfile+="${RANDOM:0:1}"
+ else
+ tmpfile+="${character}"
+ fi
+ done < <(echo -n "${template}")
+
+ if [[ ! -f "${tmpfile}" ]]
+ then
+ echo "${tmpfile}"
+ return
+ fi
+
+ if [[ ${attempts} -ge 100 ]] ; then
+ echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+ return
+ fi
+ done
+ }
+
+ local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+ if [[ ! -x "${mysqld_binary}" ]] ; then
+ die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+ fi
+
+ local mysql_binary="${EROOT}/usr/bin/mysql"
+ if [[ ! -x "${mysql_binary}" ]] ; then
+ die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+ fi
+
+ local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+ if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+ die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+ fi
+
+ if [[ -z "${MYSQL_USER}" ]] ; then
+ MYSQL_USER=mysql
+ if use prefix ; then
+ MYSQL_USER=$(id -u -n 2>/dev/null)
+ if [[ -z "${MYSQL_USER}" ]] ; then
+ die "Failed to determine current username!"
+ fi
+ fi
+ fi
+
+ if [[ -z "${MYSQL_GROUP}" ]] ; then
+ MYSQL_GROUP=mysql
+ if use prefix ; then
+ MYSQL_GROUP=$(id -g -n 2>/dev/null)
+ if [[ -z "${MYSQL_GROUP}" ]] ; then
+ die "Failed to determine current user groupname!"
+ fi
+ fi
+ fi
+
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ local -x HOME="${EROOT}/root"
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Read currently set data directory
+ MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+ # Bug #213475 - MySQL _will_ object strenously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ die "Sorry, unable to find MY_DATADIR!"
+ elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+ ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+ ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+ die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+ fi
+
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+ # These are dir+prefix
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+ # Create missing directories.
+ # Always check if mysql user can write to directory even if we just
+ # created directory because a parent directory might be not
+ # accessible for that user.
+ PID_DIR="${EROOT}/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]] ; then
+ einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+ install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+ || die "Failed to create PID directory '${PID_DIR}'!"
+ fi
+
+ local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_pid_dir_testfile}" ]] \
+ && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_pid_dir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+ else
+ rm "${_pid_dir_testfile}" || die
+ unset _pid_dir_testfile
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]] ; then
+ einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+ || die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+ fi
+
+ local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_datadir_testfile}" ]] \
+ && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_datadir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+ else
+ rm "${_my_datadir_testfile}" || die
+ unset _my_datadir_testfile
+ fi
+
+ if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+ einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+ || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+ fi
+
+ if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+ MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+ [[ -z "${MYSQL_TMPDIR}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+ mkdir "${MYSQL_TMPDIR}" || die
+ chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+ fi
+
+ # Now we need to test MYSQL_TMPDIR...
+ local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_tmpdir_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_tmpdir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+ else
+ rm "${_my_tmpdir_testfile}" || die
+ unset _my_tmpdir_testfile
+ fi
+
+ if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+ einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+ || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+ fi
+
+ if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+ local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_logbin_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_logbin_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+ else
+ rm "${_my_logbin_testfile}" || die
+ unset _my_logbin_testfile
+ fi
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+ einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+ || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+ local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_relaylog_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_relaylog_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+ else
+ rm "${_my_relaylog_testfile}" || die
+ unset _my_relaylog_testfile
+ fi
+ fi
+
+ local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+ if [[ -z "${mysql_install_log}" ]] ; then
+ die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+ else
+ # make sure file is writable for MYSQL_USER...
+ touch "${mysql_install_log}" || die
+ chown ${MYSQL_USER} "${mysql_install_log}" || die
+ fi
+
+ local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+ if [[ -z "${mysqld_logfile}" ]] ; then
+ die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+ else
+ # make sure file is writable for MYSQL_USER...
+ touch "${mysqld_logfile}" || die
+ chown ${MYSQL_USER} "${mysqld_logfile}" || die
+ fi
+
+ echo ""
+ einfo "Detected settings:"
+ einfo "=================="
+ einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+ einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+ einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+ einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+ if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+ einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+ einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+ fi
+
+ einfo "PID DIR:\t\t\t\t${PID_DIR}"
+ einfo "Install db log:\t\t\t${mysql_install_log}"
+ einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+ local -a config_files
+
+ local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+ if [[ -f "${config_file}" ]] ; then
+ config_files+=( "${config_file}" )
+ else
+ ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+ fi
+
+ config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+ if [[ -f "${config_file}" ]] ; then
+ config_files+=( "${config_file}" )
+ else
+ ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+ fi
+
+ if [[ ${#config_files[@]} -gt 0 ]] ; then
+ if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+ local user_answer
+
+ echo
+ einfo "Please select default authentication plugin (enter number or plugin name):"
+ einfo "1) caching_sha2_password [MySQL 8.0 default]"
+ einfo "2) mysql_native_password [MySQL 5.7 default]"
+ einfo
+ einfo "For details see:"
+ einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+ read -p " >" user_answer
+ echo
+
+ case "${user_answer}" in
+ 1|caching_sha2_password)
+ MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+ ;;
+ 2|mysql_native_password)
+ MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+ ;;
+ '')
+ die "No authentication plugin selected!"
+ ;;
+ *)
+ die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+ ;;
+ esac
+
+ echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+ unset user_answer
+ fi
+
+ local cfg_option cfg_option_tabs cfg_section
+ for config_file in "${config_files[@]}" ; do
+ cfg_option="default-authentication-plugin"
+ cfg_section="mysqld"
+ cfg_option_tabs="\t\t"
+ if [[ "${config_file}" == *client.cnf ]] ; then
+ cfg_option="default-auth"
+ cfg_section="client"
+ cfg_option_tabs="\t\t\t\t"
+ fi
+
+ if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+ einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+ sed -i \
+ -e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+ "${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+ else
+ einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+ sed -i \
+ -e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+ "${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+ fi
+ done
+ unset cfg_option cfg_option_tabs cfg_section
+ fi
+ unset config_files config_file
+
+ echo
+
+ if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ local tmp_mysqld_password_source=
+
+ for tmp_mysqld_password_source in mysql client ; do
+ einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+ MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+ if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+ ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+ MYSQL_ROOT_PASSWORD=
+ continue
+ fi
+
+ einfo "Found password in '${tmp_mysqld_password_source}' section!"
+ break
+ fi
+ done
+
+ # Sometimes --show is required to display passwords in some implementations of my_print_defaults
+ if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+ MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+ fi
+
+ unset tmp_mysqld_password_source
+ fi
+
+ if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ local pwd1="a"
+ local pwd2="b"
+
+ echo
+ einfo "No password for mysql 'root' user was specified via environment"
+ einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+ einfo "file like '${HOME}/.my.cnf'."
+ einfo "To continue please provide a password for the mysql 'root' user"
+ einfo "now on console:"
+ ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+ read -rsp " >" pwd1 ; echo
+
+ einfo "Retype the password"
+ read -rsp " >" pwd2 ; echo
+
+ if [[ "x$pwd1" != "x$pwd2" ]] ; then
+ die "Passwords are not the same!"
+ fi
+
+ MYSQL_ROOT_PASSWORD="${pwd1}"
+ unset pwd1 pwd2
+
+ echo
+ fi
+
+ local -a mysqld_options
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see http://bugs.mysql.com/bug.php?id=31312
+ use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+ # Figure out which options we need to disable to do the setup
+ local helpfile="${TMPDIR}/mysqld-help"
+ "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+ local opt optexp optfull
+ for opt in host-cache name-resolve networking slave-start \
+ federated ssl log-bin relay-log slow-query-log external-locking \
+ log-slave-updates \
+ ; do
+ optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+ egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+ done
+
+ # Prepare timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+ [[ -z "${tz_sql}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+ echo "USE mysql;" >"${tz_sql}"
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+ if [[ $? -ne 0 ]] ; then
+ die "mysql_tzinfo_to_sql failed!"
+ fi
+
+ # --initialize-insecure will not set root password
+ # --initialize would set a random one in the log which we don't need as we set it ourselves
+ local cmd=(
+ "${mysqld_binary}"
+ "${mysqld_options[@]}"
+ "--initialize-insecure"
+ "--init-file='${tz_sql}'"
+ "--basedir='${EROOT}/usr'"
+ "--datadir='${MY_DATADIR}'"
+ "--tmpdir='${MYSQL_TMPDIR}'"
+ "--log-error='${mysql_install_log}'"
+ "--user=${MYSQL_USER}"
+ )
+
+ einfo "Initializing ${PN} data directory: ${cmd[@]}"
+ eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+ if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+ die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+ fi
+
+ rm "${tz_sql}" || die
+
+ local x=${RANDOM}
+ local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+ local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+ unset x
+
+ cmd=(
+ "${mysqld_binary}"
+ "${mysqld_options[@]}"
+ "--basedir='${EROOT}/usr'"
+ "--datadir='${MY_DATADIR}'"
+ "--tmpdir='${MYSQL_TMPDIR}'"
+ --max_allowed_packet=8M
+ --net_buffer_length=16K
+ "--socket='${socket}'"
+ "--pid-file='${pidfile}'"
+ "--log-error='${mysqld_logfile}'"
+ "--user=${MYSQL_USER}"
+ )
+
+ einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+ eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+ echo -n "Waiting for mysqld to accept connections "
+ local maxtry=15
+ while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+
+ if [[ -S "${socket}" ]] ; then
+ # Even with a socket we don't know if mysqld will abort
+ # start due to an error so just wait a little bit more...
+ maxtry=5
+ while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ fi
+
+ echo
+
+ if [[ ! -S "${socket}" ]] ; then
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+ die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+ fi
+
+ local mysql_logfile="${TMPDIR}/set_root_pw.log"
+ touch "${mysql_logfile}" || die
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+ cmd=(
+ "${mysql_binary}"
+ --no-defaults
+ "--socket='${socket}'"
+ -hlocalhost
+ "-e \"${sql}\""
+ )
+ eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+ local rc=$?
+ eend ${rc}
+
+ if [[ ${rc} -ne 0 ]] ; then
+ # Poor man's solution which tries to avoid having password
+ # in log. NOTE: sed can fail if user didn't follow advice
+ # and included character which will require escaping...
+ sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+ die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+ fi
+
+ # Stop the server
+ if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+ echo -n "Stopping the server "
+ pkill -F "${pidfile}" &>/dev/null
+
+ maxtry=10
+ while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+
+ echo
+
+ if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+ # We somehow failed to stop server.
+ # However, not a fatal error. Just warn the user.
+ ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+ fi
+ fi
+
+ einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}
diff --git a/dev-db/oracle-instantclient-basic/Manifest b/dev-db/oracle-instantclient-basic/Manifest
index 321310afc41b..df72463dfaad 100644
--- a/dev-db/oracle-instantclient-basic/Manifest
+++ b/dev-db/oracle-instantclient-basic/Manifest
@@ -1,9 +1,2 @@
-AUX 11.2.0.3-makefile.patch 2250 BLAKE2B f680a9dbe7a8fb51c09667b3a49eaa86cc965a36f3d3df6c789e944ce83126fef1f12e0fa083f41e94b0b56ff1bcef5c9128f959f553730ec679051e83523da2 SHA512 1573f20608cf1e8a9c6dc94b40f4a7dac822f7888b2232ff13bf3db5456bbc0f653022acb194bdb2014698665042108d7f2b13e95ce00bd492c4c0eb03f4c9db
-AUX tnsnames.ora.sample 2939 BLAKE2B d02d4be5eae8c8da346f8b0ddd2b6808e59f8e77f805b22154a77d22db325d415ecaf811323de3c7a6764a9167fb7f9a9708d1cf2de891858bc43bd5e050954d SHA512 25bb734bf4b7ea1d2ce2bddfd241204e796cad0d1d49036e567237d7ca92d158ab7bf69ff3abe210050c8ee0a0630f9217ced22dc31770814d822f93b2af5845
-DIST instantclient-basic-linux-11.2.0.4.0.zip 58793148 BLAKE2B e0f92f119a5e8890a4507160179cd49af15ed14bd7c48480d3f685a3e4918a96e6444e75c6ea11d34681a6c66ff0e8011f44840de5f080e2dc3c03079361e4a1 SHA512 b333c9334e960617ac7cc68ad1c7b45f990d5c24c7a5bc8e51b3bc8ff6476acfb6a032521f75ba39327c71ee9676d1163b252066d52e97c1dfe9c092a92a62a0
-DIST instantclient-basic-linux.x64-11.2.0.4.0.zip 60704657 BLAKE2B 77735e81a0acf88221fefff38447536a81a32a6f5cb09dcd4526d43315be1fabb6882bb9e7a5703a4188ac9e112fba611f3e2c064a128eb66512935a1af62b33 SHA512 01ed32f1771bfa2f8ef1b81314843fb2b7b81582f33c07d86670c959bbb08355dc7cc8da586852bb353a3a914658d1e7828d6b5df884215de8d76881c956a989
-DIST instantclient-sdk-linux-11.2.0.4.0.zip 643080 BLAKE2B 9ea15b227d260f7e24b572be1238074dc3a3033a2ab6313d95b750ae48468bda018c52ac604664caa128396024c0ff4bcbc0d401b7900ae27f5f3877a4b44123 SHA512 09e14a0ed88182b685a00b6370da4379710c4179fcf2d5ebdb43684b7099484122f7f5181a80352464f03ae9d0150f5c2ee5f20ede98faa9073294324b9faec8
-DIST instantclient-sdk-linux.x64-11.2.0.4.0.zip 643089 BLAKE2B 710f0a2a81dde6cabdfb2e1472f40cb715d1e060377bec1d05d8b1c794ec05b023f4feca30603202487b52527723ed9d60f73371443ce76ad2781da9c1ed5412 SHA512 7198ddc7d8804353900e45b36de79659d75dee0197c4dd58bd4d69408e7131c95025223bbd1f39ef208269bff379daa6e05f4371af83a82b83997cafadc1d642
-EBUILD oracle-instantclient-basic-11.2.0.4.ebuild 5545 BLAKE2B 787d424a25ba6407ac3e0576929a93912ec5d56edcef22fe464bfd30aefb04848a43417124e5540b7d4e8d9e7376a12fcee6fb86b8fa53d29236871592d9d87f SHA512 f7f97eca82b62f43dd17170d5c9ee492f029f8e99b746511712b56cdc4cd45a96a68757101350ab05aab6e7ed5cfe2fd70154c8b28fa4e3c07bc6f961e1fec2b
-EBUILD oracle-instantclient-basic-12.ebuild 399 BLAKE2B f7f1068e3c81af7a4f78972eaad534d44bac0aaaa22516d21fe21852991883a3f2269286e44f84f142771e99175677c589a8d5ea34f79d745f431679ea78c11c SHA512 9bd43fa3ff7ec7f0c281dcbb4ae68f354b820de8ec454c86efafb84a483a20527e4696305c0882d96250d57d604c317e6e61242804ca7b49f5bf068c7f3249f2
+EBUILD oracle-instantclient-basic-12.ebuild 397 BLAKE2B 66fece8293a4f5c7e81efc2e37c873dd0d7a391595bfc39ca701ac7193ebbcb865098e102d0c9006039c454efed49f4a9793f2703c9b7db26dabca2584e6ed4d SHA512 a3d2b68b218aa49089fe54f19036c897e0f805f6932bf4c56466f39ecd9178ac5516189ca1ae4cdb53c2fa09525a8fa98a4e64a6fc6385f68cc7f7540efa8cf3
MISC metadata.xml 214 BLAKE2B b60ecbef37fd3eed5949889bfea31a68f4941db8a7a36e4dbbb7d7381d587eaefc230349c83a9eda4bbdfd1d45b4af0928da1ff7ed2f6f4e2c704a10033c6610 SHA512 e4dddc0b51fec262729e9eedd302b3c7d7a91d227e1043134c0242c8aea2f2c6cef5fd8caca6ea1424cc38b3beeb05fed373ffcc2c8751662dd4117639a7b5de
diff --git a/dev-db/oracle-instantclient-basic/files/11.2.0.3-makefile.patch b/dev-db/oracle-instantclient-basic/files/11.2.0.3-makefile.patch
deleted file mode 100644
index efcc2c6fac7c..000000000000
--- a/dev-db/oracle-instantclient-basic/files/11.2.0.3-makefile.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Fake demo_xe.mk found in Oracle eXpress Edition,
-known by CPAN DBD::Oracle (bug#165834).
-This provides absolute paths for headers and libraries.
-
-Paranoia drops those REMOVE lines.
---- sdk/demo/demo.mk.orig 2012-03-06 17:11:57.636990449 +0100
-+++ sdk/demo/demo.mk 2012-03-06 17:19:37.985324293 +0100
-@@ -28,8 +28,9 @@
- CC=/opt/SunProd/SUNWspro6.1/bin/CC
- cc=/opt/SunProd/SUNWspro6.1/bin/cc
-
--ICINCHOME=../
--ICLIBHOME=../../
-+LIBDIR=lib
-+ICINCHOME=$(ORACLE_HOME)/
-+ICLIBHOME=$(ORACLE_HOME)/$(LIBDIR)
- ICLIBPATH=-L$(ICLIBHOME)
- THREADLIBS=-lthread
- CCLIB=$(ICLIBPATH) -locci -lclntsh $(THREADLIBS)
-@@ -64,18 +64,18 @@
- all: clean buildoci $(OCCIDEMO) $(OCCIOBJDEMO)
-
- buildoci: $(CLNCACHE) $(LIBCLNT) $(CDEMOOBJS)
-- $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
-- $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT)
-+# $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
-+# $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT)
- $(CC) -o $(CDEMOEXE) $(LDFLAGS) $(CDEMOOBJS) $(CCLIB)
-- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
-- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
-+# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
-+# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
-
- buildocci: $(CLNCACHE) $(LIBCLNT) $(OBJS)
-- $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
-- $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT)
-+# $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
-+# $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT)
- $(CC) -o $(EXE) $(LDFLAGS) $(OBJS) $(CCLIB)
-- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
-- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
-+# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
-+# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
-
- $(OCCIDEMO):
- $(MAKE) -f $(MAKEFILE) buildocci OBJS=$@.o EXE=$@
-@@ -93,8 +93,8 @@
-
- cleancache:
- $(REMOVE) $(CACHEDIR)
-- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
-- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
-+# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
-+# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
-
- clean: $(CLNCACHE)
- $(REMOVE) cdemo81 cdemo81.o occidml occidml.o occiobj occiobj.o occiobjo* occiobjm* occiobj.h occiobjout.type
diff --git a/dev-db/oracle-instantclient-basic/files/tnsnames.ora.sample b/dev-db/oracle-instantclient-basic/files/tnsnames.ora.sample
deleted file mode 100644
index f0524f5993cd..000000000000
--- a/dev-db/oracle-instantclient-basic/files/tnsnames.ora.sample
+++ /dev/null
@@ -1,93 +0,0 @@
-# This file contains the syntax information for
-# the entries to be put in any tnsnames.ora file
-# The entries in this file are need based.
-# There are no defaults for entries in this file
-# that Sqlnet/Net3 use that need to be overridden
-#
-# Typically you could have two tnsnames.ora files
-# in the system, one that is set for the entire system
-# and is called the system tnsnames.ora file, and a
-# second file that is used by each user locally so that
-# he can override the definitions dictated by the system
-# tnsnames.ora file.
-
-# The entries in tnsnames.ora are an alternative to using
-# the names server with the onames adapter.
-# They are a collection of aliases for the addresses that
-# the listener(s) is(are) listening for a database or
-# several databases.
-
-# The following is the general syntax for any entry in
-# a tnsnames.ora file. There could be several such entries
-# tailored to the user's needs.
-
-<alias>= [ (DESCRIPTION_LIST = # Optional depending on whether u have
- # one or more descriptions
- # If there is just one description, unnecessary ]
- (DESCRIPTION=
- [ (SDU=2048) ] # Optional, defaults to 2048
- # Can take values between 512 and 32K
- [ (ADDRESS_LIST= # Optional depending on whether u have
- # one or more addresses
- # If there is just one address, unnecessary ]
- (ADDRESS=
- [ (COMMUNITY=<community_name>) ]
- (PROTOCOL=tcp)
- (HOST=<hostname>)
- (PORT=<portnumber (1521 is a standard port used)>)
- )
- [ (ADDRESS=
- (PROTOCOL=ipc)
- (KEY=<ipckey (PNPKEY is a standard key used)>)
- )
- ]
- [ (ADDRESS=
- [ (COMMUNITY=<community_name>) ]
- (PROTOCOL=decnet)
- (NODE=<nodename>)
- (OBJECT=<objectname>)
- )
- ]
- ... # More addresses
- [ ) ] # Optional depending on whether ADDRESS_LIST is used or not
- [ (CONNECT_DATA=
- (SID=<oracle_sid>)
- [ (GLOBAL_NAME=<global_database_name>) ]
- )
- ]
- [ (SOURCE_ROUTE=yes) ]
- )
- (DESCRIPTION=
- [ (SDU=2048) ] # Optional, defaults to 2048
- # Can take values between 512 and 32K
- [ (ADDRESS_LIST= ] # Optional depending on whether u have more
- # than one address or not
- # If there is just one address, unnecessary
- (ADDRESS
- [ (COMMUNITY=<community_name>) ]
- (PROTOCOL=tcp)
- (HOST=<hostname>)
- (PORT=<portnumber (1521 is a standard port used)>)
- )
- [ (ADDRESS=
- (PROTOCOL=ipc)
- (KEY=<ipckey (PNPKEY is a standard key used)>)
- )
- ]
- ... # More addresses
- [ ) ] # Optional depending on whether ADDRESS_LIST
- # is being used
- [ (CONNECT_DATA=
- (SID=<oracle_sid>)
- [ (GLOBAL_NAME=<global_database_name>) ]
- )
- ]
- [ (SOURCE_ROUTE=yes) ]
- )
- [ (CONNECT_DATA=
- (SID=<oracle_sid>)
- [ (GLOBAL_NAME=<global_database_name>) ]
- )
- ]
- ... # More descriptions
- [ ) ] # Optional depending on whether DESCRIPTION_LIST is used or not
diff --git a/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.4.ebuild b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.4.ebuild
deleted file mode 100644
index 0dfbc6395439..000000000000
--- a/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.4.ebuild
+++ /dev/null
@@ -1,199 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit eutils multilib-minimal
-
-MY_PLAT_x86="Linux x86"
-MY_BITS_x86=32
-MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip"
-MY_ASDK_x86="${MY_A_x86/basic/sdk}"
-
-MY_PLAT_amd64="Linux x86-64"
-MY_BITS_amd64=64
-MY_A_amd64="${PN/oracle-}-linux.x64-${PV}.0.zip"
-MY_ASDK_amd64="${MY_A_amd64/basic/sdk}"
-
-DESCRIPTION="Oracle 11g Instant Client with SDK"
-HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
-SRC_URI="
- abi_x86_32? ( ${MY_A_x86} !abi_x86_64? ( ${MY_ASDK_x86} ) )
- abi_x86_64? ( ${MY_A_amd64} ${MY_ASDK_amd64} )
-"
-
-LICENSE="OTN"
-SLOT="0"
-KEYWORDS="amd64 x86"
-RESTRICT="fetch splitdebug"
-IUSE=""
-
-DEPEND="app-arch/unzip"
-RDEPEND=">=dev-libs/libaio-0.3.109-r5[${MULTILIB_USEDEP}]"
-
-S="${WORKDIR}"
-
-QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*"
-
-set_my_abivars() {
- S="${WORKDIR}/${ABI}/instantclient_11_2"
-
- local abi=${ABI}
- [[ ${abi} == 'default' ]] && abi=${ARCH}
- MY_PLAT=MY_PLAT_${abi}; MY_PLAT=${!MY_PLAT} # platform name
- MY_BITS=MY_BITS_${abi}; MY_BITS=${!MY_BITS} # platform bitwidth
- MY_A=MY_A_${abi} ; MY_A=${!MY_A} # runtime distfile
- MY_ASDK=MY_ASDK_${abi}; MY_ASDK=${!MY_ASDK} # sdk distfile
-
- [[ -n ${MY_PLAT} ]]
-}
-
-oic_distfile_status() {
- if [[ -r ${DISTDIR}/${1} ]]; then
- echo "already here"
- else
- echo "still absent"
- fi
-}
-
-pkg_nofetch() {
- eerror "Please go to"
- eerror " ${HOMEPAGE%/*}/index-097480.html"
- eerror " and download"
- local ABI
- for ABI in $(multilib_get_enabled_abis)
- do
- set_my_abivars || continue
- eerror "Instant Client for ${MY_PLAT}"
- eerror " Basic: ($(oic_distfile_status ${MY_A})) ${MY_A}"
- multilib_is_native_abi &&
- eerror " SDK: ($(oic_distfile_status ${MY_ASDK})) ${MY_ASDK}"
- done
- eerror "After downloading these files (for *all* shown architectures), put them in:"
- eerror " ${DISTDIR}/"
-}
-
-src_unpack() {
- local ABI
- for ABI in $(multilib_get_enabled_abis)
- do
- set_my_abivars || continue
- mkdir "${WORKDIR}"/${ABI} || die
- cd "${WORKDIR}"/${ABI} || die
- unpack ${MY_A}
- multilib_is_native_abi &&
- unpack ${MY_ASDK}
- done
-}
-
-src_prepare() {
- local ABI
- for ABI in $(multilib_get_enabled_abis)
- do : # need to patch for the final ABI only
- done
- set_my_abivars || die "${ABI} ABI not supported!"
- cd "${S}" || die
- epatch "${FILESDIR}"/11.2.0.3-makefile.patch
-}
-
-# suppress configure&compile messages from multilib-minimal
-src_configure() { :; }
-src_compile() { :; }
-
-src_install() {
- # all binaries go here
- local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
- into "${oracle_home}"
-
- local ldpath= ABI
- for ABI in $(multilib_get_enabled_abis) # last iteration is final ABI
- do
- if ! set_my_abivars; then
- elog "Skipping unsupported ABI ${ABI}."
- continue
- fi
- einfo "Installing runtime for ${MY_PLAT} ..."
-
- cd "${S}" || die
-
- # shared libraries
- dolib.so lib*$(get_libname)*
-
- # ensure to be linkable
- [[ -e libocci$(get_libname) ]] ||
- dosym libocci$(get_libname 11.1) \
- "${oracle_home}"/$(get_libdir)/libocci$(get_libname)
- [[ -e libclntsh$(get_libname) ]] ||
- dosym libclntsh$(get_libname 11.1) \
- "${oracle_home}"/$(get_libdir)/libclntsh$(get_libname)
-
- # java archives
- insinto "${oracle_home}"/$(get_libdir)
- doins *.jar
-
- # runtime library path
- ldpath+=${ldpath:+:}${oracle_home}/$(get_libdir)
-
- eend $?
- done
-
- # ensure ORACLE_HOME/lib exists
- [[ -e ${ED}${oracle_home}/lib ]] ||
- dosym $(get_libdir) "${oracle_home}"/lib
-
- einfo "Installing SDK ..."
- cd "${S}"/sdk || die
-
- # SDK makefile, for #165834
- # As we change the relative filesystem layout compared
- # to vanilla instantclient.zip content, it feels easier
- # to fake the layout found in Oracle eXpress Edition.
- # Both layouts are known to DBD::Oracle (cpan).
- insinto "${oracle_home}"/rdbms/demo
- newins demo/demo.mk demo_xe.mk
-
- # Remove ldap.h, #299562
- rm include/ldap.h || die
- # DBD::Oracle needs rdbms/public as real directory
- insinto "${oracle_home}"/rdbms/public
- doins include/*.h
- dosym rdbms/public "${oracle_home}"/include
- # ruby-oci8 expects the headers here
- dosym "${oracle_home}"/rdbms/public /usr/include/oracle/${PV}/client
-
- dodoc demo/*
-
- eend $?
-
- # create path for tnsnames.ora
- insinto /etc/oracle
- doins "${FILESDIR}"/tnsnames.ora.sample
-
- # Add OCI libs to library path
- {
- echo "ORACLE_HOME=${EPREFIX}${oracle_home}"
- echo "LDPATH=${ldpath}"
-# who does need this?
-# echo "C_INCLUDE_PATH=${oracle_home}/include"
- echo "TNS_ADMIN=/etc/oracle/"
- } > "${T}"/50oracle-instantclient-basic
- doenvd "${T}"/50oracle-instantclient-basic
-}
-
-pkg_postinst() {
- elog "${P} does not provide an sqlnet.ora"
- elog "configuration file, redirecting oracle diagnostics for database-"
- elog "and network-issues into ~USER/oradiag_USER/ instead."
- elog "It should be safe to ignore this message in sqlnet.log there:"
- elog " Directory does not exist for read/write [ORACLE_HOME/client/log] []"
- elog "See https://bugs.gentoo.org/show_bug.cgi?id=465252 for reference."
- elog "If you want to directly analyse low-level debug info or don't want"
- elog "to see it at all, so you really need an sqlnet.ora file, please"
- elog "consult http://search.oracle.com/search/search?q=sqlnet.ora"
- elog ""
- elog "TNS_ADMIN has been set to ${EROOT}etc/oracle by default,"
- elog "put your tnsnames.ora there or configure TNS_ADMIN"
- elog "to point to your user specific configuration."
- ewarn "Please re-source your shell settings for ORACLE_HOME"
- ewarn " changes, such as: source /etc/profile"
-}
diff --git a/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-12.ebuild b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-12.ebuild
index cc98d68c83ab..e377ea56810f 100644
--- a/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-12.ebuild
+++ b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-12.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -9,7 +9,7 @@ SRC_URI=""
LICENSE="metapackage"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 x86"
IUSE=""
DEPEND=""
diff --git a/dev-db/oracle-instantclient-jdbc/Manifest b/dev-db/oracle-instantclient-jdbc/Manifest
index ed7d2d33b1d4..59d315604a75 100644
--- a/dev-db/oracle-instantclient-jdbc/Manifest
+++ b/dev-db/oracle-instantclient-jdbc/Manifest
@@ -1,5 +1,2 @@
-DIST instantclient-jdbc-linux-11.2.0.4.0.zip 1562440 BLAKE2B e3f377802958b22aede4d91c9bc16a85f5c0ff2cec3066a4a49f5c71ab90c17f9b7c6f29da146304327569cb3d5d533a3807941e4061254e0cf57a8387a55b04 SHA512 0a92a6529642203d48846d3f22f3756ada22942ea5e7c36d779d220dc7195301d4016edd8ee5124f9e51429bb77d9890602c1a18884eec58ff40c2aed24e55f9
-DIST instantclient-jdbc-linux.x64-11.2.0.4.0.zip 1562474 BLAKE2B f93a05ad324bb364ddab83b0bc75f6c0bc8d7224f53cf337c9887f99e07c98a8752e7d4581b19ca38c70bbe3fcf1b492d753f715bed7ba8144f37c03cc9524c0 SHA512 289a08bddc81687b73a42fb35ae6ea294dd8f536ae9d3e95142ab78ad72eeebf66947fa6f5585e48e35b7f92e65fe6a295fb564b8353d389e76bfecf35c48c18
-EBUILD oracle-instantclient-jdbc-11.2.0.4.ebuild 1940 BLAKE2B 82d646597b770e00aba5ba209e201bda7712e4907cc1e8ad657f9fa017b5fb88e9e6127ca383c7b307abedcab2b3c184c43b17d6071912f8c1aa4956cddeaab0 SHA512 02c6e4f6e355c47ca49f179ed5ba429e9129f7a23dbaa544f8e63c65e76d3aa9e9ce5e3d5ec72bda68eacfa7b368e7b00ef79daf0ed7e02ff9c125e47807f453
-EBUILD oracle-instantclient-jdbc-12.ebuild 443 BLAKE2B cac8918d5dbb95f01e8325d16177977b7a8cda057a8a7e6145f117b434443a7709f8bbd085076000c6e03874d4456395950a0397ae69242819d433d0504a139c SHA512 caedd280c4ca86e740e68a71ffa50d9a1c38fce5c565a7abae1b7c543d668841c9f35fff046c702d2012b9040caed937d0da1f9f1e56282b9b44ab92c91db0c5
+EBUILD oracle-instantclient-jdbc-12.ebuild 441 BLAKE2B a5f30b1c6a139e369c4330829d2bb4f116ca57b24188b2fa201de28987245aa49d74c6e6d69da64b223d3e2fe437c5e4735ab730ffc0aa52db9c5d0b635b05d4 SHA512 0af800f6a4c0344a50a993e893ebb5e17c65c7ad4f4a44c2ffe1f4b9072b48072e51c3b52dd04ce7054e7597da8ac7e888ab9272be4be1cff78aaf601ec4f17f
MISC metadata.xml 214 BLAKE2B b60ecbef37fd3eed5949889bfea31a68f4941db8a7a36e4dbbb7d7381d587eaefc230349c83a9eda4bbdfd1d45b4af0928da1ff7ed2f6f4e2c704a10033c6610 SHA512 e4dddc0b51fec262729e9eedd302b3c7d7a91d227e1043134c0242c8aea2f2c6cef5fd8caca6ea1424cc38b3beeb05fed373ffcc2c8751662dd4117639a7b5de
diff --git a/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.4.ebuild b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.4.ebuild
deleted file mode 100644
index 75696a7a33b6..000000000000
--- a/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.4.ebuild
+++ /dev/null
@@ -1,92 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit eutils multilib-minimal
-
-MY_PLAT_x86="Linux x86"
-MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip"
-
-MY_PLAT_amd64="Linux x86-64"
-MY_A_amd64="${PN/oracle-/}-linux.x64-${PV}.0.zip"
-
-DESCRIPTION="Oracle 11g Instant Client: JDBC supplement"
-HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
-SRC_URI="
- abi_x86_32? ( ${MY_A_x86} )
- abi_x86_64? ( ${MY_A_amd64} )
-"
-
-LICENSE="OTN"
-SLOT="0"
-KEYWORDS="amd64 x86"
-RESTRICT="fetch splitdebug"
-IUSE=""
-
-DEPEND="app-arch/unzip"
-RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
-
-S="${WORKDIR}"
-
-QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*"
-
-set_my_abivars() {
- MY_PLAT=MY_PLAT_${ABI}; MY_PLAT=${!MY_PLAT} # platform name
- MY_A=MY_A_${ABI} ; MY_A=${!MY_A} # runtime distfile
- # ABI sourcedir
- MY_S="${S}/${ABI}/instantclient_11_2"
-
- [[ -n ${MY_PLAT} ]]
-}
-
-pkg_nofetch() {
- eerror "Please go to"
- eerror " ${HOMEPAGE%/*}/index-097480.html"
- eerror " and download"
- local ABI
- for ABI in $(multilib_get_enabled_abis)
- do
- set_my_abivars || continue
- eerror "Instant Client for ${MY_PLAT}"
- eerror " JDBC: ${MY_A}"
- done
- eerror "After downloading, put them in:"
- eerror " ${DISTDIR}/"
-}
-
-src_unpack() {
- local ABI
- for ABI in $(multilib_get_enabled_abis)
- do
- set_my_abivars || continue
- mkdir -p "${MY_S%/*}" || die
- cd "${MY_S%/*}" || die
- unpack ${MY_A}
- done
-}
-
-src_install() {
- # all binaries go here
- local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
- into "${oracle_home}"
-
- local ABI
- for ABI in $(multilib_get_enabled_abis)
- do
- if ! set_my_abivars; then
- elog "Skipping unsupported ABI ${ABI}."
- continue
- fi
- einfo "Installing runtime for ${MY_PLAT} ..."
-
- cd "${MY_S}" || die
-
- dolib.so lib*$(get_libname)*
-
- insinto "${oracle_home}"/$(get_libdir)
- doins *.jar
-
- eend $?
- done
-}
diff --git a/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-12.ebuild b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-12.ebuild
index 4a7e10b94d67..2768c076665b 100644
--- a/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-12.ebuild
+++ b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-12.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -9,7 +9,7 @@ SRC_URI=""
LICENSE="metapackage"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 x86"
IUSE=""
DEPEND=""
diff --git a/dev-db/oracle-instantclient-odbc/Manifest b/dev-db/oracle-instantclient-odbc/Manifest
index daae269ca093..058c8363c32b 100644
--- a/dev-db/oracle-instantclient-odbc/Manifest
+++ b/dev-db/oracle-instantclient-odbc/Manifest
@@ -1,5 +1,2 @@
-DIST instantclient-odbc-linux-11.2.0.4.0.zip 274999 BLAKE2B 33855608fcd61a7f4ebcab3f969b028069d636d5a709676c07733aeb20dcb4335f485844ec72cb0816307e36c7f0b6748c08ea6e5c67c853999ddc1b0c23eae8 SHA512 64d75c6f9aa4e5b74da12a2a293e6ee7017017a12a724596d51606d3a8d7a9d9653c158d389a5faeb02893ca6a6a93650605d71f885f9439427847583f5cc820
-DIST instantclient-odbc-linux.x64-11.2.0.4.0.zip 310560 BLAKE2B dc97373ac00f07b4d02beb45ed053d5aa8909fc380990426c118e3fb42b08e8e5e699a518aa137b3fe159107c73929e61d59c997e741a343803f5c26036adf9b SHA512 19f999207e5ea2b5db18b40c0eb40c6ec1ea8a3117915a723338e5c423122b747c5e371446d631c00a5c01005453f85da1d2e680a2c1771a495dc0b68812df69
-EBUILD oracle-instantclient-odbc-11.2.0.4.ebuild 2083 BLAKE2B 07ff5ed964d5fa8b0d71bc98ec0cac68fba5baab2eeb20aa1e8f8d6512ddce221aa38ca512e57176a2530375bc32495c13bbb9ef830f580c316c0fbfad93ec83 SHA512 41b13fd6d264e51176e54496cbd149893649e6ffde2cf38098ee71adfb07b50eb20e00b840ec1f263910df0341d2ba33bd420ae51203102b93a2b3f1e1be3741
-EBUILD oracle-instantclient-odbc-12.ebuild 443 BLAKE2B ded66d6bd0a342ea40f461981f5c13cdcf6484b8d1a85915a3e1ccdec595d5c60ac27e53b174f8a7d597478dbc1c08e6df3188c814654b81eef3f61722c6ad5b SHA512 3af66244b1186fefd956424912f33eeebbc6d5d2543bf5bda24bcd0949181b99c32b09690a29f4f9e733d982fdc7a494c1dd4e75eb7fd899aff26f74b100a69f
+EBUILD oracle-instantclient-odbc-12.ebuild 441 BLAKE2B 6596a1ac8fe4b90a0e4e3b139a6fcb51361279d6d80a9f3b9c5a5cb3e28410c0dfbbbf6fb4b7d2032275e86e7d4137c4b2a572eb89a9a3c771b9fb8af2c8a858 SHA512 4b2532e4c21706e69cd81e6c932b3aee994f5e54ef0ecc4c5120826d1dfbefc1ca82074b25ae7834be75997e5b5eb25f0f0c98fdddb848de7f7ab3d0ad25845b
MISC metadata.xml 214 BLAKE2B b60ecbef37fd3eed5949889bfea31a68f4941db8a7a36e4dbbb7d7381d587eaefc230349c83a9eda4bbdfd1d45b4af0928da1ff7ed2f6f4e2c704a10033c6610 SHA512 e4dddc0b51fec262729e9eedd302b3c7d7a91d227e1043134c0242c8aea2f2c6cef5fd8caca6ea1424cc38b3beeb05fed373ffcc2c8751662dd4117639a7b5de
diff --git a/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.4.ebuild b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.4.ebuild
deleted file mode 100644
index 716c88d51cad..000000000000
--- a/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.4.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit eutils multilib-minimal
-
-MY_PLAT_x86="Linux x86"
-MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip"
-
-MY_PLAT_amd64="Linux x86-64"
-MY_A_amd64="${PN/oracle-/}-linux.x64-${PV}.0.zip"
-
-DESCRIPTION="Oracle 11g Instant Client: ODBC supplement"
-HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
-SRC_URI="
- abi_x86_32? ( ${MY_A_x86} )
- abi_x86_64? ( ${MY_A_amd64} )
-"
-
-LICENSE="OTN"
-SLOT="0"
-KEYWORDS="amd64 x86"
-RESTRICT="fetch splitdebug"
-IUSE=""
-
-DEPEND="app-arch/unzip"
-RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
-
-S="${WORKDIR}"
-
-QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*"
-
-set_my_abivars() {
- MY_PLAT=MY_PLAT_${ABI}; MY_PLAT=${!MY_PLAT} # platform name
- MY_A=MY_A_${ABI} ; MY_A=${!MY_A} # runtime distfile
- # ABI sourcedir
- MY_S="${S}/${ABI}/instantclient_11_2"
-
- [[ -n ${MY_PLAT} ]]
-}
-
-pkg_nofetch() {
- eerror "Please go to"
- eerror " ${HOMEPAGE%/*}/index-097480.html"
- eerror " and download"
- local ABI
- for ABI in $(multilib_get_enabled_abis)
- do
- set_my_abivars || continue
- eerror "Instant Client for ${MY_PLAT}"
- eerror " ODBC: ${MY_A}"
- done
- eerror "After downloading, put them in:"
- eerror " ${DISTDIR}/"
-}
-
-src_unpack() {
- local ABI
- for ABI in $(multilib_get_enabled_abis)
- do
- set_my_abivars || continue
- mkdir -p "${MY_S%/*}" || die
- cd "${MY_S%/*}" || die
- unpack ${MY_A}
- done
-}
-
-src_install() {
- # all binaries go here
- local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client
- into "${oracle_home}"
-
- local ABI
- for ABI in $(multilib_get_enabled_abis)
- do
- if ! set_my_abivars; then
- elog "Skipping unsupported ABI ${ABI}."
- continue
- fi
- einfo "Installing runtime for ${MY_PLAT} ..."
-
- cd "${MY_S}" || die
-
- dolib.so libsqora*$(get_libname)*
-
- # ensure to be linkable
- [[ -e libsqora$(get_libname) ]] ||
- dosym libsqora$(get_libname 11.1) "${oracle_home}"/$(get_libdir)/libsqora$(get_libname)
-
- eend $?
- done
-
- dobin odbc_update_ini.sh
- dodoc *htm*
-}
diff --git a/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-12.ebuild b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-12.ebuild
index efa4b23d3e5e..0b1a3fb696e5 100644
--- a/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-12.ebuild
+++ b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-12.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -9,7 +9,7 @@ SRC_URI=""
LICENSE="metapackage"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 x86"
IUSE=""
DEPEND=""
diff --git a/dev-db/oracle-instantclient-sqlplus/Manifest b/dev-db/oracle-instantclient-sqlplus/Manifest
index 4a9788a47b8a..4074c8d5662f 100644
--- a/dev-db/oracle-instantclient-sqlplus/Manifest
+++ b/dev-db/oracle-instantclient-sqlplus/Manifest
@@ -1,5 +1,2 @@
-DIST instantclient-sqlplus-linux-11.2.0.4.0.zip 792608 BLAKE2B c3e8f0843700df9f95428b01520400d95076df5e19169f2a79982293e54ce6cc74321de0f34a0e7865d5d29535e38b60bcca127be06343c979a40985bf349012 SHA512 8f5ff27043a036eab038080bbdc056325cc2c197e12de34e74a8da17bf69b44e4fd4200b638881d86fdf1dc1450d8e1d033daaa56386bd2c8784d556ba0093ce
-DIST instantclient-sqlplus-linux.x64-11.2.0.4.0.zip 834491 BLAKE2B 487091d97c0f2ec383018c39a957c8a27b030c4c8754a6c2714237dc875b89b250b47dbd28ca228a98c6199323ddd031452e1cc90c60824fbcca536aa38bff1f SHA512 b7180b5667e604564cf379b9eb55a2fc8994b87cfb993e728b4c1bdd297cab134a55580018429bdbb2b101ebdf8a350bacc1ddf5a30e1cc419092054c79a108b
-EBUILD oracle-instantclient-sqlplus-11.2.0.4.ebuild 1550 BLAKE2B cadc194b853439546501545aa6ab3da3e65204afd7c9582d86ae1b815491290c630257f0bd74146ce6ff1bfe544ba3e698a59da9b7303f4f0e12779e9e4ef557 SHA512 f3c3acdddd951cc28e645fc3ddf0b0814021797409b7dbf69a613a44d2b1a7fee06815a7ef18523a761c14e4c4e343ef81ac7bd3622bfedddc6b467e44702e4d
-EBUILD oracle-instantclient-sqlplus-12.ebuild 446 BLAKE2B c18dd02c3ed130d20b665868309c6a63d15f753afe2b892dc80569d6baba07481a137d5f2157ca3e27b92e095bcb646f20cd7061cddce68db00e5c9c7327e3ca SHA512 3a22a431e5a538e48cbbe38cb6c9779da0f57bcddfe2373cebd391de22bd5bcd70fa8d7434ef8f1a90f8f9f5b4f26633e37482d39f59da499e737b2a4c89971e
+EBUILD oracle-instantclient-sqlplus-12.ebuild 444 BLAKE2B 17b06fb3f8ca1b361a14b290434e212f425cd0a880838f1fdd96ecb6f5a3fbf7678db283966b262dda06c11e16f3f534d67b597216307b17ca17aab3b8a1e4dd SHA512 f0f1fa7268559dd25fa28a9b6fe35471351e6765e9645ff6a1734e8cd68e21ac4068d073a37559867c2d4ad8433bd591bd89fa1b4fda6ec5613bae422f558326
MISC metadata.xml 214 BLAKE2B b60ecbef37fd3eed5949889bfea31a68f4941db8a7a36e4dbbb7d7381d587eaefc230349c83a9eda4bbdfd1d45b4af0928da1ff7ed2f6f4e2c704a10033c6610 SHA512 e4dddc0b51fec262729e9eedd302b3c7d7a91d227e1043134c0242c8aea2f2c6cef5fd8caca6ea1424cc38b3beeb05fed373ffcc2c8751662dd4117639a7b5de
diff --git a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.4.ebuild b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.4.ebuild
deleted file mode 100644
index c01045c3709c..000000000000
--- a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.4.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit eutils pax-utils
-
-MY_PLAT_x86="Linux x86"
-MY_A_x86="${PN#oracle-}-linux-${PV}.0.zip"
-
-MY_PLAT_amd64="Linux x86-64"
-MY_A_amd64="${PN#oracle-}-linux.x64-${PV}.0.zip"
-
-DESCRIPTION="Oracle 11g Instant Client: SQL*Plus"
-HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html"
-SRC_URI="
- x86? ( ${MY_A_x86} )
- amd64? ( ${MY_A_amd64} )
-"
-
-LICENSE="OTN"
-SLOT="0"
-KEYWORDS="amd64 x86"
-RESTRICT="fetch splitdebug"
-IUSE=""
-
-DEPEND="app-arch/unzip"
-RDEPEND="~dev-db/oracle-instantclient-basic-${PV}"
-
-S="${WORKDIR}"/instantclient_11_2
-
-QA_PREBUILT="
- usr/lib*/oracle/${PV}/client/lib*/lib*
- usr/lib*/oracle/${PV}/client/bin/sqlplus
-"
-
-my_arch() {
- # platform name
- MY_PLAT=MY_PLAT_${ARCH}
- export MY_PLAT=${!MY_PLAT}
- # distfile
- MY_A=MY_A_${ARCH}
- export MY_A=${!MY_A}
-}
-
-pkg_nofetch() {
- my_arch
- eerror "Please go to"
- eerror " ${HOMEPAGE%/*}/index-097480.html"
- eerror " and download"
- eerror "Instant Client for ${MY_PLAT}"
- eerror " SQL*Plus: ${MY_A}"
- eerror "After downloading, put it into your DISTDIR directory."
-}
-
-src_install() {
- # all binaries go here
- local oracle_home=usr/$(get_libdir)/oracle/${PV}/client
- into /"${oracle_home}"
-
- dolib.so libsqlplus$(get_libname) libsqlplusic$(get_libname)
- dobin sqlplus
-
- insinto /"${oracle_home}"/sqlplus/admin
- doins glogin.sql
-
- pax-mark -c "${ED}${oracle_home}"/bin/sqlplus || die
-
- dosym /"${oracle_home}"/bin/sqlplus /usr/bin/sqlplus
-}
diff --git a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-12.ebuild b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-12.ebuild
index 177f4e9be8de..b0eb59d9bb6e 100644
--- a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-12.ebuild
+++ b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-12.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -9,7 +9,7 @@ SRC_URI=""
LICENSE="metapackage"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 x86"
IUSE=""
DEPEND=""
diff --git a/dev-db/oracle-instantclient/Manifest b/dev-db/oracle-instantclient/Manifest
index 79b8a3d4ddb2..4f541e888eca 100644
--- a/dev-db/oracle-instantclient/Manifest
+++ b/dev-db/oracle-instantclient/Manifest
@@ -68,6 +68,6 @@ EBUILD oracle-instantclient-18.3.0.0-r2.ebuild 12167 BLAKE2B 40c852da52c88e48aad
EBUILD oracle-instantclient-18.5.0.0.ebuild 11891 BLAKE2B fd3cef07338af39b511497540c8527fceb0e7f5c47366413f6245cf0c36dbe560bbe49a5b748c003eff61f3e5758227ff7b2cd2975a3f5fbc2a8260fbfc7fae6 SHA512 02a4b7dca6942aa10d920419e06c31493e4256fd47dd72f88d94c650ff6baae2216ecf63c73b463019d7aa5268f462277b0cdf559461d074dcb7179a8a14b8f7
EBUILD oracle-instantclient-19.3.0.0-r1.ebuild 12164 BLAKE2B ecec46f9af808ab224ab1ea2af4139ff3fd7bf61d1c9ecc85cf56f07c2f8cf527fcf2721ed1f7e43dd69ee66c2e5888cbac8e3f263268cf57205d60eaa7faa67 SHA512 6f9a018423d8887a9e7da46e1ad9706928b9173a96b6cb23a9621cd5986a9b689c0f7c12d1bead88f39ee54114207aec8f37afd013c9d236933c4a66582aa7be
EBUILD oracle-instantclient-19.5.0.0.ebuild 12164 BLAKE2B bc143095749d223aa1ba84c4bc645c3ac173607f4f8388522fbe1d1d5d760434b546bac67b02926b92d1cec885da78b06973407f1f0312705eb8943f542c2ef8 SHA512 e358de60d252f50d14861592e45f322329810162f5f754c855ef2111aa7561cfd9b8730586422138aa658c7729f78c15e73c488dd1f52746c42e36e7f4278867
-EBUILD oracle-instantclient-19.6.0.0-r1.ebuild 10900 BLAKE2B b911e5ea33651fe21e1434adf517426bbc784160eb703686beaddfe2bf519ab7289464450664e4e0b82c6e50e5aaadc25a634b002b28920dcdf68080139b649d SHA512 e54293f042af641f0a26fc5721062d8683e13e1991c2d6eb12ed42e979f04f92c1f60a49c9cff861b134be2df711977fd971b593a7bb60c24a2ef9a736922f0f
+EBUILD oracle-instantclient-19.6.0.0-r1.ebuild 10898 BLAKE2B 162b2e6c1fce47c28d602646f8675986acc46371f867ed362b44cd218120f35599a6dfd5fe0c4ccae07d48f69fbbebdd6f111015a88f9f7a775166b57cae0a78 SHA512 8df4a4cf1701b09f865ed5166979c84a312d1452de57f8dd6cc902d1a7c3b27ebe03a66797f1c673b512362aa11bf74f376f21af22cb74ca7f0050baee17a952
EBUILD oracle-instantclient-19.6.0.0.ebuild 12164 BLAKE2B bc143095749d223aa1ba84c4bc645c3ac173607f4f8388522fbe1d1d5d760434b546bac67b02926b92d1cec885da78b06973407f1f0312705eb8943f542c2ef8 SHA512 e358de60d252f50d14861592e45f322329810162f5f754c855ef2111aa7561cfd9b8730586422138aa658c7729f78c15e73c488dd1f52746c42e36e7f4278867
MISC metadata.xml 957 BLAKE2B dfe01a80765d0ec1afac4a5045e2081e39ee9060a17f278b6eb7cfae7670ec102a504397d037b2b8d8ad82d242a9fa3ed1d4309b25158b934f8674a062dec53e SHA512 dd8c982f1ce276e7701e6b82b71e2464eaa21e413115c2a4d3bbd49053539ff3a9bcfc84252ef7aa9c39d36054fee119002716de5d525a20bb1f2da0d44b3c89
diff --git a/dev-db/oracle-instantclient/oracle-instantclient-19.6.0.0-r1.ebuild b/dev-db/oracle-instantclient/oracle-instantclient-19.6.0.0-r1.ebuild
index 4779da161c1b..f17ec30870d6 100644
--- a/dev-db/oracle-instantclient/oracle-instantclient-19.6.0.0-r1.ebuild
+++ b/dev-db/oracle-instantclient/oracle-instantclient-19.6.0.0-r1.ebuild
@@ -72,7 +72,7 @@ SRC_URI="
LICENSE="OTN"
SLOT="0/${MY_SOVER}"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 x86"
RESTRICT="mirror splitdebug test"
DEPEND="app-arch/unzip"
diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index 63a9178225c8..b7e49861fc10 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -5,13 +5,17 @@ AUX my.cnf.distro-client 637 BLAKE2B b0812e0e03aa9a3b2e55e08b933a0b41b6afd95ded6
AUX my.cnf.distro-server 994 BLAKE2B 41dceff58edf748f9f60ac3c0d1682d2fc2f026fc1fd14b4c2dea398814beda3c09aabea04dd3a9e145464524c629e7e69dc257d1245e0a46dd8584b7f685172 SHA512 cf172edc23d3dda49c21af6b8adef8aa13694d8ceecddf1d612d4ae34d00ba53c51ae4ae7ca4d11083eeacb5d862f59a855a9d80e9e448ab8bbf17f42aac2650
DIST boost_1_59_0.tar.gz 83709983 BLAKE2B 8c6676fa05fa401a6ecb3b890d95aceb4421ec48dd0eab38ce8d170c618e177c82dc67a165938f6be1a01daab24ce41888f5442dbc19ad3dd41368a01a6f89e4 SHA512 05fdbe5637543defdbc630b921515425885593d16db14534ed7b9aa60925ade8fb598d50cb894aed6dae688e789047216daa1bf03fa1aeb6b531060d9dae52ae
DIST boost_1_70_0.tar.bz2 97887058 BLAKE2B dc7a974c6dc2662b767dbd87cb832cd1749c24fb745779d1059b73f19f7e52b33b645adfe72b0296c5e098e5cdb3b9f5eddd382374f33fbcd2ad5739287b2206 SHA512 7f2ea9636baf0210e8ed1d21ee798efb6ce23c0710ff8228b285e2214f82193bcd2d912fd435929c554289a59101c7be2e27ce798f93833f307976f0dd070b49
+DIST boost_1_72_0.tar.bz2 106907358 BLAKE2B ab270a0e3cb24da687d86785e2d2e6d7731b4dbc07bd839eadb642dfa5a428ad584acb1f3529661a8de9a986008ff3427491041059ea2b742348d02e00761cd8 SHA512 63bbd1743e7c904b2e69fdc2eafd1c2a8a30fd70d960dcd366059d0100f000cb605d56cbd9397bb18421631f1c9552a772c434d0f0caddbe56302273f51fd1f6
DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b
DIST percona-server-8.0.19-10.tar.gz 490703179 BLAKE2B 731e9498c4934eb53451c202e8b1de93618190d9b6334b761428ab223756d515d958db77515517e6b5db3ba6cd908c8b238c18b63f4c73b256ec251f8b161ff3 SHA512 39aa805474c6655980e70c97e0d2c0f21ae16e2c1e2e9c7e1d615f46320f1615620368fbdfc24f5d1784aae856090856c3ccda3d6f09ed86c6c9ffe3197be90e
DIST percona-server-8.0.19.10-patches-01.tar.xz 8288 BLAKE2B 2f79c538ac1512b052210439a27b71491917cb9eab08ac3a3b21c188458c2989f0c998d973b8dd654a7d7606acd70ccf374f1e2f5e0088d0c6b96a794dc4c4a5 SHA512 43313797ec405be82f15745185bfab25fda093045f981a8caa8a019522e432415e4b3cca4ca5ffb735d102f98b3c2fccafccbd4695bd2d1f011707f709fcc2b3
DIST percona-server-8.0.20-11.tar.gz 494288758 BLAKE2B 202f0cbd7395a6b8ae367ed96d1b6d2c6ae2a56ba6d85e8aad55a6b36a6966a0c3285836dc829e1583a46e28fd2903540e520f6347b1e8c18d99b08f58daef8b SHA512 cf8aa999bd0205bded526838246d023eae5dfadeec1aaf0be99565def5a1cdcc8041bcff90ba6a49f5e903e4f436d416181a9f134555d5c71b7cf44d2ba58a6d
-DIST percona-server-8.0.20.11-patches-01.tar.xz 8668 BLAKE2B 1f598c1b381de3efe8b8605d915b0b63d04214ba4f6e51ce154a020f3e2c4d76a3b4e96b4c9c958c6949b4bdf8cc2b754875049beccdafc99b3a3ad8abf0b315 SHA512 4ca0f58bf1cbf6e7a5a33b46efa5250c28226fa7f23c1327bda050e7de3ec0f16dc46c1cd1c481d50f8b167a4c07653db8a3daf44e8f3f96bbb0aa8f8f66d5b2
+DIST percona-server-8.0.20.11-patches-02.tar.xz 8876 BLAKE2B 34cb3cd0c6d6fb8b2fca98efa53e6e163e4f6b251f629e40169018c328da5319a77ecceec92c925019d13a4ba2dba8c96a23dccf8ba8a3aa95452d4dc9278ffa SHA512 372885f22e7e37bcd63f382d4b064d99b6f826cd2d053148fcdfa1c7f062f51531d5366c198976797f9a3349539e59f5ba96187dc79fdf00365c618b0f83b7c2
+DIST percona-server-8.0.21-12.tar.gz 522004727 BLAKE2B bc6bf77d862a4827839d1942f58e4124f4692abfa9298eaa7cebdaaa7a6cff036247edda51d9cbb878b0e79858e54cbe5326bc30479b1d5977a655240df438fd SHA512 66076a6774cf18af1111b83aa8977a55e1a2d634c30e190d3bd8e82ba079fb772ac2a2402356be0b79677b54ca0b24c441d87444b68d1e66cd298ca6a0108d31
+DIST percona-server-8.0.21.12-patches-01.tar.xz 8916 BLAKE2B 3a40f63383ad0c63830056b15453a0e7429f2507e8205cca660aaf6787c9d6ed9e741df8d09fc887fe07b82f86e7aa53730b3aa97788421ed4dde3e83c992c01 SHA512 f7599293dced8ea2bc98d88e8dfc4f20288974fecfe481f446b071c1d393119c22317819fcc054bf9cdd4c557044332d450ffc99b3a14c91b51a4c0b6c1c0896
EBUILD percona-server-5.7.27.30-r1.ebuild 37272 BLAKE2B 637049d8fcae905ad4cb4d41651e53fcc0980cf307602879e8d5f0d6bcf0505ff0a9c38a7450f539db0106f4ed406f96e1e212bd2f34eb2510bb137714cd69fd SHA512 feda2f9ccb3b58a03577126aabe0483c3217ce5e0618028d442c98aa2ace7ba527dd10aafde2f679ddabe9f86c65648ea445081d78eb360d02e42cb072733425
EBUILD percona-server-8.0.19.10-r1.ebuild 39009 BLAKE2B d7ff1b52a7e04d3158461494503cf2af8f3bf7775fbeb9d91e58a3cd85094d093aef085522af221e3b6037ec958cf4ffafbbdaf808343b8a23f5b1be40e82750 SHA512 4ffb5d0e7611cd5b388cc5846d12d2eb020325d99a14c10e42c204425360f6d5109352ea8d6dad8926fadba84df810fb10a8f21179ebd79c0e1e0b18e4c3c3e4
-EBUILD percona-server-8.0.20.11-r1.ebuild 40211 BLAKE2B d3ab946880a0ef1b96a93e740af4c10ab615df6aaea3b9655f7afd894e5ddf1e7fbfe5a1b7ef64567a9fddf52c9fc107b7ff68dd7b44a14e31f6a72fcbc8723b SHA512 df0eba7a543aec9bde21b1329c976442cc86989b838602d7beca1b9d2d0f1b91cbf6f1a778743e52c46ac44f48f01231f77956224688cfbb0878e9530cc3ed7d
+EBUILD percona-server-8.0.20.11-r2.ebuild 40249 BLAKE2B ae3233ecc31893529f5d59128e3f39bee9509a46d98a2ec8ca2766ed74af5e5625168e0095fc25852f7fa927fa9e36191d2be1d6ec975eebf3cc771dabf8ec62 SHA512 0831b745e259bcff131e1778f7fa25826198eed091238dfe1f3728a9c940b74582308fe787dd6bbef95568a1fbbb9e5ff7c641476763e3a2d71eee340224542c
+EBUILD percona-server-8.0.21.12.ebuild 40541 BLAKE2B ca55840b52ae781acf13de2917d524b9205b11d4f1703775b8368bef9b7fd256a8b4f360c5fc645a9e65752253336998f0ed602c85e9bf3963e5d9cc37149827 SHA512 34fa8092ad1ee78461e7824a5eb56b8582310fc216cef27fcddde3a2605145be308df28f74847cd343905fbfee6f4a3474193bea95caf30efb5366595b49ee96
MISC metadata.xml 1476 BLAKE2B 45302733bbb03e6e999d60db72bed7382f664d9b46772904a35a1a8bfceccc89008e739fcead55bfb6a056523f0ff84fd22c638de859236f47a01eb8ac6c45eb SHA512 e53b29f9d78e895a26f228b7719a023dbd5957d1e10f384376b75b539a211425be143c229378af2ade5314f6b414d891bafc7e1fffde9bb88b59ff24de31a2c2
diff --git a/dev-db/percona-server/percona-server-8.0.20.11-r1.ebuild b/dev-db/percona-server/percona-server-8.0.20.11-r2.ebuild
index dd3addaa154d..e75b78da1705 100644
--- a/dev-db/percona-server/percona-server-8.0.20.11-r1.ebuild
+++ b/dev-db/percona-server/percona-server-8.0.20.11-r2.ebuild
@@ -17,7 +17,7 @@ MY_MAJOR_PV=$(ver_cut 1-2)
MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.20.11-patches-01.tar.xz"
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.20.11-patches-02.tar.xz"
SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
@@ -52,6 +52,7 @@ S="${WORKDIR}/mysql"
# These are used for both runtime and compiletime
COMMON_DEPEND="
>=app-arch/lz4-0_p131:=
+ app-arch/zstd:=
sys-libs/ncurses:0=
>=sys-libs/zlib-1.2.3:0=
libressl? ( dev-libs/libressl:0= )
@@ -280,6 +281,7 @@ src_configure() {
-DWITH_LZ4=system
# Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
-DWITH_RAPIDJSON=bundled
+ -DWITH_ZSTD=system
)
if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
diff --git a/dev-db/percona-server/percona-server-8.0.21.12.ebuild b/dev-db/percona-server/percona-server-8.0.21.12.ebuild
new file mode 100644
index 000000000000..14f08b79a9b5
--- /dev/null
+++ b/dev-db/percona-server/percona-server-8.0.21.12.ebuild
@@ -0,0 +1,1219 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+ multiprocessing prefix toolchain-funcs
+
+MY_BOOST_VERSION="1.72.0"
+MY_PV=$(ver_rs 3 '-')
+MY_PV="${MY_PV//_pre*}"
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.21.12-patches-01.tar.xz"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+ https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
+ ${PATCH_SET}
+"
+
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
+DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 ldap libressl numa pam +perl profiling
+ rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
+
+# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
+RESTRICT="!test? ( test ) libressl? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+ cjk? ( server )
+ jemalloc? ( server )
+ numa? ( server )
+ profiling? ( server )
+ router? ( server )
+ tcmalloc? ( server )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~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"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+ >=app-arch/lz4-0_p131:=
+ app-arch/zstd:=
+ sys-libs/ncurses:0=
+ >=sys-libs/zlib-1.2.3:0=
+ libressl? ( dev-libs/libressl:0= )
+ !libressl? ( >=dev-libs/openssl-1.0.0:0= )
+ server? (
+ dev-libs/icu:=
+ dev-libs/libevent:=[ssl]
+ >=dev-libs/protobuf-3.8:=
+ net-libs/libtirpc:=
+ net-misc/curl:=
+ cjk? ( app-text/mecab:= )
+ ldap? (
+ dev-libs/cyrus-sasl
+ net-nds/openldap
+ )
+ jemalloc? ( dev-libs/jemalloc:0= )
+ kernel_linux? (
+ dev-libs/libaio:0=
+ sys-process/procps:0=
+ )
+ numa? ( sys-process/numactl )
+ pam? ( sys-libs/pam:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ virtual/yacc
+ server? ( net-libs/rpcsvc-proto )
+ test? (
+ acct-group/mysql acct-user/mysql
+ dev-perl/JSON
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ !dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !dev-db/mysql-cluster
+ !dev-db/percona-server:0
+ !dev-db/percona-server:5.7
+ selinux? ( sec-policy/selinux-mysql )
+ !prefix? (
+ acct-group/mysql acct-user/mysql
+ dev-db/mysql-init-scripts
+ )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+ : ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+ : ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ : ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ : ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use server ; then
+ CHECKREQS_DISK_BUILD="3G"
+
+ if has test $FEATURES ; then
+ CHECKREQS_DISK_BUILD="9G"
+ fi
+
+ check-reqs_pkg_pretend
+ fi
+ fi
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ CHECKREQS_DISK_BUILD="3G"
+
+ if has test ${FEATURES} ; then
+ CHECKREQS_DISK_BUILD="9G"
+
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+ [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+ && die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+ if use latin1 ; then
+ # Upstream only supports tests with default charset
+ die "Testing with USE=latin1 is not supported."
+ fi
+ fi
+
+ if use kernel_linux ; then
+ if use numa ; then
+ linux-info_get_any_version
+
+ local CONFIG_CHECK="~NUMA"
+
+ local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+ WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+ check_extra_config
+ fi
+ fi
+
+ use server && check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/mysql-patches
+
+ # Avoid rpm call which would trigger sandbox, #692368
+ sed -i \
+ -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+ CMakeLists.txt || die
+
+ if use jemalloc ; then
+ echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+ fi
+
+ if use tcmalloc ; then
+ echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+ fi
+
+ # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+ if [[ -d "${S}/support-files/SELinux" ]] ; then
+ echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+ fi
+
+ # Remove man pages for client-lib tools we don't install
+ rm \
+ man/my_print_defaults.1 \
+ man/perror.1 \
+ man/zlib_decompress.1 \
+ || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # bug #283926, with GCC4.4, this is required to get correct behavior.
+ append-flags -fno-strict-aliasing
+
+ CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+ # debug hack wrt #497532
+ mycmakeargs=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+ -DSYSCONFDIR="${EPREFIX}/etc/mysql"
+ -DINSTALL_BINDIR=bin
+ -DINSTALL_DOCDIR=share/doc/${PF}
+ -DINSTALL_DOCREADMEDIR=share/doc/${PF}
+ -DINSTALL_INCLUDEDIR=include/mysql
+ -DINSTALL_INFODIR=share/info
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DINSTALL_MANDIR=share/man
+ -DINSTALL_MYSQLSHAREDIR=share/mysql
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+ -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+ -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ # Using bundled editline to get CTRL+C working
+ -DWITH_EDITLINE=bundled
+ -DWITH_ZLIB=system
+ -DWITH_SSL=system
+ -DWITH_LIBWRAP=0
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ -DWITH_DEFAULT_FEATURE_SET=0
+ # The build forces this to be defined when cross-compiling. We pass it
+ # all the time for simplicity and to make sure it is actually correct.
+ -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DWITH_CURL=system
+ -DWITH_BOOST="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
+ -DWITH_ROUTER=$(usex router ON OFF)
+ )
+
+ if is-flagq -fno-lto ; then
+ einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+ mycmakeargs+=( -DWITH_LTO=OFF )
+ elif is-flagq -flto ; then
+ einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+ myconf+=( -DWITH_LTO=ON )
+ else
+ # Disable automagic
+ myconf+=( -DWITH_LTO=OFF )
+ fi
+
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+ mycmakeargs+=(
+ -DWITH_ICU=system
+ -DWITH_LZ4=system
+ # Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+ -DWITH_RAPIDJSON=bundled
+ -DWITH_ZSTD=system
+ )
+
+ if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+ ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+ ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+ ewarn "You MUST file bugs without these variables set."
+ ewarn "Tests will probably fail!"
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+ elif use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8mb4
+ -DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+ )
+ fi
+
+ if use server ; then
+ mycmakeargs+=(
+ -DWITH_AUTHENTICATION_LDAP=$(usex ldap system OFF)
+ -DWITH_EXTRA_CHARSETS=all
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_MECAB=$(usex cjk system OFF)
+ -DWITH_LIBEVENT=system
+ -DWITH_PROTOBUF=system
+ -DWITH_NUMA=$(usex numa ON OFF)
+ -DWITH_PAM=$(usex pam)
+ )
+
+ if use profiling ; then
+ # Setting to OFF doesn't work: Once set, profiling options will be added
+ # to `mysqld --help` output via sql/sys_vars.cc causing
+ # "main.mysqld--help-notwin" test to fail
+ mycmakeargs+=( -DENABLED_PROFILING=ON )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_EXAMPLE_STORAGE_ENGINE=0
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_FEDERATED_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_INNODB_MEMCACHED=0
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ -DWITH_ROCKSDB=$(usex rocksdb 1 0)
+ -DWITH_TOKUDB=$(usex tokudb 1 0)
+ )
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_SYSTEMD=no
+ )
+ fi
+
+ cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+ _disable_test() {
+ local rawtestname bug reason
+ rawtestname="${1}" ; shift
+ bug="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+ echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # Run CTest (test-units)
+ cmake_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ if [[ -z "${MTR_PARALLEL}" ]] ; then
+ local -x MTR_PARALLEL=$(makeopts_jobs)
+
+ if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+ # Running multiple tests in parallel usually require higher ulimit
+ # and fs.aio-max-nr setting. In addition, tests like main.multi_update
+ # are known to hit timeout when system is busy.
+ # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+ # using "auto".
+ local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+ info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+ einfo "${info_msg}"
+ unset info_msg
+ MTR_PARALLEL=4
+ fi
+ else
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+ fi
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ # Run mysql tests
+ pushd "${TESTDIR}" &>/dev/null || die
+
+ touch "${T}/disabled.def"
+
+ local -a disabled_tests
+ disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+ disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "group_replication.gr_ssl_options2;0;Sporadic failing test" )
+ disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
+ disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
+ disabled_tests+=( "innodb.percona_log_encrypt_failure;0;Requires proper keyring setup" )
+ disabled_tests+=( "innodb.percona_log_encrypt_change_mk;6039;False positive on Gentoo (PS)" )
+ disabled_tests+=( "innodb.percona_log_encrypt_change_rk;6805;False positive on Gentoo (PS)" )
+ disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
+ disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" )
+ disabled_tests+=( "main.mysql_load_data_local_dir;7416;Known test failure" )
+ disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
+ disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
+ disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
+ disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+ disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+ disabled_tests+=( "main.with_recursive;6804;Known rounding error with latest AMD processors" )
+ disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+ disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Know failure - no upstream bug yet" )
+ disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware" )
+ disabled_tests+=( "sys_vars.innodb_sys_tablespace_encrypt_basic;7415;Known test failure" )
+ disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+ disabled_tests+=( "x.message_protobuf_nested;6803;False positive caused by protobuff-3.11+" )
+
+ # Known test failures due to expired SSL certificates -- fixed in 8.0.22
+ disabled_tests+=( "auth_sec.admin_ssl_crl_crlpath;100055;Fixed in 8.0.22" )
+ disabled_tests+=( "auth_sec.admin_ssl_crl;100055;Fixed in 8.0.22" )
+ disabled_tests+=( "auth_sec.server_withssl_client_withssl;100055;Fixed in 8.0.22" )
+ disabled_tests+=( "main.ssl_crl_clients_valid;100055;Fixed in 8.0.22" )
+ disabled_tests+=( "main.ssl_crl;100055;Fixed in 8.0.22" )
+ disabled_tests+=( "main.ssl_crl_crlpath;100055;Fixed in 8.0.22" )
+ disabled_tests+=( "main.ssl_ca;100055;Fixed in 8.0.22" )
+
+ if ! hash zip 1>/dev/null 2>&1 ; then
+ # no need to force dep app-arch/zip for one test
+ disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
+ disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
+ fi
+
+ local test_ds
+ for test_infos_str in "${disabled_tests[@]}" ; do
+ IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+ if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+ die "Invalid test data set, not matching format: ${test_infos_str}"
+ fi
+
+ _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+ done
+ unset test_ds test_infos_str test_infos_arr
+
+ if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
+ local impossible_test
+ for impossible_test in \
+ encryption.default_table_encryption_var \
+ keyring_vault.innodb_online_alter_encryption \
+ keyring_vault.innodb_row_log_encryption \
+ keyring_vault.install_keyring_vault \
+ keyring_vault.keyring_udf \
+ keyring_vault.keyring_vault_config \
+ keyring_vault.keyring_vault_config_qa \
+ keyring_vault.keyring_vault_timeout \
+ keyring_vault.key_rotation_qa \
+ keyring_vault.rpl_key_rotation \
+ keyring_vault.table_encrypt_2 \
+ keyring_vault.table_encrypt_2_directory \
+ keyring_vault.table_encrypt_2_keyring \
+ keyring_vault.table_encrypt_5 \
+ keyring_vault.table_encrypt_5_directory \
+ keyring_vault.table_encrypt_kill \
+ keyring_vault.temp_table_encrypt_keyring_vault \
+ main.persisted_variables \
+ ; do
+ _disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not set"
+ done
+ fi
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ cmake_src_install
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Convenience links
+ einfo "Making Convenience links for mysqlcheck multi-call binary"
+ dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+ dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+ dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+ # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+ if [[ -d "${ED}/usr/data" ]] ; then
+ rm -Rf "${ED}/usr/data" || die
+ fi
+
+ # Unless they explicitly specific USE=test, then do not install the
+ # testsuite. It DOES have a use to be installed, esp. when you want to do a
+ # validation of your database configuration after tuning it.
+ if ! use test ; then
+ rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+ fi
+
+ # Configuration stuff
+ einfo "Building default configuration ..."
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+ [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+ cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+ eprefixify "${TMPDIR}/my.cnf"
+ doins "${TMPDIR}/my.cnf"
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+ cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+ eprefixify "${TMPDIR}/50-distro-client.cnf"
+ doins "${TMPDIR}/50-distro-client.cnf"
+
+ mycnf_src="my.cnf-8.0.distro-server"
+ sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+ "${FILESDIR}/${mycnf_src}" \
+ > "${TMPDIR}/my.cnf.ok" || die
+
+ if use prefix ; then
+ sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+
+ if use latin1 ; then
+ sed -i \
+ -e "/character-set/s|utf8mb4|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+
+ eprefixify "${TMPDIR}/my.cnf.ok"
+
+ newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+ if use router ; then
+ rm -rf \
+ "${ED}/usr/LICENSE.router" \
+ "${ED}/usr/README.router" \
+ "${ED}/usr/run" \
+ "${ED}/usr/var" \
+ || die
+ fi
+
+ # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+ find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ # NOTE: $MY_LOGDIR contains $EPREFIX by default
+ [[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+ # Note about configuration change
+ einfo
+ elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+ elog "to several files in /etc/mysql/mysql.d."
+ elog "Please backup any changes you made to /etc/mysql/my.cnf"
+ elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+ elog "You may have as many files as needed and they are read alphabetically."
+ elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+ einfo
+
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog " \"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ einfo
+ else
+ einfo
+ elog "Upgrade process for ${PN}-8.x has changed. Please read"
+ elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+ einfo
+ fi
+}
+
+pkg_config() {
+ _getoptval() {
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ local cmd=(
+ "${my_print_defaults_binary}"
+ "${extra_options}"
+ "${section}"
+ )
+ local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+ if [[ ${#results[@]} -gt 0 ]] ; then
+ # When option is set multiple times only return last value
+ echo "${results[-1]}"
+ fi
+ }
+
+ _mktemp_dry() {
+ # emktemp has no --dry-run option
+ local template="${1}"
+
+ if [[ -z "${template}" ]] ; then
+ if [[ -z "${T}" ]] ; then
+ template="/tmp/XXXXXXX"
+ else
+ template="${T}/XXXXXXX"
+ fi
+ fi
+
+ local template_wo_X=${template//X/}
+ local n_X
+ let n_X=${#template}-${#template_wo_X}
+ if [[ ${n_X} -lt 3 ]] ; then
+ echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+ return
+ fi
+
+ local attempts=0
+ local character tmpfile
+ while [[ true ]] ; do
+ let attempts=attempts+1
+
+ new_file=
+ while read -n1 character ; do
+ if [[ "${character}" == "X" ]] ; then
+ tmpfile+="${RANDOM:0:1}"
+ else
+ tmpfile+="${character}"
+ fi
+ done < <(echo -n "${template}")
+
+ if [[ ! -f "${tmpfile}" ]]
+ then
+ echo "${tmpfile}"
+ return
+ fi
+
+ if [[ ${attempts} -ge 100 ]] ; then
+ echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+ return
+ fi
+ done
+ }
+
+ local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+ if [[ ! -x "${mysqld_binary}" ]] ; then
+ die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+ fi
+
+ local mysql_binary="${EROOT}/usr/bin/mysql"
+ if [[ ! -x "${mysql_binary}" ]] ; then
+ die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+ fi
+
+ local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+ if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+ die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+ fi
+
+ if [[ -z "${MYSQL_USER}" ]] ; then
+ MYSQL_USER=mysql
+ if use prefix ; then
+ MYSQL_USER=$(id -u -n 2>/dev/null)
+ if [[ -z "${MYSQL_USER}" ]] ; then
+ die "Failed to determine current username!"
+ fi
+ fi
+ fi
+
+ if [[ -z "${MYSQL_GROUP}" ]] ; then
+ MYSQL_GROUP=mysql
+ if use prefix ; then
+ MYSQL_GROUP=$(id -g -n 2>/dev/null)
+ if [[ -z "${MYSQL_GROUP}" ]] ; then
+ die "Failed to determine current user groupname!"
+ fi
+ fi
+ fi
+
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ local -x HOME="${EROOT}/root"
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Read currently set data directory
+ MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+ # Bug #213475 - MySQL _will_ object strenously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ die "Sorry, unable to find MY_DATADIR!"
+ elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+ ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+ ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+ die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+ fi
+
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+ # These are dir+prefix
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+ # Create missing directories.
+ # Always check if mysql user can write to directory even if we just
+ # created directory because a parent directory might be not
+ # accessible for that user.
+ PID_DIR="${EROOT}/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]] ; then
+ einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+ install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+ || die "Failed to create PID directory '${PID_DIR}'!"
+ fi
+
+ local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_pid_dir_testfile}" ]] \
+ && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_pid_dir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+ else
+ rm "${_pid_dir_testfile}" || die
+ unset _pid_dir_testfile
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]] ; then
+ einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+ || die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+ fi
+
+ local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_datadir_testfile}" ]] \
+ && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_datadir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+ else
+ rm "${_my_datadir_testfile}" || die
+ unset _my_datadir_testfile
+ fi
+
+ if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+ einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+ || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+ fi
+
+ if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+ MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+ [[ -z "${MYSQL_TMPDIR}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+ mkdir "${MYSQL_TMPDIR}" || die
+ chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+ fi
+
+ # Now we need to test MYSQL_TMPDIR...
+ local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_tmpdir_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_tmpdir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+ else
+ rm "${_my_tmpdir_testfile}" || die
+ unset _my_tmpdir_testfile
+ fi
+
+ if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+ einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+ || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+ fi
+
+ if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+ local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_logbin_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_logbin_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+ else
+ rm "${_my_logbin_testfile}" || die
+ unset _my_logbin_testfile
+ fi
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+ einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+ || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+ local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_relaylog_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_relaylog_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+ else
+ rm "${_my_relaylog_testfile}" || die
+ unset _my_relaylog_testfile
+ fi
+ fi
+
+ local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+ if [[ -z "${mysql_install_log}" ]] ; then
+ die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+ else
+ # make sure file is writable for MYSQL_USER...
+ touch "${mysql_install_log}" || die
+ chown ${MYSQL_USER} "${mysql_install_log}" || die
+ fi
+
+ local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+ if [[ -z "${mysqld_logfile}" ]] ; then
+ die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+ else
+ # make sure file is writable for MYSQL_USER...
+ touch "${mysqld_logfile}" || die
+ chown ${MYSQL_USER} "${mysqld_logfile}" || die
+ fi
+
+ echo ""
+ einfo "Detected settings:"
+ einfo "=================="
+ einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+ einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+ einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+ einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+ if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+ einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+ einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+ fi
+
+ einfo "PID DIR:\t\t\t\t${PID_DIR}"
+ einfo "Install db log:\t\t\t${mysql_install_log}"
+ einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+ local -a config_files
+
+ local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+ if [[ -f "${config_file}" ]] ; then
+ config_files+=( "${config_file}" )
+ else
+ ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+ fi
+
+ config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+ if [[ -f "${config_file}" ]] ; then
+ config_files+=( "${config_file}" )
+ else
+ ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+ fi
+
+ if [[ ${#config_files[@]} -gt 0 ]] ; then
+ if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+ local user_answer
+
+ echo
+ einfo "Please select default authentication plugin (enter number or plugin name):"
+ einfo "1) caching_sha2_password [MySQL 8.0 default]"
+ einfo "2) mysql_native_password [MySQL 5.7 default]"
+ einfo
+ einfo "For details see:"
+ einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+ read -p " >" user_answer
+ echo
+
+ case "${user_answer}" in
+ 1|caching_sha2_password)
+ MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+ ;;
+ 2|mysql_native_password)
+ MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+ ;;
+ '')
+ die "No authentication plugin selected!"
+ ;;
+ *)
+ die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+ ;;
+ esac
+
+ echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+ unset user_answer
+ fi
+
+ local cfg_option cfg_option_tabs cfg_section
+ for config_file in "${config_files[@]}" ; do
+ cfg_option="default-authentication-plugin"
+ cfg_section="mysqld"
+ cfg_option_tabs="\t\t"
+ if [[ "${config_file}" == *client.cnf ]] ; then
+ cfg_option="default-auth"
+ cfg_section="client"
+ cfg_option_tabs="\t\t\t\t"
+ fi
+
+ if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+ einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+ sed -i \
+ -e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+ "${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+ else
+ einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+ sed -i \
+ -e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+ "${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+ fi
+ done
+ unset cfg_option cfg_option_tabs cfg_section
+ fi
+ unset config_files config_file
+
+ echo
+
+ if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ local tmp_mysqld_password_source=
+
+ for tmp_mysqld_password_source in mysql client ; do
+ einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+ MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+ if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+ ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+ MYSQL_ROOT_PASSWORD=
+ continue
+ fi
+
+ einfo "Found password in '${tmp_mysqld_password_source}' section!"
+ break
+ fi
+ done
+
+ # Sometimes --show is required to display passwords in some implementations of my_print_defaults
+ if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+ MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+ fi
+
+ unset tmp_mysqld_password_source
+ fi
+
+ if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ local pwd1="a"
+ local pwd2="b"
+
+ echo
+ einfo "No password for mysql 'root' user was specified via environment"
+ einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+ einfo "file like '${HOME}/.my.cnf'."
+ einfo "To continue please provide a password for the mysql 'root' user"
+ einfo "now on console:"
+ ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+ read -rsp " >" pwd1 ; echo
+
+ einfo "Retype the password"
+ read -rsp " >" pwd2 ; echo
+
+ if [[ "x$pwd1" != "x$pwd2" ]] ; then
+ die "Passwords are not the same!"
+ fi
+
+ MYSQL_ROOT_PASSWORD="${pwd1}"
+ unset pwd1 pwd2
+
+ echo
+ fi
+
+ local -a mysqld_options
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see http://bugs.mysql.com/bug.php?id=31312
+ use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+ # Figure out which options we need to disable to do the setup
+ local helpfile="${TMPDIR}/mysqld-help"
+ "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+ local opt optexp optfull
+ for opt in host-cache name-resolve networking slave-start \
+ federated ssl log-bin relay-log slow-query-log external-locking \
+ log-slave-updates \
+ ; do
+ optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+ egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+ done
+
+ # Prepare timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+ [[ -z "${tz_sql}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+ echo "USE mysql;" >"${tz_sql}"
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+ if [[ $? -ne 0 ]] ; then
+ die "mysql_tzinfo_to_sql failed!"
+ fi
+
+ # --initialize-insecure will not set root password
+ # --initialize would set a random one in the log which we don't need as we set it ourselves
+ local cmd=(
+ "${mysqld_binary}"
+ "${mysqld_options[@]}"
+ "--initialize-insecure"
+ "--init-file='${tz_sql}'"
+ "--basedir='${EROOT}/usr'"
+ "--datadir='${MY_DATADIR}'"
+ "--tmpdir='${MYSQL_TMPDIR}'"
+ "--log-error='${mysql_install_log}'"
+ "--user=${MYSQL_USER}"
+ )
+
+ einfo "Initializing ${PN} data directory: ${cmd[@]}"
+ eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+ if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+ die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+ fi
+
+ rm "${tz_sql}" || die
+
+ local x=${RANDOM}
+ local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+ local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+ unset x
+
+ cmd=(
+ "${mysqld_binary}"
+ "${mysqld_options[@]}"
+ "--basedir='${EROOT}/usr'"
+ "--datadir='${MY_DATADIR}'"
+ "--tmpdir='${MYSQL_TMPDIR}'"
+ --max_allowed_packet=8M
+ --net_buffer_length=16K
+ "--socket='${socket}'"
+ "--pid-file='${pidfile}'"
+ "--log-error='${mysqld_logfile}'"
+ "--user=${MYSQL_USER}"
+ )
+
+ einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+ eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+ echo -n "Waiting for mysqld to accept connections "
+ local maxtry=15
+ while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+
+ if [[ -S "${socket}" ]] ; then
+ # Even with a socket we don't know if mysqld will abort
+ # start due to an error so just wait a little bit more...
+ maxtry=5
+ while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ fi
+
+ echo
+
+ if [[ ! -S "${socket}" ]] ; then
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+ die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+ fi
+
+ local mysql_logfile="${TMPDIR}/set_root_pw.log"
+ touch "${mysql_logfile}" || die
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+ cmd=(
+ "${mysql_binary}"
+ --no-defaults
+ "--socket='${socket}'"
+ -hlocalhost
+ "-e \"${sql}\""
+ )
+ eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+ local rc=$?
+ eend ${rc}
+
+ if [[ ${rc} -ne 0 ]] ; then
+ # Poor man's solution which tries to avoid having password
+ # in log. NOTE: sed can fail if user didn't follow advice
+ # and included character which will require escaping...
+ sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+ die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+ fi
+
+ # Stop the server
+ if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+ echo -n "Stopping the server "
+ pkill -F "${pidfile}" &>/dev/null
+
+ maxtry=10
+ while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+
+ echo
+
+ if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+ # We somehow failed to stop server.
+ # However, not a fatal error. Just warn the user.
+ ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+ fi
+ fi
+
+ einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}
diff --git a/dev-db/percona-toolkit/Manifest b/dev-db/percona-toolkit/Manifest
index 3f0a2e6119de..3a9aeb1c2468 100644
--- a/dev-db/percona-toolkit/Manifest
+++ b/dev-db/percona-toolkit/Manifest
@@ -7,8 +7,10 @@ DIST percona-toolkit-2.2.20.tar.gz 1431840 BLAKE2B 76565662b4037010f7e8de98316f5
DIST percona-toolkit-3.0.13.tar.gz 10855538 BLAKE2B 30dfbd3c56da64de10ce5d960a9b35b5729c7ea07ec8a40b97f2707af935e57d2291201926dae8794e623a2f60095502a5b97709d3343bd95318ab832f3a5ca5 SHA512 4f8050f3f3a43363c9ee1b15c161d60deafd443a0e057b7960881870d10d1fe0214b885e77b404f03081eb27adfa337e3adea26ca238efac753fb949272f36d3
DIST percona-toolkit-3.0.9.tar.gz 15197340 BLAKE2B 095d8c0b26853caa6d2515de1d8fb8ff13b3084caa46498c8c789cd4e7b18473d41992701e393ad91cd7fdda8b3e56a099600285aeb4ba788110d36a028f76b6 SHA512 56a8732cfdbd58d0602e482d7bf049d2049104b7ae203d756db81a052cd837f16d2a35f75def4f23748534d0d2eb6441cb9fe49175a931fbcdbb6adeb42f1c53
DIST percona-toolkit-3.1.0.tar.gz 18106856 BLAKE2B 4a08e70a03d80e86e2fd7ba4ac77be9568643faf46bb653ef9e18015b95d36936034369a8adf9de4e09d2ca6cd25a845b140d6dd2c41027597f08d74f328ad26 SHA512 6dd2de997fe9627897dad453277544142cbdcba41bf30de21ee10c292c671bc089df0e299a8e386af082511c57ac53621b8e11f4ae43e98ea41eeca0c76f652f
+DIST percona-toolkit-3.2.1.tar.gz 15521123 BLAKE2B 7f8222a2afe2c0700d8f965bb5f8d2ef99c1136b977454ef04133fa8dfeb0192c49552dfde90a2d4d69116c2ba7c4a998fc330f64546691982946624bf24efef SHA512 17fd9f10d2d5671c3ce75dfeba501b9c34b216844b8d8ceb03fadbfb6396cedb7b672d52af7a831739a417d6fcc5b538b4772ffdb9b55816d94fac87e88ba472
EBUILD percona-toolkit-2.2.20.ebuild 1213 BLAKE2B 2bcc433599d64b15225e508fa16c50634b34c9963c38fae7d8ac412e730c9566751bfa1c784254018e40b5a6d8fcb6b4e52c2f85df7362d43bcf153282f7766b SHA512 f1b0b8a48e99d616d9a54a5bf6c39a06ef5e6f48992fe3e0584d464d7ed1abc5f6f08a14488cbffd4fcf4d8afe8791112094438baf06a5a4b788a953d539288b
EBUILD percona-toolkit-3.0.13.ebuild 1325 BLAKE2B c8dc51ce757c3165957190266fa484bf74451644cdc62a464d8276fd6d3523a2b2864caa27b766c7e90b1c02c81d940ebd706e876922020c0feb878eb3083d26 SHA512 152841e2bd6be6e7015be3c929e1ecef678bf4456b9beba1ace9dac5f129e02d7373b460bb445ab0c69e10c351602907d33dcddb14faf624013790f9cfe54753
EBUILD percona-toolkit-3.0.9.ebuild 1249 BLAKE2B bd743a722e60cade6307bd04c774a77d0e01b2272e82974be486b47d0462120910c1182ba6fc3f7cf268f4ebfa04d432e456f62079010621aeaf6b325c743b54 SHA512 988d423c3125592608caa659543b508dcea2048b0c905a24c924e75894ca7c93924908e49f5c6c2c5d660a7b90a242e558e874849f0793d58a82abec1ad38982
EBUILD percona-toolkit-3.1.0-r1.ebuild 1389 BLAKE2B 43f48d8cbaa1bebcef5c8d9100f2d270931ee2ac0d5649b1aa66bd2f0fb6c56238d5eb30b5a3d1b2bbe4915470976af3e80f04aa97e173a5214f182d41772953 SHA512 fb554bae9ebc93863faf381a59ab0ce64f41c0374061c34d5b6c34e8728ee771a2c90ea852adb8857211adf52cdfd9e48072fcf079a68c20f3554788775bdffd
+EBUILD percona-toolkit-3.2.1.ebuild 1327 BLAKE2B 721af4c15c6c1bacae62569f8320698899ac7c26d6694790d4457ea65b2ec12c476d2d3d80e42d8f9f589e4aa8d5c81b76c29484e6f9cf68387bf00cbd2e8000 SHA512 c159ad4696e2fe86b012a24ee3a69da0fe7134c248786936d0f1bca1b0e3672825dd10c1ee485d187d26fa3f0870c453fbbf67de89b28cf770ed640fe9b2b265
MISC metadata.xml 723 BLAKE2B f5150e42397c47b3815de1c9ff8414e12f517501e7075c5fddf3ac800a2c0a654db5d2fccef57609629017713f3a80a81164886b82d16df282601452e1bd5705 SHA512 b0e9ddbbd1834f5867600530e946ce30786ea83e779f62bf894facc0bb3f0fd5a58f6095f0e006d565e04370c89ae4101d9cfb9b7243704118eb7629ae0e0f9e
diff --git a/dev-db/percona-toolkit/percona-toolkit-3.2.1.ebuild b/dev-db/percona-toolkit/percona-toolkit-3.2.1.ebuild
new file mode 100644
index 000000000000..90f65e5dffb6
--- /dev/null
+++ b/dev-db/percona-toolkit/percona-toolkit-3.2.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit perl-module
+
+DESCRIPTION="Advanced command-line tools to perform a variety of MySQL and system tasks"
+HOMEPAGE="https://www.percona.com/software/mysql-tools/percona-toolkit"
+SRC_URI="https://www.percona.com/downloads/${PN}/${PV}/source/tarball/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 Artistic )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+# Package warrants IUSE doc
+IUSE=""
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ dev-perl/JSON
+ dev-perl/libwww-perl
+ dev-perl/Role-Tiny
+ virtual/perl-File-Path
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Scalar-List-Utils
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ virtual/perl-ExtUtils-MakeMaker"
+
+# Bug #501904 - CVE-2014-2029
+# sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/*
+# ^ is *-no-versioncheck.patch
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.0.7-no-versioncheck.patch
+ "${FILESDIR}"/${PN}-3.0.10-slave-delay-fix.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s/=> 'percona-toolkit',/=> 'Percona::Toolkit',/g" \
+ Makefile.PL || die
+}
diff --git a/dev-db/percona-xtrabackup/Manifest b/dev-db/percona-xtrabackup/Manifest
index fa02b761cd3e..e3db2d4ff4d6 100644
--- a/dev-db/percona-xtrabackup/Manifest
+++ b/dev-db/percona-xtrabackup/Manifest
@@ -10,4 +10,4 @@ DIST percona-xtrabackup-8.0.13.tar.gz 272887474 BLAKE2B d0ac4c602c7c3197ca0a7c36
EBUILD percona-xtrabackup-2.4.15.ebuild 1778 BLAKE2B 74e30f27b5dc192c2fe8050cb881b1c5450a0f0d39c630580bf93b8bb95312602b30fa827a06df1794410b2d655f8adc2be9fef596ea26bdf00d071800f99f72 SHA512 fa47544c2b83c281d04a3b9f2e435a36a47d94bce872b3b0fce45071cdffc196c0bd03ca41837a2d2132a09880c1a443216f9b7d98ffe856a3323f8de9067bed
EBUILD percona-xtrabackup-2.4.20.ebuild 1535 BLAKE2B 41170fcaab472910dde609fb7b12aa6918a708018a7fde9cc182276b8383fd041c322141aea8dcf599752a88e2ed5872f4087ac11cc27387495f7574af1be594 SHA512 592dacff26ec640eec56853e8a9bbe63ba8ecae859463e55aac9478c393d05409e3b0bd9a7aefbd4795f37ef213e183c9e24f9929ea05f470c33a6034e5a1fd3
EBUILD percona-xtrabackup-8.0.13.ebuild 1545 BLAKE2B 42ea67173b4c4f462e0acbe4a5ebdf2cae8ea7764df7d5353c73f65dd5d9023a2833e8e8c7baf9b4f8316d5179ea5aa3a7ca1b55eebd88d43fb89cbea333928d SHA512 5967bb6a3e95187d13c4b6995cfd8b151aa1d1fa9c4dadfa1bf0791ff8748a73705a750214115c62c92c41c483d48872e38c7915e82fbc4ef90d79f594a135c2
-MISC metadata.xml 564 BLAKE2B 428ee8f4bba052e58061a5eb643feee71e5f02728b17d63a228436d0988babdb60b1d8acc887e7f142fc715994d1c4fef26cfb4644b5afac65869cdc3f02e887 SHA512 5eead923c1daed6ed5663b9d9d9b6995e5f8fc248064d48da2e2c89cbe1957ac3aee07781df37979cbdb41c37351f25bb6530f2aa0531008437899f82459ba31
+MISC metadata.xml 453 BLAKE2B 61f0b959f8e98da5db808cc69e713af8abfe388694f4c56ef2d8ec141e893d102e9963b2419e3239d13c9e41ffc0d4b8fd27114ebab1330abc54d410f61ff145 SHA512 d8dbf03201ec9d2038f7adec42c36c094b0ad55fa082ec8959fb2116f9f52cb641f7ec7c27f0710815aa68ea6f34918e70859a005b7e045157ffe1134129a692
diff --git a/dev-db/percona-xtrabackup/metadata.xml b/dev-db/percona-xtrabackup/metadata.xml
index 9e4529d4229a..06a7f98b1551 100644
--- a/dev-db/percona-xtrabackup/metadata.xml
+++ b/dev-db/percona-xtrabackup/metadata.xml
@@ -2,10 +2,6 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>hydrapolic@gmail.com</email>
- <name>Tomáš Mózes</name>
- </maintainer>
- <maintainer type="person">
<email>gentoo@manwe.pl</email>
<name>Michał Zając</name>
</maintainer>
diff --git a/dev-db/pg_activity/Manifest b/dev-db/pg_activity/Manifest
index b0afe0e903be..cf4af9c0a9ae 100644
--- a/dev-db/pg_activity/Manifest
+++ b/dev-db/pg_activity/Manifest
@@ -1,3 +1,5 @@
DIST pg_activity-1.6.1.tar.gz 127376 BLAKE2B 4e9c055c2b7d7eb78ee735124284d4d34c70a067011c2bdd3d960a7e2ff59cb799fb4a3ec1a51d7ebd0e921f5d46e85a28625d3a1a7efc281fc751702f2b58b6 SHA512 4a67443521afe88283315be1c2b3d3f19df3cb2cb3e4e059149775f5dd45925dbab8bd34525878ac883f8d007da08fbdfe3d23db9a6e1f17a4af4aa9b9c96338
+DIST pg_activity-1.6.2.tar.gz 127561 BLAKE2B 5ddebd3068ddc33196903892c01b947ffc50ecff7ec790e196626e87ee8933ff79242e3ba61c207ea1020535c5d85dbbc4ac9e4825a19ab98004bb27ea0b6a6c SHA512 fd743f369201c6ec3762373c39969b2b7632d79a8fb9c8ebd12a88b66b91915c30e445e93162844b4a176cf7e13009c9c8136e973180b00e7cc708ecd66b4853
EBUILD pg_activity-1.6.1.ebuild 634 BLAKE2B 6626868b56015cf8df504c7bd785974a2dff3cfb43adfa315498c25922521902b4b6ccde199d21f37f52409bf56bdbd4b4e2d0e42c05c10cc43b0ee9624afbcd SHA512 c7e548efcae3b1412c80b237028f8126b0e4bc2e0d8f4b8d8142d3c4646dfbe5afad0849d5a7009f87e5e36ec2fb613bed39faeca4330f255cb57c002a176612
+EBUILD pg_activity-1.6.2.ebuild 634 BLAKE2B 6626868b56015cf8df504c7bd785974a2dff3cfb43adfa315498c25922521902b4b6ccde199d21f37f52409bf56bdbd4b4e2d0e42c05c10cc43b0ee9624afbcd SHA512 c7e548efcae3b1412c80b237028f8126b0e4bc2e0d8f4b8d8142d3c4646dfbe5afad0849d5a7009f87e5e36ec2fb613bed39faeca4330f255cb57c002a176612
MISC metadata.xml 339 BLAKE2B 216c15e347a9dd6061fa95a90fe2a6b5b14f9dcfe7dce8a36376f28dc1c30bad6ae505247d1a5133bf9d8c1d0d61aa07b0f827f1547d563a5046a40e300896ef SHA512 e4b44855c8acd726e3e43cf79e4706077edb2cbccb955ed70c3fe44ee91ed604a057d8b612e4f3950387ee8c96b3fc77fd8e5696e63b896280a243506c7c8853
diff --git a/dev-db/pg_activity/pg_activity-1.6.2.ebuild b/dev-db/pg_activity/pg_activity-1.6.2.ebuild
new file mode 100644
index 000000000000..2868663364ff
--- /dev/null
+++ b/dev-db/pg_activity/pg_activity-1.6.2.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+PYTHON_COMPAT=( python3_6 python3_7 python3_8 )
+
+inherit distutils-r1
+
+DESCRIPTION="Realtime PostgreSQL database server monitoring tool"
+HOMEPAGE="https://github.com/dalibo/pg_activity"
+SRC_URI="https://github.com/dalibo/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+SLOT="0"
+LICENSE="POSTGRESQL"
+
+DEPEND=""
+RDEPEND="dev-python/psutil[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/psycopg:2[${PYTHON_USEDEP}]"
+
+src_install() {
+ distutils-r1_src_install
+ doman docs/man/${PN}.1
+}
diff --git a/dev-db/pg_top/Manifest b/dev-db/pg_top/Manifest
index 7acc44a00036..1d8ca7daecd1 100644
--- a/dev-db/pg_top/Manifest
+++ b/dev-db/pg_top/Manifest
@@ -1,4 +1,6 @@
AUX pg_top-3.7.0.patch 749 BLAKE2B 26d3d391e33a55b5af857ec3262b5f37e97a64262c050e00d9e0980eb954c100810885f53e27c2e917468b196b8280c705b2ebd41d7420a085bce082498d1cb8 SHA512 e94b14318f22f35fb28de3e0d53e6ff785a36e1eed37fe0f8066a0e0e4adb5c2c280de5c577ba7969715bee594ed2686b41fde0ce2930990064ab80132c760e4
DIST pg_top-3.7.0.tar.bz2 236076 BLAKE2B 87a29d0237aad48b683c17ba56fdbc4a90f854f4f497057ffc978be1797d978f02694781e83d296fca82e03c8bc737f7cfd74e996987eea0bd8d6a66ae433ce0 SHA512 509cd3ce65a9b549097eaab5ae27106fa469cdeb4f37950564654f3df01390e1a771c8fa4f5858c3e4c1e76470b6c0fd9b07e8268564f59285e30bf824d7c4ec
+DIST pg_top-4.0.0.tar.xz 117920 BLAKE2B 5c13fd868804492ccce3b660875602df958f065126f9dc17f45ebcac7961384cd1d3d3313da49832a1219ea7e86ae78cbbdb975467b13b32d5f836f5cd33a443 SHA512 b7a016137495ceecdcf0ac0e95c73b7eca20b57264f7b63b0a38c3f31db742c704ed0094e07f6df051bce9bc26214f5a8f66ced1e923bb66e0c86fff1e2ffc19
EBUILD pg_top-3.7.0.ebuild 621 BLAKE2B 3f411c73e55bdbe3db445d6cb23de24d478d7edeb18e8657da639f73400655eb1dfd95036f469b014ca8e467b02438640a0495ab60697478896735004f15d1f1 SHA512 b78758656bc4e2a1fa702bf2e03f108aa91c7815db10da22a16ca1e6f8939e443577b82d4458f741c991d8742c5d8ebfbf22ca977a638b9e224d1dc425b61564
+EBUILD pg_top-4.0.0.ebuild 402 BLAKE2B ec320225f0864aec216f400496be18d09dbbfa5aa0b8d53fb5f0404e8f3958e5d5b72615011ba611aa2f1b3579f3ec119efe8758c09ae762947360f2de44fd68 SHA512 c7d50617778104a838c287466d374549a73d6a581317043e300805fa6f56b7669e40551866b1a8b34f560f34f1cd024a953825dbc5e715a5473812268c6e09b7
MISC metadata.xml 461 BLAKE2B e6f8d76b546b6b6b6cb13dc1158f71d20f3c68fc9ecc9b37ccf8d8581ec8699e5faab5bd4b10100a0897f668e04449e8f67622e3e3eeb3fdbc54023af536ec0a SHA512 ef6740e37b9d51eb8d303e393d826c91519e8fbd2fe66930486bfbf16bf3bfe09f1a90040a044428841ed61dd6885eefefa2fc9bc43a08e6d4e2dec4a67ba9fc
diff --git a/dev-db/pg_top/pg_top-4.0.0.ebuild b/dev-db/pg_top/pg_top-4.0.0.ebuild
new file mode 100644
index 000000000000..f0d4e2ea16a6
--- /dev/null
+++ b/dev-db/pg_top/pg_top-4.0.0.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="'top' for PostgreSQL"
+HOMEPAGE="https://pg_top.gitlab.io/"
+SRC_URI="https://pg_top.gitlab.io/source/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-db/postgresql:="
+DEPEND="${RDEPEND}"
+
+DOCS=( HISTORY.rst README.rst TODO Y2K )
diff --git a/dev-db/pgadmin4/Manifest b/dev-db/pgadmin4/Manifest
index e007c6d4df8f..659e0dce1fd0 100644
--- a/dev-db/pgadmin4/Manifest
+++ b/dev-db/pgadmin4/Manifest
@@ -3,7 +3,9 @@ AUX pgadmin4.desktop 298 BLAKE2B 9048ee03c9f8e05807f2907fd7dcfda9d76bb3cd3b25676
DIST pgadmin4-4.17.tar.gz 28007097 BLAKE2B d296f2b9372c23067db899fa82e1b8e732837b01a6172dd2d70520f815aafde161715eea9d9d53e7507a6a715dbfdaabf001a10d143c1aa0505237b2b138e334 SHA512 f9e292ba7ff1e5edaa8738188eb01744d69d0eb134700feb0623806425c998e7f298f74cd498a09f2d9a073a9a349c82f7a3f617e1da3c8dd757cc982d941c9f
DIST pgadmin4-4.25.tar.gz 33167393 BLAKE2B 5a40e45c53f79ea66c6f685d1605ddce7b1758540bf3a6863d4b092cc4dab5b00daff15832cd6feee28aa348c7a5376e25a93508fd348d8ffd4d29031e2b6c68 SHA512 a1944f9c65b8aa7ec5bd83ef75702293d869ae341ea73f81fb4358bfbc7f91a6981237eb9f1b20055c5f3fa182428afe19dc170963265789c34d73f2e240c268
DIST pgadmin4-4.26.tar.gz 33525278 BLAKE2B 2a4061f59299bc48b029a4a93f410538170b6c3d97597074d2b3b6eed1de0f9a1ac88bc187614d9e46d8fe872941f173ba0f0a02def590451dad09e6a3b78e5a SHA512 952a4771f80541c54234fcaa9c870283fdf4887246d0d9751a77c28340b7e39ba871141f230086efda9a274d5e6bd567305047cdc7edf766ccd41112281fdf94
+DIST pgadmin4-4.28.tar.gz 35386627 BLAKE2B 6cbee6ccadf3b35e1b0aece2e8fc4b9e35dd04ed70436a3b74d69c09e887499c3a2ab8710d16df3327cd848c3c5ee1fac2cde06facbdc5605673b04a4a4fc434 SHA512 b9e8946e8133b382b9d69126c1ec6fc07a4b2051316c2151c339f15652900fa2bdf0a07811e052548c3f8699e382d8c16d187e89409b194e491148123558522e
EBUILD pgadmin4-4.17-r1.ebuild 3307 BLAKE2B 2f4dab13a9365051abc89e66101bf6b8c93400b3eefb34f53033feb9d6d49321f9e2fcb7c3f58340ab21b1d358006d0a1846a08ce6a26048bde0a4a779cdf131 SHA512 4c80f4f5f243a25aee956ee3230ff6ee9a55e1dce19fcd1c1da91b00b4f16942fdc64815559bfbc873a67f99b6676f463cf923987d7fe039ed8d027b7a64b51a
EBUILD pgadmin4-4.25.ebuild 3545 BLAKE2B 3e716cd6cb3f4fe19d2ffe6f6f8581f6ce9b558df9291c21eec36de684e766373fac11e610585d416911eb097d13310804320fe82985428a14f5fcbfb3c6acaf SHA512 46b1e593c9d10d4d69df656656bd1a5d020698a6e799e06b63f8f27358dfbcac2501ce2d34c55d2448d274aacf6a1a85eb89dea43f6e6113b74f02c6ee77bd8e
EBUILD pgadmin4-4.26.ebuild 3797 BLAKE2B 37f2b12586c1c12d0485673af2f63b5434e79271630c32e7da611d2edcfa044262424387be8449af46548750c084087968bf724991238704f48d25958f0cedf4 SHA512 9b175c0ec000a9d3801093294378004deb289d7c08fae35944d2128fd3b2aa3a2d2979200b684d7f2275fc5383163cdf32676a8f2f04d8801e190797d5d87c6e
+EBUILD pgadmin4-4.28.ebuild 3924 BLAKE2B fea400403695aeb1507ba07615ebde52cd9bd8b23e05eafd734c4b6eb9e837e170777c9af29b0fde2e0e04f351183acbba50970e9e44f267acaa2046859d00ae SHA512 353570463deffe5a45926dac13389d137267b3b642f79ccc46fdf0be243d2162f2b18a7ff407996bb84181d11b2377a13fc5712c86e4ddcf046f1ef603a0536b
MISC metadata.xml 266 BLAKE2B 9d5988ab45f9939f9be5ee7f4b7a9950a3d62252aa0d3e6c953265467428c59fb8c05b2bb72085431b7aa9fc18d31f2b3273e8fdb33443d786b2237db697b7e2 SHA512 9f85990c7ce6a1de5c1067e4781af18bede2d3bd02963a7b2927766b70dbe98d3fb63bb01e19b1cf6e2b77038d9788bf38155b3cc33f9e5ff8430b10a4006325
diff --git a/dev-db/pgadmin4/pgadmin4-4.28.ebuild b/dev-db/pgadmin4/pgadmin4-4.28.ebuild
new file mode 100644
index 000000000000..f795a75bfb27
--- /dev/null
+++ b/dev-db/pgadmin4/pgadmin4-4.28.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_REQ_USE="sqlite"
+inherit desktop python-single-r1 qmake-utils xdg
+
+DESCRIPTION="GUI administration and development platform for PostgreSQL"
+HOMEPAGE="https://www.pgadmin.org/"
+SRC_URI="https://ftp.postgresql.org/pub/pgadmin/${PN}/v${PV}/source/${P}.tar.gz"
+
+LICENSE="POSTGRESQL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RESTRICT="test"
+
+# libsodium dep added because of 689678
+COMMON_DEPEND="${PYTHON_DEPS}
+ dev-libs/libsodium[-minimal]
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5[ssl]
+ dev-qt/qtwidgets:5
+"
+DEPEND="${COMMON_DEPEND}
+ doc? (
+ $(python_gen_cond_dep '
+ dev-python/sphinx[${PYTHON_MULTI_USEDEP}]
+ ')
+ )
+ virtual/imagemagick-tools[png]
+"
+
+# In 4.25's requirement.txt, bcrypt is listed as <=3.17, but upstream's
+# git history shows this is just for compatibility with <python-3.6.
+# In 4.26's requirement.txt, cryptography is listed as <=3.0, but upstream's
+# git history shows this is just for compatibility with Windows.
+# 4.28; requirement.txt: Flask-Security was renamed to
+# Flask-Security-Too. This is still the same dev-python/flask-security.
+RDEPEND="${COMMON_DEPEND}
+ $(python_gen_cond_dep '
+ >=dev-python/blinker-1.4[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-1.0.2[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-compress-1.4.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-gravatar-0.5.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-login-0.4.1[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-mail-0.9.1[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-migrate-2.4.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-paranoid-0.2.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-principal-0.4.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-security-3.0.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-sqlalchemy-2.4.1[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-wtf-0.14.3[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/ldap3-2.5.1[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/passlib-1.7.2[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/psutil-5.7.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/psycopg-2.8[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/python-dateutil-2.8.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/pytz-2020.1[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/simplejson-3.16.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/six-1.12.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/speaklater-1.3[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/sqlalchemy-1.3.13[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/sqlparse-0.3.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/sshtunnel-0.1.5[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/werkzeug-0.15.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/wtforms-2.2.1[${PYTHON_MULTI_USEDEP}]
+ dev-python/bcrypt[${PYTHON_MULTI_USEDEP}]
+ dev-python/cryptography[${PYTHON_MULTI_USEDEP}]
+ dev-python/python-email-validator[${PYTHON_MULTI_USEDEP}]
+ ')
+"
+
+S="${WORKDIR}"/${P}/runtime
+
+src_prepare() {
+ cd "${WORKDIR}"/${P} || die
+ default
+}
+
+src_configure() {
+ export PGADMIN_PYTHON_DIR="${EPREFIX}/usr"
+ eqmake5
+}
+
+src_compile() {
+ default
+ use doc && emake -C "${WORKDIR}"/${P} docs
+}
+
+src_install() {
+ dobin pgAdmin4
+
+ cd "${WORKDIR}"/${P} || die
+
+ local APP_DIR=/usr/share/${PN}/web
+ insinto "${APP_DIR}"
+ doins -r web/.
+ newins - config_local.py <<-EOF
+ SERVER_MODE = False
+ UPGRADE_CHECK_ENABLED = False
+ EOF
+ python_optimize "${D}${APP_DIR}"
+
+ insinto /etc/xdg/pgadmin
+ newins - 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
+
+ local s
+ for s in 16 32 48 64 72 96 128 192 256; do
+ convert runtime/pgAdmin4.png -resize ${s}x${s} ${PN}_${s}.png || die
+ newicon -s ${s} ${PN}_${s}.png ${PN}.png
+ done
+ domenu "${FILESDIR}"/${PN}.desktop
+}
diff --git a/dev-db/pgbadger/Manifest b/dev-db/pgbadger/Manifest
index 1b70c8e60a5e..666de4956386 100644
--- a/dev-db/pgbadger/Manifest
+++ b/dev-db/pgbadger/Manifest
@@ -1,5 +1,5 @@
-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.3.ebuild 454 BLAKE2B f0fde0f81f5af4fe540bfc652b607686b574a0f4edbc4e7ed251421c8962223e8357955da642b525b5dea3fa6ae498c46232502a628df04373b28b52b7da6f8f SHA512 f1140736e8be887d864e7579e0da07b5f4f774ad4ed8bb7993c29173ff87735f02e168be4a1d955cfed9dad795b051f5d65eb773b856c35e613096ce26cc2fce
+DIST pgbadger-11.3.tar.gz 2297407 BLAKE2B 7e0814c570a3e5fbf79132c99e3134ee944c8239b956d4638a144c551a45b1903a27ee730f93e0dd040c3b8b8c3ec7d1b22228bf2390fa1585f8e4907cb9ae90 SHA512 0af40e68391d6cc783c5895eea01d266bdb22672bd9142e6029ec428f68ee13e0d0deaced4cb80ccd5b608bf04a72a9964c95d2cc9ad933c7412dbf888fc788a
EBUILD pgbadger-11.0.ebuild 454 BLAKE2B f0fde0f81f5af4fe540bfc652b607686b574a0f4edbc4e7ed251421c8962223e8357955da642b525b5dea3fa6ae498c46232502a628df04373b28b52b7da6f8f SHA512 f1140736e8be887d864e7579e0da07b5f4f774ad4ed8bb7993c29173ff87735f02e168be4a1d955cfed9dad795b051f5d65eb773b856c35e613096ce26cc2fce
+EBUILD pgbadger-11.3.ebuild 455 BLAKE2B 6b62920d5031e260e17dd2dc7618af09820cb336614ee9b24c3686f56bbd663f6ef5bb89ac28485b832477736eaf0e7e94759bfaa598206828b3e4b5f6fdc1d9 SHA512 d0948c53992a47f919c65c87a7c9f41c40e69e920659e7569519bb2a9d3ed891c762e6bfbf1ec7108917d7c5f1cfd4a3e959e9e9e6ad0fdc9a27575fef20b84f
MISC metadata.xml 413 BLAKE2B 9b4f24620b42d2cf5befbaed7d52ed2e03d4619ebb547d36e207a900fe481a825a5be0a6fac073d7b278076ced053ae9a3c4b5d05597e5fb4d7ea66c1bff7988 SHA512 6bf32dc50ecd2d51d450413500b00773177109ab3ad26d74b458ec902973fa38542dbc65e65fbbe103b4be63589f61c2b9a6ab6ea5492b1954142afc5c2f8f93
diff --git a/dev-db/pgbadger/pgbadger-10.3.ebuild b/dev-db/pgbadger/pgbadger-11.3.ebuild
index 83b95438fda0..012c11ef5f76 100644
--- a/dev-db/pgbadger/pgbadger-10.3.ebuild
+++ b/dev-db/pgbadger/pgbadger-11.3.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit perl-module
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/darold/pgbadger/archive/v${PV}.tar.gz -> ${P}.tar.gz
LICENSE="BSD"
SLOT="0"
-KEYWORDS="amd64"
+KEYWORDS="~amd64"
DEPEND="
dev-perl/JSON-XS
diff --git a/dev-db/pgbouncer/Manifest b/dev-db/pgbouncer/Manifest
index 21cc3109f7c0..1bda9e3354eb 100644
--- a/dev-db/pgbouncer/Manifest
+++ b/dev-db/pgbouncer/Manifest
@@ -8,10 +8,12 @@ DIST pgbouncer-1.10.0.tar.gz 480571 BLAKE2B a0c1dadc48f38cfe0ba2641791b4734da84c
DIST pgbouncer-1.11.0.tar.gz 571414 BLAKE2B 044d7cdf57b352b5b87547a8b96af1eca87e46b1f761bbd31d28a0d5158b52e438325db051ab51849f4e683f6211d0156a5081cc99a1109846085c84be7f72a6 SHA512 2373157f952a39dbb5d9afad7db2eba7459c28bcc302487c3bf15b64dca98940f65c9f7a1d142237f7053b6d2b290eaec15f930a341025f1665b501a26919115
DIST pgbouncer-1.12.0.tar.gz 567465 BLAKE2B 866a877478a417b3854e6e2a724fcd06c04bd94893e5d79f8bf250fa9391407c5b7cd00bf2771af18b162dfd2b7bdced00be15c44ba74cf842e3d98c561991e3 SHA512 017d150f865df231861cda4678963ad7e63a0cd238f5ece5679c920484e01c53ab27af63bf47e6227d66b7dc94b4d59ca41ac49c26f60aba74d40b43cad55664
DIST pgbouncer-1.14.0.tar.gz 578955 BLAKE2B 49e1e22b2fa604410111ac19b7c0c2c15f6739274d642e7100a9988379e828e8546454766ae32edb65ab7299b82693bcec32938621923bfbf99d946f5dc17f4a SHA512 506810c9896a45d67fbc97c3027572278b3857635c222cfaa53b4f3893069cfbee2ec92facd6f387de217bb3170045410b88a7cea09a45686661a2d2ccc85271
+DIST pgbouncer-1.15.0.tar.gz 588042 BLAKE2B 3dac09303e1c86126dd9cb44823c6f3fca4195e3155b360719c736c6e1327cc10d05e7f1e45c08d14c1dd0cb5c074b32263eee3be9e6350db9a8c5cbdfe61aa1 SHA512 5f78018ab80ab8d81f20ef3df1314ffc9557f1c6469d485d11ac822f596e3d4b554743fd9e9fe19b008a8aaf93bcf3673b42a8fb82bbd9611bd735cd2cbb98c6
DIST pgbouncer-1.9.0.tar.gz 469300 BLAKE2B 466f171a49ec9ce9be9a9d3208780cfbff956da7c74ec4332c7104ea537cb47a5cfdc0d80bbd96d233769b6f430f1ad99b623caefa2dc93af7ba336dd0f49514 SHA512 b127f4cb60ca5cdf339da76727918f0a3797a3e0a89f8ed6fdcaa80f3391d2c5bb51e19731915775210c0e5070dd611ee2e410c9a947624e45b5cf11aecdacf9
EBUILD pgbouncer-1.10.0.ebuild 1856 BLAKE2B edb6277234d85c6797c89c07fa68ffb50ec23949155a55a7dccd5c99d454028ee593bbd34770da51be3886e143d9a8241464db586fe0d79a46ff9101107de4ac SHA512 28ea2302c28e746cb4c31a3528cc7329007ac67fd5c860619c350663c731000cd51f4859a7635cbb77916c3a8c817a82931e25e0275ca8854f6790eb32a15a65
EBUILD pgbouncer-1.11.0.ebuild 1859 BLAKE2B 63d383eb450a181d8cdd56c6c2dbfdf1a4e2c5ac66cc24c670fc57f80651b5540664bbfc7435b8f0424c78bab38b87422988157e79b93d1ea3d92596c5afff6e SHA512 bc14e6b213c905bd9db7b69943a3c49a6094e5fb62cfa17465c36336d8ba4f21197b3ddfff33ad43451974af4ff7107dd5ecfcccbaa44f8e5d80c442ca254194
EBUILD pgbouncer-1.12.0.ebuild 1957 BLAKE2B c9f2064bc29a8bce4515ae635ec03039a5a52efa5d56608f3f1a12e6fe2e014a1b22dd73e57dfa261ed29215672f42abaebafda232e94c7291d85ea06e57c842 SHA512 dfe2ef2ea5190456b1eb8af6c66b52ed40fa1b35962ed5a9a630649ade19714fb4e91ed4574196edd47461d1a792318329d92749e7406bf08da80d2502514c28
EBUILD pgbouncer-1.14.0.ebuild 1859 BLAKE2B 63d383eb450a181d8cdd56c6c2dbfdf1a4e2c5ac66cc24c670fc57f80651b5540664bbfc7435b8f0424c78bab38b87422988157e79b93d1ea3d92596c5afff6e SHA512 bc14e6b213c905bd9db7b69943a3c49a6094e5fb62cfa17465c36336d8ba4f21197b3ddfff33ad43451974af4ff7107dd5ecfcccbaa44f8e5d80c442ca254194
+EBUILD pgbouncer-1.15.0.ebuild 1934 BLAKE2B b962a088243f29b5372d67f4723a16df1782c3b7a93df4ee730a21b103232ee94d4d0bb3593602c790ac05970e7ba1d10a56e7875b97d104df0d440ae1767ded SHA512 d2fa96fc8167ac1fcd9c78f2c290fe2c4914942870e2252c801f3d1f563588e6e1cab5d4f4a7b0940e6c02d50a703212cf0944952d9cf2203fdb8a6f64b8344b
EBUILD pgbouncer-1.9.0.ebuild 1859 BLAKE2B 2a734101531a115c4156a0528b0b5a3d3d82f6ee71b285ec588ce7ede59efaea92fac1eb7afce31e3a362f68162c7d87d950d75ce26946a775d1910e4b884cd1 SHA512 62b251daa6ecca0df80eff8893dddcea38807d48820e0d66a7021c49b413b6408616abb38a3aeccccf5a0fe7dc707a715153d6dbf10ef16fe035fbbbe79cb098
MISC metadata.xml 472 BLAKE2B b06a5dca1ee52c85fa1f948c4c8cf6e83c0aba3e0b0bd77672f1585c01d0a2f8ef4d7502e30e9cb658ec3dd3e53560671b69210166c36b4ce888e329f531585b SHA512 b098e87be6194706f462bb93c4bf5425023f7bd90a0ed421a51ea42db98c85ebd77f23eb413f4e271e126ad4404cd0bdf0694f675662c421f7afd8ec0f036b4d
diff --git a/dev-db/pgbouncer/pgbouncer-1.15.0.ebuild b/dev-db/pgbouncer/pgbouncer-1.15.0.ebuild
new file mode 100644
index 000000000000..050a21fdea6c
--- /dev/null
+++ b/dev-db/pgbouncer/pgbouncer-1.15.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit systemd
+
+DESCRIPTION="Lightweight connection pooler for PostgreSQL"
+HOMEPAGE="https://www.pgbouncer.org/"
+SRC_URI="https://www.pgbouncer.org/downloads/files/${PV}/pgbouncer-${PV}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+c-ares debug doc pam ssl systemd -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
+ acct-user/pgbouncer
+ c-ares? ( >=net-dns/c-ares-1.10 )
+ ssl? ( >=dev-libs/openssl-1.0.1:=[-bindist] )
+ systemd? ( sys-apps/systemd )
+ udns? ( >=net-libs/udns-0.1 )
+"
+
+DEPEND="${RDEPEND}"
+
+# Tests require a local database server, wants to fiddle with iptables,
+# and doesn't support overriding.
+RESTRICT="test"
+
+src_prepare() {
+ eapply "${FILESDIR}"/pgbouncer-1.12-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 systemd) \
+ $(use_with udns)
+}
+
+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/phpmyadmin/Manifest b/dev-db/phpmyadmin/Manifest
index d1f6d861a4f5..fb72efb9d7b0 100644
--- a/dev-db/phpmyadmin/Manifest
+++ b/dev-db/phpmyadmin/Manifest
@@ -1,6 +1,6 @@
AUX postinstall-en-3.1.txt 1160 BLAKE2B 0aa21601490830f93a784c1a3c09b90986d606d0086b128b37d6598c946e9ebe43f575f12ca5ee571db8520841a2c08624b567b721567d26ee02e1e3c4c9124e SHA512 7b50ab9f9e3a828bd9bff600550ea97712c28804467ab5900a52710d4adb0581fe33155a965dd3956fcd36cc153b1a18a1f001d88ac52d70c8288faf695f01ec
-DIST phpMyAdmin-4.9.5-all-languages.tar.xz 6138948 BLAKE2B 63631e8207d1cfb71a2299752bb10ab55d13f630ee0d913a4ed6bdf0a16320fa72945bc7c8a63e0e705eb45a569c60fffd48c204eabe1b980a33ab93fac7c798 SHA512 555f07f087d8bcddd114df0b86fa21872f14f45c31e0f63eea499e76fdebdfd8abebcc88662887418e80ddebfea73d6aaac17856cf433d1855423b5145865d1a
-DIST phpMyAdmin-5.0.2-all-languages.tar.xz 8018752 BLAKE2B c7ceb9257cacae61a674b986fcdfacbcf8f77e2ec9f31dd0fc679f748d9042301d8a5d37803c0b1c796095c038e8ac9701b7c5e497ee92331aa672f5044de4d4 SHA512 242770cc468ebcb3ec9c57bce16607a258621014513568b1a96cfea1df4786506c3922250c69f87e058dbf0dd69cf37efda1a810ade88c05d5ef37591cc1b225
-EBUILD phpmyadmin-4.9.5.ebuild 1542 BLAKE2B af6cb3f93f86e2648711b1de713438d200488d355a6e28be6ae44c26a39a47dd9d5aabbb08976b6aaa18535ee6c9c3b2de74d9bf16bd656783977100d1aa1677 SHA512 b40bce5ca7ab774e1cdae3c4978081d42446d6fb610658e9859551919cb606e4d8e827156b8c10d3b2443e75c6068754eb2fa3103bdbae4bdce7116fa8c1dacd
-EBUILD phpmyadmin-5.0.2.ebuild 1553 BLAKE2B df0e530374749ea3d27d81bf9b7636d8f79c525a789ecf34a31c3462de6b2056de5bd6484e166e2bb38b23fb15d9d58ee6d61aff69e02cff8ba20f8f95d1c32d SHA512 916f9600cdc5d93f05f8e260069c1abe10d4dee1552f031092114cf051e1835ef52df2c21a323c493cd46dc60daad843f0ad737ec26a1e32c081d8765b48d799
+DIST phpMyAdmin-4.9.6-all-languages.tar.xz 4978288 BLAKE2B 73f7cf5da8ec55fb39d5ea1c007d640f521c9b4490c820ef3f2660000f37af751d7e9a9d08d04405497b9e69642c53f6b28f5f84b5401e437bcf3419c2d2323b SHA512 4aa35ae627edfcf99af83a30e328b8b9ccdfa129ae9d16c2672ace234aa8a416ad8840af5bc9998e44b9e26b07abd195cfba1b4c784b0bc6509f5e8e548e62f1
+DIST phpMyAdmin-5.0.3-all-languages.tar.xz 6786864 BLAKE2B 737df7cc7c2bdeda89f81d2d5d61857f5f9c0f1e69c4679df6f728c0df8d50fde589971e5e4cd371f2f33d766cdd17cca5580ccb7b75cecb0122ce49dcf52a05 SHA512 e03b0fcd1998570c243a41bcb9e1bf46c1da8fdb99b8e54ba4de3e7e22ff0d847468f16137b011f22eb2ee58d92debd66f2f0ec1b403775aef879a3f8978ebf1
+EBUILD phpmyadmin-4.9.6.ebuild 1545 BLAKE2B f2f856d13816adacd34fb584ace7c6be2e9dbeb33774b5701d20a5678fd38b93d9b3bea34d53a8231f12d05c0427e5ccf882fc89092f55be957900ef5ce97007 SHA512 cb60b10df58b671fc21b2a0544419879feaf6ad7609599eee117a31c7b85edd374a695d7654a2c02c3bbaafb09264adc973e74b54901283f0c4b23c9efb2fae5
+EBUILD phpmyadmin-5.0.3.ebuild 1556 BLAKE2B 989a8394159e188d8c1732c4daf269479cb0853e5e28ac8b74f2b537958209d000839a55b99ea7b881730b38ef1562d214498e98e7d37ca504fce44564d68865 SHA512 b4acf910c9693c42cff68eb04cd8a7c054b34553886b6584399ce042fa0282941f918d81e788d112263c71d50d159975fd5f34d24c88fff0be1821aded606f4a
MISC metadata.xml 701 BLAKE2B aef0a047bca31221714bf27203bd720863c5cef6b7b4dd72b441761a0638bca38c03610e65b3819ca0fba6577973908d7ca40ec8baa3aac1255d19b7cfa9f0a7 SHA512 6dcb099779cd0db4928ee812c81fee762612846044e6ee3df3b661a2dce6aed01420d0bc1301c8ff9d763fb8aeaeef3290a7889b32705fc48e8c392aa8b8ca82
diff --git a/dev-db/phpmyadmin/phpmyadmin-4.9.5.ebuild b/dev-db/phpmyadmin/phpmyadmin-4.9.6.ebuild
index c8b5d687674b..4f82904cb1fa 100644
--- a/dev-db/phpmyadmin/phpmyadmin-4.9.5.ebuild
+++ b/dev-db/phpmyadmin/phpmyadmin-4.9.6.ebuild
@@ -18,7 +18,7 @@ KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ppc ppc64 sparc x86 ~ppc-macos ~x64-maco
IUSE="setup"
RDEPEND="
- dev-lang/php[ctype,filter,json,session,unicode]
+ dev-lang/php[ctype,filter,json(+),session,unicode]
|| (
dev-lang/php[mysqli]
dev-lang/php[mysql]
diff --git a/dev-db/phpmyadmin/phpmyadmin-5.0.2.ebuild b/dev-db/phpmyadmin/phpmyadmin-5.0.3.ebuild
index bcfb741fefec..89a5402f59fa 100644
--- a/dev-db/phpmyadmin/phpmyadmin-5.0.2.ebuild
+++ b/dev-db/phpmyadmin/phpmyadmin-5.0.3.ebuild
@@ -18,7 +18,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~ppc-macos ~x64
IUSE="setup"
RDEPEND="
- >=dev-lang/php-7.1[ctype,filter,json,session,unicode]
+ >=dev-lang/php-7.1[ctype,filter,json(+),session,unicode]
|| (
dev-lang/php[mysqli]
dev-lang/php[mysql]
diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest
index 23469e7de30a..a2c644945395 100644
--- a/dev-db/postgis/Manifest
+++ b/dev-db/postgis/Manifest
@@ -5,11 +5,15 @@ DIST postgis-2.5.5.tar.gz 15936193 BLAKE2B df5d0e51bb5042a72ecd070273c4a87738b2b
DIST postgis-3.0.0.tar.gz 17359802 BLAKE2B aa83bdc2d1950c517f99cbdd877eb7261f6c29ce2cbd9f67f1e606c290080fc3d02ab0b7ceb68ce852e0c0d3d4b7753f03cb5b0921da164ab65d68e23d1df538 SHA512 82c233681fa6444686f9979768e5d6d3a9b6ca9cbd4fc2b14bd0a5d1269a8d0f45ee067e64984077063407c7abc13fa0e37a29928d7ccbfe3a61b694f592bed2
DIST postgis-3.0.1.tar.gz 16839923 BLAKE2B 6888fa49562ab71929e92007de305fd6610c74988faaf08fbeabbf1d13029ebbb5da788826dc63d03ae5c873fbe408ae6c0f108b2975755d2b13bc69bed53558 SHA512 5ebce2303d672bb342f7fae6cade08140c8a687fc38e82e5b41eebb8465cdf3dc7bdbeae53b1179df8112a01842dd65f362fc107b381e2a1fa6e161b77a50227
DIST postgis-3.0.2.tar.gz 16855299 BLAKE2B 99ee872abf52651ab53e4dd6203d99d428d366f60b949fabcae938980f5c17809872e9b23f7ab1f3480a60242e735c926e54122492e1b8966ed8c748eb7c4fe6 SHA512 763d7818d195eca0b07d94a864b13da68e5734ae57b7c93c285dc2d0fa4a155715745e5da67e1a3bca49d8d4f89dc495ed3912c079722290ce9f220afca33f4d
+DIST postgis-3.0.3.tar.gz 16871696 BLAKE2B 891f814271de9193cd17013d6d971a752d2e984cb0f68b05510450adef97fc96827e3d1a1c7e4fa4cf79a5d15eb3f74b32e6e9a8db1947f7bad7c2b23656bc8f SHA512 478f0971e18c2a1bd651c9bf7b995236aad32fda037762505cf8ac9e67a4e40917436248c1e62827a1a6da96c15c4ae8d0b606d548fa080cdff453642b897115
+DIST postgis-3.1.0alpha3.tar.gz 17197128 BLAKE2B f3b777efa8542b82db6031fa77a5728be94689542b45e4515887306cd0ae42cd9d802eae94b07e5a70f308e82fe6afc49a29f43ad2c302d9913f00797118764c SHA512 758b688aa01babc5ac9cc703d3d64fd751639425df7e1a2aa5bb72f1707a8279f87e7b3d84e23f465a51d08787858e0eb54e0afc38039d69ddfe7668e2dce256
EBUILD postgis-2.5.3-r1.ebuild 3173 BLAKE2B b2fa30ecc6cefbd80e56ae55a991484fbb5a114a797d739bafe23467f23be7c76e19f4b307837b517af0e9385630030e1624c42415b59ec62711460b6d70143d SHA512 b3cc79b9b259836bed713d658c1dc0a7c4de95ded55210898329876b4296d9116321bc96637e89c90e2e7c98ddb9cf5151076d3ef66ad62aabd10724b3638eee
EBUILD postgis-2.5.4.ebuild 3195 BLAKE2B 55cbf1823a6c2f04a1ee11b5e9506db868ee2f1a4ef47ce703b9effef47c476ae2ff1f28ad436ec4aa80675259b327fb007fcb8744fb12421cff6ca157c2c5b1 SHA512 28f1e5c505992c3ddc7fa7947e4e699672a46acde36363bb76abc4ec1b3f3add7028878767877aa541fc4fcb36bfac80928c57865cfdf5f4e1b5237c55e71d9d
EBUILD postgis-2.5.5.ebuild 3195 BLAKE2B 55cbf1823a6c2f04a1ee11b5e9506db868ee2f1a4ef47ce703b9effef47c476ae2ff1f28ad436ec4aa80675259b327fb007fcb8744fb12421cff6ca157c2c5b1 SHA512 28f1e5c505992c3ddc7fa7947e4e699672a46acde36363bb76abc4ec1b3f3add7028878767877aa541fc4fcb36bfac80928c57865cfdf5f4e1b5237c55e71d9d
EBUILD postgis-3.0.0-r1.ebuild 3201 BLAKE2B 099dcddb6188239cd7738cb265e73e5b218265aec531e957b5db791149a5c8e3c3bd425b3a169fafdd451028ba29b21cdfa3031bad8f6b78958f1131ae2958b1 SHA512 0b343e8a7e6afdd0bc5d999a44f1f117eac7191360af83c535dd476408a4661aff61da697e0d48098e4e7403821402405a43e81ff2df5afa2d5163c2d0361e63
EBUILD postgis-3.0.1.ebuild 3191 BLAKE2B 90839e4df5c915d0450e9e7943bd6a87dcf48c27760d3ebac75a826720099b2e0e0044dfbe932225aba8e80abc3b5211173709252d6779e75bbd80507204e7f5 SHA512 4680c28c2f38b9a1c812121ce8fe9df171042bb19bc790abf92a9d0401ad7c58c4118721d6a0cd345d22d33332ebc0d72941fc7bd825e5781382e957d2ce90ec
EBUILD postgis-3.0.2.ebuild 3191 BLAKE2B 6c97ff25a22159ab9bda13f8014aa626a650bede7a4bc9a649c9c21f086f2d1f4b0f936f8e38c3025c75dab236fea876eff86a230173d7f8683a952b0ca64c4d SHA512 7f8dd7a7b0e14700d02061e13cdec5b5028606e3000743946a2f9e8936cde51990d41fd655d80ffd6604642451a7db29525c161a4da191b003dde7cf17e70f84
+EBUILD postgis-3.0.3.ebuild 3191 BLAKE2B 6c97ff25a22159ab9bda13f8014aa626a650bede7a4bc9a649c9c21f086f2d1f4b0f936f8e38c3025c75dab236fea876eff86a230173d7f8683a952b0ca64c4d SHA512 7f8dd7a7b0e14700d02061e13cdec5b5028606e3000743946a2f9e8936cde51990d41fd655d80ffd6604642451a7db29525c161a4da191b003dde7cf17e70f84
+EBUILD postgis-3.1.0_alpha3.ebuild 3156 BLAKE2B e7f38e0deba338fa32c88b2d53c2af0d2d01d4ed3b2f181c8fe66bf9b4a81306c88abce907366bb18be84f1216dba876bc23b8c52bbcffcb158f778659c2edb5 SHA512 d2d305c28b3da070bf30732d8f54c86ee5e10397c423b2dc1539564aba2d1167520b9e5cb1bf80347a13c8c92028c19bfc04d28538e534aa47629c1b6028824b
EBUILD postgis-9999.ebuild 3201 BLAKE2B 099dcddb6188239cd7738cb265e73e5b218265aec531e957b5db791149a5c8e3c3bd425b3a169fafdd451028ba29b21cdfa3031bad8f6b78958f1131ae2958b1 SHA512 0b343e8a7e6afdd0bc5d999a44f1f117eac7191360af83c535dd476408a4661aff61da697e0d48098e4e7403821402405a43e81ff2df5afa2d5163c2d0361e63
MISC metadata.xml 779 BLAKE2B 9dfbc86514c5f6e0c859dc41a46890e4f518f23c572786bf340112eadf21b35f5f583a3835f6ba58bef8c99a7ef8483f3a98898d372d1c0e5cc537bb9ecc2b12 SHA512 33ad2ddabf49e97af2cf188f2c0f72e1a936c228b43d8d3637230c43be0df82ec2aa20b63cb5f2385e936c215263fcd009332afe504bc5f30746a387b9b37ada
diff --git a/dev-db/postgis/postgis-3.0.3.ebuild b/dev-db/postgis/postgis-3.0.3.ebuild
new file mode 100644
index 000000000000..3e05e061edf1
--- /dev/null
+++ b/dev-db/postgis/postgis-3.0.3.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+POSTGRES_COMPAT=( 9.{5..6} {10..13} )
+POSTGRES_USEDEP="server"
+inherit autotools postgres-multi
+
+MY_P="${PN}-$(ver_rs 3 '')"
+
+if [[ ${PV} = *9999* ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.osgeo.org/gitea/postgis/postgis.git"
+else
+ PGIS="$(ver_cut 1-2)"
+ SRC_URI="https://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+fi
+
+DESCRIPTION="Geographic Objects for PostgreSQL"
+HOMEPAGE="https://postgis.net"
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="address-standardizer doc gtk static-libs test topology"
+
+REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}"
+
+# Needs a running psql instance, doesn't work out of the box
+RESTRICT="test"
+
+RDEPEND="${POSTGRES_DEP}
+ dev-libs/json-c:=
+ dev-libs/libxml2:2
+ dev-libs/protobuf-c:=
+ >=sci-libs/geos-3.6.0
+ >=sci-libs/proj-4.9.0:=
+ >=sci-libs/gdal-1.10.0:=
+ address-standardizer? ( dev-libs/libpcre )
+ gtk? ( x11-libs/gtk+:2 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ app-text/docbook-xml-dtd:4.5
+ dev-libs/libxslt
+ virtual/imagemagick-tools[png]
+ )
+ test? ( dev-util/cunit )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-2.2.0-arflags.patch" )
+
+src_prepare() {
+ default
+
+ if [[ ${PV} = *9999* ]] ; then
+ source "${S}"/Version.config
+ PGIS="${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}"
+ fi
+
+ # These modules are built using the same *FLAGS that were used to build
+ # dev-db/postgresql. The right thing to do is to ignore the current
+ # *FLAGS settings.
+ QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
+
+ local AT_M4DIR="macros"
+ eautoreconf
+
+ postgres-multi_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-protobuf # funky misdetection if enabled but --without-protobuf
+ $(use_with address-standardizer)
+ $(use_with gtk gui)
+ $(use_with topology)
+ )
+ postgres-multi_foreach econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ postgres-multi_foreach emake
+ postgres-multi_foreach emake -C topology
+
+ if use doc ; then
+ postgres-multi_foreach emake comments
+ postgres-multi_foreach emake cheatsheets
+ postgres-multi_forbest emake -C doc html
+ fi
+}
+
+src_install() {
+ postgres-multi_foreach emake DESTDIR="${D}" install
+ postgres-multi_foreach emake -C topology DESTDIR="${D}" install
+ postgres-multi_forbest dobin ./utils/postgis_restore.pl
+
+ dodoc CREDITS TODO loader/README.* doc/*txt
+
+ docinto topology
+ dodoc topology/{TODO,README}
+
+ if use doc ; then
+ postgres-multi_foreach emake DESTDIR="${D}" comments-install
+
+ docinto html
+ postgres-multi_forbest dodoc doc/html/{postgis.html,style.css}
+
+ docinto html/images
+ postgres-multi_forbest dodoc doc/html/images/*
+ fi
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
+
+pkg_postinst() {
+ ebegin "Refreshing PostgreSQL symlinks"
+ postgresql-config update
+ eend $?
+
+ local base_uri="https://postgis.net/docs/manual-"
+ if [[ ${PV} = *9999* ]] ; then
+ base_uri+="dev"
+ else
+ base_uri+="${PGIS}"
+ fi
+
+ elog "To finish installing PostGIS, follow the directions detailed at:"
+ elog "${base_uri}/postgis_installation.html#create_new_db_extensions"
+}
diff --git a/dev-db/postgis/postgis-3.1.0_alpha3.ebuild b/dev-db/postgis/postgis-3.1.0_alpha3.ebuild
new file mode 100644
index 000000000000..36cb7623ef8f
--- /dev/null
+++ b/dev-db/postgis/postgis-3.1.0_alpha3.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+POSTGRES_COMPAT=( 9.{5..6} {10..13} )
+POSTGRES_USEDEP="server"
+inherit autotools postgres-multi
+
+MY_P="${PN}-$(ver_rs 3 '')"
+
+if [[ ${PV} = *9999* ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://git.osgeo.org/gitea/postgis/postgis.git"
+else
+ PGIS="$(ver_cut 1-2)"
+ SRC_URI="https://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
+ KEYWORDS=""
+fi
+
+DESCRIPTION="Geographic Objects for PostgreSQL"
+HOMEPAGE="https://postgis.net"
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="address-standardizer doc gtk static-libs test topology"
+
+REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}"
+
+# Needs a running psql instance, doesn't work out of the box
+RESTRICT="test"
+
+RDEPEND="${POSTGRES_DEP}
+ dev-libs/json-c:=
+ dev-libs/libxml2:2
+ dev-libs/protobuf-c:=
+ >=sci-libs/geos-3.6.0
+ >=sci-libs/proj-4.9.0:=
+ >=sci-libs/gdal-1.10.0:=
+ address-standardizer? ( dev-libs/libpcre )
+ gtk? ( x11-libs/gtk+:2 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ app-text/docbook-xsl-stylesheets
+ app-text/docbook-xml-dtd:4.5
+ dev-libs/libxslt
+ virtual/imagemagick-tools[png]
+ )
+ test? ( dev-util/cunit )
+"
+
+PATCHES=( "${FILESDIR}/${PN}-2.2.0-arflags.patch" )
+
+src_prepare() {
+ default
+
+ if [[ ${PV} = *9999* ]] ; then
+ source "${S}"/Version.config
+ PGIS="${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}"
+ fi
+
+ # These modules are built using the same *FLAGS that were used to build
+ # dev-db/postgresql. The right thing to do is to ignore the current
+ # *FLAGS settings.
+ QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
+
+ local AT_M4DIR="macros"
+ eautoreconf
+
+ postgres-multi_src_prepare
+}
+
+src_configure() {
+ local myeconfargs=(
+ --with-protobuf # funky misdetection if enabled but --without-protobuf
+ $(use_with address-standardizer)
+ $(use_with gtk gui)
+ $(use_with topology)
+ )
+ postgres-multi_foreach econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ postgres-multi_foreach emake
+ postgres-multi_foreach emake -C topology
+
+ if use doc ; then
+ postgres-multi_foreach emake comments
+ postgres-multi_foreach emake cheatsheets
+ postgres-multi_forbest emake -C doc html
+ fi
+}
+
+src_install() {
+ postgres-multi_foreach emake DESTDIR="${D}" install
+ postgres-multi_foreach emake -C topology DESTDIR="${D}" install
+ postgres-multi_forbest dobin ./utils/postgis_restore.pl
+
+ dodoc CREDITS TODO loader/README.* doc/*txt
+
+ docinto topology
+ dodoc topology/{TODO,README}
+
+ if use doc ; then
+ postgres-multi_foreach emake DESTDIR="${D}" comments-install
+
+ docinto html
+ postgres-multi_forbest dodoc doc/html/{postgis.html,style.css}
+
+ docinto html/images
+ postgres-multi_forbest dodoc doc/html/images/*
+ fi
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
+
+pkg_postinst() {
+ ebegin "Refreshing PostgreSQL symlinks"
+ postgresql-config update
+ eend $?
+
+ local base_uri="https://postgis.net/docs/manual-"
+ if [[ ${PV} = *9999* ]] ; then
+ base_uri+="dev"
+ else
+ base_uri+="${PGIS}"
+ fi
+
+ elog "To finish installing PostGIS, follow the directions detailed at:"
+ elog "${base_uri}/postgis_installation.html#create_new_db_extensions"
+}
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index d3d9a44c0742..e4a97c2fab5e 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -1,3 +1,4 @@
+AUX postgresql-10.0-icu68.patch 606 BLAKE2B ebe222879ddd0e97da8762ad85994beced0d706d2db140db9b3e588951f485763f698d70a8ff4e4bbfe1d66f8762bf3d329bc97aaa70bf5b36f0e2e72e53a508 SHA512 1c3c994c79155845d6b3d1a92df002d4127fc576eb837f892aef0ba2e0b914d107c35656f9e5946084892693054cb935e85eb5902be2296fd04c7cf958ba98ea
AUX postgresql-10.2-no-server.patch 3117 BLAKE2B 399e295e393aa84aeaefbe236bf63e091414c9f3d9238ef8f4af3ec955cc0ded6324f4241ee4e78ee1aa775524768f65b15d5064cf4330f5b3149bed2e13aad3 SHA512 1888985a0fa67241b18d3c21c1ededc34666c55f6f4f3806efbe4dcb5a2e30d6d08c955a3bbcc52f589bc5bb857d1c09bd82b555069637a71afe9062994199fd
AUX postgresql-11_beta1-no-server.patch 3080 BLAKE2B 29d4f5d8e26e9360490876d2d51cb29cc340128fe77c0bd76248073157c9e5be09c788cc4344e09c0c2bf2f57e274d5f31f211d1950ee3f47660dfdc4cb7b455 SHA512 42c39e602a019d1d44c39795904fb37a7f14b4623fa90b066f4f26a743d80b6eeaef2e8c7de4c47dddf53d7e89cbe5a2a3473b456ddc76fc0e96f57ff6a9df69
AUX postgresql-12.1-no-server.patch 2965 BLAKE2B 168f39c02f0614c57a60c0ce3bb540e0d29dc407c569661d0cd29ddb57657bfada44aa90ca915c8474ca5541ac1f4cc152fbd70c105efcbe83f9e5b9f918eeb5 SHA512 5e025da1cb5f696821b19093ab893667426a08b1bbc8e3f748d34207730026625b61a8cfd2596af124080a4a292363546dce5b703ce6164efceceabc6b170aa2
@@ -10,17 +11,17 @@ AUX postgresql.init-9.3-r1 4999 BLAKE2B f2bc23a51b6d9643bbc14320aaa9c41b7eb1df86
AUX postgresql.service-9.2 1666 BLAKE2B d4b81415539db3d78e0f5908185f903b70966ce3a27feed9bdf80eb6a9065ca6bd4b49e4bb822c41548b7efa9de37656378c395a8bd00a7a3daaa52911a2f674 SHA512 8c64b59f1e80096382a7166e1e8f183a5b9cf14c75138c15a39de74b983bfbed2f41cf9b33b2c72c3b9c79130c10104836a3505c96cb18ac1be1297c0fce1af0
AUX postgresql.service-9.6-r1 1477 BLAKE2B 2a652d5b2892f3a52f484fcc0b4f4dad09cf4b46c3739c3f805072040a26128cb2ad9a25d4a7c9f109a95696d739538d379af6bac53c656f5c41af45b6110de5 SHA512 9e2b04923f6ebec1424c0f276c58a6a0c4933f2de5e2a9776169227729afd06ce5284461be8b6ed70e5aaff2a68b9f96c6893d867d35761c9977f9847ccfe93d
AUX postgresql.tmpfiles 39 BLAKE2B 25a5725af53c8e4e4009887e998172dd863ce218a5438351194548c4fc8ea15308dfba3602d5a922cf49b46015198268a4a4528119d8a74dcef4cc4c1767c052 SHA512 498060f2a597cf374f4fb31deaa2d6c5b00edef68efc0e71b82bfc20b717ae12518ba18fcb455a0c518ebba1a0868f38321470616151d02fa79b889a66dcb9f8
-DIST postgresql-10.14.tar.bz2 19042154 BLAKE2B addddf00179190780bd30ed97cf6881670d18fda77062cdb5dc7cc161c64c3d5522db288902d0612db30fc6fcc1b619c7a102887ed438e27739e936bf5659425 SHA512 eecd2aa8df7e4779606ec547b7bf0207ebb2be10a4b332f06c3b72116f0619fe27fb651f2fd4504c73b740ab7f92468919244a615d460bb9c35085174a0dbc78
-DIST postgresql-11.9.tar.bz2 19959019 BLAKE2B 655d1c9e6eebde19402a4c220ee674c589641c5b6f4e6298c8c06d3330069178952455f5af58f90b9af196ba9c8fd03db0ccd70b8bc49335e465f0ed537eaf59 SHA512 2c5c2f51aa01f02af4aa0849441767383e30fef69dd52efa442892f39d2456bfa8bf01f633a265e00eca0745e792609d2c1d33f77d8f29a02f5f374c84f2bf6e
-DIST postgresql-12.4.tar.bz2 20669776 BLAKE2B fb3f865a8a5e5280e7cc5da43f8658029170cd15dae8cc5fb1e741a122ea1f13418ac7743ec417ab4436976bc0ce12753fc8a301200143c975e8739d59816fa7 SHA512 36daf10878ca153370829178786dd6ee366ab4d4d6dc9c527536740fdb14b688ae4c33f850eb4243a7667d23f87e4bfd1ddee0755447ad4f3996e423e391c2f3
-DIST postgresql-13.0.tar.bz2 20999465 BLAKE2B c2c6475ad3c1c79afac1bc181ae3f9b74c097f9679bf562a0f1b4e16f426c9b0235aec476582ef548d14987a9232b938f2920446a8d5a8aa08ae5752f40481f2 SHA512 1fde89487c3e50a7a07e1d42fba60d415645ea89c5d4c5c7fcc93fbd5330feca7ec991d5b274f6ab757d5d04667ca1a7efdf4eaaa760add19d2e02437465f8f5
-DIST postgresql-9.5.23.tar.bz2 17682366 BLAKE2B 74713d6483ae1ad3d2dfc4b1ac9d30a6785ff34f61b735924f2d469861516ad5160cbfda9c09b96adf264237b6f3ad8fd6ddeef60b6af6b5b63d6c1a36fb9354 SHA512 b7a1e936a0043b57b3ece79610855820d2ea6a86e4a4be0c4c8358bf3e1ef8fa88bc60106d6b865d86231d16b5e3c098b4dbd93125a125b3cc5d468ffea64db1
-DIST postgresql-9.6.19.tar.bz2 18880036 BLAKE2B ad9c5684e2c0fb276589560f7dbe01241b5caf763f5a20991244ad7b473397576c9530658eb91e085e8416156b0ac81750f08ed85d5e5a689321891d10b6e114 SHA512 4d8d4a0e4645d71683a5fccb9cd88917e1870ba139f102e0ea82da9c8d1ad669f029e0feb6d409e2016dfd247229ec7daf04f7f2de3ab6c5b4053834ac244a26
-EBUILD postgresql-10.14.ebuild 13539 BLAKE2B 79ca887021d2bbc53b2e6a2ac201cdd8dde5b43a042608f609cbdfe3bf41b4b8410357fa1de6ea10cff6666ac8a2e6f9afb9838e096f92eca127c6a924b1a816 SHA512 c6c95f2e4a0c538eaab7969c3abae90056ee74eab6da639819d4e0b3b43c517df46e32bfe2afbeacf9ff99a74e682eaa3cbdd45ac3c2d00a9249e4e4569b3ed2
-EBUILD postgresql-11.9.ebuild 13670 BLAKE2B cbfeb229e65b864add0f5282ea9e5b38ad48dd837b4df4d18a7fab4ddd1eb7e5a67423207237043a9865e5433161a0e9386f587d617be78e064faea0ec6f2ae2 SHA512 d657eb9925c54a4e0dc5ff9b1f5397eff267ab45b5b526f5776006c1afdc7a7d323f612c5198b46cdf28092fdcb0b27e1cfdd23491b5d3a01a9772081aff85ed
-EBUILD postgresql-12.4.ebuild 13642 BLAKE2B 62b40b236c8e2ae78224868ff4d42dbf195fb6f0f2864b528dbdadf91529bbd71b03dac89899f336b9858e1e574c057729afbc0a5e122534c08d6d2ddda6c2b9 SHA512 83964ccf386a54ecd86bae1e3ec75650a45eccd3f1b0db7dc5bfcf6cab20a3dc216a053a25c312cff6df23586211f3482ce665a10a1c6509db1563d5b448343f
-EBUILD postgresql-13.0.ebuild 13654 BLAKE2B cb1a2882dcc848dd1706006f35d0362715f6be1079eb9482cfd656d028aad9d19a80b17deb8bad410a5ac830222cb23a6e5d59781f19c19496e2976525e6b7a5 SHA512 e14cd8831c4d1e7f9c605001dc5b6858d09c9e865a0cfc1237d48ea162ddd07615d91151fadf70382ddb03167c63759e0738725b921e2fab27dc68c4d4ba6647
-EBUILD postgresql-9.5.23.ebuild 14360 BLAKE2B 5737e94065f6efecdf7d43298c071fedd1281d484ebbf7a77731d3de68e5920e69a36581d6b43634c5d8805724688668cce9d4550e8235e22d85025fb99c245b SHA512 be18fb31727ae3f0796f3a0fd9ff0c272be7fbcd0f7a287b94caa18c781f6aa0be1e36b3a4b926fca8c789405d5ac84af8c55c14198c4aac735f8203c0eb633a
-EBUILD postgresql-9.6.19.ebuild 14593 BLAKE2B 41614372b80c5691822bd59a02f66b93139eebc3f49421237660643b8690baec26c0466b38bca1a502108d220659a01a10ebc45d729412c3dd83bb3ebe3fe8c5 SHA512 a2ffcfcbed1637c78ebae251a272d49b6730a37137aaeb7ea9a9958b0644e958033243a2d8a35a0a9bc5eda5b86a7761fabe8068a44f0f8498c48c68acc15e18
-EBUILD postgresql-9999.ebuild 13812 BLAKE2B f0eb8f0d79c3d4d9f0bdd0fe49f9b8354ce0bbd237b286e1509b9d9573cb6c023a855c10c97d836909495a0e23fc785716820e6e54e86b0f31765e0aef53a645 SHA512 3e56a9b619e4a94658035121d71a5e86c115f7dd3a13318ff0b6c341b59ad0cb836376b7f0074a3e28e7b17f93c3e2b9317a6662de19f77d6f6c4e6b4bc1066b
+DIST postgresql-10.15.tar.bz2 19089779 BLAKE2B 3b1b30fca0253122aa20eb3fc0cac0b022379b0f0daded46d3295e76167c0063698226198bc905bed5b689a71f4dd2bab5795861207767c2091f037a2b0e9663 SHA512 88fe322a8691692f8c1b8ca7f7a5a035c399c1d2a0e6276b60863f2c0cb8e4857b041d7364641e0738438aee0836688e712b9c176ac454ee98386dfd18754636
+DIST postgresql-11.10.tar.bz2 20003842 BLAKE2B 21446b5e9202c84dad4d6c768f16aab539e656d0a836121343ca4051269845a9ef06859ea37dab09030467336599eb1b72175115d61ca965ed74b7c2fed9ffbf SHA512 0cc0e9b0f76e00727dc699ea59a45d760d37d91ec736a62cbc9bda3e38eb1ef1565e4e399dd3ae96bad87f866e56e364f916de7740d8be6e1cfc2bf654dfbb68
+DIST postgresql-12.5.tar.bz2 20729654 BLAKE2B 7f7458346a0823d155f5caea0061aa14048d6f3cac27b1ea23dba03b02a39f39314ad1d44e589520d5e287004ffd32e042fea99ebfeda24b2cc23867b402d336 SHA512 9895bcb1bb26206500666ab4441e663ef83702d428b85a6ff177a4eaf44b0ae06b35d5c4da2672ccb4ec18296649af95bf2f0aed526afaa6a216a8c2d2c5627e
+DIST postgresql-13.1.tar.bz2 21034192 BLAKE2B 609ac10f87da800754223c7f7d6b02efa3ed1308a5d27cc793c937be983f4041576e20de3b2efe514e3f61dc863e6212ec01d73adb93f6bcc373a596b2946675 SHA512 b7bd378db1dcb74ebcd5fffba03b82d8117d182029e4caca48eef62d8bcdbeef2c2e10f18eef0cdafb9d7acf21aa164d040e56687709f97b08c51540a786eeca
+DIST postgresql-9.5.24.tar.bz2 17881872 BLAKE2B b86019c4616142a0f5a8db3d00422e16181650d1e1ba755bf6453b76e50b3feff75d7319839ee6f28949d743e46bbdaea32fa3d51f39dd4b4439c88943665d6d SHA512 6e649cd31f2761e2d070d8028b59a690ad76ff3d83a3aa982c4b222c8ea2927fda5e8f473330526673e27ad4b3cc99e8c66810e097c3dfc6517571405c6aede3
+DIST postgresql-9.6.20.tar.bz2 18944478 BLAKE2B 46c7b27ca60f967f71984d6b747c3054ae6ef4acdcbcd14cfbe3c1ede32a9303b99911e521ed0aa2ba6f899c0d8b9ec03e4e6804379ea6e2371a696f32a6f867 SHA512 6d247e5640a515fa6e6a4c68a992c83aeb19e35924b8e3d21191b3289200766588d1426c5863a13bfc4a11944da3202df9efebc94460d16454c29e5a79384c75
+EBUILD postgresql-10.15.ebuild 13624 BLAKE2B f45bccb381be1c4ff728b8c04778eaa936c9b90275afb48e885065c175d01bce54c157007427e996851070dfa0bbc3926af0a5eb91d7bee90ed0beb44081b9fc SHA512 043bf014648cdd7f5145a9eb18616ed1d120fc209dc19b18156cf5fef106887df0cc5cc12739ab4ba43664088cc2b6866a4720aadc1b02f90be9840600db7cc1
+EBUILD postgresql-11.10.ebuild 13755 BLAKE2B 397f66c62b76b11667dd47c5968c409347388e63fcbc05244f6be25b15ea9ec6a993281b487f37776f2a297d0d8381197d99ede25927fac9cb10f435c42d4db2 SHA512 550f4938ee6909cab7213f9b76ba3359db1606104af4966d0d5d23ab8c2d5d3b877ffb116a7f26bcdd7a25a4dda8fe66220b9e88d41f6b58ba95412d09faf9a5
+EBUILD postgresql-12.5.ebuild 13727 BLAKE2B cd7bc2d88bb24546eca15495eb368c1baae25c4a1d8cf35d4276a6d599966a1f90d495e26074b32d06d63248b26aec2b9ea4f197a945ba390635da983acbf50c SHA512 c4e9b06d3f3f51509bc7f0ccec744d1af8d61c1c969a02d81e7725b0ad9daf0ad3f40ec670a01800dda5c7ae06442c62ad2ff15153695444c176767b935488ae
+EBUILD postgresql-13.1.ebuild 13981 BLAKE2B c99c02c02de0fc3a2cca7a7adbebc142de7467cbaa4056e48365c92eeb435259fe923b06aa209405088fe26d9378e570428bfb50397e13feada03ee3eae0628c SHA512 feeae61aa22cd50615e43a68d3704c5b07fe1fc63815539dc0c74d3ee775e775ea391ab29f4849a23fe86d7bd4173c36e7411dc868e63f12813932d06cb4ec33
+EBUILD postgresql-9.5.24.ebuild 14360 BLAKE2B 5737e94065f6efecdf7d43298c071fedd1281d484ebbf7a77731d3de68e5920e69a36581d6b43634c5d8805724688668cce9d4550e8235e22d85025fb99c245b SHA512 be18fb31727ae3f0796f3a0fd9ff0c272be7fbcd0f7a287b94caa18c781f6aa0be1e36b3a4b926fca8c789405d5ac84af8c55c14198c4aac735f8203c0eb633a
+EBUILD postgresql-9.6.20.ebuild 14593 BLAKE2B 41614372b80c5691822bd59a02f66b93139eebc3f49421237660643b8690baec26c0466b38bca1a502108d220659a01a10ebc45d729412c3dd83bb3ebe3fe8c5 SHA512 a2ffcfcbed1637c78ebae251a272d49b6730a37137aaeb7ea9a9958b0644e958033243a2d8a35a0a9bc5eda5b86a7761fabe8068a44f0f8498c48c68acc15e18
+EBUILD postgresql-9999.ebuild 14055 BLAKE2B 5b0143afed6634552561adff30f858e8ce2af41c3aec395856a13701465fcc0a8c1ceb66526ddc1795bb10976bb31726702fa45acfb65db2ec9199b476271873 SHA512 395dd97cc70928dc46943da16311d61e70a894a53ce436dd068b9df1a54d791c80033dff47c86f5c21183507d65cbc01306d6f06e69ff03ec5bb218d3142536e
MISC metadata.xml 715 BLAKE2B 71b868113676bdbb1996ecc8e3727b0cc16a559c5906e6459a41c330bcb5a5f4b3f4b5c4473a81905713c2f0735f185cd14612c69108b6bb602a7d8a92d6f3ce SHA512 4148c9c11ffaea5d30cd18befb06af914147d41eec4a8f905127f0abc5317ca370a745e0fd51b03c4583efde927fe9c1b3333853e80c2aa3e7677de65cd5d1ba
diff --git a/dev-db/postgresql/files/postgresql-10.0-icu68.patch b/dev-db/postgresql/files/postgresql-10.0-icu68.patch
new file mode 100644
index 000000000000..789e47f746ae
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-10.0-icu68.patch
@@ -0,0 +1,12 @@
+diff -rupN a/src/backend/commands/collationcmds.c b/src/backend/commands/collationcmds.c
+--- a/src/backend/commands/collationcmds.c 2020-11-07 08:03:24.122756440 +0300
++++ b/src/backend/commands/collationcmds.c 2020-11-07 08:04:18.168901199 +0300
+@@ -464,7 +464,7 @@ get_icu_language_tag(const char *localen
+ UErrorCode status;
+
+ status = U_ZERO_ERROR;
+- uloc_toLanguageTag(localename, buf, sizeof(buf), TRUE, &status);
++ uloc_toLanguageTag(localename, buf, sizeof(buf), true, &status);
+ if (U_FAILURE(status))
+ ereport(ERROR,
+ (errmsg("could not convert locale name \"%s\" to language tag: %s",
diff --git a/dev-db/postgresql/postgresql-10.14.ebuild b/dev-db/postgresql/postgresql-10.15.ebuild
index a0d0ae70a56a..ccd03770937c 100644
--- a/dev-db/postgresql/postgresql-10.14.ebuild
+++ b/dev-db/postgresql/postgresql-10.15.ebuild
@@ -110,6 +110,9 @@ src_prepare() {
die 'PGSQL_PAM_SERVICE rename failed.'
fi
+ # https://bugs.gentoo.org/753257
+ eapply "${FILESDIR}"/postgresql-10.0-icu68.patch
+
eapply_user
}
diff --git a/dev-db/postgresql/postgresql-11.9.ebuild b/dev-db/postgresql/postgresql-11.10.ebuild
index f49a3c2de54f..2c2d6218bcb0 100644
--- a/dev-db/postgresql/postgresql-11.9.ebuild
+++ b/dev-db/postgresql/postgresql-11.10.ebuild
@@ -111,6 +111,9 @@ src_prepare() {
die 'PGSQL_PAM_SERVICE rename failed.'
fi
+ # https://bugs.gentoo.org/753257
+ eapply "${FILESDIR}"/postgresql-10.0-icu68.patch
+
eapply_user
}
diff --git a/dev-db/postgresql/postgresql-12.4.ebuild b/dev-db/postgresql/postgresql-12.5.ebuild
index 88a1f960cb28..d1b15a8f3102 100644
--- a/dev-db/postgresql/postgresql-12.4.ebuild
+++ b/dev-db/postgresql/postgresql-12.5.ebuild
@@ -111,6 +111,9 @@ src_prepare() {
die 'PGSQL_PAM_SERVICE rename failed.'
fi
+ # https://bugs.gentoo.org/753257
+ eapply "${FILESDIR}"/postgresql-10.0-icu68.patch
+
eapply_user
}
diff --git a/dev-db/postgresql/postgresql-13.0.ebuild b/dev-db/postgresql/postgresql-13.1.ebuild
index 36cc823987e9..d40e0d61ff5c 100644
--- a/dev-db/postgresql/postgresql-13.0.ebuild
+++ b/dev-db/postgresql/postgresql-13.1.ebuild
@@ -111,6 +111,9 @@ src_prepare() {
die 'PGSQL_PAM_SERVICE rename failed.'
fi
+ # https://bugs.gentoo.org/753257
+ eapply "${FILESDIR}"/postgresql-10.0-icu68.patch
+
eapply_user
}
@@ -443,8 +446,12 @@ pkg_config() {
src_test() {
if use server && [[ ${UID} -ne 0 ]] ; then
+ # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
+ # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
+ local old_ctype=${LC_CTYPE}
+ export LC_CTYPE=${LC_COLLATE}
emake check
-
+ export LC_CTYPE=${old_ctype}
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
else
diff --git a/dev-db/postgresql/postgresql-9.5.23.ebuild b/dev-db/postgresql/postgresql-9.5.24.ebuild
index acc5e9779fd6..acc5e9779fd6 100644
--- a/dev-db/postgresql/postgresql-9.5.23.ebuild
+++ b/dev-db/postgresql/postgresql-9.5.24.ebuild
diff --git a/dev-db/postgresql/postgresql-9.6.19.ebuild b/dev-db/postgresql/postgresql-9.6.20.ebuild
index b36d51b81cea..b36d51b81cea 100644
--- a/dev-db/postgresql/postgresql-9.6.19.ebuild
+++ b/dev-db/postgresql/postgresql-9.6.20.ebuild
diff --git a/dev-db/postgresql/postgresql-9999.ebuild b/dev-db/postgresql/postgresql-9999.ebuild
index 1ca6f1f03d09..9b9884bf901e 100644
--- a/dev-db/postgresql/postgresql-9999.ebuild
+++ b/dev-db/postgresql/postgresql-9999.ebuild
@@ -455,7 +455,12 @@ pkg_config() {
src_test() {
if [[ ${UID} -ne 0 ]] ; then
+ # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
+ # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
+ local old_ctype=${LC_CTYPE}
+ export LC_CTYPE=${LC_COLLATE}
emake check
+ export LC_CTYPE=${old_ctype}
einfo "If you think other tests besides the regression tests are necessary, please"
einfo "submit a bug including a patch for this ebuild to enable them."
diff --git a/dev-db/pspg/Manifest b/dev-db/pspg/Manifest
index 9fcdd9c9525b..a982966bd2a3 100644
--- a/dev-db/pspg/Manifest
+++ b/dev-db/pspg/Manifest
@@ -1,13 +1,5 @@
-DIST pspg-1.6.5.tar.gz 1005525 BLAKE2B 2befb8a7081e1fcf5df60eca48f34b819d9de3d07920613b7f759887b4ddcccbc52e46ea8f407666a50a53bbfda582a10b1b2ca65d0c4452bc46db8cd971a802 SHA512 755e40dd6c68a01ad235e6fc2751af76c8ed63c2832bfa26356fa80e62bd59a076413cf7fc075685f9267bc7339fadf4975a695d681fc7821b7da0589805c1f0
-DIST pspg-1.6.8.tar.gz 1017316 BLAKE2B 0150b4577365000b2fdd9de93307acbb5133915917c92affd1a598b3f16769ff0afa6e0b9c0d4639b771dcd62f1f7364a028a3b9d96cc6c40e3ac41c550a8d48 SHA512 337ae1eb9e92dc97ca32127322aaa3d0c5edb8766e5cab16e778148b3256119c7c5b1b2e4b6ab0b520113ede07c464d1c1c5e460c8efb7714f5a29acfa845e9d
-DIST pspg-2.5.4.tar.gz 1346559 BLAKE2B 01c0a35a6372ccb7ad007595d01eb0c8380428722418a4f4b6040a549757d2eab601371ded51a762d81677adc259abf5f8af4311fca6427fb24244e0c33035d2 SHA512 2a9c677bbff4eb032403b90f44dbe9f62a46775c1cf180e90fc3df2853973c4b584b674fa11e2b3be844402f5c00777388ff05782fdecee3b27d92280fc288ff
-DIST pspg-2.5.5.tar.gz 1346896 BLAKE2B 7b5b64affcc6ec52ae9712fab06089db3a8ae208d94190fa6695d2285d29a13ac2c5ca3854a1a13ec6907eed04dd6bb188b31cc6440963a069a2715ecf109eba SHA512 74e8c8c5a156d9115a2bc6c9957d302b5e48182181c9560100c09dea765f9a382d78b5fe74ca11fdccd40bdd2f8a165218edf89ffd7713e479f0443a49766c4d
-DIST pspg-2.6.6.tar.gz 1355951 BLAKE2B 134f6af029f070bac66e9f514fee985b7ce77f788b44280cc4df969801d2776a60aa9dd679ae848c4fe68ce58d593c10fd1e2305734d0f76e08f1d2e51ad17bd SHA512 963a4bb3e93880c5dd8538b2ba777977585b2e9766a29001f1e5dd8d4692ccc333cf8bdcf0d7ae3f0cf02568e5645d4534cc58dc540d22df5debc5b4e034114c
DIST pspg-3.1.2.tar.gz 1368987 BLAKE2B 7eff4134ee97db4df4dfada08ede5e88ea0c37a681c95ba9529f30be98f05cb3a7805e5dcb165b34f5afc2d4d7ca6de0e705334967ade0fdb813636c73df658d SHA512 1446200bdfe88787083da32629acaedab6eaee68b3dccbff3f52c82165029cb0f558790951d5103876c84562fcd6b5578042bca134f4ed37b9c5de96fdc5602f
-EBUILD pspg-1.6.5.ebuild 375 BLAKE2B 1eb56e1d31c91e2766faf5f196d3c7498cc7006b0715f57af5e879f2a65a93bd7061330bb278c193792ead58752fea4de8bc39523b35da546e6896373bd374af SHA512 bce1d5b5642d92cc5aae26905b48e940699f42fcad58b4df3988effa9f14a51bfee55cee95eb72f65a810c99ab59576728e5b63377770f149a2dbf470cd20f86
-EBUILD pspg-1.6.8.ebuild 377 BLAKE2B 59e6f8cefb4a9347304231161958a8915a8cf375dd2096b4d1fdc19b00d3fa4093780ac7b33a78814673191514fbb5d965f5d7c5904b63a9abeab6a9f82819a2 SHA512 589f39286408970b9118c3cad7a343278adbd1c539d42e92bd293cf549c8ba5064a77a23649e55d60559e5a1380e77a92647ebb7a25716cbf7cb28a5389bc26c
-EBUILD pspg-2.5.4.ebuild 417 BLAKE2B e546c8ac11ad8abeb004a3471ef1aa09c8c75c14d84e8598d1743227183c9bba787280aad2c168e8db72ff5b0fdf6517e9941179de55b47bbb0756338bc16d34 SHA512 59a6ae7ac90bc01e5628133110a63f00ab5bdde45c8b21d886efc1a9e7209dee24ebc2f1e30a63fdabb06ab04242c4bc16df2b7fa34086de52d1d3fac3171f6f
-EBUILD pspg-2.5.5.ebuild 417 BLAKE2B e546c8ac11ad8abeb004a3471ef1aa09c8c75c14d84e8598d1743227183c9bba787280aad2c168e8db72ff5b0fdf6517e9941179de55b47bbb0756338bc16d34 SHA512 59a6ae7ac90bc01e5628133110a63f00ab5bdde45c8b21d886efc1a9e7209dee24ebc2f1e30a63fdabb06ab04242c4bc16df2b7fa34086de52d1d3fac3171f6f
-EBUILD pspg-2.6.6.ebuild 415 BLAKE2B b60c5abaf49da08566e205a33fa33030a041b3df0882348dc5eb0ea3a0b90fcb885c4ac2f41ffb054ee80bd105c9f707f4f576bff71c2e4dca3e80a4ad0ed594 SHA512 243e3124bd436d36081aa7a7b0250329a2c772b94d55438faefcb6d4c4e923a9e5c102c37ab5011cd2e057c3b24535d11822a862956a8d0e59f92ea929e9a6ec
+DIST pspg-3.1.5.tar.gz 1380515 BLAKE2B b9539347d1977a178468127df5f92f8b7be835b7e6edc49720131173b71b22e01b614bcde55e354d32a2ecf1665dcebd27502110786b7595411b5ec782391f01 SHA512 287d4794aebc867bf3c344c3747f1d058c1b93710dd0d86de66ae1e0d97961f4e3d511bc0f7df98c309bffc962aaf50b758faab1f8c6f0eb3374450e53ecdccb
EBUILD pspg-3.1.2.ebuild 415 BLAKE2B e39731cc67c2684c649d2fd54c52fa00c972f151018f0033ce85064020630fee1065c55cbbd6b83a974592844dae17692f8c7c1160a2fd31bb75a3522d392ea1 SHA512 9a108eb787dd60342bb60c5a377ba6430a3f5995215fe7ef2ac702c099a905c4e847d14f8a297acd2d1faaebb83aa4ac22d1abfa86a87bfb3015aec8b65126cb
+EBUILD pspg-3.1.5.ebuild 434 BLAKE2B d552756257d7e3eb4cec907b899ac3f9a837c19475446bea99abf01be7fe5a1c4a0e127c429a94e629fa2c0a60230f1180028ef2b1e7bbb167190b2b4bc765fd SHA512 ae700be2aa4c09491cf14c74dbbe71e943a12bddc9d3f11656b3d4661c99d2ad4cc05543b8c6a1846b05268cb76ccd429d8fda188f183357d5670b79b95e976e
MISC metadata.xml 298 BLAKE2B 40abb765b052aa2cbbf749c54c686f1c98968cb1af2e93c149bfbfe6244d3c17e827189d7a1da90a566016758bfbed63b16ad0a0328725349748d1b18b2437b1 SHA512 167896d1d92ccb4b171cce16d63405369a9e28b0d01c12b2ed94fcec1f982892e179c007287fc3386e1c00393d6570a2ae9e8efe9420e53a82308426075d5c89
diff --git a/dev-db/pspg/pspg-1.6.5.ebuild b/dev-db/pspg/pspg-1.6.5.ebuild
deleted file mode 100644
index 15ddb24f19d5..000000000000
--- a/dev-db/pspg/pspg-1.6.5.ebuild
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="A better pager for psql and mysql"
-HOMEPAGE="https://github.com/okbob/pspg"
-SRC_URI="https://github.com/okbob/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-
-DEPEND="sys-libs/ncurses:*"
-RDEPEND="${DEPEND}"
diff --git a/dev-db/pspg/pspg-1.6.8.ebuild b/dev-db/pspg/pspg-1.6.8.ebuild
deleted file mode 100644
index fd99e424e3bc..000000000000
--- a/dev-db/pspg/pspg-1.6.8.ebuild
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="A better pager for psql and mysql"
-HOMEPAGE="https://github.com/okbob/pspg"
-SRC_URI="https://github.com/okbob/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-DEPEND="sys-libs/ncurses:*"
-RDEPEND="${DEPEND}"
diff --git a/dev-db/pspg/pspg-2.5.5.ebuild b/dev-db/pspg/pspg-2.5.5.ebuild
deleted file mode 100644
index e802ac47a294..000000000000
--- a/dev-db/pspg/pspg-2.5.5.ebuild
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="A better pager for psql and mysql"
-HOMEPAGE="https://github.com/okbob/pspg"
-SRC_URI="https://github.com/okbob/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-DEPEND="sys-libs/ncurses:*
-dev-db/postgresql:=
-sys-libs/readline:*"
-RDEPEND="${DEPEND}"
diff --git a/dev-db/pspg/pspg-2.6.6.ebuild b/dev-db/pspg/pspg-2.6.6.ebuild
deleted file mode 100644
index c9506ef83e56..000000000000
--- a/dev-db/pspg/pspg-2.6.6.ebuild
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="A better pager for psql and mysql"
-HOMEPAGE="https://github.com/okbob/pspg"
-SRC_URI="https://github.com/okbob/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-
-DEPEND="sys-libs/ncurses:*
-dev-db/postgresql:=
-sys-libs/readline:*"
-RDEPEND="${DEPEND}"
diff --git a/dev-db/pspg/pspg-2.5.4.ebuild b/dev-db/pspg/pspg-3.1.5.ebuild
index e802ac47a294..4ea4a57c2c3c 100644
--- a/dev-db/pspg/pspg-2.5.4.ebuild
+++ b/dev-db/pspg/pspg-3.1.5.ebuild
@@ -13,5 +13,7 @@ KEYWORDS="~amd64 ~x86"
DEPEND="sys-libs/ncurses:*
dev-db/postgresql:=
-sys-libs/readline:*"
+sys-libs/readline:="
RDEPEND="${DEPEND}"
+
+RESTRICT="test"
diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest
index c17f17c061c6..7586bcd55d6c 100644
--- a/dev-db/redis/Manifest
+++ b/dev-db/redis/Manifest
@@ -4,6 +4,7 @@ AUX redis-5.0-shared.patch 883 BLAKE2B 71a490d5c40d873db7d363c4f3cab966bf8e92fa8
AUX redis-5.0-sharedlua.patch 2642 BLAKE2B f86d3c932a8c0f05e2d65725037a0780152b95835f88395cc74765902c3184a4e1ed0a3802f54345e91a70b6ac013419c6d3412df8fd2397ed300ff1e7210724 SHA512 971944ff03563bcc91c9f29316af2b0eb691c9d0e27d9e4f3fad30dc4e4afe34c077ccdbf5f93ebd78ea6571f809a801721376059780a30467274a7be5ca6425
AUX redis-5.0.8-ppc-atomic.patch 495 BLAKE2B a995c1b1e327416705151dd888b98fe02fdea8126359f3ffa2cce4d5794d7677ffc4dc7f628d076bc0ed341dac4010ffb9409ee25113fe9cac2298658e94802e SHA512 f4f2c2aad5d09e9fafa58946fdc79aa49d8f16ce6d389dd653522295dc397796c58c87f4fb92016af8c261aa4b00a7eab09d33a19eded496807444d234a9abd9
AUX redis-6.0.3-sharedlua.patch 2815 BLAKE2B 323c13cd06ee50cc86a6f4b4896ab3c887c55a4ec836b6c40e509b166207075ced4cc35b0e9d3490fb893405fc6b4cd325e2e1688acec61a15ef1d34cfc78be1 SHA512 a4e2c54ec9fbaa594290178af26430b5e139b1fb12d44327074077e3e2bff45b9e999d8911f3bc0ac10f5b0afba4ef0993bba610355cb8701bce72a48a6ec634
+AUX redis-6.0.9-sharedlua.patch 2871 BLAKE2B 57e56b6cbe6999a2f21daf527aab1a05b6f5107750d8f4afed0f2792ef418a84e6e1addde833ee3969b2aca24b698f2ddc17187eaa726f87642c81ea144b617e SHA512 f39021b66af0d9c7386802430dd26c43fa6fb5ac572dfe459cc00f9f5cd424797bdb13eddfebba5d2f11e9ecf6456f571c7e58190a4f308f889f512250a78092
AUX redis-sentinel-5.0-config.patch 706 BLAKE2B 0fa0166bbb3460e783e85b90acf4c606b83e271d8e9828bb5b3a39b623508b21dac33369ac25b645169271822e9c5deb6ea7294e40fc8d1a5ceec5129c174505 SHA512 2dee5666d50fc5d9b6021735a95c9a9647ba99c562e348785381d5a05f1388c3fb9e8c4a15b0de771cf73fb80e5e29f1df25805df749457a2ce4f2e3f2e0e9e8
AUX redis-sentinel.confd 470 BLAKE2B f77fd7e35c753e35aafa6e773dcc00d2779bc29d8579334078bd6124aab436dff671ae790c0b0e3cefdd4082fe212b4b71501b529176cb0a1e5f8c8cdcf1387e SHA512 ea455f8c73c21bc46127ea5c7b99dc5707ad41160e5fd61367555dd2e3fd5c1518026257651e7d371a60a64b682b6839dd37580f75308c73239edeba49d6b372
AUX redis-sentinel.initd 648 BLAKE2B eaea4a047dfa61a325fa2bfeb30b422220d4fad699a693b9141a74575dc153ad3db2dafa3fa06ef195914a32f2a6aacfb3fc2e3b80ebe6b75316700fbd84221d SHA512 dfd1dadedf9b7376667d1966072c28e5e23e17592bf66753eae4bbc084225714f30c6450001f643c1561ff3a2eb2e50f719d32ff34f5419040ff42a2c4fbd70d
@@ -13,8 +14,10 @@ AUX redis.logrotate 105 BLAKE2B 1281fd86d399b40aaaa69d1fe170b2c49523c074e14b1290
AUX redis.service-3 249 BLAKE2B 92a6914601fa9b587f439e5cb30c9b00ed53d6dc9d18f7ca8f34075f3d77836b82018baf3d6e46ad27ab90ed5de5a553fd5ffe4305afadb7b173b56dcb328de3 SHA512 5af7d61282e90e72faa8b328c11c70bd2cb255265e3a29c4f2208795c4876a08f9e01cb473d2a537362ed0b282b22aa51612cb95e192f96fa9a7b974a99da369
AUX redis.tmpfiles 61 BLAKE2B 1c3bf8aa105940c408163f61c63ed16b86de7a979cb5143d15700cac329970f351cb9b9377aa82e6f4dae377b00c1710a1e0f54334f007cfed64551f761034d4 SHA512 741ff5a4df5b04e7af4e81357812bf5b6cf992bc18b6052074aef134401d0a92703a2e41f52966012c05ea80fac5636435c8d3e6ed55e62a5711526ba67ee738
AUX redis.tmpfiles-2 57 BLAKE2B 1e0577c1828bb693cf820f3ba5e77d7d748adf4df2d1910d465ce097765308c7b7ea729526404120d04a79b547e865df93f7bfce1e63341c73563496f1dce691 SHA512 3de050ce044b7daf71219ec61dee2bc31acef161319b87ec2963b23c72e8a4807f1302c4932897664a63ef94507449f6ab75ce18d59f5e1a4558c330a7042e43
+DIST redis-5.0.10.tar.gz 1990507 BLAKE2B a3ed76efb387e2a8292f71607c19826c8a0a890f1c47c126fc4cf084955fcc5889e743d7c7103e4c66ad6c81c2b2d0d482b1b4a62ab11a757f4cf84271ae8199 SHA512 4dd3a639f44f2f077b36621f9eb88dc340089890abf07f57a969172ea806e1bd205f61e6842d316294b52cd73c98aec3363686b2a292efc18a2e1bdbd358fb3c
DIST redis-5.0.9.tar.gz 1986574 BLAKE2B 7802d0556d11c9be8577b9bb3f4dbad8c2419b38659001421f96040e8a64a4a304e9dc1f06d82802ce1c92515d166cfd37c2f347df4c4cda0c2c4c2bb10d27c5 SHA512 d2c7bc1f769bc5d179bfe6e71954962813b50597eafc752a9b1edf2fd87e84707b7daf0910db56dd0e89cb3bdb3e551da7f111ae4899f505bac5f77f99744c13
-DIST redis-6.0.6.tar.gz 2228781 BLAKE2B 42396f464611cd5d83a79a97d2e4f74c0adabf9338802ec748c24f6ea46d42c6e51fedecc5cd26c7cff6b2a3c7a26bbbf79db7a54a6cbeff388587d186268796 SHA512 bb60aff6e495b201fed814eb134e6ce2825429ef6bd52215c7369eec941318ba460d60ad7b0cef3684b3f992823d465869177dc1d0eb16886bfed598dff74f65
+DIST redis-6.0.9.tar.gz 2261418 BLAKE2B 93e64e2c682320d11e468021fd13a2888dd6b15430c15eaaa9468242d9b4d8b60e29dfe656e677774dc88ed751471284d1adf94c723521085019b375785abe7a SHA512 ebae2b09637fdbdc71dd22b72ccea24e2c21beb81c6ff5c4bae8b341886a7d847ce868f52dc917079bab8aa250ff61c83efe8acbb8a1cbc5e285c7842b0aefa3
+EBUILD redis-5.0.10.ebuild 4744 BLAKE2B 911a324ae75ab43090425efbb15fec52b2568e09944656450d13eb82d730466466b638adab70bf71378726d08da982a05d1a7b0bf0db7e8d7fc65606ded549de SHA512 270f9e9b8037799c2e59037c968796155d9c5dcbb29a69e72e1544cd310f0921a9e26101e37b6d4d6701b40ad6114bd1f931d36d8be2d96994ad861ce6cc39ac
EBUILD redis-5.0.9-r1.ebuild 4737 BLAKE2B 2c8ee5fee1812d8c8af4ae154e91450f99e13e1ca574466b5f86090b89d24fd64eba3367be67909f04761bf576db27885c0b78bf05547bf39352a8655f25c324 SHA512 25b463fc2b71c5671f1414d071c697f06ff3df5c7e4e958449dc6031bd28aa4464d624d6e32514ee9c60d9e6246e1b23f0e710ab384460e60754f2c48c3187c3
-EBUILD redis-6.0.6.ebuild 4705 BLAKE2B f7082975e525a81280bbbfef7ca72e662cdcde23391f033cd7851c8ec780d3239cba21b71a0808a721d28356233590ec41eb6160f7e9c4b82664ceb7ae33e9bc SHA512 47cf629bf66800b00a545fff07aecc6889bd28c526e666763254d8598e9ad8dd567c08c73f3c006843f161f369278bca27e3b62a3927ac1af1ba18177545d6c9
+EBUILD redis-6.0.9.ebuild 4949 BLAKE2B e67312a51b324b149eb6bebdf0da4a23ac5d07d39c60d18e072ff829188403c7d831594ae71f388376954fc91f0fec40e193dae52dbd4da0ff8779547e06c67e SHA512 034a2f4936d283f7c491f2299aecff576e4cbe3337f4d830ac6be655ffadef3c3dd003b680c4b9224da06c3d2f61df23704279985119a409dd009164c77a65d2
MISC metadata.xml 356 BLAKE2B 19e27b12be84927b990fc2f481d8dd1f88f05b5e029fdd91c7ce9517e7fd378d6e1df1eb55052a04fefe781da09b371da1c28fd269c72f4222aa896897222bf7 SHA512 ab06f694c5b20072f40e85b3a8e05d2c333f3b29fc145733fde1e3f42ea78ac7c51550afc29e671ef9b4a163597ac9f44bc182344c18db52036595e5d65f7e22
diff --git a/dev-db/redis/files/redis-6.0.9-sharedlua.patch b/dev-db/redis/files/redis-6.0.9-sharedlua.patch
new file mode 100644
index 000000000000..1793dc9cb884
--- /dev/null
+++ b/dev-db/redis/files/redis-6.0.9-sharedlua.patch
@@ -0,0 +1,60 @@
+diff --git a/deps/lua/src/lua_cjson.c b/deps/lua/src/lua_cjson.c
+index c26c0d7..fa50c41 100644
+--- a/deps/lua/src/lua_cjson.c
++++ b/deps/lua/src/lua_cjson.c
+@@ -46,7 +46,7 @@
+ #include "strbuf.h"
+ #include "fpconv.h"
+
+-#include "../../../src/solarisfixes.h"
++#include "solarisfixes.h"
+
+ #ifndef CJSON_MODNAME
+ #define CJSON_MODNAME "cjson"
+diff --git a/src/Makefile b/src/Makefile
+index 3a09ccd..c50acf0 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -16,7 +16,7 @@ release_hdr := $(shell sh -c './mkreleasehdr.sh')
+ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
+ uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
+ OPTIMIZATION?=-O2
+-DEPENDENCY_TARGETS=hiredis linenoise lua
++DEPENDENCY_TARGETS=hiredis linenoise
+ NODEPS:=clean distclean
+
+ # Default settings
+@@ -76,6 +76,7 @@ endif
+ FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
+ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
+ FINAL_LIBS=-lm
++FINAL_LIBS+=@LUA_LIBS@
+ DEBUG=-g -ggdb
+
+ # Linux ARM needs -latomic at linking time
+@@ -166,7 +167,7 @@ endif
+ endif
+ endif
+ # Include paths to dependencies
+-FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src
++FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise @LUA_CFLAGS@
+
+ # Determine systemd support and/or build preference (defaulting to auto-detection)
+ BUILD_WITH_SYSTEMD=no
+@@ -246,6 +247,7 @@ endif
+ REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX)
+ REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX)
+ REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o gopher.o tracking.o connection.o tls.o sha256.o timeout.o setcpuaffinity.o
++REDIS_SERVER_OBJ+=fpconv.o strbuf.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o
+ REDIS_CLI_NAME=redis-cli$(PROG_SUFFIX)
+ REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o ae.o crcspeed.o crc64.o siphash.o crc16.o
+ REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX)
+@@ -299,7 +301,7 @@ endif
+
+ # redis-server
+ $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
+- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS)
++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS)
+
+ # redis-sentinel
+ $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
diff --git a/dev-db/redis/redis-5.0.10.ebuild b/dev-db/redis/redis-5.0.10.ebuild
new file mode 100644
index 000000000000..1c36ec874b77
--- /dev/null
+++ b/dev-db/redis/redis-5.0.10.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic systemd toolchain-funcs
+
+DESCRIPTION="A persistent caching system, key-value and data structures database"
+HOMEPAGE="https://redis.io"
+SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="+jemalloc tcmalloc luajit test"
+RESTRICT="!test? ( test )"
+SLOT="0"
+
+# Redis does NOT build with Lua 5.2 or newer at this time.
+# This should link correctly with both unslotted & slotted Lua, without
+# changes.
+COMMON_DEPEND="
+ luajit? ( dev-lang/luajit:2 )
+ !luajit? ( || ( dev-lang/lua:5.1 =dev-lang/lua-5.1*:0 ) )
+ tcmalloc? ( dev-util/google-perftools )
+ jemalloc? ( >=dev-libs/jemalloc-5.1:= )"
+
+RDEPEND="
+ ${COMMON_DEPEND}
+ acct-group/redis
+ acct-user/redis"
+
+BDEPEND="
+ ${COMMON_DEPEND}
+ virtual/pkgconfig"
+
+# Tcl is only needed in the CHOST test env
+DEPEND="
+ ${COMMON_DEPEND}
+ test? ( dev-lang/tcl:0= )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.2.3-config.patch
+ "${FILESDIR}"/${PN}-5.0-shared.patch
+ "${FILESDIR}"/${PN}-5.0-sharedlua.patch
+ "${FILESDIR}"/${PN}-5.0.8-ppc-atomic.patch
+ "${FILESDIR}"/${PN}-sentinel-5.0-config.patch
+)
+
+src_prepare() {
+ default
+
+ # don't call ar directly
+ sed -e '/^STLIB_MAKE_CMD/s/ar/$(AR)/g' \
+ -i deps/hiredis/Makefile || die
+
+ # Copy lua modules into build dir
+ cp deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c src/ || die
+ cp deps/lua/src/{fpconv,strbuf}.h src/ || die
+ # Append cflag for lua_cjson
+ # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61
+ append-cflags "-DENABLE_CJSON_GLOBAL"
+
+ # now we will rewrite present Makefiles
+ local makefiles="" MKF
+ for MKF in $(find -name 'Makefile' | cut -b 3-); do
+ mv "${MKF}" "${MKF}.in"
+ sed -i -e 's:$(CC):@CC@:g' \
+ -e 's:$(CFLAGS):@AM_CFLAGS@:g' \
+ -e 's: $(DEBUG)::g' \
+ -e 's:$(OBJARCH)::g' \
+ -e 's:ARCH:TARCH:g' \
+ -e '/^CCOPT=/s:$: $(LDFLAGS):g' \
+ "${MKF}.in" \
+ || die "Sed failed for ${MKF}"
+ makefiles+=" ${MKF}"
+ done
+ # autodetection of compiler and settings; generates the modified Makefiles
+ cp "${FILESDIR}"/configure.ac-3.2 configure.ac || die
+
+ # Use the correct pkgconfig name for Lua
+ if false && has_version 'dev-lang/lua:5.3'; then
+ # Lua5.3 gives:
+ #lua_bit.c:83:2: error: #error "Unknown number type, check LUA_NUMBER_* in luaconf.h"
+ LUAPKGCONFIG=lua5.3
+ elif false && has_version 'dev-lang/lua:5.2'; then
+ # Lua5.2 fails with:
+ # scripting.c:(.text+0x1f9b): undefined reference to `lua_open'
+ # Because lua_open because lua_newstate in 5.2
+ LUAPKGCONFIG=lua5.2
+ elif has_version 'dev-lang/lua:5.1'; then
+ LUAPKGCONFIG=lua5.1
+ else
+ LUAPKGCONFIG=lua
+ fi
+ # The upstream configure script handles luajit specially, and is not
+ # effected by these changes.
+ einfo "Selected LUAPKGCONFIG=${LUAPKGCONFIG}"
+ sed -i \
+ -e "/^AC_INIT/s|, [0-9].+, |, $PV, |" \
+ -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \
+ -e "/PKG_CHECK_MODULES.*\<LUA\>/s,lua5.1,${LUAPKGCONFIG},g" \
+ configure.ac || die "Sed failed for configure.ac"
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_with luajit)
+
+ # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164
+ # also, don't define ANSI/c99 for lua twice
+ sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die
+}
+
+src_compile() {
+ local myconf=""
+
+ if use tcmalloc; then
+ myconf="${myconf} USE_TCMALLOC=yes"
+ elif use jemalloc; then
+ myconf="${myconf} JEMALLOC_SHARED=yes"
+ else
+ myconf="${myconf} MALLOC=yes"
+ fi
+
+ tc-export AR CC RANLIB
+ emake V=1 ${myconf} AR="${AR}" CC="${CC}" RANLIB="${RANLIB}"
+}
+
+src_install() {
+ insinto /etc/
+ doins redis.conf sentinel.conf
+ use prefix || fowners redis:redis /etc/{redis,sentinel}.conf
+ fperms 0644 /etc/{redis,sentinel}.conf
+
+ newconfd "${FILESDIR}/redis.confd-r1" redis
+ newinitd "${FILESDIR}/redis.initd-5" redis
+
+ systemd_newunit "${FILESDIR}/redis.service-3" redis.service
+ systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles-2" redis.conf
+
+ newconfd "${FILESDIR}/redis-sentinel.confd" redis-sentinel
+ newinitd "${FILESDIR}/redis-sentinel.initd" redis-sentinel
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README.md
+
+ dobin src/redis-cli
+ dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-rdb
+ fperms 0750 /usr/sbin/redis-benchmark
+ dosym redis-server /usr/sbin/redis-sentinel
+
+ if use prefix; then
+ diropts -m0750
+ else
+ diropts -m0750 -o redis -g redis
+ fi
+ keepdir /var/{log,lib}/redis
+}
diff --git a/dev-db/redis/redis-6.0.6.ebuild b/dev-db/redis/redis-6.0.9.ebuild
index 16fd3cbb2f80..4248e34c7462 100644
--- a/dev-db/redis/redis-6.0.6.ebuild
+++ b/dev-db/redis/redis-6.0.9.ebuild
@@ -10,7 +10,7 @@ HOMEPAGE="https://redis.io"
SRC_URI="http://download.redis.io/releases/${P}.tar.gz"
LICENSE="BSD"
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+KEYWORDS="amd64 arm arm64 ~hppa ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
IUSE="+jemalloc luajit tcmalloc test"
RESTRICT="!test? ( test )"
SLOT="0"
@@ -46,7 +46,7 @@ REQUIRED_USE="?? ( jemalloc tcmalloc )"
PATCHES=(
"${FILESDIR}"/${PN}-3.2.3-config.patch
"${FILESDIR}"/${PN}-5.0-shared.patch
- "${FILESDIR}"/${PN}-6.0.3-sharedlua.patch
+ "${FILESDIR}"/${PN}-6.0.9-sharedlua.patch
"${FILESDIR}"/${PN}-5.0.8-ppc-atomic.patch
"${FILESDIR}"/${PN}-sentinel-5.0-config.patch
)
@@ -130,6 +130,16 @@ src_compile() {
emake V=1 ${myconf} AR="${AR}" CC="${CC}" RANLIB="${RANLIB}"
}
+src_test() {
+ # Known to fail with FEATURES=usersandbox
+ if has usersandbox ${FEATURES}; then
+ ewarn "You are emerging ${P} with 'usersandbox' enabled." \
+ "Expect some test failures or emerge with 'FEATURES=-usersandbox'!"
+ fi
+
+ emake check
+}
+
src_install() {
insinto /etc/
doins redis.conf sentinel.conf
diff --git a/dev-db/sqlcl-bin/Manifest b/dev-db/sqlcl-bin/Manifest
index b0524ace39b9..eb58f7940ebc 100644
--- a/dev-db/sqlcl-bin/Manifest
+++ b/dev-db/sqlcl-bin/Manifest
@@ -1,3 +1,3 @@
-DIST sqlcl-20.2.0.174.1557.zip 32408164 BLAKE2B c91547af6581b01b5b33821e33fd8058457746c854ebc801fd27a5554eb7f91c4f47fa938a86121abed4e5ec8aa13fbebf0b0c3364101a374f7086a55268e73a SHA512 4a6d62f57ddb8e520bf51eae4956065fb2b44aac6dc18d7999e50f8b42d553218eaaf99c75095c12d06e1673aae224522564d19a06719b2444ef8d535fedd089
-EBUILD sqlcl-bin-20.2.0.174.1557.ebuild 1040 BLAKE2B 9d9d8b90ff98a55d832e50d91faa91d123ed93219df6507b5da2548306b92b75de1fb2101123627379d8ad87bd1e3f310f7ba19a9589b0407cc907ad30975087 SHA512 68d175ff276dde81d6833e60f4af954e9783271478706b6775c8f826d17325aec0372a288237c55cf961dcbc052fe0bfb08b282d438281ae8b4ae86f8affb2a6
+DIST sqlcl-20.3.0.274.1916.zip 36309483 BLAKE2B 10051c6880da74a2803c3dedef4ff397eecfc92fb57ca3a7432d32041a2a255ce30cd4b69d242bcea182a30c200b89105fff40c0419cac371c99dfaee192b18c SHA512 b170bfb5ed31ccbf69b75f1ec7c2b292cb8d0bc70c8489ee6c42c288b54153ef8b8b2e4e0511dac1522d9b6cd161f66adc50d85574e8e8f3b7802d3a9f91a70b
+EBUILD sqlcl-bin-20.3.0.274.1916.ebuild 937 BLAKE2B 838e0215c542324f2d80519deedfef87084c92546f18f0ca224a6fa684ad6c787a90232ea24e9a6944131a9ef87eafc7e03ce33dcaa99b0d1b510ff6993ba021 SHA512 2c45d150dc664633c040044eb73dafb0ddec972aff56d52aec13040a6c7112612b70ce0e7f8f96b1f2a38062f1d2c61eda0724eed8574f74aec3f845de6495bc
MISC metadata.xml 483 BLAKE2B 1ed85dae79388f3c548163e5fafd2838e1adf9bfc9a9c793ce7f9e7e323f8e3c9e7e2f3190b3ec54a0c598d048c61b6ad67c8eefb3845cd446ea67b01e0df8a8 SHA512 e88ad9fd8c20d5be5569c64544c3f4dd72eb3243d46333c30aaa1b939eb6ce35855aa3e771008b2fff990de5b2e5bf79ca378714e3cf7dc375144b7cd8f5649c
diff --git a/dev-db/sqlcl-bin/sqlcl-bin-20.2.0.174.1557.ebuild b/dev-db/sqlcl-bin/sqlcl-bin-20.3.0.274.1916.ebuild
index 5ecd22f27f32..bc18cd9f85e2 100644
--- a/dev-db/sqlcl-bin/sqlcl-bin-20.2.0.174.1557.ebuild
+++ b/dev-db/sqlcl-bin/sqlcl-bin-20.3.0.274.1916.ebuild
@@ -6,8 +6,10 @@ EAPI=7
MY_PN="${PN/-bin}"
MY_P="${MY_PN}-${PV}"
+inherit java-pkg-2
+
DESCRIPTION="Oracle SQLcl is the new SQL*Plus"
-HOMEPAGE="https://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html"
+HOMEPAGE="https://www.oracle.com/database/technologies/appdev/sqlcl.html"
SRC_URI="${MY_P}.zip"
RESTRICT="bindist fetch mirror"
@@ -18,7 +20,7 @@ KEYWORDS="~amd64 ~x86"
BDEPEND="app-arch/unzip"
RDEPEND="dev-db/oracle-instantclient
dev-java/java-config:2
- virtual/jre:1.8"
+ >=virtual/jre-1.8"
S="${WORKDIR}"
@@ -35,17 +37,10 @@ pkg_nofetch() {
einfo "which must be placed in DISTDIR directory."
}
-src_prepare() {
- default
- find ./ \( -iname "*.bat" -or -iname "*.exe" \) -delete || die "remove files failed"
-}
-
src_install() {
- exeinto "/opt/${MY_PN}/bin/"
- newexe "${MY_PN}"/bin/sql sqlcl
-
- insinto "/opt/${MY_PN}/lib/"
- doins -r "${MY_PN}"/lib/.
+ java-pkg_dojar sqlcl/lib/*.jar sqlcl/lib/ext/*.jar
- dosym "../${MY_PN}/bin/sqlcl" /opt/bin/sqlcl
+ java-pkg_dolauncher "${MY_PN}" \
+ --main oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli \
+ --java_args '-client -Xss30M'
}
diff --git a/dev-db/sqldeveloper/Manifest b/dev-db/sqldeveloper/Manifest
index d4d60332a7b2..5cb3d5952a2a 100644
--- a/dev-db/sqldeveloper/Manifest
+++ b/dev-db/sqldeveloper/Manifest
@@ -1,5 +1,7 @@
AUX sqldeveloper 325 BLAKE2B e89acd5441362bc693296e2fef189e637944413094169c09be73bb1f514393f0239c7f4c5b186dd0e34bd1bda9730f4bb2e029b166f1db740ac34eff25097c84 SHA512 ab1d70c5b693efe5e6270d7fcd0ba7ef30852ed98fe88a1853c5b415178c51bbb754a4da6964b5e57e87c38015cc90ac2fc04b7aa121b660300434523457bad2
AUX sqldeveloper-r1 407 BLAKE2B 26bf826e6ccf1cd45b52e7cdf6e694d88570118c0e98cab83f66f078ed79fea36fb3fa6df67dc271a74faad4307996c4968f6d316d9fc71d1a5360804f39782e SHA512 cf089f58c9de3677dbaa7b0c4bdd81e234bffac4c25f5a433c7854068ca33b5a4165d8a5d24188890d5d8c60c209adee5267a255505b978a5a7f73646fd1dfbe
+DIST sqldeveloper-20.2.0.175.1842-no-jre.zip 433127943 BLAKE2B da410245ce2fe62b6f5d533f0d170069cb031cae6abcb294fbb1ccb537814f37260482d00d4c752de33d3cea3b4613929a8c8049c4ea813913666d9950a02875 SHA512 1ac9c29b57efae26a5ec8925c25c6500b2e625852d6bfb4b10afae95d6d1b3e4f7b4df34eb847f6f458009b82c4659f1bbad3bb7ba0632850ed97b096014f4ce
DIST sqldeveloper-4.2.0.17.089.1709-no-jre.zip 348604841 BLAKE2B 0c3adff04f148102e6460c7550f787329c7e5a69aca0b81c2de4725b9c9ea27c03bb2f588671a95371aa3612839805f2042855b443bb5635c70d0e0b2140295b SHA512 4d1e270376ae125a60146228e35fcb2cb615d593c0e9f2ca98e4deef4d8fd1ddff59cf15064d63e33e77125f49e8da9fe317ed1fd96a9b00a699bf6c5e739874
+EBUILD sqldeveloper-20.2.0.175.1842.ebuild 2659 BLAKE2B 29c616d3e225f917ee66f4a217346fd80a6329627f4826bfe08a32c3e03e12ebe28cbded0383eaaaacb8e24b382538f677090c2e8151728b1bd0d83b9e4171b1 SHA512 08e44520ebca5e9eac49fb8a293ce744abcf50a7792513eaa5e4d889d414e8671d5c85e2870d07a419e1dc0dc48242d816af2199cb57e3f43541729d38437b6f
EBUILD sqldeveloper-4.2.0.17.089.1709.ebuild 3200 BLAKE2B 72022780aad23a4d907b1911447162bee87f5e7d9d68ac0577f3451b2db06931eb12437559752f7970fe4f9348bac470baaf2bd92445d39e6d48411c87235385 SHA512 db084a3aaadd441174b4175c70af7b08833979362ea5093ffdd16a3ebefca440511d6592322b4fc9b641abdc10c3bbf7a67b82766811983c5aaa6baa4f0cdd29
MISC metadata.xml 261 BLAKE2B 9772344d77d5ee748886120e69eb80ebc3df85fe5a371772e32b139a0ee39fc8f2758d0f576abca035f2f5ea4124777d44b7d921e56593cbcb819eaf313fd5c6 SHA512 2a60e17b95fab939ca49a24940840277dcd64fd0fa43ad981c933f6f3af3b2eed56ff710f57f6d41fc19877e6e99d4489e8121d9a64d0447ad1348a4a744f613
diff --git a/dev-db/sqldeveloper/sqldeveloper-20.2.0.175.1842.ebuild b/dev-db/sqldeveloper/sqldeveloper-20.2.0.175.1842.ebuild
new file mode 100644
index 000000000000..942c47b19df1
--- /dev/null
+++ b/dev-db/sqldeveloper/sqldeveloper-20.2.0.175.1842.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop java-pkg-2
+
+DESCRIPTION="Oracle SQL Developer is a graphical tool for database development"
+HOMEPAGE="https://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html"
+SRC_URI="${P}-no-jre.zip"
+
+RESTRICT="fetch"
+
+LICENSE="OTN"
+SLOT="0"
+KEYWORDS="-* ~amd64"
+
+IUSE="mssql mysql postgres sybase"
+
+RDEPEND="mssql? ( dev-java/jtds:1.3 )
+ mysql? ( dev-java/jdbc-mysql:0 )
+ postgres? ( dev-java/jdbc-postgresql:0 )
+ sybase? ( dev-java/jtds:1.3 )
+ >=dev-java/openjdk-8:*[javafx]
+ >=virtual/jre-1.8:*"
+BDEPEND="app-arch/unzip"
+
+S="${WORKDIR}/${PN}"
+
+QA_PREBUILT="
+ opt/${PN}/netbeans/platform/modules/lib/amd64/linux/libjnidispatch-422.so
+"
+
+pkg_nofetch() {
+ eerror "Please go to"
+ eerror " ${HOMEPAGE}"
+ eerror "and download"
+ eerror " Oracle SQL Developer for other platforms"
+ eerror " ${SRC_URI}"
+ eerror "and move it to /var/cache/distfiles"
+}
+
+src_prepare() {
+ default
+ find ./ \( -iname "*.exe" -or -iname "*.dll" -or -iname "*.bat" \) -exec rm {} + || die
+ sed -i 's|"`dirname $0`"|/opt/sqldeveloper|' sqldeveloper.sh || die
+
+ rm -r netbeans/platform/modules/lib/i386 || die
+
+ # they both use jtds, enabling one of them also enables the other one
+ if use mssql && ! use sybase; then
+ einfo "You requested MSSQL support, this also enables Sybase support."
+ fi
+ if use sybase && ! use mssql; then
+ einfo "You requested Sybase support, this also enables MSSQL support."
+ fi
+
+ if use mssql || use sybase; then
+ echo "AddJavaLibFile $(java-pkg_getjars jtds-1.3)" >> sqldeveloper/bin/sqldeveloper.conf || die
+ fi
+
+ if use mysql; then
+ echo "AddJavaLibFile $(java-pkg_getjars jdbc-mysql)" >> sqldeveloper/bin/sqldeveloper.conf || die
+ fi
+
+ if use postgres; then
+ echo "AddJavaLibFile $(java-pkg_getjars jdbc-postgresql)" >> sqldeveloper/bin/sqldeveloper.conf || die
+ fi
+}
+
+src_install() {
+ insinto /opt/${PN}
+ doins -r {configuration,d{ataminer,ropins},e{quinox,xternal},ide,j{avavm,d{bc,ev},lib,views},module{,s},netbeans,orakafka,rdbms,s{leepycat,ql{developer,j},vnkit}}
+
+ newbin "${FILESDIR}"/${PN}-r1 ${PN}
+
+ newicon icon.png ${PN}-32x32.png
+ make_desktop_entry ${PN} "Oracle SQL Developer" ${PN}-32x32
+
+ # This is normally called automatically by java-pkg_dojar, which
+ # hasn't been used above. We need to create package.env to help the
+ # launcher select the correct VM.
+ java-pkg_do_write_
+}
+
+pkg_postinst() {
+ echo
+ einfo "If you want to use the TNS connection type you need to set up the"
+ einfo "TNS_ADMIN environment variable to point to the directory your"
+ einfo "tnsnames.ora resides in."
+ echo
+}
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index ae27d9268203..a18565b87df8 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -12,5 +12,5 @@ DIST sqlite-doc-3330000.zip 9834159 BLAKE2B f67155a8ce8e46c2fbc0a4e35722d1fcad86
DIST sqlite-src-3320300.zip 12461750 BLAKE2B 59cce74d284191cfc69ac09b6014701ddd2b7b3d7ebaad5da4ad71cc200e70285b3b201ff174819aa8dde5f610589d7947f547450334f0f17149014078316185 SHA512 7e027c7163a760fb9b6dbfd2e4ccffb39d4972280583fb0d7f8390017101dfed3b12a36653b3130a548ae4d04c6abb11c0a1921b6f09c54c6ae1e72fbdcb2fd4
DIST sqlite-src-3330000.zip 12591089 BLAKE2B 14888bca229683e97c4666f8efb535be5bd3e322de0089f0175ba15e038016be3a3cc00b5bfa8c111538116914cf6d8439839ca5d1e20339b184e547ddf260a4 SHA512 3260e3e03ee2f6a4ff2bc4ea4bada5a1497afeca33878c155a8005824970c6c1eb8a2db58eb3023cab084af475fadb81d1c3c9892ae92c07f884881e6602e173
EBUILD sqlite-3.32.3-r1.ebuild 10369 BLAKE2B c997121e13e1f2b86128e18a86d7260f340f4a1be42b8ff2c02a34b13689f883572352e4e3c9ada1dbfccd2e215d8d1e6b18e912a6d966bb76112aaba241bb53 SHA512 39c97994f1f8d505055701173ebdf41732dbce2b4071c5a4b2e17a8d29f09ae92a2b731521fcf2a33ad5821cb18e9bd790dd1789d4fe9e3e9002786e34caf8ca
-EBUILD sqlite-3.33.0.ebuild 11471 BLAKE2B 93a202a83080620d4ef6713491036e74c30ce4b44d158146a5ece1387fb6e0609faff71f69b20886ee768e037ff3b17ec458cb07e8294fb46ae921cbd471f023 SHA512 ead8ecd678ca567a20adc589159686ade06d51da3c1aa71ae82bf558b606ae68881087ee7009bd250608db4fb40ce5c5539b53930b7e4fe22dc07c6892336360
+EBUILD sqlite-3.33.0.ebuild 11469 BLAKE2B 444a4ee89e2229700aeab30831a586394bfe4fe06bc2002c551069d6dfc632602afce1760f2d9e34ddba94f6d4d13d9db8498cc19262e65b30b590b788285c4e SHA512 974283ca1708c9be89bb50f845ab38db79a59cd84c42817d4a502ddf3a5f60714b62388f3a5132c363e50c580a1007883dd6c06c6334c6119c49b0fc204b4935
MISC metadata.xml 748 BLAKE2B c58da3e33e12b7747bbadacfd1a6137cf847fd5bd0525fc02ef854eb5bcad7bad0b29739257b632e19190995659768fdea418ffa7e485e55ef15f40f58b8382c SHA512 66f3f134065f76229b74a7ab7b469066a93da737a9037435e6fe78e85f45c980ec561537f2bb9b95db9de026bad025d8b06682187c97dedd2741717e893d43da
diff --git a/dev-db/sqlite/sqlite-3.33.0.ebuild b/dev-db/sqlite/sqlite-3.33.0.ebuild
index f14e706720a5..aa8b7bfaa56e 100644
--- a/dev-db/sqlite/sqlite-3.33.0.ebuild
+++ b/dev-db/sqlite/sqlite-3.33.0.ebuild
@@ -22,7 +22,7 @@ fi
LICENSE="public-domain"
SLOT="3"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
if [[ "${PV}" == "9999" ]]; then
PROPERTIES="live"
diff --git a/dev-db/tora/Manifest b/dev-db/tora/Manifest
index d09ac099b053..e2c312361256 100644
--- a/dev-db/tora/Manifest
+++ b/dev-db/tora/Manifest
@@ -1,6 +1,6 @@
AUX tora-3.2-missing-header.patch 547 BLAKE2B 6f3ce8bb09de2bc3793fe6c76c166d0b8d0c1da389d9c0132b83ca2af70623b5f72b6fa0e05d098d03a1e2547af9d2585c4e53c3b4a281c87f67782abe2c3211 SHA512 f3f11c336a2c139a46495f75009762b8bba0d20a1bed3c2f710ed6e94a421e0d3b17241e16919349430a761bc7ddde460af06cdd357741166328fe2b5e4216ec
AUX tora-3.2-qt-5.11.0.patch 1891 BLAKE2B 4617847e8ede3cbb25dfb3a5121f7664bf36bbe7ec46088565769ef7548b163f31b98a20c850b638ddc5a01d6d42346745c29ef38268e5f34e589a6323433288 SHA512 e03be4fc995020abe63dc9c7b4a24a5e9e9b8e9f3c70355bfebe3696e0dcc4cf88643ac58cf263580873838cfe77f2f594be89e7a475e98b434a88bf9c390eb3
DIST tora-3.2.tar.gz 12762547 BLAKE2B 9e52013cc4122a8c6278392fd2251bad941fa48dbbc6e3c72a98bb2bad173d0262877afc44eca689c3110f69883c246441844f7884e309e000f1068b23c6b918 SHA512 005f9bc42a7c7ee9676ad60cdcb7b8fb9862a8ff0be9ffeb7911d96da7f233553b68e4089d23161871b479702ae8a8dc8bc63bd8d9aa75677bdd6c166ce86f7a
-EBUILD tora-3.2-r1.ebuild 2368 BLAKE2B f08d87c795d850f8c5961d59066bb7c256a862f68ef3f8bc4e8365fdb9e068f3e10815e5157af73a972e5b54486a3999a3b81f23ce1b6d034832b7d154d3923d SHA512 d8380bcebb90abf463a1f80cf315d34c94dccbe6e247c31035c8512931cfdbfa2979bed44a950d463844190e6f3261524c0ff314ac0ddc820d054f682589481c
-EBUILD tora-9999.ebuild 2290 BLAKE2B d7a7c82ee7aa1838d8abc3281cd972299816f117258bf4747ef34ab73af3bbeecf2915bfc33ef1bca70d15af240b65fcc5b0386f1f89e494f84b0ab258d4cc98 SHA512 d4d9481e14d53aac151e1d64119d971b822896930153a363945097e5cb4f39f048e8baa465da7d6ebf2cafbfd8d34b9e7d3de9ebeb433929e40ab10046fbb10c
+EBUILD tora-3.2-r1.ebuild 2371 BLAKE2B fc87422fdcb4ffa3b091e027b80be0869ed8eeaff6201c5bd3ed39cf21e26d76297aaa381854d73593c2c151d8b270fac171afeae0d6d5c77392987f9eba5751 SHA512 fe2dc980090dc7f1c52e00383659ee99c8dc8f8fae5616864ed7ca25ab2f298e0670ec01b5d3ad0ead4c4788c4241e9febd06ffe8c7007cb0de117d8637deea2
+EBUILD tora-9999.ebuild 2293 BLAKE2B cae70dd88725d3c007737c5ea97494fcac0df6cc7c37a1dd2f88449c45f5f336170d2bc64fb89ff643bd54a41139cf6297c93b8420cbfe75cae8c5b5a3670fbc SHA512 6f59d5b2438d0f22b6662a9dc3e9c82f039bc30e55f0e928ad4c1a21c16346f0abd873994693e0e4978b0a66daff1112022836b5289eaddc9045f61a3b6449f8
MISC metadata.xml 843 BLAKE2B 483349f54edd1d61c459d689e4f4a65a427bfdc49a05244b8b9ef26f0d49460f3f04a995bca0e9e2becfb335cda699992bf62c4a1d26b264d5469741c01f9bf5 SHA512 fb6b7e2966d2cb74576f2558d44e64a5cf8aa79f78c5eeff58fcf433369b4efd32edb103ad4174bdd7d878466e4db720d81e4b1ff637d7c1193d37d944708247
diff --git a/dev-db/tora/tora-3.2-r1.ebuild b/dev-db/tora/tora-3.2-r1.ebuild
index 57c06026bfa5..b13394c1db8c 100644
--- a/dev-db/tora/tora-3.2-r1.ebuild
+++ b/dev-db/tora/tora-3.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -34,7 +34,7 @@ RDEPEND="
postgres? ( dev-db/postgresql:* )
"
DEPEND="${RDEPEND}
- dev-qt/linguist:5
+ dev-qt/linguist-tools:5
virtual/pkgconfig
doc? ( app-doc/doxygen )
"
diff --git a/dev-db/tora/tora-9999.ebuild b/dev-db/tora/tora-9999.ebuild
index 1733252f6d51..14472612ed8f 100644
--- a/dev-db/tora/tora-9999.ebuild
+++ b/dev-db/tora/tora-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -34,7 +34,7 @@ RDEPEND="
postgres? ( dev-db/postgresql:* )
"
DEPEND="${RDEPEND}
- dev-qt/linguist:5
+ dev-qt/linguist-tools:5
virtual/pkgconfig
doc? ( app-doc/doxygen )
"