From 72e23c12296fbc77193898c38426add58d0c2d71 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 10 May 2013 18:54:00 +0100 Subject: mysql5: replace with mariadb 5.1.67 and tweak Switch to MariaDB (which is a drop-in replacement for MySQL) and use the latest stable release from the 5.1 series. * Update LIC_FILES_CHKSUM due to reformatted GPLv2 license text with updated FSF address * Refresh patches * Add two patches from the upstream 5.1 branch to fix CVE-2013-1861 * Add a package for libmysqld (the embedded server library) * Disable "maria" plugin since this fails to compile and doesn't appear to be critical * Drop some unrecognised/redundant options from EXTRA_OECONF * Fix text relocation QA warnings introduced in the upgrade * Convert to use useradd.bbclass for creating mysql user * Set SUMMARY instead of description * Move SRC_URI checksums to the version-specific inc file * Clear out cruft in files/ Signed-off-by: Paul Eggleton --- .../recipes-support/mysql/mysql5/Makefile.am.patch | 19 ------ .../mysql/mysql5/configure-ps-cache-check.patch | 27 -------- .../mysql/mysql5/configure.in.patch | 54 --------------- .../mysql/mysql5/fix-abi-check-gcc45.patch | 77 ---------------------- .../mysql/mysql5/fix_host_path.patch | 37 ----------- meta-oe/recipes-support/mysql/mysql5/misc.m4.patch | 13 ---- meta-oe/recipes-support/mysql/mysql5/my.cnf | 21 ------ meta-oe/recipes-support/mysql/mysql5/mysqld.sh | 24 ------- meta-oe/recipes-support/mysql/mysql5/plug.in.patch | 40 ----------- 9 files changed, 312 deletions(-) delete mode 100644 meta-oe/recipes-support/mysql/mysql5/Makefile.am.patch delete mode 100644 meta-oe/recipes-support/mysql/mysql5/configure-ps-cache-check.patch delete mode 100644 meta-oe/recipes-support/mysql/mysql5/configure.in.patch delete mode 100644 meta-oe/recipes-support/mysql/mysql5/fix-abi-check-gcc45.patch delete mode 100644 meta-oe/recipes-support/mysql/mysql5/fix_host_path.patch delete mode 100644 meta-oe/recipes-support/mysql/mysql5/misc.m4.patch delete mode 100644 meta-oe/recipes-support/mysql/mysql5/my.cnf delete mode 100644 meta-oe/recipes-support/mysql/mysql5/mysqld.sh delete mode 100644 meta-oe/recipes-support/mysql/mysql5/plug.in.patch (limited to 'meta-oe/recipes-support/mysql/mysql5') diff --git a/meta-oe/recipes-support/mysql/mysql5/Makefile.am.patch b/meta-oe/recipes-support/mysql/mysql5/Makefile.am.patch deleted file mode 100644 index 33fd17acd4..0000000000 --- a/meta-oe/recipes-support/mysql/mysql5/Makefile.am.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: mysql-5.1.40/sql/Makefile.am -=================================================================== ---- mysql-5.1.40.orig/sql/Makefile.am -+++ mysql-5.1.40/sql/Makefile.am -@@ -174,10 +174,10 @@ link_sources: - # This generates lex_hash.h - # NOTE Built sources should depend on their sources not the tool - # 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 -- $(MV) $@-t $@ -+GEN_LEX_HASH = ./gen_lex_hash$(EXEEXT) -+ -+lex_hash.h: gen_lex_hash$(EXEEXT) -+ $(GEN_LEX_HASH) > $@ - - # For testing of udf_example.so - udf_example_la_SOURCES= udf_example.c diff --git a/meta-oe/recipes-support/mysql/mysql5/configure-ps-cache-check.patch b/meta-oe/recipes-support/mysql/mysql5/configure-ps-cache-check.patch deleted file mode 100644 index 3b5b3fd063..0000000000 --- a/meta-oe/recipes-support/mysql/mysql5/configure-ps-cache-check.patch +++ /dev/null @@ -1,27 +0,0 @@ -Index: mysql-4.1.22/configure.in -=================================================================== ---- mysql-4.1.22.orig/configure.in 2009-01-28 16:33:28.000000000 +0000 -+++ mysql-4.1.22/configure.in 2009-01-28 16:43:26.000000000 +0000 -@@ -471,8 +471,8 @@ - - # Lock for PS - 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 p $$ 2> /dev/null | grep $0 > /dev/null - then -@@ -511,8 +511,9 @@ - AC_MSG_ERROR([Could not find the right ps switches. Which OS is this ?. See the Installation chapter in the Reference Manual.]) - esac - fi --AC_SUBST(FIND_PROC) --AC_MSG_RESULT("$FIND_PROC") -+ac_cv_FIND_PROC="$FIND_PROC" -+]) -+AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC]) - - # Check if a pid is valid - AC_PATH_PROG(KILL, kill, kill) diff --git a/meta-oe/recipes-support/mysql/mysql5/configure.in.patch b/meta-oe/recipes-support/mysql/mysql5/configure.in.patch deleted file mode 100644 index 3edc5f3c21..0000000000 --- a/meta-oe/recipes-support/mysql/mysql5/configure.in.patch +++ /dev/null @@ -1,54 +0,0 @@ -Index: mysql-5.1.40/configure.in -=================================================================== ---- mysql-5.1.40.orig/configure.in -+++ mysql-5.1.40/configure.in -@@ -226,8 +226,6 @@ else - AC_PATH_PROG(AS, as, as) - fi - --# Still need ranlib for readline; local static use only so no libtool. --AC_PROG_RANLIB - # We use libtool - #AC_LIBTOOL_WIN32_DLL - AC_PROG_LIBTOOL -@@ -255,39 +253,7 @@ AC_CHECK_PROGS(YACC, ['bison -y -p MYSQL - AC_CHECK_PROG(PDFMANUAL, pdftex, manual.pdf) - AC_CHECK_PROG(DVIS, tex, manual.dvi) - --#check the return type of sprintf --AC_MSG_CHECKING("return type of sprintf") --AC_TRY_RUN([ -- int main() -- { -- char* s = "hello"; -- char buf[6]; -- if((int)sprintf(buf, s) == strlen(s)) -- return 0; -- -- return -1; -- } -- ], -- [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf]) -- AC_MSG_RESULT("int")], -- [AC_TRY_RUN([ -- int main() -- { -- char* s = "hello"; -- char buf[6]; -- if((char*)sprintf(buf,s) == buf + strlen(s)) -- return 0; -- return -1; -- } ], -- [AC_DEFINE(SPRINTF_RETURNS_PTR, [1], [Broken sprintf]) -- AC_MSG_RESULT("ptr")], -- [AC_DEFINE(SPRINTF_RETURNS_GARBAGE, [1], [Broken sprintf]) -- AC_MSG_RESULT("garbage")] -- )], -- # Cross compile, assume POSIX -- [AC_DEFINE(SPRINTF_RETURNS_INT, [1], [POSIX sprintf]) -- AC_MSG_RESULT("int (we assume)")] --) -+MYSQL_SPRINTF_RET - - AC_PATH_PROG(uname_prog, uname, no) - diff --git a/meta-oe/recipes-support/mysql/mysql5/fix-abi-check-gcc45.patch b/meta-oe/recipes-support/mysql/mysql5/fix-abi-check-gcc45.patch deleted file mode 100644 index 58812c1f1a..0000000000 --- a/meta-oe/recipes-support/mysql/mysql5/fix-abi-check-gcc45.patch +++ /dev/null @@ -1,77 +0,0 @@ -From: Date: July 20 2010 7:44pm -Subject: bzr commit into mysql-5.1-bugteam branch (davi:3493) Bug#52514 -List-Archive: http://lists.mysql.com/commits/113968 -X-Bug: 52514 -MIME-Version: 1.0 -Content-Type: multipart/mixed; boundary="===============9147207462624717749==" - ---===============9147207462624717749== -MIME-Version: 1.0 -Content-Type: text/plain; charset="us-ascii" -Content-Transfer-Encoding: 7bit -Content-Disposition: inline - -# At a local mysql-5.1-bugteam repository of davi - - 3493 Davi Arnaut 2010-07-20 - Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5 - due to GCC preprocessor change - - The problem is that newer GCC versions treats missing headers - as fatal errors. The solution is to use a guard macro to prevent - the inclusion of system headers when checking the ABI with the - C Preprocessor. - - Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15638 - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44836 - @ Makefile.am - Define guard macro. - @ configure.in - Remove workaround. - @ include/mysql.h - Guard the header inclusion. - @ include/mysql.h.pp - Header is not included anymore. - - modified: - Makefile.am - configure.in - include/mysql.h - include/mysql.h.pp -=== modified file 'Makefile.am' -Index: mysql-5.1.40/Makefile.am -=================================================================== ---- mysql-5.1.40.orig/Makefile.am 2009-10-07 01:46:13.000000000 +0800 -+++ mysql-5.1.40/Makefile.am 2010-08-17 20:07:24.843148001 +0800 -@@ -312,7 +312,7 @@ - do_abi_check: - set -ex; \ - for file in $(abi_headers); do \ -- @CC@ -E -nostdinc -dI \ -+ @CC@ -E -nostdinc -dI -DMYSQL_ABI_CHECK \ - -I$(top_srcdir)/include \ - -I$(top_srcdir)/include/mysql \ - -I$(top_srcdir)/sql \ -Index: mysql-5.1.40/include/mysql.h -=================================================================== ---- mysql-5.1.40.orig/include/mysql.h 2009-10-07 01:46:50.000000000 +0800 -+++ mysql-5.1.40/include/mysql.h 2010-08-17 20:07:24.843148001 +0800 -@@ -44,7 +44,9 @@ - #endif - - #ifndef _global_h /* If not standard header */ -+#ifndef MYSQL_ABI_CHECK - #include -+#endif - #ifdef __LCC__ - #include /* For windows */ - #endif -Index: mysql-5.1.40/include/mysql.h.pp -=================================================================== ---- mysql-5.1.40.orig/include/mysql.h.pp 2009-10-07 01:46:50.000000000 +0800 -+++ mysql-5.1.40/include/mysql.h.pp 2010-08-17 20:07:24.843148001 +0800 -@@ -1,4 +1,3 @@ --#include - typedef char my_bool; - typedef int my_socket; - #include "mysql_version.h" diff --git a/meta-oe/recipes-support/mysql/mysql5/fix_host_path.patch b/meta-oe/recipes-support/mysql/mysql5/fix_host_path.patch deleted file mode 100644 index 4f69cd5198..0000000000 --- a/meta-oe/recipes-support/mysql/mysql5/fix_host_path.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- mysql-4.1.22/configure.in.old 2008-09-18 20:11:15.000000000 -0500 -+++ mysql-4.1.22/configure.in 2008-09-18 20:12:28.000000000 -0500 -@@ -456,9 +456,9 @@ else - fi - fi - --AC_SUBST(HOSTNAME) --AC_SUBST(PERL) --AC_SUBST(PERL5) -+AC_SUBST(HOSTNAME,/bin/hostname) -+AC_SUBST(PERL,$(bindir)/perl) -+AC_SUBST(PERL5,$(bindir)/perl) - - # for build ndb docs - -@@ -516,16 +516,17 @@ AC_MSG_RESULT("$FIND_PROC") - - # Check if a pid is valid - AC_PATH_PROG(KILL, kill, kill) -+AC_SUBST(KILL,/bin/kill) - AC_MSG_CHECKING("for kill switches") --if $ac_cv_path_KILL -0 $$ -+if $KILL -0 $$ - then -- CHECK_PID="$ac_cv_path_KILL -0 \$\$PID > /dev/null 2> /dev/null" -+ CHECK_PID="$KILL -0 \$\$PID > /dev/null 2> /dev/null" - elif kill -s 0 $$ - then -- CHECK_PID="$ac_cv_path_KILL -s 0 \$\$PID > /dev/null 2> /dev/null" -+ CHECK_PID="$KILL -s 0 \$\$PID > /dev/null 2> /dev/null" - else - AC_MSG_WARN([kill -0 to check for pid seems to fail]) -- CHECK_PID="$ac_cv_path_KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null" -+ CHECK_PID="$KILL -s SIGCONT \$\$PID > /dev/null 2> /dev/null" - fi - AC_SUBST(CHECK_PID) - AC_MSG_RESULT("$CHECK_PID") diff --git a/meta-oe/recipes-support/mysql/mysql5/misc.m4.patch b/meta-oe/recipes-support/mysql/mysql5/misc.m4.patch deleted file mode 100644 index 7b0acff21c..0000000000 --- a/meta-oe/recipes-support/mysql/mysql5/misc.m4.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: mysql-5.1.40/config/ac-macros/misc.m4 -=================================================================== ---- mysql-5.1.40.orig/config/ac-macros/misc.m4 -+++ mysql-5.1.40/config/ac-macros/misc.m4 -@@ -476,7 +476,7 @@ AC_DEFUN([MYSQL_STACK_DIRECTION], - { - exit (find_stack_direction() < 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 - diff --git a/meta-oe/recipes-support/mysql/mysql5/my.cnf b/meta-oe/recipes-support/mysql/mysql5/my.cnf deleted file mode 100644 index 7f557e4250..0000000000 --- a/meta-oe/recipes-support/mysql/mysql5/my.cnf +++ /dev/null @@ -1,21 +0,0 @@ -[client] -#password = password -port = 3306 -socket = /tmp/mysql.sock - -[mysqld_safe] -err-log = /var/log/mysql.err - -[mysqld] -user = mysql -port = 3306 -socket = /tmp/mysql.sock -pid-file = /var/lib/mysql/mysqld.pid -log-error = /var/log/mysqld.err -basedir = /usr -datadir = /var/mysql -skip-locking -loose-skip-innodb -skip-networking -bind-address = localhost - diff --git a/meta-oe/recipes-support/mysql/mysql5/mysqld.sh b/meta-oe/recipes-support/mysql/mysql5/mysqld.sh deleted file mode 100644 index 479ebdb257..0000000000 --- a/meta-oe/recipes-support/mysql/mysql5/mysqld.sh +++ /dev/null @@ -1,24 +0,0 @@ -# MySQL init script - -. /etc/default/rcS - -case "$1" in - start) - /usr/bin/mysqld_safe & - ;; - stop) - if test -f /var/lib/mysql/mysqld.pid ; then - PID=`cat /var/lib/mysql/mysqld.pid` - kill $PID - fi - ;; - restart) - $0 stop - $0 start - ;; - *) - echo "Usage: /etc/init.d/mysqld {start|stop|restart}" - ;; -esac - -exit 0 diff --git a/meta-oe/recipes-support/mysql/mysql5/plug.in.patch b/meta-oe/recipes-support/mysql/mysql5/plug.in.patch deleted file mode 100644 index 70c39fa7a3..0000000000 --- a/meta-oe/recipes-support/mysql/mysql5/plug.in.patch +++ /dev/null @@ -1,40 +0,0 @@ -Index: mysql-5.1.40/storage/innodb_plugin/plug.in -=================================================================== ---- mysql-5.1.40.orig/storage/innodb_plugin/plug.in -+++ mysql-5.1.40/storage/innodb_plugin/plug.in -@@ -63,35 +63,6 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin, [ - ;; - esac - AC_SUBST(INNODB_DYNAMIC_CFLAGS) -- AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins) -- AC_TRY_RUN( -- [ -- #include -- #include -- -- int main(int argc, char** argv) { -- 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); -- } -- ], -- [ -- AC_DEFINE([HAVE_ATOMIC_PTHREAD_T], [1], -- [pthread_t can be used by GCC atomic builtins]) -- AC_MSG_RESULT(yes) -- ], -- [ -- AC_MSG_RESULT(no) -- ] -- ) - - # Try using solaris atomics on SunOS if GCC atomics are not available - AC_CHECK_DECLS( -- cgit v1.2.3-54-g00ecf