diff options
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/Manifest.gz | bin | 17772 -> 17771 bytes | |||
-rw-r--r-- | dev-db/myodbc/Manifest | 3 | ||||
-rw-r--r-- | dev-db/myodbc/files/myodbc-8.0.19-cxxlinkage.patch | 27 | ||||
-rw-r--r-- | dev-db/myodbc/myodbc-8.0.19.ebuild | 118 | ||||
-rw-r--r-- | dev-db/mysql/Manifest | 2 | ||||
-rw-r--r-- | dev-db/mysql/mysql-8.0.19-r1.ebuild (renamed from dev-db/mysql/mysql-8.0.19.ebuild) | 19 | ||||
-rw-r--r-- | dev-db/percona-server/Manifest | 10 | ||||
-rw-r--r-- | dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild | 1108 | ||||
-rw-r--r-- | dev-db/percona-server/percona-server-8.0.18.9.ebuild (renamed from dev-db/percona-server/percona-server-8.0.17.8.ebuild) | 85 | ||||
-rw-r--r-- | dev-db/percona-toolkit/Manifest | 3 | ||||
-rw-r--r-- | dev-db/percona-toolkit/files/percona-toolkit-3.1.0-drop-swap-gentoo-mariadb-fix.patch | 33 | ||||
-rw-r--r-- | dev-db/percona-toolkit/percona-toolkit-3.1.0-r1.ebuild (renamed from dev-db/percona-toolkit/percona-toolkit-3.1.0.ebuild) | 3 |
12 files changed, 256 insertions, 1155 deletions
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz Binary files differindex ec9f9192753d..02e5a4b5481a 100644 --- a/dev-db/Manifest.gz +++ b/dev-db/Manifest.gz diff --git a/dev-db/myodbc/Manifest b/dev-db/myodbc/Manifest index 6ab46cdbe307..3dedeaedbd2e 100644 --- a/dev-db/myodbc/Manifest +++ b/dev-db/myodbc/Manifest @@ -4,6 +4,7 @@ AUX 5.3.10-mariadb.patch 1744 BLAKE2B a9e33c86f999394d77757f69f1f314238123fa4158 AUX 8.0-cmake-doc-path.patch 1384 BLAKE2B 96f2bb290e48363c9cfababb845732291f709a4f996f13ea39cb2dd5fc0a19a68dd87cbf3454fd48c5f2281ebb0f786f2415b6e45f5714c967e5ba5b5005bd5d SHA512 d2a007d9c6846ad22a1f43c621f0376085802f3b15ca846fa1dd5bc8c3fb6ec1dc913240cb1135ab16f9dd369c8680aba5f600c7d28660dd28bb06873d97cce3 AUX 8.0.16-cxxlinkage.patch 1890 BLAKE2B 0b19115acada4abea75466891cced6979011736de9a64686b8ef5ec1f9bfad8c6297ac48f26d3297f24b6817cfaced033a3d42120bfb948cc1e9e7204665abc4 SHA512 460aad29170b8694cc6776553fef8ac15ca715f7dceea392f4a0c75fef98ac6e7a40cdd57c86ae4bcd216b942fa0a2ea92862defc54f8466ea32c74f6a6832e5 AUX cmake-doc-path.patch 1498 BLAKE2B b79110c92b7fc80c64fdf05b469c4bb333d68610ff4fadc78bd307689651e41bcd66f33fd782db1b69c863ef81faee3d5eb485d5c9bd284db8be3948d2bec7e7 SHA512 2e48af11efb55a1508402d5d1d717a3dfc9897bf0ccce5aa190792fb673ac78b27a9480e951a6347a2c8d0e2fe08a28c11fd08c55dbea835a93f525decaaf09e +AUX myodbc-8.0.19-cxxlinkage.patch 812 BLAKE2B 18e0f62ceb6bb33ad282972a8aae2f755c0324dbff09b450230d7eafb054a37b2f2ea47d6ab9eed42b0ce0682383c6a9e00d222dd5d7c81bb0ea4f4fe470808e SHA512 f4eb1f8c2182a1a6002548a3ef1fa37e859613b8ab31c67c34d6d7f237f435fe2cdada05e75a518d67c05175e5a6535ece55541bfde477df9820a871e83347d3 AUX odbc.ini.m4 406 BLAKE2B 3a20c28b1971753a14a4aa4d30efcc7de833488501a41d9404987567623d48250ce1daea1d3138adaef36741c4f2e0eafc60eba554e5262b45084f93f5205160 SHA512 84ab2a3aab594123d42b65205a7faf8e91fe9416a9e3c4c4c354533b9a298395f59172649c91dc0b671392bfbe5baeaddb6aa47119ce4c825917f3977d9dd521 AUX odbcinst.ini.m4 118 BLAKE2B 6da835746e063f415ad7d640233cfd96e744cd56e12aaab4a21a2bf0bd5f1bd1e5c3d1c9a28522e3aa07c1261abac92301819d4112ac6a000a729aca9f7f7ad6 SHA512 6d929bbffd602a9f060a05998149a6b16334f8a5e3db30d02ff5d38c0065085d085042521e700b87a63766e32aa27ae92be72cef33c2a7aa8f6767b6b71c82c8 DIST mysql-connector-odbc-5.3.10-src.tar.gz 2646571 BLAKE2B e85e179ee8a54c8c98dd254e949c08227adc72141d52bc15935eafd60edaf95f47c12ca51fa9472ae29c761d5de2149277c58e6d3f02a566668be17f595ca7ba SHA512 ebe56b95a1690332959a7a37e8ed381b46730fb9f6fbd6522ddc1a6961e4c8cdac59681a957b33abeb6cae12f210278e4063daa59ce952d92acf427bc188e22b @@ -11,8 +12,10 @@ DIST mysql-connector-odbc-5.3.9-linux-debian9-x86-32bit.tar.gz 11501665 BLAKE2B DIST mysql-connector-odbc-5.3.9-linux-debian9-x86-64bit.tar.gz 12013057 BLAKE2B e372cfb6ca49f9f01e9e60d7cd497fc009ec38dee76ca2cfb74cc95213b84ef1eebca85e1400f19c9715c0f9b2ef40fc212196e14189f5506be8d0e887507ce4 SHA512 b54ca167f762b4d8b988b4a91f14dc6a4bf49f55bc639ce8eecc9eba6c11400bd3494d74ef77ebe3348bdefd8fb5b8c1b62b3a6beebb926a1899da17ea4a1b44 DIST mysql-connector-odbc-8.0.16-src.tar.gz 3986610 BLAKE2B c91760f8e0352a57adb5400700d22f52f70d5210d85ff0932f5288f19c917c771ce9ea9abad097d27a9723c585d1029d56c09f6865f634f9c41ad852690e016d SHA512 b7ddcdf635441bc3ed0325a8562f453e42d3c9768b0fe0b42d9b5417e268f4631e3fca3c2adc417c124ede37254c7b1890c792593d846ecaf5b158ce4b4808cd DIST mysql-connector-odbc-8.0.17-src.tar.gz 3953949 BLAKE2B 6d7fcef89c15d9f421f690291e793f1020b5f77f5e2132f130becd1ceed041887ffce77fda4cbc411d06972f1d488d434c8f132c0778af30a436c6b6e372e59e SHA512 474b107eb5d4c23e10c24dcf37b3787418afbd34ea385791fd0d8cdb5d29a6770cde4a61e3591329b344c442ff8f6daad3a2c250e881f9f5837eaa4e951af7e4 +DIST mysql-connector-odbc-8.0.19-src.tar.gz 3770465 BLAKE2B 7c57d85c13c17c08e1aed1deff3d60851ff68474c42971ea796fc50e3b766d7c49e5d993527691534c30f4007a94be852ac240bf50244cd3adf0f9500fbfc68c SHA512 4761d9d3eeccc932bfd76b9b27be4672e65b6125e85312dcfcb0b8b3cfe0ccf19982d40b2f85ae26e936e968d35d3136bab201b7dcb47eb4ad460c178c0d9f88 EBUILD myodbc-5.3.10-r3.ebuild 3591 BLAKE2B 0b7fb7976b32eb39b4e77c1d95011a623eab9ae83f02414911e7408614126a6a838d9ad8142092505c060d4142f1ac3f22f561ab6997e548999626c8c7b1e783 SHA512 73827923259949c1054f52727ec692312c37d887a6f56b8116d83dc9a91a2928ec2bacad723d9b41a32be56aea654cd94959f93237591d0aeb67df69ea563b41 EBUILD myodbc-5.3.9.ebuild 3072 BLAKE2B 4922ed231672f11742590007b7b1f5c5dfa27263a6c98893b373793da06088f29c5401917179d479f4c57b24b2a1be9c3507caa752db79f3268fceff4719013d SHA512 4da8b034a745c453a310391a38e5cb1697bfa51838edc6903ee643e7dbe28fa5fb8f7d34264f88bb79b2aba83fa042212c0a2dd251c15150f7f0a2fcf561e052 EBUILD myodbc-8.0.16.ebuild 3101 BLAKE2B 28664fd845b3bfb251e2f754c06b1b21ac1fb0ce85fbcaf620ff4ebea4ee181fe3c2f7c00ff8b47a084dc2e31a893c35f2d28e6176a4a40d508a6b0ebdfd57cd SHA512 856408b130fad4e4fc70fd48d841a2969aa85df46eeebb1d1476e5054b5d78af8e799463a7314f6db4131e4868146d6838c528b85f5bec1c569230231516a2cc EBUILD myodbc-8.0.17.ebuild 3111 BLAKE2B 4b0f0391bb0b71fc277da100630891bfca04d4ca87c3852eb728c1ba19c3de875654ee7fc1c5c66de1071f9c732c5bd2203ebd83f3654d616617895fa7a936ed SHA512 c5f960395fdb30f398dd182dafd4b75fcb6d7270ac327637e3d2fe169727cb377ee66a4e46e1a14221fc6c7aa34a617d5da636bc96f909eef772f73ec56b6a00 +EBUILD myodbc-8.0.19.ebuild 3116 BLAKE2B 7941785aa5126b62f2165795297fe91ac7267c2eb98f5ec78eac0abffd9cd54fbfa6f4d9e9f3211e053cc87dbb6ab9f541cb048377da69917067640e9ac98f19 SHA512 2a8b31e18a20f5bbb3b892fde14fe10295e1db77ae343f661ed0dd9ade3361e914db3f3b4e24760b54342edfdf28c543f08b51aec2423769b3dacd665e8903b5 MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b diff --git a/dev-db/myodbc/files/myodbc-8.0.19-cxxlinkage.patch b/dev-db/myodbc/files/myodbc-8.0.19-cxxlinkage.patch new file mode 100644 index 000000000000..f26b27417c18 --- /dev/null +++ b/dev-db/myodbc/files/myodbc-8.0.19-cxxlinkage.patch @@ -0,0 +1,27 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -454,10 +454,9 @@ endmacro() + SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin") + SET(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib") + +-SET(LIB_SUBDIR "lib") +-IF(RPM_BUILD AND CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|ppc64|ppc64p7|s390x|sparc64|aarch64)") +- SET(LIB_SUBDIR "lib64") +-ENDIF() ++IF(NOT LIB_SUBDIR) ++ MESSAGE(ERROR "LIB_SUBDIR is not set") ++ENDIF(NOT LIB_SUBDIR) + + MESSAGE(STATUS "Installation library subdir: ${LIB_SUBDIR}") + +--- a/cmake/FindMySQL.cmake ++++ b/cmake/FindMySQL.cmake +@@ -805,7 +805,7 @@ if(NOT WIN32) + endif() + + if(NOT MYSQL_CXXFLAGS) +- if(MYSQL_CXX_LINKAGE OR MYSQL_VERSION_ID GREATER 50603) ++ if(MYSQL_CXX_LINKAGE) + _mysql_conf(MYSQL_CXXFLAGS "--cxxflags") + set(MYSQL_CXX_LINKAGE 1) + else() diff --git a/dev-db/myodbc/myodbc-8.0.19.ebuild b/dev-db/myodbc/myodbc-8.0.19.ebuild new file mode 100644 index 000000000000..e6635dadba17 --- /dev/null +++ b/dev-db/myodbc/myodbc-8.0.19.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2019 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/Manifest b/dev-db/mysql/Manifest index 0b3957fda50f..6fc7245419b4 100644 --- a/dev-db/mysql/Manifest +++ b/dev-db/mysql/Manifest @@ -16,5 +16,5 @@ EBUILD mysql-5.6.44-r1.ebuild 27146 BLAKE2B f8afe1efcdaf08bf6529f931486e1ad97aef EBUILD mysql-5.6.45-r2.ebuild 27096 BLAKE2B 4185eba92b1d3455b2c9d718249a55e0a95b45f02f25ae5d65a9c3e01ad5de9bfe66793e63a2f577e3e7a9e295f40d7576070b356f6e2efcf493599f8569817e SHA512 faed98d09a85757cf2cede77fc21d83e059fcee33cfffd739f2dabe34ec905101840244f45c4bdf97f945abd79202c78b40f3b1dcc2f9edf10173741a3ea5b13 EBUILD mysql-5.7.26-r1.ebuild 31733 BLAKE2B d6e6f240727daae94a5d08773f1ec5046831c9b7faa605bcf685aac69c1a23b046a0bfba942e36779d9cbdfb616c9b847a2547b25673af7dcefc8839c6752710 SHA512 6dfe6baf03cf35e006677b7879d4c60705d57dc759608f17ac34eb0c747aa99844f7efe69c8d660dfb9863353d0ef390230972153e5901e7b527b8e59d9b4084 EBUILD mysql-5.7.27-r1.ebuild 31759 BLAKE2B 865bf492634cb00a3a373497501beeda472b477219960f012dcd74d5951e218904390039c17e5ff999a562cc12cb6bd58f0e2b0aa6efdb2e29f203171f04cecc SHA512 c0c7393a70d3be0129cba16694437f3017e97aa5f6cf8db63eb460d62ba06f5d3af8edbcb472d009f560e29ab837038dce4306bf2c2eb94f9ce026cae2204678 -EBUILD mysql-8.0.19.ebuild 36657 BLAKE2B 582e2845f196809ce1561c91c481d824af0d93ea969315ed9f0d89bfe4f21a80d69553d2714ff392bbde4c4ea44cd88581a82f96ab2def19147995c04a34620a SHA512 179a409bc1bad200a6a77a03997a1b576ee0a085637e360596f27d3364f4e795ff9a01bc784cce2450b54781f216f8a9f9971c2672bbdc7a5dbc2e07f22136e0 +EBUILD mysql-8.0.19-r1.ebuild 36980 BLAKE2B 91615a8226afde333febe3c4fc0200320a96db8b7e684c0c35a719e14b79eba026c088a80cb5c539bd029780869be9a4c92cf9c0b8eb0147aff71fa6cab09894 SHA512 e32b54b013d60919f4b4510a6f928fed842b3e8869824c3875d456a19b82fd56102a193316f7e4c8f9f6c7281e22f46165b43b108f3d4046843e45872b6cf069 MISC metadata.xml 1470 BLAKE2B 09754bc9a1cf5584588c4f69700919fd72a860175ae1c045ce90a644a1360d5abccedd5b2649e16fcd189e82df659ceb96fd71ab2aeccdac6256af4f80e46a0d SHA512 d96f6a133611f50b80116221e2586eff899210255efac58d9f6ef7ccd0ee0854a3322b4d4d1db15b3b2e410525f5d73e43f52a833f3ce358f6708b88b3cf00c7 diff --git a/dev-db/mysql/mysql-8.0.19.ebuild b/dev-db/mysql/mysql-8.0.19-r1.ebuild index 9d486bdb84a2..c07e5f83866c 100644 --- a/dev-db/mysql/mysql-8.0.19.ebuild +++ b/dev-db/mysql/mysql-8.0.19-r1.ebuild @@ -72,7 +72,7 @@ PATCHES=( # These are used for both runtime and compiletime COMMON_DEPEND=" >=app-arch/lz4-0_p131:= - dev-libs/libedit + sys-libs/ncurses:0= >=sys-libs/zlib-1.2.3:0= libressl? ( dev-libs/libressl:0= ) !libressl? ( >=dev-libs/openssl-1.0.0:0= ) @@ -82,12 +82,12 @@ COMMON_DEPEND=" >=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 ) - jemalloc? ( dev-libs/jemalloc:0= ) tcmalloc? ( dev-util/google-perftools:0= ) ) " @@ -239,7 +239,8 @@ src_configure(){ -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql" -DCOMPILATION_COMMENT="Gentoo Linux ${PF}" -DWITH_UNIT_TESTS=$(usex test ON OFF) - -DWITH_EDITLINE=system + # Using bundled editline to get CTRL+C working + -DWITH_EDITLINE=bundled -DWITH_ZLIB=system -DWITH_SSL=system -DWITH_LIBWRAP=0 @@ -255,6 +256,18 @@ src_configure(){ -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 diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest index 27347180645d..e3f142584fd9 100644 --- a/dev-db/percona-server/Manifest +++ b/dev-db/percona-server/Manifest @@ -4,13 +4,11 @@ AUX my.cnf-8.0.distro-server 1125 BLAKE2B f4d6941aad1fc29e81e6c805ac42f4c8d3c7bc AUX my.cnf.distro-client 637 BLAKE2B b0812e0e03aa9a3b2e55e08b933a0b41b6afd95ded61f4d9d7c34a2d3810ec38520abd0d89e1c6565f61d4cd8a36d653f9f3199b3dd6a91345cdb5ff962685d8 SHA512 74bd1d9a58075d0a6195be1f94db310bcbe8da532b03844e6fa1ff84676e84843fc9adf9aed06b7e4db53c9aa24ef0885d96de0ccfe4c6ad98afe4c145d43f4f 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_69_0.tar.bz2 95078138 BLAKE2B ccab52b911066ed41db6555fe13fbc142cd51250ad620665d3fcf25508e158b7b766f4f3654333b4a19517215ebe4a6ce14e64395b093b9604b3f0e570419841 SHA512 d0e9bb858c44880d56c0291afef6a1b011a62f659a2d8f58dcb6147ea0899f9157bd8db3097896618fee0116847ebeac78b6d0f0fec8a92c3469500828bbe552 +DIST boost_1_70_0.tar.bz2 97887058 BLAKE2B dc7a974c6dc2662b767dbd87cb832cd1749c24fb745779d1059b73f19f7e52b33b645adfe72b0296c5e098e5cdb3b9f5eddd382374f33fbcd2ad5739287b2206 SHA512 7f2ea9636baf0210e8ed1d21ee798efb6ce23c0710ff8228b285e2214f82193bcd2d912fd435929c554289a59101c7be2e27ce798f93833f307976f0dd070b49 DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8 -DIST mysql-extras-20191031-0134Z.tar.bz2 340718 BLAKE2B 8c228d6953aa888449a006ab1000ef3ecb1747fd055f58a8eaa5f5680b223fa840debbb7fce7404aa7ef4524ce71144a6a970483ad6536ff7521bd949f4dfa90 SHA512 6d61c4a70980759ac90fc3ac35a677a340d88f63260fb2c130ef70de0c05654895fe17b5f4915ca6d96f2406f215559182af61f7d88c1a4157e9bcbcc0f4d4e2 -DIST percona-server-5.7.26-29.tar.gz 84327421 BLAKE2B beedb4b5025c337a63ae56644e47991e90c2c0e57c6d03f1562095f9470cef4b67c8df6c3774d88dfc6ed6dfb81f9dd4b62325db30bc26802651279921bd3a2d SHA512 c8100e69f7e29a5aa2de9dddbc1a3cba9836fe485b7f829a8db0a7e5ac1d1bdabfb1360dacad90665f4c9c78ac91226209c6c15158ef449e84519e36bb06f0a1 +DIST mysql-extras-20200122-2007Z.tar.bz2 344188 BLAKE2B e12a9886bb0c55f1af1ea979c9b1491b65195a54f927f0060f466fe858ea9dd2faffb6eeb7acb7efd28dfb37383b6730c314ea54fbaed2ec3e54655546c883e3 SHA512 ef43324b70081214f3e02eb677bde0e4e3575d2b3b1cb7fb8da18f50ff43a9554e13d13594c0d875bd1438695725ed28a586e4f67f4f4e39054d54671f9525de DIST percona-server-5.7.27-30.tar.gz 84672298 BLAKE2B 8431d231f602b704195868110e8eb73adb3db7c761906c15eff182e54634ef091a3ffa0d4f3498a93dbfbf65cd5cdd12102871abaaaa0f32378ba3068d083b2b SHA512 d62c66de3128df87dce52292ad1671e01fe2c923e668ef0faf9cb663c11c9cd0b976345aea1de6ea2bc458d0e1066b42c022849e422121d96cea082ed12c8f4b -DIST percona-server-8.0.17-8.tar.gz 249562136 BLAKE2B d3bf20d9fee43f17b8aef3e403e74d9c5924a5a012d0c4208b22ffffce37f48867a2a1fb7992d7837f35492d5c5871901f3e0f68cde54793090bb2c089cee310 SHA512 c875492e8b67307aef439ae54b8ff6320464ac495a2d06029f1b33b2117e56bd1c2b3ce4ba7b406c1bd6604d0016d04a5c3f36643097cbf36425d60a44b6adc3 -EBUILD percona-server-5.7.26.29-r1.ebuild 36373 BLAKE2B 8d1213a84a7b9dc3738db959b73d9e0129ff9128ad40133a007e7777d5cf5616a8e2943a83d812193370e1ea126ac283db9d2fa88d856c2f92189c9daea4b329 SHA512 464ac08ab42c3b088d616cbb69f962423bb9b0a72cf97ed15ddcb38bcc23ed4af07caf7121def6a5a981d68843526878ca68604a91691a12598544cee8764f30 +DIST percona-server-8.0.18-9.tar.gz 256867152 BLAKE2B 34c7b7b320f973313ecd95e658999a17748fc70ff46b1dc58144df02c17b7870cf33d68a555ee8aaaecb66c5b1003e6023154f7100a6f413514e89d495330dd2 SHA512 ce537a160b48e7c3dc35b15a293c39142a5b633111b5c9c5f9c1150476f0faa5e9cf81b34c9ca85286463455e3ae3fce7a200d253d880e3b67b3c71eefdbdcd4 EBUILD percona-server-5.7.27.30.ebuild 37290 BLAKE2B 539507ea5fbdd1e1f3a43128bce1c4a565344ba238de6e68e89cce2750c159eb65e9d1d82f6198ebe891a685fa4345ff03be38647a54d3582ae6ff95d6ad65ff SHA512 340ec101d272cfe788c2fa19579f889923c2ab34997e4482b5ba827ebe7ab824655c3c14ce90ebe40385a55f74cba46414a76eeda09a9aac53759ebe8a48c820 -EBUILD percona-server-8.0.17.8.ebuild 37158 BLAKE2B a272bb6365c1498728fb9495420e34cd73002f2de8f52f85cc3817ed126ae18b08474c20fab820f8fbdb0635693f5d1f3e0bd35e0aac387e177cd18fdfe7ebfe SHA512 933b6571998ce473e010aafcd136455e6e50ef5dd5635842578a60259f882485b14f98e4b8915ce299b058901775cfe64ece06bdf7f9301f061ee1bdd8d4524f +EBUILD percona-server-8.0.18.9.ebuild 37762 BLAKE2B d14d42cae05d009c6eeaf3151378f7c811d2bf872a109848353cda18039ebb07ef4707a87e5d8aa22e2aaab9e8ffce50760a7958b84fe2c6ce18623787864c81 SHA512 58872ffc148d75ac6fabd4d0db1b4d6d77b77fb4f09ea765956abbbd209aed276e0081bd34a967b94dfdd45ba154bd087a9de91d4fd18ca88a892bbfe29a6245 MISC metadata.xml 1476 BLAKE2B 45302733bbb03e6e999d60db72bed7382f664d9b46772904a35a1a8bfceccc89008e739fcead55bfb6a056523f0ff84fd22c638de859236f47a01eb8ac6c45eb SHA512 e53b29f9d78e895a26f228b7719a023dbd5957d1e10f384376b75b539a211425be143c229378af2ade5314f6b414d891bafc7e1fffde9bb88b59ff24de31a2c2 diff --git a/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild b/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild deleted file mode 100644 index 6f2590a7c1aa..000000000000 --- a/dev-db/percona-server/percona-server-5.7.26.29-r1.ebuild +++ /dev/null @@ -1,1108 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -MY_EXTRAS_VER="20190822-1908Z" - -CMAKE_MAKEFILE_GENERATOR=emake - -# Python2 required for innodb_stress.innodb_stress{,_blob,_crash} test -PYTHON_COMPAT=( python2_7 ) - -# Keeping eutils in EAPI=6 for emktemp in pkg_config - -inherit eapi7-ver cmake-utils eutils flag-o-matic linux-info \ - prefix python-any-r1 toolchain-funcs multilib-minimal - -MY_PV=$(ver_rs 3 '-') -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/5.7/release-notes/release-notes_index.html" - -SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz - mirror://sourceforge/boost/boost_1_59_0.tar.gz -" - -# Gentoo patches to MySQL -if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]] ; then - SRC_URI="${SRC_URI} - mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" -fi - -HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server" -DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" -LICENSE="GPL-2" -SLOT="0/18" -IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 libressl numa pam +perl profiling rocksdb - selinux +server static static-libs systemtap tcmalloc test tokudb tokudb-backup-plugin yassl" - -# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests -RESTRICT="!test? ( test ) 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}"/20001_all_fix-minimal-build-cmake-mysql-5.7.patch - "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch - "${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch - "${MY_PATCH_DIR}"/20018_all_percona-server-5.7.26-without-clientlibs-tools.patch - "${MY_PATCH_DIR}"/20018_all_percona-server-5.7.25-fix-libressl-support.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch - "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch - "${MY_PATCH_DIR}"/20018_all_percona-server-5.7.23-rocksdb-use-system-libs.patch -) - -# Be warned, *DEPEND are version-dependant -# These are used for both runtime and compiletime -# MULTILIB_USEDEP only set for libraries used by the client library -COMMON_DEPEND="net-misc/curl:= - >=sys-apps/sed-4 - >=sys-apps/texinfo-4.7-r1 - sys-libs/ncurses:0= - client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] ) - !client-libs? ( - dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] - >=sys-libs/zlib-1.2.3:0= - ) - jemalloc? ( dev-libs/jemalloc:0= ) - kernel_linux? ( - dev-libs/libaio:0= - sys-process/procps:0= - ) - server? ( - >=app-arch/lz4-0_p131:= - cjk? ( app-text/mecab:= ) - experimental? ( - dev-libs/libevent:= - dev-libs/protobuf:= - net-libs/libtirpc:= - ) - numa? ( sys-process/numactl ) - pam? ( sys-libs/pam:0= ) - rocksdb? ( - app-arch/zstd:= - dev-libs/protobuf:= - ) - tokudb? ( - app-arch/snappy:= - app-arch/xz-utils:= - ) - tokudb-backup-plugin? ( dev-util/valgrind ) - ) - systemtap? ( >=dev-util/systemtap-1.3:0= ) - tcmalloc? ( dev-util/google-perftools:0= ) - !yassl? ( - client-libs? ( - !libressl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] ) - ) - !client-libs? ( - !libressl? ( >=dev-libs/openssl-1.0.0:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - ) -" -DEPEND="${COMMON_DEPEND} - || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) - dev-libs/protobuf - virtual/yacc - server? ( - dev-libs/libevent - experimental? ( net-libs/rpcsvc-proto ) - ) - static? ( sys-libs/ncurses[static-libs] ) - test? ( - acct-group/mysql acct-user/mysql - dev-perl/JSON - || ( - $(python_gen_any_dep 'dev-python/mysqlclient[${PYTHON_USEDEP}]') - $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') - ) - ) -" -RDEPEND="${COMMON_DEPEND} - !dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !dev-db/mysql-cluster - 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 )" - -python_check_deps() { - has_version "dev-python/mysqlclient[${PYTHON_USEDEP}]" \ - || has_version "dev-python/mysql-python[${PYTHON_USEDEP}]" -} - -mysql_init_vars() { - MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX%/}/usr/share/mysql"} - MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX%/}/etc/mysql"} - MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX%/}/var/lib/mysql"} - MY_LOGDIR=${MY_LOGDIR="${EPREFIX%/}/var/log/mysql"} - - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR="" - if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then - MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ - | sed -ne '/datadir/s|^--datadir=||p' \ - | tail -n1` - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \ - | sed -e 's/.*=\s*//' \ - | tail -n1` - fi - fi - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR="${MY_LOCALSTATEDIR}" - einfo "Using default MY_DATADIR" - fi - elog "MySQL MY_DATADIR is ${MY_DATADIR}" - - if [[ -z "${PREVIOUS_DATADIR}" ]] ; then - if [[ -e "${MY_DATADIR}" ]] ; then - # If you get this and you're wondering about it, see bug #207636 - elog "MySQL datadir found in ${MY_DATADIR}" - elog "A new one will not be created." - PREVIOUS_DATADIR="yes" - else - PREVIOUS_DATADIR="no" - fi - export PREVIOUS_DATADIR - fi - else - if [[ ${EBUILD_PHASE} == "config" ]] ; then - local new_MY_DATADIR - new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ - | sed -ne '/datadir/s|^--datadir=||p' \ - | tail -n1` - - if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]] ; then - ewarn "MySQL MY_DATADIR has changed" - ewarn "from ${MY_DATADIR}" - ewarn "to ${new_MY_DATADIR}" - MY_DATADIR="${new_MY_DATADIR}" - fi - fi - fi - - export MY_SHAREDSTATEDIR MY_SYSCONFDIR - export MY_LOCALSTATEDIR MY_LOGDIR - export MY_DATADIR -} - -pkg_pretend() { - if use numa ; then - local CONFIG_CHECK="~NUMA" - - local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;" - WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support" - - check_extra_config - fi -} - -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] ; then - local GCC_MAJOR_SET=$(gcc-major-version) - local GCC_MINOR_SET=$(gcc-minor-version) - # Bug 565584: InnoDB now requires atomic functions introduced with gcc-4.7 on - # non x86{,_64} arches - if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - - use test && python-any-r1_pkg_setup - fi - - if has test ${FEATURES} && \ - use server && ! has userpriv ${FEATURES} ; then - eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi -} - -pkg_preinst() { - # Here we need to see if the implementation switched client libraries - # We check if this is a new instance of the package and a client library already exists - local SHOW_ABI_MESSAGE libpath - if use client-libs && [[ -z ${REPLACING_VERSIONS} && -e "${EROOT%/}/usr/$(get_libdir)/libperconaserverclient.so" ]] ; then - libpath=$(readlink "${EROOT%/}/usr/$(get_libdir)/libperconaserverclient.so") - elog "Due to ABI changes when switching between different client libraries," - elog "revdep-rebuild must find and rebuild all packages linking to libperconaserverclient." - elog "Please run: revdep-rebuild --library ${libpath}" - ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries" - fi -} - -pkg_postinst() { - # Make sure the vars are correctly initialized - mysql_init_vars - - # Create log directory securely if it does not exist - [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" - - if use server ; then - if [[ -z "${REPLACING_VERSIONS}" ]] ; then - einfo - elog "You might want to run:" - elog "\"emerge --config =${CATEGORY}/${PF}\"" - elog "if this is a new install." - elog - elog "If you are switching server implentations, you should run the" - elog "mysql_upgrade tool." - einfo - else - einfo - elog "If you are upgrading major versions, you should run the" - elog "mysql_upgrade tool." - einfo - fi - fi - - # Note about configuration change - einfo - elog "This version of ${PN} reorganizes the configuration from a single my.cnf" - elog "to several files in /etc/mysql/mysql.d." - elog "Please backup any changes you made to /etc/mysql/my.cnf" - elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension." - elog "You may have as many files as needed and they are read alphabetically." - elog "Be sure the options have the appropriate section headers, i.e. [mysqld]." - einfo -} - -src_unpack() { - unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR}/${MY_P}" "${S}" || die -} - -src_prepare() { - cmake-utils_src_prepare - - if use jemalloc ; then - echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die - fi - - if use tcmalloc ; then - echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die - fi - - # Don't build bundled xz-utils - if [[ -d "${S}/storage/tokudb/ft-index" ]] ; then - echo > "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die - sed -i 's/ build_lzma//' "${S}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die - elif [[ -d "${S}/storage/tokudb/PerconaFT" ]] ; then - 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 - fi - - if [[ -d "${S}/plugin/tokudb-backup-plugin" ]] && ! use tokudb-backup-plugin ; then - rm -r "${S}/plugin/tokudb-backup-plugin/Percona-TokuBackup" || 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}"/storage/rocksdb/third_party \ - "${S}"/storage/tokudb/PerconaFT/third_party \ - "${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 - - # 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 -} - -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 tokudb ; then - # https://jira.percona.com/browse/PS-4399 - append-cxxflags -Wno-error=shadow - fi - - 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')" - -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_CURL=system - -DWITH_BOOST="${WORKDIR}/boost_1_59_0" - -DWITH_PROTOBUF=system - ) - - if use test ; then - mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test ) - else - mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' ) - fi - - if ! use yassl ; then - mycmakeargs+=( -DWITH_SSL=system ) - else - mycmakeargs+=( -DWITH_SSL=bundled ) - fi - - if ! use client-libs ; then - mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES ) - fi - - # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION - # systemtap only works on native ABI, bug 530132 - if multilib_is_native_abi ; then - mycmakeargs+=( - -DENABLE_DTRACE=$(usex systemtap) - ) - else - mycmakeargs+=( - -DWITHOUT_TOOLS=1 - -DWITH_READLINE=1 - -DENABLE_DTRACE=0 - ) - fi - - if multilib_is_native_abi && use server ; then - mycmakeargs+=( - -DWITH_LIBEVENT=system - -DWITH_LZ4=system - -DWITH_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 - -DWITH_ROCKSDB=$(usex rocksdb 1 0) - $(usex tokudb '' -DWITHOUT_TOKUDB=1) - ) - - if use tokudb ; then - # TokuDB Backup plugin requires valgrind unconditionally - mycmakeargs+=( - $(usex tokudb-backup-plugin '' -DTOKUDB_BACKUP_DISABLED=1) - ) - fi - - else - mycmakeargs+=( - -DWITHOUT_SERVER=1 - -DWITH_EMBEDDED_SERVER=OFF - -DEXTRA_CHARSETS=none - ) - fi - - cmake-utils_src_configure -} - -src_compile() { - if use client-libs ; then - multilib-minimal_src_compile - else - multilib_src_compile - fi -} - -multilib_src_compile() { - cmake-utils_src_compile -} - -# Official test instructions: -# ulimit -n 16500 && \ -# USE='latin1 perl server' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild percona-server-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 Percona-Server 5.7 for now and are believed to be - # false positives or are known to fail: - # - # group_replication.gr_communication_configuration: requires a valid local network address - # which clashes with FEATURES=network-sandbox - # innodb.xtradb_compressed_columns_consistency: long running test which tends to timeout - # on a busy host - # keyring_vault.keyring_vault_timeout: requires network access to vault.public-ci.percona.com - # which clashes with FEATURES=network-sandbox - # rocksdb.prefix_extractor_override: https://jira.percona.com/browse/PS-5199 - # rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223 - # rpl.rpl_multi_source_mts_reset_worker_info: https://jira.percona.com/browse/PS-3786 - # tokudb.bugs.5733_tokudb: https://jira.percona.com/browse/PS-4274 - # x.crud_insert_cast: https://jira.percona.com/browse/PS-5032 - # x.insert_table_bad_column: https://jira.percona.com/browse/PS-5032 - # x.insert_table_bad_numcolumns: https://jira.percona.com/browse/PS-5032 - # x.insert_table_bad_column_type: https://jira.percona.com/browse/PS-5032 - # x.insert_table: https://jira.percona.com/browse/PS-5032 - # x.update_crud_arrayappend_o: https://jira.percona.com/browse/PS-5032 - # x.update_crud_arrayinsert_o: https://jira.percona.com/browse/PS-5032 - # x.mysqlxtest_help: https://jira.percona.com/browse/PS-5019 - # x.admin_kill_client_mysqlx: https://jira.percona.com/browse/PS-5019 - # - local t - - for t in \ - group_replication.gr_communication_configuration \ - innodb.xtradb_compressed_columns_consistency \ - keyring_vault.keyring_vault_timeout \ - rocksdb.prefix_extractor_override \ - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \ - rpl.rpl_multi_source_mts_reset_worker_info \ - tokudb.bugs.5733_tokudb \ - x.crud_insert_cast \ - x.insert_table_bad_column \ - x.insert_table_bad_numcolumns \ - x.insert_table_bad_column_type \ - x.insert_table \ - x.update_crud_arrayappend_o \ - x.update_crud_arrayinsert_o \ - x.mysqlxtest_help \ - x.admin_kill_client_mysqlx \ - ; do - _disable_test "$t" "False positives in Gentoo / Known bug" - done - - if has_version ">=dev-libs/openssl-1.1.1" ; then - for t in \ - main.ssl_8k_key \ - auth_sec.mysql_ssl_connection \ - main.ssl_verify_identity \ - main.ssl_crl \ - main.grant_alter_user_qa \ - auth_sec.ssl_auto_detect \ - encryption.innodb_onlinealter_encryption \ - main.ssl_ca \ - main.ssl_cipher \ - main.grant_user_lock_qa \ - auth_sec.openssl_cert_generation \ - main.ssl_bug75311 \ - main.ssl_compress \ - main.ssl \ - main.plugin_auth_sha256_tls \ - main.ssl_ecdh \ - main.openssl_1 \ - auth_sec.cert_verify \ - main.mysql_ssl_default \ - main.percona_tls \ - auth_sec.tls \ - auth_sec.ssl_mode \ - binlog.binlog_grant_alter_user \ - x.connection_tls_version \ - x.connection_openssl \ - ; do - _disable_test "$t" "Known >=openssl-1.1.1 failures" - done - 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 tokudb ; then - if [[ -f "/sys/kernel/mm/transparent_hugepage/enabled" ]] ; then - if grep -q -E "\[always\]" /sys/kernel/mm/transparent_hugepage/enabled &>/dev/null ; then - # TokuDB refuses to start when transparent hugepages are enabled - for t in \ - tokudb.rows-32m-rand-insert \ - tokudb.savepoint-2 \ - tokudb.savepoint-3 \ - tokudb.savepoint-4 \ - tokudb.savepoint-1078 \ - tokudb.savepoint-1078-2 \ - tokudb.savepoint-1078-3 \ - tokudb.savepoint-1078-4 \ - ; do - _disable_test "$t" "TokuDB will not work with transparent hugepages enabled" - done - fi - else - einfo "Cannot determine transparent hugepage status." - einfo "Please note that TokuDB refuses to start when transparent hugepages are enabled!" - 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 - - # 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-list="${T}/disabled.def" - retstatus_tests=$? - - popd &>/dev/null || die - - # Cleanup is important for these testcases. - pkill -9 -f "${S}/ndb" 2>/dev/null - pkill -9 -f "${S}/sql" 2>/dev/null - - local failures="" - [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" - [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" - - [[ -z "$failures" ]] || die "Test failures: $failures" - einfo "Tests successfully completed" -} - -src_install() { - local MULTILIB_WRAPPED_HEADERS - local MULTILIB_CHOST_TOOLS - if use client-libs ; then - # headers with ABI specific data - MULTILIB_WRAPPED_HEADERS=( - /usr/include/mysql/server/my_config.h - /usr/include/mysql/server/mysql_version.h ) - - # wrap the config scripts - MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config ) - multilib-minimal_src_install - else - multilib_src_install - multilib_src_install_all - fi -} - -# Intentionally override eclass function -multilib_src_install() { - - cmake-utils_src_install - - # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them. - find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die -} - -multilib_src_install_all() { - # Make sure the vars are correctly initialized - mysql_init_vars - - # Convenience links - einfo "Making Convenience links for mysqlcheck multi-call binary" - dosym "mysqlcheck" "/usr/bin/mysqlanalyze" - dosym "mysqlcheck" "/usr/bin/mysqlrepair" - dosym "mysqlcheck" "/usr/bin/mysqloptimize" - - # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir - if [[ -d "${ED}/usr/data" ]] ; then - rm -Rf "${ED}/usr/data" || die - fi - - # Unless they explicitly specific USE=test, then do not install the - # testsuite. It DOES have a use to be installed, esp. when you want to do a - # validation of your database configuration after tuning it. - if ! use test ; then - rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test" - fi - - # Configuration stuff - einfo "Building default configuration ..." - insinto "${MY_SYSCONFDIR#${EPREFIX}}" - [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf - cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die - eprefixify "${TMPDIR}/my.cnf" - doins "${TMPDIR}/my.cnf" - insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d" - cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die - eprefixify "${TMPDIR}/50-distro-client.cnf" - doins "${TMPDIR}/50-distro-client.cnf" - - if use server ; then - mycnf_src="my.cnf.distro-server" - sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ - "${FILESDIR}/${mycnf_src}" \ - > "${TMPDIR}/my.cnf.ok" || die - - if use prefix ; then - sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \ - "${TMPDIR}/my.cnf.ok" || die - fi - - if use latin1 ; then - sed -i \ - -e "/character-set/s|utf8|latin1|g" \ - "${TMPDIR}/my.cnf.ok" || die - fi - - eprefixify "${TMPDIR}/my.cnf.ok" - - newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf - - if use tokudb ; then - # Remove some unwanted files - rm -fv \ - "${ED%/}"/usr/COPYING.AGPLv3 \ - "${ED%/}"/usr/COPYING.GPLv2 \ - "${ED%/}"/usr/PATENTS \ - "${ED%/}"/usr/README.md \ - || die - fi - fi - - #Remove mytop if perl is not selected - [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop" -} - -pkg_config() { - _getoptval() { - local mypd="${EROOT%/}"/usr/bin/my_print_defaults - local section="$1" - local flag="--${2}=" - local extra_options="${3}" - "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp" - } - local old_MY_DATADIR="${MY_DATADIR}" - local old_HOME="${HOME}" - # my_print_defaults needs to read stuff in $HOME/.my.cnf - export HOME=${EPREFIX%/}/root - - # Make sure the vars are correctly initialized - mysql_init_vars - - [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR" - if [[ ! -x "${EROOT%/}/usr/sbin/mysqld" ]] ; then - die "Minimal builds do NOT include the MySQL server" - fi - - if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]] ; then - local MY_DATADIR_s="${ROOT%/}/${MY_DATADIR}" - MY_DATADIR_s="${MY_DATADIR_s%%/}" - local old_MY_DATADIR_s="${ROOT%/}/${old_MY_DATADIR}" - old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}" - - if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]] ; then - if [[ -d "${MY_DATADIR_s}" ]] ; then - ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist" - ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}" - else - elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}" - mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \ - || die "Moving MY_DATADIR failed" - fi - else - ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist" - if [[ -d "${MY_DATADIR_s}" ]] ; then - ewarn "Attempting to use ${MY_DATADIR_s}" - else - eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist" - die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}" - fi - fi - fi - - local pwd1="a" - local pwd2="b" - local maxtry=15 - - if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then - local tmp_mysqld_password_source= - - for tmp_mysqld_password_source in mysql client ; do - einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..." - MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)" - if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then - if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then - ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!" - MYSQL_ROOT_PASSWORD= - continue - fi - - einfo "Found password in '${tmp_mysqld_password_source}' section!" - break - fi - done - - # Sometimes --show is required to display passwords in some implementations of my_print_defaults - if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then - MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)" - fi - - unset tmp_mysqld_password_source - fi - MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)" - MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} - - if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then - einfo "Creating MySQL tmpdir $MYSQL_TMPDIR" - install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR" - fi - - if [[ ! -d "${EROOT%/}/$MYSQL_LOG_BIN" ]] ; then - einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN" - install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_LOG_BIN" - fi - - if [[ ! -d "${EROOT%/}/$MYSQL_RELAY_LOG" ]] ; then - einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG" - install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_RELAY_LOG" - fi - - if [[ -d "${ROOT%/}/${MY_DATADIR}/mysql" ]] ; then - ewarn "You have already a MySQL database in place." - ewarn "(${ROOT%/}/${MY_DATADIR}/*)" - ewarn "Please rename or delete it if you wish to replace it." - die "MySQL database already exists!" - fi - - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then - - einfo "Please provide a password for the mysql 'root' user now" - einfo "or through the ${HOME}/.my.cnf file." - ewarn "Avoid [\"'\\_%] characters in the password" - read -rsp " >" pwd1 ; echo - - einfo "Retype the password" - read -rsp " >" pwd2 ; echo - - if [[ "x$pwd1" != "x$pwd2" ]] ; then - die "Passwords are not the same" - fi - MYSQL_ROOT_PASSWORD="${pwd1}" - unset pwd1 pwd2 - fi - - local options - local sqltmp="$(emktemp)" - - # Fix bug 446200. Don't reference host my.cnf, needs to come first, - # see http://bugs.mysql.com/bug.php?id=31312 - use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'" - - # Figure out which options we need to disable to do the setup - local helpfile="${TMPDIR%/}/mysqld-help" - "${EROOT%/}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null - for opt in host-cache name-resolve networking slave-start \ - federated ssl log-bin relay-log slow-query-log external-locking \ - log-slave-updates \ - ; do - optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}" - egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}" - done - - einfo "Creating the mysql database and setting proper permissions on it ..." - - # Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it - PID_DIR="${EROOT%/}/var/run/mysqld" - if [[ ! -d "${PID_DIR}" ]] ; then - install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory" - fi - - if [[ ! -d "${MY_DATADIR}" ]] ; then - install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory" - fi - - pushd "${TMPDIR}" &>/dev/null || die - - # Filling timezones, see - # http://dev.mysql.com/doc/mysql/en/time-zone-support.html - echo "USE mysql;" >"${sqltmp}" - "${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null - chown mysql "${sqltmp}" || die - - # --initialize-insecure will not set root password - # --initialize would set a random one in the log which we don't need as we set it ourselves - local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" ) - cmd+=( "--basedir=${EPREFIX%/}/usr" ${options} "--datadir=${ROOT%/}${MY_DATADIR}" "--tmpdir=${ROOT%/}${MYSQL_TMPDIR}" ) - einfo "Command: ${cmd[*]}" - su -s /bin/sh -c "${cmd[*]}" mysql \ - >"${TMPDIR%/}"/mysql_install_db.log 2>&1 - if [[ $? -ne 0 ]] ; then - grep -B5 -A999 -i "ERROR" "${TMPDIR%/}"/mysql_install_db.log 1>&2 - die "Failed to initialize mysqld. Please review ${EPREFIX%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log" - fi - popd &>/dev/null || die - [[ -f "${ROOT%/}/${MY_DATADIR}/mysql/user.frm" ]] \ - || die "MySQL databases not installed" - - use prefix || options="${options} --user=mysql" - - local socket="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.sock" - local pidfile="${EROOT%/}/var/run/mysqld/mysqld${RANDOM}.pid" - local mysqld="${EROOT%/}/usr/sbin/mysqld \ - ${options} \ - $(use prefix || echo --user=mysql) \ - --log-warnings=0 \ - --basedir=${EROOT%/}/usr \ - --datadir=${ROOT%/}/${MY_DATADIR} \ - --max_allowed_packet=8M \ - --net_buffer_length=16K \ - --socket=${socket} \ - --pid-file=${pidfile} \ - --tmpdir=${ROOT}/${MYSQL_TMPDIR}" - #einfo "About to start mysqld: ${mysqld}" - ebegin "Starting mysqld" - einfo "Command ${mysqld}" - ${mysqld} & - rc=$? - while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do - maxtry=$((${maxtry}-1)) - echo -n "." - sleep 1 - done - eend $rc - - if ! [[ -S "${socket}" ]] ; then - die "Completely failed to start up mysqld with: ${mysqld}" - fi - - ebegin "Setting root password" - # Do this from memory, as we don't want clear text passwords in temp files - local sql="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'" - "${EROOT%/}/usr/bin/mysql" \ - --no-defaults \ - "--socket=${socket}" \ - -hlocalhost \ - -e "${sql}" - eend $? - - # Stop the server and cleanup - einfo "Stopping the server ..." - kill $(< "${pidfile}" ) - rm -f "${sqltmp}" - wait %1 - einfo "Done" -} diff --git a/dev-db/percona-server/percona-server-8.0.17.8.ebuild b/dev-db/percona-server/percona-server-8.0.18.9.ebuild index 4bb5df6ecd44..86ea26ade394 100644 --- a/dev-db/percona-server/percona-server-8.0.17.8.ebuild +++ b/dev-db/percona-server/percona-server-8.0.18.9.ebuild @@ -1,15 +1,15 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI="7" -MY_EXTRAS_VER="20191031-0134Z" +MY_EXTRAS_VER="20200122-2007Z" CMAKE_MAKEFILE_GENERATOR=emake inherit cmake-utils flag-o-matic linux-info \ multiprocessing prefix toolchain-funcs check-reqs -MY_BOOST_VERSION="1.69.0" +MY_BOOST_VERSION="1.70.0" MY_PV=$(ver_rs 3 '-') MY_PV="${MY_PV//_pre*}" MY_PN="Percona-Server" @@ -40,7 +40,13 @@ IUSE="cjk cracklib debug jemalloc latin1 libressl numa pam +perl profiling # Tests always fail when libressl is enabled due to hard-coded ciphers in the tests RESTRICT="!test? ( test ) libressl? ( test )" -REQUIRED_USE="?? ( tcmalloc jemalloc )" +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" @@ -60,44 +66,46 @@ fi PATCHES=( "${MY_PATCH_DIR}"/20001_all_fix-minimal-build-cmake-mysql-8.0.17.patch - "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-8.0.17.patch + "${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-8.0.18.patch "${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch - "${MY_PATCH_DIR}"/20018_all_percona-server-8.0.17-without-clientlibs-tools.patch + "${MY_PATCH_DIR}"/20018_all_percona-server-8.0.18-without-clientlibs-tools.patch "${MY_PATCH_DIR}"/20018_all_mysql-8.0.17-add-protobuf-3.8+-support.patch - "${MY_PATCH_DIR}"/20018_all_percona-server-8.0.17-fix-libressl-support.patch + "${MY_PATCH_DIR}"/20018_all_percona-server-8.0.18-fix-libressl-support.patch "${MY_PATCH_DIR}"/20018_all_percona-server-8.0.16-dont-install-tokudb-misc-files.patch "${MY_PATCH_DIR}"/20038_all_percona-server-8.0.16-PS-5873.patch + "${MY_PATCH_DIR}"/20018_all_mysql-8.0.19-fix-events_bugs-test.patch + "${MY_PATCH_DIR}"/20018_all_percona-server-8.0.18-fix-building-with-make-4.3.patch ) # Be warned, *DEPEND are version-dependant # These are used for both runtime and compiletime COMMON_DEPEND=" >=app-arch/lz4-0_p131:= - dev-libs/icu:= - dev-libs/libedit - dev-libs/libevent:= - >=dev-libs/protobuf-3.8:= - net-libs/libtirpc:= + sys-libs/ncurses:0= >=sys-libs/zlib-1.2.3:0= - cjk? ( app-text/mecab:= ) - jemalloc? ( dev-libs/jemalloc:0= ) - kernel_linux? ( - dev-libs/libaio:0= - sys-process/procps:0= - ) libressl? ( dev-libs/libressl:0= ) !libressl? ( >=dev-libs/openssl-1.0.0:0= ) - numa? ( sys-process/numactl ) server? ( + dev-libs/icu:= + dev-libs/libevent:= + >=dev-libs/protobuf-3.8:= + net-libs/libtirpc:= + net-misc/curl:= + cjk? ( app-text/mecab:= ) + 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= ) ) - tcmalloc? ( dev-util/google-perftools:0= ) " DEPEND="${COMMON_DEPEND} || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) - dev-libs/re2 - net-libs/rpcsvc-proto virtual/yacc + server? ( net-libs/rpcsvc-proto ) test? ( acct-group/mysql acct-user/mysql dev-perl/JSON @@ -242,7 +250,8 @@ src_configure(){ -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql" -DCOMPILATION_COMMENT="Gentoo Linux ${PF}" -DWITH_UNIT_TESTS=$(usex test ON OFF) - -DWITH_EDITLINE=system + # Using bundled editline to get CTRL+C working + -DWITH_EDITLINE=bundled -DWITH_ZLIB=system -DWITH_SSL=system -DWITH_LIBWRAP=0 @@ -258,6 +267,18 @@ src_configure(){ -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 @@ -266,21 +287,9 @@ src_configure(){ mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES ) - # client/mysql.cc:1131:16: error: redefinition of ‘struct _hist_entry’ - mycmakeargs+=( - -DUSE_LIBEDIT_INTERFACE=0 - -DUSE_NEW_EDITLINE_INTERFACE=1 - -DHAVE_HIST_ENTRY=1 - ) - mycmakeargs+=( -DWITH_ICU=system - -DWITH_RE2=system - -DWITH_LIBEVENT=system -DWITH_LZ4=system - -DWITH_PROTOBUF=system - -DWITH_MECAB=$(usex cjk system OFF) - -DWITH_NUMA=$(usex numa ON OFF) # Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex -DWITH_RAPIDJSON=bundled ) @@ -311,7 +320,11 @@ src_configure(){ mycmakeargs+=( -DWITH_EXTRA_CHARSETS=all -DWITH_DEBUG=$(usex debug) + -DWITH_LIBEVENT=system + -DWITH_MECAB=$(usex cjk system OFF) + -DWITH_NUMA=$(usex numa ON OFF) -DWITH_PAM=$(usex pam) + -DWITH_PROTOBUF=system ) if use profiling ; then @@ -419,6 +432,8 @@ src_test() { disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware") disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" ) disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" ) + disabled_tests+=( "x.message_protobuf_nested;6803;False positive caused by protobuff-3.11+" ) + disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" ) local test_ds for test_infos_str in "${disabled_tests[@]}" ; do diff --git a/dev-db/percona-toolkit/Manifest b/dev-db/percona-toolkit/Manifest index daae9e477d6b..3f0a2e6119de 100644 --- a/dev-db/percona-toolkit/Manifest +++ b/dev-db/percona-toolkit/Manifest @@ -2,6 +2,7 @@ AUX percona-toolkit-2.2.20-fix-package-name.patch 334 BLAKE2B 3a36f40823194db89d AUX percona-toolkit-2.2.7-no-versioncheck.patch 9310 BLAKE2B 8d102dcab97bc87ad1a98ffd7b600d7453eb449ba919908b5a5063b53a127562bbd419d19dd716a9b6c199a1a38055fd5593817ddfe5200892c4529146c6435b SHA512 6d571c017254e8ea37d128f1623cc4e813ebbfc611cbb84403540c786abc62ee9ba625ec914b101953e5d1d09431f9caa91e270684e00ec6e002b2777b105df9 AUX percona-toolkit-3.0.10-slave-delay-fix.patch 1593 BLAKE2B 94bc49d581fbd453f650fe81b704ae042f3219495373c09bd750241cbdb3a1917e582927d3682072a1ac6369e2a564ee41bb16c25f662cab16748af1772c11b2 SHA512 40268aa6241416b80e6c076083a0ba2f75fb330529dc5de01438536cd6ce352b4dbee642cad1e1219441ababb054243731afdba0e4f8642dea20c0f1dada5646 AUX percona-toolkit-3.0.7-no-versioncheck.patch 5566 BLAKE2B 4def58c91dcdc35481c2ba89c78cb35db2a9121b86ba3a66896d0ef0175c9d6f47cf6eff0908847564ecc810243a3fdc0b893fbc3b2bd2131ec932f93a8694ad SHA512 a681b7f32f1acb509f01fe6c8e99106708729b8f8f5fe5fba0f2131b4380cfd22462f37bf0fbb95213b89d17375f0252b961d0257fb310295fe0e6e002b66e28 +AUX percona-toolkit-3.1.0-drop-swap-gentoo-mariadb-fix.patch 1430 BLAKE2B b874324b2970b28e781343ace4415399e041b188da5aae6909bb8121d32bfdd28202eb4039b7b70541346caa3f958a5bbaf0841f2a4d3d5a3c7503059c4e26ee SHA512 31b637c6dfae567e2b0dd41a50a535db57bdca04e606a8147aaf13724779ec8a5fdda350ed0bebe27b1ffe53b784e7bc5a231cb4f66dc6fd33b089bdd87aa7ff DIST percona-toolkit-2.2.20.tar.gz 1431840 BLAKE2B 76565662b4037010f7e8de98316f568c2994f55d042ae3a21b80dc3b839444a11014b61db675cc21c149f26c3b7df52013d7b06c9c1127ec325dae2942a4e4c0 SHA512 f7a5f47e9ca05c43dcb80866a1eacd13066e1f036f4f58d51145fc6354ddc86dd6515a9aa33c8f736029800bf4c80f7ba5fcb9f1e6ac41653b3351597885f679 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 @@ -9,5 +10,5 @@ DIST percona-toolkit-3.1.0.tar.gz 18106856 BLAKE2B 4a08e70a03d80e86e2fd7ba4ac77b 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.ebuild 1327 BLAKE2B f4b989014ab9f1d1b3915df600dec265a93db09857bc4f86a31fb2e454735d8a4b281d763e20d445d9ba5e74634f99f1923ce9951c2025e28ca6c5af1f5eb3af SHA512 5ecef35b561bf7d3fc3288e77c9eda32c3cebdd7a72228ccd606d4f573559cd711260691f1d211b5dc2af23778b2538d270ce50dd4a1c8844603547d2440c15e +EBUILD percona-toolkit-3.1.0-r1.ebuild 1389 BLAKE2B 43f48d8cbaa1bebcef5c8d9100f2d270931ee2ac0d5649b1aa66bd2f0fb6c56238d5eb30b5a3d1b2bbe4915470976af3e80f04aa97e173a5214f182d41772953 SHA512 fb554bae9ebc93863faf381a59ab0ce64f41c0374061c34d5b6c34e8728ee771a2c90ea852adb8857211adf52cdfd9e48072fcf079a68c20f3554788775bdffd MISC metadata.xml 723 BLAKE2B f5150e42397c47b3815de1c9ff8414e12f517501e7075c5fddf3ac800a2c0a654db5d2fccef57609629017713f3a80a81164886b82d16df282601452e1bd5705 SHA512 b0e9ddbbd1834f5867600530e946ce30786ea83e779f62bf894facc0bb3f0fd5a58f6095f0e006d565e04370c89ae4101d9cfb9b7243704118eb7629ae0e0f9e diff --git a/dev-db/percona-toolkit/files/percona-toolkit-3.1.0-drop-swap-gentoo-mariadb-fix.patch b/dev-db/percona-toolkit/files/percona-toolkit-3.1.0-drop-swap-gentoo-mariadb-fix.patch new file mode 100644 index 000000000000..0596365423f9 --- /dev/null +++ b/dev-db/percona-toolkit/files/percona-toolkit-3.1.0-drop-swap-gentoo-mariadb-fix.patch @@ -0,0 +1,33 @@ +diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change +index 7ecec11..afdd7dd 100755 +--- a/bin/pt-online-schema-change ++++ b/bin/pt-online-schema-change +@@ -8948,15 +8948,6 @@ sub main { + Quoter => $q, + ); + +- my $vp = VersionParser->new($cxn->dbh()); +- if ($vp->cmp('8.0.14') > -1 && $vp->flavor() !~ m/maria/i) { +- my $msg = "There is an error in MySQL that makes the server to die when trying to ". +- "rename a table with FKs. See https://bugs.mysql.com/bug.php?id=96145\n". +- "Since pt-online-schema change needs to rename the old <-> new tables as the final " . +- "step, and the requested table has FKs, it cannot be executed under the current MySQL version"; +- _die($msg, NO_MINIMUM_REQUIREMENTS); +- } +- + if ( ($alter_fk_method || '') eq 'none' ) { + print "Not updating foreign keys because " + . "--alter-foreign-keys-method=none. Foreign keys " +@@ -9872,12 +9863,6 @@ sub main { + } + } + +- if ($vp->cmp('8.0') > -1 && $vp->flavor() !~ m/maria/i && $alter_fk_method eq 'drop_swap') { +- my $msg = "--alter-foreign-keys-method=drop_swap doesn't work with MySQL 8.0+\n". +- "See https://bugs.mysql.com/bug.php?id=89441"; +- _die($msg, INVALID_PARAMETERS); +- } +- + # --plugin hook + if ( $plugin && $plugin->can('after_copy_rows') ) { + $plugin->after_copy_rows(); diff --git a/dev-db/percona-toolkit/percona-toolkit-3.1.0.ebuild b/dev-db/percona-toolkit/percona-toolkit-3.1.0-r1.ebuild index 700a8fd29578..bc039dc30467 100644 --- a/dev-db/percona-toolkit/percona-toolkit-3.1.0.ebuild +++ b/dev-db/percona-toolkit/percona-toolkit-3.1.0-r1.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="7" @@ -40,6 +40,7 @@ DEPEND="${COMMON_DEPEND} PATCHES=( "${FILESDIR}"/${PN}-3.0.7-no-versioncheck.patch "${FILESDIR}"/${PN}-3.0.10-slave-delay-fix.patch + "${FILESDIR}"/${PN}-3.1.0-drop-swap-gentoo-mariadb-fix.patch ) src_prepare() { |