diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-dbs/mysql')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.11.bb (renamed from meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.10.bb) | 0 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc | 55 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch | 25 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch | 11 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch | 2 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch | 67 | ||||
-rw-r--r-- | meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_10.5.11.bb (renamed from meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb) | 4 |
7 files changed, 43 insertions, 121 deletions
diff --git a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.10.bb b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.11.bb index 73b2a0980..73b2a0980 100644 --- a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.10.bb +++ b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.11.bb diff --git a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc index 25e630a16..5787ae4bd 100644 --- a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -12,7 +12,6 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz file://mysql-systemd-start \ file://configure.cmake-fix-valgrind.patch \ file://support-files-CMakeLists.txt-fix-do_populate_sysroot.patch \ - file://sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \ file://0001-disable-ucontext-on-musl.patch \ file://c11_atomics.patch \ file://clang_version_header_conflict.patch \ @@ -21,12 +20,12 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \ file://0001-aio_linux-Check-if-syscall-exists-before-using-it.patch \ file://sys_futex.patch \ - file://cross-compiling.patch \ file://ssize_t.patch \ + file://mm_malloc.patch \ " SRC_URI_append_libc-musl = " file://ppc-remove-glibc-dep.patch" -SRC_URI[sha256sum] = "a5ff32f9fcaaf26bf5cba94accc7b246d2d5eb75710d027e40122df6bac0babb" +SRC_URI[sha256sum] = "761053605fe30ce393f324852117990350840a93b3e6305ef4d2f8c8305cc47a" UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases" @@ -37,15 +36,15 @@ BINCONFIG_GLOB = "mysql_config" inherit cmake gettext binconfig update-rc.d useradd systemd multilib_script MULTILIB_SCRIPTS = "${PN}-server:${bindir}/mariadbd-safe \ - ${PN}-server:${bindir}/mariadb-install-db" + ${PN}-setupdb:${bindir}/mariadb-install-db" 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" +USERADD_PACKAGES = "${PN}-setupdb" +USERADD_PARAM_${PN}-setupdb = "--system --home-dir /var/mysql -g mysql --shell /bin/false mysql" +GROUPADD_PARAM_${PN}-setupdb = "--system mysql" INITSCRIPT_NAME_${PN}-setupdb = "install_db" INITSCRIPT_PARAMS_${PN}-setupdb ?= "defaults 44 44" @@ -57,16 +56,18 @@ 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" +FILES_${PN}-setupdb = "${sysconfdir}/init.d/install_db \ + ${bindir}/mariadb-install-db \ + ${bindir}/my_print_defaults \ + ${bindir}/mysql_install_db \ + ${bindir}/mysql-systemd-start \ + " + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" PACKAGECONFIG_class-native = "" PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam" PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind" PACKAGECONFIG[krb5] = ", ,krb5" -PACKAGECONFIG[setupdb] = ", ,,${PN}-setupdb" PACKAGECONFIG[zstd] = "-DWITH_ROCKSDB_ZSTD=ON,-DWITH_ROCKSDB_ZSTD=OFF,zstd" # MariaDB doesn't link properly with gold @@ -94,6 +95,8 @@ EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ -DCAT_EXECUTABLE=`which cat` \ -DCMAKE_AR:FILEPATH=${AR}" +EXTRA_OECMAKE_prepend_class-target = "-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper " + # With Ninja it fails with: # make: *** No rule to make target `install'. Stop. OECMAKE_GENERATOR = "Unix Makefiles" @@ -116,12 +119,18 @@ do_generate_toolchain_file_append_class-native () { 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 +do_configure_prepend_class-target () { + # Write out a qemu wrapper that will be used by cmake + # so that it can run target helper binaries through that. + qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}" + cat > ${WORKDIR}/qemuwrapper << EOF +#!/bin/sh +$qemu_binary "\$@" +EOF + chmod +x ${WORKDIR}/qemuwrapper +} +do_compile_prepend_class-target () { if [ "${@bb.utils.contains('PACKAGECONFIG', 'krb5', 'yes', 'no', d)}" = "no" ]; then if ! [ -e ${B}/include/openssl/kssl.h ] ; then mkdir -p ${B}/include/openssl @@ -131,11 +140,6 @@ do_compile_prepend_class-target () { echo "#endif" >>${B}/include/openssl/kssl.h fi fi - # workaround to handle out-of-source build from source package - yacc_files="sql_yacc.hh sql_yacc.cc sql_yacc_ora.hh sql_yacc_ora.cc" - for yacc_file in ${yacc_files}; do - cp ${S}/sql/${yacc_file} ${B}/sql/${yacc_file} - done } SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess" @@ -185,10 +189,10 @@ do_install() { fi } -PACKAGES = "${PN}-dbg ${PN} \ +PACKAGES = "${PN}-dbg ${PN}-setupdb ${PN} \ libmysqlclient-r libmysqlclient-r-dev libmysqlclient-r-staticdev \ libmysqlclient libmysqlclient-dev libmysqlclient-staticdev \ - libmysqld libmysqld-dev ${PN}-client ${PN}-server ${PN}-setupdb ${PN}-leftovers" + libmysqld libmysqld-dev ${PN}-client ${PN}-server ${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" @@ -291,7 +295,6 @@ FILES_${PN}-server = "\ ${bindir}/mysql_convert_table_format \ ${bindir}/mariadb-convert-table-format \ ${bindir}/mysql_install_db \ - ${bindir}/mariadb-install-db \ ${bindir}/mysql_secure_installation \ ${bindir}/mariadb-secure-installation \ ${bindir}/mysql_setpermission \ diff --git a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch deleted file mode 100644 index 0f4815b18..000000000 --- a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch +++ /dev/null @@ -1,25 +0,0 @@ -This is not needed for OE builds - -building failed since native does not generate import_executables.cmake -In fact, our building system will export the needed commands - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Roy Li <rongqing.li@windriver.com> -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -392,11 +392,6 @@ CHECK_PCRE() - - CHECK_SYSTEMD() - --IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR) -- SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build") -- INCLUDE(${IMPORT_EXECUTABLES}) --ENDIF() -- - # - # Setup maintainer mode options. Platform checks are - # not run with the warning options as to not perturb fragile checks diff --git a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch new file mode 100644 index 000000000..347fcd851 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch @@ -0,0 +1,11 @@ +--- a/storage/rocksdb/rocksdb/port/jemalloc_helper.h ++++ b/storage/rocksdb/rocksdb/port/jemalloc_helper.h +@@ -5,7 +5,7 @@ + + #pragma once + +-#if defined(__clang__) ++#if defined(__clang__) && defined(__GLIBC__) + // glibc's `posix_memalign()` declaration specifies `throw()` while clang's + // declaration does not. There is a hack in clang to make its re-declaration + // compatible with glibc's if they are declared consecutively. That hack breaks diff --git a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch index d082d424b..d6e53c29e 100644 --- a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch +++ b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch @@ -36,7 +36,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> + __builtin_ppc_get_timebase(); #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__) /* Mainly, prevent the compiler from optimizing away delay loops */ - __asm__ __volatile__ ("isb":::"memory"); + #ifdef _aarch64_ --- a/storage/tokudb/PerconaFT/portability/toku_time.h +++ b/storage/tokudb/PerconaFT/portability/toku_time.h @@ -124,7 +124,7 @@ static inline tokutime_t toku_time_now(v diff --git a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch deleted file mode 100644 index 4cb044339..000000000 --- a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch +++ /dev/null @@ -1,67 +0,0 @@ -From cfce1491827e5a581878b5e166bf4d30e6d90e07 Mon Sep 17 00:00:00 2001 -From: Mingli Yu <mingli.yu@windriver.com> -Date: Thu, 23 Jul 2020 00:08:16 -0700 -Subject: [PATCH] sql/CMakeLists.txt: fix gen_lex_hash not found - -Fix the below do_compile issue in cross-compiling env. -| make[2]: *** No rule to make target '/build/tmp/work/aarch64-poky-linux/mariadb/10.3.13-r0/mariadb-10.3.13/sql/gen_lex_hash', needed by 'sql/lex_hash.h'. Stop. -| make[2]: *** No rule to make target '/build/tmp/work/aarch64-poky-linux/mariadb/10.3.13-r0/mariadb-10.3.13/sql/gen_lex_token', needed by 'sql/lex_token.h'. Stop. - -Upstream-Status: Inappropriate [oe build specific] - -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - sql/CMakeLists.txt | 30 ++++++++++++++++++++---------- - 1 file changed, 20 insertions(+), 10 deletions(-) - -diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt -index 0dc3caa..616017b 100644 ---- a/sql/CMakeLists.txt -+++ b/sql/CMakeLists.txt -@@ -52,11 +52,16 @@ ${CMAKE_BINARY_DIR}/sql - ${CMAKE_SOURCE_DIR}/tpool - ) - --ADD_CUSTOM_COMMAND( -- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h -- COMMAND gen_lex_token > lex_token.h -- DEPENDS gen_lex_token --) -+IF(NOT CMAKE_CROSSCOMPILING) -+ ADD_CUSTOM_COMMAND( -+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h -+ COMMAND gen_lex_token > lex_token.h -+ DEPENDS gen_lex_token) -+ELSE() -+ ADD_CUSTOM_COMMAND( -+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h -+ COMMAND gen_lex_token > lex_token.h) -+ENDIF() - - ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc_ora.yy -@@ -345,11 +350,16 @@ IF(NOT CMAKE_CROSSCOMPILING) - ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc) - ENDIF() - --ADD_CUSTOM_COMMAND( -- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h -- COMMAND gen_lex_hash > lex_hash.h -- DEPENDS gen_lex_hash --) -+IF(NOT CMAKE_CROSSCOMPILING) -+ ADD_CUSTOM_COMMAND( -+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h -+ COMMAND gen_lex_hash > lex_hash.h -+ DEPENDS gen_lex_hash) -+ELSE() -+ ADD_CUSTOM_COMMAND( -+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h -+ COMMAND gen_lex_hash > lex_hash.h) -+ENDIF() - - MYSQL_ADD_EXECUTABLE(mariadb-tzinfo-to-sql tztime.cc COMPONENT Server) - SET_TARGET_PROPERTIES(mariadb-tzinfo-to-sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL") --- -2.17.1 - diff --git a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_10.5.11.bb index 8ae8241b0..57d7736ea 100644 --- a/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_10.5.10.bb +++ b/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_10.5.11.bb @@ -1,8 +1,8 @@ require mariadb.inc -EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1" +inherit qemu -DEPENDS += "mariadb-native bison-native boost libpcre2 curl openssl ncurses zlib libaio libedit libevent libxml2" +DEPENDS += "qemu-native bison-native boost libpcre2 curl openssl ncurses zlib libaio libedit libevent libxml2" PROVIDES += "mysql5 libmysqlclient" |