Date: Sat, 12 May 2018 15:35:26 +0000 (UTC) From: Mahdi Mokhtari <mmokhi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r469734 - in head/databases: mysql80-client mysql80-client/files mysql80-server mysql80-server/files Message-ID: <201805121535.w4CFZQV6032043@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mmokhi Date: Sat May 12 15:35:25 2018 New Revision: 469734 URL: https://svnweb.freebsd.org/changeset/ports/469734 Log: databases/mysql80-{client,server}: Upgrade the ports to GA version 8.0.11 Fix build with LibreSSL and OpenSSL-devel ports as well MySQL 8.0.11 is the General Availability (GA) version of MySQL 8. MySQL since this version supports FIPS-mode, if compiled using OpenSSL, AND an OpenSSL library and FIPS Object Module are available at runtime. FIPS mode imposes conditions on cryptographic operations such as restrictions on acceptable encryption algorithms or requirements for longer key lengths. The --ssl-fips-mode client option enables control of FIPS mode on the client side for: mysql, mysqladmin, mysqlbinlog, mysqlcheck, mysqldump, mysqlimport, mysqlpump, ... This update includes bugfixes including (not limited to): -InnoDB: The server was stopped before a fatal error message was written to the error log. -InnoDB: An incorrect GROUP BY result was returned when using the TempTable storage engine and a NO PAD collation. -InnoDB: The data retrieved from INFORMATION_SCHEMA.INNODB_COLUMNS was incorrect for tables containing a virtual column. Full Release-Notes are available at: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-11.html Added: head/databases/mysql80-client/files/patch-mysys__ssl_my__md5.cc (contents, props changed) head/databases/mysql80-client/files/patch-plugin_x_client_xconnection__impl.cc (contents, props changed) head/databases/mysql80-client/files/patch-share_CMakeLists.txt (contents, props changed) head/databases/mysql80-client/files/patch-sql-common_client.cc (contents, props changed) head/databases/mysql80-client/files/patch-sql_auth_sha2__password__common.cc (contents, props changed) head/databases/mysql80-client/files/patch-sql_mysqld.cc (contents, props changed) head/databases/mysql80-client/files/patch-sql_sys__vars.cc (contents, props changed) head/databases/mysql80-client/files/patch-storage_myisam_mi__dynrec.cc (contents, props changed) head/databases/mysql80-client/files/patch-vio_viosslfactories.cc (contents, props changed) head/databases/mysql80-server/files/patch-mysys__ssl_my__md5.cc (contents, props changed) head/databases/mysql80-server/files/patch-plugin_x_CMakeLists.txt (contents, props changed) head/databases/mysql80-server/files/patch-plugin_x_client_sha256__scramble__generator.cc (contents, props changed) head/databases/mysql80-server/files/patch-plugin_x_client_xconnection__impl.cc (contents, props changed) head/databases/mysql80-server/files/patch-plugin_x_configure.cmake (contents, props changed) head/databases/mysql80-server/files/patch-sql-common_client.cc (contents, props changed) head/databases/mysql80-server/files/patch-sql_auth_sha2__password__common.cc (contents, props changed) head/databases/mysql80-server/files/patch-sql_mysqld.cc (contents, props changed) head/databases/mysql80-server/files/patch-storage_myisam_mi__dynrec.cc (contents, props changed) head/databases/mysql80-server/files/patch-vio_viosslfactories.cc (contents, props changed) Deleted: head/databases/mysql80-client/files/patch-sql_share_CMakeLists.txt head/databases/mysql80-client/files/patch-storage_myisam_mi__dynrec.c head/databases/mysql80-server/files/patch-rapid_plugin_x_CMakeLists.txt head/databases/mysql80-server/files/patch-rapid_plugin_x_mysqlx__configure.cmake head/databases/mysql80-server/files/patch-rapid_unittest_gunit_xplugin_CMakeLists.txt head/databases/mysql80-server/files/patch-sql_CMakeLists.txt head/databases/mysql80-server/files/patch-storage_myisam_mi__dynrec.c Modified: head/databases/mysql80-client/Makefile head/databases/mysql80-client/files/patch-CMakeLists.txt head/databases/mysql80-client/files/patch-cmake_ssl.cmake head/databases/mysql80-client/files/patch-include_CMakeLists.txt head/databases/mysql80-client/files/patch-include_my__compare.h head/databases/mysql80-client/files/patch-include_myisam.h head/databases/mysql80-client/files/patch-mysys__ssl_my__default.cc head/databases/mysql80-client/files/patch-utilities_CMakeLists.txt head/databases/mysql80-client/pkg-plist head/databases/mysql80-server/Makefile head/databases/mysql80-server/distinfo head/databases/mysql80-server/files/my.cnf.sample.in head/databases/mysql80-server/files/patch-CMakeLists.txt head/databases/mysql80-server/files/patch-client_CMakeLists.txt head/databases/mysql80-server/files/patch-cmake_ssl.cmake head/databases/mysql80-server/files/patch-include_my__compare.h head/databases/mysql80-server/files/patch-include_myisam.h head/databases/mysql80-server/files/patch-libmysql_CMakeLists.txt head/databases/mysql80-server/files/patch-mysys__ssl_my__default.cc head/databases/mysql80-server/files/patch-plugin_password__validation_validate__password.cc head/databases/mysql80-server/files/patch-sql_conn__handler_socket__connection.cc head/databases/mysql80-server/files/patch-sql_sys__vars.cc head/databases/mysql80-server/pkg-message head/databases/mysql80-server/pkg-plist Modified: head/databases/mysql80-client/Makefile ============================================================================== --- head/databases/mysql80-client/Makefile Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-client/Makefile Sat May 12 15:35:25 2018 (r469734) @@ -2,6 +2,7 @@ # $FreeBSD$ PORTNAME= mysql +PORTREVISION= 0 PKGNAMESUFFIX= 80-client COMMENT= Multithreaded SQL database (client) Modified: head/databases/mysql80-client/files/patch-CMakeLists.txt ============================================================================== --- head/databases/mysql80-client/files/patch-CMakeLists.txt Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-client/files/patch-CMakeLists.txt Sat May 12 15:35:25 2018 (r469734) @@ -1,6 +1,12 @@ ---- CMakeLists.txt.orig 2017-06-27 11:44:29 UTC +--- CMakeLists.txt.orig 2018-05-03 10:27:45 UTC +++ CMakeLists.txt -@@ -700,9 +700,6 @@ IF(NOT WITHOUT_SERVER) +@@ -835,14 +835,12 @@ ADD_SUBDIRECTORY(extra/regex) + ADD_SUBDIRECTORY(libmysql) + ADD_SUBDIRECTORY(libbinlogevents) + ADD_SUBDIRECTORY(libbinlogstandalone) ++ADD_SUBDIRECTORY(support-files) + + IF(NOT WITHOUT_SERVER) SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "") # Add storage engines and plugins. CONFIGURE_PLUGINS() @@ -9,36 +15,26 @@ - ADD_SUBDIRECTORY(storage/ndb) ENDIF() - ADD_SUBDIRECTORY(include) -@@ -715,6 +712,7 @@ ADD_SUBDIRECTORY(extra/regex) - ADD_SUBDIRECTORY(libmysql) - ADD_SUBDIRECTORY(libbinlogevents) - ADD_SUBDIRECTORY(libbinlogstandalone) -+ADD_SUBDIRECTORY(support-files) - IF(NOT WITHOUT_SERVER) - SET (MYSQLD_STATIC_COMPONENT_LIBS "" CACHE INTERNAL "") -@@ -811,14 +809,13 @@ ELSE() - SET(CPACK_GENERATOR "TGZ") - ENDIF() +@@ -966,12 +964,10 @@ ENDIF() ADD_SUBDIRECTORY(packaging/WiX) --ADD_SUBDIRECTORY(packaging/solaris) + ADD_SUBDIRECTORY(packaging/solaris) - IF(UNIX) +-IF(UNIX) - INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL COMPONENT Info) - ENDIF() +-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} -@@ -841,6 +838,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM") - PATTERN "sp-imp-spec.txt" EXCLUDE + INSTALL(FILES README LICENSE DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme) + INSTALL(FILES ${CMAKE_BINARY_DIR}/Docs/INFO_SRC ${CMAKE_BINARY_DIR}/Docs/INFO_BIN DESTINATION ${INSTALL_DOCDIR}) +@@ -990,6 +986,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM") + PATTERN "README.build" EXCLUDE ) ENDIF() +ENDIF() - INCLUDE(CPack) - + IF(UNIX) + EXECUTE_PROCESS( Modified: head/databases/mysql80-client/files/patch-cmake_ssl.cmake ============================================================================== --- head/databases/mysql80-client/files/patch-cmake_ssl.cmake Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-client/files/patch-cmake_ssl.cmake Sat May 12 15:35:25 2018 (r469734) @@ -1,15 +1,14 @@ ---- cmake/ssl.cmake.orig 2016-08-12 10:55:07 UTC +--- cmake/ssl.cmake.orig 2018-04-29 16:21:47 UTC +++ cmake/ssl.cmake -@@ -179,6 +179,12 @@ MACRO (MYSQL_CHECK_SSL) - OPENSSL_MAJOR_VERSION STREQUAL "1" +@@ -265,10 +265,10 @@ MACRO (MYSQL_CHECK_SSL) + OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}" + ) + ENDIF() + IF(OPENSSL_INCLUDE_DIR AND + OPENSSL_LIBRARY AND + CRYPTO_LIBRARY AND +- OPENSSL_MAJOR_VERSION STREQUAL "1" ++ (OPENSSL_MAJOR_VERSION STREQUAL "1" OR OPENSSL_MAJOR_VERSION STREQUAL "2") ) 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() + FIND_PROGRAM(OPENSSL_EXECUTABLE openssl Modified: head/databases/mysql80-client/files/patch-include_CMakeLists.txt ============================================================================== --- head/databases/mysql80-client/files/patch-include_CMakeLists.txt Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-client/files/patch-include_CMakeLists.txt Sat May 12 15:35:25 2018 (r469734) @@ -1,13 +1,11 @@ --- include/CMakeLists.txt.orig 2017-09-21 15:51:58 UTC +++ include/CMakeLists.txt -@@ -30,11 +30,179 @@ SET(HEADERS +@@ -30,11 +30,173 @@ SET(HEADERS ${CMAKE_CURRENT_BINARY_DIR}/mysql_version.h ${CMAKE_CURRENT_BINARY_DIR}/mysqld_error.h ../libbinlogevents/export/binary_log_types.h + base64.h + big_endian.h -+ byte_order_generic.h -+ byte_order_generic_x86.h + c_string_less.h + crypt_genhash_impl.h + decimal.h @@ -15,7 +13,6 @@ + dur_prop.h + errmsg.h + ft_global.h -+ hash.h + heap.h + keycache.h + lex_string.h @@ -24,7 +21,6 @@ + m_ctype.h + m_string.h + map_helpers.h -+ mem_root_fwd.h + mf_wcomp.h + mutex_lock.h + my_aes.h @@ -115,7 +111,6 @@ + sslopt-case.h + sslopt-longopts.h + sslopt-vars.h -+ str_uca_type.h + template_utils.h + thr_cond.h + thr_lock.h @@ -154,7 +149,6 @@ + mysql/service_command.h + mysql/service_locking.h + mysql/service_my_plugin_log.h -+ mysql/service_my_snprintf.h + mysql/service_mysql_alloc.h + mysql/service_mysql_keyring.h + mysql/service_mysql_password_policy.h Modified: head/databases/mysql80-client/files/patch-include_my__compare.h ============================================================================== --- head/databases/mysql80-client/files/patch-include_my__compare.h Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-client/files/patch-include_my__compare.h Sat May 12 15:35:25 2018 (r469734) @@ -1,11 +1,11 @@ ---- include/my_compare.h.orig 2016-03-28 18:06:12 UTC +--- include/my_compare.h.orig 2018-04-08 06:44:49 UTC +++ include/my_compare.h -@@ -40,7 +40,7 @@ extern "C" { +@@ -49,7 +49,7 @@ 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_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) + #define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24 + 6 + 6) Modified: head/databases/mysql80-client/files/patch-include_myisam.h ============================================================================== --- head/databases/mysql80-client/files/patch-include_myisam.h Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-client/files/patch-include_myisam.h Sat May 12 15:35:25 2018 (r469734) @@ -1,11 +1,11 @@ ---- include/myisam.h.orig 2016-03-28 18:06:12 UTC +--- include/myisam.h.orig 2018-04-08 06:44:49 UTC +++ include/myisam.h -@@ -45,7 +45,7 @@ extern "C" { +@@ -59,7 +59,7 @@ 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_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) + #define MI_MAX_KEY_BUFF (MI_MAX_KEY_LENGTH + MI_MAX_KEY_SEG * 6 + 8 + 8) Modified: head/databases/mysql80-client/files/patch-mysys__ssl_my__default.cc ============================================================================== --- head/databases/mysql80-client/files/patch-mysys__ssl_my__default.cc Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-client/files/patch-mysys__ssl_my__default.cc Sat May 12 15:35:25 2018 (r469734) @@ -6,11 +6,11 @@ -#define MAX_DEFAULT_DIRS 6 +#define MAX_DEFAULT_DIRS 7 - #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */ + #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 */ + return 1; /* Ignore wrong files */ } + if (strstr(name, "/etc") == name) @@ -21,13 +21,13 @@ + goto err; + } + - while (mysql_file_getline(buff, sizeof(buff) - 1, fp, is_login_file)) - { + while (mysql_file_getline(buff, sizeof(buff) - 1, fp, is_login_file)) { line++; + /* Ignore comment and empty lines */ @@ -1252,7 +1260,8 @@ void my_print_default_files(const char * - end[(strlen(end)-1)] = ' '; + end[(strlen(end) - 1)] = ' '; else - strxmov(end, conf_file, *ext , " ", NullS); + strxmov(end, conf_file, *ext, " ", NullS); - fputs(name, stdout); + if (strstr(name, "/etc") != name) + fputs(name, stdout); @@ -53,9 +53,8 @@ @@ -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; +- if (!my_stat(file_name, &stat_info, MYF(0))) return 1; ++ if (!my_stat(file_name, &stat_info, MYF(0))) return 0; /* Ignore .mylogin.cnf file if not exclusively readable/writable by current user. Added: head/databases/mysql80-client/files/patch-mysys__ssl_my__md5.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-client/files/patch-mysys__ssl_my__md5.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,11 @@ +--- mysys_ssl/my_md5.cc.orig 2018-04-08 06:44:49 UTC ++++ mysys_ssl/my_md5.cc +@@ -56,7 +56,7 @@ static void my_md5_hash(unsigned char *d + int compute_md5_hash(char *digest, const char *buf, int len) { + int retval = 0; + int fips_mode = 0; +-#if !defined(HAVE_WOLFSSL) ++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) + fips_mode = FIPS_mode(); + #endif /* HAVE_WOLFSSL */ + /* If fips mode is ON/STRICT restricted method calls will result into abort, Added: head/databases/mysql80-client/files/patch-plugin_x_client_xconnection__impl.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-client/files/patch-plugin_x_client_xconnection__impl.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,37 @@ +--- plugin/x/client/xconnection_impl.cc.orig 2018-04-08 06:44:49 UTC ++++ plugin/x/client/xconnection_impl.cc +@@ -182,12 +182,12 @@ XError ssl_verify_server_cert(Vio *vio, + return XError{CR_SSL_CONNECTION_ERROR, "Failed to get CN from CN entry"}; + } + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L +- const auto cn = reinterpret_cast<char *>(ASN1_STRING_data(cn_asn1)); +-#else /* OPENSSL_VERSION_NUMBER < 0x10100000L */ ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + const auto cn = + reinterpret_cast<const char *>(ASN1_STRING_get0_data(cn_asn1)); +-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ ++#else ++ const auto cn = reinterpret_cast<char *>(ASN1_STRING_data(cn_asn1)); ++#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ + const auto cn_len = static_cast<size_t>(ASN1_STRING_length(cn_asn1)); + + // There should not be any NULL embedded in the CN +@@ -451,7 +451,7 @@ XError Connection_impl::get_ssl_error(co + return XError(CR_SSL_CONNECTION_ERROR, buffer); + } + +-#ifndef HAVE_WOLFSSL ++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) + /** + Set fips mode in openssl library, + When we set fips mode ON/STRICT, it will perform following operations: +@@ -501,7 +501,7 @@ XError Connection_impl::activate_tls() { + if (!m_context->m_ssl_config.is_configured()) + return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED}; + +-#ifndef HAVE_WOLFSSL ++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) + char err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; + if (set_fips_mode((int)m_context->m_ssl_config.m_ssl_fips_mode, err_string) != + 1) { Added: head/databases/mysql80-client/files/patch-share_CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-client/files/patch-share_CMakeLists.txt Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,27 @@ +--- share/CMakeLists.txt.orig 2017-10-03 10:54:31 UTC ++++ share/CMakeLists.txt +@@ -45,6 +45,7 @@ SET(files + dictionary.txt + ) + ++IF (FALSE) + FOREACH (dir ${dirs}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dir} + DESTINATION ${INSTALL_MYSQLSHAREDIR} +@@ -57,13 +58,16 @@ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE + COMPONENT Server + PATTERN "languages.html" EXCLUDE + ) ++ENDIF() + + # Don't copy if we're building in-source. + IF (NOT ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + CONFIGURE_FILE(dictionary.txt ${CMAKE_BINARY_DIR}/${INSTALL_MYSQLSHAREDIR}/dictionary.txt) + ENDIF() + ++IF (FALSE) + INSTALL(FILES ${files} + DESTINATION ${INSTALL_MYSQLSHAREDIR} + COMPONENT Server + ) ++ENDIF() Added: head/databases/mysql80-client/files/patch-sql-common_client.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-client/files/patch-sql-common_client.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,27 @@ +--- sql-common/client.cc.orig 2018-04-08 06:44:49 UTC ++++ sql-common/client.cc +@@ -2649,11 +2649,11 @@ static int ssl_verify_server_cert(Vio *v + goto error; + } + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L +- cn = (char *)ASN1_STRING_data(cn_asn1); +-#else /* OPENSSL_VERSION_NUMBER < 0x10100000L */ ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + cn = (char *)ASN1_STRING_get0_data(cn_asn1); +-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ ++#else /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ ++ cn = (char *)ASN1_STRING_data(cn_asn1); ++#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ + + // There should not be any NULL embedded in the CN + if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn)) { +@@ -5596,7 +5596,7 @@ int STDCALL mysql_options(MYSQL *mysql, + #endif + break; + case MYSQL_OPT_SSL_FIPS_MODE: { +-#if defined(HAVE_OPENSSL) && !defined(HAVE_WOLFSSL) ++#if defined(HAVE_OPENSSL) && !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) + char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; + ENSURE_EXTENSIONS_PRESENT(&mysql->options); + mysql->options.extension->ssl_fips_mode = *(uint *)arg; Added: head/databases/mysql80-client/files/patch-sql_auth_sha2__password__common.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-client/files/patch-sql_auth_sha2__password__common.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,11 @@ +--- sql/auth/sha2_password_common.cc.orig 2018-05-06 18:47:55 UTC ++++ sql/auth/sha2_password_common.cc +@@ -101,7 +101,7 @@ bool SHA256_digest::retrieve_digest(unsi + DBUG_RETURN(true); + } + m_ok = EVP_DigestFinal_ex(md_context, m_digest, NULL); +-#if defined(HAVE_WOLFSSL) || OPENSSL_VERSION_NUMBER < 0x10100000L ++#if defined(HAVE_WOLFSSL) || defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_MD_CTX_cleanup(md_context); + #else /* OPENSSL_VERSION_NUMBER < 0x10100000L */ + EVP_MD_CTX_reset(md_context); Added: head/databases/mysql80-client/files/patch-sql_mysqld.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-client/files/patch-sql_mysqld.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,20 @@ +--- sql/mysqld.cc.orig 2018-05-06 19:15:48 UTC ++++ sql/mysqld.cc +@@ -4321,7 +4321,7 @@ static void init_ssl() { + + static int init_ssl_communication() { + #ifdef HAVE_OPENSSL +-#ifndef HAVE_WOLFSSL ++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) + char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; + int ret_fips_mode = set_fips_mode(opt_ssl_fips_mode, ssl_err_string); + if (ret_fips_mode != 1) { +@@ -8647,7 +8647,7 @@ bool mysqld_get_one_option(int optid, + One can disable SSL later by using --skip-ssl or --ssl=0. + */ + opt_use_ssl = true; +-#ifdef HAVE_WOLFSSL ++#if defined(HAVE_WOLFSSL) || defined(LIBRESSL_VERSION_NUMBER) + /* crl has no effect in wolfSSL. */ + opt_ssl_crl = NULL; + opt_ssl_crlpath = NULL; Added: head/databases/mysql80-client/files/patch-sql_sys__vars.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-client/files/patch-sql_sys__vars.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,29 @@ +--- sql/sys_vars.cc.orig 2018-05-06 19:16:02 UTC ++++ sql/sys_vars.cc +@@ -4098,7 +4098,7 @@ static Sys_var_charptr Sys_tls_version( + READ_ONLY GLOBAL_VAR(opt_tls_version), SSL_OPT(OPT_TLS_VERSION), + IN_FS_CHARSET, "TLSv1,TLSv1.1,TLSv1.2"); + +-#ifndef HAVE_WOLFSSL ++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) + static bool update_fips_mode(sys_var *, THD *, enum_var_type) { + char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; + if (set_fips_mode(opt_ssl_fips_mode, ssl_err_string) != 1) { +@@ -4110,7 +4110,7 @@ static bool update_fips_mode(sys_var *, + } + #endif + +-#ifdef HAVE_WOLFSSL ++#if defined(HAVE_WOLFSSL) || defined(LIBRESSL_VERSION_NUMBER) + static const char *ssl_fips_mode_names[] = {"OFF", 0}; + #else + static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", 0}; +@@ -4121,7 +4121,7 @@ static Sys_var_enum Sys_ssl_fips_mode( + GLOBAL_VAR(opt_ssl_fips_mode), SSL_OPT(OPT_SSL_FIPS_MODE), + ssl_fips_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG, + ON_CHECK(NULL), +-#ifndef HAVE_WOLFSSL ++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) + ON_UPDATE(update_fips_mode), + #else + ON_UPDATE(NULL), Added: head/databases/mysql80-client/files/patch-storage_myisam_mi__dynrec.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-client/files/patch-storage_myisam_mi__dynrec.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,22 @@ +--- storage/myisam/mi_dynrec.cc.orig 2016-03-28 18:06:12 UTC ++++ storage/myisam/mi_dynrec.cc +@@ -65,18 +65,13 @@ 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, info->dfile, 0L); ++ MAP_SHARED, info->dfile, 0L); + if (info->s->file_map == (uchar *)MAP_FAILED) { + info->s->file_map = NULL; + Modified: head/databases/mysql80-client/files/patch-utilities_CMakeLists.txt ============================================================================== --- head/databases/mysql80-client/files/patch-utilities_CMakeLists.txt Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-client/files/patch-utilities_CMakeLists.txt Sat May 12 15:35:25 2018 (r469734) @@ -2,20 +2,18 @@ +++ utilities/CMakeLists.txt @@ -45,6 +45,7 @@ ENDIF() - ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/include/mysqld_error.h - ${PROJECT_BINARY_DIR}/sql/share/english/errmsg.sys -+ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/sql/share/ + ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/include/mysqld_error.h + ${PROJECT_BINARY_DIR}/${INSTALL_MYSQLSHAREDIR}/english/errmsg.sys ++ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/share/ COMMAND comp_err - --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets - --out-dir=${PROJECT_BINARY_DIR}/sql/share/ -@@ -73,6 +74,7 @@ IF (WIN32 AND WITH_SSL_PATH AND HAVE_CRY + --charset=${PROJECT_SOURCE_DIR}/share/charsets + --out-dir=${PROJECT_BINARY_DIR}/${INSTALL_MYSQLSHAREDIR}/ +@@ -73,4 +74,5 @@ IF (WIN32 AND WITH_SSL_PATH AND HAVE_CRY ENDIF() - +IF(FALSE) MYSQL_ADD_EXECUTABLE(my_print_defaults my_print_defaults.c) TARGET_LINK_LIBRARIES(my_print_defaults mysys mysys_ssl) - SET_TARGET_PROPERTIES(my_print_defaults PROPERTIES LINKER_LANGUAGE CXX) @@ -142,11 +144,14 @@ IF(WITH_INNOBASE_STORAGE_ENGINE) TARGET_LINK_LIBRARIES(innochecksum mysys mysys_ssl ${LZ4_LIBRARY}) ADD_DEPENDENCIES(innochecksum GenError) Added: head/databases/mysql80-client/files/patch-vio_viosslfactories.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-client/files/patch-vio_viosslfactories.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,47 @@ +--- vio/viosslfactories.cc.orig 2018-04-08 06:44:49 UTC ++++ vio/viosslfactories.cc +@@ -37,6 +37,7 @@ + + #ifdef HAVE_OPENSSL + #include <openssl/dh.h> ++#include <openssl/crypto.h> + + #define TLS_VERSION_OPTION_SIZE 256 + #define SSL_CIPHER_LIST_SIZE 4096 +@@ -135,7 +136,7 @@ static DH *get_dh2048(void) { + BIGNUM *p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL); + BIGNUM *g = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL); + if (!p || !g +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + || !DH_set0_pqg(dh, p, NULL, g) + #endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ + ) { +@@ -426,7 +427,7 @@ void ssl_start() { + } + } + +-#ifndef HAVE_WOLFSSL ++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) + /** + Set fips mode in openssl library, + When we set fips mode ON/STRICT, it will perform following operations: +@@ -449,6 +450,10 @@ int set_fips_mode(const uint fips_mode, + int rc = -1; + unsigned int fips_mode_old = -1; + unsigned long err_library = 0; ++#if defined(LIBRESSL_VERSION_NUMBER) ++ err_string="LibreSSL deosn't have FIPS_mode functionas"; ++ goto EXIT; ++#else + if (fips_mode > 2) { + goto EXIT; + } +@@ -462,6 +467,7 @@ int set_fips_mode(const uint fips_mode, + ERR_error_string_n(err_library, err_string, OPENSSL_ERROR_LENGTH - 1); + err_string[OPENSSL_ERROR_LENGTH - 1] = '\0'; + } ++#endif + EXIT: + return rc; + } Modified: head/databases/mysql80-client/pkg-plist ============================================================================== --- head/databases/mysql80-client/pkg-plist Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-client/pkg-plist Sat May 12 15:35:25 2018 (r469734) @@ -13,8 +13,6 @@ bin/mysqlslap include/mysql/base64.h include/mysql/big_endian.h include/mysql/binary_log_types.h -include/mysql/byte_order_generic.h -include/mysql/byte_order_generic_x86.h include/mysql/c_string_less.h include/mysql/crypt_genhash_impl.h include/mysql/decimal.h @@ -22,7 +20,6 @@ include/mysql/depth_first_search.h include/mysql/dur_prop.h include/mysql/errmsg.h include/mysql/ft_global.h -include/mysql/hash.h include/mysql/heap.h include/mysql/keycache.h include/mysql/lex_string.h @@ -31,7 +28,6 @@ include/mysql/little_endian.h include/mysql/m_ctype.h include/mysql/m_string.h include/mysql/map_helpers.h -include/mysql/mem_root_fwd.h include/mysql/mf_wcomp.h include/mysql/mutex_lock.h include/mysql/my_aes.h @@ -111,7 +107,6 @@ include/mysql/mysql/plugin_validate_password.h include/mysql/mysql/service_command.h include/mysql/mysql/service_locking.h include/mysql/mysql/service_my_plugin_log.h -include/mysql/mysql/service_my_snprintf.h include/mysql/mysql/service_mysql_alloc.h include/mysql/mysql/service_mysql_keyring.h include/mysql/mysql/service_mysql_password_policy.h @@ -171,7 +166,6 @@ include/mysql/sql_string.h include/mysql/sslopt-case.h include/mysql/sslopt-longopts.h include/mysql/sslopt-vars.h -include/mysql/str_uca_type.h include/mysql/template_utils.h include/mysql/thr_cond.h include/mysql/thr_lock.h @@ -187,7 +181,6 @@ lib/mysql/libmysqlclient.so.21 lib/mysql/libmysqlclient_r.a lib/mysql/libmysqlclient_r.so lib/mysql/libmysqlclient_r.so.21 -lib/mysql/libmysqlservices.a libdata/pkgconfig/mysqlclient.pc man/man1/comp_err.1.gz man/man1/mysql.1.gz Modified: head/databases/mysql80-server/Makefile ============================================================================== --- head/databases/mysql80-server/Makefile Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-server/Makefile Sat May 12 15:35:25 2018 (r469734) @@ -2,9 +2,8 @@ # $FreeBSD$ PORTNAME?= mysql -PORTVERSION= 8.0.2 -PORTREVISION?= 3 -DISTVERSIONSUFFIX?= -dmr +PORTVERSION= 8.0.11 +PORTREVISION?= 0 CATEGORIES= databases ipv6 MASTER_SITES= MYSQL/MySQL-8.0 PKGNAMESUFFIX?= 80-server @@ -15,9 +14,6 @@ COMMENT?= Multithreaded SQL database (server) LICENSE= GPLv2 -BROKEN_SSL= openssl-devel -BROKEN_SSL_REASON_openssl-devel= member access into incomplete type 'DH' (aka 'dh_st') - WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}${DISTVERSIONSUFFIX} SLAVEDIRS= databases/mysql80-client @@ -31,7 +27,10 @@ MY_SECDIR= /var/db/mysql_secure MY_TMPDIR= /var/db/mysql_tmpdir LIB_DEPENDS+= libevent.so:devel/libevent \ - liblz4.so:archivers/liblz4 + libicutu.so:devel/icu \ + liblz4.so:archivers/liblz4 \ + libre2.so:devel/re2 \ + libprotobuf.so:devel/protobuf CMAKE_BUILD_TYPE= Release CFLAGS+= -fPIC @@ -61,6 +60,9 @@ CMAKE_ARGS+= -DINSTALL_LAYOUT=FREEBSD \ -DWITH_LIBEVENT=system \ -DWITH_LZ4=system \ -DWITH_ZLIB=system \ + -DWITH_ICU=system \ + -DWITH_RE2=system \ + -DWITH_PROTOBUF=system \ -DINSTALL_MYSQLTESTDIR=0 SHEBANG_FILES= scripts/*.pl* scripts/*.sh Modified: head/databases/mysql80-server/distinfo ============================================================================== --- head/databases/mysql80-server/distinfo Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-server/distinfo Sat May 12 15:35:25 2018 (r469734) @@ -1,3 +1,3 @@ -TIMESTAMP = 1505989679 -SHA256 (mysql-boost-8.0.2-dmr.tar.gz) = a93f63e8ac72046bc5b0dc8515c60dd72faaaff352652aa46375f3a484ac3872 -SIZE (mysql-boost-8.0.2-dmr.tar.gz) = 60697707 +TIMESTAMP = 1524414416 +SHA256 (mysql-boost-8.0.11.tar.gz) = f40711a9bd91ab2ccea331484a6d281f806b0fdecf78f4c9e9d8a4c91208f309 +SIZE (mysql-boost-8.0.11.tar.gz) = 77647598 Modified: head/databases/mysql80-server/files/my.cnf.sample.in ============================================================================== --- head/databases/mysql80-server/files/my.cnf.sample.in Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-server/files/my.cnf.sample.in Sat May 12 15:35:25 2018 (r469734) @@ -42,8 +42,6 @@ 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%% Modified: head/databases/mysql80-server/files/patch-CMakeLists.txt ============================================================================== --- head/databases/mysql80-server/files/patch-CMakeLists.txt Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-server/files/patch-CMakeLists.txt Sat May 12 15:35:25 2018 (r469734) @@ -1,6 +1,6 @@ ---- CMakeLists.txt.orig 2017-06-27 11:44:29 UTC +--- CMakeLists.txt.orig 2018-05-07 12:26:59 UTC +++ CMakeLists.txt -@@ -750,7 +750,6 @@ IF(UNIX) +@@ -870,7 +870,6 @@ IF(UNIX) ENDIF() IF(NOT WITHOUT_SERVER) @@ -8,7 +8,7 @@ ADD_SUBDIRECTORY(sql) ENDIF() -@@ -759,8 +758,6 @@ ENDIF() +@@ -879,8 +878,6 @@ ENDIF() ADD_SUBDIRECTORY(scripts) IF(NOT WITHOUT_SERVER) @@ -17,19 +17,19 @@ ADD_SUBDIRECTORY(support-files) IF(EXISTS ${CMAKE_SOURCE_DIR}/internal/CMakeLists.txt) ADD_SUBDIRECTORY(internal) -@@ -819,6 +816,7 @@ ENDIF() +@@ -972,6 +969,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} -@@ -841,6 +839,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM") - PATTERN "sp-imp-spec.txt" EXCLUDE + INSTALL(FILES README LICENSE DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme) + INSTALL(FILES ${CMAKE_BINARY_DIR}/Docs/INFO_SRC ${CMAKE_BINARY_DIR}/Docs/INFO_BIN DESTINATION ${INSTALL_DOCDIR}) +@@ -990,6 +988,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM") + PATTERN "README.build" EXCLUDE ) ENDIF() +ENDIF() - INCLUDE(CPack) - + IF(UNIX) + EXECUTE_PROCESS( Modified: head/databases/mysql80-server/files/patch-client_CMakeLists.txt ============================================================================== --- head/databases/mysql80-server/files/patch-client_CMakeLists.txt Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-server/files/patch-client_CMakeLists.txt Sat May 12 15:35:25 2018 (r469734) @@ -14,7 +14,7 @@ ADD_DEFINITIONS(${SSL_DEFINES}) +IF(FALSE) - MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc ../sql-common/sql_string.cc) + MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc ../sql-common/sql_string.cc pattern_matcher.cc) TARGET_LINK_LIBRARIES(mysql mysqlclient) IF(UNIX) TARGET_LINK_LIBRARIES(mysql ${EDITLINE_LIBRARY}) Modified: head/databases/mysql80-server/files/patch-cmake_ssl.cmake ============================================================================== --- head/databases/mysql80-server/files/patch-cmake_ssl.cmake Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-server/files/patch-cmake_ssl.cmake Sat May 12 15:35:25 2018 (r469734) @@ -1,15 +1,14 @@ ---- cmake/ssl.cmake.orig 2016-08-12 10:55:07 UTC +--- cmake/ssl.cmake.orig 2018-04-29 16:21:47 UTC +++ cmake/ssl.cmake -@@ -179,6 +179,12 @@ MACRO (MYSQL_CHECK_SSL) - OPENSSL_MAJOR_VERSION STREQUAL "1" +@@ -265,10 +265,10 @@ MACRO (MYSQL_CHECK_SSL) + OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}" + ) + ENDIF() + IF(OPENSSL_INCLUDE_DIR AND + OPENSSL_LIBRARY AND + CRYPTO_LIBRARY AND +- OPENSSL_MAJOR_VERSION STREQUAL "1" ++ (OPENSSL_MAJOR_VERSION STREQUAL "1" OR OPENSSL_MAJOR_VERSION STREQUAL "2") ) 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() + FIND_PROGRAM(OPENSSL_EXECUTABLE openssl Modified: head/databases/mysql80-server/files/patch-include_my__compare.h ============================================================================== --- head/databases/mysql80-server/files/patch-include_my__compare.h Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-server/files/patch-include_my__compare.h Sat May 12 15:35:25 2018 (r469734) @@ -1,11 +1,11 @@ ---- include/my_compare.h.orig 2016-03-28 18:06:12 UTC +--- include/my_compare.h.orig 2018-04-08 06:44:49 UTC +++ include/my_compare.h -@@ -40,7 +40,7 @@ extern "C" { +@@ -49,7 +49,7 @@ 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_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) + #define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24 + 6 + 6) Modified: head/databases/mysql80-server/files/patch-include_myisam.h ============================================================================== --- head/databases/mysql80-server/files/patch-include_myisam.h Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-server/files/patch-include_myisam.h Sat May 12 15:35:25 2018 (r469734) @@ -1,11 +1,11 @@ ---- include/myisam.h.orig 2016-03-28 18:06:12 UTC +--- include/myisam.h.orig 2018-04-08 06:44:49 UTC +++ include/myisam.h -@@ -45,7 +45,7 @@ extern "C" { +@@ -59,7 +59,7 @@ 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_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) + #define MI_MAX_KEY_BUFF (MI_MAX_KEY_LENGTH + MI_MAX_KEY_SEG * 6 + 8 + 8) Modified: head/databases/mysql80-server/files/patch-libmysql_CMakeLists.txt ============================================================================== --- head/databases/mysql80-server/files/patch-libmysql_CMakeLists.txt Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-server/files/patch-libmysql_CMakeLists.txt Sat May 12 15:35:25 2018 (r469734) @@ -1,11 +1,11 @@ --- libmysql/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC +++ libmysql/CMakeLists.txt @@ -215,7 +215,7 @@ IF(WIN32) - ENDIF() + ADD_SUBDIRECTORY(authentication_ldap) # Merge several convenience libraries into one big mysqlclient --MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development) -+MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development NOINSTALL) +-MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS} COMPONENT Development) ++MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS} COMPONENT Development SKIP_INSTALL) # Visual Studio users need debug static library for debug projects IF(MSVC) @@ -14,7 +14,7 @@ MERGE_LIBRARIES(libmysql SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} ${CLIENT_API_FUNCTIONS_UNDOCUMENTED} - COMPONENT SharedLibraries) -+ COMPONENT SharedLibraries NOINSTALL) ++ COMPONENT SharedLibraries SKIP_INSTALL) +IF(FALSE) IF(UNIX) # libtool compatability Modified: head/databases/mysql80-server/files/patch-mysys__ssl_my__default.cc ============================================================================== --- head/databases/mysql80-server/files/patch-mysys__ssl_my__default.cc Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-server/files/patch-mysys__ssl_my__default.cc Sat May 12 15:35:25 2018 (r469734) @@ -6,11 +6,11 @@ -#define MAX_DEFAULT_DIRS 6 +#define MAX_DEFAULT_DIRS 7 - #define DEFAULT_DIRS_SIZE (MAX_DEFAULT_DIRS + 1) /* Terminate with NULL */ + #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 */ + return 1; /* Ignore wrong files */ } + if (strstr(name, "/etc") == name) @@ -21,13 +21,13 @@ + goto err; + } + - while (mysql_file_getline(buff, sizeof(buff) - 1, fp, is_login_file)) - { + while (mysql_file_getline(buff, sizeof(buff) - 1, fp, is_login_file)) { line++; + /* Ignore comment and empty lines */ @@ -1252,7 +1260,8 @@ void my_print_default_files(const char * - end[(strlen(end)-1)] = ' '; + end[(strlen(end) - 1)] = ' '; else - strxmov(end, conf_file, *ext , " ", NullS); + strxmov(end, conf_file, *ext, " ", NullS); - fputs(name, stdout); + if (strstr(name, "/etc") != name) + fputs(name, stdout); @@ -53,9 +53,8 @@ @@ -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; +- if (!my_stat(file_name, &stat_info, MYF(0))) return 1; ++ if (!my_stat(file_name, &stat_info, MYF(0))) return 0; /* Ignore .mylogin.cnf file if not exclusively readable/writable by current user. Added: head/databases/mysql80-server/files/patch-mysys__ssl_my__md5.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-server/files/patch-mysys__ssl_my__md5.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,11 @@ +--- mysys_ssl/my_md5.cc.orig 2018-04-08 06:44:49 UTC ++++ mysys_ssl/my_md5.cc +@@ -56,7 +56,7 @@ static void my_md5_hash(unsigned char *d + int compute_md5_hash(char *digest, const char *buf, int len) { + int retval = 0; + int fips_mode = 0; +-#if !defined(HAVE_WOLFSSL) ++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) + fips_mode = FIPS_mode(); + #endif /* HAVE_WOLFSSL */ + /* If fips mode is ON/STRICT restricted method calls will result into abort, Modified: head/databases/mysql80-server/files/patch-plugin_password__validation_validate__password.cc ============================================================================== --- head/databases/mysql80-server/files/patch-plugin_password__validation_validate__password.cc Sat May 12 14:47:36 2018 (r469733) +++ head/databases/mysql80-server/files/patch-plugin_password__validation_validate__password.cc Sat May 12 15:35:25 2018 (r469734) @@ -6,6 +6,7 @@ #include <mysql/service_mysql_string.h> +/* solve clash between libc++ bitset::test() and test macro from my_global.h */ +#undef test + #include <stdio.h> #include <stdlib.h> #include <string.h> - #include <sys/types.h> + Added: head/databases/mysql80-server/files/patch-plugin_x_CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-server/files/patch-plugin_x_CMakeLists.txt Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,17 @@ +--- plugin/x/CMakeLists.txt.orig 2018-04-08 06:44:49 UTC ++++ plugin/x/CMakeLists.txt +@@ -82,11 +82,14 @@ INCLUDE_DIRECTORIES( + ${MYSQLX_PROTOCOL_INCLUDE_DIR} + ${MYSQLX_PROJECT_DIR}/client/ + ${CMAKE_SOURCE_DIR}/extra/regex ++ ${BOOST_INCLUDE_DIR} + ) + + INCLUDE_DIRECTORIES(SYSTEM + ${PROTOBUF_INCLUDE_DIRS} + ${LIBEVENT_INCLUDE_DIR} ++ ${SSL_INCLUDE_DIRS} ++ ${ZLIB_INCLUDE_DIR} + ) + + SET(MYSQLX_PROTBUF_AND_PROTOCOL_LIB Added: head/databases/mysql80-server/files/patch-plugin_x_client_sha256__scramble__generator.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-server/files/patch-plugin_x_client_sha256__scramble__generator.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,11 @@ +--- plugin/x/client/sha256_scramble_generator.cc.orig 2018-05-09 14:20:16 UTC ++++ plugin/x/client/sha256_scramble_generator.cc +@@ -97,7 +97,7 @@ bool SHA256_digest::retrieve_digest(unsi + DBUG_RETURN(true); + } + m_ok = EVP_DigestFinal_ex(md_context, m_digest, nullptr); +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_MD_CTX_cleanup(md_context); + #else /* OPENSSL_VERSION_NUMBER < 0x10100000L */ + EVP_MD_CTX_reset(md_context); Added: head/databases/mysql80-server/files/patch-plugin_x_client_xconnection__impl.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-server/files/patch-plugin_x_client_xconnection__impl.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,37 @@ +--- plugin/x/client/xconnection_impl.cc.orig 2018-04-08 06:44:49 UTC ++++ plugin/x/client/xconnection_impl.cc +@@ -182,12 +182,12 @@ XError ssl_verify_server_cert(Vio *vio, + return XError{CR_SSL_CONNECTION_ERROR, "Failed to get CN from CN entry"}; + } + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L +- const auto cn = reinterpret_cast<char *>(ASN1_STRING_data(cn_asn1)); +-#else /* OPENSSL_VERSION_NUMBER < 0x10100000L */ ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + const auto cn = + reinterpret_cast<const char *>(ASN1_STRING_get0_data(cn_asn1)); +-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ ++#else ++ const auto cn = reinterpret_cast<char *>(ASN1_STRING_data(cn_asn1)); ++#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ + const auto cn_len = static_cast<size_t>(ASN1_STRING_length(cn_asn1)); + + // There should not be any NULL embedded in the CN +@@ -451,7 +451,7 @@ XError Connection_impl::get_ssl_error(co + return XError(CR_SSL_CONNECTION_ERROR, buffer); + } + +-#ifndef HAVE_WOLFSSL ++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) + /** + Set fips mode in openssl library, + When we set fips mode ON/STRICT, it will perform following operations: +@@ -501,7 +501,7 @@ XError Connection_impl::activate_tls() { + if (!m_context->m_ssl_config.is_configured()) + return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED}; + +-#ifndef HAVE_WOLFSSL ++#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) + char err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; + if (set_fips_mode((int)m_context->m_ssl_config.m_ssl_fips_mode, err_string) != + 1) { Added: head/databases/mysql80-server/files/patch-plugin_x_configure.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-server/files/patch-plugin_x_configure.cmake Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,15 @@ +--- plugin/x/configure.cmake.orig 2018-04-08 06:44:49 UTC ++++ plugin/x/configure.cmake +@@ -44,6 +44,7 @@ CONFIGURE_FILE(${MYSQLX_PROJECT_DIR}/src + CONFIGURE_FILE(${MYSQLX_PROJECT_DIR}/src/mysqlx_version.h.in + ${MYSQLX_GENERATE_DIR}/mysqlx_version.h ) + ++IF(FALSE) + INSTALL(FILES ${MYSQLX_GENERATE_DIR}/mysqlx_error.h + DESTINATION ${INSTALL_INCLUDEDIR} + COMPONENT Development) +@@ -55,3 +56,4 @@ INSTALL(FILES ${MYSQLX_GENERATE_DIR}/mys + INSTALL(FILES ${MYSQLX_GENERATE_DIR}/mysqlx_version.h + DESTINATION ${INSTALL_INCLUDEDIR} + COMPONENT Development) ++ENDIF() Added: head/databases/mysql80-server/files/patch-sql-common_client.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-server/files/patch-sql-common_client.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,27 @@ +--- sql-common/client.cc.orig 2018-04-08 06:44:49 UTC ++++ sql-common/client.cc +@@ -2649,11 +2649,11 @@ static int ssl_verify_server_cert(Vio *v + goto error; + } + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L +- cn = (char *)ASN1_STRING_data(cn_asn1); +-#else /* OPENSSL_VERSION_NUMBER < 0x10100000L */ ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + cn = (char *)ASN1_STRING_get0_data(cn_asn1); +-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */ ++#else /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ ++ cn = (char *)ASN1_STRING_data(cn_asn1); ++#endif /* OPENSSL_VERSION_NUMBER >= 0x10100000L */ + + // There should not be any NULL embedded in the CN + if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn)) { +@@ -5596,7 +5596,7 @@ int STDCALL mysql_options(MYSQL *mysql, + #endif + break; + case MYSQL_OPT_SSL_FIPS_MODE: { +-#if defined(HAVE_OPENSSL) && !defined(HAVE_WOLFSSL) ++#if defined(HAVE_OPENSSL) && !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) + char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'}; + ENSURE_EXTENSIONS_PRESENT(&mysql->options); + mysql->options.extension->ssl_fips_mode = *(uint *)arg; Added: head/databases/mysql80-server/files/patch-sql_auth_sha2__password__common.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/mysql80-server/files/patch-sql_auth_sha2__password__common.cc Sat May 12 15:35:25 2018 (r469734) @@ -0,0 +1,11 @@ +--- sql/auth/sha2_password_common.cc.orig 2018-05-06 18:47:55 UTC ++++ sql/auth/sha2_password_common.cc +@@ -101,7 +101,7 @@ bool SHA256_digest::retrieve_digest(unsi + DBUG_RETURN(true); + } + m_ok = EVP_DigestFinal_ex(md_context, m_digest, NULL); +-#if defined(HAVE_WOLFSSL) || OPENSSL_VERSION_NUMBER < 0x10100000L ++#if defined(HAVE_WOLFSSL) || defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_MD_CTX_cleanup(md_context); *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805121535.w4CFZQV6032043>