Skip to contentSkip to conversation

Rename MySQL client package

PATCH Superseded Marcelo Gutiérrez 2 participants 5 messages Jan 19, 2014 – Jan 20, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Rename MySQL client package

From: "Marcelo Guti?rrez(UTN/FRH)" <[email protected]>

---
 Config.in.legacy                                   |    7 +
 package/Config.in                                  |    2 +-
 package/mysql/Config.in                            |   14 ++
 package/mysql/mysql-ac_cache_check.patch           |  156 ++++++++++++++++++++
 package/mysql/mysql-configure-ps-cache-check.patch |   39 +++++
 package/mysql/mysql-use-new-readline-iface.patch   |   21 +++
 package/mysql/mysql.mk                             |   48 ++++++
 7 files changed, 286 insertions(+), 1 deletion(-)
 create mode 100644 package/mysql/Config.in
 create mode 100644 package/mysql/mysql-ac_cache_check.patch
 create mode 100644 package/mysql/mysql-configure-ps-cache-check.patch
 create mode 100644 package/mysql/mysql-use-new-readline-iface.patch
 create mode 100644 package/mysql/mysql.mk
Config.in.legacy +7 -0
index 597534e..31fad3e 100644
@@ -112,6 +112,13 @@ config BR2_PACKAGE_LIBNFC_LLCP
 ###############################################################################
 comment "Legacy options removed in 2014.02"
 
+config BR2_PACKAGE_MYSQL_CLIENT
+        bool "MySQL client renamed to MySQL"
+        select BR2_LEGACY
+        select BR2_PACKAGE_MYSQL
+        help
+	  The option has been renamed BR2_PACKAGE_MYSQL
+
 config BR2_PACKAGE_SQUASHFS3
 	bool "squashfs3 has been removed"
 	select BR2_LEGACY
package/Config.in +1 -1
index 749ffea..119e43a 100644
@@ -502,7 +502,7 @@ menu "Database"
 source "package/berkeleydb/Config.in"
 source "package/cppdb/Config.in"
 source "package/gdbm/Config.in"
-source "package/mysql_client/Config.in"
+source "package/mysql/Config.in"
 source "package/redis/Config.in"
 source "package/sqlcipher/Config.in"
 source "package/sqlite/Config.in"
package/mysql/Config.in new file +14 -0
new file mode 100644
index 0000000..229e050
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_MYSQL
+	bool "MySQL"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_NCURSES
+	select BR2_PACKAGE_READLINE
+	help
+          The MySQL Open Source Database System
+	  http://www.mysql.com/
+
+comment "MySQL needs a toolchain w/ C++, threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
package/mysql/mysql-ac_cache_check.patch new file +156 -0

156 lines not on this page · raw message

package/mysql/mysql-configure-ps-cache-check.patch new file +39 -0
new file mode 100644
index 0000000..336e80e
@@ -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 <[email protected]>
+
+---
+ 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)
package/mysql/mysql-use-new-readline-iface.patch new file +21 -0
new file mode 100644
index 0000000..c590656
@@ -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 <[email protected]>
+
+---
+ 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
package/mysql/mysql.mk new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v3 2/2 add support for building the server

From: "Marcelo Guti?rrez(UTN/FRH)" <[email protected]>

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-0000-ac_stack_direction-is-unset.patch   |   15 ++++++
 .../mysql-0001-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-0000-ac_stack_direction-is-unset.patch
 create mode 100644 package/mysql/mysql-0001-Fix-gen_lex_hash-execution.patch
package/mysql/Config.in +7 -0
index 229e050..56e7e6e 100644
@@ -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-0000-ac_stack_direction-is-unset.patch new file +15 -0
new file mode 100644
index 0000000..6fef0a9
@@ -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-0001-Fix-gen_lex_hash-execution.patch new file +32 -0
new file mode 100644
index 0000000..b91ed4f
@@ -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
#2 lore raw

PATCH v3 2/2 add support for building the server

Marcelo, All,

On 2014-01-19 23:02 +0000, Marcelo Guti?rrez spake thusly:

Quoted 1 line

From: "Marcelo Guti?rrez(UTN/FRH)" <[email protected]>

This one looks actually good to me! :-)

One minor nit, though:

This changelog:

Quoted 6 lines

Changes v2 -> v3:
- rename field <number> in the patch file name
- update new options postion
- update description to Makefile
- update Config.in

Quoted 8 lines

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

should go...

Quoted 2 lines

---

Here, after the three-dash-line. git interprets this three-dash-line as a marker for the end of the commit log, so it will not appear in the history, since we don;t really need it.

(Ditto for your patch 1/2, too.)

Otherwise, looks good to me! :-)

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.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/2 Rename MySQL client package

In reply to Marcelo Gutiérrez

Marcelo, All,

On 2014-01-19 23:02 +0000, Marcelo Guti?rrez spake thusly:

Quoted 4 lines

From: "Marcelo Guti?rrez(UTN/FRH)" <[email protected]>

Quoted 14 lines
---
 Config.in.legacy                                   |    7 +
 package/Config.in                                  |    2 +-
 package/mysql/Config.in                            |   14 ++
 package/mysql/mysql-ac_cache_check.patch           |  156 ++++++++++++++++++++
 package/mysql/mysql-configure-ps-cache-check.patch |   39 +++++
 package/mysql/mysql-use-new-readline-iface.patch   |   21 +++
 package/mysql/mysql.mk                             |   48 ++++++
 7 files changed, 286 insertions(+), 1 deletion(-)
 create mode 100644 package/mysql/Config.in
 create mode 100644 package/mysql/mysql-ac_cache_check.patch
 create mode 100644 package/mysql/mysql-configure-ps-cache-check.patch
 create mode 100644 package/mysql/mysql-use-new-readline-iface.patch
 create mode 100644 package/mysql/mysql.mk

Did you forget to rm the old mysql_client package, by chance? ;-)

Also, when sending mails, use the '-C -M' options: it will detect renames and copies of files, and thus the diff will be much smaller. It is even as smart as to detect a rename with modifications! :-)

Config.in.legacy config BR2_PACKAGE_LIBNFC_LLCP · line 119

Quoted 13 lines
Config.in.legacy +5 -0
index 597534e..31fad3e 100644
@@ -112,6 +112,13 @@ config BR2_PACKAGE_LIBNFC_LLCP
 ###############################################################################
 comment "Legacy options removed in 2014.02"
 
+config BR2_PACKAGE_MYSQL_CLIENT
+        bool "MySQL client renamed to MySQL"
+        select BR2_LEGACY
+        select BR2_PACKAGE_MYSQL
+        help

This needs to be: one leading tab, not spaces.

Config.in.legacy config BR2_PACKAGE_LIBNFC_LLCP · line 121

Quoted 2 lines
Config.in.legacy +2 -0
+	  The option has been renamed BR2_PACKAGE_MYSQL
+

Otherwise, this legacy entry is good! :-)

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.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH 1/2 Rename MySQL client package

In reply to Marcelo Gutiérrez

Marcelo, All,

On 2014-01-19 23:02 +0000, Marcelo Guti?rrez spake thusly:

Quoted 17 lines

From: "Marcelo Guti?rrez(UTN/FRH)" <[email protected]>

---
 Config.in.legacy                                   |    7 +
 package/Config.in                                  |    2 +-
 package/mysql/Config.in                            |   14 ++
 package/mysql/mysql-ac_cache_check.patch           |  156 ++++++++++++++++++++
 package/mysql/mysql-configure-ps-cache-check.patch |   39 +++++
 package/mysql/mysql-use-new-readline-iface.patch   |   21 +++
 package/mysql/mysql.mk                             |   48 ++++++
 7 files changed, 286 insertions(+), 1 deletion(-)
 create mode 100644 package/mysql/Config.in
 create mode 100644 package/mysql/mysql-ac_cache_check.patch
 create mode 100644 package/mysql/mysql-configure-ps-cache-check.patch
 create mode 100644 package/mysql/mysql-use-new-readline-iface.patch
 create mode 100644 package/mysql/mysql.mk

Oh, I forgot: you should also rename the patches so they have a number.

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.  |
'------------------------------^-------^------------------^--------------------'