Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 May 2016 20:59:51 +0000 (UTC)
From:      Bernard Spil <brnrd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r414725 - in head/databases: mariadb100-client/files mariadb100-server mariadb100-server/files
Message-ID:  <201605062059.u46Kxpjk006863@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brnrd
Date: Fri May  6 20:59:50 2016
New Revision: 414725
URL: https://svnweb.freebsd.org/changeset/ports/414725

Log:
  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

Added:
  head/databases/mariadb100-server/files/patch-storage_connect_tabmysql.cpp   (contents, props changed)
  head/databases/mariadb100-server/files/patch-storage_tokudb_CMakeLists.txt
     - copied, changed from r408958, head/databases/mariadb101-server/files/patch-storage_tokudb_CMakeLists.txt
  head/databases/mariadb100-server/files/patch-storage_tokudb_PerconaFT_cmake__modules_TokuThirdParty.cmake   (contents, props changed)
  head/databases/mariadb100-server/files/patch-storage_tokudb_PerconaFT_ft_CMakeLists.txt   (contents, props changed)
Deleted:
  head/databases/mariadb100-client/files/patch-cmake_jemalloc.cmake
  head/databases/mariadb100-client/files/patch-extra_yassl_taocrypt_src_integer.cpp
  head/databases/mariadb100-server/files/patch-cmake_jemalloc.cmake
  head/databases/mariadb100-server/files/patch-storage_connect_json.cpp
Modified:
  head/databases/mariadb100-server/Makefile
  head/databases/mariadb100-server/distinfo
  head/databases/mariadb100-server/pkg-plist

Modified: head/databases/mariadb100-server/Makefile
==============================================================================
--- head/databases/mariadb100-server/Makefile	Fri May  6 20:57:55 2016	(r414724)
+++ head/databases/mariadb100-server/Makefile	Fri May  6 20:59:50 2016	(r414725)
@@ -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
 		-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*-${PKGNAMESU
 
 .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:
 # 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
 

Modified: head/databases/mariadb100-server/distinfo
==============================================================================
--- head/databases/mariadb100-server/distinfo	Fri May  6 20:57:55 2016	(r414724)
+++ head/databases/mariadb100-server/distinfo	Fri May  6 20:59:50 2016	(r414725)
@@ -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

Added: head/databases/mariadb100-server/files/patch-storage_connect_tabmysql.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mariadb100-server/files/patch-storage_connect_tabmysql.cpp	Fri May  6 20:59:50 2016	(r414725)
@@ -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

Copied and modified: head/databases/mariadb100-server/files/patch-storage_tokudb_CMakeLists.txt (from r408958, head/databases/mariadb101-server/files/patch-storage_tokudb_CMakeLists.txt)
==============================================================================
--- head/databases/mariadb101-server/files/patch-storage_tokudb_CMakeLists.txt	Mon Feb 15 21:04:13 2016	(r408958, copy source)
+++ head/databases/mariadb100-server/files/patch-storage_tokudb_CMakeLists.txt	Fri May  6 20:59:50 2016	(r414725)
@@ -1,20 +1,9 @@
---- storage/tokudb/CMakeLists.txt.orig	2015-12-23 15:33:32 UTC
+--- storage/tokudb/CMakeLists.txt.orig	2016-02-17 20:59:56 UTC
 +++ storage/tokudb/CMakeLists.txt
-@@ -1,7 +1,8 @@
- SET(TOKUDB_VERSION 5.6.26-74.0)
- # PerconaFT only supports x86-64 and cmake-2.8.9+
--IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND
--    NOT CMAKE_VERSION VERSION_LESS "2.8.9")
-+IF( (   CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" 
-+     OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64" )
-+    AND NOT CMAKE_VERSION VERSION_LESS "2.8.9")
- CHECK_CXX_SOURCE_COMPILES(
- "
- struct a {int b; int c; };
-@@ -107,8 +109,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINA
- TARGET_LINK_LIBRARIES(tokudb tokufractaltree_static tokuportability_static
-                       ${ZLIB_LIBRARY} stdc++)
- 
+@@ -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}")

Added: head/databases/mariadb100-server/files/patch-storage_tokudb_PerconaFT_cmake__modules_TokuThirdParty.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mariadb100-server/files/patch-storage_tokudb_PerconaFT_cmake__modules_TokuThirdParty.cmake	Fri May  6 20:59:50 2016	(r414725)
@@ -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()

Added: head/databases/mariadb100-server/files/patch-storage_tokudb_PerconaFT_ft_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mariadb100-server/files/patch-storage_tokudb_PerconaFT_ft_CMakeLists.txt	Fri May  6 20:59:50 2016	(r414725)
@@ -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})

Modified: head/databases/mariadb100-server/pkg-plist
==============================================================================
--- head/databases/mariadb100-server/pkg-plist	Fri May  6 20:57:55 2016	(r414724)
+++ head/databases/mariadb100-server/pkg-plist	Fri May  6 20:59:50 2016	(r414725)
@@ -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



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