diff options
Diffstat (limited to 'meta-oe/recipes-dbs')
61 files changed, 1142 insertions, 609 deletions
diff --git a/meta-oe/recipes-dbs/influxdb/influxdb/0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch b/meta-oe/recipes-dbs/influxdb/influxdb/0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch index b8d355706c..b05fd3666b 100644 --- a/meta-oe/recipes-dbs/influxdb/influxdb/0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch +++ b/meta-oe/recipes-dbs/influxdb/influxdb/0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch @@ -3,7 +3,7 @@ From: Khem Raj <raj.khem@gmail.com> Date: Mon, 11 Jan 2021 15:16:57 -0800 Subject: [PATCH] patch term module for mips ispeed/ospeed termios absense -Upstream-Status: OE-Specific [needed on mips] +Upstream-Status: Inappropriate [OE-Specific needed on mips] Signed-off-by: Khem Raj <raj.khem@gmail.com> --- diff --git a/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb b/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb index 50995c09b6..5301071516 100644 --- a/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb +++ b/meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb @@ -27,6 +27,8 @@ SRCREV = "688e697c51fd5353725da078555adbeff0363d01" inherit go-mod pkgconfig systemd update-rc.d useradd +export GOPROXY = "https://proxy.golang.org,direct" + # Workaround for network access issue during compile step # this needs to be fixed in the recipes buildsystem to move # this such that it can be accomplished during do_fetch task @@ -45,7 +47,7 @@ do_install:prepend() { do_install:append() { install -d ${D}${sysconfdir}/influxdb install -m 0644 ${WORKDIR}/influxdb.conf ${D}${sysconfdir}/influxdb - chown -R root.influxdb ${D}${sysconfdir}/influxdb + chown -R root:influxdb ${D}${sysconfdir}/influxdb install -d ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/influxdb ${D}${sysconfdir}/init.d/influxdb @@ -58,11 +60,15 @@ do_install:append() { if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ] ; then install -d ${D}${systemd_unitdir}/system install -m 0644 ${S}/src/${GO_IMPORT}/scripts/influxdb.service ${D}${systemd_system_unitdir}/influxdb.service + install -d ${D}${libdir}/influxdb/scripts + install -m 0755 ${S}/src/${GO_IMPORT}/scripts/influxd-systemd-start.sh ${D}${libdir}/influxdb/scripts/influxd-systemd-start.sh fi # TODO chown } +FILES:${PN} += "${libdir}/influxdb/scripts/influxd-systemd-start.sh" + INITSCRIPT_PACKAGES = "${PN}" INITSCRIPT_NAME = "influxdb" INITSCRIPT_PARAMS = "defaults" diff --git a/meta-oe/recipes-dbs/leveldb/leveldb/0001-CMakeLists.txt-fix-googletest-related-options.patch b/meta-oe/recipes-dbs/leveldb/leveldb/0001-CMakeLists.txt-fix-googletest-related-options.patch new file mode 100644 index 0000000000..b0bfb8bf16 --- /dev/null +++ b/meta-oe/recipes-dbs/leveldb/leveldb/0001-CMakeLists.txt-fix-googletest-related-options.patch @@ -0,0 +1,55 @@ +From 77da477840f89da7ced29da315de77571e8f190e Mon Sep 17 00:00:00 2001 +From: Martin Jansa <martin.jansa@gmail.com> +Date: Fri, 20 Oct 2023 22:57:48 +0200 +Subject: [PATCH] CMakeLists.txt: fix googletest related options + +* https://cmake.org/cmake/help/book/mastering-cmake/chapter/Writing%20CMakeLists%20Files.html + says that CMake options are case-sensitive and I don't see lower-case version in + currently used googletest submodules and gtest is indeed installed with leveldb + +* install_gmock option I don't see at all, so I've kept it as is, INSTALL_GTEST, BUILD_GMOCK + do exist as upper-case + +$ grep -Ri install_.*mock . +./CMakeLists.txt: set(install_gmock OFF) +./third_party/googletest/googlemock/CMakeLists.txt:install_project(gmock gmock_main) +$ grep -Ri build_gmock . +./CMakeLists.txt: set(BUILD_GMOCK ON) +./third_party/googletest/googletest/README.md:cmake .. -DBUILD_GMOCK=OFF +./third_party/googletest/CMakeLists.txt:option(BUILD_GMOCK "Builds the googlemock subproject" ON) +./third_party/googletest/CMakeLists.txt:if(BUILD_GMOCK) +$ grep -Ri install_gtest . +./CMakeLists.txt: set(INSTALL_GTEST OFF) +./third_party/googletest/googletest/cmake/internal_utils.cmake: if(INSTALL_GTEST) +./third_party/googletest/googletest/CMakeLists.txt:if (INSTALL_GTEST) +./third_party/googletest/CMakeLists.txt:option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) + +* also use CACHE and FORCE as sugested in: + https://cmake.org/cmake/help/latest/command/set.html + https://stackoverflow.com/questions/20239334/cmake-set-subdirectory-options + for the value to correctly propagate into third_party/googletest subdirectory + +Signed-off-by: Martin Jansa <martin.jansa@gmail.com> +--- +Upstream-Status: Submitted [https://github.com/google/leveldb/pull/1152] + + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fda9e01..f8a2629 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -295,9 +295,9 @@ if(LEVELDB_BUILD_TESTS) + + # Prevent overriding the parent project's compiler/linker settings on Windows. + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +- set(install_gtest OFF) +- set(install_gmock OFF) +- set(build_gmock ON) ++ set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) ++ set(install_gmock OFF CACHE BOOL "" FORCE) ++ set(BUILD_GMOCK ON CACHE BOOL "" FORCE) + + # This project is tested using GoogleTest. + add_subdirectory("third_party/googletest") diff --git a/meta-oe/recipes-dbs/leveldb/leveldb/0001-Fix-printing-64-bit-integer-types.patch b/meta-oe/recipes-dbs/leveldb/leveldb/0001-Fix-printing-64-bit-integer-types.patch new file mode 100644 index 0000000000..b9f45e773d --- /dev/null +++ b/meta-oe/recipes-dbs/leveldb/leveldb/0001-Fix-printing-64-bit-integer-types.patch @@ -0,0 +1,43 @@ +From 1ccdb7513a7a0f24b8ce3b6766e52e690874bc64 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 17 Oct 2023 19:08:12 -0700 +Subject: [PATCH] Fix printing 64-bit integer types + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + db/db_impl.cc | 5 +++-- + db/version_edit.h | 1 + + 2 files changed, 4 insertions(+), 2 deletions(-) + +--- a/db/db_impl.cc ++++ b/db/db_impl.cc +@@ -5,6 +5,7 @@ + #include "db/db_impl.h" + + #include <algorithm> ++#include <cinttypes> + #include <atomic> + #include <cstdint> + #include <cstdio> +@@ -520,8 +521,8 @@ Status DBImpl::WriteLevel0Table(MemTable + mutex_.Lock(); + } + +- Log(options_.info_log, "Level-0 table #%llu: %lld bytes %s", +- (unsigned long long)meta.number, (unsigned long long)meta.file_size, ++ Log(options_.info_log, "Level-0 table #%" PRIu64 " : %" PRIu64 " bytes %s", ++ meta.number, meta.file_size, + s.ToString().c_str()); + delete iter; + pending_outputs_.erase(meta.number); +--- a/db/version_edit.h ++++ b/db/version_edit.h +@@ -5,6 +5,7 @@ + #ifndef STORAGE_LEVELDB_DB_VERSION_EDIT_H_ + #define STORAGE_LEVELDB_DB_VERSION_EDIT_H_ + ++#include <cstdint> + #include <set> + #include <utility> + #include <vector> diff --git a/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb b/meta-oe/recipes-dbs/leveldb/leveldb_1.23.bb index 6afc45ab7e..60b486df78 100644 --- a/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb +++ b/meta-oe/recipes-dbs/leveldb/leveldb_1.23.bb @@ -4,14 +4,16 @@ HOMEPAGE = "https://github.com/google/leveldb" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=92d1b128950b11ba8495b64938fc164d" -SRC_URI = "git://github.com/google/${BPN}.git;branch=main;protocol=https \ - file://run-ptest" +SRC_URI = "gitsm://github.com/google/${BPN}.git;branch=main;protocol=https \ + file://0001-CMakeLists.txt-fix-googletest-related-options.patch \ + file://0001-Fix-printing-64-bit-integer-types.patch \ + file://run-ptest \ +" -SRCREV = "78b39d68c15ba020c0d60a3906fb66dbf1697595" +SRCREV = "068d5ee1a3ac40dabd00d211d5013af44be55bea" S = "${WORKDIR}/git" inherit cmake ptest - PACKAGECONFIG ??= "" PACKAGECONFIG[benchmarks] = "-DLEVELDB_BUILD_BENCHMARKS=ON,-DLEVELDB_BUILD_BENCHMARKS=OFF,sqlite" PACKAGECONFIG[snappy] = ",,snappy" diff --git a/meta-oe/recipes-dbs/libdbi/libdbi_0.9.0.bb b/meta-oe/recipes-dbs/libdbi/libdbi_0.9.0.bb index 24eae28501..7322916499 100644 --- a/meta-oe/recipes-dbs/libdbi/libdbi_0.9.0.bb +++ b/meta-oe/recipes-dbs/libdbi/libdbi_0.9.0.bb @@ -1,6 +1,5 @@ require ${PN}.inc -PR = "${INC_PR}.0" SRC_URI[md5sum] = "05e2ceeac4bc85fbe40de8b4b22d9ab3" SRC_URI[sha256sum] = "dafb6cdca524c628df832b6dd0bf8fabceb103248edb21762c02d3068fca4503" diff --git a/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch b/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch index 2cc98e6d62..3017bcede1 100644 --- a/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch +++ b/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch @@ -10,6 +10,8 @@ to be configurable. Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> --- +Upstream-Status: Pending + libraries/liblmdb/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-oe/recipes-dbs/lmdb/files/0001-make-set-soname-on-liblmdb.patch b/meta-oe/recipes-dbs/lmdb/files/0001-make-set-soname-on-liblmdb.patch new file mode 100644 index 0000000000..3dde46573f --- /dev/null +++ b/meta-oe/recipes-dbs/lmdb/files/0001-make-set-soname-on-liblmdb.patch @@ -0,0 +1,24 @@ +From b4d418bf3f78748d84e3cfb110833443eef34284 Mon Sep 17 00:00:00 2001 +From: Justin Bronder <jsbronder@cold-front.org> +Date: Thu, 25 Aug 2022 17:22:20 -0400 +Subject: [PATCH] make: set soname on liblmdb + +--- +Upstream-Status: Pending + + libraries/liblmdb/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile +index 1ec74e6..ea08cd6 100644 +--- a/libraries/liblmdb/Makefile ++++ b/libraries/liblmdb/Makefile +@@ -66,7 +66,7 @@ liblmdb.a: mdb.o midl.o + + liblmdb$(SOEXT): mdb.lo midl.lo + # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS) +- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) ++ $(CC) $(LDFLAGS) -pthread -shared -Wl,-soname,$@ -o $@ mdb.lo midl.lo $(SOLIBS) + + mdb_stat: mdb_stat.o liblmdb.a + mdb_copy: mdb_copy.o liblmdb.a diff --git a/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb index 0590ce008c..b2f1920f6b 100644 --- a/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb +++ b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb @@ -11,22 +11,21 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972" SRC_URI = "git://github.com/LMDB/lmdb.git;nobranch=1;protocol=https \ file://run-ptest \ file://0001-Makefile-use-libprefix-instead-of-libdir.patch \ + file://0001-make-set-soname-on-liblmdb.patch;patchdir=../.. \ " -SRCREV = "8ad7be2510414b9506ec9f9e24f24d04d9b04a1a" +SRCREV = "ce201088de95d26fc0da36ba805bf2ddc2ba74ff" inherit ptest S = "${WORKDIR}/git/libraries/liblmdb" -LDFLAGS += "-Wl,-soname,lib${PN}.so.${PV}" - do_compile() { - oe_runmake CC="${CC}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" + oe_runmake CC="${CC}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" XCFLAGS="${CFLAGS}" } do_install() { - oe_runmake CC="${CC}" DESTDIR="${D}" prefix="${prefix}" libprefix="${libdir}" manprefix="${mandir}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" install + oe_runmake CC="${CC}" DESTDIR="${D}" prefix="${prefix}" libprefix="${libdir}" manprefix="${mandir}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" XCFLAGS="${CFLAGS}" install cd ${D}${libdir} ln -s liblmdb.so.${PV} liblmdb.so rm liblmdb.a diff --git a/meta-oe/recipes-dbs/mysql/mariadb-native_10.8.3.bb b/meta-oe/recipes-dbs/mysql/mariadb-native_10.11.7.bb index e38726d3f9..578357b480 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb-native_10.8.3.bb +++ b/meta-oe/recipes-dbs/mysql/mariadb-native_10.11.7.bb @@ -2,7 +2,9 @@ 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} = "" PACKAGES = "" @@ -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 c63d5114f6..33da32fb28 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -19,10 +19,15 @@ SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \ 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 \ + file://0001-Remove-the-compile_time_assert-lines.patch \ + file://0001-MDEV-33439-Fix-build-with-libxml2-2.12.patch \ " SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch" - -SRC_URI[sha256sum] = "887eadc55176ac1ead1fccfc89ade4b5990ef192745ad4dcd879acb41c050892" +SRC_URI[sha256sum] = "5239a245ed90517e96396605cd01ccd8f73cd7442d1b3076b6ffe258110e5157" UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases" @@ -30,7 +35,7 @@ S = "${WORKDIR}/mariadb-${PV}" BINCONFIG_GLOB = "mysql_config" -inherit cmake gettext binconfig update-rc.d useradd systemd multilib_script pkgconfig +inherit cmake gettext binconfig update-rc.d systemd multilib_script pkgconfig MULTILIB_SCRIPTS = "${PN}-server:${bindir}/mariadbd-safe \ ${PN}-setupdb:${bindir}/mariadb-install-db" @@ -39,10 +44,6 @@ 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}-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" @@ -61,8 +62,10 @@ FILES:${PN}-setupdb = "${sysconfdir}/init.d/install_db \ " PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} lz4 openssl" +EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'" + PACKAGECONFIG:class-native = "" -PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam" +PACKAGECONFIG[pam] = "-DPLUGIN_AUTH_PAM=YES,-DPLUGIN_AUTH_PAM=NO,libpam" PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind" PACKAGECONFIG[krb5] = ", ,krb5" PACKAGECONFIG[lz4] = ", ,lz4" @@ -94,9 +97,10 @@ EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \ -DMYSQL_DATADIR:PATH=/var/mysql \ -DCAT_EXECUTABLE=`which cat` \ + -DSTACK_DIRECTION=1 \ + -DHAVE_SYSTEM_LIBFMT_EXITCODE=0 \ -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. @@ -105,6 +109,11 @@ OECMAKE_GENERATOR = "Unix Makefiles" 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() { # handle distros with different values of ${libexecdir} libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'` @@ -120,18 +129,12 @@ do_generate_toolchain_file:append:class-native () { sed -i "/set( CMAKE_SYSTEM_PROCESSOR/d" ${WORKDIR}/toolchain.cmake } -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 () { + # 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 @@ -141,6 +144,7 @@ do_compile:prepend:class-target () { echo "#endif" >>${B}/include/openssl/kssl.h fi fi + install -D ${RECIPE_SYSROOT_NATIVE}/usr/bin/uca-dump ${B}/strings/uca-dump } SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess" @@ -224,6 +228,17 @@ RDEPENDS:${PN}-setupdb = "coreutils" # Allow old code to link to the backward compatible library 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 = "\ ${libdir}/libmysqlclient.so.* \ ${libdir}/libmariadb.so.* \ 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..f8ccb998be --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch @@ -0,0 +1,84 @@ +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 + + storage/rocksdb/rocksdb/util/string_util.h | 1 + + 5 files changed, 5 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" + +diff --git a/util/string_util.h b/util/string_util.h +index 55d106fff02..11178fd1d7b 100644 +--- a/storage/rocksdb/rocksdb/util/string_util.h ++++ b/storage/rocksdb/rocksdb/util/string_util.h +@@ -6,6 +6,7 @@ + + #pragma once + ++#include <cstdint> + #include <sstream> + #include <string> + #include <unordered_map> +-- +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 6d9352fe86..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 @@ -6,6 +6,8 @@ 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/meta-oe/recipes-dbs/mysql/mariadb/0001-MDEV-33439-Fix-build-with-libxml2-2.12.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-MDEV-33439-Fix-build-with-libxml2-2.12.patch new file mode 100644 index 0000000000..3e42535dad --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-MDEV-33439-Fix-build-with-libxml2-2.12.patch @@ -0,0 +1,170 @@ +From dae52f5916ef59434c93f0b716270f59dd0c3a94 Mon Sep 17 00:00:00 2001 +From: Jan Tojnar <jtojnar@gmail.com> +Date: Sun, 7 Jan 2024 10:19:54 +0100 +Subject: [PATCH] MDEV-33439 Fix build with libxml2 2.12 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +libxml2 2.12.0 made `xmlGetLastError()` return `const` pointer: + +https://gitlab.gnome.org/GNOME/libxml2/-/commit/61034116d0a3c8b295c6137956adc3ae55720711 + +Clang 16 does not like this: + + error: assigning to 'xmlErrorPtr' (aka '_xmlError *') from 'const xmlError *' (aka 'const _xmlError *') discards qualifiers + error: cannot initialize a variable of type 'xmlErrorPtr' (aka '_xmlError *') with an rvalue of type 'const xmlError *' (aka 'const _xmlError *') + +Let’s update the variables to `const`. +For older versions, it will be automatically converted. + +But then `xmlResetError(xmlError*)` will not like the `const` pointer: + + error: no matching function for call to 'xmlResetError' + note: candidate function not viable: 1st argument ('const xmlError *' (aka 'const _xmlError *')) would lose const qualifier + +Let’s replace it with `xmlResetLastError()`. + +ALso remove `LIBXMLDOC::Xerr` protected member property. +It was introduced in 65b0e5455b547a3d574fa77b34cce23ae3bea0a0 +along with the `xmlResetError` calls. +It does not appear to be used for anything. + +Upstream-Status: Backport [https://github.com/MariaDB/server/pull/2983] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + storage/connect/libdoc.cpp | 39 +++++++++++++++++++------------------- + 1 file changed, 19 insertions(+), 20 deletions(-) + +diff --git a/storage/connect/libdoc.cpp b/storage/connect/libdoc.cpp +index 67f22ce2..ab588dd4 100644 +--- a/storage/connect/libdoc.cpp ++++ b/storage/connect/libdoc.cpp +@@ -93,7 +93,6 @@ class LIBXMLDOC : public XMLDOCUMENT { + xmlXPathContextPtr Ctxp; + xmlXPathObjectPtr Xop; + xmlXPathObjectPtr NlXop; +- xmlErrorPtr Xerr; + char *Buf; // Temporary + bool Nofreelist; + }; // end of class LIBXMLDOC +@@ -327,7 +326,6 @@ LIBXMLDOC::LIBXMLDOC(char *nsl, char *nsdf, char *enc, PFBLOCK fp) + Ctxp = NULL; + Xop = NULL; + NlXop = NULL; +- Xerr = NULL; + Buf = NULL; + Nofreelist = false; + } // end of LIBXMLDOC constructor +@@ -365,8 +363,8 @@ bool LIBXMLDOC::ParseFile(PGLOBAL g, char *fn) + Encoding = (char*)Docp->encoding; + + return false; +- } else if ((Xerr = xmlGetLastError())) +- xmlResetError(Xerr); ++ } else if (xmlGetLastError()) ++ xmlResetLastError(); + + return true; + } // end of ParseFile +@@ -505,9 +503,9 @@ int LIBXMLDOC::DumpDoc(PGLOBAL g, char *ofn) + #if 1 + // This function does not crash ( + if (xmlSaveFormatFileEnc((const char *)ofn, Docp, Encoding, 0) < 0) { +- xmlErrorPtr err = xmlGetLastError(); ++ const xmlError *err = xmlGetLastError(); + strcpy(g->Message, (err) ? err->message : "Error saving XML doc"); +- xmlResetError(Xerr); ++ xmlResetLastError(); + rc = -1; + } // endif Save + // rc = xmlDocDump(of, Docp); +@@ -546,8 +544,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp) + if (Nlist) { + xmlXPathFreeNodeSet(Nlist); + +- if ((Xerr = xmlGetLastError())) +- xmlResetError(Xerr); ++ if (xmlGetLastError()) ++ xmlResetLastError(); + + Nlist = NULL; + } // endif Nlist +@@ -555,8 +553,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp) + if (Xop) { + xmlXPathFreeObject(Xop); + +- if ((Xerr = xmlGetLastError())) +- xmlResetError(Xerr); ++ if (xmlGetLastError()) ++ xmlResetLastError(); + + Xop = NULL; + } // endif Xop +@@ -564,8 +562,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp) + if (NlXop) { + xmlXPathFreeObject(NlXop); + +- if ((Xerr = xmlGetLastError())) +- xmlResetError(Xerr); ++ if (xmlGetLastError()) ++ xmlResetLastError(); + + NlXop = NULL; + } // endif NlXop +@@ -573,8 +571,8 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp) + if (Ctxp) { + xmlXPathFreeContext(Ctxp); + +- if ((Xerr = xmlGetLastError())) +- xmlResetError(Xerr); ++ if (xmlGetLastError()) ++ xmlResetLastError(); + + Ctxp = NULL; + } // endif Ctxp +@@ -590,6 +588,7 @@ void LIBXMLDOC::CloseDoc(PGLOBAL g, PFBLOCK xp) + /******************************************************************/ + xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp) + { ++ const xmlError *xerr; + xmlNodeSetPtr nl; + + if (trace(1)) +@@ -649,11 +648,11 @@ xmlNodeSetPtr LIBXMLDOC::GetNodeList(PGLOBAL g, xmlNodePtr np, char *xp) + } else + xmlXPathFreeObject(Xop); // Caused node not found + +- if ((Xerr = xmlGetLastError())) { +- strcpy(g->Message, Xerr->message); +- xmlResetError(Xerr); ++ if ((xerr = xmlGetLastError())) { ++ strcpy(g->Message, xerr->message); ++ xmlResetLastError(); + return NULL; +- } // endif Xerr ++ } // endif xerr + + } // endif Xop + +@@ -1079,7 +1078,7 @@ void XML2NODE::AddText(PGLOBAL g, PCSZ txtp) + /******************************************************************/ + void XML2NODE::DeleteChild(PGLOBAL g, PXNODE dnp) + { +- xmlErrorPtr xerr; ++ const xmlError *xerr; + + if (trace(1)) + htrc("DeleteChild: node=%p\n", dnp); +@@ -1122,7 +1121,7 @@ void XML2NODE::DeleteChild(PGLOBAL g, PXNODE dnp) + if (trace(1)) + htrc("DeleteChild: errmsg=%-.256s\n", xerr->message); + +- xmlResetError(xerr); ++ xmlResetLastError(); + } // end of DeleteChild + + /* -------------------- class XML2NODELIST ---------------------- */ +-- +2.44.0 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-Remove-the-compile_time_assert-lines.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-Remove-the-compile_time_assert-lines.patch new file mode 100644 index 0000000000..9a6e28297b --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Remove-the-compile_time_assert-lines.patch @@ -0,0 +1,43 @@ +From cc5f1d0759b367265a1a000287e2ec15c31eb518 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Mon, 26 Feb 2024 14:56:02 +0800 +Subject: [PATCH] Remove the compile_time_assert lines + +Remove the problematic compile_time_assert lines to fix the below build +failure on 32-bit arm. + In file included from TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/mariadb/10.11.7/mariadb-10.11.7/tests/mysql_client_test.c:38: + TOPDIR/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/mariadb/10.11.7/mariadb-10.11.7/tests/mysql_client_fw.c:1438:3: error: 'compile_time_assert' declared as an array with a negative size + 1438 | compile_time_assert(sizeof(MYSQL) == 77*sizeof(void*)+656); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Upstream-Status: Inappropriate [Upstream will bring the asset back + in a new way [1]] +[1] https://jira.mariadb.org/browse/MDEV-33429 + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + tests/mysql_client_fw.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/tests/mysql_client_fw.c b/tests/mysql_client_fw.c +index c9e64678..5c0c7ce2 100644 +--- a/tests/mysql_client_fw.c ++++ b/tests/mysql_client_fw.c +@@ -1430,14 +1430,6 @@ int main(int argc, char **argv) + tests_to_run[i]= NULL; + } + +-#ifdef _WIN32 +- /* must be the same in C/C and embedded, 1208 on 64bit, 968 on 32bit */ +- compile_time_assert(sizeof(MYSQL) == 60*sizeof(void*)+728); +-#else +- /* must be the same in C/C and embedded, 1272 on 64bit, 964 on 32bit */ +- compile_time_assert(sizeof(MYSQL) == 77*sizeof(void*)+656); +-#endif +- + if (mysql_server_init(embedded_server_arg_count, + embedded_server_args, + (char**) embedded_server_groups)) +-- +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 index 6ed174113b..aba9b9d966 100644 --- 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 @@ -13,6 +13,8 @@ tpool/aio_linux.cc:63:20: error: '__NR_io_getevents' was not declared in this sc 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/meta-oe/recipes-dbs/mysql/mariadb/0001-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 new file mode 100644 index 0000000000..456a2bad64 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch @@ -0,0 +1,69 @@ +From f92f657973997df30afdb0032c88ad3a14ead46b Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +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. +| 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, 22 insertions(+), 8 deletions(-) + +diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt +index 241b482..27a3991 100644 +--- a/sql/CMakeLists.txt ++++ b/sql/CMakeLists.txt +@@ -60,11 +60,18 @@ ${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() + + 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() + +-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) + SET_TARGET_PROPERTIES(mariadb-tzinfo-to-sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL") +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch new file mode 100644 index 0000000000..d0d6e3c730 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/cross-compiling.patch @@ -0,0 +1,34 @@ +From 80be37351d995654f86b838f6b5ed47e8a90261b Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +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. + +Upstream-Status: Inappropriate [oe specific] + +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 f9e2b1b..34924ba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -394,11 +394,6 @@ CHECK_LIBFMT() + ADD_SUBDIRECTORY(tpool) + 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 +-- +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 index 347fcd8516..6aa6c84882 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + --- a/storage/rocksdb/rocksdb/port/jemalloc_helper.h +++ b/storage/rocksdb/rocksdb/port/jemalloc_helper.h @@ -5,7 +5,7 @@ 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 index a4deee6070..3787b74ad1 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch +++ b/meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Remove glibc specific function dependencies Sourced from: https://git.alpinelinux.org/aports/tree/main/mariadb/ppc-remove-glibc-dep.patch diff --git a/meta-oe/recipes-dbs/mysql/mariadb/run-ptest b/meta-oe/recipes-dbs/mysql/mariadb/run-ptest new file mode 100644 index 0000000000..2f905cd379 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/run-ptest @@ -0,0 +1,20 @@ +#!/bin/sh + +# test case test-connect is excluded. Becasue this test case need following steps before running. +# Without these steps, test case test-connect will fail. +# 1. Disable 'skip-networking' in /etc/my.cnf +# $ sed -i '/skip-networking/s/^/#/g' /etc/my.cnf +# 2. Restart mysqld.service +# $ systemctl restart mysqld +# 3. Set password for MySQL user "root" +# $ mysql -u root +# MariaDB [(none)]> SET PASSWORD FOR "root"@"localhost" = PASSWORD("myReallyStrongPwd"); +# MariaDB [(none)]> FLUSH PRIVILEGES; + +# If test-connect is included, please uncomment these lines. +#export MASTER_MYPORT=3306 +#export MYSQL_TEST_HOST=127.0.0.1 +#export MYSQL_TEST_USER=root +#export MYSQL_TEST_PASSWD=myReallyStrongPwd + +ctest --force-new-ctest-process -E test-connect | sed -u 's/\*\*\*/ /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}' 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_10.11.7.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.11.7.bb new file mode 100644 index 0000000000..b1d1355e2b --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb_10.11.7.bb @@ -0,0 +1,63 @@ +require mariadb.inc + +inherit ptest +inherit useradd + +SRC_URI += "${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)}" +DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)}" +RDEPENDS:${PN}-ptest += "cmake sed perl-module-test-more" + +do_install_ptest () { + rsync -a ${B}/unittest ${B}/dbug ${D}${PTEST_PATH} \ + --exclude CMakeFiles \ + --exclude cmake_install.cmake \ + --exclude Makefile \ + --exclude=*.a \ + --exclude=*.h \ + --exclude=*.o \ + --exclude=*.so \ + --exclude=*.d \ + --exclude=*.txt + install -m 0755 -d ${D}${PTEST_PATH}/storage + rsync -a ${B}/storage/maria ${B}/storage/perfschema ${B}/storage/innobase ${D}${PTEST_PATH}/storage \ + --exclude CMakeFiles \ + --exclude cmake_install.cmake \ + --exclude Makefile \ + --exclude=*.a \ + --exclude=*.h \ + --exclude=*.o \ + --exclude=*.so \ + --exclude=*.d \ + --exclude=*.txt + cp -r ${B}/CTestTestfile.cmake ${D}${PTEST_PATH} + sed -i -e 's#${WORKDIR}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake` +} + +DEPENDS += "mariadb-native bison-native boost libpcre2 curl ncurses \ + zlib libaio libedit libevent libxml2 gnutls fmt lzo zstd" + +PROVIDES += "mysql5 libmysqlclient" + +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" + +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.8.3.bb b/meta-oe/recipes-dbs/mysql/mariadb_10.8.3.bb deleted file mode 100644 index 20bb5fc1fe..0000000000 --- a/meta-oe/recipes-dbs/mysql/mariadb_10.8.3.bb +++ /dev/null @@ -1,28 +0,0 @@ -require mariadb.inc - -inherit qemu - -DEPENDS += "qemu-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/postgresql/files/0001-Add-support-for-RISC-V.patch b/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch index 90b7419495..ebd3e03685 100644 --- a/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch +++ b/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch @@ -1,19 +1,21 @@ -From 780fd27ea6f7f2c446c46a7a5e26d94106c67efd Mon Sep 17 00:00:00 2001 +From ba079b8d6a50796db41bb0ddf4c22bfe022ef898 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" <rjones@redhat.com> Date: Sun, 20 Nov 2016 15:04:52 +0000 -Subject: [PATCH] Add support for RISC-V. +Subject: [PATCH 1/5] Add support for RISC-V. The architecture is sufficiently similar to aarch64 that simply extending the existing aarch64 macro works. + +Upstream-Status: Pending --- src/include/storage/s_lock.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h -index dccbd29..ad60429 100644 +index c9fa84c..9b491e8 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h -@@ -317,11 +317,12 @@ tas(volatile slock_t *lock) +@@ -252,11 +252,12 @@ spin_delay(void) /* * On ARM and ARM64, we use __sync_lock_test_and_set(int *, int) if available. @@ -22,20 +24,20 @@ index dccbd29..ad60429 100644 * We use the int-width variant of the builtin because it works on more chips * than other widths. */ --#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) -+#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__aarch64) || defined(__riscv) +-#if defined(__arm__) || defined(__arm) || defined(__aarch64__) ++#if defined(__arm__) || defined(__arm) || defined(__aarch64__) || defined(__riscv) #ifdef HAVE_GCC__SYNC_INT32_TAS #define HAS_TEST_AND_SET -@@ -338,7 +339,7 @@ tas(volatile slock_t *lock) - #define S_UNLOCK(lock) __sync_lock_release(lock) +@@ -290,7 +291,7 @@ spin_delay(void) + #endif /* __aarch64__ */ #endif /* HAVE_GCC__SYNC_INT32_TAS */ --#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */ -+#endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */ +-#endif /* __arm__ || __arm || __aarch64__ */ ++#endif /* __arm__ || __arm || __aarch64__ || __riscv */ - /* + /* S/390 and S/390x Linux (32- and 64-bit zSeries) */ -- -2.34.1 +2.25.1 diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch b/meta-oe/recipes-dbs/postgresql/files/0002-Improve-reproducibility.patch index 02f4c9e513..b3e87cbc46 100644 --- a/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch +++ b/meta-oe/recipes-dbs/postgresql/files/0002-Improve-reproducibility.patch @@ -1,7 +1,7 @@ -From bbba8a5261a99e79c9cd4693ef56021014a9856b Mon Sep 17 00:00:00 2001 +From 084cc44215c1d5e6d33bc3d2e1d24da4fc98bdcd Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Mon, 28 Dec 2020 16:38:21 +0800 -Subject: [PATCH] Improve reproducibility, +Subject: [PATCH 2/5] Improve reproducibility, Remove build patch from binaries which pg_config do not record var-CC, var-CFLAGS, and configure @@ -23,7 +23,7 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> 1 file changed, 3 deletions(-) diff --git a/src/common/Makefile b/src/common/Makefile -index 880722f..7a9b9d4 100644 +index 113029b..58842a6 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -31,9 +31,6 @@ include $(top_builddir)/src/Makefile.global @@ -37,5 +37,5 @@ index 880722f..7a9b9d4 100644 override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\"" override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\"" -- -2.34.1 +2.25.1 diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch b/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch index 4a576d7172..d76d1991b6 100644 --- a/meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch +++ b/meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch @@ -1,30 +1,32 @@ -From 258c6bd2ad96f2c42f1cb5f4c84e4ca5865059f0 Mon Sep 17 00:00:00 2001 +From 30b1b37d309f67ba6d58f2197bd917107bc7d56c Mon Sep 17 00:00:00 2001 From: Yi Fan Yu <yifan.yu@windriver.com> Date: Fri, 5 Feb 2021 17:15:42 -0500 -Subject: [PATCH] configure.ac: bypass autoconf 2.69 version check +Subject: [PATCH 3/5] configure.ac: bypass autoconf 2.69 version check for upgrade to autoconf 2.71 Upstream-Status: Inappropriate [disable feature] Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> - --- configure.ac | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configure.ac b/configure.ac -index ffe878e..c39799b 100644 +index 401ce30..27f382d 100644 --- a/configure.ac +++ b/configure.ac @@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch undefined macros - AC_INIT([PostgreSQL], [14.5], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/]) + AC_INIT([PostgreSQL], [16.2], [pgsql-bugs@lists.postgresql.org], [], [https://www.postgresql.org/]) -m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required. -Untested combinations of 'autoconf' and PostgreSQL versions are not -recommended. You can remove the check from 'configure.ac' but it is then -your responsibility whether the result works or not.])]) - AC_COPYRIGHT([Copyright (c) 1996-2021, PostgreSQL Global Development Group]) + AC_COPYRIGHT([Copyright (c) 1996-2023, PostgreSQL Global Development Group]) AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) AC_CONFIG_AUX_DIR(config) +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch b/meta-oe/recipes-dbs/postgresql/files/0004-config_info.c-not-expose-build-info.patch index 101a748776..ff0582ab80 100644 --- a/meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch +++ b/meta-oe/recipes-dbs/postgresql/files/0004-config_info.c-not-expose-build-info.patch @@ -1,7 +1,7 @@ -From b92eebe8b0760fee7bd55c6c22318620c2c07579 Mon Sep 17 00:00:00 2001 +From 5be3ffdf767c1efcbfd2d1be87aa83f2e37e348e Mon Sep 17 00:00:00 2001 From: Mingli Yu <mingli.yu@windriver.com> Date: Mon, 1 Aug 2022 15:44:38 +0800 -Subject: [PATCH] config_info.c: not expose build info +Subject: [PATCH 4/5] config_info.c: not expose build info Don't collect the build information to fix the buildpaths issue. @@ -10,14 +10,14 @@ Upstream-Status: Inappropriate [oe specific] Signed-off-by: Mingli Yu <mingli.yu@windriver.com> --- configure.ac | 2 +- - src/common/config_info.c | 68 ---------------------------------------- - 2 files changed, 1 insertion(+), 69 deletions(-) + src/common/config_info.c | 70 +--------------------------------------- + 2 files changed, 2 insertions(+), 70 deletions(-) diff --git a/configure.ac b/configure.ac -index 0eb595b..508487b 100644 +index 27f382d..3dd6bb1 100644 --- a/configure.ac +++ b/configure.ac -@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 1996-2021, PostgreSQL Global Development Group]) +@@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 1996-2023, PostgreSQL Global Development Group]) AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) AC_CONFIG_AUX_DIR(config) AC_PREFIX_DEFAULT(/usr/local/pgsql) @@ -27,9 +27,18 @@ index 0eb595b..508487b 100644 [PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`] [PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`] diff --git a/src/common/config_info.c b/src/common/config_info.c -index e72e729..b482c20 100644 +index 09e78a6..86e4230 100644 --- a/src/common/config_info.c +++ b/src/common/config_info.c +@@ -38,7 +38,7 @@ get_configdata(const char *my_exec_path, size_t *configdata_len) + int i = 0; + + /* Adjust this to match the number of items filled below */ +- *configdata_len = 23; ++ *configdata_len = 14; + configdata = palloc_array(ConfigData, *configdata_len); + + configdata[i].name = pstrdup("BINDIR"); @@ -123,74 +123,6 @@ get_configdata(const char *my_exec_path, size_t *configdata_len) configdata[i].setting = pstrdup(path); i++; diff --git a/meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch b/meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch new file mode 100644 index 0000000000..af36da4927 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch @@ -0,0 +1,49 @@ +From 1a8b94140988d2ee5ff987b0bb3e7c3e936b8c01 Mon Sep 17 00:00:00 2001 +From: Manoj Saun <manojsingh.saun@windriver.com> +Date: Wed, 22 Mar 2023 08:07:26 +0000 +Subject: [PATCH 5/5] postgresql: fix ptest failure of sysviews + +The patch "0001-config_info.c-not-expose-build-info.patch" hides the debug info +in pg_config table which reduces the count of rows from pg_config and leads to +sysviews test failure. +To fix it we need to reduce the count of parameters in sysviews test. +Also we need to reduce the row count in expected result of sysview test +to make the test output shown as pass. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Manoj Saun <manojsingh.saun@windriver.com> +--- + src/test/regress/expected/sysviews.out | 2 +- + src/test/regress/sql/sysviews.sql | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/test/regress/expected/sysviews.out b/src/test/regress/expected/sysviews.out +index 001c6e7..8256898 100644 +--- a/src/test/regress/expected/sysviews.out ++++ b/src/test/regress/expected/sysviews.out +@@ -29,7 +29,7 @@ select name, ident, parent, level, total_bytes >= free_bytes + (1 row) + + -- At introduction, pg_config had 23 entries; it may grow +-select count(*) > 20 as ok from pg_config; ++select count(*) > 13 as ok from pg_config; + ok + ---- + t +diff --git a/src/test/regress/sql/sysviews.sql b/src/test/regress/sql/sysviews.sql +index 351e469..84c113e 100644 +--- a/src/test/regress/sql/sysviews.sql ++++ b/src/test/regress/sql/sysviews.sql +@@ -18,7 +18,7 @@ select name, ident, parent, level, total_bytes >= free_bytes + from pg_backend_memory_contexts where level = 0; + + -- At introduction, pg_config had 23 entries; it may grow +-select count(*) > 20 as ok from pg_config; ++select count(*) > 13 as ok from pg_config; + + -- We expect no cursors in this test; see also portals.sql + select count(*) = 0 as ok from pg_cursors; +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/postgresql/files/remove_duplicate.patch b/meta-oe/recipes-dbs/postgresql/files/remove_duplicate.patch deleted file mode 100644 index 92a3dcc710..0000000000 --- a/meta-oe/recipes-dbs/postgresql/files/remove_duplicate.patch +++ /dev/null @@ -1,38 +0,0 @@ -Remove duplicate code for riscv - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- a/src/include/storage/s_lock.h -+++ b/src/include/storage/s_lock.h -@@ -341,30 +341,6 @@ tas(volatile slock_t *lock) - #endif /* HAVE_GCC__SYNC_INT32_TAS */ - #endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */ - -- --/* -- * RISC-V likewise uses __sync_lock_test_and_set(int *, int) if available. -- */ --#if defined(__riscv) --#ifdef HAVE_GCC__SYNC_INT32_TAS --#define HAS_TEST_AND_SET -- --#define TAS(lock) tas(lock) -- --typedef int slock_t; -- --static __inline__ int --tas(volatile slock_t *lock) --{ -- return __sync_lock_test_and_set(lock, 1); --} -- --#define S_UNLOCK(lock) __sync_lock_release(lock) -- --#endif /* HAVE_GCC__SYNC_INT32_TAS */ --#endif /* __riscv */ -- -- - /* S/390 and S/390x Linux (32- and 64-bit zSeries) */ - #if defined(__s390__) || defined(__s390x__) - #define HAS_TEST_AND_SET diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc index bef33e6bb4..e29a5bef77 100644 --- a/meta-oe/recipes-dbs/postgresql/postgresql.inc +++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc @@ -35,8 +35,9 @@ LEAD_SONAME = "libpq.so" # LDFLAGS for shared libraries export LDFLAGS_SL = "${LDFLAGS}" +export LDFLAGS_EX_BE = "-Wl,--export-dynamic" -inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext cpan-base +inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext cpan-base multilib_header CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6" @@ -54,7 +55,7 @@ pkg_postinst:${PN} () { PACKAGECONFIG ??= " \ ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \ - openssl python uuid libxml tcl perl zlib \ + openssl python uuid libxml tcl perl zlib icu \ " PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native," PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl" @@ -69,6 +70,7 @@ PACKAGECONFIG[libxslt] = "--with-libxslt,--without-libxslt,libxslt" PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" PACKAGECONFIG[openssl] = "--with-ssl=openssl,ac_cv_file__dev_urandom=yes,openssl" +PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu,icu" EXTRA_OECONF += "--enable-thread-safety --disable-rpath \ --datadir=${datadir}/${BPN} \ @@ -183,6 +185,7 @@ INITSCRIPT_PARAMS = "start 64 . stop 36 0 1 2 3 4 5 6 ." do_install:append() { # install contrib oe_runmake DESTDIR=${D} -C contrib install + oe_multilib_header pg_config.h pg_config_ext.h ecpg_config.h postgresql/server/pg_config.h postgresql/server/pg_config_ext.h # install tutorial install -d -m 0755 ${D}${libdir}/${BPN}/tutorial install ${B}/src/tutorial/* ${D}${libdir}/${BPN}/tutorial @@ -205,7 +208,7 @@ do_install:append() { # multiple server config directory install -d -m 700 ${D}${sysconfdir}/default/${BPN} - if [ "${@d.getVar('enable_pam')}" = "pam" ]; then + if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/pam.d install -m 644 ${WORKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql fi @@ -228,6 +231,16 @@ do_install:append() { SSTATE_SCAN_FILES += "Makefile.global" SSTATE_SCAN_FILES:remove = "*_config" +postgresql_fix_sources () { + for f in ${PKGD}${TARGET_DBGSRC_DIR}/src/pl/plperl/Util.c \ + ${PKGD}${TARGET_DBGSRC_DIR}/src/pl/plperl/SPI.c; do + if [ -e $f ]; then + sed -i -e 's#${B}/../${P}#${TARGET_DBGSRC_DIR}#g' $f + fi + done +} +PACKAGESPLITFUNCS =+ "postgresql_fix_sources" + PACKAGES =+ "${PN}-client ${PN}-server-dev ${PN}-timezone \ libecpg-compat libecpg-compat-dev \ libecpg libecpg-dev libecpg-staticdev libecpg-doc \ diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_14.5.bb b/meta-oe/recipes-dbs/postgresql/postgresql_14.5.bb deleted file mode 100644 index 1551d34053..0000000000 --- a/meta-oe/recipes-dbs/postgresql/postgresql_14.5.bb +++ /dev/null @@ -1,18 +0,0 @@ -require postgresql.inc - -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=75af6e3eeec4a06cdd2e578673236fc3" - -SRC_URI += "\ - file://not-check-libperl.patch \ - file://0001-Add-support-for-RISC-V.patch \ - file://0001-Improve-reproducibility.patch \ - file://0001-configure.ac-bypass-autoconf-2.69-version-check.patch \ - file://remove_duplicate.patch \ - file://0001-config_info.c-not-expose-build-info.patch \ -" - -SRC_URI[sha256sum] = "d4f72cb5fb857c9a9f75ec8cf091a1771272802f2178f0b2e65b7b6ff64f4a30" - -CVE_CHECK_IGNORE += "\ - CVE-2017-8806 \ -" diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_16.2.bb b/meta-oe/recipes-dbs/postgresql/postgresql_16.2.bb new file mode 100644 index 0000000000..31f83a564b --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/postgresql_16.2.bb @@ -0,0 +1,16 @@ +require postgresql.inc + +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=89afbb2d7716371015101c2b2cb4297a" + +SRC_URI += "\ + file://not-check-libperl.patch \ + file://0001-Add-support-for-RISC-V.patch \ + file://0002-Improve-reproducibility.patch \ + file://0003-configure.ac-bypass-autoconf-2.69-version-check.patch \ + file://0004-config_info.c-not-expose-build-info.patch \ + file://0005-postgresql-fix-ptest-failure-of-sysviews.patch \ +" + +SRC_URI[sha256sum] = "446e88294dbc2c9085ab4b7061a646fa604b4bec03521d5ea671c2e5ad9b2952" + +CVE_STATUS[CVE-2017-8806] = "not-applicable-config: Ddoesn't apply to out configuration of postgresql so we can safely ignore it." diff --git a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch index 7eda038756..84d4467c0e 100644 --- a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch +++ b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch @@ -1,26 +1,27 @@ -[PATCH] do not use the hardcode libdir +From 8f3ed8df4721991958a5becf75a69493d67e7514 Mon Sep 17 00:00:00 2001 +From: "Roy.Li" <rongqing.li@windriver.com> +Date: Tue, 5 Sep 2017 10:24:10 +0800 +Subject: [PATCH] [PATCH] do not use the hardcode libdir -Upstream-status: Pending +Upstream-Status: Pending Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 9b88d4c..df5ad7a 100644 +index 00b359e..ba50e6f 100644 --- a/configure.ac +++ b/configure.ac -@@ -140,7 +140,7 @@ if test "$with_libpq" != yes; then +@@ -114,7 +114,7 @@ if test "$with_libpq" != yes; then if test -d "$with_libpq"; then - PATH="$PATH:$with_libpq/bin" - CPPFLAGS="$CPPFLAGS -I$with_libpq/include" + PATH="$with_libpq/bin:$PATH" + CPPFLAGS="$CPPFLAGS -I$with_libpq/include -I$with_libpq/include/postgresql/internal" - LDFLAGS="$LDFLAGS -L$with_libpq/lib" + LDFLAGS="$LDFLAGS -L$with_libpq/${base_libdir}" else if test -x "$with_libpq"; then PG_CONFIG=$with_libpq --- -2.8.1 - diff --git a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch index a8f14e7689..081c6d0fd0 100644 --- a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch +++ b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch @@ -1,3 +1,6 @@ +From 96896b88776d0080609ec830cf9538d2babe665a Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Tue, 5 Sep 2017 10:24:10 +0800 Subject: [PATCH] psqlodbc: fixes for ptest support * Fix the LIBODBC since we don't use ODBC_CONFIG. @@ -9,27 +12,24 @@ Subject: [PATCH] psqlodbc: fixes for ptest support Upstream-Status: Inappropriate [OE ptest specific] Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- test/Makefile.in | 2 +- test/odbcini-gen.sh | 8 ++++---- - test/runsuite.c | 26 +++++++++++++------------- - 3 files changed, 18 insertions(+), 18 deletions(-) + test/runsuite.c | 20 ++++++++++---------- + 3 files changed, 15 insertions(+), 15 deletions(-) -diff --git a/test/Makefile.in b/test/Makefile.in -index 8710616..fcb470e 100644 --- a/test/Makefile.in +++ b/test/Makefile.in -@@ -18,7 +18,7 @@ CFLAGS = @CFLAGS@ +@@ -19,7 +19,7 @@ CPPFLAGS = @CPPFLAGS@ -I.. # config.h ODBC_CONFIG = @ODBC_CONFIG@ PROVE = @PROVE@ --LIBODBC := $(shell $(ODBC_CONFIG) --libs) +-LIBODBC = @LIBODBC@ +LIBODBC = -lodbc all: $(TESTBINS) runsuite reset-db -diff --git a/test/odbcini-gen.sh b/test/odbcini-gen.sh -index d2c2c87..6068d9d 100755 --- a/test/odbcini-gen.sh +++ b/test/odbcini-gen.sh @@ -6,7 +6,7 @@ @@ -41,7 +41,16 @@ index d2c2c87..6068d9d 100755 driver=${drvr}.so if test ! -e $driver ; then driver=${drvr}.dll -@@ -33,10 +33,10 @@ Driver = psqlodbc test driver +@@ -16,7 +16,7 @@ if test ! -e $driver ; then + fi + fi + +-drvra=../.libs/psqlodbca ++drvra=@LIBDIR@/psqlodbca + drivera=${drvra}.so + if test ! -e $drivera ; then + drivera=${drvra}.dll +@@ -52,10 +52,10 @@ Driver = PostgreSQL Unicode Trace = No TraceFile = Database = contrib_regression @@ -55,11 +64,9 @@ index d2c2c87..6068d9d 100755 ReadOnly = No RowVersioning = No ShowSystemTables = No -diff --git a/test/runsuite.c b/test/runsuite.c -index 583cf35..fd2a90e 100644 --- a/test/runsuite.c +++ b/test/runsuite.c -@@ -51,7 +51,7 @@ bailout(const char *fmt, ...) +@@ -55,7 +55,7 @@ bailout(const char *fmt, ...) /* Given a test program's name, get the test name */ void @@ -68,7 +75,7 @@ index 583cf35..fd2a90e 100644 { const char *basename; #ifdef WIN32 -@@ -65,7 +65,7 @@ parse_argument(const char *in, char *testname, char *binname) +@@ -69,7 +69,7 @@ parse_argument(const char *in, char *tes if (strchr(in, DIR_SEP) == NULL) { strcpy(testname, in); @@ -77,7 +84,7 @@ index 583cf35..fd2a90e 100644 return; } -@@ -127,7 +127,7 @@ int main(int argc, char **argv) +@@ -131,7 +131,7 @@ int main(int argc, char **argv) failures = 0; for (i = 1, j = 1; i <= numtests; i++, j++) { @@ -86,7 +93,7 @@ index 583cf35..fd2a90e 100644 if (runtest(binname, testname, i, inputdir) != 0) failures++; } -@@ -157,29 +157,29 @@ runtest(const char *binname, const char *testname, int testno, const char *input +@@ -161,29 +161,29 @@ runtest(const char *binname, const char #ifndef WIN32 snprintf(cmdline, sizeof(cmdline), "ODBCSYSINI=. ODBCINSTINI=./odbcinst.ini ODBCINI=./odbc.ini " @@ -123,26 +130,3 @@ index 583cf35..fd2a90e 100644 ret = 0; } fflush(stdout); -@@ -196,7 +196,7 @@ rundiff(const char *testname, const char *inputdir) - char *result; - size_t result_len; - -- snprintf(filename, sizeof(filename), "results/%s.out", testname); -+ snprintf(filename, sizeof(filename), "%s/results/%s.out", inputdir, testname); - result = slurpfile(filename, &result_len); - - outputno = 0; -@@ -244,8 +244,8 @@ rundiff(const char *testname, const char *inputdir) - * files and print the smallest diff? - */ - snprintf(cmdline, sizeof(cmdline), -- "diff -c %s/expected/%s.out results/%s.out >> regression.diffs", -- inputdir, testname, testname); -+ "diff -c %s/expected/%s.out %s/results/%s.out >> regression.diffs", -+ inputdir, testname, inputdir, testname); - if (system(cmdline) == -1) - printf("# diff failed\n"); - --- -2.8.2 - diff --git a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch index 1d988182e7..9131d70be6 100644 --- a/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch +++ b/meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-remove-some-checks-for-cross-compiling.patch @@ -1,3 +1,6 @@ +From 8ca6b0c72b6b933642ec7c4ebb83734244fec46f Mon Sep 17 00:00:00 2001 +From: "Song.Li" <Song.Li@windriver.com> +Date: Tue, 5 Sep 2017 10:24:10 +0800 Subject: [PATCH] remove some checks for cross-compiling some lib check is not suitable for @@ -8,15 +11,16 @@ Upstream-Status: Inappropriate [not a real bug,just for cross-compiling] Signed-off-by: Song.Li <Song.Li@windriver.com> Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- - configure.ac | 66 +++++++----------------------------------------------------- - 1 file changed, 7 insertions(+), 59 deletions(-) + configure.ac | 80 +++++----------------------------------------------- + 1 file changed, 7 insertions(+), 73 deletions(-) diff --git a/configure.ac b/configure.ac -index df5ad7a..b72bd4c 100644 +index 7f79563..00b359e 100644 --- a/configure.ac +++ b/configure.ac -@@ -46,57 +46,19 @@ AC_ARG_WITH(iodbc, [ --with-iodbc[[=DIR]] [[default=no]] DIR is the iODBC bas +@@ -57,71 +57,20 @@ AC_ARG_WITH(iodbc, [ --with-iodbc[[=DIR]] [[default=no]] DIR is the iODBC bas if test "$with_iodbc" != no; then with_unixodbc=no AC_DEFINE(WITH_IODBC, 1, [Define to 1 to build with iODBC support]) @@ -34,6 +38,7 @@ index df5ad7a..b72bd4c 100644 - fi fi + wo_odbc_config=__without_odbc_config if test "$with_unixodbc" != no; then AC_DEFINE(WITH_UNIXODBC, 1, [Define to 1 to build with unixODBC support]) @@ -42,7 +47,9 @@ index df5ad7a..b72bd4c 100644 - else - ODBC_CONFIG=$with_unixodbc - fi -- if test ! -x "${ODBC_CONFIG}/bin/odbc_config"; then +- if test "${ODBC_CONFIG}" = "${wo_odbc_config}"; then +- : +- elif test ! -x "${ODBC_CONFIG}/bin/odbc_config"; then - if test ! -x "${ODBC_CONFIG}"; then - AC_MSG_ERROR([odbc_config not found (required for unixODBC build)]) - fi @@ -62,22 +69,33 @@ index df5ad7a..b72bd4c 100644 - # Linking libiodoc is rather problematic - [ODBC_LIBDIR=`${ODBC_CONFIG} --libs | sed -e "s/^\(-L\|.*[ \t]-L\)\([^ \n\r\f\t]*\).*$/-L\2/"`] - LDFLAGS="$LDFLAGS ${ODBC_LIBDIR}" +- LIBODBC=`${ODBC_CONFIG} --libs` # for regression test +- elif test "${ODBC_CONFIG}" = "${wo_odbc_config}"; then +- ODBC_INCLUDE=/usr/include +- CPPFLAGS="$CPPFLAGS -I${ODBC_INCLUDE}" +- ODBC_LIBDiR="" +- LIBODBC="-lodbc" # for regression test - else - ODBC_INCLUDE=`${ODBC_CONFIG} --include-prefix` - CPPFLAGS="$CPPFLAGS -I${ODBC_INCLUDE}" -- # Linking libodoc is rather problematic +- # Linking libodbc is rather problematic - ODBC_LIBDIR=`${ODBC_CONFIG} --lib-prefix` -- LDFLAGS="$LDFLAGS -L${ODBC_LIBDIR}" +- if test "${ODBC_LIBDIR}" != ""; then +- LDFLAGS="$LDFLAGS -L${ODBC_LIBDIR}" +- fi +- LIBODBC=`${ODBC_CONFIG} --libs` # for regression test - fi - AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBDIR]) +- AC_MSG_NOTICE([using $LIBODBC for regression test]) -fi +-AC_SUBST(LIBODBC) +ODBC_LIBS="-lodbcinst" +LIBS="$LIBS ${ODBC_LIBS}" +AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBS]) # # SQLCOLATTRIBUTE_SQLLEN check -@@ -176,18 +138,10 @@ PGAC_ARG_BOOL(enable, pthreads, yes, +@@ -190,19 +139,10 @@ PGAC_ARG_BOOL(enable, pthreads, yes, # Find libpq headers and libraries # @@ -87,8 +105,9 @@ index df5ad7a..b72bd4c 100644 - -if test -n "$PG_CONFIG"; then - pg_includedir=`"$PG_CONFIG" --includedir` +- pg_pkg_includedir=`"$PG_CONFIG" --pkgincludedir` - pg_libdir=`"$PG_CONFIG" --libdir` -- CPPFLAGS="$CPPFLAGS -I$pg_includedir" +- CPPFLAGS="$CPPFLAGS -I$pg_includedir -I$pg_pkg_includedir/internal" - LDFLAGS="$LDFLAGS -L$pg_libdir" -fi - @@ -100,7 +119,7 @@ index df5ad7a..b72bd4c 100644 # 1. Programs -@@ -211,12 +165,6 @@ if test "$with_iodbc" != no; then +@@ -226,12 +166,6 @@ if test "$with_iodbc" != no; then [AC_MSG_ERROR([iODBC library "iodbcinst" not found])]) fi @@ -113,6 +132,3 @@ index df5ad7a..b72bd4c 100644 AC_CHECK_LIB(pq, PQsetSingleRowMode, [], [AC_MSG_ERROR([libpq library version >= 9.2 is required])]) --- -2.8.1 - diff --git a/meta-oe/recipes-dbs/psqlodbc/psqlodbc_09.05.0300.bb b/meta-oe/recipes-dbs/psqlodbc/psqlodbc_09.05.0300.bb deleted file mode 100644 index b0fc35eb97..0000000000 --- a/meta-oe/recipes-dbs/psqlodbc/psqlodbc_09.05.0300.bb +++ /dev/null @@ -1,14 +0,0 @@ -require ${PN}.inc - -LICENSE = "LGPL-2.0-only" -LIC_FILES_CHKSUM = "file://license.txt;md5=6db3822fc7512e83087ba798da013692" - -SRC_URI = "http://ftp.postgresql.org/pub/odbc/versions/src/${BPN}-${PV}.tar.gz \ - file://psqlodbc-remove-some-checks-for-cross-compiling.patch \ - file://psqlodbc-donot-use-the-hardcode-libdir.patch \ - file://psqlodbc-fix-for-ptest-support.patch \ - file://run-ptest \ -" - -SRC_URI[md5sum] = "4c6e0b22187d7bb1c998ffac89e50f6b" -SRC_URI[sha256sum] = "9521f328bf28aaaf5c8488dc89792b614f9d6271742c0baf9bb41c97537764a8" diff --git a/meta-oe/recipes-dbs/psqlodbc/psqlodbc.inc b/meta-oe/recipes-dbs/psqlodbc/psqlodbc_16.00.0000.bb index ae20a72a11..a1ef8e75e9 100644 --- a/meta-oe/recipes-dbs/psqlodbc/psqlodbc.inc +++ b/meta-oe/recipes-dbs/psqlodbc/psqlodbc_16.00.0000.bb @@ -14,7 +14,19 @@ DESCRIPTION = "\ software to accept ODBC clients. \ " SECTION = "libs" -HOMEPAGE = "http://psqlodbc.projects.postgresql.org/" +HOMEPAGE = "https://odbc.postgresql.org/" + +LICENSE = "LGPL-2.0-only" +LIC_FILES_CHKSUM = "file://license.txt;md5=6db3822fc7512e83087ba798da013692" + +SRC_URI = "http://ftp.postgresql.org/pub/odbc/versions/src/${BPN}-${PV}.tar.gz \ + file://psqlodbc-remove-some-checks-for-cross-compiling.patch \ + file://psqlodbc-donot-use-the-hardcode-libdir.patch \ + file://psqlodbc-fix-for-ptest-support.patch \ + file://run-ptest \ +" + +SRC_URI[sha256sum] = "afd892f89d2ecee8d3f3b2314f1bd5bf2d02201872c6e3431e5c31096eca4c8b" DEPENDS += "postgresql unixodbc" @@ -24,8 +36,7 @@ EXTRA_OECONF = "\ --with-unixodbc=yes \ --with-libpq=${STAGING_LIBDIR}/.. \ --enable-pthreads \ - --disable-unicode \ - LIBS="-lpthread" \ + LIBS='-lpthread' \ " inherit autotools pkgconfig ptest @@ -47,4 +58,5 @@ do_install_ptest() { FILES:${PN} += "${libdir}" # The tests need a local PostgreSQL server running -RDEPENDS:${PN}-ptest = "postgresql" +RDEPENDS:${PN}-ptest += "psqlodbc postgresql diffutils" +RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils locale-base-en-us glibc-gconv glibc-charmaps" diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch index 8bdd27ff25..ba6a2d4fbb 100644 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch @@ -1,4 +1,4 @@ -From cf168ae0b7bceab8432d096719b331f18428fe39 Mon Sep 17 00:00:00 2001 +From 034a9c4ce2ae61cfcffa977f1eb8e6f68947f480 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 18 Mar 2020 15:10:37 -0700 Subject: [PATCH] cmake: Add check for atomic support @@ -18,6 +18,7 @@ Fixes | /mnt/b/yoe/build/tmp/work/mips32r2-yoe-linux/rocksdb/6.6.4-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: librocksdb.so.6.6.4: undefined reference to `__atomic_fetch_add_8' Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/6555] + Signed-off-by: Khem Raj <raj.khem@gmail.com> --- CMakeLists.txt | 5 +++ @@ -25,9 +26,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 2 files changed, 74 insertions(+) create mode 100644 cmake/modules/CheckAtomic.cmake +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5cfc1b4803..0a7f820a22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -935,7 +935,12 @@ endif() +@@ -1038,7 +1038,12 @@ set(ROCKSDB_SHARED_LIB rocksdb-shared${ARTIFACT_SUFFIX}) if(WIN32) set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib) else() @@ -39,7 +42,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> + endif() endif() - add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES} ${BUILD_VERSION_CC}) + set(ROCKSDB_PLUGIN_EXTERNS "") +diff --git a/cmake/modules/CheckAtomic.cmake b/cmake/modules/CheckAtomic.cmake +new file mode 100644 +index 0000000000..8b7dc8a377 --- /dev/null +++ b/cmake/modules/CheckAtomic.cmake @@ -0,0 +1,69 @@ @@ -112,3 +118,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> + endif() +endif() + +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch deleted file mode 100644 index 9c70d4f6a6..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-folly-Use-SYS_futex-for-syscall.patch +++ /dev/null @@ -1,42 +0,0 @@ -From ddcc8a9f7e0f0bfee96f2f0a0c10f21f9fa9b05d Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 15 Nov 2020 15:02:28 -0800 -Subject: [PATCH] folly: 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: Submitted [https://github.com/facebook/rocksdb/pull/7676] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - third-party/folly/folly/detail/Futex.cpp | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - ---- a/third-party/folly/folly/detail/Futex.cpp -+++ b/third-party/folly/folly/detail/Futex.cpp -@@ -48,9 +48,15 @@ namespace { - #define FUTEX_CLOCK_REALTIME 256 - #endif - -+/// 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 -+ - int nativeFutexWake(const void* addr, int count, uint32_t wakeMask) { - long rv = syscall( -- __NR_futex, -+ SYS_futex, - addr, /* addr1 */ - FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG, /* op */ - count, /* val */ -@@ -112,7 +118,7 @@ FutexResult nativeFutexWaitImpl( - // Unlike FUTEX_WAIT, FUTEX_WAIT_BITSET requires an absolute timeout - // value - http://locklessinc.com/articles/futex_cheat_sheet/ - long rv = syscall( -- __NR_futex, -+ SYS_futex, - addr, /* addr1 */ - op, /* op */ - expected, /* val */ diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch deleted file mode 100644 index dbb0dda221..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 1a69d4cc3f97e348dba9714c7ec60da1a8650664 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 15 Jun 2021 22:05:36 -0700 -Subject: [PATCH] jemalloc_helper: Limit the mm_malloc.h hack to glibc on linux - -Musl does not need this hack - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - port/jemalloc_helper.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/port/jemalloc_helper.h -+++ b/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/rocksdb/files/0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch deleted file mode 100644 index 86c1bffea6..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 89c032a9b4011385c0b504ea61e5df0db71f0ff5 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 16 Jun 2021 19:06:02 -0700 -Subject: [PATCH] range_tree: Implement toku_time_now for rv32/rv64 in asm - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - .../range_tree/lib/portability/toku_time.h | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h -index 4425a4a2e..4ac964f85 100644 ---- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h -+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h -@@ -133,6 +133,25 @@ static inline tokutime_t toku_time_now(void) { - return result; - #elif defined(__powerpc__) - return __ppc_get_timebase(); -+#elif defined(__riscv) // RISC-V -+#if __riscv_xlen == 32 -+ uint32_t lo, hi0, hi1; -+ __asm __volatile__( -+ "rdcycleh %0\n" -+ "rdcycle %1\n" -+ "rdcycleh %2\n" -+ "sub %0, %0, %2\n" -+ "seqz %0, %0\n" -+ "sub %0, zero, %0\n" -+ "and %1, %1, %0\n" -+ : "=r"(hi0), "=r"(lo), "=r"(hi1)); -+ return ((uint64_t)hi1 << 32) | lo; -+#else -+ uint64_t result; -+ __asm __volatile__("rdcycle %0" : "=r"(result)); -+ return result; -+#endif -+ - #else - #error No timer implementation for this platform - #endif --- -2.32.0 - diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch index 4aa91d9b26..342964cf2c 100644 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch @@ -1,4 +1,4 @@ -From 114c42fba3fc86119710e8dd1bb2b7a9e39e3064 Mon Sep 17 00:00:00 2001 +From 1ba84e1b8d4c9a3ad85dc443b0df4d79c89cca4b Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 17 Jun 2021 19:35:01 -0700 Subject: [PATCH] replace old sync with new atomic builtin equivalents @@ -6,11 +6,15 @@ Subject: [PATCH] replace old sync with new atomic builtin equivalents Helps compiling with gcc on newer arches e.g. riscv32 where these __sync* builtins are not implemented atleast for 64bit values +Upstream-Status: Pending + Signed-off-by: Khem Raj <raj.khem@gmail.com> --- .../range/range_tree/lib/portability/toku_atomic.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) +diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h +index aaa2298faf..9385902808 100644 --- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h +++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_atomic.h @@ -77,37 +77,37 @@ template <typename T, typename U> @@ -57,3 +61,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> } // in case you include this but not toku_portability.h +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch b/meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch index d3054759a7..6b46a1f300 100644 --- a/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch +++ b/meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch @@ -1,4 +1,4 @@ -From 46a4e585175cac8d76bd0b64f0fc27c9e22f04a1 Mon Sep 17 00:00:00 2001 +From bb3fc86f87a9acc64628e1cb32f5c8a1cfbeb880 Mon Sep 17 00:00:00 2001 From: Pascal Bach <pascal.bach@nextrem.ch> Date: Mon, 12 Oct 2020 21:22:46 +0200 Subject: [PATCH] cmake: Use exported target for bz2 @@ -8,21 +8,14 @@ This is not portable and makes it fail in environment like Yocto. Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541] --- - CMakeLists.txt | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) + CMakeLists.txt | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0a7f820a22..be80edb955 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -32,7 +32,7 @@ - # 3. cmake .. - # 4. make -j - --cmake_minimum_required(VERSION 3.5.1) -+cmake_minimum_required(VERSION 3.7.2) - - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules/") - include(ReadVersion) -@@ -152,12 +152,7 @@ else() +@@ -149,12 +149,7 @@ else() if(WITH_BZ2) find_package(BZip2 REQUIRED) add_definitions(-DBZIP2) @@ -36,3 +29,6 @@ Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/7541] endif() if(WITH_LZ4) +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch b/meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch new file mode 100644 index 0000000000..e2f785d7cf --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch @@ -0,0 +1,33 @@ +From bb10f55eb77be7b7eee94cb3506c9cbef8e24099 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 26 Jan 2023 13:00:43 -0800 +Subject: [PATCH] cmake: Do not add -msse4.2 -mpclmul on clang + +When testcase is compiled with clang and -msse4.2 -mpclmul is added to +cxxflags then clang -m32 still ends up compiling the test case which is +not correct for i386, therefore depend on yocto to pass the right flags +from environemnt via cflags rather than manufecture them here + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index be80edb955..a1bbade81a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -279,7 +279,7 @@ endif() + + include(CheckCXXSourceCompiles) + set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) +-if(NOT MSVC) ++if(NOT MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CMAKE_REQUIRED_FLAGS "-msse4.2 -mpclmul") + endif() + +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0004-Implement-support-for-musl-ppc64.patch b/meta-oe/recipes-dbs/rocksdb/files/0004-Implement-support-for-musl-ppc64.patch new file mode 100644 index 0000000000..5fcf1f7dae --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0004-Implement-support-for-musl-ppc64.patch @@ -0,0 +1,42 @@ +From c6accd34e8169d7a6b92fc89dce5d4309978e39e Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 21 Mar 2024 14:11:09 +0800 +Subject: [PATCH] Implement support for musl/ppc64 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + .../lock/range/range_tree/lib/portability/toku_time.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +index 9b83c53511..0a7488c397 100644 +--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h ++++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +@@ -58,7 +58,7 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved. + #include <stdint.h> + #include <sys/time.h> + #include <time.h> +-#if defined(__powerpc__) ++#if defined(__powerpc__) && defined(__GLIBC__) + #include <sys/platform/ppc.h> + #endif + +@@ -131,8 +131,12 @@ static inline tokutime_t toku_time_now(void) { + uint64_t result; + __asm __volatile__("mrs %[rt], cntvct_el0" : [rt] "=r"(result)); + return result; +-#elif defined(__powerpc__) ++#elif defined(__powerpc__) && defined(__GLIBC__) + return __ppc_get_timebase(); ++#elif defined(__powerpc64__) || defined(__ppc64__) ++ uint64_t result; ++ asm volatile("mfspr %0, 268" : "=r"(result)); ++ return result; + #elif defined(__s390x__) + uint64_t result; + asm volatile("stckf %0" : "=Q"(result) : : "cc"); +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0005-Implement-timer-implementation-for-mips-platform.patch b/meta-oe/recipes-dbs/rocksdb/files/0005-Implement-timer-implementation-for-mips-platform.patch new file mode 100644 index 0000000000..2979b73d2f --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0005-Implement-timer-implementation-for-mips-platform.patch @@ -0,0 +1,32 @@ +From 2ebc0ff33e41d23e4d3aec1a86f3d8bd4be410e7 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 21 Mar 2024 14:14:58 +0800 +Subject: [PATCH] Implement timer implementation for mips platform + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + .../lock/range/range_tree/lib/portability/toku_time.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +index 0a7488c397..ad7d9f2124 100644 +--- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h ++++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +@@ -162,6 +162,12 @@ static inline tokutime_t toku_time_now(void) { + unsigned long result; + asm volatile ("rdtime.d\t%0,$r0" : "=r" (result)); + return result; ++#elif defined(__mips__) ++ // mips apparently only allows rdtsc for superusers, so we fall ++ // back to gettimeofday. It's possible clock_gettime would be better. ++ struct timeval tv; ++ gettimeofday(&tv, nullptr); ++ return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec; + #else + #error No timer implementation for this platform + #endif +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/arm.patch b/meta-oe/recipes-dbs/rocksdb/files/0006-Implement-timer-for-arm-v6.patch index d428a6624a..0ae673c425 100644 --- a/meta-oe/recipes-dbs/rocksdb/files/arm.patch +++ b/meta-oe/recipes-dbs/rocksdb/files/0006-Implement-timer-for-arm-v6.patch @@ -1,9 +1,20 @@ -implement timer for arm >= v6 +From 9e274ba2762724f353227b5a3a6e4433f706468a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 21 Mar 2024 14:16:08 +0800 +Subject: [PATCH] Implement timer for arm >= v6 + +Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + .../range/range_tree/lib/portability/toku_time.h | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +index ad7d9f2124..bcb795b7e7 100644 --- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h +++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h -@@ -161,6 +161,20 @@ static inline tokutime_t toku_time_now(v +@@ -168,6 +168,20 @@ static inline tokutime_t toku_time_now(void) { struct timeval tv; gettimeofday(&tv, nullptr); return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec; @@ -24,3 +35,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> #else #error No timer implementation for this platform #endif +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch b/meta-oe/recipes-dbs/rocksdb/files/0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch new file mode 100644 index 0000000000..9ba34450ba --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch @@ -0,0 +1,39 @@ +From ed549d43c8b691cd7891c7e5c76df189feb04b4f Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Sun, 7 Apr 2024 17:16:53 +0800 +Subject: [PATCH] Fix declaration scope of LE_LOAD32 in crc32c + +Fix build error when __SSE4_2__ is defined: +util/crc32c.cc: In function 'void rocksdb::crc32c::DefaultCRC32(uint64_t*, const uint8_t**)': +util/crc32c.cc:267:53: error: 'LE_LOAD32' was not declared in this scope + 267 | *l = _mm_crc32_u32(static_cast<unsigned int>(*l), LE_LOAD32(*p)); + | ^~~~~~~~~ + +Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/12515] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + util/crc32c.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util/crc32c.cc b/util/crc32c.cc +index 38a69bb50..aa13ad882 100644 +--- a/util/crc32c.cc ++++ b/util/crc32c.cc +@@ -242,12 +242,12 @@ static const uint32_t table3_[256] = { + 0xc747336e, 0x1a0299d6, 0x782010ef, 0xa565ba57, 0xbc65029d, 0x6120a825, + 0x0302211c, 0xde478ba4, 0x31035088, 0xec46fa30, 0x8e647309, 0x5321d9b1, + 0x4a21617b, 0x9764cbc3, 0xf54642fa, 0x2803e842}; ++#endif // !__SSE4_2__ + + // Used to fetch a naturally-aligned 32-bit word in little endian byte-order + static inline uint32_t LE_LOAD32(const uint8_t* p) { + return DecodeFixed32(reinterpret_cast<const char*>(p)); + } +-#endif // !__SSE4_2__ + + static inline void DefaultCRC32(uint64_t* l, uint8_t const** p) { + #ifndef __SSE4_2__ +-- +2.25.1 + diff --git a/meta-oe/recipes-dbs/rocksdb/files/mips.patch b/meta-oe/recipes-dbs/rocksdb/files/mips.patch deleted file mode 100644 index db2305d296..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/mips.patch +++ /dev/null @@ -1,19 +0,0 @@ -implement timer implementation for mips platform - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h -+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h -@@ -155,7 +155,12 @@ static inline tokutime_t toku_time_now(v - __asm __volatile__("rdcycle %0" : "=r"(result)); - return result; - #endif -- -+#elif defined(__mips__) -+ // mips apparently only allows rdtsc for superusers, so we fall -+ // back to gettimeofday. It's possible clock_gettime would be better. -+ struct timeval tv; -+ gettimeofday(&tv, nullptr); -+ return (uint64_t)tv.tv_sec * 1000000 + tv.tv_usec; - #else - #error No timer implementation for this platform - #endif diff --git a/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch b/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch deleted file mode 100644 index bc40f1b1e7..0000000000 --- a/meta-oe/recipes-dbs/rocksdb/files/ppc64.patch +++ /dev/null @@ -1,28 +0,0 @@ -implement support for musl/ppc64 - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- a/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h -+++ b/utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h -@@ -58,7 +58,7 @@ Copyright (c) 2006, 2015, Percona and/or - #include <stdint.h> - #include <sys/time.h> - #include <time.h> --#if defined(__powerpc__) -+#if defined(__powerpc__) && defined(__GLIBC__) - #include <sys/platform/ppc.h> - #endif - -@@ -131,8 +131,12 @@ static inline tokutime_t toku_time_now(v - uint64_t result; - __asm __volatile__("mrs %[rt], cntvct_el0" : [ rt ] "=r"(result)); - return result; --#elif defined(__powerpc__) -+#elif defined(__powerpc__) && defined(__GLIBC__) - return __ppc_get_timebase(); -+#elif defined(__powerpc64__) || defined(__ppc64__) -+ uint64_t result; -+ asm volatile("mfspr %0, 268" : "=r"(result)); -+ return result; - #elif defined(__riscv) // RISC-V - #if __riscv_xlen == 32 - uint32_t lo, hi0, hi1; diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb index 2ad2d38a53..444351dbb4 100644 --- a/meta-oe/recipes-dbs/rocksdb/rocksdb_6.20.3.bb +++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb @@ -6,18 +6,17 @@ LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \ file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837" -SRCREV = "8608d75d85f8e1b3b64b73a4fb6d19baec61ba5c" -SRCBRANCH = "6.20.fb" +SRCREV = "f4441966592636253fd5ab0bb9ed44fc2697fc53" +SRCBRANCH = "9.0.fb" SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH};protocol=https \ file://0001-cmake-Add-check-for-atomic-support.patch \ - file://0001-cmake-Use-exported-target-for-bz2.patch \ - file://0001-folly-Use-SYS_futex-for-syscall.patch \ - file://0001-jemalloc_helper-Limit-the-mm_malloc.h-hack-to-glibc-.patch \ - file://0001-range_tree-Implement-toku_time_now-for-rv32-rv64-in-.patch \ - file://ppc64.patch \ - file://mips.patch \ - file://arm.patch \ + file://0002-cmake-Use-exported-target-for-bz2.patch \ + file://0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch \ + file://0004-Implement-support-for-musl-ppc64.patch \ + file://0005-Implement-timer-implementation-for-mips-platform.patch \ + file://0006-Implement-timer-for-arm-v6.patch \ + file://0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch \ " SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" @@ -46,13 +45,13 @@ EXTRA_OECMAKE = "\ -DFAIL_ON_WARNINGS=OFF \ " +CXXFLAGS += "${@bb.utils.contains('SELECTED_OPTIMIZATION', '-Og', '-DXXH_NO_INLINE_HINTS', '', d)}" + do_install:append() { - # fix for qa check buildpaths + # Fix for qa check buildpaths sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/rocksdb/RocksDBTargets.cmake } -LDFLAGS:append:riscv64 = " -pthread" - # Need toku_time_now() implemented for ppc/musl # see utilities/transactions/lock/range/range_tree/lib/portability/toku_time.h COMPATIBLE_HOST:libc-musl:powerpc = "null" diff --git a/meta-oe/recipes-dbs/soci/soci/0001-Do-not-use-std-shuffle-with-clang-15.patch b/meta-oe/recipes-dbs/soci/soci/0001-Do-not-use-std-shuffle-with-clang-15.patch new file mode 100644 index 0000000000..eb29627c6d --- /dev/null +++ b/meta-oe/recipes-dbs/soci/soci/0001-Do-not-use-std-shuffle-with-clang-15.patch @@ -0,0 +1,32 @@ +From e5f72c656829402c6f70e7416039bc18f0c26485 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 30 Aug 2022 22:17:14 -0700 +Subject: [PATCH] Do not use std::shuffle with clang 15 + +This fails to compile although its preferred approach for c++11 and +newer + +See +https://github.com/SOCI/soci/issues/984 + +Upstream-Status: Inappropriate [Workaround] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + cmake/SociConfig.cmake | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cmake/SociConfig.cmake b/cmake/SociConfig.cmake +index 492e1837..f24fd9a6 100644 +--- a/cmake/SociConfig.cmake ++++ b/cmake/SociConfig.cmake +@@ -94,6 +94,7 @@ else() + set(SOCI_CXX11 ON) + set(SOCI_CXX_VERSION_FLAGS "-std=c++11") + add_definitions(-DCATCH_CONFIG_CPP11_NO_IS_ENUM) ++ add_definitions(-DCATCH_CONFIG_CPP11_NO_SHUFFLE) + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SOCI_GCC_CLANG_COMMON_FLAGS} ${SOCI_CXX_VERSION_FLAGS}") + +-- +2.37.3 + diff --git a/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch b/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch deleted file mode 100644 index 00a1a5c862..0000000000 --- a/meta-oe/recipes-dbs/soci/soci/soci_libdir.patch +++ /dev/null @@ -1,28 +0,0 @@ -Define SOCI_LIBDIR only if its not passed via environemnt. In OE we -want to set it per our choice since we use 'lib' for 64bit unless we -are using multilib - --Khem - -Index: soci-3.2.2/CMakeLists.txt -=================================================================== ---- soci-3.2.2.orig/CMakeLists.txt -+++ soci-3.2.2/CMakeLists.txt -@@ -69,11 +69,12 @@ include(SociDependencies) - ############################################################################### - # Installation - ############################################################################### -- --if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4) -- set(SOCI_LIBDIR "lib") --else() -- set(SOCI_LIBDIR "lib64") -+if(NOT DEFINED SOCI_LIBDIR) -+ if(APPLE OR CMAKE_SIZEOF_VOID_P EQUAL 4) -+ set(SOCI_LIBDIR "lib") -+ else() -+ set(SOCI_LIBDIR "lib") -+ endif() - endif() - - set(BINDIR "bin" CACHE PATH "The directory to install binaries into.") diff --git a/meta-oe/recipes-dbs/soci/soci_4.0.3.bb b/meta-oe/recipes-dbs/soci/soci_4.0.3.bb index ff47e5033e..315f5d515e 100644 --- a/meta-oe/recipes-dbs/soci/soci_4.0.3.bb +++ b/meta-oe/recipes-dbs/soci/soci_4.0.3.bb @@ -3,9 +3,10 @@ HOMEPAGE = "http://soci.sourceforge.net" LICENSE = "BSL-1.0" LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" SECTION = "libs" -DEPENDS = "boost" -SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BP}/${BP}.tar.gz" +SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${BP}/${BP}.tar.gz \ + file://0001-Do-not-use-std-shuffle-with-clang-15.patch \ + " SRC_URI[sha256sum] = "615e5f7e4b52007f3a3b4050a99aadf6346b56b5098eb08b3a650836083c6a33" TESTCONFIG = '-DSOCI_TEST_EMPTY_CONNSTR="dummy" -DSOCI_TEST_SQLITE3_CONNSTR="test.db" \ @@ -16,20 +17,20 @@ OBASEDIR ?= "/opt/oracle" OINCDIR = "rdbms/public" OLIBDIR = "lib" -PACKAGECONFIG[sqlite3] = "-DSOCI_SQLITE3=ON,-DSOCI_SQLITE3=OFF,sqlite3," -PACKAGECONFIG[mysql] = "-DSOCI_MYSQL=ON,-DSOCI_MYSQL=OFF,mariadb," -PACKAGECONFIG[postgresql] = "-DSOCI_POSTGRESQL=ON,-DSOCI_POSTGRESQL=OFF,postgresql," -PACKAGECONFIG[odbc] = "-DSOCI_ODBC=ON,-DSOCI_ODBC=OFF,," +PACKAGECONFIG[sqlite3] = "-DWITH_SQLITE3=ON,-DWITH_SQLITE3=OFF,sqlite3," +PACKAGECONFIG[mysql] = "-DWITH_MYSQL=ON,-DWITH_MYSQL=OFF,mariadb," +PACKAGECONFIG[postgresql] = "-DWITH_POSTGRESQL=ON,-DWITH_POSTGRESQL=OFF,postgresql," +PACKAGECONFIG[odbc] = "-DWITH_ODBC=ON,-DWITH_ODBC=OFF,," PACKAGECONFIG[empty] = "-DSOCI_EMPTY=ON,-DSOCI_EMPTY=OFF,," PACKAGECONFIG[oracle] = "-DWITH_ORACLE=ON --with-oracle-include=${OINCDIR} --with-oracle-lib=${OLIBDIR},-DWITH_ORACLE=OFF,," PACKAGECONFIG[firebird] = "-DWITH_FIREBIRD=ON,-DWITH_FIREBIRD=OFF,," -PACKAGECONFIG[ptest] = "${TESTCONFIG},,," +PACKAGECONFIG[boost] = "-DWITH_BOOST=ON,-DWITH_BOOST=OFF,boost" +PACKAGECONFIG[ptest] = "${TESTCONFIG},-DSOCI_TESTS=OFF,," # enable your backend by default we enable 'empty' -PACKAGECONFIG ??= "empty" +PACKAGECONFIG ??= "boost empty" -# Take the flags added by PACKAGECONFIG and pass them to cmake. -EXTRA_OECMAKE = "${EXTRA_OECONF} -DSOCI_LIBDIR=${libdir}" +EXTRA_OECMAKE = "-DWITH_DB2=OFF" DISABLE_STATIC = "" inherit dos2unix cmake @@ -41,3 +42,7 @@ FILES:${PN}-mysql = "${libdir}/lib${BPN}_mysql.so.*" FILES:${PN}-postgresql = "${libdir}/lib${BPN}_postgresql.so.*" FILES:${PN}-odbc = "${libdir}/lib${BPN}_odbc.so.*" FILES:${PN}-oracle = "${libdir}/lib${BPN}_oracle.so.*" + +do_install:append() { + sed -i 's|${RECIPE_SYSROOT}${prefix}|${_IMPORT_PREFIX}|g' ${D}${libdir}/cmake/SOCI/SOCITargets*.cmake +} diff --git a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch b/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch deleted file mode 100644 index c5d7c0c81a..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/0001-shell.c-Fix-format-not-a-string-literal-warning.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 443980ddc82fb40e2e1f9544f2be169bd23dd246 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 17 Jun 2017 16:49:24 -0700 -Subject: [PATCH] shell.c: Fix format not a string literal warning - -src/shell.c:695:20: error: format not a string literal and no format arguments [-Werror=format-security] -| fprintf(stderr,zHelp); -| ^~~~~ - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/shell.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/shell.c b/src/shell.c -index bb46c49..3c6fe0f 100644 ---- a/src/shell.c -+++ b/src/shell.c -@@ -692,7 +692,7 @@ static int do_meta_command(char *zLine, struct callback_data *p){ - }else - - if( c=='h' && strncmp(azArg[0], "help", n)==0 ){ -- fprintf(stderr,zHelp); -+ fprintf(stderr, "%s", zHelp); - }else - - if( c=='i' && strncmp(azArg[0], "indices", n)==0 && nArg>1 ){ --- -2.13.1 - diff --git a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch b/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch deleted file mode 100644 index 914422f1df..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_build_dynamic.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -urN sqlite-2.8.17.orig/main.mk sqlite-2.8.17/main.mk ---- sqlite-2.8.17.orig/main.mk 2005-04-23 22:43:23.000000000 +0000 -+++ sqlite-2.8.17/main.mk 2009-04-02 20:10:36.000000000 +0000 -@@ -139,7 +139,7 @@ - # This is the default Makefile target. The objects listed here - # are what get build when you type just "make" with no arguments. - # --all: sqlite.h config.h libsqlite.a sqlite$(EXE) -+all: sqlite.h config.h libsqlite.so sqlite$(EXE) - - # Generate the file "last_change" which contains the date of change - # of the most recently modified source code file -@@ -148,13 +148,12 @@ - cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \ - | awk '{print $$5,$$6}' >last_change - --libsqlite.a: $(LIBOBJ) -- $(AR) libsqlite.a $(LIBOBJ) -- $(RANLIB) libsqlite.a -- --sqlite$(EXE): $(TOP)/src/shell.c libsqlite.a sqlite.h -- $(TCCX) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \ -- libsqlite.a $(LIBREADLINE) $(THREADLIB) -+libsqlite.so: $(LIBOBJ) -+ $(CC) $(LDFLAGS) -shared -o libsqlite.so -Wl,-soname,libsqlite.so.0 $(LIBOBJ) -+ -+sqlite$(EXE): $(TOP)/src/shell.c libsqlite.so sqlite.h -+ $(TCCX) $(LDFLAGS) $(READLINE_FLAGS) -o sqlite$(EXE) $(TOP)/src/shell.c \ -+ -lsqlite $(LIBREADLINE) $(THREADLIB) - - sqlite_analyzer$(EXE): $(TOP)/src/tclsqlite.c libsqlite.a $(TESTSRC) \ - $(TOP)/tool/spaceanal.tcl diff --git a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch b/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch deleted file mode 100644 index b84b6486ef..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/mainmk_no_tcl.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -bur sqlite-2.8.17~orig/main.mk sqlite-2.8.17/main.mk ---- sqlite-2.8.17~orig/main.mk 2006-02-13 04:09:33.000000000 -0600 -+++ sqlite-2.8.17/main.mk 2006-02-13 04:15:42.000000000 -0600 -@@ -58,7 +58,7 @@ - expr.o func.o hash.o insert.o \ - main.o opcodes.o os.o pager.o parse.o pragma.o printf.o random.o \ - select.o table.o tokenize.o trigger.o update.o util.o \ -- vacuum.o vdbe.o vdbeaux.o where.o tclsqlite.o -+ vacuum.o vdbe.o vdbeaux.o where.o - - # All of the source code files. - # -@@ -91,7 +91,6 @@ - $(TOP)/src/sqlite.h.in \ - $(TOP)/src/sqliteInt.h \ - $(TOP)/src/table.c \ -- $(TOP)/src/tclsqlite.c \ - $(TOP)/src/tokenize.c \ - $(TOP)/src/trigger.c \ - $(TOP)/src/update.c \ diff --git a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/sqlite.pc b/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/sqlite.pc deleted file mode 100644 index 6bc742eecb..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite-2.8.17/sqlite.pc +++ /dev/null @@ -1,12 +0,0 @@ -# Package Information for pkg-config - -prefix=/usr -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: SQLite -Description: SQL database engine -Version: 2.8.17 -Libs: -L${libdir} -lsqlite -Cflags: -I${includedir} diff --git a/meta-oe/recipes-dbs/sqlite/sqlite_2.8.17.bb b/meta-oe/recipes-dbs/sqlite/sqlite_2.8.17.bb deleted file mode 100644 index bb62afab48..0000000000 --- a/meta-oe/recipes-dbs/sqlite/sqlite_2.8.17.bb +++ /dev/null @@ -1,61 +0,0 @@ -SUMMARY = "An Embeddable SQL Database Engine" -HOMEPAGE = "http://www.sqlite.org/" -SECTION = "libs" -DEPENDS = "readline ncurses" -LICENSE = "PD" -LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=10;md5=e98469a8efa024a38ad5b2e4b92f4a96" - -PR = "r7" - -SRC_URI = "http://www.hwaci.com/sw/sqlite/sqlite-${PV}.tar.gz \ - file://mainmk_build_dynamic.patch \ - file://mainmk_no_tcl.patch \ - file://sqlite.pc \ - file://0001-shell.c-Fix-format-not-a-string-literal-warning.patch \ - " - -SOURCES = "attach.o auth.o btree.o btree_rb.o build.o copy.o date.o delete.o \ - expr.o func.o hash.o insert.o main.o opcodes.o os.o pager.o \ - parse.o pragma.o printf.o random.o select.o table.o tokenize.o \ - trigger.o update.o util.o vacuum.o vdbe.o vdbeaux.o where.o" - -inherit autotools pkgconfig - -do_configure() { - echo "main.mk is patched, no need to configure" - # make pkgconfig.bbclass pick this up - cp ${WORKDIR}/sqlite.pc ${S} -} - -do_compile() { - oe_runmake -f ${S}/Makefile.linux-gcc \ - TOP="${S}" \ - BCC="${BUILD_CC}" \ - TCC="${CC}" \ - OPTS="-fPIC -D'INTPTR_TYPE=int'" \ - TCL_FLAGS= LIBTCL= \ - READLINE_FLAGS="-DHAVE_READLINE=1 -I${STAGING_INCDIR}" \ - LIBREADLINE="-L. -L${STAGING_LIBDIR} -lreadline -lncurses" -} - -do_install() { - install -d ${D}${libdir} ${D}${bindir} - install sqlite ${D}${bindir} - install -m 0755 libsqlite.so ${D}${libdir}/libsqlite.so.0.8.6 - ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so - ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0 - ln -sf libsqlite.so.0.8.6 ${D}${libdir}/libsqlite.so.0.8 - install -d ${D}${includedir} - install -m 0644 sqlite.h ${D}${includedir}/sqlite.h - install -d ${D}${libdir}/pkgconfig - install -m 0644 ${S}/sqlite.pc ${D}${libdir}/pkgconfig/sqlite.pc -} - -PACKAGES += "${PN}-bin" -FILES:${PN}-bin = "${bindir}/*" -FILES:${PN} = "${libdir}/*.so.*" - -SRC_URI[md5sum] = "838dbac20b56d2c4292e98848505a05b" -SRC_URI[sha256sum] = "3f35ebfb67867fb5b583a03e480f900206af637efe7179b32294a6a0cf806f37" - -BBCLASSEXTEND = "native" |