Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster
@ 2015-07-03 13:11 Sylvain Raybaud
  2015-07-03 13:11 ` [Buildroot] [PATCH 1/7] Add package check: unit test library Sylvain Raybaud
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Sylvain Raybaud @ 2015-07-03 13:11 UTC (permalink / raw)
  To: buildroot

Add MariaDB Galera Cluster as an alternative implementation of MySQL, inside package/mysql.
Also add galera which is needed for running a cluster and check on which galera depends.
Introduce a few other minor modifications to busybox.config and libaio.mk necessary to make this work.

Sylvain Raybaud (7):
  Add package check: unit test library
  Add rule to build host-libaio
  Add package galera: wsrep provider for mysql and mariadb
  Add PKG_CONFIG_* variables to help cmake find host-packages
  Add fancy options to busybox sleep, like float arguments
  Move mysql patches to version specific subdirectory
  Propose mariadb galera cluster as an alternative to standard mysql
    implementation, inside msyql package

 package/Config.in                                  |   2 +
 package/busybox/busybox.config                     |   4 +-
 package/check/Config.in                            |   7 +
 package/check/check.hash                           |   2 +
 package/check/check.mk                             |  20 ++
 package/galera/Config.in                           |   9 +
 ...lera-01-fix_sconstruct_for-crosscompiling.patch |  52 +++++
 package/galera/galera.hash                         |   2 +
 package/galera/galera.mk                           |  63 ++++++
 package/libaio/libaio.mk                           |   1 +
 .../mariadb-galera-01-fix_xtradb_cmakelist.patch   |  27 +++
 .../mariadb-galera-02-fix_innodb_cmakelist.patch   | 251 +++++++++++++++++++++
 package/mysql/{ => 5.1}/0000-ac_cache_check.patch  |   0
 .../{ => 5.1}/0001-configure-ps-cache-check.patch  |   0
 .../{ => 5.1}/0002-use-new-readline-iface.patch    |   0
 .../0003-ac_stack_direction-is-unset.patch         |   0
 .../0004-Fix-gen_lex_hash-execution.patch          |   0
 .../0005-bison_3_breaks_mysql_server_build.patch   |   0
 .../{ => 5.1}/0006-no-force-static-build.patch     |   0
 package/mysql/Config.in                            |  43 +++-
 package/mysql/mariadb-galera-cluster.cnf           | 204 +++++++++++++++++
 package/mysql/mysql.hash                           |   2 +
 package/mysql/mysql.mk                             | 216 +++++++++++++++---
 package/pkg-cmake.mk                               |   2 +
 24 files changed, 869 insertions(+), 38 deletions(-)
 create mode 100644 package/check/Config.in
 create mode 100644 package/check/check.hash
 create mode 100644 package/check/check.mk
 create mode 100644 package/galera/Config.in
 create mode 100644 package/galera/galera-01-fix_sconstruct_for-crosscompiling.patch
 create mode 100644 package/galera/galera.hash
 create mode 100644 package/galera/galera.mk
 create mode 100644 package/mysql/10.0.17/mariadb-galera-01-fix_xtradb_cmakelist.patch
 create mode 100644 package/mysql/10.0.17/mariadb-galera-02-fix_innodb_cmakelist.patch
 rename package/mysql/{ => 5.1}/0000-ac_cache_check.patch (100%)
 rename package/mysql/{ => 5.1}/0001-configure-ps-cache-check.patch (100%)
 rename package/mysql/{ => 5.1}/0002-use-new-readline-iface.patch (100%)
 rename package/mysql/{ => 5.1}/0003-ac_stack_direction-is-unset.patch (100%)
 rename package/mysql/{ => 5.1}/0004-Fix-gen_lex_hash-execution.patch (100%)
 rename package/mysql/{ => 5.1}/0005-bison_3_breaks_mysql_server_build.patch (100%)
 rename package/mysql/{ => 5.1}/0006-no-force-static-build.patch (100%)
 create mode 100644 package/mysql/mariadb-galera-cluster.cnf

-- 
1.9.1

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/7] Add package check: unit test library
  2015-07-03 13:11 [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Sylvain Raybaud
@ 2015-07-03 13:11 ` Sylvain Raybaud
  2015-07-03 18:34   ` Yann E. MORIN
  2015-07-03 13:11 ` [Buildroot] [PATCH 2/7] Add rule to build host-libaio Sylvain Raybaud
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Sylvain Raybaud @ 2015-07-03 13:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Sylvain Raybaud <sylvain.raybaud@green-communications.fr>
---
 package/Config.in        |  1 +
 package/check/Config.in  |  7 +++++++
 package/check/check.hash |  2 ++
 package/check/check.mk   | 20 ++++++++++++++++++++
 4 files changed, 30 insertions(+)
 create mode 100644 package/check/Config.in
 create mode 100644 package/check/check.hash
 create mode 100644 package/check/check.mk

diff --git a/package/Config.in b/package/Config.in
index 13a7e74..72ec372 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1014,6 +1014,7 @@ menu "Other"
 	source "package/atf/Config.in"
 	source "package/bdwgc/Config.in"
 	source "package/boost/Config.in"
+	source "package/check/Config.in"
 	source "package/clapack/Config.in"
 	source "package/classpath/Config.in"
 	source "package/cppcms/Config.in"
diff --git a/package/check/Config.in b/package/check/Config.in
new file mode 100644
index 0000000..8e7e3bc
--- /dev/null
+++ b/package/check/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_CHECK
+	bool "host check"
+	select BR2_PACKAGE_LIBTOOL
+	select BR2_PACKAGE_PKGCONF
+	help
+	  Unit testing framework for C
+	  http://check.sourceforge.net/
diff --git a/package/check/check.hash b/package/check/check.hash
new file mode 100644
index 0000000..7d7e19b
--- /dev/null
+++ b/package/check/check.hash
@@ -0,0 +1,2 @@
+# Hash from: http://downloads.sourceforge.net/project/check/check/check-0.9.14.tar.gz
+sha1	4b79e2d485d014ddb438e322b64235347d57b0ff	check-0.9.14.tar.gz
diff --git a/package/check/check.mk b/package/check/check.mk
new file mode 100644
index 0000000..3c2021c
--- /dev/null
+++ b/package/check/check.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# check
+#
+################################################################################
+
+CHECK_VERSION = 0.9.14
+CHECK_SOURCE = check-$(CHECK_VERSION).tar.gz
+CHECK_SITE = http://downloads.sourceforge.net/project/check/check/$(CHECK_VERSION)/
+
+CHECK_DEPENDENCIES = libtool pkgconf
+
+CHECK_INSTALL_STAGING = YES
+CHECK_INSTALL_TARGET = NO
+
+CHECK_LICENSE =  LGPLv2.1
+CHECK_LICENSE_FILES = COPYING.LESSER
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 2/7] Add rule to build host-libaio
  2015-07-03 13:11 [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Sylvain Raybaud
  2015-07-03 13:11 ` [Buildroot] [PATCH 1/7] Add package check: unit test library Sylvain Raybaud
@ 2015-07-03 13:11 ` Sylvain Raybaud
  2015-07-03 18:35   ` Yann E. MORIN
  2015-07-03 13:11 ` [Buildroot] [PATCH 3/7] Add package galera: wsrep provider for mysql and mariadb Sylvain Raybaud
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Sylvain Raybaud @ 2015-07-03 13:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Sylvain Raybaud <sylvain.raybaud@green-communications.fr>
---
 package/libaio/libaio.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/libaio/libaio.mk b/package/libaio/libaio.mk
index 53ad7eb..55e2cc7 100644
--- a/package/libaio/libaio.mk
+++ b/package/libaio/libaio.mk
@@ -24,3 +24,4 @@ define LIBAIO_INSTALL_TARGET_CMDS
 endef
 
 $(eval $(generic-package))
+$(eval $(host-generic-package))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 3/7] Add package galera: wsrep provider for mysql and mariadb
  2015-07-03 13:11 [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Sylvain Raybaud
  2015-07-03 13:11 ` [Buildroot] [PATCH 1/7] Add package check: unit test library Sylvain Raybaud
  2015-07-03 13:11 ` [Buildroot] [PATCH 2/7] Add rule to build host-libaio Sylvain Raybaud
@ 2015-07-03 13:11 ` Sylvain Raybaud
  2015-07-03 13:11 ` [Buildroot] [PATCH 4/7] Add PKG_CONFIG_* variables to help cmake find host-packages Sylvain Raybaud
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Sylvain Raybaud @ 2015-07-03 13:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Sylvain Raybaud <sylvain.raybaud@green-communications.fr>
---
 package/Config.in                                  |  1 +
 package/galera/Config.in                           |  9 ++++
 ...lera-01-fix_sconstruct_for-crosscompiling.patch | 52 ++++++++++++++++++
 package/galera/galera.hash                         |  2 +
 package/galera/galera.mk                           | 63 ++++++++++++++++++++++
 5 files changed, 127 insertions(+)
 create mode 100644 package/galera/Config.in
 create mode 100644 package/galera/galera-01-fix_sconstruct_for-crosscompiling.patch
 create mode 100644 package/galera/galera.hash
 create mode 100644 package/galera/galera.mk

diff --git a/package/Config.in b/package/Config.in
index 72ec372..b15d026 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -740,6 +740,7 @@ menu "Database"
 	source "package/cppdb/Config.in"
 	source "package/gdbm/Config.in"
 	source "package/leveldb/Config.in"
+	source "package/galera/Config.in"
 	source "package/mysql/Config.in"
 	source "package/postgresql/Config.in"
 	source "package/redis/Config.in"
diff --git a/package/galera/Config.in b/package/galera/Config.in
new file mode 100644
index 0000000..4c50427
--- /dev/null
+++ b/package/galera/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_GALERA
+	bool "galera"
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_CHECK
+	help
+	  Galera WSREP provider
+	  http://galeracluster.com/
diff --git a/package/galera/galera-01-fix_sconstruct_for-crosscompiling.patch b/package/galera/galera-01-fix_sconstruct_for-crosscompiling.patch
new file mode 100644
index 0000000..25c9d59
--- /dev/null
+++ b/package/galera/galera-01-fix_sconstruct_for-crosscompiling.patch
@@ -0,0 +1,52 @@
+Fix cross compilation
+
+--- a/SConstruct	2015-05-28 12:23:41.027461788 +0200
++++ b/SConstruct	2015-07-02 11:27:55.763337287 +0200
+@@ -15,18 +15,17 @@
+ ####################################################################
+ 
+ import os
+-import platform
+ import string
+ 
+-sysname = os.uname()[0].lower()
+-machine = platform.machine()
+-bits = platform.architecture()[0]
++sysname = "linux"
++machine = os.environ['BR2_ARCH']
++bits = os.environ['BR2_x86']
+ print 'Host: ' + sysname + ' ' + machine + ' ' + bits
+ 
+ x86 = 0
+-if bits == '32bit':
++if bits == '32':
+     x86 = 32
+-elif bits == '64bit':
++elif bits == '64':
+     x86 = 64
+ 
+ 
+@@ -240,6 +239,15 @@
+ #
+ env.Append(LINKFLAGS = link_arch)
+ 
++# Cross-compilation
++
++if 'CROSS' in os.environ:
++        cross = os.environ['CROSS']
++        env.Append(CROSS = cross)
++        env.Replace(CC = cross + 'gcc')
++        env.Replace(CXX = cross + 'g++')
++        env.Replace(LD = cross + 'ld')
++
+ #
+ # Check required headers and libraries (autoconf functionality)
+ #
+@@ -405,7 +413,7 @@
+
+ # these will be used only with our softaware
+ if strict_build_flags == 1:
+-    conf.env.Append(CPPFLAGS = ' -Werror')
++    conf.env.Append(CPPFLAGS = ' -Werror -Wno-error=uninitialized -Wno-error=pedantic')
+     conf.env.Append(CCFLAGS  = ' -pedantic')
+     conf.env.Append(CXXFLAGS = ' -Weffc++ -Wold-style-cast')
diff --git a/package/galera/galera.hash b/package/galera/galera.hash
new file mode 100644
index 0000000..d3872e1
--- /dev/null
+++ b/package/galera/galera.hash
@@ -0,0 +1,2 @@
+# From http://releases.galeracluster.com/source/galera-3-25.3.10.tar.gz
+sha1   03f69fa87dc14fa4d793e7afab601e285c570809	galera-3-25.3.10.tar.gz
diff --git a/package/galera/galera.mk b/package/galera/galera.mk
new file mode 100644
index 0000000..755a2ae
--- /dev/null
+++ b/package/galera/galera.mk
@@ -0,0 +1,63 @@
+################################################################################
+#
+# galera
+#
+################################################################################
+
+GALERA_VERSION = 3-25.3.10
+GALERA_SOURCE = galera-$(GALERA_VERSION).tar.gz
+GALERA_SITE = http://releases.galeracluster.com/source/
+
+GALERA_INSTALL_STAGING = NO
+GALERA_INSTALL_TARGET = YES
+
+GALERA_DEPENDENCIES = boost openssl check host-scons
+
+GALERA_LIBNAME = libgalera_smm.so
+
+GALERA_SCONS_ENV = $(TARGET_CONFIGURE_OPTS) BR2_ARCH=$(BR2_ARCH)
+ifeq ($(BR2_x86_64),y)
+GALERA_SCONS_ENV += BR2_x86=64
+else ifeq ($(BR2_i386),y)
+GALERA_SCONS_ENV += BR2_x86=32
+else
+GALERA_SCONS_ENV += BR2_x86=0
+endif
+
+GALERA_SCONS_OPTS = \
+	prefix=/usr \
+	extra_sysroot=$(STAGING_DIR) \
+	tests=0
+
+GALERA_SCONS_ENV = $(TARGET_CONFIGURE_OPTS) BR2_ARCH=$(BR2_ARCH)
+ifeq ($(BR2_x86_64),y)
+GALERA_SCONS_ENV += BR2_x86=64
+else ifeq ($(BR2_i386),y)
+GALERA_SCONS_ENV += BR2_x86=32
+else
+GALERA_SCONS_ENV += BR2_x86=0
+endif
+
+GALERA_SCONS_OPTS = \
+	arch=$(BR2_ARCH) \
+	prefix=/usr \
+	extra_sysroot=$(STAGING_DIR) \
+	tests=0
+
+define GALERA_BUILD_CMDS
+        cd $(@D) && \
+	  $(GALERA_SCONS_ENV) \
+	  CROSS=$(TARGET_CROSS) \
+	  $(SCONS) \
+	  $(GALERA_SCONS_OPTS)
+endef
+
+define GALERA_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 644 $(@D)/$(GALERA_LIBNAME) $(TARGET_DIR)/usr/lib/$(GALERA_LIBNAME)
+endef
+
+GALERA_LICENSE = GPLv2
+GALERA_LICENSE_FILES = LICENSE COPYING
+
+$(eval $(generic-package))
+$(eval $(host-generic-package))
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 4/7] Add PKG_CONFIG_* variables to help cmake find host-packages
  2015-07-03 13:11 [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Sylvain Raybaud
                   ` (2 preceding siblings ...)
  2015-07-03 13:11 ` [Buildroot] [PATCH 3/7] Add package galera: wsrep provider for mysql and mariadb Sylvain Raybaud
@ 2015-07-03 13:11 ` Sylvain Raybaud
  2015-07-03 13:11 ` [Buildroot] [PATCH 5/7] Add fancy options to busybox sleep, like float arguments Sylvain Raybaud
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Sylvain Raybaud @ 2015-07-03 13:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Sylvain Raybaud <sylvain.raybaud@green-communications.fr>
---
 package/pkg-cmake.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index f17a883..a757a2b 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -111,6 +111,8 @@ define $(2)_CONFIGURE_CMDS
 	cd $$($$(PKG)_BUILDDIR) && \
 	rm -f CMakeCache.txt && \
 	PATH=$$(BR_PATH) \
+	PKG_CONFIG_PATH='$$(HOST_DIR)/usr/lib/pkgconfig' \
+	PKG_CONFIG_SYSROOT_DIR='$$(HOST_DIR)' \
 	$$(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
 		-DCMAKE_INSTALL_SO_NO_EXE=0 \
 		-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 5/7] Add fancy options to busybox sleep, like float arguments
  2015-07-03 13:11 [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Sylvain Raybaud
                   ` (3 preceding siblings ...)
  2015-07-03 13:11 ` [Buildroot] [PATCH 4/7] Add PKG_CONFIG_* variables to help cmake find host-packages Sylvain Raybaud
@ 2015-07-03 13:11 ` Sylvain Raybaud
  2015-07-04  9:12   ` Thomas Petazzoni
  2015-07-03 13:11 ` [Buildroot] [PATCH 6/7] Move mysql patches to version specific subdirectory Sylvain Raybaud
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Sylvain Raybaud @ 2015-07-03 13:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Sylvain Raybaud <sylvain.raybaud@green-communications.fr>
---
 package/busybox/busybox.config | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/busybox/busybox.config b/package/busybox/busybox.config
index 9d930d1..8d1d80a 100644
--- a/package/busybox/busybox.config
+++ b/package/busybox/busybox.config
@@ -273,8 +273,8 @@ CONFIG_SHA256SUM=y
 CONFIG_SHA512SUM=y
 CONFIG_SHA3SUM=y
 CONFIG_SLEEP=y
-# CONFIG_FEATURE_FANCY_SLEEP is not set
-# CONFIG_FEATURE_FLOAT_SLEEP is not set
+CONFIG_FEATURE_FANCY_SLEEP=y
+CONFIG_FEATURE_FLOAT_SLEEP=y
 CONFIG_SORT=y
 CONFIG_FEATURE_SORT_BIG=y
 # CONFIG_SPLIT is not set
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 6/7] Move mysql patches to version specific subdirectory
  2015-07-03 13:11 [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Sylvain Raybaud
                   ` (4 preceding siblings ...)
  2015-07-03 13:11 ` [Buildroot] [PATCH 5/7] Add fancy options to busybox sleep, like float arguments Sylvain Raybaud
@ 2015-07-03 13:11 ` Sylvain Raybaud
  2015-07-03 13:11 ` [Buildroot] [PATCH 7/7] Propose mariadb galera cluster as an alternative to standard mysql implementation, inside msyql package Sylvain Raybaud
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Sylvain Raybaud @ 2015-07-03 13:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Sylvain Raybaud <sylvain.raybaud@green-communications.fr>
---
 package/mysql/{ => 5.1}/0000-ac_cache_check.patch                    | 0
 package/mysql/{ => 5.1}/0001-configure-ps-cache-check.patch          | 0
 package/mysql/{ => 5.1}/0002-use-new-readline-iface.patch            | 0
 package/mysql/{ => 5.1}/0003-ac_stack_direction-is-unset.patch       | 0
 package/mysql/{ => 5.1}/0004-Fix-gen_lex_hash-execution.patch        | 0
 package/mysql/{ => 5.1}/0005-bison_3_breaks_mysql_server_build.patch | 0
 package/mysql/{ => 5.1}/0006-no-force-static-build.patch             | 0
 7 files changed, 0 insertions(+), 0 deletions(-)
 rename package/mysql/{ => 5.1}/0000-ac_cache_check.patch (100%)
 rename package/mysql/{ => 5.1}/0001-configure-ps-cache-check.patch (100%)
 rename package/mysql/{ => 5.1}/0002-use-new-readline-iface.patch (100%)
 rename package/mysql/{ => 5.1}/0003-ac_stack_direction-is-unset.patch (100%)
 rename package/mysql/{ => 5.1}/0004-Fix-gen_lex_hash-execution.patch (100%)
 rename package/mysql/{ => 5.1}/0005-bison_3_breaks_mysql_server_build.patch (100%)
 rename package/mysql/{ => 5.1}/0006-no-force-static-build.patch (100%)

diff --git a/package/mysql/0000-ac_cache_check.patch b/package/mysql/5.1/0000-ac_cache_check.patch
similarity index 100%
rename from package/mysql/0000-ac_cache_check.patch
rename to package/mysql/5.1/0000-ac_cache_check.patch
diff --git a/package/mysql/0001-configure-ps-cache-check.patch b/package/mysql/5.1/0001-configure-ps-cache-check.patch
similarity index 100%
rename from package/mysql/0001-configure-ps-cache-check.patch
rename to package/mysql/5.1/0001-configure-ps-cache-check.patch
diff --git a/package/mysql/0002-use-new-readline-iface.patch b/package/mysql/5.1/0002-use-new-readline-iface.patch
similarity index 100%
rename from package/mysql/0002-use-new-readline-iface.patch
rename to package/mysql/5.1/0002-use-new-readline-iface.patch
diff --git a/package/mysql/0003-ac_stack_direction-is-unset.patch b/package/mysql/5.1/0003-ac_stack_direction-is-unset.patch
similarity index 100%
rename from package/mysql/0003-ac_stack_direction-is-unset.patch
rename to package/mysql/5.1/0003-ac_stack_direction-is-unset.patch
diff --git a/package/mysql/0004-Fix-gen_lex_hash-execution.patch b/package/mysql/5.1/0004-Fix-gen_lex_hash-execution.patch
similarity index 100%
rename from package/mysql/0004-Fix-gen_lex_hash-execution.patch
rename to package/mysql/5.1/0004-Fix-gen_lex_hash-execution.patch
diff --git a/package/mysql/0005-bison_3_breaks_mysql_server_build.patch b/package/mysql/5.1/0005-bison_3_breaks_mysql_server_build.patch
similarity index 100%
rename from package/mysql/0005-bison_3_breaks_mysql_server_build.patch
rename to package/mysql/5.1/0005-bison_3_breaks_mysql_server_build.patch
diff --git a/package/mysql/0006-no-force-static-build.patch b/package/mysql/5.1/0006-no-force-static-build.patch
similarity index 100%
rename from package/mysql/0006-no-force-static-build.patch
rename to package/mysql/5.1/0006-no-force-static-build.patch
-- 
1.9.1

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 7/7] Propose mariadb galera cluster as an alternative to standard mysql implementation, inside msyql package
  2015-07-03 13:11 [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Sylvain Raybaud
                   ` (5 preceding siblings ...)
  2015-07-03 13:11 ` [Buildroot] [PATCH 6/7] Move mysql patches to version specific subdirectory Sylvain Raybaud
@ 2015-07-03 13:11 ` Sylvain Raybaud
  2015-07-04  9:16 ` [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Thomas Petazzoni
  2015-07-09 10:42 ` Sylvain Raybaud
  8 siblings, 0 replies; 17+ messages in thread
From: Sylvain Raybaud @ 2015-07-03 13:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Sylvain Raybaud <sylvain.raybaud@green-communications.fr>
---
 .../mariadb-galera-01-fix_xtradb_cmakelist.patch   |  27 +++
 .../mariadb-galera-02-fix_innodb_cmakelist.patch   | 251 +++++++++++++++++++++
 package/mysql/Config.in                            |  43 +++-
 package/mysql/mariadb-galera-cluster.cnf           | 204 +++++++++++++++++
 package/mysql/mysql.hash                           |   2 +
 package/mysql/mysql.mk                             | 216 +++++++++++++++---
 6 files changed, 707 insertions(+), 36 deletions(-)
 create mode 100644 package/mysql/10.0.17/mariadb-galera-01-fix_xtradb_cmakelist.patch
 create mode 100644 package/mysql/10.0.17/mariadb-galera-02-fix_innodb_cmakelist.patch
 create mode 100644 package/mysql/mariadb-galera-cluster.cnf

diff --git a/package/mysql/10.0.17/mariadb-galera-01-fix_xtradb_cmakelist.patch b/package/mysql/10.0.17/mariadb-galera-01-fix_xtradb_cmakelist.patch
new file mode 100644
index 0000000..83eac77
--- /dev/null
+++ b/package/mysql/10.0.17/mariadb-galera-01-fix_xtradb_cmakelist.patch
@@ -0,0 +1,27 @@
+Do not perform test if the build is not requested anyway. The test may fail,
+preventing building the whole package.
+
+--- a/storage/xtradb/CMakeLists.txt	2014-10-30 16:24:33.160188627 +0100
++++ b/storage/xtradb/CMakeLists.txt	2014-10-30 16:25:09.060188829 +0100
+@@ -470,12 +470,13 @@
+   SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
+ ENDIF()
+ 
+-IF(XTRADB_OK)
+-  MYSQL_ADD_PLUGIN(xtradb ${INNOBASE_SOURCES} STORAGE_ENGINE
+-    DEFAULT
+-    RECOMPILE_FOR_EMBEDDED
+-    LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT})
+-ELSE()
+-  MESSAGE(FATAL_ERROR "Percona XtraDB is not supported on this platform")
++IF(NOT WITHOUT_XTRADB)
++  IF(XTRADB_OK)
++    MYSQL_ADD_PLUGIN(xtradb ${INNOBASE_SOURCES} STORAGE_ENGINE
++      DEFAULT
++      RECOMPILE_FOR_EMBEDDED
++      LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT})
++  ELSE()
++    MESSAGE(FATAL_ERROR "Percona XtraDB is not supported on this platform")
++  ENDIF()
+ ENDIF()
+-
diff --git a/package/mysql/10.0.17/mariadb-galera-02-fix_innodb_cmakelist.patch b/package/mysql/10.0.17/mariadb-galera-02-fix_innodb_cmakelist.patch
new file mode 100644
index 0000000..1ddec5d
--- /dev/null
+++ b/package/mysql/10.0.17/mariadb-galera-02-fix_innodb_cmakelist.patch
@@ -0,0 +1,251 @@
+Use CHECK_C_SOURCE_COMPILES instead of CHECK_C_SOURCE_RUNS in order to be
+cross-compile friendly.
+In buildroot another solution (maybe better, maybe not) could be to use
+BR2_ARCH_HAS_ATOMICS in order to determine the value of HAVE_IB_GCC_ATOMIC_BUILTINS_BYTE
+and likes.
+
+--- a/storage/innobase/CMakeLists.txt	2014-11-07 17:05:48.853208487 +0100
++++ b/storage/innobase/CMakeLists.txt	2014-11-07 17:11:38.061217839 +0100
+@@ -58,100 +58,99 @@
+ 
+ IF(NOT MSVC)
+ # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
+-IF(NOT CMAKE_CROSSCOMPILING)
+-  # workaround for gcc 4.1.2 RHEL5/x86, gcc atomic ops only work under -march=i686
+-  IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND
+-     CMAKE_C_COMPILER_VERSION VERSION_LESS "4.1.3")
+-    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
+-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
+-  ENDIF()
+-  CHECK_C_SOURCE_RUNS(
+-  "
+-  int main()
+-  {
+-    long	x;
+-    long	y;
+-    long	res;
+-
+-    x = 10;
+-    y = 123;
+-    res = __sync_bool_compare_and_swap(&x, x, y);
+-    if (!res || x != y) {
+-      return(1);
+-    }
+-
+-    x = 10;
+-    y = 123;
+-    res = __sync_bool_compare_and_swap(&x, x + 1, y);
+-    if (res || x != 10) {
+-      return(1);
+-    }
+-    x = 10;
+-    y = 123;
+-    res = __sync_add_and_fetch(&x, y);
+-    if (res != 123 + 10 || x != 123 + 10) {
+-      return(1);
+-    }
+-    return(0);
+-  }"
+-  HAVE_IB_GCC_ATOMIC_BUILTINS
+-  )
+-  CHECK_C_SOURCE_RUNS(
+-  "
+-  int main()
+-  {
+-    long	res;
+-    char	c;
+-
+-    c = 10;
+-    res = __sync_lock_test_and_set(&c, 123);
+-    if (res != 10 || c != 123) {
+-      return(1);
+-    }
+-    return(0);
+-  }"
+-  HAVE_IB_GCC_ATOMIC_BUILTINS_BYTE
+-  )
+-  CHECK_C_SOURCE_RUNS(
+-  "#include<stdint.h>
+-  int main()
+-  {
+-    int64_t	x,y,res;
+-
+-    x = 10;
+-    y = 123;
+-    res = __sync_sub_and_fetch(&y, x);
+-    if (res != y || y != 113) {
+-      return(1);
+-    }
+-    res = __sync_add_and_fetch(&y, x);
+-    if (res != y || y != 123) {
+-      return(1);
+-    }
+-    return(0);
+-  }"
+-  HAVE_IB_GCC_ATOMIC_BUILTINS_64
+-  )
+-  CHECK_C_SOURCE_RUNS(
+-  "#include<stdint.h>
+-  int main()
+-  {
+-    __sync_synchronize();
+-    return(0);
+-  }"
+-  HAVE_IB_GCC_SYNC_SYNCHRONISE
+-  )
+-  CHECK_C_SOURCE_RUNS(
+-  "#include<stdint.h>
+-  int main()
+-  {
+-    __atomic_thread_fence(__ATOMIC_ACQUIRE);
+-    __atomic_thread_fence(__ATOMIC_RELEASE);
+-    return(0);
+-  }"
+-  HAVE_IB_GCC_ATOMIC_THREAD_FENCE
+-  )
+-ENDIF()
++
++# workaround for gcc 4.1.2 RHEL5/x86, gcc atomic ops only work under -march=i686
++IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND
++   CMAKE_C_COMPILER_VERSION VERSION_LESS "4.1.3")
++  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
++  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=i686")
++ENDIF()
++CHECK_C_SOURCE_COMPILES(
++"
++int main()
++{
++  long	x;
++  long	y;
++  long	res;
++
++  x = 10;
++  y = 123;
++  res = __sync_bool_compare_and_swap(&x, x, y);
++  if (!res || x != y) {
++    return(1);
++  }
++
++  x = 10;
++  y = 123;
++  res = __sync_bool_compare_and_swap(&x, x + 1, y);
++  if (res || x != 10) {
++    return(1);
++  }
++  x = 10;
++  y = 123;
++  res = __sync_add_and_fetch(&x, y);
++  if (res != 123 + 10 || x != 123 + 10) {
++    return(1);
++  }
++  return(0);
++}"
++HAVE_IB_GCC_ATOMIC_BUILTINS
++)
++CHECK_C_SOURCE_COMPILES(
++"
++int main()
++{
++  long	res;
++  char	c;
++
++  c = 10;
++  res = __sync_lock_test_and_set(&c, 123);
++  if (res != 10 || c != 123) {
++    return(1);
++  }
++  return(0);
++}"
++HAVE_IB_GCC_ATOMIC_BUILTINS_BYTE
++)
++CHECK_C_SOURCE_COMPILES(
++"#include<stdint.h>
++int main()
++{
++  int64_t	x,y,res;
++
++  x = 10;
++  y = 123;
++  res = __sync_sub_and_fetch(&y, x);
++  if (res != y || y != 113) {
++    return(1);
++  }
++  res = __sync_add_and_fetch(&y, x);
++  if (res != y || y != 123) {
++    return(1);
++  }
++  return(0);
++}"
++HAVE_IB_GCC_ATOMIC_BUILTINS_64
++)
++CHECK_C_SOURCE_COMPILES(
++"#include<stdint.h>
++int main()
++{
++  __sync_synchronize();
++  return(0);
++}"
++HAVE_IB_GCC_SYNC_SYNCHRONISE
++)
++CHECK_C_SOURCE_COMPILES(
++"#include<stdint.h>
++int main()
++{
++  __atomic_thread_fence(__ATOMIC_ACQUIRE);
++  __atomic_thread_fence(__ATOMIC_RELEASE);
++return(0);
++}"
++HAVE_IB_GCC_ATOMIC_THREAD_FENCE
++)
+ 
+ IF(HAVE_IB_GCC_ATOMIC_BUILTINS)
+  ADD_DEFINITIONS(-DHAVE_IB_GCC_ATOMIC_BUILTINS=1)
+@@ -173,28 +172,26 @@
+  ADD_DEFINITIONS(-DHAVE_IB_GCC_ATOMIC_THREAD_FENCE=1)
+ ENDIF()
+ 
+- # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
+-IF(NOT CMAKE_CROSSCOMPILING)
+-  CHECK_C_SOURCE_RUNS(
+-  "
+-  #include <pthread.h>
+-  #include <string.h>
+-
+-  int main() {
+-    pthread_t       x1;
+-    pthread_t       x2;
+-    pthread_t       x3;
+-
+-    memset(&x1, 0x0, sizeof(x1));
+-    memset(&x2, 0x0, sizeof(x2));
+-    memset(&x3, 0x0, sizeof(x3));
+-
+-    __sync_bool_compare_and_swap(&x1, x2, x3);
+-
+-    return(0);
+-  }"
+-  HAVE_IB_ATOMIC_PTHREAD_T_GCC)
+-ENDIF()
++# either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
++CHECK_C_SOURCE_COMPILES(
++"
++#include <pthread.h>
++#include <string.h>
++
++int main() {
++  pthread_t       x1;
++  pthread_t       x2;
++  pthread_t       x3;
++
++  memset(&x1, 0x0, sizeof(x1));
++  memset(&x2, 0x0, sizeof(x2));
++  memset(&x3, 0x0, sizeof(x3));
++  __sync_bool_compare_and_swap(&x1, x2, x3);
++
++  return(0);
++}"
++HAVE_IB_ATOMIC_PTHREAD_T_GCC)
++
+ IF(HAVE_IB_ATOMIC_PTHREAD_T_GCC)
+   ADD_DEFINITIONS(-DHAVE_IB_ATOMIC_PTHREAD_T_GCC=1)
+ ENDIF()
diff --git a/package/mysql/Config.in b/package/mysql/Config.in
index 7133892..a1a2d23 100644
--- a/package/mysql/Config.in
+++ b/package/mysql/Config.in
@@ -1,8 +1,17 @@
 config BR2_PACKAGE_MYSQL
+	bool "mysql"
+
+if BR2_PACKAGE_MYSQL
+choice
+	prompt "MySQL database system implementation"
+	default MYSQL_MYSQL
+
+config MYSQL_MYSQL
 	bool "MySQL"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU
 	select BR2_PACKAGE_NCURSES
 	select BR2_PACKAGE_READLINE
 	help
@@ -10,7 +19,35 @@ config BR2_PACKAGE_MYSQL
 
 	  http://www.mysql.com/
 
-if BR2_PACKAGE_MYSQL
+config MYSQL_MARIADB_GALERA
+	bool "mariadb-galera"
+	select BR2_PACKAGE_NCURSES
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_LIBAIO
+	select BR2_PACKAGE_LIBTOOL
+	select BR2_PACKAGE_GALERA
+	select BR2_PACKAGE_BASH # runtime dependency only
+	select BR2_PACKAGE_LSOF # runtime dependency only
+	select BR2_PACKAGE_PROCPS_NG # runtime dependency only
+	select BR2_PACKAGE_FINDUTILS # runtime dependency only
+	select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+	depends on BR2_TOOLCHAIN_BUILDROOT_GLIBC || BR2_PACKAGE_EGLIBC # spawn()
+	help
+	  MariaDB Galera Cluster.
+	  https://mariadb.com/kb/en/mariadb/what-is-mariadb-galera-cluster
+
+endchoice
+
+endif
+
+comment "MySQL needs a toolchain w/ C++, threads"
+depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "MariaDB needs an (e)glibc toolchain"
+depends on !BR2_TOOLCHAIN_BUILDROOT_GLIBC && !BR2_PACKAGE_EGLIBC # spawn()
+
+if MYSQL_MYSQL
 
 config BR2_PACKAGE_MYSQL_SERVER
 	bool "MySQL server"
@@ -18,7 +55,3 @@ config BR2_PACKAGE_MYSQL_SERVER
 	  Install the MySQL server on the target.
 
 endif
-
-comment "MySQL needs a toolchain w/ C++, threads"
-	depends on BR2_USE_MMU
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/mysql/mariadb-galera-cluster.cnf b/package/mysql/mariadb-galera-cluster.cnf
new file mode 100644
index 0000000..c3eddaa
--- /dev/null
+++ b/package/mysql/mariadb-galera-cluster.cnf
@@ -0,0 +1,204 @@
+# MariaDB database server configuration file.
+#
+# You can copy this file to one of:
+# - "/etc/mysql/my.cnf" to set global options,
+# - "~/.my.cnf" to set user-specific options.
+# 
+# One can use all long options that the program supports.
+# Run program with --help to get a list of available options and with
+# --print-defaults to see which it would actually understand and use.
+#
+# For explanations see
+# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
+
+# This will be passed to all mysql clients
+# It has been reported that passwords should be enclosed with ticks/quotes
+# escpecially if they contain "#" chars...
+# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
+[client]
+port		= 3306
+socket		= /tmp/mysql.sock
+
+# Here is entries for some specific programs
+# The following values assume you have at least 32M ram
+
+# This was formally known as [safe_mysqld]. Both versions are currently parsed.
+[mysqld_safe]
+socket		= /tmp/mysql.sock
+nice		= 0
+
+[mysqld]
+#
+# * Basic Settings
+#
+user		= mysql
+pid-file	= /tmp/mysql.pid
+socket		= /tmp/mysql.sock
+port		= 3306
+basedir		= /usr
+datadir		= /var/lib/mysql
+tmpdir		= /tmp
+lc_messages_dir	= /usr/share/
+lc_messages	= en_US
+skip-external-locking
+
+# Don't use DNS as it may not be available
+skip-host-cache
+skip-name-resolve
+
+#
+# Instead of skip-networking the default is now to listen only on
+# localhost which is more compatible and is not less secure.
+#bind-address		= 127.0.0.1
+#
+# * Fine Tuning
+#
+max_connections		= 100
+connect_timeout		= 5
+wait_timeout		= 600
+max_allowed_packet	= 16M
+thread_cache_size       = 128
+sort_buffer_size	= 4M
+bulk_insert_buffer_size	= 16M
+tmp_table_size		= 32M
+max_heap_table_size	= 32M
+#
+# * MyISAM
+#
+# This replaces the startup script and checks MyISAM tables if needed
+# the first time they are touched. On error, make copy and try a repair.
+myisam_recover          = BACKUP
+key_buffer_size		= 64M
+#open-files-limit	= 2000
+table_open_cache	= 400
+myisam_sort_buffer_size	= 64M
+concurrent_insert	= 2
+read_buffer_size	= 2M
+read_rnd_buffer_size	= 1M
+#
+# * Query Cache Configuration
+#
+# Cache only tiny result sets, so we can fit more in the query cache.
+query_cache_limit		= 128K
+query_cache_size		= 16M
+# for more write intensive setups, set to DEMAND or OFF
+#query_cache_type		= DEMAND
+#
+# * Logging and Replication
+#
+# Both location gets rotated by the cronjob.
+# Be aware that this log type is a performance killer.
+# As of 5.1 you can enable the log at runtime!
+#general_log_file        = /var/lib/mysql/mysql.log
+#general_log             = 1
+#
+# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
+#
+# we do want to know about network errors and such
+log_warnings		= 2
+#
+# Enable the slow query log to see queries with especially long duration
+#slow_query_log[={0|1}]
+slow_query_log_file	= /var/lib/mysql/mariadb-slow.log
+long_query_time = 10
+#log_slow_rate_limit	= 1000
+log_slow_verbosity	= query_plan
+
+#log-queries-not-using-indexes
+#log_slow_admin_statements
+#
+# The following can be used as easy to replay backup logs or for replication.
+# note: if you are setting up a replication slave, see README.Debian about
+#       other settings you may need to change.
+#server-id		= 1
+#report_host		= master1
+#auto_increment_increment = 2
+#auto_increment_offset	= 1
+log_bin			= /var/lib/mysql/mariadb-bin
+log_bin_index		= /var/lib/mysql/mariadb-bin.index
+# not fab for performance, but safer
+#sync_binlog		= 1
+expire_logs_days	= 10
+max_binlog_size         = 100M
+# slaves
+#relay_log		= /var/lib/mysql/relay-bin
+#relay_log_index	= /var/lib/mysql/relay-bin.index
+#relay_log_info_file	= /var/lib/mysql/relay-bin.info
+#log_slave_updates
+#read_only
+#
+# If applications support it, this stricter sql_mode prevents some
+# mistakes like inserting invalid dates etc.
+#sql_mode		= NO_ENGINE_SUBSTITUTION,TRADITIONAL
+#
+# * InnoDB
+#
+# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
+# Read the manual for more InnoDB related options. There are many!
+default_storage_engine	= InnoDB
+# you can't just change log file size, requires special procedure
+#innodb_log_file_size	= 50M
+innodb_buffer_pool_size	= 64M
+innodb_log_buffer_size	= 8M
+innodb_file_per_table	= 1
+innodb_open_files	= 400
+innodb_io_capacity	= 400
+innodb_flush_method	= O_DIRECT
+#
+# * Security Features
+#
+# Read the manual, too, if you want chroot!
+# chroot = /var/lib/mysql/
+#
+# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
+#
+# ssl-ca=/etc/mysql/cacert.pem
+# ssl-cert=/etc/mysql/server-cert.pem
+# ssl-key=/etc/mysql/server-key.pem
+
+#
+# * Galera-related settings
+#
+
+[galera]
+# Mandatory settings
+
+# use InnoDB instead of XtraDB
+ignore_builtin_innodb
+innodb_autoinc_lock_mode=2
+innodb_doublewrite=1
+
+plugin_load=innodb=ha_innodb.so
+plugin_dir=/usr/lib/plugin
+
+wsrep_provider=/usr/lib/libgalera_smm.so
+binlog_format=row
+default_storage_engine=InnoDB
+
+query_cache_size=0 # mandatory only for versions prior to 5.5.40-galera, 10.0.14-galera and 10.1.2
+wsrep_on=ON        # Enable wsrep replication
+#wsrep_cluster_name=
+#wsrep_cluster_address=
+wsrep_sst_method=rsync
+
+#
+# Optional setting
+#wsrep_slave_threads=1
+#innodb_flush_log_at_trx_commit=0
+
+[mysqldump]
+quick
+quote-names
+max_allowed_packet	= 16M
+
+[mysql]
+#no-auto-rehash	# faster start of mysql but no tab completition
+
+[isamchk]
+key_buffer		= 16M
+
+#
+# * IMPORTANT: Additional settings that can override those from this file!
+#   The files must end with '.cnf', otherwise they'll be ignored.
+#
+!includedir /etc/mysql/conf.d/
diff --git a/package/mysql/mysql.hash b/package/mysql/mysql.hash
index 84f3361..d9f3574 100644
--- a/package/mysql/mysql.hash
+++ b/package/mysql/mysql.hash
@@ -1,2 +1,4 @@
 # From https://downloads.mariadb.com/archives/mysql-5.1/mysql-5.1.73.tar.gz.md5
 md5	887f869bcc757957067b9198f707f32f	mysql-5.1.73.tar.gz
+# From: https://downloads.mariadb.org/interstitial/mariadb-galera-10.0.17/source/mariadb-galera-10.0.17.tar.gz
+sha1	 91b70d19fb687a58f0e40f50608071489743e54e	mariadb-galera-10.0.17.tar.gz
diff --git a/package/mysql/mysql.mk b/package/mysql/mysql.mk
index 8718193..9abf50e 100644
--- a/package/mysql/mysql.mk
+++ b/package/mysql/mysql.mk
@@ -4,17 +4,24 @@
 #
 ################################################################################
 
-MYSQL_VERSION_MAJOR = 5.1
-MYSQL_VERSION = $(MYSQL_VERSION_MAJOR).73
-MYSQL_SOURCE = mysql-$(MYSQL_VERSION).tar.gz
-MYSQL_SITE = http://downloads.skysql.com/archives/mysql-$(MYSQL_VERSION_MAJOR)
-MYSQL_INSTALL_STAGING = YES
-MYSQL_DEPENDENCIES = readline ncurses
-MYSQL_AUTORECONF = YES
-MYSQL_LICENSE = GPLv2
-MYSQL_LICENSE_FILES = README COPYING
-
-MYSQL_CONF_ENV = \
+################################################################################
+#
+# mysql implementation
+#
+################################################################################
+
+
+MYSQL_MYSQL_VERSION_MAJOR = 5.1
+MYSQL_MYSQL_VERSION = $(MYSQL_MYSQL_VERSION_MAJOR).73
+MYSQL_MYSQL_SOURCE = mysql-$(MYSQL_MYSQL_VERSION).tar.gz
+MYSQL_MYSQL_SITE = http://downloads.skysql.com/archives/mysql-$(MYSQL_MYSQL_VERSION_MAJOR)
+MYSQL_MYSQL_INSTALL_STAGING = YES
+MYSQL_MYSQL_DEPENDENCIES = readline ncurses
+MYSQL_MYSQL_AUTORECONF = YES
+MYSQL_MYSQL_LICENSE = GPLv2
+MYSQL_MYSQL_LICENSE_FILES = README COPYING
+
+MYSQL_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" \
@@ -23,7 +30,7 @@ MYSQL_CONF_ENV = \
 	ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes \
 	mysql_cv_new_rl_interface=yes
 
-MYSQL_CONF_OPTS = \
+MYSQL_MYSQL_CONF_OPTS = \
 	--without-ndb-binlog \
 	--without-docs \
 	--without-man \
@@ -34,22 +41,22 @@ MYSQL_CONF_OPTS = \
 	--disable-mysql-maintainer-mode
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
-MYSQL_DEPENDENCIES += openssl
+MYSQL_MYSQL_DEPENDENCIES += openssl
 endif
 
 ifeq ($(BR2_PACKAGE_ZLIB),y)
-MYSQL_DEPENDENCIES += zlib
+MYSQL_MYSQL_DEPENDENCIES += zlib
 endif
 
 ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y)
-MYSQL_DEPENDENCIES += host-mysql host-bison
-HOST_MYSQL_DEPENDENCIES = host-zlib host-ncurses
+MYSQL_MYSQL_DEPENDENCIES += host-mysql host-bison
+HOST_MYSQL_MYSQL_DEPENDENCIES = host-zlib host-ncurses
 
-HOST_MYSQL_CONF_OPTS = \
+HOST_MYSQL_MYSQL_CONF_OPTS = \
 	--with-embedded-server \
 	--disable-mysql-maintainer-mode
 
-MYSQL_CONF_OPTS += \
+MYSQL_MYSQL_CONF_OPTS += \
 	--localstatedir=/var/mysql \
 	--with-atomic-ops=up \
 	--with-embedded-server \
@@ -69,12 +76,12 @@ MYSQL_CONF_OPTS += \
 # Debugging is only available for the server, so no need for
 # this if-block outside of the server if-block
 ifeq ($(BR2_ENABLE_DEBUG),y)
-MYSQL_CONF_OPTS += --with-debug=full
+MYSQL_MYSQL_CONF_OPTS += --with-debug=full
 else
-MYSQL_CONF_OPTS += --without-debug
+MYSQL_MYSQL_CONF_OPTS += --without-debug
 endif
 
-define HOST_MYSQL_BUILD_CMDS
+define HOST_MYSQL_MYSQL_BUILD_CMDS
 	$(MAKE) -C $(@D)/include my_config.h
 	$(MAKE) -C $(@D)/mysys libmysys.a
 	$(MAKE) -C $(@D)/strings libmystrings.a
@@ -84,41 +91,188 @@ define HOST_MYSQL_BUILD_CMDS
 	$(MAKE) -C $(@D)/sql gen_lex_hash
 endef
 
-define HOST_MYSQL_INSTALL_CMDS
+define HOST_MYSQL_MYSQL_INSTALL_CMDS
 	$(INSTALL) -m 0755  $(@D)/sql/gen_lex_hash  $(HOST_DIR)/usr/bin/
 endef
 
-define MYSQL_USERS
+define MYSQL_MYSQL_USERS
 	mysql -1 nogroup -1 * /var/mysql - - MySQL daemon
 endef
 
-define MYSQL_ADD_FOLDER
+define MYSQL_MYSQL_ADD_FOLDER
 	$(INSTALL) -d $(TARGET_DIR)/var/mysql
 endef
 
-MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_FOLDER
+MYSQL_MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_FOLDER
 
-define MYSQL_INSTALL_INIT_SYSV
+define MYSQL_MYSQL_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 package/mysql/S97mysqld \
 		$(TARGET_DIR)/etc/init.d/S97mysqld
 endef
 
 else
-MYSQL_CONF_OPTS += \
+MYSQL_MYSQL_CONF_OPTS += \
 	--without-server
 endif
 
 
-define MYSQL_REMOVE_TEST_PROGS
+define MYSQL_MYSQL_REMOVE_TEST_PROGS
 	rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench
 endef
 
-define MYSQL_ADD_MYSQL_LIB_PATH
+define MYSQL_MYSQL_ADD_MYSQL_LIB_PATH
 	echo "/usr/lib/mysql" >> $(TARGET_DIR)/etc/ld.so.conf
 endef
 
-MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_REMOVE_TEST_PROGS
-MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_MYSQL_LIB_PATH
+MYSQL_MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_MYSQL_REMOVE_TEST_PROGS
+MYSQL_MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_MYSQL_ADD_MYSQL_LIB_PATH
+
+################################################################################
+#
+# mariadb galera cluster implementation
+#
+################################################################################
+
+# According to MariaDB galera cluster documentation these options must be passed
+# to CMake:
+MYSQL_MARIADB_GALERA_CLUSTER_OPTS += "-DWITH_WSREP=1"
+MYSQL_MARIADB_GALERA_CLUSTER_OPTS += "-DWITH_INNODB_DISALLOW_WRITES=1"
+
+# msgpack causes trouble when cross-compiling:
+MYSQL_MARIADB_GALERA_EXTRA_OPTS += "-DGRN_WITH_MESSAGE_PACK=no"
+
+# Mroonga needs libstemmer. Some work still needs to be done before it can be
+# included in buildroot. Disable it for now.
+MYSQL_MARIADB_GALERA_EXTRA_OPTS += "-DWITHOUT_MROONGA=1"
+
+# This value is determined automatically during straight compile by compiling
+# and running a test code. You cannot do that during cross-compile. However the 
+# stack grows downward in most if not all modern systems. The only exception I
+# am aware of is PA-RISC which is not supported by buildroot. Therefore it makes
+# sense to hardcode the value. If an arch is added the stack of which grows up
+# one should expect unpredictable behavior at run time.
+MYSQL_MARIADB_GALERA_EXTRA_OPTS += "-DSTACK_DIRECTION=-1"
+
+# XTRADB requires atomics intrinsic. MariaDB package tests for them by compiling
+# and running C code which is not possible when cross-compiling. It is probably
+# probably possible to use BR2_ARCH_HAS_ATOMIC_INTRINSICS instead of compiling
+# and running some test code but for now we will just disable XTRADB.
+MYSQL_MARIADB_GALERA_EXTRA_OPTS += "-DWITHOUT_XTRADB=1"
+
+# Jemalloc was added for TokuDB. Since its configure script seems somewhat broken
+# when it comes to cross-compilation we shall disable it and also disable TokuDB.
+MYSQL_MARIADB_GALERA_EXTRA_OPTS += "-DWITH_JEMALLOC=no -DWITHOUT_TOKUDB=1"
+
+MYSQL_MARIADB_GALERA_VERSION = 10.0.17
+MYSQL_MARIADB_GALERA_SOURCE = mariadb-galera-$(MYSQL_MARIADB_GALERA_VERSION).tar.gz
+MYSQL_MARIADB_GALERA_SITE = https://downloads.mariadb.org/interstitial/mariadb-galera-$(MYSQL_MARIADB_GALERA_VERSION)/source/
+
+# In order to cross-compile mariadb galera cluster one should first natively
+# build in order to use some of the generated executables. They are then
+# included by import_executables.cmake which is generated during the native
+# build. Therefore host-mariadb-galera needs to be added to mariadb galera
+# dependencies and
+# -DIMPORT_EXECUTABLES=$(BUILD_DIR)/host-mariadb-galera/import_executables.cmake
+# must be passed to cmake
+MYSQL_MARIADB_GALERA_TARGET_BUILD_IMPORT += "-DIMPORT_EXECUTABLES=$(HOST_MYSQL_DIR)/import_executables.cmake"
+
+
+MYSQL_MARIADB_GALERA_INSTALL_STAGING = NO
+MYSQL_MARIADB_GALERA_INSTALL_TARGET = YES
+
+MYSQL_MARIADB_GALERA_DEPENDENCIES = \
+	host-mysql \
+	ncurses \
+	openssl \
+	zlib \
+	libaio \
+	libtool \
+	galera
+
+MYSQL_MARIADB_GALERA_CONF_OPTS = $(MYSQL_MARIADB_GALERA_EXTRA_OPTS)
+MYSQL_MARIADB_GALERA_CONF_OPTS += $(MYSQL_MARIADB_GALERA_TARGET_BUILD_IMPORT)
+HOST_MYSQL_MARIADB_GALERA_CONF_OPTS = $(MYSQL_MARIADB_GALERA_EXTRA_OPTS)
+
+# Options specific to Galera cluster
+MYSQL_MARIADB_GALERA_CONF_OPTS += $(MYSQL_MARIADB_GALERA_CLUSTER_OPTS)
+HOST_MYSQL_MARIADB_GALERA_CONF_OPTS += $(MYSQL_MARIADB_GALERA_CLUSTER_OPTS)
+
+# Post install configuration
+
+define MYSQL_MARIADB_GALERA_USERS
+	mysql 1000 mysql 1000 * /var/lib/mysql - - MySQL Server
+endef
+
+define MYSQL_MARIADB_GALERA_INSTALL_CNF
+	mkdir -p $(TARGET_DIR)/etc/mysql/conf.d
+	install -m 644 package/mysql/mariadb-galera-cluster.cnf $(TARGET_DIR)/etc/mysql/my.cnf
+endef
+
+MYSQL_MARIADB_GALERA_POST_INSTALL_TARGET_HOOKS += MYSQL_MARIADB_GALERA_INSTALL_CNF
 
+define MYSQL_MARIADB_GALERA_INSTALL_INIT_SYSV
+	$(INSTALL) -D -m 0755 $(@D)/support-files/mysql.server.sh \
+		$(TARGET_DIR)/etc/init.d/mysqld
+endef
+
+# generic options
+
+MYSQL_MARIADB_GALERA_AUTORECONF = NO
+MYSQL_MARIADB_GALERA_LICENSE = GPLv2
+MYSQL_MARIADB_GALERA_LICENSE_FILES = README COPYING COPYING.LESSER
+
+################################################################################
+#
+# meta package
+#
+################################################################################
+
+
+ifeq ($(MYSQL_MYSQL),y)
+	MYSQL_VERSION = $(MYSQL_MYSQL_VERSION)
+	MYSQL_SOURCE = $(MYSQL_MYSQL_SOURCE)
+	MYSQL_SITE = $(MYSQL_MYSQL_SITE)
+	MYSQL_INSTALL_STAGING = $(MYSQL_MYSQL_INSTALL_STAGING)
+	MYSQL_DEPENDENCIES = $(MYSQL_MYSQL_DEPENDENCIES)
+	MYSQL_AUTORECONF = $(MYSQL_MYSQL_AUTORECONF)
+	MYSQL_LICENSE = $(MYSQL_MYSQL_LICENSE)
+	MYSQL_LICENSE_FILES = $(MYSQL_MYSQL_LICENSE_FILES)
+	MYSQL_CONF_ENV = $(MYSQL_MYSQL_CONF_ENV)
+	MYSQL_CONF_OPTS = $(MYSQL_MYSQL_CONF_OPTS)
+
+	MYSQL_USERS = $(MYSQL_MYSQL_USERS)
+	MYSQL_POST_INSTALL_TARGET_HOOKS += $(MYSQL_MYSQL_POST_INSTALL_TARGET_HOOKS)
+
+	MYSQL_INSTALL_INIT_SYSV = $(MYSQL_MYSQL_INSTALL_INIT_SYSV)
+
+	HOST_MYSQL_DEPENDENCIES = $(HOST_MYSQL_MYSQL_DEPENDENCIES)
+	HOST_MYSQL_CONF_OPTS = $(HOST_MYSQL_MYSQL_CONF_OPTS)
+	HOST_MYSQL_BUILD_CMDS = $(HOST_MYSQL_MYSQL_BUILD_CMDS)
+	HOST_MYSQL_INSTALL_CMDS = $(HOST_MYSQL_MYSQL_INSTALL_CMDS)
+else ifeq ($(MYSQL_MARIADB_GALERA),y)
+	MYSQL_VERSION = $(MYSQL_MARIADB_GALERA_VERSION)
+	MYSQL_SOURCE = $(MYSQL_MARIADB_GALERA_SOURCE)
+	MYSQL_SITE = $(MYSQL_MARIADB_GALERA_SITE)
+	MYSQL_INSTALL_STAGING = $(MYSQL_MARIADB_GALERA_INSTALL_STAGING)
+	MYSQL_DEPENDENCIES = $(MYSQL_MARIADB_GALERA_DEPENDENCIES)
+	MYSQL_AUTORECONF = $(MYSQL_MARIADB_GALERA_AUTORECONF)
+	MYSQL_LICENSE = $(MYSQL_MARIADB_GALERA_LICENSE)
+	MYSQL_LICENSE_FILES = $(MYSQL_MARIADB_GALERA_LICENSE_FILES)
+	MYSQL_CONF_OPTS = $(MYSQL_MARIADB_GALERA_CONF_OPTS)
+
+	MYSQL_USERS = $(MYSQL_MARIADB_GALERA_USERS)
+	MYSQL_POST_INSTALL_TARGET_HOOKS += $(MYSQL_MARIADB_GALERA_POST_INSTALL_TARGET_HOOKS)
+
+	MYSQL_INSTALL_INIT_SYSV = $(MYSQL_MARIADB_GALERA_INSTALL_INIT_SYSV)
+
+	HOST_MYSQL_DEPENDENCIES = $(HOST_MYSQL_MARIADB_GALERA_DEPENDENCIES)
+	HOST_MYSQL_CONF_OPTS = $(HOST_MYSQL_MARIADB_GALERA_CONF_OPTS)
+endif
+
+ifeq ($(MYSQL_MYSQL),y)
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
+else ifeq ($(MYSQL_MARIADB_GALERA),y)
+$(eval $(host-cmake-package))
+$(eval $(cmake-package))
+endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/7] Add package check: unit test library
  2015-07-03 13:11 ` [Buildroot] [PATCH 1/7] Add package check: unit test library Sylvain Raybaud
@ 2015-07-03 18:34   ` Yann E. MORIN
  2015-07-04  9:08     ` Thomas Petazzoni
  2015-07-09 12:51     ` Sylvain Raybaud
  0 siblings, 2 replies; 17+ messages in thread
From: Yann E. MORIN @ 2015-07-03 18:34 UTC (permalink / raw)
  To: buildroot

Sylvian, All,

On 2015-07-03 15:11 +0200, Sylvain Raybaud spake thusly:
> Signed-off-by: Sylvain Raybaud <sylvain.raybaud@green-communications.fr>
[--SNIP--]
> diff --git a/package/check/Config.in b/package/check/Config.in
> new file mode 100644
> index 0000000..8e7e3bc
> --- /dev/null
> +++ b/package/check/Config.in
> @@ -0,0 +1,7 @@
> +config BR2_PACKAGE_HOST_CHECK
> +	bool "host check"

No, this is not 'host check', this is just 'check'.

This location is not about the host packages, but about the target
packages.

Besides, nothing in your series depends on host-check.

[--SNIP--]
> diff --git a/package/check/check.hash b/package/check/check.hash
> new file mode 100644
> index 0000000..7d7e19b
> --- /dev/null
> +++ b/package/check/check.hash
> @@ -0,0 +1,2 @@
> +# Hash from: http://downloads.sourceforge.net/project/check/check/check-0.9.14.tar.gz

Correct URL is:
    http://sourceforge.net/projects/check/files/check/0.9.14/

> +sha1	4b79e2d485d014ddb438e322b64235347d57b0ff	check-0.9.14.tar.gz

Manually checked the hash to be OK.

> diff --git a/package/check/check.mk b/package/check/check.mk
> new file mode 100644
> index 0000000..3c2021c
> --- /dev/null
> +++ b/package/check/check.mk
> @@ -0,0 +1,20 @@
> +################################################################################
> +#
> +# check
> +#
> +################################################################################
> +
> +CHECK_VERSION = 0.9.14
> +CHECK_SOURCE = check-$(CHECK_VERSION).tar.gz
> +CHECK_SITE = http://downloads.sourceforge.net/project/check/check/$(CHECK_VERSION)/
> +
> +CHECK_DEPENDENCIES = libtool pkgconf

This is probably host-pkgconf instead of pkgconf.

> +CHECK_INSTALL_STAGING = YES
> +CHECK_INSTALL_TARGET = NO

Why don't you install on the target? check installs a shared library by
default, so you really want to install in the target.

Otherwise, explain why you don't.

> +CHECK_LICENSE =  LGPLv2.1

This is "or any later version", so:

    CHECK_LICENSE =  LGPLv2.1+

> +CHECK_LICENSE_FILES = COPYING.LESSER
> +
> +$(eval $(autotools-package))
> +$(eval $(host-autotools-package))

As said above, nothing in this series depends on host-check, so why are
you adding a host variant?

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 2/7] Add rule to build host-libaio
  2015-07-03 13:11 ` [Buildroot] [PATCH 2/7] Add rule to build host-libaio Sylvain Raybaud
@ 2015-07-03 18:35   ` Yann E. MORIN
  0 siblings, 0 replies; 17+ messages in thread
From: Yann E. MORIN @ 2015-07-03 18:35 UTC (permalink / raw)
  To: buildroot

Sylvain, All,

On 2015-07-03 15:11 +0200, Sylvain Raybaud spake thusly:
> Signed-off-by: Sylvain Raybaud <sylvain.raybaud@green-communications.fr>
> ---
>  package/libaio/libaio.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/libaio/libaio.mk b/package/libaio/libaio.mk
> index 53ad7eb..55e2cc7 100644
> --- a/package/libaio/libaio.mk
> +++ b/package/libaio/libaio.mk
> @@ -24,3 +24,4 @@ define LIBAIO_INSTALL_TARGET_CMDS
>  endef
>  
>  $(eval $(generic-package))
> +$(eval $(host-generic-package))

You need to explain in the commit log why you need the host variant.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/7] Add package check: unit test library
  2015-07-03 18:34   ` Yann E. MORIN
@ 2015-07-04  9:08     ` Thomas Petazzoni
  2015-07-04 18:25       ` Yann E. MORIN
  2015-07-09 12:51     ` Sylvain Raybaud
  1 sibling, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2015-07-04  9:08 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Fri, 3 Jul 2015 20:34:34 +0200, Yann E. MORIN wrote:

> > --- /dev/null
> > +++ b/package/check/Config.in
> > @@ -0,0 +1,7 @@
> > +config BR2_PACKAGE_HOST_CHECK
> > +	bool "host check"
> 
> No, this is not 'host check', this is just 'check'.
> 
> This location is not about the host packages, but about the target
> packages.
> 
> Besides, nothing in your series depends on host-check.

See PATCH 3: there is check in GALERA_DEPENDENCIES, and there is a
host-galera package with no explicit HOST_GALERA_DEPENDENCIES. So
host-check is automatically part of HOST_GALERA_DEPENDENCIES.

However, I definitely agree that we don't need a Config.in menu for
host check, only for the target variant of it.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 5/7] Add fancy options to busybox sleep, like float arguments
  2015-07-03 13:11 ` [Buildroot] [PATCH 5/7] Add fancy options to busybox sleep, like float arguments Sylvain Raybaud
@ 2015-07-04  9:12   ` Thomas Petazzoni
  2015-07-09 12:16     ` Sylvain Raybaud
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2015-07-04  9:12 UTC (permalink / raw)
  To: buildroot

Dear Sylvain Raybaud,

On Fri,  3 Jul 2015 15:11:24 +0200, Sylvain Raybaud wrote:
> Signed-off-by: Sylvain Raybaud <sylvain.raybaud@green-communications.fr>
> ---
>  package/busybox/busybox.config | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/busybox/busybox.config b/package/busybox/busybox.config
> index 9d930d1..8d1d80a 100644
> --- a/package/busybox/busybox.config
> +++ b/package/busybox/busybox.config
> @@ -273,8 +273,8 @@ CONFIG_SHA256SUM=y
>  CONFIG_SHA512SUM=y
>  CONFIG_SHA3SUM=y
>  CONFIG_SLEEP=y
> -# CONFIG_FEATURE_FANCY_SLEEP is not set
> -# CONFIG_FEATURE_FLOAT_SLEEP is not set
> +CONFIG_FEATURE_FANCY_SLEEP=y
> +CONFIG_FEATURE_FLOAT_SLEEP=y
>  CONFIG_SORT=y
>  CONFIG_FEATURE_SORT_BIG=y
>  # CONFIG_SPLIT is not set

Can you include in the commit information about the size different of
the resulting Busybox binary before/after this patch?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster
  2015-07-03 13:11 [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Sylvain Raybaud
                   ` (6 preceding siblings ...)
  2015-07-03 13:11 ` [Buildroot] [PATCH 7/7] Propose mariadb galera cluster as an alternative to standard mysql implementation, inside msyql package Sylvain Raybaud
@ 2015-07-04  9:16 ` Thomas Petazzoni
  2015-07-09 10:42 ` Sylvain Raybaud
  8 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2015-07-04  9:16 UTC (permalink / raw)
  To: buildroot

Dear Sylvain Raybaud,

On Fri,  3 Jul 2015 15:11:19 +0200, Sylvain Raybaud wrote:

> Sylvain Raybaud (7):
>   Add package check: unit test library
>   Add rule to build host-libaio
>   Add package galera: wsrep provider for mysql and mariadb
>   Add PKG_CONFIG_* variables to help cmake find host-packages
>   Add fancy options to busybox sleep, like float arguments
>   Move mysql patches to version specific subdirectory
>   Propose mariadb galera cluster as an alternative to standard mysql
>     implementation, inside msyql package

For the commit title, we try to follow a convention of using:

	<package>: <what happens>

So your commit titles should rather be something like:

	check: new package
	libaio: add host variant
	galera: new package
	pkg-cmake: add PKG_CONFIG_* variables to help cmake find host packages
	busybox: adjust configuration to add fancy options to the sleep applet
	mysql: move patches into a version-specific subdirectory
	mysql: add mariadb variant

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/7] Add package check: unit test library
  2015-07-04  9:08     ` Thomas Petazzoni
@ 2015-07-04 18:25       ` Yann E. MORIN
  0 siblings, 0 replies; 17+ messages in thread
From: Yann E. MORIN @ 2015-07-04 18:25 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2015-07-04 11:08 +0200, Thomas Petazzoni spake thusly:
> On Fri, 3 Jul 2015 20:34:34 +0200, Yann E. MORIN wrote:
> > > --- /dev/null
> > > +++ b/package/check/Config.in
> > > @@ -0,0 +1,7 @@
> > > +config BR2_PACKAGE_HOST_CHECK
> > > +	bool "host check"
> > 
> > No, this is not 'host check', this is just 'check'.
> > 
> > This location is not about the host packages, but about the target
> > packages.
> > 
> > Besides, nothing in your series depends on host-check.
> 
> See PATCH 3: there is check in GALERA_DEPENDENCIES, and there is a
> host-galera package with no explicit HOST_GALERA_DEPENDENCIES. So
> host-check is automatically part of HOST_GALERA_DEPENDENCIES.

Ah, right. I saw the dependency on check, but did not think about the
automatically-inherited host dependency.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster
  2015-07-03 13:11 [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Sylvain Raybaud
                   ` (7 preceding siblings ...)
  2015-07-04  9:16 ` [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Thomas Petazzoni
@ 2015-07-09 10:42 ` Sylvain Raybaud
  8 siblings, 0 replies; 17+ messages in thread
From: Sylvain Raybaud @ 2015-07-09 10:42 UTC (permalink / raw)
  To: buildroot

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

Thanks for your feedback. I'm working now on v2.

Cheers,

Sylvain

On 03/07/2015 15:11, Sylvain Raybaud wrote:
> Add MariaDB Galera Cluster as an alternative implementation of
> MySQL, inside package/mysql. Also add galera which is needed for
> running a cluster and check on which galera depends. Introduce a
> few other minor modifications to busybox.config and libaio.mk
> necessary to make this work.
> 
> Sylvain Raybaud (7): Add package check: unit test library Add rule
> to build host-libaio Add package galera: wsrep provider for mysql
> and mariadb Add PKG_CONFIG_* variables to help cmake find
> host-packages Add fancy options to busybox sleep, like float
> arguments Move mysql patches to version specific subdirectory 
> Propose mariadb galera cluster as an alternative to standard mysql 
> implementation, inside msyql package
> 
> package/Config.in                                  |   2 + 
> package/busybox/busybox.config                     |   4 +- 
> package/check/Config.in                            |   7 + 
> package/check/check.hash                           |   2 + 
> package/check/check.mk                             |  20 ++ 
> package/galera/Config.in                           |   9 + 
> ...lera-01-fix_sconstruct_for-crosscompiling.patch |  52 +++++ 
> package/galera/galera.hash                         |   2 + 
> package/galera/galera.mk                           |  63 ++++++ 
> package/libaio/libaio.mk                           |   1 + 
> .../mariadb-galera-01-fix_xtradb_cmakelist.patch   |  27 +++ 
> .../mariadb-galera-02-fix_innodb_cmakelist.patch   | 251
> +++++++++++++++++++++ package/mysql/{ =>
> 5.1}/0000-ac_cache_check.patch  |   0 .../{ =>
> 5.1}/0001-configure-ps-cache-check.patch  |   0 .../{ =>
> 5.1}/0002-use-new-readline-iface.patch    |   0 
> .../0003-ac_stack_direction-is-unset.patch         |   0 
> .../0004-Fix-gen_lex_hash-execution.patch          |   0 
> .../0005-bison_3_breaks_mysql_server_build.patch   |   0 .../{ =>
> 5.1}/0006-no-force-static-build.patch     |   0 
> package/mysql/Config.in                            |  43 +++- 
> package/mysql/mariadb-galera-cluster.cnf           | 204
> +++++++++++++++++ package/mysql/mysql.hash
> |   2 + package/mysql/mysql.mk                             | 216
> +++++++++++++++--- package/pkg-cmake.mk
> |   2 + 24 files changed, 869 insertions(+), 38 deletions(-) create
> mode 100644 package/check/Config.in create mode 100644
> package/check/check.hash create mode 100644 package/check/check.mk 
> create mode 100644 package/galera/Config.in create mode 100644
> package/galera/galera-01-fix_sconstruct_for-crosscompiling.patch 
> create mode 100644 package/galera/galera.hash create mode 100644
> package/galera/galera.mk create mode 100644
> package/mysql/10.0.17/mariadb-galera-01-fix_xtradb_cmakelist.patch 
> create mode 100644
> package/mysql/10.0.17/mariadb-galera-02-fix_innodb_cmakelist.patch 
> rename package/mysql/{ => 5.1}/0000-ac_cache_check.patch (100%) 
> rename package/mysql/{ => 5.1}/0001-configure-ps-cache-check.patch
> (100%) rename package/mysql/{ =>
> 5.1}/0002-use-new-readline-iface.patch (100%) rename
> package/mysql/{ => 5.1}/0003-ac_stack_direction-is-unset.patch
> (100%) rename package/mysql/{ =>
> 5.1}/0004-Fix-gen_lex_hash-execution.patch (100%) rename
> package/mysql/{ =>
> 5.1}/0005-bison_3_breaks_mysql_server_build.patch (100%) rename
> package/mysql/{ => 5.1}/0006-no-force-static-build.patch (100%) 
> create mode 100644 package/mysql/mariadb-galera-cluster.cnf
> 

- -- 
Sylvain Raybaud
www.green-communications.fr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJVnk//AAoJEEkkwl4JtJ9yY6QP/is7LgHwpoAIdASFBJYs+FRg
e1EVRzB9NDBOitmWpAJCVIH8xmFMBKeq4TNsQTTXT0DE+95z9npwQ2uxmun+G5/I
SXShmcN1CM4JU9mRNsSJ45O9x6zCIG/YeXplgePKdIutef6pekbYCkGXcIqqD5/t
/WOHEmFIojuX+LjNuYih0fxKq4VQPrDudhbT/nxz0smFE+B0ci7RA6a4dJOhy4tx
hAq0VIJhPUoOyeM2xMWcChNHz+6pMGB29CJfccsJ99wcC9FvjDhSHDqwDWs8TuGu
YBuDLvrEzSsZ5dH8hO88eSN+eadPwHW1pJBTlxw3D6f1naknihdT4m5zf7Jo2Fic
MV8NOWigxE7+rJSK0k5DmyzZe+5EU6/k+0k72ZV2LfUZX+RgCTYyP5TLULS3lhF5
YSKtVhHcXVCxN8zd8QyB9H+8lGp9XZL7ml8Q95ahoM3Xt2hfCw2mLJ1RMMOdP5Af
Ilww0Bas0OGVc6jzRbaKE99HcBBamKCuGISBRSrjmPGSeoGFIEDZMZX0ocLu10zu
jfengk7WjVPSDCh5laiYggXVkii7zbF9I3ydNgmgw/oY5km1xNhsNWQ2J/oPhw8j
/xjDTqcTv9SyW1lmE+6nIsYCVN1fXWgYEPt5+OFWhQCHX91ynqHbeDx3WH1Ls4JR
xDG2zFEXKrbEpVwigMe5
=so17
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 5/7] Add fancy options to busybox sleep, like float arguments
  2015-07-04  9:12   ` Thomas Petazzoni
@ 2015-07-09 12:16     ` Sylvain Raybaud
  0 siblings, 0 replies; 17+ messages in thread
From: Sylvain Raybaud @ 2015-07-09 12:16 UTC (permalink / raw)
  To: buildroot

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thomas,

On 04/07/2015 11:12, Thomas Petazzoni wrote:
> Dear Sylvain Raybaud,
> 
> On Fri,  3 Jul 2015 15:11:24 +0200, Sylvain Raybaud wrote:
>> Signed-off-by: Sylvain Raybaud
>> <sylvain.raybaud@green-communications.fr> --- 
>> package/busybox/busybox.config | 4 ++-- 1 file changed, 2
>> insertions(+), 2 deletions(-)
>> 
>> diff --git a/package/busybox/busybox.config
>> b/package/busybox/busybox.config index 9d930d1..8d1d80a 100644 
>> --- a/package/busybox/busybox.config +++
>> b/package/busybox/busybox.config @@ -273,8 +273,8 @@
>> CONFIG_SHA256SUM=y CONFIG_SHA512SUM=y CONFIG_SHA3SUM=y 
>> CONFIG_SLEEP=y -# CONFIG_FEATURE_FANCY_SLEEP is not set -#
>> CONFIG_FEATURE_FLOAT_SLEEP is not set 
>> +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_FEATURE_FLOAT_SLEEP=y 
>> CONFIG_SORT=y CONFIG_FEATURE_SORT_BIG=y # CONFIG_SPLIT is not
>> set
> 
> Can you include in the commit information about the size different
> of the resulting Busybox binary before/after this patch?
> 
> Thanks a lot!
> 
> Thomas
> 

It seems to add 2748 bytes on i386 and 492 bytes on arm. Should I
mention the first only? both? Do you think 2748 is too heavy for
considering this patch for inclusion?

Cheers,

Sylvain

- -- 
Sylvain Raybaud
www.green-communications.fr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJVnmYgAAoJEEkkwl4JtJ9yOecP/3N/fwbgu/VaEK1er7NZ3qeC
70QfPJGJy5o6nL0WgO49xo6kKFzbsMv7s7o+Ee9ECh42JKKXjgz33Rkpl1E2rWzL
Vt/GONiLhxNt5JhnuPsHqWHUO+ZeFfDaFcrcwCF81IYwW6pLAS85eQW+3Vot0Wbz
I7LEPEd715voMlqdXAE+vDwVsLCUGqOJ5U+Rzfn3IGsJ4MhPpakQRkPPAfQ/LH+z
hrxyR2PWLNFUBiumrV90lilZlbOVWYREE2ox/qQGzmvvd6OILHVJLfGyLYEq7s/N
3I9x4++ci2hX10OHybp7GXQqO0FZRFgxEubNAezx8Hi3jpcmhDUg9EUAQcZK/TA3
znfAEiMi59LXCFuW9SMBlBbig5NHEeBIR/sRRLPr4X+LC7JatyGjF9+J4dz9GPxc
8p49OJD5JOu3JIrRIzmvDm+6j7doytXXrwE+9+Bc1MYWsX4SMAT4a3k40OteIr/M
GySCC8spupDKTe9hVb3ULvgfumYvKnJIbPQCQ252/Dc6hQ0n3D1Gr4q6axYCoRgx
ZobAkaDNpLpL30cCJWWrrBo1sHGXa9XVsGYa1Bv6YOnvZYzzDRbKXggBcZi0i071
cUBBc3bin27pNmY1N65goBSJhHQBh3Ahq4jY5kq9zhleZ2vTNI4wn454ZVoGcrdA
e8kTIiW/pb3zflQIVF41
=gNz5
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH 1/7] Add package check: unit test library
  2015-07-03 18:34   ` Yann E. MORIN
  2015-07-04  9:08     ` Thomas Petazzoni
@ 2015-07-09 12:51     ` Sylvain Raybaud
  1 sibling, 0 replies; 17+ messages in thread
From: Sylvain Raybaud @ 2015-07-09 12:51 UTC (permalink / raw)
  To: buildroot

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yann, all,

On 03/07/2015 20:34, Yann E. MORIN wrote:
>> diff --git a/package/check/check.hash b/package/check/check.hash
>>> new file mode 100644 index 0000000..7d7e19b --- /dev/null +++
>>> b/package/check/check.hash @@ -0,0 +1,2 @@ +# Hash from:
>>> http://downloads.sourceforge.net/project/check/check/check-0.9.14.tar.gz
>
>>> 
Correct URL is:
> http://sourceforge.net/projects/check/files/check/0.9.14/

The hash is actually locally computed, so I guess it's just:
# Locally computed:

>>> diff --git a/package/check/check.mk b/package/check/check.mk 
>>> [..] +CHECK_INSTALL_STAGING = YES +CHECK_INSTALL_TARGET = NO
> Why don't you install on the target? check installs a shared
> library by default, so you really want to install in the target.
> 
> Otherwise, explain why you don't.
> 

Ah, right. Since check is used to build binaries specifically for
testing in my use case (galera), I thought I'd save some space by not
installing on target. But you're right, it's a bad idea and I'll
remove these lines.

Cheers,

- -- 
Sylvain Raybaud
www.green-communications.fr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJVnm5kAAoJEEkkwl4JtJ9y66QP/2eT5UYOlpYXfN/UEo405082
SZ/QDNJv4m8FKLzuBNnRE5XQVIcHiNUmLJWqNrGbjeG+VnY+fbnAkZt3uPVSUY8O
u36Gs4H+3S1E7Pj6GQ0bQwz9Z4qTvIJuLTXdswtAv77Qv4uNjk5juJKrULUl8/j+
ssoBImlHY0nQVyP8xKOPlCNcrBWy8DfKQqKNkqLTvvIsqKE8gFNOsJPog9HrL56T
XRjTTK5VpXc6MuXWhd82AGTcng5S/3OBBJYN/8lTexNRdCF9y0haSyUR2MjDtb0y
LXyTm0fieaLwHfSqSUn+F/8YFN7P9wNZaWQcIlvznWFLZvhHNxUITuI1fWbNbAKY
ftIhq3RsZr2SFSj358i9GhSg50wGtWQ4HjwyZocG1nLPm2+SM+MtF7lbVQQtVc7U
jgXX6QxCd3UcgCCcOmN/XQV8H+mf96b9H76ArsG2W/TZYxBKArPnyNFmFIqMsH8G
Irih1lYrcDqpkmFripWtcdFnPjUAxUG1U01WnwGDKrvH3KE5b/YBDHfeorHjTYDs
nD4MYFnrqfOt+rpmt4np3BIXkUuTOYbQlfsB8IKdBQZF33O6U50jA+psiGJRmgkc
Z/awGe+L35kD7F1KV7fjyG5SeBFC9I8W4b1nTrG3Ww98k6Lsp4Osc+Rs48X5793l
4YLfcTO8MmMhSrXCLg7a
=DQZa
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-07-09 12:51 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-03 13:11 [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Sylvain Raybaud
2015-07-03 13:11 ` [Buildroot] [PATCH 1/7] Add package check: unit test library Sylvain Raybaud
2015-07-03 18:34   ` Yann E. MORIN
2015-07-04  9:08     ` Thomas Petazzoni
2015-07-04 18:25       ` Yann E. MORIN
2015-07-09 12:51     ` Sylvain Raybaud
2015-07-03 13:11 ` [Buildroot] [PATCH 2/7] Add rule to build host-libaio Sylvain Raybaud
2015-07-03 18:35   ` Yann E. MORIN
2015-07-03 13:11 ` [Buildroot] [PATCH 3/7] Add package galera: wsrep provider for mysql and mariadb Sylvain Raybaud
2015-07-03 13:11 ` [Buildroot] [PATCH 4/7] Add PKG_CONFIG_* variables to help cmake find host-packages Sylvain Raybaud
2015-07-03 13:11 ` [Buildroot] [PATCH 5/7] Add fancy options to busybox sleep, like float arguments Sylvain Raybaud
2015-07-04  9:12   ` Thomas Petazzoni
2015-07-09 12:16     ` Sylvain Raybaud
2015-07-03 13:11 ` [Buildroot] [PATCH 6/7] Move mysql patches to version specific subdirectory Sylvain Raybaud
2015-07-03 13:11 ` [Buildroot] [PATCH 7/7] Propose mariadb galera cluster as an alternative to standard mysql implementation, inside msyql package Sylvain Raybaud
2015-07-04  9:16 ` [Buildroot] [PATCH 0/7] Set of patches to add MariaDB galera cluster Thomas Petazzoni
2015-07-09 10:42 ` Sylvain Raybaud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox