* [Buildroot] [PATCH] mysql server and client 5.1.x and 5.5.x
@ 2011-05-28 17:56 heiko at zuerker.org
2011-06-04 8:52 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: heiko at zuerker.org @ 2011-05-28 17:56 UTC (permalink / raw)
To: buildroot
From: Heiko Zuerker <smiley73@users.sourceforge.net>
Signed-off-by: Heiko Zuerker <smiley73@users.sourceforge.net>
---
package/Config.in | 2 +-
package/mysql/Config.in | 91 ++++++++++++
.../mysql_client-5.1.53-ac_cache_check.patch | 156 ++++++++++++++++++++
...ql_client-5.1.53-configure-ps-cache-check.patch | 39 +++++
...ysql_client-5.1.53-use-new-readline-iface.patch | 21 +++
.../mysql-5.5.12/mysql-5.5.11-tool-path.patch | 36 +++++
package/mysql/mysql.mk | 143 ++++++++++++++++++
package/mysql_client/Config.in | 10 --
.../mysql_client-5.1.53-ac_cache_check.patch | 156 --------------------
...ql_client-5.1.53-configure-ps-cache-check.patch | 39 -----
...ysql_client-5.1.53-use-new-readline-iface.patch | 21 ---
package/mysql_client/mysql_client.mk | 46 ------
12 files changed, 487 insertions(+), 273 deletions(-)
create mode 100644 package/mysql/Config.in
create mode 100644 package/mysql/mysql-5.1.56/mysql_client-5.1.53-ac_cache_check.patch
create mode 100644 package/mysql/mysql-5.1.56/mysql_client-5.1.53-configure-ps-cache-check.patch
create mode 100644 package/mysql/mysql-5.1.56/mysql_client-5.1.53-use-new-readline-iface.patch
create mode 100644 package/mysql/mysql-5.5.12/mysql-5.5.11-tool-path.patch
create mode 100644 package/mysql/mysql.mk
delete mode 100644 package/mysql_client/Config.in
delete mode 100644 package/mysql_client/mysql_client-5.1.53-ac_cache_check.patch
delete mode 100644 package/mysql_client/mysql_client-5.1.53-configure-ps-cache-check.patch
delete mode 100644 package/mysql_client/mysql_client-5.1.53-use-new-readline-iface.patch
delete mode 100644 package/mysql_client/mysql_client.mk
diff --git a/package/Config.in b/package/Config.in
index 40f523d..72b6ee7 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -252,7 +252,6 @@ endmenu
menu "Database"
source "package/berkeleydb/Config.in"
-source "package/mysql_client/Config.in"
source "package/sqlite/Config.in"
endmenu
@@ -364,6 +363,7 @@ endmenu
endmenu
menu "Miscellaneous"
+source "package/mysql/Config.in"
source "package/shared-mime-info/Config.in"
endmenu
diff --git a/package/mysql/Config.in b/package/mysql/Config.in
new file mode 100644
index 0000000..3c44ec3
--- /dev/null
+++ b/package/mysql/Config.in
@@ -0,0 +1,91 @@
+config BR2_PACKAGE_MYSQL
+ bool "MySQL"
+ depends on BR2_INSTALL_LIBSTDCPP
+ select BR2_PACKAGE_NCURSES
+ select BR2_PACKAGE_READLINE
+ help
+ MySQL client and optional server
+
+menu "MySQL options"
+depends on BR2_PACKAGE_MYSQL
+
+choice
+ prompt "MySQL Version"
+ default BR2_PACKAGE_MYSQL_51
+ help
+ The version of MySQL
+
+config BR2_PACKAGE_MYSQL_51
+ bool "5.1.x"
+ select BR2_TARGET_SYSLINUX
+
+config BR2_PACKAGE_MYSQL_55
+ bool "5.5.x"
+
+endchoice
+
+config BR2_PACKAGE_MYSQL_SERVER
+ bool "Build the MySQL Server"
+ depends on BR2_INSTALL_LIBSTDCPP && BR2_PACKAGE_MYSQL
+ select BR2_PACKAGE_NCURSES
+ select BR2_PACKAGE_READLINE
+ help
+ MySQL server
+
+config BR2_PACKAGE_MYSQL_DATADIR
+ string "The MySQL data directory"
+ depends on BR2_PACKAGE_MYSQL_SERVER
+ default "/var/mysql"
+ help
+ This directory will contain the database files
+
+config BR2_PACKAGE_MYSQL_STORAGE_ARCHIVE
+ bool "Archive Storage Engine"
+ depends on BR2_PACKAGE_MYSQL_SERVER
+ depends on BR2_PACKAGE_MYSQL_55
+
+config BR2_PACKAGE_MYSQL_STORAGE_BLACKHOLE
+ bool "Blackhole Storage Engine"
+ depends on BR2_PACKAGE_MYSQL_SERVER
+ depends on BR2_PACKAGE_MYSQL_55
+
+config BR2_PACKAGE_MYSQL_STORAGE_FEDERATED
+ bool "Federated Storage Engine"
+ depends on BR2_PACKAGE_MYSQL_SERVER
+ depends on BR2_PACKAGE_MYSQL_55
+
+config BR2_PACKAGE_MYSQL_STORAGE_INNOBASE
+ bool "Innobase Storage Engine"
+ default y
+ depends on BR2_PACKAGE_MYSQL_SERVER
+ depends on BR2_PACKAGE_MYSQL_55
+
+config BR2_PACKAGE_MYSQL_STORAGE_PARTITION
+ bool "Partition Storage Engine"
+ default y
+ depends on BR2_PACKAGE_MYSQL_SERVER
+ depends on BR2_PACKAGE_MYSQL_55
+
+config BR2_PACKAGE_MYSQL_STORAGE_PERFSCHEMA
+ bool "Perfschema Storage Engine"
+ default y
+ depends on BR2_PACKAGE_MYSQL_SERVER
+ depends on BR2_PACKAGE_MYSQL_55
+
+config BR2_PACKAGE_MYSQL_LOWMEM
+ depends on BR2_PACKAGE_MYSQL_51
+ bool "Compile for low memory consumption"
+
+config BR2_PACKAGE_MYSQL_EMBEDDED
+ bool "Build the embedded server (libmysqld)"
+
+config BR2_PACKAGE_MYSQL_NO_NDBBINLOG
+ bool "Disable ndb binlog"
+
+config BR2_PACKAGE_MYSQL_REMOVE_TEST_PROGS
+ bool "Remove test programs"
+
+endmenu
+
+comment "Mysql requires a toolchain with C++ support enabled"
+ depends on !BR2_INSTALL_LIBSTDCPP
diff --git a/package/mysql/mysql-5.1.56/mysql_client-5.1.53-ac_cache_check.patch b/package/mysql/mysql-5.1.56/mysql_client-5.1.53-ac_cache_check.patch
new file mode 100644
index 0000000..c3b55ba
--- /dev/null
+++ b/package/mysql/mysql-5.1.56/mysql_client-5.1.53-ac_cache_check.patch
@@ -0,0 +1,156 @@
+Patch borrowed from
+http://code.google.com/p/minimyth/source/browse/trunk/gar-minimyth/script/db/mysql/files/mysql-5.1.47-ac_cache_check.patch?r=6493.
+
+It allows to override through ac_cv_* variables various checks that
+cannot be performed when cross-compiling.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+---
+ storage/innodb_plugin/plug.in | 59 ++++++++++++++++++++++++++++--------------
+ 1 file changed, 40 insertions(+), 19 deletions(-)
+
+Index: mysql-5.1.53/storage/innodb_plugin/plug.in
+===================================================================
+--- mysql-5.1.53.orig/storage/innodb_plugin/plug.in
++++ mysql-5.1.53/storage/innodb_plugin/plug.in
+@@ -53,9 +53,10 @@
+ esac
+ AC_SUBST(INNODB_DYNAMIC_CFLAGS)
+
+- AC_MSG_CHECKING(whether GCC atomic builtins are available)
++ AC_CACHE_CHECK([whether GCC atomic builtins are available],
++ [ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS],
+ # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
+- AC_TRY_RUN(
++ [AC_TRY_RUN(
+ [
+ int main()
+ {
+@@ -95,18 +96,23 @@
+ }
+ ],
+ [
+- AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
+- [GCC atomic builtins are available])
+ AC_MSG_RESULT(yes)
++ ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes
+ ],
+ [
+ AC_MSG_RESULT(no)
++ ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=no
+ ]
+- )
++ )])
++ if test "x$ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS"= "xyes" ; then
++ AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
++ [GCC atomic builtins are available])
++ fi
+
+- AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
++ AC_CACHE_CHECK([whether pthread_t can be used by GCC atomic builtins],
++ [ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC],
+ # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
+- AC_TRY_RUN(
++ [AC_TRY_RUN(
+ [
+ #include <pthread.h>
+ #include <string.h>
+@@ -126,14 +132,18 @@
+ }
+ ],
+ [
+- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
+- [pthread_t can be used by GCC atomic builtins])
+ AC_MSG_RESULT(yes)
++ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes
+ ],
+ [
+ AC_MSG_RESULT(no)
++ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=no
+ ]
+- )
++ )])
++ if test "x$ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC"= "xyes" ; then
++ AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
++ [pthread_t can be used by GCC atomic builtins])
++ fi
+
+ AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
+ # either define HAVE_IB_SOLARIS_ATOMICS or not
+@@ -148,9 +158,10 @@
+ are available])
+ )
+
+- AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
++ AC_CACHE_CHECK([whether pthread_t can be used by Solaris libc atomic functions],
++ [ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS],
+ # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
+- AC_TRY_RUN(
++ [AC_TRY_RUN(
+ [
+ #include <pthread.h>
+ #include <string.h>
+@@ -181,28 +192,33 @@
+ }
+ ],
+ [
+- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
+- [pthread_t can be used by solaris atomics])
+ AC_MSG_RESULT(yes)
++ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=yes
+ ],
+ [
+ AC_MSG_RESULT(no)
++ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no
+ ]
+- )
++ )])
++ if test "x$ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS"= "xyes" ; then
++ AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
++ [pthread_t can be used by solaris atomics])
++ fi
+
+ # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
+ # to use in the source
+ AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>])
+
+ # Check for x86 PAUSE instruction
+- AC_MSG_CHECKING(for x86 PAUSE instruction)
++ AC_CACHE_CHECK([for x86 PAUSE instruction],
++ [ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION],
+ # We have to actually try running the test program, because of a bug
+ # in Solaris on x86_64, where it wrongly reports that PAUSE is not
+ # supported when trying to run an application. See
+ # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
+ # We use ib_ prefix to avoid collisoins if this code is added to
+ # mysql's configure.in.
+- AC_TRY_RUN(
++ [AC_TRY_RUN(
+ [
+ int main() {
+ __asm__ __volatile__ ("pause");
+@@ -210,16 +226,21 @@
+ }
+ ],
+ [
+- AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
+ AC_MSG_RESULT(yes)
++ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=yes
+ ],
+ [
+ AC_MSG_RESULT(no)
++ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no
+ ],
+ [
+ AC_MSG_RESULT(no)
++ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no
+ ]
+- )
++ )])
++ if test "x$ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION"= "xyes" ; then
++ AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
++ fi
+ ])
+
+ # vim: set ft=config:
diff --git a/package/mysql/mysql-5.1.56/mysql_client-5.1.53-configure-ps-cache-check.patch b/package/mysql/mysql-5.1.56/mysql_client-5.1.53-configure-ps-cache-check.patch
new file mode 100644
index 0000000..336e80e
--- /dev/null
+++ b/package/mysql/mysql-5.1.56/mysql_client-5.1.53-configure-ps-cache-check.patch
@@ -0,0 +1,39 @@
+Patch borrowed from
+http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/mysql/files/configure-ps-cache-check.patch
+
+It allows to specify through ac_cv_FIND_PROC how ps should be used on
+the target to find the PID of a program.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+---
+ configure.in | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+Index: mysql-5.1.53/configure.in
+===================================================================
+--- mysql-5.1.53.orig/configure.in
++++ mysql-5.1.53/configure.in
+@@ -462,8 +462,8 @@
+ # then Make, then shell. The autoconf substitution uses single quotes, so
+ # no unprotected single quotes should appear in the expression.
+ AC_PATH_PROG(PS, ps, ps)
+-AC_MSG_CHECKING("how to check if pid exists")
+-PS=$ac_cv_path_PS
++AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC],
++[
+ # Linux style
+ if $PS wwwp $$ 2> /dev/null | grep -- "$0" > /dev/null
+ then
+@@ -502,8 +502,9 @@
+ AC_MSG_ERROR([Could not find the right ps and/or grep switches. Which OS is this? See the Installation chapter in the Reference Manual.])
+ esac
+ fi
+-AC_SUBST(FIND_PROC)
+-AC_MSG_RESULT("$FIND_PROC")
++ac_cv_FIND_PROC="$FIND_PROC"
++])
++AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC])
+
+ # Check if a pid is valid
+ AC_PATH_PROG(KILL, kill, kill)
diff --git a/package/mysql/mysql-5.1.56/mysql_client-5.1.53-use-new-readline-iface.patch b/package/mysql/mysql-5.1.56/mysql_client-5.1.53-use-new-readline-iface.patch
new file mode 100644
index 0000000..c590656
--- /dev/null
+++ b/package/mysql/mysql-5.1.56/mysql_client-5.1.53-use-new-readline-iface.patch
@@ -0,0 +1,21 @@
+Tell MySQL to use the new readline interface even when an external
+readline is being used.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+---
+ configure.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: mysql-5.1.53/configure.in
+===================================================================
+--- mysql-5.1.53.orig/configure.in
++++ mysql-5.1.53/configure.in
+@@ -2689,6 +2689,7 @@
+ # this way we avoid linking commercial source with GPL readline
+ readline_link="-lreadline"
+ want_to_use_readline="yes"
++ AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1)
+ elif [test "$mysql_cv_libedit_interface" = "yes"]
+ then
+ # Use libedit
diff --git a/package/mysql/mysql-5.5.12/mysql-5.5.11-tool-path.patch b/package/mysql/mysql-5.5.12/mysql-5.5.11-tool-path.patch
new file mode 100644
index 0000000..03de86d
--- /dev/null
+++ b/package/mysql/mysql-5.5.12/mysql-5.5.11-tool-path.patch
@@ -0,0 +1,36 @@
+diff -ruN mysql-5.5.11.orig//extra/CMakeLists.txt mysql-5.5.11/extra/CMakeLists.txt
+--- mysql-5.5.11.orig//extra/CMakeLists.txt 2011-03-31 08:36:18.000000000 -0500
++++ mysql-5.5.11/extra/CMakeLists.txt 2011-05-14 20:17:05.000000000 -0500
+@@ -33,7 +33,7 @@
+
+ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/include/mysqld_error.h
+ ${PROJECT_BINARY_DIR}/sql/share/english/errmsg.sys
+- COMMAND comp_err
++ COMMAND ./comp_err
+ --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets
+ --out-dir=${PROJECT_BINARY_DIR}/sql/share/
+ --header_file=${PROJECT_BINARY_DIR}/include/mysqld_error.h
+diff -ruN mysql-5.5.11.orig//scripts/CMakeLists.txt mysql-5.5.11/scripts/CMakeLists.txt
+--- mysql-5.5.11.orig//scripts/CMakeLists.txt 2011-03-31 08:36:18.000000000 -0500
++++ mysql-5.5.11/scripts/CMakeLists.txt 2011-05-14 20:18:12.000000000 -0500
+@@ -47,7 +47,7 @@
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mysql_fix_privilege_tables_sql.c
+ ${CAT_COMMAND}
+- COMMAND comp_sql
++ COMMAND ./comp_sql
+ mysql_fix_privilege_tables
+ mysql_fix_privilege_tables.sql
+ mysql_fix_privilege_tables_sql.c
+diff -ruN mysql-5.5.11.orig//sql/CMakeLists.txt mysql-5.5.11/sql/CMakeLists.txt
+--- mysql-5.5.11.orig//sql/CMakeLists.txt 2011-03-31 08:36:18.000000000 -0500
++++ mysql-5.5.11/sql/CMakeLists.txt 2011-05-14 20:18:58.000000000 -0500
+@@ -189,7 +189,7 @@
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
+- COMMAND gen_lex_hash > lex_hash.h
++ COMMAND ./gen_lex_hash > lex_hash.h
+ DEPENDS gen_lex_hash
+ )
+
diff --git a/package/mysql/mysql.mk b/package/mysql/mysql.mk
new file mode 100644
index 0000000..58731a8
--- /dev/null
+++ b/package/mysql/mysql.mk
@@ -0,0 +1,143 @@
+#############################################################
+#
+# MySQL Server & Client
+#
+#############################################################
+
+ifeq ($(BR2_PACKAGE_MYSQL_51),y)
+ MYSQL_MAIN_VERSION = 5.1
+ MYSQL_VERSION = $(MYSQL_MAIN_VERSION).57
+endif
+
+ifeq ($(BR2_PACKAGE_MYSQL_55),y)
+ MYSQL_MAIN_VERSION = 5.5
+ MYSQL_VERSION = $(MYSQL_MAIN_VERSION).12
+endif
+
+MYSQL_SOURCE = mysql-$(MYSQL_VERSION).tar.gz
+MYSQL_SITE = http://mirror.services.wisc.edu/mysql/Downloads/MySQL-$(MYSQL_MAIN_VERSION)
+MYSQL_INSTALL_TARGET = YES
+MYSQL_INSTALL_STAGING = YES
+MYSQL_DEPENDENCIES = readline ncurses host-mysql
+MYSQL_AUTORECONF=YES
+HOST_MYSQL_AUTORECONF=YES
+
+# MySQL 5.1
+ifeq ($(BR2_PACKAGE_MYSQL_51),y)
+ HOST_MYSQL_CONF_OPT = \
+ --program-prefix="" \
+ --without-libedit \
+ --without-readline \
+ --without-docs \
+ --without-man \
+ --without-ndb-binlog
+
+ MYSQL_CONF_ENV = \
+ ac_cv_sys_restartable_syscalls=yes \
+ ac_cv_path_PS=/bin/ps \
+ ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null" \
+ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes \
+ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no \
+ ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes \
+ mysql_cv_new_rl_interface=yes \
+ ac_cv_c_stack_direction=-1
+
+ MYSQL_CONF_OPT = \
+ --program-prefix="" \
+ --without-libedit \
+ --without-readline \
+ --enable-thread-safe-client \
+ $(if $(BR2_HAVE_DOCUMENTATION),,--without-docs --without-man) \
+ $(if $(BR2_PACKAGE_MYSQL_SERVER),,--without-server) \
+ $(if $(BR2_PACKAGE_MYSQL_LOWMEM),--with-low-memory) \
+ $(if $(BR2_PACKAGE_MYSQL_NO_NDBBINLOG),--without-ndb-binlog) \
+ $(if $(BR2_PACKAGE_MYSQL_EMBEDDED),--with-embedded-server) \
+ --localstatedir=$(BR2_PACKAGE_MYSQL_DATADIR)
+
+ ifeq ($(BR2_PACKAGE_OPENSSL),y)
+ MYSQL_CONF_OPT += --with-ssl
+ MYSQL_DEPENDENCIES += openssl
+ endif
+
+$(eval $(call AUTOTARGETS,package,mysql))
+$(eval $(call AUTOTARGETS,package,mysql,host))
+
+endif
+
+# MySQL 5.5
+ifeq ($(BR2_PACKAGE_MYSQL_55),y)
+ HOST_MYSQL_CONF_OPT = \
+ -DSTACK_DIRECTION=1 \
+ -DWITH_LIBEDIT=OFF \
+ -DWITH_READLINE=OFF \
+ -DDISABLE_SHARED=ON \
+ -DMYSQL_DATADIR=/var/mysql
+
+ MYSQL_CONF_OPT = \
+ -DSTACK_DIRECTION=1 \
+ -DWITH_LIBEDIT=OFF \
+ -DWITH_READLINE=OFF\
+ -DENABLE_DEBUG_SYNC=OFF \
+ $(if $(BR2_PACKAGE_MYSQL_SERVER),,-DWITHOUT_SERVER=ON) \
+ $(if $(BR2_PACKAGE_MYSQL_EMBEDDED),-DWITH_EMBEDDED_SERVER=ON) \
+ $(if $(BR2_PACKAGE_MYSQL_STORAGE_ARCHIVE),-DWITH_ARCHIVE_STORAGE_ENGINE=ON,-DWITH_ARCHIVE_STORAGE_ENGINE=OFF) \
+ $(if $(BR2_PACKAGE_MYSQL_STORAGE_BLACKHOLE),-DWITH_BLACKHOLE_STORAGE_ENGINE=ON,-DWITH_BLACKHOLE_STORAGE_ENGINE=OFF) \
+ $(if $(BR2_PACKAGE_MYSQL_STORAGE_FEDERATED),-DWITH_INNOBASE_STORAGE_ENGINE=ON,-DWITH_INNOBASE_STORAGE_ENGINE=OFF) \
+ $(if $(BR2_PACKAGE_MYSQL_STORAGE_FEDERATED),-DWITH_PARTITION_STORAGE_ENGINE=ON,-DWITH_PARTITION_STORAGE_ENGINE=OFF) \
+ $(if $(BR2_PACKAGE_MYSQL_STORAGE_FEDERATED),-DWITH_PERFSCHEMA_STORAGE_ENGINE=ON,-DWITH_PERFSCHEMA_STORAGE_ENGINE=OFF) \
+ -DINSTALL_LAYOUT=RPM \
+ -DSYSCONFDIR=/etc \
+ -DMYSQL_DATADIR=$(BR2_PACKAGE_MYSQL_DATADIR)
+
+ ifeq ($(BR2_PACKAGE_OPENSSL),y)
+ MYSQL_CONF_OPT += -DWITH_SSL=yes
+ MYSQL_DEPENDENCIES += openssl
+ endif
+
+$(eval $(call CMAKETARGETS,package,mysql))
+$(eval $(call CMAKETARGETS,package,mysql,host))
+
+endif
+
+# Generic section
+define MYSQL_REMOVE_TEST_PROGS
+ rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench
+endef
+
+define MYSQL_ADD_MYSQL_LIB_PATH
+ echo "/usr/lib/mysql" >> $(TARGET_DIR)/etc/ld.so.conf
+endef
+
+ifeq ($(BR2_PACKAGE_MYSQL_REMOVE_TEST_PROGS),y)
+ MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_REMOVE_TEST_PROGS
+endif
+
+MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_MYSQL_LIB_PATH
+
+MYSQL_POST_CONFIGURE_HOOKS += MYSQL_COPY_HOST_BINARIES
+
+define MYSQL_COPY_HOST_BINARIES
+ cp $(@D)/../host-mysql-$(MYSQL_VERSION)/sql/gen_lex_hash $(@D)/sql/
+ cp $(@D)/../host-mysql-$(MYSQL_VERSION)/scripts/comp_sql $(@D)/scripts/
+ cp $(@D)/../host-mysql-$(MYSQL_VERSION)/extra/comp_err $(@D)/extra/
+ # set the file dates far into the future to prevent recompilation
+ touch -t "203012120101" $(@D)/sql/gen_lex_hash
+ touch -t "203012120101" $(@D)/scripts/comp_sql
+ touch -t "203012120101" $(@D)/extra/comp_err
+endef
+
+define HOST_MYSQL_BUILD_CMDS
+ make -C $(@D)/vio
+ make -C $(@D)/mysys
+ make -C $(@D)/strings
+ make -C $(@D)/dbug
+ make -C $(@D)/regex
+ make -C $(@D)/sql gen_lex_hash
+ make -C $(@D)/scripts comp_sql
+ make -C $(@D)/extra comp_err
+endef
+
+define HOST_MYSQL_INSTALL_CMDS
+ # no need to really install this
+ exit 0
+endef
diff --git a/package/mysql_client/Config.in b/package/mysql_client/Config.in
deleted file mode 100644
index f07fdb4..0000000
--- a/package/mysql_client/Config.in
+++ /dev/null
@@ -1,10 +0,0 @@
-config BR2_PACKAGE_MYSQL_CLIENT
- bool "MySQL client"
- depends on BR2_INSTALL_LIBSTDCPP
- select BR2_PACKAGE_NCURSES
- select BR2_PACKAGE_READLINE
- help
- MySQL client
-
-comment "Mysql client requires a toolchain with C++ support enabled"
- depends on !BR2_INSTALL_LIBSTDCPP
diff --git a/package/mysql_client/mysql_client-5.1.53-ac_cache_check.patch b/package/mysql_client/mysql_client-5.1.53-ac_cache_check.patch
deleted file mode 100644
index c3b55ba..0000000
--- a/package/mysql_client/mysql_client-5.1.53-ac_cache_check.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-Patch borrowed from
-http://code.google.com/p/minimyth/source/browse/trunk/gar-minimyth/script/db/mysql/files/mysql-5.1.47-ac_cache_check.patch?r=6493.
-
-It allows to override through ac_cv_* variables various checks that
-cannot be performed when cross-compiling.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
----
- storage/innodb_plugin/plug.in | 59 ++++++++++++++++++++++++++++--------------
- 1 file changed, 40 insertions(+), 19 deletions(-)
-
-Index: mysql-5.1.53/storage/innodb_plugin/plug.in
-===================================================================
---- mysql-5.1.53.orig/storage/innodb_plugin/plug.in
-+++ mysql-5.1.53/storage/innodb_plugin/plug.in
-@@ -53,9 +53,10 @@
- esac
- AC_SUBST(INNODB_DYNAMIC_CFLAGS)
-
-- AC_MSG_CHECKING(whether GCC atomic builtins are available)
-+ AC_CACHE_CHECK([whether GCC atomic builtins are available],
-+ [ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS],
- # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
-- AC_TRY_RUN(
-+ [AC_TRY_RUN(
- [
- int main()
- {
-@@ -95,18 +96,23 @@
- }
- ],
- [
-- AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
-- [GCC atomic builtins are available])
- AC_MSG_RESULT(yes)
-+ ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes
- ],
- [
- AC_MSG_RESULT(no)
-+ ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=no
- ]
-- )
-+ )])
-+ if test "x$ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS"= "xyes" ; then
-+ AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
-+ [GCC atomic builtins are available])
-+ fi
-
-- AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
-+ AC_CACHE_CHECK([whether pthread_t can be used by GCC atomic builtins],
-+ [ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC],
- # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
-- AC_TRY_RUN(
-+ [AC_TRY_RUN(
- [
- #include <pthread.h>
- #include <string.h>
-@@ -126,14 +132,18 @@
- }
- ],
- [
-- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
-- [pthread_t can be used by GCC atomic builtins])
- AC_MSG_RESULT(yes)
-+ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes
- ],
- [
- AC_MSG_RESULT(no)
-+ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=no
- ]
-- )
-+ )])
-+ if test "x$ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC"= "xyes" ; then
-+ AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
-+ [pthread_t can be used by GCC atomic builtins])
-+ fi
-
- AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
- # either define HAVE_IB_SOLARIS_ATOMICS or not
-@@ -148,9 +158,10 @@
- are available])
- )
-
-- AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
-+ AC_CACHE_CHECK([whether pthread_t can be used by Solaris libc atomic functions],
-+ [ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS],
- # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
-- AC_TRY_RUN(
-+ [AC_TRY_RUN(
- [
- #include <pthread.h>
- #include <string.h>
-@@ -181,28 +192,33 @@
- }
- ],
- [
-- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
-- [pthread_t can be used by solaris atomics])
- AC_MSG_RESULT(yes)
-+ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=yes
- ],
- [
- AC_MSG_RESULT(no)
-+ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no
- ]
-- )
-+ )])
-+ if test "x$ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS"= "xyes" ; then
-+ AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
-+ [pthread_t can be used by solaris atomics])
-+ fi
-
- # this is needed to know which one of atomic_cas_32() or atomic_cas_64()
- # to use in the source
- AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>])
-
- # Check for x86 PAUSE instruction
-- AC_MSG_CHECKING(for x86 PAUSE instruction)
-+ AC_CACHE_CHECK([for x86 PAUSE instruction],
-+ [ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION],
- # We have to actually try running the test program, because of a bug
- # in Solaris on x86_64, where it wrongly reports that PAUSE is not
- # supported when trying to run an application. See
- # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
- # We use ib_ prefix to avoid collisoins if this code is added to
- # mysql's configure.in.
-- AC_TRY_RUN(
-+ [AC_TRY_RUN(
- [
- int main() {
- __asm__ __volatile__ ("pause");
-@@ -210,16 +226,21 @@
- }
- ],
- [
-- AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
- AC_MSG_RESULT(yes)
-+ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=yes
- ],
- [
- AC_MSG_RESULT(no)
-+ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no
- ],
- [
- AC_MSG_RESULT(no)
-+ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no
- ]
-- )
-+ )])
-+ if test "x$ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION"= "xyes" ; then
-+ AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
-+ fi
- ])
-
- # vim: set ft=config:
diff --git a/package/mysql_client/mysql_client-5.1.53-configure-ps-cache-check.patch b/package/mysql_client/mysql_client-5.1.53-configure-ps-cache-check.patch
deleted file mode 100644
index 336e80e..0000000
--- a/package/mysql_client/mysql_client-5.1.53-configure-ps-cache-check.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Patch borrowed from
-http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/mysql/files/configure-ps-cache-check.patch
-
-It allows to specify through ac_cv_FIND_PROC how ps should be used on
-the target to find the PID of a program.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
----
- configure.in | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-Index: mysql-5.1.53/configure.in
-===================================================================
---- mysql-5.1.53.orig/configure.in
-+++ mysql-5.1.53/configure.in
-@@ -462,8 +462,8 @@
- # then Make, then shell. The autoconf substitution uses single quotes, so
- # no unprotected single quotes should appear in the expression.
- AC_PATH_PROG(PS, ps, ps)
--AC_MSG_CHECKING("how to check if pid exists")
--PS=$ac_cv_path_PS
-+AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC],
-+[
- # Linux style
- if $PS wwwp $$ 2> /dev/null | grep -- "$0" > /dev/null
- then
-@@ -502,8 +502,9 @@
- AC_MSG_ERROR([Could not find the right ps and/or grep switches. Which OS is this? See the Installation chapter in the Reference Manual.])
- esac
- fi
--AC_SUBST(FIND_PROC)
--AC_MSG_RESULT("$FIND_PROC")
-+ac_cv_FIND_PROC="$FIND_PROC"
-+])
-+AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC])
-
- # Check if a pid is valid
- AC_PATH_PROG(KILL, kill, kill)
diff --git a/package/mysql_client/mysql_client-5.1.53-use-new-readline-iface.patch b/package/mysql_client/mysql_client-5.1.53-use-new-readline-iface.patch
deleted file mode 100644
index c590656..0000000
--- a/package/mysql_client/mysql_client-5.1.53-use-new-readline-iface.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Tell MySQL to use the new readline interface even when an external
-readline is being used.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
----
- configure.in | 1 +
- 1 file changed, 1 insertion(+)
-
-Index: mysql-5.1.53/configure.in
-===================================================================
---- mysql-5.1.53.orig/configure.in
-+++ mysql-5.1.53/configure.in
-@@ -2689,6 +2689,7 @@
- # this way we avoid linking commercial source with GPL readline
- readline_link="-lreadline"
- want_to_use_readline="yes"
-+ AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1)
- elif [test "$mysql_cv_libedit_interface" = "yes"]
- then
- # Use libedit
diff --git a/package/mysql_client/mysql_client.mk b/package/mysql_client/mysql_client.mk
deleted file mode 100644
index 9cd088c..0000000
--- a/package/mysql_client/mysql_client.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-#############################################################
-#
-# MySQL 5.1 Client
-#
-#############################################################
-MYSQL_CLIENT_VERSION = 5.1.53
-MYSQL_CLIENT_SOURCE = mysql-$(MYSQL_CLIENT_VERSION).tar.gz
-MYSQL_CLIENT_SITE = http://downloads.mysql.com/archives/mysql-5.1/
-MYSQL_CLIENT_INSTALL_TARGET = YES
-MYSQL_CLIENT_INSTALL_STAGING = YES
-MYSQL_CLIENT_DEPENDENCIES = readline ncurses
-MYSQL_CLIENT_AUTORECONF=YES
-
-MYSQL_CLIENT_CONF_ENV = \
- ac_cv_sys_restartable_syscalls=yes \
- ac_cv_path_PS=/bin/ps \
- ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null" \
- ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes \
- ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no \
- ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes \
- mysql_cv_new_rl_interface=yes
-
-MYSQL_CLIENT_CONF_OPT = \
- --program-prefix="" \
- --without-ndb-binlog \
- --without-server \
- --without-docs \
- --without-man \
- --without-libedit \
- --without-readline \
- --with-low-memory \
- --enable-thread-safe-client \
- $(ENABLE_DEBUG)
-
-define MYSQL_CLIENT_REMOVE_TEST_PROGS
- rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench
-endef
-
-define MYSQL_CLIENT_ADD_MYSQL_LIB_PATH
- echo "/usr/lib/mysql" >> $(TARGET_DIR)/etc/ld.so.conf
-endef
-
-MYSQL_CLIENT_POST_INSTALL_TARGET_HOOKS += MYSQL_CLIENT_REMOVE_TEST_PROGS
-MYSQL_CLIENT_POST_INSTALL_TARGET_HOOKS += MYSQL_CLIENT_ADD_MYSQL_LIB_PATH
-
-$(eval $(call AUTOTARGETS,package,mysql_client))
--
1.6.4.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] mysql server and client 5.1.x and 5.5.x
2011-05-28 17:56 [Buildroot] [PATCH] mysql server and client 5.1.x and 5.5.x heiko at zuerker.org
@ 2011-06-04 8:52 ` Thomas Petazzoni
2011-06-04 13:48 ` Heiko Zuerker
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2011-06-04 8:52 UTC (permalink / raw)
To: buildroot
Hello Heiko!
Thanks for taking care of the MySQL package. I have a few comments
below, but first, is there a good reason to support both MySQL 5.1 and
MySQL 5.5 ? Wouldn't supporting MySQL 5.5 be enough ?
On Sat, 28 May 2011 12:56:20 -0500
heiko at zuerker.org wrote:
> diff --git a/package/mysql/Config.in b/package/mysql/Config.in
> new file mode 100644
> index 0000000..3c44ec3
> --- /dev/null
> +++ b/package/mysql/Config.in
> @@ -0,0 +1,91 @@
> +config BR2_PACKAGE_MYSQL
> + bool "MySQL"
> + depends on BR2_INSTALL_LIBSTDCPP
> + select BR2_PACKAGE_NCURSES
> + select BR2_PACKAGE_READLINE
> + help
> + MySQL client and optional server
> +
> +menu "MySQL options"
> +depends on BR2_PACKAGE_MYSQL
> +
> +choice
> + prompt "MySQL Version"
> + default BR2_PACKAGE_MYSQL_51
> + help
> + The version of MySQL
> +
> +config BR2_PACKAGE_MYSQL_51
> + bool "5.1.x"
> + select BR2_TARGET_SYSLINUX
> +
> +config BR2_PACKAGE_MYSQL_55
> + bool "5.5.x"
> +
> +endchoice
> +
> +config BR2_PACKAGE_MYSQL_SERVER
> + bool "Build the MySQL Server"
> + depends on BR2_INSTALL_LIBSTDCPP && BR2_PACKAGE_MYSQL
> + select BR2_PACKAGE_NCURSES
> + select BR2_PACKAGE_READLINE
Since this depends on BR2_PACKAGE_MYSQL, which already selects ncurses
and readline, do we really need those selects again ?
> diff --git a/package/mysql/mysql-5.5.12/mysql-5.5.11-tool-path.patch b/package/mysql/mysql-5.5.12/mysql-5.5.11-tool-path.patch
> new file mode 100644
> index 0000000..03de86d
> --- /dev/null
> +++ b/package/mysql/mysql-5.5.12/mysql-5.5.11-tool-path.patch
This patch needs a description + Signed-off-by line.
> --- /dev/null
> +++ b/package/mysql/mysql.mk
> @@ -0,0 +1,143 @@
> +#############################################################
> +#
> +# MySQL Server & Client
> +#
> +#############################################################
> +
> +ifeq ($(BR2_PACKAGE_MYSQL_51),y)
> + MYSQL_MAIN_VERSION = 5.1
> + MYSQL_VERSION = $(MYSQL_MAIN_VERSION).57
> +endif
> +
> +ifeq ($(BR2_PACKAGE_MYSQL_55),y)
> + MYSQL_MAIN_VERSION = 5.5
> + MYSQL_VERSION = $(MYSQL_MAIN_VERSION).12
> +endif
> +
> +MYSQL_SOURCE = mysql-$(MYSQL_VERSION).tar.gz
> +MYSQL_SITE = http://mirror.services.wisc.edu/mysql/Downloads/MySQL-$(MYSQL_MAIN_VERSION)
> +MYSQL_INSTALL_TARGET = YES
> +MYSQL_INSTALL_STAGING = YES
> +MYSQL_DEPENDENCIES = readline ncurses host-mysql
Could you detail why host-mysql is needed as a dependency ? (For
example by adding a comment).
> + -DMYSQL_DATADIR=/var/mysql
What about using the configuration option for the data directory ?
> +# Generic section
> +define MYSQL_REMOVE_TEST_PROGS
> + rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench
> +endef
> +
> +define MYSQL_ADD_MYSQL_LIB_PATH
> + echo "/usr/lib/mysql" >> $(TARGET_DIR)/etc/ld.so.conf
> +endef
> +
> +ifeq ($(BR2_PACKAGE_MYSQL_REMOVE_TEST_PROGS),y)
> + MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_REMOVE_TEST_PROGS
> +endif
> +
> +MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_MYSQL_LIB_PATH
> +
> +MYSQL_POST_CONFIGURE_HOOKS += MYSQL_COPY_HOST_BINARIES
> +
> +define MYSQL_COPY_HOST_BINARIES
> + cp $(@D)/../host-mysql-$(MYSQL_VERSION)/sql/gen_lex_hash $(@D)/sql/
> + cp $(@D)/../host-mysql-$(MYSQL_VERSION)/scripts/comp_sql $(@D)/scripts/
> + cp $(@D)/../host-mysql-$(MYSQL_VERSION)/extra/comp_err $(@D)/extra/
> + # set the file dates far into the future to prevent recompilation
> + touch -t "203012120101" $(@D)/sql/gen_lex_hash
> + touch -t "203012120101" $(@D)/scripts/comp_sql
> + touch -t "203012120101" $(@D)/extra/comp_err
> +endef
> +
> +define HOST_MYSQL_BUILD_CMDS
> + make -C $(@D)/vio
> + make -C $(@D)/mysys
> + make -C $(@D)/strings
> + make -C $(@D)/dbug
> + make -C $(@D)/regex
> + make -C $(@D)/sql gen_lex_hash
> + make -C $(@D)/scripts comp_sql
> + make -C $(@D)/extra comp_err
> +endef
> +
> +define HOST_MYSQL_INSTALL_CMDS
> + # no need to really install this
> + exit 0
Really ?
> +endef
Normally, all those definitions should be before the
AUTOTARGETS/CMAKETARGETS calls.
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] mysql server and client 5.1.x and 5.5.x
2011-06-04 8:52 ` Thomas Petazzoni
@ 2011-06-04 13:48 ` Heiko Zuerker
2011-07-09 13:19 ` Heiko Zuerker
0 siblings, 1 reply; 4+ messages in thread
From: Heiko Zuerker @ 2011-06-04 13:48 UTC (permalink / raw)
To: buildroot
Hey,
> -----Original Message-----
> From: buildroot-bounces at busybox.net [mailto:buildroot-
> bounces at busybox.net] On Behalf Of Thomas Petazzoni
> Sent: Saturday, June 04, 2011 3:52 AM
> To: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH] mysql server and client 5.1.x and 5.5.x
>
> Hello Heiko!
>
> Thanks for taking care of the MySQL package. I have a few comments below,
> but first, is there a good reason to support both MySQL 5.1 and MySQL 5.5
?
> Wouldn't supporting MySQL 5.5 be enough ?
I'm worried about compatibility of other software with the new MySQL 5.5. I
had a lot of problems with that in the past.
I still have to add a lot more software and was planning to remove the 5.1
support once we know that all other packages play nice with the 5.5 version.
If you guys really don't like this then we can remove it.
> On Sat, 28 May 2011 12:56:20 -0500
> heiko at zuerker.org wrote:
>
> > diff --git a/package/mysql/Config.in b/package/mysql/Config.in new
> > file mode 100644 index 0000000..3c44ec3
> > --- /dev/null
> > +++ b/package/mysql/Config.in
> > @@ -0,0 +1,91 @@
> > +config BR2_PACKAGE_MYSQL
> > + bool "MySQL"
> > + depends on BR2_INSTALL_LIBSTDCPP
> > + select BR2_PACKAGE_NCURSES
> > + select BR2_PACKAGE_READLINE
> > + help
> > + MySQL client and optional server
> > +
> > +menu "MySQL options"
> > +depends on BR2_PACKAGE_MYSQL
> > +
> > +choice
> > + prompt "MySQL Version"
> > + default BR2_PACKAGE_MYSQL_51
> > + help
> > + The version of MySQL
> > +
> > +config BR2_PACKAGE_MYSQL_51
> > + bool "5.1.x"
> > + select BR2_TARGET_SYSLINUX
> > +
> > +config BR2_PACKAGE_MYSQL_55
> > + bool "5.5.x"
> > +
> > +endchoice
> > +
> > +config BR2_PACKAGE_MYSQL_SERVER
> > + bool "Build the MySQL Server"
> > + depends on BR2_INSTALL_LIBSTDCPP && BR2_PACKAGE_MYSQL
> > + select BR2_PACKAGE_NCURSES
> > + select BR2_PACKAGE_READLINE
>
> Since this depends on BR2_PACKAGE_MYSQL, which already selects ncurses
> and readline, do we really need those selects again ?
Good point, I'll remove it in the next revision.
> > diff --git a/package/mysql/mysql-5.5.12/mysql-5.5.11-tool-path.patch
> > b/package/mysql/mysql-5.5.12/mysql-5.5.11-tool-path.patch
> > new file mode 100644
> > index 0000000..03de86d
> > --- /dev/null
> > +++ b/package/mysql/mysql-5.5.12/mysql-5.5.11-tool-path.patch
>
> This patch needs a description + Signed-off-by line.
Will do.
> > --- /dev/null
> > +++ b/package/mysql/mysql.mk
> > @@ -0,0 +1,143 @@
> >
> +#########################################################
> ####
> > +#
> > +# MySQL Server & Client
> > +#
> >
> +#########################################################
> ####
> > +
> > +ifeq ($(BR2_PACKAGE_MYSQL_51),y)
> > + MYSQL_MAIN_VERSION = 5.1
> > + MYSQL_VERSION = $(MYSQL_MAIN_VERSION).57 endif
> > +
> > +ifeq ($(BR2_PACKAGE_MYSQL_55),y)
> > + MYSQL_MAIN_VERSION = 5.5
> > + MYSQL_VERSION = $(MYSQL_MAIN_VERSION).12 endif
> > +
> > +MYSQL_SOURCE = mysql-$(MYSQL_VERSION).tar.gz MYSQL_SITE =
> > +http://mirror.services.wisc.edu/mysql/Downloads/MySQL-
> $(MYSQL_MAIN_VE
> > +RSION)
> > +MYSQL_INSTALL_TARGET = YES
> > +MYSQL_INSTALL_STAGING = YES
> > +MYSQL_DEPENDENCIES = readline ncurses host-mysql
>
> Could you detail why host-mysql is needed as a dependency ? (For example
> by adding a comment).
I'll put it in. MySQL cross-compiling is such a clutch.....
> > + -DMYSQL_DATADIR=/var/mysql
>
> What about using the configuration option for the data directory ?
Ah crap. Will fix it.
> > +# Generic section
> > +define MYSQL_REMOVE_TEST_PROGS
> > + rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench
> > +endef
> > +
> > +define MYSQL_ADD_MYSQL_LIB_PATH
> > + echo "/usr/lib/mysql" >> $(TARGET_DIR)/etc/ld.so.conf endef
> > +
> > +ifeq ($(BR2_PACKAGE_MYSQL_REMOVE_TEST_PROGS),y)
> > + MYSQL_POST_INSTALL_TARGET_HOOKS +=
> MYSQL_REMOVE_TEST_PROGS endif
> > +
> > +MYSQL_POST_INSTALL_TARGET_HOOKS +=
> MYSQL_ADD_MYSQL_LIB_PATH
> > +
> > +MYSQL_POST_CONFIGURE_HOOKS += MYSQL_COPY_HOST_BINARIES
> > +
> > +define MYSQL_COPY_HOST_BINARIES
> > + cp $(@D)/../host-mysql-$(MYSQL_VERSION)/sql/gen_lex_hash
> $(@D)/sql/
> > + cp $(@D)/../host-mysql-$(MYSQL_VERSION)/scripts/comp_sql
> $(@D)/scripts/
> > + cp $(@D)/../host-mysql-$(MYSQL_VERSION)/extra/comp_err
> $(@D)/extra/
> > + # set the file dates far into the future to prevent recompilation
> > + touch -t "203012120101" $(@D)/sql/gen_lex_hash
> > + touch -t "203012120101" $(@D)/scripts/comp_sql
> > + touch -t "203012120101" $(@D)/extra/comp_err endef
> > +
> > +define HOST_MYSQL_BUILD_CMDS
> > + make -C $(@D)/vio
> > + make -C $(@D)/mysys
> > + make -C $(@D)/strings
> > + make -C $(@D)/dbug
> > + make -C $(@D)/regex
> > + make -C $(@D)/sql gen_lex_hash
> > + make -C $(@D)/scripts comp_sql
> > + make -C $(@D)/extra comp_err
> > +endef
> > +
> > +define HOST_MYSQL_INSTALL_CMDS
> > + # no need to really install this
> > + exit 0
>
> Really ?
Yup. ;-)
All we need is a couple of binaries from the host-mysql.
I have a "bug" open with the guys at mysql on cross-compiling, but don't
think it'll go anywhere. :(
> > +endef
>
> Normally, all those definitions should be before the
> AUTOTARGETS/CMAKETARGETS calls.
No problem, I'll fix that. (Not sure when I'll get a chance to work on it.)
--
Regards
Heiko Zuerker
http://www.devil-linux.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] mysql server and client 5.1.x and 5.5.x
2011-06-04 13:48 ` Heiko Zuerker
@ 2011-07-09 13:19 ` Heiko Zuerker
0 siblings, 0 replies; 4+ messages in thread
From: Heiko Zuerker @ 2011-07-09 13:19 UTC (permalink / raw)
To: buildroot
All,
I applied all the requested changes to the new mysql package.
--
Regards
Heiko Zuerker
http://www.devil-linux.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-09 13:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-28 17:56 [Buildroot] [PATCH] mysql server and client 5.1.x and 5.5.x heiko at zuerker.org
2011-06-04 8:52 ` Thomas Petazzoni
2011-06-04 13:48 ` Heiko Zuerker
2011-07-09 13:19 ` Heiko Zuerker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.