rename the patches so they have a number
PATCH 2/3 rename the patches so they have a number
Rename patches to add sequence numbers
---
.../{mysql-ac_cache_check.patch => mysql-0000-ac_cache_check.patch} | 0
...-ps-cache-check.patch => mysql-0001-configure-ps-cache-check.patch} | 0
...ew-readline-iface.patch => mysql-0002-use-new-readline-iface.patch} | 0
3 files changed, 0 insertions(+), 0 deletions(-)
rename package/mysql/{mysql-ac_cache_check.patch => mysql-0000-ac_cache_check.patch} (100%)
rename package/mysql/{mysql-configure-ps-cache-check.patch => mysql-0001-configure-ps-cache-check.patch} (100%)
rename package/mysql/{mysql-use-new-readline-iface.patch => mysql-0002-use-new-readline-iface.patch} (100%)package/mysql/mysql-0000-ac_cache_check.patch renamed from package/mysql/mysql-ac_cache_check.patch +0 -0
package/mysql/mysql-0001-configure-ps-cache-check.patch renamed from package/mysql/mysql-configure-ps-cache-check.patch +0 -0
package/mysql/mysql-0002-use-new-readline-iface.patch renamed from package/mysql/mysql-use-new-readline-iface.patch +0 -0
Signature · 1 line
1.7.10.4
PATCH v3 3/3 add support for building the server
Add support for building MySQL
---
Changes v2 -> v3:
- rename field <number> in the patch file name
- update new options postion
- update description to Makefile
- update Config.in
Changes v1 -> v2:
- fix comments following new policy
- rename patches
- remove useless hook points
- add the URL to the home of MySQL
- add commit-log description to the patches
- install host tools to $(HOST_DIR)/usr/bin
- fix only builds the required program
package/mysql/Config.in | 7 +++ .../mysql-0003-ac_stack_direction-is-unset.patch | 15 ++++++ .../mysql-0004-Fix-gen_lex_hash-execution.patch | 32 +++++++++++++ package/mysql/mysql.mk | 48 +++++++++++++++++++- 4 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 package/mysql/mysql-0003-ac_stack_direction-is-unset.patch create mode 100644 package/mysql/mysql-0004-Fix-gen_lex_hash-execution.patch
package/mysql/Config.in +7 -0
@@ -12,3 +12,10 @@ config BR2_PACKAGE_MYSQL comment "MySQL needs a toolchain w/ C++, threads" depends on BR2_USE_MMU depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +if BR2_PACKAGE_MYSQL + +config BR2_PACKAGE_MYSQL_SERVER + bool "MySQL server" + +endif
package/mysql/mysql-0003-ac_stack_direction-is-unset.patch new file +15 -0
@@ -0,0 +1,15 @@ +misc.m4: ac_cv_c_stack_direction is unset. + +Signed-off-by: Marcelo Gutierrez (UTN/FRH) <[email protected]> + +--- mysql-5.1.70.orig/config/ac-macros/misc.m4 ++++ mysql-5.1.70/config/ac-macros/misc.m4 +@@ -477,7 +477,7 @@ + exit(ptr_f(&a) < 0); + } + ], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1, +- ac_cv_c_stack_direction=)]) ++ ac_cv_c_stack_direction=0)]) + AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) + ])dnl +
package/mysql/mysql-0004-Fix-gen_lex_hash-execution.patch new file +32 -0
@@ -0,0 +1,32 @@ +Makefile: fix cross-compiling the server + +MySQL Makefile believes it can run code it just compiled, to +generate a header. This does not work for cross-compilation. + +Instead, use a pre-installed host-version of the required tool. + +Signed-off-by: Marcelo Gutierrez (UTN/FRH) <[email protected]> + +--- mysql-5.1.70/sql/Makefile.am ++++ mysql-5.1.70.patch/sql/Makefile.am +@@ -177,7 +177,7 @@ + # this avoid the rebuild of the built files in a source dist + lex_hash.h: gen_lex_hash.cc lex.h + $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT) +- ./gen_lex_hash$(EXEEXT) > $@-t ++ gen_lex_hash$(EXEEXT) > $@-t + $(MV) $@-t $@ + + # For testing of udf_example.so + +--- mysql-5.1.70/sql/Makefile.in ++++ mysql-5.1.70.patch/sql/Makefile.in +@@ -1310,7 +1310,7 @@ + # this avoid the rebuild of the built files in a source dist + lex_hash.h: gen_lex_hash.cc lex.h + $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT) +- ./gen_lex_hash$(EXEEXT) > $@-t ++ gen_lex_hash$(EXEEXT) > $@-t + $(MV) $@-t $@ + + # We might have some stuff not built in this build, but that we want to install
package/mysql/mysql.mk +47 -1
66 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH v3 3/3 add support for building the server
Marcelo, All,
Subject should have been something like:
mysql: add option to build the server
On 2014-01-21 14:10 +0000, Marcelo Guti?rrez spake thusly:
Quoted 3 lines
Add support for building MySQL
Signed-off-by Marcelo Guti?rrez <[email protected]>
Still a few comments...
[--SNIP--]
package/mysql/Config.in config BR2_PACKAGE_MYSQL · line 19
Quoted 13 lines
package/mysql/Config.in +5
-0@@ -12,3 +12,10 @@ config BR2_PACKAGE_MYSQL comment "MySQL needs a toolchain w/ C++, threads" depends on BR2_USE_MMU depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +if BR2_PACKAGE_MYSQL + +config BR2_PACKAGE_MYSQL_SERVER + bool "MySQL server"
Leading tab, not spaces.
Maybe add a bit of help here:
help
Install the MySQL server on the target.
[--SNIP--]
Quoted 5 lines
package/mysql/mysql.mk +0
-0
package/mysql/mysql.mk MYSQL_AUTORECONF = YES · line 23
Quoted 10 lines
package/mysql/mysql.mk +7
-0@@ -14,6 +14,15 @@ MYSQL_AUTORECONF = YES MYSQL_LICENSE = GPLv2 MYSQL_LICENSE_FILES = README COPYING +ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y) +MYSQL_DEPENDENCIES += host-mysql +HOST_MYSQL_DEPENDENCIES = + +HOST_MYSQL_CONF_OPT = \ + --with-embedded-server +endif
Maybe this ifeq-block can be moved in the other one, below?
I noticed that you enable the server with: --with-embedded-server but you disable it with: --without-server
There is a mismatch between the --with and the --without options. Is that normal?
Quoted 12 lines
package/mysql/mysql.mk +0
-1MYSQL_CONF_ENV = \ ac_cv_sys_restartable_syscalls=yes \ ac_cv_path_PS=/bin/ps \@@ -25,7 +34,6 @@ MYSQL_CONF_ENV = \ MYSQL_CONF_OPT = \ --without-ndb-binlog \ - --without-server \ --without-docs \ --without-man \ --without-libedit \
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 46
Quoted 5 lines
package/mysql/mysql.mk +2
-0@@ -34,6 +42,44 @@ MYSQL_CONF_OPT = \ --enable-thread-safe-client \ $(ENABLE_DEBUG) +ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y) + MYSQL_CONF_OPT += \
No indentation on that first line.
Quoted 5 lines
package/mysql/mysql.mk +5
-0+ --disable-dependency-tracking \ + --with-atomic-ops=up \ + --with-embedded-server \ + --without-query-cache \ + --without-plugin-partition \
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 61
Quoted 10 lines
package/mysql/mysql.mk +10
-0+ --without-plugin-daemon_example \ + --without-plugin-ftexample \ + --without-plugin-archive \ + --without-plugin-blackhole \ + --without-plugin-example \ + --without-plugin-federated \ + --without-plugin-ibmdb2i \ + --without-plugin-innobase \ + --without-plugin-innodb_plugin \ + --without-plugin-ndbcluster
We usually indent with one tab in continuation lines.
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 70
Quoted 8 lines
package/mysql/mysql.mk +8
-0+define HOST_MYSQL_BUILD_CMDS + $(MAKE) -C $(@D)/include my_config.h + $(MAKE) -C $(@D)/mysys libmysys.a + $(MAKE) -C $(@D)/strings libmystrings.a + $(MAKE) -C $(@D)/vio libvio.a + $(MAKE) -C $(@D)/dbug libdbug.a + $(MAKE) -C $(@D)/regex libregex.a + $(MAKE) -C $(@D)/sql gen_lex_hash
These should be indented with a tab, not spaces.
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 70
Quoted 1 line
package/mysql/mysql.mk +1
-0+endef
Hmmm... When I suggested we only build the required stuff, I did not expect this would amount to so many single-line calls.
I wonder if it is worth keeping this. So, is it much faster to only build the above, compared to building everything? If so, we just keep the above lines, otherwise, we should just keep the default host build commands.
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 74
Quoted 2 lines
package/mysql/mysql.mk +2
-0+define HOST_MYSQL_INSTALL_CMDS + $(INSTALL) -m 0755 $(@D)/sql/gen_lex_hash $(HOST_DIR)/usr/bin/
One tab, not spaces.
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 85
Quoted 11 lines
package/mysql/mysql.mk +8
-0+endef + +else +MYSQL_CONF_OPT += \ + --without-server +endif + + define MYSQL_REMOVE_TEST_PROGS rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench endef
It looks like you somehow lost the final line in your refactoring:
$(eval $(host-autotools-package))
Really, thank you for staying on-board through these iterations! We're getting pretty close on that last patch! :-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v3 3/3 add support for building the server
Yann, All,
+define HOST_MYSQL_BUILD_CMDS
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 70
Quoted 8 lines
package/mysql/mysql.mk +7
-0+ $(MAKE) -C $(@D)/include my_config.h + $(MAKE) -C $(@D)/mysys libmysys.a + $(MAKE) -C $(@D)/strings libmystrings.a + $(MAKE) -C $(@D)/vio libvio.a + $(MAKE) -C $(@D)/dbug libdbug.a + $(MAKE) -C $(@D)/regex libregex.a + $(MAKE) -C $(@D)/sql gen_lex_hash
Hmmm... When I suggested we only build the required stuff, I did not
Quoted 6 lines
expect this would amount to so many single-line calls.
I wonder if it is worth keeping this. So, is it much faster to only build the above, compared to building everything? If so, we just keep the above lines, otherwise, we should just keep the default host build commands.
I can confirm you that compiles faster, since, we just need generate gen_lex_hash binary file, but if you want to keep the default host build commands, just let me know.
I noticed that you enable the server with: --with-embedded-server
Quoted 2 lines
but you disable it with: --without-server
http://dev.mysql.com/doc/refman/5.1/en/source-configuration-options.html
I based on source configuration options:
To compile just the MySQL client libraries and client programs and not the
Quoted 2 lines
server, use the --without-server option
To build the embedded MySQL library (libmysqld.a), use the
Quoted 2 lines
--with-embedded-server option
endef
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 80
Quoted 6 lines
else
package/mysql/mysql.mk +3
-0+MYSQL_CONF_OPT += \ + --without-server +endif
I think, I should add --without-embedded-server like this:
MYSQL_CONF_OPT += \
+ --without-server
+ --without-embedded-server
What about ...?
Best,
Marcelo Gutierrez
2014/1/21 Yann E. MORIN <[email protected]>
Quoted 155 lines
Marcelo, All,
Subject should have been something like:
mysql: add option to build the serverOn 2014-01-21 14:10 +0000, Marcelo Guti?rrez spake thusly:
Quoted 3 lines
Add support for building MySQL
Signed-off-by Marcelo Guti?rrez <[email protected]>Still a few comments...
[--SNIP--]
package/mysql/Config.in config BR2_PACKAGE_MYSQL · line 19
Quoted 13 lines
package/mysql/Config.in +5
-0@@ -12,3 +12,10 @@ config BR2_PACKAGE_MYSQL comment "MySQL needs a toolchain w/ C++, threads" depends on BR2_USE_MMU depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +if BR2_PACKAGE_MYSQL + +config BR2_PACKAGE_MYSQL_SERVER + bool "MySQL server"Leading tab, not spaces.
Maybe add a bit of help here:
help
Install the MySQL server on the target.[--SNIP--]
Quoted 5 lines
package/mysql/mysql.mk +0
-0package/mysql/mysql.mk MYSQL_AUTORECONF = YES · line 23
Quoted 10 lines
package/mysql/mysql.mk +7
-0@@ -14,6 +14,15 @@ MYSQL_AUTORECONF = YES MYSQL_LICENSE = GPLv2 MYSQL_LICENSE_FILES = README COPYING +ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y) +MYSQL_DEPENDENCIES += host-mysql +HOST_MYSQL_DEPENDENCIES = + +HOST_MYSQL_CONF_OPT = \ + --with-embedded-server +endifMaybe this ifeq-block can be moved in the other one, below?
I noticed that you enable the server with: --with-embedded-server but you disable it with: --without-server
There is a mismatch between the --with and the --without options. Is that normal?
Quoted 12 lines
package/mysql/mysql.mk +0
-1MYSQL_CONF_ENV = \ ac_cv_sys_restartable_syscalls=yes \ ac_cv_path_PS=/bin/ps \@@ -25,7 +34,6 @@ MYSQL_CONF_ENV = \ MYSQL_CONF_OPT = \ --without-ndb-binlog \ - --without-server \ --without-docs \ --without-man \ --without-libedit \package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 46
Quoted 5 lines
package/mysql/mysql.mk +2
-0@@ -34,6 +42,44 @@ MYSQL_CONF_OPT = \ --enable-thread-safe-client \ $(ENABLE_DEBUG) +ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y) + MYSQL_CONF_OPT += \No indentation on that first line.
Quoted 5 lines
package/mysql/mysql.mk +5
-0+ --disable-dependency-tracking \ + --with-atomic-ops=up \ + --with-embedded-server \ + --without-query-cache \ + --without-plugin-partition \package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 61
Quoted 10 lines
package/mysql/mysql.mk +10
-0+ --without-plugin-daemon_example \ + --without-plugin-ftexample \ + --without-plugin-archive \ + --without-plugin-blackhole \ + --without-plugin-example \ + --without-plugin-federated \ + --without-plugin-ibmdb2i \ + --without-plugin-innobase \ + --without-plugin-innodb_plugin \ + --without-plugin-ndbclusterWe usually indent with one tab in continuation lines.
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 70
Quoted 8 lines
package/mysql/mysql.mk +8
-0+define HOST_MYSQL_BUILD_CMDS + $(MAKE) -C $(@D)/include my_config.h + $(MAKE) -C $(@D)/mysys libmysys.a + $(MAKE) -C $(@D)/strings libmystrings.a + $(MAKE) -C $(@D)/vio libvio.a + $(MAKE) -C $(@D)/dbug libdbug.a + $(MAKE) -C $(@D)/regex libregex.a + $(MAKE) -C $(@D)/sql gen_lex_hashThese should be indented with a tab, not spaces.
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 70
Quoted 1 line
package/mysql/mysql.mk +1
-0+endefHmmm... When I suggested we only build the required stuff, I did not expect this would amount to so many single-line calls.
I wonder if it is worth keeping this. So, is it much faster to only build the above, compared to building everything? If so, we just keep the above lines, otherwise, we should just keep the default host build commands.
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 74
Quoted 2 lines
package/mysql/mysql.mk +2
-0+define HOST_MYSQL_INSTALL_CMDS + $(INSTALL) -m 0755 $(@D)/sql/gen_lex_hash $(HOST_DIR)/usr/bin/One tab, not spaces.
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 85
Quoted 11 lines
package/mysql/mysql.mk +8
-0+endef + +else +MYSQL_CONF_OPT += \ + --without-server +endif + + define MYSQL_REMOVE_TEST_PROGS rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench endefIt looks like you somehow lost the final line in your refactoring:
$(eval $(host-autotools-package))Really, thank you for staying on-board through these iterations! We're getting pretty close on that last patch! :-)
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. |
Quoted 2 lines
'------------------------------^-------^------------------^--------------------'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140121/2e8301af/attachment.html>
PATCH v3 3/3 add support for building the server
Marcelo, All,
On 2014-01-21 21:46 -0200, Marcelo Gutierrez spake thusly:
Quoted 14 lines
+define
HOST_MYSQL_BUILD_CMDSpackage/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 70
Quoted 8 lines
package/mysql/mysql.mk +7
-0+ $(MAKE) -C $(@D)/include my_config.h + $(MAKE) -C $(@D)/mysys libmysys.a + $(MAKE) -C $(@D)/strings libmystrings.a + $(MAKE) -C $(@D)/vio libvio.a + $(MAKE) -C $(@D)/dbug libdbug.a + $(MAKE) -C $(@D)/regex libregex.a + $(MAKE) -C $(@D)/sql gen_lex_hashHmmm... When I suggested we only build the required stuff, I did not
Quoted 2 lines
expect this would amount to so many single-line calls.
Quoted 8 lines
Quoted 4 lines
I wonder if it is worth keeping this. So, is it much faster to only build the above, compared to building everything? If so, we just keep the above lines, otherwise, we should just keep the default host build commands.
I can confirm you that compiles faster, since, we just need generate
gen_lex_hashbinary file, but if you want to keep the default host build commands, just let me know.
So we'll keep your multi-line commands, since they are faster than a complete build. Thanks!
Quoted 5 lines
I noticed that you enable the server with: --with-embedded-server
Quoted 1 line
but you disable it with: --without-server
http://dev.mysql.com/doc/refman/5.1/en/source-configuration-options.html
Quoted 8 lines
I based on source configuration options:
To compile just the MySQL client libraries and client programs and not the
Quoted 2 lines
server, use the --without-server option
To build the embedded MySQL library (libmysqld.a), use the
Quoted 1 line
--with-embedded-server option
OK, that's good then. That's not the standard behaviour ofan autotools package, though, but since that's the way they dociument it, let's use that.
Quoted 14 lines
endef
package/mysql/mysql.mk MYSQL_CONF_OPT = \ · line 80
Quoted 6 lines
else
package/mysql/mysql.mk +3
-0+MYSQL_CONF_OPT += \ + --without-server +endifI think, I should add --without-embedded-server like this:
MYSQL_CONF_OPT+= \(quoted diff) +2
-0+ --without-server + --without-embedded-server
Quoted 1 line
What about ...?
No. Since you use the documented behaviour, just use that. Your patch id fine in this respect.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 2/3 rename the patches so they have a number
In reply to Marcelo GutiérrezMarcelo, All,
On 2014-01-21 14:10 +0000, Marcelo Guti?rrez spake thusly:
Quoted 3 lines
Rename patches to add sequence numbers
Signed-off-by Marcelo Guti?rrez <[email protected]>
The subject should have been something like:
mysql: rename patches to add sequence numbers.
Peter can fix when committing, so no need to resend.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 2/3 rename the patches so they have a number
In reply to Marcelo GutiérrezQuoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Marcelo" == Marcelo Guti?rrez <[email protected]> writes:
Rename patches to add sequence numbers
Signed-off-by Marcelo Guti?rrez <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard