diff options
author | brnrd <brnrd@FreeBSD.org> | 2016-05-07 04:59:50 +0800 |
---|---|---|
committer | brnrd <brnrd@FreeBSD.org> | 2016-05-07 04:59:50 +0800 |
commit | 7ed9a0a4e48b3861765f7f0376c13521d08469a1 (patch) | |
tree | 7c4e023006e24c7907e4c9c798dea4d78740e3d9 /databases | |
parent | 6b96c778932e181034a97d4fce168cc043efcaad (diff) | |
download | freebsd-ports-gnome-7ed9a0a4e48b3861765f7f0376c13521d08469a1.tar.gz freebsd-ports-gnome-7ed9a0a4e48b3861765f7f0376c13521d08469a1.tar.zst freebsd-ports-gnome-7ed9a0a4e48b3861765f7f0376c13521d08469a1.zip |
databases/mariadb100-{client,server}: Update to 10.0.25
- Update to latest version 10.0.25
- Fix security vulnerabilities
- Replace USE_MYSQL/WANT_MYSQL_VER with USES= mysql:100m
- Always build with SSL support, remove bundled CyaSSL
- Align INNODB engine option with upstream option name
- Mark not supported for TokuDB on i386
- Backport improvements from 10.1 port
- Replace bundled libs with ports' versions
- ENGINES options group
- TokuDB Engine
- Add upstreamed patch fixing linuxism
- Add/fix docs and license files
- Make OQGraph ignore message explicit
PR: 209318
Security: 8c2b2f11-0ebe-11e6-b55e-b499baebfeaf
Reviewed by: feld (mentor)
Approved by: feld (mentor)
Differential Revision: D6162
Diffstat (limited to 'databases')
11 files changed, 122 insertions, 111 deletions
diff --git a/databases/mariadb100-client/files/patch-cmake_jemalloc.cmake b/databases/mariadb100-client/files/patch-cmake_jemalloc.cmake deleted file mode 100644 index 8894a2d3dbfa..000000000000 --- a/databases/mariadb100-client/files/patch-cmake_jemalloc.cmake +++ /dev/null @@ -1,28 +0,0 @@ -Upstreamed https://github.com/MariaDB/server/pull/139 - ---- cmake/jemalloc.cmake.orig 2015-12-16 16:05:44 UTC -+++ cmake/jemalloc.cmake -@@ -20,11 +20,21 @@ MACRO (CHECK_JEMALLOC) - SET(CMAKE_REQUIRED_LIBRARIES pthread dl m) - SET(what bundled) - ELSE() -- SET(libname jemalloc) -+ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND -+ CMAKE_SYSTEM_VERSION STRGREATER "10.0") -+ SET(libname c) -+ ELSE() -+ SET(libname jemalloc) -+ ENDIF() - SET(what system) - ENDIF() - -- CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_JEMALLOC) -+ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND -+ CMAKE_SYSTEM_VERSION STRGREATER "10.0") -+ SET(HAVE_JEMALLOC ON) -+ ELSE() -+ CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_JEMALLOC) -+ ENDIF() - SET(CMAKE_REQUIRED_LIBRARIES) - - IF (HAVE_JEMALLOC) diff --git a/databases/mariadb100-client/files/patch-extra_yassl_taocrypt_src_integer.cpp b/databases/mariadb100-client/files/patch-extra_yassl_taocrypt_src_integer.cpp deleted file mode 100644 index 214edfd8834a..000000000000 --- a/databases/mariadb100-client/files/patch-extra_yassl_taocrypt_src_integer.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- extra/yassl/taocrypt/src/integer.cpp.orig 2014-04-15 14:02:39.000000000 +0300 -+++ extra/yassl/taocrypt/src/integer.cpp 2014-05-16 17:00:15.000000000 +0300 -@@ -75,7 +75,7 @@ - CPP_TYPENAME AlignedAllocator<T>::pointer AlignedAllocator<T>::allocate( - size_type n, const void *) - { -- if (n > this->max_size()) -+ if (n > AlignedAllocator<T>::max_size()) - return 0; - if (n == 0) - return 0; diff --git a/databases/mariadb100-server/Makefile b/databases/mariadb100-server/Makefile index 4dd04ddd0f48..30fad14cd63d 100644 --- a/databases/mariadb100-server/Makefile +++ b/databases/mariadb100-server/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME?= mariadb -PORTVERSION= 10.0.23 +PORTVERSION= 10.0.25 CATEGORIES= databases ipv6 MASTER_SITES= http://ftp.osuosl.org/pub/${SITESDIR}/ \ http://mirrors.supportex.net/${SITESDIR}/ \ @@ -24,23 +24,18 @@ SUB_FILES= pkg-message PKGMESSAGE= ${WRKDIR}/pkg-message SLAVEDIRS= databases/mariadb100-client -USES= bison:build cmake cpe execinfo gmake shebangfix +USES= bison:build cmake compiler:c++11-lib cpe execinfo gmake shebangfix USE_LDCONFIG= ${PREFIX}/lib/mysql ${PREFIX}/lib/mysql/plugin SHEBANG_FILES= scripts/*.sh SITESDIR= mariadb/mariadb-${PORTVERSION}/source OPTIONS_DEFINE= FASTMTX -OPTIONS_RADIO= SSL -OPTIONS_RADIO_SSL= BUNDLED_SSL OPENSSL WITHOUT_SSL -OPTIONS_DEFAULT+= OPENSSL NO_OPTIONS_SORT= yes -BUNDLED_SSL_DESC= SSL/TLS support via (bundled) CyaSSL FASTMTX_DESC= Replace mutexes with spinlocks -WITHOUT_SSL_DESC= No SSL/TLS support -CMAKE_ARGS+= -DINSTALL_DOCDIR="share/doc/mysql" \ - -DINSTALL_DOCREADMEDIR="share/doc/mysql" \ +CMAKE_ARGS+= -DINSTALL_DOCDIR="share/doc/mariadb" \ + -DINSTALL_DOCREADMEDIR="share/doc/mariadb" \ -DINSTALL_INCLUDEDIR="include/mysql" \ -DINSTALL_INFODIR="info" \ -DINSTALL_LIBDIR="lib/mysql" \ @@ -56,6 +51,7 @@ CMAKE_ARGS+= -DINSTALL_DOCDIR="share/doc/mysql" \ -DINSTALL_SUPPORTFILESDIR="share/mysql" \ -DWITH_UNIT_TESTS=0 \ -DWITH_LIBEDIT=0 \ + -DWITH_SSL=${OPENSSLBASE} \ -DWITH_LIBWRAP=1 \ -DEXECINFO_ROOT=${LOCALBASE} \ -DCOMPILATION_COMMENT="FreeBSD Ports" @@ -73,31 +69,36 @@ CONFLICTS_INSTALL= mariadb5*-${PKGNAMESUFFIX:C/^[0-9]*-//}-* \ .if !defined(CLIENT_ONLY) # MySQL-Server options -USE_MYSQL= yes USE_LDCONFIG+= ${PREFIX}/lib/mysql/plugin -OPTIONS_DEFINE+= INNODB MAXKEY MROONGA OQGRAPH +OPTIONS_DEFINE+= MAXKEY OPTIONS_DEFAULT+= MAXKEY -OPTIONS_SUB= yes +OPTIONS_GROUP= ENGINES +OPTIONS_GROUP_ENGINES= INNOBASE MROONGA OQGRAPH SPHINX SPIDER TOKUDB + +ENGINES_DESC= Optional MariaDB storage engines +INNOBASE_DESC= Build InnoDB engine next to XtraDB +MAXKEY_DESC= Change max key length from 1000 to 4000 +MROONGA_DESC= Mroonga Full Text Search engine +OQGRAPH_DESC= Open Query Graph Computation engine (Requires GCC) +SPHINX_DESC= SphinxSE engine +SPIDER_DESC= Partitioning and XA-transactions engine +TOKUDB_DESC= Fractal tree index tree data structure engine + +OPTIONS_SUB= yes + +TOKUDB_PORTDOCS= PATENTS README.md -INNODB_DESC= Build InnoDB engine next to XtraDB -MAXKEY_DESC= Change max key length from 1000 to 4000 -MROONGA_DESC= Mroonga Full Text Search engine (gcc) -OQGRAPH_DESC= Open Query Graph Computation engine (gcc) .endif -BUNDLED_SSL_CMAKE_ON= -DWITH_SSL=bundled FASTMTX_CMAKE_ON= -DWITH_FAST_MUTEXES=1 -OPENSSL_CMAKE_ON= -DWITH_SSL=yes -OPENSSL_USE= OPENSSL=yes -WITHOUT_SSL_CMAKE_ON= -DWITH_SSL=no +USE_OPENSSL= yes .if defined(CLIENT_ONLY) # MySQL-Client part USES+= readline .else # MySQL-Server part -USE_MYSQL= yes -WANT_MYSQL_VER= 100m +USES+= mysql:100m USE_RC_SUBR= mysql-server USERS= mysql GROUPS= mysql @@ -105,7 +106,10 @@ CMAKE_ARGS+= -DWITH_EMBEDDED_SERVER="ON" \ -DCMAKE_SKIP_BUILD_RPATH:BOOL=YES \ -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 -INNODB_CMAKE_OFF= -DWITHOUT_INNOBASE=1 +.for ENGINE in ${OPTIONS_GROUP_ENGINES} +${ENGINE}_CMAKE_OFF= -DWITHOUT_${ENGINE}=1 +.endfor + MAXKEY_EXTRA_PATCHES+= ${FILESDIR}/extra-patch-include_my__compare.h MROONGA_CMAKE_OFF= -DWITHOUT_MROONGA=1 OQGRAPH_LIB_DEPENDS= libboost_system.so:devel/boost-libs \ @@ -113,7 +117,7 @@ OQGRAPH_LIB_DEPENDS= libboost_system.so:devel/boost-libs \ # Currently OQGraph does not build using clang. # See See https://mariadb.atlassian.net/browse/MDEV-8051. OQGRAPH_USE= gcc -OQGRAPH_BROKEN= does not build +OQGRAPH_BROKEN= OQGraph does not build post-install: # Remove programs to avoid conflict with mariadb100-client @@ -122,7 +126,9 @@ post-install: ${RM} ${STAGEDIR}${PREFIX}/bin/msql2mysql \ ${STAGEDIR}${PREFIX}/bin/mysql_config \ ${STAGEDIR}${PREFIX}/bin/mysql_find_rows \ - ${STAGEDIR}${PREFIX}/bin/mysqlaccess + ${STAGEDIR}${PREFIX}/bin/mysqlaccess \ + ${STAGEDIR}${DOCSDIR}/COPYING.AGPLv3 \ + ${STAGEDIR}${DOCSDIR}/COPYING.GPLv2 .endif .include <bsd.port.pre.mk> @@ -133,8 +139,14 @@ CMAKE_ARGS+= -DWITH_JEMALLOC="system" CMAKE_ARGS+= -DWITH_JEMALLOC="no" .endif -# Server segfaults on i386 when built with clang >= 3.4 +.if ${PORT_OPTIONS:MTOKUDB} +NOT_FOR_ARCHS= i386 +NOT_FOR_ARCHS_REASON= TokuDB not supported on 32-bit platforms, see \ + https://github.com/percona/PerconaFT/blob/master/README.md +.endif + .if ${ARCH} == 'i386' && ${OSVERSION} >= 1001000 +# Server segfaults on i386 when built with clang >= 3.4 USE_GCC= yes .endif diff --git a/databases/mariadb100-server/distinfo b/databases/mariadb100-server/distinfo index 339ada7ae292..ae638e91070e 100644 --- a/databases/mariadb100-server/distinfo +++ b/databases/mariadb100-server/distinfo @@ -1,2 +1,2 @@ -SHA256 (mariadb-10.0.23.tar.gz) = 156eed69892834be66736aebe0a17a76d5031fd1c2f481a82228ff33bb7ba274 -SIZE (mariadb-10.0.23.tar.gz) = 57394548 +SHA256 (mariadb-10.0.25.tar.gz) = 4540832c18112a332f61f4eeb57140890c4e2188ae12b312f4e2e8a0363553e4 +SIZE (mariadb-10.0.25.tar.gz) = 57459461 diff --git a/databases/mariadb100-server/files/patch-cmake_jemalloc.cmake b/databases/mariadb100-server/files/patch-cmake_jemalloc.cmake deleted file mode 100644 index 8894a2d3dbfa..000000000000 --- a/databases/mariadb100-server/files/patch-cmake_jemalloc.cmake +++ /dev/null @@ -1,28 +0,0 @@ -Upstreamed https://github.com/MariaDB/server/pull/139 - ---- cmake/jemalloc.cmake.orig 2015-12-16 16:05:44 UTC -+++ cmake/jemalloc.cmake -@@ -20,11 +20,21 @@ MACRO (CHECK_JEMALLOC) - SET(CMAKE_REQUIRED_LIBRARIES pthread dl m) - SET(what bundled) - ELSE() -- SET(libname jemalloc) -+ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND -+ CMAKE_SYSTEM_VERSION STRGREATER "10.0") -+ SET(libname c) -+ ELSE() -+ SET(libname jemalloc) -+ ENDIF() - SET(what system) - ENDIF() - -- CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_JEMALLOC) -+ IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND -+ CMAKE_SYSTEM_VERSION STRGREATER "10.0") -+ SET(HAVE_JEMALLOC ON) -+ ELSE() -+ CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_JEMALLOC) -+ ENDIF() - SET(CMAKE_REQUIRED_LIBRARIES) - - IF (HAVE_JEMALLOC) diff --git a/databases/mariadb100-server/files/patch-storage_connect_json.cpp b/databases/mariadb100-server/files/patch-storage_connect_json.cpp deleted file mode 100644 index c3cd4ea49b73..000000000000 --- a/databases/mariadb100-server/files/patch-storage_connect_json.cpp +++ /dev/null @@ -1,13 +0,0 @@ -# Add patch for https://mariadb.atlassian.net/browse/MDEV-9322 - ---- storage/connect/json.cpp.orig 2015-12-16 16:05:45 UTC -+++ storage/connect/json.cpp -@@ -594,7 +594,7 @@ PSZ Serialize(PGLOBAL g, PJSON jsp, char - if (fs) { - fputs(EL, fs); - fclose(fs); -- str = (err) ? NULL : "Ok"; -+ str = (err) ? NULL : (char*)"Ok"; - } else if (!err) { - str = ((JOUTSTR*)jp)->Strp; - jp->WriteChr('\0'); diff --git a/databases/mariadb100-server/files/patch-storage_connect_tabmysql.cpp b/databases/mariadb100-server/files/patch-storage_connect_tabmysql.cpp new file mode 100644 index 000000000000..a42aa721a02d --- /dev/null +++ b/databases/mariadb100-server/files/patch-storage_connect_tabmysql.cpp @@ -0,0 +1,13 @@ +See https://mariadb.atlassian.net/browse/MDEV-9603 + +--- storage/connect/tabmysql.cpp.orig 2016-04-28 20:27:49 UTC ++++ storage/connect/tabmysql.cpp +@@ -334,7 +334,7 @@ bool MYSQLDEF::DefineAM(PGLOBAL g, LPCST + Delayed = !!GetIntCatInfo("Delayed", 0); + } else { + // MYSQL access from a PROXY table +- Database = GetStringCatInfo(g, "Database", Schema ? Schema : PlugDup(g, "*")); ++ Database = GetStringCatInfo(g, "Database", Schema ? Schema : PlugDup(g, (PSZ)"*")); + Isview = GetBoolCatInfo("View", false); + + // We must get other connection parms from the calling table diff --git a/databases/mariadb100-server/files/patch-storage_tokudb_CMakeLists.txt b/databases/mariadb100-server/files/patch-storage_tokudb_CMakeLists.txt new file mode 100644 index 000000000000..cd1f2a84bea8 --- /dev/null +++ b/databases/mariadb100-server/files/patch-storage_tokudb_CMakeLists.txt @@ -0,0 +1,13 @@ +--- storage/tokudb/CMakeLists.txt.orig 2016-02-17 20:59:56 UTC ++++ storage/tokudb/CMakeLists.txt +@@ -131,8 +131,8 @@ SET(TOKUDB_PLUGIN_DYNAMIC "ha_tokudb") + SET(TOKUDB_SOURCES ha_tokudb.cc) + MYSQL_ADD_PLUGIN(tokudb ${TOKUDB_SOURCES} STORAGE_ENGINE MODULE_ONLY + LINK_LIBRARIES tokufractaltree_static tokuportability_static ${ZLIB_LIBRARY} 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") ++SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE}") ++SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO}") + + SET(CPACK_RPM_server_PACKAGE_OBSOLETES + "${CPACK_RPM_server_PACKAGE_OBSOLETES} MariaDB-tokudb-engine < 10.0.5" PARENT_SCOPE) diff --git a/databases/mariadb100-server/files/patch-storage_tokudb_PerconaFT_cmake__modules_TokuThirdParty.cmake b/databases/mariadb100-server/files/patch-storage_tokudb_PerconaFT_cmake__modules_TokuThirdParty.cmake new file mode 100644 index 000000000000..bce1fd09db6f --- /dev/null +++ b/databases/mariadb100-server/files/patch-storage_tokudb_PerconaFT_cmake__modules_TokuThirdParty.cmake @@ -0,0 +1,37 @@ +--- storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake.orig 2016-02-17 20:59:56 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/mariadb100-server/files/patch-storage_tokudb_PerconaFT_ft_CMakeLists.txt b/databases/mariadb100-server/files/patch-storage_tokudb_PerconaFT_ft_CMakeLists.txt new file mode 100644 index 000000000000..640ccd2263f9 --- /dev/null +++ b/databases/mariadb100-server/files/patch-storage_tokudb_PerconaFT_ft_CMakeLists.txt @@ -0,0 +1,13 @@ +--- storage/tokudb/PerconaFT/ft/CMakeLists.txt.orig 2016-02-17 21:59:56.000000000 +0100 ++++ storage/tokudb/PerconaFT/ft/CMakeLists.txt 2016-02-21 20:51:12.317052693 +0100 +@@ -84,8 +84,8 @@ set_target_properties(ft_static PROPERTI + maybe_add_gcov_to_libraries(ft ft_static) + + ## depend on other generated targets +-add_dependencies(ft install_tdb_h generate_log_code build_lzma build_snappy) +-add_dependencies(ft_static install_tdb_h generate_log_code build_lzma build_snappy) ++add_dependencies(ft install_tdb_h generate_log_code) ++add_dependencies(ft_static install_tdb_h generate_log_code) + + ## link with lzma (which should be static) and link dependers with zlib + target_link_libraries(ft LINK_PRIVATE util_static lzma snappy ${LIBTOKUPORTABILITY}) diff --git a/databases/mariadb100-server/pkg-plist b/databases/mariadb100-server/pkg-plist index e0741d0b8f50..31682b9e86ef 100644 --- a/databases/mariadb100-server/pkg-plist +++ b/databases/mariadb100-server/pkg-plist @@ -33,6 +33,8 @@ bin/perror bin/replace bin/resolve_stack_dump bin/resolveip +%%TOKUDB%%bin/tokuft_logprint +%%TOKUDB%%bin/tokuftdump include/mysql/private/embedded_priv.h lib/mysql/libmysqld.a lib/mysql/libmysqld.so @@ -51,12 +53,13 @@ lib/mysql/plugin/ha_blackhole.so lib/mysql/plugin/ha_connect.so lib/mysql/plugin/ha_federated.so lib/mysql/plugin/ha_federatedx.so -%%INNODB%%lib/mysql/plugin/ha_innodb.so +%%INNOBASE%%lib/mysql/plugin/ha_innodb.so %%MROONGA%%lib/mysql/plugin/ha_mroonga.so %%OQGRAPH%%lib/mysql/plugin/ha_oqgraph.so lib/mysql/plugin/ha_sequence.so -lib/mysql/plugin/ha_sphinx.so -lib/mysql/plugin/ha_spider.so +%%SPHINX%%lib/mysql/plugin/ha_sphinx.so +%%SPIDER%%lib/mysql/plugin/ha_spider.so +%%TOKUDB%%lib/mysql/plugin/ha_tokudb.so lib/mysql/plugin/ha_test_sql_discovery.so lib/mysql/plugin/handlersocket.so lib/mysql/plugin/libdaemon_example.so |