1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

databases/mysql80-{client, server}: Update to latest release 8.0.18

switch patch-files to mysql80-server to make it easy for maintain.

Bugfix:
- CMake now enables use of fastcov if it is available. fastcov is faster than lcov or gcov. This requires GCC and gcov versions of 9 or higher.
- The DISABLE_SHARED CMake option was unused and has been removed.
- The CMake code to find Protobuf executables now works on platforms that split these into multiple packages.
- The new ADD_GDB_INDEX CMake option determines whether to enable generation of a .gdb_index section in binaries, which makes loading them in a debugger faster. The option is disabled by default. It has no effect if a linker other than lld or GNU gold is used.
- For the INSTALL_LAYOUT CMake option, the SLES and WIN option values were not used and have been removed.
- The max_prepared_stmt_count system variable maximum value has been increased from 1 million (1,048,576) to 4 million (4,194,304). The default value remains unchanged at 16,382.
- MySQL 8.0 no longer supports building using wolfSSL. All MySQL builds now use OpenSSL.
- The RE2 library is no longer used by MySQL. The library is no longer bundled with source distributions and the WITH_RE2 CMake option is obsolete.

More Infos: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-18.html

A big thanks to @fluffy for his help with this update

MFH:		2020Q1
Security:	fc91f2ef-fd7b-11e9-a1c7-b499baebfeaf
Sponsored by:	Netzkommune GmbH
This commit is contained in:
Jochen Neumeister 2020-01-08 16:47:12 +00:00
parent e2405d4b5e
commit 342c784ae3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=522436
69 changed files with 889 additions and 1097 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= mysql
PORTREVISION= 1
PORTREVISION= 0
PKGNAMESUFFIX= 80-client
COMMENT= Multithreaded SQL database (client)
@ -12,7 +12,7 @@ LICENSE+= LGPL21
MASTERDIR= ${.CURDIR}/../mysql80-server
PKGMESSAGE= ${.CURDIR}/pkg-message
PATCHDIR= ${.CURDIR}/files
PATCHDIR= ${MASTERDIR}/files
PLIST= ${.CURDIR}/pkg-plist
CONFLICTS_INSTALL= mysql8[1-9]-client-* \
@ -24,12 +24,22 @@ CMAKE_ARGS+= -DWITHOUT_SERVER=1 -DINSTALL_SUPPORTFILESDIR=0
USE_LDCONFIG+= ${PREFIX}/lib/mysql
MMAN1= comp_err.1 msql2mysql.1 mysql.1 mysql_config.1 mysql_config_editor.1 mysql_find_rows.1 \
mysql_waitpid.1 mysqlaccess.1 mysqladmin.1 mysqlbinlog.1 \
mysqlcheck.1 mysqldump.1 mysqlimport.1 mysqlshow.1 mysqlslap.1
MMAN1= comp_err.1 lz4_decompress.1 mysql.1 mysql_config.1 mysql_config_editor.1 \
mysqladmin.1 mysqlbinlog.1 mysqlcheck.1 mysqldump.1 mysqlimport.1 mysqlman.1 \
mysqlpump.1 mysqlshow.1 mysqlslap.1 perror.1 zlib_decompress.1
CLIENT_ONLY= yes
OPTIONS_GROUP+= PLUGINS
PLUGINS_DESC= Default Client Plugins
OPTIONS_GROUP_PLUGINS= SASLCLIENT
SASLCLIENT_DESC= SASL client plugin module
SASLCLIENT_CMAKE_BOOL= WITH_AUTHENTICATION_LDAP
SASLCLIENT_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2
SASLCLIENT_USE= OPENLDAP=yes
OPTIONS_DEFAULT+= SASLCLIENT
OPTIONS_SUB= yes
# issue 166367: adding symlinks for back-compatibility with ${lib}_r
post-install:
@${LN} -s libmysqlclient.a ${STAGEDIR}${PREFIX}/lib/mysql/libmysqlclient_r.a

View File

@ -1,35 +0,0 @@
--- CMakeLists.txt.orig 2019-01-21 18:42:44 UTC
+++ CMakeLists.txt
@@ -1011,6 +1011,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_PLUGIN_LIBS "" CACHE INTERNAL "")
@@ -1146,12 +1147,13 @@ ENDIF()
ADD_SUBDIRECTORY(packaging/WiX)
ADD_SUBDIRECTORY(packaging/solaris)
-IF(UNIX)
- INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL COMPONENT Info)
-ENDIF()
+#IF(UNIX)
+# INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL COMPONENT Info)
+#ENDIF()
#
# RPM installs documentation directly from the source tree
#
+IF(FALSE)
IF(NOT INSTALL_LAYOUT MATCHES "RPM")
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})
@@ -1170,6 +1172,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM")
PATTERN "README.build" EXCLUDE
)
ENDIF()
+ENDIF()
# Now that we're done with all ADD_SUBDIRECTORY and thus all feature tests,
# we can safely enable ASan on Clang/Win32 if needed.

View File

@ -1,39 +0,0 @@
--- client/CMakeLists.txt.orig 2019-04-13 13:46:31.000000000 +0200
+++ client/CMakeLists.txt 2019-04-30 00:27:10.627236000 +0200
@@ -35,10 +35,12 @@
TARGET_LINK_LIBRARIES(mysql ${EDITLINE_LIBRARY})
ENDIF(UNIX)
+IF(FALSE)
IF(NOT WITHOUT_SERVER)
MYSQL_ADD_EXECUTABLE(mysql_upgrade upgrade/program.cc)
TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient client_base)
ENDIF()
+ENDIF()
SET(MYSQLTEST_SRC
mysqltest/error_names.cc
@@ -49,10 +51,12 @@
mysqltest/utils.cc
)
+IF(FALSE)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc ${MYSQLTEST_SRC} COMPONENT Test)
SET_TARGET_PROPERTIES(mysqltest PROPERTIES ENABLE_EXPORTS TRUE)
TARGET_LINK_LIBRARIES(mysqltest mysqlclient)
ADD_DEPENDENCIES(mysqltest GenError GenClientError)
+ENDIF()
ADD_LIBRARY(mysqlcheck_core STATIC check/mysqlcheck_core.cc)
TARGET_LINK_LIBRARIES(mysqlcheck_core mysqlclient)
@@ -108,8 +112,10 @@
MYSQL_ADD_EXECUTABLE(mysql_config_editor mysql_config_editor.cc)
TARGET_LINK_LIBRARIES(mysql_config_editor mysqlclient)
+IF(FALSE)
MYSQL_ADD_EXECUTABLE(mysql_secure_installation mysql_secure_installation.cc)
TARGET_LINK_LIBRARIES(mysql_secure_installation mysqlclient)
+ENDIF()
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)

View File

@ -1,14 +0,0 @@
--- cmake/ssl.cmake.orig 2018-04-29 16:21:47 UTC
+++ cmake/ssl.cmake
@@ -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)
FIND_PROGRAM(OPENSSL_EXECUTABLE openssl

View File

@ -1,11 +0,0 @@
--- extra/libedit/chartype.h.orig 2016-03-28 18:06:12 UTC
+++ extra/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

View File

@ -1,176 +0,0 @@
--- include/CMakeLists.txt.orig 2017-09-21 15:51:58 UTC
+++ include/CMakeLists.txt
@@ -30,11 +30,173 @@ SET(HEADERS
${CMAKE_CURRENT_BINARY_DIR}/mysql_version.h
${CMAKE_CURRENT_BINARY_DIR}/mysqld_error.h
field_types.h
+ base64.h
+ big_endian.h
+ c_string_less.h
+ crypt_genhash_impl.h
+ decimal.h
+ depth_first_search.h
+ dur_prop.h
+ errmsg.h
+ ft_global.h
+ heap.h
+ keycache.h
+ lex_string.h
+ lf.h
+ little_endian.h
+ m_ctype.h
+ m_string.h
+ map_helpers.h
+ mf_wcomp.h
+ mutex_lock.h
+ my_aes.h
+ my_alloc.h
+ my_atomic.h
+ my_base.h
+ my_bit.h
+ my_bitmap.h
+ my_byteorder.h
+ my_check_opt.h
+ my_command.h
+ my_compare.h
+ my_compare.h.orig
+ my_compiler.h
+ my_dbug.h
+ my_default.h
+ my_dir.h
+ my_double2ulonglong.h
+ my_getopt.h
+ my_hash_combine.h
+ my_icp.h
+ my_inttypes.h
+ my_io.h
+ my_list.h
+ my_loglevel.h
+ my_macros.h
+ my_md5.h
+ my_md5_size.h
+ my_murmur3.h
+ my_pointer_arithmetic.h
+ my_psi_config.h
+ my_rapidjson_size_t.h
+ my_rdtsc.h
+ my_rnd.h
+ my_sharedlib.h
+ my_shm_defaults.h
+ my_sqlcommand.h
+ my_stacktrace.h
+ my_sys.h
+ my_systime.h
+ my_table_map.h
+ my_thread.h
+ my_thread_local.h
+ my_thread_os_id.h
+ my_time.h
+ my_timer.h
+ my_tree.h
+ my_uctype.h
+ my_user.h
+ my_xml.h
+ myisam.h
+ myisammrg.h
+ myisampack.h
+ mysql.h
+ mysql.h.pp
+ mysql_com.h
+ mysql_com_server.h
+ mysql_time.h
+ mysql_version.h.in
+ mysys_err.h
+ nullable.h
+ password.h
+ pfs_cond_provider.h
+ pfs_error_provider.h
+ pfs_file_provider.h
+ pfs_idle_provider.h
+ pfs_memory_provider.h
+ pfs_metadata_provider.h
+ pfs_mutex_provider.h
+ pfs_rwlock_provider.h
+ pfs_socket_provider.h
+ pfs_stage_provider.h
+ pfs_statement_provider.h
+ pfs_table_provider.h
+ pfs_thread_provider.h
+ pfs_transaction_provider.h
+ prealloced_array.h
+ print_version.h
+ priority_queue.h
+ rwlock_scoped_lock.h
+ scope_guard.h
+ service_versions.h
+ sha1.h
+ sha2.h
+ sql_chars.h
+ sql_common.h
+ sql_string.h
+ sslopt-case.h
+ sslopt-longopts.h
+ sslopt-vars.h
+ template_utils.h
+ thr_cond.h
+ thr_lock.h
+ thr_mutex.h
+ thr_rwlock.h
+ typelib.h
+ varlen_sort.h
+ violite.h
+ welcome_copyright_notice.h
)
SET(HEADERS_MYSQL_DIR
mysql/client_plugin.h
mysql/plugin_auth_common.h
mysql/udf_registration_types.h
+ mysql/client_authentication.h
+ mysql/client_plugin.h.pp
+ mysql/com_data.h
+ mysql/get_password.h
+ mysql/group_replication_priv.h
+ mysql/innodb_priv.h
+ mysql/mysql_lex_string.h
+ mysql/plugin.h
+ mysql/plugin_audit.h
+ mysql/plugin_audit.h.pp
+ mysql/plugin_auth.h
+ mysql/plugin_auth.h.pp
+ mysql/plugin_auth_common.h
+ mysql/plugin_ftparser.h
+ mysql/plugin_ftparser.h.pp
+ mysql/plugin_group_replication.h
+ mysql/plugin_keyring.h
+ mysql/plugin_keyring.h.pp
+ mysql/plugin_query_rewrite.h
+ mysql/plugin_trace.h
+ mysql/plugin_validate_password.h
+ mysql/service_command.h
+ mysql/service_locking.h
+ mysql/service_my_plugin_log.h
+ mysql/service_mysql_alloc.h
+ mysql/service_mysql_keyring.h
+ mysql/service_mysql_password_policy.h
+ mysql/service_mysql_string.h
+ mysql/service_parser.h
+ mysql/service_plugin_registry.h
+ mysql/service_rpl_transaction_ctx.h
+ mysql/service_rpl_transaction_write_set.h
+ mysql/service_rules_table.h
+ mysql/service_security_context.h
+ mysql/service_srv_session.h
+ mysql/service_srv_session_info.h
+ mysql/service_ssl_wrapper.h
+ mysql/service_thd_alloc.h
+ mysql/service_thd_engine_lock.h
+ mysql/service_thd_wait.h
+ mysql/service_thread_scheduler.h
+ mysql/services.h
+ mysql/services.h.pp
+ mysql/thread_pool_priv.h
+ mysql/thread_type.h
+ mysql/udf_registration_types.h
)
INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development)

View File

@ -1,11 +0,0 @@
--- include/my_compare.h.orig 2018-04-08 06:44:49 UTC
+++ include/my_compare.h
@@ -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_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24 + 6 + 6)

View File

@ -1,11 +0,0 @@
--- include/myisam.h.orig 2018-04-08 06:44:49 UTC
+++ include/myisam.h
@@ -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_BUFF (MI_MAX_KEY_LENGTH + MI_MAX_KEY_SEG * 6 + 8 + 8)

View File

@ -1,23 +0,0 @@
--- libmysql/CMakeLists.txt.orig 2017-06-27 11:44:29 UTC
+++ libmysql/CMakeLists.txt
@@ -181,6 +181,11 @@ IF (WIN32 AND OPENSSL_APPLINK_C)
)
ENDIF()
+INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
+IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ ADD_COMPILE_FLAGS(${CLIENT_SOURCES} COMPILE_FLAGS "-fPIC")
+ENDIF()
+
#
# Include protocol tracing infrastructure and the test
# trace plugin if enabled by build options.
@@ -254,7 +258,7 @@ IF(NOT DISABLE_SHARED)
COMPONENT SharedLibraries)
IF(UNIX)
# libtool compatability
- IF(FREEBSD OR APPLE)
+ IF(FREEBSD OR APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD|DragonFly")
SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
ELSE()
SET(OS_SHARED_LIB_VERSION

View File

@ -1,13 +0,0 @@
--- man/CMakeLists.txt.orig 2019-06-25 10:23:30 UTC
+++ man/CMakeLists.txt
@@ -22,10 +22,6 @@
# Copy man pages
FILE(GLOB MAN1 *.1)
-FILE(GLOB MAN1_NDB ndb*.1)
-FILE(GLOB MAN1_ROUTER mysqlrouter*.1)
-FILE(GLOB MAN8 *.8)
-FILE(GLOB MAN8_NDB ndb*.8)
IF(MAN1_NDB AND NOT WITH_NDBCLUSTER)
LIST(REMOVE_ITEM MAN1 ${MAN1_NDB})
ENDIF()

View File

@ -1,60 +0,0 @@
--- mysys/my_default.cc.orig 2016-08-25 11:52:06 UTC
+++ mysys/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++;
/* Ignore comment and empty lines */
@@ -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;
+ if (!my_stat(file_name, &stat_info, MYF(0))) return 0;
/*
Ignore .mylogin.cnf file if not exclusively readable/writable
by current user.

View File

@ -1,11 +0,0 @@
--- mysys/my_md5.cc.orig 2018-04-08 06:44:49 UTC
+++ mysys/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,

View File

@ -1,37 +0,0 @@
--- 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) {

View File

@ -1,73 +0,0 @@
--- scripts/CMakeLists.txt.orig 2018-10-07 08:44:22 UTC
+++ scripts/CMakeLists.txt
@@ -80,6 +80,7 @@ ELSE()
MESSAGE(FATAL_ERROR "Cannot concatenate files")
ENDIF()
+IF(FALSE)
# Build mysql_fix_privilege_tables.h
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables_sql.h
@@ -100,6 +101,7 @@ ADD_CUSTOM_TARGET(GenFixPrivs
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables_sql.h
${CMAKE_CURRENT_BINARY_DIR}/sql_commands_sys_schema.h
)
+ENDIF()
# If we do not have performance schema compiled in then sys will not work,
# so only create an empty sys database with an auto-generated file,
@@ -204,6 +206,7 @@ IF(NOT WITHOUT_SERVER)
)
ENDIF()
+IF(FALSE)
IF(UNIX)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_binary_distribution
"cd ${CMAKE_BINARY_DIR} && '${CMAKE_CPACK_COMMAND}' -G TGZ --config CPackConfig.cmake\n" )
@@ -211,6 +214,7 @@ IF(UNIX)
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/make_binary_distribution
)
ENDIF()
+ENDIF()
# TCMalloc hacks
IF(MALLOC_LIB)
@@ -364,7 +368,7 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
LIST(REMOVE_DUPLICATES ${target}_LIB_DEPENDS)
FOREACH(lib ${${target}_LIB_DEPENDS})
# Filter out "general", it is not a library, just CMake hint
- IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} ")
+ IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} " AND NOT lib STREQUAL "imported_openssl" AND NOT lib STREQUAL "imported_crypto")
IF (lib MATCHES "^\\-l")
SET(${var} "${${var}} ${lib} ")
ELSEIF(lib MATCHES "^/")
@@ -372,6 +376,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()
@@ -454,19 +460,7 @@ 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
- )
- ENDIF()
+ SET(BIN_SCRIPTS mysql_config)
SET(PKGCONFIG_FILE ${LIBMYSQL_OS_OUTPUT_NAME}.pc)
STRING(REGEX REPLACE "/mysql$" "" PKGCONFIG_DIR "${INSTALL_LIBDIR}")

View File

@ -1,27 +0,0 @@
--- 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()

View File

@ -1,11 +0,0 @@
--- sql-common/client.cc.orig 2018-04-08 06:44:49 UTC
+++ sql-common/client.cc
@@ -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;

View File

@ -1,11 +0,0 @@
--- 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);

View File

@ -1,11 +0,0 @@
--- sql/mysqld.cc.orig 2018-05-06 19:15:48 UTC
+++ sql/mysqld.cc
@@ -4321,7 +4321,7 @@ static void init_ssl() {
static void init_ssl() {
#ifdef HAVE_OPENSSL
-#if !defined(HAVE_WOLFSSL) && !defined(__sun)
+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) && !defined(__sun)
#if defined(HAVE_PSI_MEMORY_INTERFACE)
static PSI_memory_info all_openssl_memory[] = {
{&key_memory_openssl, "openssl_malloc", 0, 0,

View File

@ -1,29 +0,0 @@
--- 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),

View File

@ -1,22 +0,0 @@
--- 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;

View File

@ -1,27 +0,0 @@
--- support-files/CMakeLists.txt.orig 2017-06-27 11:44:29 UTC
+++ support-files/CMakeLists.txt
@@ -29,9 +29,11 @@
SET(localstatedir "${MYSQL_DATADIR}")
+IF(FALSE)
SET(prefix "${CMAKE_INSTALL_PREFIX}")
SET(bindir ${prefix}/${INSTALL_BINDIR})
SET(sbindir ${prefix}/${INSTALL_SBINDIR})
+ENDIF()
IF(LINUX)
SET (PIDOF "pidof")
@@ -39,6 +41,7 @@
SET (PIDOF "pgrep -d' ' -f")
ENDIF()
+IF(FALSE)
FOREACH(script
mysql.server
mysqld_multi.server
@@ -54,3 +57,4 @@
GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
ENDFOREACH()
+ENDIF()

View File

@ -1,24 +0,0 @@
--- utilities/CMakeLists.txt.orig 2018-12-20 20:14:03 UTC
+++ utilities/CMakeLists.txt
@@ -59,6 +59,7 @@ FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR
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}/share/charsets
--out-dir=${PROJECT_BINARY_DIR}/${INSTALL_MYSQLSHAREDIR}/
@@ -92,6 +93,7 @@ IF(APPLE AND HAVE_CRYPTO_DYLIB AND HAVE_
ADD_DEPENDENCIES(comp_err copy_openssl_dlls)
ENDIF()
+IF(FALSE)
MYSQL_ADD_EXECUTABLE(my_print_defaults my_print_defaults.cc)
TARGET_LINK_LIBRARIES(my_print_defaults mysys mysys_ssl)
SET_TARGET_PROPERTIES(my_print_defaults PROPERTIES LINKER_LANGUAGE CXX)
@@ -168,4 +170,5 @@ IF(WITH_INNOBASE_STORAGE_ENGINE)
mysys innodb_zipdecompress ${LZ4_LIBRARY})
ADD_DEPENDENCIES(ibd2sdi GenError)
+ENDIF()
ENDIF()

View File

@ -1,47 +0,0 @@
--- 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;
}

View File

@ -1,7 +1,7 @@
bin/my_print_defaults
bin/mysql
bin/mysql_config
bin/mysql_config_editor
bin/mysql_ssl_rsa_setup
bin/mysqladmin
bin/mysqlbinlog
bin/mysqlcheck
@ -10,6 +10,8 @@ bin/mysqlimport
bin/mysqlpump
bin/mysqlshow
bin/mysqlslap
bin/perror
bin/zlib_decompress
include/mysql/base64.h
include/mysql/big_endian.h
include/mysql/c_string_less.h
@ -41,6 +43,7 @@ include/mysql/my_check_opt.h
include/mysql/my_command.h
include/mysql/my_compare.h
include/mysql/my_compiler.h
include/mysql/my_compress.h
include/mysql/my_dbug.h
include/mysql/my_default.h
include/mysql/my_dir.h
@ -181,8 +184,10 @@ lib/mysql/libmysqlclient.so.21
lib/mysql/libmysqlclient_r.a
lib/mysql/libmysqlclient_r.so
lib/mysql/libmysqlclient_r.so.21
%%SASLCLIENT%%lib/mysql/plugin/authentication_ldap_sasl_client.so
libdata/pkgconfig/mysqlclient.pc
man/man1/comp_err.1.gz
man/man1/lz4_decompress.1.gz
man/man1/mysql.1.gz
man/man1/mysql_config.1.gz
man/man1/mysql_config_editor.1.gz
@ -191,6 +196,10 @@ man/man1/mysqlbinlog.1.gz
man/man1/mysqlcheck.1.gz
man/man1/mysqldump.1.gz
man/man1/mysqlimport.1.gz
man/man1/mysqlman.1.gz
man/man1/mysqlpump.1.gz
man/man1/mysqlshow.1.gz
man/man1/mysqlslap.1.gz
man/man1/perror.1.gz
man/man1/zlib_decompress.1.gz
share/aclocal/mysql.m4

View File

@ -2,8 +2,8 @@
# $FreeBSD$
PORTNAME?= mysql
PORTVERSION= 8.0.17
PORTREVISION?= 2
PORTVERSION= 8.0.18
PORTREVISION?= 0
CATEGORIES= databases
MASTER_SITES= MYSQL/MySQL-8.0
PKGNAMESUFFIX?= 80-server
@ -18,7 +18,7 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}${DISTVERSIONSUFFIX}
SLAVEDIRS= databases/mysql80-client
USES= bison:build cmake:noninja compiler:c++14-lang cpe \
libedit localbase perl5 pkgconfig shebangfix ssl
libedit localbase ncurses perl5 pkgconfig shebangfix ssl
USE_PERL5= run
@ -26,10 +26,11 @@ MY_DBDIR= /var/db/mysql
MY_SECDIR= /var/db/mysql_secure
MY_TMPDIR= /var/db/mysql_tmpdir
LIB_DEPENDS+= libevent.so:devel/libevent \
LIB_DEPENDS+= libcurl.so:ftp/curl \
libevent.so:devel/libevent \
libicutu.so:devel/icu \
liblz4.so:archivers/liblz4 \
libre2.so:devel/re2 \
libzstd.so:archivers/zstd \
libprotobuf.so:devel/protobuf \
libunwind.so:devel/libunwind
@ -51,7 +52,7 @@ CMAKE_ARGS+= -DINSTALL_LAYOUT=FREEBSD \
-DINSTALL_MYSQLDATADIR="${MY_DBDIR}" \
-DINSTALL_MYSQLKEYRINGDIR="etc/mysql/keyring" \
-DINSTALL_MYSQLSHAREDIR="share/mysql" \
-DINSTALL_MYSQLTESTDIR="share/mysql/tests" \
-DINSTALL_MYSQLTESTDIR="" \
-DINSTALL_PLUGINDIR="lib/mysql/plugin" \
-DINSTALL_SBINDIR="libexec" \
-DINSTALL_SCRIPTDIR="bin" \
@ -65,11 +66,13 @@ CMAKE_ARGS+= -DINSTALL_LAYOUT=FREEBSD \
-DWITH_LIBEVENT=system \
-DWITH_LZ4=system \
-DWITH_ICU=system \
-DWITH_RE2=system \
-DWITH_CURL=system \
-DWITH_ZLIB=system \
-DWITH_ZSTD=system \
-DWITH_PROTOBUF=system \
-DWITH_SSL=${OPENSSLBASE} \
-DBUILD_BUNDLED_ZLIB=0 \
-DBUILD_BUNDLED_LZ4=0 \
-DINSTALL_MYSQLTESTDIR=0
SHEBANG_FILES= scripts/*.pl* scripts/*.sh
@ -105,14 +108,14 @@ 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
MMAN1= ibd2sdi.1 innochecksum.1 my_print_defaults.1 myisam_ftdump.1 myisamchk.1 \
myisamlog.1 myisampack.1 mysql_secure_installation.1 mysql_ssl_rsa_setup.1 \
mysql_tzinfo_to_sql.1 mysql_upgrade.1 mysql.server.1 mysqldumpslow.1 mysqld_multi.1 \
mysqld_safe.1 mysqlrouter_passwd.1 mysqlrouter_plugin_info.1 mysqlrouter.1
MMAN8= mysqld.8
CMAKE_ARGS+= -DWITH_EMBEDDED_SERVER="ON"
CMAKE_ARGS+= -DWITHOUT_CLIENTLIBS="ON"
OPTIONS_GROUP= STORAGE
OPTIONS_GROUP_STORAGE= ARCHIVE BLACKHOLE EXAMPLE FEDERATED INNOBASE PARTITION PERFSCHEMA
@ -156,18 +159,9 @@ SUB_LIST+= LEGACY_LIMITS="" MODERN_LIMITS="@comment "
.include <bsd.port.pre.mk>
.if ${SSL_DEFAULT} == base
CMAKE_ARGS+= -DWITH_SSL=system
.else
CMAKE_ARGS+= -DWITH_SSL=${OPENSSLBASE}
.endif
post-extract:
@${RM} -rv ${WRKSRC}/sql/sql_hints.yy.cc ${WRKSRC}/sql/sql_hints.yy.h
post-patch:
@${REINPLACE_CMD} 's/*.1/${MMAN1}/' ${WRKSRC}/man/CMakeLists.txt
.if !defined(CLIENT_ONLY)
post-install:
${MKDIR} ${STAGEDIR}${ETCDIR}

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1565048626
SHA256 (mysql-boost-8.0.17.tar.gz) = d44231316ce30a1d1189125ceed86d3388409778e17d0e3b9a060f532463e29a
SIZE (mysql-boost-8.0.17.tar.gz) = 189322239
TIMESTAMP = 1578004259
SHA256 (mysql-boost-8.0.18.tar.gz) = 0eccd9d79c04ba0ca661136bb29085e3833d9c48ed022d0b9aba12236994186b
SIZE (mysql-boost-8.0.18.tar.gz) = 194953221

View File

@ -1,35 +1,76 @@
--- CMakeLists.txt.orig 2019-01-21 19:00:53 UTC
--- CMakeLists.txt.orig 2019-09-20 08:30:51 UTC
+++ CMakeLists.txt
@@ -1045,7 +1045,6 @@ IF(UNIX)
@@ -1181,10 +1181,10 @@ ENDIF()
MYSQL_CHECK_SSL()
MYSQL_CHECK_SSL_DLLS()
-# Add system/bundled editline.
-MYSQL_CHECK_EDITLINE()
# Add libevent
-MYSQL_CHECK_LIBEVENT()
+IF(NOT WITHOUT_SERVER)
+ MYSQL_CHECK_LIBEVENT()
+ENDIF()
# Add lz4 library
MYSQL_CHECK_LZ4()
# Add icu library
@@ -1273,7 +1273,9 @@ IF(WITH_UNIT_TESTS)
INCLUDE(googletest)
ENDIF()
-ADD_SUBDIRECTORY(include)
+IF(NOT WITHOUT_CLIENTLIBS)
+ ADD_SUBDIRECTORY(include)
+ENDIF(NOT WITHOUT_CLIENTLIBS)
ADD_SUBDIRECTORY(strings)
ADD_SUBDIRECTORY(vio)
ADD_SUBDIRECTORY(mysys)
@@ -1314,24 +1316,29 @@ IF(WITH_UNIT_TESTS)
ADD_SUBDIRECTORY(unittest/mytap/t)
ENDIF()
-ADD_SUBDIRECTORY(client)
+IF(NOT WITHOUT_TOOLS)
+ # Add system/bundled editline
+ MYSQL_CHECK_EDITLINE()
+ ADD_SUBDIRECTORY(client)
+ENDIF(NOT WITHOUT_TOOLS)
+
ADD_SUBDIRECTORY(utilities)
-ADD_SUBDIRECTORY(share)
ADD_SUBDIRECTORY(libservices)
IF(NOT WITHOUT_SERVER)
- ADD_SUBDIRECTORY(testclients)
ADD_SUBDIRECTORY(testclients)
+ ADD_SUBDIRECTORY(share)
ADD_SUBDIRECTORY(sql)
ENDIF()
@@ -1054,8 +1053,6 @@ ENDIF()
# scripts/mysql_config depends on client and server targets loaded above.
# It is referenced by some of the directories below, so we insert it here.
ADD_SUBDIRECTORY(scripts)
+ADD_SUBDIRECTORY(support-files)
IF(NOT WITHOUT_SERVER)
- ADD_SUBDIRECTORY(mysql-test)
- ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess)
ADD_SUBDIRECTORY(support-files)
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)
@@ -1152,6 +1149,7 @@ ENDIF()
#
# RPM installs documentation directly from the source tree
#
ENDIF()
@@ -1440,6 +1447,7 @@ IF(PACK_SEPARATE_COMPONENTS)
SET(CPACK_COMPONENTS_GROUPING IGNORE)
ENDIF()
+IF(FALSE)
IF(NOT INSTALL_LAYOUT MATCHES "RPM")
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})
@@ -1170,6 +1168,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM")
IF(UNIX)
INSTALL(FILES
Docs/mysql.info
@@ -1474,6 +1482,7 @@ IF(NOT INSTALL_LAYOUT MATCHES "RPM")
PATTERN "sp-imp-spec.txt" EXCLUDE
PATTERN "README.build" EXCLUDE
)
ENDIF()
+ENDIF()
ENDIF()
# Now that we're done with all ADD_SUBDIRECTORY and thus all feature tests,
# we can safely enable ASan on Clang/Win32 if needed.

View File

@ -1,52 +1,75 @@
--- client/CMakeLists.txt.orig 2018-12-20 20:14:03 UTC
--- client/CMakeLists.txt.orig 2019-09-20 08:30:51 UTC
+++ client/CMakeLists.txt
@@ -26,14 +26,14 @@ INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compil
@@ -23,8 +23,11 @@
## Subdirectory with common client code.
ADD_SUBDIRECTORY(base)
-## Subdirectory for mysqlpump code.
-ADD_SUBDIRECTORY(dump)
## Subdirectory for mysqlpump code.
+IF(WITHOUT_SERVER)
ADD_SUBDIRECTORY(dump)
+ENDIF()
+IF(FALSE)
MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc ../sql-common/sql_string.cc pattern_matcher.cc ${CMAKE_SOURCE_DIR}/sql/net_ns.cc)
TARGET_LINK_LIBRARIES(mysql mysqlclient)
IF(UNIX)
TARGET_LINK_LIBRARIES(mysql ${EDITLINE_LIBRARY})
ENDIF(UNIX)
+IF(NOT WITHOUT_CLIENTLIBS)
MYSQL_ADD_EXECUTABLE(mysql
${CMAKE_SOURCE_DIR}/sql-common/net_ns.cc
completion_hash.cc
@@ -33,6 +36,7 @@ MYSQL_ADD_EXECUTABLE(mysql
readline.cc
LINK_LIBRARIES mysqlclient client_base ${EDITLINE_LIBRARY}
)
+ENDIF()
IF(NOT WITHOUT_SERVER)
MYSQL_ADD_EXECUTABLE(mysql_upgrade upgrade/program.cc)
@@ -56,6 +56,7 @@ ADD_DEPENDENCIES(mysqltest GenError GenC
ADD_CONVENIENCE_LIBRARY(mysqlcheck_core check/mysqlcheck_core.cc)
TARGET_LINK_LIBRARIES(mysqlcheck_core mysqlclient)
MYSQL_ADD_EXECUTABLE(mysql_upgrade
@@ -48,6 +52,7 @@ IF(SOLARIS_SPARC AND CMAKE_BUILD_TYPE_UPPER STREQUAL "
)
ENDIF()
+IF(FALSE)
MYSQL_ADD_EXECUTABLE(mysqlcheck check/mysqlcheck.cc)
TARGET_LINK_LIBRARIES(mysqlcheck mysqlcheck_core)
+IF(NOT WITHOUT_SERVER)
MYSQL_ADD_EXECUTABLE(mysqltest
mysqltest.cc
mysqltest/error_names.cc
@@ -63,6 +68,9 @@ MYSQL_ADD_EXECUTABLE(mysqltest
ENABLE_EXPORTS
LINK_LIBRARIES mysqlclient
)
+ENDIF()
+
+IF(WITHOUT_SERVER)
MYSQL_ADD_EXECUTABLE(mysqlcheck
check/mysqlcheck.cc
check/mysqlcheck_core.cc
@@ -80,6 +88,7 @@ MYSQL_ADD_EXECUTABLE(mysqlshow
mysqlshow.cc
LINK_LIBRARIES mysqlclient
)
+
MYSQL_ADD_EXECUTABLE(mysqlbinlog
mysqlbinlog.cc
${CMAKE_SOURCE_DIR}/sql/json_binary.cc
@@ -104,7 +113,9 @@ MYSQL_ADD_EXECUTABLE(mysqlbinlog
@@ -68,7 +69,9 @@ TARGET_LINK_LIBRARIES(mysqlimport mysqlc
MYSQL_ADD_EXECUTABLE(mysqlshow mysqlshow.cc)
TARGET_LINK_LIBRARIES(mysqlshow mysqlclient)
TARGET_COMPILE_DEFINITIONS(mysqlbinlog PRIVATE DISABLE_PSI_MUTEX)
TARGET_INCLUDE_DIRECTORIES(mysqlbinlog PRIVATE ${CMAKE_SOURCE_DIR}/sql)
+ENDIF()
+IF(FALSE)
MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc)
SET(MYSQLBINLOG_LIB_SOURCES
${CMAKE_SOURCE_DIR}/strings/decimal.cc
@@ -107,12 +110,15 @@ TARGET_LINK_LIBRARIES(mysqlslap mysqlcli
MYSQL_ADD_EXECUTABLE(mysql_config_editor mysql_config_editor.cc)
TARGET_LINK_LIBRARIES(mysql_config_editor mysqlclient)
+IF(WITHOUT_SERVER)
MYSQL_ADD_EXECUTABLE(mysqladmin
mysqladmin.cc
LINK_LIBRARIES mysqlclient
@@ -117,6 +128,9 @@ MYSQL_ADD_EXECUTABLE(mysql_config_editor
mysql_config_editor.cc
LINK_LIBRARIES mysqlclient
)
+ENDIF()
MYSQL_ADD_EXECUTABLE(mysql_secure_installation mysql_secure_installation.cc)
TARGET_LINK_LIBRARIES(mysql_secure_installation mysqlclient)
+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)
+
+IF(NOT WITHOUT_SERVER)
MYSQL_ADD_EXECUTABLE(mysql_secure_installation
mysql_secure_installation.cc
LINK_LIBRARIES mysqlclient
@@ -127,6 +141,7 @@ MYSQL_ADD_EXECUTABLE(mysql_ssl_rsa_setup
path.cc
LINK_LIBRARIES mysys
)
+ENDIF()
# "WIN32" also covers 64 bit. "echo" is used in some files below "mysql-test/".

View File

@ -1,4 +1,4 @@
--- cmake/os/FreeBSD.cmake.orig 2019-06-25 10:23:30 UTC
--- cmake/os/FreeBSD.cmake.orig 2019-09-20 08:30:51 UTC
+++ cmake/os/FreeBSD.cmake
@@ -45,8 +45,20 @@ IF(NOT FORCE_UNSUPPORTED_COMPILER)
MESSAGE(FATAL_ERROR
@ -22,4 +22,4 @@
+ ENDIF()
ENDIF()
ENDIF()

View File

@ -1,12 +1,12 @@
--- cmake/plugin.cmake.orig 2017-06-27 11:44:29 UTC
--- cmake/plugin.cmake.orig 2019-09-20 08:30:51 UTC
+++ cmake/plugin.cmake
@@ -207,9 +207,6 @@ MACRO(MYSQL_ADD_PLUGIN)
@@ -226,9 +226,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})
# For internal testing in PB2, append collections files
IF(DEFINED ENV{PB2WORKDIR})
PLUGIN_APPEND_COLLECTIONS(${plugin})
ENDIF()
ELSE()
IF(WITHOUT_${plugin})

View File

@ -1,14 +1,28 @@
--- cmake/ssl.cmake.orig 2018-04-29 16:21:47 UTC
--- cmake/ssl.cmake.orig 2019-09-20 08:30:51 UTC
+++ cmake/ssl.cmake
@@ -265,10 +265,10 @@ MACRO (MYSQL_CHECK_SSL)
OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
@@ -199,7 +199,7 @@ MACRO (MYSQL_CHECK_SSL)
# Encoded as MNNFFPPS: major minor fix patch status
FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
OPENSSL_VERSION_NUMBER
- REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
+ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
)
STRING(REGEX REPLACE
"^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
@@ -214,13 +214,14 @@ MACRO (MYSQL_CHECK_SSL)
OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
)
ENDIF()
- IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
+ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION)
+ IF(HAVE_TLS1_3_VERSION)
ADD_DEFINITIONS(-DHAVE_TLSv13)
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")
+ OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1"
)
SET(OPENSSL_FOUND TRUE)
FIND_PROGRAM(OPENSSL_EXECUTABLE openssl

View File

@ -1,20 +0,0 @@
--- extra/libedit/vi.c.orig 2016-03-28 18:06:12 UTC
+++ extra/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;

View File

@ -1,4 +1,4 @@
--- extra/libedit/chartype.h.orig 2016-03-28 18:06:12 UTC
--- extra/libedit/chartype.h.orig 2019-09-20 08:30:51 UTC
+++ extra/libedit/chartype.h
@@ -49,7 +49,7 @@
TODO : Verify if FreeBSD & AIX stores ISO 10646 in wchar_t. */

View File

@ -1,6 +1,6 @@
--- extra/libedit/vi.c.orig 2016-03-28 18:06:12 UTC
--- extra/libedit/vi.c.orig 2019-09-20 08:30:51 UTC
+++ extra/libedit/vi.c
@@ -919,7 +919,7 @@ vi_comment_out(EditLine *el, Int c __att
@@ -919,7 +919,7 @@ vi_comment_out(EditLine *el, Int c __attribute__((__un
* NB: posix implies that we should enter insert mode, however
* this is against historical precedent...
*/

View File

@ -0,0 +1,19 @@
--- extra/libevent/openssl-compat.h.orig 2019-09-20 08:30:51 UTC
+++ extra/libevent/openssl-compat.h
@@ -24,12 +24,15 @@ static inline BIO_METHOD *BIO_meth_new(int type, const
#define BIO_set_init(b, val) (b)->init = (val)
#define BIO_set_data(b, val) (b)->ptr = (val)
#define BIO_set_shutdown(b, val) (b)->shutdown = (val)
-#define BIO_get_init(b) (b)->init
#define BIO_get_data(b) (b)->ptr
#define BIO_get_shutdown(b) (b)->shutdown
#define TLS_method SSLv23_method
#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
+
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#define BIO_get_init(b) (b)->init
+#endif
#endif /* OPENSSL_COMPAT_H */

View File

@ -1,10 +1,174 @@
--- include/CMakeLists.txt.orig 2017-06-27 11:44:29 UTC
--- include/CMakeLists.txt.orig 2019-09-20 08:30:51 UTC
+++ include/CMakeLists.txt
@@ -37,5 +37,7 @@ SET(HEADERS_MYSQL_DIR
@@ -37,10 +37,171 @@ SET(HEADERS
${CMAKE_CURRENT_BINARY_DIR}/mysql_version.h
${CMAKE_CURRENT_BINARY_DIR}/mysqld_error.h
field_types.h
+ base64.h
+ big_endian.h
+ c_string_less.h
+ crypt_genhash_impl.h
+ decimal.h
+ depth_first_search.h
+ dur_prop.h
+ errmsg.h
+ ft_global.h
+ heap.h
+ keycache.h
+ lex_string.h
+ lf.h
+ little_endian.h
+ m_ctype.h
+ m_string.h
+ map_helpers.h
+ mf_wcomp.h
+ mutex_lock.h
+ my_aes.h
+ my_alloc.h
+ my_atomic.h
+ my_base.h
+ my_bit.h
+ my_bitmap.h
+ my_byteorder.h
+ my_check_opt.h
+ my_command.h
+ my_compare.h
+ my_compiler.h
+ my_dbug.h
+ my_default.h
+ my_dir.h
+ my_double2ulonglong.h
+ my_getopt.h
+ my_hash_combine.h
+ my_icp.h
+ my_inttypes.h
+ my_io.h
+ my_list.h
+ my_loglevel.h
+ my_macros.h
+ my_md5.h
+ my_md5_size.h
+ my_murmur3.h
+ my_pointer_arithmetic.h
+ my_psi_config.h
+ my_rapidjson_size_t.h
+ my_rdtsc.h
+ my_rnd.h
+ my_sharedlib.h
+ my_shm_defaults.h
+ my_sqlcommand.h
+ my_stacktrace.h
+ my_sys.h
+ my_systime.h
+ my_table_map.h
+ my_thread.h
+ my_thread_local.h
+ my_thread_os_id.h
+ my_time.h
+ my_timer.h
+ my_tree.h
+ my_uctype.h
+ my_user.h
+ my_xml.h
+ myisam.h
+ myisammrg.h
+ myisampack.h
+ mysql.h
+ mysql.h.pp
+ mysql_com.h
+ mysql_com_server.h
+ mysql_time.h
+ mysql_version.h.in
+ mysys_err.h
+ nullable.h
+ password.h
+ pfs_cond_provider.h
+ pfs_error_provider.h
+ pfs_file_provider.h
+ pfs_idle_provider.h
+ pfs_memory_provider.h
+ pfs_metadata_provider.h
+ pfs_mutex_provider.h
+ pfs_rwlock_provider.h
+ pfs_socket_provider.h
+ pfs_stage_provider.h
+ pfs_statement_provider.h
+ pfs_table_provider.h
+ pfs_thread_provider.h
+ pfs_transaction_provider.h
+ prealloced_array.h
+ print_version.h
+ priority_queue.h
+ rwlock_scoped_lock.h
+ scope_guard.h
+ service_versions.h
+ sha1.h
+ sha2.h
+ sql_chars.h
+ sql_common.h
+ sql_string.h
+ sslopt-case.h
+ sslopt-longopts.h
+ sslopt-vars.h
+ template_utils.h
+ thr_cond.h
+ thr_lock.h
+ thr_mutex.h
+ thr_rwlock.h
+ typelib.h
+ varlen_sort.h
+ violite.h
+ welcome_copyright_notice.h
)
SET(HEADERS_MYSQL_DIR
mysql/client_plugin.h
mysql/plugin_auth_common.h
+ mysql/udf_registration_types.h
+ mysql/client_authentication.h
+ mysql/client_plugin.h.pp
+ mysql/com_data.h
+ mysql/get_password.h
+ mysql/group_replication_priv.h
+ mysql/innodb_priv.h
+ mysql/mysql_lex_string.h
+ mysql/plugin.h
+ mysql/plugin_audit.h
+ mysql/plugin_audit.h.pp
+ mysql/plugin_auth.h
+ mysql/plugin_auth.h.pp
+ mysql/plugin_auth_common.h
+ mysql/plugin_ftparser.h
+ mysql/plugin_ftparser.h.pp
+ mysql/plugin_group_replication.h
+ mysql/plugin_keyring.h
+ mysql/plugin_keyring.h.pp
+ mysql/plugin_query_rewrite.h
+ mysql/plugin_trace.h
+ mysql/plugin_validate_password.h
+ mysql/service_command.h
+ mysql/service_locking.h
+ mysql/service_my_plugin_log.h
+ mysql/service_mysql_alloc.h
+ mysql/service_mysql_keyring.h
+ mysql/service_mysql_password_policy.h
+ mysql/service_mysql_string.h
+ mysql/service_parser.h
+ mysql/service_plugin_registry.h
+ mysql/service_rpl_transaction_ctx.h
+ mysql/service_rpl_transaction_write_set.h
+ mysql/service_rules_table.h
+ mysql/service_security_context.h
+ mysql/service_srv_session.h
+ mysql/service_srv_session_info.h
+ mysql/service_ssl_wrapper.h
+ mysql/service_thd_alloc.h
+ mysql/service_thd_engine_lock.h
+ mysql/service_thd_wait.h
+ mysql/service_thread_scheduler.h
+ mysql/services.h
+ mysql/services.h.pp
+ mysql/thread_pool_priv.h
+ mysql/thread_type.h
mysql/udf_registration_types.h
)
+IF(FALSE)
INSTALL(FILES ${HEADERS} DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development)
INSTALL(FILES ${HEADERS_MYSQL_DIR} DESTINATION ${INSTALL_INCLUDEDIR}/mysql COMPONENT Development)
+ENDIF()

View File

@ -1,4 +1,4 @@
--- include/my_compare.h.orig 2018-04-08 06:44:49 UTC
--- include/my_compare.h.orig 2019-09-20 08:30:51 UTC
+++ include/my_compare.h
@@ -49,7 +49,7 @@
But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.

View File

@ -1,6 +1,6 @@
--- include/my_thread_os_id.h.orig 2016-03-28 18:06:12 UTC
--- include/my_thread_os_id.h.orig 2019-09-20 08:30:51 UTC
+++ include/my_thread_os_id.h
@@ -75,8 +75,12 @@ static inline my_thread_os_id_t my_threa
@@ -84,8 +84,12 @@ static inline my_thread_os_id_t my_thread_os_id() {
return pthread_getthreadid_np();
#else
#ifdef HAVE_INTEGER_PTHREAD_SELF

View File

@ -1,4 +1,4 @@
--- include/myisam.h.orig 2018-04-08 06:44:49 UTC
--- include/myisam.h.orig 2019-09-20 08:30:51 UTC
+++ include/myisam.h
@@ -59,7 +59,7 @@
The following defines can be increased if necessary.

View File

@ -0,0 +1,14 @@
--- include/violite.h.orig 2019-09-20 08:30:51 UTC
+++ include/violite.h
@@ -269,9 +269,11 @@ struct st_VioSSLFd *new_VioSSLConnectorFd(
long process_tls_version(const char *tls_version);
+#ifndef LIBRESSL_VERSION_NUMBER
int set_fips_mode(const uint fips_mode, char *err_string);
uint get_fips_mode();
+#endif
struct st_VioSSLFd *new_VioSSLAcceptorFd(
const char *key_file, const char *cert_file, const char *ca_file,

View File

@ -1,31 +1,70 @@
--- libmysql/CMakeLists.txt.orig 2018-12-20 20:14:03 UTC
--- libmysql/CMakeLists.txt.orig 2019-09-20 08:30:51 UTC
+++ libmysql/CMakeLists.txt
@@ -239,7 +239,7 @@ MESSAGE(STATUS "Creating LDAP authentica
ADD_SUBDIRECTORY(authentication_ldap)
# Merge several convenience libraries into one big mysqlclient
@@ -192,6 +192,11 @@ IF (WIN32 AND OPENSSL_APPLINK_C)
)
ENDIF()
+INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
+IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ ADD_COMPILE_FLAGS(${CLIENT_SOURCES} COMPILE_FLAGS "-fPIC")
+ENDIF()
+
#
# Include protocol tracing infrastructure and the test
# trace plugin if enabled by build options.
@@ -240,12 +245,17 @@ IF(WIN32)
LIST(APPEND LIBS_TO_MERGE auth_win_client)
ENDIF()
-# LDAP authentication SASL client plugin
-MESSAGE(STATUS "Creating LDAP authentication SASL client library.")
-ADD_SUBDIRECTORY(authentication_ldap)
-
-# Merge several convenience libraries into one big mysqlclient
-MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE} COMPONENT Development)
+MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE} COMPONENT Development SKIP_INSTALL)
+IF(WITHOUT_CLIENTLIBS)
+ # Merge several convenience libraries into one big mysqlclient
+ MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE} COMPONENT Development SKIP_INSTALL)
+ELSE(WITHOUT_CLIENTLIBS)
+ # LDAP authentication SASL client plugin
+ MESSAGE(STATUS "Creating LDAP authentication SASL client library.")
+ ADD_SUBDIRECTORY(authentication_ldap)
+
+ # Merge several convenience libraries into one big mysqlclient
+ MERGE_CONVENIENCE_LIBRARIES(mysqlclient ${LIBS_TO_MERGE} COMPONENT Development)
+ENDIF(WITHOUT_CLIENTLIBS)
TARGET_LINK_LIBRARIES(mysqlclient PRIVATE ${LIBS_TO_LINK})
# Visual Studio users need debug static library for debug projects
@@ -280,9 +280,10 @@ IF(NOT DISABLE_SHARED)
# and link them together into shared library.
MERGE_LIBRARIES_SHARED(libmysql ${LIBS_TO_MERGE}
EXPORTS ${CLIENT_API_FUNCTIONS} ${CLIENT_API_FUNCTIONS_UNDOCUMENTED} ${CLIENT_API_NONBLOCKING_FUNCTIONS}
- COMPONENT SharedLibraries)
+ COMPONENT SharedLibraries SKIP_INSTALL)
TARGET_LINK_LIBRARIES(libmysql PRIVATE ${LIBS_TO_LINK})
@@ -281,12 +291,22 @@ ENDIF()
+IF(FALSE)
IF(WIN32)
# So that libmysql_api_test below can find the .dll
ADD_CUSTOM_COMMAND(TARGET libmysql POST_BUILD
@@ -338,6 +339,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()
# Merge several convenience libraries into one big mysqlclient
# and link them together into shared library.
+IF(WITHOUT_CLIENTLIBS)
MERGE_LIBRARIES_SHARED(libmysql ${LIBS_TO_MERGE}
EXPORTS
${CLIENT_API_FUNCTIONS}
${CLIENT_API_FUNCTIONS_UNDOCUMENTED}
${CLIENT_API_NONBLOCKING_FUNCTIONS}
+ COMPONENT SharedLibraries
+ SKIP_INSTALL )
+ELSE(WITHOUT_CLIENTLIBS)
+MERGE_LIBRARIES_SHARED(libmysql ${LIBS_TO_MERGE}
+ EXPORTS
+ ${CLIENT_API_FUNCTIONS}
+ ${CLIENT_API_FUNCTIONS_UNDOCUMENTED}
+ ${CLIENT_API_NONBLOCKING_FUNCTIONS}
COMPONENT SharedLibraries)
+ENDIF(WITHOUT_CLIENTLIBS)
TARGET_LINK_LIBRARIES(libmysql PRIVATE ${LIBS_TO_LINK})
IF(WIN32)
@@ -300,7 +320,7 @@ ENDIF()
IF(UNIX)
# libtool compatability
- IF(FREEBSD OR APPLE)
+ IF(FREEBSD OR APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD|DragonFly")
SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
ELSE()
SET(OS_SHARED_LIB_VERSION

View File

@ -1,4 +1,4 @@
--- libservices/CMakeLists.txt.orig 2019-06-25 10:23:30 UTC
--- libservices/CMakeLists.txt.orig 2019-09-20 08:30:51 UTC
+++ libservices/CMakeLists.txt
@@ -45,7 +45,9 @@ SET(MYSQLSERVICES_SOURCES
plugin_registry_service.c)
@ -10,4 +10,3 @@
DESTINATION ${INSTALL_LIBDIR} COMPONENT Development)
+ENDIF()
ENDIF()

View File

@ -1,14 +1,74 @@
--- man/CMakeLists.txt.orig 2019-06-25 10:23:30 UTC
--- man/CMakeLists.txt.orig 2019-09-20 08:30:51 UTC
+++ man/CMakeLists.txt
@@ -21,9 +21,8 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -23,29 +23,14 @@
# Copy man pages
-FILE(GLOB MAN1 *.1)
-FILE(GLOB MAN1_NDB ndb*.1)
-FILE(GLOB MAN1_ROUTER mysqlrouter*.1)
+FILE(GLOB MAN1 *.1)
+FILE(GLOB MAN1_ROUTER mysqlroutermy_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)
FILE(GLOB MAN8 *.8)
FILE(GLOB MAN8_NDB ndb*.8)
IF(MAN1_NDB AND NOT WITH_NDBCLUSTER)
SET(MAN1
comp_err.1
- ibd2sdi.1
- innochecksum.1
lz4_decompress.1
- my_print_defaults.1
- myisam_ftdump.1
- myisamchk.1
- myisamlog.1
- myisampack.1
mysql.1
- mysql.server.1
mysql_config.1
mysql_config_editor.1
- mysql_secure_installation.1
- mysql_ssl_rsa_setup.1
- mysql_tzinfo_to_sql.1
- mysql_upgrade.1
mysqladmin.1
mysqlbinlog.1
mysqlcheck.1
- mysqld_multi.1
- mysqld_safe.1
mysqldump.1
- mysqldumpslow.1
mysqlimport.1
mysqlman.1
mysqlpump.1
@@ -54,6 +39,23 @@ SET(MAN1
perror.1
zlib_decompress.1
)
+SET(MAN1_TOOLS
+ ibd2sdi.1
+ innochecksum.1
+ my_print_defaults.1
+ myisam_ftdump.1
+ myisamchk.1
+ myisamlog.1
+ myisampack.1
+ mysql.server.1
+ mysql_secure_installation.1
+ mysql_ssl_rsa_setup.1
+ mysql_tzinfo_to_sql.1
+ mysql_upgrade.1
+ mysqldumpslow.1
+ mysqld_multi.1
+ mysqld_safe.1
+ )
SET(MAN1_NDB
ndb-common-options.1
ndb_blob_tool.1
@@ -99,8 +101,15 @@ SET(MAN8_NDB
ndbmtd.8
)
-INSTALL(FILES ${MAN1} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPages)
-INSTALL(FILES ${MAN8} DESTINATION ${INSTALL_MANDIR}/man8 COMPONENT ManPages)
+IF(NOT WITHOUT_CLIENTLIBS)
+ INSTALL(FILES ${MAN1} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPages)
+ENDIF()
+
+
+IF(NOT WITHOUT_SERVER)
+ INSTALL(FILES ${MAN1_TOOLS} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPages)
+ INSTALL(FILES ${MAN8} DESTINATION ${INSTALL_MANDIR}/man8 COMPONENT ManPages)
+ENDIF()
IF(WITH_ROUTER)
INSTALL(FILES ${MAN1_ROUTER}

View File

@ -1,11 +0,0 @@
--- mysys/my_md5.cc.orig 2018-04-08 06:44:49 UTC
+++ mysys/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,

View File

@ -1,6 +1,6 @@
--- mysys/my_default.cc.orig 2016-08-25 11:52:06 UTC
--- mysys/my_default.cc.orig 2019-09-20 08:30:51 UTC
+++ mysys/my_default.cc
@@ -114,7 +114,7 @@ static my_bool defaults_already_read= FA
@@ -203,7 +203,7 @@ bool no_defaults = false;
/* Which directories are searched for options (and in which order) */
@ -9,7 +9,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(
@@ -909,6 +909,14 @@ static int search_default_file_with_ext(Process_option
return 1; /* Ignore wrong files */
}
@ -24,7 +24,7 @@
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 *
@@ -1228,7 +1236,8 @@ void my_print_default_files(const char *conf_file) {
end[(strlen(end) - 1)] = ' ';
else
strxmov(end, conf_file, *ext, " ", NullS);
@ -34,23 +34,25 @@
}
}
}
@@ -1411,13 +1420,8 @@ static const char **init_default_directo
@@ -1565,14 +1574,9 @@ static const char **init_default_directories(MEM_ROOT
#else
- errors += add_directory(alloc, "/etc/", dirs);
- errors += add_directory(alloc, "/etc/mysql/", dirs);
-
+ errors += add_directory(alloc, "/usr/local/etc/", dirs);
+ errors += add_directory(alloc, "/usr/local/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
if ((env = getenv("MYSQL_HOME"))) errors += add_directory(alloc, env, dirs);
@@ -1635,7 +1639,7 @@ int check_file_permissions(const char *file_name, bool
#if !defined(_WIN32)
MY_STAT stat_info;
- if (!my_stat(file_name, &stat_info, MYF(0))) return 1;

View File

@ -0,0 +1,12 @@
--- mysys/my_md5.cc.orig 2019-09-20 08:30:51 UTC
+++ mysys/my_md5.cc
@@ -56,7 +56,9 @@ static void my_md5_hash(unsigned char *digest, unsigne
int compute_md5_hash(char *digest, const char *buf, int len) {
int retval = 0;
int fips_mode = 0;
+#ifndef LIBRESSL_VERSION_NUMBER
fips_mode = FIPS_mode();
+#endif /* LIBRESSL_VERSION_NUMBER */
/* If fips mode is ON/STRICT restricted method calls will result into abort,
* skipping call. */
if (fips_mode == 0) {

View File

@ -0,0 +1,31 @@
--- plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c.orig 2019-09-20 08:30:51 UTC
+++ plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c
@@ -329,6 +329,7 @@ error:
return 1;
}
+#ifndef LIBRESSL_VERSION_NUMBER
#define OPENSSL_ERROR_LENGTH 512
static int configure_ssl_fips_mode(const uint fips_mode) {
int rc = -1;
@@ -352,6 +353,7 @@ static int configure_ssl_fips_mode(const uint fips_mod
EXIT:
return rc;
}
+#endif
static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file,
const char *ca_path) {
@@ -555,10 +557,12 @@ int xcom_init_ssl(const char *server_key_file, const c
int verify_server = SSL_VERIFY_NONE;
int verify_client = SSL_VERIFY_NONE;
+#ifndef LIBRESSL_VERSION_NUMBER
if (configure_ssl_fips_mode(ssl_fips_mode) != 1) {
G_ERROR("Error setting the ssl fips mode");
goto error;
}
+#endif
SSL_library_init();
SSL_load_error_strings();

View File

@ -1,6 +1,6 @@
--- plugin/password_validation/validate_password.cc.orig 2017-06-27 11:44:29 UTC
--- plugin/password_validation/validate_password.cc.orig 2019-09-20 08:30:51 UTC
+++ plugin/password_validation/validate_password.cc
@@ -17,6 +17,8 @@
@@ -25,6 +25,8 @@
#include <mysql/plugin_validate_password.h>
#include <mysql/service_my_plugin_log.h>
#include <mysql/service_mysql_string.h>
@ -9,4 +9,3 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -1,16 +1,11 @@
--- plugin/x/CMakeLists.txt.orig 2018-04-08 06:44:49 UTC
--- plugin/x/CMakeLists.txt.orig 2019-09-20 08:30:51 UTC
+++ plugin/x/CMakeLists.txt
@@ -80,11 +80,14 @@ INCLUDE_DIRECTORIES(
@@ -77,6 +77,8 @@ INCLUDE_DIRECTORIES(
${MYSQLX_GENERATE_DIR}
${MYSQLX_PROTOCOL_INCLUDE_DIR}
${MYSQLX_CLIENT_INCLUDE_DIR}
+ ${OPENSSL_INCLUDE_DIR}
+ ${BOOST_INCLUDE_DIR}
)
MY_INCLUDE_SYSTEM_DIRECTORIES(PROTOBUF)
MY_INCLUDE_SYSTEM_DIRECTORIES(LIBEVENT)
MY_INCLUDE_SYSTEM_DIRECTORIES(ICU)
+MY_INCLUDE_SYSTEM_DIRECTORIES(SSL)
+MY_INCLUDE_SYSTEM_DIRECTORIES(ZLIB)
SET(MYSQLX_PROTBUF_AND_PROTOCOL_LIB

View File

@ -1,7 +1,7 @@
--- 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);
--- plugin/x/client/authentication/sha256_scramble_generator.cc.orig 2019-09-20 08:30:51 UTC
+++ plugin/x/client/authentication/sha256_scramble_generator.cc
@@ -97,7 +97,7 @@ bool SHA256_digest::retrieve_digest(unsigned char *dig
return true;
}
m_ok = EVP_DigestFinal_ex(md_context, m_digest, nullptr);
-#if OPENSSL_VERSION_NUMBER < 0x10100000L

View File

@ -1,37 +1,32 @@
--- plugin/x/client/xconnection_impl.cc.orig 2018-04-08 06:44:49 UTC
--- plugin/x/client/xconnection_impl.cc.orig 2019-09-20 08:30:51 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
@@ -521,6 +521,7 @@ XError Connection_impl::get_ssl_error(const int error_
return XError(CR_SSL_CONNECTION_ERROR, buffer);
}
-#ifndef HAVE_WOLFSSL
+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+#ifndef 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};
@@ -559,6 +560,7 @@ int set_fips_mode(const uint fips_mode, char err_strin
EXIT:
return rc;
}
+#endif
-#ifndef HAVE_WOLFSSL
+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
XError Connection_impl::activate_tls() {
if (nullptr == m_vio) return get_socket_error(SOCKET_ECONNRESET);
@@ -569,11 +571,13 @@ XError Connection_impl::activate_tls() {
if (!m_context->m_ssl_config.is_configured())
return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED, true};
+#ifndef 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) {
if (set_fips_mode(static_cast<int>(m_context->m_ssl_config.m_ssl_fips_mode),
err_string) != 1) {
return XError{CR_SSL_CONNECTION_ERROR, err_string, true};
}
+#endif
auto ssl_ctx_flags = process_tls_version(
details::null_when_empty(m_context->m_ssl_config.m_tls_version));

View File

@ -1,14 +1,14 @@
--- plugin/x/configure.cmake.orig 2018-04-08 06:44:49 UTC
--- plugin/x/configure.cmake.orig 2019-09-20 08:30:51 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
@@ -45,6 +45,7 @@ CONFIGURE_FILE(${MYSQLX_PROJECT_DIR}/src/config/mysqlx
CONFIGURE_FILE(${MYSQLX_PROJECT_DIR}/src/config/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
@@ -56,3 +57,4 @@ INSTALL(FILES ${MYSQLX_GENERATE_DIR}/mysqlx_ername.h
INSTALL(FILES ${MYSQLX_GENERATE_DIR}/mysqlx_version.h
DESTINATION ${INSTALL_INCLUDEDIR}
COMPONENT Development)

View File

@ -0,0 +1,11 @@
--- router/src/http/src/tls_client_context.cc.orig 2019-09-20 08:30:51 UTC
+++ router/src/http/src/tls_client_context.cc
@@ -54,7 +54,7 @@ void TlsClientContext::verify(TlsVerify verify) {
void TlsClientContext::cipher_suites(const std::string &ciphers) {
// TLSv1.3 ciphers are controlled via SSL_CTX_set_ciphersuites()
-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1)
+#ifdef TLS1_3_VERSION
if (1 != SSL_CTX_set_ciphersuites(ssl_ctx_.get(), ciphers.c_str())) {
throw TlsError("set-cipher-suites");
}

View File

@ -0,0 +1,34 @@
--- router/src/http/src/tls_context.cc.orig 2019-09-20 08:30:51 UTC
+++ router/src/http/src/tls_context.cc
@@ -91,7 +91,7 @@ static constexpr int o11x_version(TlsVersion version)
return TLS1_1_VERSION;
case TlsVersion::TLS_1_2:
return TLS1_2_VERSION;
-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1)
+#ifdef TLS1_3_VERSION
case TlsVersion::TLS_1_3:
return TLS1_3_VERSION;
#endif
@@ -121,9 +121,11 @@ void TlsContext::version_range(TlsVersion min_version,
default:
// unknown, leave all disabled
// fallthrough
+#ifdef TLS1_3_VERSION
case TlsVersion::TLS_1_3:
opts |= SSL_OP_NO_TLSv1_2;
// fallthrough
+#endif
case TlsVersion::TLS_1_2:
opts |= SSL_OP_NO_TLSv1_1;
// fallthrough
@@ -170,8 +172,10 @@ TlsVersion TlsContext::min_version() const {
return TlsVersion::TLS_1_1;
case TLS1_2_VERSION:
return TlsVersion::TLS_1_2;
+#ifdef TLS1_3_VERSION
case TLS1_3_VERSION:
return TlsVersion::TLS_1_3;
+#endif
case 0:
return TlsVersion::AUTO;
default:

View File

@ -0,0 +1,12 @@
--- router/src/http/src/tls_server_context.cc.orig 2019-09-20 08:30:51 UTC
+++ router/src/http/src/tls_server_context.cc
@@ -166,7 +166,8 @@ void TlsServerContext::init_tmp_dh(const std::string &
}
} else {
-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0)
+#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \
+ !defined(LIBRESSL_VERSION_NUMBER)
dh2048.reset(DH_get_2048_256());
#else
/*

View File

@ -1,6 +1,15 @@
--- scripts/CMakeLists.txt.orig 2016-03-28 18:06:12 UTC
--- scripts/CMakeLists.txt.orig 2019-09-20 08:30:51 UTC
+++ scripts/CMakeLists.txt
@@ -347,6 +347,8 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
@@ -327,7 +327,7 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
LIST(REMOVE_DUPLICATES ${target}_LIB_DEPENDS)
FOREACH(lib ${${target}_LIB_DEPENDS})
# Filter out "general", it is not a library, just CMake hint
- IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} ")
+ IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} " AND NOT lib STREQUAL "imported_openssl" AND NOT lib STREQUAL "imported_crypto")
IF (lib MATCHES "^\\-l")
SET(${var} "${${var}} ${lib} ")
ELSEIF (lib MATCHES "^\\-L")
@@ -337,6 +337,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} " )
@ -9,11 +18,8 @@
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)
@@ -423,18 +425,23 @@ ELSE()
+
IF(WITH_SYSTEMD)
SET(BIN_SCRIPTS
- mysql_config
@ -25,16 +31,29 @@
mysqldumpslow
mysqld_multi
mysqld_safe
@@ -485,7 +486,7 @@
)
ENDIF()
+ IF(NOT WITHOUT_CLIENTLIBS)
+ SET(BIN_SCRIPTS
+ ${BIN_SCRIPTS}
+ mysql_config
+ )
+ ENDIF(NOT WITHOUT_CLIENTLIBS)
+
SET(PKGCONFIG_FILE ${LIBMYSQL_OS_OUTPUT_NAME}.pc)
STRING(REGEX REPLACE "/mysql$" "" PKGCONFIG_DIR "${INSTALL_LIBDIR}")
SET(PKGCONFIG_DIR "${PKGCONFIG_DIR}/pkgconfig")
@@ -449,7 +456,7 @@ ELSE()
${CMAKE_CURRENT_BINARY_DIR}/${PKGCONFIG_FILE}
ESCAPE_QUOTES @ONLY)
- IF(INSTALL_PKGCONFIGDIR)
+ IF(FALSE)
+ IF(INSTALL_PKGCONFIGDIR AND NOT WITHOUT_CLIENTLIBS)
MESSAGE(STATUS "INSTALL ${PKGCONFIG_FILE} ${INSTALL_PKGCONFIGDIR}")
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/${PKGCONFIG_FILE}
@@ -498,7 +499,7 @@
@@ -462,7 +469,7 @@ ELSE()
FOREACH(file ${BIN_SCRIPTS})
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh

View File

@ -1,11 +1,11 @@
--- sql-common/client.cc.orig 2018-04-08 06:44:49 UTC
--- sql-common/client.cc.orig 2019-09-20 08:30:51 UTC
+++ sql-common/client.cc
@@ -5596,7 +5596,7 @@ int STDCALL mysql_options(MYSQL *mysql,
@@ -7715,7 +7715,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_opt
#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)
-#if defined(HAVE_OPENSSL)
+#if defined(HAVE_OPENSSL) && !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;
mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg);

View File

@ -1,11 +1,11 @@
--- sql/auth/sha2_password_common.cc.orig 2018-05-06 18:47:55 UTC
--- sql/auth/sha2_password_common.cc.orig 2019-09-20 08:30:51 UTC
+++ sql/auth/sha2_password_common.cc
@@ -101,7 +101,7 @@ bool SHA256_digest::retrieve_digest(unsi
DBUG_RETURN(true);
@@ -101,7 +101,7 @@ bool SHA256_digest::retrieve_digest(unsigned char *dig
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
-#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);

View File

@ -1,6 +1,6 @@
--- sql/conn_handler/socket_connection.cc.orig 2019-01-21 20:10:03 UTC
--- sql/conn_handler/socket_connection.cc.orig 2019-09-20 08:30:51 UTC
+++ sql/conn_handler/socket_connection.cc
@@ -873,9 +873,11 @@ bool check_connection_refused_by_tcp_wra
@@ -950,9 +950,11 @@ bool check_connection_refused_by_tcp_wrapper(MYSQL_SOC
signal(SIGCHLD, SIG_DFL);
request_init(&req, RQ_DAEMON, libwrap_name, RQ_FILE,
mysql_socket_getfd(connect_sock), NULL);
@ -14,7 +14,7 @@
/*
This may be stupid but refuse() includes an exit(0)
which we surely don't want...
@@ -887,12 +889,13 @@ bool check_connection_refused_by_tcp_wra
@@ -964,12 +966,13 @@ bool check_connection_refused_by_tcp_wrapper(MYSQL_SOC
This is unproblematic as TCP-wrapper is unix specific,
anyway.
*/

View File

@ -1,20 +1,11 @@
--- sql/mysqld.cc.orig 2018-10-07 08:44:22 UTC
--- sql/mysqld.cc.orig 2019-09-20 08:30:51 UTC
+++ sql/mysqld.cc
@@ -4493,7 +4493,7 @@ static int warn_self_signed_ca() {
@@ -4797,7 +4797,7 @@ static int init_thread_environment() {
static PSI_memory_key key_memory_openssl = PSI_NOT_INSTRUMENTED;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
#define FILE_LINE_ARGS
#else
#define FILE_LINE_ARGS , const char *, int
@@ -4530,7 +4530,7 @@ static void init_ssl() {
static void init_ssl() {
#ifdef HAVE_OPENSSL
-#if !defined(HAVE_WOLFSSL) && !defined(__sun)
+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER) && !defined(__sun)
#if defined(HAVE_PSI_MEMORY_INTERFACE)
static PSI_memory_info all_openssl_memory[] = {
{&key_memory_openssl, "openssl_malloc", 0, 0,

View File

@ -1,15 +1,15 @@
--- sql/sys_vars.cc.orig 2018-04-08 06:44:49 UTC
--- sql/sys_vars.cc.orig 2019-09-20 08:30:51 UTC
+++ sql/sys_vars.cc
@@ -1792,7 +1792,7 @@ static Sys_var_ulong Sys_interactive_tim
"The number of seconds the server waits for activity on an interactive "
"connection before closing it",
SESSION_VAR(net_interactive_timeout), CMD_LINE(REQUIRED_ARG),
- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1));
+ VALID_RANGE(1, INT_MAX32 / 1000), DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1));
@@ -1841,7 +1841,7 @@ static Sys_var_ulong Sys_connect_timeout(
"The number of seconds the mysqld server is waiting for a connect "
"packet before responding with 'Bad handshake'",
GLOBAL_VAR(connect_timeout), CMD_LINE(REQUIRED_ARG),
- VALID_RANGE(2, LONG_TIMEOUT), DEFAULT(CONNECT_TIMEOUT), BLOCK_SIZE(1));
+ VALID_RANGE(2, INT_MAX32 / 1000), DEFAULT(CONNECT_TIMEOUT), BLOCK_SIZE(1));
static Sys_var_ulong Sys_join_buffer_size(
"join_buffer_size", "The size of the buffer that is used for full joins",
@@ -2594,7 +2594,7 @@ static Sys_var_ulong Sys_net_read_timeou
static Sys_var_ulong Sys_information_schema_stats_expiry(
"information_schema_stats_expiry",
@@ -2890,7 +2890,7 @@ static Sys_var_ulong Sys_net_read_timeout(
"Number of seconds to wait for more data from a connection before "
"aborting the read",
SESSION_VAR(net_read_timeout), CMD_LINE(REQUIRED_ARG),
@ -18,7 +18,7 @@
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_net_read_timeout));
@@ -2615,7 +2615,7 @@ static Sys_var_ulong Sys_net_write_timeo
@@ -2911,7 +2911,7 @@ static Sys_var_ulong Sys_net_write_timeout(
"Number of seconds to wait for a block to be written to a connection "
"before aborting the write",
SESSION_VAR(net_write_timeout), CMD_LINE(REQUIRED_ARG),
@ -27,39 +27,29 @@
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_net_write_timeout));
@@ -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)
@@ -4416,7 +4416,7 @@ static Sys_var_ulong Sys_max_execution_time(
"milliseconds",
HINT_UPDATEABLE SESSION_VAR(max_execution_time), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1));
-
+#ifndef 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),
@@ -4436,6 +4436,16 @@ static Sys_var_enum Sys_ssl_fips_mode(
GLOBAL_VAR(opt_ssl_fips_mode), CMD_LINE(REQUIRED_ARG, 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),
@@ -4429,7 +4429,7 @@ static Sys_var_ulong Sys_net_wait_timeou
"The number of seconds the server waits for activity on a "
"connection before closing it",
SESSION_VAR(net_wait_timeout), CMD_LINE(REQUIRED_ARG),
- VALID_RANGE(1, IF_WIN(INT_MAX32 / 1000, LONG_TIMEOUT)),
+ VALID_RANGE(1, INT_MAX32 / 1000),
DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1));
ON_CHECK(NULL), ON_UPDATE(update_fips_mode), NULL);
+#else
+static const char *ssl_fips_mode_names[] = {"OFF", 0};
+static Sys_var_enum Sys_ssl_fips_mode(
+ "ssl_fips_mode",
+ "SSL FIPS mode (applies only for OpenSSL); "
+ "permitted values are: OFF",
+ GLOBAL_VAR(opt_ssl_fips_mode), CMD_LINE(REQUIRED_ARG, OPT_SSL_FIPS_MODE),
+ ssl_fips_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ ON_CHECK(NULL), ON_UPDATE(NULL), NULL);
+#endif
static Sys_var_plugin Sys_default_storage_engine(
#if defined(HAVE_OPENSSL)
static Sys_var_bool Sys_auto_generate_certs(

View File

@ -1,6 +1,6 @@
--- storage/innobase/include/srv0mon.h.orig 2016-03-28 18:06:12 UTC
--- storage/innobase/include/srv0mon.h.orig 2019-09-20 08:30:51 UTC
+++ storage/innobase/include/srv0mon.h
@@ -34,6 +34,10 @@ Created 12/15/2009 Jimmy Yang
@@ -40,6 +40,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
/* Required for FreeBSD so that INT64_MAX is defined. */
#define __STDC_LIMIT_MACROS
#endif /* __STDC_LIMIT_MACROS */

View File

@ -1,7 +1,7 @@
--- storage/myisam/mi_dynrec.cc.orig 2016-03-28 18:06:12 UTC
--- storage/myisam/mi_dynrec.cc.orig 2019-09-20 08:30:51 UTC
+++ storage/myisam/mi_dynrec.cc
@@ -65,18 +65,13 @@ bool mi_dynmap_file(MI_INFO *info, my
DBUG_RETURN(1);
@@ -83,17 +83,12 @@ bool mi_dynmap_file(MI_INFO *info, my_off_t size) {
return 1;
}
/*
- I wonder if it is good to use MAP_NORESERVE. From the Linux man page:
@ -19,4 +19,4 @@
+ MAP_SHARED, info->dfile, 0L);
if (info->s->file_map == (uchar *)MAP_FAILED) {
info->s->file_map = NULL;
return 1;

View File

@ -1,13 +1,27 @@
--- support-files/CMakeLists.txt.orig 2019-06-25 10:23:30 UTC
--- support-files/CMakeLists.txt.orig 2019-09-20 08:30:51 UTC
+++ support-files/CMakeLists.txt
@@ -24,8 +24,10 @@ IF(NOT UNIX)
@@ -24,8 +24,9 @@ IF(NOT UNIX)
RETURN()
ENDIF()
+IF(FALSE)
INSTALL(FILES mysql.m4
DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)
+ENDIF()
-INSTALL(FILES mysql.m4
- DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)
+IF(NOT WITHOUT_CLIENTLIBS)
+ INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)
+ENDIF(NOT WITHOUT_CLIENTLIBS)
SET(localstatedir "${MYSQL_DATADIR}")
@@ -39,6 +40,7 @@ ELSE()
SET (PIDOF "pgrep -d' ' -f")
ENDIF()
+IF(NOT WITHOUT_SERVER)
FOREACH(script
mysql.server
mysqld_multi.server
@@ -54,3 +56,4 @@ FOREACH(script
GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
ENDFOREACH()
+ENDIF()

View File

@ -0,0 +1,59 @@
--- utilities/CMakeLists.txt.orig 2019-09-20 08:30:51 UTC
+++ utilities/CMakeLists.txt
@@ -99,10 +99,30 @@ IF(APPLE AND HAVE_CRYPTO_DYLIB AND HAVE_OPENSSL_DYLIB)
ADD_DEPENDENCIES(comp_err copy_openssl_dlls)
ENDIF()
+IF(WITHOUT_CLIENTLIBS)
MYSQL_ADD_EXECUTABLE(my_print_defaults
my_print_defaults.cc
COMPONENT Server
LINK_LIBRARIES mysys
+ SKIP_INSTALL )
+MYSQL_ADD_EXECUTABLE(perror
+ perror.cc
+ COMPONENT Server
+ DEPENDENCIES GenError
+ LINK_LIBRARIES mysys
+ SKIP_INSTALL )
+IF(BUILD_BUNDLED_LZ4)
+ MYSQL_ADD_EXECUTABLE(lz4_decompress
+ lz4_decompress.cc
+ COMPONENT Server
+ LINK_LIBRARIES ${LZ4_LIBRARY} mysys
+ SKIP_INSTALL )
+ENDIF()
+ELSE(WITHOUT_CLIENTLIBS)
+MYSQL_ADD_EXECUTABLE(my_print_defaults
+ my_print_defaults.cc
+ COMPONENT Server
+ LINK_LIBRARIES mysys
)
MYSQL_ADD_EXECUTABLE(perror
perror.cc
@@ -117,14 +137,25 @@ IF(BUILD_BUNDLED_LZ4)
LINK_LIBRARIES ${LZ4_LIBRARY} mysys
)
ENDIF()
+ENDIF(WITHOUT_CLIENTLIBS)
+IF(WITHOUT_CLIENTLIBS)
IF(BUILD_BUNDLED_ZLIB OR NOT OPENSSL_EXECUTABLE_HAS_ZLIB)
MYSQL_ADD_EXECUTABLE(zlib_decompress
zlib_decompress.cc
COMPONENT Server
LINK_LIBRARIES ${ZLIB_LIBRARY} mysys
+ SKIP_INSTALL )
+ENDIF()
+ELSE(WITHOUT_CLIENTLIBS)
+IF(BUILD_BUNDLED_ZLIB OR NOT OPENSSL_EXECUTABLE_HAS_ZLIB)
+ MYSQL_ADD_EXECUTABLE(zlib_decompress
+ zlib_decompress.cc
+ COMPONENT Server
+ LINK_LIBRARIES ${ZLIB_LIBRARY} mysys
)
ENDIF()
+ENDIF(WITHOUT_CLIENTLIBS)
# All targets below belong to COMPONENT Server and depend on InnoDB.
IF(WITHOUT_SERVER)

View File

@ -0,0 +1,20 @@
--- vio/viossl.cc.orig 2019-09-20 08:30:51 UTC
+++ vio/viossl.cc
@@ -490,7 +490,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, l
#if !defined(DBUG_OFF)
{
STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
- ssl_comp_methods = SSL_COMP_get_compression_methods();
+ ssl_comp_methods = (STACK_OF(SSL_COMP) *)SSL_COMP_get_compression_methods();
n = sk_SSL_COMP_num(ssl_comp_methods);
DBUG_PRINT("info", ("Available compression methods:\n"));
if (n == 0)
@@ -498,7 +498,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, l
else
for (j = 0; j < n; j++) {
SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j);
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
DBUG_PRINT("info", (" %d: %s\n", c->id, c->name));
#else /* OPENSSL_VERSION_NUMBER < 0x10100000L */
DBUG_PRINT("info",

View File

@ -1,6 +1,6 @@
--- vio/viosslfactories.cc.orig 2018-04-08 06:44:49 UTC
--- vio/viosslfactories.cc.orig 2019-09-20 08:30:51 UTC
+++ vio/viosslfactories.cc
@@ -37,6 +37,7 @@
@@ -38,6 +38,7 @@
#ifdef HAVE_OPENSSL
#include <openssl/dh.h>
@ -8,49 +8,19 @@
#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 */
) {
@@ -143,7 +144,7 @@ static DH *get_dh2048(void) {
DH_free(dh);
return NULL;
}
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
dh->p = p;
dh->g = g;
#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
@@ -426,7 +427,7 @@ void ssl_start() {
@@ -420,6 +421,7 @@ void ssl_start() {
}
}
-#ifndef HAVE_WOLFSSL
+#if !defined(HAVE_WOLFSSL) && !defined(LIBRESSL_VERSION_NUMBER)
+#ifndef 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';
}
@@ -473,6 +475,7 @@ EXIT:
@returns openssl current fips mode
*/
uint get_fips_mode() { return FIPS_mode(); }
+#endif
EXIT:
return rc;
}
long process_tls_version(const char *tls_version) {
const char *separator = ",";

View File

@ -2,24 +2,25 @@ LICENSE.router
README.router
bin/ibd2sdi
bin/innochecksum
bin/my_print_defaults
bin/myisam_ftdump
bin/myisamchk
bin/myisamlog
bin/myisampack
bin/mysqldumpslow
bin/mysql_client_test
bin/mysql_secure_installation
bin/mysql_ssl_rsa_setup
bin/mysql_tzinfo_to_sql
bin/mysql_upgrade
bin/mysqld_multi
bin/mysqld_safe
bin/mysqldumpslow
bin/mysqlrouter
bin/mysqlrouter_keyring
bin/mysqlrouter_passwd
bin/mysqlrouter_plugin_info
bin/mysqltest
bin/mysqltest_safe_process
bin/mysqlxtest
bin/perror
bin/zlib_decompress
lib/mysql/libmysqlharness.a
lib/mysql/libmysqlharness.so
lib/mysql/libmysqlharness.so.1
@ -49,6 +50,7 @@ lib/mysql/plugin/component_log_filter_dragnet.so
lib/mysql/plugin/component_log_sink_json.so
lib/mysql/plugin/component_log_sink_syseventlog.so
lib/mysql/plugin/component_log_sink_test.so
lib/mysql/plugin/component_mysqlbackup.so
lib/mysql/plugin/component_mysqlx_global_reset.so
lib/mysql/plugin/component_pfs_example.so
lib/mysql/plugin/component_pfs_example_component_population.so
@ -137,20 +139,24 @@ lib/mysql/plugin/test_udf_services.so
lib/mysql/plugin/validate_password.so
lib/mysql/plugin/version_token.so
libexec/mysqld
man/man1/ibd2sdi.1.gz
man/man1/innochecksum.1.gz
man/man1/my_print_defaults.1.gz
man/man1/myisam_ftdump.1.gz
man/man1/myisamchk.1.gz
man/man1/myisamlog.1.gz
man/man1/myisampack.1.gz
man/man1/mysql.server.1.gz
man/man1/mysql_secure_installation.1.gz
man/man1/mysql_ssl_rsa_setup.1.gz
man/man1/mysql_tzinfo_to_sql.1.gz
man/man1/mysql_upgrade.1.gz
man/man1/mysql.server.1.gz
man/man1/mysqld_multi.1.gz
man/man1/mysqld_safe.1.gz
man/man1/mysqldumpslow.1.gz
man/man1/mysqlman.1.gz
man/man1/perror.1.gz
man/man1/mysqlrouter_passwd.1.gz
man/man1/mysqlrouter_plugin_info.1.gz
man/man1/mysqlrouter.1.gz
man/man8/mysqld.8.gz
%%DATADIR%%/bulgarian/errmsg.sys
%%DATADIR%%/charsets/Index.xml