mariadb: bump to 10.2.x release
authorSebastian Kemper <sebastian_ml@gmx.net>
Thu, 28 Jun 2018 19:22:35 +0000 (21:22 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Thu, 28 Jun 2018 19:22:37 +0000 (21:22 +0200)
Bump to 10.2.x release series which has support for OpenSSL 1.1.x.

- libmariadbclient was replaced by libmaria
- libmaria uses LGPL, hence license info updated
- upstream disabled xtradb engine, innodb is now default (cannot be
  built as plugin anymore)
- complex charsets are now all included (size increase), as otherwise
  compile fails
- patches adapted/refreshed

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
utils/mariadb/Makefile
utils/mariadb/patches/100-fix_hostname.patch
utils/mariadb/patches/120-fix-ucontext-check.patch
utils/mariadb/patches/130-c11_atomics.patch
utils/mariadb/patches/150-mips-innobase-atomic.patch [deleted file]
utils/mariadb/patches/170-ppc-remove-glibc-dep.patch

index 545daba0155bb5c4e9639d769b44718d6d9cadb7..a47dc7746b019a64c74b5d341c5db5949d0157cd 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mariadb
-PKG_VERSION:=10.1.33
+PKG_VERSION:=10.2.16
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -18,10 +18,10 @@ PKG_SOURCE_URL := \
        https://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/$(PKG_NAME)-$(PKG_VERSION)/source \
        https://downloads.mariadb.org/interstitial/$(PKG_NAME)-$(PKG_VERSION)/source
 
-PKG_HASH:=94312c519f2c0c25e1964c64e22aff0036fb22dfb2685638f43a6b2211395d2d
+PKG_HASH:=c182ee93bacee9c1395a4cece56acfc433bc5153ec627c4898927b93eee54dc4
 PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
-PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=COPYING
+PKG_LICENSE:=GPL-2.0 LGPL-2.1
+PKG_LICENSE_FILES:=COPYING libmariadb/COPYING.LIB
 
 HOST_BUILD_PARALLEL:=1
 PKG_BUILD_PARALLEL:=1
@@ -60,7 +60,6 @@ MARIADB_SERVER_PLUGINS := \
        ha_example \
        ha_federated \
        ha_federatedx \
-       ha_innodb \
        ha_spider \
        ha_test_sql_discovery \
        handlersocket \
@@ -102,7 +101,6 @@ plugin-ha_connect               := PLUGIN_CONNECT
 plugin-ha_example               := PLUGIN_EXAMPLE
 plugin-ha_federated             := PLUGIN_FEDERATED
 plugin-ha_federatedx            := PLUGIN_FEDERATEDX
-plugin-ha_innodb                := PLUGIN_INNOBASE
 plugin-ha_spider                := PLUGIN_SPIDER
 plugin-ha_test_sql_discovery    := PLUGIN_TEST_SQL_DISCOVERY
 plugin-handlersocket            := PLUGIN_HANDLERSOCKET
@@ -183,16 +181,16 @@ database query language in the world. The main goals of MariaDB are
 speed, robustness and ease of use.
 endef
 
-define Package/libmariadbclient
+define Package/libmariadb
   SECTION:=libs
   CATEGORY:=Libraries
   DEPENDS:=$(MARIADB_COMMON_DEPENDS)
   TITLE:=MariaDB database client library
   URL:=https://mariadb.org/
-  PROVIDES:=libmysqlclient libmysqlclient-r
+  PROVIDES:=libmariadbclient libmysqlclient libmysqlclient-r
 endef
 
-define Package/libmariadbclient/description
+define Package/libmariadb/description
 $(call Package/mariadb/description/Default)
 
 This package includes the client library.
@@ -247,7 +245,6 @@ endef
 define Package/mariadb-extra-charsets/description
 $(call Package/mariadb/description/Default)
 
-The MariaDB server packaged by OpenWrt only provides support for UTF-8.
 This package contains single Byte character sets and collations that can
 be added at run time.
 
@@ -346,7 +343,7 @@ CMAKE_OPTIONS += \
        -DSKIP_TESTS=ON \
        -DWITH_ASAN=OFF \
        -DWITH_EMBEDDED_SERVER=OFF \
-       -DWITH_EXTRA_CHARSETS=none \
+       -DWITH_EXTRA_CHARSETS=complex \
        -DWITH_INNODB_BZIP2=OFF \
        -DWITH_INNODB_LZ4=OFF \
        -DWITH_INNODB_LZMA=ON \
@@ -425,15 +422,15 @@ define Build/InstallDev
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mysql_config $(1)/usr/bin
        $(LN) $(STAGING_DIR)/usr/bin/mysql_config $(2)/bin
        $(CP) $(PKG_INSTALL_DIR)/usr/include/mysql $(1)/usr/include
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmysqlclient*.so* $(1)/usr/lib
-       cd $(1)/usr/lib/mysql; $(LN) ../libmysqlclient*.so* .
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{mariadb,mysqlclient}*.so* $(1)/usr/lib
+       cd $(1)/usr/lib/mysql; $(LN) ../lib{mariadb,mysqlclient}*.so* .
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/mariadb.pc $(1)/usr/lib/pkgconfig
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/mysql.m4 $(1)/usr/share/aclocal
 endef
 
-define Package/libmariadbclient/install
+define Package/libmariadb/install
        $(INSTALL_DIR) $(1)$(PLUGIN_DIR)
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmysqlclient*.so* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{mariadb,mysqlclient}*.so* $(1)/usr/lib
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/dialog.so $(1)$(PLUGIN_DIR)
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)$(PLUGIN_DIR)/mysql_clear_password.so $(1)$(PLUGIN_DIR)
 endef
@@ -478,7 +475,7 @@ endef
 
 define Package/mariadb-server/conffiles
 /etc/mysql/my.cnf
-/usr/lib/mysql/plugin/daemon_example.ini
+$(PLUGIN_DIR)/daemon_example.ini
 endef
 
 define BuildPlugin
@@ -503,7 +500,7 @@ This package provides the $(1) plugin.
 endef
 
 $(eval $(call HostBuild))
-$(eval $(call BuildPackage,libmariadbclient))
+$(eval $(call BuildPackage,libmariadb))
 $(eval $(call BuildPackage,mariadb-client))
 $(eval $(call BuildPackage,mariadb-client-extra))
 $(eval $(call BuildPackage,mariadb-extra-charsets))
@@ -527,7 +524,6 @@ $(eval $(call BuildPlugin,ha_blackhole,))
 $(eval $(call BuildPlugin,ha_connect,+libxml2))
 $(eval $(call BuildPlugin,ha_federated,))
 $(eval $(call BuildPlugin,ha_federatedx,))
-$(eval $(call BuildPlugin,ha_innodb,))
 $(eval $(call BuildPlugin,ha_spider,))
 $(eval $(call BuildPlugin,ha_test_sql_discovery,))
 $(eval $(call BuildPlugin,handlersocket,))
index 05a0fc6db14a677e387e843e80ba95a3c86b137b..4e6f22bdddd14aab54267b3a6a1a4f3bc6a6f16e 100644 (file)
@@ -1,6 +1,6 @@
 --- a/scripts/mysql_install_db.sh
 +++ b/scripts/mysql_install_db.sh
-@@ -379,7 +379,7 @@ fi
+@@ -383,7 +383,7 @@ fi
  
  
  # Try to determine the hostname
index 8baec289369753a2cb5dacc2bc2492e236572ada..00d674ce985250bc6bbcd78404725efe5d839436 100644 (file)
@@ -1,9 +1,9 @@
 --- a/configure.cmake
 +++ b/configure.cmake
-@@ -1107,9 +1107,12 @@ SET(CMAKE_EXTRA_INCLUDE_FILES)
- CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h"  STRUCT_DIRENT_HAS_D_INO)
- CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h"  STRUCT_DIRENT_HAS_D_NAMLEN)
- SET(SPRINTF_RETURNS_INT 1)
+@@ -1018,9 +1018,12 @@ CHECK_STRUCT_HAS_MEMBER("struct sockaddr
+ SET(CMAKE_EXTRA_INCLUDE_FILES) 
 -CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H)
 -IF(NOT HAVE_UCONTEXT_H)
 -  CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_UCONTEXT_H)
index f223da1a165422e4800b91836fb82cf15e1508be..e4a04eea76141c2d727828cd8f29c7cc4a9df8d3 100644 (file)
@@ -14,7 +14,7 @@ Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
      ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO})
    # Need explicit pthread for gcc -fsanitize=address
    IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
-@@ -1038,7 +1038,26 @@ ELSEIF(NOT WITH_ATOMIC_OPS)
+@@ -952,7 +952,26 @@ ELSEIF(NOT WITH_ATOMIC_OPS)
      long long int *ptr= &var;
      return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
    }"
@@ -73,29 +73,9 @@ Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
  #ifdef MY_ATOMIC_MODE_DUMMY
  #define make_atomic_load_body(S)   ret= *a
  #define make_atomic_store_body(S)  *a= v
---- a/include/atomic/nolock.h
-+++ b/include/atomic/nolock.h
-@@ -17,7 +17,7 @@
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
- #if defined(__i386__) || defined(_MSC_VER) || defined(__x86_64__)   \
--    || defined(HAVE_GCC_ATOMIC_BUILTINS) \
-+    || defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_C11_ATOMICS) \
-     || defined(HAVE_SOLARIS_ATOMIC)
- #  ifdef MY_ATOMIC_MODE_DUMMY
-@@ -41,7 +41,7 @@
- #  elif __GNUC__
- #    if defined(HAVE_SOLARIS_ATOMIC)
- #      include "solaris.h"
--#    elif defined(HAVE_GCC_ATOMIC_BUILTINS)
-+#    elif defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_C11_ATOMICS)
- #      include "gcc_builtins.h"
- #    elif defined(__i386__) || defined(__x86_64__)
- #      include "x86-gcc.h"
 --- a/mysys/CMakeLists.txt
 +++ b/mysys/CMakeLists.txt
-@@ -78,6 +78,10 @@ IF(HAVE_BFD_H)
+@@ -80,6 +80,10 @@ IF(HAVE_BFD_H)
    TARGET_LINK_LIBRARIES(mysys bfd)  
  ENDIF(HAVE_BFD_H)
  
@@ -108,7 +88,7 @@ Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
  ENDIF(WIN32)
 --- a/sql/CMakeLists.txt
 +++ b/sql/CMakeLists.txt
-@@ -165,6 +165,10 @@ TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATI
+@@ -170,6 +170,10 @@ TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATI
    ${SSL_LIBRARIES}
    ${LIBSYSTEMD})
  
@@ -119,3 +99,14 @@ Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
  IF(WIN32)
    SET(MYSQLD_SOURCE main.cc nt_servc.cc message.rc)
    TARGET_LINK_LIBRARIES(sql psapi)
+--- a/include/my_atomic.h
++++ b/include/my_atomic.h
+@@ -126,7 +126,7 @@
+ #include "atomic/generic-msvc.h"
+ #elif defined(HAVE_SOLARIS_ATOMIC)
+ #include "atomic/solaris.h"
+-#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
++#elif defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_C11_ATOMICS)
+ #include "atomic/gcc_builtins.h"
+ #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ #include "atomic/x86-gcc.h"
diff --git a/utils/mariadb/patches/150-mips-innobase-atomic.patch b/utils/mariadb/patches/150-mips-innobase-atomic.patch
deleted file mode 100644 (file)
index dd7db7c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Author: James Cowgill <jcowgill@debian.org>
-Description: fix FTBFS on 32-bit mips*
-Bug-Debian: #864298
-
---- a/storage/innobase/include/os0sync.h
-+++ b/storage/innobase/include/os0sync.h
-@@ -37,6 +37,7 @@ Created 9/6/1995 Heikki Tuuri
- #include "univ.i"
- #include "ut0lst.h"
-+#include "sync0types.h"
- /** CPU cache line size */
- #ifdef __powerpc__
index e4b5a4a82af6c843cff4ef594b63a7bbeb005fc3..7cfa667a185408c7db94b3f847516b5fdba4276f 100644 (file)
@@ -27,12 +27,14 @@ directly was the first solution adopted in MariaDB [2].
 
 --- a/storage/xtradb/include/ut0ut.h
 +++ b/storage/xtradb/include/ut0ut.h
-@@ -86,8 +86,7 @@ private:
+@@ -85,9 +85,8 @@ private:
+    the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
     independent way by using YieldProcessor. */
  #  define UT_RELAX_CPU() YieldProcessor()
- # elif defined(__powerpc__)
+-# elif defined(__powerpc__) && defined __GLIBC__
 -#include <sys/platform/ppc.h>
 -#  define UT_RELAX_CPU() __ppc_get_timebase()
++# elif defined(__powerpc__)
 +#  define UT_RELAX_CPU() __builtin_ppc_get_timebase()
  # else
  #  define UT_RELAX_CPU() ((void)0) /* avoid warning for an empty statement */
@@ -51,25 +53,27 @@ directly was the first solution adopted in MariaDB [2].
  #  define UT_RESUME_PRIORITY_CPU() ((void)0)
 --- a/storage/innobase/include/ut0ut.h
 +++ b/storage/innobase/include/ut0ut.h
-@@ -89,8 +89,7 @@ private:
+@@ -70,9 +70,8 @@ typedef time_t       ib_time_t;
+    the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
     independent way by using YieldProcessor. */
- #  define UT_RELAX_CPU() YieldProcessor()
- # elif defined(__powerpc__)
--#include <sys/platform/ppc.h>
--#  define UT_RELAX_CPU() __ppc_get_timebase()
-+#  define UT_RELAX_CPU() __builtin_ppc_get_timebase()
- # else
- #  define UT_RELAX_CPU() ((void)0) /* avoid warning for an empty statement */
- # endif
-@@ -104,9 +103,8 @@ private:
+ # define UT_RELAX_CPU() YieldProcessor()
+-#elif defined(__powerpc__) && defined __GLIBC__
+-# include <sys/platform/ppc.h>
+-# define UT_RELAX_CPU() __ppc_get_timebase()
++#elif defined(__powerpc__)
++# define UT_RELAX_CPU() __builtin_ppc_get_timebase()
+ #else
+ # define UT_RELAX_CPU() do { \
+      volatile int32   volatile_var; \
+@@ -90,9 +89,8 @@ typedef time_t       ib_time_t;
  #endif
  
- # if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
--#include <sys/platform/ppc.h>
--#  define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low()
--#  define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med()
-+#  define UT_LOW_PRIORITY_CPU() __asm__  __volatile__ ("or 1,1,1")
-+#  define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2")
- # else
- #  define UT_LOW_PRIORITY_CPU() ((void)0)
- #  define UT_RESUME_PRIORITY_CPU() ((void)0)
+ #if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
+-# include <sys/platform/ppc.h>
+-# define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low()
+-# define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med()
++# define UT_LOW_PRIORITY_CPU() __asm__  __volatile__ ("or 1,1,1")
++# define UT_RESUME_PRIORITY_CPU() __asm__ __volatile__ ("or 2,2,2")
+ #else
+ # define UT_LOW_PRIORITY_CPU() ((void)0)
+ # define UT_RESUME_PRIORITY_CPU() ((void)0)