diff options
author | vd <vd@FreeBSD.org> | 2017-07-11 18:10:14 +0800 |
---|---|---|
committer | vd <vd@FreeBSD.org> | 2017-07-11 18:10:14 +0800 |
commit | efd596bc33007f2fdfe829d349dbf5d5c68224ff (patch) | |
tree | 1b245d1d1b8e933fb2e4edf443c297af80bc72f5 | |
parent | 8f4118bf24236ae8780a5fa165cd466ba3339708 (diff) | |
download | freebsd-ports-gnome-efd596bc33007f2fdfe829d349dbf5d5c68224ff.tar.gz freebsd-ports-gnome-efd596bc33007f2fdfe829d349dbf5d5c68224ff.tar.zst freebsd-ports-gnome-efd596bc33007f2fdfe829d349dbf5d5c68224ff.zip |
databases/mysqlwsrep57-server: New port, MySQL 5.7.x for Galera replication
38 files changed, 1200 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile index 43fe240772a6..a0505e8daad0 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -231,6 +231,7 @@ SUBDIR += mysqltcl SUBDIR += mysqltuner SUBDIR += mysqlwsrep56-server + SUBDIR += mysqlwsrep57-server SUBDIR += mytop SUBDIR += nagios-check_mongodb SUBDIR += nagios-check_postgres_replication diff --git a/databases/mysqlwsrep56-server/Makefile b/databases/mysqlwsrep56-server/Makefile index d960fda00d9f..5ab027d8a022 100644 --- a/databases/mysqlwsrep56-server/Makefile +++ b/databases/mysqlwsrep56-server/Makefile @@ -93,6 +93,8 @@ PLIST_SUB= MY_DBDIR=${MY_DBDIR} \ CONFLICTS_INSTALL= mariadb*-server-* \ mysql[0-9]*-server-* \ + mysqlwsrep57*-server-* \ + mysqlwsrep[1-489]*-server-* \ percona*-server-* USE_RC_SUBR= mysql-server diff --git a/databases/mysqlwsrep57-server/Makefile b/databases/mysqlwsrep57-server/Makefile new file mode 100644 index 000000000000..8dc15b7e8ab7 --- /dev/null +++ b/databases/mysqlwsrep57-server/Makefile @@ -0,0 +1,185 @@ +# Created by: Vasil Dimov <vd@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= mysqlwsrep +PORTVERSION?= 5.7.18 +DISTVERSIONSUFFIX?= -25.12 +CATEGORIES= databases ipv6 +PKGNAMESUFFIX= 57-server + +MAINTAINER= devel@galeracluster.com +COMMENT= MySQL database enhanced with Galera replication (server package) + +LICENSE= GPLv2 + +RUN_DEPENDS= socat:net/socat lsof:sysutils/lsof netcat:net/netcat rsync:net/rsync +LIB_DEPENDS= libevent.so:devel/libevent liblz4.so:archivers/liblz4 + +USES= bison \ + cmake:outsource,noninja \ + compiler:c++11-lib \ + compiler:c11 \ + libedit \ + mysql:57 \ + perl5 \ + shebangfix \ + ssl + +USE_PERL5= run + +MY_DBDIR= /var/db/mysql +MY_SECDIR= /var/db/mysql_secure +MY_TMPDIR= /var/db/mysql_tmpdir + +USE_GITHUB= yes +GH_ACCOUNT= codership +GH_PROJECT?= mysql-wsrep +GH_TAGNAME?= wsrep_${DISTVERSION}${DISTVERSIONSUFFIX} + +DATADIR= ${PREFIX}/share/mysql +ETCDIR= ${PREFIX}/etc/mysql + +NOT_FOR_ARCHS= aarch64 armv6 powerpc64 +NOT_FOR_ARCHS_REASON= Not supported platform + +CMAKE_ARGS+= -DINSTALL_LAYOUT=FREEBSD \ + -DINSTALL_PKGCONFIGDIR="${LOCALBASE}/libdata/pkgconfig" \ + -DINSTALL_DOCDIR="share/doc/mysql" \ + -DINSTALL_DOCREADMEDIR="share/doc/mysql" \ + -DINSTALL_INCLUDEDIR="include/mysql" \ + -DINSTALL_INFODIR="info" \ + -DINSTALL_LIBDIR="lib/mysql" \ + -DINSTALL_MANDIR="man" \ + -DINSTALL_MYSQLDATADIR="${MY_DBDIR}" \ + -DINSTALL_MYSQLKEYRINGDIR="etc/mysql/keyring" \ + -DINSTALL_MYSQLSHAREDIR="share/mysql" \ + -DINSTALL_MYSQLTESTDIR="share/mysql/tests" \ + -DINSTALL_PLUGINDIR="lib/mysql/plugin" \ + -DINSTALL_SBINDIR="libexec" \ + -DINSTALL_SCRIPTDIR="bin" \ + -DINSTALL_SECURE_FILE_PRIVDIR="${MY_SECDIR}" \ + -DINSTALL_SHAREDIR="share" \ + -DINSTALL_SUPPORTFILESDIR="share/mysql" \ + -DMYSQL_KEYRINGDIR="${ETCDIR}/keyring" \ + -DWITH_BOOST="${WRKSRC}/boost" \ + -DWITH_EDITLINE=system \ + -DWITH_LIBEVENT=system \ + -DWITH_LZ4=system \ + -DWITH_ZLIB=system \ + -DINSTALL_MYSQLTESTDIR=0 \ + -DDOWNLOAD_BOOST=1 \ + -DWITH_WSREP=1 + +SHEBANG_FILES= scripts/*.pl* scripts/*.sh scripts/wsrep_sst_* + +.ifdef USE_MYSQL +.error You have USE_MYSQL variable defined either in environment or in make(1) arguments. Please undefine it and try again. +.endif + +SUB_LIST= MY_DBDIR=${MY_DBDIR} \ + MY_SECDIR=${MY_SECDIR} \ + MY_TMPDIR=${MY_TMPDIR} + +PLIST_SUB= MY_DBDIR=${MY_DBDIR} \ + MY_SECDIR=${MY_SECDIR} \ + MY_TMPDIR=${MY_TMPDIR} + +CONFLICTS_INSTALL= mariadb*-server-* \ + mysql[0-9]*-server-* \ + mysqlwsrep56*-server-* \ + mysqlwsrep[1-489]*-server-* \ + percona*-server-* + +USE_RC_SUBR= mysql-server + +SUB_FILES= my.cnf.sample + +USERS= mysql +GROUPS= mysql + +USE_LDCONFIG+= ${PREFIX}/lib/mysql/plugin + +MMAN1= my_print_defaults.1 \ + myisam_ftdump.1 \ + myisamchk.1 \ + myisamlog.1 \ + myisampack.1 \ + mysql.server.1 \ + mysql_convert_table_format.1 \ + mysql_fix_extensions.1 \ + mysql_install_db.1 \ + mysql_plugin.1 \ + mysql_secure_installation.1 \ + mysql_setpermission.1 \ + mysql_tzinfo_to_sql.1 \ + mysql_upgrade.1 \ + mysql_zap.1 \ + mysqlbug.1 \ + mysqld_multi.1 \ + mysqld_safe.1 \ + mysqldumpslow.1 \ + mysqlhotcopy.1 \ + mysqlman.1 \ + mysqltest.1 \ + perror.1 \ + replace.1 \ + resolve_stack_dump.1 \ + resolveip.1 + +OPTIONS_GROUP= STORAGE +OPTIONS_GROUP_STORAGE= ARCHIVE BLACKHOLE EXAMPLE FEDERATED INNOBASE PARTITION PERFSCHEMA +OPTIONS_SUB= YES +STORAGE_DESC= Permissible "Storage Engines" (to compile statically into the server) +ARCHIVE_DESC= Compile "Archive Storage" statically in server +BLACKHOLE_DESC= Compile "Blackhole Storage" statically in server +EXAMPLE_DESC= Compile "Example Storage" statically in server +FEDERATED_DESC= Compile "Federated Storage" statically in server +INNOBASE_DESC= Compile "InnoDB Storage" statically in server +PARTITION_DESC= Compile "Partitioning support Storage" statically in server +PERFSCHEMA_DESC= Compile "Performance Schema Storage" statically in server + +ARCHIVE_CMAKE_ON= -DWITH_ARCHIVE_STORAGE_ENGINE=1 +BLACKHOLE_CMAKE_ON= -DWITH_BLACKHOLE_STORAGE_ENGINE=1 +EXAMPLE_CMAKE_ON= -DWITH_EXAMPLE_STORAGE_ENGINE=1 +FEDERATED_CMAKE_ON= -DWITH_FEDERATED_STORAGE_ENGINE=1 +INNOBASE_CMAKE_ON= -DWITH_INNOBASE_STORAGE_ENGINE=1 +PARTITION_CMAKE_ON= -DWITH_PARTITION_STORAGE_ENGINE=1 +PERFSCHEMA_CMAKE_ON= -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 + +OPTIONS_GROUP+= FEATURES +OPTIONS_GROUP_FEATURES= PERFSCHM +FEATURES_DESC= Default features knobs +PERFSCHM_DESC= Enable "Performance Schema" by default (High RAM usage) +OPTIONS_DEFAULT+= PERFSCHM + +PERFSCHM_SUB_LIST+= PERFSCHEMRC="" +PERFSCHM_SUB_LIST_OFF+= PERFSCHEMRC="--skip-performance-schema" +FEDERATED_SUB_LIST+= FEDER="--federated" +FEDERATED_SUB_LIST_OFF+=FEDER="" + +.include <bsd.port.pre.mk> + +.if ${SSL_DEFAULT} == base +CMAKE_ARGS+= -DWITH_SSL=system +.else +CMAKE_ARGS+= -DWITH_SSL=${OPENSSLBASE} +.endif + +post-extract: + ${RM} -fv ${WRKSRC}/sql/sql_hints.yy.cc ${WRKSRC}/sql/sql_hints.yy.h + +post-patch: + ${REINPLACE_CMD} 's/*.1/${MMAN1}/' ${WRKSRC}/man/CMakeLists.txt + +post-install: + ${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKDIR}/my.cnf.sample ${STAGEDIR}${ETCDIR}/my.cnf.sample + ${MKDIR} ${STAGEDIR}${ETCDIR}/keyring + ${MKDIR} ${STAGEDIR}${MY_SECDIR} + ${MKDIR} ${STAGEDIR}${MY_TMPDIR} + +.if ${ARCH} == "armv6" +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-config.h.cmake +.endif + +.include <bsd.port.post.mk> diff --git a/databases/mysqlwsrep57-server/distinfo b/databases/mysqlwsrep57-server/distinfo new file mode 100644 index 000000000000..cb0f78f230ea --- /dev/null +++ b/databases/mysqlwsrep57-server/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1499427835 +SHA256 (codership-mysql-wsrep-5.7.18-25.12-wsrep_5.7.18-25.12_GH0.tar.gz) = d40457fd71401d1600386482f2bc0d6258d3b853a051ba47d8b64d5a95e5efc8 +SIZE (codership-mysql-wsrep-5.7.18-25.12-wsrep_5.7.18-25.12_GH0.tar.gz) = 51679003 diff --git a/databases/mysqlwsrep57-server/files/extra-patch-config.h.cmake b/databases/mysqlwsrep57-server/files/extra-patch-config.h.cmake new file mode 100644 index 000000000000..3ac1add1b9ce --- /dev/null +++ b/databases/mysqlwsrep57-server/files/extra-patch-config.h.cmake @@ -0,0 +1,12 @@ +--- config.h.cmake.orig 2014-12-05 16:24:02 UTC ++++ config.h.cmake +@@ -151,7 +151,8 @@ + #cmakedefine HAVE_FESETROUND 1 + #cmakedefine HAVE_FINITE 1 + #cmakedefine HAVE_FP_EXCEPT 1 +-#cmakedefine HAVE_FPSETMASK 1 ++#cmakedefine HAVE_FPSETMASK 0 ++#cmakedefine HAVE_FEDISABLEEXCEPT 1 + #cmakedefine HAVE_FSEEKO 1 + #cmakedefine HAVE_FSYNC 1 + #cmakedefine HAVE_FTIME 1 diff --git a/databases/mysqlwsrep57-server/files/my.cnf.sample.in b/databases/mysqlwsrep57-server/files/my.cnf.sample.in new file mode 100644 index 000000000000..7d20c4aa558d --- /dev/null +++ b/databases/mysqlwsrep57-server/files/my.cnf.sample.in @@ -0,0 +1,64 @@ +# $FreeBSD$ + +[client] +port = 3306 +socket = /tmp/mysql.sock + +[mysql] +prompt = \u@\h [\d]>\_ +no_auto_rehash + +[mysqld] +user = mysql +port = 3306 +socket = /tmp/mysql.sock +bind-address = 127.0.0.1 +basedir = %%PREFIX%% +datadir = %%MY_DBDIR%% +tmpdir = %%MY_TMPDIR%% +slave-load-tmpdir = %%MY_TMPDIR%% +secure-file-priv = %%MY_SECDIR%% +log-bin = mysql-bin +log-output = TABLE +master-info-repository = TABLE +relay-log-info-repository = TABLE +relay-log-recovery = 1 +slow-query-log = 1 +server-id = 1 +sync_binlog = 1 +sync_relay_log = 1 +binlog_cache_size = 16M +expire_logs_days = 30 +default_password_lifetime = 0 +enforce-gtid-consistency = 1 +gtid-mode = ON +safe-user-create = 1 +lower_case_table_names = 1 +explicit-defaults-for-timestamp = 1 +myisam-recover-options = BACKUP,FORCE +open_files_limit = 32768 +table_open_cache = 16384 +table_definition_cache = 8192 +net_retry_count = 16384 +key_buffer_size = 256M +max_allowed_packet = 64M +query_cache_type = 0 +query_cache_size = 0 +long_query_time = 0.5 +innodb_buffer_pool_size = 1G +innodb_data_home_dir = %%MY_DBDIR%% +innodb_log_group_home_dir = %%MY_DBDIR%% +innodb_data_file_path = ibdata1:128M:autoextend +innodb_temp_data_file_path = ibtmp1:128M:autoextend +innodb_flush_method = O_DIRECT +innodb_log_file_size = 256M +innodb_log_buffer_size = 16M +innodb_write_io_threads = 8 +innodb_read_io_threads = 8 +innodb_autoinc_lock_mode = 2 +skip-symbolic-links + +[mysqldump] +max_allowed_packet = 256M +quote_names +quick diff --git a/databases/mysqlwsrep57-server/files/mysql-server.in b/databases/mysqlwsrep57-server/files/mysql-server.in new file mode 100644 index 000000000000..d9b654834991 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/mysql-server.in @@ -0,0 +1,108 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: mysql +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable mysql: +# mysql_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable MySQL. +# mysql_limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U mysql` +# just before mysql starts. +# mysql_dbdir (str): Default to "%%MY_DBDIR%%" +# Base database directory. +# mysql_confdir (str): Default to "%%ETCDIR%%" +# Base configuration directory. +# mysql_optfile (str): Server-specific option file. +# Set it in the rc.conf or default behaviour of +# `mysqld_safe` itself, will be picking +# ${mysql_confdir}/my.cnf if it exists. +# mysql_pidfile (str): Custum PID file path and name. +# Default to "${mysql_dbdir}/${hostname}.pid". +# mysql_args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# + +. /etc/rc.subr + +name="mysql" +rcvar=mysql_enable + +load_rc_config $name + +: ${mysql_enable="NO"} +: ${mysql_limits="NO"} +: ${mysql_dbdir="%%MY_DBDIR%%"} +: ${mysql_confdir="%%ETCDIR%%"} +if [ -f "${mysql_confdir}/my.cnf" ]; then +: ${mysql_optfile="${mysql_confdir}/my.cnf"} +elif [ -f "${mysql_dbdir}/my.cnf" ]; then +: ${mysql_optfile="${mysql_dbdir}/my.cnf"} +fi +if [ ! -z "${mysql_optfile}" ]; then +mysql_extra="--defaults-extra-file=${mysql_optfile}" +fi + +mysql_user="mysql" +mysql_limits_args="-e -U ${mysql_user}" +: ${hostname:=`/bin/hostname`} +pidfile=${mysql_pidfile:-"${mysql_dbdir}/${hostname}.pid"} +command="/usr/sbin/daemon" +command_args="-c -f %%PREFIX%%/bin/mysqld_safe ${mysql_extra} --basedir=%%PREFIX%% --datadir=${mysql_dbdir} --pid-file=${pidfile} --user=${mysql_user} ${mysql_args} %%FEDER%% %%PERFSCHEMRC%%" +procname="%%PREFIX%%/libexec/mysqld" +start_precmd="${name}_prestart" +start_postcmd="${name}_poststart" +mysql_install_db="${procname}" +mysql_install_db_args="${mysql_extra} --basedir=%%PREFIX%% --datadir=${mysql_dbdir} --user=${mysql_user} --initialize" +service_startup_timeout=900 +startup_sleep=1 +sst_progress_file=${mysql_dbdir}/sst_in_progress +extra_commands="bootstrap" +bootstrap_cmd="mysql_bootstrap" + +mysql_bootstrap() +{ + # Bootstrap the cluster: start the first node that initiates the cluster + check_startmsgs && echo "Bootstrapping cluster" + shift + command_args="${command_args} --wsrep-new-cluster" + run_rc_command ${_rc_prefix}start +} + +mysql_create_auth_tables() +{ + eval $mysql_install_db $mysql_install_db_args >/dev/null 2>/dev/null +} + +mysql_prestart() +{ + if [ ! -d "${mysql_dbdir}/mysql/." ]; then + mysql_create_auth_tables || return 1 + fi + if checkyesno mysql_limits; then + eval `/usr/bin/limits ${mysql_limits_args}` 2>/dev/null + else + return 0 + fi +} + +mysql_poststart() +{ + local timeout=${service_startup_timeout} + while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do + if test -e $sst_progress_file && [ $startup_sleep -ne 100 ]; then + check_startmsgs && echo "SST in progress, setting sleep higher" + startup_sleep=100 + fi + timeout=$(( timeout - 1 )) + sleep $startup_sleep + done + return 0 +} + +run_rc_command "$1" diff --git a/databases/mysqlwsrep57-server/files/patch-CMakeLists.txt b/databases/mysqlwsrep57-server/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..fe05a9c83935 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-CMakeLists.txt @@ -0,0 +1,40 @@ +--- CMakeLists.txt.orig 2016-03-28 18:06:12 UTC ++++ CMakeLists.txt +@@ -614,12 +614,10 @@ IF(UNIX) + ENDIF() + + IF(NOT WITHOUT_SERVER) +- ADD_SUBDIRECTORY(testclients) + ADD_SUBDIRECTORY(sql) + OPTION (WITH_EMBEDDED_SERVER "Compile MySQL with embedded server" OFF) + IF(WITH_EMBEDDED_SERVER) + ADD_SUBDIRECTORY(libmysqld) +- ADD_SUBDIRECTORY(libmysqld/examples) + ENDIF(WITH_EMBEDDED_SERVER) + ENDIF() + +@@ -628,8 +626,6 @@ ENDIF() + ADD_SUBDIRECTORY(scripts) + + IF(NOT WITHOUT_SERVER) +- ADD_SUBDIRECTORY(mysql-test) +- ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess) + ADD_SUBDIRECTORY(support-files) + IF(EXISTS ${CMAKE_SOURCE_DIR}/internal/CMakeLists.txt) + ADD_SUBDIRECTORY(internal) +@@ -684,6 +680,7 @@ ENDIF() + # + # RPM installs documentation directly from the source tree + # ++IF(FALSE) + IF(NOT INSTALL_LAYOUT MATCHES "RPM") + INSTALL(FILES COPYING LICENSE.mysql + DESTINATION ${INSTALL_DOCREADMEDIR} +@@ -706,6 +703,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM") + PATTERN "sp-imp-spec.txt" EXCLUDE + ) + ENDIF() ++ENDIF() + + INCLUDE(CPack) + diff --git a/databases/mysqlwsrep57-server/files/patch-client_CMakeLists.txt b/databases/mysqlwsrep57-server/files/patch-client_CMakeLists.txt new file mode 100644 index 000000000000..03549e41d244 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-client_CMakeLists.txt @@ -0,0 +1,78 @@ +--- client/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC ++++ client/CMakeLists.txt +@@ -32,8 +32,6 @@ INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compil + + ## Subdirectory with common client code. + ADD_SUBDIRECTORY(base) +-## Subdirectory for mysqlpump code. +-ADD_SUBDIRECTORY(dump) + + ## We will need libeay32.dll and ssleay32.dll when running client executables. + COPY_OPENSSL_DLLS(copy_openssl_client) +@@ -41,11 +39,13 @@ COPY_OPENSSL_DLLS(copy_openssl_client) + INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake) + + ADD_DEFINITIONS(${SSL_DEFINES}) ++IF(FALSE) + MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc ../sql-common/sql_string.cc) + TARGET_LINK_LIBRARIES(mysql mysqlclient) + IF(UNIX) + TARGET_LINK_LIBRARIES(mysql ${EDITLINE_LIBRARY}) + ENDIF(UNIX) ++ENDIF() + + IF(NOT WITHOUT_SERVER) + MYSQL_ADD_EXECUTABLE(mysql_upgrade +@@ -65,6 +65,7 @@ TARGET_LINK_LIBRARIES(mysqltest mysqlcli + ADD_CONVENIENCE_LIBRARY(mysqlcheck_core check/mysqlcheck_core.cc) + TARGET_LINK_LIBRARIES(mysqlcheck_core mysqlclient) + ++IF(FALSE) + MYSQL_ADD_EXECUTABLE(mysqlcheck check/mysqlcheck.cc) + TARGET_LINK_LIBRARIES(mysqlcheck mysqlcheck_core) + +@@ -77,10 +78,12 @@ TARGET_LINK_LIBRARIES(mysqlimport mysqlc + + MYSQL_ADD_EXECUTABLE(mysqlshow mysqlshow.c) + TARGET_LINK_LIBRARIES(mysqlshow mysqlclient) ++ENDIF() + + MYSQL_ADD_EXECUTABLE(mysql_plugin mysql_plugin.c) + TARGET_LINK_LIBRARIES(mysql_plugin mysqlclient) + ++IF(FALSE) + MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc) + ADD_COMPILE_FLAGS( + mysqlbinlog.cc +@@ -97,6 +100,7 @@ TARGET_LINK_LIBRARIES(mysqlslap mysqlcli + + MYSQL_ADD_EXECUTABLE(mysql_config_editor mysql_config_editor.cc) + TARGET_LINK_LIBRARIES(mysql_config_editor mysqlclient) ++ENDIF() + + MYSQL_ADD_EXECUTABLE(mysql_secure_installation mysql_secure_installation.cc) + TARGET_LINK_LIBRARIES(mysql_secure_installation mysqlclient) +@@ -112,9 +116,11 @@ IF(UNIX AND NOT WITHOUT_SERVER) + ADD_DEPENDENCIES(mysql_install_db GenBootstrapPriv GenSysSchema) + ENDIF() + ++IF(FALSE) + MYSQL_ADD_EXECUTABLE(mysql_ssl_rsa_setup mysql_ssl_rsa_setup.cc path.cc logger.cc) + TARGET_LINK_LIBRARIES(mysql_ssl_rsa_setup mysys mysys_ssl) + SET_TARGET_PROPERTIES(mysql_ssl_rsa_setup PROPERTIES LINKER_LANGUAGE CXX) ++ENDIF() + + # "WIN32" also covers 64 bit. "echo" is used in some files below "mysql-test/". + IF(WIN32) +@@ -123,11 +129,6 @@ ENDIF(WIN32) + + SET_TARGET_PROPERTIES ( + mysql_plugin +- mysqlcheck +- mysqldump +- mysqlimport +- mysqlshow +- mysqlslap + PROPERTIES HAS_CXX TRUE) + + ADD_DEFINITIONS(-DHAVE_DLOPEN) diff --git a/databases/mysqlwsrep57-server/files/patch-cmake_plugin.cmake b/databases/mysqlwsrep57-server/files/patch-cmake_plugin.cmake new file mode 100644 index 000000000000..65d4bc2b4d31 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-cmake_plugin.cmake @@ -0,0 +1,12 @@ +--- cmake/plugin.cmake.orig 2016-03-28 18:06:12 UTC ++++ cmake/plugin.cmake +@@ -237,9 +237,6 @@ MACRO(MYSQL_ADD_PLUGIN) + MYSQL_INSTALL_TARGETS(${target} + DESTINATION ${INSTALL_PLUGINDIR} + COMPONENT ${INSTALL_COMPONENT}) +- INSTALL_DEBUG_TARGET(${target} +- DESTINATION ${INSTALL_PLUGINDIR}/debug +- COMPONENT ${INSTALL_COMPONENT}) + # Add installed files to list for RPMs + FILE(APPEND ${CMAKE_BINARY_DIR}/support-files/plugins.files + "%attr(755, root, root) %{_prefix}/${INSTALL_PLUGINDIR}/${ARG_MODULE_OUTPUT_NAME}.so\n" diff --git a/databases/mysqlwsrep57-server/files/patch-cmake_ssl.cmake b/databases/mysqlwsrep57-server/files/patch-cmake_ssl.cmake new file mode 100644 index 000000000000..c9a66c421b23 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-cmake_ssl.cmake @@ -0,0 +1,15 @@ +--- cmake/ssl.cmake.orig 2016-08-12 10:55:07 UTC ++++ cmake/ssl.cmake +@@ -179,6 +179,12 @@ MACRO (MYSQL_CHECK_SSL) + OPENSSL_MAJOR_VERSION STREQUAL "1" + ) + SET(OPENSSL_FOUND TRUE) ++ ELSEIF(OPENSSL_INCLUDE_DIR AND ++ OPENSSL_LIBRARY AND ++ CRYPTO_LIBRARY AND ++ OPENSSL_MAJOR_VERSION STREQUAL "2" ++ ) ++ SET(OPENSSL_FOUND TRUE) + ELSE() + SET(OPENSSL_FOUND FALSE) + ENDIF() diff --git a/databases/mysqlwsrep57-server/files/patch-cmd-line-utils_libedit_chartype.h b/databases/mysqlwsrep57-server/files/patch-cmd-line-utils_libedit_chartype.h new file mode 100644 index 000000000000..34fbf5a45509 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-cmd-line-utils_libedit_chartype.h @@ -0,0 +1,11 @@ +--- cmd-line-utils/libedit/chartype.h.orig 2016-03-28 18:06:12 UTC ++++ cmd-line-utils/libedit/chartype.h +@@ -49,7 +49,7 @@ + TODO : Verify if FreeBSD & AIX stores ISO 10646 in wchar_t. */ + #if !defined(__NetBSD__) && !defined(__sun) \ + && !(defined(__APPLE__) && defined(__MACH__)) \ +- && !defined(__FreeBSD__) && !defined(_AIX) ++ && !defined(__FreeBSD__) && !defined(_AIX) && !defined(__DragonFly__) + #ifndef __STDC_ISO_10646__ + /* In many places it is assumed that the first 127 code points are ASCII + * compatible, so ensure wchar_t indeed does ISO 10646 and not some other diff --git a/databases/mysqlwsrep57-server/files/patch-cmd-line-utils_libedit_vi.c b/databases/mysqlwsrep57-server/files/patch-cmd-line-utils_libedit_vi.c new file mode 100644 index 000000000000..cb3e255991ab --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-cmd-line-utils_libedit_vi.c @@ -0,0 +1,20 @@ +--- cmd-line-utils/libedit/vi.c.orig 2016-03-28 18:06:12 UTC ++++ cmd-line-utils/libedit/vi.c +@@ -919,7 +919,7 @@ vi_comment_out(EditLine *el, Int c __att + * NB: posix implies that we should enter insert mode, however + * this is against historical precedent... + */ +-#if defined(__weak_reference) && !defined(__FreeBSD__) ++#if defined(__weak_reference) && !defined(__FreeBSD__) && !defined(__DragonFly__) + __weakref_visible char *my_get_alias_text(const char *) + __weak_reference(get_alias_text); + #endif +@@ -928,7 +928,7 @@ protected el_action_t + vi_alias(EditLine *el __attribute__((__unused__)), + Int c __attribute__((__unused__))) + { +-#if defined(__weak_reference) && !defined(__FreeBSD__) ++#if defined(__weak_reference) && !defined(__FreeBSD__) && !defined(__DragonFly__) + char alias_name[3]; + char *alias_text; + diff --git a/databases/mysqlwsrep57-server/files/patch-include_CMakeLists.txt b/databases/mysqlwsrep57-server/files/patch-include_CMakeLists.txt new file mode 100644 index 000000000000..cb451ddc6ac4 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-include_CMakeLists.txt @@ -0,0 +1,19 @@ +--- include/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC ++++ include/CMakeLists.txt +@@ -69,14 +69,13 @@ SET(HEADERS + ${HEADERS_GEN_CONFIGURE} + ) + ++IF(FALSE) + INSTALL(FILES + ../libbinlogevents/export/binary_log_types.h + DESTINATION ${INSTALL_INCLUDEDIR} +- COMPONENT Development) +-INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development) +-INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR}/mysql COMPONENT Development + PATTERN "*.h" + PATTERN "psi_abi*" EXCLUDE + ) ++ENDIF() + + diff --git a/databases/mysqlwsrep57-server/files/patch-include_my__compare.h b/databases/mysqlwsrep57-server/files/patch-include_my__compare.h new file mode 100644 index 000000000000..1a64142bb658 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-include_my__compare.h @@ -0,0 +1,11 @@ +--- include/my_compare.h.orig 2016-03-28 18:06:12 UTC ++++ include/my_compare.h +@@ -40,7 +40,7 @@ extern "C" { + But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH. + */ + +-#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */ ++#define HA_MAX_KEY_LENGTH 4000 /* Max length in bytes */ + #define HA_MAX_KEY_SEG 16 /* Max segments for key */ + + #define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6) diff --git a/databases/mysqlwsrep57-server/files/patch-include_my__thread__os__id.h b/databases/mysqlwsrep57-server/files/patch-include_my__thread__os__id.h new file mode 100644 index 000000000000..60b111b88a10 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-include_my__thread__os__id.h @@ -0,0 +1,15 @@ +--- include/my_thread_os_id.h.orig 2016-03-28 18:06:12 UTC ++++ include/my_thread_os_id.h +@@ -75,8 +75,12 @@ static inline my_thread_os_id_t my_threa + return pthread_getthreadid_np(); + #else + #ifdef HAVE_INTEGER_PTHREAD_SELF ++# ifdef __DragonFly__ ++ return syscall(SYS_lwp_gettid); ++# else + /* Unknown platform, fallback. */ + return pthread_self(); ++# endif + #else + /* Feature not available. */ + return 0; diff --git a/databases/mysqlwsrep57-server/files/patch-include_myisam.h b/databases/mysqlwsrep57-server/files/patch-include_myisam.h new file mode 100644 index 000000000000..0a4b795e9426 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-include_myisam.h @@ -0,0 +1,11 @@ +--- include/myisam.h.orig 2016-03-28 18:06:12 UTC ++++ include/myisam.h +@@ -45,7 +45,7 @@ extern "C" { + The following defines can be increased if necessary. + But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and MI_MAX_KEY_LENGTH. + */ +-#define MI_MAX_KEY_LENGTH 1000 /* Max length in bytes */ ++#define MI_MAX_KEY_LENGTH 4000 /* Max length in bytes */ + #define MI_MAX_KEY_SEG 16 /* Max segments for key */ + + #define MI_MAX_KEY_BUFF (MI_MAX_KEY_LENGTH+MI_MAX_KEY_SEG*6+8+8) diff --git a/databases/mysqlwsrep57-server/files/patch-libmysql_CMakeLists.txt b/databases/mysqlwsrep57-server/files/patch-libmysql_CMakeLists.txt new file mode 100644 index 000000000000..dd39fc7d8977 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-libmysql_CMakeLists.txt @@ -0,0 +1,29 @@ +--- libmysql/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC ++++ libmysql/CMakeLists.txt +@@ -215,7 +215,7 @@ IF(WIN32) + ENDIF() + + # Merge several convenience libraries into one big mysqlclient +-MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development) ++MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development NOINSTALL) + + # Visual Studio users need debug static library for debug projects + IF(MSVC) +@@ -257,7 +257,8 @@ IF(NOT DISABLE_SHARED) + # and link them together into shared library. + MERGE_LIBRARIES(libmysql SHARED ${LIBS} + EXPORTS ${CLIENT_API_FUNCTIONS} ${CLIENT_API_FUNCTIONS_UNDOCUMENTED} +- COMPONENT SharedLibraries) ++ COMPONENT SharedLibraries NOINSTALL) ++IF(FALSE) + IF(UNIX) + # libtool compatability + IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE) +@@ -313,6 +314,7 @@ ENDIF() + # to initialize api_calls[] array in api_test.c + # + SET(CLIENT_API_FUNCTION_LIST "") ++ ENDIF() + FOREACH(api ${CLIENT_API_FUNCTIONS}) + SET(CLIENT_API_FUNCTION_LIST "${CLIENT_API_FUNCTION_LIST} ${api},") + ENDFOREACH() diff --git a/databases/mysqlwsrep57-server/files/patch-libservices_CMakeLists.txt b/databases/mysqlwsrep57-server/files/patch-libservices_CMakeLists.txt new file mode 100644 index 000000000000..bfd6118b5648 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-libservices_CMakeLists.txt @@ -0,0 +1,9 @@ +--- libservices/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC ++++ libservices/CMakeLists.txt +@@ -35,4 +35,6 @@ SET(MYSQLSERVICES_SOURCES + mysql_keyring_service.c) + + ADD_CONVENIENCE_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES}) ++IF(FALSE) + INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development) ++ENDIF() diff --git a/databases/mysqlwsrep57-server/files/patch-man_CMakeLists.txt b/databases/mysqlwsrep57-server/files/patch-man_CMakeLists.txt new file mode 100644 index 000000000000..b771ae6214f0 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-man_CMakeLists.txt @@ -0,0 +1,11 @@ +--- man/CMakeLists.txt.orig 2015-11-29 19:16:24 UTC ++++ man/CMakeLists.txt +@@ -15,8 +15,6 @@ + + # Copy man pages + FILE(GLOB MAN1_FILES *.1) +-FILE(GLOB MAN1_EXCLUDE make_win_bin_dist.1) +-FILE(GLOB MAN1_NDB ndb*.1) + FILE(GLOB MAN8_FILES *.8) + FILE(GLOB MAN8_NDB ndb*.8) + IF(MAN1_FILES) diff --git a/databases/mysqlwsrep57-server/files/patch-mysys__ssl_my__default.cc b/databases/mysqlwsrep57-server/files/patch-mysys__ssl_my__default.cc new file mode 100644 index 000000000000..ea05679341fa --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-mysys__ssl_my__default.cc @@ -0,0 +1,61 @@ +--- mysys_ssl/my_default.cc.orig 2016-08-25 11:52:06 UTC ++++ mysys_ssl/my_default.cc +@@ -114,7 +114,7 @@ static my_bool defaults_already_read= FA + + /* Which directories are searched for options (and in which order) */ + +-#define MAX_DEFAULT_DIRS 6 ++#define MAX_DEFAULT_DIRS 7 + #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */ + static const char **default_directories = NULL; + +@@ -914,6 +914,14 @@ static int search_default_file_with_ext( + return 1; /* Ignore wrong files */ + } + ++ if (strstr(name, "/etc") == name) ++ { ++ fprintf(stderr, ++ "error: Config file %s in invalid location, please move to or merge with /usr/local%s\n", ++ name,name); ++ goto err; ++ } ++ + while (mysql_file_getline(buff, sizeof(buff) - 1, fp, is_login_file)) + { + line++; +@@ -1252,7 +1260,8 @@ void my_print_default_files(const char * + end[(strlen(end)-1)] = ' '; + else + strxmov(end, conf_file, *ext , " ", NullS); +- fputs(name, stdout); ++ if (strstr(name, "/etc") != name) ++ fputs(name, stdout); + } + } + } +@@ -1411,13 +1420,8 @@ static const char **init_default_directo + + #else + +- errors += add_directory(alloc, "/etc/", dirs); +- errors += add_directory(alloc, "/etc/mysql/", dirs); +- +-#if defined(DEFAULT_SYSCONFDIR) +- if (DEFAULT_SYSCONFDIR[0]) +- errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs); +-#endif /* DEFAULT_SYSCONFDIR */ ++ errors += add_directory(alloc, "/usr/local/etc/", dirs); ++ errors += add_directory(alloc, "/usr/local/etc/mysql/", dirs); + + #endif + +@@ -1488,7 +1492,7 @@ int check_file_permissions(const char *f + MY_STAT stat_info; + + if (!my_stat(file_name,&stat_info,MYF(0))) +- return 1; ++ return 0; + /* + Ignore .mylogin.cnf file if not exclusively readable/writable + by current user. diff --git a/databases/mysqlwsrep57-server/files/patch-plugin_password__validation_validate__password.cc b/databases/mysqlwsrep57-server/files/patch-plugin_password__validation_validate__password.cc new file mode 100644 index 000000000000..47fc0dc6b7e5 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-plugin_password__validation_validate__password.cc @@ -0,0 +1,11 @@ +--- plugin/password_validation/validate_password.cc.orig 2016-03-28 18:06:12 UTC ++++ plugin/password_validation/validate_password.cc +@@ -18,6 +18,8 @@ + #include <mysql/plugin_validate_password.h> + #include <mysql/service_my_plugin_log.h> + #include <mysql/service_mysql_string.h> ++/* solve clash between libc++ bitset::test() and test macro from my_global.h */ ++#undef test + #include <set> + #include <iostream> + #include <fstream> diff --git a/databases/mysqlwsrep57-server/files/patch-rapid_plugin_x_CMakeLists.txt b/databases/mysqlwsrep57-server/files/patch-rapid_plugin_x_CMakeLists.txt new file mode 100644 index 000000000000..19823553d9c0 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-rapid_plugin_x_CMakeLists.txt @@ -0,0 +1,20 @@ +--- rapid/plugin/x/CMakeLists.txt.orig 2017-03-18 07:45:14 UTC ++++ rapid/plugin/x/CMakeLists.txt +@@ -92,14 +92,14 @@ ELSE() + ${CMAKE_SOURCE_DIR}/include #temporary + ${CMAKE_CURRENT_SOURCE_DIR}/include/mysql + ${CMAKE_CURRENT_BINARY_DIR}/generated +- ${SSL_INCLUDE_DIRS} +- ${ZLIB_INCLUDE_DIR} ++ ${BOOST_INCLUDE_DIR} + ) + + INCLUDE_DIRECTORIES(SYSTEM +- ${BOOST_INCLUDE_DIR} + ${PROTOBUF_INCLUDE_DIRS} + ${LIBEVENT_INCLUDE_DIR} ++ ${SSL_INCLUDE_DIRS} ++ ${ZLIB_INCLUDE_DIR} + ) + + IF(XPLUGIN_NO_LITE_PROTOBUF) diff --git a/databases/mysqlwsrep57-server/files/patch-rapid_plugin_x_mysqlx__configure.cmake b/databases/mysqlwsrep57-server/files/patch-rapid_plugin_x_mysqlx__configure.cmake new file mode 100644 index 000000000000..52828f00f631 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-rapid_plugin_x_mysqlx__configure.cmake @@ -0,0 +1,15 @@ +--- rapid/plugin/x/mysqlx_configure.cmake.orig 2016-09-14 15:25:26 UTC ++++ rapid/plugin/x/mysqlx_configure.cmake +@@ -29,6 +29,7 @@ CONFIGURE_FILE(${MYSQLX_PROJECT_DIR}/src + CONFIGURE_FILE(${MYSQLX_PROJECT_DIR}/src/mysqlx_version.h.in + ${CMAKE_CURRENT_BINARY_DIR}/generated/mysqlx_version.h ) + ++IF(FALSE) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/generated/mysqlx_error.h + DESTINATION ${INSTALL_INCLUDEDIR} + COMPONENT Developement) +@@ -36,3 +37,4 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/generated/mysqlx_version.h + DESTINATION ${INSTALL_INCLUDEDIR} + COMPONENT Developement) ++ENDIF() diff --git a/databases/mysqlwsrep57-server/files/patch-rapid_unittest_gunit_xplugin_CMakeLists.txt b/databases/mysqlwsrep57-server/files/patch-rapid_unittest_gunit_xplugin_CMakeLists.txt new file mode 100644 index 000000000000..d968a7daa022 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-rapid_unittest_gunit_xplugin_CMakeLists.txt @@ -0,0 +1,18 @@ +--- rapid/unittest/gunit/xplugin/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC ++++ rapid/unittest/gunit/xplugin/CMakeLists.txt +@@ -65,7 +65,6 @@ ENDIF() + ADD_DEFINITIONS(${GMOCK_CFLAGS} -DBOOST_ALL_NO_LIB -DBOOST_NO_AUTO_PTR -DUSE_MYSQLX_FULL_PROTO) + + INCLUDE_DIRECTORIES(SYSTEM +- ${BOOST_INCLUDE_DIR} + ${PROTOBUF_INCLUDE_DIRS} + ${SSL_INCLUDE_DIRS} + ${LIBEVENT_INCLUDE_DIR} +@@ -75,6 +74,7 @@ INCLUDE_DIRECTORIES(SYSTEM + ) + + INCLUDE_DIRECTORIES( ++ ${BOOST_INCLUDE_DIR} + ${CMAKE_SOURCE_DIR}/testing/include + ${PROJECT_SOURCE_DIR}/rapid/plugin/x/ngs/include + ${PROJECT_SOURCE_DIR}/rapid/plugin/x/ngs/include/ngs diff --git a/databases/mysqlwsrep57-server/files/patch-scripts_CMakeLists.txt b/databases/mysqlwsrep57-server/files/patch-scripts_CMakeLists.txt new file mode 100644 index 000000000000..b8481a0aed4e --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-scripts_CMakeLists.txt @@ -0,0 +1,36 @@ +--- scripts/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC ++++ scripts/CMakeLists.txt +@@ -347,6 +347,8 @@ MACRO(EXTRACT_LINK_LIBRARIES target var) + GET_FILENAME_COMPONENT(lib "${lib}" NAME_WE) + STRING(REGEX REPLACE "^lib" "" lib "${lib}") + SET(${var} "${${var}}-l${lib} " ) ++ ELSEIF(lib STREQUAL "-pthread") ++ SET(${var} "${${var}}-pthread " ) + ELSE() + SET(${var} "${${var}}-l${lib} " ) + ENDIF() +@@ -430,14 +432,13 @@ ELSE() + # On Unix, most of the files end up in the bin directory + SET(mysql_config_COMPONENT COMPONENT Development) + ++ + IF(WITH_SYSTEMD) + SET(BIN_SCRIPTS +- mysql_config + mysqldumpslow + ) + ELSE() + SET(BIN_SCRIPTS +- mysql_config + mysqldumpslow + mysqld_multi + mysqld_safe +@@ -471,7 +472,7 @@ ELSE() + FOREACH(file ${BIN_SCRIPTS}) + IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh +- ${CMAKE_CURRENT_BINARY_DIR}/${file} ESCAPE_QUOTES @ONLY) ++ ${CMAKE_CURRENT_BINARY_DIR}/${file} @ONLY) + ELSEIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file} + ${CMAKE_CURRENT_BINARY_DIR}/${file} COPYONLY) diff --git a/databases/mysqlwsrep57-server/files/patch-sql_CMakeLists.txt b/databases/mysqlwsrep57-server/files/patch-sql_CMakeLists.txt new file mode 100644 index 000000000000..9c403bb74fc8 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-sql_CMakeLists.txt @@ -0,0 +1,11 @@ +--- sql/CMakeLists.txt.orig 2017-06-12 10:31:29 UTC ++++ sql/CMakeLists.txt +@@ -28,6 +28,8 @@ INCLUDE_DIRECTORIES( + ${ZLIB_INCLUDE_DIR} + ${SSL_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/sql ++ ${CMAKE_BINARY_DIR}/include ++ ${CMAKE_BINARY_DIR} + ${WSREP_INCLUDES} + ${LZ4_INCLUDE_DIR} + ) diff --git a/databases/mysqlwsrep57-server/files/patch-sql_conn__handler_socket__connection.cc b/databases/mysqlwsrep57-server/files/patch-sql_conn__handler_socket__connection.cc new file mode 100644 index 000000000000..2b5e80a44574 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-sql_conn__handler_socket__connection.cc @@ -0,0 +1,32 @@ +--- sql/conn_handler/socket_connection.cc.orig 2017-03-18 07:45:14 UTC ++++ sql/conn_handler/socket_connection.cc +@@ -942,22 +942,25 @@ Channel_info* Mysqld_socket_listener::li + signal(SIGCHLD, SIG_DFL); + request_init(&req, RQ_DAEMON, m_libwrap_name, RQ_FILE, + mysql_socket_getfd(connect_sock), NULL); +- fromhost(&req); ++ void (*my_fromhost) (void *) = (void (*)(void *)) fromhost; ++ my_fromhost(&req); + +- if (!hosts_access(&req)) ++ int (*my_hosts_access) (void *) = (int (*) (void *)) hosts_access; ++ if (!my_hosts_access(&req)) + { + /* + This may be stupid but refuse() includes an exit(0) + which we surely don't want... + clean_exit() - same stupid thing ... + */ ++ char *(*my_eval_client) (void *) = (char *(*) (void *)) eval_client; + syslog(LOG_AUTH | m_deny_severity, +- "refused connect from %s", eval_client(&req)); ++ "refused connect from %s", my_eval_client(&req)); + + #ifdef HAVE_LIBWRAP_PROTOTYPES + // Some distros have patched tcpd.h to have proper prototypes + if (req.sink) +- (req.sink)(req.fd); ++ ((void (*)(int)) (req.sink))(req.fd); + #else + // Some distros have not patched tcpd.h + if (req.sink) diff --git a/databases/mysqlwsrep57-server/files/patch-sql_sql__view.cc b/databases/mysqlwsrep57-server/files/patch-sql_sql__view.cc new file mode 100644 index 000000000000..acafed2aedef --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-sql_sql__view.cc @@ -0,0 +1,63 @@ +--- sql/sql_view.cc.orig 2016-03-28 18:06:12 UTC ++++ sql/sql_view.cc +@@ -773,46 +773,46 @@ static const int required_view_parameter + */ + static File_option view_parameters[]= + {{{ C_STRING_WITH_LEN("query")}, +- my_offsetof(TABLE_LIST, select_stmt), ++ static_cast<int>(my_offsetof(TABLE_LIST, select_stmt)), + FILE_OPTIONS_ESTRING}, + {{ C_STRING_WITH_LEN("md5")}, +- my_offsetof(TABLE_LIST, md5), ++ static_cast<int>(my_offsetof(TABLE_LIST, md5)), + FILE_OPTIONS_STRING}, + {{ C_STRING_WITH_LEN("updatable")}, +- my_offsetof(TABLE_LIST, updatable_view), ++ static_cast<int>(my_offsetof(TABLE_LIST, updatable_view)), + FILE_OPTIONS_ULONGLONG}, + {{ C_STRING_WITH_LEN("algorithm")}, +- my_offsetof(TABLE_LIST, algorithm), ++ static_cast<int>(my_offsetof(TABLE_LIST, algorithm)), + FILE_OPTIONS_ULONGLONG}, + {{ C_STRING_WITH_LEN("definer_user")}, +- my_offsetof(TABLE_LIST, definer.user), ++ static_cast<int>(my_offsetof(TABLE_LIST, definer.user)), + FILE_OPTIONS_STRING}, + {{ C_STRING_WITH_LEN("definer_host")}, +- my_offsetof(TABLE_LIST, definer.host), ++ static_cast<int>(my_offsetof(TABLE_LIST, definer.host)), + FILE_OPTIONS_STRING}, + {{ C_STRING_WITH_LEN("suid")}, +- my_offsetof(TABLE_LIST, view_suid), ++ static_cast<int>(my_offsetof(TABLE_LIST, view_suid)), + FILE_OPTIONS_ULONGLONG}, + {{ C_STRING_WITH_LEN("with_check_option")}, +- my_offsetof(TABLE_LIST, with_check), ++ static_cast<int>(my_offsetof(TABLE_LIST, with_check)), + FILE_OPTIONS_ULONGLONG}, + {{ C_STRING_WITH_LEN("timestamp")}, +- my_offsetof(TABLE_LIST, timestamp), ++ static_cast<int>(my_offsetof(TABLE_LIST, timestamp)), + FILE_OPTIONS_TIMESTAMP}, + {{ C_STRING_WITH_LEN("create-version")}, +- my_offsetof(TABLE_LIST, file_version), ++ static_cast<int>(my_offsetof(TABLE_LIST, file_version)), + FILE_OPTIONS_ULONGLONG}, + {{ C_STRING_WITH_LEN("source")}, +- my_offsetof(TABLE_LIST, source), ++ static_cast<int>(my_offsetof(TABLE_LIST, source)), + FILE_OPTIONS_ESTRING}, + {{(char*) STRING_WITH_LEN("client_cs_name")}, +- my_offsetof(TABLE_LIST, view_client_cs_name), ++ static_cast<int>(my_offsetof(TABLE_LIST, view_client_cs_name)), + FILE_OPTIONS_STRING}, + {{(char*) STRING_WITH_LEN("connection_cl_name")}, +- my_offsetof(TABLE_LIST, view_connection_cl_name), ++ static_cast<int>(my_offsetof(TABLE_LIST, view_connection_cl_name)), + FILE_OPTIONS_STRING}, + {{(char*) STRING_WITH_LEN("view_body_utf8")}, +- my_offsetof(TABLE_LIST, view_body_utf8), ++ static_cast<int>(my_offsetof(TABLE_LIST, view_body_utf8)), + FILE_OPTIONS_ESTRING}, + {{NullS, 0}, 0, + FILE_OPTIONS_STRING} diff --git a/databases/mysqlwsrep57-server/files/patch-sql_sys__vars.cc b/databases/mysqlwsrep57-server/files/patch-sql_sys__vars.cc new file mode 100644 index 000000000000..e21d62430970 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-sql_sys__vars.cc @@ -0,0 +1,38 @@ +--- sql/sys_vars.cc.orig 2016-03-28 18:06:12 UTC ++++ sql/sys_vars.cc +@@ -1734,7 +1734,7 @@ static Sys_var_ulong Sys_interactive_tim + "connection before closing it", + SESSION_VAR(net_interactive_timeout), + CMD_LINE(REQUIRED_ARG), +- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1)); ++ VALID_RANGE(1, INT_MAX32/1000), DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1)); + + static Sys_var_ulong Sys_join_buffer_size( + "join_buffer_size", +@@ -2552,7 +2552,7 @@ static Sys_var_ulong Sys_net_read_timeou + "Number of seconds to wait for more data from a connection before " + "aborting the read", + SESSION_VAR(net_read_timeout), CMD_LINE(REQUIRED_ARG), +- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_READ_TIMEOUT), BLOCK_SIZE(1), ++ VALID_RANGE(1, INT_MAX32/1000), DEFAULT(NET_READ_TIMEOUT), BLOCK_SIZE(1), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(fix_net_read_timeout)); + +@@ -2568,7 +2568,7 @@ static Sys_var_ulong Sys_net_write_timeo + "Number of seconds to wait for a block to be written to a connection " + "before aborting the write", + SESSION_VAR(net_write_timeout), CMD_LINE(REQUIRED_ARG), +- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_WRITE_TIMEOUT), BLOCK_SIZE(1), ++ VALID_RANGE(1, INT_MAX32/1000), DEFAULT(NET_WRITE_TIMEOUT), BLOCK_SIZE(1), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(fix_net_write_timeout)); + +@@ -4083,7 +4083,7 @@ static Sys_var_ulong Sys_net_wait_timeou + "The number of seconds the server waits for activity on a " + "connection before closing it", + SESSION_VAR(net_wait_timeout), CMD_LINE(REQUIRED_ARG), +- VALID_RANGE(1, IF_WIN(INT_MAX32/1000, LONG_TIMEOUT)), ++ VALID_RANGE(1, INT_MAX32/1000), + DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1)); + + static Sys_var_plugin Sys_default_storage_engine( diff --git a/databases/mysqlwsrep57-server/files/patch-sql_wsrep__utils.cc b/databases/mysqlwsrep57-server/files/patch-sql_wsrep__utils.cc new file mode 100644 index 000000000000..3f64304a02db --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-sql_wsrep__utils.cc @@ -0,0 +1,10 @@ +--- sql/wsrep_utils.cc.orig 2017-06-12 10:31:29 UTC ++++ sql/wsrep_utils.cc +@@ -26,6 +26,7 @@ + #include <sql_class.h> + #include <socket_connection.h> + ++#include <signal.h> + #include <spawn.h> // posix_spawn() + #include <unistd.h> // pipe() + #include <errno.h> // errno diff --git a/databases/mysqlwsrep57-server/files/patch-storage_innobase_include_srv0mon.h b/databases/mysqlwsrep57-server/files/patch-storage_innobase_include_srv0mon.h new file mode 100644 index 000000000000..8abbfcb04a31 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-storage_innobase_include_srv0mon.h @@ -0,0 +1,13 @@ +--- storage/innobase/include/srv0mon.h.orig 2016-03-28 18:06:12 UTC ++++ storage/innobase/include/srv0mon.h +@@ -34,6 +34,10 @@ Created 12/15/2009 Jimmy Yang + /* Required for FreeBSD so that INT64_MAX is defined. */ + #define __STDC_LIMIT_MACROS + #endif /* __STDC_LIMIT_MACROS */ ++#ifdef __DragonFly__ ++/* The hack above doen't work for dragonfly, stdint.h already imported */ ++#include <machine/int_limits.h> ++#endif + + #include <stdint.h> + diff --git a/databases/mysqlwsrep57-server/files/patch-storage_myisam_mi__dynrec.c b/databases/mysqlwsrep57-server/files/patch-storage_myisam_mi__dynrec.c new file mode 100644 index 000000000000..282cffdbcbc5 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-storage_myisam_mi__dynrec.c @@ -0,0 +1,23 @@ +--- storage/myisam/mi_dynrec.c.orig 2016-03-28 18:06:12 UTC ++++ storage/myisam/mi_dynrec.c +@@ -65,18 +65,13 @@ my_bool mi_dynmap_file(MI_INFO *info, my + DBUG_RETURN(1); + } + /* +- I wonder if it is good to use MAP_NORESERVE. From the Linux man page: +- MAP_NORESERVE +- Do not reserve swap space for this mapping. When swap space is +- reserved, one has the guarantee that it is possible to modify the +- mapping. When swap space is not reserved one might get SIGSEGV +- upon a write if no physical memory is available. ++ MAP_NORESERVE is unimplemented in FreeBSD + */ + info->s->file_map= (uchar*) + my_mmap(0, (size_t) size, + info->s->mode==O_RDONLY ? PROT_READ : + PROT_READ | PROT_WRITE, +- MAP_SHARED | MAP_NORESERVE, ++ MAP_SHARED, + info->dfile, 0L); + if (info->s->file_map == (uchar*) MAP_FAILED) + { diff --git a/databases/mysqlwsrep57-server/files/patch-support-files_CMakeLists.txt b/databases/mysqlwsrep57-server/files/patch-support-files_CMakeLists.txt new file mode 100644 index 000000000000..1d1999212ed5 --- /dev/null +++ b/databases/mysqlwsrep57-server/files/patch-support-files_CMakeLists.txt @@ -0,0 +1,12 @@ +--- support-files/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC ++++ support-files/CMakeLists.txt +@@ -69,7 +69,9 @@ IF(UNIX) + INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles) + ENDIF() + ++IF(FALSE) + INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development) ++ENDIF() + + SET(bindir ${prefix}/${INSTALL_BINDIR}) + SET(sbindir ${prefix}/${INSTALL_SBINDIR}) diff --git a/databases/mysqlwsrep57-server/pkg-comment b/databases/mysqlwsrep57-server/pkg-comment new file mode 100644 index 000000000000..83be19f3bb38 --- /dev/null +++ b/databases/mysqlwsrep57-server/pkg-comment @@ -0,0 +1 @@ +A version of MySQL modified for Galera replication (server package) diff --git a/databases/mysqlwsrep57-server/pkg-descr b/databases/mysqlwsrep57-server/pkg-descr new file mode 100644 index 000000000000..707e6108346f --- /dev/null +++ b/databases/mysqlwsrep57-server/pkg-descr @@ -0,0 +1,7 @@ +MySQL is a very fast, multi-threaded, multi-user and robust SQL +(Structured Query Language) database server. + +Modified to support replication using the Galera library. + +WWW: http://www.mysql.com/ +WWW: http://www.galeracluster.com/ diff --git a/databases/mysqlwsrep57-server/pkg-message b/databases/mysqlwsrep57-server/pkg-message new file mode 100644 index 000000000000..71d00aa80526 --- /dev/null +++ b/databases/mysqlwsrep57-server/pkg-message @@ -0,0 +1,6 @@ +************************************************************************ + +Remember to run mysql_upgrade the first time you start the MySQL server +after an upgrade from an earlier version. + +************************************************************************ diff --git a/databases/mysqlwsrep57-server/pkg-plist b/databases/mysqlwsrep57-server/pkg-plist new file mode 100644 index 000000000000..35f6e6f55efe --- /dev/null +++ b/databases/mysqlwsrep57-server/pkg-plist @@ -0,0 +1,167 @@ +bin/innochecksum +bin/lz4_decompress +bin/my_print_defaults +bin/myisam_ftdump +bin/myisamchk +bin/myisamlog +bin/myisampack +bin/mysql_install_db +bin/mysql_plugin +bin/mysql_secure_installation +bin/mysql_tzinfo_to_sql +bin/mysql_upgrade +bin/mysqld_multi +bin/mysqld_safe +bin/mysqldumpslow +bin/mysqltest +bin/mysqlxtest +bin/perror +bin/replace +bin/resolve_stack_dump +bin/resolveip +bin/zlib_decompress +bin/wsrep_sst_common +bin/wsrep_sst_mysqldump +bin/wsrep_sst_rsync +bin/wsrep_sst_xtrabackup +bin/wsrep_sst_xtrabackup-v2 +lib/mysql/plugin/adt_null.so +lib/mysql/plugin/auth.so +lib/mysql/plugin/auth_test_plugin.so +lib/mysql/plugin/connection_control.so +lib/mysql/plugin/daemon_example.ini +lib/mysql/plugin/group_replication.so +%%NO_EXAMPLE%%lib/mysql/plugin/ha_example.so +lib/mysql/plugin/keyring_file.so +lib/mysql/plugin/libdaemon_example.so +lib/mysql/plugin/libtest_framework.so +lib/mysql/plugin/libtest_services.so +lib/mysql/plugin/libtest_services_threaded.so +lib/mysql/plugin/libtest_session_detach.so +lib/mysql/plugin/libtest_session_in_thd.so +lib/mysql/plugin/libtest_session_info.so +lib/mysql/plugin/libtest_sql_2_sessions.so +lib/mysql/plugin/libtest_sql_all_col_types.so +lib/mysql/plugin/libtest_sql_cmds_1.so +lib/mysql/plugin/libtest_sql_commit.so +lib/mysql/plugin/libtest_sql_complex.so +lib/mysql/plugin/libtest_sql_errors.so +lib/mysql/plugin/libtest_sql_lock.so +lib/mysql/plugin/libtest_sql_processlist.so +lib/mysql/plugin/libtest_sql_replication.so +lib/mysql/plugin/libtest_sql_shutdown.so +lib/mysql/plugin/libtest_sql_sqlmode.so +lib/mysql/plugin/libtest_sql_stored_procedures_functions.so +lib/mysql/plugin/libtest_sql_views_triggers.so +lib/mysql/plugin/libtest_x_sessions_deinit.so +lib/mysql/plugin/libtest_x_sessions_init.so +lib/mysql/plugin/locking_service.so +lib/mysql/plugin/mypluglib.so +lib/mysql/plugin/mysql_no_login.so +lib/mysql/plugin/mysqlx.so +lib/mysql/plugin/qa_auth_client.so +lib/mysql/plugin/qa_auth_interface.so +lib/mysql/plugin/qa_auth_server.so +lib/mysql/plugin/replication_observers_example_plugin.so +lib/mysql/plugin/rewrite_example.so +lib/mysql/plugin/rewriter.so +lib/mysql/plugin/semisync_master.so +lib/mysql/plugin/semisync_slave.so +lib/mysql/plugin/test_security_context.so +lib/mysql/plugin/keyring_udf.so +lib/mysql/plugin/test_udf_services.so +lib/mysql/plugin/validate_password.so +lib/mysql/plugin/version_token.so +libdata/pkgconfig/LIBMYSQL_OS_OUTPUT_NAME-NOTFOUND.pc +libexec/mysqld +man/man1/my_print_defaults.1.gz +man/man1/myisam_ftdump.1.gz +man/man1/myisamchk.1.gz +man/man1/myisamlog.1.gz +man/man1/myisampack.1.gz +man/man1/mysql.server.1.gz +man/man1/mysql_install_db.1.gz +man/man1/mysql_plugin.1.gz +man/man1/mysql_secure_installation.1.gz +man/man1/mysql_tzinfo_to_sql.1.gz +man/man1/mysql_upgrade.1.gz +man/man1/mysqld_multi.1.gz +man/man1/mysqld_safe.1.gz +man/man1/mysqldumpslow.1.gz +man/man1/mysqlman.1.gz +man/man1/mysqltest.1.gz +man/man1/perror.1.gz +man/man1/replace.1.gz +man/man1/resolve_stack_dump.1.gz +man/man1/resolveip.1.gz +man/man8/mysqld.8.gz +%%DATADIR%%/bulgarian/errmsg.sys +%%DATADIR%%/charsets/Index.xml +%%DATADIR%%/charsets/README +%%DATADIR%%/charsets/armscii8.xml +%%DATADIR%%/charsets/ascii.xml +%%DATADIR%%/charsets/cp1250.xml +%%DATADIR%%/charsets/cp1251.xml +%%DATADIR%%/charsets/cp1256.xml +%%DATADIR%%/charsets/cp1257.xml +%%DATADIR%%/charsets/cp850.xml +%%DATADIR%%/charsets/cp852.xml +%%DATADIR%%/charsets/cp866.xml +%%DATADIR%%/charsets/dec8.xml +%%DATADIR%%/charsets/geostd8.xml +%%DATADIR%%/charsets/greek.xml +%%DATADIR%%/charsets/hebrew.xml +%%DATADIR%%/charsets/hp8.xml +%%DATADIR%%/charsets/keybcs2.xml +%%DATADIR%%/charsets/koi8r.xml +%%DATADIR%%/charsets/koi8u.xml +%%DATADIR%%/charsets/latin1.xml +%%DATADIR%%/charsets/latin2.xml +%%DATADIR%%/charsets/latin5.xml +%%DATADIR%%/charsets/latin7.xml +%%DATADIR%%/charsets/macce.xml +%%DATADIR%%/charsets/macroman.xml +%%DATADIR%%/charsets/swe7.xml +%%DATADIR%%/czech/errmsg.sys +%%DATADIR%%/danish/errmsg.sys +%%DATADIR%%/dictionary.txt +%%DATADIR%%/dutch/errmsg.sys +%%DATADIR%%/english/errmsg.sys +%%DATADIR%%/errmsg-utf8.txt +%%DATADIR%%/estonian/errmsg.sys +%%DATADIR%%/fill_help_tables.sql +%%DATADIR%%/french/errmsg.sys +%%DATADIR%%/german/errmsg.sys +%%DATADIR%%/greek/errmsg.sys +%%DATADIR%%/hungarian/errmsg.sys +%%DATADIR%%/innodb_memcached_config.sql +%%DATADIR%%/install_rewriter.sql +%%DATADIR%%/italian/errmsg.sys +%%DATADIR%%/japanese/errmsg.sys +%%DATADIR%%/korean/errmsg.sys +%%DATADIR%%/magic +%%DATADIR%%/mysql-log-rotate +%%DATADIR%%/mysql.server +%%DATADIR%%/mysql_security_commands.sql +%%DATADIR%%/mysql_sys_schema.sql +%%DATADIR%%/mysql_system_tables.sql +%%DATADIR%%/mysql_system_tables_data.sql +%%DATADIR%%/mysql_test_data_timezone.sql +%%DATADIR%%/mysqld_multi.server +%%DATADIR%%/norwegian-ny/errmsg.sys +%%DATADIR%%/norwegian/errmsg.sys +%%DATADIR%%/polish/errmsg.sys +%%DATADIR%%/portuguese/errmsg.sys +%%DATADIR%%/romanian/errmsg.sys +%%DATADIR%%/russian/errmsg.sys +%%DATADIR%%/serbian/errmsg.sys +%%DATADIR%%/slovak/errmsg.sys +%%DATADIR%%/spanish/errmsg.sys +%%DATADIR%%/swedish/errmsg.sys +%%DATADIR%%/ukrainian/errmsg.sys +%%DATADIR%%/uninstall_rewriter.sql +%%DATADIR%%/wsrep_notify +@sample(root,wheel,0644) %%ETCDIR%%/my.cnf.sample +@dir(mysql,mysql,0750) %%ETCDIR%%/keyring +@dir(mysql,mysql,0750) %%MY_SECDIR%% +@dir(mysql,mysql,0750) %%MY_TMPDIR%% |