diff options
Diffstat (limited to 'databases/mariadb103-server/files')
37 files changed, 1038 insertions, 0 deletions
diff --git a/databases/mariadb103-server/files/extra-patch-include_my__compare.h b/databases/mariadb103-server/files/extra-patch-include_my__compare.h new file mode 100644 index 000000000000..5fc447b98cd7 --- /dev/null +++ b/databases/mariadb103-server/files/extra-patch-include_my__compare.h @@ -0,0 +1,11 @@ +--- include/my_compare.h.orig 2012-11-28 17:49:43.000000000 +0200 ++++ include/my_compare.h 2012-12-23 02:45:51.000000000 +0200 +@@ -40,7 +40,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 32 /* Max segments for key */ + + #define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6) diff --git a/databases/mariadb103-server/files/mysql-server.in b/databases/mariadb103-server/files/mysql-server.in new file mode 100644 index 000000000000..5f5603f2f575 --- /dev/null +++ b/databases/mariadb103-server/files/mysql-server.in @@ -0,0 +1,139 @@ +#!/bin/sh + +# $FreeBSD: head/databases/mariadb55-server/files/mysql-server.in 361647 2014-07-12 22:42:33Z rakuco $ +# +# PROVIDE: mysql +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable mysql: +# mysql_(instance_)?enable (bool): Set to "NO" by default. +# Set it to "YES" to enable MySQL. +# mysql_(instance_)?limits (bool): Set to "NO" by default. +# Set it to yes to run `limits -e -U mysql` +# just before mysql starts. +# mysql_(instance_)?dbdir (str): Default to "/var/db/mysql" +# Base database directory. +# mysql_(instance_)?args (str): Custom additional arguments to be passed +# to mysqld_safe (default empty). +# mysql_(instance_)?pidfile (str): Custum PID file path and name. +# Default to "${mysql_dbdir}/${hostname}.pid". +# mysql_(instance_)?user (str): User to run mysqld as +# Default to "mysql" created by the port +# mysql_(instance_)?optfile (str): Server-specific option file. +# Default to "${mysql_dbdir}/my.cnf". +# mysql_instances (str): Set to "" by default. +# If defined, list of instances to enable + +. /etc/rc.subr + +name="mysql" +rcvar=mysql_enable + +load_rc_config $name + +: ${mysql_enable="NO"} +: ${mysql_limits="NO"} +: ${mysql_user="mysql"} +: ${mysql_limits_args="-e -U $mysql_user"} +: ${mysql_dbdir="/var/db/mysql"} +: ${mysql_optfile="${mysql_dbdir}/my.cnf"} + +command="/usr/sbin/daemon" +procname="%%PREFIX%%/libexec/mysqld" +start_precmd="${name}_prestart" +start_postcmd="${name}_poststart" + +if [ -n "$2" ]; then + instance="$2" + load_rc_config ${name}_${instance} + case "$mysql_instances" in + "$2 "*|*" $2 "*|*" $2"|"$2") + eval mysql_args="\${mysql_${instance}_args:-\"${mysql_args}\"}" + eval mysql_dbdir="\${mysql_${instance}_dbdir:-\"/var/db/mysql_${instance}\"}" + eval mysql_limits="\${mysql_${instance}_limits:-\"${mysql_limits}\"}" + eval mysql_user="\${mysql_${instance}_user:-\"${mysql_user}\"}" + eval mysql_limits_args="\${mysql_${instance}_limits_args:-\"-e -U $mysql_user\"}" + eval mysql_optfile="\${mysql_${instance}_optfile:-\"${mysql_dbdir}/my.cnf\"}" + eval mysql_pidfile="\${mysql_${instance}_pidfile:-\"${mysql_dbdir}/`/bin/hostname`.pid\"}" + ;; + *) + err 1 "$2 not found in mysql_instances" ;; + esac +else + if [ -n "${mysql_instances}" -a -n "$1" ]; then + for instance in ${mysql_instances}; do + eval _enable="\${mysql_${instance}_enable}" + case "${_enable:-${mysql_enable}}" in + [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) + continue + ;; + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + ;; + *) + if [ -z "$_enable" ]; then + _var=mysql_enable + else + _var=mysql_${instance}_enable + fi + warn "Bad value" \ + "'${_enable:-${mysql_enable}}'" \ + "for ${_var}. " \ + "Instance ${instance} skipped." + continue + ;; + esac + echo "===> mysql instance: ${instance}" + if %%PREFIX%%/etc/rc.d/mysql-server $1 ${instance}; then + success="${instance} ${success}" + else + failed="${instance} (${retcode}) ${failed}" + fi + done + exit 0 + else + mysql_pidfile=${mysql_pidfile:-"${mysql_dbdir}/`/bin/hostname`.pid"} + fi +fi + +pidfile=$mysql_pidfile +mysql_install_db="%%PREFIX%%/bin/mysql_install_db" +mysql_install_db_args="--basedir=%%PREFIX%% --datadir=${mysql_dbdir} --force" +command_args="-c -f %%PREFIX%%/bin/mysqld_safe --defaults-extra-file=${mysql_optfile} --user=${mysql_user} --datadir=${mysql_dbdir} --pid-file=${pidfile} ${mysql_args}" + +mysql_create_auth_tables() +{ + eval $mysql_install_db $mysql_install_db_args + [ $? -eq 0 ] && chown -R ${mysql_user}:$(id -gn $mysql_user) ${mysql_dbdir} +} + +mysql_prestart() +{ + local dir + for dir in /etc /etc/mysql; do + if [ -f "${dir}/my.cnf" ]; then + echo "Please move existing my.cnf file from ${dir} to %%PREFIX%%${dir}" + return 1 + fi + done + if [ ! -d "${mysql_dbdir}/mysql/." ]; then + mysql_create_auth_tables || return 1 + fi + if checkyesno mysql_limits; then + eval `/usr/bin/limits ${mysql_limits_args:-"-e -U $mysql_user"}` 2>/dev/null + else + return 0 + fi +} + +mysql_poststart() +{ + local timeout=15 + while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do + timeout=$(( timeout - 1 )) + sleep 1 + done + return 0 +} + +run_rc_command "$1" diff --git a/databases/mariadb103-server/files/patch-CMakeLists.txt b/databases/mariadb103-server/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..f7ca1515e95c --- /dev/null +++ b/databases/mariadb103-server/files/patch-CMakeLists.txt @@ -0,0 +1,27 @@ +--- CMakeLists.txt.orig 2017-05-14 23:13:15 UTC ++++ CMakeLists.txt +@@ -170,6 +170,8 @@ IF(DISABLE_SHARED) + ENDIF() + OPTION(ENABLED_PROFILING "Enable profiling" ON) + OPTION(WITHOUT_SERVER "Build only the client library and clients" OFF) ++OPTION(WITHOUT_CLIENT "Build only the server components" OFF) ++OPTION(WITHOUT_DOCS "Do not install documentation" OFF) + IF(UNIX) + OPTION(WITH_VALGRIND "Valgrind instrumentation" OFF) + ENDIF() +@@ -452,6 +454,7 @@ ADD_CUSTOM_TARGET(INFO_BIN ALL + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + ) + ++IF(NOT WITHOUT_DOCS) + INSTALL_DOCUMENTATION(README.md CREDITS COPYING COPYING.thirdparty + EXCEPTIONS-CLIENT COMPONENT Readme) + +@@ -463,6 +466,7 @@ IF(UNIX) + INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY COMPONENT Readme) + INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY Docs/README-wsrep COMPONENT Readme) + ENDIF() ++ENDIF() + + INCLUDE(CPack) + diff --git a/databases/mariadb103-server/files/patch-client_CMakeLists.txt b/databases/mariadb103-server/files/patch-client_CMakeLists.txt new file mode 100644 index 000000000000..fa4b8a378b30 --- /dev/null +++ b/databases/mariadb103-server/files/patch-client_CMakeLists.txt @@ -0,0 +1,78 @@ +--- client/CMakeLists.txt.orig 2017-05-14 23:13:15 UTC ++++ client/CMakeLists.txt +@@ -35,6 +35,8 @@ COPY_OPENSSL_DLLS(copy_openssl_client) + SET(CLIENT_LIB mariadbclient mysys) + + ADD_DEFINITIONS(${SSL_DEFINES}) ++ ++IF(NOT WITHOUT_CLIENT) + MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc + ${CMAKE_SOURCE_DIR}/sql/sql_string.cc) + TARGET_LINK_LIBRARIES(mysql ${CLIENT_LIB}) +@@ -43,11 +45,6 @@ IF(UNIX) + SET_TARGET_PROPERTIES(mysql PROPERTIES ENABLE_EXPORTS TRUE) + ENDIF(UNIX) + +-MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test) +-SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS") +-TARGET_LINK_LIBRARIES(mysqltest ${CLIENT_LIB} pcre pcreposix) +-SET_TARGET_PROPERTIES(mysqltest PROPERTIES ENABLE_EXPORTS TRUE) +- + + MYSQL_ADD_EXECUTABLE(mysqlcheck mysqlcheck.c) + TARGET_LINK_LIBRARIES(mysqlcheck ${CLIENT_LIB}) +@@ -60,16 +57,6 @@ MYSQL_ADD_EXECUTABLE(mysqlimport mysqlim + SET_SOURCE_FILES_PROPERTIES(mysqlimport.c PROPERTIES COMPILE_FLAGS "-DTHREADS") + TARGET_LINK_LIBRARIES(mysqlimport ${CLIENT_LIB}) + +-MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c COMPONENT Server) +-TARGET_LINK_LIBRARIES(mysql_upgrade ${CLIENT_LIB}) +-ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs) +- +-MYSQL_ADD_EXECUTABLE(mysqlshow mysqlshow.c) +-TARGET_LINK_LIBRARIES(mysqlshow ${CLIENT_LIB}) +- +-MYSQL_ADD_EXECUTABLE(mysql_plugin mysql_plugin.c) +-TARGET_LINK_LIBRARIES(mysql_plugin ${CLIENT_LIB}) +- + MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc) + TARGET_LINK_LIBRARIES(mysqlbinlog ${CLIENT_LIB}) + +@@ -89,14 +76,34 @@ ENDIF(WIN32) + ADD_EXECUTABLE(async_example async_example.c) + TARGET_LINK_LIBRARIES(async_example ${CLIENT_LIB}) + +-SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap mysql_plugin async_example ++SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysqlshow mysqlslap async_example + PROPERTIES HAS_CXX TRUE) + +- +-FOREACH(t mysql mysqltest mysqltest mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysql_plugin mysqlbinlog ++FOREACH(t mysql mysqlcheck mysqldump mysqlimport mysqlshow mysqlbinlog + mysqladmin mysqlslap async_example) + ADD_DEPENDENCIES(${t} GenError ${CLIENT_LIB}) + ENDFOREACH() + ++ENDIF() ++ ++MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test) ++SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS") ++TARGET_LINK_LIBRARIES(mysqltest ${CLIENT_LIB} pcre pcreposix) ++SET_TARGET_PROPERTIES(mysqltest PROPERTIES ENABLE_EXPORTS TRUE) ++ ++MYSQL_ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c COMPONENT Server) ++TARGET_LINK_LIBRARIES(mysql_upgrade ${CLIENT_LIB}) ++ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs) ++ ++MYSQL_ADD_EXECUTABLE(mysql_plugin mysql_plugin.c) ++TARGET_LINK_LIBRARIES(mysql_plugin ${CLIENT_LIB}) ++ ++SET_TARGET_PROPERTIES (mysql_upgrade mysql_plugin ++PROPERTIES HAS_CXX TRUE) ++ ++FOREACH(t mysqltest mysql_plugin mysql_upgrade) ++ ADD_DEPENDENCIES(${t} GenError ${CLIENT_LIB}) ++ENDFOREACH() ++ + ADD_DEFINITIONS(-DHAVE_DLOPEN) + diff --git a/databases/mariadb103-server/files/patch-extra_CMakeLists.txt b/databases/mariadb103-server/files/patch-extra_CMakeLists.txt new file mode 100644 index 000000000000..35960bb6a0ab --- /dev/null +++ b/databases/mariadb103-server/files/patch-extra_CMakeLists.txt @@ -0,0 +1,16 @@ +Fix up missing WITHOUT_DOCS, WITHOUT_CLIENT options + +--- extra/CMakeLists.txt.orig 2017-05-14 23:13:15 UTC ++++ extra/CMakeLists.txt +@@ -96,9 +96,11 @@ IF(UNIX) + MYSQL_ADD_EXECUTABLE(resolve_stack_dump resolve_stack_dump.c) + TARGET_LINK_LIBRARIES(resolve_stack_dump mysys) + ++IF(FALSE) + MYSQL_ADD_EXECUTABLE(mysql_waitpid mysql_waitpid.c COMPONENT Client) + TARGET_LINK_LIBRARIES(mysql_waitpid mysys) + ++ENDIF() + MYSQL_ADD_EXECUTABLE(mysqld_safe_helper mysqld_safe_helper.c COMPONENT Server) + TARGET_LINK_LIBRARIES(mysqld_safe_helper mysys) + ENDIF() diff --git a/databases/mariadb103-server/files/patch-include_CMakeLists.txt b/databases/mariadb103-server/files/patch-include_CMakeLists.txt new file mode 100644 index 000000000000..aaa3ab9b47d0 --- /dev/null +++ b/databases/mariadb103-server/files/patch-include_CMakeLists.txt @@ -0,0 +1,38 @@ +--- include/CMakeLists.txt.orig 2017-08-17 10:05:38 UTC ++++ include/CMakeLists.txt +@@ -1,5 +1,5 @@ + # Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. +-# ++# + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; version 2 of the License. +@@ -68,6 +68,7 @@ SET(HEADERS + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mysqld_error.h + DESTINATION ${INSTALL_INCLUDEDIR} COMPONENT Development) + ++IF(FALSE) + INSTALL(FILES ${HEADERS} + DESTINATION ${INSTALL_INCLUDEDIR}/server COMPONENT Development) + FOREACH(f ${HEADERS_GEN_CONFIGURE}) +@@ -75,17 +76,20 @@ FOREACH(f ${HEADERS_GEN_CONFIGURE}) + DESTINATION ${INSTALL_INCLUDEDIR}/server COMPONENT Development) + ENDFOREACH(f) + INSTALL(DIRECTORY mysql/ DESTINATION ${INSTALL_INCLUDEDIR}/server/mysql COMPONENT Development FILES_MATCHING PATTERN "*.h") ++ENDIF() + + STRING(REPLACE "." "\\." EXCL_RE "${HEADERS};${HEADERS_GEN_CONFIGURE}") + STRING(REPLACE ";" "|" EXCL_RE "${EXCL_RE}") + + MACRO(INSTALL_PRIVATE DIR) ++IF(FALSE) + INSTALL(DIRECTORY ${DIR}/. + DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development + FILES_MATCHING PATTERN "*.h" + PATTERN CMakeFiles EXCLUDE + PATTERN mysql EXCLUDE + REGEX "\\./(${EXCL_RE}$)" EXCLUDE) ++ENDIF() + ENDMACRO() + + INSTALL_PRIVATE(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/databases/mariadb103-server/files/patch-libmariadb_CMakeLists.txt b/databases/mariadb103-server/files/patch-libmariadb_CMakeLists.txt new file mode 100644 index 000000000000..827b9f87ceef --- /dev/null +++ b/databases/mariadb103-server/files/patch-libmariadb_CMakeLists.txt @@ -0,0 +1,11 @@ +--- libmariadb/CMakeLists.txt.orig 2018-05-23 20:38:41 UTC ++++ libmariadb/CMakeLists.txt +@@ -371,7 +371,7 @@ ENDIF() + INCLUDE(${CC_SOURCE_DIR}/plugins/CMakeLists.txt) + ADD_SUBDIRECTORY(include) + ADD_SUBDIRECTORY(libmariadb) +-IF(NOT WIN32) ++IF(NOT WIN32 AND NOT WITHOUT_CLIENT) + ADD_SUBDIRECTORY(mariadb_config) + ENDIF() + diff --git a/databases/mariadb103-server/files/patch-libmariadb_include_CMakeLists.txt b/databases/mariadb103-server/files/patch-libmariadb_include_CMakeLists.txt new file mode 100644 index 000000000000..70e8fad20f85 --- /dev/null +++ b/databases/mariadb103-server/files/patch-libmariadb_include_CMakeLists.txt @@ -0,0 +1,15 @@ +--- libmariadb/include/CMakeLists.txt.orig 2017-05-14 23:13:15 UTC ++++ libmariadb/include/CMakeLists.txt +@@ -21,6 +21,7 @@ IF(WIN32) + SET(WIX_INCLUDES ${MARIADB_CLIENT_INCLUDES} ${MARIADB_ADDITIONAL_INCLUDES} ${MYSQL_ADDITIONAL_INCLUDES} PARENT_SCOPE) + ENDIF() + ++IF(NOT WITHOUT_CLIENT) + INSTALL(FILES + ${MARIADB_CLIENT_INCLUDES} + DESTINATION ${INSTALL_INCLUDEDIR} +@@ -33,3 +34,4 @@ INSTALL(FILES + ${MARIADB_ADDITIONAL_INCLUDES} + DESTINATION ${INSTALL_INCLUDEDIR}/mariadb + COMPONENT Development) ++ENDIF() diff --git a/databases/mariadb103-server/files/patch-libmariadb_libmariadb_CMakeLists.txt b/databases/mariadb103-server/files/patch-libmariadb_libmariadb_CMakeLists.txt new file mode 100644 index 000000000000..0542221db134 --- /dev/null +++ b/databases/mariadb103-server/files/patch-libmariadb_libmariadb_CMakeLists.txt @@ -0,0 +1,14 @@ +--- libmariadb/libmariadb/CMakeLists.txt.orig 2017-05-14 23:13:15 UTC ++++ libmariadb/libmariadb/CMakeLists.txt +@@ -401,9 +401,11 @@ SET_TARGET_PROPERTIES(libmariadb PROPERT + INSTALL(TARGETS mariadbclient + COMPONENT Development + DESTINATION ${INSTALL_LIBDIR}) ++IF(NOT WITHOUT_CLIENT) + INSTALL(TARGETS libmariadb + COMPONENT SharedLibraries + DESTINATION ${INSTALL_LIBDIR}) ++ENDIF() + + IF(WIN32) + # On Windows, install PDB diff --git a/databases/mariadb103-server/files/patch-libmariadb_plugins_auth_CMakeLists.txt b/databases/mariadb103-server/files/patch-libmariadb_plugins_auth_CMakeLists.txt new file mode 100644 index 000000000000..196ced2e7ddb --- /dev/null +++ b/databases/mariadb103-server/files/patch-libmariadb_plugins_auth_CMakeLists.txt @@ -0,0 +1,31 @@ +--- libmariadb/plugins/auth/CMakeLists.txt.orig 2018-05-23 20:38:41 UTC ++++ libmariadb/plugins/auth/CMakeLists.txt +@@ -38,6 +38,7 @@ IF(GSSAPI_SOURCES) + LIBRARIES ${GSSAPI_LIBS}) + ENDIF() + ++IF(NOT WITHOUT_CLIENT) + IF(${WITH_SSL} STREQUAL "OPENSSL" OR ${WITH_SSL} STREQUAL "SCHANNEL") + IF(WIN32) + SET(SHA256_LIBS crypt32) +@@ -51,6 +52,7 @@ IF(${WITH_SSL} STREQUAL "OPENSSL" OR ${W + SOURCES ${AUTH_DIR}/sha256_pw.c + LIBRARIES ${SHA256_LIBS}) + ENDIF() ++ENDIF() + + # old_password plugin + REGISTER_PLUGIN(TARGET mysql_old_password +@@ -60,10 +62,11 @@ REGISTER_PLUGIN(TARGET mysql_old_passwor + SOURCES ${AUTH_DIR}/old_password.c) + + ++IF(NOT WITHOUT_CLIENT) + # Cleartext + REGISTER_PLUGIN(TARGET mysql_clear_password + TYPE MARIADB_CLIENT_PLUGIN_AUTH + CONFIGURATIONS DYNAMIC STATIC OFF + DEFAULT DYNAMIC + SOURCES ${AUTH_DIR}/mariadb_cleartext.c) +- ++ENDIF() diff --git a/databases/mariadb103-server/files/patch-libservices_CMakeLists.txt b/databases/mariadb103-server/files/patch-libservices_CMakeLists.txt new file mode 100644 index 000000000000..82bf5fac68ea --- /dev/null +++ b/databases/mariadb103-server/files/patch-libservices_CMakeLists.txt @@ -0,0 +1,11 @@ +Fix up missing WITHOUT_DOCS, WITHOUT_CLIENT options + +--- libservices/CMakeLists.txt.orig 2017-05-14 23:13:16 UTC ++++ libservices/CMakeLists.txt +@@ -40,4 +40,6 @@ SET(MYSQLSERVICES_SOURCES + ) + + ADD_CONVENIENCE_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES}) ++IF(FALSE) + INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development) ++ENDIF() diff --git a/databases/mariadb103-server/files/patch-man_CMakeLists.txt b/databases/mariadb103-server/files/patch-man_CMakeLists.txt new file mode 100644 index 000000000000..350a8f5ef2b7 --- /dev/null +++ b/databases/mariadb103-server/files/patch-man_CMakeLists.txt @@ -0,0 +1,14 @@ +Fix up missing WITHOUT_DOCS, WITHOUT_CLIENT options + +--- man/CMakeLists.txt.orig 2017-05-14 23:13:16 UTC ++++ man/CMakeLists.txt +@@ -38,7 +38,8 @@ SET(MAN1_TEST mysql-stress-test.pl.1 mys + + INSTALL(FILES ${MAN1_SERVER} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesServer) + INSTALL(FILES ${MAN8_SERVER} DESTINATION ${INSTALL_MANDIR}/man8 COMPONENT ManPagesServer) ++IF(FALSE) + INSTALL(FILES ${MAN1_CLIENT} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesClient) + INSTALL(FILES ${MAN1_DEVEL} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesDevelopment) + INSTALL(FILES ${MAN1_TEST} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesTest) +- ++ENDIF() diff --git a/databases/mariadb103-server/files/patch-mysys_my__default.c b/databases/mariadb103-server/files/patch-mysys_my__default.c new file mode 100644 index 000000000000..d4a4f3c3bc09 --- /dev/null +++ b/databases/mariadb103-server/files/patch-mysys_my__default.c @@ -0,0 +1,52 @@ +--- mysys/my_default.c.orig 2017-05-14 23:13:17 UTC ++++ mysys/my_default.c +@@ -785,7 +785,7 @@ static int search_default_file_with_ext( + { + MY_STAT stat_info; + if (!my_stat(name,&stat_info,MYF(0))) +- return 1; ++ return 0; + /* + Ignore world-writable regular files. + This is mainly done to protect us to not read a file created by +@@ -803,6 +803,14 @@ static int search_default_file_with_ext( + if (!(fp= mysql_file_fopen(key_file_cnf, name, O_RDONLY, MYF(0)))) + 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_fgets(buff, sizeof(buff) - 1, fp)) + { + line++; +@@ -1067,7 +1075,8 @@ void my_print_default_files(const char * + if (name[0] == FN_HOMELIB) /* Add . to filenames in home */ + *end++= '.'; + strxmov(end, conf_file, *ext, " ", NullS); +- fputs(name, stdout); ++ if (strstr(name, "/etc") != name) ++ fputs(name, stdout); + } + } + } +@@ -1192,13 +1201,10 @@ static const char **init_default_directo + + #else + +-#if defined(DEFAULT_SYSCONFDIR) +- if (DEFAULT_SYSCONFDIR[0]) +- errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs); +-#else + errors += add_directory(alloc, "/etc/", dirs); + errors += add_directory(alloc, "/etc/mysql/", dirs); +-#endif /* DEFAULT_SYSCONFDIR */ ++ errors += add_directory(alloc, "/usr/local/etc/", dirs); ++ errors += add_directory(alloc, "/usr/local/etc/mysql/", dirs); + + #endif + diff --git a/databases/mariadb103-server/files/patch-oqgraph-MDEV-15291 b/databases/mariadb103-server/files/patch-oqgraph-MDEV-15291 new file mode 100644 index 000000000000..05083cd206ac --- /dev/null +++ b/databases/mariadb103-server/files/patch-oqgraph-MDEV-15291 @@ -0,0 +1,40 @@ +--- storage/oqgraph/oqgraph_judy.cc.orig 2018-02-12 15:01:28 UTC ++++ storage/oqgraph/oqgraph_judy.cc +@@ -27,7 +27,7 @@ + /* + Currently the only active code that can return error is: + judy_bitset::reset()/J1U() +- judy_bitset::setbit()/J1S() ++ judy_bitset::jsetbit()/J1S() + + In most cases errors are either about wrong parameters passed to Judy + functions or internal structures corruption. These definitely deserve +@@ -60,7 +60,7 @@ bool open_query::judy_bitset::test(size_ + return rc == 1; + } + +-open_query::judy_bitset& open_query::judy_bitset::setbit(size_type n) ++open_query::judy_bitset& open_query::judy_bitset::jsetbit(size_type n) + { + int rc; + J1S(rc, array, n); +--- storage/oqgraph/oqgraph_judy.h.orig 2018-02-12 15:01:28 UTC ++++ storage/oqgraph/oqgraph_judy.h +@@ -63,7 +63,7 @@ namespace open_query + if (!val) + return reset(n); + else +- return setbit(n); ++ return jsetbit(n); + } + + judy_bitset& set(const judy_bitset& src); +@@ -115,7 +115,7 @@ namespace open_query + private: + mutable void* array; + +- judy_bitset& setbit(size_type n); ++ judy_bitset& jsetbit(size_type n); + }; + } + diff --git a/databases/mariadb103-server/files/patch-pcre_CMakeLists.txt b/databases/mariadb103-server/files/patch-pcre_CMakeLists.txt new file mode 100644 index 000000000000..c09bb5f9d875 --- /dev/null +++ b/databases/mariadb103-server/files/patch-pcre_CMakeLists.txt @@ -0,0 +1,11 @@ +--- pcre/CMakeLists.txt.orig 2017-08-17 10:05:39 UTC ++++ pcre/CMakeLists.txt +@@ -510,6 +510,8 @@ IF(PCRE_SHOW_REPORT) + MESSAGE(STATUS "") + ENDIF(PCRE_SHOW_REPORT) + ++IF(FALSE) + INSTALL(FILES ${CMAKE_BINARY_DIR}/pcre/pcre.h DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development) ++ENDIF() + + # end CMakeLists.txt diff --git a/databases/mariadb103-server/files/patch-plugin_auth__ed25519_CMakeLists.txt b/databases/mariadb103-server/files/patch-plugin_auth__ed25519_CMakeLists.txt new file mode 100644 index 000000000000..429f6748682b --- /dev/null +++ b/databases/mariadb103-server/files/patch-plugin_auth__ed25519_CMakeLists.txt @@ -0,0 +1,14 @@ +--- plugin/auth_ed25519/CMakeLists.txt.orig 2017-05-14 23:13:17 UTC ++++ plugin/auth_ed25519/CMakeLists.txt +@@ -23,9 +24,11 @@ ENDIF() + # compiled with MYSQL_DYNAMIC_PLUGIN + MYSQL_ADD_PLUGIN(auth_ed25519 server_ed25519.c ${REF10_SOURCES} MODULE_ONLY) + ++IF(NOT WITHOUT_CLIENT) + # client plugin and unit test ed25519-t can use the library + MYSQL_ADD_PLUGIN(client_ed25519 client_ed25519.c MODULE_ONLY + CLIENT LINK_LIBRARIES mysys_ssl ref10 COMPONENT ClientPlugins) ++ENDIF() + + IF(WITH_UNIT_TESTS) + MY_ADD_TESTS(ed25519 LINK_LIBRARIES mysys ref10) diff --git a/databases/mariadb103-server/files/patch-scripts_mysql__config.sh b/databases/mariadb103-server/files/patch-scripts_mysql__config.sh new file mode 100644 index 000000000000..00ee7218322a --- /dev/null +++ b/databases/mariadb103-server/files/patch-scripts_mysql__config.sh @@ -0,0 +1,12 @@ +--- scripts/mysql_config.sh.orig 2017-05-24 09:15:23 UTC ++++ scripts/mysql_config.sh +@@ -106,7 +106,9 @@ fi + + # Create options + libs="-L$pkglibdir @RPATH_OPTION@ @LIBS_FOR_CLIENTS@" ++libs="$libs -L/usr/local/lib " + embedded_libs="-L$pkglibdir @RPATH_OPTION@ @EMB_LIBS_FOR_CLIENTS@" ++embedded_libs="$embedded_libs -L/usr/local/lib " + + include="-I$pkgincludedir" + if [ "$basedir" != "/usr" ]; then diff --git a/databases/mariadb103-server/files/patch-scripts_mysqld__safe.sh b/databases/mariadb103-server/files/patch-scripts_mysqld__safe.sh new file mode 100644 index 000000000000..0c694bd3a30a --- /dev/null +++ b/databases/mariadb103-server/files/patch-scripts_mysqld__safe.sh @@ -0,0 +1,16 @@ +--- scripts/mysqld_safe.sh.orig 2017-05-24 09:15:23 UTC ++++ scripts/mysqld_safe.sh +@@ -568,11 +568,11 @@ fi + + if test -z "$MYSQL_HOME" + then +- if test -r "$DATADIR/my.cnf" ++ if test -r "$DATADIR/etc/my.cnf" + then + log_error "WARNING: Found $DATADIR/my.cnf + The data directory is not a valid location for my.cnf, please move it to +-$MY_BASEDIR_VERSION/my.cnf" ++$MY_BASEDIR_VERSION/etc/my.cnf" + fi + MYSQL_HOME=$MY_BASEDIR_VERSION + fi diff --git a/databases/mariadb103-server/files/patch-sql-common_client.c b/databases/mariadb103-server/files/patch-sql-common_client.c new file mode 100644 index 000000000000..ad77fc7f4321 --- /dev/null +++ b/databases/mariadb103-server/files/patch-sql-common_client.c @@ -0,0 +1,13 @@ +--- sql-common/client.c.orig 2017-05-14 23:13:18 UTC ++++ sql-common/client.c +@@ -104,6 +104,10 @@ my_bool net_flush(NET *net); + #define CONNECT_TIMEOUT 0 + #endif + ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) || defined(HAVE_YASSL) ++#define ASN1_STRING_get0_data(X) ASN1_STRING_data(X) ++#endif ++ + #include "client_settings.h" + #include <ssl_compat.h> + #include <sql_common.h> diff --git a/databases/mariadb103-server/files/patch-sql_CMakeLists.txt b/databases/mariadb103-server/files/patch-sql_CMakeLists.txt new file mode 100644 index 000000000000..7e20f9fabea2 --- /dev/null +++ b/databases/mariadb103-server/files/patch-sql_CMakeLists.txt @@ -0,0 +1,28 @@ +--- sql/CMakeLists.txt.orig 2017-08-17 10:05:40 UTC ++++ sql/CMakeLists.txt +@@ -386,6 +386,7 @@ ADD_CUSTOM_TARGET(distclean + VERBATIM + ) + ++IF(FALSE) + IF(INSTALL_LAYOUT STREQUAL "STANDALONE") + + # Copy db.opt into data/test/ +@@ -429,6 +430,7 @@ ELSE() + INSTALL(FILES ${DUMMY_FILE} DESTINATION data/mysql COMPONENT DataFiles) + ENDIF(WIN32 AND MYSQLD_EXECUTABLE) + ENDIF(INSTALL_LAYOUT STREQUAL "STANDALONE") ++ENDIF() + + IF(WIN32) + SET(my_bootstrap_sql ${CMAKE_CURRENT_BINARY_DIR}/my_bootstrap.sql) +@@ -472,7 +474,9 @@ IF(WIN32) + TARGET_LINK_LIBRARIES(mysql_upgrade_service mysys winservice) + ENDIF(WIN32) + ++IF(FALSE) + INSTALL(DIRECTORY . DESTINATION ${INSTALL_INCLUDEDIR}/server/private COMPONENT Development + FILES_MATCHING PATTERN "*.h" + PATTERN share EXCLUDE + PATTERN CMakeFiles EXCLUDE) ++ENDIF() diff --git a/databases/mariadb103-server/files/patch-sql_mysqld.cc b/databases/mariadb103-server/files/patch-sql_mysqld.cc new file mode 100644 index 000000000000..360b1f4117b6 --- /dev/null +++ b/databases/mariadb103-server/files/patch-sql_mysqld.cc @@ -0,0 +1,21 @@ +--- sql/mysqld.cc.orig 2017-05-14 23:13:18 UTC ++++ sql/mysqld.cc +@@ -120,6 +121,7 @@ + #define HAVE_CLOSE_SERVER_SOCK 1 + #endif + ++ + extern "C" { // Because of SCO 3.2V4.2 + #include <sys/stat.h> + #ifndef __GNU_LIBRARY__ +@@ -4838,8 +4840,9 @@ static void init_ssl() + while ((err= ERR_get_error())) + sql_print_warning("SSL error: %s", ERR_error_string(err, NULL)); + } +- else ++ else { + ERR_remove_state(0); ++ } + } + else + { diff --git a/databases/mariadb103-server/files/patch-sql_share_CMakeLists.txt b/databases/mariadb103-server/files/patch-sql_share_CMakeLists.txt new file mode 100644 index 000000000000..3d0dab9820c2 --- /dev/null +++ b/databases/mariadb103-server/files/patch-sql_share_CMakeLists.txt @@ -0,0 +1,17 @@ +--- sql/share/CMakeLists.txt.orig 2017-05-14 23:13:18 UTC ++++ sql/share/CMakeLists.txt +@@ -14,6 +14,8 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + ++IF(FALSE) ++ + SET (dirs + danish + german +@@ -53,3 +55,5 @@ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE + ) + + INSTALL(FILES ${files} DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server) ++ ++ENDIF() diff --git a/databases/mariadb103-server/files/patch-sql_slave.cc b/databases/mariadb103-server/files/patch-sql_slave.cc new file mode 100644 index 000000000000..a5c8d6649650 --- /dev/null +++ b/databases/mariadb103-server/files/patch-sql_slave.cc @@ -0,0 +1,14 @@ +--- sql/slave.cc.orig 2017-05-14 23:13:18 UTC ++++ sql/slave.cc +@@ -14,6 +14,11 @@ + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#define ERR_remove_state(X) ++#elif defined(HAVE_ERR_remove_thread_state) ++#define ERR_remove_state(X) ERR_remove_thread_state(NULL) ++#endif + + /** + @addtogroup Replication diff --git a/databases/mariadb103-server/files/patch-sql_sql__trigger.cc b/databases/mariadb103-server/files/patch-sql_sql__trigger.cc new file mode 100644 index 000000000000..e13b51ff6875 --- /dev/null +++ b/databases/mariadb103-server/files/patch-sql_sql__trigger.cc @@ -0,0 +1,56 @@ +--- sql/sql_trigger.cc.orig 2018-02-26 04:27:17.000000000 +0100 ++++ sql/sql_trigger.cc 2018-02-27 20:54:20.250859000 +0100 +@@ -178,37 +178,37 @@ static File_option triggers_file_paramet + { + { + { STRING_WITH_LEN("triggers") }, +- my_offsetof(class Table_triggers_list, definitions_list), ++ static_cast<int>(my_offsetof(class Table_triggers_list, definitions_list)), + FILE_OPTIONS_STRLIST + }, + { + { STRING_WITH_LEN("sql_modes") }, +- my_offsetof(class Table_triggers_list, definition_modes_list), ++ static_cast<int>(my_offsetof(class Table_triggers_list, definition_modes_list)), + FILE_OPTIONS_ULLLIST + }, + { + { STRING_WITH_LEN("definers") }, +- my_offsetof(class Table_triggers_list, definers_list), ++ static_cast<int>(my_offsetof(class Table_triggers_list, definers_list)), + FILE_OPTIONS_STRLIST + }, + { + { STRING_WITH_LEN("client_cs_names") }, +- my_offsetof(class Table_triggers_list, client_cs_names), ++ static_cast<int>(my_offsetof(class Table_triggers_list, client_cs_names)), + FILE_OPTIONS_STRLIST + }, + { + { STRING_WITH_LEN("connection_cl_names") }, +- my_offsetof(class Table_triggers_list, connection_cl_names), ++ static_cast<int>(my_offsetof(class Table_triggers_list, connection_cl_names)), + FILE_OPTIONS_STRLIST + }, + { + { STRING_WITH_LEN("db_cl_names") }, +- my_offsetof(class Table_triggers_list, db_cl_names), ++ static_cast<int>(my_offsetof(class Table_triggers_list, db_cl_names)), + FILE_OPTIONS_STRLIST + }, + { + { STRING_WITH_LEN("created") }, +- my_offsetof(class Table_triggers_list, create_times), ++ static_cast<int>(my_offsetof(class Table_triggers_list, create_times)), + FILE_OPTIONS_ULLLIST + }, + { { 0, 0 }, 0, FILE_OPTIONS_STRING } +@@ -217,7 +217,7 @@ static File_option triggers_file_paramet + File_option sql_modes_parameters= + { + { STRING_WITH_LEN("sql_modes") }, +- my_offsetof(class Table_triggers_list, definition_modes_list), ++ static_cast<int>(my_offsetof(class Table_triggers_list, definition_modes_list)), + FILE_OPTIONS_ULLLIST + }; + diff --git a/databases/mariadb103-server/files/patch-sql_sql__view.cc b/databases/mariadb103-server/files/patch-sql_sql__view.cc new file mode 100644 index 000000000000..e510745b0f3e --- /dev/null +++ b/databases/mariadb103-server/files/patch-sql_sql__view.cc @@ -0,0 +1,67 @@ +--- sql/sql_view.cc.orig 2018-02-26 04:27:17.000000000 +0100 ++++ sql/sql_view.cc 2018-02-27 20:56:59.769528000 +0100 +@@ -753,49 +753,49 @@ static const int required_view_parameter + */ + static File_option view_parameters[]= + {{{ STRING_WITH_LEN("query")}, +- my_offsetof(TABLE_LIST, select_stmt), ++ static_cast<int>(my_offsetof(TABLE_LIST, select_stmt)), + FILE_OPTIONS_ESTRING}, + {{ STRING_WITH_LEN("md5")}, +- my_offsetof(TABLE_LIST, md5), ++ static_cast<int>(my_offsetof(TABLE_LIST, md5)), + FILE_OPTIONS_STRING}, + {{ STRING_WITH_LEN("updatable")}, +- my_offsetof(TABLE_LIST, updatable_view), ++ static_cast<int>(my_offsetof(TABLE_LIST, updatable_view)), + FILE_OPTIONS_ULONGLONG}, + {{ STRING_WITH_LEN("algorithm")}, +- my_offsetof(TABLE_LIST, algorithm), ++ static_cast<int>(my_offsetof(TABLE_LIST, algorithm)), + FILE_OPTIONS_VIEW_ALGO}, + {{ STRING_WITH_LEN("definer_user")}, +- my_offsetof(TABLE_LIST, definer.user), ++ static_cast<int>(my_offsetof(TABLE_LIST, definer.user)), + FILE_OPTIONS_STRING}, + {{ STRING_WITH_LEN("definer_host")}, +- my_offsetof(TABLE_LIST, definer.host), ++ static_cast<int>(my_offsetof(TABLE_LIST, definer.host)), + FILE_OPTIONS_STRING}, + {{ STRING_WITH_LEN("suid")}, +- my_offsetof(TABLE_LIST, view_suid), ++ static_cast<int>(my_offsetof(TABLE_LIST, view_suid)), + FILE_OPTIONS_ULONGLONG}, + {{ STRING_WITH_LEN("with_check_option")}, +- my_offsetof(TABLE_LIST, with_check), ++ static_cast<int>(my_offsetof(TABLE_LIST, with_check)), + FILE_OPTIONS_ULONGLONG}, + {{ STRING_WITH_LEN("timestamp")}, +- my_offsetof(TABLE_LIST, timestamp), ++ static_cast<int>(my_offsetof(TABLE_LIST, timestamp)), + FILE_OPTIONS_TIMESTAMP}, + {{ STRING_WITH_LEN("create-version")}, +- my_offsetof(TABLE_LIST, file_version), ++ static_cast<int>(my_offsetof(TABLE_LIST, file_version)), + FILE_OPTIONS_ULONGLONG}, + {{ STRING_WITH_LEN("source")}, +- my_offsetof(TABLE_LIST, source), ++ static_cast<int>(my_offsetof(TABLE_LIST, source)), + FILE_OPTIONS_ESTRING}, + {{(char*) STRING_WITH_LEN("client_cs_name")}, +- my_offsetof(TABLE_LIST, view_client_cs_name), ++ static_cast<int>(my_offsetof(TABLE_LIST, view_client_cs_name)), + FILE_OPTIONS_STRING}, + {{(char*) STRING_WITH_LEN("connection_cl_name")}, +- my_offsetof(TABLE_LIST, view_connection_cl_name), ++ static_cast<int>(my_offsetof(TABLE_LIST, view_connection_cl_name)), + FILE_OPTIONS_STRING}, + {{(char*) STRING_WITH_LEN("view_body_utf8")}, +- my_offsetof(TABLE_LIST, view_body_utf8), ++ static_cast<int>(my_offsetof(TABLE_LIST, view_body_utf8)), + FILE_OPTIONS_ESTRING}, + {{ STRING_WITH_LEN("mariadb-version")}, +- my_offsetof(TABLE_LIST, mariadb_version), ++ static_cast<int>(my_offsetof(TABLE_LIST, mariadb_version)), + FILE_OPTIONS_ULONGLONG}, + {{NullS, 0}, 0, + FILE_OPTIONS_STRING} diff --git a/databases/mariadb103-server/files/patch-sql_sys__vars.cc b/databases/mariadb103-server/files/patch-sql_sys__vars.cc new file mode 100644 index 000000000000..5d9f14d03828 --- /dev/null +++ b/databases/mariadb103-server/files/patch-sql_sys__vars.cc @@ -0,0 +1,40 @@ +Fix clang build error + +--- sql/sys_vars.cc.orig 2017-05-14 23:13:18 UTC ++++ sql/sys_vars.cc +@@ -1067,7 +1067,7 @@ static Sys_var_ulong Sys_interactive_tim + "connection before closing it", + NO_SET_STMT SESSION_VAR(net_interactive_timeout), + CMD_LINE(REQUIRED_ARG), +- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1)); ++ VALID_RANGE(1, INT_MAX32/1000), DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1)); + + static Sys_var_ulonglong Sys_join_buffer_size( + "join_buffer_size", +@@ -2242,7 +2242,7 @@ static Sys_var_ulong Sys_net_read_timeou + "Number of seconds to wait for more data from a connection before " + "aborting the read", + SESSION_VAR(net_read_timeout), CMD_LINE(REQUIRED_ARG), +- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_READ_TIMEOUT), BLOCK_SIZE(1), ++ VALID_RANGE(1, INT_MAX32/1000), DEFAULT(NET_READ_TIMEOUT), BLOCK_SIZE(1), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(fix_net_read_timeout)); + +@@ -2257,7 +2257,7 @@ static Sys_var_ulong Sys_net_write_timeo + "Number of seconds to wait for a block to be written to a connection " + "before aborting the write", + SESSION_VAR(net_write_timeout), CMD_LINE(REQUIRED_ARG), +- VALID_RANGE(1, LONG_TIMEOUT), DEFAULT(NET_WRITE_TIMEOUT), BLOCK_SIZE(1), ++ VALID_RANGE(1, INT_MAX32/1000), DEFAULT(NET_WRITE_TIMEOUT), BLOCK_SIZE(1), + NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), + ON_UPDATE(fix_net_write_timeout)); + +@@ -3505,7 +3505,7 @@ static Sys_var_ulong Sys_net_wait_timeou + "The number of seconds the server waits for activity on a " + "connection before closing it", + NO_SET_STMT SESSION_VAR(net_wait_timeout), CMD_LINE(REQUIRED_ARG), +- VALID_RANGE(1, IF_WIN(INT_MAX32/1000, LONG_TIMEOUT)), ++ VALID_RANGE(1, INT_MAX32/1000), + DEFAULT(NET_WAIT_TIMEOUT), BLOCK_SIZE(1)); + + static Sys_var_plugin Sys_default_storage_engine( diff --git a/databases/mariadb103-server/files/patch-storage_innobase_lz4.cmake b/databases/mariadb103-server/files/patch-storage_innobase_lz4.cmake new file mode 100644 index 000000000000..096529fae9f5 --- /dev/null +++ b/databases/mariadb103-server/files/patch-storage_innobase_lz4.cmake @@ -0,0 +1,36 @@ +--- storage/innobase/lz4.cmake.orig 2017-05-14 23:13:18 UTC ++++ storage/innobase/lz4.cmake +@@ -17,21 +17,29 @@ SET(WITH_INNODB_LZ4 AUTO CACHE STRING + + MACRO (MYSQL_CHECK_LZ4) + IF (WITH_INNODB_LZ4 STREQUAL "ON" OR WITH_INNODB_LZ4 STREQUAL "AUTO") +- CHECK_INCLUDE_FILES(lz4.h HAVE_LZ4_H) +- CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_limitedOutput "" HAVE_LZ4_SHARED_LIB) +- CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default "" HAVE_LZ4_COMPRESS_DEFAULT) ++ find_path(LZ4_INCLUDE_DIR NAMES lz4.h) ++ find_library(LZ4_LIBRARY NAMES lz4) ++ IF (LZ4_LIBRARY) ++ get_filename_component(LZ4_LIBDIR ${LZ4_LIBRARY} DIRECTORY) ++#MESSAGE(STATUS "LZ4_INCLUDE_DIR=${LZ4_INCLUDE_DIR} LZ4_LIBRARY=${LZ4_LIBRARY} LZ4_LIBDIR=${LZ4_LIBDIR}") ++ IF (LZ4_INCLUDE_DIR) ++ SET(HAVE_LZ4_H YES) ++ ENDIF() ++ CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_limitedOutput ${LZ4_LIBDIR} HAVE_LZ4_SHARED_LIB) ++ CHECK_LIBRARY_EXISTS(lz4 LZ4_compress_default ${LZ4_LIBDIR} HAVE_LZ4_COMPRESS_DEFAULT) + + IF (HAVE_LZ4_SHARED_LIB AND HAVE_LZ4_H) + ADD_DEFINITIONS(-DHAVE_LZ4=1) + IF (HAVE_LZ4_COMPRESS_DEFAULT) + ADD_DEFINITIONS(-DHAVE_LZ4_COMPRESS_DEFAULT=1) + ENDIF() +- LINK_LIBRARIES(lz4) ++ LINK_LIBRARIES(innobase ${LZ4_LIBRARY}) + ELSE() + IF (WITH_INNODB_LZ4 STREQUAL "ON") + MESSAGE(FATAL_ERROR "Required lz4 library is not found") + ENDIF() + ENDIF() ++ ENDIF() + ENDIF() + ENDMACRO() + diff --git a/databases/mariadb103-server/files/patch-storage_innobase_lzo.cmake b/databases/mariadb103-server/files/patch-storage_innobase_lzo.cmake new file mode 100644 index 000000000000..afabe8542926 --- /dev/null +++ b/databases/mariadb103-server/files/patch-storage_innobase_lzo.cmake @@ -0,0 +1,38 @@ +--- storage/innobase/lzo.cmake.orig 2017-05-14 23:13:18 UTC ++++ storage/innobase/lzo.cmake +@@ -17,12 +17,10 @@ SET(WITH_INNODB_LZO AUTO CACHE STRING + + MACRO (MYSQL_CHECK_LZO_STATIC) + IF (WITH_INNODB_LZO STREQUAL "ON" OR WITH_INNODB_LZO STREQUAL "AUTO") +- CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H) +- CHECK_LIBRARY_EXISTS(liblzo2.a lzo1x_1_compress "" HAVE_LZO_LIB) +- ++ CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress "${LZO_LIBDIR}" HAVE_LZO_LIB) + IF(HAVE_LZO_LIB AND HAVE_LZO_H) + ADD_DEFINITIONS(-DHAVE_LZO=1) +- LINK_LIBRARIES(liblzo2.a) ++ LINK_LIBRARIES(lzo2) + ELSE() + IF (WITH_INNODB_LZO STREQUAL "ON") + MESSAGE(FATAL_ERROR "Required lzo library is not found") +@@ -33,12 +31,16 @@ ENDMACRO() + + MACRO (MYSQL_CHECK_LZO) + IF (WITH_INNODB_LZO STREQUAL "ON" OR WITH_INNODB_LZO STREQUAL "AUTO") +- CHECK_INCLUDE_FILES(lzo/lzo1x.h HAVE_LZO_H) +- CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress "" HAVE_LZO_SHARED_LIB) +- ++ find_path(LZO_INCLUDE NAMES lzo/lzo1x.h) ++ find_library(LZO_LIBRARY NAMES lzo2) ++ get_filename_component(LZO_LIBDIR ${LZO_LIBRARY} DIRECTORY) ++ IF (LZO_INCLUDE) ++ SET(HAVE_LZO_H 1) ++ ENDIF() ++ CHECK_LIBRARY_EXISTS(lzo2 lzo1x_1_compress ${LZO_LIBDIR} HAVE_LZO_SHARED_LIB) + IF(HAVE_LZO_SHARED_LIB AND HAVE_LZO_H) + ADD_DEFINITIONS(-DHAVE_LZO=1) +- LINK_LIBRARIES(lzo2) ++ LINK_LIBRARIES(${LZO_LIBRARY}) + ELSE() + IF (WITH_INNODB_LZO STREQUAL "ON") + MESSAGE(FATAL_ERROR "Required lzo library is not found") diff --git a/databases/mariadb103-server/files/patch-storage_innobase_snappy.cmake b/databases/mariadb103-server/files/patch-storage_innobase_snappy.cmake new file mode 100644 index 000000000000..42c80e08d04a --- /dev/null +++ b/databases/mariadb103-server/files/patch-storage_innobase_snappy.cmake @@ -0,0 +1,24 @@ +--- storage/innobase/snappy.cmake.orig 2017-05-14 23:13:18 UTC ++++ storage/innobase/snappy.cmake +@@ -17,12 +17,17 @@ SET(WITH_INNODB_SNAPPY AUTO CACHE STRING + + MACRO (MYSQL_CHECK_SNAPPY) + IF (WITH_INNODB_SNAPPY STREQUAL "ON" OR WITH_INNODB_SNAPPY STREQUAL "AUTO") +- CHECK_INCLUDE_FILES(snappy-c.h HAVE_SNAPPY_H) +- CHECK_LIBRARY_EXISTS(snappy snappy_uncompress "" HAVE_SNAPPY_SHARED_LIB) +- ++ find_path(SNAPPY_INCLUDE_DIR NAMES snappy-c.h) ++ find_library(SNAPPY_LIBRARY NAMES snappy) ++ get_filename_component(SNAPPY_LIBDIR ${SNAPPY_LIBRARY} DIRECTORY) ++ IF (SNAPPY_INCLUDE_DIR) ++ SET(HAVE_SNAPPY_H 1) ++ ENDIF() ++ CHECK_LIBRARY_EXISTS(snappy snappy_uncompress ${SNAPPY_LIBDIR} HAVE_SNAPPY_SHARED_LIB) ++MESSAGE(STATUS "HAVE_SNAPPY_H=${HAVE_SNAPPY_H} HAVE_SNAPPY_SHARED_LIB=${HAVE_SNAPPY_SHARED_LIB} SNAPPY_LIBDIR=${SNAPPY_LIBDIR} ") + IF(HAVE_SNAPPY_SHARED_LIB AND HAVE_SNAPPY_H) + ADD_DEFINITIONS(-DHAVE_SNAPPY=1) +- LINK_LIBRARIES(snappy) ++ LINK_LIBRARIES(${SNAPPY_LIBRARY}) + ELSE() + IF (WITH_INNODB_SNAPPY STREQUAL "ON") + MESSAGE(FATAL_ERROR "Required snappy library is not found") diff --git a/databases/mariadb103-server/files/patch-storage_mroonga_vendor_groonga_CMakeLists.txt b/databases/mariadb103-server/files/patch-storage_mroonga_vendor_groonga_CMakeLists.txt new file mode 100644 index 000000000000..023d10e97d94 --- /dev/null +++ b/databases/mariadb103-server/files/patch-storage_mroonga_vendor_groonga_CMakeLists.txt @@ -0,0 +1,15 @@ +From https://github.com/openquery/mariadb-server/commit/43bf72e45b9ead6aa0dc4abd6e5719c6381974b5 + +--- storage/mroonga/vendor/groonga/CMakeLists.txt.orig 2017-05-14 23:13:18 UTC ++++ storage/mroonga/vendor/groonga/CMakeLists.txt +@@ -167,6 +167,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COM + MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-clobbered") + endif() + ++if(CMAKE_COMPILER_IS_CLANGCXX) ++ MY_CHECK_AND_SET_COMPILER_FLAG("-fexceptions") ++endif() ++ + if(NOT DEFINED CMAKE_C_COMPILE_OPTIONS_PIC) + # For old CMake + if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGCXX) diff --git a/databases/mariadb103-server/files/patch-storage_rocksdb_rocksdb_db_malloc__stats.cc b/databases/mariadb103-server/files/patch-storage_rocksdb_rocksdb_db_malloc__stats.cc new file mode 100644 index 000000000000..0114e08d28ef --- /dev/null +++ b/databases/mariadb103-server/files/patch-storage_rocksdb_rocksdb_db_malloc__stats.cc @@ -0,0 +1,15 @@ +--- storage/rocksdb/rocksdb/db/malloc_stats.cc.orig 2017-08-17 10:05:38 UTC ++++ storage/rocksdb/rocksdb/db/malloc_stats.cc +@@ -16,7 +16,12 @@ + namespace rocksdb { + + #ifdef ROCKSDB_JEMALLOC ++#ifdef __FreeBSD__ ++#include <malloc_np.h> ++#define je_malloc_stats_print malloc_stats_print ++#else + #include "jemalloc/jemalloc.h" ++#endif + + typedef struct { + char* cur; diff --git a/databases/mariadb103-server/files/patch-storage_tokudb_CMakeLists.txt b/databases/mariadb103-server/files/patch-storage_tokudb_CMakeLists.txt new file mode 100644 index 000000000000..e75813586e40 --- /dev/null +++ b/databases/mariadb103-server/files/patch-storage_tokudb_CMakeLists.txt @@ -0,0 +1,9 @@ +--- storage/tokudb/CMakeLists.txt.orig 2017-09-25 08:33:26.000000000 +0200 ++++ storage/tokudb/CMakeLists.txt 2017-09-28 21:46:55.119327000 +0200 +@@ -108,6 +108,3 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINA + + TARGET_LINK_LIBRARIES(tokudb tokufractaltree_static tokuportability_static + ${ZLIB_LIBRARY} ${LIBJEMALLOC} stdc++) +- +-SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -flto -fuse-linker-plugin") +-SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} -flto -fuse-linker-plugin") diff --git a/databases/mariadb103-server/files/patch-storage_tokudb_PerconaFT_CMakeLists.txt b/databases/mariadb103-server/files/patch-storage_tokudb_PerconaFT_CMakeLists.txt new file mode 100644 index 000000000000..9ef62147175b --- /dev/null +++ b/databases/mariadb103-server/files/patch-storage_tokudb_PerconaFT_CMakeLists.txt @@ -0,0 +1,11 @@ +--- storage/tokudb/PerconaFT/CMakeLists.txt.orig 2017-05-14 23:13:20 UTC ++++ storage/tokudb/PerconaFT/CMakeLists.txt +@@ -80,7 +80,7 @@ add_subdirectory(src) + add_subdirectory(ftcxx) + add_subdirectory(tools) + +-INSTALL_DOCUMENTATION(README.md COPYING.AGPLv3 COPYING.GPLv2 PATENTS ++INSTALL_DOCUMENTATION(README.md + COMPONENT Server) + + ## build tags diff --git a/databases/mariadb103-server/files/patch-storage_tokudb_PerconaFT_cmake__modules_TokuThirdParty.cmake b/databases/mariadb103-server/files/patch-storage_tokudb_PerconaFT_cmake__modules_TokuThirdParty.cmake new file mode 100644 index 000000000000..b4235b8fe8e7 --- /dev/null +++ b/databases/mariadb103-server/files/patch-storage_tokudb_PerconaFT_cmake__modules_TokuThirdParty.cmake @@ -0,0 +1,39 @@ +Do NOT use bundled libs, use xz/lzma from base and archivers/snappy from ports + +--- storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake.orig 2017-05-14 23:13:20 UTC ++++ storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake +@@ -34,6 +34,13 @@ if (CMAKE_PROJECT_NAME STREQUAL TokuDB) + endif () + endif () + ++IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ++ include_directories("/usr/include") ++ ++ add_library(lzma SHARED IMPORTED) ++ set_target_properties(lzma PROPERTIES IMPORTED_LOCATION ++ "/usr/lib/liblzma.so") ++ELSE() + ## add lzma with an external project + set(xz_configure_opts --with-pic --enable-static) + if (APPLE) +@@ -105,8 +112,15 @@ add_library(lzma STATIC IMPORTED) + set_target_properties(lzma PROPERTIES IMPORTED_LOCATION + "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz/lib/liblzma.a") + add_dependencies(lzma build_lzma) ++ENDIF() + ++IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ++ include_directories("/usr/local/include") + ++ add_library(snappy SHARED IMPORTED) ++ set_target_properties(snappy PROPERTIES IMPORTED_LOCATION ++ "/usr/local/lib/libsnappy.so") ++ELSE() + ## add snappy with an external project + set(SNAPPY_SOURCE_DIR "${TokuDB_SOURCE_DIR}/third_party/snappy-1.1.2" CACHE FILEPATH "Where to find sources for snappy.") + if (NOT EXISTS "${SNAPPY_SOURCE_DIR}/CMakeLists.txt") +@@ -140,3 +154,4 @@ add_library(snappy STATIC IMPORTED) + set_target_properties(snappy PROPERTIES IMPORTED_LOCATION + "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/snappy/lib/libsnappy.a") + add_dependencies(snappy build_snappy) ++ENDIF() diff --git a/databases/mariadb103-server/files/patch-storage_tokudb_PerconaFT_portability_memory.cc b/databases/mariadb103-server/files/patch-storage_tokudb_PerconaFT_portability_memory.cc new file mode 100644 index 000000000000..c6eb23c5a525 --- /dev/null +++ b/databases/mariadb103-server/files/patch-storage_tokudb_PerconaFT_portability_memory.cc @@ -0,0 +1,16 @@ +Fix build error + +--- storage/tokudb/PerconaFT/portability/memory.cc.orig 2017-05-14 23:13:21 UTC ++++ storage/tokudb/PerconaFT/portability/memory.cc +@@ -42,11 +42,6 @@ Copyright (c) 2006, 2015, Percona and/or + #include <string.h> + #include <stdio.h> + #include <stdlib.h> +-#if defined(HAVE_MALLOC_H) +-# include <malloc.h> +-#elif defined(HAVE_SYS_MALLOC_H) +-# include <sys/malloc.h> +-#endif + #include <dlfcn.h> + #include <toku_race_tools.h> + #include "memory.h" diff --git a/databases/mariadb103-server/files/patch-support-files_CMakeLists.txt b/databases/mariadb103-server/files/patch-support-files_CMakeLists.txt new file mode 100644 index 000000000000..c9392ca628a2 --- /dev/null +++ b/databases/mariadb103-server/files/patch-support-files_CMakeLists.txt @@ -0,0 +1,14 @@ +Fix up missing WITHOUT_DOCS, WITHOUT_CLIENT options + +--- support-files/CMakeLists.txt.orig 2017-05-14 23:13:28 UTC ++++ support-files/CMakeLists.txt +@@ -83,7 +83,9 @@ IF(UNIX) + CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development) + ++IF(FALSE) + INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development) ++ENDIF() + + SET(bindir ${INSTALL_BINDIRABS}) + SET(sbindir ${INSTALL_SBINDIRABS}) diff --git a/databases/mariadb103-server/files/pkg-message.in b/databases/mariadb103-server/files/pkg-message.in new file mode 100644 index 000000000000..b49d42074149 --- /dev/null +++ b/databases/mariadb103-server/files/pkg-message.in @@ -0,0 +1,15 @@ +************************************************************************ + +Remember to run mysql_upgrade (with the optional --datadir=<dbdir> flag) +the first time you start the MySQL server after an upgrade from an +earlier version. + +MariaDB respects hier(7) and doesn't check /etc and /etc/mysql for +my.cnf. Please move existing my.cnf files from those paths to +%%PREFIX%%/etc and %%PREFIX%%/etc/mysql. + +This port does NOT include the mytop perl script, this is included in +the MariaDB tarball but the most recent version can be found in the +databases/mytop port + +************************************************************************ |