summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2019-07-31 09:56:55 -0400
committerBrian Evans <grknight@gentoo.org>2019-07-31 09:56:55 -0400
commit41a7f01c3469a9eb7795c06805772a748ee0580f (patch)
treeb65b48078165b6ad4c1dcbe5a7b4b588e9a0d2f1
parentdev-db/mysql: Add final 5.5 version - 5.5.62 (diff)
downloadmysql-41a7f01c3469a9eb7795c06805772a748ee0580f.tar.gz
mysql-41a7f01c3469a9eb7795c06805772a748ee0580f.tar.bz2
mysql-41a7f01c3469a9eb7795c06805772a748ee0580f.zip
dev-db/mysql: Drop old versions
Package-Manager: Portage-2.3.69, Repoman-2.3.16 Manifest-Sign-Key: D1F781EFF9F4A3B6 Signed-off-by: Brian Evans <grknight@gentoo.org>
-rw-r--r--dev-db/mysql/Manifest28
-rw-r--r--dev-db/mysql/metadata.xml1
-rw-r--r--dev-db/mysql/mysql-5.5.60-r1.ebuild791
-rw-r--r--dev-db/mysql/mysql-5.6.30.ebuild165
-rw-r--r--dev-db/mysql/mysql-5.6.40-r1.ebuild768
-rw-r--r--dev-db/mysql/mysql-5.7.17.ebuild210
6 files changed, 22 insertions, 1941 deletions
diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index d5672e5..4ab2b64 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -1,20 +1,36 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
DIST mysql-4.0.27.tar.gz 11152643 SHA256 c79f83bed7c1ea98e018b8829375b55c1de838d21a526d7f679becc75de00d0f SHA512 188283133e99e1c0b52ac8650aff325d7c9762fbad526c2c67b26dd614f2a86afb247a3f55ff071be1d44cd13060b9d7cca08ba1d758a04d2369381fa104454e WHIRLPOOL d3964468635eae0caf7fc8fb7b3576da12d49264bd9b797bb2191da8c6b91ca46321fb090e994df2b93b43f50686dcc4f735bdff03b49a3176fa746d5c4a60ab
DIST mysql-4.1.22.tar.gz 17761101 SHA256 6bd2436fd0f233bb1518e15975cb4e9fa4434acb53c3c3cd7d4648219abf58e9 SHA512 9de1c2b27cf428a10f67a6217fc2783b638beb6345e2127a4163ceb286073886d223de861c40be0ab36ea78ec5f33ccd5ee457d1e35e67b081d629118b68d390 WHIRLPOOL b40ca2e0d07fc0bd504e57b7eb005d36cf842bb668e93722c723bcc5a797dc9b456ee8971ea99bfc2b9119a2e19ee599f8441eb4601709eb4238196a27319257
DIST mysql-5.0.96.tar.gz 22686667 SHA256 43853814775158aa1650f483530a7dde153957579e3349e3ec780b89d741fc84 SHA512 2e3b4ac221c1c1c11618dc79067a7feff680380fcea435813287b02cb0dff45fb5a32a4393c53cf13165f6efc99dbf347a9388ad364cfdf2e392760a310aa5a9 WHIRLPOOL 3e167e4ff4c56095fbdee55b7e619c9b7ad2120eb72c9a58fe77a023ab6e7498c74e2053876e61687d7812f9ff7022303728ddda49732e7569035684263d2517
DIST mysql-5.1.73.tar.gz 24023347 SHA256 05ebe21305408b24407d14b77607a3e5ffa3c300e03f1359d3066f301989dcb5 SHA512 2e3651ebc1370dad7e01158cdd99133ed3f90c985114766b6282d58b743ae7bce16db797e82819fa5bbc2fa53d89811fd76b278c7459338288e7957634a8c3ff WHIRLPOOL f47c3fe1cd98b8ca2163646c760bd9763c65eab0591b31fe30a8c55c72c8b10d7b549b394493695cf98f50999364409ef8158661141277e6d99b011835aef942
-DIST mysql-5.5.60.tar.gz 21025041 SHA256 a34112e1748823f6dfd0d129fe29a629cf35b8702f9dfaf1f24caf89ab523d1c SHA512 734395f3ce2c12e7703fe48d5bb2ce85ff8d7f04ae51cbe2d04a46b72b9689f804e5b498ae0b4722b0c098e2eed43d4f93b622964059525e6d9d14a47d55f775 WHIRLPOOL cf00fad25570cc991c4f4666667cb35a7fdec3831e233f2647c99761c1bcec665fc9a425608b40111095ffe8fddd37bf2a184880c7e698337999c5022e746abf
DIST mysql-5.5.62.tar.gz 21111902 SHA256 b1e7853bc1f04aabf6771e0ad947f35ac8d237f4b35d0706d1095c9526ff99d7 SHA512 1080a3989c20bbbfe98739f99dacd183f2087ceee5147845852144240386808568af4c908ecdbccdcb6114000ab760ed7257492834d50018eff9520260fd91ce WHIRLPOOL f55b30e0839025180945d9d8244613b46f0b635bb75d4a409a82bdda0262374f2df1e9124f3abdad58e0a603fc8c3b2b34e235037f6613923385a903bfb9945b
-DIST mysql-5.6.30.tar.gz 32223818 SHA256 48464df00aad9b9dfc26c903529ddad944a7562aa28e66e98e4f3f0c35179deb SHA512 b9f5b22a0557fbdd765fd3c379395584dd35bbec2d7504eb132f734129c0d95d24dc538c9b64524870bbecb92fa2f1e95b49ccfe22531ed17ec1e754f08d491b WHIRLPOOL f56d4e9d2ac801605bb941d1a8ba4b876d838a5e3bdac2e644477e87f2e5d439594c28d0e1c1d0c45ebb38fbf4183c429dc8c53bd7aa76aeea95acd1774ca71e
-DIST mysql-5.6.40.tar.gz 32083035 SHA256 1048a7abedba851efa62868e4d28d0be8828162b53903cd68e4f29546418d92d SHA512 c8e458b4cd34cae87f1b088ed2188bd00de8cdc42709d5964e82fa2e4aaecfc12a75ae006c54ffa0d3d286fbdef9704d0cbb83436437d5705fb8921d960e758c WHIRLPOOL a962d9223fbd66f47d7859458b82793c6a74e81c0dce69b222a274b92823245eb121302af10f9a476e88bc88edfdccddaa681efd3357b23f4880da05e3fbfb98
-DIST mysql-boost-5.7.17.tar.gz 61480982 SHA256 b75bba87199ef6a6ccc5dfbcaf70949009dc12089eafad8c5254afc9002aa903 SHA512 a1512abeba307fd21687677d2ee4bf20ced373312824de034e9b340d97e67eb4fcc5caa4ad7d9f58d6c0ddf57f6f6c0b0978e7b01c46f397ac661da843e3dfa6 WHIRLPOOL c9c078afdb1f8eb4405593611c179552493265c50b1eb1bac8cecadbac07103a11a05daf8c26d3d751526d5a69f14a8b6fce40b1aaaac7b9b4680679bf61bc4f
DIST mysql-boost-5.7.21.tar.gz 48931457 SHA256 ad29ecb6fb3c3571394fe231633a2d1d188d49e9eb749daa4e8799b7630daa09 SHA512 29a1bfa1f5d5e354b66ca8c9fdaf7ee88de3d57bee3c6368861b46ab6d992affb7604577c06f241df542b96ab088c055473fd76584376dd149956ae1dd8726f3 WHIRLPOOL 0a86c9e088c870e5e8bf90b15ba53cd61e126143c5147adcbf5273c5dd8018bfe23fbbfd1b5055b9e9ece0a2b1fab21409eaa9bd939ec248410a92d4fe0052ab
DIST mysql-extras-20070105.tar.bz2 50005 SHA256 17697bf70acffd0eeefd976b5ef06dd36080273bf7e805b51a31d72f5f2c5172 SHA512 65e8fd1f9cc71083dbcfaffc331171e0d7deedbd784e416a4b629139f71cc102a84fa62c2d9e48310a18571ef7f06153911ee75c5d7bb6ba88807c287e7cbf34 WHIRLPOOL 3f858fbed6f57ffac863c29bef09a658e3d9f57cf4c6b5c62537973ae44f217344a8592ad311b14b1e7e8d475434b3c69339a8d2873c498ba712ff6f5e128cec
DIST mysql-extras-20090228-2228Z.tar.bz2 254048 SHA256 03a986a5c5ae57f1436553565239613e978ae11e12834fcb275ec6457b12b6fb SHA512 b347c0894d45cff2c10e26c12d7586c335811b607cd760b48e51743e74c55ace820d2d50fac2ce72543c14b9b4d15afce336bd956ea8a820df4a651f23e3b79f WHIRLPOOL 4d89a44791ec7e95baa3822bb62a3638c86d24bcfc777b9ff5a8d26020e7401159a3c03ebda9907fcbf02589b80726f2daa5bf2498d8e6e6e33540edf9b1d551
DIST mysql-extras-20120401-2131Z.tar.bz2 1835097 SHA256 95e531799ed267c566da8b0759da78d0351d6004c7c8a45018054e287a989495 SHA512 0625e1f06e04c7841256955950dd7766a5f03d4ade2aee3c13335f08acff374933ed1fd7ddea214eaaa3531d7373ef094734f5c00530555347f058f5ec4d9d36 WHIRLPOOL f2c6e9387b38b609d3bfea83c6983c456d30a9dcf95c256a44402d4c63fa22543d55d6afa9b8dbf4238dcadf32fac3daec5031d50c8a4acf7a074d04fbede213
DIST mysql-extras-20140514-0124Z.tar.bz2 1493742 SHA256 0cdda9f8587532375274510a8a1f8fe5e80f10cfdf851a01074109803f7ee4cf SHA512 7a798809809b35a515a3475be5f1a96547d495592c83c4cf5c79fb07ceb45a04000da8922d051004c0f2d944f92ca47b75ad08d06a8dccca2ae9f94778d31a7e WHIRLPOOL 371446d80cd9fa22a28eeecde8d18c9c3ca76db9bc57a4ab2073ed0fc1d19a70a06a33cb92257a671849e4bad8bfb9f235272ee1221c7c21ce5f45bc900a59cc
-DIST mysql-extras-20160212-0233Z.tar.bz2 297332 SHA256 01a52587ef1335b2795197d2e547c0b3a1e4b705db09f96cdfb45d2152b6536b SHA512 956dbdcb987556c0625944848f97a36d096cd1f1712a2e051dd027f2856d3c6e94a18d23faca71882260c4b12ee329e3a5f569443b877a3c3e5e88146bfac916 WHIRLPOOL e3837d329ddd137be60fe9d0b37f35ed2e0e7fe1383f38ee45617be288ae318a444e6befdfbaf64b07d4a88ec47fec5cd88d733ecd5bb32ce40f3ba8d09573cd
DIST mysql-extras-20180312-2011Z.tar.bz2 319047 SHA256 5d83747593b2276ecaf253b193814df2bfe170de57ceb7565e3d9f215df92254 SHA512 b0aa9fc8fbc050451ef147cee99b00cf10d34a71641837821e78655241f7d79a94fe2efb4cef9a23fe9741e08ada2fc0b58ef3b3663752bc567babfbcaa547c8 WHIRLPOOL 29085d38c285e62fa5925e70e01fda98ce5582e660b84fa09992049b5c222d1c14e73b94c63cb754bd94df00ce154b24ea5d4ee472de1766b6941cb05503c493
-DIST mysql-extras-20180628-0201Z.tar.bz2 322141 SHA256 8317028fa98cc4abd819d11191fb82026eb9c4d23490b7c1d42590731fbc834d SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a WHIRLPOOL 71a5d8d09ede40a2d7adad6d57e1b546fabb34610c92ede6e0b472c0d84ad016e39ec7fcb038c708723535542dfd9caace22f2b8dd822951ba8c0ee2778c462b
DIST mysql-extras-20180804-2323Z.tar.bz2 322215 SHA256 fa962215d2dba8f781f25351a1f8f70c79d4ab92eef438ec14824aadf12a9b34 SHA512 efd9d416f394cc61b977ab76f05ab3acc5803ff8bdee8e1dbc65cc5b3f07e4f9742140d9586c028908b10fcc44f21c98ebffdebcc5c3578acbe05b07526bcb3d WHIRLPOOL 175407174870609128c502a9843d2c3f3f40acdd24d3263bbe98b30d6b0586821f642ba57c0519ae5e795a883bf7eb736a4da6de5a6590407a3db560105d5140
DIST pbxt-1.0.11-6-pre-ga.tar.gz 3156307 SHA256 71ff3d86e9e5691f3efe541bf31f55a7ec2a88af27df6ad853b65902e00e6d12 SHA512 fa238303f06e0a9adfb10bd5a2e1d2e4850d2c17a350af3874cbff099d6e47b7c555d750c584d06a3ca87c1eb1e9301a9619d8d9a4cffb7fd0169b2b3a63c80c WHIRLPOOL 05cdd39f6f5dafff2def0062a00a24eff6cf6d8754f622b133365cef47cd6b828df5500ac407359d0793a75dd239ec1e49a13d2400a01ddf8b4cef7466e86962
DIST percona-xtradb-1.0.6-10.tar.gz 1676716 SHA256 e3aa818f13cf669412e59ad194eae8eada7a857bf7a4260e4bb41cab4d7ae39c SHA512 72e4b656b22a0420e6f5935dc28060e5c50fbeb48c6d1ae430579d9ccef8042fdd4dde128cc977b903de6221f7021e8c87ea29fe6a8a8c74edb84bf54ab889f3 WHIRLPOOL a916879be315498da27c60992efa4d19e91305b81242925e161547f3fb97a820256e1d07863e9e007ef843af54cd087ce5ac47d5ed1b70862da6cd5a9d81eccf
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2
+
+iQKTBAEBCAB9FiEEZsLkTtkOMnWOfVXA0feB7/n0o7YFAl1BniZfFIAAAAAALgAo
+aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDY2
+QzJFNDRFRDkwRTMyNzU4RTdENTVDMEQxRjc4MUVGRjlGNEEzQjYACgkQ0feB7/n0
+o7ahww//auRw72e8YFZr47EKU5QgBPF09Sno4320t9rtSpRPoAVLdfkhnsmwxiA7
+sqV/5hT0NkWtNVee5RsxzVkW4s45I8Q0gGjqD+WGc5qP4iNKYflUgSiXXLlQ1MY8
+IsIkofRPit6XmjG1QAdjftwiZREZH8c1hlHPZB0UHwOMoZMH0GWUljhS02kK4gK6
+8WK5WUYCN29i8SvTGE7rCQOp3hdIcwRApM4fciERbNK3bqUsmLb8R7qRj1CvqrXL
+B971GLypt1PNFuBMQPd/iU/sasrZY2ncU3rO0wOcvAoUSmc3qIx/SjUA/e9CdJNN
+uXw4tCXRptC+a8Z0hvTGtlN9SWHr5hxSlv9au3GgfGPSFnVDXiZuKbObRzvkzeLs
+YuWhULl6IZMOd5hhhyjI3Ct7M14+yIvxj4DsU+sXni3qrHT82/9hWVZrBydRF0tJ
+5wp0B4vaf78cekw+NKmevxa3BXAGAlpRRfRnu4Cx4TDv2O9kLzG7/oPEIWHhStYw
+sDyaxH6qM1CTroIcYOT9NQfdtZU4RjdL5Lcf15zB+ZcYHzmupZbd6JIczXqggl4g
+MGwr+O8axkwzRoiHr0q2WQNHUIMrtFrbunkxzvhNKkSsBE361SLO6r+9Qp57Sy3w
+mb/ulSHGYEGmICbh03Z/oHalpw7BE78xCB/7IhA8s1MR9NR1xcA=
+=Jr+Z
+-----END PGP SIGNATURE-----
diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml
index c89ecc4..59b0429 100644
--- a/dev-db/mysql/metadata.xml
+++ b/dev-db/mysql/metadata.xml
@@ -15,7 +15,6 @@
<flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
<flag name="latin1">Use LATIN1 encoding instead of UTF8</flag>
<flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</pkg></flag>
- <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag>
<flag name="max-idx-128">Raise the max index per table limit from 64 to 128</flag>
<flag name="minimal">Install client programs only, no server</flag>
<flag name="numa">Enable NUMA support using sys-process/numactl (NUMA kernel support is also required)</flag>
diff --git a/dev-db/mysql/mysql-5.5.60-r1.ebuild b/dev-db/mysql/mysql-5.5.60-r1.ebuild
deleted file mode 100644
index 36a1e5f..0000000
--- a/dev-db/mysql/mysql-5.5.60-r1.ebuild
+++ /dev/null
@@ -1,791 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20180628-0201Z"
-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://cdn.mysql.com/Downloads/MySQL-5.5/${P}.tar.gz
- https://downloads.mysql.com/archives/MySQL-5.5/${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://mysql.com/"
-DESCRIPTION="An enhanced, drop-in replacement for MySQL"
-LICENSE="GPL-2"
-SLOT="0/${SUBSLOT:-0}"
-IUSE="bindist client-libs debug extraengine jemalloc latin1 libressl
- +perl profiling selinux +server static static-libs systemtap tcmalloc
- test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="!bindist? ( bindist ) libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc )
- static? ( yassl )"
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~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_mysql_config_cleanup-5.5.patch"
- "${MY_PATCH_DIR}/02040_all_embedded-library-shared-5.5.10.patch"
- "${MY_PATCH_DIR}/20001_all_fix-minimal-build-cmake-mysql-5.5.41.patch"
- "${MY_PATCH_DIR}/20002_all_mysql-va-list.patch"
- "${MY_PATCH_DIR}/20006_all_cmake_elib-mysql-5.5.53.patch"
- "${MY_PATCH_DIR}/20007_all_cmake-debug-werror-5.6.22.patch"
- "${MY_PATCH_DIR}/20008_all_mysql-tzinfo-symlink-5.6.37.patch"
- "${MY_PATCH_DIR}/20009_all_mysql_myodbc_symbol_fix-5.5.38.patch"
- "${MY_PATCH_DIR}/20018_all_mysql-5.5.60-without-clientlibs-tools.patch"
- "${MY_PATCH_DIR}/20027_all_mysql-5.5-perl5.26-includes.patch"
- "${MY_PATCH_DIR}/20030_all_mysql-5.5-fix-client-mysql-type.patch"
-)
-
-# Be warned, *DEPEND are version-dependant
-# These are used for both runtime and compiletime
-COMMON_DEPEND="
- kernel_linux? (
- sys-process/procps:0=
- dev-libs/libaio:0=
- )
- >=sys-apps/sed-4
- >=sys-apps/texinfo-4.7-r1
- jemalloc? ( dev-libs/jemalloc:0= )
- tcmalloc? ( dev-util/google-perftools:0= )
- systemtap? ( >=dev-util/systemtap-1.3:0= )
- !yassl? (
- !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 )
- libressl? ( dev-libs/libressl:0= )
- )
- >=sys-libs/zlib-1.2.3:0=
- sys-libs/ncurses:0=
- !bindist? (
- >=sys-libs/readline-4.1:0=
- )
- !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/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- ${COMMON_DEPEND}
- perl? ( !dev-db/mytop
- virtual/perl-Getopt-Long
- dev-perl/TermReadKey
- virtual/perl-Term-ANSIColor
- virtual/perl-Time-HiRes )
-"
-# For other stuff to bring us in
-# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
-PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
-
-pkg_setup() {
- if [[ ${MERGE_TYPE} != binary ]] ; then
- local GCC_MAJOR_SET=$(gcc-major-version)
- local GCC_MINOR_SET=$(gcc-minor-version)
- # 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 [[ -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
-
- if use jemalloc; then
- echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${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
-
- if use libressl ; then
- sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
- "${S}/cmake/ssl.cmake" || die
- fi
-
- local plugin
- local server_plugins=( semisync )
- local test_plugins=( audit_null 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
-
- # Don't build example
- _disable_engine example
- _disable_engine ndb
-
- cmake-utils_src_prepare
-}
-
-src_configure(){
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr"
- -DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/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)
- -DWITH_ZLIB=system
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${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)
- -DENABLE_DTRACE=$(usex systemtap)
- )
- if use test ; then
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
- else
- mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
- fi
-
- if ! use yassl ; then
- mycmakeargs+=( -DWITH_SSL=system )
- else
- mycmakeargs+=( -DWITH_SSL=bundled )
- fi
-
- if use 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
-
- 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+=(
- -DINSTALL_SQLBENCHDIR=share/mysql
- -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
-
- # 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
- 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 mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MySQL 5.5 for now and are believed to be
- # false positives:
- #
- # main.mysql_client_test, main.mysql_client_test_nonblock
- # main.mysql_client_test_comp:
- # segfaults at random under Portage only, suspect resource limits.
-
- local t
- for t in main.mysql_client_test main.mysql_client_test_nonblock \
- main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \
- main.mysqlhotcopy_archive main.mysqlhotcopy_myisam main.openssl_1 \
- rpl.rpl_semi_sync_uninstall_plugin ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- if ! use client-libs ; then
- _disable_test main.plugin_auth "Needs client libraries built"
- fi
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
- retstatus_tests=$?
-
- popd > /dev/null || die
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- local failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-}
-
-mysql_init_vars() {
- MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_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 http://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR}/mysqld-help"
- "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in 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
- # http://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/mysql/scripts/mysql_install_db" )
- [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
- cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT}/usr/sbin/mysqld \
- ${options} \
- --log-warnings=0 \
- --basedir=${EROOT}/usr \
- --datadir=${ROOT}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile}
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- if [[ -n "${sqltmp}" ]] ; then
- ebegin "Loading \"zoneinfo\", this step may require a few seconds"
- "${EROOT}/usr/bin/mysql" \
- "--socket=${socket}" \
- -hlocalhost \
- -uroot \
- --password="${MYSQL_ROOT_PASSWORD}" \
- mysql < "${sqltmp}"
- rc=$?
- eend $?
- [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
- fi
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mysql/mysql-5.6.30.ebuild b/dev-db/mysql/mysql-5.6.30.ebuild
deleted file mode 100644
index 5979eb8..0000000
--- a/dev-db/mysql/mysql-5.6.30.ebuild
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-MY_EXTRAS_VER="20160212-0233Z"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-HAS_TOOLS_PATCH="1"
-SUBSLOT="18"
-
-inherit mysql-multilib-r1
-# only to make repoman happy. it is really set in the eclass
-IUSE="$IUSE"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )"
-RDEPEND="${RDEPEND}"
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-# validate_password plugin uses exceptions when it shouldn't yet (until 5.7)
-# disable until we see what happens with it
-MYSQL_CMAKE_NATIVE_DEFINES=( -DWITHOUT_VALIDATE_PASSWORD=1 )
-
-src_prepare() {
- mysql-multilib-r1_src_prepare
- if use libressl ; then
- sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
- "${S}/cmake/ssl.cmake" || die
- fi
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
- if ! multilib_is_native_abi ; then
- einfo "Server tests not available on non-native abi".
- return 0;
- fi
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- # 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 use server ; then
-
- 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 && eerror "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
- addpredict /this-dir-does-not-exist/t9.MYI
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
- [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
- # 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 right out of order
- mkdir -p "${T}"/var-tests{,/log}
-
- # create symlink for the tests to find mysql_tzinfo_to_sql
- ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
- # These are failing in MySQL 5.5/5.6 for now and are believed to be
- # false positives:
- #
- # main.information_schema, binlog.binlog_statement_insert_delayed,
- # funcs_1.is_triggers funcs_1.is_tables_mysql,
- # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
- # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
- # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
- # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
- # fails due to USE=-latin1 / utf8 default
- #
- # main.mysql_client_test:
- # segfaults at random under Portage only, suspect resource limits.
- #
- # rpl.rpl_plugin_load
- # fails due to included file not listed in expected result
- # appears to be poor planning
- #
- # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
- # fails due to bad cleanup of previous tests when run in parallel
- # The tool is deprecated anyway
- # Bug 532288
- for t in \
- binlog.binlog_mysqlbinlog_filter \
- binlog.binlog_statement_insert_delayed \
- funcs_1.is_columns_mysql \
- funcs_1.is_tables_mysql \
- funcs_1.is_triggers \
- main.information_schema \
- main.mysql_client_test \
- main.mysqld--help-notwin \
- perfschema.binlog_edge_mix \
- perfschema.binlog_edge_stmt \
- rpl.rpl_plugin_load \
- main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
- ; do
- mysql-multilib-r1_disable_test "$t" "False positives in Gentoo"
- done
-
- if ! use extraengine ; then
- # bug 401673, 530766
- for t in federated.federated_plugin ; do
- mysql-multilib-r1_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)"
- done
- fi
-
- # Run mysql tests
- pushd "${TESTDIR}"
-
- # Set file limits higher so tests run
- ulimit -n 3000
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
- --suite-timeout=5000 --reorder
- retstatus_tests=$?
- [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
- has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
- popd
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
- has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-
- else
- einfo "Skipping server tests due to minimal build."
- fi
-}
diff --git a/dev-db/mysql/mysql-5.6.40-r1.ebuild b/dev-db/mysql/mysql-5.6.40-r1.ebuild
deleted file mode 100644
index 3851573..0000000
--- a/dev-db/mysql/mysql-5.6.40-r1.ebuild
+++ /dev/null
@@ -1,768 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-MY_EXTRAS_VER="20180628-0201Z"
-
-CMAKE_MAKEFILE_GENERATOR=emake
-
-# 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="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
- https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
- http://downloads.mysql.com/archives/MySQL-5.6/${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://www.mysql.com/"
-DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
-LICENSE="GPL-2"
-SLOT="0/18"
-IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
- +server static static-libs systemtap tcmalloc test yassl"
-
-# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
-RESTRICT="libressl? ( test )"
-
-REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
-
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# Shorten the path because the socket path length must be shorter than 107 chars
-# and we will run a mysql server during test phase
-S="${WORKDIR}/mysql"
-
-if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
- inherit git-r3
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
- EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
- EGIT_CLONE_TYPE=shallow
- MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-else
- MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
-fi
-
-PATCHES=(
- "${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
- "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
- "${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
- "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
- "${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
- "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
- "${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
- "${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
- "${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.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=
- )
- net-misc/curl
- >=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.0.0:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- >=sys-libs/zlib-1.2.3:0=
- sys-libs/ncurses:0=
- server? (
- numa? ( sys-process/numactl )
- )
- !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/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
- server? ( !prefix? ( dev-db/mysql-init-scripts ) )
- ${COMMON_DEPEND}
-"
-# 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)
- # 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_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
-}
-
-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 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
-
- 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
-
- local plugin
- local server_plugins=( semisync )
- local test_plugins=( audit_null 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
-
- # Don't build example
- _disable_engine example
- _disable_engine ndb
- _disable_plugin innodb_memcached
-
- cmake-utils_src_prepare
-}
-
-src_configure(){
- # bug 508724 mariadb cannot use ld.gold
- tc-ld-disable-gold
- # Bug #114895, bug #110149
- filter-flags "-O" "-O[01]"
-
- append-cxxflags -felide-constructors
-
- # bug #283926, with GCC4.4, this is required to get correct behavior.
- append-flags -fno-strict-aliasing
-
- CMAKE_BUILD_TYPE="RelWithDebInfo"
-
- # debug hack wrt #497532
- mycmakeargs=(
- -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
- -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
- -DSYSCONFDIR="${EPREFIX}/etc/mysql"
- -DINSTALL_BINDIR=bin
- -DINSTALL_DOCDIR=share/doc/${PF}
- -DINSTALL_DOCREADMEDIR=share/doc/${PF}
- -DINSTALL_INCLUDEDIR=include/mysql
- -DINSTALL_INFODIR=share/info
- -DINSTALL_LIBDIR=$(get_libdir)
- -DINSTALL_MANDIR=share/man
- -DINSTALL_MYSQLSHAREDIR=share/mysql
- -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
- -DINSTALL_SCRIPTDIR=share/mysql/scripts
- -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
- -DINSTALL_SBINDIR=sbin
- -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
- -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
- -DWITH_UNIT_TESTS=$(usex test ON OFF)
- ### TODO: make this system but issues with UTF-8 prevent it
- -DWITH_EDITLINE=bundled
- -DWITH_ZLIB=system
- -DWITH_LIBWRAP=0
- -DENABLED_LOCAL_INFILE=1
- -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
- -DWITH_DEFAULT_COMPILER_OPTIONS=0
- -DWITH_DEFAULT_FEATURE_SET=0
- # The build forces this to be defined when cross-compiling. We pass it
- # all the time for simplicity and to make sure it is actually correct.
- -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
- -DWITH_LIBEVENT=NO
- -DWITHOUT_CLIENTLIBS=YES
- -DENABLE_DTRACE=$(usex systemtap)
- -DWITH_SSL=$(usex yassl bundled system)
- -DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
- -DWITHOUT_VALIDATE_PASSWORD=1
- )
-
- if use server ; then
-
- 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+=(
- -DWITH_NUMA=$(usex numa ON OFF)
- -DEXTRA_CHARSETS=all
- -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
-
- # 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
- -DWITH_INNODB_MEMCACHED=0
- )
-
- else
- mycmakeargs+=(
- -DWITHOUT_SERVER=1
- -DWITH_EMBEDDED_SERVER=OFF
- -DEXTRA_CHARSETS=none
- )
- fi
-
- cmake-utils_src_configure
-}
-
-src_compile() {
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
-
- # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
- find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- # Convenience links
- einfo "Making Convenience links for mysqlcheck multi-call binary"
- dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
- dosym "mysqlcheck" "/usr/bin/mysqlrepair"
- dosym "mysqlcheck" "/usr/bin/mysqloptimize"
-
- # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
- if [[ -d "${ED}/usr/data" ]] ; then
- rm -Rf "${ED}/usr/data" || die
- fi
-
- # Unless they explicitly specific USE=test, then do not install the
- # testsuite. It DOES have a use to be installed, esp. when you want to do a
- # validation of your database configuration after tuning it.
- if ! use test ; then
- rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
- fi
-
- # Configuration stuff
- einfo "Building default configuration ..."
- insinto "${MY_SYSCONFDIR#${EPREFIX}}"
- [[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf
- local mycnf_src="my.cnf-5.6"
- sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
- "${FILESDIR%/}/${mycnf_src}" \
- > "${TMPDIR%/}/my.cnf.ok" || die
- use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
- if use latin1 ; then
- sed -i \
- -e "/character-set/s|utf8|latin1|g" \
- "${TMPDIR%/}/my.cnf.ok" || die
- fi
- eprefixify "${TMPDIR%/}/my.cnf.ok"
- newins "${TMPDIR}/my.cnf.ok" my.cnf
-
- if use server ; then
- einfo "Including support files and sample configurations"
- docinto "support-files"
- local script
- for script in \
- "${S}"/support-files/magic
- do
- [[ -f "$script" ]] && dodoc "${script}"
- done
-
- docinto "scripts"
- for script in "${S}"/scripts/mysql* ; do
- [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
- done
- 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='perl server static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-src_test() {
-
- _disable_test() {
- local rawtestname reason
- rawtestname="${1}" ; shift
- reason="${@}"
- ewarn "test '${rawtestname}' disabled: '${reason}'"
- echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
- }
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- if ! use server ; then
- einfo "Skipping server tests due to minimal build."
- return 0
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [[ $UID -eq 0 ]]; then
- die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
- fi
- has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
-
- # Ensure that parallel runs don't die
- export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
- # Enable parallel testing, auto will try to detect number of cores
- # You may set this by hand.
- # The default maximum is 8 unless MTR_MAX_PARALLEL is increased
- export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
-
- # create directories because mysqladmin might run out of order
- mkdir -p "${T}"/var-tests{,/log} || die
-
- # Run mysql tests
- pushd "${TESTDIR}" > /dev/null || die
-
- touch "${T}/disabled.def"
- # These are failing in MySQL 5.7 for now and are believed to be
- # false positives:
- #
- local t
-
- for t in auth_sec.keyring_udf federated.federated_plugin ; do
- _disable_test "$t" "False positives in Gentoo"
- done
-
- # 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/mysql"}
- MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"}
- MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"}
- MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"}
-
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=""
- if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
- MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
- | sed -e 's/.*=\s*//' \
- | tail -n1`
- fi
- fi
- if [[ -z "${MY_DATADIR}" ]] ; then
- MY_DATADIR="${MY_LOCALSTATEDIR}"
- einfo "Using default MY_DATADIR"
- fi
- elog "MySQL MY_DATADIR is ${MY_DATADIR}"
-
- if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
- if [[ -e "${MY_DATADIR}" ]] ; then
- # If you get this and you're wondering about it, see bug #207636
- elog "MySQL datadir found in ${MY_DATADIR}"
- elog "A new one will not be created."
- PREVIOUS_DATADIR="yes"
- else
- PREVIOUS_DATADIR="no"
- fi
- export PREVIOUS_DATADIR
- fi
- else
- if [[ ${EBUILD_PHASE} == "config" ]]; then
- local new_MY_DATADIR
- new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
- | sed -ne '/datadir/s|^--datadir=||p' \
- | tail -n1`
-
- if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
- ewarn "MySQL MY_DATADIR has changed"
- ewarn "from ${MY_DATADIR}"
- ewarn "to ${new_MY_DATADIR}"
- MY_DATADIR="${new_MY_DATADIR}"
- fi
- fi
- fi
-
- export MY_SHAREDSTATEDIR MY_SYSCONFDIR
- export MY_LOCALSTATEDIR MY_LOGDIR
- export MY_DATADIR
-}
-
-pkg_config() {
- _getoptval() {
- local mypd="${EROOT%/}"/usr/bin/my_print_defaults
- local section="$1"
- local flag="--${2}="
- local extra_options="${3}"
- "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
- }
- local old_MY_DATADIR="${MY_DATADIR}"
- local old_HOME="${HOME}"
- # my_print_defaults needs to read stuff in $HOME/.my.cnf
- export HOME=${EPREFIX%/}/root
-
- # Make sure the vars are correctly initialized
- mysql_init_vars
-
- [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
- if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then
- die "Minimal builds do NOT include the MySQL server"
- fi
-
- if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
- local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}"
- MY_DATADIR_s="${MY_DATADIR_s%%/}"
- local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}"
- old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
-
- if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
- ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
- else
- elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
- mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
- || die "Moving MY_DATADIR failed"
- fi
- else
- ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
- if [[ -d "${MY_DATADIR_s}" ]]; then
- ewarn "Attempting to use ${MY_DATADIR_s}"
- else
- eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
- die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
- fi
- fi
- fi
-
- local pwd1="a"
- local pwd2="b"
- local maxtry=15
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
- local tmp_mysqld_password_source=
-
- for tmp_mysqld_password_source in mysql client; do
- einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
- if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
- if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
- ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
- MYSQL_ROOT_PASSWORD=
- continue
- fi
-
- einfo "Found password in '${tmp_mysqld_password_source}' section!"
- break
- fi
- done
-
- # Sometimes --show is required to display passwords in some implementations of my_print_defaults
- if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
- MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
- fi
-
- unset tmp_mysqld_password_source
- fi
- MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)"
- # These are dir+prefix
- MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
- MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
- MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
- MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
-
- if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]]; then
- einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
- install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
- fi
- if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]]; then
- einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
- install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN"
- fi
- if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]]; then
- einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
- install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG"
- fi
-
- if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then
- ewarn "You have already a MySQL database in place."
- ewarn "(${ROOT%/}/${MY_DATADIR}/*)"
- ewarn "Please rename or delete it if you wish to replace it."
- die "MySQL database already exists!"
- fi
-
- # Bug #213475 - MySQL _will_ object strenously if your machine is named
- # localhost. Also causes weird failures.
- [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
-
- if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
-
- einfo "Please provide a password for the mysql 'root' user now"
- einfo "or through the ${HOME}/.my.cnf file."
- ewarn "Avoid [\"'\\_%] characters in the password"
- read -rsp " >" pwd1 ; echo
-
- einfo "Retype the password"
- read -rsp " >" pwd2 ; echo
-
- if [[ "x$pwd1" != "x$pwd2" ]] ; then
- die "Passwords are not the same"
- fi
- MYSQL_ROOT_PASSWORD="${pwd1}"
- unset pwd1 pwd2
- fi
-
- local options
- local sqltmp="$(emktemp)"
-
- # Fix bug 446200. Don't reference host my.cnf, needs to come first,
- # see http://bugs.mysql.com/bug.php?id=31312
- use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
-
- # Figure out which options we need to disable to do the setup
- local helpfile="${TMPDIR%/}/mysqld-help"
- "${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
- for opt in host-cache name-resolve networking slave-start \
- federated ssl log-bin relay-log slow-query-log external-locking \
- log-slave-updates \
- ; do
- optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
- egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
- done
-
- einfo "Creating the mysql database and setting proper permissions on it ..."
-
- # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
- PID_DIR="${EROOT%/}/var/run/mysqld"
- if [[ ! -d "${PID_DIR}" ]]; then
- install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
- fi
-
- if [[ ! -d "${MY_DATADIR}" ]]; then
- install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
- fi
-
- pushd "${TMPDIR}" &>/dev/null || die
-
- # Filling timezones, see
- # http://dev.mysql.com/doc/mysql/en/time-zone-support.html
- echo "USE mysql;" >"${sqltmp}"
- "${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
- chown mysql "${sqltmp}" || die
-
- # --initialize-insecure will not set root password
- # --initialize would set a random one in the log which we don't need as we set it ourselves
- local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
- cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" )
- einfo "Command: ${cmd[*]}"
- su -s /bin/sh -c "${cmd[*]}" mysql \
- >"${TMPDIR%/}"/mysql_install_db.log 2>&1
- if [ $? -ne 0 ]; then
- grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2
- die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log"
- fi
- popd &>/dev/null || die
- [[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \
- || die "MySQL databases not installed"
-
- use prefix || options="${options} --user=mysql"
-
- local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock"
- local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid"
- local mysqld="${EROOT%/}/usr/sbin/mysqld \
- ${options} \
- $(use prefix || echo --user=mysql) \
- --log-warnings=0 \
- --basedir=${EROOT%/}/usr \
- --datadir=${ROOT%/}/${MY_DATADIR} \
- --max_allowed_packet=8M \
- --net_buffer_length=16K \
- --socket=${socket} \
- --pid-file=${pidfile}
- --tmpdir=${ROOT}/${MYSQL_TMPDIR}"
- #einfo "About to start mysqld: ${mysqld}"
- ebegin "Starting mysqld"
- einfo "Command ${mysqld}"
- ${mysqld} &
- rc=$?
- while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
- maxtry=$((${maxtry}-1))
- echo -n "."
- sleep 1
- done
- eend $rc
-
- if ! [[ -S "${socket}" ]]; then
- die "Completely failed to start up mysqld with: ${mysqld}"
- fi
-
- ebegin "Setting root password"
- # Do this from memory, as we don't want clear text passwords in temp files
- local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
- "${EROOT%/}/usr/bin/mysql" \
- --no-defaults \
- "--socket=${socket}" \
- -hlocalhost \
- -e "${sql}"
- eend $?
-
- # Stop the server and cleanup
- einfo "Stopping the server ..."
- kill $(< "${pidfile}" )
- rm -f "${sqltmp}"
- wait %1
- einfo "Done"
-}
diff --git a/dev-db/mysql/mysql-5.7.17.ebuild b/dev-db/mysql/mysql-5.7.17.ebuild
deleted file mode 100644
index ef830b3..0000000
--- a/dev-db/mysql/mysql-5.7.17.ebuild
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-MY_EXTRAS_VER="live"
-MY_PV="${PV//_alpha_pre/-m}"
-MY_PV="${MY_PV//_/-}"
-SUBSLOT="20"
-SERVER_URI="https://cdn.mysql.com/archives/${PN}-5.7/${PN}-boost-${MY_PV}.tar.gz"
-MY_SOURCEDIR="${PN}-${MY_PV}"
-inherit mysql-multilib-r1
-
-IUSE="cjk"
-
-# REMEMBER: also update eclass/mysql*.eclass before committing!
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
-
-# When MY_EXTRAS is bumped, the index should be revised to exclude these.
-EPATCH_EXCLUDE=''
-
-DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
- >=app-arch/lz4-0_p131:=
- >=dev-libs/protobuf-2.5.0:=
- cjk? ( app-text/mecab )"
-RDEPEND="${RDEPEND}"
-
-MY_PATCH_DIR="${WORKDIR}/mysql-extras"
-
-PATCHES=(
- "${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
- "${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-5.7.patch
- "${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.7.patch
- "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
- "${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.7.6.patch
- "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
- "${MY_PATCH_DIR}"/20018_all_mysql-5.7-without-clientlibs-tools.patch
-)
-
-# Please do not add a naive src_unpack to this ebuild
-# If you want to add a single patch, copy the ebuild to an overlay
-# and create your own mysql-extras tarball, looking at 000_index.txt
-
-src_prepare() {
- mysql-multilib-r1_src_prepare
- if use libressl ; then
- sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
- "${S}/cmake/ssl.cmake" || die
- fi
- # Remove dozens of test only plugins by deleting them
- if ! use test ; then
- rm -r "${S}"/plugin/{test_service_sql_api,test_services,udf_services} || die
- fi
- # Remove CJK Fulltext plugin
- if ! use cjk ; then
- rm -r "${S}"/plugin/fulltext || die
- fi
-}
-
-src_configure() {
- local MYSQL_CMAKE_NATIVE_DEFINES=(
- -DWITH_LZ4=system
- -DWITH_NUMA=OFF
- -DWITH_BOOST="${S}/boost/boost_1_59_0"
- -DWITH_PROTOBUF=system
- )
- # This is the CJK fulltext plugin, not related to the complete fulltext indexing
- if use cjk ; then
- MYSQL_CMAKE_NATIVE_DEFINES+=( -DWITH_MECAB=system )
- else
- MYSQL_CMAKE_NATIVE_DEFINES+=( -DWITHOUT_FULLTEXT=1 )
- fi
- mysql-multilib-r1_src_configure
-}
-
-# Official test instructions:
-# USE='server embedded extraengine perl openssl static-libs' \
-# FEATURES='test userpriv -usersandbox' \
-# ebuild mysql-X.X.XX.ebuild \
-# digest clean package
-multilib_src_test() {
-
- if ! multilib_is_native_abi ; then
- einfo "Server tests not available on non-native abi".
- return 0;
- fi
-
- local TESTDIR="${BUILD_DIR}/mysql-test"
- local retstatus_unit
- local retstatus_tests
-
- # 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 use server ; then
-
- 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 && eerror "Some tests may fail with FEATURES=usersandbox"
-
- einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
- addpredict /this-dir-does-not-exist/t9.MYI
-
- # Run CTest (test-units)
- cmake-utils_src_test
- retstatus_unit=$?
- [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed"
-
- # 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 right out of order
- mkdir -p "${T}"/var-tests{,/log}
-
- # create symlink for the tests to find mysql_tzinfo_to_sql
- ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/"
-
- # These are failing in MySQL 5.5/5.6 for now and are believed to be
- # false positives:
- #
- # main.information_schema, binlog.binlog_statement_insert_delayed,
- # funcs_1.is_triggers funcs_1.is_tables_mysql,
- # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter,
- # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt,
- # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql
- # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter
- # fails due to USE=-latin1 / utf8 default
- #
- # main.mysql_client_test:
- # segfaults at random under Portage only, suspect resource limits.
- #
- # rpl.rpl_plugin_load
- # fails due to included file not listed in expected result
- # appears to be poor planning
- #
- # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam
- # fails due to bad cleanup of previous tests when run in parallel
- # The tool is deprecated anyway
- # Bug 532288
- #
- # main.events2
- # Event creation is in the past and automatically dropped
- for t in \
- binlog.binlog_mysqlbinlog_filter \
- binlog.binlog_statement_insert_delayed \
- funcs_1.is_columns_mysql \
- funcs_1.is_tables_mysql \
- funcs_1.is_triggers \
- main.information_schema \
- main.mysql_client_test \
- main.mysqld--help-notwin \
- perfschema.binlog_edge_mix \
- perfschema.binlog_edge_stmt \
- rpl.rpl_plugin_load \
- main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \
- main.events_2 \
- ; do
- mysql-multilib-r1_disable_test "$t" "False positives in Gentoo"
- done
-
- if ! use extraengine ; then
- # bug 401673, 530766
- for t in federated.federated_plugin ; do
- mysql-multilib-r1_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)"
- done
- fi
-
- if ! use cjk ; then
- for t in innodb_fts.ngram_2 innodb_fts.ngram_1 innodb_fts.ngram ; do
- mysql-multilib-r1_disable_test "$t" "Test $t requires USE=cjk"
- done
- fi
-
- # Run mysql tests
- pushd "${TESTDIR}"
-
- # Set file limits higher so tests run
-# ulimit -n 3000
-
- # run mysql-test tests
- perl mysql-test-run.pl --force --vardir="${T}/var-tests" \
- --suite-timeout=5000 --reorder
- retstatus_tests=$?
- [[ $retstatus_tests -eq 0 ]] || eerror "tests failed"
- has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
- popd
-
- # Cleanup is important for these testcases.
- pkill -9 -f "${S}/ndb" 2>/dev/null
- pkill -9 -f "${S}/sql" 2>/dev/null
-
- failures=""
- [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
- [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
- has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox"
-
- [[ -z "$failures" ]] || die "Test failures: $failures"
- einfo "Tests successfully completed"
-
- else
- einfo "Skipping server tests due to minimal build."
- fi
-}