diff options
Diffstat (limited to 'meta-oe/recipes-dbs/mysql')
20 files changed, 414 insertions, 288 deletions
diff --git a/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.6.bb b/meta-oe/recipes-dbs/mysql/mariadb-native_10.11.4.bb index 73b2a0980d..578357b480 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb-native_10.5.6.bb +++ b/meta-oe/recipes-dbs/mysql/mariadb-native_10.11.4.bb @@ -2,9 +2,11 @@ require mariadb.inc inherit native PROVIDES += "mysql5-native" -DEPENDS = "ncurses-native zlib-native bison-native libpcre2-native" +DEPENDS = "ncurses-native zlib-native bison-native libpcre2-native \ +gnutls-native fmt-native \ +" -RDEPENDS_${PN} = "" +RDEPENDS:${PN} = "" PACKAGES = "" EXTRA_OEMAKE = "" @@ -16,5 +18,6 @@ do_install() { install -m 0755 sql/gen_lex_token ${D}${bindir}/ install -m 0755 extra/comp_err ${D}${bindir}/ install -m 0755 scripts/comp_sql ${D}${bindir}/ + install -m 0755 strings/uca-dump ${D}${bindir}/ } diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc index e3ce297618..2fb0bd7be5 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -1,27 +1,31 @@ SUMMARY = "A robust, scalable, and reliable SQL server" HOMEPAGE = "http://mariadb.org" SECTION = "libs" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b1becf0cfa3366e0f4d854d1d264f311" -SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz \ +SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \ 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://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 \ file://fix-arm-atomic.patch \ file://0001-Fix-library-LZ4-lookup.patch \ 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://ssize_t.patch \ + file://mm_malloc.patch \ + file://sys_futex.patch \ + file://cross-compiling.patch \ + file://0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \ + file://lfs64.patch \ + file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ " -SRC_URI[sha256sum] = "ff05dd69e9f6992caf1053242db704f04eda6f9accbcc98b74edfaf6013c45c4" +SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch" +SRC_URI[sha256sum] = "ce8dac125568cc5f40da74c17212767c92d8faed81066580b526a485a591127d" UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases" @@ -29,47 +33,56 @@ S = "${WORKDIR}/mariadb-${PV}" BINCONFIG_GLOB = "mysql_config" -inherit cmake gettext binconfig update-rc.d useradd systemd multilib_script +inherit cmake gettext binconfig update-rc.d useradd systemd multilib_script pkgconfig 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 ." +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" +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" - +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 \ + ${bindir}/mariadb-install-db \ + ${bindir}/my_print_defaults \ + ${bindir}/mysql_install_db \ + ${bindir}/mysql-systemd-start \ + " + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} lz4 openssl" EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'" -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} setupdb" -PACKAGECONFIG_class-native = "" +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[lz4] = ", ,lz4" +PACKAGECONFIG[openssl] = "-DWITH_SSL='system',-DWITH_SSL='bundled',openssl" # MariaDB doesn't link properly with gold # https://mariadb.atlassian.net/browse/MDEV-5982 TARGET_CFLAGS += "-fuse-ld=bfd" LDFLAGS += " -pthread" + BUILD_CFLAGS += "-fuse-ld=bfd" BUILD_CXXFLAGS += "-fuse-ld=bfd" +LDFLAGS:x86:toolchain-clang = "-latomic" + EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ -DWITH_JEMALLOC=no \ -DWITHOUT_TOKUDB=TRUE \ @@ -86,16 +99,23 @@ EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \ -DMYSQL_DATADIR:PATH=/var/mysql \ -DCAT_EXECUTABLE=`which cat` \ + -DSTACK_DIRECTION=1 \ -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" +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" + +do_compile:prepend:class-target () { + # remove the buildpath + sed -i -e "s:CMAKE_SYSROOT:CMAKE_SYSROOT_PLACE_HOLDER:g" ${S}/libmariadb/mariadb_config/mariadb_config.c.in +} -do_configure_append() { +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 @@ -103,19 +123,19 @@ do_configure_append() { sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh } -do_generate_toolchain_file_append_class-native () { +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 () { + +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 @@ -125,11 +145,7 @@ 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 + install -D ${RECIPE_SYSROOT_NATIVE}/usr/bin/uca-dump ${B}/strings/uca-dump } SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess" @@ -158,17 +174,19 @@ do_install() { 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 + + # mini-benchmark used for Gitlab-CI to run on every commit to catch + # if there are severe performance regressions. + # remove it to avoid introducing bash dependency + if [ -f ${D}${datadir}/mysql/mini-benchmark ]; then + rm -rf ${D}${datadir}/mysql/mini-benchmark + fi if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then pam_so=$(find ${D} -name pam_user_map.so) if [ x"${pam_so}" != x ]; then @@ -179,69 +197,80 @@ 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" -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" + 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" -RPROVIDES_${PN}-dbg += "libmysqlclient-r-dbg libmysqlclient-dbg" +RPROVIDES:${PN}-dbg += "libmysqlclient-r-dbg libmysqlclient-dbg" -FILES_${PN} = " " -RDEPENDS_${PN} = "${PN}-client ${PN}-server" -ALLOW_EMPTY_${PN} = "1" +FILES:${PN} = " " +RDEPENDS:${PN} = "${PN}-client ${PN}-server" +ALLOW_EMPTY:${PN} = "1" -RDEPENDS_${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \ +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 \ +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 ${PN}-setupdb libdbi-perl libdbd-mysql-perl" -RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \ + ${PN}-client ${PN}-setupdb libdbi-perl libdbd-mysql-perl lzo" +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 bash" -RDEPENDS_${PN}-setupdb = "coreutils" +RDEPENDS:${PN}-setupdb = "coreutils" # Allow old code to link to the backward compatible library -RDEPENDS_libmysqlclient-dev = "libmysqlclient-r-dev" +RDEPENDS:libmysqlclient-dev = "libmysqlclient-r-dev" + +PACKAGE_PREPROCESS_FUNCS += "src_package_preprocess" +src_package_preprocess () { + # Trim build paths from comments in generated sources to ensure reproducibility + sed -i -e "s,${S}/sql/,,g" \ + -e "s,${B}/sql/,,g" \ + ${B}/sql/yy_oracle.hh \ + ${B}/sql/yy_mariadb.cc \ + ${B}/sql/yy_mariadb.hh \ + ${B}/sql/yy_oracle.cc +} -FILES_libmysqlclient = "\ +FILES:libmysqlclient = "\ ${libdir}/libmysqlclient.so.* \ ${libdir}/libmariadb.so.* \ ${sysconfdir}/my.cnf.d/client.cnf" -FILES_libmysqlclient-dev = " \ +FILES:libmysqlclient-dev = " \ ${includedir}/mysql/ \ ${libdir}/libmysqlclient.so \ ${libdir}/libmariadb.so \ ${sysconfdir}/aclocal \ ${bindir}/mysql_config" -FILES_libmysqlclient-staticdev = "\ +FILES:libmysqlclient-staticdev = "\ ${libdir}/*.a" # 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" +INSANE_SKIP:libmysqlclient:append:x86 = " textrel" -FILES_libmysqlclient-r = "${libdir}/libmysqlclient_r.so.*" -FILES_libmysqlclient-r-dev = "\ +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-staticdev = "${libdir}/libmysqlclient_r.a" -FILES_libmysqld = "\ +FILES:libmysqld = "\ ${libdir}/libmysqld.so.* \ ${libdir}/libmariadbd.so.*" -FILES_libmysqld-dev = "\ +FILES:libmysqld-dev = "\ ${libdir}/libmysqld.so \ ${libdir}/libmariadbd.so" -FILES_${PN}-client = "\ +FILES:${PN}-client = "\ ${bindir}/myisam_ftdump \ ${bindir}/mysql \ ${bindir}/mariadb \ @@ -276,7 +305,7 @@ FILES_${PN}-client = "\ ${libexecdir}/mysqlmanager \ ${sysconfdir}/my.cnf.d/mysql-clients.cnf" -FILES_${PN}-server = "\ +FILES:${PN}-server = "\ ${bindir}/msql2mysql \ ${bindir}/my_print_defaults \ ${bindir}/myisamchk \ @@ -285,7 +314,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 \ @@ -327,5 +355,5 @@ FILES_${PN}-server = "\ ${sysconfdir}/security/user_map.conf \ ${sysconfdir}/tmpfiles.d" -DESCRIPTION_${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}" -FILES_${PN}-leftovers = "/" +DESCRIPTION:${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}" +FILES:${PN}-leftovers = "/" diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch new file mode 100644 index 0000000000..12fbd75976 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch @@ -0,0 +1,70 @@ +From 68100b1f2243304289b9a9a35e8fb0e1bb0cf70f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 24 Jan 2023 21:40:43 -0800 +Subject: [PATCH] Add missing includes <cstdint> and <cstdio> + +This is needed with GCC 13 and newer [1] + +[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + .../rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h | 1 + + storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h | 1 + + .../rocksdb/rocksdb/table/block_based/data_block_hash_index.h | 1 + + storage/rocksdb/rocksdb/util/slice.cc | 1 + + 4 files changed, 4 insertions(+) + +diff --git a/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h b/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h +index 963c1d8e..73487edd 100644 +--- a/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h ++++ b/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h +@@ -5,6 +5,7 @@ + + #pragma once + ++#include <cstdint> + #include "rocksdb/rocksdb_namespace.h" + + struct CompactionIterationStats { +diff --git a/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h b/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h +index c7f93b4c..3c2ab805 100644 +--- a/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h ++++ b/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h +@@ -8,6 +8,7 @@ + #pragma once + #ifndef ROCKSDB_LITE + ++#include <cstdint> + #include <string> + #include <vector> + #include "rocksdb/status.h" +diff --git a/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h b/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h +index f356395f..32152217 100644 +--- a/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h ++++ b/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h +@@ -5,6 +5,7 @@ + + #pragma once + ++#include <cstdint> + #include <string> + #include <vector> + +diff --git a/storage/rocksdb/rocksdb/util/slice.cc b/storage/rocksdb/rocksdb/util/slice.cc +index 6db11cc9..c26b6a21 100644 +--- a/storage/rocksdb/rocksdb/util/slice.cc ++++ b/storage/rocksdb/rocksdb/util/slice.cc +@@ -8,6 +8,7 @@ + // found in the LICENSE file. See the AUTHORS file for names of contributors. + + #include <algorithm> ++#include <cstdint> + #include "rocksdb/slice_transform.h" + #include "rocksdb/slice.h" + #include "util/string_util.h" +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch index 0cf0560e11..d8671b76b0 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch @@ -1,30 +1,33 @@ -From 1d7612b063eb1fc7bf97bc27b13e1de596748aa1 Mon Sep 17 00:00:00 2001 +From f15fbdf1244ca9ce01c5507660a86d685ed88bcf Mon Sep 17 00:00:00 2001 From: Sumit Garg <sumit.garg@linaro.org> -Date: Wed, 8 Jan 2020 04:58:30 +0000 +Date: Mon, 21 Mar 2022 15:08:40 +0800 Subject: [PATCH] Fix library LZ4 lookup. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> --- +Upstream-Status: Pending + cmake/FindLZ4.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake -index e97dd63e2b0..2f4694e727c 100644 +index eebd859..094241c 100644 --- a/cmake/FindLZ4.cmake +++ b/cmake/FindLZ4.cmake @@ -1,5 +1,10 @@ --find_path(LZ4_INCLUDE_DIR NAMES lz4.h) +-find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) -find_library(LZ4_LIBRARIES NAMES lz4) +find_path(LZ4_INCLUDE_DIR -+ NAMES lz4.h ++ NAMES lz4.h + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + +find_library(LZ4_LIBRARIES + NAMES lz4 + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) - include(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS( + if(LZ4_INCLUDE_DIRS AND EXISTS "${LZ4_INCLUDE_DIRS}/lz4.h") + file(STRINGS "${LZ4_INCLUDE_DIRS}/lz4.h" LZ4_H REGEX "^#define LZ4_VERSION_[MR]") -- -2.17.1 +2.25.1 diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-aio_linux-Check-if-syscall-exists-before-using-it.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-aio_linux-Check-if-syscall-exists-before-using-it.patch new file mode 100644 index 0000000000..aba9b9d966 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-aio_linux-Check-if-syscall-exists-before-using-it.patch @@ -0,0 +1,45 @@ +From 0a3222338efc108c831fbdd719a47d35f4b0adcd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 18 Aug 2021 06:49:25 +0000 +Subject: [PATCH] aio_linux: Check if syscall exists before using it + +Return -ENOSYS if not implememented, fixes build on arches like RISCV32 +Fixes +tpool/aio_linux.cc:63:20: error: '__NR_io_getevents' was not declared in this scope; did you mean 'io_getevents'? + 63 | int ret= syscall(__NR_io_getevents, reinterpret_cast<long>(ctx), + | ^~~~~~~~~~~~~~~~~ + | io_getevents + +Upstream-Staus: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + tpool/aio_linux.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tpool/aio_linux.cc b/tpool/aio_linux.cc +index 4abc213..da75411 100644 +--- a/tpool/aio_linux.cc ++++ b/tpool/aio_linux.cc +@@ -58,6 +58,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/ + */ + static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev) + { ++#ifdef __NR_io_getevents + int saved_errno= errno; + int ret= syscall(__NR_io_getevents, reinterpret_cast<long>(ctx), + min_nr, nr, ev, 0); +@@ -67,6 +68,9 @@ static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev) + errno= saved_errno; + } + return ret; ++#else ++ return -ENOSYS; ++#endif + } + + +-- +2.29.2 + 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 deleted file mode 100644 index daf2432a54..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b658bdb38b7ff6a78915fd0ac390fc224e4006cb Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -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 <raj.khem@gmail.com> - ---- - 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 ea0e3496..4c9b37dc 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 diff --git a/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch index 4cb0443392..456a2bad64 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch @@ -1,6 +1,6 @@ -From cfce1491827e5a581878b5e166bf4d30e6d90e07 Mon Sep 17 00:00:00 2001 +From f92f657973997df30afdb0032c88ad3a14ead46b Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> -Date: Thu, 23 Jul 2020 00:08:16 -0700 +Date: Fri, 23 Sep 2022 15:48:21 +0800 Subject: [PATCH] sql/CMakeLists.txt: fix gen_lex_hash not found Fix the below do_compile issue in cross-compiling env. @@ -11,14 +11,14 @@ 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(-) + sql/CMakeLists.txt | 30 ++++++++++++++++++++++-------- + 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt -index 0dc3caa..616017b 100644 +index 241b482..27a3991 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt -@@ -52,11 +52,16 @@ ${CMAKE_BINARY_DIR}/sql +@@ -60,11 +60,18 @@ ${CMAKE_BINARY_DIR}/sql ${CMAKE_SOURCE_DIR}/tpool ) @@ -26,21 +26,22 @@ index 0dc3caa..616017b 100644 - 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) ++ 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) ++ 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) + FIND_PACKAGE(BISON 2.4) + +@@ -372,11 +379,18 @@ IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR) ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc) ENDIF() @@ -48,20 +49,21 @@ index 0dc3caa..616017b 100644 - 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) ++ 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) ++ 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) + MYSQL_ADD_EXECUTABLE(mariadb-tzinfo-to-sql tztime.cc) SET_TARGET_PROPERTIES(mariadb-tzinfo-to-sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL") -- -2.17.1 +2.25.1 diff --git a/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch b/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch deleted file mode 100644 index 36217f9aae..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 976468458d53d8bb71acf48ddfc852a60557acb9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= <vicentiu@mariadb.org> -Date: Thu, 23 Jul 2020 00:02:21 -0700 -Subject: [PATCH] Link with libatomic to enable C11 atomics support - - Some architectures (mips) require libatomic to support proper - atomic operations. Check first if support is available without - linking, otherwise use the library. - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Signed-off-by: Mingli Yu <mingli.yu@windriver.com> ---- - configure.cmake | 20 +++++++++++++++++++- - mysys/CMakeLists.txt | 4 ++++ - sql/CMakeLists.txt | 4 ++++ - 3 files changed, 27 insertions(+), 1 deletion(-) - -diff --git a/configure.cmake b/configure.cmake -index a355214..6ee595f 100644 ---- a/configure.cmake -+++ b/configure.cmake -@@ -865,7 +865,25 @@ int main() - long long int *ptr= &var; - return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); - }" --HAVE_GCC_C11_ATOMICS) -+HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) -+IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) -+ SET(HAVE_GCC_C11_ATOMICS True) -+ELSE() -+ SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) -+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic") -+ CHECK_CXX_SOURCE_COMPILES(" -+ int main() -+ { -+ long long int var= 1; -+ long long int *ptr= &var; -+ return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); -+ }" -+ HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) -+ IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) -+ SET(HAVE_GCC_C11_ATOMICS True) -+ ENDIF() -+ SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES}) -+ENDIF() - - IF(WITH_VALGRIND) - SET(HAVE_valgrind 1) -diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt -index 3d8a20e..42f1441 100644 ---- a/mysys/CMakeLists.txt -+++ b/mysys/CMakeLists.txt -@@ -129,6 +129,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} - ${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO}) - DTRACE_INSTRUMENT(mysys) - -+IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) -+ TARGET_LINK_LIBRARIES(mysys atomic) -+ENDIF() -+ - IF(HAVE_BFD_H) - TARGET_LINK_LIBRARIES(mysys bfd) - ENDIF(HAVE_BFD_H) -diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt -index 616017b..53575f6 100644 ---- a/sql/CMakeLists.txt -+++ b/sql/CMakeLists.txt -@@ -219,6 +219,10 @@ ELSE() - SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL}) - ENDIF() - -+IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) -+ TARGET_LINK_LIBRARIES(sql atomic) -+ENDIF() -+ - IF(MSVC) - SET(libs_to_export_symbols sql mysys dbug strings) - # Create shared library of already compiled object --- -2.17.1 - diff --git a/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch b/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch deleted file mode 100644 index c77a869441..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch +++ /dev/null @@ -1,32 +0,0 @@ -libc++ also has a file called version and this file and how cflags are specified -it ends up including this file and resulting in compile errors - -fixes errors like -storage/mroonga/version:1:1: error: expected unqualified-id -7.07 -^ - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- a/storage/mroonga/CMakeLists.txt -+++ b/storage/mroonga/CMakeLists.txt -@@ -80,7 +80,7 @@ else() - set(MRN_SOURCE_DIR ${CMAKE_SOURCE_DIR}) - endif() - --file(READ ${MRN_SOURCE_DIR}/version MRN_VERSION) -+file(READ ${MRN_SOURCE_DIR}/ver MRN_VERSION) - file(READ ${MRN_SOURCE_DIR}/version_major MRN_VERSION_MAJOR) - file(READ ${MRN_SOURCE_DIR}/version_minor MRN_VERSION_MINOR) - file(READ ${MRN_SOURCE_DIR}/version_micro MRN_VERSION_MICRO) ---- /dev/null -+++ b/storage/mroonga/ver -@@ -0,0 +1 @@ -+7.07 -\ No newline at end of file ---- a/storage/mroonga/version -+++ /dev/null -@@ -1 +0,0 @@ --7.07 -\ No newline at end of file diff --git a/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch index 9149ee21f2..d0d6e3c730 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch @@ -1,28 +1,27 @@ -From 1b2b6a61c9f82157cd2e0c3744f6c07e07aeb0bd Mon Sep 17 00:00:00 2001 +From 80be37351d995654f86b838f6b5ed47e8a90261b Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> -Date: Mon, 4 Mar 2019 01:11:30 -0800 -Subject: [PATCH] fix a building failure - -Upstream-Status: Inappropriate [configuration] +Date: Fri, 23 Sep 2022 12:05:17 +0800 +Subject: [PATCH] CMakeLists.txt: not include import_executables.cmake building failed since native does not generate import_executables.cmake -In fact, our building system will export the needed commands +In fact, our building system will export the needed commands. + +Upstream-Status: Inappropriate [oe specific] -Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Mingli Yu <mingli.yu@windriver.com> --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index fc30750..4f9110e 100644 +index f9e2b1b..34924ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -347,11 +347,6 @@ CHECK_PCRE() - +@@ -394,11 +394,6 @@ CHECK_LIBFMT() + ADD_SUBDIRECTORY(tpool) CHECK_SYSTEMD() --IF(CMAKE_CROSSCOMPILING) +-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() @@ -31,5 +30,5 @@ index fc30750..4f9110e 100644 # Setup maintainer mode options. Platform checks are # not run with the warning options as to not perturb fragile checks -- -2.17.1 +2.25.1 diff --git a/meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch b/meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch new file mode 100644 index 0000000000..7a685a6521 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch @@ -0,0 +1,21 @@ +Upstream-Status: Pending + +--- a/storage/connect/os.h ++++ b/storage/connect/os.h +@@ -2,13 +2,15 @@ + #ifndef _OS_H_INCLUDED + #define _OS_H_INCLUDED + +-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__) || (defined(__linux__) && !defined(__GLIBC__)) + typedef off_t off64_t; + #define lseek64(fd, offset, whence) lseek((fd), (offset), (whence)) + #define open64(path, flags, mode) open((path), (flags), (mode)) + #define ftruncate64(fd, length) ftruncate((fd), (length)) ++#ifndef O_LARGEFILE + #define O_LARGEFILE 0 + #endif ++#endif + + #ifdef _AIX + #ifndef O_LARGEFILE diff --git a/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch b/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch new file mode 100644 index 0000000000..6aa6c84882 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch @@ -0,0 +1,13 @@ +Upstream-Status: Pending + +--- 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-oe/recipes-dbs/mysql/mariadb/my.cnf b/meta-oe/recipes-dbs/mysql/mariadb/my.cnf index dc4c172e54..75db46a559 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/my.cnf +++ b/meta-oe/recipes-dbs/mysql/mariadb/my.cnf @@ -10,7 +10,7 @@ user = mysql port = 3306 socket = /var/lib/mysql/mysql.sock pid-file = /var/lib/mysql/mysqld.pid -log-error = /var/log/mysqld.err +log-error = /var/log/mysqld.log basedir = /usr datadir = /var/lib/mysql skip-external-locking diff --git a/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch new file mode 100644 index 0000000000..3787b74ad1 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch @@ -0,0 +1,43 @@ +Upstream-Status: Pending + +Remove glibc specific function dependencies + +Sourced from: https://git.alpinelinux.org/aports/tree/main/mariadb/ppc-remove-glibc-dep.patch +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +diff --git a/include/my_cpu.h b/include/my_cpu.h +index f2e26fca..94599b74 100644 +--- a/include/my_cpu.h ++++ b/include/my_cpu.h +@@ -24,17 +24,16 @@ + */ + + #ifdef _ARCH_PWR8 +-#include <sys/platform/ppc.h> + /* Very low priority */ +-#define HMT_very_low() __ppc_set_ppr_very_low() ++#define HMT_very_low() asm volatile("or 31,31,31") + /* Low priority */ +-#define HMT_low() __ppc_set_ppr_low() ++#define HMT_low() asm volatile ("or 1,1,1") + /* Medium low priority */ +-#define HMT_medium_low() __ppc_set_ppr_med_low() ++#define HMT_medium_low() asm volatile ("or 6,6,6") + /* Medium priority */ +-#define HMT_medium() __ppc_set_ppr_med() ++#define HMT_medium() asm volatile ("or 2,2,2") + /* Medium high priority */ +-#define HMT_medium_high() __ppc_set_ppr_med_high() ++#define HMT_medium_high() asm volatile("or 5,5,5") + /* High priority */ + #define HMT_high() asm volatile("or 3,3,3") + #else +@@ -72,7 +71,7 @@ static inline void MY_RELAX_CPU(void) + __asm__ __volatile__ ("pause"); + #endif + #elif defined(_ARCH_PWR8) +- __ppc_get_timebase(); ++ __builtin_ppc_get_timebase(); + #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__) + /* Mainly, prevent the compiler from optimizing away delay loops */ + __asm__ __volatile__ ("":::"memory"); diff --git a/meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch b/meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch new file mode 100644 index 0000000000..4e499d4137 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/ssize_t.patch @@ -0,0 +1,15 @@ +ssize_t comes from sys/types.h therefore include it + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/wsrep-lib/include/wsrep/gtid.hpp ++++ b/wsrep-lib/include/wsrep/gtid.hpp +@@ -25,7 +25,7 @@ + #include "compiler.hpp" + + #include <iosfwd> +- ++#include <sys/types.h> + /** + * Minimum number of bytes guaratneed to store GTID string representation, + * terminating '\0' not included (36 + 1 + 20). diff --git a/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch b/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch index 4f9a4e9b0e..233d9e6af6 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch @@ -7,7 +7,7 @@ Comment out the logic which for suse as it introduces below do_populate_sysroot error: ERROR: mariadb-native-10.3.13-r0 do_populate_sysroot: sstate found an absolute path symlink /build/tmp/work/x86_64-linux/mariadb-native/10.3.13-r0/sysroot-destdir/build/tmp/work/x86_64-linux/mariadb-native/10.3.13-r0/recipe-sysroot-native/usr/sbin/rcmysql pointing at /build/tmp/work/x86_64-linux/mariadb-native/10.3.13-r0/recipe-sysroot-native/etc/init.d/mysql. Please replace this with a relative link. -Upstream-Status: Inappropriate[oe build specific] +Upstream-Status: Inappropriate [oe build specific] Signed-off-by: Mingli Yu <mingli.yu@windriver.com> diff --git a/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch b/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch new file mode 100644 index 0000000000..3244ab8da2 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/sys_futex.patch @@ -0,0 +1,23 @@ +Use SYS_futex for syscall + +glibc defines SYS_futex and on newer 32bit CPUs like RISCV-32, arc there +is no 32bit time_t therefore define SYS_futex in terms of SYS_futex_time64 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/storage/innobase/sync/srw_lock.cc ++++ b/storage/innobase/sync/srw_lock.cc +@@ -210,6 +210,12 @@ void ssux_lock_low::wake() { WakeByAddre + # ifdef __linux__ + # include <linux/futex.h> + # include <sys/syscall.h> ++/** Newer 32bit CPUs eg. RISCV-32 are defaulting to 64bit time_t from get go and ++ therefore do not define __NR_futex */ ++# if !defined(SYS_futex) && defined(SYS_futex_time64) ++# define SYS_futex SYS_futex_time64 ++# endif ++ + # define SRW_FUTEX(a,op,n) \ + syscall(SYS_futex, a, FUTEX_ ## op ## _PRIVATE, n, nullptr, nullptr, 0) + # elif defined __OpenBSD__ diff --git a/meta-oe/recipes-dbs/mysql/mariadb_10.11.4.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.11.4.bb new file mode 100644 index 0000000000..87faabfa27 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb_10.11.4.bb @@ -0,0 +1,26 @@ +require mariadb.inc + +DEPENDS += "mariadb-native bison-native boost libpcre2 curl ncurses \ + zlib libaio libedit libevent libxml2 gnutls fmt lzo zstd" + +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/mariadb_10.5.6.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.5.6.bb deleted file mode 100644 index e6743fe97a..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb_10.5.6.bb +++ /dev/null @@ -1,27 +0,0 @@ -require mariadb.inc - -EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1" - -DEPENDS += "mariadb-native bison-native libpcre2 curl openssl ncurses zlib libaio libedit libevent libxml2" - -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 index 4617da8e1b..15f6b6fb9a 100644 --- a/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb +++ b/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb @@ -1,7 +1,7 @@ SUMMARY = "Python interface to MySQL" HOMEPAGE = "https://github.com/farcepest/MySQLdb1" SECTION = "devel/python" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263" DEPENDS = "mysql5" @@ -16,6 +16,8 @@ SRC_URI[sha256sum] = "811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e S = "${WORKDIR}/${SRCNAME}-${PV}" +SKIP_RECIPE[mysql-python] ?= "${@bb.utils.contains('I_SWEAR_TO_MIGRATE_TO_PYTHON3', 'yes', '', 'python2 is out of support for long time, read https://www.python.org/doc/sunset-python-2/ https://python3statement.org/ and if you really have to temporarily use this, then set I_SWEAR_TO_MIGRATE_TO_PYTHON3 to "yes"', d)}" + inherit ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "setuptools", "", d)} python() { |