From 31f337c1af1223ca5e973f31c0cbc3599393e322 Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Thu, 26 Oct 2017 13:25:43 -0700 Subject: mysql: move to recipes-dbs Signed-off-by: Armin Kuster --- meta-oe/recipes-dbs/mysql/mariadb-native_5.5.57.bb | 19 ++ meta-oe/recipes-dbs/mysql/mariadb.inc | 297 +++++++++++++++++++++ .../mariadb/0001-disable-ucontext-on-musl.patch | 28 ++ .../mysql/mariadb/change-cc-to-cc-version.patch | 26 ++ .../mariadb/configure.cmake-fix-valgrind.patch | 41 +++ .../mysql/mariadb/fix-a-building-failure.patch | 31 +++ .../mysql/mariadb/fix-cmake-module-path.patch | 29 ++ .../mysql/mariadb/fix-mysqlclient-r-version.patch | 161 +++++++++++ meta-oe/recipes-dbs/mysql/mariadb/install_db | 13 + .../recipes-dbs/mysql/mariadb/install_db.service | 17 ++ meta-oe/recipes-dbs/mysql/mariadb/my.cnf | 25 ++ .../recipes-dbs/mysql/mariadb/mysql-systemd-start | 66 +++++ meta-oe/recipes-dbs/mysql/mariadb/mysqld.service | 25 ++ .../mysql/mariadb/remove-bad-path.patch | 18 ++ meta-oe/recipes-dbs/mysql/mariadb_5.5.57.bb | 27 ++ meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb | 17 ++ .../recipes-support/mysql/mariadb-native_5.5.57.bb | 19 -- meta-oe/recipes-support/mysql/mariadb.inc | 297 --------------------- .../mariadb/0001-disable-ucontext-on-musl.patch | 28 -- .../mysql/mariadb/change-cc-to-cc-version.patch | 26 -- .../mariadb/configure.cmake-fix-valgrind.patch | 41 --- .../mysql/mariadb/fix-a-building-failure.patch | 31 --- .../mysql/mariadb/fix-cmake-module-path.patch | 29 -- .../mysql/mariadb/fix-mysqlclient-r-version.patch | 161 ----------- meta-oe/recipes-support/mysql/mariadb/install_db | 13 - .../mysql/mariadb/install_db.service | 17 -- meta-oe/recipes-support/mysql/mariadb/my.cnf | 25 -- .../mysql/mariadb/mysql-systemd-start | 66 ----- .../recipes-support/mysql/mariadb/mysqld.service | 25 -- .../mysql/mariadb/remove-bad-path.patch | 18 -- meta-oe/recipes-support/mysql/mariadb_5.5.57.bb | 27 -- .../recipes-support/mysql/mysql-python_1.2.5.bb | 17 -- 32 files changed, 840 insertions(+), 840 deletions(-) create mode 100644 meta-oe/recipes-dbs/mysql/mariadb-native_5.5.57.bb create mode 100644 meta-oe/recipes-dbs/mysql/mariadb.inc create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch create mode 100755 meta-oe/recipes-dbs/mysql/mariadb/install_db create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/install_db.service create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/my.cnf create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/mysql-systemd-start create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/mysqld.service create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch create mode 100644 meta-oe/recipes-dbs/mysql/mariadb_5.5.57.bb create mode 100644 meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb delete mode 100644 meta-oe/recipes-support/mysql/mariadb-native_5.5.57.bb delete mode 100644 meta-oe/recipes-support/mysql/mariadb.inc delete mode 100644 meta-oe/recipes-support/mysql/mariadb/0001-disable-ucontext-on-musl.patch delete mode 100644 meta-oe/recipes-support/mysql/mariadb/change-cc-to-cc-version.patch delete mode 100644 meta-oe/recipes-support/mysql/mariadb/configure.cmake-fix-valgrind.patch delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-a-building-failure.patch delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch delete mode 100644 meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch delete mode 100755 meta-oe/recipes-support/mysql/mariadb/install_db delete mode 100644 meta-oe/recipes-support/mysql/mariadb/install_db.service delete mode 100644 meta-oe/recipes-support/mysql/mariadb/my.cnf delete mode 100644 meta-oe/recipes-support/mysql/mariadb/mysql-systemd-start delete mode 100644 meta-oe/recipes-support/mysql/mariadb/mysqld.service delete mode 100644 meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch delete mode 100644 meta-oe/recipes-support/mysql/mariadb_5.5.57.bb delete mode 100644 meta-oe/recipes-support/mysql/mysql-python_1.2.5.bb diff --git a/meta-oe/recipes-dbs/mysql/mariadb-native_5.5.57.bb b/meta-oe/recipes-dbs/mysql/mariadb-native_5.5.57.bb new file mode 100644 index 0000000000..4ce960d7da --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb-native_5.5.57.bb @@ -0,0 +1,19 @@ +require mariadb.inc +inherit native + +PROVIDES += "mysql5-native" +DEPENDS = "ncurses-native zlib-native bison-native" + +RDEPENDS_${PN} = "" +PACKAGES = "" +EXTRA_OEMAKE = "" + +do_install() { + oe_runmake 'DESTDIR=${D}' install + + install -d ${D}${bindir} + install -m 0755 sql/gen_lex_hash ${D}${bindir}/ + install -m 0755 extra/comp_err ${D}${bindir}/ + install -m 0755 scripts/comp_sql ${D}${bindir}/ +} + diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc new file mode 100644 index 0000000000..a29d441e14 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -0,0 +1,297 @@ +SUMMARY = "A robust, scalable, and reliable SQL server" +HOMEPAGE = "http://mariadb.org" +SECTION = "libs" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +SRC_URI = "https://downloads.mariadb.org/f/${BP}/source/${BP}.tar.gz \ + file://fix-cmake-module-path.patch \ + file://remove-bad-path.patch \ + file://fix-mysqlclient-r-version.patch \ + file://my.cnf \ + file://mysqld.service \ + file://install_db.service \ + file://install_db \ + file://mysql-systemd-start \ + file://configure.cmake-fix-valgrind.patch \ + file://fix-a-building-failure.patch \ + file://change-cc-to-cc-version.patch \ + file://0001-disable-ucontext-on-musl.patch \ + " + +SRC_URI[md5sum] = "2d4104aae0b9e5efa8878918bd329cb4" +SRC_URI[sha256sum] = "5dbde98d7e4a5a1721b6cbed7898b2549a88866247951cf586057975c6cea641" + +S = "${WORKDIR}/mariadb-${PV}" + +BINCONFIG_GLOB = "mysql_config" + +inherit cmake gettext binconfig update-rc.d useradd systemd + +INITSCRIPT_PACKAGES = "${PN}-server ${PN}-setupdb" +INITSCRIPT_NAME_${PN}-server = "mysqld" +INITSCRIPT_PARAMS_${PN}-server ?= "start 45 5 . stop 45 0 6 1 ." + +USERADD_PACKAGES = "${PN}-server" +USERADD_PARAM_${PN}-server = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql" +GROUPADD_PARAM_${PN}-server = "--system mysql" + +INITSCRIPT_NAME_${PN}-setupdb = "install_db" +INITSCRIPT_PARAMS_${PN}-setupdb ?= "defaults 44 44" + +SYSTEMD_PACKAGES = "${PN}-server ${PN}-setupdb" +SYSTEMD_SERVICE_${PN}-server = "mysqld.service" +SYSTEMD_AUTO_ENABLE_${PN}-server ?= "disable" + +SYSTEMD_SERVICE_${PN}-setupdb = "install_db.service" +SYSTEMD_AUTO_ENABLE_${PN}-setupdb ?= "enable" +ALLOW_EMPTY_${PN}-setupdb ?= "1" +FILES_${PN}-setupdb = "${sysconfdir}/init.d/install_db" + +EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} setupdb" +PACKAGECONFIG_class-native = "" +PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam" +PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind" +PACKAGECONFIG[libedit] = "-DLIBEDIT_INTERFACE=TRUE,-DLIBEDIT_INTERFACE=FALSE,libedit" +PACKAGECONFIG[krb5] = ", ,krb5" +PACKAGECONFIG[setupdb] = ", ,,${PN}-setupdb" + +# MariaDB doesn't link properly with gold +# https://mariadb.atlassian.net/browse/MDEV-5982 +TARGET_CFLAGS += "-fuse-ld=bfd" + +BUILD_CFLAGS += "-fuse-ld=bfd" +BUILD_CXXFLAGS += "-fuse-ld=bfd" + +EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ + -DWITH_JEMALLOC=no \ + -DWITHOUT_TOKUDB=TRUE \ + -DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE \ + -DGROFF=FALSE \ + -DNROFF=FALSE \ + -DENABLE_DTRACE=FALSE \ + -DWITH_PIC=ON \ + -DINSTALL_LAYOUT=RPM \ + -DINSTALL_DOCDIR:PATH=${datadir}/doc/${BPN} \ + -DINSTALL_LIBDIR:PATH=${baselib} \ + -DINSTALL_PLUGINDIR:PATH=${baselib}/plugin \ + -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \ + -DMYSQL_DATADIR:PATH=/var/mysql \ + -DCAT_EXECUTABLE=`which cat` \ + -DCMAKE_AR:FILEPATH=${AR}" + +# With Ninja it fails with: +# make: *** No rule to make target `install'. Stop. +OECMAKE_GENERATOR = "Unix Makefiles" + +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" + +do_configure_append() { + # handle distros with different values of ${libexecdir} + libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'` + sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh + sed -i -e "s:mysqld libexec:mysqld $libexecdir2:g" ${S}/scripts/mysql_install_db.sh + sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh +} + +do_generate_toolchain_file_append_class-native () { + # If these are set cmake will assume we're cross-compiling, which will + # result in certain things we want being disabled + sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake + sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake +} + +do_compile_prepend_class-target () { + # These need to be in-tree or make will think they need to be built, + # and since we're cross-compiling that is disabled + cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra + cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'krb5', 'yes', 'no', d)}" = "no" ]; then + if ! [ -e ${B}/include/openssl/kssl.h ] ; then + mkdir -p ${B}/include/openssl + echo "#ifndef KSSL_H" >${B}/include/openssl/kssl.h + echo "#define KSSL_H" >>${B}/include/openssl/kssl.h + echo "#include ">>${B}/include/openssl/kssl.h + echo "#endif" >>${B}/include/openssl/kssl.h + fi + fi +} + +SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess" + +# We need to append this so it runs *after* binconfig's preprocess function +# +# We really don't care exactly what the directories were set to originally. +# plugindir is not fixed, but we don't create any plugins. +# +mariadb_sysroot_preprocess () { + sed -i -es,^pkgincludedir=.*,pkgincludedir=\'${STAGING_INCDIR}/mysql\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config + sed -i -es,^pkglibdir=.*,pkglibdir=\'${STAGING_LIBDIR}\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install + + install -d ${D}/${sysconfdir}/init.d + install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/ + install -m 0755 ${WORKDIR}/install_db ${D}/${sysconfdir}/init.d/ + mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/mysqld.service ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/install_db.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \ + ${D}${systemd_unitdir}/system/install_db.service + + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d + echo "f /var/log/mysqld.err 0640 mysql mysql -" \ + > ${D}${sysconfdir}/tmpfiles.d/99-mysqld.conf + fi + install -d ${D}${bindir} + install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir} + install -d ${D}${datadir}/doc/${PN} + if [ -f ${D}${datadir}/doc/README ]; then + mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/ + fi +} + +PACKAGES = "${PN}-dbg ${PN} \ + libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-staticdev libmysqlclient-r-dbg \ + libmysqlclient libmysqlclient-dev libmysqlclient-staticdev libmysqlclient-dbg \ + libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-setupdb ${PN}-leftovers" +CONFFILES_${PN}-server += "${sysconfdir}/my.cnf ${sysconfdir}/my.cnf.d/server.cnf" +CONFFILES_${PN}-client += "${sysconfdir}/my.cnf.d/mysql-clients.cnf" +CONFFILES_libmysqlclient += "${sysconfdir}/my.cnf.d/client.cnf" + +FILES_${PN} = " " +RDEPENDS_${PN} = "${PN}-client ${PN}-server" +ALLOW_EMPTY_${PN} = "1" + +RDEPENDS_${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \ + perl-module-fcntl perl-module-sys-hostname perl-module-ipc-open3 \ + perl-module-exporter" +RDEPENDS_${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \ + perl-module-file-basename perl-module-file-path perl-module-sys-hostname \ + perl-module-file-copy perl-module-file-temp perl-module-posix \ + ${PN}-client libdbi-perl libdbd-mysql-perl" +RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \ + perl-module-posix perl-module-data-dumper perl-module-sigtrap perl-module-threads \ + perl-module-threads-shared perl-module-io-socket perl-module-sys-hostname perl-module-file-copy \ + perl-module-file-spec perl-module-file-find perl-module-file-basename perl-module-file-path \ + perl-module-constant perl-module-lib perl-module-file-temp perl-module-file-spec-functions \ + perl-module-io-socket-inet perl-module-io-select" +RDEPENDS_${PN}-setupdb = "coreutils" + +# Allow old code to link to the backward compatible library +RDEPENDS_libmysqlclient-dev = "libmysqlclient-r-dev" + +FILES_libmysqlclient = "\ + ${libdir}/libmysqlclient.so.* \ + ${sysconfdir}/my.cnf.d/client.cnf" +FILES_libmysqlclient-dev = " \ + ${includedir}/mysql/ \ + ${libdir}/libmysqlclient.so \ + ${sysconfdir}/aclocal \ + ${bindir}/mysql_config" +FILES_libmysqlclient-staticdev = "\ + ${libdir}/*.a" +FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \ + ${datadir}/mysql-test/lib/My/SafeProcess/.debug/my_safe_process" + +# Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0 +# which are intentionally non-PIC on 32-bit x86 (see e.g. +# storage/xtradb/plug.in in the source) +INSANE_SKIP_libmysqlclient_append_x86 = " textrel" + +FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*" +FILES_libmysqlclient-r-dev = "\ + ${libdir}/libmysqlclient_r.so" +FILES_libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a" +FILES_libmysqlclient-r-dbg = "${libdir}/plugin/.debuglibmysqlclient_r.so.*" + +FILES_libmysqld = "\ + ${libdir}/libmysqld.so.*" +FILES_libmysqld-dev = "\ + ${libdir}/libmysqld.so" + +FILES_${PN}-client = "\ + ${bindir}/myisam_ftdump \ + ${bindir}/mysql \ + ${bindir}/mysql_client_test \ + ${bindir}/mysql_client_test_embedded \ + ${bindir}/mysql_find_rows \ + ${bindir}/mysql_fix_extensions \ + ${bindir}/mysql_waitpid \ + ${bindir}/mysqlaccess \ + ${bindir}/mysqladmin \ + ${bindir}/mysqlbug \ + ${bindir}/mysqlcheck \ + ${bindir}/mysqldump \ + ${bindir}/mysqldumpslow \ + ${bindir}/mysqlimport \ + ${bindir}/mysqlshow \ + ${bindir}/mysqlslap \ + ${bindir}/mysqltest_embedded \ + ${libexecdir}/mysqlmanager \ + ${sysconfdir}/my.cnf.d/mysql-clients.cnf" + +FILES_${PN}-server = "\ + ${bindir}/comp_err \ + ${bindir}/isamchk \ + ${bindir}/isamlog \ + ${bindir}/msql2mysql \ + ${bindir}/my_print_defaults \ + ${bindir}/myisamchk \ + ${bindir}/myisamlog \ + ${bindir}/myisampack \ + ${bindir}/mysql_convert_table_format \ + ${bindir}/mysql_fix_privilege_tables \ + ${bindir}/mysql_install_db \ + ${bindir}/mysql_secure_installation \ + ${bindir}/mysql_setpermission \ + ${bindir}/mysql-systemd-start \ + ${bindir}/mysql_tzinfo_to_sql \ + ${bindir}/mysql_upgrade \ + ${bindir}/mysql_plugin \ + ${bindir}/mysql_zap \ + ${bindir}/mysqlbinlog \ + ${bindir}/mysqld_multi \ + ${bindir}/mysqld_safe \ + ${bindir}/mysqld_safe_helper \ + ${bindir}/mysqlhotcopy \ + ${bindir}/mysqltest \ + ${bindir}/ndb_delete_all \ + ${bindir}/ndb_desc \ + ${bindir}/ndb_drop_index \ + ${bindir}/ndb_drop_table \ + ${bindir}/ndb_mgm \ + ${bindir}/ndb_restore \ + ${bindir}/ndb_select_all \ + ${bindir}/ndb_select_count \ + ${bindir}/ndb_show_tables \ + ${bindir}/ndb_waiter \ + ${bindir}/pack_isam \ + ${bindir}/perror \ + ${bindir}/replace \ + ${bindir}/resolve_stack_dump \ + ${bindir}/resolveip \ + ${libexecdir}/mysqld \ + ${sbindir}/mysqld \ + ${sbindir}/ndb_cpcd \ + ${sbindir}/ndbd \ + ${sbindir}/ndb_mgmd \ + ${libdir}/plugin/*.so \ + ${datadir}/mysql/ \ + ${localstatedir}/mysql/ \ + ${sysconfdir}/init.d/mysqld \ + ${sysconfdir}/my.cnf \ + ${sysconfdir}/my.cnf.d/server.cnf \ + ${sysconfdir}/tmpfiles.d" + +DESCRIPTION_${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}" +FILES_${PN}-leftovers = "/" diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch new file mode 100644 index 0000000000..60e9199f95 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch @@ -0,0 +1,28 @@ +From 5bc3e7ef9700d12054e0125a126f1bb093f01ef9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 26 Mar 2017 14:30:33 -0700 +Subject: [PATCH] disable ucontext on musl + +musl does not have *contex() APIs even though it has ucontext.h header + +Signed-off-by: Khem Raj +--- + include/my_context.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/my_context.h b/include/my_context.h +index dd44103..9b28c17 100644 +--- a/include/my_context.h ++++ b/include/my_context.h +@@ -31,7 +31,7 @@ + #define MY_CONTEXT_USE_X86_64_GCC_ASM + #elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__) + #define MY_CONTEXT_USE_I386_GCC_ASM +-#elif defined(HAVE_UCONTEXT_H) ++#elif defined(__GLIBC__) && defined(HAVE_UCONTEXT_H) + #define MY_CONTEXT_USE_UCONTEXT + #else + #define MY_CONTEXT_DISABLE +-- +2.12.1 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch b/meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch new file mode 100644 index 0000000000..02bda24f7b --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch @@ -0,0 +1,26 @@ +mariadb: replace the CC with CC_VERSION and CXX with CXX_VERSION + +mysqlbug.sh is a bug report script. It makes a report with the build information, +including gcc version. The CC is the local path of gcc, which is useless for bug +report, and the path may expose private information, so change it to CC_VERSION. + +Upstream-Status: Pending + +Signed-off-by: Yue Tao +Signed-off-by: Wenzong Fan +================================ +diff --git a/scripts/mysqlbug.sh.old b/scripts/mysqlbug.sh +index e9df210..d4b8d53 100644 +--- a/scripts/mysqlbug.sh.old ++++ b/scripts/mysqlbug.sh +@@ -24,8 +24,8 @@ VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@" + COMPILATION_COMMENT="@COMPILATION_COMMENT@" + BUGmysql="maria-developers@lists.launchpad.net" + # This is set by configure +-COMP_CALL_INFO="CC='@SAVE_CC@' CFLAGS='@SAVE_CFLAGS@' CXX='@SAVE_CXX@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'" +-COMP_RUN_INFO="CC='@CC@' CFLAGS='@CFLAGS@' CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'" ++COMP_CALL_INFO="CC='@CC_VERSION@' CFLAGS='@SAVE_CFLAGS@' CXX='@CXX_VERSION@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'" ++COMP_RUN_INFO="CC='@CC_VERSION@' CFLAGS='@CFLAGS@' CXX='@CXX_VERSION@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'" + CONFIGURE_LINE="@CONF_COMMAND@" + + LIBC_INFO="" diff --git a/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch b/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch new file mode 100644 index 0000000000..e97def6021 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch @@ -0,0 +1,41 @@ +From 5effba0d7d47071a3f1bca56823190d5a95bb1a6 Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Wed, 12 Nov 2014 03:09:10 -0500 +Subject: [PATCH] configure.cmake: fix valgrind + +Check valgrind headers only if WITH_VALGRIND is set. + +mariadb uses two macros for valgrind compilations: +HAVE_valgrind - valgrind is installed and can be set by configure option -DWITH_VALGRIND +HAVE_VALGRIND - valgrind debug libraries is installed, set by auto check + +We would like to set them both by the configure option so that we can use +PACKAGECONFIG to decide if valgrind is needed or not. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Jackie Huang +--- + configure.cmake | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.cmake b/configure.cmake +index 0bd7bbe..51a098f 100644 +--- a/configure.cmake ++++ b/configure.cmake +@@ -1047,10 +1047,10 @@ MARK_AS_ADVANCED(WITH_ATOMIC_LOCKS MY_ATOMIC_MODE_RWLOCK MY_ATOMIC_MODE_DUMMY) + + IF(WITH_VALGRIND) + SET(HAVE_valgrind 1) ++ CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h" ++ HAVE_VALGRIND) + ENDIF() + +-CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h" +- HAVE_VALGRIND) + + #-------------------------------------------------------------------- + # Check for IPv6 support +-- +2.0.0 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch b/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch new file mode 100644 index 0000000000..0c4e10237c --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch @@ -0,0 +1,31 @@ +[PATCH] fix a building failure + +Upstream-Status: Inappropriate [configuration] + +building failed since native does not generate import_executables.cmake +In fact, our building system will export the needed commands + +Signed-off-by: Roy Li +--- + CMakeLists.txt | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c1ce1c5..83b3a7e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -350,11 +350,6 @@ MYSQL_CHECK_READLINE() + + CHECK_JEMALLOC() + +-IF(CMAKE_CROSSCOMPILING) +- SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build") +- INCLUDE(${IMPORT_EXECUTABLES}) +-ENDIF() +- + # + # Setup maintainer mode options by the end. Platform checks are + # not run with the warning options as to not perturb fragile checks +-- +1.9.1 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch b/meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch new file mode 100644 index 0000000000..8d9f558d05 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch @@ -0,0 +1,29 @@ +Avoid CMAKE_MODULE_PATH being overwritten + +OE-Core's setting of CMAKE_MODULE_PATH stomps on MariaDB's value unless +we set it after setting the project name. + +Signed-off-by: Paul Eggleton + +Upstream-Status: Inappropriate [working around OE-Core bug] + +--- mariadb/CMakeLists.txt 2014-07-17 11:01:07.676353047 +0100 ++++ mariadb/CMakeLists.txt 2014-07-17 11:01:31.299353107 +0100 +@@ -28,8 +28,6 @@ + + MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}") + +-SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) +- + # Distinguish between community and non-community builds, with the + # default being a community build. This does not impact the feature + # set that will be compiled in; it's merely provided as a hint to +@@ -77,6 +75,8 @@ + ENDIF() + PROJECT(${MYSQL_PROJECT_NAME}) + ++SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) ++ + IF(BUILD_CONFIG) + INCLUDE( + ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake) diff --git a/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch b/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch new file mode 100644 index 0000000000..7516619ebb --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch @@ -0,0 +1,161 @@ +From 6db2a606196fb38a6d106dc409eee1cb9a40a440 Mon Sep 17 00:00:00 2001 +From: Tor Didriksen +Date: Mon, 24 Jun 2013 17:15:35 +0200 +Subject: [PATCH] Bug#16809055 MYSQL 5.6 AND 5.7 STILL USE LIBMYSQLCLIENT.SO.18 + +With this patch, the libmysql/ directory contains: +libmysqlclient.a +libmysqlclient_r.a -> libmysqlclient.a +libmysqlclient_r.so -> libmysqlclient.so* +libmysqlclient_r.so.18 -> libmysqlclient.so.18* +libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0* +libmysqlclient.so -> libmysqlclient.so.18* +libmysqlclient.so.18 -> libmysqlclient.so.18.1.0* +libmysqlclient.so.18.1.0* + +This fixes libmysqlclient_r symlinks pointing to the unversioned +libmysqlclient.so symlink (leading to package QA errors since the +libmysqlclient-r package ends up depending on libmysqlclient-dev). + +Borrowed from MySQL 5.6 tree at https://github.com/percona/mysql/ + +Upstream-Status: Pending + +Signed-off-by: Paul Eggleton + +--- + cmake/install_macros.cmake | 25 +++++++++++++++---------- + cmake/mysql_version.cmake | 3 ++- + libmysql/CMakeLists.txt | 36 ++++++++++++++++++++++++++++-------- + 3 files changed, 45 insertions(+), 19 deletions(-) + +diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake +index b8efdf8..a0d0e68 100644 +--- a/cmake/install_macros.cmake ++++ b/cmake/install_macros.cmake +@@ -1,4 +1,4 @@ +-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + # + # 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 +@@ -111,28 +111,33 @@ FUNCTION(INSTALL_SCRIPT) + ENDFUNCTION() + + # Install symbolic link to CMake target. +-# the link is created in the same directory as target +-# and extension will be the same as for target file. +-MACRO(INSTALL_SYMLINK linkname target destination component) ++# We do 'cd path; ln -s target_name link_name' ++# We also add an INSTALL target for "${path}/${link_name}" ++MACRO(INSTALL_SYMLINK target target_name link_name destination component) + IF(UNIX) + GET_TARGET_PROPERTY(location ${target} LOCATION) + GET_FILENAME_COMPONENT(path ${location} PATH) +- GET_FILENAME_COMPONENT(name ${location} NAME) +- SET(output ${path}/${linkname}) ++ MESSAGE(STATUS "target ${target}") ++ MESSAGE(STATUS "link_name ${link_name}") ++ MESSAGE(STATUS "target_name ${target_name}") ++ MESSAGE(STATUS "path ${path}") ++ MESSAGE(STATUS "") ++ ++ SET(output ${path}/${link_name}) + ADD_CUSTOM_COMMAND( + OUTPUT ${output} + COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output} + COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink +- ${name} +- ${linkname} ++ ${target_name} ++ ${link_name} + WORKING_DIRECTORY ${path} + DEPENDS ${target} + ) + +- ADD_CUSTOM_TARGET(symlink_${linkname} ++ ADD_CUSTOM_TARGET(symlink_${link_name} + ALL + DEPENDS ${output}) +- SET_TARGET_PROPERTIES(symlink_${linkname} PROPERTIES CLEAN_DIRECT_OUTPUT 1) ++ SET_TARGET_PROPERTIES(symlink_${link_name} PROPERTIES CLEAN_DIRECT_OUTPUT 1) + IF(CMAKE_GENERATOR MATCHES "Xcode") + # For Xcode, replace project config with install config + STRING(REPLACE "${CMAKE_CFG_INTDIR}" +diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt +index be5760f..96286ff 100644 +--- a/libmysql/CMakeLists.txt ++++ b/libmysql/CMakeLists.txt +@@ -180,6 +180,12 @@ IF(MSVC) + INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug) + ENDIF() + ++MACRO(GET_TARGET_NAME target out_name) ++ GET_TARGET_PROPERTY(location ${target} LOCATION) ++ GET_FILENAME_COMPONENT(name ${location} NAME) ++ SET(${out_name} ${name}) ++ENDMACRO() ++ + IF(UNIX) + MACRO(GET_VERSIONED_LIBNAME LIBNAME EXTENSION VERSION OUTNAME) + SET(DOT_VERSION ".${VERSION}") +@@ -192,7 +198,13 @@ IF(UNIX) + SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION}) + ENDIF() + ENDMACRO() +- INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development) ++ENDIF() ++ ++IF(UNIX) ++ GET_TARGET_NAME(mysqlclient lib_name) ++ INSTALL_SYMLINK(mysqlclient ++ ${lib_name} ${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a ++ ${INSTALL_LIBDIR} Development) + ENDIF() + + IF(NOT DISABLE_SHARED) +@@ -205,10 +217,9 @@ IF(NOT DISABLE_SHARED) + # libtool compatability + IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE) + SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}") +- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX") +- SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0") + ELSE() +- SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0") ++ SET(OS_SHARED_LIB_VERSION ++ "${SHARED_LIB_MAJOR_VERSION}.${SHARED_LIB_MINOR_VERSION}.0") + ENDIF() + # Name of shared library is mysqlclient on Unix + SET_TARGET_PROPERTIES(libmysql PROPERTIES +@@ -239,8 +250,13 @@ IF(NOT DISABLE_SHARED) + "${CMAKE_SHARED_LIBRARY_SUFFIX}" + "" + linkname) +- INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries) +- SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}") ++ GET_TARGET_NAME(libmysql lib_name) ++ GET_FILENAME_COMPONENT(lib_name_we ${lib_name} NAME_WE) ++ INSTALL_SYMLINK(libmysql ++ ${lib_name} ${linkname} ++ ${INSTALL_LIBDIR} SharedLibraries) ++ SET(OS_SHARED_LIB_SYMLINKS ++ "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}") + LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS) + FOREACH(ver ${OS_SHARED_LIB_SYMLINKS}) + GET_VERSIONED_LIBNAME( +@@ -248,7 +264,11 @@ IF(NOT DISABLE_SHARED) + "${CMAKE_SHARED_LIBRARY_SUFFIX}" + "${ver}" + linkname) +- INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries) ++ GET_VERSIONED_LIBNAME( ++ ${lib_name_we} "${CMAKE_SHARED_LIBRARY_SUFFIX}" "${ver}" lib_name_ver) ++ INSTALL_SYMLINK(libmysql ++ ${lib_name_ver} ${linkname} ++ ${INSTALL_LIBDIR} SharedLibraries) + ENDFOREACH() + ENDIF() + ENDIF() +-- +2.0.3 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/install_db b/meta-oe/recipes-dbs/mysql/mariadb/install_db new file mode 100755 index 0000000000..512a7da7ee --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/install_db @@ -0,0 +1,13 @@ +#! /bin/sh +case "$1" in + start) + echo "Starting to install database for mariadb" + /usr/bin/mysql-systemd-start pre + echo "done." + ;; + *) + echo "Usage: /etc/init.d/install_db start" + exit 1 +esac + +exit 0 diff --git a/meta-oe/recipes-dbs/mysql/mariadb/install_db.service b/meta-oe/recipes-dbs/mysql/mariadb/install_db.service new file mode 100644 index 0000000000..c8369f569b --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/install_db.service @@ -0,0 +1,17 @@ +# +# Simple install MySQL database service file +# It shoulb be done before mysqld.service + +[Unit] +Description=Install MySQL Community Server Database +After=network.target +After=syslog.target +Before=mysqld.service + +[Install] +WantedBy=multi-user.target + +[Service] +Type=oneshot +ExecStart=@BINDIR@/mysql-systemd-start pre + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/my.cnf b/meta-oe/recipes-dbs/mysql/mariadb/my.cnf new file mode 100644 index 0000000000..dc4c172e54 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/my.cnf @@ -0,0 +1,25 @@ +[client] +#password = password +port = 3306 +socket = /var/lib/mysql/mysql.sock + +[mysqld_safe] + +[mysqld] +user = mysql +port = 3306 +socket = /var/lib/mysql/mysql.sock +pid-file = /var/lib/mysql/mysqld.pid +log-error = /var/log/mysqld.err +basedir = /usr +datadir = /var/lib/mysql +skip-external-locking +skip-networking +ignore-builtin-innodb +default-storage-engine = myisam +bind-address = localhost + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d diff --git a/meta-oe/recipes-dbs/mysql/mariadb/mysql-systemd-start b/meta-oe/recipes-dbs/mysql/mariadb/mysql-systemd-start new file mode 100644 index 0000000000..189c02021d --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/mysql-systemd-start @@ -0,0 +1,66 @@ +#! /bin/sh +# +# Needed argument: pre | post +# +# pre mode : try to run mysql_install_db and fix perms and SELinux contexts +# post mode : ping server until answer is received +# + +get_option () { + local section=$1 + local option=$2 + local default=$3 + ret=$(/usr/bin/my_print_defaults $section | grep '^--'${option}'=' | cut -d= -f2-) + [ -z $ret ] && ret=$default + echo $ret +} + +install_db () { + # Note: something different than datadir=/var/lib/mysql requires SELinux policy changes (in enforcing mode) + datadir=$(get_option mysqld datadir "/var/lib/mysql") + + # Restore log, dir, perms and SELinux contexts + [ -d "$datadir" ] || install -d -m 0755 -omysql -gmysql "$datadir" || exit 1 + log=/var/log/mysqld.log + [ -e $log ] || touch $log + chmod 0640 $log + chown mysql:mysql $log || exit 1 + if [ -x /usr/sbin/restorecon ]; then + /usr/sbin/restorecon "$datadir" + /usr/sbin/restorecon $log + fi + + # If special mysql dir is in place, skip db install + [ -d "$datadir/mysql" ] && exit 0 + + # Create initial db + /usr/bin/mysql_install_db --rpm --datadir="$datadir" --user=mysql + exit 0 +} + +pinger () { + # Wait for ping to answer to signal startup completed, + # might take a while in case of e.g. crash recovery + # MySQL systemd service will timeout script if no answer + datadir=$(get_option mysqld datadir "/var/lib/mysql") + socket=$(get_option mysqld socket "$datadir/mysql.sock") + case $socket in + /*) adminsocket="$socket" ;; + *) adminsocket="$datadir/$socket" ;; + esac + + while /bin/true ; do + sleep 1 + mysqladmin --no-defaults --socket="$adminsocket" --user=UNKNOWN_MYSQL_USER ping >/dev/null 2>&1 && break + done + exit 0 +} + +# main +case $1 in + "pre") install_db ;; + "post") pinger ;; +esac + +exit 0 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/mysqld.service b/meta-oe/recipes-dbs/mysql/mariadb/mysqld.service new file mode 100644 index 0000000000..d88361703d --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/mysqld.service @@ -0,0 +1,25 @@ +[Unit] +Description=MariaDB database server +After=syslog.target +After=network.target + +[Service] +PIDFile=/var/lib/mysql/mysqld.pid +Type=simple +User=mysql +Group=mysql + +# Execute post scripts as root +PermissionsStartOnly=true + +# Start main service +ExecStart=@BINDIR@/mysqld_safe --basedir=@PREFIX@ + +# Don't signal startup success before a ping works +ExecStartPost=@BINDIR@/mysql-systemd-start post + +TimeoutSec=300 +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch b/meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch new file mode 100644 index 0000000000..ff26b0b86c --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch @@ -0,0 +1,18 @@ +Remove host path from include directories + +Naturally this breaks cross-compilation if present. + +Upstream-Status: Pending + +Signed-off-by: Paul Eggleton + +--- mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt 2014-07-17 14:37:04.529327998 +0100 ++++ mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt 2014-07-17 14:43:56.991337895 +0100 +@@ -39,7 +39,6 @@ + + ## default includes and libraries + include_directories(SYSTEM +- /usr/local/include + ${ZLIB_INCLUDE_DIRS} + ) + diff --git a/meta-oe/recipes-dbs/mysql/mariadb_5.5.57.bb b/meta-oe/recipes-dbs/mysql/mariadb_5.5.57.bb new file mode 100644 index 0000000000..d7895732a6 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb_5.5.57.bb @@ -0,0 +1,27 @@ +require mariadb.inc + +EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1" + +DEPENDS += "mariadb-native ncurses zlib readline libaio libevent" + +PROVIDES += "mysql5 libmysqlclient" + +RPROVIDES_${PN} += "mysql5" +RREPLACES_${PN} += "mysql5" +RCONFLICTS_${PN} += "mysql5" + +RPROVIDES_${PN}-dbg += "mysql5-dbg" +RREPLACES_${PN}-dbg += "mysql5-dbg" +RCONFLICTS_${PN}-dbg += "mysql5-dbg" + +RPROVIDES_${PN}-leftovers += "mysql5-leftovers" +RREPLACES_${PN}-leftovers += "mysql5-leftovers" +RCONFLICTS_${PN}-leftovers += "mysql5-leftovers" + +RPROVIDES_${PN}-client += "mysql5-client" +RREPLACES_${PN}-client += "mysql5-client" +RCONFLICTS_${PN}-client += "mysql5-client" + +RPROVIDES_${PN}-server += "mysql5-server" +RREPLACES_${PN}-server += "mysql5-server" +RCONFLICTS_${PN}-server += "mysql5-server" diff --git a/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb b/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb new file mode 100644 index 0000000000..ac0df4f066 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb @@ -0,0 +1,17 @@ +SUMMARY = "Python interface to MySQL" +HOMEPAGE = "https://github.com/farcepest/MySQLdb1" +SECTION = "devel/python" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +DEPENDS = "mysql5" + +SRCNAME = "MySQL-python" + +SRC_URI = "https://pypi.python.org/packages/source/M/${SRCNAME}/${SRCNAME}-${PV}.zip" +SRC_URI[md5sum] = "654f75b302db6ed8dc5a898c625e030c" +SRC_URI[sha256sum] = "811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e140c74" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools diff --git a/meta-oe/recipes-support/mysql/mariadb-native_5.5.57.bb b/meta-oe/recipes-support/mysql/mariadb-native_5.5.57.bb deleted file mode 100644 index 4ce960d7da..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb-native_5.5.57.bb +++ /dev/null @@ -1,19 +0,0 @@ -require mariadb.inc -inherit native - -PROVIDES += "mysql5-native" -DEPENDS = "ncurses-native zlib-native bison-native" - -RDEPENDS_${PN} = "" -PACKAGES = "" -EXTRA_OEMAKE = "" - -do_install() { - oe_runmake 'DESTDIR=${D}' install - - install -d ${D}${bindir} - install -m 0755 sql/gen_lex_hash ${D}${bindir}/ - install -m 0755 extra/comp_err ${D}${bindir}/ - install -m 0755 scripts/comp_sql ${D}${bindir}/ -} - diff --git a/meta-oe/recipes-support/mysql/mariadb.inc b/meta-oe/recipes-support/mysql/mariadb.inc deleted file mode 100644 index a29d441e14..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb.inc +++ /dev/null @@ -1,297 +0,0 @@ -SUMMARY = "A robust, scalable, and reliable SQL server" -HOMEPAGE = "http://mariadb.org" -SECTION = "libs" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" - -SRC_URI = "https://downloads.mariadb.org/f/${BP}/source/${BP}.tar.gz \ - file://fix-cmake-module-path.patch \ - file://remove-bad-path.patch \ - file://fix-mysqlclient-r-version.patch \ - file://my.cnf \ - file://mysqld.service \ - file://install_db.service \ - file://install_db \ - file://mysql-systemd-start \ - file://configure.cmake-fix-valgrind.patch \ - file://fix-a-building-failure.patch \ - file://change-cc-to-cc-version.patch \ - file://0001-disable-ucontext-on-musl.patch \ - " - -SRC_URI[md5sum] = "2d4104aae0b9e5efa8878918bd329cb4" -SRC_URI[sha256sum] = "5dbde98d7e4a5a1721b6cbed7898b2549a88866247951cf586057975c6cea641" - -S = "${WORKDIR}/mariadb-${PV}" - -BINCONFIG_GLOB = "mysql_config" - -inherit cmake gettext binconfig update-rc.d useradd systemd - -INITSCRIPT_PACKAGES = "${PN}-server ${PN}-setupdb" -INITSCRIPT_NAME_${PN}-server = "mysqld" -INITSCRIPT_PARAMS_${PN}-server ?= "start 45 5 . stop 45 0 6 1 ." - -USERADD_PACKAGES = "${PN}-server" -USERADD_PARAM_${PN}-server = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql" -GROUPADD_PARAM_${PN}-server = "--system mysql" - -INITSCRIPT_NAME_${PN}-setupdb = "install_db" -INITSCRIPT_PARAMS_${PN}-setupdb ?= "defaults 44 44" - -SYSTEMD_PACKAGES = "${PN}-server ${PN}-setupdb" -SYSTEMD_SERVICE_${PN}-server = "mysqld.service" -SYSTEMD_AUTO_ENABLE_${PN}-server ?= "disable" - -SYSTEMD_SERVICE_${PN}-setupdb = "install_db.service" -SYSTEMD_AUTO_ENABLE_${PN}-setupdb ?= "enable" -ALLOW_EMPTY_${PN}-setupdb ?= "1" -FILES_${PN}-setupdb = "${sysconfdir}/init.d/install_db" - -EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} setupdb" -PACKAGECONFIG_class-native = "" -PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam" -PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind" -PACKAGECONFIG[libedit] = "-DLIBEDIT_INTERFACE=TRUE,-DLIBEDIT_INTERFACE=FALSE,libedit" -PACKAGECONFIG[krb5] = ", ,krb5" -PACKAGECONFIG[setupdb] = ", ,,${PN}-setupdb" - -# MariaDB doesn't link properly with gold -# https://mariadb.atlassian.net/browse/MDEV-5982 -TARGET_CFLAGS += "-fuse-ld=bfd" - -BUILD_CFLAGS += "-fuse-ld=bfd" -BUILD_CXXFLAGS += "-fuse-ld=bfd" - -EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ - -DWITH_JEMALLOC=no \ - -DWITHOUT_TOKUDB=TRUE \ - -DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE \ - -DGROFF=FALSE \ - -DNROFF=FALSE \ - -DENABLE_DTRACE=FALSE \ - -DWITH_PIC=ON \ - -DINSTALL_LAYOUT=RPM \ - -DINSTALL_DOCDIR:PATH=${datadir}/doc/${BPN} \ - -DINSTALL_LIBDIR:PATH=${baselib} \ - -DINSTALL_PLUGINDIR:PATH=${baselib}/plugin \ - -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \ - -DMYSQL_DATADIR:PATH=/var/mysql \ - -DCAT_EXECUTABLE=`which cat` \ - -DCMAKE_AR:FILEPATH=${AR}" - -# With Ninja it fails with: -# make: *** No rule to make target `install'. Stop. -OECMAKE_GENERATOR = "Unix Makefiles" - -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" - -do_configure_append() { - # handle distros with different values of ${libexecdir} - libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'` - sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh - sed -i -e "s:mysqld libexec:mysqld $libexecdir2:g" ${S}/scripts/mysql_install_db.sh - sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh -} - -do_generate_toolchain_file_append_class-native () { - # If these are set cmake will assume we're cross-compiling, which will - # result in certain things we want being disabled - sed -i "/set( CMAKE_SYSTEM_NAME/d" ${WORKDIR}/toolchain.cmake - sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake -} - -do_compile_prepend_class-target () { - # These need to be in-tree or make will think they need to be built, - # and since we're cross-compiling that is disabled - cp ${STAGING_BINDIR_NATIVE}/comp_err ${S}/extra - cp ${STAGING_BINDIR_NATIVE}/comp_sql ${S}/scripts - - if [ "${@bb.utils.contains('PACKAGECONFIG', 'krb5', 'yes', 'no', d)}" = "no" ]; then - if ! [ -e ${B}/include/openssl/kssl.h ] ; then - mkdir -p ${B}/include/openssl - echo "#ifndef KSSL_H" >${B}/include/openssl/kssl.h - echo "#define KSSL_H" >>${B}/include/openssl/kssl.h - echo "#include ">>${B}/include/openssl/kssl.h - echo "#endif" >>${B}/include/openssl/kssl.h - fi - fi -} - -SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess" - -# We need to append this so it runs *after* binconfig's preprocess function -# -# We really don't care exactly what the directories were set to originally. -# plugindir is not fixed, but we don't create any plugins. -# -mariadb_sysroot_preprocess () { - sed -i -es,^pkgincludedir=.*,pkgincludedir=\'${STAGING_INCDIR}/mysql\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config - sed -i -es,^pkglibdir=.*,pkglibdir=\'${STAGING_LIBDIR}\', ${SYSROOT_DESTDIR}${bindir_crossscripts}/mysql_config -} - -do_install() { - oe_runmake 'DESTDIR=${D}' install - - install -d ${D}/${sysconfdir}/init.d - install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/ - install -m 0755 ${WORKDIR}/install_db ${D}/${sysconfdir}/init.d/ - mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld - - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/mysqld.service ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/install_db.service ${D}${systemd_unitdir}/system - sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \ - ${D}${systemd_unitdir}/system/install_db.service - - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "f /var/log/mysqld.err 0640 mysql mysql -" \ - > ${D}${sysconfdir}/tmpfiles.d/99-mysqld.conf - fi - install -d ${D}${bindir} - install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir} - install -d ${D}${datadir}/doc/${PN} - if [ -f ${D}${datadir}/doc/README ]; then - mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/ - fi -} - -PACKAGES = "${PN}-dbg ${PN} \ - libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-staticdev libmysqlclient-r-dbg \ - libmysqlclient libmysqlclient-dev libmysqlclient-staticdev libmysqlclient-dbg \ - libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-setupdb ${PN}-leftovers" -CONFFILES_${PN}-server += "${sysconfdir}/my.cnf ${sysconfdir}/my.cnf.d/server.cnf" -CONFFILES_${PN}-client += "${sysconfdir}/my.cnf.d/mysql-clients.cnf" -CONFFILES_libmysqlclient += "${sysconfdir}/my.cnf.d/client.cnf" - -FILES_${PN} = " " -RDEPENDS_${PN} = "${PN}-client ${PN}-server" -ALLOW_EMPTY_${PN} = "1" - -RDEPENDS_${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \ - perl-module-fcntl perl-module-sys-hostname perl-module-ipc-open3 \ - perl-module-exporter" -RDEPENDS_${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \ - perl-module-file-basename perl-module-file-path perl-module-sys-hostname \ - perl-module-file-copy perl-module-file-temp perl-module-posix \ - ${PN}-client libdbi-perl libdbd-mysql-perl" -RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \ - perl-module-posix perl-module-data-dumper perl-module-sigtrap perl-module-threads \ - perl-module-threads-shared perl-module-io-socket perl-module-sys-hostname perl-module-file-copy \ - perl-module-file-spec perl-module-file-find perl-module-file-basename perl-module-file-path \ - perl-module-constant perl-module-lib perl-module-file-temp perl-module-file-spec-functions \ - perl-module-io-socket-inet perl-module-io-select" -RDEPENDS_${PN}-setupdb = "coreutils" - -# Allow old code to link to the backward compatible library -RDEPENDS_libmysqlclient-dev = "libmysqlclient-r-dev" - -FILES_libmysqlclient = "\ - ${libdir}/libmysqlclient.so.* \ - ${sysconfdir}/my.cnf.d/client.cnf" -FILES_libmysqlclient-dev = " \ - ${includedir}/mysql/ \ - ${libdir}/libmysqlclient.so \ - ${sysconfdir}/aclocal \ - ${bindir}/mysql_config" -FILES_libmysqlclient-staticdev = "\ - ${libdir}/*.a" -FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \ - ${datadir}/mysql-test/lib/My/SafeProcess/.debug/my_safe_process" - -# Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0 -# which are intentionally non-PIC on 32-bit x86 (see e.g. -# storage/xtradb/plug.in in the source) -INSANE_SKIP_libmysqlclient_append_x86 = " textrel" - -FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*" -FILES_libmysqlclient-r-dev = "\ - ${libdir}/libmysqlclient_r.so" -FILES_libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a" -FILES_libmysqlclient-r-dbg = "${libdir}/plugin/.debuglibmysqlclient_r.so.*" - -FILES_libmysqld = "\ - ${libdir}/libmysqld.so.*" -FILES_libmysqld-dev = "\ - ${libdir}/libmysqld.so" - -FILES_${PN}-client = "\ - ${bindir}/myisam_ftdump \ - ${bindir}/mysql \ - ${bindir}/mysql_client_test \ - ${bindir}/mysql_client_test_embedded \ - ${bindir}/mysql_find_rows \ - ${bindir}/mysql_fix_extensions \ - ${bindir}/mysql_waitpid \ - ${bindir}/mysqlaccess \ - ${bindir}/mysqladmin \ - ${bindir}/mysqlbug \ - ${bindir}/mysqlcheck \ - ${bindir}/mysqldump \ - ${bindir}/mysqldumpslow \ - ${bindir}/mysqlimport \ - ${bindir}/mysqlshow \ - ${bindir}/mysqlslap \ - ${bindir}/mysqltest_embedded \ - ${libexecdir}/mysqlmanager \ - ${sysconfdir}/my.cnf.d/mysql-clients.cnf" - -FILES_${PN}-server = "\ - ${bindir}/comp_err \ - ${bindir}/isamchk \ - ${bindir}/isamlog \ - ${bindir}/msql2mysql \ - ${bindir}/my_print_defaults \ - ${bindir}/myisamchk \ - ${bindir}/myisamlog \ - ${bindir}/myisampack \ - ${bindir}/mysql_convert_table_format \ - ${bindir}/mysql_fix_privilege_tables \ - ${bindir}/mysql_install_db \ - ${bindir}/mysql_secure_installation \ - ${bindir}/mysql_setpermission \ - ${bindir}/mysql-systemd-start \ - ${bindir}/mysql_tzinfo_to_sql \ - ${bindir}/mysql_upgrade \ - ${bindir}/mysql_plugin \ - ${bindir}/mysql_zap \ - ${bindir}/mysqlbinlog \ - ${bindir}/mysqld_multi \ - ${bindir}/mysqld_safe \ - ${bindir}/mysqld_safe_helper \ - ${bindir}/mysqlhotcopy \ - ${bindir}/mysqltest \ - ${bindir}/ndb_delete_all \ - ${bindir}/ndb_desc \ - ${bindir}/ndb_drop_index \ - ${bindir}/ndb_drop_table \ - ${bindir}/ndb_mgm \ - ${bindir}/ndb_restore \ - ${bindir}/ndb_select_all \ - ${bindir}/ndb_select_count \ - ${bindir}/ndb_show_tables \ - ${bindir}/ndb_waiter \ - ${bindir}/pack_isam \ - ${bindir}/perror \ - ${bindir}/replace \ - ${bindir}/resolve_stack_dump \ - ${bindir}/resolveip \ - ${libexecdir}/mysqld \ - ${sbindir}/mysqld \ - ${sbindir}/ndb_cpcd \ - ${sbindir}/ndbd \ - ${sbindir}/ndb_mgmd \ - ${libdir}/plugin/*.so \ - ${datadir}/mysql/ \ - ${localstatedir}/mysql/ \ - ${sysconfdir}/init.d/mysqld \ - ${sysconfdir}/my.cnf \ - ${sysconfdir}/my.cnf.d/server.cnf \ - ${sysconfdir}/tmpfiles.d" - -DESCRIPTION_${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}" -FILES_${PN}-leftovers = "/" diff --git a/meta-oe/recipes-support/mysql/mariadb/0001-disable-ucontext-on-musl.patch b/meta-oe/recipes-support/mysql/mariadb/0001-disable-ucontext-on-musl.patch deleted file mode 100644 index 60e9199f95..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb/0001-disable-ucontext-on-musl.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 5bc3e7ef9700d12054e0125a126f1bb093f01ef9 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 26 Mar 2017 14:30:33 -0700 -Subject: [PATCH] disable ucontext on musl - -musl does not have *contex() APIs even though it has ucontext.h header - -Signed-off-by: Khem Raj ---- - include/my_context.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/include/my_context.h b/include/my_context.h -index dd44103..9b28c17 100644 ---- a/include/my_context.h -+++ b/include/my_context.h -@@ -31,7 +31,7 @@ - #define MY_CONTEXT_USE_X86_64_GCC_ASM - #elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__) - #define MY_CONTEXT_USE_I386_GCC_ASM --#elif defined(HAVE_UCONTEXT_H) -+#elif defined(__GLIBC__) && defined(HAVE_UCONTEXT_H) - #define MY_CONTEXT_USE_UCONTEXT - #else - #define MY_CONTEXT_DISABLE --- -2.12.1 - diff --git a/meta-oe/recipes-support/mysql/mariadb/change-cc-to-cc-version.patch b/meta-oe/recipes-support/mysql/mariadb/change-cc-to-cc-version.patch deleted file mode 100644 index 02bda24f7b..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb/change-cc-to-cc-version.patch +++ /dev/null @@ -1,26 +0,0 @@ -mariadb: replace the CC with CC_VERSION and CXX with CXX_VERSION - -mysqlbug.sh is a bug report script. It makes a report with the build information, -including gcc version. The CC is the local path of gcc, which is useless for bug -report, and the path may expose private information, so change it to CC_VERSION. - -Upstream-Status: Pending - -Signed-off-by: Yue Tao -Signed-off-by: Wenzong Fan -================================ -diff --git a/scripts/mysqlbug.sh.old b/scripts/mysqlbug.sh -index e9df210..d4b8d53 100644 ---- a/scripts/mysqlbug.sh.old -+++ b/scripts/mysqlbug.sh -@@ -24,8 +24,8 @@ VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@" - COMPILATION_COMMENT="@COMPILATION_COMMENT@" - BUGmysql="maria-developers@lists.launchpad.net" - # This is set by configure --COMP_CALL_INFO="CC='@SAVE_CC@' CFLAGS='@SAVE_CFLAGS@' CXX='@SAVE_CXX@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'" --COMP_RUN_INFO="CC='@CC@' CFLAGS='@CFLAGS@' CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'" -+COMP_CALL_INFO="CC='@CC_VERSION@' CFLAGS='@SAVE_CFLAGS@' CXX='@CXX_VERSION@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'" -+COMP_RUN_INFO="CC='@CC_VERSION@' CFLAGS='@CFLAGS@' CXX='@CXX_VERSION@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'" - CONFIGURE_LINE="@CONF_COMMAND@" - - LIBC_INFO="" diff --git a/meta-oe/recipes-support/mysql/mariadb/configure.cmake-fix-valgrind.patch b/meta-oe/recipes-support/mysql/mariadb/configure.cmake-fix-valgrind.patch deleted file mode 100644 index e97def6021..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb/configure.cmake-fix-valgrind.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 5effba0d7d47071a3f1bca56823190d5a95bb1a6 Mon Sep 17 00:00:00 2001 -From: Jackie Huang -Date: Wed, 12 Nov 2014 03:09:10 -0500 -Subject: [PATCH] configure.cmake: fix valgrind - -Check valgrind headers only if WITH_VALGRIND is set. - -mariadb uses two macros for valgrind compilations: -HAVE_valgrind - valgrind is installed and can be set by configure option -DWITH_VALGRIND -HAVE_VALGRIND - valgrind debug libraries is installed, set by auto check - -We would like to set them both by the configure option so that we can use -PACKAGECONFIG to decide if valgrind is needed or not. - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Jackie Huang ---- - configure.cmake | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.cmake b/configure.cmake -index 0bd7bbe..51a098f 100644 ---- a/configure.cmake -+++ b/configure.cmake -@@ -1047,10 +1047,10 @@ MARK_AS_ADVANCED(WITH_ATOMIC_LOCKS MY_ATOMIC_MODE_RWLOCK MY_ATOMIC_MODE_DUMMY) - - IF(WITH_VALGRIND) - SET(HAVE_valgrind 1) -+ CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h" -+ HAVE_VALGRIND) - ENDIF() - --CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h" -- HAVE_VALGRIND) - - #-------------------------------------------------------------------- - # Check for IPv6 support --- -2.0.0 - diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-a-building-failure.patch b/meta-oe/recipes-support/mysql/mariadb/fix-a-building-failure.patch deleted file mode 100644 index 0c4e10237c..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb/fix-a-building-failure.patch +++ /dev/null @@ -1,31 +0,0 @@ -[PATCH] fix a building failure - -Upstream-Status: Inappropriate [configuration] - -building failed since native does not generate import_executables.cmake -In fact, our building system will export the needed commands - -Signed-off-by: Roy Li ---- - CMakeLists.txt | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c1ce1c5..83b3a7e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -350,11 +350,6 @@ MYSQL_CHECK_READLINE() - - CHECK_JEMALLOC() - --IF(CMAKE_CROSSCOMPILING) -- SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build") -- INCLUDE(${IMPORT_EXECUTABLES}) --ENDIF() -- - # - # Setup maintainer mode options by the end. Platform checks are - # not run with the warning options as to not perturb fragile checks --- -1.9.1 - diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch b/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch deleted file mode 100644 index 8d9f558d05..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb/fix-cmake-module-path.patch +++ /dev/null @@ -1,29 +0,0 @@ -Avoid CMAKE_MODULE_PATH being overwritten - -OE-Core's setting of CMAKE_MODULE_PATH stomps on MariaDB's value unless -we set it after setting the project name. - -Signed-off-by: Paul Eggleton - -Upstream-Status: Inappropriate [working around OE-Core bug] - ---- mariadb/CMakeLists.txt 2014-07-17 11:01:07.676353047 +0100 -+++ mariadb/CMakeLists.txt 2014-07-17 11:01:31.299353107 +0100 -@@ -28,8 +28,6 @@ - - MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}") - --SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) -- - # Distinguish between community and non-community builds, with the - # default being a community build. This does not impact the feature - # set that will be compiled in; it's merely provided as a hint to -@@ -77,6 +75,8 @@ - ENDIF() - PROJECT(${MYSQL_PROJECT_NAME}) - -+SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake) -+ - IF(BUILD_CONFIG) - INCLUDE( - ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake) diff --git a/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch b/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch deleted file mode 100644 index 7516619ebb..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb/fix-mysqlclient-r-version.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 6db2a606196fb38a6d106dc409eee1cb9a40a440 Mon Sep 17 00:00:00 2001 -From: Tor Didriksen -Date: Mon, 24 Jun 2013 17:15:35 +0200 -Subject: [PATCH] Bug#16809055 MYSQL 5.6 AND 5.7 STILL USE LIBMYSQLCLIENT.SO.18 - -With this patch, the libmysql/ directory contains: -libmysqlclient.a -libmysqlclient_r.a -> libmysqlclient.a -libmysqlclient_r.so -> libmysqlclient.so* -libmysqlclient_r.so.18 -> libmysqlclient.so.18* -libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0* -libmysqlclient.so -> libmysqlclient.so.18* -libmysqlclient.so.18 -> libmysqlclient.so.18.1.0* -libmysqlclient.so.18.1.0* - -This fixes libmysqlclient_r symlinks pointing to the unversioned -libmysqlclient.so symlink (leading to package QA errors since the -libmysqlclient-r package ends up depending on libmysqlclient-dev). - -Borrowed from MySQL 5.6 tree at https://github.com/percona/mysql/ - -Upstream-Status: Pending - -Signed-off-by: Paul Eggleton - ---- - cmake/install_macros.cmake | 25 +++++++++++++++---------- - cmake/mysql_version.cmake | 3 ++- - libmysql/CMakeLists.txt | 36 ++++++++++++++++++++++++++++-------- - 3 files changed, 45 insertions(+), 19 deletions(-) - -diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake -index b8efdf8..a0d0e68 100644 ---- a/cmake/install_macros.cmake -+++ b/cmake/install_macros.cmake -@@ -1,4 +1,4 @@ --# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. -+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. - # - # 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 -@@ -111,28 +111,33 @@ FUNCTION(INSTALL_SCRIPT) - ENDFUNCTION() - - # Install symbolic link to CMake target. --# the link is created in the same directory as target --# and extension will be the same as for target file. --MACRO(INSTALL_SYMLINK linkname target destination component) -+# We do 'cd path; ln -s target_name link_name' -+# We also add an INSTALL target for "${path}/${link_name}" -+MACRO(INSTALL_SYMLINK target target_name link_name destination component) - IF(UNIX) - GET_TARGET_PROPERTY(location ${target} LOCATION) - GET_FILENAME_COMPONENT(path ${location} PATH) -- GET_FILENAME_COMPONENT(name ${location} NAME) -- SET(output ${path}/${linkname}) -+ MESSAGE(STATUS "target ${target}") -+ MESSAGE(STATUS "link_name ${link_name}") -+ MESSAGE(STATUS "target_name ${target_name}") -+ MESSAGE(STATUS "path ${path}") -+ MESSAGE(STATUS "") -+ -+ SET(output ${path}/${link_name}) - ADD_CUSTOM_COMMAND( - OUTPUT ${output} - COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output} - COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink -- ${name} -- ${linkname} -+ ${target_name} -+ ${link_name} - WORKING_DIRECTORY ${path} - DEPENDS ${target} - ) - -- ADD_CUSTOM_TARGET(symlink_${linkname} -+ ADD_CUSTOM_TARGET(symlink_${link_name} - ALL - DEPENDS ${output}) -- SET_TARGET_PROPERTIES(symlink_${linkname} PROPERTIES CLEAN_DIRECT_OUTPUT 1) -+ SET_TARGET_PROPERTIES(symlink_${link_name} PROPERTIES CLEAN_DIRECT_OUTPUT 1) - IF(CMAKE_GENERATOR MATCHES "Xcode") - # For Xcode, replace project config with install config - STRING(REPLACE "${CMAKE_CFG_INTDIR}" -diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt -index be5760f..96286ff 100644 ---- a/libmysql/CMakeLists.txt -+++ b/libmysql/CMakeLists.txt -@@ -180,6 +180,12 @@ IF(MSVC) - INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug) - ENDIF() - -+MACRO(GET_TARGET_NAME target out_name) -+ GET_TARGET_PROPERTY(location ${target} LOCATION) -+ GET_FILENAME_COMPONENT(name ${location} NAME) -+ SET(${out_name} ${name}) -+ENDMACRO() -+ - IF(UNIX) - MACRO(GET_VERSIONED_LIBNAME LIBNAME EXTENSION VERSION OUTNAME) - SET(DOT_VERSION ".${VERSION}") -@@ -192,7 +198,13 @@ IF(UNIX) - SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION}) - ENDIF() - ENDMACRO() -- INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development) -+ENDIF() -+ -+IF(UNIX) -+ GET_TARGET_NAME(mysqlclient lib_name) -+ INSTALL_SYMLINK(mysqlclient -+ ${lib_name} ${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a -+ ${INSTALL_LIBDIR} Development) - ENDIF() - - IF(NOT DISABLE_SHARED) -@@ -205,10 +217,9 @@ IF(NOT DISABLE_SHARED) - # libtool compatability - IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE) - SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}") -- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX") -- SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0") - ELSE() -- SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0") -+ SET(OS_SHARED_LIB_VERSION -+ "${SHARED_LIB_MAJOR_VERSION}.${SHARED_LIB_MINOR_VERSION}.0") - ENDIF() - # Name of shared library is mysqlclient on Unix - SET_TARGET_PROPERTIES(libmysql PROPERTIES -@@ -239,8 +250,13 @@ IF(NOT DISABLE_SHARED) - "${CMAKE_SHARED_LIBRARY_SUFFIX}" - "" - linkname) -- INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries) -- SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}") -+ GET_TARGET_NAME(libmysql lib_name) -+ GET_FILENAME_COMPONENT(lib_name_we ${lib_name} NAME_WE) -+ INSTALL_SYMLINK(libmysql -+ ${lib_name} ${linkname} -+ ${INSTALL_LIBDIR} SharedLibraries) -+ SET(OS_SHARED_LIB_SYMLINKS -+ "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}") - LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS) - FOREACH(ver ${OS_SHARED_LIB_SYMLINKS}) - GET_VERSIONED_LIBNAME( -@@ -248,7 +264,11 @@ IF(NOT DISABLE_SHARED) - "${CMAKE_SHARED_LIBRARY_SUFFIX}" - "${ver}" - linkname) -- INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries) -+ GET_VERSIONED_LIBNAME( -+ ${lib_name_we} "${CMAKE_SHARED_LIBRARY_SUFFIX}" "${ver}" lib_name_ver) -+ INSTALL_SYMLINK(libmysql -+ ${lib_name_ver} ${linkname} -+ ${INSTALL_LIBDIR} SharedLibraries) - ENDFOREACH() - ENDIF() - ENDIF() --- -2.0.3 - diff --git a/meta-oe/recipes-support/mysql/mariadb/install_db b/meta-oe/recipes-support/mysql/mariadb/install_db deleted file mode 100755 index 512a7da7ee..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb/install_db +++ /dev/null @@ -1,13 +0,0 @@ -#! /bin/sh -case "$1" in - start) - echo "Starting to install database for mariadb" - /usr/bin/mysql-systemd-start pre - echo "done." - ;; - *) - echo "Usage: /etc/init.d/install_db start" - exit 1 -esac - -exit 0 diff --git a/meta-oe/recipes-support/mysql/mariadb/install_db.service b/meta-oe/recipes-support/mysql/mariadb/install_db.service deleted file mode 100644 index c8369f569b..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb/install_db.service +++ /dev/null @@ -1,17 +0,0 @@ -# -# Simple install MySQL database service file -# It shoulb be done before mysqld.service - -[Unit] -Description=Install MySQL Community Server Database -After=network.target -After=syslog.target -Before=mysqld.service - -[Install] -WantedBy=multi-user.target - -[Service] -Type=oneshot -ExecStart=@BINDIR@/mysql-systemd-start pre - diff --git a/meta-oe/recipes-support/mysql/mariadb/my.cnf b/meta-oe/recipes-support/mysql/mariadb/my.cnf deleted file mode 100644 index dc4c172e54..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb/my.cnf +++ /dev/null @@ -1,25 +0,0 @@ -[client] -#password = password -port = 3306 -socket = /var/lib/mysql/mysql.sock - -[mysqld_safe] - -[mysqld] -user = mysql -port = 3306 -socket = /var/lib/mysql/mysql.sock -pid-file = /var/lib/mysql/mysqld.pid -log-error = /var/log/mysqld.err -basedir = /usr -datadir = /var/lib/mysql -skip-external-locking -skip-networking -ignore-builtin-innodb -default-storage-engine = myisam -bind-address = localhost - -# -# include all files from the config directory -# -!includedir /etc/my.cnf.d diff --git a/meta-oe/recipes-support/mysql/mariadb/mysql-systemd-start b/meta-oe/recipes-support/mysql/mariadb/mysql-systemd-start deleted file mode 100644 index 189c02021d..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb/mysql-systemd-start +++ /dev/null @@ -1,66 +0,0 @@ -#! /bin/sh -# -# Needed argument: pre | post -# -# pre mode : try to run mysql_install_db and fix perms and SELinux contexts -# post mode : ping server until answer is received -# - -get_option () { - local section=$1 - local option=$2 - local default=$3 - ret=$(/usr/bin/my_print_defaults $section | grep '^--'${option}'=' | cut -d= -f2-) - [ -z $ret ] && ret=$default - echo $ret -} - -install_db () { - # Note: something different than datadir=/var/lib/mysql requires SELinux policy changes (in enforcing mode) - datadir=$(get_option mysqld datadir "/var/lib/mysql") - - # Restore log, dir, perms and SELinux contexts - [ -d "$datadir" ] || install -d -m 0755 -omysql -gmysql "$datadir" || exit 1 - log=/var/log/mysqld.log - [ -e $log ] || touch $log - chmod 0640 $log - chown mysql:mysql $log || exit 1 - if [ -x /usr/sbin/restorecon ]; then - /usr/sbin/restorecon "$datadir" - /usr/sbin/restorecon $log - fi - - # If special mysql dir is in place, skip db install - [ -d "$datadir/mysql" ] && exit 0 - - # Create initial db - /usr/bin/mysql_install_db --rpm --datadir="$datadir" --user=mysql - exit 0 -} - -pinger () { - # Wait for ping to answer to signal startup completed, - # might take a while in case of e.g. crash recovery - # MySQL systemd service will timeout script if no answer - datadir=$(get_option mysqld datadir "/var/lib/mysql") - socket=$(get_option mysqld socket "$datadir/mysql.sock") - case $socket in - /*) adminsocket="$socket" ;; - *) adminsocket="$datadir/$socket" ;; - esac - - while /bin/true ; do - sleep 1 - mysqladmin --no-defaults --socket="$adminsocket" --user=UNKNOWN_MYSQL_USER ping >/dev/null 2>&1 && break - done - exit 0 -} - -# main -case $1 in - "pre") install_db ;; - "post") pinger ;; -esac - -exit 0 - diff --git a/meta-oe/recipes-support/mysql/mariadb/mysqld.service b/meta-oe/recipes-support/mysql/mariadb/mysqld.service deleted file mode 100644 index d88361703d..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb/mysqld.service +++ /dev/null @@ -1,25 +0,0 @@ -[Unit] -Description=MariaDB database server -After=syslog.target -After=network.target - -[Service] -PIDFile=/var/lib/mysql/mysqld.pid -Type=simple -User=mysql -Group=mysql - -# Execute post scripts as root -PermissionsStartOnly=true - -# Start main service -ExecStart=@BINDIR@/mysqld_safe --basedir=@PREFIX@ - -# Don't signal startup success before a ping works -ExecStartPost=@BINDIR@/mysql-systemd-start post - -TimeoutSec=300 -PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch b/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch deleted file mode 100644 index ff26b0b86c..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb/remove-bad-path.patch +++ /dev/null @@ -1,18 +0,0 @@ -Remove host path from include directories - -Naturally this breaks cross-compilation if present. - -Upstream-Status: Pending - -Signed-off-by: Paul Eggleton - ---- mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt 2014-07-17 14:37:04.529327998 +0100 -+++ mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt 2014-07-17 14:43:56.991337895 +0100 -@@ -39,7 +39,6 @@ - - ## default includes and libraries - include_directories(SYSTEM -- /usr/local/include - ${ZLIB_INCLUDE_DIRS} - ) - diff --git a/meta-oe/recipes-support/mysql/mariadb_5.5.57.bb b/meta-oe/recipes-support/mysql/mariadb_5.5.57.bb deleted file mode 100644 index d7895732a6..0000000000 --- a/meta-oe/recipes-support/mysql/mariadb_5.5.57.bb +++ /dev/null @@ -1,27 +0,0 @@ -require mariadb.inc - -EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1" - -DEPENDS += "mariadb-native ncurses zlib readline libaio libevent" - -PROVIDES += "mysql5 libmysqlclient" - -RPROVIDES_${PN} += "mysql5" -RREPLACES_${PN} += "mysql5" -RCONFLICTS_${PN} += "mysql5" - -RPROVIDES_${PN}-dbg += "mysql5-dbg" -RREPLACES_${PN}-dbg += "mysql5-dbg" -RCONFLICTS_${PN}-dbg += "mysql5-dbg" - -RPROVIDES_${PN}-leftovers += "mysql5-leftovers" -RREPLACES_${PN}-leftovers += "mysql5-leftovers" -RCONFLICTS_${PN}-leftovers += "mysql5-leftovers" - -RPROVIDES_${PN}-client += "mysql5-client" -RREPLACES_${PN}-client += "mysql5-client" -RCONFLICTS_${PN}-client += "mysql5-client" - -RPROVIDES_${PN}-server += "mysql5-server" -RREPLACES_${PN}-server += "mysql5-server" -RCONFLICTS_${PN}-server += "mysql5-server" diff --git a/meta-oe/recipes-support/mysql/mysql-python_1.2.5.bb b/meta-oe/recipes-support/mysql/mysql-python_1.2.5.bb deleted file mode 100644 index ac0df4f066..0000000000 --- a/meta-oe/recipes-support/mysql/mysql-python_1.2.5.bb +++ /dev/null @@ -1,17 +0,0 @@ -SUMMARY = "Python interface to MySQL" -HOMEPAGE = "https://github.com/farcepest/MySQLdb1" -SECTION = "devel/python" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -DEPENDS = "mysql5" - -SRCNAME = "MySQL-python" - -SRC_URI = "https://pypi.python.org/packages/source/M/${SRCNAME}/${SRCNAME}-${PV}.zip" -SRC_URI[md5sum] = "654f75b302db6ed8dc5a898c625e030c" -SRC_URI[sha256sum] = "811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e140c74" - -S = "${WORKDIR}/${SRCNAME}-${PV}" - -inherit setuptools -- cgit v1.2.3-54-g00ecf