mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
156
package/oracle-mysql/0000-ac_cache_check.patch
Normal file
156
package/oracle-mysql/0000-ac_cache_check.patch
Normal file
@@ -0,0 +1,156 @@
|
||||
Patch borrowed from
|
||||
http://code.google.com/p/minimyth/source/browse/trunk/gar-minimyth/script/db/mysql/files/mysql-5.1.47-ac_cache_check.patch?r=6493.
|
||||
|
||||
It allows to override through ac_cv_* variables various checks that
|
||||
cannot be performed when cross-compiling.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
---
|
||||
storage/innodb_plugin/plug.in | 59 ++++++++++++++++++++++++++++--------------
|
||||
1 file changed, 40 insertions(+), 19 deletions(-)
|
||||
|
||||
Index: mysql-5.1.53/storage/innodb_plugin/plug.in
|
||||
===================================================================
|
||||
--- mysql-5.1.53.orig/storage/innodb_plugin/plug.in
|
||||
+++ mysql-5.1.53/storage/innodb_plugin/plug.in
|
||||
@@ -53,9 +53,10 @@
|
||||
esac
|
||||
AC_SUBST(INNODB_DYNAMIC_CFLAGS)
|
||||
|
||||
- AC_MSG_CHECKING(whether GCC atomic builtins are available)
|
||||
+ AC_CACHE_CHECK([whether GCC atomic builtins are available],
|
||||
+ [ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS],
|
||||
# either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
|
||||
- AC_TRY_RUN(
|
||||
+ [AC_TRY_RUN(
|
||||
[
|
||||
int main()
|
||||
{
|
||||
@@ -95,18 +96,23 @@
|
||||
}
|
||||
],
|
||||
[
|
||||
- AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
|
||||
- [GCC atomic builtins are available])
|
||||
AC_MSG_RESULT(yes)
|
||||
+ ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
+ ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=no
|
||||
]
|
||||
- )
|
||||
+ )])
|
||||
+ if test "x$ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS"= "xyes" ; then
|
||||
+ AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
|
||||
+ [GCC atomic builtins are available])
|
||||
+ fi
|
||||
|
||||
- AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
|
||||
+ AC_CACHE_CHECK([whether pthread_t can be used by GCC atomic builtins],
|
||||
+ [ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC],
|
||||
# either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
|
||||
- AC_TRY_RUN(
|
||||
+ [AC_TRY_RUN(
|
||||
[
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
@@ -126,14 +132,18 @@
|
||||
}
|
||||
],
|
||||
[
|
||||
- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
|
||||
- [pthread_t can be used by GCC atomic builtins])
|
||||
AC_MSG_RESULT(yes)
|
||||
+ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
+ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=no
|
||||
]
|
||||
- )
|
||||
+ )])
|
||||
+ if test "x$ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC"= "xyes" ; then
|
||||
+ AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
|
||||
+ [pthread_t can be used by GCC atomic builtins])
|
||||
+ fi
|
||||
|
||||
AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
|
||||
# either define HAVE_IB_SOLARIS_ATOMICS or not
|
||||
@@ -148,9 +158,10 @@
|
||||
are available])
|
||||
)
|
||||
|
||||
- AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
|
||||
+ AC_CACHE_CHECK([whether pthread_t can be used by Solaris libc atomic functions],
|
||||
+ [ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS],
|
||||
# either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
|
||||
- AC_TRY_RUN(
|
||||
+ [AC_TRY_RUN(
|
||||
[
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
@@ -181,28 +192,33 @@
|
||||
}
|
||||
],
|
||||
[
|
||||
- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
|
||||
- [pthread_t can be used by solaris atomics])
|
||||
AC_MSG_RESULT(yes)
|
||||
+ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=yes
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
+ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no
|
||||
]
|
||||
- )
|
||||
+ )])
|
||||
+ if test "x$ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS"= "xyes" ; then
|
||||
+ AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1],
|
||||
+ [pthread_t can be used by solaris atomics])
|
||||
+ fi
|
||||
|
||||
# this is needed to know which one of atomic_cas_32() or atomic_cas_64()
|
||||
# to use in the source
|
||||
AC_CHECK_SIZEOF([pthread_t], [], [#include <pthread.h>])
|
||||
|
||||
# Check for x86 PAUSE instruction
|
||||
- AC_MSG_CHECKING(for x86 PAUSE instruction)
|
||||
+ AC_CACHE_CHECK([for x86 PAUSE instruction],
|
||||
+ [ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION],
|
||||
# We have to actually try running the test program, because of a bug
|
||||
# in Solaris on x86_64, where it wrongly reports that PAUSE is not
|
||||
# supported when trying to run an application. See
|
||||
# http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
|
||||
# We use ib_ prefix to avoid collisoins if this code is added to
|
||||
# mysql's configure.in.
|
||||
- AC_TRY_RUN(
|
||||
+ [AC_TRY_RUN(
|
||||
[
|
||||
int main() {
|
||||
__asm__ __volatile__ ("pause");
|
||||
@@ -210,16 +226,21 @@
|
||||
}
|
||||
],
|
||||
[
|
||||
- AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
|
||||
AC_MSG_RESULT(yes)
|
||||
+ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=yes
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
+ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
+ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no
|
||||
]
|
||||
- )
|
||||
+ )])
|
||||
+ if test "x$ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION"= "xyes" ; then
|
||||
+ AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
|
||||
+ fi
|
||||
])
|
||||
|
||||
# vim: set ft=config:
|
||||
39
package/oracle-mysql/0001-configure-ps-cache-check.patch
Normal file
39
package/oracle-mysql/0001-configure-ps-cache-check.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
Patch borrowed from
|
||||
http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/mysql/files/configure-ps-cache-check.patch
|
||||
|
||||
It allows to specify through ac_cv_FIND_PROC how ps should be used on
|
||||
the target to find the PID of a program.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
---
|
||||
configure.in | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: mysql-5.1.53/configure.in
|
||||
===================================================================
|
||||
--- mysql-5.1.53.orig/configure.in
|
||||
+++ mysql-5.1.53/configure.in
|
||||
@@ -462,8 +462,8 @@
|
||||
# then Make, then shell. The autoconf substitution uses single quotes, so
|
||||
# no unprotected single quotes should appear in the expression.
|
||||
AC_PATH_PROG(PS, ps, ps)
|
||||
-AC_MSG_CHECKING("how to check if pid exists")
|
||||
-PS=$ac_cv_path_PS
|
||||
+AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC],
|
||||
+[
|
||||
# Linux style
|
||||
if $PS wwwp $$ 2> /dev/null | grep -- "$0" > /dev/null
|
||||
then
|
||||
@@ -502,8 +502,9 @@
|
||||
AC_MSG_ERROR([Could not find the right ps and/or grep switches. Which OS is this? See the Installation chapter in the Reference Manual.])
|
||||
esac
|
||||
fi
|
||||
-AC_SUBST(FIND_PROC)
|
||||
-AC_MSG_RESULT("$FIND_PROC")
|
||||
+ac_cv_FIND_PROC="$FIND_PROC"
|
||||
+])
|
||||
+AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC])
|
||||
|
||||
# Check if a pid is valid
|
||||
AC_PATH_PROG(KILL, kill, kill)
|
||||
21
package/oracle-mysql/0002-use-new-readline-iface.patch
Normal file
21
package/oracle-mysql/0002-use-new-readline-iface.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
Tell MySQL to use the new readline interface even when an external
|
||||
readline is being used.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
---
|
||||
configure.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
Index: mysql-5.1.53/configure.in
|
||||
===================================================================
|
||||
--- mysql-5.1.53.orig/configure.in
|
||||
+++ mysql-5.1.53/configure.in
|
||||
@@ -2689,6 +2689,7 @@
|
||||
# this way we avoid linking commercial source with GPL readline
|
||||
readline_link="-lreadline"
|
||||
want_to_use_readline="yes"
|
||||
+ AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1)
|
||||
elif [test "$mysql_cv_libedit_interface" = "yes"]
|
||||
then
|
||||
# Use libedit
|
||||
15
package/oracle-mysql/0003-ac_stack_direction-is-unset.patch
Normal file
15
package/oracle-mysql/0003-ac_stack_direction-is-unset.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
misc.m4: ac_cv_c_stack_direction is unset.
|
||||
|
||||
Signed-off-by: Marcelo Gutierrez (UTN/FRH) <kuyurix@gmail.com>
|
||||
|
||||
--- 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
|
||||
|
||||
32
package/oracle-mysql/0004-Fix-gen_lex_hash-execution.patch
Normal file
32
package/oracle-mysql/0004-Fix-gen_lex_hash-execution.patch
Normal file
@@ -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) <kuyurix@gmail.com>
|
||||
|
||||
--- 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
|
||||
3310
package/oracle-mysql/0005-bison_3_breaks_mysql_server_build.patch
Normal file
3310
package/oracle-mysql/0005-bison_3_breaks_mysql_server_build.patch
Normal file
File diff suppressed because it is too large
Load Diff
18
package/oracle-mysql/0006-no-force-static-build.patch
Normal file
18
package/oracle-mysql/0006-no-force-static-build.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
configure: do not force a static link for non-installed programs
|
||||
|
||||
Otherwise, it tries to link against a static libz, which may not exist
|
||||
in a shared-only system.
|
||||
|
||||
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||
|
||||
diff -durN mysql-5.1.73.orig/configure.in mysql-5.1.73/configure.in
|
||||
--- mysql-5.1.73.orig/configure.in 2014-12-22 00:04:46.550508208 +0100
|
||||
+++ mysql-5.1.73/configure.in 2014-12-22 00:05:56.415307480 +0100
|
||||
@@ -562,7 +562,6 @@
|
||||
AC_MSG_ERROR([MySQL requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
|
||||
fi
|
||||
|
||||
-NOINST_LDFLAGS="-static"
|
||||
|
||||
static_nss=""
|
||||
STATIC_NSS_FLAGS=""
|
||||
182
package/oracle-mysql/0007-dont-install-in-mysql-directory.patch
Normal file
182
package/oracle-mysql/0007-dont-install-in-mysql-directory.patch
Normal file
@@ -0,0 +1,182 @@
|
||||
Don't install in mysql directory
|
||||
|
||||
Installing libraries in a subdirectory of /usr/lib leads to no end of
|
||||
trouble. It requires either setting a RUN_PATH in the ELF files linked
|
||||
with it or adding the path to ld.so.conf and calling ldconfig on the
|
||||
target.
|
||||
|
||||
So to simplify things, put everything in /usr/lib instead of
|
||||
/usr/lib/mysql
|
||||
|
||||
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
|
||||
|
||||
diff -Nrup mysql-5.1.73.orig/dbug/Makefile.am mysql-5.1.73/dbug/Makefile.am
|
||||
--- mysql-5.1.73.orig/dbug/Makefile.am 2013-11-04 19:52:27.000000000 +0100
|
||||
+++ mysql-5.1.73/dbug/Makefile.am 2015-12-14 00:34:58.567937603 +0100
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
|
||||
LDADD = libdbug.a ../mysys/libmysys.a ../strings/libmystrings.a
|
||||
-pkglib_LIBRARIES = libdbug.a
|
||||
+lib_LIBRARIES = libdbug.a
|
||||
noinst_HEADERS = dbug_long.h
|
||||
libdbug_a_SOURCES = dbug.c sanity.c
|
||||
EXTRA_DIST = CMakeLists.txt example1.c example2.c example3.c \
|
||||
diff -Nrup mysql-5.1.73.orig/libmysql/Makefile.shared mysql-5.1.73/libmysql/Makefile.shared
|
||||
--- mysql-5.1.73.orig/libmysql/Makefile.shared 2013-11-04 19:52:27.000000000 +0100
|
||||
+++ mysql-5.1.73/libmysql/Makefile.shared 2015-12-14 00:34:58.567937603 +0100
|
||||
@@ -25,7 +25,7 @@ MYSQLBASEdir= $(prefix)
|
||||
## We'll use CLIENT_EXTRA_LDFLAGS for threaded and non-threaded
|
||||
## until someone complains that they need separate options.
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(target)
|
||||
-pkglib_LTLIBRARIES = $(target)
|
||||
+lib_LTLIBRARIES = $(target)
|
||||
|
||||
noinst_PROGRAMS = conf_to_src
|
||||
|
||||
diff -Nrup mysql-5.1.73.orig/libmysqld/Makefile.am mysql-5.1.73/libmysqld/Makefile.am
|
||||
--- mysql-5.1.73.orig/libmysqld/Makefile.am 2013-11-04 19:52:27.000000000 +0100
|
||||
+++ mysql-5.1.73/libmysqld/Makefile.am 2015-12-14 00:34:58.567937603 +0100
|
||||
@@ -38,7 +38,7 @@ INCLUDES= -I$(top_builddir)/include -I$
|
||||
@condition_dependent_plugin_includes@
|
||||
|
||||
noinst_LIBRARIES = libmysqld_int.a
|
||||
-pkglib_LIBRARIES = libmysqld.a
|
||||
+lib_LIBRARIES = libmysqld.a
|
||||
SUBDIRS = . examples
|
||||
libmysqld_sources= libmysqld.c lib_sql.cc emb_qcache.cc
|
||||
libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
|
||||
diff -Nrup mysql-5.1.73.orig/mysys/Makefile.am mysql-5.1.73/mysys/Makefile.am
|
||||
--- mysql-5.1.73.orig/mysys/Makefile.am 2013-11-04 19:52:27.000000000 +0100
|
||||
+++ mysql-5.1.73/mysys/Makefile.am 2015-12-14 00:34:58.567937603 +0100
|
||||
@@ -18,7 +18,7 @@ MYSQLSHAREdir = $(pkgdatadir)
|
||||
MYSQLBASEdir= $(prefix)
|
||||
INCLUDES = @ZLIB_INCLUDES@ -I$(top_builddir)/include \
|
||||
-I$(top_srcdir)/include -I$(srcdir)
|
||||
-pkglib_LIBRARIES = libmysys.a
|
||||
+lib_LIBRARIES = libmysys.a
|
||||
LDADD = libmysys.a $(top_builddir)/strings/libmystrings.a $(top_builddir)/dbug/libdbug.a
|
||||
noinst_HEADERS = mysys_priv.h my_static.h my_handler_errors.h
|
||||
libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
|
||||
diff -Nrup mysql-5.1.73.orig/storage/csv/Makefile.am mysql-5.1.73/storage/csv/Makefile.am
|
||||
--- mysql-5.1.73.orig/storage/csv/Makefile.am 2013-11-04 19:52:27.000000000 +0100
|
||||
+++ mysql-5.1.73/storage/csv/Makefile.am 2015-12-14 00:34:58.563937596 +0100
|
||||
@@ -30,7 +30,7 @@ DEFS = @DEFS@
|
||||
noinst_HEADERS = ha_tina.h transparent_file.h
|
||||
|
||||
EXTRA_LTLIBRARIES = ha_csv.la
|
||||
-pkglib_LTLIBRARIES = @plugin_csv_shared_target@
|
||||
+lib_LTLIBRARIES = @plugin_csv_shared_target@
|
||||
ha_csv_la_LDFLAGS = -module -rpath $(MYSQLLIBdir)
|
||||
ha_csv_la_CXXFLAGS = $(AM_CXXFLAGS) -DMYSQL_PLUGIN
|
||||
ha_csv_la_SOURCES = transparent_file.cc ha_tina.cc
|
||||
diff -Nrup mysql-5.1.73.orig/storage/heap/Makefile.am mysql-5.1.73/storage/heap/Makefile.am
|
||||
--- mysql-5.1.73.orig/storage/heap/Makefile.am 2013-11-04 19:52:27.000000000 +0100
|
||||
+++ mysql-5.1.73/storage/heap/Makefile.am 2015-12-14 00:34:58.563937596 +0100
|
||||
@@ -26,7 +26,7 @@ WRAPLIBS=
|
||||
LDADD =
|
||||
|
||||
DEFS = @DEFS@
|
||||
-pkglib_LIBRARIES = libheap.a
|
||||
+lib_LIBRARIES = libheap.a
|
||||
noinst_PROGRAMS = hp_test1 hp_test2
|
||||
noinst_LIBRARIES = libheap.a
|
||||
hp_test1_LDFLAGS = @NOINST_LDFLAGS@
|
||||
diff -Nrup mysql-5.1.73.orig/storage/myisam/Makefile.am mysql-5.1.73/storage/myisam/Makefile.am
|
||||
--- mysql-5.1.73.orig/storage/myisam/Makefile.am 2013-11-04 19:52:27.000000000 +0100
|
||||
+++ mysql-5.1.73/storage/myisam/Makefile.am 2015-12-14 00:34:58.563937596 +0100
|
||||
@@ -30,7 +30,7 @@ DEFS = @DEFS@
|
||||
EXTRA_DIST = mi_test_all.sh mi_test_all.res ft_stem.c CMakeLists.txt plug.in
|
||||
pkgdata_DATA = mi_test_all mi_test_all.res
|
||||
|
||||
-pkglib_LIBRARIES = libmyisam.a
|
||||
+lib_LIBRARIES = libmyisam.a
|
||||
bin_PROGRAMS = myisamchk myisamlog myisampack myisam_ftdump
|
||||
myisamchk_DEPENDENCIES= $(LIBRARIES)
|
||||
myisamchk_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
|
||||
diff -Nrup mysql-5.1.73.orig/storage/myisammrg/Makefile.am mysql-5.1.73/storage/myisammrg/Makefile.am
|
||||
--- mysql-5.1.73.orig/storage/myisammrg/Makefile.am 2013-11-04 19:52:27.000000000 +0100
|
||||
+++ mysql-5.1.73/storage/myisammrg/Makefile.am 2015-12-14 00:34:58.563937596 +0100
|
||||
@@ -26,7 +26,7 @@ WRAPLIBS=
|
||||
LDADD =
|
||||
|
||||
DEFS = @DEFS@
|
||||
-pkglib_LIBRARIES = libmyisammrg.a
|
||||
+lib_LIBRARIES = libmyisammrg.a
|
||||
noinst_HEADERS = myrg_def.h ha_myisammrg.h
|
||||
noinst_LIBRARIES = libmyisammrg.a
|
||||
libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \
|
||||
diff -Nrup mysql-5.1.73.orig/strings/Makefile.am mysql-5.1.73/strings/Makefile.am
|
||||
--- mysql-5.1.73.orig/strings/Makefile.am 2013-11-04 19:52:27.000000000 +0100
|
||||
+++ mysql-5.1.73/strings/Makefile.am 2015-12-14 00:34:58.567937603 +0100
|
||||
@@ -16,7 +16,7 @@
|
||||
# This file is public domain and comes with NO WARRANTY of any kind
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
|
||||
-pkglib_LIBRARIES = libmystrings.a
|
||||
+lib_LIBRARIES = libmystrings.a
|
||||
|
||||
# Exact one of ASSEMBLER_X
|
||||
if ASSEMBLER_x86
|
||||
@@ -69,15 +69,15 @@ conf_to_src_LDFLAGS= @NOINST_LDFLAGS@
|
||||
|
||||
FLAGS=$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) @NOINST_LDFLAGS@
|
||||
|
||||
-str_test: str_test.c $(pkglib_LIBRARIES)
|
||||
- $(LINK) $(FLAGS) -DMAIN $(INCLUDES) $(srcdir)/str_test.c $(LDADD) $(pkglib_LIBRARIES)
|
||||
+str_test: str_test.c $(lib_LIBRARIES)
|
||||
+ $(LINK) $(FLAGS) -DMAIN $(INCLUDES) $(srcdir)/str_test.c $(LDADD) $(lib_LIBRARIES)
|
||||
|
||||
uctypedump: uctypedump.c
|
||||
$(LINK) $(INCLUDES) $(srcdir)/uctypedump.c
|
||||
|
||||
-test_decimal$(EXEEXT): decimal.c $(pkglib_LIBRARIES)
|
||||
+test_decimal$(EXEEXT): decimal.c $(lib_LIBRARIES)
|
||||
$(CP) $(srcdir)/decimal.c ./test_decimal.c
|
||||
- $(LINK) $(FLAGS) -DMAIN ./test_decimal.c $(LDADD) $(pkglib_LIBRARIES)
|
||||
+ $(LINK) $(FLAGS) -DMAIN ./test_decimal.c $(LDADD) $(lib_LIBRARIES)
|
||||
$(RM) -f ./test_decimal.c
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
diff -Nrup mysql-5.1.73.orig/tests/Makefile.am mysql-5.1.73/tests/Makefile.am
|
||||
--- mysql-5.1.73.orig/tests/Makefile.am 2013-11-04 19:52:27.000000000 +0100
|
||||
+++ mysql-5.1.73/tests/Makefile.am 2015-12-14 00:34:58.567937603 +0100
|
||||
@@ -51,11 +51,11 @@ mysql_client_test.o: mysql_client_fw.c
|
||||
|
||||
insert_test_SOURCES= insert_test.c
|
||||
select_test_SOURCES= select_test.c
|
||||
-insert_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
-select_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
+insert_test_DEPENDENCIES= $(LIBRARIES) $(lib_LTLIBRARIES)
|
||||
+select_test_DEPENDENCIES= $(LIBRARIES) $(lib_LTLIBRARIES)
|
||||
|
||||
bug25714_SOURCES= bug25714.c
|
||||
-bug25714_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
+bug25714_DEPENDENCIES= $(LIBRARIES) $(lib_LTLIBRARIES)
|
||||
|
||||
# Fix for mit-threads
|
||||
DEFS = -DMYSQL_CLIENT_NO_THREADS
|
||||
diff -Nrup mysql-5.1.73.orig/vio/Makefile.am mysql-5.1.73/vio/Makefile.am
|
||||
--- mysql-5.1.73.orig/vio/Makefile.am 2013-11-04 19:52:27.000000000 +0100
|
||||
+++ mysql-5.1.73/vio/Makefile.am 2015-12-14 00:34:58.567937603 +0100
|
||||
@@ -16,7 +16,7 @@
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
$(openssl_includes)
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(openssl_libs) $(yassl_libs)
|
||||
-pkglib_LIBRARIES = libvio.a
|
||||
+lib_LIBRARIES = libvio.a
|
||||
|
||||
noinst_HEADERS = vio_priv.h
|
||||
|
||||
diff -Nrup mysql-5.1.73.orig/zlib/Makefile.am mysql-5.1.73/zlib/Makefile.am
|
||||
--- mysql-5.1.73.orig/zlib/Makefile.am 2013-11-04 19:52:27.000000000 +0100
|
||||
+++ mysql-5.1.73/zlib/Makefile.am 2015-12-14 00:34:58.567937603 +0100
|
||||
@@ -19,7 +19,7 @@ INCLUDES= -I$(top_builddir)/include -I$
|
||||
|
||||
LIBS= $(NON_THREADED_LIBS)
|
||||
|
||||
-pkglib_LTLIBRARIES = libz.la
|
||||
+lib_LTLIBRARIES = libz.la
|
||||
noinst_LTLIBRARIES = libzlt.la
|
||||
|
||||
libz_la_LDFLAGS = -static
|
||||
22
package/oracle-mysql/0008-fix-type-conversion.patch
Normal file
22
package/oracle-mysql/0008-fix-type-conversion.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
Fix type conversion
|
||||
|
||||
Fixes the following build error with gcc 6.x:
|
||||
|
||||
protocol.cc:27:40: error: narrowing conversion of ''\37777777776'' from 'char' to 'uchar {aka unsigned char}' inside { } [-Wnarrowing]
|
||||
static uchar eof_buff[1]= { (char) 254 }; /* Marker for end of fields */
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
Index: b/server-tools/instance-manager/protocol.cc
|
||||
===================================================================
|
||||
--- a/server-tools/instance-manager/protocol.cc
|
||||
+++ b/server-tools/instance-manager/protocol.cc
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <m_string.h>
|
||||
|
||||
|
||||
-static uchar eof_buff[1]= { (char) 254 }; /* Marker for end of fields */
|
||||
+static uchar eof_buff[1]= { (uchar) 254 }; /* Marker for end of fields */
|
||||
static const char ERROR_PACKET_CODE= (char) 255;
|
||||
|
||||
|
||||
45
package/oracle-mysql/0008-gcc7.patch
Normal file
45
package/oracle-mysql/0008-gcc7.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
Fix gcc7 compile
|
||||
|
||||
mysql.cc: In function 'void build_completion_hash(bool, bool)':
|
||||
mysql.cc:2687:37: error: invalid conversion from 'char' to 'char*' [-fpermissive]
|
||||
field_names[i][num_fields*2]= '\0';
|
||||
^~~~
|
||||
Patch was partly backported from upstream commit:
|
||||
https://github.com/mysql/mysql-server/commit/ae21683d980d5fe9e39bd0193827ea3604256eb9
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
[Thomas: add more gcc 7.x fixes in instance_map.cc.]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
Index: b/client/mysql.cc
|
||||
===================================================================
|
||||
--- a/client/mysql.cc
|
||||
+++ b/client/mysql.cc
|
||||
@@ -2684,7 +2684,7 @@
|
||||
mysql_free_result(fields);
|
||||
break;
|
||||
}
|
||||
- field_names[i][num_fields*2]= '\0';
|
||||
+ field_names[i][num_fields*2]= NULL;
|
||||
j=0;
|
||||
while ((sql_field=mysql_fetch_field(fields)))
|
||||
{
|
||||
Index: b/server-tools/instance-manager/instance_map.cc
|
||||
===================================================================
|
||||
--- a/server-tools/instance-manager/instance_map.cc
|
||||
+++ b/server-tools/instance-manager/instance_map.cc
|
||||
@@ -526,12 +526,12 @@
|
||||
Options::Main::config_file);
|
||||
|
||||
argv_options[1]= defaults_file_arg;
|
||||
- argv_options[2]= '\0';
|
||||
+ argv_options[2]= NULL;
|
||||
|
||||
argc= 2;
|
||||
}
|
||||
else
|
||||
- argv_options[1]= '\0';
|
||||
+ argv_options[1]= NULL;
|
||||
|
||||
/*
|
||||
If the routine failed, we'll simply fallback to defaults in
|
||||
39
package/oracle-mysql/S97mysqld
Normal file
39
package/oracle-mysql/S97mysqld
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
MYSQL_DIR="/var/mysql"
|
||||
MYSQL_USER="mysql"
|
||||
|
||||
[ -r /etc/default/mysql ] && . /etc/default/mysql
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ ! -d $MYSQL_DIR/mysql ] ; then
|
||||
echo "Creating MySQL system tables..."
|
||||
mysql_install_db --user=$MYSQL_USER --ldata=$MYSQL_DIR
|
||||
fi
|
||||
|
||||
# mysqld runs as user mysql, but /run is only writable by root
|
||||
# so create a subdirectory for mysql.
|
||||
install -d -o mysql -g root -m 0755 /run/mysql
|
||||
|
||||
# We don't use start-stop-daemon because mysqld has
|
||||
# its own wrapper script.
|
||||
printf "Starting mysql..."
|
||||
/usr/bin/mysqld_safe --pid-file=/run/mysql/mysqld.pid &
|
||||
echo "done."
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping mysql..."
|
||||
if test -f /run/mysql/mysqld.pid ; then
|
||||
kill `cat /run/mysql/mysqld.pid`
|
||||
fi
|
||||
echo "done."
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/mysqld {start|stop|restart}"
|
||||
;;
|
||||
esac
|
||||
13
package/oracle-mysql/mysqld.service
Normal file
13
package/oracle-mysql/mysqld.service
Normal file
@@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=MySQL database server
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/bin/sh -c 'test -d /var/mysql/mysql || mysql_install_db --user=mysql --ldata=/var/mysql'
|
||||
ExecStart=/usr/bin/mysqld_safe
|
||||
Restart=always
|
||||
User=mysql
|
||||
RuntimeDirectory=mysql
|
||||
RuntimeDirectoryMode=0755
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
4
package/oracle-mysql/oracle-mysql.hash
Normal file
4
package/oracle-mysql/oracle-mysql.hash
Normal file
@@ -0,0 +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
|
||||
# Locally computed
|
||||
sha256 05ebe21305408b24407d14b77607a3e5ffa3c300e03f1359d3066f301989dcb5 mysql-5.1.73.tar.gz
|
||||
136
package/oracle-mysql/oracle-mysql.mk
Normal file
136
package/oracle-mysql/oracle-mysql.mk
Normal file
@@ -0,0 +1,136 @@
|
||||
################################################################################
|
||||
#
|
||||
# oracle-mysql
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ORACLE_MYSQL_VERSION_MAJOR = 5.1
|
||||
ORACLE_MYSQL_VERSION = $(ORACLE_MYSQL_VERSION_MAJOR).73
|
||||
ORACLE_MYSQL_SOURCE = mysql-$(ORACLE_MYSQL_VERSION).tar.gz
|
||||
ORACLE_MYSQL_SITE = http://dev.mysql.com/get/Downloads/MySQL-$(ORACLE_MYSQL_VERSION_MAJOR)
|
||||
ORACLE_MYSQL_INSTALL_STAGING = YES
|
||||
ORACLE_MYSQL_DEPENDENCIES = readline ncurses
|
||||
ORACLE_MYSQL_AUTORECONF = YES
|
||||
ORACLE_MYSQL_LICENSE = GPL-2.0
|
||||
ORACLE_MYSQL_LICENSE_FILES = README COPYING
|
||||
ORACLE_MYSQL_PROVIDES = mysql
|
||||
|
||||
# Unix socket. This variable can also be consulted by other buildroot packages
|
||||
MYSQL_SOCKET = /run/mysql/mysql.sock
|
||||
|
||||
ORACLE_MYSQL_CONF_ENV = \
|
||||
ac_cv_sys_restartable_syscalls=yes \
|
||||
ac_cv_path_PS=/bin/ps \
|
||||
ac_cv_path_HOSTNAME=/bin/hostname \
|
||||
ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null" \
|
||||
ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes \
|
||||
ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no \
|
||||
ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes \
|
||||
mysql_cv_new_rl_interface=yes
|
||||
|
||||
ORACLE_MYSQL_CONF_OPTS = \
|
||||
--without-ndb-binlog \
|
||||
--without-docs \
|
||||
--without-man \
|
||||
--without-libedit \
|
||||
--without-readline \
|
||||
--with-low-memory \
|
||||
--enable-thread-safe-client \
|
||||
--with-unix-socket-path=$(MYSQL_SOCKET) \
|
||||
--disable-mysql-maintainer-mode
|
||||
|
||||
# host-oracle-mysql only installs what is needed to build mysql, i.e. the
|
||||
# gen_lex_hash tool, and it only builds the parts that are needed to
|
||||
# create this tool
|
||||
HOST_ORACLE_MYSQL_DEPENDENCIES = host-zlib host-ncurses
|
||||
|
||||
HOST_ORACLE_MYSQL_CONF_OPTS = \
|
||||
--with-embedded-server \
|
||||
--disable-mysql-maintainer-mode
|
||||
|
||||
define HOST_ORACLE_MYSQL_BUILD_CMDS
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/include my_config.h
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/mysys libmysys.a
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/strings libmystrings.a
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/vio libvio.a
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/dbug libdbug.a
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/regex libregex.a
|
||||
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/sql gen_lex_hash
|
||||
endef
|
||||
|
||||
define HOST_ORACLE_MYSQL_INSTALL_CMDS
|
||||
$(INSTALL) -m 0755 $(@D)/sql/gen_lex_hash $(HOST_DIR)/bin/
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
ORACLE_MYSQL_DEPENDENCIES += openssl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
ORACLE_MYSQL_DEPENDENCIES += zlib
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ORACLE_MYSQL_SERVER),y)
|
||||
ORACLE_MYSQL_DEPENDENCIES += host-oracle-mysql host-bison
|
||||
|
||||
ORACLE_MYSQL_CONF_OPTS += \
|
||||
--localstatedir=/var/mysql \
|
||||
--with-atomic-ops=up \
|
||||
--with-embedded-server \
|
||||
--without-query-cache \
|
||||
--without-plugin-partition \
|
||||
--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
|
||||
|
||||
# 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)
|
||||
ORACLE_MYSQL_CONF_OPTS += --with-debug=full
|
||||
else
|
||||
ORACLE_MYSQL_CONF_OPTS += --without-debug
|
||||
endif
|
||||
|
||||
define ORACLE_MYSQL_USERS
|
||||
mysql -1 nogroup -1 * /var/mysql - - MySQL daemon
|
||||
endef
|
||||
|
||||
define ORACLE_MYSQL_ADD_FOLDER
|
||||
$(INSTALL) -d $(TARGET_DIR)/var/mysql
|
||||
endef
|
||||
|
||||
ORACLE_MYSQL_POST_INSTALL_TARGET_HOOKS += ORACLE_MYSQL_ADD_FOLDER
|
||||
|
||||
define ORACLE_MYSQL_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 $(ORACLE_MYSQL_PKGDIR)/S97mysqld \
|
||||
$(TARGET_DIR)/etc/init.d/S97mysqld
|
||||
endef
|
||||
|
||||
define ORACLE_MYSQL_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 $(ORACLE_MYSQL_PKGDIR)/mysqld.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/mysqld.service
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -sf ../../../../usr/lib/systemd/system/mysqld.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/mysqld.service
|
||||
endef
|
||||
|
||||
else
|
||||
ORACLE_MYSQL_CONF_OPTS += \
|
||||
--without-server
|
||||
endif
|
||||
|
||||
define ORACLE_MYSQL_REMOVE_TEST_PROGS
|
||||
rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench
|
||||
endef
|
||||
|
||||
ORACLE_MYSQL_POST_INSTALL_TARGET_HOOKS += ORACLE_MYSQL_REMOVE_TEST_PROGS
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user