Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jul 2017 10:10:14 +0000 (UTC)
From:      Vasil Dimov <vd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r445488 - in head/databases: . mysqlwsrep56-server mysqlwsrep57-server mysqlwsrep57-server/files
Message-ID:  <201707111010.v6BAAETq011793@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vd
Date: Tue Jul 11 10:10:14 2017
New Revision: 445488
URL: https://svnweb.freebsd.org/changeset/ports/445488

Log:
  databases/mysqlwsrep57-server: New port, MySQL 5.7.x for Galera replication

Added:
  head/databases/mysqlwsrep57-server/
  head/databases/mysqlwsrep57-server/Makefile   (contents, props changed)
  head/databases/mysqlwsrep57-server/distinfo   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/
  head/databases/mysqlwsrep57-server/files/extra-patch-config.h.cmake   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/my.cnf.sample.in   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/mysql-server.in   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-CMakeLists.txt   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-client_CMakeLists.txt   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-cmake_plugin.cmake   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-cmake_ssl.cmake   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-cmd-line-utils_libedit_chartype.h   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-cmd-line-utils_libedit_vi.c   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-include_CMakeLists.txt   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-include_my__compare.h   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-include_my__thread__os__id.h   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-include_myisam.h   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-libmysql_CMakeLists.txt   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-libservices_CMakeLists.txt   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-man_CMakeLists.txt   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-mysys__ssl_my__default.cc   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-plugin_password__validation_validate__password.cc   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-rapid_plugin_x_CMakeLists.txt   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-rapid_plugin_x_mysqlx__configure.cmake   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-rapid_unittest_gunit_xplugin_CMakeLists.txt   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-scripts_CMakeLists.txt   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-sql_CMakeLists.txt   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-sql_conn__handler_socket__connection.cc   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-sql_sql__view.cc   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-sql_sys__vars.cc   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-sql_wsrep__utils.cc   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-storage_innobase_include_srv0mon.h   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-storage_myisam_mi__dynrec.c   (contents, props changed)
  head/databases/mysqlwsrep57-server/files/patch-support-files_CMakeLists.txt   (contents, props changed)
  head/databases/mysqlwsrep57-server/pkg-comment   (contents, props changed)
  head/databases/mysqlwsrep57-server/pkg-descr   (contents, props changed)
  head/databases/mysqlwsrep57-server/pkg-message   (contents, props changed)
  head/databases/mysqlwsrep57-server/pkg-plist   (contents, props changed)
Modified:
  head/databases/Makefile
  head/databases/mysqlwsrep56-server/Makefile

Modified: head/databases/Makefile
==============================================================================
--- head/databases/Makefile	Tue Jul 11 09:53:40 2017	(r445487)
+++ head/databases/Makefile	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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

Modified: head/databases/mysqlwsrep56-server/Makefile
==============================================================================
--- head/databases/mysqlwsrep56-server/Makefile	Tue Jul 11 09:53:40 2017	(r445487)
+++ head/databases/mysqlwsrep56-server/Makefile	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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

Added: head/databases/mysqlwsrep57-server/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/Makefile	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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>

Added: head/databases/mysqlwsrep57-server/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/distinfo	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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

Added: head/databases/mysqlwsrep57-server/files/extra-patch-config.h.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/extra-patch-config.h.cmake	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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

Added: head/databases/mysqlwsrep57-server/files/my.cnf.sample.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/my.cnf.sample.in	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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

Added: head/databases/mysqlwsrep57-server/files/mysql-server.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/mysql-server.in	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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"

Added: head/databases/mysqlwsrep57-server/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-CMakeLists.txt	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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)
+ 

Added: head/databases/mysqlwsrep57-server/files/patch-client_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-client_CMakeLists.txt	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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)

Added: head/databases/mysqlwsrep57-server/files/patch-cmake_plugin.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-cmake_plugin.cmake	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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"

Added: head/databases/mysqlwsrep57-server/files/patch-cmake_ssl.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-cmake_ssl.cmake	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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()

Added: head/databases/mysqlwsrep57-server/files/patch-cmd-line-utils_libedit_chartype.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-cmd-line-utils_libedit_chartype.h	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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

Added: head/databases/mysqlwsrep57-server/files/patch-cmd-line-utils_libedit_vi.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-cmd-line-utils_libedit_vi.c	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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;
+ 

Added: head/databases/mysqlwsrep57-server/files/patch-include_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-include_CMakeLists.txt	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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()
+ 
+ 

Added: head/databases/mysqlwsrep57-server/files/patch-include_my__compare.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-include_my__compare.h	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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)

Added: head/databases/mysqlwsrep57-server/files/patch-include_my__thread__os__id.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-include_my__thread__os__id.h	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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;

Added: head/databases/mysqlwsrep57-server/files/patch-include_myisam.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-include_myisam.h	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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)

Added: head/databases/mysqlwsrep57-server/files/patch-libmysql_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-libmysql_CMakeLists.txt	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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()

Added: head/databases/mysqlwsrep57-server/files/patch-libservices_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-libservices_CMakeLists.txt	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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()

Added: head/databases/mysqlwsrep57-server/files/patch-man_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-man_CMakeLists.txt	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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)

Added: head/databases/mysqlwsrep57-server/files/patch-mysys__ssl_my__default.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-mysys__ssl_my__default.cc	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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.

Added: head/databases/mysqlwsrep57-server/files/patch-plugin_password__validation_validate__password.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-plugin_password__validation_validate__password.cc	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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>

Added: head/databases/mysqlwsrep57-server/files/patch-rapid_plugin_x_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-rapid_plugin_x_CMakeLists.txt	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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)

Added: head/databases/mysqlwsrep57-server/files/patch-rapid_plugin_x_mysqlx__configure.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-rapid_plugin_x_mysqlx__configure.cmake	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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()

Added: head/databases/mysqlwsrep57-server/files/patch-rapid_unittest_gunit_xplugin_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-rapid_unittest_gunit_xplugin_CMakeLists.txt	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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

Added: head/databases/mysqlwsrep57-server/files/patch-scripts_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-scripts_CMakeLists.txt	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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)

Added: head/databases/mysqlwsrep57-server/files/patch-sql_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-sql_CMakeLists.txt	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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}
+ )

Added: head/databases/mysqlwsrep57-server/files/patch-sql_conn__handler_socket__connection.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-sql_conn__handler_socket__connection.cc	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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)

Added: head/databases/mysqlwsrep57-server/files/patch-sql_sql__view.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysqlwsrep57-server/files/patch-sql_sql__view.cc	Tue Jul 11 10:10:14 2017	(r445488)
@@ -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},

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707111010.v6BAAETq011793>