diff options
author | 2021-02-12 01:11:44 +0100 | |
---|---|---|
committer | 2021-02-12 01:11:50 +0100 | |
commit | 3925d2fe5eef1e63602a4f520028aa55dca3df08 (patch) | |
tree | 88b376727ad806579a3f302cedfca7a5fa974196 | |
parent | percona-server: Drop elog reference to virtual/libmysqlclient (diff) | |
download | mysql-master.tar.gz mysql-master.tar.bz2 mysql-master.zip |
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
126 files changed, 8 insertions, 20646 deletions
diff --git a/dev-db/mariadb-connector-c/ChangeLog b/dev-db/mariadb-connector-c/ChangeLog deleted file mode 100644 index 3c5efcc..0000000 --- a/dev-db/mariadb-connector-c/ChangeLog +++ /dev/null @@ -1,40 +0,0 @@ - 25 Apr 2017; Brian Evans <grknight@gentoo.org> - mariadb-connector-c-3.0.1_beta.ebuild: - dev-db/mariadb-connector-c: Fix up mysqlcompat USE installs - -*mariadb-connector-c-3.0.1_beta (25 Apr 2017) - - 25 Apr 2017; Brian Evans <grknight@gentoo.org> +files/gentoo-layout-3.0.patch, - +mariadb-connector-c-3.0.1_beta.ebuild: - dev-db/mariadb-connector-c: Version bump to 3.0.1_beta - -*mariadb-connector-c-2.2.2 (13 Feb 2016) - - 13 Feb 2016; Brian Evans <grknight@gentoo.org> - +files/gentoo-layout-2.2.2.patch, +mariadb-connector-c-2.2.2.ebuild: - dev-db/mariadb-connector-c: Version bump - - 15 Aug 2015; Brian Evans <grknight@gentoo.org> - mariadb-connector-c-2.0.0-r1.ebuild, mariadb-connector-c-2.1.0.ebuild, - mariadb-connector-c-9999.ebuild: - dev-db/mariadb-connector-c: fix QA inherit wrt bug 557730 - -*mariadb-native-client-2.0.0 (29 Apr 2014) - - 29 Apr 2014; Brian Evans <grknight@tuffmail.com> +files/fix-libdir.patch, - +files/fix-mariadb_config.patch, +mariadb-native-client-2.0.0.ebuild: - Version bump for 2.0.0 - -*mariadb-native-client-9999 (26 Jun 2013) - - 26 Jun 2013; Brian Evans <grknight@lavabit.com> - +mariadb-native-client-9999.ebuild, mariadb-native-client-1.0.ebuild, - metadata.xml: - Add live ebuild with mysqlcompat feature, optional ssl support and external - zlib - -*mariadb-native-client-1.0 (22 May 2013) - - 22 May 2013; <grknight@lavabit.com> +files/multilib-install.patch, - +mariadb-native-client-1.0.ebuild, +metadata.xml: - Add new C library for MySQL diff --git a/dev-db/mariadb-connector-c/Manifest b/dev-db/mariadb-connector-c/Manifest deleted file mode 100644 index 96c1c73..0000000 --- a/dev-db/mariadb-connector-c/Manifest +++ /dev/null @@ -1,23 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -DIST mariadb-connector-c-2.2.2-src.tar.gz 519724 SHA256 93f56ad9f08bbaf0da8ef03bc96f7093c426ae40dede60575d485e1b99e6406b SHA512 8e7b35345de3ae3902b74613646c17641e441548ec87eb97c635c98dcddb0862411a625d9e82ba62324babe21d0d099a241b074826f0b396b425a80e714dd355 WHIRLPOOL e09d535186726cad6c880327e2045176a8bc773675381262bcff071ecccbdaa6b2fc802250cedf9d3a5f8848fa178fba9a8e236e3d3d988800826176376b91b1 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQKTBAEBCAB9FiEEZsLkTtkOMnWOfVXA0feB7/n0o7YFAlvGkfJfFIAAAAAALgAo -aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDY2 -QzJFNDRFRDkwRTMyNzU4RTdENTVDMEQxRjc4MUVGRjlGNEEzQjYACgkQ0feB7/n0 -o7aOZg/+N0nU88jEV2GjbwsxV98LaGTSYNlNzGT84WL9G2dHjxXodI6eli7tfjXf -BufXEXqrS6VahipTya6JCG4P/z+06AvpA7ZHCUZkJ/m88gnDQ5vdMnjFYVfm7iVO -ODA4mzPcdJ1ah6OeRYsk1kqFqFLhr40weDSMwTjbLAm1771RVzJSkz0L7acRF+WE -F960IK1WaWY9K0D/nRb0VgCckfcLOHQBUsNmQru/QopI196thCP9wnaQQWFyqjIL -pbduyvBc3rPmTeBo+Gm3R2F2rqy2tyxccmYpoYERbYNomuUnSo9Lgo9qe+yRhKXf -hleNchUqUFNYnwvCAx42SU2CNxzBufTVJyTvCvFq1PcUwlVGq+3VIaElwcspzo5f -8eiORT66BM5lV79eG1Tqj4P+ctwIKp3Mq89pfwT9IjgZljDukz56fgZQvDFZQkqs -dZhQoyV7rLx+VKwj/s4k58B8o7kS7IDrCqMhTcwsZJ/gn2xRqeIMUxWxJgnndAZE -5lPHf+/johpj8Zffhd4ehFSe9A4oyAP3BUdndScSixqY58F+f4S5MN32ZHELLng3 -3NO/a4kUcMZ0nF8B4LXygQciKBqMJVp3N+xUL3sKH33ZfJl+PHv5JEvKkaa4JZLT -zbIg5aV+znJR7sdyQWcBE31NYnyJphcz6riROk9KK78d2Zvp3s8= -=BD3O ------END PGP SIGNATURE----- diff --git a/dev-db/mariadb-connector-c/files/fix-libdir.patch b/dev-db/mariadb-connector-c/files/fix-libdir.patch deleted file mode 100644 index c7ade92..0000000 --- a/dev-db/mariadb-connector-c/files/fix-libdir.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff -aurN mariadb_client-2.0.0-src/CMakeLists.txt mariadb_client-2.0.0-src.new/CMakeLists.txt ---- mariadb_client-2.0.0-src/CMakeLists.txt 2014-04-01 11:14:40.000000000 -0400 -+++ mariadb_client-2.0.0-src.new/CMakeLists.txt 2014-04-03 16:12:55.163032445 -0400 -@@ -27,8 +27,19 @@ - - OPTION(WITH_SQLITE "Enables Sqlite support" OFF) - OPTION(WITH_EXTERNAL_ZLIB "Enables use of external zlib" OFF) -+OPTION(INSTALL_LIBDIR "Library install location" OFF) - ############### - -+IF(NOT INSTALL_LIBDIR) -+ # Some distros can set this in a global cmake config -+ IF(CMAKE_INSTALL_LIBDIR) -+ SET(INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}") -+ ELSE() -+ # Provide a sane default -+ SET(INSTALL_LIBDIR "lib/mariadb") -+ ENDIF() -+ENDIF() -+ - IF(WITH_RTC) - SET(RTC_OPTIONS "/RTC1 /RTCc") - ENDIF() -diff -aurN mariadb_client-2.0.0-src/libmariadb/CMakeLists.txt mariadb_client-2.0.0-src.new/libmariadb/CMakeLists.txt ---- mariadb_client-2.0.0-src/libmariadb/CMakeLists.txt 2014-03-18 11:01:05.000000000 -0400 -+++ mariadb_client-2.0.0-src.new/libmariadb/CMakeLists.txt 2014-04-03 16:15:49.417626907 -0400 -@@ -210,15 +210,15 @@ - - INSTALL(TARGETS - libmariadb mariadbclient -- RUNTIME DESTINATION "lib/mariadb" -- LIBRARY DESTINATION "lib/mariadb" -- ARCHIVE DESTINATION "lib/mariadb") -+ RUNTIME DESTINATION "${INSTALL_LIBDIR}" -+ LIBRARY DESTINATION "${INSTALL_LIBDIR}" -+ ARCHIVE DESTINATION "${INSTALL_LIBDIR}") - IF(NOT WIN32 AND WITH_MYSQLCOMPAT) - INSTALL(FILES "${CMAKE_BINARY_DIR}/libmariadb/libmysql${CMAKE_SHARED_LIBRARY_SUFFIX}" - "${CMAKE_BINARY_DIR}/libmariadb/libmysqlclient${CMAKE_SHARED_LIBRARY_SUFFIX}" - "${CMAKE_BINARY_DIR}/libmariadb/libmysqlclient_r${CMAKE_SHARED_LIBRARY_SUFFIX}" - "${CMAKE_BINARY_DIR}/libmariadb/libmysqlclient${CMAKE_STATIC_LIBRARY_SUFFIX}" -- DESTINATION lib/mariadb) -+ DESTINATION ${INSTALL_LIBDIR}) - ENDIF() - - INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ -diff -aurN mariadb_client-2.0.0-src/mariadb_config/mariadb_config.c.in mariadb_client-2.0.0-src.new/mariadb_config/mariadb_config.c.in ---- mariadb_client-2.0.0-src/mariadb_config/mariadb_config.c.in 2014-03-18 11:01:05.000000000 -0400 -+++ mariadb_client-2.0.0-src.new/mariadb_config/mariadb_config.c.in 2014-04-03 16:16:52.455669572 -0400 -@@ -4,7 +4,7 @@ - #include <stdio.h> - - #define INCLUDE "-I@CMAKE_INSTALL_PREFIX@/include/mariadb" --#define LIBS "-L@CMAKE_INSTALL_PREFIX@/lib/mariadb -lmariadb" \ -+#define LIBS "-L@CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@ -lmariadb" \ - "@extra_dynamic_LDFLAGS@" - #define CFLAGS INCLUDE "@CMAKE_C_FLAGS@" - #define VERSION "@MYSQL_CLIENT_VERSION@" diff --git a/dev-db/mariadb-connector-c/files/fix-mariadb_config-2.1.0.patch b/dev-db/mariadb-connector-c/files/fix-mariadb_config-2.1.0.patch deleted file mode 100644 index e5bbce3..0000000 --- a/dev-db/mariadb-connector-c/files/fix-mariadb_config-2.1.0.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -aruN a/mariadb_config/mariadb_config.c.in b/mariadb_config/mariadb_config.c.in ---- a/mariadb_config/mariadb_config.c.in 2015-01-29 13:21:48.000000000 -0500 -+++ b/mariadb_config/mariadb_config.c.in 2015-01-30 13:03:01.312548413 -0500 -@@ -6,7 +6,7 @@ - #define INCLUDE "-I@PREFIX_INSTALL_DIR@/@INCLUDE_INSTALL_DIR@/@SUFFIX_INSTALL_DIR@ -I@PREFIX_INSTALL_DIR@/@INCLUDE_INSTALL_DIR@/@SUFFIX_INSTALL_DIR@/mysql" - #define LIBS "-L@PREFIX_INSTALL_DIR@/@LIB_INSTALL_DIR@/@SUFFIX_INSTALL_DIR@ -lmariadb" \ - "@extra_dynamic_LDFLAGS@" --#define CFLAGS INCLUDE " @CMAKE_C_FLAGS@" -+#define CFLAGS INCLUDE - #define VERSION "@MYSQL_CLIENT_VERSION@" - #define PLUGIN_DIR "@PREFIX_INSTALL_DIR@/@PLUGIN_INSTALL_DIR@" - #define SOCKET "@MYSQL_UNIX_ADDR@" diff --git a/dev-db/mariadb-connector-c/files/fix-mariadb_config.patch b/dev-db/mariadb-connector-c/files/fix-mariadb_config.patch deleted file mode 100644 index 444c877..0000000 --- a/dev-db/mariadb-connector-c/files/fix-mariadb_config.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -aurN a/mariadb_config/CMakeLists.txt b/mariadb_config/CMakeLists.txt ---- a/mariadb_config/CMakeLists.txt 2014-04-29 12:44:35.309693578 -0400 -+++ b/mariadb_config/CMakeLists.txt 2014-04-29 12:43:25.511924411 -0400 -@@ -19,7 +19,8 @@ - SEARCH_LIBRARY(LIBDL dlopen "dl") - SEARCH_LIBRARY(LIBM floor m) - FOREACH(lib ${EXTRA_LIBS}) -- SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} -l${lib}") -+ STRING(REPLACE "-l" "" clean_lib ${lib}) -+ SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} -l${clean_lib}") - ENDFOREACH() - IF(WITH_SQLITE) - SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} -lsqlite") -diff -aurN a/mariadb_config/mariadb_config.c.in b/mariadb_config/mariadb_config.c.in ---- a/mariadb_config/mariadb_config.c.in 2014-04-29 12:44:22.320108741 -0400 -+++ b/mariadb_config/mariadb_config.c.in 2014-04-29 12:41:54.934819014 -0400 -@@ -6,7 +6,7 @@ - #define INCLUDE "-I@CMAKE_INSTALL_PREFIX@/include/mariadb" - #define LIBS "-L@CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@ -lmariadb" \ - "@extra_dynamic_LDFLAGS@" --#define CFLAGS INCLUDE "@CMAKE_C_FLAGS@" -+#define CFLAGS INCLUDE " @CMAKE_C_FLAGS@" - #define VERSION "@MYSQL_CLIENT_VERSION@" - #define SOCKET "@MYSQL_UNIX_ADDR@" - #define PORT "@MYSQL_PORT@" diff --git a/dev-db/mariadb-connector-c/files/gentoo-layout-2.2.2.patch b/dev-db/mariadb-connector-c/files/gentoo-layout-2.2.2.patch deleted file mode 100644 index dd43133..0000000 --- a/dev-db/mariadb-connector-c/files/gentoo-layout-2.2.2.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -aurN a/cmake/install.cmake b/cmake/install.cmake ---- a/cmake/install.cmake 2015-12-08 02:50:35.000000000 -0500 -+++ b/cmake/install.cmake 2016-02-12 21:40:46.599011426 -0500 -@@ -120,12 +120,6 @@ - SET(PREFIX_INSTALL_DIR_${INSTALL_LAYOUT} ${PREFIX_INSTALL_DIR}) - ENDIF() - --IF(NOT SUFFIX_INSTALL_DIR) -- SET(SUFFIX_INSTALL_DIR_${INSTALL_LAYOUT} "mariadb") --ELSE() -- SET(SUFFIX_INSTALL_DIR_${INSTALL_LAYOUT} ${SUFFIX_INSTALL_DIR}) --ENDIF() -- - FOREACH(dir "BIN" "LIB" "INCLUDE" "DOCS" "PREFIX" "SUFFIX" "PLUGIN") - SET(${dir}_INSTALL_DIR ${${dir}_INSTALL_DIR_${INSTALL_LAYOUT}}) - MARK_AS_ADVANCED(${dir}_INSTALL_DIR) ---- a/mariadb_config/CMakeLists.txt 2016-02-12 21:21:06.981021227 -0500 -+++ b/mariadb_config/CMakeLists.txt 2016-02-12 22:06:02.397130410 -0500 -@@ -33,4 +33,4 @@ - # Installation - # - INSTALL(TARGETS mariadb_config -- DESTINATION "bin") -+ DESTINATION ${BIN_INSTALL_DIR}) diff --git a/dev-db/mariadb-connector-c/files/gentoo-layout-3.0.patch b/dev-db/mariadb-connector-c/files/gentoo-layout-3.0.patch deleted file mode 100644 index b57b7ab..0000000 --- a/dev-db/mariadb-connector-c/files/gentoo-layout-3.0.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/mariadb_config/CMakeLists.txt 2016-02-12 21:21:06.981021227 -0500 -+++ b/mariadb_config/CMakeLists.txt 2016-02-12 22:06:02.397130410 -0500 -@@ -40,5 +44,5 @@ - # Installation - # - INSTALL(TARGETS mariadb_config -- DESTINATION "bin" -+ DESTINATION ${INSTALL_BINDIR} - COMPONENT Development) diff --git a/dev-db/mariadb-connector-c/files/gentoo-layout.patch b/dev-db/mariadb-connector-c/files/gentoo-layout.patch deleted file mode 100644 index 5663a37..0000000 --- a/dev-db/mariadb-connector-c/files/gentoo-layout.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -uarN a/cmake/install.cmake b/cmake/install.cmake ---- a/cmake/install.cmake 2015-01-29 13:21:48.000000000 -0500 -+++ b/cmake/install.cmake 2015-03-18 14:43:14.682768210 -0400 -@@ -39,12 +39,14 @@ - ENDIF() - - SET(INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE -- STRING "Installation layout. Currently supported options are DEFAULT (tar.gz and zip) and RPM") -+ STRING "Installation layout. Currently supported options are DEFAULT (tar.gz and zip), GENTOO, and RPM") - - # On Windows we only provide zip and .msi. Latter one uses a different packager. - IF(UNIX) - IF(INSTALL_LAYOUT MATCHES "RPM") - SET(libmariadb_prefix "/usr") -+ ELSEIF(INSTALL_LAYOUT MATCHES "GENTOO") -+ SET(libmariadb_prefix ${CMAKE_INSTALL_PREFIX}) - ELSEIF(INSTALL_LAYOUT MATCHES "DEFAULT") - SET(libmariadb_prefix ${CMAKE_INSTALL_PREFIX}) - ENDIF() -@@ -55,7 +57,7 @@ - ENDIF() - - # check if the specified installation layout is valid --SET(VALID_INSTALL_LAYOUTS "DEFAULT" "RPM") -+SET(VALID_INSTALL_LAYOUTS "DEFAULT" "RPM" "GENTOO") - LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" layout_no) - IF(layout_no EQUAL -1) - MESSAGE(FATAL_ERROR "Invalid installation layout. Please specify one of the following layouts: ${VALID_INSTALL_LAYOUTS}") -diff -uarN a/cmake/install.cmake b/cmake/install.cmake ---- a/cmake/install.cmake 2015-01-29 13:21:48.000000000 -0500 -+++ b/cmake/install.cmake 2015-03-18 14:39:35.240617655 -0400 -@@ -79,6 +79,16 @@ - SET(PLUGIN_INSTALL_DIR_DEFAULT "lib/plugin") - - # -+# Gentoo layout -+# -+SET(SUFFIX_INSTALL_DIR_GENTOO "") -+SET(BIN_INSTALL_DIR_GENTOO "bin") -+SET(LIB_INSTALL_DIR_GENTOO "lib") -+SET(INCLUDE_INSTALL_DIR_GENTOO "include/mariadb") -+SET(DOCS_INSTALL_DIR_GENTOO "share/docs") -+SET(PLUGIN_INSTALL_DIR_GENTOO "lib/mariadb/plugin") -+ -+# - # RPM layout - # - SET(SUFFIX_INSTALL_DIR_RPM "mariadb") -diff -uarN a/cmake/install.cmake b/cmake/install.cmake ---- a/cmake/install.cmake 2015-01-29 13:21:48.000000000 -0500 -+++ b/cmake/install.cmake 2015-03-18 14:31:56.156920869 -0400 -@@ -118,8 +118,5 @@ - SET(PREFIX_INSTALL_DIR_${INSTALL_LAYOUT} ${libmariadb_prefix}) - ENDIF() - --IF(NOT SUFFIX_INSTALL_DIR) -- SET(SUFFIX_INSTALL_DIR_${INSTALL_LAYOUT} "mariadb") --ENDIF() - - FOREACH(dir "BIN" "LIB" "INCLUDE" "DOCS" "PREFIX" "SUFFIX" "PLUGIN") diff --git a/dev-db/mariadb-connector-c/files/multilib-install.patch b/dev-db/mariadb-connector-c/files/multilib-install.patch deleted file mode 100644 index 6dfa270..0000000 --- a/dev-db/mariadb-connector-c/files/multilib-install.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -aruN a/CMakeLists.txt b/CMakeLists.txt ---- a/libmysql/CMakeLists.txt 2013-05-17 14:16:47.621519747 -0400 -+++ b/libmysql/CMakeLists.txt 2013-05-17 14:18:04.570428917 -0400 -@@ -166,9 +166,9 @@ - - INSTALL(TARGETS - libmariadb mariadbclient -- RUNTIME DESTINATION "lib" -- LIBRARY DESTINATION "lib" -- ARCHIVE DESTINATION "lib") -+ RUNTIME DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") - - INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include - DESTINATION mariadbclient) diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-2.2.2.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-2.2.2.ebuild deleted file mode 100644 index 882ee60..0000000 --- a/dev-db/mariadb-connector-c/mariadb-connector-c-2.2.2.ebuild +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -VCS_INHERIT="" -if [[ "${PV}" == 9999 ]] ; then - VCS_INHERIT="git-r3" - EGIT_REPO_URI="https://github.com/MariaDB/connector-c.git" - KEYWORDS="" -else - MY_PN=${PN#mariadb-} - SRC_URI="https://downloads.mariadb.org/f/${MY_PN}-${PV}/${P}-src.tar.gz?serve -> ${P}-src.tar.gz" - S="${WORKDIR}" - KEYWORDS="~amd64 ~x86" -fi - -inherit cmake-utils multilib-minimal ${VCS_INHERIT} - -MULTILIB_CHOST_TOOLS=( /usr/sbin/mariadb_config ) - -MULTILIB_WRAPPED_HEADERS+=( - /usr/include/mariadb/my_config.h -) - -DESCRIPTION="C client library for MariaDB/MySQL" -HOMEPAGE="http://mariadb.org/" -LICENSE="LGPL-2.1" - -SLOT="0/2" -IUSE="mysqlcompat +ssl static-libs" - -DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}] - virtual/libiconv:=[${MULTILIB_USEDEP}] - ssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) - " -RDEPEND="${DEPEND} - mysqlcompat? ( - !dev-db/mysql - !dev-db/mysql-cluster - !dev-db/mariadb - !dev-db/mariadb-galera - !dev-db/percona-server - !dev-db/mysql-connector-c ) - " -PATCHES=( "${FILESDIR}/fix-mariadb_config-2.1.0.patch" - "${FILESDIR}/gentoo-layout-2.2.2.patch" ) - -multilib_src_configure() { - mycmakeargs+=( - -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" - -DWITH_EXTERNAL_ZLIB=ON - -DWITH_OPENSSL=$(usex ssl ON OFF) - -DWITH_MYSQLCOMPAT=$(usex mysqlcompat ON OFF) - -DLIB_INSTALL_DIR=$(get_libdir) - -DPLUGIN_INSTALL_DIR=$(get_libdir)/mariadb/plugin - -DDOCS_INSTALL_DIR=share/docs - -DBIN_INSTALL_DIR=sbin - ) - cmake-utils_src_configure -} - -multilib_src_install_all() { - if ! use static-libs ; then - find "${D}" -name "*.a" -delete || die - fi - if use mysqlcompat ; then - dosym ../sbin/mariadb_config /usr/bin/mysql_config - dosym mariadb /usr/include/mysql - fi -} diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild deleted file mode 100644 index c45c245..0000000 --- a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -VCS_INHERIT="" -if [[ "${PV}" == 9999 ]] ; then - VCS_INHERIT="git-r3" - EGIT_REPO_URI="https://github.com/MariaDB/mariadb-connector-c.git" - KEYWORDS="" -else - MY_PN=${PN#mariadb-} - SRC_URI=" - http://ftp.osuosl.org/pub/mariadb/${MY_PN}-${PV}/source-tgz/${P}-src.tar.gz - http://mirrors.fe.up.pt/pub/mariadb/${MY_PN}-${PV}/source-tgz/${P}-src.tar.gz - http://ftp-stud.hs-esslingen.de/pub/Mirrors/mariadb/${MY_PN}-${PV}/source-tgz/${P}-src.tar.gz - " - S="${WORKDIR}/${P}-src" - KEYWORDS="~amd64 ~x86" -fi - -inherit cmake-utils multilib-minimal ${VCS_INHERIT} - -MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config ) - -MULTILIB_WRAPPED_HEADERS+=( - /usr/include/mariadb/my_config.h -) - -PATCHES=( "${FILESDIR}/fix-mariadb_config-2.1.0.patch" - "${FILESDIR}/gentoo-layout.patch" ) - -DESCRIPTION="C client library for MariaDB/MySQL" -HOMEPAGE="http://mariadb.org/" -LICENSE="LGPL-2.1" - -SLOT="0/2" -IUSE="mysqlcompat +ssl static-libs" - -DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}] - virtual/libiconv:=[${MULTILIB_USEDEP}] - ssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) - " -# Block server packages due to /usr/bin/mariadb_config symlink there -# TODO: make server package block only when mysqlcompat is enabled -RDEPEND="${DEPEND} - !dev-db/mysql - !dev-db/mysql-cluster - !dev-db/mariadb - !dev-db/mariadb-galera - !dev-db/percona-server - mysqlcompat? ( !dev-db/mysql-connector-c ) - " - -multilib_src_configure() { - local mycmakeargs=( - -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock" - -DWITH_EXTERNAL_ZLIB=ON - -DOPENSSL=$(usex ssl ON OFF) - -DMYSQLCOMPAT=$(usex mysqlcompat ON OFF) - -DLIB_INSTALL_DIR=$(get_libdir) - -DPLUGIN_INSTALL_DIR=$(get_libdir)/mariadb/plugin - -DINSTALL_LAYOUT=GENTOO - ) - cmake-utils_src_configure -} - -multilib_src_install_all() { - if ! use static-libs ; then - find "${D}" -name "*.a" -delete || die - fi - if use mysqlcompat ; then - dosym mariadb_config /usr/bin/mysql_config - dosym mariadb /usr/include/mysql - fi -} diff --git a/dev-db/mariadb-connector-c/metadata.xml b/dev-db/mariadb-connector-c/metadata.xml deleted file mode 100644 index 9c4d844..0000000 --- a/dev-db/mariadb-connector-c/metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> -<email>mysql-bugs@gentoo.org</email> -<name>MySQL</name> -</maintainer> -<use> -<flag name="mysqlcompat">Enable mysqlclient library symbolic links</flag> -</use> -</pkgmetadata> diff --git a/dev-db/mariadb/ChangeLog b/dev-db/mariadb/ChangeLog deleted file mode 100644 index ff4783b..0000000 --- a/dev-db/mariadb/ChangeLog +++ /dev/null @@ -1,406 +0,0 @@ -# ChangeLog for dev-db/mariadb -# Copyright 1999-2017 Gentoo Foundation; Distributed under the GPL v2 -# $Id$ - - 28 Jun 2017; Brian Evans <grknight@gentoo.org> mariadb-10.2.6.ebuild: - dev-db/mariadb: Improve building on ABI_X86_32 - - 13 Jun 2017; Brian Evans <grknight@gentoo.org> mariadb-9999.ebuild: - dev-db/mariadb: Fix subslot of 9999 - - 13 Jun 2017; Brian Evans <grknight@gentoo.org> mariadb-10.2.6.ebuild, - metadata.xml: - dev-db/mariadb: Restore jdbc and test functionality as it exists in 10.1 - - 09 Jun 2017; Brian Evans <grknight@gentoo.org> mariadb-10.2.6.ebuild, - metadata.xml: - dev-db/mariadb: Adjust subslot back to 18 which is correct according to - upstream - - 31 May 2017; Brian Evans <grknight@gentoo.org> mariadb-10.2.6.ebuild: - dev-db/mariadb: Update 10.2.6 - - 29 May 2017; Brian Evans <grknight@gentoo.org> mariadb-10.2.6.ebuild: - dev-db/mariadb: Update with critical API patch - - 28 May 2017; Brian Evans <grknight@gentoo.org> -mariadb-10.0.25.ebuild, - -mariadb-10.1.12.ebuild, -mariadb-10.1.13.ebuild, -mariadb-10.1.14.ebuild, - -mariadb-10.2.1.ebuild, -mariadb-10.2.2.ebuild, -mariadb-10.2.4.ebuild, - -mariadb-10.2.5.ebuild: - dev-db/mariadb: Drop old versions - -*mariadb-10.2.6 (28 May 2017) - - 28 May 2017; Brian Evans <grknight@gentoo.org> +mariadb-10.2.6.ebuild: - dev-db/mariadb: Version bump to 10.2.6 GA Needs refinement and lots of - testing - - 02 May 2017; Brian Evans <grknight@gentoo.org> mariadb-10.2.2.ebuild, - mariadb-10.2.4.ebuild, mariadb-10.2.5.ebuild: - dev-db/mariadb: Remove failed MYSLOT experiment - -*mariadb-10.2.1 (02 May 2017) -*mariadb-10.2.2 (02 May 2017) -*mariadb-10.2.4 (02 May 2017) -*mariadb-10.2.5 (02 May 2017) - - 02 May 2017; Brian Evans <grknight@gentoo.org> +mariadb-10.2.1.ebuild, - +mariadb-10.2.2.ebuild, +mariadb-10.2.4.ebuild, +mariadb-10.2.5.ebuild, - mariadb-9999.ebuild: - dev-db/mariadb: Version bumps to test - - 12 May 2016; Brian Evans <grknight@gentoo.org> mariadb-9999.ebuild: - dev-db/mariadb: Bring live version up-to-date - -*mariadb-10.1.14 (10 May 2016) - - 10 May 2016; Brian Evans <grknight@gentoo.org> +mariadb-10.1.14.ebuild, - -mariadb-10.1.10.ebuild, -mariadb-10.1.11.ebuild: - dev-db/mariadb: Version bump for 10.1.14 - -*mariadb-10.0.25 (02 May 2016) - - 02 May 2016; Brian Evans <grknight@gentoo.org> +mariadb-10.0.25.ebuild, - -mariadb-10.0.24.ebuild: - dev-db/mariadb: Version bump for 10.0.25 - -*mariadb-5.5.49 (22 Apr 2016) - - 22 Apr 2016; Brian Evans <grknight@gentoo.org> +mariadb-5.5.49.ebuild, - -mariadb-5.5.48.ebuild: - dev-db/mariadb: Version bump to 5.5.49 - -*mariadb-10.1.13 (30 Mar 2016) - - 30 Mar 2016; Brian Evans <grknight@gentoo.org> +mariadb-10.1.13.ebuild: - dev-db/mariadb: Version bump to 10.1.13 - - 07 Mar 2016; Brian Evans <grknight@gentoo.org> mariadb-10.1.12.ebuild: - dev-db/mariadb: Copy multilib kerberos fixes from portage tree - -*mariadb-10.1.12 (27 Feb 2016) - - 27 Feb 2016; Brian Evans <grknight@gentoo.org> +mariadb-10.1.12.ebuild: - dev-db/mariadb: Version bump 10.1.12; first to use new EAPI6 - -*mariadb-10.0.24 (19 Feb 2016) - - 19 Feb 2016; Brian Evans <grknight@gentoo.org> +mariadb-10.0.24.ebuild, - -mariadb-10.0.23.ebuild: - dev-db/mariadb: Version bump for 10.0.24 - - 12 Feb 2016; Brian Evans <grknight@gentoo.org> -mariadb-5.5.47.ebuild: - dev-db/mariadb: Drop old - -*mariadb-5.5.48 (12 Feb 2016) - - 12 Feb 2016; Brian Evans <grknight@gentoo.org> +mariadb-5.5.48.ebuild: - dev-db/mariadb: Version bump for 5.5.48 - - 31 Jan 2016; Brian Evans <grknight@gentoo.org> mariadb-10.1.11.ebuild: - dev-db/mariadb: Bump patch version to fix kerberos plugin MDEV-9494 - -*mariadb-10.1.11 (29 Jan 2016) - - 29 Jan 2016; Brian Evans <grknight@gentoo.org> +mariadb-10.1.11.ebuild: - dev-db/mariadb: Version bump; needs testing before moving to main tree - - 29 Dec 2015; Brian Evans <grknight@gentoo.org> mariadb-10.0.23.ebuild, - mariadb-10.1.10.ebuild: - dev-db/mariadb: Add missing build dependency wrt bug 570114 app-arch/snappy - is needed for TokuDB - - 29 Dec 2015; Brian Evans <grknight@gentoo.org> mariadb-10.1.10.ebuild: - dev-db/mariadb: Fix Mroonga Engine cmake option - - 28 Dec 2015; Brian Evans <grknight@gentoo.org> -mariadb-10.0.19.ebuild, - -mariadb-10.0.22-r1.ebuild, -mariadb-10.0.22.ebuild, -mariadb-10.1.8.ebuild, - -mariadb-10.1.9-r1.ebuild, -mariadb-10.1.9.ebuild, metadata.xml: - dev-db/mariadb: Drop old - -*mariadb-10.1.10 (28 Dec 2015) - - 28 Dec 2015; Brian Evans <grknight@gentoo.org> +mariadb-10.1.10.ebuild: - dev-db/mariadb: Version bump for 10.1.10 - -*mariadb-5.5.47 (23 Dec 2015) - - 23 Dec 2015; Brian Evans <grknight@gentoo.org> +mariadb-5.5.47.ebuild, - -mariadb-5.5.46.ebuild: - dev-db/mariadb: Version bump for 5.5.47 - -*mariadb-10.0.23 (23 Dec 2015) - - 23 Dec 2015; Brian Evans <grknight@gentoo.org> +mariadb-10.0.23.ebuild: - dev-db/mariadb: Version bump - - 29 Oct 2015; Brian Evans <grknight@gentoo.org> -mariadb-10.1.6_beta.ebuild, - -mariadb-10.1.7_rc.ebuild: - dev-db/mariadb: Drop old, vulnerable 10.1 series beta releases - -*mariadb-10.0.22-r1 (29 Oct 2015) -*mariadb-10.0.22 (29 Oct 2015) - - 29 Oct 2015; Brian Evans <grknight@gentoo.org> +mariadb-10.0.22-r1.ebuild, - +mariadb-10.0.22.ebuild, -mariadb-10.0.21-r1.ebuild, -mariadb-10.0.21.ebuild: - dev-db/mariadb: Version bump to 10.0.22 - - 21 Oct 2015; Brian Evans <grknight@gentoo.org> mariadb-10.1.8.ebuild: - dev-db/mariadb: Update test instructions - - 12 Oct 2015; Brian Evans <grknight@gentoo.org> mariadb-10.1.7_rc.ebuild: - dev-db/mariadb: Readd ~arm64 which was dropped accidentally - -*mariadb-5.5.46 (12 Oct 2015) - - 12 Oct 2015; Brian Evans <grknight@gentoo.org> +mariadb-5.5.46.ebuild, - -mariadb-5.5.45.ebuild: - dev-db/mariadb: Version bump for 5.5 series - -*mariadb-10.1.4_beta (14 Apr 2015) - - 14 Apr 2015; <grknight@gentoo.org> -mariadb-5.5.41.ebuild, - -mariadb-10.1.0_alpha.ebuild, -mariadb-10.1.2_alpha.ebuild, - +mariadb-10.1.4_beta.ebuild: - Version bump; drop old - -*mariadb-10.1.3_beta (16 Mar 2015) - - 16 Mar 2015; Brian Evans <grknight@gentoo.org> +mariadb-10.1.3_beta.ebuild: - [mariadb] Version bump for 10.1 series to beta - -*mariadb-5.5.39 (05 Aug 2014) - - 05 Aug 2014; <grknight@gentoo.org> +mariadb-5.5.39.ebuild, - -mariadb-5.5.38-r1.ebuild: - [mariadb] Version bump Bug 518718 - -*mariadb-10.0.7 (30 Dec 2013) - - 30 Dec 2013; Brian Evans <grknight@tuffmail.com> files/my.cnf-5.5, - -mariadb-10.0.4.ebuild, +mariadb-10.0.7.ebuild: - [mariadb] Version bump for 10 series - -*mariadb-5.5.34 (22 Nov 2013) - - 22 Nov 2013; Brian Evans <grknight@tuffmail.com> +mariadb-5.5.34.ebuild: - [mariadb] Version bump - - 19 Nov 2013; Brian Evans <grknight@tuffmail.com> -mariadb-10.0.1.ebuild, - -mariadb-10.0.2.ebuild, -mariadb-10.0.3.ebuild, -mariadb-5.5.31.ebuild: - [mariadb] Drop old - -*mariadb-10.0.6 (19 Nov 2013) - - 19 Nov 2013; Brian Evans <grknight@tuffmail.com> +mariadb-10.0.6.ebuild: - [mariadb] Version bump to 10.0.6 - -*mariadb-10.0.4 (09 Oct 2013) - - 09 Oct 2013; Brian Evans <grknight@tuffmail.com> +mariadb-10.0.4.ebuild: - [mariadb] Version bump for 10.0.4 All tests pass - -*mariadb-5.5.33a (20 Sep 2013) - - 20 Sep 2013; Brian Evans <grknight@tuffmail.com> +mariadb-5.5.33a.ebuild, - -mariadb-5.5.33.ebuild: - [mariadb] Version Bump to 5.5.33a All tests pass Fix crashes upstream Remove - hacks for jemalloc and tokudb per upstream - -*mariadb-5.5.33 (18 Sep 2013) - - 18 Sep 2013; Brian Evans <grknight@tuffmail.com> +mariadb-5.5.33.ebuild, - metadata.xml: - [mariadb] Bump to version 5.5.33 PBXT was removed upstream TokuDB was added. - TokuDB only builds on amd64 according to author. jemalloc was added by - upstream. Small hack in cmake to use system lib. - - 29 Aug 2013; Brian Evans <grknight@tuffmail.com> -mariadb-5.1.66.ebuild, - -mariadb-5.2.13.ebuild, -mariadb-5.3.11.ebuild, -mariadb-5.5.28a.ebuild, - -mariadb-5.5.29.ebuild, -mariadb-5.5.30.ebuild: - [dev-db/mariadb] Trim old - -*mariadb-5.5.32 (19 Jul 2013) - - 19 Jul 2013; Brian Evans <grknight@tuffmail.com> +mariadb-5.5.32.ebuild: - Version bump - -*mariadb-10.0.3 (12 Jun 2013) - - 12 Jun 2013; Robin H. Johnson <robbat2@gentoo.org> +mariadb-10.0.3.ebuild: - Bump, tests still running for now. - -*mariadb-5.5.31 (28 May 2013) - - 28 May 2013; Robin H. Johnson <robbat2@gentoo.org> +mariadb-5.5.31.ebuild: - Bump. - -*mariadb-10.0.1 (21 Mar 2013) - - 21 Mar 2013; Robin H. Johnson <robbat2@gentoo.org> +mariadb-10.0.1.ebuild: - Very untested MariaDB 10 series. - -*mariadb-5.5.30 (13 Mar 2013) - - 13 Mar 2013; Robin H. Johnson <robbat2@gentoo.org> +mariadb-5.5.30.ebuild: - Bump. - - 04 Mar 2013; Robin H. Johnson <robbat2@gentoo.org> mariadb-5.1.67.ebuild, - mariadb-5.2.14.ebuild, mariadb-5.3.12.ebuild, mariadb-5.5.29.ebuild: - Update headers and keywords. - - 28 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> files/my.cnf-4.1, - files/my.cnf-5.1, files/my.cnf-5.5: - Sync with gentoo-x86 for prefix changes. - - 20 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> mariadb-5.1.62-r1.ebuild, - mariadb-5.1.62.ebuild, mariadb-5.1.66.ebuild, mariadb-5.2.12-r1.ebuild, - mariadb-5.2.12.ebuild, mariadb-5.2.13.ebuild, mariadb-5.3.11.ebuild, - mariadb-5.3.6.ebuild, mariadb-5.3.7.ebuild, mariadb-5.3.9.ebuild, - mariadb-5.5.24.ebuild, mariadb-5.5.25-r1.ebuild, mariadb-5.5.25.ebuild, - mariadb-5.5.28.ebuild, mariadb-5.5.28a.ebuild: - HPPA has decided not to support mariadb for the present time. - - 20 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> -mariadb-5.1.55.ebuild: - Trim old versions. - - 20 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> mariadb-5.5.24.ebuild, - mariadb-5.5.25-r1.ebuild, mariadb-5.5.25.ebuild, mariadb-5.5.28.ebuild, - mariadb-5.5.28a.ebuild: - Fix {tests} typo. - - 22 May 2012; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mariadb-5.1.55.ebuild, mariadb-5.1.62.ebuild, mariadb-5.2.7.ebuild, - mariadb-5.2.8.ebuild, mariadb-5.2.9.ebuild, mariadb-5.2.10.ebuild, - mariadb-5.2.12.ebuild, mariadb-5.3.0_beta.ebuild, mariadb-5.3.1_beta.ebuild, - mariadb-5.3.3_rc.ebuild, mariadb-5.3.5.ebuild, mariadb-5.3.6.ebuild, - mariadb-5.5.22.ebuild, mariadb-5.5.23.ebuild: - Move EAPI assignment to the top. - Whitespace. - -*mariadb-5.3.3_rc (12 Jan 2012) - - 12 Jan 2012; <atlantis@gentoo.org> +mariadb-5.3.3_rc.ebuild: - [dev-db/mariadb] 5.3.3_rc version bump. - -*mariadb-5.2.10 (12 Jan 2012) - - 12 Jan 2012; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mariadb-5.2.10.ebuild: - [dev-db/mariadb] Bump to 5.2.10 revision. - - 20 Dec 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mariadb-5.2.7.ebuild, mariadb-5.2.8.ebuild, mariadb-5.3.0_beta.ebuild: - [dev-db/mariadb] Bump EAPI to 4 on old mariadb versions. - - 25 Oct 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mariadb-5.1.55.ebuild, mariadb-5.2.9.ebuild, mariadb-5.3.1_beta.ebuild: - [dev-db/mariadb] Use EAPI-4 to support the new Prefix support of the - eclasses. - -*mariadb-5.2.9 (27 Sep 2011) - - 27 Sep 2011; <atlantis@gentoo.org> +mariadb-5.2.9.ebuild: - Bumped mariadb to 5.2.9 release. - -*mariadb-5.3.1_beta (22 Sep 2011) - - 22 Sep 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mariadb-5.3.1_beta.ebuild: - Bumped mariadb to the 5.3.1_beta release. This needs more work as even unit - tests are failing. - -*mariadb-5.2.8 (19 Aug 2011) - - 19 Aug 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mariadb-5.2.8.ebuild: - [dev-db/maria] Bumped to release 5.2.8. - - 19 Aug 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mariadb-5.2.7.ebuild, mariadb-5.3.0_beta.ebuild: - Added patch by Diego to fix the multiple install of files. - -*mariadb-5.3.0_beta (29 Jul 2011) - - 29 Jul 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mariadb-5.3.0_beta.ebuild: - [dev-db/mariadb] Bump to the first 5.3.0 beta release. - - 21 Jul 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - -mariadb-5.1.42-r1.ebuild, -mariadb-5.1.50.ebuild, -mariadb-5.1.50-r1.ebuild, - -mariadb-5.1.53.ebuild, -mariadb-5.2.4.ebuild, -mariadb-5.2.5.ebuild, - -mariadb-5.2.6.ebuild: - Dropped old versions of mariadb from the overlay. - - 14 Jul 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mariadb-5.1.55.ebuild: - [dev-db/mariadb-5.1.55] Sync the ebuild from the mariadb-5.2.7 ebuild. - Drop irrelevant code and use mysql-v2 and not mysql-autotools. - -*mariadb-5.2.6 (13 May 2011) - - 13 May 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mariadb-5.1.55.ebuild, mariadb-5.2.5.ebuild, +mariadb-5.2.6.ebuild: - Bumped mariadb to the 5.2.6 release. - Fixed the calls to the mysql-autotools functions in the ebuilds using the - mysql-v2 eclass. - - 28 Mar 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mariadb-5.1.55.ebuild, mariadb-5.2.4.ebuild, mariadb-5.2.5.ebuild: - Review the build type support in the eclass / ebuilds. - -*mariadb-5.2.5 (27 Mar 2011) - - 27 Mar 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - -mariadb-5.2.3.ebuild, +mariadb-5.2.5.ebuild: - Bumped mariadb to the 5.2.5 release. - -*mariadb-5.1.55 (05 Mar 2011) - - 05 Mar 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mariadb-5.1.42-r1.ebuild, mariadb-5.1.50.ebuild, mariadb-5.1.50-r1.ebuild, - mariadb-5.1.53.ebuild, +mariadb-5.1.55.ebuild, mariadb-5.2.3.ebuild, - mariadb-5.2.4.ebuild: - Bumped mariadb to the 5.1.55 release. - Updated testing instructions for mariadb ebuilds. - -*mariadb-5.2.3 (29 Nov 2010) - - 29 Nov 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mariadb-5.2.3.ebuild: - Added initial ebuild to test 5.2.3 release. Updated eclass as the maria - plugin was renamed to aria in the maria-5.2 tree. - This ebuild is currently dying on the configure run - it seems autoconf is - eating a case in the plugins.m4 file. - -*mariadb-5.1.50-r1 (06 Oct 2010) - - 06 Oct 2010; Robin H. Johnson <robbat2@gentoo.org> mariadb-5.1.50.ebuild, - +mariadb-5.1.50-r1.ebuild: - Release ready for tree now. - - 06 Oct 2010; Robin H. Johnson <robbat2@gentoo.org> mariadb-5.1.50.ebuild: - Ready for release. - - 27 Sep 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mariadb-5.1.50.ebuild: - Dropped the block on amarok[embedded]. - - 24 Sep 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mariadb-5.1.50.ebuild: - Drop the EGIT_REPO_URI used to test locally. - -*mariadb-5.1.50 (24 Sep 2010) - - 24 Sep 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mariadb-5.1.50.ebuild: - Updated mariadb to the 5.1.50 release and added embedded support based on - Kristian Nielsen's <knielsen AT knielsen-hq DOT org> updated patch - bug - 306315. - -*mariadb-5.1.42 (15 Mar 2010) - - 15 Mar 2010; Robin H. Johnson <robbat2@gentoo.org> +files/my.cnf-4.1, - +mariadb-5.1.42.ebuild, +metadata.xml: - Add MariaDB. Bug #303130, based on the submission by Brian Evans - <grknight@tuffmail.com>. diff --git a/dev-db/mariadb/Manifest b/dev-db/mariadb/Manifest deleted file mode 100644 index ea9f04c..0000000 --- a/dev-db/mariadb/Manifest +++ /dev/null @@ -1,34 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -DIST mariadb-10.0.35.tar.gz 66551252 SHA256 1b8368e9653570ccb555a07db3de3a8b7277e7587a916d176d2ec70d3c05c00e SHA512 01fc8d48be3f3847bb222835436ab938c6c5b5ac8ba6cc87b3b6d2a2201b7ab4b152dc1f7d9749c89de90097d50052714ac08aafbbb117fffac32bfb47e74779 WHIRLPOOL 2b70e7d79196c3ce2df503a0a7d1d8eea075b98c9ab09e5ee72b3af567cccaa9d5e00d1dfb0320d36e6d6fc2217fe8ceb0321f93f24377060a0ba8df88feabc7 -DIST mariadb-10.1.33.tar.gz 65292094 SHA256 94312c519f2c0c25e1964c64e22aff0036fb22dfb2685638f43a6b2211395d2d SHA512 1d30e06d0c19e338bfbbe6815cf5eee8e1b839b525950f7f54c7cf8f89034658a284df4756f54719ab0f55875546d4713b03bab7dd094ec13291732b069f737e WHIRLPOOL 95cd15f8eb63db01af4d2164c51e4026e31ddbc44a657eac0643a9b43279679d287d6a4424a38d1e957580d3f851efebf9ec530fdd6aa1fb7acf4ff1e0a1a0f8 -DIST mariadb-10.2.15.tar.gz 73329750 SHA256 33de205158fc22fd8eb4e5770cc5ffa1cb4029f9c398dfd8c554ccb3e636ba11 SHA512 7702af8787973b15784dc8a89f9d56765725a420e2e68f1924b67c88c134c7d83d3249dddd16707fa9e5f05ed747f813f16feefbb477e999a6698b1dcfb5a88f WHIRLPOOL 9155656363232c2fd0a5f90d6883320fc41618a73a58c8b54512d3f7a81ef56b9ee2566bf0f4c19094cd25dd9fa9cf7f0623f90a4345e2192e87dc5f98014cdb -DIST mariadb-5.1.67.tar.gz 25022999 SHA256 33471e9275c9b03919cabc38eb39f807d645adabf6a1a18f2e41ed73f47677c8 SHA512 de4a531027860c4226ec5e023b6f8573c2eb723bacaeb14279b9609ed033dcb58fc090aef3d9babcd4a4d0817ddf6ef75589c78f63075072d31ad0b7f7c17d7d WHIRLPOOL 22696d27c3a510396c4b86db5f5a4b39bbcde89285a8460b175ef7c40b3b7541fc8f205c0b96da7f94504a7fd14bfe02efb45204efda524a2426cd25e08162ff -DIST mariadb-5.2.14.tar.gz 25469828 SHA256 8ab3db0535ce8728b03a34799da2334c18cff467e01d122293f23aad20613fe5 SHA512 b0aded450355861bf01604ac5bd0012d0d06a699bc83017cdb6b8749ed161aca9fedb733301aab991c521b21f3c8b2fea4867a2fd038379475e720782c02e869 WHIRLPOOL 8c2dd7ee0c1df5696d6b9f5c4387b7f755258a710ac088559f0f9779b27d18e30f32de0d4212015a15b6a83de2abbdd5c4ec811fa87fe2aec547809dc0970607 -DIST mariadb-5.3.12.tar.gz 26880808 SHA256 83a4598117cadde2bd7eac4c1398edbc86cc3aa8d3824bbee864d4b568a3a30c SHA512 d53ea48745dad5693fd6a1fd5cf502852f12f8236b8a1fb7f81ad647301d2fd08d4f2944c74de580d0a4136d6c8b49f257124fa1b234ba8f2338f2047435ef94 WHIRLPOOL b9caf1b241262b3b25728769116a94b480ae404ed3d49c8afd6eb4ad6071552e436e4b9483e7f5d0113bc3127eaf04ceaa80d455486e7a92d00820b6b298c460 -DIST mariadb-5.5.49.tar.gz 45738390 SHA256 2c82f2af71b88a7940d5ff647498ed78922c92e88004942caa213131e20f4706 SHA512 4eceb8ab4e1fb7144374f100440b83a8b3294fa9da61027086c27b02b8ff899e3f9d4511adbb02fb50ddab92a48bf6a39ad71ab9e00bc8be00022a4ea4e6fc2f WHIRLPOOL e757ff389b184fa235e39bebbfd4bd53e29a20da640a90a6a2454537a238edfff07f9a76da32e65a7756aa25421174d57f6f28d94924bb3ee0aa7ac6474d03c3 -DIST mariadb-5.5.60.tar.gz 45822878 SHA256 4d3d444555416028ce39d3fb4cdc9cf6a658fcd4b0d2d0c45a73f9bf01d07929 SHA512 eacf6ec57d46b00701b5038a67745174060d592b0e425466149c9a1b6dc1ac0659a36e57e82bf7e9f7865d8eac3dd50d0737630bd6220002d168b5b574437e4c WHIRLPOOL 09ad7e9f95fa6aa19300aca84c9fd674b3d68a5e519dba14a4e5ad9b421afa1898d8d86fc377f2a6c5f5c999bf39ec20d3e40d3a24b0b26182b80caa69afac5e -DIST mysql-extras-20121101-2319Z.tar.bz2 1898358 SHA256 ea5da082d3384bde67e005ebc39b78e7caadea80745333fb5a9cf47a4c4e4c5d SHA512 6a49abb1beee012d87ab63071a568ee6d9d8e4ff7a76401b91f5bdc127860d1c504a3877cbadb81536b07afe5ff419c77c793b0fc14ba484f56765d1ca526614 WHIRLPOOL 4bda75a0a9063830b3140bbc3cb12b60fa21289eee2fa476fb286da6318fdf0445a9c6193bd2063aefcd3f4ecc1f8045b30635f0e32014098d0f3dbee86e01fc -DIST mysql-extras-20150509-1847Z.tar.bz2 1494301 SHA256 de9c9fbb67998604cb3c0409842e4601646c8ad17f2aa301f55ffd4aed7a483d SHA512 f87d96ab8c35236d4453182c49f87f6e703af9dc217916546e4dd7368caa18a2340c9063decd96c22251d1097d7e2cac58bef30e6ff75c23aedf8926dbc3d3b4 WHIRLPOOL f60297c8ee1dfd9867ed6b29a8b04a002f23bc36b1e8d9b5db30e1e454a49fe06ffc37b10d934b11235364eecdc62beb50ce24690ab3d07a50056357906fa0fa -DIST mysql-extras-20180515-1334Z.tar.bz2 321462 SHA256 1a2c4116017ec56ec77375fa7fc85c7f0375d342505a45de16c4fd0dacd4bddf SHA512 de3000f0c65eed9595b52d53205cdcac60cb4a06a5aca27057c8beca6a7890f453aeeda0bb8487b8de75cfb4caa48682b7706273574876c5cefd0d03988c4f7e WHIRLPOOL b3a5fa87ea88cd823d2c7e5449fa50789cc13d487df800836644ba568ba3f8cab34bc26f57e41901e842ef73f7665636b843b8815c996d315589fb1a34ca39a6 -DIST mysql-extras-20180628-0201Z.tar.bz2 322141 SHA256 8317028fa98cc4abd819d11191fb82026eb9c4d23490b7c1d42590731fbc834d SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a WHIRLPOOL 71a5d8d09ede40a2d7adad6d57e1b546fabb34610c92ede6e0b472c0d84ad016e39ec7fcb038c708723535542dfd9caace22f2b8dd822951ba8c0ee2778c462b ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQKTBAEBCAB9FiEEZsLkTtkOMnWOfVXA0feB7/n0o7YFAls0Q4FfFIAAAAAALgAo -aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDY2 -QzJFNDRFRDkwRTMyNzU4RTdENTVDMEQxRjc4MUVGRjlGNEEzQjYACgkQ0feB7/n0 -o7Y+TBAAr7fX+M15A+xeEuNYXAR3aUdHHcK2UzZPL0Jp7yIkjq+1UQnE7I7h55tk -KIzafOXOtuBAO7Hc2AiVdjUeC+f5RjhFFyegBS/c36tc9xjjVEyiY/dHdN8RkQek -3cthXUvtVfRFZWRVKdVCdGxfg5uqNSr7epo/uBvGyQ/TIfc7KAt8jmnE2Nl0ptSc -hdwjCFEFp8F2Ps01YbgJ3cj/0h1iMh6pVZhCu0UNcBKGbKbAkHmqQEMb28JygziL -TBtyXrFztnD3iAnpMXac2BzvARbnS2LYAJtmfiCijGP/AhpvW8Zdumi5ED+TYJ0i -STD0jjyqxAYivm7NfxEYv9b8ADwk0MfJG4bUlYl5qAJBbqWOU6J2XzTYXFwTLtHU -H/6rVUaBB0hYFw/J8cKOvGFkg+6PoSVRysgPwqMx3sfVhecoCB6GXKBawWwgaZvB -6MvrTbME7zQcLlL8zuGwbDZkBXMLw+XPz5DNFnCfEysqN3Y9TylTXXOW4q3AwGkm -gEw7T1fueVZ/88j/YCnNivMdg811ciIJfzY1p2MPgUsI4d7y2snCxr5xhuupqGDd -oFRlttu8QrLFQc654HVWKWK4c2+wZWz1vyj1KELZiC52W+FDlGfdHhjYIgDdjiK6 -zxMpN48+r3mqYGFxkNA/GrIZtC/ijuNBplfr7Y9JVD7RMD1PFOY= -=8aGJ ------END PGP SIGNATURE----- diff --git a/dev-db/mariadb/files/my.cnf-10.2 b/dev-db/mariadb/files/my.cnf-10.2 deleted file mode 100644 index 80b4771..0000000 --- a/dev-db/mariadb/files/my.cnf-10.2 +++ /dev/null @@ -1,3 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. - -!includedir @GENTOO_PORTAGE_EPREFIX@/etc/mysql/mariadb.d diff --git a/dev-db/mariadb/files/my.cnf-5.1 b/dev-db/mariadb/files/my.cnf-5.1 deleted file mode 100644 index a5e8bb0..0000000 --- a/dev-db/mariadb/files/my.cnf-5.1 +++ /dev/null @@ -1,146 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. -# $Id$ - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock - -[mysql] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqladmin] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlcheck] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqldump] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlimport] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlshow] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[myisamchk] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -# use [safe_mysqld] with mysql-3 -[mysqld_safe] -err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid -log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err -basedir = @GENTOO_PORTAGE_EPREFIX@/usr -datadir = @DATADIR@ -skip-external-locking -key_buffer = 16M -max_allowed_packet = 1M -table_open_cache = 64 -sort_buffer_size = 512K -net_buffer_length = 8K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -language = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/english - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ -#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname - -# you need the debug USE flag enabled to use the following directives, -# if needed, uncomment them, start the server and issue -# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace -# this will show you *exactly* what's happening in your server ;) - -#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql -#gdb -#debug = d:t:i:o,/tmp/mysqld.trace -#one-thread - -# uncomment the following directives if you are using BDB tables -#bdb_cache_size = 4M -#bdb_max_lock = 10000 - -# the following is the InnoDB configuration -# if you wish to disable innodb instead -# uncomment just the next line -#skip-innodb -# -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -innodb_buffer_pool_size = 16M -# this is the default, increase it if you have lots of tables -innodb_additional_mem_pool_size = 2M -# -# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route -# we have to take for the moment -#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -innodb_log_file_size = 5M -# this is the default, increase it if you have very large transactions going on -innodb_log_buffer_size = 8M -# this is the default and won't hurt you -# you shouldn't need to tweak it -innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_file_per_table - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[isamchk] -key_buffer = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[myisamchk] -key_buffer = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[mysqlhotcopy] -interactive-timeout diff --git a/dev-db/mariadb/files/my.cnf-5.5 b/dev-db/mariadb/files/my.cnf-5.5 deleted file mode 100644 index 221edcb..0000000 --- a/dev-db/mariadb/files/my.cnf-5.5 +++ /dev/null @@ -1,150 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. -# $Id$ - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock - -[mysql] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqladmin] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlcheck] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqldump] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlimport] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlshow] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[myisamchk] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -# use [safe_mysqld] with mysql-3 -[mysqld_safe] -err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid -log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err -basedir = @GENTOO_PORTAGE_EPREFIX@/usr -datadir = @DATADIR@ -skip-external-locking -key_buffer_size = 16M -max_allowed_packet = 1M -table_open_cache = 64 -sort_buffer_size = 512K -net_buffer_length = 8K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql -#Set this to your desired error message language -lc_messages = en_US - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ -#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname - -# you need the debug USE flag enabled to use the following directives, -# if needed, uncomment them, start the server and issue -# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace -# this will show you *exactly* what's happening in your server ;) - -#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql -#gdb -#debug = d:t:i:o,/tmp/mysqld.trace -#one-thread - -# the following is the InnoDB configuration -# if you wish to disable innodb instead -# uncomment just the next line -#skip-innodb -# -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -innodb_buffer_pool_size = 16M -# this is the default, increase it if you have lots of tables -innodb_additional_mem_pool_size = 2M -# -# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route -# we have to take for the moment -#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -innodb_log_file_size = 5M -# this is the default, increase it if you have very large transactions going on -innodb_log_buffer_size = 8M -# this is the default and won't hurt you -# you shouldn't need to tweak it -innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_file_per_table - -# Uncomment this to get FEDERATED engine support -#plugin-load=federated=ha_federated.so -loose-federated - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[isamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[myisamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer_size = 2M -write_buffer_size = 2M - -[mysqlhotcopy] -interactive-timeout - -[mariadb] diff --git a/dev-db/mariadb/files/my.cnf-5.6 b/dev-db/mariadb/files/my.cnf-5.6 deleted file mode 100644 index 7374a81..0000000 --- a/dev-db/mariadb/files/my.cnf-5.6 +++ /dev/null @@ -1,143 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. -# $Id$ - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock - -[mysql] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqladmin] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlcheck] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqldump] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlimport] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlshow] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[myisamchk] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -# use [safe_mysqld] with mysql-3 -[mysqld_safe] -err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid -log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err -basedir = @GENTOO_PORTAGE_EPREFIX@/usr -datadir = @DATADIR@ -skip-external-locking -key_buffer_size = 16M -max_allowed_packet = 4M -table_open_cache = 400 -sort_buffer_size = 512K -net_buffer_length = 16K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql -#Set this to your desired error message language -lc_messages = en_US - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ -#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname - -# you need the debug USE flag enabled to use the following directives, -# if needed, uncomment them, start the server and issue -# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace -# this will show you *exactly* what's happening in your server ;) - -#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql -#gdb -#debug = d:t:i:o,/tmp/mysqld.trace -#one-thread - -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -innodb_buffer_pool_size = 128M -# -# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route -# we have to take for the moment -#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -innodb_log_file_size = 48M -# this is the default, increase it if you have very large transactions going on -innodb_log_buffer_size = 8M -# this is the default and won't hurt you -# you shouldn't need to tweak it -innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_file_per_table - -# Uncomment this to get FEDERATED engine support -#plugin-load=federated=ha_federated.so -loose-federated - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[isamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[myisamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer_size = 2M -write_buffer_size = 2M - -[mysqlhotcopy] -interactive-timeout - -[mariadb] diff --git a/dev-db/mariadb/files/my.cnf.distro-client b/dev-db/mariadb/files/my.cnf.distro-client deleted file mode 100644 index 4bbe0f9..0000000 --- a/dev-db/mariadb/files/my.cnf.distro-client +++ /dev/null @@ -1,21 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/50-distro-client.cnf: The global mysql configuration file. - -# The following options will be passed to all MySQL clients -[client] -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -character-sets-dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets -default-character-set=utf8 - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[mysqldump] -quick -max_allowed_packet = 16M - -[myisamchk] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets - -[myisampack] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb/charsets diff --git a/dev-db/mariadb/files/my.cnf.distro-server b/dev-db/mariadb/files/my.cnf.distro-server deleted file mode 100644 index eaf80be..0000000 --- a/dev-db/mariadb/files/my.cnf.distro-server +++ /dev/null @@ -1,28 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/50-distro-server.cnf: The global mysql configuration file. - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mariadb.pid -log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err -basedir = @GENTOO_PORTAGE_EPREFIX@/usr -datadir = @DATADIR@ -skip-external-locking -lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mariadb -#Set this to your desired error message language -lc_messages = en_US - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ -#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname diff --git a/dev-db/mariadb/mariadb-10.0.35-r1.ebuild b/dev-db/mariadb/mariadb-10.0.35-r1.ebuild deleted file mode 100644 index a524cb6..0000000 --- a/dev-db/mariadb/mariadb-10.0.35-r1.ebuild +++ /dev/null @@ -1,844 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -MY_EXTRAS_VER="20180515-1334Z" -SUBSLOT="18" - -JAVA_PKG_OPT_USE="jdbc" - -# Keeping eutils in EAPI=6 for emktemp in pkg_config - -inherit eutils flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils multilib-build - -SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz " - -# Gentoo patches to MySQL -if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then - SRC_URI="${SRC_URI} - mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" -fi - -HOMEPAGE="http://mariadb.org/" -DESCRIPTION="An enhanced, drop-in replacement for MySQL" -LICENSE="GPL-2" -SLOT="0/${SUBSLOT:-0}" -IUSE="bindist client-libs debug extraengine jdbc jemalloc latin1 libressl - numa odbc oqgraph pam +perl profiling selinux +server sphinx - static static-libs systemtap tcmalloc - test tokudb xml yassl" - -# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests -RESTRICT="!bindist? ( bindist ) libressl? ( test )" - -REQUIRED_USE="jdbc? ( extraengine server !static ) - server? ( tokudb? ( jemalloc !tcmalloc ) ) - ?? ( tcmalloc jemalloc ) - static? ( yassl !pam )" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" - -# Shorten the path because the socket path length must be shorter than 107 chars -# and we will run a mysql server during test phase -S="${WORKDIR}/mysql" - -if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then - MY_PATCH_DIR="${WORKDIR%/}/mysql-extras" - inherit git-r3 - EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git" - EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras" - EGIT_CLONE_TYPE=shallow -else - MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}" -fi - -PATCHES=( - "${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch" - "${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-10.0.33.patch" - "${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch" - "${MY_PATCH_DIR}/20018_all_mariadb-10.0.20-without-clientlibs-tools.patch" -) - -# Be warned, *DEPEND are version-dependant -# These are used for both runtime and compiletime -COMMON_DEPEND=" - kernel_linux? ( - sys-process/procps:0= - dev-libs/libaio:0= - ) - >=sys-apps/sed-4 - >=sys-apps/texinfo-4.7-r1 - jemalloc? ( dev-libs/jemalloc:0= ) - tcmalloc? ( dev-util/google-perftools:0= ) - systemtap? ( >=dev-util/systemtap-1.3:0= ) - !yassl? ( - !libressl? ( dev-libs/openssl: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= - ) - server? ( - extraengine? ( - odbc? ( dev-db/unixODBC:0= ) - xml? ( dev-libs/libxml2:2= ) - ) - numa? ( sys-process/numactl ) - oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) - pam? ( virtual/pam:0= ) - tokudb? ( app-arch/snappy ) - ) - >=dev-libs/libpcre-8.41-r1:3= -" -DEPEND="virtual/yacc - static? ( sys-libs/ncurses[static-libs] ) - || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) - server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) - ${COMMON_DEPEND}" -RDEPEND="selinux? ( sec-policy/selinux-mysql ) - client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c ) - !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster - server? ( !prefix? ( dev-db/mysql-init-scripts ) ) - ${COMMON_DEPEND} - perl? ( !dev-db/mytop - virtual/perl-Getopt-Long - dev-perl/TermReadKey - virtual/perl-Term-ANSIColor - virtual/perl-Time-HiRes ) - server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) -" -# For other stuff to bring us in -# dev-perl/DBD-mysql is needed by some scripts installed by MySQL -PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 ) - !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )" - -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] ; then - local GCC_MAJOR_SET=$(gcc-major-version) - local GCC_MINOR_SET=$(gcc-minor-version) - if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} with tokudb needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on - # non x86{,_64} arches - if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - fi - java-pkg-opt-2_pkg_setup - if has test ${FEATURES} && \ - use server && ! has userpriv ${FEATURES} ; then - eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - - # This should come after all of the die statements - enewgroup mysql 60 || die "problem adding 'mysql' group" - enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" -} - -pkg_preinst() { - java-pkg-opt-2_pkg_preinst -} - -pkg_postinst() { - # Make sure the vars are correctly initialized - mysql_init_vars - - # Create log directory securely if it does not exist - [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" - - if use server ; then - if use pam; then - einfo - elog "This install includes the PAM authentication plugin." - elog "To activate and configure the PAM plugin, please read:" - elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/" - einfo - fi - - if [[ -z "${REPLACING_VERSIONS}" ]] ; then - einfo - elog "You might want to run:" - elog "\"emerge --config =${CATEGORY}/${PF}\"" - elog "if this is a new install." - elog - elog "If you are switching server implentations, you should run the" - elog "mysql_upgrade tool." - einfo - else - einfo - elog "If you are upgrading major versions, you should run the" - elog "mysql_upgrade tool." - einfo - fi - - einfo - elog "Be sure to edit the my.cnf file to activate your cluster settings." - elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\"" - elog "The first time the cluster is activated, you should add" - elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node." - elog "This option should then be removed for subsequent starts." - einfo - fi -} - -src_unpack() { - unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR%/}/${P}" "${S}" || die -} - -src_prepare() { - _disable_engine() { - echo > "${S%/}/storage/${1}/CMakeLists.txt" || die - } - - _disable_plugin() { - echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die - } - - java-pkg-opt-2_src_prepare - if use tcmalloc; then - echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die - fi - - # Don't build bundled xz-utils for tokudb - echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die - sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die - sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die - - local plugin - local server_plugins=( handler_socket auth_socket feedback metadata_lock_info - locale_info qc_info server_audit semisync sql_errlog ) - local test_plugins=( audit_null auth_examples daemon_example fulltext ) - if ! use server; then # These plugins are for the server - for plugin in "${server_plugins[@]}" ; do - _disable_plugin "${plugin}" - done - fi - - if ! use test; then # These plugins are only used during testing - for plugin in "${test_plugins[@]}" ; do - _disable_plugin "${plugin}" - done - fi - - # Collides with mariadb-connector-c bug 655980 - _disable_plugin auth_dialog - - # Don't build Mroonga or example - _disable_engine mroonga - _disable_engine example - - if ! use oqgraph ; then # avoids extra library checks - _disable_engine oqgraph - fi - - cmake-utils_src_prepare -} - -src_configure(){ - # bug 508724 mariadb cannot use ld.gold - tc-ld-disable-gold - # Bug #114895, bug #110149 - filter-flags "-O" "-O[01]" - - append-cxxflags -felide-constructors - - # bug #283926, with GCC4.4, this is required to get correct behavior. - append-flags -fno-strict-aliasing - - CMAKE_BUILD_TYPE="RelWithDebInfo" - - # debug hack wrt #497532 - mycmakeargs=( - -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')" - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')" - -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr" - -DINSTALL_SYSCONFDIR="${EPREFIX%/}/etc/mysql" - -DINSTALL_BINDIR=bin - -DINSTALL_DOCDIR=share/doc/${PF} - -DINSTALL_DOCREADMEDIR=share/doc/${PF} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_INFODIR=share/info - -DINSTALL_LIBDIR=$(get_libdir) - -DINSTALL_MANDIR=share/man - -DINSTALL_MYSQLSHAREDIR=share/mariadb - -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin - -DINSTALL_SCRIPTDIR=share/mariadb/scripts - -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql" - -DINSTALL_SBINDIR=sbin - -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb" - -DCOMPILATION_COMMENT="Gentoo Linux ${PF}" - -DWITH_UNIT_TESTS=$(usex test ON OFF) - -DWITH_ZLIB=system - -DENABLED_LOCAL_INFILE=1 - -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock" - -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock" - # The build forces this to be defined when cross-compiling. We pass it - # all the time for simplicity and to make sure it is actually correct. - -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1) - -DWITHOUT_CLIENTLIBS=YES - -DWITH_READLINE=$(usex bindist 1 0) - -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1) - -DENABLE_DTRACE=$(usex systemtap) - ) - if use test ; then - mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test ) - else - mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' ) - fi - - if ! use yassl ; then - mycmakeargs+=( -DWITH_SSL=system ) - else - mycmakeargs+=( -DWITH_SSL=bundled ) - fi - - if use server ; then - - # Federated{,X} must be treated special otherwise they will not be built as plugins - if ! use extraengine ; then - mycmakeargs+=( - -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 - -DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 ) - fi - - mycmakeargs+=( - -DWITH_JEMALLOC=$(usex jemalloc system) - -DWITH_PCRE=system - -D$(usex sphinx WITH WITHOUT)_SPHINX_STORAGE_ENGINE=1 - -D$(usex tokudb WITH WITHOUT)_TOKUDB_STORAGE_ENGINE=1 - -D$(usex oqgraph WITH WITHOUT)_AUTH_PAM=1 - -D$(usex extraengine WITH WITHOUT)_SEQUENCE_STORAGE_ENGINE=1 - -D$(usex extraengine WITH WITHOUT)_SPIDER_STORAGE_ENGINE=1 - -D$(usex extraengine WITH WITHOUT)_CONNECT_STORAGE_ENGINE=1 - -DCONNECT_WITH_LIBXML2=$(usex xml) - -DCONNECT_WITH_ODBC=$(usex odbc) - -DCONNECT_WITH_JDBC=$(usex jdbc) - # Build failure and autodep wrt bug 639144 - -DCONNECT_WITH_MONGO=OFF - -DINSTALL_SQLBENCHDIR=share/mariadb - ) - - if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then - ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}" - ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}." - ewarn "You MUST file bugs without these variables set." - - mycmakeargs+=( - -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET} - -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION} - ) - - elif ! use latin1 ; then - mycmakeargs+=( - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_general_ci - ) - else - mycmakeargs+=( - -DDEFAULT_CHARSET=latin1 - -DDEFAULT_COLLATION=latin1_swedish_ci - ) - fi - mycmakeargs+=( - -DEXTRA_CHARSETS=all - -DDISABLE_SHARED=$(usex static YES NO) - -DWITH_EMBEDDED_SERVER=OFF - -DENABLED_PROFILING=$(usex profiling) - ) - - if use static; then - mycmakeargs+=( -DWITH_PIC=1 ) - fi - - if use jemalloc || use tcmalloc ; then - mycmakeargs+=( -DWITH_SAFEMALLOC=OFF ) - fi - - # Storage engines - mycmakeargs+=( - -DWITH_ARCHIVE_STORAGE_ENGINE=1 - -DWITH_BLACKHOLE_STORAGE_ENGINE=1 - -DWITH_CSV_STORAGE_ENGINE=1 - -DWITH_HEAP_STORAGE_ENGINE=1 - -DWITH_INNOBASE_STORAGE_ENGINE=1 - -DWITH_MYISAMMRG_STORAGE_ENGINE=1 - -DWITH_MYISAM_STORAGE_ENGINE=1 - -DWITH_PARTITION_STORAGE_ENGINE=1 - ) - - else - mycmakeargs+=( - -DWITHOUT_SERVER=1 - -DEXTRA_CHARSETS=none - -DINSTALL_SQLBENCHDIR= - ) - fi - - cmake-utils_src_configure -} - -src_compile() { - cmake-utils_src_compile -} - -src_install() { - cmake-utils_src_install - - # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used - if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then - rm "${ED%/}/usr/include/mysql/server/private/config.h" || die - fi - - # Make sure the vars are correctly initialized - mysql_init_vars - - # Convenience links - einfo "Making Convenience links for mysqlcheck multi-call binary" - dosym "mysqlcheck" "/usr/bin/mysqlanalyze" - dosym "mysqlcheck" "/usr/bin/mysqlrepair" - dosym "mysqlcheck" "/usr/bin/mysqloptimize" - - # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir - if [[ -d "${ED%/}/usr/data" ]] ; then - rm -Rf "${ED%/}/usr/data" || die - fi - - # Unless they explicitly specific USE=test, then do not install the - # testsuite. It DOES have a use to be installed, esp. when you want to do a - # validation of your database configuration after tuning it. - if ! use test ; then - rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test" - fi - - # Configuration stuff - einfo "Building default configuration ..." - insinto "${MY_SYSCONFDIR#${EPREFIX}}" - [[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf - local mycnf_src="my.cnf-5.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='extraengine perl server' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mariadb-X.X.XX.ebuild \ -# digest clean package -src_test() { - - _disable_test() { - local rawtestname reason - rawtestname="${1}" ; shift - reason="${@}" - ewarn "test '${rawtestname}' disabled: '${reason}'" - echo ${rawtestname} : ${reason} >> "${T}/disabled.def" - } - - local TESTDIR="${BUILD_DIR}/mysql-test" - local retstatus_unit - local retstatus_tests - - if ! use server ; then - einfo "Skipping server tests due to minimal build." - return 0 - fi - - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [[ $UID -eq 0 ]]; then - die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox" - - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - - # Run CTest (test-units) - cmake-utils_src_test - retstatus_unit=$? - - # Ensure that parallel runs don't die - export MTR_BUILD_THREAD="$((${RANDOM} % 100))" - # Enable parallel testing, auto will try to detect number of cores - # You may set this by hand. - # The default maximum is 8 unless MTR_MAX_PARALLEL is increased - export MTR_PARALLEL="${MTR_PARALLEL:-auto}" - - # create directories because mysqladmin might run out of order - mkdir -p "${T}"/var-tests{,/log} || die - - # Run mysql tests - pushd "${TESTDIR}" > /dev/null || die - - touch "${T}/disabled.def" - # These are failing in MariaDB 10.0 for now and are believed to be - # false positives: - # - # main.mysql_client_test, main.mysql_client_test_nonblock - # main.mysql_client_test_comp: - # segfaults at random under Portage only, suspect resource limits. - - local t - for t in main.mysql_client_test main.mysql_client_test_nonblock \ - main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam \ - 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/mariadb"} - MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"} - MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"} - MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"} - - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR="" - if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then - MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ - | sed -ne '/datadir/s|^--datadir=||p' \ - | tail -n1` - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \ - | sed -e 's/.*=\s*//' \ - | tail -n1` - fi - fi - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR="${MY_LOCALSTATEDIR}" - einfo "Using default MY_DATADIR" - fi - elog "MySQL MY_DATADIR is ${MY_DATADIR}" - - if [[ -z "${PREVIOUS_DATADIR}" ]] ; then - if [[ -e "${MY_DATADIR}" ]] ; then - # If you get this and you're wondering about it, see bug #207636 - elog "MySQL datadir found in ${MY_DATADIR}" - elog "A new one will not be created." - PREVIOUS_DATADIR="yes" - else - PREVIOUS_DATADIR="no" - fi - export PREVIOUS_DATADIR - fi - else - if [[ ${EBUILD_PHASE} == "config" ]]; then - local new_MY_DATADIR - new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ - | sed -ne '/datadir/s|^--datadir=||p' \ - | tail -n1` - - if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then - ewarn "MySQL MY_DATADIR has changed" - ewarn "from ${MY_DATADIR}" - ewarn "to ${new_MY_DATADIR}" - MY_DATADIR="${new_MY_DATADIR}" - fi - fi - fi - - export MY_SHAREDSTATEDIR MY_SYSCONFDIR - export MY_LOCALSTATEDIR MY_LOGDIR - export MY_DATADIR -} - -pkg_config() { - _getoptval() { - local mypd="${EROOT}"/usr/bin/my_print_defaults - local section="$1" - local flag="--${2}=" - local extra_options="${3}" - "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp" - } - local old_MY_DATADIR="${MY_DATADIR}" - local old_HOME="${HOME}" - # my_print_defaults needs to read stuff in $HOME/.my.cnf - export HOME=${EPREFIX}/root - - # Make sure the vars are correctly initialized - mysql_init_vars - - [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR" - if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then - die "Minimal builds do NOT include the MySQL server" - fi - - if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then - local MY_DATADIR_s="${ROOT}/${MY_DATADIR}" - MY_DATADIR_s="${MY_DATADIR_s%%/}" - local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}" - old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}" - - if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist" - ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}" - else - elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}" - mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \ - || die "Moving MY_DATADIR failed" - fi - else - ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist" - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Attempting to use ${MY_DATADIR_s}" - else - eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist" - die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}" - fi - fi - fi - - local pwd1="a" - local pwd2="b" - local maxtry=15 - - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then - local tmp_mysqld_password_source= - - for tmp_mysqld_password_source in mysql client; do - einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..." - MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)" - if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then - if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then - ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!" - MYSQL_ROOT_PASSWORD= - continue - fi - - einfo "Found password in '${tmp_mysqld_password_source}' section!" - break - fi - done - - # Sometimes --show is required to display passwords in some implementations of my_print_defaults - if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then - MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)" - fi - - unset tmp_mysqld_password_source - fi - MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)" - MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} - - if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then - einfo "Creating MySQL tmpdir $MYSQL_TMPDIR" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR" - fi - if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then - einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN" - fi - if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then - einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG" - fi - - if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then - ewarn "You have already a MySQL database in place." - ewarn "(${ROOT}/${MY_DATADIR}/*)" - ewarn "Please rename or delete it if you wish to replace it." - die "MySQL database already exists!" - fi - - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then - - einfo "Please provide a password for the mysql 'root' user now" - einfo "or through the ${HOME}/.my.cnf file." - ewarn "Avoid [\"'\\_%] characters in the password" - read -rsp " >" pwd1 ; echo - - einfo "Retype the password" - read -rsp " >" pwd2 ; echo - - if [[ "x$pwd1" != "x$pwd2" ]] ; then - die "Passwords are not the same" - fi - MYSQL_ROOT_PASSWORD="${pwd1}" - unset pwd1 pwd2 - fi - - local options - local sqltmp="$(emktemp)" - - # Fix bug 446200. Don't reference host my.cnf, needs to come first, - # see 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/mariadb/scripts/mysql_install_db" ) - [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" ) - cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ) - einfo "Command: ${cmd[*]}" - su -s /bin/sh -c "${cmd[*]}" mysql \ - >"${TMPDIR}"/mysql_install_db.log 2>&1 - if [ $? -ne 0 ]; then - grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2 - die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" - fi - popd &>/dev/null || die - [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ - || die "MySQL databases not installed" - - use prefix || options="${options} --user=mysql" - - local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock" - local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" - local mysqld="${EROOT}/usr/sbin/mysqld \ - ${options} \ - --log-warnings=0 \ - --basedir=${EROOT}/usr \ - --datadir=${ROOT}/${MY_DATADIR} \ - --max_allowed_packet=8M \ - --net_buffer_length=16K \ - --socket=${socket} \ - --pid-file=${pidfile} - --tmpdir=${ROOT}/${MYSQL_TMPDIR}" - #einfo "About to start mysqld: ${mysqld}" - ebegin "Starting mysqld" - einfo "Command ${mysqld}" - ${mysqld} & - rc=$? - while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do - maxtry=$((${maxtry}-1)) - echo -n "." - sleep 1 - done - eend $rc - - if ! [[ -S "${socket}" ]]; then - die "Completely failed to start up mysqld with: ${mysqld}" - fi - - ebegin "Setting root password" - # Do this from memory, as we don't want clear text passwords in temp files - local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -e "${sql}" - eend $? - - if [[ -n "${sqltmp}" ]] ; then - ebegin "Loading \"zoneinfo\", this step may require a few seconds" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -uroot \ - --password="${MYSQL_ROOT_PASSWORD}" \ - mysql < "${sqltmp}" - rc=$? - eend $? - [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!" - fi - - # Stop the server and cleanup - einfo "Stopping the server ..." - kill $(< "${pidfile}" ) - rm -f "${sqltmp}" - wait %1 - einfo "Done" -} diff --git a/dev-db/mariadb/mariadb-10.1.33-r1.ebuild b/dev-db/mariadb/mariadb-10.1.33-r1.ebuild deleted file mode 100644 index 0a3a791..0000000 --- a/dev-db/mariadb/mariadb-10.1.33-r1.ebuild +++ /dev/null @@ -1,879 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -MY_EXTRAS_VER="20180515-1334Z" -SUBSLOT="18" - -JAVA_PKG_OPT_USE="jdbc" - -# Keeping eutils in EAPI=6 for emktemp in pkg_config - -inherit eutils systemd flag-o-matic prefix toolchain-funcs java-pkg-opt-2 user cmake-utils multilib-build - -SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz " - -# Gentoo patches to MySQL -if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then - SRC_URI="${SRC_URI} - mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" -fi - -HOMEPAGE="http://mariadb.org/" -DESCRIPTION="An enhanced, drop-in replacement for MySQL" -LICENSE="GPL-2" -SLOT="0/${SUBSLOT:-0}" -IUSE="+backup bindist client-libs cracklib debug extraengine galera jdbc jemalloc kerberos - innodb-lz4 innodb-lzo innodb-snappy latin1 libressl mroonga numa odbc oqgraph pam - +perl profiling selinux +server sphinx sst-rsync sst-mariabackup sst-xtrabackup - systemd systemtap static static-libs tcmalloc test tokudb xml yassl" - -# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests -RESTRICT="!bindist? ( bindist ) libressl? ( test )" - -REQUIRED_USE="jdbc? ( extraengine server !static ) - server? ( tokudb? ( jemalloc !tcmalloc ) ) - ?? ( tcmalloc jemalloc ) - static? ( yassl !pam )" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" - -# Shorten the path because the socket path length must be shorter than 107 chars -# and we will run a mysql server during test phase -S="${WORKDIR}/mysql" - -if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then - MY_PATCH_DIR="${WORKDIR%/}/mysql-extras" - inherit git-r3 - EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git" - EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras" - EGIT_CLONE_TYPE=shallow -else - MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}" -fi - -PATCHES=( - "${MY_PATCH_DIR}"/20006_all_cmake_elib-mariadb-10.1.27.patch - "${MY_PATCH_DIR}"/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch - "${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch - "${MY_PATCH_DIR}"/20018_all_mariadb-10.1.16-without-clientlibs-tools.patch - "${MY_PATCH_DIR}"/20025_all_mariadb-10.1.26-gssapi-detect.patch - "${MY_PATCH_DIR}"/20029_all_mariadb-10.1.31-enable-numa.patch - "${MY_PATCH_DIR}"/20035_all_mariadb-10.1-atomic-detection.patch -) - -# Be warned, *DEPEND are version-dependant -# These are used for both runtime and compiletime -COMMON_DEPEND=" - kernel_linux? ( - sys-process/procps:0= - dev-libs/libaio:0= - ) - >=sys-apps/sed-4 - >=sys-apps/texinfo-4.7-r1 - jemalloc? ( dev-libs/jemalloc:0= ) - tcmalloc? ( dev-util/google-perftools:0= ) - systemtap? ( >=dev-util/systemtap-1.3:0= ) - !yassl? ( - !libressl? ( dev-libs/openssl:0= !>=dev-libs/openssl-1.1 ) - libressl? ( dev-libs/libressl:0= ) - ) - >=sys-libs/zlib-1.2.3:0= - sys-libs/ncurses:0= - !bindist? ( - sys-libs/binutils-libs:0= - >=sys-libs/readline-4.1:0= - ) - server? ( - backup? ( app-arch/libarchive:0= ) - cracklib? ( sys-libs/cracklib:0= ) - extraengine? ( - odbc? ( dev-db/unixODBC:0= ) - xml? ( dev-libs/libxml2:2= ) - sys-libs/zlib[minizip] - ) - innodb-lz4? ( app-arch/lz4 ) - innodb-lzo? ( dev-libs/lzo ) - innodb-snappy? ( app-arch/snappy ) - kerberos? ( virtual/krb5 ) - mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) - numa? ( sys-process/numactl ) - oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) - pam? ( virtual/pam:0= ) - systemd? ( sys-apps/systemd:= ) - tokudb? ( app-arch/snappy ) - ) - !yassl? ( !libressl? ( !>=dev-libs/openssl-1.1.0 ) ) - >=dev-libs/libpcre-8.41-r1:3= -" -DEPEND="virtual/yacc - static? ( sys-libs/ncurses[static-libs] ) - || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) - server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) - ${COMMON_DEPEND}" -RDEPEND="selinux? ( sec-policy/selinux-mysql ) - client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c ) - !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster - server? ( !prefix? ( dev-db/mysql-init-scripts ) ) - ${COMMON_DEPEND} - server? ( galera? ( - sys-apps/iproute2 - =sys-cluster/galera-25* - sst-rsync? ( sys-process/lsof ) - sst-mariabackup? ( net-misc/socat[ssl] ) - sst-xtrabackup? ( net-misc/socat[ssl] ) - ) ) - perl? ( !dev-db/mytop - virtual/perl-Getopt-Long - dev-perl/TermReadKey - virtual/perl-Term-ANSIColor - virtual/perl-Time-HiRes ) - server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) -" -# For other stuff to bring us in -# dev-perl/DBD-mysql is needed by some scripts installed by MySQL -# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed -PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 ) - !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] ) - server? ( galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )" - -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] ; then - local GCC_MAJOR_SET=$(gcc-major-version) - local GCC_MINOR_SET=$(gcc-minor-version) - if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} with tokudb needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on - # non x86{,_64} arches - if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - fi - java-pkg-opt-2_pkg_setup - if has test ${FEATURES} && \ - use server && ! has userpriv ${FEATURES} ; then - eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - - # This should come after all of the die statements - enewgroup mysql 60 || die "problem adding 'mysql' group" - enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" -} - -pkg_preinst() { - java-pkg-opt-2_pkg_preinst -} - -pkg_postinst() { - # Make sure the vars are correctly initialized - mysql_init_vars - - # Create log directory securely if it does not exist - [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" - - if use server ; then - if use pam; then - einfo - elog "This install includes the PAM authentication plugin." - elog "To activate and configure the PAM plugin, please read:" - elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/" - einfo - fi - - if [[ -z "${REPLACING_VERSIONS}" ]] ; then - einfo - elog "You might want to run:" - elog "\"emerge --config =${CATEGORY}/${PF}\"" - elog "if this is a new install." - elog - elog "If you are switching server implentations, you should run the" - elog "mysql_upgrade tool." - einfo - else - einfo - elog "If you are upgrading major versions, you should run the" - elog "mysql_upgrade tool." - einfo - fi - - einfo - elog "Be sure to edit the my.cnf file to activate your cluster settings." - elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\"" - elog "The first time the cluster is activated, you should add" - elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node." - elog "This option should then be removed for subsequent starts." - einfo - fi -} - -src_unpack() { - unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR%/}/${PN%%-galera}-${PV}" "${S}" || die -} - -src_prepare() { - _disable_engine() { - echo > "${S%/}/storage/${1}/CMakeLists.txt" || die - } - - _disable_plugin() { - echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die - } - - java-pkg-opt-2_src_prepare - if use tcmalloc; then - echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die - fi - - # Don't build bundled xz-utils for tokudb - echo > "${S%/}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die - sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S%/}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die - sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die - - local plugin - local server_plugins=( handler_socket auth_socket feedback metadata_lock_info - locale_info qc_info server_audit semisync sql_errlog ) - local test_plugins=( audit_null auth_examples daemon_example fulltext ) - if ! use server; then # These plugins are for the server - for plugin in "${server_plugins[@]}" ; do - _disable_plugin "${plugin}" - done - fi - - if ! use test; then # These plugins are only used during testing - for plugin in "${test_plugins[@]}" ; do - _disable_plugin "${plugin}" - done - fi - - # Collides with mariadb-connector-c bug 655980 - _disable_plugin auth_dialog - - # Avoid useless library checks - use mroonga || _disable_engine mroonga - use oqgraph || _disable_engine oqgraph - _disable_engine example - - cmake-utils_src_prepare -} - -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" - -DINSTALL_SYSCONFDIR="${EPREFIX%/}/etc/mysql" - -DINSTALL_BINDIR=bin - -DINSTALL_DOCDIR=share/doc/${PF} - -DINSTALL_DOCREADMEDIR=share/doc/${PF} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_INFODIR=share/info - -DINSTALL_LIBDIR=$(get_libdir) - -DINSTALL_MANDIR=share/man - -DINSTALL_MYSQLSHAREDIR=share/mariadb - -DINSTALL_MYSQLTESTDIR=$(usex test 'share/mariadb/mysql-test' '') - -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin - -DINSTALL_SCRIPTDIR=share/mariadb/scripts - -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql" - -DINSTALL_SBINDIR=sbin - -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb" - -DCOMPILATION_COMMENT="Gentoo Linux ${PF}" - -DWITH_UNIT_TESTS=$(usex test ON OFF) - -DWITH_ZLIB=system - -DENABLED_LOCAL_INFILE=1 - -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock" - -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock" - -DWITH_DEFAULT_COMPILER_OPTIONS=0 - -DWITH_DEFAULT_FEATURE_SET=0 - -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)" - # The build forces this to be defined when cross-compiling. We pass it - # all the time for simplicity and to make sure it is actually correct. - -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1) - -DWITHOUT_CLIENTLIBS=YES - -DWITH_READLINE=$(usex bindist 1 0) - -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1) - -DENABLE_DTRACE=$(usex systemtap) - -DWITH_SSL=$(usex yassl bundled system) - ) - - if use server ; then - - # Federated{,X} must be treated special otherwise they will not be built as plugins - if ! use extraengine ; then - mycmakeargs+=( - -DPLUGIN_FEDERATED=NO - -DPLUGIN_FEDERATEDX=NO ) - fi - - mycmakeargs+=( - -DWITH_JEMALLOC=$(usex jemalloc system) - -DWITH_PCRE=system - -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO) - -DPLUGIN_SPHINX=$(usex sphinx YES NO) - -DPLUGIN_TOKUDB=$(usex tokudb YES NO) - -DPLUGIN_AUTH_PAM=$(usex pam YES NO) - -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO) - -DPLUGIN_CASSANDRA=NO - -DPLUGIN_SEQUENCE=$(usex extraengine YES NO) - -DPLUGIN_SPIDER=$(usex extraengine YES NO) - -DPLUGIN_CONNECT=$(usex extraengine YES NO) - -DCONNECT_WITH_MYSQL=1 - -DCONNECT_WITH_LIBXML2=$(usex xml) - -DCONNECT_WITH_ODBC=$(usex odbc) - -DCONNECT_WITH_JDBC=$(usex jdbc) - # Build failure and autodep wrt bug 639144 - -DCONNECT_WITH_MONGO=OFF - -DWITH_WSREP=$(usex galera) - -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF) - -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF) - -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF) - -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO) - -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO) - -DWITH_MARIABACKUP=$(usex backup ON OFF) - -DWITH_LIBARCHIVE=$(usex backup ON OFF) - -DWITH_SYSTEMD=$(usex systemd yes no) - -DWITH_NUMA=$(usex numa ON OFF) - -DINSTALL_SQLBENCHDIR='' - ) - - if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then - ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}" - ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}." - ewarn "You MUST file bugs without these variables set." - - mycmakeargs+=( - -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET} - -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION} - ) - - elif ! use latin1 ; then - mycmakeargs+=( - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_general_ci - ) - else - mycmakeargs+=( - -DDEFAULT_CHARSET=latin1 - -DDEFAULT_COLLATION=latin1_swedish_ci - ) - fi - mycmakeargs+=( - -DEXTRA_CHARSETS=all - -DMYSQL_USER=mysql - -DDISABLE_SHARED=$(usex static YES NO) - -DWITH_DEBUG=$(usex debug) - -DWITH_EMBEDDED_SERVER=OFF - -DENABLED_PROFILING=$(usex profiling) - ) - - if use static; then - mycmakeargs+=( -DWITH_PIC=1 ) - fi - - if use jemalloc || use tcmalloc ; then - mycmakeargs+=( -DWITH_SAFEMALLOC=OFF ) - fi - - # Storage engines - mycmakeargs+=( - -DWITH_ARCHIVE_STORAGE_ENGINE=1 - -DWITH_BLACKHOLE_STORAGE_ENGINE=1 - -DWITH_CSV_STORAGE_ENGINE=1 - -DWITH_HEAP_STORAGE_ENGINE=1 - -DWITH_INNOBASE_STORAGE_ENGINE=1 - -DWITH_MYISAMMRG_STORAGE_ENGINE=1 - -DWITH_MYISAM_STORAGE_ENGINE=1 - -DWITH_PARTITION_STORAGE_ENGINE=1 - ) - - else - mycmakeargs+=( - -DWITHOUT_SERVER=1 - -DWITH_EMBEDDED_SERVER=OFF - -DEXTRA_CHARSETS=none - -DINSTALL_SQLBENCHDIR= - -DWITH_SYSTEMD=no - ) - fi - - cmake-utils_src_configure -} - -src_compile() { - cmake-utils_src_compile -} - -src_install() { - cmake-utils_src_install - - # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used - if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then - rm "${ED}/usr/include/mysql/server/private/config.h" || die - fi - - # Make sure the vars are correctly initialized - mysql_init_vars - - # Convenience links - einfo "Making Convenience links for mysqlcheck multi-call binary" - dosym "mysqlcheck" "/usr/bin/mysqlanalyze" - dosym "mysqlcheck" "/usr/bin/mysqlrepair" - dosym "mysqlcheck" "/usr/bin/mysqloptimize" - - # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir - if [[ -d "${ED}/usr/data" ]] ; then - rm -Rf "${ED}/usr/data" || die - fi - - # Unless they explicitly specific USE=test, then do not install the - # testsuite. It DOES have a use to be installed, esp. when you want to do a - # validation of your database configuration after tuning it. - if ! use test ; then - rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test" - fi - - # Configuration stuff - einfo "Building default configuration ..." - insinto "${MY_SYSCONFDIR#${EPREFIX}}" - [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf - local mycnf_src="my.cnf-5.6" - 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 static-libs' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mariadb-X.X.XX.ebuild \ -# digest clean package -src_test() { - - _disable_test() { - local rawtestname reason - rawtestname="${1}" ; shift - reason="${@}" - ewarn "test '${rawtestname}' disabled: '${reason}'" - echo ${rawtestname} : ${reason} >> "${T}/disabled.def" - } - - local TESTDIR="${BUILD_DIR}/mysql-test" - local retstatus_unit - local retstatus_tests - - if ! use server ; then - einfo "Skipping server tests due to minimal build." - return 0 - fi - - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [[ $UID -eq 0 ]]; then - die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox" - - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - - # Run CTest (test-units) - cmake-utils_src_test - retstatus_unit=$? - - # Ensure that parallel runs don't die - export MTR_BUILD_THREAD="$((${RANDOM} % 100))" - # Enable parallel testing, auto will try to detect number of cores - # You may set this by hand. - # The default maximum is 8 unless MTR_MAX_PARALLEL is increased - export MTR_PARALLEL="${MTR_PARALLEL:-auto}" - - # create directories because mysqladmin might run out of order - mkdir -p "${T}"/var-tests{,/log} || die - - # Run mysql tests - pushd "${TESTDIR}" > /dev/null || die - - touch "${T}/disabled.def" - # These are failing in MariaDB 10.0 for now and are believed to be - # false positives: - # - # main.mysql_client_test, main.mysql_client_test_nonblock - # main.mysql_client_test_comp: - # segfaults at random under Portage only, suspect resource limits. - - local t - for t in plugins.cracklib_password_check plugins.two_password_validations ; do - _disable_test "$t" "False positive due to varying policies" - done - - for t in main.mysql_client_test main.mysql_client_test_nonblock \ - main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do - _disable_test "$t" "False positives in Gentoo" - done - - if ! use client-libs ; then - _disable_test main.plugin_auth "Needs client libraries built" - fi - - # run mysql-test tests - perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def" - retstatus_tests=$? - - popd > /dev/null || die - - # Cleanup is important for these testcases. - pkill -9 -f "${S}/ndb" 2>/dev/null - pkill -9 -f "${S}/sql" 2>/dev/null - - local failures="" - [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" - [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" - - [[ -z "$failures" ]] || die "Test failures: $failures" - einfo "Tests successfully completed" -} - -mysql_init_vars() { - MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"} - MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"} - MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"} - MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"} - - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR="" - if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then - MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ - | sed -ne '/datadir/s|^--datadir=||p' \ - | tail -n1` - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \ - | sed -e 's/.*=\s*//' \ - | tail -n1` - fi - fi - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR="${MY_LOCALSTATEDIR}" - einfo "Using default MY_DATADIR" - fi - elog "MySQL MY_DATADIR is ${MY_DATADIR}" - - if [[ -z "${PREVIOUS_DATADIR}" ]] ; then - if [[ -e "${MY_DATADIR}" ]] ; then - # If you get this and you're wondering about it, see bug #207636 - elog "MySQL datadir found in ${MY_DATADIR}" - elog "A new one will not be created." - PREVIOUS_DATADIR="yes" - else - PREVIOUS_DATADIR="no" - fi - export PREVIOUS_DATADIR - fi - else - if [[ ${EBUILD_PHASE} == "config" ]]; then - local new_MY_DATADIR - new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ - | sed -ne '/datadir/s|^--datadir=||p' \ - | tail -n1` - - if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then - ewarn "MySQL MY_DATADIR has changed" - ewarn "from ${MY_DATADIR}" - ewarn "to ${new_MY_DATADIR}" - MY_DATADIR="${new_MY_DATADIR}" - fi - fi - fi - - export MY_SHAREDSTATEDIR MY_SYSCONFDIR - export MY_LOCALSTATEDIR MY_LOGDIR - export MY_DATADIR -} - -pkg_config() { - _getoptval() { - local mypd="${EROOT}"/usr/bin/my_print_defaults - local section="$1" - local flag="--${2}=" - local extra_options="${3}" - "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp" - } - local old_MY_DATADIR="${MY_DATADIR}" - local old_HOME="${HOME}" - # my_print_defaults needs to read stuff in $HOME/.my.cnf - export HOME=${EPREFIX}/root - - # Make sure the vars are correctly initialized - mysql_init_vars - - [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR" - if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then - die "Minimal builds do NOT include the MySQL server" - fi - - if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then - local MY_DATADIR_s="${ROOT}/${MY_DATADIR}" - MY_DATADIR_s="${MY_DATADIR_s%%/}" - local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}" - old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}" - - if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist" - ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}" - else - elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}" - mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \ - || die "Moving MY_DATADIR failed" - fi - else - ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist" - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Attempting to use ${MY_DATADIR_s}" - else - eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist" - die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}" - fi - fi - fi - - local pwd1="a" - local pwd2="b" - local maxtry=15 - - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then - local tmp_mysqld_password_source= - - for tmp_mysqld_password_source in mysql client; do - einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..." - MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)" - if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then - if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then - ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!" - MYSQL_ROOT_PASSWORD= - continue - fi - - einfo "Found password in '${tmp_mysqld_password_source}' section!" - break - fi - done - - # Sometimes --show is required to display passwords in some implementations of my_print_defaults - if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then - MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)" - fi - - unset tmp_mysqld_password_source - fi - MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)" - MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} - - if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then - einfo "Creating MySQL tmpdir $MYSQL_TMPDIR" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR" - fi - if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then - einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN" - fi - if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then - einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG" - fi - - if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then - ewarn "You have already a MySQL database in place." - ewarn "(${ROOT}/${MY_DATADIR}/*)" - ewarn "Please rename or delete it if you wish to replace it." - die "MySQL database already exists!" - fi - - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then - - einfo "Please provide a password for the mysql 'root' user now" - einfo "or through the ${HOME}/.my.cnf file." - ewarn "Avoid [\"'\\_%] characters in the password" - read -rsp " >" pwd1 ; echo - - einfo "Retype the password" - read -rsp " >" pwd2 ; echo - - if [[ "x$pwd1" != "x$pwd2" ]] ; then - die "Passwords are not the same" - fi - MYSQL_ROOT_PASSWORD="${pwd1}" - unset pwd1 pwd2 - fi - - local options - local sqltmp="$(emktemp)" - - # Fix bug 446200. Don't reference host my.cnf, needs to come first, - # see 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/mariadb/scripts/mysql_install_db" ) - [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" ) - cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ) - einfo "Command: ${cmd[*]}" - su -s /bin/sh -c "${cmd[*]}" mysql \ - >"${TMPDIR}"/mysql_install_db.log 2>&1 - if [ $? -ne 0 ]; then - grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2 - die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" - fi - popd &>/dev/null || die - [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ - || die "MySQL databases not installed" - - use prefix || options="${options} --user=mysql" - - local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock" - local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" - local mysqld="${EROOT}/usr/sbin/mysqld \ - ${options} \ - --log-warnings=0 \ - --basedir=${EROOT}/usr \ - --datadir=${ROOT}/${MY_DATADIR} \ - --max_allowed_packet=8M \ - --net_buffer_length=16K \ - --socket=${socket} \ - --pid-file=${pidfile} - --tmpdir=${ROOT}/${MYSQL_TMPDIR}" - #einfo "About to start mysqld: ${mysqld}" - ebegin "Starting mysqld" - einfo "Command ${mysqld}" - ${mysqld} & - rc=$? - while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do - maxtry=$((${maxtry}-1)) - echo -n "." - sleep 1 - done - eend $rc - - if ! [[ -S "${socket}" ]]; then - die "Completely failed to start up mysqld with: ${mysqld}" - fi - - ebegin "Setting root password" - # Do this from memory, as we don't want clear text passwords in temp files - local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -e "${sql}" - eend $? - - if [[ -n "${sqltmp}" ]] ; then - ebegin "Loading \"zoneinfo\", this step may require a few seconds" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -uroot \ - --password="${MYSQL_ROOT_PASSWORD}" \ - mysql < "${sqltmp}" - rc=$? - eend $? - [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!" - fi - - # Stop the server and cleanup - einfo "Stopping the server ..." - kill $(< "${pidfile}" ) - rm -f "${sqltmp}" - wait %1 - einfo "Done" -} diff --git a/dev-db/mariadb/mariadb-10.2.15-r1.ebuild b/dev-db/mariadb/mariadb-10.2.15-r1.ebuild deleted file mode 100644 index 57c64fa..0000000 --- a/dev-db/mariadb/mariadb-10.2.15-r1.ebuild +++ /dev/null @@ -1,919 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -MY_EXTRAS_VER="20180515-1334Z" -SUBSLOT="18" - -JAVA_PKG_OPT_USE="jdbc" - -# Keeping eutils in EAPI=6 for emktemp in pkg_config - -inherit eutils systemd flag-o-matic prefix toolchain-funcs \ - java-pkg-opt-2 user cmake-utils multilib-build - -SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz " - -# Gentoo patches to MySQL -if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then - SRC_URI="${SRC_URI} - mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" -fi - -HOMEPAGE="http://mariadb.org/" -DESCRIPTION="An enhanced, drop-in replacement for MySQL" -LICENSE="GPL-2 LGPL-2.1+" -SLOT="0/${SUBSLOT:-0}" -IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4 - innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga - numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx - sst-rsync sst-mariabackup sst-xtrabackup static static-libs systemd systemtap tcmalloc - test tokudb xml yassl" - -# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests -RESTRICT="!bindist? ( bindist ) libressl? ( test )" - -REQUIRED_USE="jdbc? ( extraengine server !static ) - server? ( tokudb? ( jemalloc !tcmalloc ) ) - !server? ( !extraengine ) - ?? ( tcmalloc jemalloc ) - static? ( yassl !pam )" - -KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 - 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}"/20015_all_mariadb-pkgconfig-location.patch - "${MY_PATCH_DIR}"/20018_all_mariadb-10.2.9-without-clientlibs-tools.patch - "${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch - "${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch - "${MY_PATCH_DIR}"/20035_all_mariadb-10.2-atomic-detection.patch -) - -# Be warned, *DEPEND are version-dependant -# These are used for both runtime and compiletime -# MULTILIB_USEDEP only set for libraries used by the client library -COMMON_DEPEND=" - kernel_linux? ( - sys-process/procps:0= - dev-libs/libaio:0= - ) - >=sys-apps/sed-4 - >=sys-apps/texinfo-4.7-r1 - jemalloc? ( dev-libs/jemalloc:0= ) - tcmalloc? ( dev-util/google-perftools:0= ) - systemtap? ( >=dev-util/systemtap-1.3:0= ) - >=sys-libs/zlib-1.2.3:0= - kerberos? ( virtual/krb5 ) - yassl? ( net-libs/gnutls:0= ) - !yassl? ( - !libressl? ( >=dev-libs/openssl-1.0.0:0= ) - libressl? ( dev-libs/libressl:0= ) - ) - sys-libs/ncurses:0= - !bindist? ( - sys-libs/binutils-libs:0= - >=sys-libs/readline-4.1:0= - ) - server? ( - backup? ( app-arch/libarchive:0= ) - cracklib? ( sys-libs/cracklib:0= ) - extraengine? ( - odbc? ( dev-db/unixODBC:0= ) - xml? ( dev-libs/libxml2:2= ) - ) - innodb-lz4? ( app-arch/lz4 ) - innodb-lzo? ( dev-libs/lzo ) - innodb-snappy? ( app-arch/snappy ) - mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 ) - numa? ( sys-process/numactl ) - oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) - pam? ( virtual/pam:0= ) - systemd? ( sys-apps/systemd:= ) - tokudb? ( app-arch/snappy ) - ) - >=dev-libs/libpcre-8.41-r1:3= -" -DEPEND="virtual/yacc - static? ( sys-libs/ncurses[static-libs] ) - || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) - server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) - ${COMMON_DEPEND}" -RDEPEND="selinux? ( sec-policy/selinux-mysql ) - !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster - server? ( !prefix? ( dev-db/mysql-init-scripts ) ) - ${COMMON_DEPEND} - server? ( galera? ( - sys-apps/iproute2 - =sys-cluster/galera-25* - sst-rsync? ( sys-process/lsof ) - sst-mariabackup? ( net-misc/socat[ssl] ) - sst-xtrabackup? ( net-misc/socat[ssl] ) - ) ) - perl? ( !dev-db/mytop - virtual/perl-Getopt-Long - dev-perl/TermReadKey - virtual/perl-Term-ANSIColor - virtual/perl-Time-HiRes ) - server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) -" -# For other stuff to bring us in -# dev-perl/DBD-mysql is needed by some scripts installed by MySQL -# percona-xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed -PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 ) - dev-db/mariadb-connector-c[${MULTILIB_USEDEP},static-libs] dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs] - server? ( ~virtual/mysql-5.6[static=] - galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) ) )" - -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] ; then - local GCC_MAJOR_SET=$(gcc-major-version) - local GCC_MINOR_SET=$(gcc-minor-version) - if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} with tokudb needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on - # non x86{,_64} arches - if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - fi - java-pkg-opt-2_pkg_setup - if has test ${FEATURES} && \ - use server && ! has userpriv ${FEATURES} ; then - eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - - # This should come after all of the die statements - enewgroup mysql 60 || die "problem adding 'mysql' group" - enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" -} - -pkg_preinst() { - java-pkg-opt-2_pkg_preinst -} - -pkg_postinst() { - # Make sure the vars are correctly initialized - mysql_init_vars - - # Create log directory securely if it does not exist - [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" - - if use server ; then - if use pam; then - einfo - elog "This install includes the PAM authentication plugin." - elog "To activate and configure the PAM plugin, please read:" - elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/" - einfo - fi - - if [[ -z "${REPLACING_VERSIONS}" ]] ; then - einfo - elog "You might want to run:" - elog "\"emerge --config =${CATEGORY}/${PF}\"" - elog "if this is a new install." - elog - elog "If you are switching server implentations, you should run the" - elog "mysql_upgrade tool." - einfo - else - einfo - elog "If you are upgrading major versions, you should run the" - elog "mysql_upgrade tool." - einfo - fi - - if use galera ; then - einfo - elog "Be sure to edit the my.cnf file to activate your cluster settings." - elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\"" - elog "The first time the cluster is activated, you should add" - elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node." - elog "This option should then be removed for subsequent starts." - einfo - fi - fi - - # Note about configuration change - einfo - elog "This version of mariadb reorganizes the configuration from a single my.cnf" - elog "to several files in /etc/mysql/${PN}.d." - elog "Please backup any changes you made to /etc/mysql/my.cnf" - elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension." - elog "You may have as many files as needed and they are read alphabetically." - elog "Be sure the options have the appropitate section headers, i.e. [mysqld]." - einfo -} - -src_unpack() { - unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR%/}/${P}" "${S}" || die -} - -src_prepare() { - _disable_engine() { - echo > "${S%/}/storage/${1}/CMakeLists.txt" || die - } - - _disable_plugin() { - echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die - } - java-pkg-opt-2_src_prepare - if use tcmalloc; then - echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" - fi - - # Don't build bundled xz-utils for tokudb - echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die - sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die - sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die - - # Remove the bundled groonga - # There is no CMake flag, it simply checks for existance - rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga" - - local plugin - local server_plugins=( handler_socket auth_socket feedback metadata_lock_info - locale_info qc_info server_audit sql_errlog ) - local test_plugins=( audit_null auth_examples daemon_example fulltext ) - if ! use server; then # These plugins are for the server - for plugin in "${server_plugins[@]}" ; do - _disable_plugin "${plugin}" - done - fi - - if ! use test; then # These plugins are only used during testing - for plugin in "${test_plugins[@]}" ; do - _disable_plugin "${plugin}" - done - fi - - # Collides with mariadb-connector-c bug 655980 - _disable_plugin auth_dialog - - # Avoid useless library checks - use mroonga || _disable_engine mroonga - use oqgraph || _disable_engine oqgraph - _disable_engine example - - cmake-utils_src_prepare -} - -src_configure(){ - # bug 508724 mariadb cannot use ld.gold - tc-ld-disable-gold - # Bug #114895, bug #110149 - filter-flags "-O" "-O[01]" - - append-cxxflags -felide-constructors - - # bug #283926, with GCC4.4, this is required to get correct behavior. - append-flags -fno-strict-aliasing - - CMAKE_BUILD_TYPE="RelWithDebInfo" - - # debug hack wrt #497532 - mycmakeargs=( - -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')" - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')" - -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" - -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql" - -DSYSCONFDIR="${EPREFIX}/etc/mysql" - -DINSTALL_BINDIR=bin - -DINSTALL_DOCDIR=share/doc/${PF} - -DINSTALL_DOCREADMEDIR=share/doc/${PF} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_INFODIR=share/info - -DINSTALL_LIBDIR=$(get_libdir) - -DINSTALL_MANDIR=share/man - -DINSTALL_MYSQLSHAREDIR=share/mariadb - -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin - -DINSTALL_SCRIPTDIR=share/mariadb/scripts - -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql" - -DINSTALL_SBINDIR=sbin - -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb" - -DWITH_COMMENT="Gentoo Linux ${PF}" - -DWITH_UNIT_TESTS=$(usex test ON OFF) - -DWITH_LIBEDIT=0 - -DWITH_ZLIB=system - -DWITHOUT_LIBWRAP=1 - -DENABLED_LOCAL_INFILE=1 - -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" - -DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock" - -DWITH_DEFAULT_COMPILER_OPTIONS=0 - -DWITH_DEFAULT_FEATURE_SET=0 - -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)" - -DENABLE_STATIC_LIBS=$(usex static-libs ON OFF) - # The build forces this to be defined when cross-compiling. We pass it - # all the time for simplicity and to make sure it is actually correct. - -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1) - -DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)" - -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO) - -DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF) - -DCONC_WITH_EXTERNAL_ZLIB=YES - -DWITH_EXTERNAL_ZLIB=YES - -DSUFFIX_INSTALL_DIR="" - -DWITH_UNITTEST=OFF - -DINSTALL_MYSQLTESTDIR=$(usex test 'share/mariadb/mysql-test' '') - -DWITH_SSL=$(usex yassl bundled system) - -DWITHOUT_CLIENTLIBS=YES - # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION - -DWITH_READLINE=$(usex bindist 1 0) - -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1) - -DENABLE_DTRACE=$(usex systemtap) - ) - - if use server ; then - - # Federated{,X} must be treated special otherwise they will not be built as plugins - if ! use extraengine ; then - mycmakeargs+=( - -DPLUGIN_FEDERATED=NO - -DPLUGIN_FEDERATEDX=NO ) - fi - - mycmakeargs+=( - -DWITH_JEMALLOC=$(usex jemalloc system) - -DWITH_PCRE=system - -DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO) - -DPLUGIN_SPHINX=$(usex sphinx YES NO) - -DPLUGIN_TOKUDB=$(usex tokudb YES NO) - -DPLUGIN_AUTH_PAM=$(usex pam YES NO) - -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO) - -DPLUGIN_CASSANDRA=NO - -DPLUGIN_SEQUENCE=$(usex extraengine YES NO) - -DPLUGIN_SPIDER=$(usex extraengine YES NO) - -DPLUGIN_CONNECT=$(usex extraengine YES NO) - -DCONNECT_WITH_MYSQL=1 - -DCONNECT_WITH_LIBXML2=$(usex xml) - -DCONNECT_WITH_ODBC=$(usex odbc) - -DCONNECT_WITH_JDBC=$(usex jdbc) - # Build failure and autodep wrt bug 639144 - -DCONNECT_WITH_MONGO=OFF - -DWITH_WSREP=$(usex galera) - -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF) - -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF) - -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF) - -DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO) - -DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO) - -DWITH_MARIABACKUP=$(usex backup ON OFF) - -DWITH_LIBARCHIVE=$(usex backup ON OFF) - -DINSTALL_SQLBENCHDIR='' - -DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO) - # systemd is only linked to for server notification - -DWITH_SYSTEMD=$(usex systemd yes no) - -DWITH_NUMA=$(usex numa ON OFF) - ) - - if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then - ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}" - ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}." - ewarn "You MUST file bugs without these variables set." - - mycmakeargs+=( - -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET} - -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION} - ) - - elif ! use latin1 ; then - mycmakeargs+=( - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_general_ci - ) - else - mycmakeargs+=( - -DDEFAULT_CHARSET=latin1 - -DDEFAULT_COLLATION=latin1_swedish_ci - ) - fi - mycmakeargs+=( - -DEXTRA_CHARSETS=all - -DMYSQL_USER=mysql - -DDISABLE_SHARED=$(usex static YES NO) - -DWITH_DEBUG=$(usex debug) - -DWITH_EMBEDDED_SERVER=OFF - -DWITH_PROFILING=$(usex profiling) - ) - - if use static; then - mycmakeargs+=( -DWITH_PIC=1 ) - fi - - if use jemalloc || use tcmalloc ; then - mycmakeargs+=( -DWITH_SAFEMALLOC=OFF ) - fi - - # Storage engines - mycmakeargs+=( - -DWITH_ARCHIVE_STORAGE_ENGINE=1 - -DWITH_BLACKHOLE_STORAGE_ENGINE=1 - -DWITH_CSV_STORAGE_ENGINE=1 - -DWITH_HEAP_STORAGE_ENGINE=1 - -DWITH_INNOBASE_STORAGE_ENGINE=1 - -DWITH_MYISAMMRG_STORAGE_ENGINE=1 - -DWITH_MYISAM_STORAGE_ENGINE=1 - -DWITH_PARTITION_STORAGE_ENGINE=1 - ) - - else - mycmakeargs+=( - -DWITHOUT_SERVER=1 - -DEXTRA_CHARSETS=none - -DINSTALL_SQLBENCHDIR= - -DWITH_SYSTEMD=no - ) - fi - - cmake-utils_src_configure -} - -src_compile() { - cmake-utils_src_compile -} - -src_install() { - cmake-utils_src_install - - # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used - if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then - rm "${ED}/usr/include/mysql/server/private/config.h" || die - fi - - # Make sure the vars are correctly initialized - mysql_init_vars - - # Convenience links - einfo "Making Convenience links for mysqlcheck multi-call binary" - dosym "mysqlcheck" "/usr/bin/mysqlanalyze" - dosym "mysqlcheck" "/usr/bin/mysqlrepair" - dosym "mysqlcheck" "/usr/bin/mysqloptimize" - - # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir - if [[ -d "${ED}/usr/data" ]] ; then - rm -Rf "${ED}/usr/data" || die - fi - - # Unless they explicitly specific USE=test, then do not install the - # testsuite. It DOES have a use to be installed, esp. when you want to do a - # validation of your database configuration after tuning it. - if ! use test ; then - rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test" - fi - - # Configuration stuff - einfo "Building default configuration ..." - insinto "${MY_SYSCONFDIR#${EPREFIX}}" - [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf - cp "${FILESDIR}/my.cnf-10.2" "${TMPDIR}/my.cnf" || die - eprefixify "${TMPDIR}/my.cnf" - doins "${TMPDIR}/my.cnf" - insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d" - cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die - eprefixify "${TMPDIR}/50-distro-client.cnf" - doins "${TMPDIR}/50-distro-client.cnf" - - if use server ; then - mycnf_src="my.cnf.distro-server" - sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ - "${FILESDIR}/${mycnf_src}" \ - > "${TMPDIR}/my.cnf.ok" || die - if use prefix ; then - sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \ - "${TMPDIR}/my.cnf.ok" || die - fi - if use latin1 ; then - sed -i \ - -e "/character-set/s|utf8|latin1|g" \ - "${TMPDIR}/my.cnf.ok" || die - fi - eprefixify "${TMPDIR}/my.cnf.ok" - newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf - - einfo "Including support files and sample configurations" - docinto "support-files" - local script - for script in \ - "${S}"/support-files/magic - do - [[ -f "$script" ]] && dodoc "${script}" - done - - docinto "scripts" - for script in "${S}"/scripts/mysql* ; do - [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}" - done - 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 static-libs' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mariadb-X.X.XX.ebuild \ -# digest clean package -src_test() { - - _disable_test() { - local rawtestname reason - rawtestname="${1}" ; shift - reason="${@}" - ewarn "test '${rawtestname}' disabled: '${reason}'" - echo ${rawtestname} : ${reason} >> "${T}/disabled.def" - } - - local TESTDIR="${BUILD_DIR}/mysql-test" - local retstatus_unit - local retstatus_tests - - if ! use server ; then - einfo "Skipping server tests due to minimal build." - return 0 - fi - - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [[ $UID -eq 0 ]]; then - die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox" - - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - - # Run CTest (test-units) - cmake-utils_src_test - retstatus_unit=$? - - # Ensure that parallel runs don't die - export MTR_BUILD_THREAD="$((${RANDOM} % 100))" - # Enable parallel testing, auto will try to detect number of cores - # You may set this by hand. - # The default maximum is 8 unless MTR_MAX_PARALLEL is increased - export MTR_PARALLEL="${MTR_PARALLEL:-auto}" - - # create directories because mysqladmin might run out of order - mkdir -p "${T}"/var-tests{,/log} || die - - # Run mysql tests - pushd "${TESTDIR}" > /dev/null || die - - touch "${T}/disabled.def" - # These are failing in MariaDB 10.0 for now and are believed to be - # false positives: - # - # main.mysql_client_test, main.mysql_client_test_nonblock - # main.mysql_client_test_comp: - # segfaults at random under Portage only, suspect resource limits. - - local t - for t in plugins.cracklib_password_check plugins.two_password_validations ; do - _disable_test "$t" "False positive due to varying policies" - done - - for t in main.mysql_client_test main.mysql_client_test_nonblock \ - main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do - _disable_test "$t" "False positives in Gentoo" - done - - if ! use client-libs ; then - _disable_test main.plugin_auth "Needs client libraries built" - fi - - # run mysql-test tests - perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def" - retstatus_tests=$? - - popd > /dev/null || die - - # Cleanup is important for these testcases. - pkill -9 -f "${S}/ndb" 2>/dev/null - pkill -9 -f "${S}/sql" 2>/dev/null - - local failures="" - [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" - [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" - - [[ -z "$failures" ]] || die "Test failures: $failures" - einfo "Tests successfully completed" -} - -mysql_init_vars() { - MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"} - MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"} - MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"} - MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"} - - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR="" - if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then - MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ - | sed -ne '/datadir/s|^--datadir=||p' \ - | tail -n1` - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \ - | sed -e 's/.*=\s*//' \ - | tail -n1` - fi - fi - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR="${MY_LOCALSTATEDIR}" - einfo "Using default MY_DATADIR" - fi - elog "MySQL MY_DATADIR is ${MY_DATADIR}" - - if [[ -z "${PREVIOUS_DATADIR}" ]] ; then - if [[ -e "${MY_DATADIR}" ]] ; then - # If you get this and you're wondering about it, see bug #207636 - elog "MySQL datadir found in ${MY_DATADIR}" - elog "A new one will not be created." - PREVIOUS_DATADIR="yes" - else - PREVIOUS_DATADIR="no" - fi - export PREVIOUS_DATADIR - fi - else - if [[ ${EBUILD_PHASE} == "config" ]]; then - local new_MY_DATADIR - new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ - | sed -ne '/datadir/s|^--datadir=||p' \ - | tail -n1` - - if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then - ewarn "MySQL MY_DATADIR has changed" - ewarn "from ${MY_DATADIR}" - ewarn "to ${new_MY_DATADIR}" - MY_DATADIR="${new_MY_DATADIR}" - fi - fi - fi - - export MY_SHAREDSTATEDIR MY_SYSCONFDIR - export MY_LOCALSTATEDIR MY_LOGDIR - export MY_DATADIR -} - -pkg_config() { - _getoptval() { - local mypd="${EROOT}"/usr/bin/my_print_defaults - local section="$1" - local flag="--${2}=" - local extra_options="${3}" - "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp" - } - local old_MY_DATADIR="${MY_DATADIR}" - local old_HOME="${HOME}" - # my_print_defaults needs to read stuff in $HOME/.my.cnf - export HOME=${EPREFIX}/root - - # Make sure the vars are correctly initialized - mysql_init_vars - - [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR" - if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then - die "Minimal builds do NOT include the MySQL server" - fi - - if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then - local MY_DATADIR_s="${ROOT}/${MY_DATADIR}" - MY_DATADIR_s="${MY_DATADIR_s%%/}" - local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}" - old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}" - - if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist" - ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}" - else - elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}" - mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \ - || die "Moving MY_DATADIR failed" - fi - else - ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist" - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Attempting to use ${MY_DATADIR_s}" - else - eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist" - die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}" - fi - fi - fi - - local pwd1="a" - local pwd2="b" - local maxtry=15 - - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then - local tmp_mysqld_password_source= - - for tmp_mysqld_password_source in mysql client; do - einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..." - MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)" - if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then - if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then - ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!" - MYSQL_ROOT_PASSWORD= - continue - fi - - einfo "Found password in '${tmp_mysqld_password_source}' section!" - break - fi - done - - # Sometimes --show is required to display passwords in some implementations of my_print_defaults - if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then - MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)" - fi - - unset tmp_mysqld_password_source - fi - MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)" - MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} - - if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then - einfo "Creating MySQL tmpdir $MYSQL_TMPDIR" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR" - fi - if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then - einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN" - fi - if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then - einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG" - fi - - if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then - ewarn "You have already a MySQL database in place." - ewarn "(${ROOT}/${MY_DATADIR}/*)" - ewarn "Please rename or delete it if you wish to replace it." - die "MySQL database already exists!" - fi - - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then - - einfo "Please provide a password for the mysql 'root' user now" - einfo "or through the ${HOME}/.my.cnf file." - ewarn "Avoid [\"'\\_%] characters in the password" - read -rsp " >" pwd1 ; echo - - einfo "Retype the password" - read -rsp " >" pwd2 ; echo - - if [[ "x$pwd1" != "x$pwd2" ]] ; then - die "Passwords are not the same" - fi - MYSQL_ROOT_PASSWORD="${pwd1}" - unset pwd1 pwd2 - fi - - local options - local sqltmp="$(emktemp)" - - # Fix bug 446200. Don't reference host my.cnf, needs to come first, - # see 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/mariadb/scripts/mysql_install_db" ) - [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" ) - cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ) - einfo "Command: ${cmd[*]}" - su -s /bin/sh -c "${cmd[*]}" mysql \ - >"${TMPDIR}"/mysql_install_db.log 2>&1 - if [ $? -ne 0 ]; then - grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2 - die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" - fi - popd &>/dev/null || die - [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ - || die "MySQL databases not installed" - - use prefix || options="${options} --user=mysql" - - local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock" - local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" - local mysqld="${EROOT}/usr/sbin/mysqld \ - ${options} \ - --log-warnings=0 \ - --basedir=${EROOT}/usr \ - --datadir=${ROOT}/${MY_DATADIR} \ - --max_allowed_packet=8M \ - --net_buffer_length=16K \ - --socket=${socket} \ - --pid-file=${pidfile} - --tmpdir=${ROOT}/${MYSQL_TMPDIR}" - #einfo "About to start mysqld: ${mysqld}" - ebegin "Starting mysqld" - einfo "Command ${mysqld}" - ${mysqld} & - rc=$? - while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do - maxtry=$((${maxtry}-1)) - echo -n "." - sleep 1 - done - eend $rc - - if ! [[ -S "${socket}" ]]; then - die "Completely failed to start up mysqld with: ${mysqld}" - fi - - ebegin "Setting root password" - # Do this from memory, as we don't want clear text passwords in temp files - local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -e "${sql}" - eend $? - - if [[ -n "${sqltmp}" ]] ; then - ebegin "Loading \"zoneinfo\", this step may require a few seconds" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -uroot \ - --password="${MYSQL_ROOT_PASSWORD}" \ - mysql < "${sqltmp}" - rc=$? - eend $? - [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!" - fi - - # Stop the server and cleanup - einfo "Stopping the server ..." - kill $(< "${pidfile}" ) - rm -f "${sqltmp}" - wait %1 - einfo "Done" -} diff --git a/dev-db/mariadb/mariadb-5.1.67.ebuild b/dev-db/mariadb/mariadb-5.1.67.ebuild deleted file mode 100644 index a09e192..0000000 --- a/dev-db/mariadb/mariadb-5.1.67.ebuild +++ /dev/null @@ -1,170 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="4" -MY_EXTRAS_VER="20121101-2319Z" - -# Build system -BUILD="autotools" - -inherit toolchain-funcs mysql-v2 -# 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 ~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 -src_prepare() { - sed -i \ - -e '/^noinst_PROGRAMS/s/basic-t//g' \ - "${S}"/unittest/mytap/t/Makefile.am - mysql-v2_src_prepare -} - -# Official test instructions: -# USE='berkdb -cluster embedded extraengine perl ssl community' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mariadb-X.X.XX.ebuild \ -# digest clean package -src_test() { - # 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" - - emake check || die "make check failed" - if ! use "minimal" ; 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" - cd "${S}" - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - local retstatus_unit - local retstatus_ns - local retstatus_ps - local t - addpredict /this-dir-does-not-exist/t9.MYI - - # Ensure that parallel runs don't die - export MTR_BUILD_THREAD="$((${RANDOM} % 100))" - - # The entire 5.0 series has pre-generated SSL certificates, they have - # mostly expired now. ${S}/mysql-tests/std-data/*.pem - # The certs really SHOULD be generated for the tests, so that they are - # not expiring like this. We cannot do so ourselves as the tests look - # closely as the cert path data, and we do not have the CA key to regen - # ourselves. Alternatively, upstream should generate them with at least - # 50-year validity. - # - # Known expiry points: - # 4.1.*, 5.0.0-5.0.22, 5.1.7: Expires 2013/09/09 - # 5.0.23-5.0.77, 5.1.7-5.1.22?: Expires 2009/01/27 - # 5.0.78-5.0.90, 5.1.??-5.1.42: Expires 2010/01/28 - # - # mysql-test/std_data/untrusted-cacert.pem is MEANT to be - # expired/invalid. - case ${PV} in - 5.1.*|5.4.*|5.5.*) - for t in openssl_1 rpl_openssl rpl.rpl_ssl rpl.rpl_ssl1 ssl ssl_8k_key \ - ssl_compress ssl_connect rpl.rpl_heartbeat_ssl ; do \ - mysql-v2_disable_test \ - "$t" \ - "These OpenSSL tests break due to expired certificates" - done - ;; - esac - - # These are also failing in MySQL 5.1 for now, and are believed to be - # false positives: - # - # main.mysql_comment, main.mysql_upgrade, main.information_schema, - # funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers: - # fails due to USE=-latin1 / utf8 default - # - # main.mysql_client_test: - # segfaults at random under Portage only, suspect resource limits. - # - # main.not_partition: - # Failure reason unknown at this time, must resolve before package.mask - # removal FIXME - case ${PV} in - 5.1.*|5.2.*|5.4.*|5.5.*) - for t in main.mysql_client_test main.mysql_comments \ - main.mysql_upgrade \ - main.information_schema \ - main.not_partition funcs_1.is_columns_mysql \ - funcs_1.is_tables_mysql funcs_1.is_triggers; do - mysql-v2_disable_test "$t" "False positives in Gentoo" - done - ;; - esac - - # New failures in 5.1.50/5.1.51, reported by jmbsvicetto. - # These tests are picking up a 'connect-timeout' config from somewhere, - # which is not valid, and since it does not have 'loose-' in front of - # it, it's causing a failure - case ${PV} in - 5.1.5*|5.4.*|5.5.*|6*) - for t in rpl.rpl_mysql_upgrade main.log_tables_upgrade ; do - mysql-v2_disable_test "$t" \ - "False positives in Gentoo: connect-timeout" - done - ;; - esac - - use profiling && use community \ - || mysql-v2_disable_test main.profiling \ - "Profiling test needs profiling support" - - if [ "${PN}" == "mariadb" ]; then - for t in \ - parts.part_supported_sql_func_ndb \ - parts.partition_auto_increment_ndb ; do - mysql-v2_disable_test $t "ndb not supported in mariadb" - done - fi - - # create directories because mysqladmin might make out of order - mkdir -p "${S}"/mysql-test/var-{ps,ns}{,/log} - - # We run the test protocols seperately - emake test-unit - retstatus_unit=$? - [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" - - emake test-ns force="--force --vardir=${S}/mysql-test/var-ns" - retstatus_ns=$? - [[ $retstatus_ns -eq 0 ]] || eerror "test-ns failed" - has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" - - emake test-ps force="--force --vardir=${S}/mysql-test/var-ps" - retstatus_ps=$? - [[ $retstatus_ps -eq 0 ]] || eerror "test-ps failed" - has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" - - # TODO: - # When upstream enables the pr and nr testsuites, we need those as well. - - # 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_ns -eq 0 ]] || failures="${failures} test-ns" - [[ $retstatus_ps -eq 0 ]] || failures="${failures} test-ps" - 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/mariadb/mariadb-5.2.14.ebuild b/dev-db/mariadb/mariadb-5.2.14.ebuild deleted file mode 100644 index a09e192..0000000 --- a/dev-db/mariadb/mariadb-5.2.14.ebuild +++ /dev/null @@ -1,170 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="4" -MY_EXTRAS_VER="20121101-2319Z" - -# Build system -BUILD="autotools" - -inherit toolchain-funcs mysql-v2 -# 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 ~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 -src_prepare() { - sed -i \ - -e '/^noinst_PROGRAMS/s/basic-t//g' \ - "${S}"/unittest/mytap/t/Makefile.am - mysql-v2_src_prepare -} - -# Official test instructions: -# USE='berkdb -cluster embedded extraengine perl ssl community' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mariadb-X.X.XX.ebuild \ -# digest clean package -src_test() { - # 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" - - emake check || die "make check failed" - if ! use "minimal" ; 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" - cd "${S}" - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - local retstatus_unit - local retstatus_ns - local retstatus_ps - local t - addpredict /this-dir-does-not-exist/t9.MYI - - # Ensure that parallel runs don't die - export MTR_BUILD_THREAD="$((${RANDOM} % 100))" - - # The entire 5.0 series has pre-generated SSL certificates, they have - # mostly expired now. ${S}/mysql-tests/std-data/*.pem - # The certs really SHOULD be generated for the tests, so that they are - # not expiring like this. We cannot do so ourselves as the tests look - # closely as the cert path data, and we do not have the CA key to regen - # ourselves. Alternatively, upstream should generate them with at least - # 50-year validity. - # - # Known expiry points: - # 4.1.*, 5.0.0-5.0.22, 5.1.7: Expires 2013/09/09 - # 5.0.23-5.0.77, 5.1.7-5.1.22?: Expires 2009/01/27 - # 5.0.78-5.0.90, 5.1.??-5.1.42: Expires 2010/01/28 - # - # mysql-test/std_data/untrusted-cacert.pem is MEANT to be - # expired/invalid. - case ${PV} in - 5.1.*|5.4.*|5.5.*) - for t in openssl_1 rpl_openssl rpl.rpl_ssl rpl.rpl_ssl1 ssl ssl_8k_key \ - ssl_compress ssl_connect rpl.rpl_heartbeat_ssl ; do \ - mysql-v2_disable_test \ - "$t" \ - "These OpenSSL tests break due to expired certificates" - done - ;; - esac - - # These are also failing in MySQL 5.1 for now, and are believed to be - # false positives: - # - # main.mysql_comment, main.mysql_upgrade, main.information_schema, - # funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers: - # fails due to USE=-latin1 / utf8 default - # - # main.mysql_client_test: - # segfaults at random under Portage only, suspect resource limits. - # - # main.not_partition: - # Failure reason unknown at this time, must resolve before package.mask - # removal FIXME - case ${PV} in - 5.1.*|5.2.*|5.4.*|5.5.*) - for t in main.mysql_client_test main.mysql_comments \ - main.mysql_upgrade \ - main.information_schema \ - main.not_partition funcs_1.is_columns_mysql \ - funcs_1.is_tables_mysql funcs_1.is_triggers; do - mysql-v2_disable_test "$t" "False positives in Gentoo" - done - ;; - esac - - # New failures in 5.1.50/5.1.51, reported by jmbsvicetto. - # These tests are picking up a 'connect-timeout' config from somewhere, - # which is not valid, and since it does not have 'loose-' in front of - # it, it's causing a failure - case ${PV} in - 5.1.5*|5.4.*|5.5.*|6*) - for t in rpl.rpl_mysql_upgrade main.log_tables_upgrade ; do - mysql-v2_disable_test "$t" \ - "False positives in Gentoo: connect-timeout" - done - ;; - esac - - use profiling && use community \ - || mysql-v2_disable_test main.profiling \ - "Profiling test needs profiling support" - - if [ "${PN}" == "mariadb" ]; then - for t in \ - parts.part_supported_sql_func_ndb \ - parts.partition_auto_increment_ndb ; do - mysql-v2_disable_test $t "ndb not supported in mariadb" - done - fi - - # create directories because mysqladmin might make out of order - mkdir -p "${S}"/mysql-test/var-{ps,ns}{,/log} - - # We run the test protocols seperately - emake test-unit - retstatus_unit=$? - [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" - - emake test-ns force="--force --vardir=${S}/mysql-test/var-ns" - retstatus_ns=$? - [[ $retstatus_ns -eq 0 ]] || eerror "test-ns failed" - has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" - - emake test-ps force="--force --vardir=${S}/mysql-test/var-ps" - retstatus_ps=$? - [[ $retstatus_ps -eq 0 ]] || eerror "test-ps failed" - has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" - - # TODO: - # When upstream enables the pr and nr testsuites, we need those as well. - - # 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_ns -eq 0 ]] || failures="${failures} test-ns" - [[ $retstatus_ps -eq 0 ]] || failures="${failures} test-ps" - 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/mariadb/mariadb-5.3.12.ebuild b/dev-db/mariadb/mariadb-5.3.12.ebuild deleted file mode 100644 index a09e192..0000000 --- a/dev-db/mariadb/mariadb-5.3.12.ebuild +++ /dev/null @@ -1,170 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="4" -MY_EXTRAS_VER="20121101-2319Z" - -# Build system -BUILD="autotools" - -inherit toolchain-funcs mysql-v2 -# 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 ~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 -src_prepare() { - sed -i \ - -e '/^noinst_PROGRAMS/s/basic-t//g' \ - "${S}"/unittest/mytap/t/Makefile.am - mysql-v2_src_prepare -} - -# Official test instructions: -# USE='berkdb -cluster embedded extraengine perl ssl community' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mariadb-X.X.XX.ebuild \ -# digest clean package -src_test() { - # 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" - - emake check || die "make check failed" - if ! use "minimal" ; 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" - cd "${S}" - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - local retstatus_unit - local retstatus_ns - local retstatus_ps - local t - addpredict /this-dir-does-not-exist/t9.MYI - - # Ensure that parallel runs don't die - export MTR_BUILD_THREAD="$((${RANDOM} % 100))" - - # The entire 5.0 series has pre-generated SSL certificates, they have - # mostly expired now. ${S}/mysql-tests/std-data/*.pem - # The certs really SHOULD be generated for the tests, so that they are - # not expiring like this. We cannot do so ourselves as the tests look - # closely as the cert path data, and we do not have the CA key to regen - # ourselves. Alternatively, upstream should generate them with at least - # 50-year validity. - # - # Known expiry points: - # 4.1.*, 5.0.0-5.0.22, 5.1.7: Expires 2013/09/09 - # 5.0.23-5.0.77, 5.1.7-5.1.22?: Expires 2009/01/27 - # 5.0.78-5.0.90, 5.1.??-5.1.42: Expires 2010/01/28 - # - # mysql-test/std_data/untrusted-cacert.pem is MEANT to be - # expired/invalid. - case ${PV} in - 5.1.*|5.4.*|5.5.*) - for t in openssl_1 rpl_openssl rpl.rpl_ssl rpl.rpl_ssl1 ssl ssl_8k_key \ - ssl_compress ssl_connect rpl.rpl_heartbeat_ssl ; do \ - mysql-v2_disable_test \ - "$t" \ - "These OpenSSL tests break due to expired certificates" - done - ;; - esac - - # These are also failing in MySQL 5.1 for now, and are believed to be - # false positives: - # - # main.mysql_comment, main.mysql_upgrade, main.information_schema, - # funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers: - # fails due to USE=-latin1 / utf8 default - # - # main.mysql_client_test: - # segfaults at random under Portage only, suspect resource limits. - # - # main.not_partition: - # Failure reason unknown at this time, must resolve before package.mask - # removal FIXME - case ${PV} in - 5.1.*|5.2.*|5.4.*|5.5.*) - for t in main.mysql_client_test main.mysql_comments \ - main.mysql_upgrade \ - main.information_schema \ - main.not_partition funcs_1.is_columns_mysql \ - funcs_1.is_tables_mysql funcs_1.is_triggers; do - mysql-v2_disable_test "$t" "False positives in Gentoo" - done - ;; - esac - - # New failures in 5.1.50/5.1.51, reported by jmbsvicetto. - # These tests are picking up a 'connect-timeout' config from somewhere, - # which is not valid, and since it does not have 'loose-' in front of - # it, it's causing a failure - case ${PV} in - 5.1.5*|5.4.*|5.5.*|6*) - for t in rpl.rpl_mysql_upgrade main.log_tables_upgrade ; do - mysql-v2_disable_test "$t" \ - "False positives in Gentoo: connect-timeout" - done - ;; - esac - - use profiling && use community \ - || mysql-v2_disable_test main.profiling \ - "Profiling test needs profiling support" - - if [ "${PN}" == "mariadb" ]; then - for t in \ - parts.part_supported_sql_func_ndb \ - parts.partition_auto_increment_ndb ; do - mysql-v2_disable_test $t "ndb not supported in mariadb" - done - fi - - # create directories because mysqladmin might make out of order - mkdir -p "${S}"/mysql-test/var-{ps,ns}{,/log} - - # We run the test protocols seperately - emake test-unit - retstatus_unit=$? - [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" - - emake test-ns force="--force --vardir=${S}/mysql-test/var-ns" - retstatus_ns=$? - [[ $retstatus_ns -eq 0 ]] || eerror "test-ns failed" - has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" - - emake test-ps force="--force --vardir=${S}/mysql-test/var-ps" - retstatus_ps=$? - [[ $retstatus_ps -eq 0 ]] || eerror "test-ps failed" - has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" - - # TODO: - # When upstream enables the pr and nr testsuites, we need those as well. - - # 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_ns -eq 0 ]] || failures="${failures} test-ns" - [[ $retstatus_ps -eq 0 ]] || failures="${failures} test-ps" - 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/mariadb/mariadb-5.5.49.ebuild b/dev-db/mariadb/mariadb-5.5.49.ebuild deleted file mode 100644 index 0f48548..0000000 --- a/dev-db/mariadb/mariadb-5.5.49.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" -MY_EXTRAS_VER="20150509-1847Z" - -# Build system -BUILD="cmake" - -inherit toolchain-funcs mysql-v2 -# 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 - -# Official test instructions: -# USE='embedded extraengine perl ssl static-libs community' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mariadb-X.X.XX.ebuild \ -# digest clean package -src_test() { - - 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 "minimal" ; 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 the replace util - ln -s "${BUILD_DIR}/extra/replace" "${BUILD_DIR}/client/" - - # These are failing in MariaDB 5.5 for now and are believed to be - # false positives: - # - # main.information_schema, binlog.binlog_statement_insert_delayed, - # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, - # funcs_1.is_columns_mysql - # fails due to USE=-latin1 / utf8 default - # - # main.mysql_client_test, main.mysql_client_test_nonblock: - # segfaults at random under Portage only, suspect resource limits. - # - # archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam - # fails due to bad cleanup of previous tests when run in parallel - # The tool is deprecated anyway - # Bug 532288 - - for t in main.mysql_client_test main.mysql_client_test_nonblock \ - binlog.binlog_statement_insert_delayed main.information_schema \ - main.mysqld--help \ - archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ - funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do - mysql-v2_disable_test "$t" "False positives in Gentoo" - done - - # Run mysql tests - pushd "${TESTDIR}" - - # run mysql-test tests - perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ - --testcase-timeout=30 - 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/mariadb/mariadb-5.5.60-r1.ebuild b/dev-db/mariadb/mariadb-5.5.60-r1.ebuild deleted file mode 100644 index fa6dd41..0000000 --- a/dev-db/mariadb/mariadb-5.5.60-r1.ebuild +++ /dev/null @@ -1,827 +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://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz " - -# Gentoo patches to MySQL -if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then - SRC_URI="${SRC_URI} - mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" -fi - -HOMEPAGE="http://mariadb.org/" -DESCRIPTION="An enhanced, drop-in replacement for MySQL" -LICENSE="GPL-2" -SLOT="0/${SUBSLOT:-0}" -IUSE="bindist client-libs debug extraengine jemalloc latin1 libressl - oqgraph pam +perl profiling selinux +server sphinx - static static-libs systemtap tcmalloc - test tokudb yassl" - -# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests -RESTRICT="!bindist? ( bindist ) libressl? ( test )" - -REQUIRED_USE="server? ( tokudb? ( jemalloc !tcmalloc ) ) - ?? ( tcmalloc jemalloc ) - static? ( yassl !pam )" - -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" - -# Shorten the path because the socket path length must be shorter than 107 chars -# and we will run a mysql server during test phase -S="${WORKDIR}/mysql" - -if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then - MY_PATCH_DIR="${WORKDIR%/}/mysql-extras" - inherit git-r3 - EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git" - EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras" - EGIT_CLONE_TYPE=shallow -else - MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}" -fi - -PATCHES=( - "${MY_PATCH_DIR}/01050_all_mariadb_mysql_config_cleanup-5.5.41.patch" - "${MY_PATCH_DIR}/20004_all_mariadb-filter-tokudb-flags.patch" - "${MY_PATCH_DIR}/20006_all_cmake_elib-mariadb-5.5.50.patch" - "${MY_PATCH_DIR}/20009_all_mariadb_myodbc_symbol_fix-5.5.38.patch" - "${MY_PATCH_DIR}/20018_all_mariadb-5.5.60-without-clientlibs-tools.patch" -) - -# Be warned, *DEPEND are version-dependant -# These are used for both runtime and compiletime -COMMON_DEPEND=" - kernel_linux? ( - sys-process/procps:0= - dev-libs/libaio:0= - ) - >=sys-apps/sed-4 - >=sys-apps/texinfo-4.7-r1 - jemalloc? ( dev-libs/jemalloc:0= ) - tcmalloc? ( dev-util/google-perftools:0= ) - systemtap? ( >=dev-util/systemtap-1.3:0= ) - !yassl? ( - !libressl? ( dev-libs/openssl: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= - ) - server? ( - oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) - pam? ( virtual/pam:0= ) - ) - !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] ) -" -DEPEND="virtual/yacc - static? ( sys-libs/ncurses[static-libs] ) - || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) - ${COMMON_DEPEND}" -RDEPEND="selinux? ( sec-policy/selinux-mysql ) - client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c ) - !dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster - server? ( !prefix? ( dev-db/mysql-init-scripts ) ) - ${COMMON_DEPEND} - perl? ( !dev-db/mytop - virtual/perl-Getopt-Long - dev-perl/TermReadKey - virtual/perl-Term-ANSIColor - virtual/perl-Time-HiRes ) -" -# For other stuff to bring us in -# dev-perl/DBD-mysql is needed by some scripts installed by MySQL -PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" - -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] ; then - local GCC_MAJOR_SET=$(gcc-major-version) - local GCC_MINOR_SET=$(gcc-minor-version) - if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} with tokudb needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on - # non x86{,_64} arches - if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - fi - if has test ${FEATURES} && \ - use server && ! has userpriv ${FEATURES} ; then - eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - - # This should come after all of the die statements - enewgroup mysql 60 || die "problem adding 'mysql' group" - enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" -} - -pkg_postinst() { - # Make sure the vars are correctly initialized - mysql_init_vars - - # Create log directory securely if it does not exist - [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" - - if use server ; then - if use pam; then - einfo - elog "This install includes the PAM authentication plugin." - elog "To activate and configure the PAM plugin, please read:" - elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/" - einfo - fi - - if [[ -z "${REPLACING_VERSIONS}" ]] ; then - einfo - elog "You might want to run:" - elog "\"emerge --config =${CATEGORY}/${PF}\"" - elog "if this is a new install." - elog - elog "If you are switching server implentations, you should run the" - elog "mysql_upgrade tool." - einfo - else - einfo - elog "If you are upgrading major versions, you should run the" - elog "mysql_upgrade tool." - einfo - fi - - einfo - elog "Be sure to edit the my.cnf file to activate your cluster settings." - elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\"" - elog "The first time the cluster is activated, you should add" - elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node." - elog "This option should then be removed for subsequent starts." - einfo - fi -} - -src_unpack() { - unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR%/}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR%/}/${P}" "${S}" || die -} - -src_prepare() { - _disable_engine() { - echo > "${S%/}/storage/${1}/CMakeLists.txt" || die - } - - _disable_plugin() { - echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die - } - - if use tcmalloc; then - echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S%/}/sql/CMakeLists.txt" || die - fi - - # Don't build bundled xz-utils for tokudb - echo > "${S%/}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die - sed -i -e 's/ build_lzma//' "${S%/}/storage/tokudb/ft-index/ft/CMakeLists.txt" || die - sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S%/}/storage/tokudb/ft-index/portability/CMakeLists.txt" || die - - local plugin - local server_plugins=( handler_socket auth_socket feedback qc_info server_audit semisync sql_errlog ) - local test_plugins=( audit_null auth_examples daemon_example fulltext ) - if ! use server; then # These plugins are for the server - for plugin in "${server_plugins[@]}" ; do - _disable_plugin "${plugin}" - done - fi - - if ! use test; then # These plugins are only used during testing - for plugin in "${test_plugins[@]}" ; do - _disable_plugin "${plugin}" - done - fi - - # Collides with mariadb-connector-c bug 655980 - _disable_plugin auth_dialog - - # Don't build example - _disable_engine example - - if ! use oqgraph ; then # avoids extra library checks - _disable_engine oqgraph - fi - - cmake-utils_src_prepare -} - -src_configure(){ - # bug 508724 mariadb cannot use ld.gold - tc-ld-disable-gold - # Bug #114895, bug #110149 - filter-flags "-O" "-O[01]" - - append-cxxflags -felide-constructors - - # bug #283926, with GCC4.4, this is required to get correct behavior. - append-flags -fno-strict-aliasing - - CMAKE_BUILD_TYPE="RelWithDebInfo" - - # debug hack wrt #497532 - mycmakeargs=( - -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')" - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')" - -DCMAKE_INSTALL_PREFIX="${EPREFIX%/}/usr" - -DDEFAULT_SYSCONFDIR="${EPREFIX%/}/etc/mysql" - -DINSTALL_BINDIR=bin - -DINSTALL_DOCDIR=share/doc/${PF} - -DINSTALL_DOCREADMEDIR=share/doc/${PF} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_INFODIR=share/info - -DINSTALL_LIBDIR=$(get_libdir) - -DINSTALL_MANDIR=share/man - -DINSTALL_MYSQLSHAREDIR=share/mariadb - -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin - -DINSTALL_SCRIPTDIR=share/mariadb/scripts - -DINSTALL_MYSQLDATADIR="${EPREFIX%/}/var/lib/mysql" - -DINSTALL_SBINDIR=sbin - -DINSTALL_SUPPORTFILESDIR="${EPREFIX%/}/usr/share/mariadb" - -DCOMPILATION_COMMENT="Gentoo Linux ${PF}" - -DWITH_UNIT_TESTS=$(usex test ON OFF) - -DWITH_ZLIB=system - -DENABLED_LOCAL_INFILE=1 - -DMYSQL_UNIX_ADDR="${EPREFIX%/}/var/run/mysqld/mysqld.sock" - -DINSTALL_UNIX_ADDRDIR="${EPREFIX%/}/var/run/mysqld/mysqld.sock" - # The build forces this to be defined when cross-compiling. We pass it - # all the time for simplicity and to make sure it is actually correct. - -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1) - -DWITHOUT_CLIENTLIBS=YES - -DWITH_READLINE=$(usex bindist 1 0) - -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1) - -DENABLE_DTRACE=$(usex systemtap) - ) - if use test ; then - mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test ) - else - mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' ) - fi - - if ! use yassl ; then - mycmakeargs+=( -DWITH_SSL=system ) - else - mycmakeargs+=( -DWITH_SSL=bundled ) - fi - - if use server ; then - - # Federated{,X} must be treated special otherwise they will not be built as plugins - if ! use extraengine ; then - mycmakeargs+=( - -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 - -DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 ) - fi - - mycmakeargs+=( - -DWITH_JEMALLOC=$(usex jemalloc system) - -D$(usex sphinx WITH WITHOUT)_SPHINX_STORAGE_ENGINE=1 - -D$(usex tokudb WITH WITHOUT)_TOKUDB_STORAGE_ENGINE=1 - -D$(usex oqgraph WITH WITHOUT)_AUTH_PAM=1 - -DINSTALL_SQLBENCHDIR=share/mariadb - ) - - if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then - ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}" - ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}." - ewarn "You MUST file bugs without these variables set." - - mycmakeargs+=( - -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET} - -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION} - ) - - elif ! use latin1 ; then - mycmakeargs+=( - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_general_ci - ) - else - mycmakeargs+=( - -DDEFAULT_CHARSET=latin1 - -DDEFAULT_COLLATION=latin1_swedish_ci - ) - fi - mycmakeargs+=( - -DEXTRA_CHARSETS=all - -DDISABLE_SHARED=$(usex static YES NO) - -DWITH_EMBEDDED_SERVER=OFF - -DENABLED_PROFILING=$(usex profiling) - ) - - if use static; then - mycmakeargs+=( -DWITH_PIC=1 ) - fi - - if use jemalloc || use tcmalloc ; then - mycmakeargs+=( -DWITH_SAFEMALLOC=OFF ) - fi - - # Storage engines - mycmakeargs+=( - -DWITH_ARCHIVE_STORAGE_ENGINE=1 - -DWITH_BLACKHOLE_STORAGE_ENGINE=1 - -DWITH_CSV_STORAGE_ENGINE=1 - -DWITH_HEAP_STORAGE_ENGINE=1 - -DWITH_INNOBASE_STORAGE_ENGINE=1 - -DWITH_MYISAMMRG_STORAGE_ENGINE=1 - -DWITH_MYISAM_STORAGE_ENGINE=1 - -DWITH_PARTITION_STORAGE_ENGINE=1 - ) - - else - mycmakeargs+=( - -DWITHOUT_SERVER=1 - -DEXTRA_CHARSETS=none - -DINSTALL_SQLBENCHDIR= - ) - fi - - cmake-utils_src_configure -} - -src_compile() { - cmake-utils_src_compile -} - -src_install() { - cmake-utils_src_install - - # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used - if [[ -f "${ED%/}/usr/include/mysql/server/private/config.h" ]] ; then - rm "${ED%/}/usr/include/mysql/server/private/config.h" || die - fi - - # Make sure the vars are correctly initialized - mysql_init_vars - - # Convenience links - einfo "Making Convenience links for mysqlcheck multi-call binary" - dosym "mysqlcheck" "/usr/bin/mysqlanalyze" - dosym "mysqlcheck" "/usr/bin/mysqlrepair" - dosym "mysqlcheck" "/usr/bin/mysqloptimize" - - # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir - if [[ -d "${ED%/}/usr/data" ]] ; then - rm -Rf "${ED%/}/usr/data" || die - fi - - # Unless they explicitly specific USE=test, then do not install the - # testsuite. It DOES have a use to be installed, esp. when you want to do a - # validation of your database configuration after tuning it. - if ! use test ; then - rm -rf "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test" - fi - - # Configuration stuff - einfo "Building default configuration ..." - insinto "${MY_SYSCONFDIR#${EPREFIX}}" - [[ -f "${S%/}/scripts/mysqlaccess.conf" ]] && doins "${S%/}"/scripts/mysqlaccess.conf - local mycnf_src="my.cnf-5.5" - sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ - "${FILESDIR%/}/${mycnf_src}" \ - > "${TMPDIR%/}/my.cnf.ok" || die - use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok" - if use latin1 ; then - sed -i \ - -e "/character-set/s|utf8|latin1|g" \ - "${TMPDIR%/}/my.cnf.ok" || die - fi - eprefixify "${TMPDIR%/}/my.cnf.ok" - newins "${TMPDIR}/my.cnf.ok" my.cnf - - if use server ; then - einfo "Including support files and sample configurations" - docinto "support-files" - local script - for script in \ - "${S%/}"/support-files/magic - do - [[ -f "$script" ]] && dodoc "${script}" - done - - docinto "scripts" - for script in "${S%/}"/scripts/mysql* ; do - [[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}" - done - fi - - #Remove mytop if perl is not selected - [[ -e "${ED%/}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED%/}/usr/bin/mytop" -} - -# Official test instructions: -# USE='extraengine perl server' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mariadb-X.X.XX.ebuild \ -# digest clean package -src_test() { - - _disable_test() { - local rawtestname reason - rawtestname="${1}" ; shift - reason="${@}" - ewarn "test '${rawtestname}' disabled: '${reason}'" - echo ${rawtestname} : ${reason} >> "${T}/disabled.def" - } - - local TESTDIR="${BUILD_DIR}/mysql-test" - local retstatus_unit - local retstatus_tests - - if ! use server ; then - einfo "Skipping server tests due to minimal build." - return 0 - fi - - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [[ $UID -eq 0 ]]; then - die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox" - - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - - # Run CTest (test-units) - cmake-utils_src_test - retstatus_unit=$? - - # Ensure that parallel runs don't die - export MTR_BUILD_THREAD="$((${RANDOM} % 100))" - # Enable parallel testing, auto will try to detect number of cores - # You may set this by hand. - # The default maximum is 8 unless MTR_MAX_PARALLEL is increased - export MTR_PARALLEL="${MTR_PARALLEL:-auto}" - - # create directories because mysqladmin might run out of order - mkdir -p "${T}"/var-tests{,/log} || die - - # Run mysql tests - pushd "${TESTDIR}" > /dev/null || die - - touch "${T}/disabled.def" - # These are failing in MariaDB 5.5 for now and are believed to be - # false positives: - # - # main.information_schema, binlog.binlog_statement_insert_delayed, - # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, - # funcs_1.is_columns_mysql - # fails due to USE=-latin1 / utf8 default - # - # main.mysql_client_test, main.mysql_client_test_nonblock: - # segfaults at random under Portage only, suspect resource limits. - # - # archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam - # fails due to bad cleanup of previous tests when run in parallel - # The tool is deprecated anyway - # Bug 532288 - - local t - for t in main.mysql_client_test main.mysql_client_test_nonblock \ - binlog.binlog_statement_insert_delayed main.information_schema \ - main.mysqld--help \ - archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ - funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do - _disable_test "$t" "False positives in Gentoo" - done - - if ! use client-libs ; then - _disable_test main.plugin_auth "Needs client libraries built" - fi - - # run mysql-test tests - perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def" - retstatus_tests=$? - - popd > /dev/null || die - - # Cleanup is important for these testcases. - pkill -9 -f "${S}/ndb" 2>/dev/null - pkill -9 -f "${S}/sql" 2>/dev/null - - local failures="" - [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" - [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" - - [[ -z "$failures" ]] || die "Test failures: $failures" - einfo "Tests successfully completed" -} - -mysql_init_vars() { - MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"} - MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"} - MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"} - MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"} - - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR="" - if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then - MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ - | sed -ne '/datadir/s|^--datadir=||p' \ - | tail -n1` - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \ - | sed -e 's/.*=\s*//' \ - | tail -n1` - fi - fi - if [[ -z "${MY_DATADIR}" ]] ; then - MY_DATADIR="${MY_LOCALSTATEDIR}" - einfo "Using default MY_DATADIR" - fi - elog "MySQL MY_DATADIR is ${MY_DATADIR}" - - if [[ -z "${PREVIOUS_DATADIR}" ]] ; then - if [[ -e "${MY_DATADIR}" ]] ; then - # If you get this and you're wondering about it, see bug #207636 - elog "MySQL datadir found in ${MY_DATADIR}" - elog "A new one will not be created." - PREVIOUS_DATADIR="yes" - else - PREVIOUS_DATADIR="no" - fi - export PREVIOUS_DATADIR - fi - else - if [[ ${EBUILD_PHASE} == "config" ]]; then - local new_MY_DATADIR - new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \ - | sed -ne '/datadir/s|^--datadir=||p' \ - | tail -n1` - - if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then - ewarn "MySQL MY_DATADIR has changed" - ewarn "from ${MY_DATADIR}" - ewarn "to ${new_MY_DATADIR}" - MY_DATADIR="${new_MY_DATADIR}" - fi - fi - fi - - export MY_SHAREDSTATEDIR MY_SYSCONFDIR - export MY_LOCALSTATEDIR MY_LOGDIR - export MY_DATADIR -} - -pkg_config() { - _getoptval() { - local mypd="${EROOT}"/usr/bin/my_print_defaults - local section="$1" - local flag="--${2}=" - local extra_options="${3}" - "${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp" - } - local old_MY_DATADIR="${MY_DATADIR}" - local old_HOME="${HOME}" - # my_print_defaults needs to read stuff in $HOME/.my.cnf - export HOME=${EPREFIX}/root - - # Make sure the vars are correctly initialized - mysql_init_vars - - [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR" - if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then - die "Minimal builds do NOT include the MySQL server" - fi - - if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then - local MY_DATADIR_s="${ROOT}/${MY_DATADIR}" - MY_DATADIR_s="${MY_DATADIR_s%%/}" - local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}" - old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}" - - if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist" - ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}" - else - elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}" - mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \ - || die "Moving MY_DATADIR failed" - fi - else - ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist" - if [[ -d "${MY_DATADIR_s}" ]]; then - ewarn "Attempting to use ${MY_DATADIR_s}" - else - eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist" - die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}" - fi - fi - fi - - local pwd1="a" - local pwd2="b" - local maxtry=15 - - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then - local tmp_mysqld_password_source= - - for tmp_mysqld_password_source in mysql client; do - einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..." - MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)" - if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then - if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then - ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!" - MYSQL_ROOT_PASSWORD= - continue - fi - - einfo "Found password in '${tmp_mysqld_password_source}' section!" - break - fi - done - - # Sometimes --show is required to display passwords in some implementations of my_print_defaults - if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then - MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)" - fi - - unset tmp_mysqld_password_source - fi - MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)" - MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*} - - if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then - einfo "Creating MySQL tmpdir $MYSQL_TMPDIR" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR" - fi - if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then - einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN" - fi - if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then - einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG" - install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG" - fi - - if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then - ewarn "You have already a MySQL database in place." - ewarn "(${ROOT}/${MY_DATADIR}/*)" - ewarn "Please rename or delete it if you wish to replace it." - die "MySQL database already exists!" - fi - - # Bug #213475 - MySQL _will_ object strenously if your machine is named - # localhost. Also causes weird failures. - [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" - - if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then - - einfo "Please provide a password for the mysql 'root' user now" - einfo "or through the ${HOME}/.my.cnf file." - ewarn "Avoid [\"'\\_%] characters in the password" - read -rsp " >" pwd1 ; echo - - einfo "Retype the password" - read -rsp " >" pwd2 ; echo - - if [[ "x$pwd1" != "x$pwd2" ]] ; then - die "Passwords are not the same" - fi - MYSQL_ROOT_PASSWORD="${pwd1}" - unset pwd1 pwd2 - fi - - local options - local sqltmp="$(emktemp)" - - # Fix bug 446200. Don't reference host my.cnf, needs to come first, - # see 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/mariadb/scripts/mysql_install_db" ) - [[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" ) - cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ) - einfo "Command: ${cmd[*]}" - su -s /bin/sh -c "${cmd[*]}" mysql \ - >"${TMPDIR}"/mysql_install_db.log 2>&1 - if [ $? -ne 0 ]; then - grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2 - die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" - fi - popd &>/dev/null || die - [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ - || die "MySQL databases not installed" - - use prefix || options="${options} --user=mysql" - - local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock" - local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid" - local mysqld="${EROOT}/usr/sbin/mysqld \ - ${options} \ - --log-warnings=0 \ - --basedir=${EROOT}/usr \ - --datadir=${ROOT}/${MY_DATADIR} \ - --max_allowed_packet=8M \ - --net_buffer_length=16K \ - --socket=${socket} \ - --pid-file=${pidfile} - --tmpdir=${ROOT}/${MYSQL_TMPDIR}" - #einfo "About to start mysqld: ${mysqld}" - ebegin "Starting mysqld" - einfo "Command ${mysqld}" - ${mysqld} & - rc=$? - while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do - maxtry=$((${maxtry}-1)) - echo -n "." - sleep 1 - done - eend $rc - - if ! [[ -S "${socket}" ]]; then - die "Completely failed to start up mysqld with: ${mysqld}" - fi - - ebegin "Setting root password" - # Do this from memory, as we don't want clear text passwords in temp files - local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -e "${sql}" - eend $? - - if [[ -n "${sqltmp}" ]] ; then - ebegin "Loading \"zoneinfo\", this step may require a few seconds" - "${EROOT}/usr/bin/mysql" \ - "--socket=${socket}" \ - -hlocalhost \ - -uroot \ - --password="${MYSQL_ROOT_PASSWORD}" \ - mysql < "${sqltmp}" - rc=$? - eend $? - [[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!" - fi - - # Stop the server and cleanup - einfo "Stopping the server ..." - kill $(< "${pidfile}" ) - rm -f "${sqltmp}" - wait %1 - einfo "Done" -} diff --git a/dev-db/mariadb/mariadb-9999.ebuild b/dev-db/mariadb/mariadb-9999.ebuild deleted file mode 100644 index 0961b38..0000000 --- a/dev-db/mariadb/mariadb-9999.ebuild +++ /dev/null @@ -1,233 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -MY_EXTRAS_VER="none" -SERVER_URI=" " -EGIT_REPO_URI="https://github.com/MariaDB/server.git" -# The wsrep API version must match between upstream WSREP and sys-cluster/galera major number -WSREP_REVISION="25" -SUBSLOT="18" -MYSQL_PV_MAJOR="5.6" -JAVA_PKG_OPT_USE="jdbc" - -inherit toolchain-funcs java-pkg-opt-2 mysql-multilib-r1 git-r3 -HOMEPAGE="http://mariadb.org/" -DESCRIPTION="An enhanced, drop-in replacement for MySQL" - -IUSE="+backup bindist cracklib galera kerberos innodb-lz4 innodb-lzo innodb-snappy jdbc mroonga odbc oqgraph pam sphinx sst-rsync sst-xtrabackup tokudb systemd xml" -RESTRICT="!bindist? ( bindist )" - -REQUIRED_USE="jdbc? ( extraengine server !static ) server? ( tokudb? ( jemalloc !tcmalloc ) ) static? ( !pam )" - -KEYWORDS="" - -COMMON_DEPEND=" - mroonga? ( app-text/groonga-normalizer-mysql ) - kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) - systemd? ( sys-apps/systemd:= ) - !bindist? ( - sys-libs/binutils-libs:0= - >=sys-libs/readline-4.1:0= - ) - server? ( - backup? ( app-arch/libarchive:0= ) - cracklib? ( sys-libs/cracklib:0= ) - extraengine? ( - odbc? ( dev-db/unixODBC:0= ) - xml? ( dev-libs/libxml2:2= ) - ) - innodb-lz4? ( app-arch/lz4 ) - innodb-lzo? ( dev-libs/lzo ) - innodb-snappy? ( app-arch/snappy ) - oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= ) - pam? ( virtual/pam:0= ) - tokudb? ( app-arch/snappy ) - ) - >=dev-libs/libpcre-8.35:3= -" -DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) - server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) ) - ${COMMON_DEPEND}" -RDEPEND="${RDEPEND} ${COMMON_DEPEND} - server? ( galera? ( - sys-apps/iproute2 - =sys-cluster/galera-${WSREP_REVISION}* - sst-rsync? ( sys-process/lsof ) - sst-xtrabackup? ( net-misc/socat[ssl] ) - ) ) - perl? ( !dev-db/mytop - virtual/perl-Getopt-Long - dev-perl/TermReadKey - virtual/perl-Term-ANSIColor - virtual/perl-Time-HiRes ) - server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) ) -" -# xtrabackup-bin causes a circular dependency if DBD-mysql is not already installed -PDEPEND="galera? ( sst-xtrabackup? ( || ( >=dev-db/percona-xtrabackup-bin-2.2.4 dev-db/percona-xtrabackup ) ) )" - -MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/mysql_version.h - /usr/include/mariadb/mariadb_version.h - /usr/include/mysql/private/probes_mysql_nodtrace.h - /usr/include/mysql/private/probes_mysql_dtrace.h ) -MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config /usr/bin/mysql_config ) - -pkg_setup() { - java-pkg-opt-2_pkg_setup - mysql-multilib-r1_pkg_setup -} - -pkg_preinst() { - java-pkg-opt-2_pkg_preinst - mysql-multilib-r1_pkg_preinst -} - -# This is a special unpack for the VCS version -src_unpack() { - git-r3_src_unpack - - mv -f "${WORKDIR}/${P}" "${S}" -} - -src_prepare() { - java-pkg-opt-2_src_prepare - mysql-multilib-r1_src_prepare -} - -src_configure(){ - # bug 508724 mariadb cannot use ld.gold - tc-ld-disable-gold - - local MYSQL_CMAKE_NATIVE_DEFINES=( - -DWITH_JEMALLOC=$(usex jemalloc system) - -DWITH_PCRE=system - ) - local MYSQL_CMAKE_EXTRA_DEFINES=( - -DPLUGIN_AUTH_GSSAPI_CLIENT=$(usex kerberos YES NO) - ) - if use server ; then - # Federated{,X} must be treated special otherwise they will not be built as plugins - if ! use extraengine ; then - MYSQL_CMAKE_NATIVE_DEFINES+=( - -DPLUGIN_FEDERATED=NO - -DPLUGIN_FEDERATEDX=NO ) - fi - - MYSQL_CMAKE_NATIVE_DEFINES+=( - -DPLUGIN_OQGRAPH=$(usex oqgraph YES NO) - -DPLUGIN_SPHINX=$(usex sphinx YES NO) - -DPLUGIN_TOKUDB=$(usex tokudb YES NO) - -DPLUGIN_AUTH_PAM=$(usex pam YES NO) - -DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO) - -DPLUGIN_CASSANDRA=NO - -DPLUGIN_SEQUENCE=$(usex extraengine YES NO) - -DPLUGIN_SPIDER=$(usex extraengine YES NO) - -DPLUGIN_CONNECT=$(usex extraengine YES NO) - -DCONNECT_WITH_MYSQL=1 - -DCONNECT_WITH_LIBXML2=$(usex xml) - -DCONNECT_WITH_ODBC=$(usex odbc) - -DCONNECT_WITH_JDBC=$(usex jdbc) - -DWITH_WSREP=$(usex galera) - -DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF) - -DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF) - -DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF) - -DPLUGIN_MROONGA=$(usex mroonga YES NO) - -DPLUGIN_AUTH_GSSAPI=$(usex kerberos YES NO) - -DWITH_MARIABACKUP=$(usex backup ON OFF) - -DWITH_LIBARCHIVE=$(usex backup ON OFF) - ) - fi - mysql-multilib-r1_src_configure -} - -# Official test instructions: -# USE='-cluster embedded extraengine perl ssl static-libs community' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mariadb-X.X.XX.ebuild \ -# digest clean package -multilib_src_test() { - - local TESTDIR="${BUILD_DIR}/mysql-test" - local retstatus_unit - local retstatus_tests - - multilib_is_native_abi || return - - # 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 "minimal" ; 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))" - - # create directories because mysqladmin might right out of order - mkdir -p "${S}"/mysql-test/var-tests{,/log} - - # These are failing in MariaDB 10.0 for now and are believed to be - # false positives: - # - # main.information_schema, binlog.binlog_statement_insert_delayed, - # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, - # funcs_1.is_columns_mysql - # fails due to USE=-latin1 / utf8 default - # - # main.mysql_client_test, main.mysql_client_test_nonblock: - # segfaults at random under Portage only, suspect resource limits. - # - # plugins.unix_socket - # fails because portage strips out the USER enviornment variable - # - - for t in main.mysql_client_test main.mysql_client_test_nonblock \ - binlog.binlog_statement_insert_delayed main.information_schema \ - main.mysqld--help plugins.unix_socket \ - funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do - mysql-multilib_disable_test "$t" "False positives in Gentoo" - done - - # Run mysql tests - pushd "${TESTDIR}" || die - - # run mysql-test tests - # Skip all CONNECT engine tests until upstream respondes to how to reference data files - perl mysql-test-run.pl --force --vardir="${S}/mysql-test/var-tests" --skip-test=connect - retstatus_tests=$? - [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" - has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" - - popd || die - - # 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" - - # Cleanup test data after a successful run - rm -r "${S}/mysql-test/var-tests" - else - - einfo "Skipping server tests due to minimal build." - fi -} diff --git a/dev-db/mariadb/metadata.xml b/dev-db/mariadb/metadata.xml deleted file mode 100644 index d9c8a04..0000000 --- a/dev-db/mariadb/metadata.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>mysql-bugs@gentoo.org</email> - <name>MySQL</name> - </maintainer> - <maintainer type="person"> - <email>hasufell@gentoo.org</email> - <description>Libressl issues. Only assign if it's a direct Libressl issue. Do not directly assign for anything else</description> - </maintainer> -<use> - <flag name="backup">Build mariadb-backup which supports SST and hot backup of InnoDB, Aria and MyISAM including compression and encryption</flag> - <flag name="big-tables">Make tables contain up to 1.844E+19 rows</flag> - <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages</flag> - <flag name="cluster">Add support for NDB clustering (deprecated)</flag> - <flag name="community">Enables the community features from upstream.</flag> - <flag name="embedded">Build embedded server (libmysqld)</flag> - <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag> - <flag name="galera">Enables galera replication</flag> - <flag name="innodb-lz4">Enables lz4 compression methods for InnoDB/XtraDB</flag> - <flag name="innodb-lzo">Enables lzo compression methods for InnoDB/XtraDB</flag> - <flag name="innodb-snappy">Enables snappy compression methods for InnoDB/XtraDB using <pkg>app-arch/snappy</pkg></flag> - <flag name="jdbc">Enable the CONNECT engine to access foreign databases via JDBC</flag> - <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag> - <flag name="latin1">Use LATIN1 encoding instead of UTF8</flag> - <flag name="libevent">Use libevent for connection handling</flag> - <flag name="libressl">Enable SSL connections and crypto functions using <pkg>dev-libs/libressl</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="mroonga">Add support for the Mroonga engine for interfacing with the Groonga text search</flag> - <flag name="numa">Enable NUMA support using sys-process/numactl (NUMA kernel support is also required)</flag> - <flag name="openssl">Enable SSL connections and crypto functions using <pkg>dev-libs/openssl</pkg></flag> - <flag name="oqgraph">Add support for the Open Query GRAPH engine</flag> - <flag name="pam">Enable the optional PAM authentication plugin for the server</flag> - <flag name="pbxt">Add experimental support for PBXT storage engine</flag> - <flag name="profiling">Add support for statement profiling (requires USE=community).</flag> - <flag name="rocksdb">Add support for RocksDB; a key/value, LSM database optimized for flash storage</flag> - <flag name="server">Build the server program</flag> - <flag name="sphinx">Add suport for the sphinx full-text search engine</flag> - <flag name="sst-rsync">Add tools needed to support the rsync SST method</flag> - <flag name="sst-mariabackup">Add tools needed to support the mariabackup SST method</flag> - <flag name="sst-xtrabackup">Add tools needed to support the xtrabackup and xtrabackup-v2 SST methods</flag> - <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag> - <flag name="test">Install upstream testsuites for end use.</flag> - <flag name="tokudb">Add support for TokuDB storage engine</flag> - <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag> -</use> -</pkgmetadata> diff --git a/dev-db/mysql-cluster/ChangeLog b/dev-db/mysql-cluster/ChangeLog deleted file mode 100644 index 57fbf14..0000000 --- a/dev-db/mysql-cluster/ChangeLog +++ /dev/null @@ -1,45 +0,0 @@ -# ChangeLog for dev-db/mysql-cluster -# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Id$ - -*mysql-cluster-7.2.22 (18 Nov 2015) -*mysql-cluster-7.3.11 (18 Nov 2015) - - 18 Nov 2015; Brian Evans <grknight@gentoo.org> +mysql-cluster-7.2.22.ebuild, - +mysql-cluster-7.3.11.ebuild, -mysql-cluster-7.2.20.ebuild, - -mysql-cluster-7.3.9.ebuild: - dev-db/mysql-cluster: Version bumps - -*mysql-cluster-7.2.19 (10 Feb 2015) -*mysql-cluster-7.3.8 (10 Feb 2015) - - 10 Feb 2015; Brian Evans <grknight@gentoo.org> +mysql-cluster-7.2.19.ebuild, - +mysql-cluster-7.3.8.ebuild, -mysql-cluster-7.2.17.ebuild, - -mysql-cluster-7.3.6-r1.ebuild, -mysql-cluster-7.3.6.ebuild: - Version bump; drop old - -*mysql-cluster-7.0.37 (03 Jul 2013) - - 03 Jul 2013; Brian Evans <grknight@lavabit.com> +mysql-cluster-7.0.37.ebuild, - -mysql-cluster-7.0.9.ebuild: - [mysql-cluster] Bump 7.0 series to 7.0.37 - -*mysql-cluster-7.2.13 (01 Jul 2013) -*mysql-cluster-7.3.0 (01 Jul 2013) - - 01 Jul 2013; Brian Evans <grknight@lavabit.com> - +mysql-cluster-7.2.13.ebuild, +mysql-cluster-7.3.0.ebuild: - Bump to version 7.2.13 and 7.3.0 - - 22 May 2012; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-cluster-7.0.9.ebuild: - Move EAPI assignment to the top. - Whitespace. - -*mysql-cluster-7.0.9 (09 Aug 2010) - - 09 Aug 2010; Robin H. Johnson <robbat2@gentoo.org> - +mysql-cluster-7.0.9.ebuild: - Bug #331691: mysql-cluster support from Nathan Sullivan - <nathan@nightsys.net> for Gentoo telco users. Needs more polish still and - init.d scripts. diff --git a/dev-db/mysql-cluster/Manifest b/dev-db/mysql-cluster/Manifest deleted file mode 100644 index 2eafe55..0000000 --- a/dev-db/mysql-cluster/Manifest +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -DIST mysql-cluster-gpl-7.2.22.tar.gz 26075142 SHA256 404b80192c488791cedf6251e64bb01310b20f13fcdb28721e108e92985ae999 SHA512 b3370725f17a5b6577c9822097b6c39e4375bdabca2a403bd45dfeb9fd5920c0e213c894eed33dadba69d9c066427ab5065c587869d82bf2e3438d3bdeb1aa8e WHIRLPOOL 1275fc2a181011c5ea2ac392c94027f399a5ce4fd499ff23790bfad142b1c7d67bc421e7c6a4e64e6bb409f04016196417535d5704d21165c1120bf46ab68544 -DIST mysql-cluster-gpl-7.3.11.tar.gz 42806929 SHA256 6c8cfc99ccbf47cd4304996559de6fb330e9cdf754bec37ff7347be72e50c646 SHA512 89e5b6e845b71ed6945529b7f515d3af96ec6daf79c0085f1d0ea6e4426f61eb3626b688e5edda668be4615df1b8cec4e71acdf0d21150fa2775c79ea09563e5 WHIRLPOOL f03d3b62da793becd6aab775293e5963697f9b4147bf6d662274f689b1a48692b1f4de0ad196e74cb02a07ce2a69b608a4d420ad5dc153b20888ba69dc361dc4 -DIST mysql-cluster-gpl-7.4.20.tar.gz 41675568 SHA256 4a9efbf3a2506654605daac7ec51f06e18b316786d745b975896cfee395cc5b4 SHA512 fb6b8d027f873423b64b0898386126e85881605357650821ed6cd30c0fabb8edf1765bf2c87e11533d944fd33b07aaf01c045da9e10f8e24e864e9c1a3d8c984 WHIRLPOOL 669471b83fe47550c0ad3dae58a37dfc62e1b71e0f3e0023e8b78f1b2693408eab7b02b7c0cd4ab113691d3f29e09568f2687cfddf7a2e9a8de6fec8c9f06e00 -DIST mysql-extras-20151117-2040Z.tar.bz2 294183 SHA256 2ca16597e869fb0fac4f6e48b779892569698ce83c898df3afaee63131f71833 SHA512 8edbc6a3812d17a2f1a827459867c0747387ff72be86b12fe0e790afca5e4b70e4f23c4098bdb61afa20ef292e2c3b154f16577d5c11999a3e2eec9e43b8d09a WHIRLPOOL f0df653216857527ffa3d31f07ab1c470614b53350f5dbd965ba3bdc398f36f37b506537f1070b03a54203a3847f6557a2ae6757327ce852833fa026de7b518d -DIST mysql-extras-20180628-0201Z.tar.bz2 322141 SHA256 8317028fa98cc4abd819d11191fb82026eb9c4d23490b7c1d42590731fbc834d SHA512 71a3800ec091b41e41d25536199149eb714c0bbfc0f6fc478e8e4dcaf4cf87a7e4d49c513da3c9badc0de810d7d78c05ad91dd898e45005b42136346237de42a WHIRLPOOL 71a5d8d09ede40a2d7adad6d57e1b546fabb34610c92ede6e0b472c0d84ad016e39ec7fcb038c708723535542dfd9caace22f2b8dd822951ba8c0ee2778c462b ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQKTBAEBCAB9FiEEZsLkTtkOMnWOfVXA0feB7/n0o7YFAls1JTVfFIAAAAAALgAo -aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDY2 -QzJFNDRFRDkwRTMyNzU4RTdENTVDMEQxRjc4MUVGRjlGNEEzQjYACgkQ0feB7/n0 -o7bVWRAAvmeaQBrNqYDFN31LWTWNRhlydqsRyl/uqBJIx74JgGKfuT4M5OMEqzL6 -VUSX3bM/ecZyIbYvqwZtgGotZ7S+J2Ac/J3crAKnVeTDIpbyU4MQ+nvmKt/kATsy -77m5UrxQXja7ARZ5nUwV3wV0t1VW1/ukips/8KM3yPEdaEXzygo/SSdQUB6QPFaI -nphtETJ84tf9MOWo1HJrS147j9PeDefs3EJONnl7d8mhlzCWNHOI718K8zQhxwS2 -o1va2F+UM0fWHEJoa/trrCKquvv6wra/oaIAlRhthSmLtQYTckAlLNu5n8WtCbpQ -jm1KFR9s3gOY2Lco/xwDkvt23vQk5934hG0wkgyHSTCRuFiJdJD+fXut/eGdTEuu -kpGseCZUFQ/XcFF5FKqJwXYIXd6ILqkzs3YU2dUcdO0XCMgVIytAwEReIgMeryKV -8qCFJY58lJIDsp5Gp/6gb/732WJ9Dmpwpav/M6yS6cBIyC5oKyRLHWeoM4/bnsQW -XFhj6bT1TdHJp+fMpfjb8vWAyA88wutu3lSQ3R90+5bEz3eXssaVZS1CGNnNNCmg -oXsgNAMgUN+z62na+qlQKAaFtMJ4exhepnnpwB1Bwx59/Vt7KJCJga34wanMwuFJ -H/ooLxuNb8KUh5V1pGP/SUiNw29JedsJ1nEbe28gGo/iZv5kZqc= -=skuK ------END PGP SIGNATURE----- diff --git a/dev-db/mysql-cluster/files/my.cnf-5.5 b/dev-db/mysql-cluster/files/my.cnf-5.5 deleted file mode 100644 index b3ab74c..0000000 --- a/dev-db/mysql-cluster/files/my.cnf-5.5 +++ /dev/null @@ -1,148 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. -# $Id$ - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock - -[mysql] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqladmin] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlcheck] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqldump] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlimport] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlshow] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[myisamchk] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -# use [safe_mysqld] with mysql-3 -[mysqld_safe] -err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid -log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err -basedir = @GENTOO_PORTAGE_EPREFIX@/usr -datadir = @DATADIR@ -skip-external-locking -key_buffer_size = 16M -max_allowed_packet = 1M -table_open_cache = 64 -sort_buffer_size = 512K -net_buffer_length = 8K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql -#Set this to your desired error message language -lc_messages = en_US - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ -#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname - -# you need the debug USE flag enabled to use the following directives, -# if needed, uncomment them, start the server and issue -# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace -# this will show you *exactly* what's happening in your server ;) - -#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql -#gdb -#debug = d:t:i:o,/tmp/mysqld.trace -#one-thread - -# the following is the InnoDB configuration -# if you wish to disable innodb instead -# uncomment just the next line -#skip-innodb -# -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -innodb_buffer_pool_size = 16M -# this is the default, increase it if you have lots of tables -innodb_additional_mem_pool_size = 2M -# -# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route -# we have to take for the moment -#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -innodb_log_file_size = 5M -# this is the default, increase it if you have very large transactions going on -innodb_log_buffer_size = 8M -# this is the default and won't hurt you -# you shouldn't need to tweak it -innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_file_per_table - -# Uncomment this to get FEDERATED engine support -#plugin-load=federated=ha_federated.so -loose-federated - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[isamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[myisamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer_size = 2M -write_buffer_size = 2M - -[mysqlhotcopy] -interactive-timeout - diff --git a/dev-db/mysql-cluster/files/my.cnf-5.6 b/dev-db/mysql-cluster/files/my.cnf-5.6 deleted file mode 100644 index ee85e99..0000000 --- a/dev-db/mysql-cluster/files/my.cnf-5.6 +++ /dev/null @@ -1,140 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. -# $Id$ - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock - -[mysql] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqladmin] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlcheck] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqldump] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlimport] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlshow] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[myisamchk] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -# use [safe_mysqld] with mysql-3 -[mysqld_safe] -err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid -log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err -basedir = @GENTOO_PORTAGE_EPREFIX@/usr -datadir = @DATADIR@ -skip-external-locking -key_buffer_size = 16M -max_allowed_packet = 4M -table_open_cache = 400 -sort_buffer_size = 512K -net_buffer_length = 16K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql -#Set this to your desired error message language -lc_messages = en_US - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ -#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname - -# you need the debug USE flag enabled to use the following directives, -# if needed, uncomment them, start the server and issue -# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace -# this will show you *exactly* what's happening in your server ;) - -#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql -#gdb -#debug = d:t:i:o,/tmp/mysqld.trace -#one-thread - -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -innodb_buffer_pool_size = 128M -# -# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route -# we have to take for the moment -#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -innodb_log_file_size = 48M -# this is the default, increase it if you have very large transactions going on -innodb_log_buffer_size = 8M -# this is the default and won't hurt you -# you shouldn't need to tweak it -innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_file_per_table - -# Uncomment this to get FEDERATED engine support -#plugin-load=federated=ha_federated.so -loose-federated - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[isamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[myisamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer_size = 2M -write_buffer_size = 2M - -[mysqlhotcopy] -interactive-timeout diff --git a/dev-db/mysql-cluster/metadata.xml b/dev-db/mysql-cluster/metadata.xml deleted file mode 100644 index 9836872..0000000 --- a/dev-db/mysql-cluster/metadata.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>mysql-bugs@gentoo.org</email> - <name>MySQL</name> - </maintainer> -<use> - <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages</flag> - <flag name="cluster">Add support for NDB clustering</flag> - <flag name="community">Enables the community features from upstream.</flag> - <flag name="embedded">Build embedded server (libmysqld)</flag> - <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag> - <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> - <flag name="profiling">Add support for statement profiling (requires USE=community).</flag> - <flag name="server">Build the server program</flag> - <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag> - <flag name="test">Install upstream testsuites for end use.</flag> - <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag> -</use> -</pkgmetadata> diff --git a/dev-db/mysql-cluster/mysql-cluster-7.2.22.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.2.22.ebuild deleted file mode 100644 index 09d32b5..0000000 --- a/dev-db/mysql-cluster/mysql-cluster-7.2.22.ebuild +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -MY_EXTRAS_VER="20151117-2040Z" -BUILD="cmake" - -inherit toolchain-funcs java-pkg-opt-2 mysql-v2 -# only to make repoman happy. it is really set in the eclass -IUSE="$IUSE" - -# REMEMBER: also update eclass/mysql*.eclass before committing! -KEYWORDS="~amd64 ~x86" - -# When MY_EXTRAS is bumped, the index should be revised to exclude these. -# This is often broken still -#EPATCH_EXCLUDE='' - -DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" -RDEPEND="!media-sound/amarok[embedded]" - -# 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 - -# Official test instructions: -# USE='cluster extraengine perl ssl community' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mysql-cluster-X.X.XX.ebuild \ -# digest clean package -src_test() { - - local TESTDIR="${CMAKE_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 "minimal" ; 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))" - - # create directories because mysqladmin might right out of order - mkdir -p "${T}"/var-tests{,/log} - - # These are failing in MySQL 5.5 for now and are believed to be - # false positives: - # - # main.information_schema, binlog.binlog_statement_insert_delayed, - # main.mysqld--help-notwin, ndb.ndbinfo, ndb_binlog.ndb_binlog_index - # fails due to USE=-latin1 / utf8 default - # - # main.mysql_client_test: - # segfaults at random under Portage only, suspect resource limits. - # - # sys_vars.plugin_dir_basic - # fails because PLUGIN_DIR is set to MYSQL_LIBDIR64/plugin - # instead of MYSQL_LIBDIR/plugin - # - # main.flush_read_lock_kill - # fails because of unknown system variable 'DEBUG_SYNC' - # - # main.openssl_1 - # error message changing - # -mysqltest: Could not open connection 'default': 2026 SSL connection - # error: ASN: bad other signature confirmation - # +mysqltest: Could not open connection 'default': 2026 SSL connection - # error: error:00000001:lib(0):func(0):reason(1) - # - - for t in main.mysql_client_test \ - binlog.binlog_statement_insert_delayed main.information_schema \ - main.mysqld--help-notwin main.flush_read_lock_kill \ - sys_vars.plugin_dir_basic main.openssl_1 \ - main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ - ndb.ndbinfo ndb_binlog.ndb_binlog_index ; do - mysql-v2_disable_test "$t" "False positives in Gentoo" - done - - # Run mysql tests - pushd "${TESTDIR}" - - # run mysql-test tests - perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ - --parallel=auto - 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-cluster/mysql-cluster-7.3.11.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.3.11.ebuild deleted file mode 100644 index 75316b6..0000000 --- a/dev-db/mysql-cluster/mysql-cluster-7.3.11.ebuild +++ /dev/null @@ -1,135 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -MY_EXTRAS_VER="20151117-2040Z" -SUBSLOT="18" - -inherit toolchain-funcs java-pkg-opt-2 mysql-multilib -# only to make repoman happy. it is really set in the eclass -IUSE="$IUSE" - -# REMEMBER: also update eclass/mysql*.eclass before committing! -KEYWORDS="~amd64 ~x86" - -# When MY_EXTRAS is bumped, the index should be revised to exclude these. -# This is often broken still -#EPATCH_EXCLUDE='' - -DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" -RDEPEND="!media-sound/amarok[embedded]" - -# 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 - -# Official test instructions: -# USE='extraengine perl openssl' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mysql-cluster-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="${CMAKE_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 "minimal" ; 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} - - # 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, - # main.mysqld--help-notwin, 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. - # - 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.mysqld--help-notwinfuncs_1.is_triggers \ - main.mysql_client_test \ - mysqld--help-notwin \ - main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ - perfschema.binlog_edge_mix \ - perfschema.binlog_edge_stmt \ - ; do - mysql-multilib_disable_test "$t" "False positives in Gentoo" - done - # ndb.ndbinfo, ndb_binlog.ndb_binlog_index: latin1/utf8 - for t in \ - ndb.ndbinfo \ - ndb_binlog.ndb_binlog_index ; do - mysql-multilib_disable_test "$t" "False positives in Gentoo (NDB)" - done - - # Run mysql tests - pushd "${TESTDIR}" - - # run mysql-test tests - perl mysql-test-run.pl --force --vardir="${T}/var-tests" - 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-cluster/mysql-cluster-7.4.20.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.4.20.ebuild deleted file mode 100644 index 7121a97..0000000 --- a/dev-db/mysql-cluster/mysql-cluster-7.4.20.ebuild +++ /dev/null @@ -1,514 +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 \ - java-pkg-opt-2 user cmake-utils multilib-build - -SRC_URI="http://cdn.mysql.com/Downloads/MySQL-Cluster-7.4/${PN}-gpl-${PV}.tar.gz - https://cdn.mysql.com/archives/mysql-cluster-7.4/${PN}-gpl-${PV}.tar.gz - http://downloads.mysql.com/archives/MySQL-Cluster-7.4/${PN}-gpl-${PV}.tar.gz" - -# Gentoo patches to MySQL -if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then - SRC_URI="${SRC_URI} - mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - 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="~amd64 ~x86" -# 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 - -MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" - -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}"/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}"/30000_all_mysql-cluster-multilib-property.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 ) - dev-libs/libevent:0= - ) - !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] ) - ${JAVA_PKG_E_DEPEND} -" -DEPEND="virtual/yacc - static? ( sys-libs/ncurses[static-libs] ) - || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) - >=virtual/jdk-1.6 - test? ( dev-perl/JSON ) - ${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 - server? ( !prefix? ( dev-db/mysql-init-scripts ) ) - >=virtual/jre-1.6 - ${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" - java-pkg_init -} - -src_unpack() { - unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR}/${PN}-gpl-${PV}" "${S}" || die -} - -src_prepare() { - java-utils-2_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 - 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_plugin innodb_memcached - - 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" - -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 - -DWITH_NDBCLUSTER=1 - -DWITHOUT_PARTITION_STORAGE_ENGINE=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 - find "${ED%/}/usr/data" -delete || 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 - find "${D%/}/${MY_SHAREDSTATEDIR}/mysql-test" -delete || die - 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 -} - -pkg_preinst() { - java-utils-2_pkg_preinst -} - -pkg_postinst() { - # Make sure the vars are correctly initialized - mysql_init_vars - - # Create log directory securely if it does not exist - [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" - - if use server ; then - if [[ -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 -} - -# Official test instructions: -# USE='extraengine perl openssl' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mysql-cluster-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="${CMAKE_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}" - - # 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/" - - touch "${T}/disabled.def" - # 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, - # main.mysqld--help-notwin, 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. - # - 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.mysqld--help-notwinfuncs_1.is_triggers \ - main.mysql_client_test \ - mysqld--help-notwin \ - main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ - perfschema.binlog_edge_mix \ - perfschema.binlog_edge_stmt \ - rpl.rpl_plugin_load main.mysql \ - main.mysql_upgrade \ - ; do - _disable_test "$t" "False positives in Gentoo" - done - # ndb.ndbinfo, ndb_binlog.ndb_binlog_index: latin1/utf8 - for t in \ - ndb.ndbinfo ndb.ndb_tools_connect \ - ndb_binlog.ndb_binlog_index ; do - _disable_test "$t" "False positives in Gentoo (NDB) (Latin1/UTF8)" - done - - # Set file limits higher so tests run - ulimit -n 3000 - - # Run mysql tests - pushd "${TESTDIR}" > /dev/null || die - - # run mysql-test tests - perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ - --suite-timeout=5000 --reorder --skip-test-list="${T}/disabled.def" \ - --nounit-tests - 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 - - 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-init-scripts/ChangeLog b/dev-db/mysql-init-scripts/ChangeLog deleted file mode 100644 index 4b326a1..0000000 --- a/dev-db/mysql-init-scripts/ChangeLog +++ /dev/null @@ -1,26 +0,0 @@ -# ChangeLog for dev-db/mysql-init-scripts -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Id$ - -*mysql-init-scripts-1.2 (06 Aug 2014) - - 06 Aug 2014; Brian Evans <grknight@gentoo.org> +files/mysql.conf.d, - +files/mysql.rc6, +files/mysqlmanager.conf.d, +files/mysqlmanager.rc6, - +mysql-init-scripts-1.2.ebuild: - [mysql-init-scripts] Retire the v1 series to the overlay since all tree - versions can no longer use - - 06 Dec 2010; Robin H. Johnson <robbat2@gentoo.org> files/mysql-5.1.53-conf.d, - files/mysql-5.1.53-init.d: - Add stop timeout. - - 06 Dec 2010; Robin H. Johnson <robbat2@gentoo.org> files/mysql-5.1.53-init.d: - Fix typo. - -*mysql-init-scripts-2.0_pre1 (06 Dec 2010) - - 06 Dec 2010; Robin H. Johnson <robbat2@gentoo.org> - +mysql-init-scripts-2.0_pre1.ebuild, +files/mysql-5.1.53-conf.d, - +files/mysql-5.1.53-init.d, +files/logrotate.mysql, +metadata.xml: - Finally revamp init scripts, based on bug #175783 submission from Davide - Pesavento <davidepesa@gmail.com>. diff --git a/dev-db/mysql-init-scripts/files/conf.d-2.0 b/dev-db/mysql-init-scripts/files/conf.d-2.0 deleted file mode 100644 index 142995e..0000000 --- a/dev-db/mysql-init-scripts/files/conf.d-2.0 +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -# If you want a non-stock location for the config file, uncomment or update -# either of these as needed. If you do use it, you must make sure that none of -# your socket, pidfile, datadir, logfiles, binary logs, relay logs or InnoDB -# files collide with each other. -MY_CNF="/etc/mysql/my.cnf" -#MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}" -#MY_CNF="${MY_CNF:-/etc/mysql/my-${SVCNAME/mysql.}.cnf}" - -# Place any additional arguments here that you might need -# Common/useful options: -# --skip-slave-start=1 - For bringing up replication initially -# --server-id=NNN - Server ID for replication -# --skip-networking - lock it down to UNIX sockets only -MY_ARGS="" - -# This setting (in seconds) should be high enough to allow InnoDB to do a full -# checkpoint recovery. 900 is the default used in the upstream RPM startup -# scripts. 30 seconds should be sufficent if you just have a tiny <1GiB -# database. After the core startup is done, we wait this long for the UNIX -# socket to appear. -STARTUP_TIMEOUT="900" - -# This is how long, in milliseconds, we wait for pidfile to be created, early -# in the startup. -STARTUP_EARLY_TIMEOUT="1000" - -# How long (in seconds) should we wait for shutdown? -STOP_TIMEOUT=120 - -# integer [-20 .. 19 ] default 0 -# change the priority of the server -20 (high) to 19 (low) -# see nice(1) for description -#NICE=0 - -# See start-stop-daemon(8) for possible settings -#IONICE=2 - -# If defined, --verbose gets passed to S-S-D -#DEBUG=1 - -# Depending on your usage of MySQL, you may also wish to start it after some -# other services are up. Uncomment the lines below as needed. If these aren't -# enough for you, we encourage you to file a bug, and help us understand how -# you are using MySQL. - -# Do your MySQL ACLs refer to hostnames not in your /etc/hosts? -# If so, you need DNS before you can accept connections. -# Avoid dependency circular loops if you use MySQL to power a local DNS server. -#rc_use="dns" -#rc_after="dns" - -# Does your MySQL bind to an IP on an interface other than net.lo? -# Alternatively you might wish to specify the exact interface here. -#rc_use="net" -#rc_after="net" - -# Do you store your MySQL files on a SAN or other network filesystem, that is -# provided by the netmount init script? -#rc_need="netmount" - -# Or from NFS? P.S. This is not a good idea in most cases, but does have some -# valid usage cases, so we provide the option. -#rc_need="nfsmount" - -# Should any one of the instances satisfy the requirement for MySQL coming up? -# By default, we say no. -[ "${SVCNAME}" != mysql ] && rc_provide="!mysql" -# But uncomment this next instead if you think it should. -#rc_provide="mysql" - -# The conditional above has a false-positive "failure" return value as a -# side-effect, and since it's the last statement, without the next line, this -# script returns failure. -return 0 -# vim: ft=gentoo-conf-d et ts=4 sw=4: diff --git a/dev-db/mysql-init-scripts/files/init.d-2.0 b/dev-db/mysql-init-scripts/files/init.d-2.0 deleted file mode 100644 index 0402789..0000000 --- a/dev-db/mysql-init-scripts/files/init.d-2.0 +++ /dev/null @@ -1,160 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -extra_commands="checkconfig" - -depend() { - use net.lo - # localmount needed for $basedir - need localmount -} - -get_config() { - my_print_defaults --config-file="$1" mysqld | - sed -n -e "s/^--$2=//p" -} - -mysql_svcname() { - local ebextra= - case "${SVCNAME}" in - mysql*) ;; - *) ebextra=" (mysql)" ;; - esac - echo "${SVCNAME}${ebextra}" -} - -start() { - # Check for old conf.d variables that mean migration was not yet done. - set | egrep -sq '^(mysql_slot_|MYSQL_BLOG_PID_FILE|STOPTIMEOUT)' - rc=$? - # Yes, MYSQL_INIT_I_KNOW_WHAT_I_AM_DOING is a hidden variable. - # It does have a use in testing, as it is possible to build a config file - # that works with both the old and new init scripts simulateously. - if [ "${rc}" = 0 -a -z "${MYSQL_INIT_I_KNOW_WHAT_I_AM_DOING}" ]; then - eerror "You have not updated your conf.d for the new mysql-init-scripts-2 revamp." - eerror "Not proceeding because it may be dangerous." - return 1 - fi - - # Check the config or die - checkconfig || return 1 - - # Now we can startup - ebegin "Starting $(mysql_svcname)" - - MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}" - - if [ ! -r "${MY_CNF}" ] ; then - eerror "Cannot read the configuration file \`${MY_CNF}'" - return 1 - fi - - # tail -n1 is critical as these we only want the last instance of the option - local basedir=$(get_config "${MY_CNF}" basedir | tail -n1) - local datadir=$(get_config "${MY_CNF}" datadir | tail -n1) - local pidfile=$(get_config "${MY_CNF}" pid-file | tail -n1) - local socket=$(get_config "${MY_CNF}" socket | tail -n1) - local chroot=$(get_config "${MY_CNF}" chroot | tail -n1) - - if [ -n "${chroot}" ] ; then - socket="${chroot}/${socket}" - pidfile="${chroot}/${pidfile}" - fi - - if [ ! -d "${datadir}" ] ; then - eerror "MySQL datadir \`${datadir}' is empty or invalid" - eerror "Please check your config file \`${MY_CNF}'" - return 1 - fi - - if [ ! -d "${datadir}"/mysql ] ; then - # find which package is installed to report an error - local EROOT=$(portageq envvar EROOT) - local DBPKG_P=$(portageq match ${EROOT} $(portageq expand_virtual ${EROOT} virtual/mysql)) - if [ -z ${DBPKG_P} ] ; then - eerror "You don't appear to have a server package installed yet." - else - eerror "You don't appear to have the mysql database installed yet." - eerror "Please run \`emerge --config =${DBPKG_P}\` to have this done..." - fi - return 1 - fi - - local piddir="${pidfile%/*}" - checkpath -d --owner mysql:mysql --mode 0755 "$piddir" - rc=$? - if [ $rc -ne 0 ]; then - eerror "Directory $piddir for pidfile does not exist and cannot be created" - return 1 - fi - - local startup_timeout=${STARTUP_TIMEOUT:-900} - local startup_early_timeout=${STARTUP_EARLY_TIMEOUT:-1000} - local tmpnice="${NICE:+"--nicelevel "}${NICE}" - local tmpionice="${IONICE:+"--ionice "}${IONICE}" - start-stop-daemon \ - ${DEBUG:+"--verbose"} \ - --start \ - --exec "${basedir}"/sbin/mysqld \ - --pidfile "${pidfile}" \ - --background \ - --wait ${startup_early_timeout} \ - ${tmpnice} \ - ${tmpionice} \ - -- --defaults-file="${MY_CNF}" ${MY_ARGS} - local ret=$? - if [ ${ret} -ne 0 ] ; then - eend ${ret} - return ${ret} - fi - - ewaitfile ${startup_timeout} "${socket}" - eend $? || return 1 - - save_options pidfile "${pidfile}" - save_options basedir "${basedir}" -} - -stop() { - ebegin "Stopping $(mysql_svcname)" - - local pidfile="$(get_options pidfile)" - local basedir="$(get_options basedir)" - local stop_timeout=${STOP_TIMEOUT:-120} - - start-stop-daemon \ - ${DEBUG:+"--verbose"} \ - --stop \ - --exec "${basedir}"/sbin/mysqld \ - --pidfile "${pidfile}" \ - --retry ${stop_timeout} - eend $? -} - -checkconfig() { - local my_cnf="${MY_CNF:-/etc/${SVCNAME}/my.cnf}" - local basedir=$(get_config "${my_cnf}" basedir | tail -n1) - local svc_name=$(mysql_svcname) - ebegin "Checking mysqld configuration for ${svc_name}" - - if [ ${RC_CMD} = "checkconfig" ] ; then - # We are calling checkconfig specifically. Print warnings regardless. - "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null - else - # Suppress output to check the return value - "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null 2>&1 - - # If the above command does not return 0, - # then there is an error to echo to the user - if [ $? -ne 0 ] ; then - "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null - fi - fi - - eend $? "${svc_name} config check failed" -} - -# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet: - diff --git a/dev-db/mysql-init-scripts/files/init.d-s6 b/dev-db/mysql-init-scripts/files/init.d-s6 deleted file mode 100644 index a9a0a34..0000000 --- a/dev-db/mysql-init-scripts/files/init.d-s6 +++ /dev/null @@ -1,129 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -depend() { - use net.lo - # localmount needed for $basedir - need localmount s6-svscan -} - -get_config() { - my_print_defaults --config-file="$1" mysqld | - sed -n -e "s/^--$2=//p" -} - -mysql_svcname() { - local ebextra= - case "${svc_name}" in - mysql*) ;; - *) ebextra=" (mysql)" ;; - esac - echo "${svc_name}${ebextra}" -} - -extra_commands="checkconfig" -supervisor=s6 -name=$(mysql_svcname) -s6_service_timeout_stop="$((1000*${STOP_TIMEOUT:-120}))" -#s6_svwait_options_start="-U -t $((1000*${STARTUP_EARLY_TIMEOUT:-1000}))" -svc_name=${RC_SVCNAME%-s6} -s6_service_path=/var/svc.d/${svc_name} - -start_pre() { - # Check the config or die - checkconfig || return 1 - - MY_CNF="${MY_CNF:-/etc/${svc_name}/my.cnf}" - - if [ ! -r "${MY_CNF}" ] ; then - eerror "Cannot read the configuration file \`${MY_CNF}'" - return 1 - fi - - # tail -n1 is critical as these we only want the last instance of the option - local basedir=$(get_config "${MY_CNF}" basedir | tail -n1) - local datadir=$(get_config "${MY_CNF}" datadir | tail -n1) - local pidfile=$(get_config "${MY_CNF}" pid-file | tail -n1) - local socket=$(get_config "${MY_CNF}" socket | tail -n1) - local chroot=$(get_config "${MY_CNF}" chroot | tail -n1) - - if [ -n "${chroot}" ] ; then - socket="${chroot}/${socket}" - pidfile="${chroot}/${pidfile}" - fi - - if [ ! -d "${datadir}" ] ; then - eerror "MySQL datadir \`${datadir}' is empty or invalid" - eerror "Please check your config file \`${MY_CNF}'" - return 1 - fi - - if [ ! -d "${datadir}"/mysql ] ; then - # find which package is installed to report an error - local EROOT=$(portageq envvar EROOT) - local DBPKG_P=$(portageq match ${EROOT} $(portageq expand_virtual ${EROOT} virtual/mysql)) - if [ -z ${DBPKG_P} ] ; then - eerror "You don't appear to have a server package installed yet." - else - eerror "You don't appear to have the mysql database installed yet." - eerror "Please run \`emerge --config =${DBPKG_P}\` to have this done..." - fi - return 1 - fi - - local piddir="${pidfile%/*}" - checkpath -d --owner mysql:mysql --mode 0755 "$piddir" - rc=$? - if [ $rc -ne 0 ]; then - eerror "Directory $piddir for pidfile does not exist and cannot be created" - return 1 - fi - - # Prepare env files to source - mkdir -p "/var/svc.d/${svc_name}" - echo "MY_CNF=\"${MY_CNF}\"" > "/var/svc.d/${svc_name}/env" - echo "MY_ARGS=\"${MY_ARGS}\"" >> "/var/svc.d/${svc_name}/env" - echo "basedir=\"${basedir}\"" >> "/var/svc.d/${svc_name}/env" - mkdir -p "/var/svc.d/${svc_name}/log" - echo "SVCNAME=\"${SVCNAME}\"" > "/var/svc.d/${svc_name}/log/env" - echo "S6_LOG_OPTIONS=\"${S6_LOG_OPTIONS}\"" > "/var/svc.d/${svc_name}/log/env" -} - -start_post() { - local socket=$(get_config "${MY_CNF}" socket | tail -n1) - local chroot=$(get_config "${MY_CNF}" chroot | tail -n1) - local startup_timeout=${STARTUP_TIMEOUT:-900} - - if [ -n "${chroot}" ] ; then - socket="${chroot}/${socket}" - fi - ewaitfile ${startup_timeout} "${socket}" -} - -checkconfig() { - local my_cnf="${MY_CNF:-/etc/${svc_name}/my.cnf}" - local basedir=$(get_config "${my_cnf}" basedir | tail -n1) - local svc_name=$(mysql_svcname) - ebegin "Checking mysqld configuration for ${svc_name}" - - if [ ${RC_CMD} = "checkconfig" ] ; then - # We are calling checkconfig specifically. Print warnings regardless. - "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null - else - # Suppress output to check the return value - "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null 2>&1 - - # If the above command does not return 0, - # then there is an error to echo to the user - if [ $? -ne 0 ] ; then - "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null - fi - fi - - eend $? "${svc_name} config check failed" -} - -# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet: - diff --git a/dev-db/mysql-init-scripts/files/log-s6 b/dev-db/mysql-init-scripts/files/log-s6 deleted file mode 100644 index 15be384..0000000 --- a/dev-db/mysql-init-scripts/files/log-s6 +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -if [ -e ./env ] ; then source ./env ; else echo "failed to source env" ; fi -mkdir -p "/var/log/mysql/${SVCNAME}" -if [ ${S6_LOG_OPTIONS} ] ; then - exec s6-log ${S6_LOG_OPTIONS} -else - exec s6-log -b n20 S15000000 !"gzip -nq9" "/var/log/mysql/${SVCNAME}" -fi diff --git a/dev-db/mysql-init-scripts/files/logrotate.mysql b/dev-db/mysql-init-scripts/files/logrotate.mysql deleted file mode 100644 index 2367d93..0000000 --- a/dev-db/mysql-init-scripts/files/logrotate.mysql +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -/var/log/mysql/mysql.err /var/log/mysql/mysql.log /var/log/mysql/mysqld.err { -monthly -create 660 mysql mysql -notifempty -size 5M -sharedscripts -missingok -postrotate -[ -f /var/run/mysqld/mysqld.pid ] && /bin/kill -HUP `cat /var/run/mysqld/mysqld.pid` -endscript -} diff --git a/dev-db/mysql-init-scripts/files/mysql-5.1.53-conf.d b/dev-db/mysql-init-scripts/files/mysql-5.1.53-conf.d deleted file mode 100644 index 142995e..0000000 --- a/dev-db/mysql-init-scripts/files/mysql-5.1.53-conf.d +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -# If you want a non-stock location for the config file, uncomment or update -# either of these as needed. If you do use it, you must make sure that none of -# your socket, pidfile, datadir, logfiles, binary logs, relay logs or InnoDB -# files collide with each other. -MY_CNF="/etc/mysql/my.cnf" -#MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}" -#MY_CNF="${MY_CNF:-/etc/mysql/my-${SVCNAME/mysql.}.cnf}" - -# Place any additional arguments here that you might need -# Common/useful options: -# --skip-slave-start=1 - For bringing up replication initially -# --server-id=NNN - Server ID for replication -# --skip-networking - lock it down to UNIX sockets only -MY_ARGS="" - -# This setting (in seconds) should be high enough to allow InnoDB to do a full -# checkpoint recovery. 900 is the default used in the upstream RPM startup -# scripts. 30 seconds should be sufficent if you just have a tiny <1GiB -# database. After the core startup is done, we wait this long for the UNIX -# socket to appear. -STARTUP_TIMEOUT="900" - -# This is how long, in milliseconds, we wait for pidfile to be created, early -# in the startup. -STARTUP_EARLY_TIMEOUT="1000" - -# How long (in seconds) should we wait for shutdown? -STOP_TIMEOUT=120 - -# integer [-20 .. 19 ] default 0 -# change the priority of the server -20 (high) to 19 (low) -# see nice(1) for description -#NICE=0 - -# See start-stop-daemon(8) for possible settings -#IONICE=2 - -# If defined, --verbose gets passed to S-S-D -#DEBUG=1 - -# Depending on your usage of MySQL, you may also wish to start it after some -# other services are up. Uncomment the lines below as needed. If these aren't -# enough for you, we encourage you to file a bug, and help us understand how -# you are using MySQL. - -# Do your MySQL ACLs refer to hostnames not in your /etc/hosts? -# If so, you need DNS before you can accept connections. -# Avoid dependency circular loops if you use MySQL to power a local DNS server. -#rc_use="dns" -#rc_after="dns" - -# Does your MySQL bind to an IP on an interface other than net.lo? -# Alternatively you might wish to specify the exact interface here. -#rc_use="net" -#rc_after="net" - -# Do you store your MySQL files on a SAN or other network filesystem, that is -# provided by the netmount init script? -#rc_need="netmount" - -# Or from NFS? P.S. This is not a good idea in most cases, but does have some -# valid usage cases, so we provide the option. -#rc_need="nfsmount" - -# Should any one of the instances satisfy the requirement for MySQL coming up? -# By default, we say no. -[ "${SVCNAME}" != mysql ] && rc_provide="!mysql" -# But uncomment this next instead if you think it should. -#rc_provide="mysql" - -# The conditional above has a false-positive "failure" return value as a -# side-effect, and since it's the last statement, without the next line, this -# script returns failure. -return 0 -# vim: ft=gentoo-conf-d et ts=4 sw=4: diff --git a/dev-db/mysql-init-scripts/files/mysql-5.1.53-init.d b/dev-db/mysql-init-scripts/files/mysql-5.1.53-init.d deleted file mode 100644 index afa9918..0000000 --- a/dev-db/mysql-init-scripts/files/mysql-5.1.53-init.d +++ /dev/null @@ -1,110 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -depend() { - use net.lo - # localmount needed for $basedir - need localmount -} - -get_config() { - my_print_defaults --config-file="$1" mysqld | - sed -n -e "s/^--$2=//p" -} - -mysql_svcname() { - local ebextra= - case "${SVCNAME}" in - mysql*) ;; - *) ebextra=" (mysql)" ;; - esac - echo "${SVCNAME}${ebextra}" -} - -start() { - # Check for old conf.d variables that mean migration was not yet done. - local varlist="${!mysql_slot_*} ${!MYSQL_BLOG_PID_FILE*} ${!STOPTIMEOUT*}" - varlist="${varlist// /}" - # Yes, MYSQL_INIT_I_KNOW_WHAT_I_AM_DOING is a hidden variable. - # It does have a use in testing, as it is possible to build a config file - # that works with both the old and new init scripts simulateously. - if [ -n "${varlist}" -a -z "${MYSQL_INIT_I_KNOW_WHAT_I_AM_DOING}" ]; then - eerror "You have not updated your conf.d for the new mysql-init-scripts-2 revamp." - eerror "Not proceeding because it may be dangerous." - return 1 - fi - - # Now we can startup - ebegin "Starting $(mysql_svcname)" - - MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}" - - if [ ! -r "${MY_CNF}" ] ; then - eerror "Cannot read the configuration file \`${MY_CNF}'" - return 1 - fi - - # tail -n1 is critical as these we only want the last instance of the option - local basedir=$(get_config "${MY_CNF}" basedir | tail -n1) - local datadir=$(get_config "${MY_CNF}" datadir | tail -n1) - local pidfile=$(get_config "${MY_CNF}" pid-file | tail -n1) - local socket=$(get_config "${MY_CNF}" socket | tail -n1) - - if [ ! -d "${datadir}" ] ; then - eerror "MySQL datadir \`${datadir}' is empty or invalid" - eerror "Please check your config file \`${MY_CNF}'" - return 1 - fi - - if [ ! -d "${datadir}"/mysql ] ; then - eerror "You don't appear to have the mysql database installed yet." - eerror "Please run /usr/bin/mysql_install_db to have this done..." - return 1 - fi - - local startup_timeout=${STARTUP_TIMEOUT:-900} - local startup_early_timeout=${STARTUP_EARLY_TIMEOUT:-1000} - local tmpnice="${NICE:+"--nicelevel "}${NICE}" - local tmpionice="${IONICE:+"--ionice "}${IONICE}" - start-stop-daemon \ - ${DEBUG/*/"--verbose"} \ - --start \ - --exec "${basedir}"/sbin/mysqld \ - --pidfile "${pidfile}" \ - --background \ - --wait ${startup_early_timeout} \ - ${tmpnice} \ - ${tmpionice} \ - -- --defaults-file="${MY_CNF}" ${MY_ARGS} - local ret=$? - if [ ${ret} -ne 0 ] ; then - eend ${ret} - return ${ret} - fi - - ewaitfile ${startup_timeout} "${socket}" - eend $? || return 1 - - save_options pidfile "${pidfile}" - save_options basedir "${basedir}" -} - -stop() { - ebegin "Stopping $(mysql_svcname)" - - local pidfile="$(get_options pidfile)" - local basedir="$(get_options basedir)" - local stop_timeout=${STOP_TIMEOUT:-120} - - start-stop-daemon \ - ${DEBUG/*/"--verbose"} \ - --stop \ - --exec "${basedir}"/sbin/mysqld \ - --pidfile "${pidfile}" \ - --retry ${stop_timeout} - eend $? -} -# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet: - diff --git a/dev-db/mysql-init-scripts/files/mysql-5.1.67-init.d b/dev-db/mysql-init-scripts/files/mysql-5.1.67-init.d deleted file mode 100644 index 1a78103..0000000 --- a/dev-db/mysql-init-scripts/files/mysql-5.1.67-init.d +++ /dev/null @@ -1,118 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -depend() { - use net.lo - # localmount needed for $basedir - need localmount -} - -get_config() { - my_print_defaults --config-file="$1" mysqld | - sed -n -e "s/^--$2=//p" -} - -mysql_svcname() { - local ebextra= - case "${SVCNAME}" in - mysql*) ;; - *) ebextra=" (mysql)" ;; - esac - echo "${SVCNAME}${ebextra}" -} - -start() { - # Check for old conf.d variables that mean migration was not yet done. - set | egrep -sq '^(mysql_slot_|MYSQL_BLOG_PID_FILE|STOPTIMEOUT)' - rc=$? - # Yes, MYSQL_INIT_I_KNOW_WHAT_I_AM_DOING is a hidden variable. - # It does have a use in testing, as it is possible to build a config file - # that works with both the old and new init scripts simulateously. - if [ "${rc}" = 0 -a -z "${MYSQL_INIT_I_KNOW_WHAT_I_AM_DOING}" ]; then - eerror "You have not updated your conf.d for the new mysql-init-scripts-2 revamp." - eerror "Not proceeding because it may be dangerous." - return 1 - fi - - # Now we can startup - ebegin "Starting $(mysql_svcname)" - - MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}" - - if [ ! -r "${MY_CNF}" ] ; then - eerror "Cannot read the configuration file \`${MY_CNF}'" - return 1 - fi - - # tail -n1 is critical as these we only want the last instance of the option - local basedir=$(get_config "${MY_CNF}" basedir | tail -n1) - local datadir=$(get_config "${MY_CNF}" datadir | tail -n1) - local pidfile=$(get_config "${MY_CNF}" pid-file | tail -n1) - local socket=$(get_config "${MY_CNF}" socket | tail -n1) - - if [ ! -d "${datadir}" ] ; then - eerror "MySQL datadir \`${datadir}' is empty or invalid" - eerror "Please check your config file \`${MY_CNF}'" - return 1 - fi - - if [ ! -d "${datadir}"/mysql ] ; then - eerror "You don't appear to have the mysql database installed yet." - eerror "Please run /usr/bin/mysql_install_db to have this done..." - return 1 - fi - - local piddir="${pidfile%/*}" - checkpath -d --owner mysql:mysql --mode 0755 "$piddir" - rc=$? - if [ $rc -ne 0 ]; then - eerror "Directory $piddir for pidfile does not exist and cannot be created" - return 1 - fi - - local startup_timeout=${STARTUP_TIMEOUT:-900} - local startup_early_timeout=${STARTUP_EARLY_TIMEOUT:-1000} - local tmpnice="${NICE:+"--nicelevel "}${NICE}" - local tmpionice="${IONICE:+"--ionice "}${IONICE}" - start-stop-daemon \ - ${DEBUG:+"--verbose"} \ - --start \ - --exec "${basedir}"/sbin/mysqld \ - --pidfile "${pidfile}" \ - --background \ - --wait ${startup_early_timeout} \ - ${tmpnice} \ - ${tmpionice} \ - -- --defaults-file="${MY_CNF}" ${MY_ARGS} - local ret=$? - if [ ${ret} -ne 0 ] ; then - eend ${ret} - return ${ret} - fi - - ewaitfile ${startup_timeout} "${socket}" - eend $? || return 1 - - save_options pidfile "${pidfile}" - save_options basedir "${basedir}" -} - -stop() { - ebegin "Stopping $(mysql_svcname)" - - local pidfile="$(get_options pidfile)" - local basedir="$(get_options basedir)" - local stop_timeout=${STOP_TIMEOUT:-120} - - start-stop-daemon \ - ${DEBUG:+"--verbose"} \ - --stop \ - --exec "${basedir}"/sbin/mysqld \ - --pidfile "${pidfile}" \ - --retry ${stop_timeout} - eend $? -} -# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet: - diff --git a/dev-db/mysql-init-scripts/files/mysql.conf b/dev-db/mysql-init-scripts/files/mysql.conf deleted file mode 100644 index 74cd5f8..0000000 --- a/dev-db/mysql-init-scripts/files/mysql.conf +++ /dev/null @@ -1 +0,0 @@ -d /var/run/mysqld 0755 mysql mysql - diff --git a/dev-db/mysql-init-scripts/files/mysql.conf.d b/dev-db/mysql-init-scripts/files/mysql.conf.d deleted file mode 100644 index 15ff170..0000000 --- a/dev-db/mysql-init-scripts/files/mysql.conf.d +++ /dev/null @@ -1,80 +0,0 @@ -# Here is where we define which server(s) to start. -# Additional parameters to be passed to mysqld at startup may be added here, -# which will override the ones in "my.cnf". -# -# Below are described some suggested parameters to use. -# The parameters not recognized will be passed through to the mysqld daemon -# directly! -# To avoid starting a server just comment it's definition. -# -# Last but not least, SPACES are NOT allowed inside the parameters! -# -# Parameter : description -# ----------------+----------------------------------------------------------- -# nice : integer [-20 .. 19 ] default 0 -# : change the priority of the server -20 (high) to 19 (low) -# : see "man nice 1" for description -# ----------------+----------------------------------------------------------- -# mycnf : string [full path to my.cnf] -# : specify the path to my.cnf file to be used -# ----------------+----------------------------------------------------------- -# startup_timeout : integer [seconds] default 15 -# : time to wait for mysqld up and running, after this it's -# : marked as failed -# ----------------+----------------------------------------------------------- -# -# Additional parameters -# Parameter : description -# ----------------+----------------------------------------------------------- -# server-id : integer [1 .. 255] -# : Uniquely identifies the server instance in the community -# : of replication partners. -# ----------------+----------------------------------------------------------- -# port : integer [1025 .. 65535] default 3306 -# : Port number to use for connection. -# : Looses any meaning if skip-networking is set. -# ----------------+----------------------------------------------------------- -# skip-networking : NULL -# : Don't allow connection through TCP/IP. -# ----------------+----------------------------------------------------------- -# log-bin : string [name of the binlog files] -# : Log update queries in binary format. Optional (but -# : strongly recommended to avoid replication problems if -# : server's hostname changes) argument should be the chosen -# : location for the binary log files. -# ----------------+----------------------------------------------------------- -# Additionally the following variables are recognized: -# -# Be more verbose, accepts values from 1 to 4 -#DEBUG=4 -# -# The default location for the "master" pid file -#MYSQL_GLOB_PID_FILE="/var/run/svc-started-mysqld" -# -# The timeout for a failed attempt to stop a server -#STOPTIMEOUT=120 -# - -# The parameters are passed in a bash array variable, -# the variable name is mysql_slot_0_[server-num] -# "server-num" is an optional number used to start multiple servers -# -# Examples: -# -# start a default server with default options: -#mysql_slot_0=() -# -# start MySQL reniced, overriding some start parameters -#mysql_slot_0=( -# "nice=-5" -# "server-id=123" -# "log-bin="myhost" -# "port=3307" -#) -# -# start another server, different my.cnf -#mysql_slot_0_1=( -# "mycnf=/home/test/my.cnf" -# "server-id=124" -#) -# diff --git a/dev-db/mysql-init-scripts/files/mysql.rc6 b/dev-db/mysql-init-scripts/files/mysql.rc6 deleted file mode 100644 index 141750c..0000000 --- a/dev-db/mysql-init-scripts/files/mysql.rc6 +++ /dev/null @@ -1,358 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -# external binaries used: which, sed, tac - -# int in_list(char * elem, char * list) -function in_list() { - local elem=${1:-"none"} - local list=${2:-","} - - [[ "${list}" == "${list/,${elem},/}" ]] \ - && return 1 \ - || return 0 -} - -function wdebug() { - if [[ "${DEBUG}" -ge "${1}" ]] ; then - shift - echo "dbg: ${@}" - fi -} - -depend() { - use dns net localmount netmount nfsmount -} - -do_escape() { - # Ihatethisreallyverymuch - #echo "$1" | sed -e "s|'| |" -e "s|=|='|" -e "s|$|'|" - echo "$1" -} - -# int get_slot_config(srv_slot=0, srv_num) -get_slot_config() { - wdebug 4 ">>> get_slot_config()" - - local srv srv_slot srv_num - srv_slot="${1:-"0"}" - srv_num="${2}" - MY_SUFFIX="-${srv_slot}" - # srv=array(0 => [srv_slot], 1 => [srv_num] ) - srv=( ${srv_slot} ${srv_num} ) - - local tmp_eval="mysql_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]" - local conf_d_parameters="${!tmp_eval}" - if [[ "${srv_slot}" == "0" ]] ; then - MY_SUFFIX='' - # try some other default for the default server - [[ -z "${conf_d_parameters[@]}" ]] && conf_d_parameters=${mysql_slot[@]} - fi - [[ -z "${conf_d_parameters[@]}" ]] && conf_d_parameters=( ) - basedir="" datadir="" pidfile="" socket="" - CHROOT="" NICE="" STARTUPTIMEOUT=5 STOPTIMEOUT=120 - - wdebug 3 "srv ${srv[@]}" - wdebug 3 "srv_slot ${srv_slot}" - wdebug 3 "srv_num ${srv_num}" - wdebug 3 "tmp_eval ${tmp_eval}" - wdebug 3 "conf_d_parameters ${conf_d_parameters[@]}" - wdebug 3 "MY_SUFFIX ${MY_SUFFIX}" - - local tmp_eval="mysql_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]" - local conf_d_parameters="${!tmp_eval}" - # collations need to be defined *after* the character sets, - # so we will duplicate them - local collations="" - [[ ${conf_d_parameters[*]} == '()' ]] && conf_d_parameters='' - - MY_CNF="/etc/mysql${MY_SUFFIX}/my.cnf" - # summa of unmanaged parameters - # some parameters may be present multiple times - unmanagedparams="" - - # grab the parameters from conf.d/mysql definition - for my_default in ${conf_d_parameters[*]} ; do - case "${my_default}" in - nice=*) - NICE="${my_default#nice=}" - nice -n $NICE ls /tmp &>/dev/null || NICE="" - ;; - mycnf=*) MY_CNF="${my_default#mycnf=}" ;; - startup_timeout=*) - STARTUPTIMEOUT="${my_default#startup_timeout=}" ;; - basedir=*) basedir="${my_default#basedir=}" ;; - datadir=*) datadir="${my_default#datadir=}" ;; - pid-file=*) pidfile="${my_default#pid-file=}" ;; - socket=*) socket="${my_default#socket=}" ;; - *collation*=) - collations="${collations} --$( do_escape "${my_default}" )" - ;; - *=*) - # list of parameters we already have - # prepend "--" because my_print_defaults do it - unmanagedparams="${unmanagedparams} --$( do_escape "${my_default}" )" - ;; - *) - unmanagedparams="${unmanagedparams} --${my_default}" - ;; - esac - done - - if [[ ! -r "${MY_CNF}" ]] ; then - ewarn "Cannot access ${MY_CNF} !" - MY_CNF="" - my_defaults="" - else - local my_print_defaults="$(which my_print_defaults${MY_SUFFIX} 2>/dev/null)" - if [[ ! -x "${my_print_defaults}" ]] ; then - eerror "my_print_defaults NOT found or not executable" - my_defaults="" - else - my_defaults=$( ${my_print_defaults} \ - --loose-verbose \ - --config-file="${MY_CNF}" \ - mysqld server ) - fi - fi - - # grab needed parameters from my.cnf, don't override the ones from - # conf.d/mysql - for my_default in ${my_defaults} ; do - case "${my_default}" in - --basedir=*) - [[ -z "${basedir}" ]] && basedir="${my_default#--basedir=}" ;; - --datadir=*) - [[ -z "${datadir}" ]] && datadir="${my_default#--datadir=}" ;; - --pid-file=*) - [[ -z "${pidfile}" ]] && pidfile="${my_default#--pid-file=}" ;; - --socket=*) - [[ -z "${socket}" ]] && socket="${my_default#--socket=}" ;; - --*collation*=) - # the order is inversed because we want the conf.d ones overriden - collations="$( do_escape "${my_default}" ) ${collations}" - ;; - esac - done - - # some parameters - basedir="${basedir:-"/usr"}" - datadir="${datadir:-"/var/lib/mysql${MY_SUFFIX}"}" - pidfile="${pidfile:-"/var/run/mysqld/mysqld${MY_SUFFIX}.pid"}" - socket="${socket:-"/var/run/mysqld/mysqld${MY_SUFFIX}.sock"}" - unmanagedparams="${unmanagedparams} ${collations}" - - wdebug 3 "chroot dir => ${CHROOT}" - wdebug 3 "niceness => ${NICE}" - wdebug 3 "basedir => ${basedir}" - wdebug 3 "datadir => ${datadir}" - wdebug 3 "pidfile => ${pidfile}" - wdebug 3 "socket => ${socket}" - wdebug 3 "Unamanged => ${unmanagedparams}" - - # extension for sleep tenth of seconds, not very portable so check it before - if sleep 0.01 ; then - STARTUPTIMEOUT=$(( STARTUPTIMEOUT * 10 )) - STOPTIMEOUT=$(( STOPTIMEOUT * 10 )) - TIMEUNIT=0.1 - else - TIMEUNIT=1 - fi - - # push these out to the script - export MY_SUFFIX NICE MY_CNF pidfile datadir basedir socket CHROOT - export unmanagedparams STARTUPTIMEOUT STOPTIMEOUT TIMEUNIT - wdebug 4 "<<< get_slot_config() ok" - return 0 -} - -checkconfig() { - wdebug 4 ">>> checkconfig(\"${1}\")" - local datadir="${1}" pidfile="${2}" socket="${3}" - - if [[ -n "${NOCHECK}" ]] ; then - rm -f "${pidfile}" "${socket}" - return 0 - fi - - if [[ ! -d "${datadir}" ]] ; then - eerror "MySQL datadir is empty or invalid" - eerror "Please check your my.cnf : ${MY_CNF}" - wdebug 4 "<<< checkconfig() KO" - return 1 - fi - - if [[ ! -d "${datadir}/mysql" ]] ; then - eerror "You don't appear to have the mysql database installed yet." - eerror "Please run /usr/bin/mysql_install_db to have this done..." - wdebug 4 "<<< checkconfig() KO" - return 1 - fi - - if [[ -f "${pidfile}" ]] ; then - kill -15 $(< ${pidfile}) 2>/dev/null - if [[ $? -eq 0 ]] ; then - # the process exist, we have a problem - eerror "\"${pidfile}\" is still present and the process is running." - eerror "Please stop it \"kill $(< ${pidfile})\" maybe ?" - wdebug 4 "<<< checkconfig() KO" - return 1 - else - rm -f "${pidfile}" - fi - fi - - if [[ -S "${socket}" ]] ; then - ewarn "Strange, the socket file already exist in \"${socket}\"" - ewarn "it will be removed now and re-created by the MySQL server" - ewarn "BUT please make your checks." - rm -f "${socket}" - fi - - wdebug 4 "<<< checkconfig() ok" - return 0 -} - -start() { - wdebug 4 ">>> start()" - - MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME/mysql/mysqld}"} - # servers are defined in /etc/conf.d/mysql - local serverlist=${!mysql_slot_*} - # provide default for empty conf.d/mysql - if [[ -z "${serverlist}" ]] ; then - serverlist=0 - export mysql_slot_0=( ) - fi - local retstatus timeout - local globretstatus=1 - local srv_slot srv_num - # server MUST NOT share same location for these - local pidfilelist=',' datadirlist=',' socketlist=',' - local ssd_thing=1 - local mysqld_thing tmpnice - - ebegin "Starting ${myservice}" - # try to start each server - for srv in ${serverlist[*]} ; do - - srv_slot="${srv#mysql_slot_}" - if [[ "${srv_slot}" == "${srv_slot#*_}" ]] ; then - srv_num='' - else - srv_num="${srv_slot#*_}" - fi - srv_slot="${srv_slot%%_*}" - - retstatus=0 - get_slot_config "${srv_slot}" "${srv_num}" || retstatus=1 - - # checks - if ! checkconfig "${datadir}" "${pidfile}" "${socket}" ; then - retstatus=2 ; continue - fi - if in_list "${pidfile}" "${pidfilelist}" ; then - eerror "Sorry, won't start with same pid-file: ${pidfile}" - retstatus=3 ; continue - fi - if in_list "${datadir}" "${datadirlist}" ; then - eerror "Sorry, won't start with same datadir: ${datadir}" - retstatus=4 ; continue - fi - if in_list "${socket}" "${socketlist}" ; then - eerror "Sorry, won't start with same socket: ${socket}" - retstatus=5 ; continue - fi - - einfo "Starting ${myservice} (${MY_CNF})" - - mysqld_thing="${MY_CNF:+"--defaults-file="}${MY_CNF}" - mysqld_thing="${mysqld_thing} ${unmanagedparams}" - mysqld_thing="${mysqld_thing} --basedir=${basedir}" - mysqld_thing="${mysqld_thing} --datadir=${datadir}" - mysqld_thing="${mysqld_thing} --pid-file=${pidfile}" - mysqld_thing="${mysqld_thing} --socket=${socket}" - - wdebug 2 "starting mysqld with: ${mysqld_thing}" - - if [[ ${ssd_thing} -eq 1 ]] ; then - tmpnice="${NICE:+"--nicelevel "}${NICE}" - start-stop-daemon --quiet ${DEBUG/*/"--verbose"} --start \ - --background ${tmpnice} --pidfile ${pidfile} \ - --exec ${basedir}/sbin/mysqld${MY_SUFFIX} -- ${mysqld_thing} \ - && sleep ${TIMEUNIT} - retstatus=$? - else - tmpnice="${NICE:+"nice -n "}${NICE}" - ${tmpnice} ${basedir}/sbin/mysqld${MY_SUFFIX} ${mysqld_thing} & - retstatus=0 - fi - - # only the first run is done by start-stop-daemon - ssd_thing="" - - # wait for socket creation - wdebug 1 - while ! [[ -S "${socket}" || "${STARTUPTIMEOUT}" -lt 1 || "${retstatus}" -ne 0 ]] ; do - STARTUPTIMEOUT=$(( STARTUPTIMEOUT - 1 )) - [[ ${DEBUG} -ge 1 ]] && echo -n "${STARTUPTIMEOUT}," - sleep ${TIMEUNIT} - done - wdebug 1 "" - if [[ ! -S "${socket}" ]] ; then - eerror "MySQL${MY_SUFFIX} NOT started (${retstatus})" - retstatus=1 - else - globretstatus=0 - pidfilelist="${pidfilelist}${pidfile}," - datadirlist="${datadirlist}${datadir}," - socketlist="${socketlist}${socket}," - echo "${srv_slot}${srv_num:+"_"}${srv_num}=${pidfile}" >> "${MYSQL_GLOB_PID_FILE}" - fi - done - # successfull if at least one mysqld started - wdebug 4 "<<< start()" - eend $globretstatus -} - -stop() { - get_slot_config &> /dev/null - MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME/mysql/mysqld}"} - local runwhat pidfile shutdown_elem - local PID cnt timeout=${STOPTIMEOUT:-"120"} - local retstatus=0 - local shutdown_list="$(< "${MYSQL_GLOB_PID_FILE}" )" - - ebegin "Stopping ${myservice}" - wdebug 5 "MYSQL_GLOB_PID_FILE: ${MYSQL_GLOB_PID_FILE}" - wdebug 5 "shutdown_list: ${shutdown_list}" - for shutdown_elem in ${shutdown_list} ; do - runwhat=${shutdown_elem%%=*} - pidfile=${shutdown_elem#*=} - timeout=${STOPTIMEOUT:-"120"} - PID=$(< "${pidfile}" ) - wdebug 3 "runwhat ${runwhat}" - wdebug 3 "pidfile ${pidfile}" - wdebug 3 "timeout ${timeout}" - wdebug 3 "PID ${PID}" - - einfo "Stopping mysqld (${runwhat})" - - start-stop-daemon --quiet ${DEBUG/*/"--verbose"} --stop --pidfile "${pidfile}" & - wdebug 1 "" - while [[ -n "$PID" ]] \ - && $( ps -Ao pid | grep -q "^ *$PID$" ) \ - && [[ "${timeout}" -ge 1 ]] - do - timeout=$(($timeout - 1)) - [[ ${DEBUG} -ge 1 ]] && echo -n "$(( $STOPTIMEOUT - $timeout ))," - sleep ${TIMEUNIT} - done - [[ "${timeout}" -lt 1 ]] && retstatus=1 - done - sleep ${TIMEUNIT} - [[ "$retstatus" -eq 0 ]] && rm -f "$MYSQL_GLOB_PID_FILE" - eend ${retstatus} -} diff --git a/dev-db/mysql-init-scripts/files/mysqld-wait-ready b/dev-db/mysql-init-scripts/files/mysqld-wait-ready deleted file mode 100644 index 9e5d3e4..0000000 --- a/dev-db/mysql-init-scripts/files/mysqld-wait-ready +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -# This script waits for mysqld to be ready to accept connections -# (which can be many seconds or even minutes after launch, if there's -# a lot of crash-recovery work to do). -# Running this as ExecStartPost is useful so that services declared as -# "After mysqld" won't be started until the database is really ready. - -# Service file passes us the daemon's PID (actually, mysqld_safe's PID) -daemon_pid="$1" - -# extract value of a MySQL option from config files -# Usage: get_mysql_option SECTION VARNAME DEFAULT -# result is returned in $result -# We use my_print_defaults which prints all options from multiple files, -# with the more specific ones later; hence take the last match. -get_mysql_option(){ - result=`/usr/bin/my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1` - if [ -z "$result" ]; then - # not found, use default - result="$3" - fi -} - -# Defaults here had better match what mysqld_safe will default to -get_mysql_option mysqld datadir "/var/lib/mysql" -datadir="$result" -get_mysql_option mysqld socket "/var/lib/mysql/mysql.sock" -socketfile="$result" - -# Wait for the server to come up or for the mysqld process to disappear -ret=0 -while /bin/true; do - RESPONSE=`/usr/bin/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` - mret=$? - if [ $mret -eq 0 ]; then - break - fi - # exit codes 1, 11 (EXIT_CANNOT_CONNECT_TO_SERVICE) are expected, - # anything else suggests a configuration error - if [ $mret -ne 1 -a $mret -ne 11 ]; then - ret=1 - break - fi - # "Access denied" also means the server is alive - echo "$RESPONSE" | grep -q "Access denied for user" && break - - # Check process still exists - if ! /bin/kill -0 $daemon_pid 2>/dev/null; then - ret=1 - break - fi - sleep 1 -done - -exit $ret diff --git a/dev-db/mysql-init-scripts/files/mysqld.service b/dev-db/mysql-init-scripts/files/mysqld.service deleted file mode 100644 index de9ea2f..0000000 --- a/dev-db/mysql-init-scripts/files/mysqld.service +++ /dev/null @@ -1,26 +0,0 @@ -[Unit] -Description=MySQL database server -After=syslog.target -After=network.target - -[Service] -Type=simple -User=mysql -Group=mysql - -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# https://bugzilla.redhat.com/show_bug.cgi?id=547485 -ExecStart=/usr/bin/mysqld_safe --basedir=/usr -ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# We rely on systemd, not mysqld_safe, to restart mysqld if it dies -Restart=always - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/dev-db/mysql-init-scripts/files/mysqld_at.service b/dev-db/mysql-init-scripts/files/mysqld_at.service deleted file mode 100644 index f46cf9e..0000000 --- a/dev-db/mysql-init-scripts/files/mysqld_at.service +++ /dev/null @@ -1,26 +0,0 @@ -[Unit] -Description=MySQL database server -ConditionPathExists=/etc/mysql/my%I.cnf -After=network.target - -[Service] -Type=simple -User=mysql -Group=mysql - -# Note: we set --basedir to prevent probes that might trigger SELinux alarms, -# https://bugzilla.redhat.com/show_bug.cgi?id=547485 -ExecStart=/usr/bin/mysqld_safe --defaults-file=/etc/mysql/my%I.cnf --basedir=/usr -ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# We rely on systemd, not mysqld_safe, to restart mysqld if it dies -Restart=always - -# Place temp files in a secure directory, not /tmp -PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/dev-db/mysql-init-scripts/files/mysqlmanager.conf.d b/dev-db/mysql-init-scripts/files/mysqlmanager.conf.d deleted file mode 100644 index 8666f71..0000000 --- a/dev-db/mysql-init-scripts/files/mysqlmanager.conf.d +++ /dev/null @@ -1,28 +0,0 @@ -# Here is where we define which server(s) to start. -# Additional parameters to be passed to mysqlmanager at startup may be added here, -# which will override the ones in "my.cnf". -# -# To avoid starting a server just comment it's definition -# here or it will rant (no default start). -# Last but not least, spaces are NOT allowed inside the parameters! -# -# Below are described some suggested parameters to use. -# The parameters not recognized will be passed through to the mysqlmanager directly. -# -# Parameter : description - -# ----------------+----------------------------------------------------------- -# mycnf : string [full path to my.cnf] -# : specify the path to my.cnf file to be used -# : may contain a [manager] section -# ----------------+----------------------------------------------------------- -# -# Basic default -# -#mysqlmanager_slot_0=() -# -# Start MySQL 5.0.X overriding the my.cnf path -#mysqlmanager_slot_500=( -# "mycnf=/home/test/my.cnf" -#) -# diff --git a/dev-db/mysql-init-scripts/files/mysqlmanager.rc6 b/dev-db/mysql-init-scripts/files/mysqlmanager.rc6 deleted file mode 100644 index 4462a8a..0000000 --- a/dev-db/mysql-init-scripts/files/mysqlmanager.rc6 +++ /dev/null @@ -1,230 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -# external binaries used: which, sed, tac - -depend() { - use dns net localmount netmount nfsmount - #provide mysql -} - -# int in_list(char * elem, char * list) -function in_list() { - local elem=${1:-"none"} - local list=${2:-","} - - [[ "${list}" == "${list/,${elem},/}" ]] \ - && return 1 \ - || return 0 -} - -do_escape() { - # Ihatethisreallyverymuch - #echo "$1" | sed -e "s|'| |" -e "s|=|='|" -e "s|$|'|" - echo "$1" -} - -# int get_slot_config(srv_slot=0, srv_num) -get_slot_config() { - [[ ${DEBUG} -ge 4 ]] && einfo ">>> get_slot_config(\"${1}\", \"${2}\")" - - srv_slot="${1:-"0"}" - srv_num="${2}" - MY_SUFFIX="-${srv_slot}" - [[ "${MY_SUFFIX}" == '-0' ]] && MY_SUFFIX='' - - basedir="" pidfile="" socket="" - - local tmp_eval="mysqlmanager_slot_${srv_slot}${srv_num:+"_"}${srv_num}[@]" - local conf_d_parameters="${!tmp_eval}" - [[ ${conf_d_parameters[*]} == '()' ]] && conf_d_parameters='' - - MY_CNF="/etc/mysql${MY_SUFFIX}/my.cnf" - # summa of unmanaged parameters - # some parameters may be present multiple times - unmanagedparams="" - - # grab the parameters from conf.d/mysql definition - for my_default in ${conf_d_parameters[*]} ; do - case "${my_default}" in - mycnf=*) MY_CNF="${my_default#mycnf=}" ;; - basedir=*) basedir="${my_default#basedir=}" ;; - pid-file=*) pidfile="${my_default#pid-file=}" ;; - socket=*) socket="${my_default#socket=}" ;; - *=*) - # list of parameters we already have - # prepend "--" because my_print_defaults do it - unmanagedparams="${unmanagedparams} --$( do_escape "${my_default}" )" - ;; - *) - unmanagedparams="${unmanagedparams} --${my_default}" - ;; - esac - done - - if [[ ! -r "${MY_CNF}" ]] ; then - ewarn "Cannot access ${MY_CNF} !" - MY_CNF="" - my_defaults="" - else - local my_print_defaults="$(which my_print_defaults${MY_SUFFIX} 2>/dev/null)" - if [[ ! -x "${my_print_defaults}" ]] ; then - eerror "my_print_defaults NOT found or not executable" - my_defaults="" - else - my_defaults=$( ${my_print_defaults} \ - --loose-verbose \ - --config-file="${MY_CNF}" \ - manager ) - fi - fi - - # grab needed parameters from my.cnf, don't override the ones from - # conf.d/mysql - for my_default in ${my_defaults} ; do - case "${my_default}" in - --pid-file=*) - [[ -z "${pidfile}" ]] && pidfile="${my_default#--pid-file=}" ;; - --socket=*) - [[ -z "${socket}" ]] && socket="${my_default#--socket=}" ;; - esac - done - - # still empty, I'm in doubt if assign a default or break, will see - basedir="${basedir:-"/usr"}" - pidfile="${pidfile:-"/var/run/mysqld/mysqlmanager${MY_SUFFIX}.pid"}" - socket="${socket:-"/var/run/mysqld/mysqlmanager${MY_SUFFIX}.sock"}" - - if [[ ${DEBUG} -ge 3 ]] ; then - einfo "basedir => ${basedir}" - einfo "pidfile => ${pidfile}" - einfo "socket => ${socket}" - einfo "Unamanged => ${unmanagedparams}" - fi - - # push these out to the script - export MY_SUFFIX MY_CNF pidfile basedir socket - export unmanagedparams - [[ ${DEBUG} -ge 4 ]] && einfo "<<< get_slot_config() ok" - return 0 -} - -start() { - [[ ${DEBUG} -ge 4 ]] && einfo ">>> start()" - MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME}"} - # servers are defined in /etc/conf.d/mysql - local serverlist=${!mysqlmanager_slot_*} - # provide default for empty conf.d/mysql - if [[ -z "${serverlist}" ]] ; then - serverlist=0 - export mysqlmanager_slot_0=() - fi - local retstatus timeout - local globretstatus=1 - local srv_slot srv_num - # server MUST NOT share same location for these - local pidfilelist=',' socketlist=',' - - # additional security - rm -f "${MYSQL_GLOB_PID_FILE}" ; touch "${MYSQL_GLOB_PID_FILE}" - if [[ $? -ne 0 ]] ; then - eerror "cannot create MYSQL_GLOB_PID_FILE: ${MYSQL_GLOB_PID_FILE}" - [[ ${DEBUG} -ge 4 ]] && einfo "<<< start() KO" - return 1 - fi - - ebegin - # try to start each server - for srv in ${serverlist[*]} ; do - einfo "working on ${srv}" - - srv_slot="${srv#mysqlmanager_slot_}" - if [[ "${srv_slot}" == "${srv_slot#*_}" ]] ; then - srv_num='' - else - srv_num="${srv_slot#*_}" - fi - srv_slot="${srv_slot%%_*}" - - retstatus=0 - get_slot_config "${srv_slot}" "${srv_num}" || retstatus=1 - - # timeout (seconds) before declaring the startup failed - - # pre_run checks - if [[ "$retstatus" -eq 0 ]] ; then - if in_list "${pidfile}" "${pidfilelist}" ; then - retstatus=3 - eerror "Sorry, won't start with same pid-file: ${pidfile}" - fi - if in_list "${socket}" "${socketlist}" ; then - retstatus=5 - eerror "Sorry, won't start with same socket: ${socket}" - fi - fi - - if [[ $retstatus -eq 0 ]] ; then - # additional security - rm -f ${pidfile} ${socket} - einfo "Starting mysqlmanager${MY_SUFFIX:+"_"}${srv_slot}${srv_num:+"_"}${srv_num} (${MY_CNF})" - - [[ ${DEBUG} -ge 2 ]] && echo "starting mysqlmanager with: "${basedir}/sbin/mysqlmanager${MY_SUFFIX} ${unmanagedparams} --pid-file=${pidfile} --socket=${socket} - - start-stop-daemon --quiet --start --background \ - --pidfile "${pidfile}" \ - --exec ${basedir}/sbin/mysqlmanager${MY_SUFFIX} \ - -- \ - ${MY_CNF:+"--defaults-file="}${MY_CNF} \ - ${unmanagedparams} \ - --pid-file=${pidfile} \ - --socket=${socket} - - retstatus=$? - - if [[ "${retstatus}" -eq 0 ]] ; then - pidfilelist="${pidfilelist}${pidfile}," - socketlist="${socketlist}${socket}," - globretstatus=0 - echo "${srv_slot}${srv_num:+"_"}${srv_num}=${pidfile}" >> "${MYSQL_GLOB_PID_FILE}" - fi - fi - done - # successfull if at least one mysqlmanager started - [[ ${DEBUG} -ge 4 ]] && einfo "<<< start()" - eend $globretstatus -} - -stop () { - MYSQL_GLOB_PID_FILE=${MYSQL_GLOB_PID_FILE:-"/var/run/svc-started-${SVCNAME}"} - local runwhat pidfile shutdown_elem - local PID cnt timeout - local retstatus=0 - local shutdown_list="$(< "${MYSQL_GLOB_PID_FILE}" )" - - # shutdown in reverse order - ebegin - for shutdown_elem in $shutdown_list; do - runwhat=${shutdown_elem%%=*} - pidfile=${shutdown_elem#*=} - timeout=${STOPTIMEOUT:-"10"} - - einfo "Stopping mysqlmanager (${runwhat})" - - PID=$(cat "${pidfile}" 2>/dev/null) - start-stop-daemon --stop --quiet --pidfile="${pidfile}" - [[ ${DEBUG} -ge 1 ]] && echo "" - while [[ -n "$PID" && $( kill -0 $PID 2>/dev/null ) && "${timeout}" -ge 1 ]] ; do - timeout=$(($timeout - 1)) - [[ ${DEBUG} -ge 1 ]] && echo -n $(( $STOPTIMEOUT - $timeout )) - sleep 1 - done - if [[ "${timeout}" -lt 1 ]] ; then - retstatus=$(( $retstatus + 1 )) - fi - done - - [[ "$retstatus" -eq 0 ]] && rm -f "$MYSQL_GLOB_PID_FILE" - eend $retstatus -} diff --git a/dev-db/mysql-init-scripts/files/run-s6 b/dev-db/mysql-init-scripts/files/run-s6 deleted file mode 100644 index e493a7b..0000000 --- a/dev-db/mysql-init-scripts/files/run-s6 +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -if [ -e ./env ] ; then source ./env ; else echo "failed to source env" ; fi -exec "${basedir}/sbin/mysqld" --defaults-file="${MY_CNF}" ${MY_ARGS} 2>&1 diff --git a/dev-db/mysql-init-scripts/metadata.xml b/dev-db/mysql-init-scripts/metadata.xml deleted file mode 100644 index 357d7d0..0000000 --- a/dev-db/mysql-init-scripts/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>mysql-bugs@gentoo.org</email> - <name>MySQL</name> - </maintainer> -</pkgmetadata> diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-1.2.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-1.2.ebuild deleted file mode 100644 index 16d06a4..0000000 --- a/dev-db/mysql-init-scripts/mysql-init-scripts-1.2.ebuild +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -DESCRIPTION="Gentoo MySQL init scripts." -HOMEPAGE="https://www.gentoo.org/" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" -IUSE="" - -DEPEND="" -RDEPEND="" - -src_install() { - newconfd "${FILESDIR}/mysql.conf.d" "mysql" - newconfd "${FILESDIR}/mysqlmanager.conf.d" "mysqlmanager" - - newinitd "${FILESDIR}/mysql.rc6" "mysql" - newinitd "${FILESDIR}/mysqlmanager.rc6" "mysqlmanager" - - insinto /etc/logrotate.d - newins "${FILESDIR}/logrotate.mysql" "mysql" -} diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.0.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.0.ebuild deleted file mode 100644 index b00c4a2..0000000 --- a/dev-db/mysql-init-scripts/mysql-init-scripts-2.0.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit systemd - -DESCRIPTION="Gentoo MySQL init scripts." -HOMEPAGE="https://www.gentoo.org/" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="" - -DEPEND="" -# This _will_ break with MySQL 5.0, 4.x, 3.x -# It also NEEDS openrc for the save_options/get_options builtins. -RDEPEND="!<dev-db/mysql-5.1" -# Need to set S due to PMS saying we need it existing, but no SRC_URI -S=${WORKDIR} - -src_install() { - newconfd "${FILESDIR}/conf.d-${PV}" "mysql" - newinitd "${FILESDIR}/init.d-${PV}" "mysql" - - # systemd unit installation - exeinto /usr/libexec - doexe "${FILESDIR}"/mysqld-wait-ready - systemd_dounit "${FILESDIR}/mysqld.service" - systemd_newunit "${FILESDIR}/mysqld_at.service" "mysqld@.service" - systemd_dotmpfilesd "${FILESDIR}/mysql.conf" - - insinto /etc/logrotate.d - newins "${FILESDIR}/logrotate.mysql" "mysql" -} - -pkg_postinst() { - grep -sq mysql_slot "${ROOT}"/etc/conf.d/mysql - old_conf_present=$? - grep -sq get_slot_config "${ROOT}"/etc/init.d/mysql - old_init_present=$? - - egrep -sq 'MY_CNF|MY_ARGS|(STARTUP|STOP)_TIMEOUT' "${ROOT}"/etc/conf.d/mysql - new_conf_present=$? - egrep -sq 'MY_ARGS|STOP_TIMEOUT' "${ROOT}"/etc/init.d/mysql - new_init_present=$? - - einfo "Please note that if you are using multiple internal 'slots' in the" - einfo "old conf.d file, you should use multiple init files now." - echo old $old_conf_present $old_init_present - echo new $new_conf_present $new_init_present - - # new scripts present - if [ $new_conf_present -eq 0 -a $new_init_present -eq 0 -a \ - $old_conf_present -eq 1 -a $old_init_present -eq 1 ]; then - : - elif [ $old_conf_present -eq 0 -a $old_init_present -eq 0 -a \ - $new_conf_present -eq 1 -a $new_init_present -eq 1 ]; then - ewarn "Old /etc/init.d/mysql and /etc/conf.d/mysql still present!" - ewarn "Update both of those files to the new versions!" - else - eerror "DANGER, mixed update of /etc/init.d/mysql and /etc/conf.d/mysql" - eerror "detected! You must update BOTH to the new versions" - fi -} diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1.ebuild deleted file mode 100644 index 6cb7d8f..0000000 --- a/dev-db/mysql-init-scripts/mysql-init-scripts-2.0_pre1.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -DESCRIPTION="Gentoo MySQL init scripts." -HOMEPAGE="https://www.gentoo.org/" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="" - -DEPEND="" -# This _will_ break with MySQL 5.0, 4.x, 3.x -# It also NEEDS openrc. -RDEPEND="!<dev-db/mysql-5.1 sys-apps/openrc" - -src_install() { - newconfd "${FILESDIR}/mysql-5.1.53-conf.d" "mysql" - newinitd "${FILESDIR}/mysql-5.1.53-init.d" "mysql" - - insinto /etc/logrotate.d - newins "${FILESDIR}/logrotate.mysql" "mysql" -} diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild deleted file mode 100644 index e2761b1..0000000 --- a/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit systemd s6 - -DESCRIPTION="Gentoo MySQL init scripts." -HOMEPAGE="https://www.gentoo.org/" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" -IUSE="" - -DEPEND="" -# This _will_ break with MySQL 5.0, 4.x, 3.x -# It also NEEDS openrc for the save_options/get_options builtins. -# The s6 support was added after openrc 0.16.2 -RDEPEND=" - !<dev-db/mysql-5.1 - !<sys-apps/openrc-0.16.2 - " -# Need to set S due to PMS saying we need it existing, but no SRC_URI -S=${WORKDIR} - -src_install() { - newconfd "${FILESDIR}/conf.d-2.0" "mysql" - - # s6 init scripts - if use amd64 || use x86 ; then - newconfd "${FILESDIR}/conf.d-2.0" "mysql-s6" - newinitd "${FILESDIR}/init.d-s6" "mysql-s6" - s6_install_service mysql "${FILESDIR}/run-s6" - s6_install_service mysql/log "${FILESDIR}/log-s6" - fi - - newinitd "${FILESDIR}/init.d-2.0" "mysql" - - # systemd unit installation - exeinto /usr/libexec - doexe "${FILESDIR}"/mysqld-wait-ready - systemd_dounit "${FILESDIR}/mysqld.service" - systemd_newunit "${FILESDIR}/mysqld_at.service" "mysqld@.service" - systemd_dotmpfilesd "${FILESDIR}/mysql.conf" - - insinto /etc/logrotate.d - newins "${FILESDIR}/logrotate.mysql" "mysql" -} - -pkg_postinst() { - if use amd64 || use x86 ; then - elog "To use the mysql-s6 script, you need to install the optional sys-apps/s6 package." - elog "If you wish to use s6 logging support, comment out the log-error setting in your my.cnf" - fi -} diff --git a/dev-db/mysql-utilities/ChangeLog b/dev-db/mysql-utilities/ChangeLog deleted file mode 100644 index 7b097de..0000000 --- a/dev-db/mysql-utilities/ChangeLog +++ /dev/null @@ -1,11 +0,0 @@ -*mysql-utilities-1.5.6 (24 Feb 2016) - - 24 Feb 2016; Brian Evans <grknight@gentoo.org> +mysql-utilities-1.5.6.ebuild, - mysql-utilities-1.5.4.ebuild: - dev-db/mysql-utilities: Version bump with new EAPI - -*mysql-utilities-1.5.4 (01 Apr 2015) - - 01 Apr 2015; Brian Evans <grknight@gentoo.org> +metadata.xml, - +mysql-utilities-1.5.4.ebuild: - Initial commit of mysql-utilities to test modifications diff --git a/dev-db/mysql-utilities/Manifest b/dev-db/mysql-utilities/Manifest deleted file mode 100644 index de93ea8..0000000 --- a/dev-db/mysql-utilities/Manifest +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -DIST mysql-utilities-1.5.4.tar.gz 760812 SHA256 4e50251c3f08920112420f209418accf55a376df4dac619f3054a25f97bbbf41 SHA512 c8069cd7e3fe77a7c1ddc85e2438665ab6b3da0add7384d36e317f04b9fe973d16495f474d8ab66ceb185cf73eb396351c7fcb934fba9bd0297ac58727437482 WHIRLPOOL 69729753b83305e13ef91cac45d56ced1b25cef9d0d1d6342242bfd566f135546dc303ef3addb6138963472dcbf1ae49c629aca43d13a4226c837153b32dde9b -DIST mysql-utilities-1.5.6.tar.gz 781556 SHA256 578a993b5d878b7df30cf81ec0be1b9551322ed7e42fcdc3d08ab2b12dfdf2d2 SHA512 e079f769b598351d60bd1dc8d6422e31d9d4b7c1f381532ea0ed8d3beeea3c7027a716da6c2da96032636b2b19caaeaa5d55a128616ec1462039b9c890a4b636 WHIRLPOOL 6c0fd3772bde01684f738f2e92d61765c720789a3dee30d721b3d3f4d98d71579981646cec0e250f64f9b365f3ebe2fdab86e1941530d89760b946f935699f59 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.1 - -iQJ8BAEBCABmBQJWzgc4XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w -ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NkMyRTQ0RUQ5MEUzMjc1OEU3RDU1QzBE -MUY3ODFFRkY5RjRBM0I2AAoJENH3ge/59KO26j8P/jb5iKy01fyBXzh6I5bCF72V -3NHdnU9DCPjIHsHVrISJrfH/Sxg7Sm36/jwIeMm9X1dGxNi/oBA46mgE1VRUleY5 -YB0qKeRXydcOFKyf44h1KxO3bjhYiEqpiMHs5GMaqku+budvBAhsyJn61f5XDvv2 -X8kooGefCfohpfHV25seD3kRVuJNCK2ZARzRNDuHSkVuZRQ1XrIIlyQLmDSFNGcQ -LIdOOTUVRKoC9uF0Pl/6jW3ByOx9/9C9jyDo3OCM98aXkWcYUnmVKYS5zF7Zx8GM -ekPRSD8BLvaAVIQ+zypn+OQ747o2o6lG2bMZPJnL2DD3I2gy0JwvNGV0jaGXcTUc -f0ZUxdmXVMwsk9hw8t/JKrTvc884RMNiGxdYivOK4Lb5WH+IZWh6nbjExXF/TItF -6SBQ2indb9pCvUlE8LXjDyPiF7TXrsLfOhuMpxBZXt8FxRQusKE8xrlZHjdRmQRe -FXnlEX4xvYTeBRFEWpQBEfQjDPQDN0gXPwzUge6T3OTk9ou9ZCi6mfSM5PNY5ZNE -zowQiHxvQWxDECnz1/FzyWHna5bq9ZFtlPd/8bPs60a20fokSjQfhrQcPF56si2Q -7vnHhZSkpRGgAvXlj2d8yWVTXUWp5LS83+km7sexhfc9t2l88DDp44iX4CkhkE7p -ya+mmws+iYM8y6hv4vAG -=RQd1 ------END PGP SIGNATURE----- diff --git a/dev-db/mysql-utilities/metadata.xml b/dev-db/mysql-utilities/metadata.xml deleted file mode 100644 index 41ea3d1..0000000 --- a/dev-db/mysql-utilities/metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="person"> - <email>grknight@gentoo.org</email> - <name>Brian Evans</name> -</maintainer> -<maintainer type="project"> - <email>mysql-bugs@gentoo.org</email> - <name>MySQL</name> -</maintainer> -</pkgmetadata> diff --git a/dev-db/mysql-utilities/mysql-utilities-1.5.4.ebuild b/dev-db/mysql-utilities/mysql-utilities-1.5.4.ebuild deleted file mode 100644 index 905a343..0000000 --- a/dev-db/mysql-utilities/mysql-utilities-1.5.4.ebuild +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -PYTHON_COMPAT=( python2_7 ) -inherit eutils distutils-r1 multilib - -DESCRIPTION="Set of command-line utilities for common MySQL tasks" -HOMEPAGE="http://dev.mysql.com/doc/mysql-utilities/" -SRC_URI="mirror://mysql/Downloads/MySQLGUITools/${P}.tar.gz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -IUSE="" - -DEPEND="dev-python/mysql-connector-python[${PYTHON_USEDEP}]" -RDEPEND="${DEPEND}" - -src_prepare() { - # conflicts with dev-python/mysql-connector-python - rm -r "${S}/mysql/connector" || die -} - -python_install() { - distutils-r1_python_install - # Remove another collision - rm "${D}usr/$(get_libdir)/${EPYTHON}/site-packages/mysql/__init__.py" || die -} diff --git a/dev-db/mysql-utilities/mysql-utilities-1.5.6.ebuild b/dev-db/mysql-utilities/mysql-utilities-1.5.6.ebuild deleted file mode 100644 index 71eed64..0000000 --- a/dev-db/mysql-utilities/mysql-utilities-1.5.6.ebuild +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) -inherit distutils-r1 - -DESCRIPTION="Set of command-line utilities for common MySQL tasks" -HOMEPAGE="http://dev.mysql.com/doc/mysql-utilities/" -SRC_URI="mirror://mysql/Downloads/MySQLGUITools/${P}.tar.gz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -IUSE="" - -DEPEND=">=dev-python/mysql-connector-python-2.1.2[${PYTHON_USEDEP}]" -RDEPEND="${DEPEND}" - -src_prepare() { - # conflicts with dev-python/mysql-connector-python - rm -r "${S}/mysql/connector" || die - default -} - -python_install() { - distutils-r1_python_install - # Remove another collision - rm "${D}usr/$(get_libdir)/${EPYTHON}/site-packages/mysql/__init__.py" || die -} diff --git a/dev-db/mysql/ChangeLog b/dev-db/mysql/ChangeLog deleted file mode 100644 index fe767e8..0000000 --- a/dev-db/mysql/ChangeLog +++ /dev/null @@ -1,481 +0,0 @@ -# ChangeLog for dev-db/mysql -# Copyright 1999-2017 Gentoo Foundation; Distributed under the GPL v2 -# $Id$ - - 02 Mar 2017; Brian Evans <grknight@gentoo.org> mysql-4.0.27-r1.ebuild, - mysql-4.1.22-r1.ebuild, mysql-5.0.96.ebuild, mysql-5.1.73-r1.ebuild, - mysql-5.6.30.ebuild, mysql-5.7.10.ebuild, mysql-5.7.11.ebuild, - mysql-5.7.12.ebuild, mysql-5.7.17.ebuild: - dev-db/mysql: Drop $Id$ headers - - 02 Mar 2017; Brian Evans <grknight@gentoo.org> -mysql-5.5.49.ebuild, - mysql-4.0.27-r1.ebuild, mysql-4.1.22-r1.ebuild, mysql-5.0.96.ebuild, - mysql-5.1.73-r1.ebuild, mysql-5.6.30.ebuild, mysql-5.7.10.ebuild, - mysql-5.7.11.ebuild, mysql-5.7.12.ebuild, mysql-5.7.17.ebuild: - dev-db/mysql: Drop defunct x86-freebsd arch - - 09 Jan 2017; Brian Evans <grknight@gentoo.org> mysql-5.7.17.ebuild: - dev-db/mysql: Add Protobuf DEPEND - -*mysql-5.7.17 (03 Jan 2017) - - 03 Jan 2017; Brian Evans <grknight@gentoo.org> +mysql-5.7.17.ebuild: - dev-db/mysql: Version bump in 5.7 series. Just about done but needs major - tree work to be included - - 29 Apr 2016; Brian Evans <grknight@gentoo.org> mysql-5.7.12.ebuild: - dev-db/mysql: Force a download of boost-1.59 and use it in the build. Only a - portion is actually used - -*mysql-5.7.12 (27 Apr 2016) - - 27 Apr 2016; Brian Evans <grknight@gentoo.org> +files/5.7.12-boost.cmake, - +mysql-5.7.12.ebuild: - dev-db/mysql: Version bump for 5.7.12 - -*mysql-5.5.49 (12 Apr 2016) -*mysql-5.6.30 (12 Apr 2016) - - 12 Apr 2016; Brian Evans <grknight@gentoo.org> +mysql-5.5.49.ebuild, - +mysql-5.6.30.ebuild, -mysql-5.5.48.ebuild, -mysql-5.6.29.ebuild: - dev-db/mysql: Version bump for 5.5.49 and 5.6.30 - - 12 Feb 2016; Brian Evans <grknight@gentoo.org> metadata.xml: - dev-db/mysql: Remove old USE flag descriptions for client-libs and tools - - 12 Feb 2016; Brian Evans <grknight@gentoo.org> -mysql-5.5.46.ebuild, - -mysql-5.6.27-r1.ebuild, -mysql-5.6.27.ebuild, -mysql-5.6.28.ebuild, - -mysql-5.7.7_rc.ebuild, -mysql-5.7.8_rc.ebuild: - dev-db/mysql: Drop old version - -*mysql-5.5.48 (12 Feb 2016) - - 12 Feb 2016; Brian Evans <grknight@gentoo.org> +mysql-5.5.48.ebuild: - dev-db/mysql: Version bump for 5.5.48 - -*mysql-5.7.10 (21 Jan 2016) - - 21 Jan 2016; Brian Evans <grknight@gentoo.org> +mysql-5.7.10.ebuild: - dev-db/mysql: Add new 5.7 version. Needs more testing - - 19 Aug 2015; Brian Evans <grknight@gentoo.org> mysql-5.7.7_rc.ebuild, - mysql-5.7.8_rc.ebuild: - dev-db/mysql: Drop keywords ~hppa ~ppc ~sparc ~sparc-fbsd MySQL 5.7 requires - native GCC atomics and these platforms do not provide it. Need to patch or - leave unkeyworded. - -*mysql-5.7.8_rc (13 Aug 2015) - - 13 Aug 2015; Brian Evans <grknight@gentoo.org> +mysql-5.7.8_rc.ebuild, - -mysql-5.7.6_alpha_pre16.ebuild: - dev-db/mysql: Version bump - -*mysql-5.7.7_rc (14 Apr 2015) -*mysql-5.6.24 (14 Apr 2015) -*mysql-5.5.43 (14 Apr 2015) - - 14 Apr 2015; <grknight@gentoo.org> +mysql-5.5.43.ebuild, - +mysql-5.6.24.ebuild, -mysql-5.7.4_alpha_pre14.ebuild, - -mysql-5.7.5_alpha_pre15.ebuild, +mysql-5.7.7_rc.ebuild: - Version bump - -*mysql-5.7.6_alpha_pre16 (10 Mar 2015) - - 10 Mar 2015; Brian Evans <grknight@gentoo.org> - +mysql-5.7.6_alpha_pre16.ebuild: - [dev-db/mysql] Version bump for 5.7.6; Needs more testing - - 03 Aug 2014; Robin H. Johnson <robbat2@gentoo.org> mysql-5.6.20.ebuild: - Sync. - - 03 Aug 2014; Robin H. Johnson <robbat2@gentoo.org> mysql-5.6.20.ebuild: - Missed test while merging. - - 29 Jul 2014; Robin H. Johnson <robbat2@gentoo.org> mysql-4.0.27-r1.ebuild, - mysql-4.1.22-r1.ebuild, mysql-5.1.73-r1.ebuild, mysql-5.5.38-r1.ebuild: - Sync ebuilds from tree. - -*mysql-5.1.73 (12 Dec 2013) - - 12 Dec 2013; Brian Evans <grknight@tuffmail.com> +mysql-5.1.73.ebuild: - [mysql] Bump 5.1 series - -*mysql-5.5.35 (10 Dec 2013) -*mysql-5.6.15 (10 Dec 2013) - - 10 Dec 2013; Brian Evans <grknight@tuffmail.com> +mysql-5.5.35.ebuild, - +mysql-5.6.15.ebuild, -mysql-5.6.10.ebuild: - [mysql] Version bumps for 5.5 and 5.6 series - - 29 Aug 2013; Brian Evans <grknight@tuffmail.com> -mysql-5.1.66-r1.ebuild, - -mysql-5.1.66.ebuild, -mysql-5.1.67-r1.ebuild, -mysql-5.1.67.ebuild, - -mysql-5.1.68.ebuild, -mysql-5.1.69.ebuild, -mysql-5.5.29-r1.ebuild, - -mysql-5.5.29.ebuild, -mysql-5.5.30.ebuild, -mysql-5.5.31.ebuild, - -mysql-5.6.7_rc.ebuild, -mysql-5.6.9_rc.ebuild: - [dev-db/mysql] Trim old - -*mysql-5.6.13 (26 Aug 2013) - - 26 Aug 2013; Brian Evans <grknight@tuffmail.com> +mysql-5.6.13.ebuild: - [dev-db/mysql] Version bump to 5.6.13. Failing test(s): - rpl.rpl_spec_variables similar to bug 473002 - -*mysql-5.5.33 (16 Aug 2013) - - 16 Aug 2013; Brian Evans <grknight@tuffmail.com> +mysql-5.5.33.ebuild: - Version bump w/ failing tests Failing test(s): rpl.rpl_deadlock_innodb - main.plugin_auth main.mysqladmin main.mysqlhotcopy_archive - main.mysqlhotcopy_myisam - -*mysql-5.6.12 (06 Jun 2013) - - 06 Jun 2013; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.6.12.ebuild, - mysql-5.6.10.ebuild, mysql-5.6.7_rc.ebuild, mysql-5.6.9_rc.ebuild, - mysql-5.7.1_alpha_pre11.ebuild: - Bump. Fails tests: rpl.rpl_spec_variables (mix,stmt), - binlog.binlog_mysqlbinlog_filter (stmt), perfschema.binlog_edge_mix, - perfschema.binlog_edge_stmt, funcs_1.is_columns_mysql, - funcs_1.is_tables_mysql, funcs_1.is_triggers, - sys_vars.table_definition_cache_basic, sys_vars.table_open_cache_basic. - -*mysql-4.0.27-r1 (06 Jun 2013) -*mysql-4.1.22-r1 (06 Jun 2013) -*mysql-5.1.68 (06 Jun 2013) -*mysql-5.5.32 (06 Jun 2013) - - 06 Jun 2013; Robin H. Johnson <robbat2@gentoo.org> +mysql-4.0.27-r1.ebuild, - +mysql-4.1.22-r1.ebuild, +mysql-5.1.68.ebuild, +mysql-5.5.32.ebuild, - mysql-5.1.66.ebuild, mysql-5.1.69.ebuild, mysql-5.5.30.ebuild, - mysql-5.5.31.ebuild: - Bump. - -*mysql-5.5.31 (03 Jun 2013) - - 03 Jun 2013; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.5.31.ebuild, - mysql-5.1.69.ebuild: - Bump. - -*mysql-5.1.69 (28 May 2013) - - 28 May 2013; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.1.69.ebuild: - Bump, please see bug #471632 for test failures. - -*mysql-5.5.30 (08 Mar 2013) - - 08 Mar 2013; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.5.30.ebuild: - Bump. - - 04 Mar 2013; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.66.ebuild, - mysql-5.1.67.ebuild: - Update headers and keywords. - -*mysql-5.6.9_rc (28 Jan 2013) - - 28 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.6.9_rc.ebuild: - Add still-broken 5.6 for development. As a problem with as-needed link order - still. - - 28 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> files/my.cnf-4.0, - files/my.cnf-5.1, files/my.cnf-5.5, mysql-5.1.66-r1.ebuild, - mysql-5.1.66.ebuild, mysql-5.1.67-r1.ebuild: - Sync with gentoo-x86 for prefix changes & headers. - - 28 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> -mysql-5.5.19.ebuild, - -mysql-5.5.20.ebuild, -mysql-5.5.21.ebuild, -mysql-5.5.22.ebuild, - -mysql-5.5.25a.ebuild, -mysql-5.5.27.ebuild, -mysql-5.5.28.ebuild, - -mysql-5.6.2_alpha_pre5.ebuild: - Trim. - -*mysql-5.1.66-r1 (28 Jan 2013) -*mysql-5.1.67-r1 (28 Jan 2013) - - 28 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.1.66-r1.ebuild, - +mysql-5.1.67-r1.ebuild, mysql-5.1.66.ebuild, mysql-5.1.67.ebuild: - Actually move PBXT fix to revbump. - - 28 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.66.ebuild, - mysql-5.1.67.ebuild: - Include PBXT nice fix per bug #374349. - - 28 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> metadata.xml, - mysql-5.1.66.ebuild, mysql-5.1.67.ebuild, mysql-5.5.19.ebuild, - mysql-5.5.20.ebuild, mysql-5.5.21.ebuild, mysql-5.5.22.ebuild, - mysql-5.5.28.ebuild, mysql-5.5.29.ebuild: - Sync from gentoo-x86. - - 20 Jan 2013; Robin H. Johnson <robbat2@gentoo.org> mysql-5.0.96.ebuild: - Copy keywords from gentoo-x86. - -*mysql-5.1.65 (14 Aug 2012) - - 14 Aug 2012; <atlantis@gentoo.org> +mysql-5.1.65.ebuild: - [dev-db/mysql] Bump to the 5.1.65 release. - -*mysql-5.5.25a (07 Jul 2012) - - 07 Jul 2012; <atlantis@gentoo.org> +mysql-5.5.25a.ebuild: - [dev-db/mysql-5.5.25a] Version bump. - - 22 May 2012; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.0.92.ebuild, mysql-5.0.96.ebuild: - Move EAPI assignment to the top. - Whitespace. - - 15 Feb 2012; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - files/my.cnf-5.1: - Update table_cache to table_open_cache variable for mysql-5.1 my.cnf file. - Fixes bug 403425 - thanks to Alex Efros <powerman-asdf@yandex.ru> for the - report. - -*mysql-5.1.61 (31 Jan 2012) -*mysql-5.5.20 (31 Jan 2012) - - 31 Jan 2012; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.1.61.ebuild, - +mysql-5.5.20.ebuild: - Version bump, passes all tests. - - 20 Dec 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.1.58-r1.ebuild, mysql-5.5.10.ebuild, mysql-5.5.12.ebuild, - mysql-5.5.14.ebuild, mysql-5.5.15.ebuild: - [dev-db/mysql] Bump EAPI to 4 on old mysql versions. - -*mysql-5.5.18 (20 Nov 2011) - - 20 Nov 2011; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.5.18.ebuild: - Version bump. - -*mysql-5.1.60 (19 Nov 2011) - - 19 Nov 2011; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.1.60.ebuild: - Version bump. - -*mysql-5.5.17 (26 Oct 2011) - - 26 Oct 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mysql-5.5.17.ebuild: - [dev-db/mysql] Bumped to the 5.5.17 version. - - 25 Oct 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.1.59.ebuild, mysql-5.5.16.ebuild, mysql-5.6.2_alpha_pre5.ebuild: - [dev-db/mysql] Use EAPI-4 to support the new Prefix support of the eclasses. - -*mysql-5.5.16 (22 Sep 2011) - - 22 Sep 2011; <atlantis@gentoo.org> +mysql-5.5.16.ebuild: - Bumped mysql to the 5.5.16 release. - -*mysql-5.1.59 (22 Sep 2011) - - 22 Sep 2011; <atlantis@gentoo.org> +mysql-5.1.59.ebuild: - Bumped mysql to the 5.1.59 release. - -*mysql-5.5.15 (30 Jul 2011) - - 30 Jul 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mysql-5.5.15.ebuild: - [dev-db/mysql] 5.5.15 release version bump. - - 21 Jul 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - -mysql-5.1.58.ebuild: - Dropped broken mysql-5.1.58 ebuild. - -*mysql-5.1.58-r1 (21 Jul 2011) - - 21 Jul 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mysql-5.1.58-r1.ebuild: - [dev-db/mysql-5.1.58-r1] Bumped mysql-5.1.58 to fix all the issues related to - the ebuild and the mysql-v2 eclass. Fixes bug 375063. - - 14 Jul 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.1.58.ebuild: - [dev-db/mysql-5.5.14] Don't use live version of mysql_extras. - [dev-db/mysql-5.1.58] Don't use live version of mysql_extras. - Synced from the tree. - - 13 Jul 2011; Robin H. Johnson <robbat2@gentoo.org> -mysql-5.5.13.ebuild: - 5.5.13 removed from uptream mirrors, unable to verify digest. - - 13 Jul 2011; Robin H. Johnson <robbat2@gentoo.org> -mysql-5.1.56.ebuild, - -mysql-5.1.56-r1.ebuild, -mysql-5.1.57.ebuild: - Old versions moved to tree. - - 13 Jul 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.1.57.ebuild, mysql-5.1.58.ebuild, mysql-5.5.13.ebuild, - mysql-5.5.14.ebuild: - Replace mysql_disable_test calls with mysql-v2_disable_test. - Should finally disable the remaining failing tests. - - 18 May 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.1.57.ebuild: - Update mysql-v2 eclass to use the git-2 eclass. - Update the mysql-5.1.57 ebuild to use the mysql-v2 eclass. - - 16 May 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.5.10.ebuild, mysql-5.5.12.ebuild: - Really disable binlog.binlog_statement_insert_delayed test. - - 16 May 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.5.10.ebuild, mysql-5.5.12.ebuild: - Disable tests that fail for mysql-5.5.*: - 3 tests fail for latin/utf-8 charsets and 1 causes segmentation faults. - - 15 May 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - -mysql-5.0.91.ebuild, -mysql-5.1.50-r2.ebuild, -mysql-5.1.50-r3.ebuild, - -mysql-5.1.51.ebuild, -mysql-5.1.51-r1.ebuild, -mysql-5.1.52-r2.ebuild, - -mysql-5.1.53-r1.ebuild, -mysql-5.5.4_alpha_pre3.ebuild: - Dropping old versions. - -*mysql-5.5.12 (11 May 2011) -*mysql-5.1.57 (11 May 2011) - - 11 May 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mysql-5.1.57.ebuild, +mysql-5.5.12.ebuild: - Bumped mysql to the 5.1.57 and 5.5.12 releases. - -*mysql-5.1.56-r1 (18 Apr 2011) - - 18 Apr 2011; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.56.ebuild, - +mysql-5.1.56-r1.ebuild: - Make a release of 5.1.56 using the old eclass. - -*mysql-5.1.56 (28 Mar 2011) - - 28 Mar 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mysql-5.1.56.ebuild, mysql-5.5.10.ebuild, metadata.xml: - Bumped mysql to the 5.1.56 release. - More updates to the 5.5.10 ebuild. - - 26 Mar 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.5.10.ebuild: - Applied a few more fixes to mysql-5.5.10. - - 21 Mar 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.5.10.ebuild: - A few more updates for mysql-5.5.10 including a reworked patch from upstream - ( http://lists.mysql.com/commits/102373 ) to build a shared libmysqld. - -*mysql-5.5.10 (17 Mar 2011) - - 17 Mar 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mysql-5.5.10.ebuild: - Introduce new eclasses and update mysql_fx.eclass to support the cmake based - mysql-5.5 ebuilds. - Add initial support for mysql-5.5.10 - this is still a work in progress. - -*mysql-5.0.92 (17 Feb 2011) - - 17 Feb 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mysql-5.0.92.ebuild: - Bumped mysql to the 5.0.92 release. - This version is still breaking on a missing #endif at sql/sql_parse.cc. - - 28 Nov 2010; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.53-r1.ebuild: - Add ~mips per main tree. - - 28 Nov 2010; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.51-r1.ebuild, - mysql-5.1.52-r2.ebuild, mysql-5.1.53-r1.ebuild: - Update libtool changes from main tree. - -*mysql-5.1.53-r1 (28 Nov 2010) -*mysql-5.1.52-r2 (28 Nov 2010) - - 28 Nov 2010; Robin H. Johnson <robbat2@gentoo.org> -mysql-5.1.52.ebuild, - +mysql-5.1.52-r2.ebuild, +mysql-5.1.53-r1.ebuild: - Add 5.1.53 ebuild and bump 5.1.52 to be ahead of main tree versions. - -*mysql-5.1.52 (03 Nov 2010) - - 03 Nov 2010; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.1.52.ebuild: - Add 5.1.52 release, just need to integrate MIPS and federated fixes - -*mysql-5.1.51-r1 (06 Oct 2010) - - 06 Oct 2010; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.51.ebuild, - +mysql-5.1.51-r1.ebuild: - Release ready for tree now. - - 06 Oct 2010; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.50-r2.ebuild, - mysql-5.1.50-r3.ebuild, mysql-5.1.51.ebuild: - Ready for release. - -*mysql-5.1.51 (04 Oct 2010) - - 04 Oct 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mysql-5.1.51.ebuild: - Bumped to mysql-5.1.51. - - 27 Sep 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.1.50-r3.ebuild: - Dropped the block on amarok[embedded]. - - 24 Sep 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.1.50-r3.ebuild: - Drop the EGIT_REPO_URI used to test locally. - -*mysql-5.1.50-r3 (24 Sep 2010) - - 24 Sep 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mysql-5.1.50-r3.ebuild: - Bumped mysql to 5.1.50-r3 to add the embedded patch. - - 07 Sep 2010; Robin H. Johnson <robbat2@gentoo.org> -mysql-5.1.49.ebuild, - -mysql-5.5.1_alpha_pre2-r1.ebuild: - cleanup. - - 07 Sep 2010; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.50-r2.ebuild: - Hello again bug #332565. - - 05 Sep 2010; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.50-r2.ebuild: - Refix bug #332565. - - 01 Sep 2010; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.50-r2.ebuild: - Block the new sharedlib patch since it doesn't work fully yet. - -*mysql-5.1.50-r2 (01 Sep 2010) - - 01 Sep 2010; Robin H. Johnson <robbat2@gentoo.org> -mysql-5.1.50.ebuild, - +mysql-5.1.50-r2.ebuild: - Rename to avoid conflict. - - 21 Aug 2010; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.50.ebuild: - Some tests false-positive with XtraDB. - -*mysql-5.1.50 (20 Aug 2010) - - 20 Aug 2010; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.1.50.ebuild: - Verbump. - - 09 Aug 2010; Robin H. Johnson <robbat2@gentoo.org> - -mysql-5.0.90-r3.ebuild, -mysql-5.1.44-r4.ebuild, -mysql-5.1.45-r2.ebuild, - -mysql-5.1.46.ebuild: - Cleanup. - - 09 Aug 2010; Robin H. Johnson <robbat2@gentoo.org> mysql-5.0.90-r3.ebuild, - mysql-5.0.91.ebuild: - Add prefix keywords. - - 09 Aug 2010; Robin H. Johnson <robbat2@gentoo.org> mysql-5.0.91.ebuild: - Clean up 5.0.91 for release. - -*mysql-5.1.49 (27 Jul 2010) - - 27 Jul 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mysql-5.1.49.ebuild: - Added mysql-5.1.49 release. - -*mysql-5.0.91 (22 May 2010) - - 22 May 2010; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.0.91.ebuild: - Bug #319489: new version for GLSA, but critically broken. - -*mysql-5.1.42 (02 Jan 2010) - - 02 Jan 2010; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mysql-5.1.42.ebuild: - Bumped mysql to 5.1.42. - -*mysql-5.1.41 (29 Nov 2009) - - 29 Nov 2009; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - +mysql-5.1.41.ebuild: - Initial bump to mysql-5.1.41. diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest deleted file mode 100644 index 4ab2b64..0000000 --- a/dev-db/mysql/Manifest +++ /dev/null @@ -1,36 +0,0 @@ ------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.62.tar.gz 21111902 SHA256 b1e7853bc1f04aabf6771e0ad947f35ac8d237f4b35d0706d1095c9526ff99d7 SHA512 1080a3989c20bbbfe98739f99dacd183f2087ceee5147845852144240386808568af4c908ecdbccdcb6114000ab760ed7257492834d50018eff9520260fd91ce WHIRLPOOL f55b30e0839025180945d9d8244613b46f0b635bb75d4a409a82bdda0262374f2df1e9124f3abdad58e0a603fc8c3b2b34e235037f6613923385a903bfb9945b -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-20180312-2011Z.tar.bz2 319047 SHA256 5d83747593b2276ecaf253b193814df2bfe170de57ceb7565e3d9f215df92254 SHA512 b0aa9fc8fbc050451ef147cee99b00cf10d34a71641837821e78655241f7d79a94fe2efb4cef9a23fe9741e08ada2fc0b58ef3b3663752bc567babfbcaa547c8 WHIRLPOOL 29085d38c285e62fa5925e70e01fda98ce5582e660b84fa09992049b5c222d1c14e73b94c63cb754bd94df00ce154b24ea5d4ee472de1766b6941cb05503c493 -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/files/5.7.12-boost.cmake b/dev-db/mysql/files/5.7.12-boost.cmake deleted file mode 100644 index 5a341e1..0000000 --- a/dev-db/mysql/files/5.7.12-boost.cmake +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# We want boost 1.59.0 in order to build our boost/geometry code. -# The boost tarball is fairly big, and takes several minutes -# to download. So we recommend downloading/unpacking it -# only once, in a place visible from any bzr sandbox. -# We use only header files, so there should be no binary dependencies. - -# Downloading the tarball takes about 5 minutes here at the office. -# Here are some size/time data for unpacking the tarball on my desktop: -# size tarball-name -# 67M boost_1_55_0.tar.gz unzipping headers ~2 seconds 117M -# unzipping everything ~3 seconds 485M -# 8,8M boost_headers.tar.gz unzipping everything <1 second - -# Invoke with -DWITH_BOOST=<directory> or set WITH_BOOST in environment. -# If WITH_BOOST is *not* set, or is set to the special value "system", -# we assume that the correct version (see below) -# is installed on the compile host in the standard location. - -UNSET(WITH_BOOST) -UNSET(WITH_BOOST CACHE) - -# Update the cache, to make it visible in cmake-gui. -SET(WITH_BOOST ${WITH_BOOST} CACHE PATH - "Path to boost sources: a directory, or a tarball to be unzipped.") - -# Search for the version file, first in LOCAL_BOOST_DIR or WITH_BOOST -FIND_PATH(BOOST_INCLUDE_DIR - NAMES boost/version.hpp - NO_DEFAULT_PATH - PATHS ${LOCAL_BOOST_DIR} - ${LOCAL_BOOST_DIR}/${BOOST_PACKAGE_NAME} - ${WITH_BOOST} -) -# Then search in standard places (if not found above). -FIND_PATH(BOOST_INCLUDE_DIR - NAMES boost/version.hpp -) - -IF(NOT BOOST_INCLUDE_DIR) - MESSAGE(FATAL_ERROR "Could not find (the correct version of) boost.") -ELSE() - MESSAGE(STATUS "Found ${BOOST_INCLUDE_DIR}/boost/version.hpp ") -ENDIF() - -MESSAGE(STATUS "BOOST_INCLUDE_DIR ${BOOST_INCLUDE_DIR}") - -# Bug in sqrt(NaN) on 32bit platforms -IF(SIZEOF_VOIDP EQUAL 4) - ADD_DEFINITIONS(-DBOOST_GEOMETRY_SQRT_CHECK_FINITENESS) -ENDIF() - -SET(USING_SYSTEM_BOOST 1) diff --git a/dev-db/mysql/files/my.cnf b/dev-db/mysql/files/my.cnf deleted file mode 100644 index 1236111..0000000 --- a/dev-db/mysql/files/my.cnf +++ /dev/null @@ -1,48 +0,0 @@ -# /etc/mysql/my.cnf: The global mysql configuration file. -# $Id$ -# -# This file can be simultaneously placed in three places: -# 1. /etc/mysql/my.cnf to set global options. -# 2. /var/lib/mysql/my.cnf to set server-specific options. -# 3. ~/.my.cnf to set user-specific options. -# -# One can use all long options that the program supports. -# Run the program with --help to get a list of them. -# -# The following values assume you have at least 32M RAM! - -[client] -#password = my_password -port = 3306 -socket = /var/run/mysqld/mysqld.sock - -[safe_mysqld] -err-log = /var/log/mysql/mysql.err - -[mysqld] -#skip-networking -skip-innodb -innodb_file_per_table -user = mysql -pid-file = /var/run/mysqld/mysqld.pid -socket = /var/run/mysqld/mysqld.sock -port = 3306 -log = /var/log/mysql/mysql.log -basedir = /usr -datadir = /var/lib/mysql -tmpdir = /tmp -language = /usr/share/mysql/english -skip-locking -set-variable = key_buffer=16M -set-variable = max_allowed_packet=1M -set-variable = thread_stack=128K - -[mysqldump] -quick -set-variable = max_allowed_packet=1M - -[mysql] -#no-auto-rehash # faster start of mysql but no tab completition - -[isamchk] -set-variable = key_buffer=16M diff --git a/dev-db/mysql/files/my.cnf-4.0 b/dev-db/mysql/files/my.cnf-4.0 deleted file mode 100644 index e6666a7..0000000 --- a/dev-db/mysql/files/my.cnf-4.0 +++ /dev/null @@ -1,113 +0,0 @@ -# /etc/mysql/my.cnf: The global mysql configuration file. -# $Id$ -# -# This file can be simultaneously placed in three places: -# 1. /etc/mysql/my.cnf to set global options. -# 2. /var/lib/mysql/my.cnf to set server-specific options. -# 3. ~/.my.cnf to set user-specific options. -# -# One can use all long options that the program supports. -# Run the program with --help to get a list of them. -# -# The following values assume you have at least 64M RAM! - -[client] -#password = my_password -port = 3306 -socket = /var/run/mysqld/mysqld.sock - -[safe_mysqld] -err-log = /var/log/mysql/mysql.err - -[mysqld] -user = mysql -pid-file = /var/run/mysqld/mysqld.pid -socket = /var/run/mysqld/mysqld.sock -log-error = /var/log/mysql/mysqld.err -# If set, mysql logs all queries (general query log). This will be deprecated in -# MySQL 5.0. This logs all queries, even error queries and is slow. -# log = /var/log/mysql/mysql.log -# -# If you really need logging, you'd rather use binary logging. Especially when doing -# replication. Read file:/usr/share/doc/mysql-*/manual.html.gz#Replication for info. -# You can use PURGE MASTER LOGS TO '$hostname-bin.010' to get rid of old logs -# from $hostname-bin.01 up to $hostname-bin.09 while the slave server is -# running. -# Before doing that, check which logfile slave curently uses by running -# mysql> SHOW SLAVE STATUS -# To list logfiles on master do: -# mysql> SHOW MASTER LOGS -# Then use PURGE for those not needed anymore only! Never remove the files -# manually! -# -# Also consult RESET MASTER and RESET SLAVE commands before doing any changes -# mysql> RESET MASTER - Deletes all binary logs listed in the index -# file, resetting the binlog index file to be empty. -# mysql> RESET SLAVE - Makes the slave forget its replication position in -# the master logs. -# mysql> SET SQL_LOG_BIN=0 - this turns off logging (execute on MASTER only) -# mysql> SET SQL_LOG_BIN=1 - this turns on logging (execute on MASTER only) -# -# log-bin -# set-variable = binlog-do-db=non_existant -# set-variable = binlog-ignore-db=database_name -# -# server-id has to unique for each master or slave in your network, -# lets use the last number from IP address -# server-id = 207 -basedir = /usr -datadir = /var/lib/mysql -tmpdir = /tmp -language = /usr/share/mysql/english -skip-locking -set-variable = key_buffer=16M -set-variable = max_allowed_packet=1M -set-variable = thread_stack=128K -# be secure by default! -bind-address = 127.0.0.1 -port = 3306 -# this can make it even more secure: -#skip-networking -# -# the following is the InnoDB configuration -# if you wish to disable innodb instead -# uncomment just the next line -#skip-innodb -# -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -set-variable = innodb_buffer_pool_size=32M -# this is the default, increase it if you have lots of tables -set-variable = innodb_additional_mem_pool_size=1M -# -# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under /var/lib/mysql/, so that's the route -# we have to take for the moment -innodb_data_home_dir = /var/lib/mysql/ -innodb_log_arch_dir = /var/lib/mysql/ -innodb_log_group_home_dir = /var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -set-variable = innodb_log_file_size=8M -# this is the default, increase it if you have very large transactions going on -set-variable = innodb_log_buffer_size=1M -# this is the default and won't hurt you -# you shouldn't need to tweak it -set-variable = innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -loose-innodb_file_per_table=1 - -[mysqldump] -quick -set-variable = max_allowed_packet=16M - -[mysql] -#no-auto-rehash # faster start of mysql but no tab completion - -[isamchk] -set-variable = key_buffer=16M diff --git a/dev-db/mysql/files/my.cnf-4.1 b/dev-db/mysql/files/my.cnf-4.1 deleted file mode 100644 index 617c9e6..0000000 --- a/dev-db/mysql/files/my.cnf-4.1 +++ /dev/null @@ -1,147 +0,0 @@ -# /etc/mysql/my.cnf: The global mysql configuration file. -# $Id$ - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = /var/run/mysqld/mysqld.sock - -[mysql] -character-sets-dir=/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqladmin] -character-sets-dir=/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlcheck] -character-sets-dir=/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqldump] -character-sets-dir=/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlimport] -character-sets-dir=/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlshow] -character-sets-dir=/usr/share/mysql/charsets -default-character-set=utf8 - -[myisamchk] -character-sets-dir=/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=/usr/share/mysql/charsets - -# use [safe_mysqld] with mysql-3 -[mysqld_safe] -err-log = /var/log/mysql/mysql.err - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -default-character-set = utf8 -user = mysql -port = 3306 -socket = /var/run/mysqld/mysqld.sock -pid-file = /var/run/mysqld/mysqld.pid -log-error = /var/log/mysql/mysqld.err -basedir = /usr -datadir = @DATADIR@ -skip-locking -key_buffer = 16M -max_allowed_packet = 1M -table_cache = 64 -sort_buffer_size = 512K -net_buffer_length = 8K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -language = /usr/share/mysql/english - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = /tmp/ -#log-update = /path-to-dedicated-directory/hostname - -# you need the debug USE flag enabled to use the following directives, -# if needed, uncomment them, start the server and issue -# #tail -f /tmp/mysqld.sql /tmp/mysqld.trace -# this will show you *exactly* what's happening in your server ;) - -#log = /tmp/mysqld.sql -#gdb -#debug = d:t:i:o,/tmp/mysqld.trace -#one-thread - -# uncomment the following directives if you are using BDB tables -#bdb_cache_size = 4M -#bdb_max_lock = 10000 - -# the following is the InnoDB configuration -# if you wish to disable innodb instead -# uncomment just the next line -#skip-innodb -# -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -innodb_buffer_pool_size = 16M -# this is the default, increase it if you have lots of tables -innodb_additional_mem_pool_size = 2M -# -# i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under /var/lib/mysql/, so that's the route -# we have to take for the moment -#innodb_data_home_dir = /var/lib/mysql/ -#innodb_log_arch_dir = /var/lib/mysql/ -#innodb_log_group_home_dir = /var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -innodb_log_file_size = 5M -# this is the default, increase it if you have very large transactions going on -innodb_log_buffer_size = 8M -# this is the default and won't hurt you -# you shouldn't need to tweak it -set-variable = innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_file_per_table - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[isamchk] -key_buffer = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[myisamchk] -key_buffer = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[mysqlhotcopy] -interactive-timeout diff --git a/dev-db/mysql/files/my.cnf-5.1 b/dev-db/mysql/files/my.cnf-5.1 deleted file mode 100644 index cd8721b..0000000 --- a/dev-db/mysql/files/my.cnf-5.1 +++ /dev/null @@ -1,145 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. -# $Id$ - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock - -[mysql] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqladmin] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlcheck] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqldump] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlimport] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlshow] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[myisamchk] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -# use [safe_mysqld] with mysql-3 -[mysqld_safe] -err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid -log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err -basedir = @GENTOO_PORTAGE_EPREFIX@/usr -datadir = @DATADIR@ -skip-external-locking -key_buffer = 16M -max_allowed_packet = 1M -table_open_cache = 64 -sort_buffer_size = 512K -net_buffer_length = 8K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -language = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/english - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ -#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname - -# you need the debug USE flag enabled to use the following directives, -# if needed, uncomment them, start the server and issue -# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace -# this will show you *exactly* what's happening in your server ;) - -#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql -#gdb -#debug = d:t:i:o,/tmp/mysqld.trace -#one-thread - -# uncomment the following directives if you are using BDB tables -#bdb_cache_size = 4M -#bdb_max_lock = 10000 - -# the following is the InnoDB configuration -# if you wish to disable innodb instead -# uncomment just the next line -#skip-innodb -# -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -innodb_buffer_pool_size = 16M -# this is the default, increase it if you have lots of tables -innodb_additional_mem_pool_size = 2M -# -# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route -# we have to take for the moment -#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -innodb_log_file_size = 5M -# this is the default, increase it if you have very large transactions going on -innodb_log_buffer_size = 8M -# this is the default and won't hurt you -# you shouldn't need to tweak it -innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_file_per_table - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[isamchk] -key_buffer = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[myisamchk] -key_buffer = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[mysqlhotcopy] -interactive-timeout diff --git a/dev-db/mysql/files/my.cnf-5.5 b/dev-db/mysql/files/my.cnf-5.5 deleted file mode 100644 index 24d6deb..0000000 --- a/dev-db/mysql/files/my.cnf-5.5 +++ /dev/null @@ -1,148 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. -# $Id$ - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock - -[mysql] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqladmin] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlcheck] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqldump] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlimport] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlshow] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[myisamchk] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -# use [safe_mysqld] with mysql-3 -[mysqld_safe] -err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid -log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err -basedir = @GENTOO_PORTAGE_EPREFIX@/usr -datadir = @DATADIR@ -skip-external-locking -key_buffer_size = 16M -max_allowed_packet = 1M -table_open_cache = 64 -sort_buffer_size = 512K -net_buffer_length = 8K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql -#Set this to your desired error message language -lc_messages = en_US - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ -#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname - -# you need the debug USE flag enabled to use the following directives, -# if needed, uncomment them, start the server and issue -# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace -# this will show you *exactly* what's happening in your server ;) - -#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql -#gdb -#debug = d:t:i:o,/tmp/mysqld.trace -#one-thread - -# the following is the InnoDB configuration -# if you wish to disable innodb instead -# uncomment just the next line -#skip-innodb -# -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -innodb_buffer_pool_size = 16M -# this is the default, increase it if you have lots of tables -innodb_additional_mem_pool_size = 2M -# -# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route -# we have to take for the moment -#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -innodb_log_file_size = 5M -# this is the default, increase it if you have very large transactions going on -innodb_log_buffer_size = 8M -# this is the default and won't hurt you -# you shouldn't need to tweak it -innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_file_per_table - -# Uncomment this to get FEDERATED engine support -#plugin-load=federated=ha_federated.so -#loose-federated - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[isamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[myisamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer_size = 2M -write_buffer_size = 2M - -[mysqlhotcopy] -interactive-timeout - diff --git a/dev-db/mysql/files/my.cnf-5.6 b/dev-db/mysql/files/my.cnf-5.6 deleted file mode 100644 index ee85e99..0000000 --- a/dev-db/mysql/files/my.cnf-5.6 +++ /dev/null @@ -1,140 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. -# $Id$ - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock - -[mysql] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqladmin] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlcheck] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqldump] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlimport] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlshow] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[myisamchk] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -# use [safe_mysqld] with mysql-3 -[mysqld_safe] -err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid -log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err -basedir = @GENTOO_PORTAGE_EPREFIX@/usr -datadir = @DATADIR@ -skip-external-locking -key_buffer_size = 16M -max_allowed_packet = 4M -table_open_cache = 400 -sort_buffer_size = 512K -net_buffer_length = 16K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql -#Set this to your desired error message language -lc_messages = en_US - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ -#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname - -# you need the debug USE flag enabled to use the following directives, -# if needed, uncomment them, start the server and issue -# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace -# this will show you *exactly* what's happening in your server ;) - -#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql -#gdb -#debug = d:t:i:o,/tmp/mysqld.trace -#one-thread - -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -innodb_buffer_pool_size = 128M -# -# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route -# we have to take for the moment -#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -innodb_log_file_size = 48M -# this is the default, increase it if you have very large transactions going on -innodb_log_buffer_size = 8M -# this is the default and won't hurt you -# you shouldn't need to tweak it -innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_file_per_table - -# Uncomment this to get FEDERATED engine support -#plugin-load=federated=ha_federated.so -loose-federated - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[isamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[myisamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer_size = 2M -write_buffer_size = 2M - -[mysqlhotcopy] -interactive-timeout diff --git a/dev-db/mysql/files/my.cnf-5.7 b/dev-db/mysql/files/my.cnf-5.7 deleted file mode 100644 index 571ebf0..0000000 --- a/dev-db/mysql/files/my.cnf-5.7 +++ /dev/null @@ -1,3 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. - -!includedir @GENTOO_PORTAGE_EPREFIX@/etc/mysql/mysql.d diff --git a/dev-db/mysql/files/my.cnf.distro-client b/dev-db/mysql/files/my.cnf.distro-client deleted file mode 100644 index 8bf1836..0000000 --- a/dev-db/mysql/files/my.cnf.distro-client +++ /dev/null @@ -1,21 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/50-distro-client.cnf: The global mysql configuration file. - -# The following options will be passed to all MySQL clients -[client] -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -character-sets-dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[mysqldump] -quick -max_allowed_packet = 16M - -[myisamchk] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets diff --git a/dev-db/mysql/files/my.cnf.distro-server b/dev-db/mysql/files/my.cnf.distro-server deleted file mode 100644 index d4ed30c..0000000 --- a/dev-db/mysql/files/my.cnf.distro-server +++ /dev/null @@ -1,28 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/50-distro-server.cnf: The global mysql configuration file. - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysql.pid -log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err -basedir = @GENTOO_PORTAGE_EPREFIX@/usr -datadir = @DATADIR@ -skip-external-locking -lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql -#Set this to your desired error message language -lc_messages = en_US - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ -#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname diff --git a/dev-db/mysql/files/mysql.init b/dev-db/mysql/files/mysql.init deleted file mode 100644 index 04f8027..0000000 --- a/dev-db/mysql/files/mysql.init +++ /dev/null @@ -1,37 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -depend() { - need net - use dns -} - -checkconfig() { - if [ ! -f /etc/mysql/my.cnf ] ; then - eerror "No /etc/mysql/my.cnf file exists!" - fi - - dir=`my_print_defaults mysqld | grep -- --datadir | sed -e "s|^.*=\(.*\)|\1|"` - - if [ ! -d $dir/mysql ] ; then - eerror "You dont appear to have the mysql database installed yet." - eerror "Please run /usr/bin/mysql_install_db to have this done..." - return 1 - fi -} - -start() { - checkconfig || return 1 - ebegin "Starting mysqld" - /usr/bin/safe_mysqld >/dev/null 2>&1 & - eend $? -} - -stop () { - ebegin "Stopping mysqld" - start-stop-daemon --stop --quiet \ - --pidfile=/var/run/mysqld/mysqld.pid --retry 20 - eend $? -} diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml deleted file mode 100644 index 59b0429..0000000 --- a/dev-db/mysql/metadata.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>mysql-bugs@gentoo.org</email> - <name>MySQL</name> - </maintainer> -<use> - <flag name="big-tables">Make tables contain up to 1.844E+19 rows</flag> - <flag name="client-libs">Build the client libraries from the server package instead of the C Connector packages</flag> - <flag name="cluster">Add support for NDB clustering (deprecated)</flag> - <flag name="community">Enables the community features from upstream.</flag> - <flag name="embedded">Build embedded server (libmysqld)</flag> - <flag name="extraengine">Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag> - <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="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> - <flag name="pbxt">Add experimental support for PBXT storage engine</flag> - <flag name="profiling">Add support for statement profiling (requires USE=community).</flag> - <flag name="raid">Deprecated option, removed in the 5.0 series</flag> - <flag name="server">Build the server program</flag> - <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag> - <flag name="test">Install upstream testsuites for end use.</flag> - <flag name="xtradb">Add experimental support for Percona's InnoDB replacement: XtraDB</flag> - <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag> -</use> -</pkgmetadata> diff --git a/dev-db/mysql/mysql-4.0.27-r1.ebuild b/dev-db/mysql/mysql-4.0.27-r1.ebuild deleted file mode 100644 index 0704dfc..0000000 --- a/dev-db/mysql/mysql-4.0.27-r1.ebuild +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -MY_EXTRAS_VER="20070105" -SERVER_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/mysql-${PV//_/-}.tar.gz" - -inherit mysql -# only to make repoman happy. it is really set in the eclass -IUSE="$IUSE" - -# REMEMBER: also update eclass/mysql*.eclass before committing! -KEYWORDS="amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86" - -src_test() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - make check || die "make check failed" - if ! use "minimal" ; then - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - local retstatus - addpredict /this-dir-does-not-exist/t9.MYI - - cd mysql-test - sed -i -e "s|PORT=3306|PORT=3307|g" mysql-test-run - ./mysql-test-run - retstatus=$? - - # Just to be sure ;) - pkill -9 -f "${S}/ndb" 2>/dev/null - pkill -9 -f "${S}/sql" 2>/dev/null - [[ $retstatus -eq 0 ]] || die "make test failed" - else - einfo "Skipping server tests due to minimal build." - fi -} diff --git a/dev-db/mysql/mysql-4.1.22-r1.ebuild b/dev-db/mysql/mysql-4.1.22-r1.ebuild deleted file mode 100644 index 6c1da2e..0000000 --- a/dev-db/mysql/mysql-4.1.22-r1.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -MY_EXTRAS_VER="20090228-2228Z" -SERVER_URI="mirror://mysql/Downloads/MySQL-${PV%.*}/mysql-${PV//_/-}.tar.gz" - -inherit mysql -# only to make repoman happy. it is really set in the eclass -IUSE="$IUSE" - -# REMEMBER: also update eclass/mysql*.eclass before committing! -KEYWORDS="amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" - -src_test() { - einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" - make check || die "make check failed" - if ! use "minimal" ; then - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - local retstatus - local testopts="--force" - - # sandbox makes ndbd zombie - has "sandbox" ${FEATURES} && testopts="${testopts} --skip-ndb" - - addpredict /this-dir-does-not-exist/t9.MYI - - cd mysql-test - sed -i -e "s|3306|3307|g" mysql-test-run.pl - - # from Makefile.am: - retstatus=1 - ./mysql-test-run.pl ${testopts} \ - && ./mysql-test-run.pl ${testopts} --ps-protocol \ - && retstatus=0 - - # Just to be sure ;) - pkill -9 -f "${S}/ndb" 2>/dev/null - pkill -9 -f "${S}/sql" 2>/dev/null - [[ $retstatus -eq 0 ]] || die "test failed" - else - einfo "Skipping server tests due to minimal build." - fi -} diff --git a/dev-db/mysql/mysql-5.0.96.ebuild b/dev-db/mysql/mysql-5.0.96.ebuild deleted file mode 100644 index 744c13d..0000000 --- a/dev-db/mysql/mysql-5.0.96.ebuild +++ /dev/null @@ -1,212 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="4" -MY_EXTRAS_VER="20120401-2131Z" - -inherit toolchain-funcs mysql -# 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 ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-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="" - -# 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 - -# Official test instructions: -# USE='berkdb -cluster embedded extraengine perl ssl community' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mysql-X.X.XX.ebuild \ -# digest clean package -src_test() { - # 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" - - emake check || die "make check failed" - if ! use "minimal" ; 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" - cd "${S}" - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - local retstatus_ns - local retstatus_ps - local t - addpredict /this-dir-does-not-exist/t9.MYI - - # Ensure that parallel runs don't die - export MTR_BUILD_THREAD="$((${RANDOM} % 100))" - - # archive_gis really sucks a lot, but it's only relevant for the - # USE=extraengines case - case ${PV} in - 5.0.42) - mysql_disable_test "archive_gis" "Totally broken in 5.0.42" - ;; - - 5.0.4[3-9]|5.0.[56]*|5.0.70|5.0.87) - [ "$(tc-endian)" == "big" ] && \ - mysql_disable_test \ - "archive_gis" \ - "Broken in 5.0.43-70 and 5.0.87 on big-endian boxes only" - ;; - esac - - # This was a slight testcase breakage when the read_only security issue - # was fixed. - case ${PV} in - 5.0.54|5.0.51*) - mysql_disable_test \ - "read_only" \ - "Broken in 5.0.51-54, output in wrong order" - ;; - esac - - # Ditto to read_only - [ "${PV}" == "5.0.51a" ] && \ - mysql_disable_test \ - "view" \ - "Broken in 5.0.51, output in wrong order" - - # x86-specific, OOM issue with some subselects on low memory servers - [ "${PV}" == "5.0.54" ] && \ - [ "${ARCH/x86}" != "${ARCH}" ] && \ - mysql_disable_test \ - "subselect" \ - "Testcase needs tuning on x86 for oom condition" - - # Broke with the YaSSL security issue that didn't affect Gentoo. - [ "${PV}" == "5.0.56" ] && \ - for t in openssl_1 rpl_openssl rpl_ssl ssl \ - ssl_8k_key ssl_compress ssl_connect ; do \ - mysql_disable_test \ - "$t" \ - "OpenSSL tests broken on 5.0.56" - done - - # New test was broken in first time - # Upstream bug 41066 - # http://bugs.mysql.com/bug.php?id=41066 - [ "${PV}" == "5.0.72" ] && \ - mysql_disable_test \ - "status2" \ - "Broken in 5.0.72, new test is broken, upstream bug #41066" - - # The entire 5.0 series has pre-generated SSL certificates, they have - # mostly expired now. ${S}/mysql-tests/std-data/*.pem - # The certs really SHOULD be generated for the tests, so that they are - # not expiring like this. We cannot do so ourselves as the tests look - # closely as the cert path data, and we do not have the CA key to regen - # ourselves. Alternatively, upstream should generate them with at least - # 50-year validity. - # - # Known expiry points: - # 4.1.*, 5.0.0-5.0.22, 5.1.7: Expires 2013/09/09 - # 5.0.23-5.0.77, 5.1.7-5.1.22?: Expires 2009/01/27 - # 5.0.78-5.0.90, 5.1.??-5.1.42: Expires 2010/01/28 - # - # mysql-test/std_data/untrusted-cacert.pem is MEANT to be - # expired/invalid. - case ${PV} in - 5.0.*|5.1.*) - for t in openssl_1 rpl_openssl rpl.rpl_ssl rpl.rpl_ssl1 ssl ssl_8k_key \ - ssl_compress ssl_connect ; do \ - mysql_disable_test \ - "$t" \ - "These OpenSSL tests break due to expired certificates" - done - ;; - esac - - # These are also failing in MySQL 5.0 for now, and are believed to be - # false positives: - # - # main.mysql_comment, main.mysql_upgrade: - # fails due to USE=-latin1 / utf8 default - # - # main.mysql_client_test: - # segfaults at random under Portage only, suspect resource limits. - case ${PV} in - 5.0.*) - for t in main.mysql_client_test main.mysql_comments main.mysql_upgrade; do - mysql_disable_test "$t" "False positives in Gentoo" - done - ;; - esac - - use profiling && use community \ - || mysql_disable_test main.profiling \ - "Profiling test needs profiling support" - - if [ "${PN}" == "mariadb" ]; then - for t in \ - parts.part_supported_sql_func_ndb \ - parts.partition_auto_increment_ndb ; do - mysql_disable_test $t "ndb not supported in mariadb" - done - fi - - case $PV in - 5.0.91) - for t in archive archive_gis archive-big \ - federated_archive mysqldump-max \ - ; do - mysql_disable_test $t "Broken in $PV" - done - ;; - 5.0.96) - for t in \ - client_xml compress connect ctype_recoding drop \ - federated grant information_schema \ - information_schema_db innodb lowercase_table \ - lowercase_utf8 mysql-bug41486 mysql-bug45236 mysql \ - mysqlcheck mysqldump-max mysqldump mysqldump_restore \ - mysqlshow ps ps_1general rename rpl000009 rpl_ddl \ - rpl_delete_all rpl_drop_db rpl_dual_pos_advance \ - rpl_error_ignored_table rpl_filter_tables_not_exist \ - rpl_replicate_do rpl_trigger_not_windows select \ - show_check sp system_mysql_db system_mysql_db_fix30020 \ - system_mysql_db_fix40123 view \ - ; do - mysql_disable_test $t "Broken in $PV" - done - ;; - esac - - # create directories because mysqladmin might make out of order - mkdir -p "${S}"/mysql-test/var-{ps,ns}{,/log} - - # We run the test protocols seperately - emake test-ns force="--force --vardir=${S}/mysql-test/var-ns" - retstatus_ns=$? - [[ $retstatus_ns -eq 0 ]] || eerror "test-ns failed" - has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" - - emake test-ps force="--force --vardir=${S}/mysql-test/var-ps" - retstatus_ps=$? - [[ $retstatus_ps -eq 0 ]] || eerror "test-ps failed" - has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" - - # Cleanup is important for these testcases. - pkill -9 -f "${S}/ndb" 2>/dev/null - pkill -9 -f "${S}/sql" 2>/dev/null - failures="" - [[ $retstatus_ns -eq 0 ]] || failures="${failures} test-ns" - [[ $retstatus_ps -eq 0 ]] || failures="${failures} test-ps" - 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.1.73-r1.ebuild b/dev-db/mysql/mysql-5.1.73-r1.ebuild deleted file mode 100644 index 22b72ba..0000000 --- a/dev-db/mysql/mysql-5.1.73-r1.ebuild +++ /dev/null @@ -1,264 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="4" - -MY_EXTRAS_VER="20140514-0124Z" -# PBXT -PBXT_VERSION='1.0.11-6-pre-ga' -# XtraDB -PERCONA_VER='5.1.45-10' XTRADB_VER='1.0.6-10' - -# Build type -BUILD="autotools" - -inherit toolchain-funcs mysql-v2 - -# 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 ~ppc-macos ~x64-macos ~x86-solaris" - -# When MY_EXTRAS is bumped, the index should be revised to exclude these. -# This is often broken still -EPATCH_EXCLUDE='' - -# Most of these are in the eclass -DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 ) - >=sys-devel/libtool-2.2.10" -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 -src_prepare() { - sed -i \ - -e '/^noinst_PROGRAMS/s/basic-t//g' \ - "${S}"/unittest/mytap/t/Makefile.am - mysql-v2_src_prepare -} - -# Official test instructions: -# USE='berkdb -cluster embedded extraengine perl ssl community' \ -# FEATURES='test userpriv -usersandbox' \ -# ebuild mysql-X.X.XX.ebuild \ -# digest clean package -src_test() { - # 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" - - emake check || die "make check failed" - if ! use "minimal" ; 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" - cd "${S}" - einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" - local retstatus_unit - local retstatus_ns - local retstatus_ps - local t - addpredict /this-dir-does-not-exist/t9.MYI - - # Ensure that parallel runs don't die - export MTR_BUILD_THREAD="$((${RANDOM} % 100))" - - # archive_gis really sucks a lot, but it's only relevant for the - # USE=extraengines case - case ${PV} in - 5.0.42) - mysql-v2_disable_test "archive_gis" "Totally broken in 5.0.42" - ;; - - 5.0.4[3-9]|5.0.[56]*|5.0.70|5.0.87) - [ "$(tc-endian)" == "big" ] && \ - mysql-v2_disable_test \ - "archive_gis" \ - "Broken in 5.0.43-70 and 5.0.87 on big-endian boxes only" - ;; - esac - - # This was a slight testcase breakage when the read_only security issue - # was fixed. - case ${PV} in - 5.0.54|5.0.51*) - mysql-v2_disable_test \ - "read_only" \ - "Broken in 5.0.51-54, output in wrong order" - ;; - esac - - # Ditto to read_only - [ "${PV}" == "5.0.51a" ] && \ - mysql-v2_disable_test \ - "view" \ - "Broken in 5.0.51, output in wrong order" - - # x86-specific, OOM issue with some subselects on low memory servers - [ "${PV}" == "5.0.54" ] && \ - [ "${ARCH/x86}" != "${ARCH}" ] && \ - mysql-v2_disable_test \ - "subselect" \ - "Testcase needs tuning on x86 for oom condition" - - # Broke with the YaSSL security issue that didn't affect Gentoo. - [ "${PV}" == "5.0.56" ] && \ - for t in openssl_1 rpl_openssl rpl_ssl ssl \ - ssl_8k_key ssl_compress ssl_connect ; do \ - mysql-v2_disable_test \ - "$t" \ - "OpenSSL tests broken on 5.0.56" - done - - # New test was broken in first time - # Upstream bug 41066 - # http://bugs.mysql.com/bug.php?id=41066 - [ "${PV}" == "5.0.72" ] && \ - mysql-v2_disable_test \ - "status2" \ - "Broken in 5.0.72, new test is broken, upstream bug #41066" - - # The entire 5.0 series has pre-generated SSL certificates, they have - # mostly expired now. ${S}/mysql-tests/std-data/*.pem - # The certs really SHOULD be generated for the tests, so that they are - # not expiring like this. We cannot do so ourselves as the tests look - # closely as the cert path data, and we do not have the CA key to regen - # ourselves. Alternatively, upstream should generate them with at least - # 50-year validity. - # - # Known expiry points: - # 4.1.*, 5.0.0-5.0.22, 5.1.7: Expires 2013/09/09 - # 5.0.23-5.0.77, 5.1.7-5.1.22?: Expires 2009/01/27 - # 5.0.78-5.0.90, 5.1.??-5.1.42: Expires 2010/01/28 - # - # mysql-test/std_data/untrusted-cacert.pem is MEANT to be - # expired/invalid. - case ${PV} in - 5.0.*|5.1.*|5.4.*|5.5.*) - for t in openssl_1 rpl_openssl rpl.rpl_ssl rpl.rpl_ssl1 ssl ssl_8k_key \ - ssl_compress ssl_connect rpl.rpl_heartbeat_ssl ; do \ - mysql-v2_disable_test \ - "$t" \ - "These OpenSSL tests break due to expired certificates" - done - ;; - esac - - # These are also failing in MySQL 5.1 for now, and are believed to be - # false positives: - # - # main.mysql_comment, main.mysql_upgrade, main.information_schema, - # funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers: - # fails due to USE=-latin1 / utf8 default - # - # main.mysql_client_test: - # segfaults at random under Portage only, suspect resource limits. - # - # main.not_partition: - # Failure reason unknown at this time, must resolve before package.mask - # removal FIXME - case ${PV} in - 5.1.*|5.4.*|5.5.*) - for t in main.mysql_client_test main.mysql_comments \ - main.mysql_upgrade \ - main.information_schema \ - main.not_partition funcs_1.is_columns_mysql \ - funcs_1.is_tables_mysql funcs_1.is_triggers; do - mysql-v2_disable_test "$t" "False positives in Gentoo" - done - ;; - esac - - # New failures in 5.1.50/5.1.51, reported by jmbsvicetto. - # These tests are picking up a 'connect-timeout' config from somewhere, - # which is not valid, and since it does not have 'loose-' in front of - # it, it's causing a failure - case ${PV} in - 5.1.5*|5.4.*|5.5.*|6*) - for t in rpl.rpl_mysql_upgrade main.log_tables_upgrade ; do - mysql-v2_disable_test "$t" \ - "False positives in Gentoo: connect-timeout" - done - ;; - esac - - use profiling && use community \ - || mysql-v2_disable_test main.profiling \ - "Profiling test needs profiling support" - - if [ "${PN}" == "mariadb" ]; then - for t in \ - parts.part_supported_sql_func_ndb \ - parts.partition_auto_increment_ndb ; do - mysql-v2_disable_test $t "ndb not supported in mariadb" - done - fi - - # This fail with XtraDB in place of normal InnoDB - # TODO: test if they are broken with the rest of the Percona patches - if xtradb_patch_available && use xtradb ; then - for t in main.innodb innodb.innodb_bug51378 \ - main.information_schema_db main.mysqlshow \ - main.innodb-autoinc main.innodb_bug21704 \ - main.innodb_bug44369 main.innodb_bug46000 \ - main.index_merge_innodb \ - innodb.innodb innodb.innodb_misc1 innodb.innodb_bug52663 \ - innodb.innodb-autoinc innodb.innodb-autoinc-44030 \ - innodb.innodb_bug21704 innodb.innodb_bug44369 \ - innodb.innodb_bug46000 innodb.innodb_bug48024 \ - innodb.innodb_bug49164 innodb.innodb_bug51920 \ - innodb.innodb_bug54044 \ - ; do - mysql-v2_disable_test $t "tests broken in xtradb" - done - fi - - if ! use extraengine ; then - # bug 332565 - for t in main.range ; do - mysql-v2_disable_test $t "Test $t requires USE=extraengine" - done - # bug 401673 - for t in federated.federated_plugin ; do - mysql-v2_disable_test $t "Test $t requires USE=extraengine (Need federated engine)" - done - fi - - # create directories because mysqladmin might make out of order - mkdir -p "${S}"/mysql-test/var-{ps,ns}{,/log} - - # We run the test protocols seperately - emake test-unit - retstatus_unit=$? - [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" - - emake test-ns force="--force --vardir=${S}/mysql-test/var-ns" - retstatus_ns=$? - [[ $retstatus_ns -eq 0 ]] || eerror "test-ns failed" - has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" - - emake test-ps force="--force --vardir=${S}/mysql-test/var-ps" - retstatus_ps=$? - [[ $retstatus_ps -eq 0 ]] || eerror "test-ps failed" - has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" - - # TODO: - # When upstream enables the pr and nr testsuites, we need those as well. - - # 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_ns -eq 0 ]] || failures="${failures} test-ns" - [[ $retstatus_ps -eq 0 ]] || failures="${failures} test-ps" - 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.5.62.ebuild b/dev-db/mysql/mysql-5.5.62.ebuild deleted file mode 100644 index cb22969..0000000 --- a/dev-db/mysql/mysql-5.5.62.ebuild +++ /dev/null @@ -1,797 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -MY_EXTRAS_VER="20180804-2323Z" -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 ~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" -) - -# 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 - ) - - 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_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 federated.federated_plugin \ - 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.7.21.ebuild b/dev-db/mysql/mysql-5.7.21.ebuild deleted file mode 100644 index 681748a..0000000 --- a/dev-db/mysql/mysql-5.7.21.ebuild +++ /dev/null @@ -1,855 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -MY_EXTRAS_VER="20180312-2011Z" - -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-minimal - -SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz - https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz - http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz" - -# Gentoo patches to MySQL -if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then - SRC_URI="${SRC_URI} - mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - 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/20" -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="~amd64 ~arm ~hppa ~ia64 ~ppc64 ~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}"/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.21-without-clientlibs-tools.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=" - 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? ( - 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= ) - ) - ) - client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] ) - !client-libs? ( >=sys-libs/zlib-1.2.3:0= ) - sys-libs/ncurses:0= - server? ( - >=app-arch/lz4-0_p131:= - >=dev-libs/boost-1.65.0:= - numa? ( sys-process/numactl ) - ) -" -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 ) - abi_x86_32? ( !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] ) - 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 ) - !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )" - -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 - - # Note about configuration change - einfo - elog "This version of mysql reorganizes the configuration from a single my.cnf" - elog "to several files in /etc/mysql/${PN}.d." - elog "Please backup any changes you made to /etc/mysql/my.cnf" - elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension." - elog "You may have as many files as needed and they are read alphabetically." - elog "Be sure the options have the appropitate section headers, i.e. [mysqld]." - einfo -} - -src_unpack() { - unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR}/${P}" "${S}" || die -} - -src_prepare() { - 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 - - 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 - - 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_RAPID=OFF - -DWITH_LIBEVENT=NO - -DWITH_CURL=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_BOOST="${S}/boost" - -DWITH_LZ4=system - -DWITH_NUMA=$(usex numa 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 - -DENABLED_PROFILING=$(usex profiling) - ) - - if use static; then - mycmakeargs+=( -DWITH_PIC=1 ) - fi - - if use jemalloc || use tcmalloc ; then - mycmakeargs+=( -DWITH_SAFEMALLOC=OFF ) - fi - - # Storage engines - mycmakeargs+=( - -DWITH_EXAMPLE_STORAGE_ENGINE=0 - -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() { - if use client-libs ; then - multilib-minimal_src_compile - else - multilib_src_compile - fi -} - -multilib_src_compile() { - cmake-utils_src_compile -} - -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 - - 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: - # - # main.mysql_client_test, main.mysql_client_test_nonblock - # main.mysql_client_test_comp: - # segfaults at random under Portage only, suspect resource limits. - - local t -# for t in plugins.cracklib_password_check plugins.two_password_validations ; do -# _disable_test "$t" "False positive due to varying policies" -# done - -# for t in main.mysql_client_test main.mysql_client_test_nonblock \ -# main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do -# _disable_test "$t" "False positives in Gentoo" -# done - -# 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 - - # --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="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES" - "${EROOT}/usr/bin/mysql" \ - "--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/Manifest b/dev-db/percona-server/Manifest deleted file mode 100644 index 9ed8f85..0000000 --- a/dev-db/percona-server/Manifest +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -DIST mysql-extras-20180329-0129Z.tar.bz2 319349 SHA256 28a78255c5394ec9ce67c051bbef544c96abdd9aa38fc7036d4e77b9dd154001 SHA512 6cd96b2cd3d1361fc838f6914b630ec24595849344ac2f54bc96bfcad64a38eca6562a76f26b92ecdf4c75ad7b874530181555b8a72b25f30bd49bf3eb08bd73 WHIRLPOOL dbb2d84367da842c4eb53b4a925bad60cd0152d2950afad62c758e47eb13a96410a7705b91b58b7704fc192980794fdda4a6ecdff05090e95c20508b59d666ab -DIST percona-server-5.6.39-83.1.tar.gz 56307662 SHA256 48939062738cd5e7769381e31ec581492317ff48c19d0b7ce362e0e61b5d01e2 SHA512 d014bc0ebf8d8f1842b4a79eb0a868e3c9e0e33d3eb3cbf301b5504dcb341e1f2a0d6c2c4003666f59fbf75eb274356ee6b059ff2cddf2b457143ee5e1aba471 WHIRLPOOL 505b784cec2ef81e9bb82c73efb9ae465463b93e465ba6b4e2ec21f55d310acea4b4203dcba8a7e39ad0c8d4060a94c9eab6a26f5f4bed1024e1a81212246783 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQKTBAEBCAB9FiEEZsLkTtkOMnWOfVXA0feB7/n0o7YFAlq8Q11fFIAAAAAALgAo -aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDY2 -QzJFNDRFRDkwRTMyNzU4RTdENTVDMEQxRjc4MUVGRjlGNEEzQjYACgkQ0feB7/n0 -o7ZayA//S96Ao7rJ/2L35OmI2vsXOLUZ8JGlNhhc4of7M1VWwVBab2yKYBaTwYau -C/kLH/zYjTUYCkUYUL8pQJd8Tb353rPcp1HJIyTF10g3QgxTr6QzNCqcg2pJwRui -wkqAsUVP64EX6spUMlngWWxREywn/p9GsFi6MZUJ4QK8V/7yRMg+gENl1oPq04Vl -fw8HQn8LICRbLfhSjdaLcFxQr2TJBoTXBg7LAT549Q1jfMNZpt3zvhrI1/IWIrvr -RM6QTwUd2viJl8OMmTEVl5pZ5dJMW6jiUIazu5IG88lcPastN4iamdjiDWjxKZcB -ASfRReG9Jgu9cAshTsqlSOsUZgqwRE0cbZ0q4r/Sy4/ekIyRNZy3MxfsmZtf9vmr -LfQ1YWwtLvff/k1LbcCm+BAC34KcyYHtbNQtM0kcbGx1wB7MUWIgqT2hHDB1D1IC -XskzodgGwPTuZaAEZjL5o4PA9qy5qYUFBTS2szhRPBfHgvDAnP9NB47jDutjllxz -slG2f/aQFKRvuqyXG7wGyFi8nsSaCLWmyjIoQjltYOcK+147liPbbCMgB9r26/QS -kyXnLfkac8cf/utdYXilr37nFOZnQR3BZm5tDXXGrdOLINv47QB1oYwAdx4W0kOE -oyeQ2DzjyNikXpUZzfA/cniu+Q+qOHEM0+U1eJrKwKb1uS+rLz8= -=BeQ7 ------END PGP SIGNATURE----- diff --git a/dev-db/percona-server/files/my.cnf-5.6 b/dev-db/percona-server/files/my.cnf-5.6 deleted file mode 100644 index 047c8d7..0000000 --- a/dev-db/percona-server/files/my.cnf-5.6 +++ /dev/null @@ -1,140 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. - -# The following options will be passed to all MySQL clients -[client] -#password = your_password -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock - -[mysql] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqladmin] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlcheck] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqldump] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlimport] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysqlshow] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[myisamchk] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -# use [safe_mysqld] with mysql-3 -[mysqld_safe] -err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid -log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err -basedir = @GENTOO_PORTAGE_EPREFIX@/usr -datadir = @DATADIR@ -skip-external-locking -key_buffer_size = 16M -max_allowed_packet = 4M -table_open_cache = 400 -sort_buffer_size = 512K -net_buffer_length = 16K -read_buffer_size = 256K -read_rnd_buffer_size = 512K -myisam_sort_buffer_size = 8M -lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql -#Set this to your desired error message language -lc_messages = en_US - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ -#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname - -# you need the debug USE flag enabled to use the following directives, -# if needed, uncomment them, start the server and issue -# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace -# this will show you *exactly* what's happening in your server ;) - -#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql -#gdb -#debug = d:t:i:o,/tmp/mysqld.trace -#one-thread - -# the rest of the innodb config follows: -# don't eat too much memory, we're trying to be safe on 64Mb boxes -# you might want to bump this up a bit on boxes with more RAM -innodb_buffer_pool_size = 128M -# -# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( -# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route -# we have to take for the moment -#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ -# you may wish to change this size to be more suitable for your system -# the max is there to avoid run-away growth on your machine -innodb_data_file_path = ibdata1:10M:autoextend:max:128M -# we keep this at around 25% of of innodb_buffer_pool_size -# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) -innodb_log_file_size = 48M -# this is the default, increase it if you have very large transactions going on -innodb_log_buffer_size = 8M -# this is the default and won't hurt you -# you shouldn't need to tweak it -innodb_log_files_in_group=2 -# see the innodb config docs, the other options are not always safe -innodb_flush_log_at_trx_commit = 1 -innodb_lock_wait_timeout = 50 -innodb_file_per_table - -# Uncomment this to get FEDERATED engine support -#plugin-load=federated=ha_federated.so -loose-federated - -[mysqldump] -quick -max_allowed_packet = 16M - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[isamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer = 2M -write_buffer = 2M - -[myisamchk] -key_buffer_size = 20M -sort_buffer_size = 20M -read_buffer_size = 2M -write_buffer_size = 2M - -[mysqlhotcopy] -interactive-timeout diff --git a/dev-db/percona-server/files/my.cnf-5.7 b/dev-db/percona-server/files/my.cnf-5.7 deleted file mode 100644 index 571ebf0..0000000 --- a/dev-db/percona-server/files/my.cnf-5.7 +++ /dev/null @@ -1,3 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. - -!includedir @GENTOO_PORTAGE_EPREFIX@/etc/mysql/mysql.d diff --git a/dev-db/percona-server/files/my.cnf.distro-client b/dev-db/percona-server/files/my.cnf.distro-client deleted file mode 100644 index 8bf1836..0000000 --- a/dev-db/percona-server/files/my.cnf.distro-client +++ /dev/null @@ -1,21 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/50-distro-client.cnf: The global mysql configuration file. - -# The following options will be passed to all MySQL clients -[client] -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -character-sets-dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets -default-character-set=utf8 - -[mysql] -# uncomment the next directive if you are not familiar with SQL -#safe-updates - -[mysqldump] -quick -max_allowed_packet = 16M - -[myisamchk] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets - -[myisampack] -character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets diff --git a/dev-db/percona-server/files/my.cnf.distro-server b/dev-db/percona-server/files/my.cnf.distro-server deleted file mode 100644 index d4ed30c..0000000 --- a/dev-db/percona-server/files/my.cnf.distro-server +++ /dev/null @@ -1,28 +0,0 @@ -# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/50-distro-server.cnf: The global mysql configuration file. - -# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations -[mysqld] -character-set-server = utf8 -user = mysql -port = 3306 -socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock -pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysql.pid -log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err -basedir = @GENTOO_PORTAGE_EPREFIX@/usr -datadir = @DATADIR@ -skip-external-locking -lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql -#Set this to your desired error message language -lc_messages = en_US - -# security: -# using "localhost" in connects uses sockets by default -# skip-networking -bind-address = 127.0.0.1 - -log-bin -server-id = 1 - -# point the following paths to different dedicated disks -tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ -#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml deleted file mode 100644 index 526cc50..0000000 --- a/dev-db/percona-server/metadata.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>mysql-bugs@gentoo.org</email> - <name>MySQL</name> - </maintainer> - <maintainer type="person"> - <email>hasufell@gentoo.org</email> - <description>Libressl issues. Only assign if it's a direct Libressl issue. Do not directly assign for anything else.</description> - </maintainer> -<use> - <flag name="client-libs">Build the libmysqlclient libraries</flag> - <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="numa">Enable NUMA support using <pkg>sys-process/numactl</pkg> (NUMA kernel support is also required)</flag> - <flag name="profiling">Add support for statement profiling (requires USE=community).</flag> - <flag name="rocksdb">Add support for RocksDB; a key/value, LSM database optimized for flash storage</flag> - <flag name="server">Build the server program</flag> - <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag> - <flag name="test-suite">Install upstream testsuites for end use.</flag> - <flag name="tokudb">Add support for TokuDB storage engine</flag> - <flag name="tokudb-backup-plugin">Builds the TokuDB backup plugin</flag> - <flag name="yassl">Enable SSL connections and crypto functions using the bundled yaSSL</flag> -</use> -</pkgmetadata> diff --git a/dev-db/percona-server/percona-server-5.6.39.83.1-r1.ebuild b/dev-db/percona-server/percona-server-5.6.39.83.1-r1.ebuild deleted file mode 100644 index 89fe0ee..0000000 --- a/dev-db/percona-server/percona-server-5.6.39.83.1-r1.ebuild +++ /dev/null @@ -1,944 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -MY_EXTRAS_VER="20180329-0129Z" -PYTHON_COMPAT=( python2_7 ) -CMAKE_MAKEFILE_GENERATOR=emake - -# Keeping eutils in EAPI=6 for emktemp in pkg_config - -inherit linux-info python-any-r1 eutils flag-o-matic prefix toolchain-funcs \ - versionator user cmake-utils multilib-minimal - -MY_PV=$(replace_version_separator 3 '-') -MY_PN="Percona-Server" -MY_MAJOR_PV=$(get_version_component_range 1-2) -MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/5.6/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" - -# 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.percona.com/software/percona-server" -DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team" -LICENSE="GPL-2" -SLOT="0/18" -IUSE="-client-libs cracklib debug jemalloc latin1 libressl numa pam +perl profiling rocksdb selinux - +server static static-libs systemtap tcmalloc test test-suite tokudb tokudb-backup-plugin yassl" - -# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests -RESTRICT="libressl? ( test )" - -REQUIRED_USE="tokudb-backup-plugin? ( tokudb ) tokudb? ( jemalloc !tcmalloc ) ?? ( tcmalloc jemalloc ) static? ( yassl )" - -KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc64 ~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}"/20001_all_fix-minimal-build-cmake-mysql-5.6.20.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_percona-server-5.6.39-without-clientlibs-tools.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=" - 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? ( - 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= ) - ) - ) - client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] ) - !client-libs? ( >=sys-libs/zlib-1.2.3:0= ) - sys-libs/ncurses:0= - server? ( - >=dev-libs/boost-1.65.0:= - numa? ( sys-process/numactl ) - pam? ( virtual/pam:0= ) - tokudb? ( app-arch/snappy ) - tokudb-backup-plugin? ( dev-util/valgrind ) - ) - !client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] ) -" -DEPEND="virtual/yacc - static? ( sys-libs/ncurses[static-libs] ) - test? ( - $(python_gen_any_dep 'dev-python/mysql-python[${PYTHON_USEDEP}]') - dev-perl/JSON - ) - ${COMMON_DEPEND}" -RDEPEND="selinux? ( sec-policy/selinux-mysql ) - abi_x86_32? ( !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] ) - 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 )" - -python_check_deps() { - 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) - if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} with tokudb needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on - # non x86{,_64} arches - if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - fi - if has test ${FEATURES} && \ - use server && ! has userpriv ${FEATURES} ; then - eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - - # This should come after all of the die statements - enewgroup mysql 60 || die "problem adding 'mysql' group" - enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" -} - -src_unpack() { - unpack ${A} - - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR}/${PN}-${MY_PV}" "${S}" || die -} - -src_prepare() { - if use jemalloc ; then - echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die - elif 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 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 - - 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 - - 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_SQLBENCHDIR=NO - -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 - ) - if use test || use test-suite ; 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_PAM=$(usex pam) - -DWITH_NUMA=$(usex numa 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 - -DENABLED_PROFILING=$(usex profiling) - ) - - 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_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_FEDERATED_STORAGE_ENGINE=1 - -DWITH_INNODB_MEMCACHED=0 - -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: -# 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" - - 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 "Failed to create \"${T}/var-tests{,/log}\"" - - # Run mysql tests - pushd "${TESTDIR}" > /dev/null || die "Failed to chdir into \"${TESTDIR}\"" - - touch "${T}/disabled.def" - # These are failing in MySQL 5.6 for now and are believed to be - # false positives: - - local t - for t in main.mysql_client_test \ - binlog.binlog_statement_insert_delayed main.information_schema \ - main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \ - perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \ - funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \ - main.variables main.myisam main.merge_recover \ - engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \ - engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \ - engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \ - main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do - _disable_test "$t" "False positives in Gentoo" - done - - if use numa && use kernel_linux ; then - # bug 584880 - if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then - for t in sys_vars.innodb_buffer_pool_populate_basic ; do - _disable_test "$t" "Test $t requires system with NUMA support" - done - fi - fi - - # Set file limits higher so tests run - 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 - - python_setup - # run mysql-test tests - perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ - --testcase-timeout=30 --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" - - if [[ -n "$failures" ]] ; then - if has usersandbox ${FEATURES}; then - ewarn "Some tests may have failed due to FEATURES=usersandbox" - ewarn "Please confirm test failure with FEATURES=-usersandbox before reporting a bug." - fi - - die "Test failures: $failures" - fi - - 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-suite ; then - rm -rf "${D%/}/${MY_SHAREDSTATEDIR#/}/mysql-test" || die - fi - - # Configuration stuff - einfo "Building default configuration ..." - insinto "${MY_SYSCONFDIR#${EPREFIX}}" - [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf - 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" - for script in \ - "${S}"/support-files/my-*.cnf.sh \ - "${S}"/support-files/magic \ - "${S}"/support-files/ndb-config-2-node.ini.sh - 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" -} - -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 "${EROOT%/}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${EROOT%/}${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 - local _replacing_version= - for _replacing_version in ${REPLACING_VERSIONS}; do - local _new_version_branch=$(get_version_component_range 1-3 "${PV}") - local _replacing_version_branch=$(get_version_component_range 1-3 "${_replacing_version}") - debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..." - - if ! version_is_at_least "${_new_version_branch}" "${_replacing_version_branch}"; then - debug-print "Upgrading from v${_replacing_version_branch} to v${_new_version_branch} ..." - # https://www.percona.com/blog/2014/09/19/mysql-upgrade-best-practices/ - - einfo - elog "You are upgrading an existing ${PN} installation, you should review" - elog "release notes at ${MY_RELEASE_NOTES_URI}" - elog "and run the mysql_upgrade tool." - einfo - - // Break loop - we only want to show this hint once - break - fi - done - fi - - elog "Since ${PN}-5.6.39.83.1-r1 we no longer provide client libs." - elog "Applications depending on client libs should migrate to dev-db/mysql-connector-c" - elog "as their new client lib provider." - einfo - fi -} - -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" - } - - # 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" - - 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="${EROOT%/}/${MY_DATADIR#/}" - MY_DATADIR_s="${MY_DATADIR_s%%/}" - local old_MY_DATADIR_s="${EROOT%/}/${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 - - # These are dir+prefix - MYSQL_TMPDIR="$(_getoptval mysqld tmpdir)" - 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%/}/${MY_DATADIR#/}/mysql" ]] ; then - ewarn "You have already a MySQL database in place." - ewarn "(${EROOT%/}/${MY_DATADIR#/}/*)" - ewarn "Please rename or delete it if you wish to replace it." - die "MySQL database already exists!" - fi - - 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 - - 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 - - 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 "${EROOT%/}/${MY_DATADIR#/}" ]] ; then - install -d -m 750 -o mysql -g mysql "${EROOT%/}/${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=${EROOT%/}/usr" ${options} "--datadir=${EROOT%/}/${MY_DATADIR#/}" "--tmpdir=${EROOT%/}/${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 ${EROOT%/}/var/log/mysql/mysqld.err AND ${TMPDIR%/}/mysql_install_db.log" - fi - popd &>/dev/null || die - [[ -f "${EROOT%/}/${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=${EROOT%/}/${MY_DATADIR#/} \ - --max_allowed_packet=8M \ - --net_buffer_length=16K \ - --socket=${socket} \ - --pid-file=${pidfile} - --tmpdir=${EROOT%/}/${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-java/mariadb-java-client/ChangeLog b/dev-java/mariadb-java-client/ChangeLog deleted file mode 100644 index 2813c2f..0000000 --- a/dev-java/mariadb-java-client/ChangeLog +++ /dev/null @@ -1,21 +0,0 @@ - 15 Aug 2015; Brian Evans <grknight@gentoo.org> - mariadb-java-client-1.1.7.ebuild, mariadb-java-client-9999.ebuild: - dev-java/mariadb-java-client: fix QA inherit wrt bug 557730 - - 15 Aug 2015; Brian Evans <grknight@gentoo.org> - mariadb-java-client-1.1.7.ebuild, mariadb-java-client-9999.ebuild: - dev-java/mariadb-java-client: Fix download locations - -*mariadb-java-client-1.1.4 (10 Sep 2013) - - 10 Sep 2013; Brian Evans <grknight@tuffmail.com> +files/maven-build-1.1.4.xml, - +mariadb-java-client-1.1.4.ebuild: - [mariadb-java-client] Version bump - -*mariadb-java-client-1.1.3 (01 Jul 2013) -*mariadb-java-client-9999 (01 Jul 2013) - - 01 Jul 2013; Brian Evans <grknight@lavabit.com> +files/maven-build.xml, - +mariadb-java-client-1.1.3.ebuild, +mariadb-java-client-9999.ebuild, - +metadata.xml: - New ebuilds for MariaDB's LGPL JDBC Client diff --git a/dev-java/mariadb-java-client/Manifest b/dev-java/mariadb-java-client/Manifest deleted file mode 100644 index 29ecb34..0000000 --- a/dev-java/mariadb-java-client/Manifest +++ /dev/null @@ -1,23 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - -DIST mariadb-java-client-1.1.7.tar.gz 187189 SHA256 5d0901777eabb477d65d9e1e123a8ade921c0dba486d26626c58b817bef05e82 SHA512 68f1cac13c508daedb03bb433a91d57526bd427f44f1fc2604095af1d947271d8328a44e82f64e6d93f474b4d7d9749f01810f2faf0027862554168d3a314aaa WHIRLPOOL 36d4cbb073c08e703df19023f8b85089940cac8775c05fa41262b44948ac289d8c63014ef604b44642a74915406adaf3c3ccbaf4170fca60a58776004126647f ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0 - -iQJ8BAEBCABmBQJVz03/XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w -ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NkMyRTQ0RUQ5MEUzMjc1OEU3RDU1QzBE -MUY3ODFFRkY5RjRBM0I2AAoJENH3ge/59KO252sP/2W8oL0BSwcc8AptuImc4twJ -4C9CI8DnTkUIf4HuOg7Vy/cfjc+3iOyfuseXA1hECjYsOF7KmDr4swZ18BDv7PJO -l/IOVPlTToszPxLwDqGX16k7lraib4ZOEasOfbLf9RTkz6ksQlnbWA1+bybajczq -P0ya8P2CetIdTEL3ZnWWOmspiWOEI8VpiAwuhKUv2Ra9bprRXbLC5/JxE4m78RDI -9RIu36zaeKPLtuHZbFaExRbr2Ck9+qow+WyWT8FvG6VCvKMbiEQtzP7K12BQpWAf -C83eaGHSeSnjoj/o7Ai+WKbS5HUiJbWxBT2uoX1NOHl4D29AwgAy097mxcz7GFGI -1vdGRLoNpfwvf2x0pkqnfybSAQICtRK6e9hqvBh0gpbTWjIHcQmPnaiJjMyfc2r3 -GYvdfuc72y3Rl0pDo0aVAvqrGZ3Y2VEcPPNKfV7eAZicslKNbgNMmnzQod/xYn67 -/tzMlGu9OYX+7YBl/tEPkIkta+6ZDTW/cTbrPNy+QqSk8pcYwYjJWR36WIm/Yj5B -ujLBKBkODkZfZveRyCaPzlK2e0lsdHcR0dWPTrhu6zTh6DXnwBVaWhr3E30JBgHH -KFb3GFwU4fAAJ16aQqieNEmno0iE/eVFJmEUCL43L8e1ztraItTiuoqG9AK4wM/j -mwSHEjQwwyKPu7vSCPh/ -=OSca ------END PGP SIGNATURE----- diff --git a/dev-java/mariadb-java-client/files/maven-build-1.1.4.xml b/dev-java/mariadb-java-client/files/maven-build-1.1.4.xml deleted file mode 100644 index 0a62494..0000000 --- a/dev-java/mariadb-java-client/files/maven-build-1.1.4.xml +++ /dev/null @@ -1,253 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- ====================================================================== --> -<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. --> -<!-- ====================================================================== --> - -<!-- ====================================================================== --> -<!-- ===================== - DO NOT EDIT THIS FILE! - ===================== --> -<!-- ====================================================================== --> -<!-- --> -<!-- Any modifications will be overwritten. --> -<!-- --> -<!-- Generated by Maven Ant Plugin on 7/1/13 1:49 PM --> -<!-- See: http://maven.apache.org/plugins/maven-ant-plugin/ --> -<!-- --> -<!-- ====================================================================== --> - -<project name="mariadb-java-client-from-maven" default="package" basedir="."> - - <!-- ====================================================================== --> - <!-- Build environment properties --> - <!-- ====================================================================== --> - - <property file="${user.home}/.m2/maven.properties"/> - <property file="maven-build.properties"/> - - <property name="maven.build.finalName" value="mariadb-java-client"/> - <property name="maven.build.dir" value="target"/> - <property name="maven.build.outputDir" value="${maven.build.dir}/classes"/> - <property name="maven.build.srcDir.0" value="src/main/java"/> - <property name="maven.build.resourceDir.0" value="src/main/resources"/> - <property name="maven.build.testOutputDir" value="${maven.build.dir}/test-classes"/> - <property name="maven.build.testDir.0" value="src/test/java"/> - <property name="maven.build.testResourceDir.0" value="src/test/resources"/> - <property name="maven.test.reports" value="${maven.build.dir}/test-reports"/> - <property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site"/> - - <property name="maven.repo.local" value="${user.home}/.m2/repository"/> - <property name="maven.settings.offline" value="false"/> - <property name="maven.settings.interactiveMode" value="true"/> - - <!-- ====================================================================== --> - <!-- Defining classpaths --> - <!-- ====================================================================== --> - - <path id="build.classpath"> - <pathelement location="${maven.repo.local}/net/java/dev/jna/jna/3.3.0/jna-3.3.0.jar"/> - <pathelement location="${maven.repo.local}/net/java/dev/jna/jna/3.3.0/jna-3.3.0-platform.jar"/> - </path> - <path id="build.test.classpath"> - <pathelement location="${maven.repo.local}/junit/junit/4.6/junit-4.6.jar"/> - </path> - - <!-- ====================================================================== --> - <!-- Cleaning up target --> - <!-- ====================================================================== --> - - <target name="clean" description="Clean the output directory"> - <delete dir="${maven.build.dir}"/> - </target> - - <!-- ====================================================================== --> - <!-- Compilation target --> - <!-- ====================================================================== --> - - <target name="compile" depends="get-deps" description="Compile the code"> - <mkdir dir="${maven.build.outputDir}"/> - <javac destdir="${maven.build.outputDir}" - nowarn="false" - debug="true" - optimize="false" - deprecation="true" - target="1.6" - verbose="false" - fork="false" - source="1.6"> - <src> - <pathelement location="${maven.build.srcDir.0}"/> - </src> - <classpath refid="build.classpath"/> - </javac> - <copy todir="${maven.build.outputDir}"> - <fileset dir="${maven.build.resourceDir.0}"/> - </copy> - </target> - - <!-- ====================================================================== --> - <!-- Test-compilation target --> - <!-- ====================================================================== --> - - <target name="compile-tests" - depends="compile" - description="Compile the test code" - unless="maven.test.skip"> - <mkdir dir="${maven.build.testOutputDir}"/> - <javac destdir="${maven.build.testOutputDir}" - nowarn="false" - debug="true" - optimize="false" - deprecation="true" - target="1.6" - verbose="false" - fork="false" - source="1.6"> - <src> - <pathelement location="${maven.build.testDir.0}"/> - </src> - <classpath> - <path refid="build.test.classpath"/> - <pathelement location="${maven.build.outputDir}"/> - </classpath> - </javac> - <copy todir="${maven.build.testOutputDir}"> - <fileset dir="${maven.build.testResourceDir.0}"/> - </copy> - </target> - - <!-- ====================================================================== --> - <!-- Run all tests --> - <!-- ====================================================================== --> - - <target name="test" - depends="compile-tests, junit-missing" - unless="junit.skipped" - description="Run the test cases"> - <mkdir dir="${maven.test.reports}"/> - <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir="."> - <sysproperty key="basedir" value="."/> - <formatter type="xml"/> - <formatter type="plain" usefile="false"/> - <classpath> - <path refid="build.test.classpath"/> - <pathelement location="${maven.build.outputDir}"/> - <pathelement location="${maven.build.testOutputDir}"/> - </classpath> - <batchtest todir="${maven.test.reports}" unless="test"> - <fileset dir="${maven.build.testDir.0}"> - <include name="**/Test*.java"/> - <include name="**/*Test.java"/> - <include name="**/*TestCase.java"/> - <exclude name="**/*Abstract*Test.java"/> - </fileset> - </batchtest> - <batchtest todir="${maven.test.reports}" if="test"> - <fileset dir="${maven.build.testDir.0}"> - <include name="**/${test}.java"/> - <exclude name="**/*Abstract*Test.java"/> - </fileset> - </batchtest> - </junit> - </target> - - <target name="test-junit-present"> - <available classname="junit.framework.Test" property="junit.present"/> - </target> - - <target name="test-junit-status" - depends="test-junit-present"> - <condition property="junit.missing"> - <and> - <isfalse value="${junit.present}"/> - <isfalse value="${maven.test.skip}"/> - </and> - </condition> - <condition property="junit.skipped"> - <or> - <isfalse value="${junit.present}"/> - <istrue value="${maven.test.skip}"/> - </or> - </condition> - </target> - - <target name="junit-missing" - depends="test-junit-status" - if="junit.missing"> - <echo>=================================== WARNING ===================================</echo> - <echo> JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.</echo> - <echo>===============================================================================</echo> - </target> - - <!-- ====================================================================== --> - <!-- Javadoc target --> - <!-- ====================================================================== --> - - <target name="javadoc" description="Generates the Javadoc of the application"> - <javadoc sourcepath="${maven.build.srcDir.0}" - packagenames="*" - destdir="${maven.reporting.outputDirectory}/apidocs" - access="protected" - old="false" - verbose="false" - version="true" - use="true" - author="true" - splitindex="false" - nodeprecated="false" - nodeprecatedlist="false" - notree="false" - noindex="false" - nohelp="false" - nonavbar="false" - serialwarn="false" - charset="ISO-8859-1" - linksource="false" - breakiterator="false"/> - </target> - - <!-- ====================================================================== --> - <!-- Package target --> - <!-- ====================================================================== --> - - <target name="package" depends="compile,test" description="Package the application"> - <jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar" - compress="true" - index="false" - manifest="src/main/resources/META-INF/MANIFEST.MF" - basedir="${maven.build.outputDir}" - excludes="**/package.html"/> - </target> - - <!-- ====================================================================== --> - <!-- A dummy target for the package named after the type it creates --> - <!-- ====================================================================== --> - - <target name="jar" depends="package" description="Builds the jar for the application"/> - - <!-- ====================================================================== --> - <!-- Download dependencies target --> - <!-- ====================================================================== --> - - <target name="test-offline"> - <condition property="maven.mode.offline"> - <equals arg1="${maven.settings.offline}" arg2="true"/> - </condition> - </target> - - <target name="get-deps" - depends="test-offline" - description="Download all dependencies" - unless="maven.mode.offline"> - <mkdir dir="${maven.repo.local}"/> - <mkdir dir="${maven.repo.local}/junit/junit/4.6"/> - <get src="https://oss.sonatype.org/content/repositories/snapshots/junit/junit/4.6/junit-4.6.jar" - dest="${maven.repo.local}/junit/junit/4.6/junit-4.6.jar" - usetimestamp="false" - ignoreerrors="true"/> - <get src="http://repo.maven.apache.org/maven2/junit/junit/4.6/junit-4.6.jar" - dest="${maven.repo.local}/junit/junit/4.6/junit-4.6.jar" - usetimestamp="false" - ignoreerrors="true"/> - </target> - -</project> diff --git a/dev-java/mariadb-java-client/mariadb-java-client-1.1.7.ebuild b/dev-java/mariadb-java-client/mariadb-java-client-1.1.7.ebuild deleted file mode 100644 index 5701f80..0000000 --- a/dev-java/mariadb-java-client/mariadb-java-client-1.1.7.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -VCS_INHERIT="" -MY_PN="client-java" - -if [[ "${PV}" == 9999 ]] ; then - VCS_INHERIT="git-r3" - EGIT_REPO_URI="https://github.com/MariaDB/mariadb-connector-j.git" -else -SRC_URI="http://archive.mariadb.org/${MY_PN}-${PV}/${P}.tar.gz" -fi - -JAVA_PKG_IUSE="doc" - -inherit java-pkg-2 java-ant-2 ${VCS_INHERIT} - -DESCRIPTION="Java client library for MariaDB/MySQL" -HOMEPAGE="http://mariadb.org/" -LICENSE="LGPL-2.1" - -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="${IUSE}" - -# Tests require a server running on localhost port 3306 -RESTRICT="test" - -COMMON_DEPEND="dev-java/jna" -RDEPEND="${RDEPEND} >=virtual/jre-1.6 ${COMMON_DEPEND}" -DEPEND="${DEPEND} >=virtual/jdk-1.6 ${COMMON_DEPEND}" - -src_prepare() { - cp "${FILESDIR}/maven-build-1.1.4.xml" build.xml || die - java-pkg-2_src_prepare -} - -src_install() { - java-pkg_dojar target/${PN}.jar -} diff --git a/dev-java/mariadb-java-client/mariadb-java-client-9999.ebuild b/dev-java/mariadb-java-client/mariadb-java-client-9999.ebuild deleted file mode 100644 index b699ac0..0000000 --- a/dev-java/mariadb-java-client/mariadb-java-client-9999.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -VCS_INHERIT="" -MY_PN="client-java" - -if [[ "${PV}" == 9999 ]] ; then - VCS_INHERIT="git-r3" - EGIT_REPO_URI="https://github.com/MariaDB/mariadb-connector-j.git" -else -SRC_URI=" - http://ftp.osuosl.org/pub/mariadb/${MY_PN}-${PV}/${P}.tar.gz - http://mirrors.fe.up.pt/pub/mariadb/${MY_PN}-${PV}/${P}.tar.gz - http://ftp-stud.hs-esslingen.de/pub/Mirrors/mariadb/${MY_PN}-${PV}/${P}.tar.gz - " -fi - -JAVA_PKG_IUSE="doc" - -inherit java-pkg-2 java-ant-2 eutils ${VCS_INHERIT} - -DESCRIPTION="Java client library for MariaDB/MySQL" -HOMEPAGE="http://mariadb.org/" -LICENSE="LGPL-2.1" - -SLOT="0" -KEYWORDS="" -IUSE="${IUSE}" - -# Tests require a server running on localhost port 3306 -RESTRICT="test" - -RDEPEND="${RDEPEND} >=virtual/jre-1.6" -DEPEND="${DEPEND} >=virtual/jdk-1.6" - -src_prepare() { - cp "${FILESDIR}/maven-build-1.1.4.xml" build.xml - java-pkg-2_src_prepare -} - -src_install() { - java-pkg_dojar target/${PN}.jar -} diff --git a/dev-java/mariadb-java-client/metadata.xml b/dev-java/mariadb-java-client/metadata.xml deleted file mode 100644 index 7ebb10d..0000000 --- a/dev-java/mariadb-java-client/metadata.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<maintainer type="project"> - <email>mysql-bugs@gentoo.org</email> - <name>MySQL</name> -</maintainer> -<use> -</use> -</pkgmetadata> diff --git a/eclass/mysql-autotools.eclass b/eclass/mysql-autotools.eclass deleted file mode 100644 index b085776..0000000 --- a/eclass/mysql-autotools.eclass +++ /dev/null @@ -1,677 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -# @ECLASS: mysql-autotools.eclass -# @MAINTAINER: -# MySQL Team <mysql-bugs@gentoo.org> -# Robin H. Johnson <robbat2@gentoo.org> -# Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> -# Luca Longinotti <chtekk@gentoo.org> -# @AUTHOR: -# Francesco Riosa <vivo@gentoo.org> (retired) -# @BLURB: This eclass provides support for autotools based mysql releases -# @DESCRIPTION: -# The mysql-autotools.eclass provides the support to build the mysql -# ebuilds using the autotools build system. This eclass provides -# the src_unpack, src_prepare, src_configure, src_compile, scr_install, -# pkg_preinst, pkg_postinst, pkg_config and pkg_postrm phase hooks. - -inherit autotools flag-o-matic multilib prefix - -# -# HELPER FUNCTIONS: -# - -# @FUNCTION: mysql-autotools_disable_test -# @DESCRIPTION: -# Helper function to disable specific tests. -mysql-autotools_disable_test() { - - local rawtestname testname testsuite reason mysql_disable_file - rawtestname="${1}" ; shift - reason="${@}" - ewarn "test '${rawtestname}' disabled: '${reason}'" - - testsuite="${rawtestname/.*}" - testname="${rawtestname/*.}" - mysql_disable_file="${S}/mysql-test/t/disabled.def" - #einfo "rawtestname=${rawtestname} testname=${testname} testsuite=${testsuite}" - echo "${testname} : ${reason}" >> "${mysql_disable_file}" - - # ${S}/mysql-tests/t/disabled.def - # - # ${S}/mysql-tests/suite/federated/disabled.def - # - # ${S}/mysql-tests/suite/jp/t/disabled.def - # ${S}/mysql-tests/suite/ndb/t/disabled.def - # ${S}/mysql-tests/suite/rpl/t/disabled.def - # ${S}/mysql-tests/suite/parts/t/disabled.def - # ${S}/mysql-tests/suite/rpl_ndb/t/disabled.def - # ${S}/mysql-tests/suite/ndb_team/t/disabled.def - # ${S}/mysql-tests/suite/binlog/t/disabled.def - # ${S}/mysql-tests/suite/innodb/t/disabled.def - if [[ -n ${testsuite} ]]; then - for mysql_disable_file in \ - ${S}/mysql-test/suite/${testsuite}/disabled.def \ - ${S}/mysql-test/suite/${testsuite}/t/disabled.def \ - FAILED ; do - [[ -f ${mysql_disable_file} ]] && break - done - if [[ ${mysql_disabled_file} != "FAILED" ]]; then - echo "${testname} : ${reason}" >> "${mysql_disable_file}" - else - ewarn "Could not find testsuite disabled.def location for ${rawtestname}" - fi - fi -} - -# @FUNCTION: mysql-autotools_configure_minimal -# @DESCRIPTION: -# Helper function to configure a minimal build -mysql-autotools_configure_minimal() { - - # These are things we exclude from a minimal build, please - # note that the server actually does get built and installed, - # but we then delete it before packaging. - local minimal_exclude_list="server embedded-server extra-tools innodb bench berkeley-db row-based-replication readline" - - for i in ${minimal_exclude_list} ; do - myconf="${myconf} --without-${i}" - done - myconf="${myconf} --with-extra-charsets=none" - myconf="${myconf} --enable-local-infile" - - if use static ; then - myconf="${myconf} --with-client-ldflags=-all-static" - myconf="${myconf} --disable-shared --with-pic" - else - myconf="${myconf} --enable-shared --enable-static" - fi - - if ! use latin1 ; then - myconf="${myconf} --with-charset=utf8" - myconf="${myconf} --with-collation=utf8_general_ci" - else - myconf="${myconf} --with-charset=latin1" - myconf="${myconf} --with-collation=latin1_swedish_ci" - fi - - # MariaDB requires this flag in order to link to GPLv3 readline v6 or greater - # A note is added to the configure output - if [[ ${PN} == "mariadb" ]] && mysql_version_is_at_least "5.1.61" ; then - myconf="${myconf} --disable-distribution" - fi -} - -# @FUNCTION: mysql-autotools_configure_common -# @DESCRIPTION: -# Helper function to configure the common builds -mysql-autotools_configure_common() { - - myconf="${myconf} $(use_with big-tables)" - myconf="${myconf} --enable-local-infile" - myconf="${myconf} --with-extra-charsets=all" - use prefix || myconf="${myconf} --with-mysqld-user=mysql" - myconf="${myconf} --with-server" - myconf="${myconf} --with-unix-socket-path=${EPREFIX}/var/run/mysqld/mysqld.sock" - myconf="${myconf} --without-libwrap" - - if use static ; then - myconf="${myconf} --with-mysqld-ldflags=-all-static" - myconf="${myconf} --with-client-ldflags=-all-static" - myconf="${myconf} --disable-shared --with-pic" - else - myconf="${myconf} --enable-shared --enable-static" - fi - - if use debug ; then - myconf="${myconf} --with-debug=full" - else - myconf="${myconf} --without-debug" - if ( use cluster ); then - myconf="${myconf} --without-ndb-debug" - fi - 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." - myconf="${myconf} --with-charset=${MYSQL_DEFAULT_CHARSET}" - myconf="${myconf} --with-collation=${MYSQL_DEFAULT_COLLATION}" - elif ! use latin1 ; then - myconf="${myconf} --with-charset=utf8" - myconf="${myconf} --with-collation=utf8_general_ci" - else - myconf="${myconf} --with-charset=latin1" - myconf="${myconf} --with-collation=latin1_swedish_ci" - fi - - if use embedded ; then - myconf="${myconf} --with-embedded-privilege-control" - myconf="${myconf} --with-embedded-server" - else - myconf="${myconf} --without-embedded-privilege-control" - myconf="${myconf} --without-embedded-server" - fi - -} - -# @FUNCTION: mysql-autotools_configure_51 -# @DESCRIPTION: -# Helper function to configure 5.1 and later builds -mysql-autotools_configure_51() { - - # TODO: !!!! readd --without-readline - # the failure depend upon config/ac-macros/readline.m4 checking into - # readline.h instead of history.h - myconf="${myconf} $(use_with ssl ssl "${EPREFIX}"/usr)" - myconf="${myconf} --enable-assembler" - myconf="${myconf} --with-geometry" - myconf="${myconf} --with-readline" - myconf="${myconf} --with-zlib-dir=${EPREFIX}/usr/" - myconf="${myconf} --without-pstack" - myconf="${myconf} --with-plugindir=${EPREFIX}/usr/$(get_libdir)/mysql/plugin" - - # This is an explict die here, because if we just forcibly disable it, then the - # user's data is not accessible. - use max-idx-128 && die "Bug #336027: upstream has a corruption issue with max-idx-128 presently" - #use max-idx-128 && myconf="${myconf} --with-max-indexes=128" - myconf="${myconf} $(use_enable community community-features)" - if use community; then - myconf="${myconf} $(use_enable profiling)" - else - myconf="${myconf} --disable-profiling" - fi - - # Scan for all available plugins - local plugins_avail="$( - LANG=C \ - find "${S}" \ - \( \ - -name 'plug.in' \ - -o -iname 'configure.in' \ - -o -iname 'configure.ac' \ - \) \ - -print0 \ - | xargs -0 sed -r -n \ - -e '/^MYSQL_STORAGE_ENGINE/{ - s~MYSQL_STORAGE_ENGINE\([[:space:]]*\[?([-_a-z0-9]+)\]?.*,~\1 ~g ; - s~^([^ ]+).*~\1~gp; - }' \ - | tr -s '\n' ' ' - )" - - # 5.1 introduces a new way to manage storage engines (plugins) - # like configuration=none - # This base set are required, and will always be statically built. - local plugins_sta="csv myisam myisammrg heap" - local plugins_dyn="" - local plugins_dis="example ibmdb2i" - - # These aren't actually required by the base set, but are really useful: - plugins_sta="${plugins_sta} archive blackhole" - - # Now the extras - if use extraengine ; then - # like configuration=max-no-ndb, archive and example removed in 5.1.11 - # not added yet: ibmdb2i - # Not supporting as examples: example,daemon_example,ftexample - plugins_sta="${plugins_sta} partition" - - if [[ ${PN} != "mariadb" ]] ; then - elog "Before using the Federated storage engine, please be sure to read" - elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html" - plugins_dyn="${plugins_dyn} federated" - else - elog "MariaDB includes the FederatedX engine. Be sure to read" - elog "http://askmonty.org/wiki/index.php/Manual:FederatedX_storage_engine" - plugins_dyn="${plugins_dyn} federatedx" - fi - else - plugins_dis="${plugins_dis} partition federated" - fi - - # Upstream specifically requests that InnoDB always be built: - # - innobase, innodb_plugin - # Build falcon if available for 6.x series. - for i in innobase falcon ; do - [[ -e ${S}/storage/${i} ]] && plugins_sta="${plugins_sta} ${i}" - done - for i in innodb_plugin ; do - [[ -e ${S}/storage/${i} ]] && plugins_dyn="${plugins_dyn} ${i}" - done - - # like configuration=max-no-ndb - if ( use cluster ) ; then - plugins_sta="${plugins_sta} ndbcluster partition" - plugins_dis="${plugins_dis//partition}" - myconf="${myconf} --with-ndb-binlog" - else - plugins_dis="${plugins_dis} ndbcluster" - fi - - if [[ ${PN} == "mariadb" ]] ; then - # In MariaDB, InnoDB is packaged in the xtradb directory, so it's not - # caught above. - # This is not optional, without it several upstream testcases fail. - # Also strongly recommended by upstream. - if [[ ${PV} < "5.2.0" ]] ; then - myconf="${myconf} --with-maria-tmp-tables" - plugins_sta="${plugins_sta} maria" - else - myconf="${myconf} --with-aria-tmp-tables" - plugins_sta="${plugins_sta} aria" - fi - - [[ ( -e ${S}/storage/innobase ) || ( -e ${S}/storage/xtradb ) ]] || - die "The ${P} package doesn't provide innobase nor xtradb" - - for i in innobase xtradb ; do - [[ -e ${S}/storage/${i} ]] && plugins_sta="${plugins_sta} ${i}" - done - - myconf="${myconf} $(use_with libevent)" - - if mysql_version_is_at_least "5.2" ; then - for i in oqgraph ; do - use ${i} \ - && plugins_dyn="${plugins_dyn} ${i}" \ - || plugins_dis="${plugins_dis} ${i}" - done - fi - - if mysql_version_is_at_least "5.2.5" ; then - for i in sphinx ; do - use ${i} \ - && plugins_dyn="${plugins_dyn} ${i}" \ - || plugins_dis="${plugins_dis} ${i}" - done - fi - - #Authentication plugins - if mysql_version_is_at_least "5.2.11" ; then - for i in pam ; do - use ${i} \ - && plugins_dyn="${plugins_dyn} auth_${i}" \ - || plugins_dis="${plugins_dis} auth_${i}" - done - fi - fi - - if pbxt_available && [[ ${PBXT_NEWSTYLE} == "1" ]]; then - use pbxt \ - && plugins_sta="${plugins_sta} pbxt" \ - || plugins_dis="${plugins_dis} pbxt" - fi - - use static && \ - plugins_sta="${plugins_sta} ${plugins_dyn}" && \ - plugins_dyn="" - - # Google MySQL, bundle what upstream supports - if [[ ${PN} == "google-mysql" ]]; then - for x in innobase innodb_plugin innodb ; do - plugins_sta="${plugins_sta//$x}" - plugins_dyn="${plugins_dyn//$x}" - done - plugins_sta="${plugins_sta} innodb_plugin googlestats" - myconf="${myconf} --with-perftools-dir=/usr --enable-perftools-tcmalloc" - # use system lzo for google-mysql - myconf="${myconf} --with-lzo2-dir=/usr" - fi - - einfo "Available plugins: ${plugins_avail}" - einfo "Dynamic plugins: ${plugins_dyn}" - einfo "Static plugins: ${plugins_sta}" - einfo "Disabled plugins: ${plugins_dis}" - - # These are the static plugins - myconf="${myconf} --with-plugins=${plugins_sta// /,}" - # And the disabled ones - for i in ${plugins_dis} ; do - myconf="${myconf} --without-plugin-${i}" - done -} - -pbxt_src_configure() { - - mysql_init_vars - - pushd "${WORKDIR}/pbxt-${PBXT_VERSION}" &>/dev/null - - einfo "Reconfiguring dir '${PWD}'" - eautoreconf - - local myconf="" - myconf="${myconf} --with-mysql=${S} --libdir=${EPREFIX}/usr/$(get_libdir)" - use debug && myconf="${myconf} --with-debug=full" - econf ${myconf} || die "Problem configuring PBXT storage engine" -} - -pbxt_src_compile() { - - # TODO: is it safe/needed to use emake here ? - make || die "Problem making PBXT storage engine (${myconf})" - - popd - # TODO: modify test suite for PBXT -} - -pbxt_src_install() { - - pushd "${WORKDIR}/pbxt-${PBXT_VERSION}" &>/dev/null - emake install DESTDIR="${D}" || die "Failed to install PBXT" - popd -} - -# -# EBUILD FUNCTIONS -# - -# @FUNCTION: mysql-autotools_src_prepare -# @DESCRIPTION: -# Apply patches to the source code and remove unneeded bundled libs. -mysql-autotools_src_prepare() { - - cd "${S}" - - if [[ ${MY_EXTRAS_VER} != none ]]; then - - # Apply the patches for this MySQL version - EPATCH_SUFFIX="patch" - mkdir -p "${EPATCH_SOURCE}" || die "Unable to create epatch directory" - # Clean out old items - rm -f "${EPATCH_SOURCE}"/* - # Now link in right patches - mysql_mv_patches - # And apply - epatch - fi - - # last -fPIC fixup, per bug #305873 - i="${S}"/storage/innodb_plugin/plug.in - [[ -f ${i} ]] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}" - - # Additional checks, remove bundled zlib (Cluster needs this, for static - # memory management in zlib, leave available for Cluster) - if [[ "${PN}" != "mysql-cluster" ]] ; then - rm -f "${S}/zlib/"*.[ch] - sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in" - fi - rm -f "scripts/mysqlbug" - - # Make charsets install in the right place - find . -name 'Makefile.am' \ - -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \; - - # Remove what needs to be recreated, so we're sure it's actually done - einfo "Cleaning up old buildscript files" - find . -name Makefile \ - -o -name Makefile.in \ - -o -name configure \ - -exec rm -f {} \; - rm -f "ltmain.sh" - rm -f "scripts/mysqlbug" - - local rebuilddirlist d - - if xtradb_patch_available && use xtradb ; then - einfo "Adding storage engine: Percona XtraDB (replacing InnoDB)" - pushd "${S}"/storage >/dev/null - i="innobase" - o="${WORKDIR}/storage-${i}.mysql-upstream" - # Have we been here already? - [[ -d ${o} ]] && rm -f "${i}" - # Or maybe we haven't - [[ ( -d ${i} ) && ! ( -d ${o} ) ]] && mv "${i}" "${o}" - cp -ral "${WORKDIR}/${XTRADB_P}" "${i}" - popd >/dev/null - fi - - if pbxt_patch_available && [[ ${PBXT_NEWSTYLE} == "1" ]] && use pbxt ; then - einfo "Adding storage engine: PBXT" - pushd "${S}"/storage >/dev/null - i='pbxt' - [[ -d ${i} ]] && rm -rf "${i}" - cp -ral "${WORKDIR}/${PBXT_P}" "${i}" - f="${WORKDIR}/mysql-extras/pbxt/fix-low-priority.patch" - [[ -f $f ]] && epatch "$f" - popd >/dev/null - fi - - rebuilddirlist="." - # This does not seem to be needed presently. robbat2 2010/02/23 - #einfo "Updating innobase cmake" - ## TODO: check this with a cmake expert - #cmake \ - # -DCMAKE_C_COMPILER=$(type -P $(tc-getCC)) \ - # -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX)) \ - # "storage/innobase" - - for d in ${rebuilddirlist} ; do - einfo "Reconfiguring dir '${d}'" - pushd "${d}" &>/dev/null - eautoreconf - popd &>/dev/null - done -} - -# @FUNCTION: mysql-autotools_src_configure -# @DESCRIPTION: -# Configure mysql to build the code for Gentoo respecting the use flags. -mysql-autotools_src_configure() { - # bug 401733 - export QA_CONFIGURE_OPTIONS=".*" - - # Make sure the vars are correctly initialized - mysql_init_vars - - # $myconf is modified by the configure_* functions - local myconf="" - - if use minimal ; then - mysql-autotools_configure_minimal - else - mysql-autotools_configure_common - mysql-autotools_configure_51 - fi - - # Bug #114895, bug #110149 - filter-flags "-O" "-O[01]" - - # glib-2.3.2_pre fix, bug #16496 - append-cppflags "-DHAVE_ERRNO_AS_DEFINE=1" - - # As discovered by bug #246652, doing a double-level of SSP causes NDB to - # fail badly during cluster startup. - if [[ $(gcc-major-version) -lt 4 ]]; then - filter-flags "-fstack-protector-all" - fi - - CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-strict-aliasing" - CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-rtti" - # storage/googlestats, sql/ in google-mysql are using C++ templates - # implicitly. Upstream might be interested in this, exclude - # -fno-implicit-templates for google-mysql for now. - mysql_version_is_at_least "5.0" \ - && [[ ${PN} != "google-mysql" ]] \ - && CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" - export CXXFLAGS - - # bug #283926, with GCC4.4, this is required to get correct behavior. - append-flags -fno-strict-aliasing - - # bug #335185, #335995, with >= GCC4.3.3 on x86 only, omit-frame-pointer - # causes a mis-compile. - # Upstream bugs: - # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38562 - # http://bugs.mysql.com/bug.php?id=45205 - use x86 && version_is_at_least "4.3.3" "$(gcc-fullversion)" && \ - append-flags -fno-omit-frame-pointer && \ - filter-flags -fomit-frame-pointer - - econf \ - --libexecdir="${EPREFIX}/usr/sbin" \ - --sysconfdir="${MY_SYSCONFDIR}" \ - --localstatedir="${MY_LOCALSTATEDIR}" \ - --sharedstatedir="${MY_SHAREDSTATEDIR}" \ - --libdir="${MY_LIBDIR}" \ - --includedir="${MY_INCLUDEDIR}" \ - --with-low-memory \ - --with-client-ldflags=-lstdc++ \ - --enable-thread-safe-client \ - --with-comment="Gentoo Linux ${PF}" \ - --without-docs \ - --with-LIBDIR="$(get_libdir)" \ - ${myconf} || die "econf failed" - - # TODO: Move this before autoreconf !!! - find . -type f -name Makefile -print0 \ - | xargs -0 -n100 sed -i \ - -e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|' - - if [[ $EAPI == 2 ]] && [[ ${PBXT_NEWSTYLE} != "1" ]]; then - pbxt_patch_available && use pbxt && pbxt_src_configure - fi -} - -# @FUNCTION: mysql-autotools_src_compile -# @DESCRIPTION: -# Compile the mysql code. -mysql-autotools_src_compile() { - - emake || die "emake failed" - - if [[ ${PBXT_NEWSTYLE} != "1" ]]; then - pbxt_patch_available && use pbxt && pbxt_src_compile - fi -} - -# @FUNCTION: mysql-autotools_src_install -# @DESCRIPTION: -# Install mysql. -mysql-autotools_src_install() { - - # Make sure the vars are correctly initialized - mysql_init_vars - - emake install \ - DESTDIR="${D}" \ - benchdir_root="${MY_SHAREDSTATEDIR}" \ - testroot="${MY_SHAREDSTATEDIR}" \ - || die "emake install failed" - - if [[ ${PBXT_NEWSTYLE} != "1" ]]; then - pbxt_patch_available && use pbxt && pbxt_src_install - fi - - # Convenience links - einfo "Making Convenience links for mysqlcheck multi-call binary" - dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze" - dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair" - dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize" - - # Various junk (my-*.cnf moved elsewhere) - einfo "Removing duplicate /usr/share/mysql files" - rm -Rf "${ED}/usr/share/info" - for removeme in "mysql-log-rotate" mysql.server* \ - binary-configure* my-*.cnf mi_test_all* - do - rm -f "${D}"/${MY_SHAREDSTATEDIR}/${removeme} - done - - # Clean up stuff for a minimal build - if use minimal ; then - einfo "Remove all extra content for minimal build" - rm -Rf "${D}${MY_SHAREDSTATEDIR}"/{mysql-test,sql-bench} - rm -f "${ED}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam} - rm -f "${ED}/usr/sbin/mysqld" - rm -f "${D}${MY_LIBDIR}"/lib{heap,merge,nisam,my{sys,strings,sqld,isammrg,isam},vio,dbug}.a - 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 - case ${MYSQL_PV_MAJOR} in - 5.[1-9]|6*|7*) mysql_mycnf_version="5.1" ;; - esac - einfo "Building default my.cnf (${mysql_mycnf_version})" - insinto "${MY_SYSCONFDIR#${EPREFIX}}" - doins scripts/mysqlaccess.conf - mycnf_src="my.cnf-${mysql_mycnf_version}" - sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ - -e "s!/tmp!${EPREFIX}/tmp!" \ - -e "s!/usr!${EPREFIX}/usr!" \ - -e "s!= /var!= ${EPREFIX}/var!" \ - "${FILESDIR}/${mycnf_src}" \ - > "${TMPDIR}/my.cnf.ok" - 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" - fi - eprefixify "${TMPDIR}/my.cnf.ok" - newins "${TMPDIR}/my.cnf.ok" my.cnf - - # Minimal builds don't have the MySQL server - if ! use minimal ; then - einfo "Creating initial directories" - # Empty directories ... - diropts "-m0750" - keepdir "${MY_DATADIR#${EPREFIX}}" - if [[ ${PREVIOUS_DATADIR} != "yes" ]] ; then - chown -R mysql:mysql "${D}/${MY_DATADIR}" - fi - - diropts "-m0755" - for folder in "${MY_LOGDIR#${EPREFIX}}" "/var/run/mysqld" ; do - dodir "${folder}" - keepdir "${folder}" - chown -R mysql:mysql "${ED}/${folder}" - done - fi - - # Docs - einfo "Installing docs" - for i in README ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE ; do - [[ -f $i ]] && dodoc "$i" - done - doinfo "${S}"/Docs/mysql.info - - # Minimal builds don't have the MySQL server - if ! use minimal ; then - einfo "Including support files and sample configurations" - docinto "support-files" - for script in \ - "${S}"/support-files/my-*.cnf \ - "${S}"/support-files/magic \ - "${S}"/support-files/ndb-config-2-node.ini - do - [[ -f $script ]] && dodoc "${script}" - done - - docinto "scripts" - for script in "${S}"/scripts/mysql* ; do - [[ ( -f $script ) && ( ${script%.sh} == ${script} ) ]] && dodoc "${script}" - done - - fi - - mysql_lib_symlinks "${ED}" - - #Remove mytop if perl is not selected - [[ ${PN} == "mariadb" ]] && ! use perl \ - && mysql_version_is_at_least "5.3" \ - && rm -f "${ED}/usr/bin/mytop" - - #Bug 455462 remove unnecessary libtool files - prune_libtool_files --modules -} diff --git a/eclass/mysql-cmake.eclass b/eclass/mysql-cmake.eclass deleted file mode 100644 index 3b72815..0000000 --- a/eclass/mysql-cmake.eclass +++ /dev/null @@ -1,560 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -# @ECLASS: mysql-cmake.eclass -# @MAINTAINER: -# Maintainers: -# - MySQL Team <mysql-bugs@gentoo.org> -# - Robin H. Johnson <robbat2@gentoo.org> -# - Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> -# - Brian Evans <grknight@gentoo.org> -# @BLURB: This eclass provides the support for cmake based mysql releases -# @DESCRIPTION: -# The mysql-cmake.eclass provides the support to build the mysql -# ebuilds using the cmake build system. This eclass provides -# the src_prepare, src_configure, src_compile, and src_install -# phase hooks. - -inherit cmake-utils flag-o-matic multilib prefix eutils - -# -# HELPER FUNCTIONS: -# - -# @FUNCTION: mysql_cmake_disable_test -# @DESCRIPTION: -# Helper function to disable specific tests. -mysql-cmake_disable_test() { - - local rawtestname testname testsuite reason mysql_disabled_file mysql_disabled_dir - rawtestname="${1}" ; shift - reason="${@}" - ewarn "test '${rawtestname}' disabled: '${reason}'" - - testsuite="${rawtestname/.*}" - testname="${rawtestname/*.}" - for mysql_disabled_file in \ - ${S}/mysql-test/disabled.def \ - ${S}/mysql-test/t/disabled.def ; do - [[ -f ${mysql_disabled_file} ]] && break - done - #mysql_disabled_file="${S}/mysql-test/t/disabled.def" - #einfo "rawtestname=${rawtestname} testname=${testname} testsuite=${testsuite}" - echo ${testname} : ${reason} >> "${mysql_disabled_file}" - - if [[ ( -n ${testsuite} ) && ( ${testsuite} != "main" ) ]]; then - for mysql_disabled_file in \ - ${S}/mysql-test/suite/${testsuite}/disabled.def \ - ${S}/mysql-test/suite/${testsuite}/t/disabled.def \ - FAILED ; do - [[ -f ${mysql_disabled_file} ]] && break - done - if [[ ${mysql_disabled_file} != "FAILED" ]]; then - echo "${testname} : ${reason}" >> "${mysql_disabled_file}" - else - for mysql_disabled_dir in \ - ${S}/mysql-test/suite/${testsuite} \ - ${S}/mysql-test/suite/${testsuite}/t \ - FAILED ; do - [[ -d ${mysql_disabled_dir} ]] && break - done - if [[ ${mysql_disabled_dir} != "FAILED" ]]; then - echo "${testname} : ${reason}" >> "${mysql_disabled_dir}/disabled.def" - else - ewarn "Could not find testsuite disabled.def location for ${rawtestname}" - fi - fi - fi -} - -# @FUNCTION: mysql-cmake_use_plugin -# @DESCRIPTION: -# Helper function to enable/disable plugins by use flags -# cmake-utils_use_with is not enough as some references check WITH_ (0|1) -# and some check WITHOUT_. Also, this can easily extend to non-storage plugins. -mysql-cmake_use_plugin() { - [[ -z $2 ]] && die "mysql-cmake_use_plugin <USE flag> <flag name>" - if use_if_iuse $1 ; then - echo "-DWITH_$2=1 -DPLUGIN_$2=YES" - else - echo "-DWITHOUT_$2=1 -DWITH_$2=0 -DPLUGIN_$2=NO" - fi -} - -# @FUNCTION: configure_cmake_locale -# @DESCRIPTION: -# Helper function to configure locale cmake options -configure_cmake_locale() { - - if use_if_iuse minimal ; then - : - elif ! in_iuse server || use_if_iuse 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 - fi -} - -# @FUNCTION: configure_cmake_minimal -# @DESCRIPTION: -# Helper function to configure minimal build -configure_cmake_minimal() { - - mycmakeargs+=( - -DWITHOUT_SERVER=1 - -DWITHOUT_EMBEDDED_SERVER=1 - -DEXTRA_CHARSETS=none - -DINSTALL_SQLBENCHDIR= - -DWITHOUT_ARCHIVE_STORAGE_ENGINE=1 - -DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1 - -DWITHOUT_CSV_STORAGE_ENGINE=1 - -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 - -DWITHOUT_HEAP_STORAGE_ENGINE=1 - -DWITHOUT_INNOBASE_STORAGE_ENGINE=1 - -DWITHOUT_MYISAMMRG_STORAGE_ENGINE=1 - -DWITHOUT_MYISAM_STORAGE_ENGINE=1 - -DWITHOUT_PARTITION_STORAGE_ENGINE=1 - -DPLUGIN_ARCHIVE=NO - -DPLUGIN_BLACKHOLE=NO - -DPLUGIN_CSV=NO - -DPLUGIN_FEDERATED=NO - -DPLUGIN_HEAP=NO - -DPLUGIN_INNOBASE=NO - -DPLUGIN_MYISAMMRG=NO - -DPLUGIN_MYISAM=NO - -DPLUGIN_PARTITION=NO - ) -} - -# @FUNCTION: configure_cmake_standard -# @DESCRIPTION: -# Helper function to configure standard build -configure_cmake_standard() { - - mycmakeargs+=( - -DEXTRA_CHARSETS=all - -DMYSQL_USER=mysql - -DMYSQL_UNIX_ADDR=${EPREFIX}/var/run/mysqld/mysqld.sock - $(cmake-utils_use_disable !static SHARED) - $(cmake-utils_use_with debug) - $(cmake-utils_use_with embedded EMBEDDED_SERVER) - $(cmake-utils_use_with profiling) - $(cmake-utils_use_enable systemtap DTRACE) - ) - - if use static; then - mycmakeargs+=( -DWITH_PIC=1 ) - fi - - if use jemalloc; then - mycmakeargs+=( -DWITH_SAFEMALLOC=OFF ) - fi - - if use tcmalloc; then - mycmakeargs+=( -DWITH_SAFEMALLOC=OFF ) - fi - - # Storage engines - mycmakeargs+=( - -DWITH_ARCHIVE_STORAGE_ENGINE=1 - -DWITH_BLACKHOLE_STORAGE_ENGINE=1 - -DWITH_CSV_STORAGE_ENGINE=1 - -DWITH_HEAP_STORAGE_ENGINE=1 - -DWITH_INNOBASE_STORAGE_ENGINE=1 - -DWITH_MYISAMMRG_STORAGE_ENGINE=1 - -DWITH_MYISAM_STORAGE_ENGINE=1 - -DWITH_PARTITION_STORAGE_ENGINE=1 - ) - - if in_iuse pbxt ; then - mycmakeargs+=( $(cmake-utils_use_with pbxt PBXT_STORAGE_ENGINE) ) - fi - - if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; 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 - -DPLUGIN_FEDERATED=NO - -DWITHOUT_FEDERATEDX_STORAGE_ENGINE=1 - -DPLUGIN_FEDERATEDX=NO ) - fi - - mycmakeargs+=( - $(mysql-cmake_use_plugin oqgraph OQGRAPH) - $(mysql-cmake_use_plugin sphinx SPHINX) - $(mysql-cmake_use_plugin tokudb TOKUDB) - $(mysql-cmake_use_plugin pam AUTH_PAM) - ) - - if mysql_version_is_at_least 10.0.5 ; then - # CassandraSE needs Apache Thrift which is not in portage - mycmakeargs+=( - -DWITHOUT_CASSANDRA=1 -DWITH_CASSANDRA=0 - -DPLUGIN_CASSANDRA=NO - $(mysql-cmake_use_plugin extraengine SEQUENCE) - $(mysql-cmake_use_plugin extraengine SPIDER) - $(mysql-cmake_use_plugin extraengine CONNECT) - -DCONNECT_WITH_MYSQL=1 - $(cmake-utils_use xml CONNECT_WITH_LIBXML2) - $(cmake-utils_use odbc CONNECT_WITH_ODBC) - ) - fi - - if in_iuse mroonga ; then - use mroonga || mycmakeargs+=( -DWITHOUT_MROONGA=1 ) - else - mycmakeargs+=( -DWITHOUT_MROONGA=1 ) - fi - - if in_iuse galera ; then - mycmakeargs+=( $(cmake-utils_use_with galera WSREP) ) - fi - - if mysql_version_is_at_least "10.1.1" ; then - mycmakeargs+=( $(cmake-utils_use_with innodb-lz4 INNODB_LZ4) - $(cmake-utils_use_with innodb-lzo INNODB_LZO) ) - fi - - if in_iuse innodb-snappy ; then - mycmakeargs+=( $(cmake-utils_use_with innodb-snappy INNODB_SNAPPY) ) - fi - - if mysql_version_is_at_least "10.1.2" ; then - mycmakeargs+=( $(mysql-cmake_use_plugin cracklib CRACKLIB_PASSWORD_CHECK ) ) - fi - else - mycmakeargs+=( $(cmake-utils_use_with extraengine FEDERATED_STORAGE_ENGINE) ) - fi - - if [[ ${PN} == "percona-server" ]]; then - mycmakeargs+=( - $(cmake-utils_use_with pam PAM) - ) - if in_iuse tokudb ; then - # TokuDB Backup plugin requires valgrind unconditionally - mycmakeargs+=( - $(mysql-cmake_use_plugin tokudb TOKUDB) - $(usex tokudb-backup-plugin "" -DTOKUDB_BACKUP_DISABLED=1) - ) - fi - fi - - if [[ ${PN} == "mysql-cluster" ]]; then - # TODO: This really should include the following options, - # but the memcached package doesn't install the files it seeks. - # -DWITH_BUNDLED_MEMCACHED=OFF - # -DMEMCACHED_HOME=${EPREFIX}/usr - mycmakeargs+=( - -DWITH_BUNDLED_LIBEVENT=OFF - $(cmake-utils_use_with java NDB_JAVA) - ) - fi -} - -# -# EBUILD FUNCTIONS -# - -# @FUNCTION: mysql-cmake_src_prepare -# @DESCRIPTION: -# Apply patches to the source code and remove unneeded bundled libs. -mysql-cmake_src_prepare() { - - debug-print-function ${FUNCNAME} "$@" - - cd "${S}" - - if [[ ${MY_EXTRAS_VER} != none ]]; then - - # Apply the patches for this MySQL version - EPATCH_SUFFIX="patch" - mkdir -p "${EPATCH_SOURCE}" || die "Unable to create epatch directory" - # Clean out old items - rm -f "${EPATCH_SOURCE}"/* - # Now link in right patches - mysql_mv_patches - # And apply - epatch - fi - - # last -fPIC fixup, per bug #305873 - i="${S}"/storage/innodb_plugin/plug.in - [[ -f ${i} ]] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}" - - rm -f "scripts/mysqlbug" - if use jemalloc && ! ( [[ ${PN} == "mariadb" ]] && mysql_version_is_at_least "5.5.33" ); 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" - fi - - if in_iuse tokudb ; then - # Don't build bundled xz-utils - if [[ -d "${S}/storage/tokudb/ft-index" ]] ; then - rm -f "${S}/storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake" || die - touch "${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 - rm "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die - touch "${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 - fi - - # Remove the bundled groonga if it exists - # There is no CMake flag, it simply checks for existance - if [[ -d "${S}"/storage/mroonga/vendor/groonga ]] ; then - rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga" - fi - - epatch_user -} - -# @FUNCTION: mysql-cmake_src_configure -# @DESCRIPTION: -# Configure mysql to build the code for Gentoo respecting the use flags. -mysql-cmake_src_configure() { - - debug-print-function ${FUNCNAME} "$@" - - 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/${P} - -DINSTALL_DOCREADMEDIR=share/doc/${P} - -DINSTALL_INCLUDEDIR=include/mysql - -DINSTALL_INFODIR=share/info - -DINSTALL_LIBDIR=$(get_libdir) - -DINSTALL_ELIBDIR=$(get_libdir)/mysql - -DINSTALL_MANDIR=share/man - -DINSTALL_MYSQLDATADIR=${EPREFIX}/var/lib/mysql - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test - -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin - -DINSTALL_SBINDIR=sbin - -DINSTALL_SCRIPTDIR=share/mysql/scripts - -DINSTALL_SQLBENCHDIR=share/mysql - -DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql - -DWITH_COMMENT="Gentoo Linux ${PF}" - $(cmake-utils_use_with test UNIT_TESTS) - -DWITH_LIBEDIT=0 - -DWITH_ZLIB=system - -DWITHOUT_LIBWRAP=1 - -DENABLED_LOCAL_INFILE=1 - $(cmake-utils_use_enable static-libs STATIC_LIBS) - -DWITH_SSL=$(usex ssl system bundled) - -DWITH_DEFAULT_COMPILER_OPTIONS=0 - -DWITH_DEFAULT_FEATURE_SET=0 - ) - - if in_iuse bindist ; then - mycmakeargs+=( - -DWITH_READLINE=$(usex bindist 1 0) - -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1) - $(usex bindist -DHAVE_BFD_H=0 '') - ) - fi - - mycmakeargs+=( -DWITH_EDITLINE=system ) - - if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then - mycmakeargs+=( - -DWITH_JEMALLOC=$(usex jemalloc system) - ) - mysql_version_is_at_least "10.0.9" && mycmakeargs+=( -DWITH_PCRE=system ) - fi - - configure_cmake_locale - - if use_if_iuse minimal ; then - configure_cmake_minimal - else - configure_cmake_standard - fi - - # Bug #114895, bug #110149 - filter-flags "-O" "-O[01]" - - CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" - CXXFLAGS="${CXXFLAGS} -felide-constructors" - # Causes linkage failures. Upstream bug #59607 removes it - if ! mysql_version_is_at_least "5.6" ; then - CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" - fi - # As of 5.7, exceptions and rtti are used! - if [[ ${PN} -eq 'percona-server' ]] && mysql_version_is_at_least "5.6.26" ; then - CXXFLAGS="${CXXFLAGS} -fno-rtti" - elif ! mysql_version_is_at_least "5.7" ; then - CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti" - fi - export CXXFLAGS - - # bug #283926, with GCC4.4, this is required to get correct behavior. - append-flags -fno-strict-aliasing - - cmake-utils_src_configure -} - -# @FUNCTION: mysql-cmake_src_compile -# @DESCRIPTION: -# Compile the mysql code. -mysql-cmake_src_compile() { - - debug-print-function ${FUNCNAME} "$@" - - cmake-utils_src_compile -} - -# @FUNCTION: mysql-cmake_src_install -# @DESCRIPTION: -# Install mysql. -mysql-cmake_src_install() { - - debug-print-function ${FUNCNAME} "$@" - - # Make sure the vars are correctly initialized - mysql_init_vars - - cmake-utils_src_install - - if ! in_iuse tools || use_if_iuse tools ; then - # Convenience links - einfo "Making Convenience links for mysqlcheck multi-call binary" - dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze" - dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair" - dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize" - fi - - if [[ -z ${HAS_TOOLS_PATCH} ]] ; then - # Create a mariadb_config symlink - [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && dosym "/usr/bin/mysql_config" "/usr/bin/mariadb_config" - fi - - # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir - rm -Rf "${ED}/usr/data" - - # Various junk (my-*.cnf moved elsewhere) - einfo "Removing duplicate /usr/share/mysql files" - - # 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 - case ${MYSQL_PV_MAJOR} in - 5.[1-4]*) mysql_mycnf_version="5.1" ;; - 5.5) mysql_mycnf_version="5.5" ;; - 5.[6-9]|6*|7*|8*|9*|10*) mysql_mycnf_version="5.6" ;; - esac - einfo "Building default my.cnf (${mysql_mycnf_version})" - insinto "${MY_SYSCONFDIR#${EPREFIX}}" - [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf - mycnf_src="my.cnf-${mysql_mycnf_version}" - 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 - - # Minimal builds don't have the MySQL server - if use_if_iuse minimal ; then - : - elif ! in_iuse server || use_if_iuse server ; then - einfo "Creating initial directories" - # Empty directories ... - diropts "-m0750" - if [[ ${PREVIOUS_DATADIR} != "yes" ]] ; then - dodir "${MY_DATADIR#${EPREFIX}}" - keepdir "${MY_DATADIR#${EPREFIX}}" - chown -R mysql:mysql "${D}/${MY_DATADIR}" - fi - - diropts "-m0755" - for folder in "${MY_LOGDIR#${EPREFIX}}" ; do - dodir "${folder}" - keepdir "${folder}" - chown -R mysql:mysql "${ED}/${folder}" - done - fi - - # Minimal builds don't have the MySQL server - if use_if_iuse minimal ; then - : - elif ! in_iuse server || use_if_iuse server; then - einfo "Including support files and sample configurations" - docinto "support-files" - for script in \ - "${S}"/support-files/my-*.cnf.sh \ - "${S}"/support-files/magic \ - "${S}"/support-files/ndb-config-2-node.ini.sh - 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 - [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && ! use perl \ - && rm -f "${ED}/usr/bin/mytop" - - in_iuse client-libs && ! use client-libs && return - - # Percona has decided to rename libmysqlclient to libperconaserverclient - # Use a symlink to preserve linkages for those who don't use mysql_config - if [[ ${PN} == "percona-server" ]] && mysql_version_is_at_least "5.5.36" ; then - dosym libperconaserverclient.so /usr/$(get_libdir)/libmysqlclient.so - dosym libperconaserverclient.so /usr/$(get_libdir)/libmysqlclient_r.so - if use static-libs ; then - dosym libperconaserverclient.a /usr/$(get_libdir)/libmysqlclient.a - dosym libperconaserverclient.a /usr/$(get_libdir)/libmysqlclient_r.a - fi - fi -} diff --git a/eclass/mysql-multilib-r1.eclass b/eclass/mysql-multilib-r1.eclass deleted file mode 100644 index 930411d..0000000 --- a/eclass/mysql-multilib-r1.eclass +++ /dev/null @@ -1,1179 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: mysql-multilib-r1.eclass -# @MAINTAINER: -# Maintainers: -# - MySQL Team <mysql-bugs@gentoo.org> -# - Robin H. Johnson <robbat2@gentoo.org> -# - Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> -# - Brian Evans <grknight@gentoo.org> -# @BLURB: This eclass provides common functions for mysql ebuilds -# @DESCRIPTION: -# The mysql-multilib-r1.eclass is the base eclass to build the mysql and -# alternative projects (mariadb and percona) ebuilds. -# Provider and version specific settings will be included in each ebuild. -# It provides the src_unpack, src_prepare, src_configure, src_compile, -# src_install, pkg_preinst, pkg_postinst, pkg_config and pkg_postrm -# phase hooks. - -MYSQL_EXTRAS="" - -# @ECLASS-VARIABLE: MYSQL_EXTRAS_VER -# @DESCRIPTION: -# The version of the MYSQL_EXTRAS repo to use to build mysql -# Use "none" to disable it's use -[[ ${MY_EXTRAS_VER} == "live" ]] && MYSQL_EXTRAS="git-r3" - -# @ECLASS-VARIABLE: MYSQL_CMAKE_NATIVE_DEFINES -# @DESCRIPTION: -# An array of extra CMake arguments for native multilib builds - -# @ECLASS-VARIABLE: MYSQL_CMAKE_NONNATIVE_DEFINES -# @DESCRIPTION: -# An array of extra CMake arguments for non-native multilib builds - -# @ECLASS-VARIABLE: MYSQL_CMAKE_EXTRA_DEFINES -# @DESCRIPTION: -# An array of CMake arguments added to native and non-native - -# Keeping eutils in EAPI=6 for emktemp in pkg_config - -inherit eutils systemd flag-o-matic ${MYSQL_EXTRAS} versionator \ - prefix toolchain-funcs user cmake-utils multilib-minimal - -if [[ "${EAPI}x" == "5x" ]]; then - inherit multilib mysql_fx -fi - -# -# Supported EAPI versions and export functions -# - -case "${EAPI:-0}" in - 5|6) ;; - *) die "Unsupported EAPI: ${EAPI}" ;; -esac - -EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_config - -# -# VARIABLES: -# - -# 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" - -[[ ${MY_EXTRAS_VER} == "latest" ]] && MY_EXTRAS_VER="20090228-0714Z" -if [[ ${MY_EXTRAS_VER} == "live" ]]; then - EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git" - EGIT_CHECKOUT_DIR=${WORKDIR}/mysql-extras - EGIT_CLONE_TYPE=shallow -fi - -# @ECLASS-VARIABLE: MYSQL_PV_MAJOR -# @DESCRIPTION: -# Upstream MySQL considers the first two parts of the version number to be the -# major version. Upgrades that change major version should always run -# mysql_upgrade. -if [[ -z ${MYSQL_PV_MAJOR} ]] ; then MYSQL_PV_MAJOR="$(get_version_component_range 1-2 ${PV})" ; fi - -# @ECLASS-VARIABLE: MYSQL_VERSION_ID -# @DESCRIPTION: -# MYSQL_VERSION_ID will be: -# major * 10e6 + minor * 10e4 + micro * 10e2 + gentoo revision number, all [0..99] -# This is an important part, because many of the choices the MySQL ebuild will do -# depend on this variable. -# In particular, the code below transforms a $PVR like "5.0.18-r3" in "5001803" -# We also strip off upstream's trailing letter that they use to respin tarballs -if [[ "${EAPI}x" == "5x" ]]; then - MYSQL_VERSION_ID="" - tpv="${PV%[a-z]}" - tpv=( ${tpv//[-._]/ } ) ; tpv[3]="${PVR:${#PV}}" ; tpv[3]="${tpv[3]##*-r}" - for vatom in 0 1 2 3 ; do - # pad to length 2 - tpv[${vatom}]="00${tpv[${vatom}]}" - MYSQL_VERSION_ID="${MYSQL_VERSION_ID}${tpv[${vatom}]:0-2}" - done - # strip leading "0" (otherwise it's considered an octal number by BASH) - MYSQL_VERSION_ID=${MYSQL_VERSION_ID##"0"} -fi - -# Work out the default SERVER_URI correctly -if [[ -z ${SERVER_URI} ]]; then - if [[ ${PN} == "mariadb" ]]; then - # Beginning with 5.5, MariaDB stopped putting beta, alpha or rc on their tarball names - MARIA_FULL_PV=$(get_version_component_range 1-3) - MARIA_FULL_P="${PN}-${MARIA_FULL_PV}" - SERVER_URI="https://downloads.mariadb.org/interstitial/${MARIA_FULL_P}/source/${MARIA_FULL_P}.tar.gz" - elif [[ ${PN} == "percona-server" ]]; then - PERCONA_PN="Percona-Server" - MIRROR_PV=$(get_version_component_range 1-2 ${PV}) - MY_PV=$(get_version_component_range 1-3 ${PV}) - PERCONA_RELEASE=$(get_version_component_range 4-5 ${PV}) - PERCONA_RC=$(get_version_component_range 6 ${PV}) - SERVER_URI="http://www.percona.com/redir/downloads/${PERCONA_PN}-${MIRROR_PV}/${PERCONA_PN}-${MY_PV}-${PERCONA_RC}${PERCONA_RELEASE}/source/tarball/${PN}-${MY_PV}-${PERCONA_RC}${PERCONA_RELEASE}.tar.gz" - else - if [[ "${PN}" == "mysql-cluster" ]] ; then - URI_DIR="MySQL-Cluster" - URI_FILE="mysql-cluster-gpl" - else - URI_DIR="MySQL" - URI_FILE="mysql" - fi - [[ -z ${MY_PV} ]] && MY_PV="${PV//_/-}" - URI_A="${URI_FILE}-${MY_PV}.tar.gz" - MIRROR_PV=$(get_version_component_range 1-2 ${PV}) - # Recently upstream switched to an archive site, and not on mirrors - SERVER_URI="http://cdn.mysql.com/Downloads/${URI_DIR}-${MIRROR_PV}/${URI_A} - http://downloads.mysql.com/archives/${URI_DIR}-${MIRROR_PV}/${URI_A}" - fi -fi - -# Define correct SRC_URIs -SRC_URI="${SERVER_URI}" - -# 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 - -DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" -HOMEPAGE="http://www.mysql.com/" -LICENSE="GPL-2" -SLOT="0/${SUBSLOT:-0}" - -IUSE="debug embedded extraengine jemalloc latin1 libressl +openssl - +perl profiling selinux +server systemtap static static-libs tcmalloc test yassl" - -REQUIRED_USE="^^ ( yassl openssl libressl )" - -# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests -RESTRICT="libressl? ( test )" - -REQUIRED_USE="${REQUIRED_USE} !server? ( !extraengine !embedded ) - ?? ( tcmalloc jemalloc ) - static? ( !libressl !openssl yassl )" - -# -# DEPENDENCIES: -# - -# 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 -DEPEND=" - kernel_linux? ( - sys-process/procps:0= - dev-libs/libaio:0= - ) - >=sys-apps/sed-4 - >=sys-apps/texinfo-4.7-r1 - !dev-db/mariadb-native-client[mysqlcompat] - jemalloc? ( dev-libs/jemalloc:0= ) - tcmalloc? ( dev-util/google-perftools:0= ) - systemtap? ( >=dev-util/systemtap-1.3:0= ) - openssl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] ) - >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] - sys-libs/ncurses:0= -" - -# prefix: first need to implement something for #196294 -RDEPEND="${DEPEND} - selinux? ( sec-policy/selinux-mysql ) - abi_x86_32? ( !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] ) -" - -# Having different flavours at the same time is not a good idea -for i in "mysql" "mariadb" "mariadb-galera" "percona-server" "mysql-cluster" ; do - [[ ${i} == ${PN} ]] || - RDEPEND="${RDEPEND} !dev-db/${i}" -done - -RDEPEND="${RDEPEND} - server? ( !prefix? ( dev-db/mysql-init-scripts ) ) - !<virtual/mysql-5.6-r4" - -# compile-time-only -# ncurses only needs multilib for compile time due to a binary that will be not installed -DEPEND="${DEPEND} - virtual/yacc - static? ( sys-libs/ncurses[static-libs] ) -" - -# For other stuff to bring us in -# dev-perl/DBD-mysql is needed by some scripts installed by MySQL -PDEPEND="${PDEPEND} perl? ( >=dev-perl/DBD-mysql-2.9004 ) - server? ( ~virtual/mysql-${MYSQL_PV_MAJOR}[embedded=,static=] ) - virtual/libmysqlclient:${MYSLOT:-${SLOT}}[${MULTILIB_USEDEP},static-libs=]" - -# my_config.h includes ABI specific data -MULTILIB_WRAPPED_HEADERS=( /usr/include/mysql/my_config.h /usr/include/mysql/private/embedded_priv.h ) - -# -# EBUILD FUNCTIONS -# - -# @FUNCTION: mysql-multilib-r1_pkg_pretend -# @DESCRIPTION: -# Perform some basic tests and tasks during pkg_pretend phase: -mysql-multilib-r1_pkg_pretend() { - 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 -} - -# @FUNCTION: mysql-multilib-r1_pkg_setup -# @DESCRIPTION: -# Perform some basic tests and tasks during pkg_setup phase: -# die if FEATURES="test", USE="server" and not using FEATURES="userpriv" -# create new user and group for mysql -# warn about deprecated features -mysql-multilib-r1_pkg_setup() { - - if has test ${FEATURES} && \ - use server && ! has userpriv ${FEATURES} ; then - eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - - # This should come after all of the die statements - enewgroup mysql 60 || die "problem adding 'mysql' group" - enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" -} - -# @FUNCTION: mysql-multilib-r1_src_unpack -# @DESCRIPTION: -# Unpack the source code -mysql-multilib-r1_src_unpack() { - - # Initialize the proper variables first - mysql_init_vars - - unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR}/${MY_SOURCEDIR}" "${S}" -} - -# @FUNCTION: mysql-multilib-r1_src_prepare -# @DESCRIPTION: -# Apply patches to the source code and remove unneeded bundled libs. -mysql-multilib-r1_src_prepare() { - - debug-print-function ${FUNCNAME} "$@" - - cd "${S}" - - if [[ ${MY_EXTRAS_VER} != none ]]; then - - # Apply the patches for this MySQL version - if [[ "${EAPI}x" == "5x" ]]; then - EPATCH_SUFFIX="patch" - mkdir -p "${EPATCH_SOURCE}" || die "Unable to create epatch directory" - # Clean out old items - rm -f "${EPATCH_SOURCE}"/* - # Now link in right patches - mysql_mv_patches - # And apply - epatch - fi - fi - - # last -fPIC fixup, per bug #305873 - i="${S}"/storage/innodb_plugin/plug.in - if [[ -f ${i} ]] ; then sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}" || die ; fi - - rm -f "scripts/mysqlbug" - if use jemalloc && [[ ${PN} != "mariadb" ]] ; 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" - fi - - if in_iuse tokudb ; then - # 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 - fi - - # Remove the bundled groonga if it exists - # There is no CMake flag, it simply checks for existance - if [[ -d "${S}"/storage/mroonga/vendor/groonga ]] ; then - rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga" - 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 [[ "${EAPI}x" == "5x" ]] ; then - epatch_user - else - default - fi -} - -# @FUNCTION: mysql-multilib-r1_src_configure -# @DESCRIPTION: -# Configure mysql to build the code for Gentoo respecting the use flags. -mysql-multilib-r1_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 in_iuse tokudb && use tokudb; then - echo "int main(void) { return 0; }" | \ - $(tc-getCC) -x c -o /dev/null ${CFLAGS} ${LDFLAGS} -flto -fuse-linker-plugin - - if [[ $? -ne 0 ]] ; then - eerror "${PN} with tokudb needs to be built with a compiler which supports -flto." - eerror "Please use gcc-config to switch to gcc-4.7 or later" - eerror "or another compatible compiler." - die "unsupported compiler" - fi - fi - - multilib-minimal_src_configure -} - -multilib_src_configure() { - debug-print-function ${FUNCNAME} "$@" - - 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_ELIBDIR=$(get_libdir)/mysql - -DINSTALL_MANDIR=share/man - -DINSTALL_MYSQLDATADIR=${EPREFIX}/var/lib/mysql - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin - -DINSTALL_SBINDIR=sbin - -DINSTALL_SCRIPTDIR=share/mysql/scripts - -DINSTALL_SQLBENCHDIR=share/mysql - -DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql - -DWITH_COMMENT="Gentoo Linux ${PF}" - -DWITH_UNIT_TESTS=$(usex test ON OFF) - -DWITH_LIBEDIT=0 - -DWITH_ZLIB=system - -DWITHOUT_LIBWRAP=1 - -DENABLED_LOCAL_INFILE=1 - -DMYSQL_UNIX_ADDR=${EPREFIX}/var/run/mysqld/mysqld.sock - -DINSTALL_UNIX_ADDRDIR=${EPREFIX}/var/run/mysqld/mysqld.sock - -DWITH_DEFAULT_COMPILER_OPTIONS=0 - -DWITH_DEFAULT_FEATURE_SET=0 - -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)" - -DENABLE_STATIC_LIBS=$(usex static-libs ON OFF) - # The build forces this to be defined when cross-compiling. We pass it - # all the time for simplicity and to make sure it is actually correct. - -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1) - -DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)" - ) - - if use test ; then - mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test ) - else - mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' ) - fi - - if use openssl || use libressl ; then - mycmakeargs+=( -DWITH_SSL=system ) - else - mycmakeargs+=( -DWITH_SSL=bundled ) - fi - - if ! multilib_is_native_abi ; then - mycmakeargs+=( -DWITHOUT_TOOLS=1 ) - fi - - if in_iuse bindist ; then - # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION - if multilib_is_native_abi; then - mycmakeargs+=( - -DWITH_READLINE=$(usex bindist 1 0) - -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1) - ) - else - mycmakeargs+=( - -DWITH_READLINE=1 - -DNOT_FOR_DISTRIBUTION=0 - ) - fi - fi - - ### TODO: make this system but issues with UTF-8 prevent it - mycmakeargs+=( -DWITH_EDITLINE=bundled ) - - if multilib_is_native_abi && use server ; then - - # systemd is only linked to for server notification - if in_iuse systemd ; then - mycmakeargs+=( -DWITH_SYSTEMD=$(usex systemd) ) - fi - - if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then - ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}" - ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}." - ewarn "You MUST file bugs without these variables set." - - mycmakeargs+=( - -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET} - -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION} - ) - - elif ! use latin1 ; then - mycmakeargs+=( - -DDEFAULT_CHARSET=utf8 - -DDEFAULT_COLLATION=utf8_general_ci - ) - else - mycmakeargs+=( - -DDEFAULT_CHARSET=latin1 - -DDEFAULT_COLLATION=latin1_swedish_ci - ) - fi - mycmakeargs+=( - -DEXTRA_CHARSETS=all - -DMYSQL_USER=mysql - -DMYSQL_UNIX_ADDR=${EPREFIX}/var/run/mysqld/mysqld.sock - -DDISABLE_SHARED=$(usex static YES NO) - -DWITH_DEBUG=$(usex debug) - -DWITH_EMBEDDED_SERVER=$(usex embedded) - -DWITH_PROFILING=$(usex profiling) - ) - - if use static; then - mycmakeargs+=( -DWITH_PIC=1 ) - fi - - if use jemalloc || use tcmalloc ; then - mycmakeargs+=( -DWITH_SAFEMALLOC=OFF ) - fi - - # Storage engines - mycmakeargs+=( - -DWITH_ARCHIVE_STORAGE_ENGINE=1 - -DWITH_BLACKHOLE_STORAGE_ENGINE=1 - -DWITH_CSV_STORAGE_ENGINE=1 - -DWITH_HEAP_STORAGE_ENGINE=1 - -DWITH_INNOBASE_STORAGE_ENGINE=1 - -DWITH_MYISAMMRG_STORAGE_ENGINE=1 - -DWITH_MYISAM_STORAGE_ENGINE=1 - -DWITH_PARTITION_STORAGE_ENGINE=1 - ) - - mycmakeargs+=( -DWITH_FEDERATED_STORAGE_ENGINE=$(usex extraengine) ) - else - mycmakeargs+=( - -DWITHOUT_SERVER=1 - -DWITHOUT_EMBEDDED_SERVER=1 - -DEXTRA_CHARSETS=none - -DINSTALL_SQLBENCHDIR= - -DWITH_SYSTEMD=NO - ) - fi - - # systemtap only works on native ABI bug 530132 - if multilib_is_native_abi; then - mycmakeargs+=( -DENABLE_DTRACE=$(usex systemtap) - "${MYSQL_CMAKE_NATIVE_DEFINES[@]}" ) - else - mycmakeargs+=( -DENABLE_DTRACE=0 - "${MYSQL_CMAKE_NONNATIVE_DEFINES[@]}" ) - fi - - mycmakeargs+=( "${MYSQL_CMAKE_EXTRA_DEFINES[@]}" ) - - cmake-utils_src_configure -} - -mysql-multilib-r1_src_compile() { - local _cmake_args=( "${@}" ) - - multilib-minimal_src_compile -} - -multilib_src_compile() { - - cmake-utils_src_compile "${_cmake_args[@]}" -} - - -# @FUNCTION: mysql-multilib-r1_src_install -# @DESCRIPTION: -# Install mysql. -mysql-multilib-r1_src_install() { - # wrap the config script - if ! declare -a MULTILIB_CHOST_TOOLS ; then - MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config ) - fi - - multilib-minimal_src_install -} - -multilib_src_install() { - debug-print-function ${FUNCNAME} "$@" - - cmake-utils_src_install - # Make sure the vars are correctly initialized - mysql_init_vars - - # Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used - if [[ -f "${D}${MY_INCLUDEDIR}/private/config.h" ]] ; then - rm "${D}${MY_INCLUDEDIR}/private/config.h" || die - fi - - if multilib_is_native_abi; then - - # Convenience links - einfo "Making Convenience links for mysqlcheck multi-call binary" - dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze" - dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair" - dosym "/usr/bin/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 - case ${MYSQL_PV_MAJOR} in - 5.5) mysql_mycnf_version="5.5" ;; - 5.[6-9]|6*|7*|8*|9*|10*) mysql_mycnf_version="5.6" ;; - esac - einfo "Building default my.cnf (${mysql_mycnf_version})" - insinto "${MY_SYSCONFDIR#${EPREFIX}}" - [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf - mycnf_src="my.cnf-${mysql_mycnf_version}" - 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 "Creating initial directories" - # Empty directories ... - diropts "-m0750" - if [[ ${PREVIOUS_DATADIR} != "yes" ]] ; then - dodir "${MY_DATADIR#${EPREFIX}}" - keepdir "${MY_DATADIR#${EPREFIX}}" - chown -R mysql:mysql "${D}/${MY_DATADIR}" - fi - - diropts "-m0755" - for folder in "${MY_LOGDIR#${EPREFIX}}" ; do - dodir "${folder}" - keepdir "${folder}" - chown -R mysql:mysql "${ED}/${folder}" - done - - einfo "Including support files and sample configurations" - docinto "support-files" - for script in \ - "${S}"/support-files/my-*.cnf.sh \ - "${S}"/support-files/magic \ - "${S}"/support-files/ndb-config-2-node.ini.sh - 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" - - # Percona has decided to rename libmysqlclient to libperconaserverclient - # Use a symlink to preserve linkages for those who don't use mysql_config - local suffix - for suffix in ".so" "_r.so" ".a" "_r.a" ; do - if [[ -e "${ED}/usr/$(get_libdir)/libperconaserverclient${suffix}" ]] ; then - dosym libperconaserverclient${suffix} /usr/$(get_libdir)/libmysqlclient${suffix} - fi - done - else - if [[ "${PN}" == "mariadb" ]] && use server ; then - insinto /usr/include/mysql/private - doins "${S}"/sql/*.h - fi - fi -} - -# @FUNCTION: mysql-multilib-r1_pkg_preinst -# @DESCRIPTION: -# Warn about ABI changes when switching providers -mysql-multilib-r1_pkg_preinst() { - debug-print-function ${FUNCNAME} "$@" - - # 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 - if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then - elog "Due to ABI changes when switching between different client libraries," - elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient." - elog "Please run: revdep-rebuild --library libmysqlclient.so.${SUBSLOT:-18}" - ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries" - fi -} - -# @FUNCTION: mysql-multilib-r1_pkg_postinst -# @DESCRIPTION: -# Run post-installation tasks: -# create the dir for logfiles if non-existant -# touch the logfiles and secure them -# install scripts -# issue required steps for optional features -# issue deprecation warnings -mysql-multilib-r1_pkg_postinst() { - debug-print-function ${FUNCNAME} "$@" - - # Make sure the vars are correctly initialized - mysql_init_vars - - # Check FEATURES="collision-protect" before removing this - [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" - - # Secure the logfiles - touch "${ROOT}${MY_LOGDIR}"/mysql.{log,err} - chown mysql:mysql "${ROOT}${MY_LOGDIR}"/mysql* - chmod 0660 "${ROOT}${MY_LOGDIR}"/mysql* - - # Minimal builds don't have the MySQL server - if use server ; then - docinto "support-files" - for script in \ - support-files/my-*.cnf \ - support-files/magic \ - support-files/ndb-config-2-node.ini - do - [[ -f "${script}" ]] \ - && dodoc "${script}" - done - - docinto "scripts" - for script in scripts/mysql* ; do - if [[ -f "${script}" && "${script%.sh}" == "${script}" ]]; then - dodoc "${script}" - fi - done - - if in_iuse pam && use pam; then - einfo - elog "This install includes the PAM authentication plugin." - elog "To activate and configure the PAM plugin, please read:" - if [[ ${PN} == "mariadb" ]] ; then - elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/" - elif [[ ${PN} == "percona-server" ]] ; then - elog "https://www.percona.com/doc/percona-server/5.6/management/pam_plugin.html" - fi - einfo - fi - - if [[ -z "${REPLACING_VERSIONS}" ]] ; then - einfo - elog "You might want to run:" - elog "\"emerge --config =${CATEGORY}/${PF}\"" - elog "if this is a new install." - elog - elog "If you are switching server implentations, you should run the" - elog "mysql_upgrade tool." - einfo - else - einfo - elog "If you are upgrading major versions, you should run the" - elog "mysql_upgrade tool." - einfo - fi - - if in_iuse galera && use galera ; then - einfo - elog "Be sure to edit the my.cnf file to activate your cluster settings." - elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\"" - elog "The first time the cluster is activated, you should add" - elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node." - elog "This option should then be removed for subsequent starts." - einfo - fi - fi -} - -# @FUNCTION: mysql-multilib-r1_getopt -# @DESCRIPTION: -# Use my_print_defaults to extract specific config options -mysql-multilib-r1_getopt() { - local mypd="${EROOT}"/usr/bin/my_print_defaults - section="$1" - flag="--${2}=" - "${mypd}" $section | sed -n "/^${flag}/p" -} - -# @FUNCTION: mysql-multilib-r1_getoptval -# @DESCRIPTION: -# Use my_print_defaults to extract specific config options -mysql-multilib-r1_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" -} - -# @FUNCTION: mysql-multilib-r1_pkg_config -# @DESCRIPTION: -# Configure mysql environment. -mysql-multilib-r1_pkg_config() { - - debug-print-function ${FUNCNAME} "$@" - - 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="$(mysql-multilib-r1_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="$(mysql-multilib-r1_getoptval "${tmp_mysqld_password_source}" password --show)" - fi - - unset tmp_mysqld_password_source - fi - MYSQL_TMPDIR="$(mysql-multilib-r1_getoptval mysqld tmpdir)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(mysql-multilib-r1_getoptval mysqld relay-log)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(mysql-multilib-r1_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'" - - local help_tables="${ROOT}${MY_SHAREDSTATEDIR}/fill_help_tables.sql" - [[ -r "${help_tables}" ]] \ - && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \ - || touch "${TMPDIR}/fill_help_tables.sql" - help_tables="${TMPDIR}/fill_help_tables.sql" - - # 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 \ - ndbcluster log-slave-updates \ - ; do - optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}" - egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}" - done - # But some options changed names - egrep -sq external-locking "${helpfile}" && \ - options="${options/skip-locking/skip-external-locking}" - - use prefix || options="${options} --user=mysql" - - 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 - mkdir -p "${PID_DIR}" || die "Could not create pid directory" - chown mysql:mysql "${PID_DIR}" || die "Could not set ownership on pid directory" - chmod 755 "${PID_DIR}" || die "Could not set permissions on pid directory" - fi - - pushd "${TMPDIR}" &>/dev/null - - # 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 cmdtest - local initialize_options - if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] && version_is_at_least "5.7.6" ; then - # --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 - cmd=( "${EROOT}usr/sbin/mysqld" ) - initialize_options="--initialize-insecure --init-file='${sqltmp}'" - sqltmp="" # the initialize will take care of it - else - for cmdtest in "${EROOT}usr/share/mariadb/scripts/mysql_install_db" \ - "${EROOT}usr/share/mysql/scripts/mysql_install_db" \ - "${EROOT}usr/bin/mysql_install_db" ; do - if [[ -x "${cmdtest}" ]] ; then - cmd=( "${cmdtest}" ) - break - fi - done - if [[ -r "${help_tables}" ]] ; then - cat "${help_tables}" >> "${sqltmp}" - fi - fi - cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" ${initialize_options} ) - einfo "Command: ${cmd[*]}" - "${cmd[@]}" \ - >"${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 - [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ - || die "MySQL databases not installed" - chown -R mysql:mysql "${ROOT}/${MY_DATADIR}" 2>/dev/null - chmod 0750 "${ROOT}/${MY_DATADIR}" 2>/dev/null - - 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 \ - --default-storage-engine=MyISAM \ - --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" -} - - -# -# HELPER FUNCTIONS: -# - -# @FUNCTION: mysql-multilib-r1_disable_test -# @DESCRIPTION: -# Helper function to disable specific tests. -mysql-multilib-r1_disable_test() { - - local rawtestname testname testsuite reason mysql_disabled_file mysql_disabled_dir - rawtestname="${1}" ; shift - reason="${@}" - ewarn "test '${rawtestname}' disabled: '${reason}'" - - testsuite="${rawtestname/.*}" - testname="${rawtestname/*.}" - for mysql_disabled_file in \ - ${S}/mysql-test/disabled.def \ - ${S}/mysql-test/t/disabled.def ; do - [[ -f ${mysql_disabled_file} ]] && break - done - #mysql_disabled_file="${S}/mysql-test/t/disabled.def" - #einfo "rawtestname=${rawtestname} testname=${testname} testsuite=${testsuite}" - echo ${testname} : ${reason} >> "${mysql_disabled_file}" - - if [[ ( -n ${testsuite} ) && ( ${testsuite} != "main" ) ]]; then - for mysql_disabled_file in \ - ${S}/mysql-test/suite/${testsuite}/disabled.def \ - ${S}/mysql-test/suite/${testsuite}/t/disabled.def \ - FAILED ; do - [[ -f ${mysql_disabled_file} ]] && break - done - if [[ ${mysql_disabled_file} != "FAILED" ]]; then - echo "${testname} : ${reason}" >> "${mysql_disabled_file}" - else - for mysql_disabled_dir in \ - ${S}/mysql-test/suite/${testsuite} \ - ${S}/mysql-test/suite/${testsuite}/t \ - FAILED ; do - [[ -d ${mysql_disabled_dir} ]] && break - done - if [[ ${mysql_disabled_dir} != "FAILED" ]]; then - echo "${testname} : ${reason}" >> "${mysql_disabled_dir}/disabled.def" - else - ewarn "Could not find testsuite disabled.def location for ${rawtestname}" - fi - fi - fi -} - -# @FUNCTION: mysql-cmake_use_plugin -# @DESCRIPTION: -# Helper function to enable/disable plugins by use flags -# cmake-utils_use_with is not enough as some references check WITH_ (0|1) -# and some check WITHOUT_. Also, this can easily extend to non-storage plugins. -mysql-cmake_use_plugin() { - [[ -z $2 ]] && die "mysql-cmake_use_plugin <USE flag> <flag name>" - if in_iuse $1 && use $1 ; then - echo "-DWITH_$2=1 -DPLUGIN_$2=YES" - else - echo "-DWITHOUT_$2=1 -DWITH_$2=0 -DPLUGIN_$2=NO" - fi -} - -# @FUNCTION: mysql_init_vars -# @DESCRIPTION: -# void mysql_init_vars() -# Initialize global variables -# 2005-11-19 <vivo@gentoo.org> -if [[ "${EAPI}x" != "5x" ]]; then - -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"} - MY_INCLUDEDIR=${MY_INCLUDEDIR="${EPREFIX}/usr/include/mysql"} - MY_LIBDIR=${MY_LIBDIR="${EPREFIX}/usr/$(get_libdir)/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 - - if [ "${MY_SOURCEDIR:-unset}" == "unset" ]; then - MY_SOURCEDIR=${SERVER_URI##*/} - MY_SOURCEDIR=${MY_SOURCEDIR%.tar*} - fi - - export MY_SHAREDSTATEDIR MY_SYSCONFDIR - export MY_LIBDIR MY_LOCALSTATEDIR MY_LOGDIR - export MY_INCLUDEDIR MY_DATADIR MY_SOURCEDIR -} -fi diff --git a/eclass/mysql-multilib.eclass b/eclass/mysql-multilib.eclass deleted file mode 100644 index 3cfdb81..0000000 --- a/eclass/mysql-multilib.eclass +++ /dev/null @@ -1,1164 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: mysql-multilib.eclass -# @MAINTAINER: -# Maintainers: -# - MySQL Team <mysql-bugs@gentoo.org> -# - Robin H. Johnson <robbat2@gentoo.org> -# - Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> -# - Brian Evans <grknight@gentoo.org> -# @BLURB: This eclass provides most of the functions for mysql ebuilds -# @DESCRIPTION: -# The mysql-multilib.eclass is the base eclass to build the mysql and -# alternative projects (mariadb and percona) ebuilds. -# This eclass uses the mysql-cmake eclass for the -# specific bits related to the build system. -# It provides the src_unpack, src_prepare, src_configure, src_compile, -# src_install, pkg_preinst, pkg_postinst, pkg_config and pkg_postrm -# phase hooks. - -MYSQL_EXTRAS="" - -# @ECLASS-VARIABLE: MYSQL_EXTRAS_VER -# @DESCRIPTION: -# The version of the MYSQL_EXTRAS repo to use to build mysql -# Use "none" to disable it's use -[[ ${MY_EXTRAS_VER} == "live" ]] && MYSQL_EXTRAS="git-r3" - -inherit eutils systemd flag-o-matic ${MYSQL_EXTRAS} mysql-cmake mysql_fx versionator \ - toolchain-funcs user cmake-utils multilib-minimal - -# -# Supported EAPI versions and export functions -# - -case "${EAPI:-0}" in - 5) ;; - *) die "Unsupported EAPI: ${EAPI}" ;; -esac - -EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_config - -# -# VARIABLES: -# - -# @ECLASS-VARIABLE: MYSQL_CMAKE_NATIVE_DEFINES -# @DESCRIPTION: -# Add extra CMake arguments for native multilib builds - -# @ECLASS-VARIABLE: MYSQL_CMAKE_NONNATIVE_DEFINES -# @DESCRIPTION: -# Add extra CMake arguments for non-native multilib builds - -# @ECLASS-VARIABLE: MYSQL_CMAKE_EXTRA_DEFINES -# @DESCRIPTION: -# Add extra CMake arguments - -# 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" - -[[ ${MY_EXTRAS_VER} == "latest" ]] && MY_EXTRAS_VER="20090228-0714Z" -if [[ ${MY_EXTRAS_VER} == "live" ]]; then - EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git" - EGIT_CHECKOUT_DIR=${WORKDIR}/mysql-extras - EGIT_CLONE_TYPE=shallow -fi - -# @ECLASS-VARIABLE: MYSQL_PV_MAJOR -# @DESCRIPTION: -# Upstream MySQL considers the first two parts of the version number to be the -# major version. Upgrades that change major version should always run -# mysql_upgrade. -MYSQL_PV_MAJOR="$(get_version_component_range 1-2 ${PV})" - -# Cluster is a special case... -if [[ "${PN}" == "mysql-cluster" ]]; then - case $PV in - 7.2*) MYSQL_PV_MAJOR=5.5 ;; - 7.3*) MYSQL_PV_MAJOR=5.6 ;; - esac -fi - -# MariaDB has left the numbering schema but keeping compatibility -if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then - case ${PV} in - 10.0*) MYSQL_PV_MAJOR="5.6" ;; - 10.1*) MYSQL_PV_MAJOR="5.6" ;; - esac -fi - -# @ECLASS-VARIABLE: MYSQL_VERSION_ID -# @DESCRIPTION: -# MYSQL_VERSION_ID will be: -# major * 10e6 + minor * 10e4 + micro * 10e2 + gentoo revision number, all [0..99] -# This is an important part, because many of the choices the MySQL ebuild will do -# depend on this variable. -# In particular, the code below transforms a $PVR like "5.0.18-r3" in "5001803" -# We also strip off upstream's trailing letter that they use to respin tarballs -MYSQL_VERSION_ID="" -tpv="${PV%[a-z]}" -tpv=( ${tpv//[-._]/ } ) ; tpv[3]="${PVR:${#PV}}" ; tpv[3]="${tpv[3]##*-r}" -for vatom in 0 1 2 3 ; do - # pad to length 2 - tpv[${vatom}]="00${tpv[${vatom}]}" - MYSQL_VERSION_ID="${MYSQL_VERSION_ID}${tpv[${vatom}]:0-2}" -done -# strip leading "0" (otherwise it's considered an octal number by BASH) -MYSQL_VERSION_ID=${MYSQL_VERSION_ID##"0"} - -# This eclass should only be used with at least mysql-5.5.35 -mysql_version_is_at_least "5.5.35" || die "This eclass should only be used with >=mysql-5.5.35" - -# Work out the default SERVER_URI correctly -if [[ -z ${SERVER_URI} ]]; then - [[ -z ${MY_PV} ]] && MY_PV="${PV//_/-}" - if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then - # Beginning with 5.5, MariaDB stopped putting beta, alpha or rc on their tarball names - mysql_version_is_at_least "5.5" && MARIA_FULL_PV=$(get_version_component_range 1-3) || \ - MARIA_FULL_PV=$(replace_version_separator 3 '-' ${MY_PV}) - MARIA_FULL_P="${PN}-${MARIA_FULL_PV}" - SERVER_URI=" - http://ftp.osuosl.org/pub/mariadb/${MARIA_FULL_P}/source/${MARIA_FULL_P}.tar.gz - http://mirror.jmu.edu/pub/mariadb/${MARIA_FULL_P}/source/${MARIA_FULL_P}.tar.gz - http://mirrors.coreix.net/mariadb/${MARIA_FULL_P}/source/${MARIA_FULL_P}.tar.gz - http://mirrors.syringanetworks.net/mariadb/${MARIA_FULL_P}/source/${MARIA_FULL_P}.tar.gz - http://mirrors.fe.up.pt/pub/mariadb/${MARIA_FULL_P}/source/${MARIA_FULL_P}.tar.gz - http://mirror2.hs-esslingen.de/mariadb/${MARIA_FULL_P}/source/${MARIA_FULL_P}.tar.gz - http://ftp.osuosl.org/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://mirror.jmu.edu/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://mirrors.coreix.net/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://mirrors.syringanetworks.net/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://mirrors.fe.up.pt/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://mirror2.hs-esslingen.de/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - " - if [[ ${PN} == "mariadb-galera" ]]; then - MY_SOURCEDIR="${PN%%-galera}-${MARIA_FULL_PV}" - fi - elif [[ ${PN} == "percona-server" ]]; then - PERCONA_PN="Percona-Server" - MIRROR_PV=$(get_version_component_range 1-2 ${PV}) - MY_PV=$(get_version_component_range 1-3 ${PV}) - PERCONA_RELEASE=$(get_version_component_range 4-5 ${PV}) - PERCONA_RC=$(get_version_component_range 6 ${PV}) - SERVER_URI="http://www.percona.com/redir/downloads/${PERCONA_PN}-${MIRROR_PV}/${PERCONA_PN}-${MY_PV}-${PERCONA_RC}${PERCONA_RELEASE}/source/tarball/${PN}-${MY_PV}-${PERCONA_RC}${PERCONA_RELEASE}.tar.gz" -# http://www.percona.com/redir/downloads/Percona-Server-5.5/LATEST/source/tarball/Percona-Server-5.5.30-rel30.2.tar.gz -# http://www.percona.com/redir/downloads/Percona-Server-5.6/Percona-Server-5.6.13-rc60.5/source/tarball/Percona-Server-5.6.13-rc60.5.tar.gz - else - if [[ "${PN}" == "mysql-cluster" ]] ; then - URI_DIR="MySQL-Cluster" - URI_FILE="mysql-cluster-gpl" - else - URI_DIR="MySQL" - URI_FILE="mysql" - fi - URI_A="${URI_FILE}-${MY_PV}.tar.gz" - MIRROR_PV=$(get_version_component_range 1-2 ${PV}) - # Recently upstream switched to an archive site, and not on mirrors - SERVER_URI="http://downloads.mysql.com/archives/${URI_FILE}-${MIRROR_PV}/${URI_A} - mirror://mysql/Downloads/${URI_DIR}-${PV%.*}/${URI_A}" - fi -fi - -# Define correct SRC_URIs -SRC_URI="${SERVER_URI}" - -# 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://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 - https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" -fi - -DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" -HOMEPAGE="http://www.mysql.com/" -if [[ ${PN} == "mariadb" ]]; then - HOMEPAGE="http://mariadb.org/" - DESCRIPTION="An enhanced, drop-in replacement for MySQL" -fi -if [[ ${PN} == "mariadb-galera" ]]; then - HOMEPAGE="http://mariadb.org/" - DESCRIPTION="An enhanced, drop-in replacement for MySQL with Galera Replication" -fi -if [[ ${PN} == "percona-server" ]]; then - HOMEPAGE="http://www.percona.com/software/percona-server" - DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team" -fi -LICENSE="GPL-2" -SLOT="0/${SUBSLOT:-0}" - -IUSE="debug embedded extraengine jemalloc latin1 libressl +openssl - +perl profiling selinux systemtap static static-libs tcmalloc test yassl" - -REQUIRED_USE="^^ ( yassl openssl libressl )" - -### Begin readline/libedit -### If the world was perfect, we would use external libedit on both to have a similar experience -### However libedit does not seem to support UTF-8 keyboard input - -# This probably could be simplified, but the syntax would have to be just right -#if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && \ -# mysql_check_version_range "5.5.37 to 10.0.13.99" ; then -# IUSE="bindist ${IUSE}" -#elif [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] && \ -# mysql_check_version_range "5.5.37 to 5.6.11.99" ; then -# IUSE="bindist ${IUSE}" -#elif [[ ${PN} == "mysql-cluster" ]] && \ -# mysql_check_version_range "7.2 to 7.2.99.99" ; then -# IUSE="bindist ${IUSE}" -#fi - -# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests -RESTRICT="libressl? ( test )" - -if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then - IUSE="bindist ${IUSE}" - RESTRICT="${RESTRICT} !bindist? ( bindist )" -fi - -### End readline/libedit - -if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then - IUSE="${IUSE} oqgraph pam sphinx tokudb" - # 5.5.33 and 10.0.5 add TokuDB. Authors strongly recommend jemalloc or perfomance suffers - mysql_version_is_at_least "10.0.5" && IUSE="${IUSE} odbc xml" - if [[ ${HAS_TOOLS_PATCH} ]] ; then - REQUIRED_USE="${REQUIRED_USE} !server? ( !oqgraph !sphinx ) tokudb? ( jemalloc !tcmalloc )" - else - REQUIRED_USE="${REQUIRED_USE} minimal? ( !oqgraph !sphinx ) tokudb? ( jemalloc !tcmalloc )" - fi - # MariaDB 10.1 introduces InnoDB/XtraDB compression with external libraries - # Choices are bzip2, lz4, lzma, lzo. bzip2 and lzma enabled by default as they are system libraries - mysql_version_is_at_least "10.1.1" && IUSE="${IUSE} innodb-lz4 innodb-lzo" - - # It can also compress with app-arch/snappy - mysql_version_is_at_least "10.1.7" && IUSE="${IUSE} innodb-snappy" - - # 10.1.2 introduces a cracklib password checker - mysql_version_is_at_least "10.1.1" && IUSE="${IUSE} cracklib" -fi - -if [[ -n "${WSREP_REVISION}" ]]; then - if [[ ${PN} == "mariadb" ]]; then - IUSE="${IUSE} galera sst-rsync sst-xtrabackup" - REQUIRED_USE="${REQUIRED_USE} sst-rsync? ( galera ) sst-xtrabackup? ( galera )" - else - IUSE="${IUSE} +sst-rsync sst-xtrabackup" - fi -fi - -if [[ ${PN} == "percona-server" ]]; then - IUSE="${IUSE} pam" -fi - -if [[ ${HAS_TOOLS_PATCH} ]] ; then - IUSE="${IUSE} client-libs +server +tools" - REQUIRED_USE="${REQUIRED_USE} !server? ( !extraengine !embedded ) server? ( tools ) || ( client-libs server tools )" -else - IUSE="${IUSE} minimal" - REQUIRED_USE="${REQUIRED_USE} minimal? ( !extraengine !embedded )" -fi - -REQUIRED_USE=" - ${REQUIRED_USE} tcmalloc? ( !jemalloc ) jemalloc? ( !tcmalloc ) - static? ( yassl !openssl !libressl )" - -# -# DEPENDENCIES: -# - -# 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 -DEPEND=" - kernel_linux? ( - sys-process/procps:0= - dev-libs/libaio:0= - ) - >=sys-apps/sed-4 - >=sys-apps/texinfo-4.7-r1 - !dev-db/mariadb-native-client[mysqlcompat] - jemalloc? ( dev-libs/jemalloc:0= ) - tcmalloc? ( dev-util/google-perftools:0= ) - systemtap? ( >=dev-util/systemtap-1.3:0= ) -" - -if [[ ${HAS_TOOLS_PATCH} ]] ; then - DEPEND+=" - client-libs? ( - openssl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] ) - >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] - ) - !client-libs? ( - openssl? ( >=dev-libs/openssl-1.0.0:0=[static-libs?] ) - libressl? ( dev-libs/libressl:0=[static-libs?] ) - >=sys-libs/zlib-1.2.3:0=[static-libs?] - ) - tools? ( sys-libs/ncurses:0= ) embedded? ( sys-libs/ncurses:0= ) - " -else - DEPEND+=" - openssl? ( >=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?] ) - libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP},static-libs?] ) - >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] - sys-libs/ncurses:0=[${MULTILIB_USEDEP}] - " -fi - -### Begin readline/libedit -### If the world was perfect, we would use external libedit on both to have a similar experience -### However libedit does not seem to support UTF-8 keyboard input - -# dev-db/mysql-5.6.12+ only works with dev-libs/libedit -# mariadb 10.0.14 fixes libedit detection. changed to follow mysql -# This probably could be simplified -#if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] && \ -# mysql_version_is_at_least "5.6.12" ; then -# DEPEND="${DEPEND} dev-libs/libedit:0=[${MULTILIB_USEDEP}]" -#elif [[ ${PN} == "mysql-cluster" ]] && mysql_version_is_at_least "7.3"; then -# DEPEND="${DEPEND} dev-libs/libedit:0=[${MULTILIB_USEDEP}]" -#elif [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && \ -# mysql_version_is_at_least "10.0.14" ; then -# DEPEND="${DEPEND} dev-libs/libedit:0=[${MULTILIB_USEDEP}]" -#else -# DEPEND="${DEPEND} !bindist? ( >=sys-libs/readline-4.1:0=[${MULTILIB_USEDEP}] )" -#fi - -if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then - # Readline is only used for the command-line and embedded example - if [[ ${HAS_TOOLS_PATCH} ]] ; then - DEPEND="${DEPEND} !bindist? ( tools? ( >=sys-libs/readline-4.1:0= ) embedded? ( >=sys-libs/readline-4.1:0= ) )" - else - DEPEND="${DEPEND} !bindist? ( >=sys-libs/readline-4.1:0=[${MULTILIB_USEDEP}] )" - fi -fi - -### End readline/libedit - -if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] ; then - if mysql_version_is_at_least "5.7.6" ; then DEPEND="${DEPEND} >=dev-libs/boost-1.57.0:0=" ; else - mysql_version_is_at_least "5.7.5" && DEPEND="${DEPEND} >=dev-libs/boost-1.56.0:0=" - fi -fi - -if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then - # Bug 441700 MariaDB >=5.3 include custom mytop - if [[ ${HAS_TOOLS_PATCH} ]] ; then - DEPEND="${DEPEND} server? ( pam? ( virtual/pam:0= ) )" - else - DEPEND="${DEPEND} !minimal? ( pam? ( virtual/pam:0= ) )" - fi - DEPEND="${DEPEND} - oqgraph? ( >=dev-libs/boost-1.40.0:0= ) - perl? ( !dev-db/mytop )" - if mysql_version_is_at_least "10.0.5" ; then - DEPEND="${DEPEND} - extraengine? ( - odbc? ( dev-db/unixODBC:0= ) - xml? ( dev-libs/libxml2:2= ) - ) - " - fi - mysql_version_is_at_least "10.0.7" && DEPEND="${DEPEND} oqgraph? ( dev-libs/judy:0= )" - mysql_version_is_at_least "10.0.9" && DEPEND="${DEPEND} >=dev-libs/libpcre-8.35:3=" - - mysql_version_is_at_least "10.1.1" && DEPEND="${DEPEND} - innodb-lz4? ( app-arch/lz4 ) - innodb-lzo? ( dev-libs/lzo ) - " - - mysql_version_is_at_least "10.1.2" && DEPEND="${DEPEND} cracklib? ( sys-libs/cracklib:0= )" - mysql_version_is_at_least "10.1.7" && DEPEND="${DEPEND} innodb-snappy? ( app-arch/snappy )" -fi - -if [[ ${PN} == "percona-server" ]] ; then - if [[ ${HAS_TOOLS_PATCH} ]] ; then - DEPEND="${DEPEND} server? ( pam? ( virtual/pam:0= ) )" - else - DEPEND="${DEPEND} !minimal? ( pam? ( virtual/pam:0= ) )" - fi -fi - -# Having different flavours at the same time is not a good idea -for i in "mysql" "mariadb" "mariadb-galera" "percona-server" "mysql-cluster" ; do - [[ ${i} == ${PN} ]] || - DEPEND="${DEPEND} !dev-db/${i}" -done - -if [[ ${PN} == "mysql-cluster" ]] ; then - # TODO: This really should include net-misc/memcached - # but the package does not install the files it seeks. - mysql_version_is_at_least "7.2.3" && \ - DEPEND="${DEPEND} dev-libs/libevent:0=" -fi - -# prefix: first need to implement something for #196294 -# TODO: check emul-linux-x86-db dep when it is multilib enabled -RDEPEND="${DEPEND} - selinux? ( sec-policy/selinux-mysql ) - abi_x86_32? ( !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] ) -" - -if [[ ${HAS_TOOLS_PATCH} ]] ; then - RDEPEND="${RDEPEND} - server? ( !prefix? ( dev-db/mysql-init-scripts ) ) - !client-libs? ( virtual/libmysqlclient ) - !<virtual/mysql-5.6-r4" -else - RDEPEND="${RDEPEND} !minimal? ( !prefix? ( dev-db/mysql-init-scripts ) )" -fi - -if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then - # Bug 455016 Add dependencies of mytop - RDEPEND="${RDEPEND} perl? ( - virtual/perl-Getopt-Long - dev-perl/TermReadKey - virtual/perl-Term-ANSIColor - virtual/perl-Time-HiRes ) " -fi - -# @ECLASS-VARIABLE: WSREP_REVISION -# @DEFAULT_UNSET -# @DESCRIPTION: -# Version of the sys-cluster/galera API (major version in portage) to use for galera clustering - -if [[ -n "${WSREP_REVISION}" ]] ; then - # The wsrep API version must match between the ebuild and sys-cluster/galera. - # This will be indicated by WSREP_REVISION in the ebuild and the first number - # in the version of sys-cluster/galera - # - # lsof is required as of 5.5.38 and 10.0.11 for the rsync sst - - GALERA_RDEPEND="sys-apps/iproute2 - =sys-cluster/galera-${WSREP_REVISION}* - " - if [[ ${PN} == "mariadb" ]]; then - GALERA_RDEPEND="galera? ( ${GALERA_RDEPEND} )" - fi - RDEPEND="${RDEPEND} ${GALERA_RDEPEND} - sst-rsync? ( sys-process/lsof ) - sst-xtrabackup? ( - net-misc/socat[ssl] - ) - " - # Causes a circular dependency if DBD-mysql is not already installed - PDEPEND="${PDEPEND} sst-xtrabackup? ( >=dev-db/xtrabackup-bin-2.2.4 )" -fi - -if [[ ${PN} == "mysql-cluster" ]] ; then - mysql_version_is_at_least "7.2.9" && RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.6 )" && \ - DEPEND="${DEPEND} java? ( >=virtual/jdk-1.6 )" -fi - -# compile-time-only -# ncurses only needs multilib for compile time due to a binary that will be not installed -DEPEND="${DEPEND} - virtual/yacc - static? ( sys-libs/ncurses[static-libs] ) - >=dev-util/cmake-2.8.9 -" - -# Transition dep until all ebuilds have client-libs patch and USE -if ! [[ ${HAS_TOOLS_PATCH} ]] ; then - DEPEND="${DEPEND} sys-libs/ncurses[${MULTILIB_USEDEP}]" -fi - -# For other stuff to bring us in -# dev-perl/DBD-mysql is needed by some scripts installed by MySQL -PDEPEND="${PDEPEND} perl? ( >=dev-perl/DBD-mysql-2.9004 ) - ~virtual/mysql-${MYSQL_PV_MAJOR}" - -# my_config.h includes ABI specific data -MULTILIB_WRAPPED_HEADERS=( /usr/include/mysql/my_config.h /usr/include/mysql/private/embedded_priv.h ) - -[[ ${PN} == "mysql-cluster" ]] && \ - MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/storage/ndb/ndb_types.h ) - -[[ ${PN} == "mariadb" ]] && mysql_version_is_at_least "10.1.1" && \ - MULTILIB_WRAPPED_HEADERS+=( /usr/include/mysql/mysql_version.h ) - -# -# HELPER FUNCTIONS: -# - -# @FUNCTION: mysql-multilib_disable_test -# @DESCRIPTION: -# Helper function to disable specific tests. -mysql-multilib_disable_test() { - mysql-cmake_disable_test "$@" -} - -# -# EBUILD FUNCTIONS -# - -# @FUNCTION: mysql-multilib_pkg_pretend -# @DESCRIPTION: -# Perform some basic tests and tasks during pkg_pretend phase: -mysql-multilib_pkg_pretend() { - if [[ ${MERGE_TYPE} != binary ]] ; then - local GCC_MAJOR_SET=$(gcc-major-version) - local GCC_MINOR_SET=$(gcc-minor-version) - if use_if_iuse tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} with tokudb needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - # Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on - # non x86{,_64} arches - if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \ - ${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then - eerror "${PN} needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - fi -} - -# @FUNCTION: mysql-multilib_pkg_setup -# @DESCRIPTION: -# Perform some basic tests and tasks during pkg_setup phase: -# die if FEATURES="test", USE="-minimal" and not using FEATURES="userpriv" -# create new user and group for mysql -# warn about deprecated features -mysql-multilib_pkg_setup() { - - if has test ${FEATURES} ; then - if use_if_iuse minimal ; then - : - elif ! in_iuse server || use_if_iuse server ; then - if ! has userpriv ${FEATURES} ; then - eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - fi - 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" - - if [[ ${PN} == "mysql-cluster" ]] ; then - mysql_version_is_at_least "7.2.9" && java-pkg-opt-2_pkg_setup - fi -} - -# @FUNCTION: mysql-multilib_src_unpack -# @DESCRIPTION: -# Unpack the source code -mysql-multilib_src_unpack() { - - # Initialize the proper variables first - mysql_init_vars - - unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR}/${MY_SOURCEDIR}" "${S}" -} - -# @FUNCTION: mysql-multilib_src_prepare -# @DESCRIPTION: -# Apply patches to the source code and remove unneeded bundled libs. -mysql-multilib_src_prepare() { - mysql-cmake_src_prepare "$@" - if [[ ${PN} == "mysql-cluster" ]] ; then - mysql_version_is_at_least "7.2.9" && java-pkg-opt-2_src_prepare - fi -} - - -# @FUNCTION: mysql-multilib_src_configure -# @DESCRIPTION: -# Configure mysql to build the code for Gentoo respecting the use flags. -mysql-multilib_src_configure() { - # Bug #114895, bug #110149 - filter-flags "-O" "-O[01]" - - CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" - CXXFLAGS="${CXXFLAGS} -felide-constructors" - # Causes linkage failures. Upstream bug #59607 removes it - if ! mysql_version_is_at_least "5.6" ; then - CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" - fi - # As of 5.7, exceptions are used! - if [[ ${PN} == "percona-server" ]] && mysql_version_is_at_least "5.6.26" ; then - CXXFLAGS="${CXXFLAGS} -fno-rtti" - elif ! mysql_version_is_at_least "5.7" ; then - CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti" - fi - export CXXFLAGS - - # bug #283926, with GCC4.4, this is required to get correct behavior. - append-flags -fno-strict-aliasing - - # bug 508724 mariadb cannot use ld.gold - if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then - tc-ld-disable-gold - fi - - multilib-minimal_src_configure -} - -multilib_src_configure() { - - debug-print-function ${FUNCNAME} "$@" - - CMAKE_BUILD_TYPE="RelWithDebInfo" - - if ! multilib_is_native_abi && in_iuse client-libs ; then - if ! use client-libs ; then - einfo "Skipping multilib build due to client-libs USE disabled" - return 0 - fi - fi - - # 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_ELIBDIR=$(get_libdir)/mysql - -DINSTALL_MANDIR=share/man - -DINSTALL_MYSQLDATADIR=${EPREFIX}/var/lib/mysql - -DINSTALL_MYSQLSHAREDIR=share/mysql - -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test - -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin - -DINSTALL_SBINDIR=sbin - -DINSTALL_SCRIPTDIR=share/mysql/scripts - -DINSTALL_SQLBENCHDIR=share/mysql - -DINSTALL_SUPPORTFILESDIR=${EPREFIX}/usr/share/mysql - -DWITH_COMMENT="Gentoo Linux ${PF}" - $(cmake-utils_use_with test UNIT_TESTS) - -DWITH_LIBEDIT=0 - -DWITH_ZLIB=system - -DWITHOUT_LIBWRAP=1 - -DENABLED_LOCAL_INFILE=1 - -DMYSQL_UNIX_ADDR=${EPREFIX}/var/run/mysqld/mysqld.sock - -DINSTALL_UNIX_ADDRDIR=${EPREFIX}/var/run/mysqld/mysqld.sock - -DWITH_DEFAULT_COMPILER_OPTIONS=0 - -DWITH_DEFAULT_FEATURE_SET=0 - -DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_unitdir)" - ) - - if in_iuse systemd ; then - mycmakeargs+=( -DWITH_SYSTEMD=$(usex systemd) ) - fi - - if use openssl || use libressl ; then - mycmakeargs+=( -DWITH_SSL=system ) - else - mycmakeargs+=( -DWITH_SSL=bundled ) - fi - - if in_iuse client-libs ; then - mycmakeargs+=( -DWITHOUT_CLIENTLIBS=$(usex client-libs 0 1) ) - fi - - if in_iuse tools ; then - if multilib_is_native_abi ; then - mycmakeargs+=( -DWITHOUT_TOOLS=$(usex tools 0 1) ) - else - mycmakeargs+=( -DWITHOUT_TOOLS=1 ) - fi - fi - - if in_iuse bindist ; then - # bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION - if multilib_is_native_abi; then - mycmakeargs+=( - -DWITH_READLINE=$(usex bindist 1 0) - -DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1) - ) - elif ! in_iuse client-libs ; then - mycmakeargs+=( - -DWITH_READLINE=1 - -DNOT_FOR_DISTRIBUTION=0 - ) - fi - fi - - ### TODO: make this system but issues with UTF-8 prevent it - mycmakeargs+=( -DWITH_EDITLINE=bundled ) - - if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && multilib_is_native_abi ; then - mycmakeargs+=( - -DWITH_JEMALLOC=$(usex jemalloc system) - ) - - mysql_version_is_at_least "10.0.9" && mycmakeargs+=( -DWITH_PCRE=system ) - fi - - configure_cmake_locale - - if use_if_iuse minimal ; then - configure_cmake_minimal - elif in_iuse server ; then - if multilib_is_native_abi && use server ; then - configure_cmake_standard - else - configure_cmake_minimal - fi - else - if multilib_is_native_abi ; then - configure_cmake_standard - else - configure_cmake_minimal - fi - fi - - # systemtap only works on native ABI bug 530132 - if multilib_is_native_abi; then - mycmakeargs+=( $(cmake-utils_use_enable systemtap DTRACE) ) - [[ ${MYSQL_CMAKE_NATIVE_DEFINES} ]] && mycmakeargs+=( ${MYSQL_CMAKE_NATIVE_DEFINES} ) - else - mycmakeargs+=( -DENABLE_DTRACE=0 ) - [[ ${MYSQL_CMAKE_NONNATIVE_DEFINES} ]] && mycmakeargs+=( ${MYSQL_CMAKE_NONNATIVE_DEFINES} ) - fi - - [[ ${MYSQL_CMAKE_EXTRA_DEFINES} ]] && mycmakeargs+=( ${MYSQL_CMAKE_EXTRA_DEFINES} ) - - # Always build NDB with mysql-cluster for libndbclient - [[ ${PN} == "mysql-cluster" ]] && mycmakeargs+=( - -DWITH_NDBCLUSTER=1 -DWITH_PARTITION_STORAGE_ENGINE=1 - -DWITHOUT_PARTITION_STORAGE_ENGINE=0 ) - - cmake-utils_src_configure -} - -mysql-multilib_src_compile() { - local _cmake_args=( "${@}" ) - - multilib-minimal_src_compile -} - -multilib_src_compile() { - if ! multilib_is_native_abi && in_iuse client-libs ; then - if ! use client-libs ; then - return 0 - fi - fi - - cmake-utils_src_compile "${_cmake_args[@]}" -} - - -# @FUNCTION: mysql-multilib_src_install -# @DESCRIPTION: -# Install mysql. -mysql-multilib_src_install() { - if ! in_iuse client-libs || use_if_iuse client-libs ; then - # wrap the config script - MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config ) - fi - - if in_iuse client-libs && ! use client-libs ; then - multilib_foreach_abi multilib_src_install - else - multilib-minimal_src_install - fi -} - -multilib_src_install() { - debug-print-function ${FUNCNAME} "$@" - - if ! multilib_is_native_abi && in_iuse client-libs ; then - if ! use client-libs ; then - return 0 - fi - fi - - if multilib_is_native_abi; then - mysql-cmake_src_install - else - cmake-utils_src_install - if [[ "${PN}" == "mariadb" || "${PN}" == "mariadb-galera" ]] ; then - if use_if_iuse minimal ; then - : - elif use_if_iuse server || ! in_iuse server ; then - insinto /usr/include/mysql/private - doins "${S}"/sql/*.h - fi - fi - fi -} - -# @FUNCTION: mysql-multilib_pkg_preinst -# @DESCRIPTION: -# Call java-pkg-opt-2 eclass when mysql-cluster is installed -mysql-multilib_pkg_preinst() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${PN} == "mysql-cluster" ]] ; then - mysql_version_is_at_least "7.2.9" && java-pkg-opt-2_pkg_preinst - fi - # Here we need to see if the implementation switched client libraries - # First, we check if this is a new instance of the package and a client library already exists - # Then, we check if this package is rebuilt but the previous instance did not - # have the client-libs USE set. - # Instances which do not have a client-libs USE can only be replaced by a different provider - local SHOW_ABI_MESSAGE - if ! in_iuse client-libs || use_if_iuse client-libs ; then - if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then - SHOW_ABI_MESSAGE=1 - elif [[ ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] && \ - in_iuse client-libs && has_version "${CATEGORY}/${PN}[-client-libs(+)]" ; then - SHOW_ABI_MESSAGE=1 - fi - - fi - if [[ ${SHOW_ABI_MESSAGE} ]] ; then - elog "Due to ABI changes when switching between different client libraries," - elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient." - elog "Please run: revdep-rebuild --library libmysqlclient.so.${SUBSLOT:-18}" - ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries" - fi -} - -# @FUNCTION: mysql-multilib_pkg_postinst -# @DESCRIPTION: -# Run post-installation tasks: -# create the dir for logfiles if non-existant -# touch the logfiles and secure them -# install scripts -# issue required steps for optional features -# issue deprecation warnings -mysql-multilib_pkg_postinst() { - debug-print-function ${FUNCNAME} "$@" - - # 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}" - - # Minimal builds don't have the MySQL server - if use_if_iuse minimal ; then - : - elif ! in_iuse server || use_if_iuse server ; then - docinto "support-files" - for script in \ - support-files/my-*.cnf \ - support-files/magic \ - support-files/ndb-config-2-node.ini - do - [[ -f "${script}" ]] \ - && dodoc "${script}" - done - - docinto "scripts" - for script in scripts/mysql* ; do - if [[ -f "${script}" && "${script%.sh}" == "${script}" ]]; then - dodoc "${script}" - fi - done - - if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then - if use_if_iuse pam ; then - einfo - elog "This install includes the PAM authentication plugin." - elog "To activate and configure the PAM plugin, please read:" - elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/" - einfo - fi - fi - - einfo - elog "You might want to run:" - elog "\"emerge --config =${CATEGORY}/${PF}\"" - elog "if this is a new install." - einfo - - einfo - elog "If you are upgrading major versions, you should run the" - elog "mysql_upgrade tool." - einfo - - if [[ ${PN} == "mariadb-galera" ]] || use_if_iuse galera ; then - einfo - elog "Be sure to edit the my.cnf file to activate your cluster settings." - elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\"" - elog "The first time the cluster is activated, you should add" - elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node." - elog "This option should then be removed for subsequent starts." - einfo - fi - fi -} - -# @FUNCTION: mysql-multilib_getopt -# @DESCRIPTION: -# Use my_print_defaults to extract specific config options -mysql-multilib_getopt() { - local mypd="${EROOT}"/usr/bin/my_print_defaults - section="$1" - flag="--${2}=" - "${mypd}" $section | sed -n "/^${flag}/p" -} - -# @FUNCTION: mysql-multilib_getoptval -# @DESCRIPTION: -# Use my_print_defaults to extract specific config options -mysql-multilib_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" -} - -# @FUNCTION: mysql-multilib_pkg_config -# @DESCRIPTION: -# Configure mysql environment. -mysql-multilib_pkg_config() { - - debug-print-function ${FUNCNAME} "$@" - - 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 - MYSQL_ROOT_PASSWORD="$(mysql-multilib_getoptval 'client mysql' password)" - # Sometimes --show is required to display passwords in some implementations of my_print_defaults - if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then - MYSQL_ROOT_PASSWORD="$(mysql-multilib_getoptval 'client mysql' password --show)" - fi - fi - MYSQL_TMPDIR="$(mysql-multilib_getoptval mysqld tmpdir)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(mysql-multilib_getoptval mysqld relay-log)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(mysql-multilib_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'" - - local help_tables="${ROOT}${MY_SHAREDSTATEDIR}/fill_help_tables.sql" - [[ -r "${help_tables}" ]] \ - && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \ - || touch "${TMPDIR}/fill_help_tables.sql" - help_tables="${TMPDIR}/fill_help_tables.sql" - - # 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 \ - ndbcluster log-slave-updates wsrep-on \ - ; do - optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}" - egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}" - done - # But some options changed names - egrep -sq external-locking "${helpfile}" && \ - options="${options/skip-locking/skip-external-locking}" - - # MySQL 5.6+ needs InnoDB - if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] ; then - mysql_version_is_at_least "5.6" || options="${options} --loose-skip-innodb" - fi - - 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 - local 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 - - local cmd - local initialize_options - if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] && mysql_version_is_at_least "5.7.6" ; then - # --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 - cmd="${EROOT}usr/sbin/mysqld" - initialize_options="--initialize-insecure '--init-file=${sqltmp}'" - sqltmp="" # the initialize will take care of it - else - cmd="${EROOT}usr/share/mysql/scripts/mysql_install_db" - [[ -f "${cmd}" ]] || cmd="${EROOT}usr/bin/mysql_install_db" - if [[ -r "${help_tables}" ]] ; then - cat "${help_tables}" >> "${sqltmp}" - fi - fi - cmd="'$cmd' '--basedir=${EPREFIX}/usr' ${options} '--datadir=${ROOT}/${MY_DATADIR}' '--tmpdir=${ROOT}/${MYSQL_TMPDIR}' ${initialize_options}" - 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" - - # 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 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 \ - --default-storage-engine=MyISAM \ - --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/eclass/mysql-v2.eclass b/eclass/mysql-v2.eclass deleted file mode 100644 index 9c61dae..0000000 --- a/eclass/mysql-v2.eclass +++ /dev/null @@ -1,919 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# @ECLASS: mysql-v2.eclass -# @MAINTAINER: -# Maintainers: -# - MySQL Team <mysql-bugs@gentoo.org> -# - Robin H. Johnson <robbat2@gentoo.org> -# - Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> -# - Brian Evans <grknight@gentoo.org> -# @BLURB: This eclass provides most of the functions for mysql ebuilds -# @DESCRIPTION: -# The mysql-v2.eclass is the base eclass to build the mysql and -# alternative projects (mariadb and percona) ebuilds. -# This eclass uses the mysql-autotools and mysql-cmake eclasses for the -# specific bits related to the build system. -# It provides the src_unpack, src_prepare, src_configure, src_compile, -# src_install, pkg_preinst, pkg_postinst, pkg_config and pkg_postrm -# phase hooks. - -# @ECLASS-VARIABLE: BUILD -# @DESCRIPTION: -# Build type of the mysql version -: ${BUILD:=autotools} - -case ${BUILD} in - "cmake") - BUILD_INHERIT="mysql-cmake" - ;; - "autotools") - BUILD_INHERIT="mysql-autotools" - - WANT_AUTOCONF="latest" - WANT_AUTOMAKE="latest" - ;; - *) - die "${BUILD} is not a valid build system for mysql" - ;; -esac - -MYSQL_EXTRAS="" - -# @ECLASS-VARIABLE: MYSQL_EXTRAS_VER -# @DESCRIPTION: -# The version of the MYSQL_EXTRAS repo to use to build mysql -# Use "none" to disable it's use -[[ ${MY_EXTRAS_VER} == "live" ]] && MYSQL_EXTRAS="git-r3" - -inherit eutils flag-o-matic ${MYSQL_EXTRAS} ${BUILD_INHERIT} mysql_fx versionator toolchain-funcs user - -# -# Supported EAPI versions and export functions -# - -case "${EAPI:-0}" in - 4|5) ;; - *) die "Unsupported EAPI: ${EAPI}" ;; -esac - -EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_config pkg_postrm - -# -# VARIABLES: -# - -# 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" - -[[ ${MY_EXTRAS_VER} == "latest" ]] && MY_EXTRAS_VER="20090228-0714Z" -if [[ ${MY_EXTRAS_VER} == "live" ]]; then - EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git" - EGIT_CHECKOUT_DIR=${WORKDIR}/mysql-extras - EGIT_CLONE_TYPE=shallow -fi - -# @ECLASS-VARIABLE: MYSQL_PV_MAJOR -# @DESCRIPTION: -# Upstream MySQL considers the first two parts of the version number to be the -# major version. Upgrades that change major version should always run -# mysql_upgrade. -MYSQL_PV_MAJOR="$(get_version_component_range 1-2 ${PV})" - -# Cluster is a special case... -if [[ ${PN} == "mysql-cluster" ]]; then - case ${PV} in - 6.1*|7.0*|7.1*) MYSQL_PV_MAJOR=5.1 ;; - 7.2*) MYSQL_PV_MAJOR=5.5 ;; - 7.3*) MYSQL_PV_MAJOR=5.6 ;; - esac -fi - -# MariaDB has left the numbering schema but keeping compatibility -if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then - case ${PV} in - 10.0*|10.1*) MYSQL_PV_MAJOR="5.6" ;; - esac -fi - -# @ECLASS-VARIABLE: MYSQL_VERSION_ID -# @DESCRIPTION: -# MYSQL_VERSION_ID will be: -# major * 10e6 + minor * 10e4 + micro * 10e2 + gentoo revision number, all [0..99] -# This is an important part, because many of the choices the MySQL ebuild will do -# depend on this variable. -# In particular, the code below transforms a $PVR like "5.0.18-r3" in "5001803" -# We also strip off upstream's trailing letter that they use to respin tarballs -MYSQL_VERSION_ID="" -tpv="${PV%[a-z]}" -tpv=( ${tpv//[-._]/ } ) ; tpv[3]="${PVR:${#PV}}" ; tpv[3]="${tpv[3]##*-r}" -for vatom in 0 1 2 3 ; do - # pad to length 2 - tpv[${vatom}]="00${tpv[${vatom}]}" - MYSQL_VERSION_ID="${MYSQL_VERSION_ID}${tpv[${vatom}]:0-2}" -done -# strip leading "0" (otherwise it's considered an octal number by BASH) -MYSQL_VERSION_ID=${MYSQL_VERSION_ID##"0"} - -# This eclass should only be used with at least mysql-5.1.50 -mysql_version_is_at_least "5.1.50" || die "This eclass should only be used with >=mysql-5.1.50" - -# @ECLASS-VARIABLE: XTRADB_VER -# @DEFAULT_UNSET -# @DESCRIPTION: -# Version of the XTRADB storage engine - -# @ECLASS-VARIABLE: PERCONA_VER -# @DEFAULT_UNSET -# @DESCRIPTION: -# Designation by PERCONA for a MySQL version to apply an XTRADB release - -# Work out the default SERVER_URI correctly -if [[ -z ${SERVER_URI} ]]; then - [[ -z ${MY_PV} ]] && MY_PV="${PV//_/-}" - if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then - # Beginning with 5.5, MariaDB stopped putting beta, alpha or rc on their tarball names - mysql_version_is_at_least "5.5" && MARIA_FULL_PV=$(get_version_component_range 1-3) || \ - MARIA_FULL_PV=$(replace_version_separator 3 '-' ${MY_PV}) - MARIA_FULL_P="${PN}-${MARIA_FULL_PV}" - SERVER_URI=" - http://ftp.osuosl.org/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://ftp.osuosl.org/pub/mariadb/${MARIA_FULL_P}/source/${MARIA_FULL_P}.tar.gz - http://mirror.jmu.edu/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://mirrors.coreix.net/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://mirrors.syringanetworks.net/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://mirrors.fe.up.pt/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://mirror2.hs-esslingen.de/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - " - if [[ ${PN} == "mariadb-galera" ]]; then - MY_SOURCEDIR="${PN%%-galera}-${MARIA_FULL_PV}" - fi - elif [[ ${PN} == "percona-server" ]]; then - PERCONA_PN="Percona-Server" - MIRROR_PV=$(get_version_component_range 1-2 ${PV}) - MY_PV=$(get_version_component_range 1-3 ${PV}) - PERCONA_RELEASE=$(get_version_component_range 4-5 ${PV}) - PERCONA_RC=$(get_version_component_range 6 ${PV}) - SERVER_URI="http://www.percona.com/redir/downloads/${PERCONA_PN}-${MIRROR_PV}/${PERCONA_PN}-${MY_PV}-${PERCONA_RC}${PERCONA_RELEASE}/source/tarball/${PN}-${MY_PV}-${PERCONA_RC}${PERCONA_RELEASE}.tar.gz" -# http://www.percona.com/redir/downloads/Percona-Server-5.5/LATEST/source/tarball/Percona-Server-5.5.30-30.2.tar.gz -# http://www.percona.com/redir/downloads/Percona-Server-5.6/Percona-Server-5.6.13-rc60.5/source/tarball/Percona-Server-5.6.13-rc60.5.tar.gz - else - if [[ "${PN}" == "mysql-cluster" ]] ; then - URI_DIR="MySQL-Cluster" - URI_FILE="mysql-cluster-gpl" - else - URI_DIR="MySQL" - URI_FILE="mysql" - fi - URI_A="${URI_FILE}-${MY_PV}.tar.gz" - MIRROR_PV=$(get_version_component_range 1-2 ${PV}) - # Recently upstream switched to an archive site, and not on mirrors - SERVER_URI="http://downloads.mysql.com/archives/${URI_FILE}-${MIRROR_PV}/${URI_A} - https://downloads.skysql.com/files/${URI_FILE}-${MIRROR_PV}/${URI_A} - mirror://mysql/Downloads/${URI_DIR}-${PV%.*}/${URI_A}" - fi -fi - -# Define correct SRC_URIs -SRC_URI="${SERVER_URI}" - -# 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://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 - https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" -fi - -DESCRIPTION="A fast, multi-threaded, multi-user SQL database server" -HOMEPAGE="https://www.mysql.com/" -if [[ ${PN} == "mariadb" ]]; then - HOMEPAGE="https://mariadb.org/" - DESCRIPTION="An enhanced, drop-in replacement for MySQL" -fi -if [[ ${PN} == "mariadb-galera" ]]; then - HOMEPAGE="https://mariadb.org/" - DESCRIPTION="An enhanced, drop-in replacement for MySQL with Galera Replication" -fi -if [[ ${PN} == "percona-server" ]]; then - HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server" - DESCRIPTION="An enhanced, drop-in replacement for MySQL from the Percona team" -fi -LICENSE="GPL-2" -SLOT="0" - -case "${BUILD}" in - "autotools") - IUSE="big-tables debug embedded minimal +perl selinux ssl static test" - ;; - "cmake") - IUSE="debug embedded minimal +perl selinux ssl static static-libs test" - ;; -esac - -# Common IUSE -IUSE="${IUSE} latin1 extraengine cluster max-idx-128 +community profiling" - -# This probably could be simplified, but the syntax would have to be just right -if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && \ - mysql_version_is_at_least "5.5" ; then - IUSE="bindist ${IUSE}" - RESTRICT="${RESTRICT} !bindist? ( bindist )" -elif [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] && \ - mysql_check_version_range "5.5.37 to 5.6.11.99" ; then - IUSE="bindist ${IUSE}" - RESTRICT="${RESTRICT} !bindist? ( bindist )" -elif [[ ${PN} == "mysql-cluster" ]] && \ - mysql_check_version_range "7.2 to 7.2.99.99" ; then - IUSE="bindist ${IUSE}" - RESTRICT="${RESTRICT} !bindist? ( bindist )" -fi - -if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]]; then - mysql_check_version_range "5.1.38 to 5.3.99" && IUSE="${IUSE} libevent" - mysql_version_is_at_least "5.2" && IUSE="${IUSE} oqgraph" && \ - REQUIRED_USE="${REQUIRED_USE} minimal? ( !oqgraph )" - mysql_version_is_at_least "5.2.5" && IUSE="${IUSE} sphinx" && \ - REQUIRED_USE="${REQUIRED_USE} minimal? ( !sphinx )" - mysql_version_is_at_least "5.2.10" && IUSE="${IUSE} pam" - # 5.5.33 and 10.0.5 add TokuDB. Authors strongly recommend jemalloc or perfomance suffers - mysql_version_is_at_least "10.0.5" && IUSE="${IUSE} tokudb odbc xml" && \ - REQUIRED_USE="${REQUIRED_USE} odbc? ( extraengine ) xml? ( extraengine ) tokudb? ( jemalloc !tcmalloc )" - mysql_check_version_range "5.5.33 to 5.5.99" && IUSE="${IUSE} tokudb" && \ - REQUIRED_USE="${REQUIRED_USE} tokudb? ( jemalloc !tcmalloc )" -fi - -if mysql_version_is_at_least "5.5"; then - REQUIRED_USE="${REQUIRED_USE} tcmalloc? ( !jemalloc ) jemalloc? ( !tcmalloc )" - IUSE="${IUSE} jemalloc tcmalloc" -fi - -if mysql_version_is_at_least "5.5.7"; then - IUSE="${IUSE} systemtap" -fi - -if [[ ${PN} == "percona-server" ]]; then - mysql_version_is_at_least "5.5.10" && IUSE="${IUSE} pam" -fi - -REQUIRED_USE="${REQUIRED_USE} minimal? ( !cluster !extraengine !embedded ) static? ( !ssl )" - -# -# DEPENDENCIES: -# - -# Be warned, *DEPEND are version-dependant -# These are used for both runtime and compiletime -DEPEND=" - ssl? ( >=dev-libs/openssl-0.9.6d:0 ) - kernel_linux? ( sys-process/procps ) - >=sys-apps/sed-4 - >=sys-apps/texinfo-4.7-r1 - >=sys-libs/zlib-1.2.3 -" -# TODO: add this as a dep if it is moved from the overlay -# !dev-db/mariadb-native-client[mysqlcompat] - -# dev-db/mysql-5.6.12+ only works with dev-libs/libedit -# This probably could be simplified -if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] && \ - mysql_version_is_at_least "5.6.12" ; then - DEPEND="${DEPEND} dev-libs/libedit" -elif [[ ${PN} == "mysql-cluster" ]] && mysql_version_is_at_least "7.3"; then - DEPEND="${DEPEND} dev-libs/libedit" -else - if mysql_version_is_at_least "5.5" ; then - DEPEND="${DEPEND} !bindist? ( >=sys-libs/readline-4.1:0 )" - else - DEPEND="${DEPEND} >=sys-libs/readline-4.1:0" - fi -fi - -if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then - mysql_check_version_range "5.1.38 to 5.3.99" && DEPEND="${DEPEND} libevent? ( >=dev-libs/libevent-1.4 )" - mysql_version_is_at_least "5.2" && DEPEND="${DEPEND} oqgraph? ( >=dev-libs/boost-1.40.0 )" - mysql_version_is_at_least "5.2.10" && DEPEND="${DEPEND} !minimal? ( pam? ( virtual/pam ) )" - # Bug 441700 MariaDB >=5.3 include custom mytop - mysql_version_is_at_least "5.3" && DEPEND="${DEPEND} perl? ( !dev-db/mytop )" - if mysql_version_is_at_least "10.0.5" ; then - DEPEND="${DEPEND} - odbc? ( dev-db/unixODBC ) - xml? ( dev-libs/libxml2 ) - " - fi - mysql_version_is_at_least "10.0.7" && DEPEND="${DEPEND} oqgraph? ( dev-libs/judy )" - if mysql_version_is_at_least "10.0.9" ; then - DEPEND="${DEPEND} >=dev-libs/libpcre-8.35" - fi -fi - -# Having different flavours at the same time is not a good idea -for i in "mysql" "mariadb" "mariadb-galera" "percona-server" "mysql-cluster" ; do - [[ ${i} == ${PN} ]] || - DEPEND="${DEPEND} !dev-db/${i}" -done - -if mysql_version_is_at_least "5.5.7" ; then - DEPEND="${DEPEND} - jemalloc? ( dev-libs/jemalloc[static-libs?] ) - tcmalloc? ( dev-util/google-perftools ) - >=sys-libs/zlib-1.2.3[static-libs?] - ssl? ( >=dev-libs/openssl-0.9.6d[static-libs?] ) - systemtap? ( >=dev-util/systemtap-1.3 ) - kernel_linux? ( dev-libs/libaio ) - " -fi - -if [[ ${PN} == "mysql-cluster" ]] ; then - # TODO: This really should include net-misc/memcached - # but the package does not install the files it seeks. - mysql_version_is_at_least "7.2.3" && \ - DEPEND="${DEPEND} dev-libs/libevent" -fi - -# prefix: first need to implement something for #196294 -RDEPEND="${DEPEND} - !minimal? ( !prefix? ( dev-db/mysql-init-scripts ) ) - selinux? ( sec-policy/selinux-mysql ) -" - -if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then - # Bug 455016 Add dependencies of mytop - if mysql_version_is_at_least "5.3" ; then - RDEPEND="${RDEPEND} - perl? ( - virtual/perl-Getopt-Long - dev-perl/TermReadKey - virtual/perl-Term-ANSIColor - virtual/perl-Time-HiRes - ) - " - fi -fi - -if [[ ${PN} == "mariadb-galera" ]] ; then - # The wsrep API version must match between the ebuild and sys-cluster/galera. - # This will be indicated by WSREP_REVISION in the ebuild and the first number - # in the version of sys-cluster/galera - RDEPEND="${RDEPEND} - =sys-cluster/galera-${WSREP_REVISION}* - " -fi - -if [[ ${PN} == "mysql-cluster" ]] ; then - mysql_version_is_at_least "7.2.9" && RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.6 )" && \ - DEPEND="${DEPEND} java? ( >=virtual/jdk-1.6 )" -fi - -DEPEND="${DEPEND} - virtual/yacc -" - -DEPEND="${DEPEND} static? ( sys-libs/ncurses[static-libs] )" - -# compile-time-only -DEPEND="${DEPEND} >=dev-util/cmake-2.4.3" - -# compile-time-only -if mysql_version_is_at_least "5.5.8" ; then - DEPEND="${DEPEND} >=dev-util/cmake-2.6.3" -fi - -# dev-perl/DBD-mysql is needed by some scripts installed by MySQL -PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" - -# For other stuff to bring us in -PDEPEND="${PDEPEND} ~virtual/mysql-${MYSQL_PV_MAJOR}" - -# -# External patches -# - -# MariaDB has integrated PBXT until it was dropped in version 5.5.33 -# PBXT_VERSION means that we have a PBXT patch for this PV -# PBXT was only introduced after 5.1.12 -pbxt_patch_available() { - [[ ${PN} != "mariadb" && ${PN} != "mariadb-galera" && ( -n "${PBXT_VERSION}" ) ]] - return $? -} - -pbxt_available() { - pbxt_patch_available || [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] && mysql_check_version_range "5.1 to 5.5.32" - return $? -} - -# Get the percona tarball if XTRADB_VER and PERCONA_VER are both set -# MariaDB has integrated XtraDB -# XTRADB_VERS means that we have a XTRADB patch for this PV -# XTRADB was only introduced after 5.1.26 -xtradb_patch_available() { - [[ ${PN} != "mariadb" && ${PN} != "mariadb-galera" - && ( -n "${XTRADB_VER}" ) && ( -n "${PERCONA_VER}" ) ]] - return $? -} - -if pbxt_patch_available; then - - PBXT_P="pbxt-${PBXT_VERSION}" - PBXT_SRC_URI="http://www.primebase.org/download/${PBXT_P}.tar.gz mirror://sourceforge/pbxt/${PBXT_P}.tar.gz" - SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )" -fi - -# PBXT_NEWSTYLE means pbxt is in storage/ and gets enabled as other plugins -# vs. built outside the dir -if pbxt_available; then - - IUSE="${IUSE} pbxt" - PBXT_NEWSTYLE=1 - REQUIRED_USE="${REQUIRED_USE} pbxt? ( !embedded ) " -fi - -if xtradb_patch_available; then - XTRADB_P="percona-xtradb-${XTRADB_VER}" - XTRADB_SRC_URI_COMMON="${PERCONA_VER}/source/${XTRADB_P}.tar.gz" - XTRADB_SRC_B1="http://www.percona.com/" - XTRADB_SRC_B2="${XTRADB_SRC_B1}/percona-builds/" - XTRADB_SRC_URI1="${XTRADB_SRC_B2}/Percona-Server/Percona-Server-${XTRADB_SRC_URI_COMMON}" - XTRADB_SRC_URI2="${XTRADB_SRC_B2}/xtradb/${XTRADB_SRC_URI_COMMON}" - XTRADB_SRC_URI3="${XTRADB_SRC_B1}/${PN}/xtradb/${XTRADB_SRC_URI_COMMON}" - SRC_URI="${SRC_URI} xtradb? ( ${XTRADB_SRC_URI1} ${XTRADB_SRC_URI2} ${XTRADB_SRC_URI3} )" - IUSE="${IUSE} xtradb" - REQUIRED_USE="${REQUIRED_USE} xtradb? ( !embedded ) " -fi - -# -# HELPER FUNCTIONS: -# - -# @FUNCTION: mysql-v2_disable_test -# @DESCRIPTION: -# Helper function to disable specific tests. -mysql-v2_disable_test() { - ${BUILD_INHERIT}_disable_test "$@" -} - -# @FUNCTION: mysql-v2_configure_minimal -# @DESCRIPTION: -# Helper function to configure minimal build -configure_minimal() { - ${BUILD_INHERIT}_configure_minimal "$@" -} - -# @FUNCTION: mysql-v2_configure_common -# @DESCRIPTION: -# Helper function to configure common builds -configure_common() { - ${BUILD_INHERIT}_configure_common "$@" -} - -# -# EBUILD FUNCTIONS -# - -# @FUNCTION: mysql-v2_pkg_setup -# @DESCRIPTION: -# Perform some basic tests and tasks during pkg_setup phase: -# die if FEATURES="test", USE="-minimal" and not using FEATURES="userpriv" -# check for conflicting use flags -# create new user and group for mysql -# warn about deprecated features -mysql-v2_pkg_setup() { - - if has test ${FEATURES} ; then - if ! use minimal ; then - if ! has userpriv ${FEATURES} ; then - eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - fi - fi - - # Check for USE flag problems in pkg_setup - if ! mysql_version_is_at_least "5.2" && use debug ; then - # Also in package.use.mask - die "Bug #344885: Upstream has broken USE=debug for 5.1 series >=5.1.51" - 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" - - if use cluster && [[ "${PN}" != "mysql-cluster" ]]; then - ewarn "Upstream has noted that the NDB cluster support in the 5.0 and" - ewarn "5.1 series should NOT be put into production. In the near" - ewarn "future, it will be disabled from building." - fi - - if [[ ${PN} == "mysql-cluster" ]] ; then - mysql_version_is_at_least "7.2.9" && java-pkg-opt-2_pkg_setup - fi - - if use_if_iuse tokudb && [[ $(gcc-major-version) -lt 4 || $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 7 ]] ; then - eerror "${PN} with tokudb needs to be built with gcc-4.7 or later." - eerror "Please use gcc-config to switch to gcc-4.7 or later version." - die - fi - -} - -# @FUNCTION: mysql-v2_src_unpack -# @DESCRIPTION: -# Unpack the source code -mysql-v2_src_unpack() { - - # Initialize the proper variables first - mysql_init_vars - - unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR}/${MY_SOURCEDIR}" "${S}" -} - -# @FUNCTION: mysql-v2_src_prepare -# @DESCRIPTION: -# Apply patches to the source code and remove unneeded bundled libs. -mysql-v2_src_prepare() { - ${BUILD_INHERIT}_src_prepare "$@" - if [[ ${PN} == "mysql-cluster" ]] ; then - mysql_version_is_at_least "7.2.9" && java-pkg-opt-2_src_prepare - fi -} - -# @FUNCTION: mysql-v2_src_configure -# @DESCRIPTION: -# Configure mysql to build the code for Gentoo respecting the use flags. -mysql-v2_src_configure() { - ${BUILD_INHERIT}_src_configure "$@" -} - -# @FUNCTION: mysql-v2_src_compile -# @DESCRIPTION: -# Compile the mysql code. -mysql-v2_src_compile() { - ${BUILD_INHERIT}_src_compile "$@" -} - -# @FUNCTION: mysql-v2_src_install -# @DESCRIPTION: -# Install mysql. -mysql-v2_src_install() { - ${BUILD_INHERIT}_src_install "$@" -} - -# @FUNCTION: mysql-v2_pkg_preinst -# @DESCRIPTION: -# Create the user and groups for mysql - die if that fails. -mysql-v2_pkg_preinst() { - if [[ ${PN} == "mysql-cluster" ]] ; then - mysql_version_is_at_least "7.2.9" && java-pkg-opt-2_pkg_preinst - fi - enewgroup mysql 60 || die "problem adding 'mysql' group" - enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" -} - -# @FUNCTION: mysql-v2_pkg_postinst -# @DESCRIPTION: -# Run post-installation tasks: -# create the dir for logfiles if non-existant -# touch the logfiles and secure them -# install scripts -# issue required steps for optional features -# issue deprecation warnings -mysql-v2_pkg_postinst() { - - # Make sure the vars are correctly initialized - mysql_init_vars - - # Check FEATURES="collision-protect" before removing this - [[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" - - # Secure the logfiles - touch "${ROOT}${MY_LOGDIR}"/mysql.{log,err} - chown mysql:mysql "${ROOT}${MY_LOGDIR}"/mysql* - chmod 0660 "${ROOT}${MY_LOGDIR}"/mysql* - - # Minimal builds don't have the MySQL server - if ! use minimal ; then - docinto "support-files" - for script in \ - support-files/my-*.cnf \ - support-files/magic \ - support-files/ndb-config-2-node.ini - do - [[ -f "${script}" ]] \ - && dodoc "${script}" - done - - docinto "scripts" - for script in scripts/mysql* ; do - if [[ -f "${script}" && "${script%.sh}" == "${script}" ]]; then - dodoc "${script}" - fi - done - - if [[ ${PN} == "mariadb" || ${PN} == "mariadb-galera" ]] ; then - if use_if_iuse pam ; then - einfo - elog "This install includes the PAM authentication plugin." - elog "To activate and configure the PAM plugin, please read:" - elog "https://kb.askmonty.org/en/pam-authentication-plugin/" - einfo - fi - fi - - einfo - elog "You might want to run:" - elog "\"emerge --config =${CATEGORY}/${PF}\"" - elog "if this is a new install." - einfo - - einfo - elog "If you are upgrading major versions, you should run the" - elog "mysql_upgrade tool." - einfo - - if [[ ${PN} == "mariadb-galera" ]] ; then - einfo - elog "Be sure to edit the my.cnf file to activate your cluster settings." - elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\"" - elog "The first time the cluster is activated, you should add" - elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node." - elog "This option should then be removed for subsequent starts." - einfo - fi - fi - - if use_if_iuse pbxt ; then - elog "Note: PBXT is now statically built when enabled." - elog "" - elog "If, you previously installed as a plugin and " - elog "you cannot start the MySQL server," - elog "remove the ${MY_DATADIR}/mysql/plugin.* files, then" - elog "use the MySQL upgrade script to restore the table" - elog "or execute the following SQL command:" - elog " CREATE TABLE IF NOT EXISTS plugin (" - elog " name char(64) binary DEFAULT '' NOT NULL," - elog " dl char(128) DEFAULT '' NOT NULL," - elog " PRIMARY KEY (name)" - elog " ) CHARACTER SET utf8 COLLATE utf8_bin;" - fi -} - -# @FUNCTION: mysql-v2_getopt -# @DESCRIPTION: -# Use my_print_defaults to extract specific config options -mysql-v2_getopt() { - local mypd="${EROOT}"/usr/bin/my_print_defaults - section="$1" - flag="--${2}=" - "${mypd}" $section | sed -n "/^${flag}/p" -} - -# @FUNCTION: mysql-v2_getoptval -# @DESCRIPTION: -# Use my_print_defaults to extract specific config options -mysql-v2_getoptval() { - local mypd="${EROOT}"/usr/bin/my_print_defaults - section="$1" - flag="--${2}=" - "${mypd}" $section | sed -n "/^${flag}/s,${flag},,gp" -} - -# @FUNCTION: mysql-v2_pkg_config -# @DESCRIPTION: -# Configure mysql environment. -mysql-v2_pkg_config() { - - 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 - MYSQL_ROOT_PASSWORD="$(mysql-v2_getoptval 'client mysql' password)" - fi - MYSQL_TMPDIR="$(mysql-v2_getoptval mysqld tmpdir)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(mysql-v2_getoptval mysqld relay-log)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(mysql-v2_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 "${ROOT}"/$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 "${ROOT}"/$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, in the" - einfo "MYSQL_ROOT_PASSWORD env var 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" - - local help_tables="${ROOT}${MY_SHAREDSTATEDIR}/fill_help_tables.sql" - [[ -r "${help_tables}" ]] \ - && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \ - || touch "${TMPDIR}/fill_help_tables.sql" - help_tables="${TMPDIR}/fill_help_tables.sql" - - # Figure out which options we need to disable to do the setup - 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 \ - ndbcluster log-slave-updates \ - ; do - optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}" - egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}" - done - # But some options changed names - egrep -sq external-locking "${helpfile}" && \ - options="${options/skip-locking/skip-external-locking}" - - use prefix || options="${options} --user=mysql" - - # MySQL 5.6+ needs InnoDB - if [[ ${PN} == "mysql" || ${PN} == "percona-server" ]] ; then - mysql_version_is_at_least "5.6" || options="${options} --loose-skip-innodb" - fi - - 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 - mkdir -p "${PID_DIR}" || die "Could not create pid directory" - chown mysql:mysql "${PID_DIR}" || die "Could not set ownership on pid directory" - chmod 755 "${PID_DIR}" || die "Could not set permissions on pid directory" - fi - - pushd "${TMPDIR}" &>/dev/null - #cmd="'${EROOT}/usr/share/mysql/scripts/mysql_install_db' '--basedir=${EPREFIX}/usr' ${options}" - cmd=${EROOT}usr/share/mysql/scripts/mysql_install_db - [[ -f ${cmd} ]] || cmd=${EROOT}usr/bin/mysql_install_db - cmd="'$cmd' '--basedir=${EPREFIX}/usr' ${options} '--datadir=${ROOT}/${MY_DATADIR}' '--tmpdir=${ROOT}/${MYSQL_TMPDIR}'" - einfo "Command: $cmd" - eval $cmd \ - >"${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 run mysql_install_db. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" - fi - popd &>/dev/null - [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ - || die "MySQL databases not installed" - chown -R mysql:mysql "${ROOT}/${MY_DATADIR}" 2>/dev/null - chmod 0750 "${ROOT}/${MY_DATADIR}" 2>/dev/null - - # 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 - - if [[ -r "${help_tables}" ]] ; then - cat "${help_tables}" >> "${sqltmp}" - fi - - 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 \ - --default-storage-engine=MyISAM \ - --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 $? - - 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!" - - # Stop the server and cleanup - einfo "Stopping the server ..." - kill $(< "${pidfile}" ) - rm -f "${sqltmp}" - wait %1 - einfo "Done" -} - -# @FUNCTION: mysql-v2_pkg_postrm -# @DESCRIPTION: -# Remove mysql symlinks. -mysql-v2_pkg_postrm() { - - : # mysql_lib_symlinks "${ED}" -} diff --git a/eclass/mysql.eclass b/eclass/mysql.eclass deleted file mode 100644 index 97a5bce..0000000 --- a/eclass/mysql.eclass +++ /dev/null @@ -1,1528 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -# @ECLASS: mysql.eclass -# @MAINTAINER: -# MySQL Team <mysql-bugs@gentoo.org> -# Luca Longinotti <chtekk@gentoo.org> -# Robin H. Johnson <robbat2@gentoo.org> -# @AUTHOR: -# Francesco Riosa (Retired) <vivo@gentoo.org> -# @BLURB: This eclass provides most of the functions for mysql ebuilds -# @DESCRIPTION: -# The mysql.eclass provides almost all the code to build the mysql ebuilds -# including the src_unpack, src_prepare, src_configure, src_compile, -# scr_install, pkg_preinst, pkg_postinst, pkg_config and pkg_postrm -# phase hooks. - -WANT_AUTOCONF="latest" -WANT_AUTOMAKE="latest" - -inherit eutils flag-o-matic gnuconfig autotools multilib mysql_fx versionator toolchain-funcs - -# 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" - -[[ "${MY_EXTRAS_VER}" == "latest" ]] && MY_EXTRAS_VER="20090228-0714Z" -if [[ "${MY_EXTRAS_VER}" == "live" ]]; then - EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git" - EGIT_CHECKOUT_DIR=${WORKDIR}/mysql-extras - EGIT_CLONE_TYPE=shallow - inherit git-r3 -fi - -case "${EAPI:-0}" in - 2|3|4|5) - EXPORT_FUNCTIONS pkg_setup \ - src_unpack src_prepare \ - src_configure src_compile \ - src_install \ - pkg_preinst pkg_postinst \ - pkg_config pkg_postrm - IUSE_DEFAULT_ON='+' - ;; - 0 | 1) - EXPORT_FUNCTIONS pkg_setup \ - src_unpack \ - src_compile \ - src_install \ - pkg_preinst pkg_postinst \ - pkg_config pkg_postrm - ;; - *) - die "Unsupported EAPI: ${EAPI}" ;; -esac - - -# @ECLASS-VARIABLE: MYSQL_PV_MAJOR -# @DESCRIPTION: -# Upstream MySQL considers the first two parts of the version number to be the -# major version. Upgrades that change major version should always run -# mysql_upgrade. -MYSQL_PV_MAJOR="$(get_version_component_range 1-2 ${PV})" - -# Cluster is a special case... -if [[ "${PN}" == "mysql-cluster" ]]; then - case $PV in - 6.1*|7.0*|7.1*) MYSQL_PV_MAJOR=5.1 ;; - esac -fi - - -# @ECLASS-VARIABLE: MYSQL_VERSION_ID -# @DESCRIPTION: -# MYSQL_VERSION_ID will be: -# major * 10e6 + minor * 10e4 + micro * 10e2 + gentoo revision number, all [0..99] -# This is an important part, because many of the choices the MySQL ebuild will do -# depend on this variable. -# In particular, the code below transforms a $PVR like "5.0.18-r3" in "5001803" -# We also strip off upstream's trailing letter that they use to respin tarballs - -MYSQL_VERSION_ID="" -tpv="${PV%[a-z]}" -tpv=( ${tpv//[-._]/ } ) ; tpv[3]="${PVR:${#PV}}" ; tpv[3]="${tpv[3]##*-r}" -for vatom in 0 1 2 3 ; do - # pad to length 2 - tpv[${vatom}]="00${tpv[${vatom}]}" - MYSQL_VERSION_ID="${MYSQL_VERSION_ID}${tpv[${vatom}]:0-2}" -done -# strip leading "0" (otherwise it's considered an octal number by BASH) -MYSQL_VERSION_ID=${MYSQL_VERSION_ID##"0"} - -# @ECLASS-VARIABLE: MYSQL_COMMUNITY_FEATURES -# @DESCRIPTION: -# Specifiy if community features are available. Possible values are 1 (yes) -# and 0 (no). -# Community features are available in mysql-community -# AND in the re-merged mysql-5.0.82 and newer -if [ "${PN}" == "mysql-community" -o "${PN}" == "mariadb" ]; then - MYSQL_COMMUNITY_FEATURES=1 -elif [ "${PV#5.0}" != "${PV}" ] && mysql_version_is_at_least "5.0.82"; then - MYSQL_COMMUNITY_FEATURES=1 -elif [ "${PV#5.1}" != "${PV}" ] && mysql_version_is_at_least "5.1.28"; then - MYSQL_COMMUNITY_FEATURES=1 -elif [ "${PV#5.4}" != "${PV}" ] ; then - MYSQL_COMMUNITY_FEATURES=1 -elif [ "${PV#5.5}" != "${PV}" ] ; then - MYSQL_COMMUNITY_FEATURES=1 -elif [ "${PV#6}" != "${PV}" ] ; then - MYSQL_COMMUNITY_FEATURES=1 -elif [ "${PV#7}" != "${PV}" ] ; then - MYSQL_COMMUNITY_FEATURES=1 -else - MYSQL_COMMUNITY_FEATURES=0 -fi - -# @ECLASS-VARIABLE: XTRADB_VER -# @DESCRIPTION: -# Version of the XTRADB storage engine -XTRADB_VER="${XTRADB_VER}" - -# @ECLASS-VARIABLE: PERCONA_VER -# @DESCRIPTION: -# Designation by PERCONA for a MySQL version to apply an XTRADB release -PERCONA_VER="${PERCONA_VER}" - -# Be warned, *DEPEND are version-dependant -# These are used for both runtime and compiletime -DEPEND="ssl? ( >=dev-libs/openssl-0.9.6d ) - kernel_linux? ( sys-process/procps ) - >=sys-apps/sed-4 - >=sys-apps/texinfo-4.7-r1 - >=sys-libs/readline-4.1 - >=sys-libs/zlib-1.2.3" - -[[ "${PN}" == "mariadb" ]] \ -&& DEPEND="${DEPEND} libevent? ( >=dev-libs/libevent-1.4 )" - -# Having different flavours at the same time is not a good idea -for i in "mysql" "mysql-community" "mysql-cluster" "mariadb" ; do - [[ "${i}" == ${PN} ]] || - DEPEND="${DEPEND} !dev-db/${i}" -done - -# prefix: first need to implement something for #196294 -RDEPEND="${DEPEND} - !minimal? ( !prefix? ( dev-db/mysql-init-scripts ) ) - selinux? ( sec-policy/selinux-mysql )" - -DEPEND="${DEPEND} - virtual/yacc" - -if [ "${EAPI:-0}" = "2" ]; then - DEPEND="${DEPEND} static? ( sys-libs/ncurses[static-libs] )" -fi - -# compile-time-only -mysql_version_is_at_least "5.1" \ -|| DEPEND="${DEPEND} berkdb? ( sys-apps/ed )" - -# compile-time-only -mysql_version_is_at_least "5.1.12" \ -&& DEPEND="${DEPEND} >=dev-util/cmake-2.4.3" - -[[ "${PN}" == "mariadb" ]] \ -&& mysql_version_is_at_least "5.2" \ -&& DEPEND="${DEPEND} oqgraph? ( >=dev-libs/boost-1.40.0 )" -#SphinxSE is included but is not available in 5.2.4 due to a missing plug.in file -# sphinx? ( app-misc/sphinx )" - -# dev-perl/DBD-mysql is needed by some scripts installed by MySQL -PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )" - -# For other stuff to bring us in -PDEPEND="${PDEPEND} =virtual/mysql-${MYSQL_PV_MAJOR}" - -# Work out the default SERVER_URI correctly -if [ -z "${SERVER_URI}" ]; then - [ -z "${MY_PV}" ] && MY_PV="${PV//_/-}" - if [ "${PN}" == "mariadb" ]; then - MARIA_FULL_PV="$(replace_version_separator 3 '-' ${PV})" - MARIA_FULL_P="${PN}-${MARIA_FULL_PV}" - SERVER_URI=" - http://ftp.osuosl.org/pub/mariadb/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://ftp.rediris.es/mirror/MariaDB/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://maria.llarian.net/download/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://launchpad.net/maria/${MYSQL_PV_MAJOR}/ongoing/+download/${MARIA_FULL_P}.tar.gz - http://mirrors.fe.up.pt/pub/${PN}/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - http://ftp-stud.hs-esslingen.de/pub/Mirrors/${PN}/${MARIA_FULL_P}/kvm-tarbake-jaunty-x86/${MARIA_FULL_P}.tar.gz - " - # The community and cluster builds are on the mirrors - elif [[ "${MYSQL_COMMUNITY_FEATURES}" == "1" || ${PN} == "mysql-cluster" ]] ; then - if [[ "${PN}" == "mysql-cluster" ]] ; then - URI_DIR="MySQL-Cluster" - URI_FILE="mysql-cluster-gpl" - else - URI_DIR="MySQL" - URI_FILE="mysql" - fi - URI_A="${URI_FILE}-${MY_PV}.tar.gz" - MIRROR_PV=$(get_version_component_range 1-2 ${PV}) - # Recently upstream switched to an archive site, and not on mirrors - SERVER_URI="http://downloads.mysql.com/archives/${URI_FILE}-${MIRROR_PV}/${URI_A} - mirror://mysql/Downloads/${URI_DIR}-${PV%.*}/${URI_A}" - # The (old) enterprise source is on the primary site only - elif [ "${PN}" == "mysql" ]; then - SERVER_URI="ftp://ftp.mysql.com/pub/mysql/src/mysql-${MY_PV}.tar.gz" - fi -fi - -# Define correct SRC_URIs -SRC_URI="${SERVER_URI}" - -# Gentoo patches to MySQL -[[ ${MY_EXTRAS_VER} != live ]] \ -&& SRC_URI="${SRC_URI} - mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - http://g3nt8.org/patches/mysql-extras-${MY_EXTRAS_VER}.tar.bz2 - http://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2" - -DESCRIPTION="A fast, multi-threaded, multi-user SQL database server." -HOMEPAGE="http://www.mysql.com/" -if [[ "${PN}" == "mariadb" ]]; then - HOMEPAGE="http://askmonty.org/" - DESCRIPTION="MariaDB is a MySQL fork with 3rd-party patches and additional storage engines merged." -fi -if [[ "${PN}" == "mysql-community" ]]; then - DESCRIPTION="${DESCRIPTION} (obsolete, move to dev-db/mysql)" -fi -LICENSE="GPL-2" -SLOT="0" -IUSE="big-tables debug embedded minimal ${IUSE_DEFAULT_ON}perl selinux ssl static test" - -mysql_version_is_at_least "4.1" \ -&& IUSE="${IUSE} latin1" - -if mysql_version_is_at_least "4.1.3" ; then - IUSE="${IUSE} extraengine" - if [[ "${PN}" != "mysql-cluster" ]] ; then - IUSE="${IUSE} cluster" - fi -fi - -mysql_version_is_at_least "5.0" \ -|| IUSE="${IUSE} raid" - -mysql_version_is_at_least "5.0.18" \ -&& IUSE="${IUSE} max-idx-128" - -mysql_version_is_at_least "5.1" \ -|| IUSE="${IUSE} berkdb" - -[ "${MYSQL_COMMUNITY_FEATURES}" == "1" ] \ -&& IUSE="${IUSE} ${IUSE_DEFAULT_ON}community profiling" - -[[ "${PN}" == "mariadb" ]] \ -&& IUSE="${IUSE} libevent" - -[[ "${PN}" == "mariadb" ]] \ -&& mysql_version_is_at_least "5.2" \ -&& IUSE="${IUSE} oqgraph" -#SphinxSE is included but is not available in 5.2.4 due to a missing plug.in file -#&& IUSE="${IUSE} oqgraph sphinx" - -# MariaDB has integrated PBXT -# PBXT_VERSION means that we have a PBXT patch for this PV -# PBXT was only introduced after 5.1.12 -pbxt_patch_available() { - [[ "${PN}" != "mariadb" ]] \ - && mysql_version_is_at_least "5.1.12" \ - && [[ -n "${PBXT_VERSION}" ]] - return $? -} - -pbxt_available() { - pbxt_patch_available || [[ "${PN}" == "mariadb" ]] - return $? -} - -# Get the percona tarball if XTRADB_VER and PERCONA_VER are both set -# MariaDB has integrated XtraDB -# XTRADB_VERS means that we have a XTRADB patch for this PV -# XTRADB was only introduced after 5.1.26 -xtradb_patch_available() { - [[ "${PN}" != "mariadb" ]] \ - && mysql_version_is_at_least "5.1.26" \ - && [[ -n "${XTRADB_VER}" && -n "${PERCONA_VER}" ]] - return $? -} - - -pbxt_patch_available \ -&& PBXT_P="pbxt-${PBXT_VERSION}" \ -&& PBXT_SRC_URI="http://www.primebase.org/download/${PBXT_P}.tar.gz mirror://sourceforge/pbxt/${PBXT_P}.tar.gz" \ -&& SRC_URI="${SRC_URI} pbxt? ( ${PBXT_SRC_URI} )" \ - -# PBXT_NEWSTYLE means pbxt is in storage/ and gets enabled as other plugins -# vs. built outside the dir -pbxt_available \ -&& IUSE="${IUSE} pbxt" \ -&& mysql_version_is_at_least "5.1.40" \ -&& PBXT_NEWSTYLE=1 - -xtradb_patch_available \ -&& XTRADB_P="percona-xtradb-${XTRADB_VER}" \ -&& XTRADB_SRC_URI_COMMON="${PERCONA_VER}/source/${XTRADB_P}.tar.gz" \ -&& XTRADB_SRC_B1="http://www.percona.com/" \ -&& XTRADB_SRC_B2="${XTRADB_SRC_B1}/percona-builds/" \ -&& XTRADB_SRC_URI1="${XTRADB_SRC_B2}/Percona-Server/Percona-Server-${XTRADB_SRC_URI_COMMON}" \ -&& XTRADB_SRC_URI2="${XTRADB_SRC_B2}/xtradb/${XTRADB_SRC_URI_COMMON}" \ -&& XTRADB_SRC_URI3="${XTRADB_SRC_B1}/${PN}/xtradb/${XTRADB_SRC_URI_COMMON}" \ -&& SRC_URI="${SRC_URI} xtradb? ( ${XTRADB_SRC_URI1} ${XTRADB_SRC_URI2} ${XTRADB_SRC_URI3} )" \ -&& IUSE="${IUSE} xtradb" - -# -# HELPER FUNCTIONS: -# - -# @FUNCTION: mysql_disable_test -# @DESCRIPTION: -# Helper function to disable specific tests. -mysql_disable_test() { - local rawtestname testname testsuite reason mysql_disable_file - rawtestname="${1}" ; shift - reason="${@}" - ewarn "test '${rawtestname}' disabled: '${reason}'" - - testsuite="${rawtestname/.*}" - testname="${rawtestname/*.}" - mysql_disable_file="${S}/mysql-test/t/disabled.def" - #einfo "rawtestname=${rawtestname} testname=${testname} testsuite=${testsuite}" - echo ${testname} : ${reason} >> "${mysql_disable_file}" - - # ${S}/mysql-tests/t/disabled.def - # - # ${S}/mysql-tests/suite/federated/disabled.def - # - # ${S}/mysql-tests/suite/jp/t/disabled.def - # ${S}/mysql-tests/suite/ndb/t/disabled.def - # ${S}/mysql-tests/suite/rpl/t/disabled.def - # ${S}/mysql-tests/suite/parts/t/disabled.def - # ${S}/mysql-tests/suite/rpl_ndb/t/disabled.def - # ${S}/mysql-tests/suite/ndb_team/t/disabled.def - # ${S}/mysql-tests/suite/binlog/t/disabled.def - # ${S}/mysql-tests/suite/innodb/t/disabled.def - if [ -n "${testsuite}" ]; then - for mysql_disable_file in \ - ${S}/mysql-test/suite/${testsuite}/disabled.def \ - ${S}/mysql-test/suite/${testsuite}/t/disabled.def \ - FAILED ; do - [ -f "${mysql_disable_file}" ] && break - done - if [ "${mysql_disabled_file}" != "FAILED" ]; then - echo "${testname} : ${reason}" >> "${mysql_disable_file}" - else - ewarn "Could not find testsuite disabled.def location for ${rawtestname}" - fi - fi -} - -# @FUNCTION: mysql_init_vars -# @DESCRIPTION: -# void mysql_init_vars() -# Initialize global variables -# 2005-11-19 <vivo@gentoo.org> -mysql_init_vars() { - MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"} - MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"} - MY_LIBDIR=${MY_LIBDIR="${EPREFIX}/usr/$(get_libdir)/mysql"} - MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"} - MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"} - MY_INCLUDEDIR=${MY_INCLUDEDIR="${EPREFIX}/usr/include/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 - - if [ "${MY_SOURCEDIR:-unset}" == "unset" ]; then - MY_SOURCEDIR=${SERVER_URI##*/} - MY_SOURCEDIR=${MY_SOURCEDIR%.tar*} - fi - - export MY_SHAREDSTATEDIR MY_SYSCONFDIR - export MY_LIBDIR MY_LOCALSTATEDIR MY_LOGDIR - export MY_INCLUDEDIR MY_DATADIR MY_SOURCEDIR -} - -configure_minimal() { - # These are things we exclude from a minimal build, please - # note that the server actually does get built and installed, - # but we then delete it before packaging. - local minimal_exclude_list="server embedded-server extra-tools innodb bench berkeley-db row-based-replication readline" - - for i in ${minimal_exclude_list} ; do - myconf="${myconf} --without-${i}" - done - myconf="${myconf} --with-extra-charsets=none" - myconf="${myconf} --enable-local-infile" - - if use static ; then - myconf="${myconf} --with-client-ldflags=-all-static" - myconf="${myconf} --disable-shared --with-pic" - else - myconf="${myconf} --enable-shared --enable-static" - fi - - if mysql_version_is_at_least "4.1" && ! use latin1 ; then - myconf="${myconf} --with-charset=utf8" - myconf="${myconf} --with-collation=utf8_general_ci" - else - myconf="${myconf} --with-charset=latin1" - myconf="${myconf} --with-collation=latin1_swedish_ci" - fi -} - -configure_common() { - myconf="${myconf} $(use_with big-tables)" - myconf="${myconf} --enable-local-infile" - myconf="${myconf} --with-extra-charsets=all" - use prefix || myconf="${myconf} --with-mysqld-user=mysql" - myconf="${myconf} --with-server" - myconf="${myconf} --with-unix-socket-path=${EPREFIX}/var/run/mysqld/mysqld.sock" - myconf="${myconf} --without-libwrap" - - if use static ; then - myconf="${myconf} --with-mysqld-ldflags=-all-static" - myconf="${myconf} --with-client-ldflags=-all-static" - myconf="${myconf} --disable-shared --with-pic" - else - myconf="${myconf} --enable-shared --enable-static" - fi - - if use debug ; then - myconf="${myconf} --with-debug=full" - else - myconf="${myconf} --without-debug" - mysql_version_is_at_least "4.1.3" \ - && ( use cluster || [[ "${PN}" == "mysql-cluster" ]] ) \ - && myconf="${myconf} --without-ndb-debug" - fi - - if [ -n "${MYSQL_DEFAULT_CHARSET}" -a -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." - myconf="${myconf} --with-charset=${MYSQL_DEFAULT_CHARSET}" - myconf="${myconf} --with-collation=${MYSQL_DEFAULT_COLLATION}" - elif mysql_version_is_at_least "4.1" && ! use latin1 ; then - myconf="${myconf} --with-charset=utf8" - myconf="${myconf} --with-collation=utf8_general_ci" - else - myconf="${myconf} --with-charset=latin1" - myconf="${myconf} --with-collation=latin1_swedish_ci" - fi - - if use embedded ; then - myconf="${myconf} --with-embedded-privilege-control" - myconf="${myconf} --with-embedded-server" - else - myconf="${myconf} --without-embedded-privilege-control" - myconf="${myconf} --without-embedded-server" - fi - -} - -configure_40_41_50() { - myconf="${myconf} --with-zlib-dir=${EPREFIX}/usr" - myconf="${myconf} $(use_with perl bench)" - myconf="${myconf} --enable-assembler" - myconf="${myconf} --with-extra-tools" - myconf="${myconf} --with-innodb" - myconf="${myconf} --without-readline" - myconf="${myconf} $(use_with ssl openssl "${EPREFIX}/usr")" - mysql_version_is_at_least "5.0" || myconf="${myconf} $(use_with raid)" - - # --with-vio is not needed anymore, it's on by default and - # has been removed from configure - # Apply to 4.x and 5.0.[0-3] - if use ssl ; then - mysql_version_is_at_least "5.0.4" || myconf="${myconf} --with-vio" - fi - - if mysql_version_is_at_least "5.0.60" ; then - if use berkdb ; then - elog "Berkeley DB support was disabled due to build failures" - elog "on multiple arches, go to a version earlier than 5.0.60" - elog "if you want it again. Gentoo bug #224067." - fi - myconf="${myconf} --without-berkeley-db" - elif use berkdb ; then - # The following fix is due to a bug with bdb on SPARC's. See: - # http://www.geocrawler.com/mail/msg.php3?msg_id=4754814&list=8 - # It comes down to non-64-bit safety problems. - if use alpha || use amd64 || use hppa || use mips || use sparc ; then - elog "Berkeley DB support was disabled due to compatibility issues on this arch" - myconf="${myconf} --without-berkeley-db" - else - myconf="${myconf} --with-berkeley-db=./bdb" - fi - else - myconf="${myconf} --without-berkeley-db" - fi - - if mysql_version_is_at_least "4.1.3" ; then - myconf="${myconf} --with-geometry" - if [[ "${PN}" != "mysql-cluster" ]] ; then - myconf="${myconf} $(use_with cluster ndbcluster)" - fi - fi - - if mysql_version_is_at_least "4.1.3" && use extraengine ; then - # http://dev.mysql.com/doc/mysql/en/archive-storage-engine.html - myconf="${myconf} --with-archive-storage-engine" - - # http://dev.mysql.com/doc/mysql/en/csv-storage-engine.html - myconf="${myconf} --with-csv-storage-engine" - - # http://dev.mysql.com/doc/mysql/en/blackhole-storage-engine.html - myconf="${myconf} --with-blackhole-storage-engine" - - # http://dev.mysql.com/doc/mysql/en/federated-storage-engine.html - # http://dev.mysql.com/doc/mysql/en/federated-description.html - # http://dev.mysql.com/doc/mysql/en/federated-limitations.html - if mysql_version_is_at_least "5.0.3" ; then - elog "Before using the Federated storage engine, please be sure to read" - elog "http://dev.mysql.com/doc/mysql/en/federated-limitations.html" - myconf="${myconf} --with-federated-storage-engine" - fi - fi - - if [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then - myconf="${myconf} `use_enable community community-features`" - if use community; then - myconf="${myconf} `use_enable profiling`" - else - myconf="${myconf} --disable-profiling" - fi - fi - - mysql_version_is_at_least "5.0.18" \ - && use max-idx-128 \ - && myconf="${myconf} --with-max-indexes=128" -} - -configure_51() { - # TODO: !!!! readd --without-readline - # the failure depend upon config/ac-macros/readline.m4 checking into - # readline.h instead of history.h - myconf="${myconf} $(use_with ssl ssl "${EPREFIX}"/usr)" - myconf="${myconf} --enable-assembler" - myconf="${myconf} --with-geometry" - myconf="${myconf} --with-readline" - myconf="${myconf} --with-zlib-dir=${EPREFIX}/usr/" - myconf="${myconf} --without-pstack" - myconf="${myconf} --with-plugindir=${EPREFIX}/usr/$(get_libdir)/mysql/plugin" - - # This is an explict die here, because if we just forcibly disable it, then the - # user's data is not accessible. - use max-idx-128 && die "Bug #336027: upstream has a corruption issue with max-idx-128 presently" - #use max-idx-128 && myconf="${myconf} --with-max-indexes=128" - if [ "${MYSQL_COMMUNITY_FEATURES}" == "1" ]; then - myconf="${myconf} $(use_enable community community-features)" - if use community; then - myconf="${myconf} $(use_enable profiling)" - else - myconf="${myconf} --disable-profiling" - fi - fi - - # Scan for all available plugins - local plugins_avail="$( - LANG=C \ - find "${S}" \ - \( \ - -name 'plug.in' \ - -o -iname 'configure.in' \ - -o -iname 'configure.ac' \ - \) \ - -print0 \ - | xargs -0 sed -r -n \ - -e '/^MYSQL_STORAGE_ENGINE/{ - s~MYSQL_STORAGE_ENGINE\([[:space:]]*\[?([-_a-z0-9]+)\]?.*,~\1 ~g ; - s~^([^ ]+).*~\1~gp; - }' \ - | tr -s '\n' ' ' - )" - - # 5.1 introduces a new way to manage storage engines (plugins) - # like configuration=none - # This base set are required, and will always be statically built. - local plugins_sta="csv myisam myisammrg heap" - local plugins_dyn="" - local plugins_dis="example ibmdb2i" - - # These aren't actually required by the base set, but are really useful: - plugins_sta="${plugins_sta} archive blackhole" - - # default in 5.5.4 - if mysql_version_is_at_least "5.5.4" ; then - plugins_sta="${plugins_sta} partition" - fi - # Now the extras - if use extraengine ; then - # like configuration=max-no-ndb, archive and example removed in 5.1.11 - # not added yet: ibmdb2i - # Not supporting as examples: example,daemon_example,ftexample - plugins_sta="${plugins_sta} partition" - - if [[ "${PN}" != "mariadb" ]] ; then - elog "Before using the Federated storage engine, please be sure to read" - elog "http://dev.mysql.com/doc/refman/5.1/en/federated-limitations.html" - plugins_dyn="${plugins_sta} federated" - else - elog "MariaDB includes the FederatedX engine. Be sure to read" - elog "http://askmonty.org/wiki/index.php/Manual:FederatedX_storage_engine" - plugins_dyn="${plugins_sta} federatedx" - fi - else - plugins_dis="${plugins_dis} partition federated" - fi - - # Upstream specifically requests that InnoDB always be built: - # - innobase, innodb_plugin - # Build falcon if available for 6.x series. - for i in innobase falcon ; do - [ -e "${S}"/storage/${i} ] && plugins_sta="${plugins_sta} ${i}" - done - for i in innodb_plugin ; do - [ -e "${S}"/storage/${i} ] && plugins_dyn="${plugins_dyn} ${i}" - done - - # like configuration=max-no-ndb - if ( use cluster || [[ "${PN}" == "mysql-cluster" ]] ) ; then - plugins_sta="${plugins_sta} ndbcluster partition" - plugins_dis="${plugins_dis//partition}" - myconf="${myconf} --with-ndb-binlog" - else - plugins_dis="${plugins_dis} ndbcluster" - fi - - if [[ "${PN}" == "mariadb" ]] ; then - # In MariaDB, InnoDB is packaged in the xtradb directory, so it's not - # caught above. - # This is not optional, without it several upstream testcases fail. - # Also strongly recommended by upstream. - if [[ "${PV}" < "5.2.0" ]] ; then - myconf="${myconf} --with-maria-tmp-tables" - plugins_sta="${plugins_sta} maria" - else - myconf="${myconf} --with-aria-tmp-tables" - plugins_sta="${plugins_sta} aria" - fi - - [ -e "${S}"/storage/innobase ] || [ -e "${S}"/storage/xtradb ] || - die "The ${P} package doesn't provide innobase nor xtradb" - - for i in innobase xtradb ; do - [ -e "${S}"/storage/${i} ] && plugins_sta="${plugins_sta} ${i}" - done - - myconf="${myconf} $(use_with libevent)" - - if mysql_version_is_at_least "5.2" ; then - #This should include sphinx, but the 5.2.4 archive forgot the plug.in file - #for i in oqgraph sphinx ; do - for i in oqgraph ; do - use ${i} \ - && plugins_dyn="${plugins_dyn} ${i}" \ - || plugins_dis="${plugins_dis} ${i}" - done - fi - fi - - if pbxt_available && [[ "${PBXT_NEWSTYLE}" == "1" ]]; then - use pbxt \ - && plugins_sta="${plugins_sta} pbxt" \ - || plugins_dis="${plugins_dis} pbxt" - fi - - use static && \ - plugins_sta="${plugins_sta} ${plugins_dyn}" && \ - plugins_dyn="" - - einfo "Available plugins: ${plugins_avail}" - einfo "Dynamic plugins: ${plugins_dyn}" - einfo "Static plugins: ${plugins_sta}" - einfo "Disabled plugins: ${plugins_dis}" - - # These are the static plugins - myconf="${myconf} --with-plugins=${plugins_sta// /,}" - # And the disabled ones - for i in ${plugins_dis} ; do - myconf="${myconf} --without-plugin-${i}" - done -} - -pbxt_src_configure() { - mysql_init_vars - - pushd "${WORKDIR}/pbxt-${PBXT_VERSION}" &>/dev/null - - einfo "Reconfiguring dir '${PWD}'" - eautoreconf - - local myconf="" - myconf="${myconf} --with-mysql=${S} --libdir=${EPREFIX}/usr/$(get_libdir)" - use debug && myconf="${myconf} --with-debug=full" - econf ${myconf} || die "Problem configuring PBXT storage engine" -} - -pbxt_src_compile() { - - # Be backwards compatible for now - if [[ $EAPI != 2 ]]; then - pbxt_src_configure - fi - # TODO: is it safe/needed to use emake here ? - make || die "Problem making PBXT storage engine (${myconf})" - - popd - # TODO: modify test suite for PBXT -} - -pbxt_src_install() { - pushd "${WORKDIR}/pbxt-${PBXT_VERSION}" &>/dev/null - emake install DESTDIR="${D}" || die "Failed to install PBXT" - popd -} - -# -# EBUILD FUNCTIONS -# -# @FUNCTION: mysql_pkg_setup -# @DESCRIPTION: -# Perform some basic tests and tasks during pkg_setup phase: -# die if FEATURES="test", USE="-minimal" and not using FEATURES="userpriv" -# check for conflicting use flags -# create new user and group for mysql -# warn about deprecated features -mysql_pkg_setup() { - if has test ${FEATURES} ; then - if ! use minimal ; then - if [[ $UID -eq 0 ]]; then - eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." - fi - fi - fi - - # bug 350844 - case "${EAPI:-0}" in - 0 | 1) - if use static && ! built_with_use sys-libs/ncurses static-libs; then - die "To build MySQL statically you need to enable static-libs for sys-libs/ncurses" - fi - ;; - esac - - # Check for USE flag problems in pkg_setup - if use static && use ssl ; then - M="MySQL does not support being built statically with SSL support enabled!" - eerror "${M}" - die "${M}" - fi - - if mysql_version_is_at_least "5.1.51" \ - && ! mysql_version_is_at_least "5.2" \ - && use debug ; then - # Also in package.use.mask - die "Bug #344885: Upstream has broken USE=debug for 5.1 series >=5.1.51" - fi - - if ! mysql_version_is_at_least "5.0" \ - && use raid \ - && use static ; then - eerror "USE flags 'raid' and 'static' conflict, you cannot build MySQL statically" - eerror "with RAID support enabled." - die "USE flags 'raid' and 'static' conflict!" - fi - - if mysql_version_is_at_least "4.1.3" \ - && ( use cluster || use extraengine || use embedded ) \ - && use minimal ; then - M="USE flags 'cluster', 'extraengine', 'embedded' conflict with 'minimal' USE flag!" - eerror "${M}" - die "${M}" - fi - - if mysql_version_is_at_least "5.1" \ - && xtradb_patch_available \ - && use xtradb \ - && use embedded ; then - M="USE flags 'xtradb' and 'embedded' conflict and cause build failures" - eerror "${M}" - die "${M}" - fi - - # Bug #290570, 284946, 307251 - # Upstream changes made us need a fairly new GCC4. - # But only for 5.0.8[3-6]! - if mysql_version_is_at_least "5.0.83" && ! mysql_version_is_at_least 5.0.87 ; then - GCC_VER=$(gcc-version) - case ${CHOST}:${GCC_VER} in - *-darwin*:4.*) : ;; # bug #310615 - *:2*|*:3*|*:4.0|*:4.1|*:4.2) - eerror "Some releases of MySQL required a very new GCC, and then" - eerror "later release relaxed that requirement again. Either pick a" - eerror "MySQL >=5.0.87, or use a newer GCC." - die "Active GCC too old!" ;; - esac - 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" - - mysql_check_version_range "4.0 to 5.0.99.99" \ - && use berkdb \ - && elog "Berkeley DB support is deprecated and will be removed in future versions!" - - if [ "${PN}" != "mysql-cluster" ] && use cluster; then - ewarn "Upstream has noted that the NDB cluster support in the 5.0 and" - ewarn "5.1 series should NOT be put into production. In the near" - ewarn "future, it will be disabled from building." - ewarn "" - ewarn "If you need NDB support, you should instead move to the new" - ewarn "mysql-cluster package that represents that upstream NDB" - ewarn "development." - fi -} - -# @FUNCTION: mysql_src_unpack -# @DESCRIPTION: -# Unpack the source code and call mysql_src_prepare for EAPI < 2. -mysql_src_unpack() { - # Initialize the proper variables first - mysql_init_vars - - unpack ${A} - # Grab the patches - [[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack - - mv -f "${WORKDIR}/${MY_SOURCEDIR}" "${S}" - - # Be backwards compatible for now - case ${EAPI:-0} in - 2) : ;; - 0 | 1) mysql_src_prepare ;; - esac -} - -# @FUNCTION: mysql_src_prepare -# @DESCRIPTION: -# Apply patches to the source code and remove unneeded bundled libs. -mysql_src_prepare() { - cd "${S}" - - # Apply the patches for this MySQL version - EPATCH_SUFFIX="patch" - mkdir -p "${EPATCH_SOURCE}" || die "Unable to create epatch directory" - # Clean out old items - rm -f "${EPATCH_SOURCE}"/* - # Now link in right patches - mysql_mv_patches - # And apply - epatch - - # last -fPIC fixup, per bug #305873 - i="${S}"/storage/innodb_plugin/plug.in - [ -f "${i}" ] && sed -i -e '/CFLAGS/s,-prefer-non-pic,,g' "${i}" - - # Additional checks, remove bundled zlib (Cluster needs this, for static - # memory management in zlib, leave available for Cluster) - if [[ "${PN}" != "mysql-cluster" ]] ; then - rm -f "${S}/zlib/"*.[ch] - sed -i -e "s/zlib\/Makefile dnl/dnl zlib\/Makefile/" "${S}/configure.in" - fi - rm -f "scripts/mysqlbug" - - # Make charsets install in the right place - find . -name 'Makefile.am' \ - -exec sed --in-place -e 's!$(pkgdatadir)!'${MY_SHAREDSTATEDIR}'!g' {} \; - - if mysql_version_is_at_least "4.1" ; then - # Remove what needs to be recreated, so we're sure it's actually done - einfo "Cleaning up old buildscript files" - find . -name Makefile \ - -o -name Makefile.in \ - -o -name configure \ - -exec rm -f {} \; - rm -f "ltmain.sh" - rm -f "scripts/mysqlbug" - fi - - local rebuilddirlist d - - if xtradb_patch_available && use xtradb ; then - einfo "Adding storage engine: Percona XtraDB (replacing InnoDB)" - pushd "${S}"/storage >/dev/null - i="innobase" - o="${WORKDIR}/storage-${i}.mysql-upstream" - # Have we been here already? - [ -d "${o}" ] && rm -f "${i}" - # Or maybe we haven't - [ -d "${i}" -a ! -d "${o}" ] && mv "${i}" "${o}" - cp -ral "${WORKDIR}/${XTRADB_P}" "${i}" - popd >/dev/null - fi - - if pbxt_patch_available && [[ "${PBXT_NEWSTYLE}" == "1" ]] && use pbxt ; then - einfo "Adding storage engine: PBXT" - pushd "${S}"/storage >/dev/null - i='pbxt' - [ -d "${i}" ] && rm -rf "${i}" - cp -ral "${WORKDIR}/${PBXT_P}" "${i}" - popd >/dev/null - fi - - if mysql_version_is_at_least "5.1.12" ; then - rebuilddirlist="." - # This does not seem to be needed presently. robbat2 2010/02/23 - #einfo "Updating innobase cmake" - ## TODO: check this with a cmake expert - #cmake \ - # -DCMAKE_C_COMPILER=$(type -P $(tc-getCC)) \ - # -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX)) \ - # "storage/innobase" - else - rebuilddirlist=". innobase" - fi - - for d in ${rebuilddirlist} ; do - einfo "Reconfiguring dir '${d}'" - pushd "${d}" &>/dev/null - eautoreconf - popd &>/dev/null - done - - if mysql_check_version_range "4.1 to 5.0.99.99" \ - && use berkdb ; then - einfo "Fixing up berkdb buildsystem" - [[ -w "bdb/dist/ltmain.sh" ]] && cp -f "ltmain.sh" "bdb/dist/ltmain.sh" - cp -f "${EPREFIX}/usr/share/aclocal/libtool.m4" "bdb/dist/aclocal/libtool.ac" \ - || die "Could not copy libtool.m4 to bdb/dist/" - #These files exist only with libtool-2*, and need to be included. - if [ -f ${EPREFIX}'/usr/share/aclocal/ltsugar.m4' ]; then - cat "${EPREFIX}/usr/share/aclocal/ltsugar.m4" >> "bdb/dist/aclocal/libtool.ac" - cat "${EPREFIX}/usr/share/aclocal/ltversion.m4" >> "bdb/dist/aclocal/libtool.ac" - cat "${EPREFIX}/usr/share/aclocal/lt~obsolete.m4" >> "bdb/dist/aclocal/libtool.ac" - cat "${EPREFIX}/usr/share/aclocal/ltoptions.m4" >> "bdb/dist/aclocal/libtool.ac" - fi - pushd "bdb/dist" &>/dev/null - sh s_all \ - || die "Failed bdb reconfigure" - popd &>/dev/null - fi -} - -# @FUNCTION: mysql_src_configure -# @DESCRIPTION: -# Configure mysql to build the code for Gentoo respecting the use flags. -mysql_src_configure() { - # Make sure the vars are correctly initialized - mysql_init_vars - - # $myconf is modified by the configure_* functions - local myconf="" - - if use minimal ; then - configure_minimal - else - configure_common - if mysql_version_is_at_least "5.1.10" ; then - configure_51 - else - configure_40_41_50 - fi - fi - - # Bug #114895, bug #110149 - filter-flags "-O" "-O[01]" - - # glib-2.3.2_pre fix, bug #16496 - append-cppflags "-DHAVE_ERRNO_AS_DEFINE=1" - - # As discovered by bug #246652, doing a double-level of SSP causes NDB to - # fail badly during cluster startup. - if [[ $(gcc-major-version) -lt 4 ]]; then - filter-flags "-fstack-protector-all" - fi - - CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-strict-aliasing" - CXXFLAGS="${CXXFLAGS} -felide-constructors -fno-rtti" - mysql_version_is_at_least "5.0" \ - && CXXFLAGS="${CXXFLAGS} -fno-implicit-templates" - export CXXFLAGS - - # bug #283926, with GCC4.4, this is required to get correct behavior. - append-flags -fno-strict-aliasing - - # bug #335185, #335995, with >= GCC4.3.3 on x86 only, omit-frame-pointer - # causes a mis-compile. - # Upstream bugs: - # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38562 - # http://bugs.mysql.com/bug.php?id=45205 - use x86 && version_is_at_least "4.3.3" "$(gcc-fullversion)" && \ - append-flags -fno-omit-frame-pointer && \ - filter-flags -fomit-frame-pointer - - econf \ - --libexecdir="${EPREFIX}"/usr/sbin \ - --sysconfdir=${MY_SYSCONFDIR} \ - --localstatedir=${MY_LOCALSTATEDIR} \ - --sharedstatedir=${MY_SHAREDSTATEDIR} \ - --libdir=${MY_LIBDIR} \ - --includedir=${MY_INCLUDEDIR} \ - --with-low-memory \ - --with-client-ldflags=-lstdc++ \ - --enable-thread-safe-client \ - --with-comment="Gentoo Linux ${PF}" \ - --without-docs \ - --with-LIBDIR="$(get_libdir)" \ - ${myconf} || die "econf failed" - - # TODO: Move this before autoreconf !!! - find . -type f -name Makefile -print0 \ - | xargs -0 -n100 sed -i \ - -e 's|^pkglibdir *= *$(libdir)/mysql|pkglibdir = $(libdir)|;s|^pkgincludedir *= *$(includedir)/mysql|pkgincludedir = $(includedir)|' - - if [[ $EAPI == 2 ]] && [[ "${PBXT_NEWSTYLE}" != "1" ]]; then - pbxt_patch_available && use pbxt && pbxt_src_configure - fi -} - -# @FUNCTION: mysql_src_compile -# @DESCRIPTION: -# Compile the mysql code. -mysql_src_compile() { - # Be backwards compatible for now - case ${EAPI:-0} in - 2) : ;; - 0 | 1) mysql_src_configure ;; - esac - - emake || die "emake failed" - - if [[ "${PBXT_NEWSTYLE}" != "1" ]]; then - pbxt_patch_available && use pbxt && pbxt_src_compile - fi -} - -# @FUNCTION: mysql_src_install -# @DESCRIPTION: -# Install mysql. -mysql_src_install() { - # Make sure the vars are correctly initialized - mysql_init_vars - - emake install \ - DESTDIR="${D}" \ - benchdir_root=${MY_SHAREDSTATEDIR} \ - testroot="${MY_SHAREDSTATEDIR}" \ - || die "emake install failed" - - if [[ "${PBXT_NEWSTYLE}" != "1" ]]; then - pbxt_patch_available && use pbxt && pbxt_src_install - fi - - # Convenience links - einfo "Making Convenience links for mysqlcheck multi-call binary" - dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlanalyze" - dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqlrepair" - dosym "/usr/bin/mysqlcheck" "/usr/bin/mysqloptimize" - - # Various junk (my-*.cnf moved elsewhere) - einfo "Removing duplicate /usr/share/mysql files" - rm -Rf "${ED}/usr/share/info" - for removeme in "mysql-log-rotate" mysql.server* \ - binary-configure* my-*.cnf mi_test_all* - do - rm -f "${D}"/${MY_SHAREDSTATEDIR}/${removeme} - done - - # Clean up stuff for a minimal build - if use minimal ; then - einfo "Remove all extra content for minimal build" - rm -Rf "${D}${MY_SHAREDSTATEDIR}"/{mysql-test,sql-bench} - rm -f "${ED}"/usr/bin/{mysql{_install_db,manager*,_secure_installation,_fix_privilege_tables,hotcopy,_convert_table_format,d_multi,_fix_extensions,_zap,_explain_log,_tableinfo,d_safe,_install,_waitpid,binlog,test},myisam*,isam*,pack_isam} - rm -f "${ED}/usr/sbin/mysqld" - rm -f "${D}${MY_LIBDIR}"/lib{heap,merge,nisam,my{sys,strings,sqld,isammrg,isam},vio,dbug}.a - 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 - case ${MYSQL_PV_MAJOR} in - 3*|4.0) mysql_mycnf_version="4.0" ;; - 4.[1-9]|5.0) mysql_mycnf_version="4.1" ;; - 5.[1-9]|6*|7*) mysql_mycnf_version="5.1" ;; - esac - einfo "Building default my.cnf (${mysql_mycnf_version})" - insinto "${MY_SYSCONFDIR#${EPREFIX}}" - doins scripts/mysqlaccess.conf - mycnf_src="my.cnf-${mysql_mycnf_version}" - sed -e "s!@DATADIR@!${MY_DATADIR}!g" \ - -e "s!/tmp!${EPREFIX}/tmp!" \ - -e "s!/usr!${EPREFIX}/usr!" \ - -e "s!= /var!= ${EPREFIX}/var!" \ - "${FILESDIR}/${mycnf_src}" \ - > "${TMPDIR}/my.cnf.ok" - 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" - fi - newins "${TMPDIR}/my.cnf.ok" my.cnf - - # Minimal builds don't have the MySQL server - if ! use minimal ; then - einfo "Creating initial directories" - # Empty directories ... - diropts "-m0750" - if [[ "${PREVIOUS_DATADIR}" != "yes" ]] ; then - dodir "${MY_DATADIR#${EPREFIX}}" - keepdir "${MY_DATADIR#${EPREFIX}}" - chown -R mysql:mysql "${D}/${MY_DATADIR}" - fi - - diropts "-m0755" - for folder in "${MY_LOGDIR#${EPREFIX}}" "/var/run/mysqld" ; do - dodir "${folder}" - keepdir "${folder}" - chown -R mysql:mysql "${ED}/${folder}" - done - fi - - # Docs - einfo "Installing docs" - for i in README ChangeLog EXCEPTIONS-CLIENT INSTALL-SOURCE ; do - [[ -f "$i" ]] && dodoc "$i" - done - doinfo "${S}"/Docs/mysql.info - - # Minimal builds don't have the MySQL server - if ! use minimal ; then - einfo "Including support files and sample configurations" - docinto "support-files" - for script in \ - "${S}"/support-files/my-*.cnf \ - "${S}"/support-files/magic \ - "${S}"/support-files/ndb-config-2-node.ini - do - [[ -f "$script" ]] && dodoc "${script}" - done - - docinto "scripts" - for script in "${S}"/scripts/mysql* ; do - [[ -f "$script" ]] && [[ "${script%.sh}" == "${script}" ]] && dodoc "${script}" - done - - fi - - mysql_lib_symlinks "${ED}" -} - -# @FUNCTION: mysql_pkg_preinst -# @DESCRIPTION: -# Create the user and groups for mysql - die if that fails. -mysql_pkg_preinst() { - enewgroup mysql 60 || die "problem adding 'mysql' group" - enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user" -} - -# @FUNCTION: mysql_pkg_postinst -# @DESCRIPTION: -# Run post-installation tasks: -# create the dir for logfiles if non-existant -# touch the logfiles and secure them -# install scripts -# issue required steps for optional features -# issue deprecation warnings -mysql_pkg_postinst() { - # Make sure the vars are correctly initialized - mysql_init_vars - - # Check FEATURES="collision-protect" before removing this - [[ -d "${EROOT}/var/log/mysql" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}" - - # Secure the logfiles - touch "${ROOT}${MY_LOGDIR}"/mysql.{log,err} - chown mysql:mysql "${ROOT}${MY_LOGDIR}"/mysql* - chmod 0660 "${ROOT}${MY_LOGDIR}"/mysql* - - # Minimal builds don't have the MySQL server - if ! use minimal ; then - docinto "support-files" - for script in \ - support-files/my-*.cnf \ - support-files/magic \ - support-files/ndb-config-2-node.ini - do - [[ -f "${script}" ]] \ - && dodoc "${script}" - done - - docinto "scripts" - for script in scripts/mysql* ; do - [[ -f "${script}" ]] \ - && [[ "${script%.sh}" == "${script}" ]] \ - && dodoc "${script}" - done - - einfo - elog "You might want to run:" - elog "\"emerge --config =${CATEGORY}/${PF}\"" - elog "if this is a new install." - einfo - - einfo - elog "If you are upgrading major versions, you should run the" - elog "mysql_upgrade tool." - einfo - fi - - if pbxt_available && use pbxt ; then - elog "Note: PBXT is now statically built when enabled." - elog "" - elog "If, you previously installed as a plugin and " - elog "you cannot start the MySQL server," - elog "remove the ${MY_DATADIR}/mysql/plugin.* files, then" - elog "use the MySQL upgrade script to restore the table" - elog "or execute the following SQL command:" - elog " CREATE TABLE IF NOT EXISTS plugin (" - elog " name char(64) binary DEFAULT '' NOT NULL," - elog " dl char(128) DEFAULT '' NOT NULL," - elog " PRIMARY KEY (name)" - elog " ) CHARACTER SET utf8 COLLATE utf8_bin;" - fi - - mysql_check_version_range "4.0 to 5.0.99.99" \ - && use berkdb \ - && elog "Berkeley DB support is deprecated and will be removed in future versions!" -} - -# @FUNCTION: mysql_getopt -# @DESCRIPTION: -# Use my_print_defaults to extract specific config options -mysql_getopt() { - local mypd="${EROOT}"/usr/bin/my_print_defaults - section="$1" - flag="--${2}=" - "${mypd}" $section | sed -n "/^${flag}/p" -} - -# @FUNCTION: mysql_getoptval -# @DESCRIPTION: -# Use my_print_defaults to extract specific config options -mysql_getoptval() { - local mypd="${EROOT}"/usr/bin/my_print_defaults - section="$1" - flag="--${2}=" - "${mypd}" $section | sed -n "/^${flag}/s,${flag},,gp" -} - -# @FUNCTION: mysql_pkg_config -# @DESCRIPTION: -# Configure mysql environment. -mysql_pkg_config() { - local old_MY_DATADIR="${MY_DATADIR}" - local old_HOME="${HOME}" - # my_print_defaults needs to read stuff in $HOME/.my.cnf - export HOME=/root - - # Make sure the vars are correctly initialized - mysql_init_vars - - [[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR" - - if built_with_use ${CATEGORY}/${PN} minimal ; 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 - MYSQL_ROOT_PASSWORD="$(mysql_getoptval 'client mysql' password)" - fi - MYSQL_TMPDIR="$(mysql_getoptval mysqld tmpdir)" - # These are dir+prefix - MYSQL_RELAY_LOG="$(mysql_getoptval mysqld relay-log)" - MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*} - MYSQL_LOG_BIN="$(mysql_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 "${ROOT}"/$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 "${ROOT}"/$MYSQL_LOG_BIN - fi - if [[ ! -d "${ROOT}"/$MYSQL_RELAY_LOG ]]; then - einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG" - install -d -m 770 -o mysql -g mysql "${ROOT}"/$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, in the" - einfo "MYSQL_ROOT_PASSWORD env var or through the /root/.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="--log-warnings=0" - local sqltmp="$(emktemp)" - - local help_tables="${ROOT}${MY_SHAREDSTATEDIR}/fill_help_tables.sql" - [[ -r "${help_tables}" ]] \ - && cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \ - || touch "${TMPDIR}/fill_help_tables.sql" - help_tables="${TMPDIR}/fill_help_tables.sql" - - # Figure out which options we need to disable to do the setup - 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 bdb \ - federated innodb ssl log-bin relay-log slow-query-log external-locking \ - ndbcluster log-slave-updates \ - ; do - optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}" - egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}" - done - # But some options changed names - egrep -sq external-locking "${helpfile}" && \ - options="${options/skip-locking/skip-external-locking}" - - use prefix || options="${options} --user=mysql" - - pushd "${TMPDIR}" &>/dev/null - #cmd="'${EROOT}/usr/share/mysql/scripts/mysql_install_db' '--basedir=${EPREFIX}/usr' ${options}" - cmd=${EROOT}usr/share/mysql/scripts/mysql_install_db - [ -f ${cmd} ] || cmd=${EROOT}usr/bin/mysql_install_db - cmd="'$cmd' '--basedir=${EPREFIX}/usr' ${options}" - einfo "Command: $cmd" - eval $cmd \ - >"${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 run mysql_install_db. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log" - fi - popd &>/dev/null - [[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \ - || die "MySQL databases not installed" - chown -R mysql:mysql "${ROOT}/${MY_DATADIR}" 2>/dev/null - chmod 0750 "${ROOT}/${MY_DATADIR}" 2>/dev/null - - if mysql_version_is_at_least "4.1.3" ; then - # 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 - - if [[ -r "${help_tables}" ]] ; then - cat "${help_tables}" >> "${sqltmp}" - fi - fi - - einfo "Creating the mysql database and setting proper permissions on it ..." - - 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 \ - --default-storage-engine=MyISAM \ - --socket=${socket} \ - --pid-file=${pidfile}" - #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'" - "${EROOT}/usr/bin/mysql" \ - --socket=${socket} \ - -hlocalhost \ - -e "${sql}" - eend $? - - 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!" - - # Stop the server and cleanup - einfo "Stopping the server ..." - kill $(< "${pidfile}" ) - rm -f "${sqltmp}" - wait %1 - einfo "Done" -} - -# @FUNCTION: mysql_pkg_postrm -# @DESCRIPTION: -# Remove mysql symlinks. -mysql_pkg_postrm() { - : # mysql_lib_symlinks "${ED}" -} diff --git a/eclass/mysql_fx.eclass b/eclass/mysql_fx.eclass deleted file mode 100644 index 1c501cb..0000000 --- a/eclass/mysql_fx.eclass +++ /dev/null @@ -1,306 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -# Author: Francesco Riosa (Retired) <vivo@gentoo.org> -# Maintainer: -# - MySQL Team <mysql-bugs@gentoo.org> -# - Luca Longinotti <chtekk@gentoo.org> - -inherit multilib - -# -# Helper function, version (integer) may have sections separated by dots -# for readability. -# -stripdots() { - local dotver=${1:-"0"} - local v="" - local ret=0 - if [[ "${dotver/./}" != "${dotver}" ]] ; then - # dotted version number - for i in 1000000 10000 100 1 ; do - v=${dotver%%\.*} - # remove leading zeroes - while [[ ${#v} -gt 1 ]] && [[ ${v:0:1} == "0" ]] ; do v=${v#0} ; done - # increment integer version number - ret=$(( ${v} * ${i} + ${ret} )) - if [[ "${dotver}" == "${dotver/\.}" ]] ; then - dotver=0 - else - dotver=${dotver#*\.} - fi - done - echo "${ret}" - else - # already an integer - v=${dotver} - while [[ ${#v} -gt 1 ]] && [[ ${v:0:1} == "0" ]] ; do v=${v#0} ; done - echo "${v}" - fi -} - -# -# Check if a version number falls inside a given range. -# The range includes the extremes and must be specified as -# "low_version to high_version" i.e. "4.1.2 to 5.1.99.99". -# Returns true if inside the range. -# -mysql_check_version_range() { - local lbound="${1%% to *}" ; lbound=$(stripdots "${lbound}") - local rbound="${1#* to }" ; rbound=$(stripdots "${rbound}") - local my_ver="${2:-"${MYSQL_VERSION_ID}"}" - [[ ${lbound} -le ${my_ver} ]] && [[ ${my_ver} -le ${rbound} ]] && return 0 - return 1 -} - -# -# True if at least one applicable range is found for the patch. -# -_mysql_test_patch_ver_pn() { - local allelements=", version, package name" - # So that it fails the directory test if none of them exist - local filesdir="/dev/null" - for d in "${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" \ - "${WORKDIR}/mysql-extras" ; do - if [ -d "${d}" ]; then - filesdir="${d}" - break - fi - done - - [[ -d "${filesdir}" ]] || die "Source dir must be a directory" - local flags=$1 pname=$2 - if [[ $(( $flags & $(( 1 + 4 + 16 )) )) -eq 21 ]] ; then - einfo "using '${pname}'" - ln -sf "${filesdir}/${pname}" "${EPATCH_SOURCE}" || die "Couldn't move ${pname}" - return 0 - fi - - [[ $(( $flags & $(( 2 + 4 )) )) -gt 0 ]] \ - && allelements="${allelements//", version"}" - - [[ $(( $flags & $(( 8 + 16 )) )) -gt 0 ]] \ - && allelements="${allelements//", package name"}" - - [[ -n "${allelements}" ]] && [[ "${flags}" -gt 0 ]] \ - && ewarn "QA notice: ${allelements} missing in ${pname} patch" - - return 1 -} - -# -# Parse a "index_file" looking for patches to apply to the -# current MySQL version. -# If the patch applies, print its description. -# -mysql_mv_patches() { - # So that it fails the directory test if none of them exist - local filesdir="/dev/null" - if [[ -z "${1}" ]]; then - for d in "${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}" \ - "${WORKDIR}/mysql-extras" ; do - if [ -d "${d}" ]; then - filesdir="${d}" - break - fi - done - [[ -d "${filesdir}" ]] || die "No patches directory found!" - fi - - for i in "$1" "${filesdir}/0000_index.txt" "${filesdir}/000_index.txt" ; do - if [ -n "$i" -a -f "$i" ]; then - local index_file="$i" - break - fi - done - - local my_ver="${2:-"${MYSQL_VERSION_ID}"}" - local my_test_fx=${3:-"_mysql_test_patch_ver_pn"} - _mysql_mv_patches "${index_file}" "${my_ver}" "${my_test_fx}" -} - -_mysql_mv_patches() { - local index_file="${1}" - local my_ver="${2}" - local my_test_fx="${3}" - local dsc ndsc=0 i - dsc=( ) - - # Values for flags are (2^x): - # 1 - one patch found - # 2 - at least one version range is wrong - # 4 - at least one version range is ok - # 8 - at least one ${PN} did not match - # 16 - at least one ${PN} has been matched - local flags=0 pname="" - while read row ; do - case "${row}" in - @patch\ *) - [[ -n "${pname}" ]] \ - && ${my_test_fx} ${flags} "${pname}" \ - && for (( i=0 ; $i < $ndsc ; i++ )) ; do einfo "> ${dsc[$i]}" ; done - flags=1 ; ndsc=0 ; dsc=( ) - pname=${row#"@patch "} - ;; - @ver\ *) - if mysql_check_version_range "${row#"@ver "}" "${my_ver}" ; then - flags=$(( ${flags} | 4 )) - else - flags=$(( ${flags} | 2 )) - fi - ;; - @pn\ *) - if [[ ${row#"@pn "} == "${PN}" ]] ; then - flags=$(( ${flags} | 16 )) - else - flags=$(( ${flags} | 8 )) - fi - ;; - # @use\ *) ;; - @@\ *) - dsc[$ndsc]="${row#"@@ "}" - (( ++ndsc )) - ;; - esac - done < "${index_file}" - - ${my_test_fx} ${flags} "${pname}" \ - && for (( i=0 ; $i < $ndsc ; i++ )) ; do einfo "> ${dsc[$i]}" ; done -} - -# -# Is $2 (defaults to $MYSQL_VERSION_ID) at least version $1? -# (nice) idea from versionator.eclass -# -mysql_version_is_at_least() { - local want_s=$(stripdots "$1") have_s=$(stripdots "${2:-${MYSQL_VERSION_ID}}") - [[ -z "${want_s}" ]] && die "mysql_version_is_at_least missing value to check" - [[ ${want_s} -le ${have_s} ]] && return 0 || return 1 -} - -# -# To be called on the live filesystem, reassigning symlinks of each MySQL -# library to the best version available. -# -mysql_lib_symlinks() { - - local d dirlist maxdots libname libnameln libsuffix reldir - libsuffix=$(get_libname) - - einfo "libsuffix = ${libsuffix}" - einfo "Updating MySQL libraries symlinks" - - reldir="${1}" - pushd "${reldir}/usr/$(get_libdir)" &> /dev/null - - # dirlist must contain the less significative directory left - dirlist="mysql" - - # waste some time in removing and recreating symlinks - for d in $dirlist ; do - for libname in $( find "${d}" -mindepth 1 -maxdepth 1 -name "*${libsuffix}*" -and -not -type "l" 2>/dev/null ) ; do - # maxdot is a limit versus infinite loop - maxdots=0 - libnameln=${libname##*/} - # loop in version of the library to link it, similar to how - # libtool works - if [[ ${CHOST} == *-darwin* ]] ; then - # macho: libname.x.y.z.dylib - local libbasename=${libnameln%%.*} # libname - local libver=${libnameln#${libbasename}} # .x.y.z.dylib - libver=${libver%${libsuffix}} # .x.y.z - while [[ -n ${libver} ]] && [[ ${maxdots} -lt 6 ]] ; do - libnameln="${libbasename}${libver}${libsuffix}" - rm -f "${libnameln}" - ln -s "${libname}" "${libnameln}" - (( ++maxdots )) - libver=${libver%.*} - done - libnameln="${libbasename}${libsuffix}" - rm -f "${libnameln}" - ln -s "${libname}" "${libnameln}" - else - # elf: libname.so.x.y.z - while [[ ${libnameln:0-3} != '${libsuffix}' ]] && [[ ${maxdots} -lt 6 ]] ; do - rm -f "${libnameln}" - ln -s "${libname}" "${libnameln}" - (( ++maxdots )) - libnameln="${libnameln%.*}" - done - rm -f "${libnameln}" - ln -s "${libname}" "${libnameln}" - fi - done - done - - popd &> /dev/null -} - -# @FUNCTION: mysql_init_vars -# @DESCRIPTION: -# void mysql_init_vars() -# Initialize global variables -# 2005-11-19 <vivo@gentoo.org> -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"} - MY_INCLUDEDIR=${MY_INCLUDEDIR="${EPREFIX}/usr/include/mysql"} - MY_LIBDIR=${MY_LIBDIR="${EPREFIX}/usr/$(get_libdir)/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 - - if [ "${MY_SOURCEDIR:-unset}" == "unset" ]; then - MY_SOURCEDIR=${SERVER_URI##*/} - MY_SOURCEDIR=${MY_SOURCEDIR%.tar*} - fi - - export MY_SHAREDSTATEDIR MY_SYSCONFDIR - export MY_LIBDIR MY_LOCALSTATEDIR MY_LOGDIR - export MY_INCLUDEDIR MY_DATADIR MY_SOURCEDIR -} diff --git a/metadata/layout.conf b/metadata/layout.conf index 37e9bb0..bfd7a43 100644 --- a/metadata/layout.conf +++ b/metadata/layout.conf @@ -1,7 +1,9 @@ masters = gentoo -thin-manifests = true - -# This went live Wednesday, July 4, 2012 at 10:00 UTC -# For more details, please see: http://archives.gentoo.org/gentoo-dev-announce/msg_00000.xml -# and/or GLEP 59. -manifest-hashes = SHA256 SHA512 WHIRLPOOL +thin-manifests=true +use-manifests=strict +manifest-hashes = BLAKE2B SHA512 +manifest-required-hashes = SHA512 +sign-manifests=false +sign-commits=true +eapis-banned = 0 1 2 3 4 5 +eapis-deprecated = 6 diff --git a/metadata/news/2010-12-31-mysql-init-revamp/2010-12-31-mysql-init-revamp.en.txt b/metadata/news/2010-12-31-mysql-init-revamp/2010-12-31-mysql-init-revamp.en.txt deleted file mode 100644 index 6a45d49..0000000 --- a/metadata/news/2010-12-31-mysql-init-revamp/2010-12-31-mysql-init-revamp.en.txt +++ /dev/null @@ -1,28 +0,0 @@ -Title: MySQL 5.1 init script revamp -Author: Robin H. Johnson <robbat2@gentoo.org> -Content-Type: text/plain -Posted: 2010-12-31 -Revision: 1 -News-Item-Format: 1.0 -Display-If-Installed: <dev-db/mysql-init-init-scripts-1.99 - -The MySQL init scripts are being revamped to handle more corner cases in MySQL -usage, and migrate from the old mixed multi-instance to symlinked init -instances instead. - -This does mean that you MUST review and merge the changes in the conf.d script -to the new style. For each instance of the mysql_slot_* variable in your old -/etc/conf.d/mysql, you should have a seperate /etc/conf.d/$FOO file, as well -as making /etc/init.d/$FOO a symlink back to /etc/init.d/mysql. - -The following variables have moved: -- MY_CNF (was 'mycnf' in mysql_slot_*) -- STARTUP_TIMEOUT (was 'startup_timeout' in mysql_slot_*) -- NICE (was 'nice' in the mysql_slot_* array) - -All other items from the mysql_slot_* variable array should be merged to form -the new MY_ARGS variable. - -Lastly, the new init scripts allow more flexibility in init dependency -ordering. Please see the rc_* variables in the new conf.d file for more -details. diff --git a/metadata/news/ChangeLog b/metadata/news/ChangeLog deleted file mode 100644 index 494ca7c..0000000 --- a/metadata/news/ChangeLog +++ /dev/null @@ -1,8 +0,0 @@ -# ChangeLog for news -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Id$ - - 06 Dec 2010; Robin H. Johnson <robbat2@gentoo.org> - +2010-12-31-mysql-init-revamp/2010-12-31-mysql-init-revamp.en.txt: - Add news file about MySQL init migration work. - diff --git a/profiles/package.mask b/profiles/package.mask deleted file mode 100644 index 11ebff4..0000000 --- a/profiles/package.mask +++ /dev/null @@ -1,13 +0,0 @@ -# Brian Evans <grknight@gentoo.org> (10 Oct 2015) -# Latest versions are masked for testing ->=dev-db/mysql-5.7 ->=virtual/libmysqlclient-19 ->=virtual/libmysqlclient-20 ->=dev-db/percona-server-5.7 - -# Sergey Popov <pinkbyte@gentoo.org> (04 Sep 2014) -# Security mask, wrt bugs #488212, #498164, #500260, -# #507802 and #518718 -<virtual/mysql-5.5 -<dev-db/mysql-5.5.39 -<dev-db/mariadb-5.5.39 diff --git a/profiles/package.use.mask b/profiles/package.use.mask deleted file mode 100644 index 4acaa94..0000000 --- a/profiles/package.use.mask +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -# Brian Evans <grknight@tuffmail.com> (8 Oct 2013) -# Mask embedded for percona server. -# Upstream unsupported https://bugs.launchpad.net/bugs/1236873 -dev-db/percona-server embedded - diff --git a/profiles/updates/3Q-2014 b/profiles/updates/3Q-2014 deleted file mode 100644 index 000e61b..0000000 --- a/profiles/updates/3Q-2014 +++ /dev/null @@ -1 +0,0 @@ -move dev-db/mariadb-native-client dev-db/mariadb-connector-c diff --git a/virtual/libmysqlclient/ChangeLog b/virtual/libmysqlclient/ChangeLog deleted file mode 100644 index c4490a0..0000000 --- a/virtual/libmysqlclient/ChangeLog +++ /dev/null @@ -1,8 +0,0 @@ - 09 Jun 2017; Brian Evans <grknight@gentoo.org> -libmysqlclient-19.ebuild: - virtual/libmysqlclient: Drop unused version 19 - -*libmysqlclient-19 (02 May 2017) - - 02 May 2017; Brian Evans <grknight@gentoo.org> +libmysqlclient-19.ebuild, - libmysqlclient-18.ebuild, libmysqlclient-20.ebuild: - virtual/libmysqlclient: Add new version to test diff --git a/virtual/libmysqlclient/libmysqlclient-18.ebuild b/virtual/libmysqlclient/libmysqlclient-18.ebuild deleted file mode 100644 index 27ae121..0000000 --- a/virtual/libmysqlclient/libmysqlclient-18.ebuild +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit multilib-build - -DESCRIPTION="Virtual for MySQL client libraries" -HOMEPAGE="" -SRC_URI="" - -LICENSE="" -SLOT="0/18" -KEYWORDS="alpha amd64 arm ~arm64 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" -IUSE="static-libs" - -DEPEND="" -RDEPEND=" - || ( - dev-db/mysql-connector-c:${SLOT}[static-libs?,${MULTILIB_USEDEP}] - dev-db/mariadb:${SLOT}[client-libs(+),static-libs?,${MULTILIB_USEDEP}] - dev-db/mysql:${SLOT}[client-libs(+),static-libs?,${MULTILIB_USEDEP}] - dev-db/percona-server:${SLOT}[client-libs(+),static-libs?,${MULTILIB_USEDEP}] - dev-db/mariadb-galera:${SLOT}[client-libs(+),static-libs?,${MULTILIB_USEDEP}] - dev-db/mysql-cluster:${SLOT}[client-libs(+),static-libs?,${MULTILIB_USEDEP}] - )" diff --git a/virtual/libmysqlclient/libmysqlclient-20.ebuild b/virtual/libmysqlclient/libmysqlclient-20.ebuild deleted file mode 100644 index eb8330a..0000000 --- a/virtual/libmysqlclient/libmysqlclient-20.ebuild +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit multilib-build - -DESCRIPTION="Virtual for MySQL client libraries" -HOMEPAGE="" -SRC_URI="" - -LICENSE="" -SLOT="0/${PV}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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" -IUSE="static-libs" - -DEPEND="" -RDEPEND=" - || ( - dev-db/mysql-connector-c:${SLOT}[static-libs?,${MULTILIB_USEDEP}] - dev-db/mysql:${SLOT}[client-libs(+),static-libs?,${MULTILIB_USEDEP}] - dev-db/percona-server:${SLOT}[client-libs(+),static-libs?,${MULTILIB_USEDEP}] - dev-db/mysql-cluster:${SLOT}[client-libs(+),static-libs?,${MULTILIB_USEDEP}] - )" diff --git a/virtual/libmysqlclient/metadata.xml b/virtual/libmysqlclient/metadata.xml deleted file mode 100644 index 70da03d..0000000 --- a/virtual/libmysqlclient/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>mysql-bugs@gentoo.org</email> - <name>MySQL</name> - </maintainer> -</pkgmetadata> diff --git a/virtual/mysql/ChangeLog b/virtual/mysql/ChangeLog deleted file mode 100644 index 44f24b8..0000000 --- a/virtual/mysql/ChangeLog +++ /dev/null @@ -1,71 +0,0 @@ -# ChangeLog for virtual/mysql -# Copyright 1999-2017 Gentoo Foundation; Distributed under the GPL v2 -# $Id$ - - 29 May 2017; Brian Evans <grknight@gentoo.org> -mysql-5.6-r2.ebuild, - -mysql-5.6-r3.ebuild, -mysql-5.6-r4.ebuild, -mysql-5.6-r8.ebuild, - mysql-4.0.ebuild, mysql-4.1.ebuild, mysql-5.0.ebuild, mysql-5.1.ebuild, - mysql-5.2.ebuild, mysql-5.3.ebuild, mysql-5.5-r1.ebuild, mysql-5.7-r1.ebuild, - mysql-5.7-r2.ebuild, mysql-9999.ebuild: - virtual/mysql: Make repoman happy for virtual/mysql - -*mysql-5.7-r2 (29 May 2017) - - 29 May 2017; Brian Evans <grknight@gentoo.org> +mysql-5.7-r2.ebuild: - virtual/mysql: Add new revision for 5.7 compatible servers - - 09 Mar 2016; Brian Evans <grknight@gentoo.org> mysql-5.6-r8.ebuild: - virtual/mysql: Drop unused inherit; Add server required USE - -*mysql-5.6-r8 (09 Mar 2016) - - 09 Mar 2016; Brian Evans <grknight@gentoo.org> +mysql-5.6-r8.ebuild: - virtual/mysql: Revbump to fix dependencies Move virtual/libmysqlclient - PDEPEND to the providers Remove the failed client-libs USE dependency - - 30 Jul 2014; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.ebuild: - Bump header. - - 30 Jul 2014; Robin H. Johnson <robbat2@gentoo.org> mysql-5.1.ebuild: - Fix cluster versioning. - - 30 Jul 2014; Robin H. Johnson <robbat2@gentoo.org> mysql-5.6.ebuild: - Sync from main tree. - - 29 Jul 2014; Robin H. Johnson <robbat2@gentoo.org> mysql-5.5.ebuild: - Bump EAPI per main tree. - - 29 Jul 2014; Robin H. Johnson <robbat2@gentoo.org> mysql-4.0.ebuild, - mysql-4.1.ebuild, mysql-5.0.ebuild, mysql-5.1.ebuild: - Copy keywords from main tree. - -*mysql-5.7 (10 Dec 2013) - - 10 Dec 2013; Brian Evans <grknight@tuffmail.com> +mysql-5.7.ebuild: - [virtual] Add missing 5.7 virtual - -*mysql-10.0 (21 Mar 2013) - - 21 Mar 2013; Robin H. Johnson <robbat2@gentoo.org> +mysql-10.0.ebuild: - Update virtual for MariaDB, but perhaps it should be in virtual/mysql-5.6. - - 04 Mar 2013; Robin H. Johnson <robbat2@gentoo.org> -Manifest, - mysql-5.2.ebuild, mysql-5.3.ebuild: - Update headers and keywords. - - 29 Jul 2011; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> - mysql-5.2.ebuild: - [virtual/mysql-5.2] Adjust keywords for the virtual. - - 08 Jan 2011; Robin H. Johnson <robbat2@gentoo.org> mysql-5.0.ebuild, - mysql-5.1.ebuild: - mysql-community is long gone, removal time. - -*mysql-5.5 (04 Sep 2010) -*mysql-5.4 (04 Sep 2010) -*mysql-5.1 (04 Sep 2010) -*mysql-5.0 (04 Sep 2010) - - 04 Sep 2010; Robin H. Johnson <robbat2@gentoo.org> +mysql-5.0.ebuild, - +mysql-5.1.ebuild, +mysql-5.4.ebuild, +mysql-5.5.ebuild, +metadata.xml: - Add in virtual in overlay for cluster. diff --git a/virtual/mysql/metadata.xml b/virtual/mysql/metadata.xml deleted file mode 100644 index 3e5b69f..0000000 --- a/virtual/mysql/metadata.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>mysql-bugs@gentoo.org</email> - <name>MySQL</name> - </maintainer> - <use> - <flag name="embedded">Build embedded server (libmysqld)</flag> - </use> -</pkgmetadata> diff --git a/virtual/mysql/mysql-4.0.ebuild b/virtual/mysql/mysql-4.0.ebuild deleted file mode 100644 index 8a0da4e..0000000 --- a/virtual/mysql/mysql-4.0.ebuild +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -DESCRIPTION="Virtual for MySQL client or database" -HOMEPAGE="" -SRC_URI="" - -LICENSE="" -SLOT="0" -KEYWORDS="amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" -IUSE="" - -DEPEND="" -RDEPEND="|| ( - =dev-db/mysql-${PV}* -)" diff --git a/virtual/mysql/mysql-4.1.ebuild b/virtual/mysql/mysql-4.1.ebuild deleted file mode 100644 index b5b0195..0000000 --- a/virtual/mysql/mysql-4.1.ebuild +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -DESCRIPTION="Virtual for MySQL client or database" -HOMEPAGE="" -SRC_URI="" - -LICENSE="" -SLOT="0" -KEYWORDS="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" -IUSE="" - -DEPEND="" -RDEPEND="=dev-db/mysql-${PV}*" diff --git a/virtual/mysql/mysql-5.0.ebuild b/virtual/mysql/mysql-5.0.ebuild deleted file mode 100644 index 1cc67eb..0000000 --- a/virtual/mysql/mysql-5.0.ebuild +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -DESCRIPTION="Virtual for MySQL client or database" -HOMEPAGE="" -SRC_URI="" - -LICENSE="" -SLOT="0" -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" -IUSE="" - -DEPEND="" -RDEPEND="|| ( - =dev-db/mysql-${PV}* -)" diff --git a/virtual/mysql/mysql-5.1.ebuild b/virtual/mysql/mysql-5.1.ebuild deleted file mode 100644 index f136ffd..0000000 --- a/virtual/mysql/mysql-5.1.ebuild +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="2" - -DESCRIPTION="Virtual for MySQL client or database" -HOMEPAGE="" -SRC_URI="" - -LICENSE="" -SLOT="0" -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" -IUSE="embedded minimal static" - -DEPEND="" -RDEPEND="|| ( - =dev-db/mysql-${PV}*[embedded=,minimal=,static=] - =dev-db/mariadb-${PV}*[embedded=,minimal=,static=] - =dev-db/mysql-cluster-7.2*[embedded=,minimal=,static=] -)" diff --git a/virtual/mysql/mysql-5.2.ebuild b/virtual/mysql/mysql-5.2.ebuild deleted file mode 100644 index f0bbd6e..0000000 --- a/virtual/mysql/mysql-5.2.ebuild +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="2" - -DESCRIPTION="Virtual for MySQL client or database" -HOMEPAGE="" -SRC_URI="" - -LICENSE="" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" -IUSE="embedded minimal static" - -DEPEND="" -RDEPEND="|| ( - =dev-db/mariadb-${PV}*[embedded=,minimal=,static=] -)" diff --git a/virtual/mysql/mysql-5.3.ebuild b/virtual/mysql/mysql-5.3.ebuild deleted file mode 100644 index f0bbd6e..0000000 --- a/virtual/mysql/mysql-5.3.ebuild +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="2" - -DESCRIPTION="Virtual for MySQL client or database" -HOMEPAGE="" -SRC_URI="" - -LICENSE="" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" -IUSE="embedded minimal static" - -DEPEND="" -RDEPEND="|| ( - =dev-db/mariadb-${PV}*[embedded=,minimal=,static=] -)" diff --git a/virtual/mysql/mysql-5.5-r1.ebuild b/virtual/mysql/mysql-5.5-r1.ebuild deleted file mode 100644 index 8d6711d..0000000 --- a/virtual/mysql/mysql-5.5-r1.ebuild +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -DESCRIPTION="Virtual for MySQL client or database" -HOMEPAGE="" -SRC_URI="" - -LICENSE="" -SLOT="0" -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" -IUSE="embedded minimal static static-libs" - -DEPEND="" -RDEPEND="|| ( - =dev-db/mariadb-${PV}*[embedded=,minimal=,static=,static-libs=] - =dev-db/mysql-${PV}*[embedded=,minimal=,static=,static-libs=] - =dev-db/mysql-cluster-7.2*[embedded=,minimal=,static=,static-libs=] -)" diff --git a/virtual/mysql/mysql-9999.ebuild b/virtual/mysql/mysql-9999.ebuild deleted file mode 100644 index 0c307df..0000000 --- a/virtual/mysql/mysql-9999.ebuild +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DESCRIPTION="Virtual for MySQL client or database" -HOMEPAGE="" -SRC_URI="" - -LICENSE="" -SLOT="0/19" -KEYWORDS="" -IUSE="embedded static" - -DEPEND="" -RDEPEND="|| ( - =dev-db/mariadb-${PV}[embedded?,server,static?] -)" |