From 56e60f751a0e2b8f0270da94bdb31537df566dee Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 19 Aug 2013 16:54:04 +0200 Subject: [PATCH] Revert "mysql: update to mysql-5.6.13, add initial and optional support for mysql server - dont use it, it will be changed later\!" This reverts commit 85c77b5252c91a30102a1d53a86b8b9a9f7eb423. --- packages/databases/mysql/package.mk | 173 +++++++----------- .../patches/mysql-010_crosscompiling.patch | 128 +++++++++++++ packages/databases/mysql/scripts/54_mysql | 43 ----- 3 files changed, 194 insertions(+), 150 deletions(-) create mode 100644 packages/databases/mysql/patches/mysql-010_crosscompiling.patch delete mode 100644 packages/databases/mysql/scripts/54_mysql diff --git a/packages/databases/mysql/package.mk b/packages/databases/mysql/package.mk index a3090fc0f5..438b857974 100644 --- a/packages/databases/mysql/package.mk +++ b/packages/databases/mysql/package.mk @@ -19,14 +19,14 @@ ################################################################################ PKG_NAME="mysql" -PKG_VERSION="5.6.13" +PKG_VERSION="5.1.70" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="LGPL" PKG_SITE="http://www.mysql.com" -PKG_URL="http://cdn.mysql.com/Downloads/MySQL-5.6/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_URL="http://ftp.gwdg.de/pub/misc/$PKG_NAME/Downloads/MySQL-5.1/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="zlib ncurses" -PKG_BUILD_DEPENDS_HOST="toolchain zlib:host ncurses" +PKG_BUILD_DEPENDS_HOST="toolchain zlib:host" PKG_BUILD_DEPENDS_TARGET="toolchain zlib ncurses mysql:host" PKG_PRIORITY="optional" PKG_SECTION="database" @@ -34,124 +34,83 @@ PKG_SHORTDESC="mysql: A database server" PKG_LONGDESC="MySQL is a SQL (Structured Query Language) database server. SQL is the most popular database language in the world. MySQL is a client server implementation that consists of a server daemon mysqld and many different client programs/libraries." PKG_IS_ADDON="no" -PKG_AUTORECONF="no" +PKG_AUTORECONF="yes" -# export MAKEFLAGS=-j1 +TARGET_CFLAGS="$TARGET_CFLAGS -fPIC -DPIC" -pre_configure_host() { - sed -i "/ADD_SUBDIRECTORY(sql\/share)/d" ../CMakeLists.txt - sed -i "s/ADD_SUBDIRECTORY(libmysql)/&\\nADD_SUBDIRECTORY(sql\/share)/" ../CMakeLists.txt - sed -i "s@data/test@\${INSTALL_MYSQLSHAREDIR}@g" ../sql/CMakeLists.txt - sed -i "s@data/mysql@\${INSTALL_MYSQLTESTDIR}@g" ../sql/CMakeLists.txt -} +PKG_CONFIGURE_OPTS_HOST="--with-zlib-dir=$ROOT/$TOOLCHAIN" -# package specific configure options -configure_host() { - cmake -DCMAKE_INSTALL_PREFIX=$TOOLCHAIN \ - -DCMAKE_BUILD_TYPE=Release \ - -DWITHOUT_SERVER=OFF \ - -DWITH_EMBEDDED_SERVER=OFF \ - -DWITH_EXAMPLE_STORAGE_ENGINE=OFF \ - -DWITH_FEDERATED_STORAGE_ENGINE=OFF \ - -DWITH_INNOBASE_STORAGE_ENGINE=OFF \ - -DWITH_PARTITION_STORAGE_ENGINE=OFF \ - -DWITH_PERFSCHEMA_STORAGE_ENGINE=OFF \ - -DWITH_EXTRA_CHARSETS=none \ - -DWITH_EDITLINE=bundled \ - -DWITH_LIBEVENT=bundled \ - -DWITH_SSL=bundled \ - -DWITH_UNIT_TESTS=OFF \ - -DWITH_ZLIB=bundled \ - .. -} +PKG_CONFIGURE_OPTS_TARGET="ac_cv_c_stack_direction=-1 \ + ac_cv_sys_restartable_syscalls=yes \ + --localstatedir=/storage/.mysql \ + --with-unix-socket-path=/var/tmp/mysql.socket \ + --with-tcp-port=3306 \ + --enable-static \ + --disable-shared \ + --with-low-memory \ + --enable-largefile \ + --with-big-tables \ + --with-mysqld-user=mysqld \ + --with-extra-charsets=all \ + --with-pthread \ + --with-named-thread-libs=-lpthread \ + --enable-thread-safe-client \ + --enable-assembler \ + --enable-local-infile \ + --without-debug \ + --without-docs \ + --without-man \ + --with-readline \ + --without-libwrap \ + --without-pstack \ + --without-server \ + --without-embedded-server \ + --without-libedit \ + --with-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" make_host() { - make comp_err - make gen_lex_hash - make comp_sql + make -C include my_config.h + make -C mysys libmysys.a + make -C strings libmystrings.a + make -C dbug factorial + make -C vio libvio.a + make -C dbug libdbug.a + make -C regex libregex.a + make -C sql gen_lex_hash + make -C scripts comp_sql + make -C extra comp_err } makeinstall_host() { - mkdir -p $ROOT/$TOOLCHAIN/bin - cp -PR extra/comp_err $ROOT/$TOOLCHAIN/bin - cp -PR sql/gen_lex_hash $ROOT/$TOOLCHAIN/bin - cp -PR scripts/comp_sql $ROOT/$TOOLCHAIN/bin -} - -configure_target() { -# strip_lto - cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \ - -DCMAKE_BUILD_TYPE=Release \ - -DFEATURE_SET=classic \ - -DDISABLE_SHARED=ON \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DINSTALL_DOCDIR=share/doc/mysql \ - -DINSTALL_DOCREADMEDIR=share/doc/mysql \ - -DINSTALL_INCLUDEDIR=include/mysql \ - -DINSTALL_INFODIR=share/info \ - -DINSTALL_MANDIR=share/man \ - -DINSTALL_MYSQLDATADIR=/storage/.mysql \ - -DINSTALL_MYSQLSHAREDIR=share/mysql \ - -DINSTALL_MYSQLTESTDIR=share/mysql/test \ - -DINSTALL_PLUGINDIR=lib/mysql/plugin \ - -DINSTALL_SBINDIR=sbin \ - -DINSTALL_SCRIPTDIR=bin \ - -DINSTALL_SQLBENCHDIR=share/mysql/bench \ - -DINSTALL_SUPPORTFILESDIR=share/mysql/support \ - -DMYSQL_DATADIR=/storage/.mysql \ - -DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \ - -DSYSCONFDIR=/etc/mysql \ - -DWITHOUT_SERVER=OFF \ - -DWITH_EMBEDDED_SERVER=OFF \ - -DWITH_EXAMPLE_STORAGE_ENGINE=OFF \ - -DWITH_FEDERATED_STORAGE_ENGINE=OFF \ - -DWITH_INNOBASE_STORAGE_ENGINE=OFF \ - -DWITH_PARTITION_STORAGE_ENGINE=OFF \ - -DWITH_PERFSCHEMA_STORAGE_ENGINE=OFF \ - -DWITH_EXTRA_CHARSETS=all \ - -DENABLE_DTRACE=OFF \ - -DWITH_EDITLINE=bundled \ - -DWITH_LIBEVENT=bundled \ - -DWITH_SSL=system \ - -DWITH_UNIT_TESTS=OFF \ - -DWITH_ZLIB=system \ - -DSTACK_DIRECTION=1 \ - .. -} - -pre_make_target() { -# copy host binaries back - should be fixed - cp -PR ../.$HOST_NAME/scripts/comp_sql ../scripts/comp_sql + cp -PR dbug/factorial $ROOT/$TOOLCHAIN/bin/mysql-factorial + cp -PR sql/gen_lex_hash $ROOT/$TOOLCHAIN/bin/mysql-gen_lex_hash + cp -PR scripts/comp_sql $ROOT/$TOOLCHAIN/bin/mysql-comp_sql + cp -PR extra/comp_err $ROOT/$TOOLCHAIN/bin/mysql-comp_err } post_makeinstall_target() { sed -i "s|pkgincludedir=.*|pkgincludedir=\'$SYSROOT_PREFIX/usr/include/mysql\'|" scripts/mysql_config sed -i "s|pkglibdir=.*|pkglibdir=\'$SYSROOT_PREFIX/usr/lib/mysql\'|" scripts/mysql_config + cp scripts/mysql_config $SYSROOT_PREFIX/usr/bin + ln -sf $SYSROOT_PREFIX/usr/bin/mysql_config $ROOT/$TOOLCHAIN/bin/mysql_config - mkdir -p $ROOT/$TOOLCHAIN/bin - cp -PR scripts/mysql_config $ROOT/$TOOLCHAIN/bin + for i in `ls -d $SYSROOT_PREFIX/usr/lib/mysql/*.a`; do + ln -v -sf $i $SYSROOT_PREFIX/usr/lib + done rm -rf $INSTALL/usr/bin - rm -rf $INSTALL/usr/sbin - rm -rf $INSTALL/usr/lib/mysql/plugin - rm -rf $INSTALL/usr/share/mysql/bench - rm -rf $INSTALL/usr/share/mysql/support - rm -rf $INSTALL/usr/share/mysql/test - - if [ "$MYSQL_SERVER" = "yes" ]; then - mkdir -p $INSTALL/usr/bin - cp -P extra/resolveip $INSTALL/usr/bin - cp -P extra/my_print_defaults $INSTALL/usr/bin - cp -P client/mysql $INSTALL/usr/bin - cp -P client/mysqladmin $INSTALL/usr/bin - cp -P scripts/mysql_install_db $INSTALL/usr/bin - - mkdir -p $INSTALL/usr/sbin - cp -P sql/mysqld $INSTALL/usr/sbin - - mkdir -p $INSTALL/etc/init.d - cp $PKG_DIR/scripts/* $INSTALL/etc/init.d - else - rm -rf $INSTALL/usr/share/mysql - fi + rm -rf $INSTALL/usr/mysql-test + rm -rf $INSTALL/usr/share/mysql + rm -rf $INSTALL/usr/sql-bench } diff --git a/packages/databases/mysql/patches/mysql-010_crosscompiling.patch b/packages/databases/mysql/patches/mysql-010_crosscompiling.patch new file mode 100644 index 0000000000..b6c3e068a1 --- /dev/null +++ b/packages/databases/mysql/patches/mysql-010_crosscompiling.patch @@ -0,0 +1,128 @@ +diff -Naur mysql-5.1.38/dbug/Makefile.am mysql-5.1.38.patch/dbug/Makefile.am +--- mysql-5.1.38/dbug/Makefile.am 2009-08-21 14:09:22.000000000 +0200 ++++ mysql-5.1.38.patch/dbug/Makefile.am 2009-09-10 02:57:59.000000000 +0200 +@@ -44,19 +44,19 @@ + -groff -mm user.r > $@ + + output1.r: factorial +- ./factorial 1 2 3 4 5 | cat > $@ ++ mysql-factorial 1 2 3 4 5 | cat > $@ + + output2.r: factorial +- ./factorial -\#t:o 2 3 | cat >$@ ++ mysql-factorial -\#t:o 2 3 | cat >$@ + + output3.r: factorial +- ./factorial -\#d:t:o 3 | cat >$@ ++ mysql-factorial -\#d:t:o 3 | cat >$@ + + output4.r: factorial +- ./factorial -\#d,result:o 4 | cat >$@ ++ mysql-factorial -\#d,result:o 4 | cat >$@ + + output5.r: factorial +- ./factorial -\#d:f,factorial:F:L:o 3 | cat >$@ ++ mysql-factorial -\#d:f,factorial:F:L:o 3 | cat >$@ + .c.r: + @RM@ -f $@ + @SED@ -e 's!\\!\\\\!g' $< > $@ +diff -Naur mysql-5.1.38/dbug/Makefile.in mysql-5.1.38.patch/dbug/Makefile.in +--- mysql-5.1.38/dbug/Makefile.in 2009-08-21 14:17:15.000000000 +0200 ++++ mysql-5.1.38.patch/dbug/Makefile.in 2009-09-10 02:58:14.000000000 +0200 +@@ -746,19 +746,19 @@ + -groff -mm user.r > $@ + + output1.r: factorial +- ./factorial 1 2 3 4 5 | cat > $@ ++ mysql-factorial 1 2 3 4 5 | cat > $@ + + output2.r: factorial +- ./factorial -\#t:o 2 3 | cat >$@ ++ mysql-factorial -\#t:o 2 3 | cat >$@ + + output3.r: factorial +- ./factorial -\#d:t:o 3 | cat >$@ ++ mysql-factorial -\#d:t:o 3 | cat >$@ + + output4.r: factorial +- ./factorial -\#d,result:o 4 | cat >$@ ++ mysql-factorial -\#d,result:o 4 | cat >$@ + + output5.r: factorial +- ./factorial -\#d:f,factorial:F:L:o 3 | cat >$@ ++ mysql-factorial -\#d:f,factorial:F:L:o 3 | cat >$@ + .c.r: + @RM@ -f $@ + @SED@ -e 's!\\!\\\\!g' $< > $@ +diff -Naur mysql-5.1.38/extra/Makefile.am mysql-5.1.38.patch/extra/Makefile.am +--- mysql-5.1.38/extra/Makefile.am 2009-08-21 14:09:23.000000000 +0200 ++++ mysql-5.1.38.patch/extra/Makefile.am 2009-09-10 02:53:50.000000000 +0200 +@@ -32,7 +32,7 @@ + $(top_builddir)/include/mysqld_error.h: comp_err.c \ + $(top_srcdir)/sql/share/errmsg.txt + $(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT) +- $(top_builddir)/extra/comp_err$(EXEEXT) \ ++ mysql-comp_err$(EXEEXT) \ + --charset=$(top_srcdir)/sql/share/charsets \ + --out-dir=$(top_builddir)/sql/share/ \ + --header_file=$(top_builddir)/include/mysqld_error.h \ +diff -Naur mysql-5.1.38/extra/Makefile.in mysql-5.1.38.patch/extra/Makefile.in +--- mysql-5.1.38/extra/Makefile.in 2009-08-21 14:17:16.000000000 +0200 ++++ mysql-5.1.38.patch/extra/Makefile.in 2009-09-10 02:53:16.000000000 +0200 +@@ -936,7 +936,7 @@ + $(top_builddir)/include/mysqld_error.h: comp_err.c \ + $(top_srcdir)/sql/share/errmsg.txt + $(MAKE) $(AM_MAKEFLAGS) comp_err$(EXEEXT) +- $(top_builddir)/extra/comp_err$(EXEEXT) \ ++ mysql-comp_err$(EXEEXT) \ + --charset=$(top_srcdir)/sql/share/charsets \ + --out-dir=$(top_builddir)/sql/share/ \ + --header_file=$(top_builddir)/include/mysqld_error.h \ +diff -Naur mysql-5.1.38/scripts/Makefile.am mysql-5.1.38.patch/scripts/Makefile.am +--- mysql-5.1.38/scripts/Makefile.am 2009-08-21 14:11:26.000000000 +0200 ++++ mysql-5.1.38.patch/scripts/Makefile.am 2009-09-10 02:57:01.000000000 +0200 +@@ -121,7 +121,7 @@ + mysql_fix_privilege_tables_sql.c: comp_sql.c mysql_fix_privilege_tables.sql + $(MAKE) $(AM_MAKEFLAGS) comp_sql$(EXEEXT) + sleep 2 +- $(top_builddir)/scripts/comp_sql$(EXEEXT) \ ++ mysql-comp_sql$(EXEEXT) \ + mysql_fix_privilege_tables \ + $(top_srcdir)/scripts/mysql_fix_privilege_tables.sql $@ + +diff -Naur mysql-5.1.38/scripts/Makefile.in mysql-5.1.38.patch/scripts/Makefile.in +--- mysql-5.1.38/scripts/Makefile.in 2009-08-21 14:17:23.000000000 +0200 ++++ mysql-5.1.38.patch/scripts/Makefile.in 2009-09-10 02:57:11.000000000 +0200 +@@ -802,7 +802,7 @@ + mysql_fix_privilege_tables_sql.c: comp_sql.c mysql_fix_privilege_tables.sql + $(MAKE) $(AM_MAKEFLAGS) comp_sql$(EXEEXT) + sleep 2 +- $(top_builddir)/scripts/comp_sql$(EXEEXT) \ ++ mysql-comp_sql$(EXEEXT) \ + mysql_fix_privilege_tables \ + $(top_srcdir)/scripts/mysql_fix_privilege_tables.sql $@ + +diff -Naur mysql-5.1.38/sql/Makefile.am mysql-5.1.38.patch/sql/Makefile.am +--- mysql-5.1.38/sql/Makefile.am 2009-08-21 14:12:24.000000000 +0200 ++++ mysql-5.1.38.patch/sql/Makefile.am 2009-09-10 02:55:09.000000000 +0200 +@@ -174,7 +174,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 ++ mysql-gen_lex_hash$(EXEEXT) > $@-t + $(MV) $@-t $@ + + # For testing of udf_example.so +diff -Naur mysql-5.1.38/sql/Makefile.in mysql-5.1.38.patch/sql/Makefile.in +--- mysql-5.1.38/sql/Makefile.in 2009-08-21 14:17:25.000000000 +0200 ++++ mysql-5.1.38.patch/sql/Makefile.in 2009-09-10 02:55:22.000000000 +0200 +@@ -1302,7 +1302,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 ++ mysql-gen_lex_hash$(EXEEXT) > $@-t + $(MV) $@-t $@ + + # We might have some stuff not built in this build, but that we want to install diff --git a/packages/databases/mysql/scripts/54_mysql b/packages/databases/mysql/scripts/54_mysql deleted file mode 100644 index 214c92ff6a..0000000000 --- a/packages/databases/mysql/scripts/54_mysql +++ /dev/null @@ -1,43 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -# start MySql Server -# -# runlevels: openelec, textmode - -( - - progress "Starting MySql server" - - if [ ! -f /storage/.mysql/data ] - then - mkdir -p /storage/.mysql - mkdir -p /storage/.mysql/data - - mysql_install_db --user=root --datadir=/storage/.mysql/data > /dev/null 2>&1 - (mysqld --user=root --datadir=/storage/.mysql/data > /dev/null 2>&1)& - mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'openelec' WITH GRANT OPTION;" > /dev/null 2>&1 - mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'openelec' WITH GRANT OPTION;" > /dev/null 2>&1 - killall mysqld - fi - - mysqld --user=root --datadir=/storage/.mysql/data > /dev/null 2>&1 -)& -