aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-dbs')
-rw-r--r--meta-oe/recipes-dbs/influxdb/influxdb/0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch2
-rw-r--r--meta-oe/recipes-dbs/influxdb/influxdb_1.8.10.bb19
-rw-r--r--meta-oe/recipes-dbs/leveldb/leveldb/0001-CMakeLists.txt-fix-googletest-related-options.patch55
-rw-r--r--meta-oe/recipes-dbs/leveldb/leveldb/0001-Fix-printing-64-bit-integer-types.patch43
-rw-r--r--meta-oe/recipes-dbs/leveldb/leveldb_1.23.bb (renamed from meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb)10
-rw-r--r--meta-oe/recipes-dbs/libdbi/libdbi_0.9.0.bb1
-rw-r--r--meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch2
-rw-r--r--meta-oe/recipes-dbs/lmdb/files/0001-make-set-soname-on-liblmdb.patch2
-rw-r--r--meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb (renamed from meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb)6
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb-native_10.11.7.bb (renamed from meta-oe/recipes-dbs/mysql/mariadb-native_10.8.3.bb)1
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb.inc35
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch84
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch2
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/0001-MDEV-33439-Fix-build-with-libxml2-2.12.patch170
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/0001-Remove-the-compile_time_assert-lines.patch43
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/0001-aio_linux-Check-if-syscall-exists-before-using-it.patch2
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/lfs64.patch21
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/mm_malloc.patch2
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch2
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/run-ptest20
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch2
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb_10.11.7.bb63
-rw-r--r--meta-oe/recipes-dbs/mysql/mariadb_10.8.3.bb26
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch26
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/0002-Improve-reproducibility.patch (renamed from meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch)8
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/0003-configure.ac-bypass-autoconf-2.69-version-check.patch (renamed from meta-oe/recipes-dbs/postgresql/files/0001-configure.ac-bypass-autoconf-2.69-version-check.patch)14
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/0004-config_info.c-not-expose-build-info.patch (renamed from meta-oe/recipes-dbs/postgresql/files/0001-config_info.c-not-expose-build-info.patch)20
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/0005-postgresql-fix-ptest-failure-of-sysviews.patch49
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch2
-rw-r--r--meta-oe/recipes-dbs/postgresql/files/remove_duplicate.patch38
-rw-r--r--meta-oe/recipes-dbs/postgresql/postgresql.inc27
-rw-r--r--meta-oe/recipes-dbs/postgresql/postgresql_14.5.bb18
-rw-r--r--meta-oe/recipes-dbs/postgresql/postgresql_16.3.bb16
-rw-r--r--meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-donot-use-the-hardcode-libdir.patch2
-rw-r--r--meta-oe/recipes-dbs/psqlodbc/files/psqlodbc-fix-for-ptest-support.patch19
-rw-r--r--meta-oe/recipes-dbs/psqlodbc/psqlodbc_16.00.0000.bb (renamed from meta-oe/recipes-dbs/psqlodbc/psqlodbc_13.02.0000.bb)8
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch13
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch9
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0002-cmake-Use-exported-target-for-bz2.patch (renamed from meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Use-exported-target-for-bz2.patch)13
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0003-cmake-Do-not-add-msse4.2-mpclmul-on-clang.patch33
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0004-Implement-support-for-musl-ppc64.patch42
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0005-Implement-timer-implementation-for-mips-platform.patch32
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0006-Implement-timer-for-arm-v6.patch (renamed from meta-oe/recipes-dbs/rocksdb/files/arm.patch)18
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0007-Fix-declaration-scope-of-LE_LOAD32-in-crc32c.patch39
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/mips.patch18
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/ppc64.patch28
-rw-r--r--meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb (renamed from meta-oe/recipes-dbs/rocksdb/rocksdb_7.5.3.bb)20
-rw-r--r--meta-oe/recipes-dbs/soci/soci/soci_libdir.patch28
-rw-r--r--meta-oe/recipes-dbs/soci/soci_4.0.3.bb21
49 files changed, 907 insertions, 267 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..9506d0e55d 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
@@ -36,19 +38,20 @@ USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system -d /var/lib/influxdb -m -s /bin/nologin influxdb"
do_install:prepend() {
- rm ${B}/src/${GO_IMPORT}/build.py
- rm ${B}/src/${GO_IMPORT}/build.sh
- rm ${B}/src/${GO_IMPORT}/Dockerfile*
+ test -e ${B}/src/${GO_IMPORT}/build.py && rm ${B}/src/${GO_IMPORT}/build.py
+ test -e ${B}/src/${GO_IMPORT}/build.sh && rm ${B}/src/${GO_IMPORT}/build.sh
+ rm -rf ${B}/src/${GO_IMPORT}/Dockerfile*
+
sed -i -e "s#usr/bin/sh#bin/sh#g" ${B}/src/${GO_IMPORT}/scripts/ci/run_perftest.sh
}
do_install:append() {
install -d ${D}${sysconfdir}/influxdb
- install -m 0644 ${WORKDIR}/influxdb.conf ${D}${sysconfdir}/influxdb
- chown -R root.influxdb ${D}${sysconfdir}/influxdb
+ install -m 0644 ${UNPACKDIR}/influxdb.conf ${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
+ install -m 0755 ${UNPACKDIR}/influxdb ${D}${sysconfdir}/init.d/influxdb
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ] ; then
install -d ${D}${sysconfdir}/logrotate.d
@@ -58,11 +61,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
index 312809d1d2..3dde46573f 100644
--- 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
@@ -4,6 +4,8 @@ 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/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb
index a76d388d70..b2f1920f6b 100644
--- a/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb
+++ b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.31.bb
@@ -14,18 +14,18 @@ SRC_URI = "git://github.com/LMDB/lmdb.git;nobranch=1;protocol=https \
file://0001-make-set-soname-on-liblmdb.patch;patchdir=../.. \
"
-SRCREV = "8ad7be2510414b9506ec9f9e24f24d04d9b04a1a"
+SRCREV = "ce201088de95d26fc0da36ba805bf2ddc2ba74ff"
inherit ptest
S = "${WORKDIR}/git/libraries/liblmdb"
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 17a06349b0..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
@@ -18,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 2ef0d1aa3b..695965f7d2 100644
--- a/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -21,18 +21,19 @@ SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \
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"
-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"
@@ -41,10 +42,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"
@@ -66,7 +63,7 @@ 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"
@@ -81,6 +78,7 @@ BUILD_CFLAGS += "-fuse-ld=bfd"
BUILD_CXXFLAGS += "-fuse-ld=bfd"
LDFLAGS:x86:toolchain-clang = "-latomic"
+LDFLAGS:riscv32:toolchain-clang = "-latomic"
EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \
-DWITH_JEMALLOC=no \
@@ -99,6 +97,7 @@ EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \
-DMYSQL_DATADIR:PATH=/var/mysql \
-DCAT_EXECUTABLE=`which cat` \
-DSTACK_DIRECTION=1 \
+ -DHAVE_SYSTEM_LIBFMT_EXITCODE=0 \
-DCMAKE_AR:FILEPATH=${AR}"
@@ -109,6 +108,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'`
@@ -139,6 +143,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"
@@ -157,18 +162,18 @@ do_install() {
oe_runmake 'DESTDIR=${D}' install
install -d ${D}/${sysconfdir}/init.d
- install -m 0644 ${WORKDIR}/my.cnf ${D}/${sysconfdir}/
- install -m 0755 ${WORKDIR}/install_db ${D}/${sysconfdir}/init.d/
+ install -m 0644 ${UNPACKDIR}/my.cnf ${D}/${sysconfdir}/
+ install -m 0755 ${UNPACKDIR}/install_db ${D}/${sysconfdir}/init.d/
mv ${D}/${sysconfdir}/init.d/mysql ${D}/${sysconfdir}/init.d/mysqld
install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/mysqld.service ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/install_db.service ${D}${systemd_unitdir}/system
+ install -m 0644 ${UNPACKDIR}/mysqld.service ${D}${systemd_unitdir}/system
+ install -m 0644 ${UNPACKDIR}/install_db.service ${D}${systemd_unitdir}/system
sed -i -e 's,@BINDIR@,${bindir},g' -e 's,@PREFIX@,${prefix},g' ${D}${systemd_unitdir}/system/mysqld.service \
${D}${systemd_unitdir}/system/install_db.service
install -d ${D}${bindir}
- install -m 755 ${WORKDIR}/mysql-systemd-start ${D}${bindir}
+ install -m 755 ${UNPACKDIR}/mysql-systemd-start ${D}${bindir}
install -d ${D}${datadir}/doc/${PN}
if [ -f ${D}${datadir}/doc/README ]; then
mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/
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/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 87faabfa27..0000000000
--- a/meta-oe/recipes-dbs/mysql/mariadb_10.8.3.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require mariadb.inc
-
-DEPENDS += "mariadb-native bison-native boost libpcre2 curl ncurses \
- zlib libaio libedit libevent libxml2 gnutls fmt lzo zstd"
-
-PROVIDES += "mysql5 libmysqlclient"
-
-RPROVIDES:${PN} += "mysql5"
-RREPLACES:${PN} += "mysql5"
-RCONFLICTS:${PN} += "mysql5"
-
-RPROVIDES:${PN}-dbg += "mysql5-dbg"
-RREPLACES:${PN}-dbg += "mysql5-dbg"
-RCONFLICTS:${PN}-dbg += "mysql5-dbg"
-
-RPROVIDES:${PN}-leftovers += "mysql5-leftovers"
-RREPLACES:${PN}-leftovers += "mysql5-leftovers"
-RCONFLICTS:${PN}-leftovers += "mysql5-leftovers"
-
-RPROVIDES:${PN}-client += "mysql5-client"
-RREPLACES:${PN}-client += "mysql5-client"
-RCONFLICTS:${PN}-client += "mysql5-client"
-
-RPROVIDES:${PN}-server += "mysql5-server"
-RREPLACES:${PN}-server += "mysql5-server"
-RCONFLICTS:${PN}-server += "mysql5-server"
diff --git a/meta-oe/recipes-dbs/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..9df4d073ff 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.3], [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 52ca276da6..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,19 +27,19 @@ 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 @@
+@@ -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 = (ConfigData *) palloc(*configdata_len * sizeof(ConfigData));
+ configdata = palloc_array(ConfigData, *configdata_len);
configdata[i].name = pstrdup("BINDIR");
-@@ -123,74 +123,6 @@
+@@ -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/not-check-libperl.patch b/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
index fa46912eef..1f735f322b 100644
--- a/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
+++ b/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
@@ -23,7 +23,7 @@ diff --git a/configure.ac b/configure.ac
index fba79ee..7170f26 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -2261,7 +2261,7 @@ Use --without-tcl to disable building PL/Tcl.])
+@@ -2297,7 +2297,7 @@ Use --without-tcl to disable building PL/Tcl.])
fi
# check for <perl.h>
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 60d44ce979..2dd7dd6fda 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
@@ -195,24 +198,24 @@ do_install:append() {
# install dirs and server init
install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${WORKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server
+ install -m 0755 ${UNPACKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server
sed -i -e "s/^PGVERSION=.*$/PGVERSION=${PV}/g" ${D}${sysconfdir}/init.d/${BPN}-server
- install -m 0755 ${WORKDIR}/${BPN}-setup ${D}${bindir}/${BPN}-setup
+ install -m 0755 ${UNPACKDIR}/${BPN}-setup ${D}${bindir}/${BPN}-setup
install -d -m 700 ${D}${localstatedir}/lib/${BPN}/data
install -d -m 700 ${D}${localstatedir}/lib/${BPN}/backups
- install -m 644 ${WORKDIR}/${BPN}-profile ${D}${localstatedir}/lib/${BPN}/.profile
+ install -m 644 ${UNPACKDIR}/${BPN}-profile ${D}${localstatedir}/lib/${BPN}/.profile
chown -R postgres:postgres ${D}${localstatedir}/lib/${BPN}
# multiple server config directory
install -d -m 700 ${D}${sysconfdir}/default/${BPN}
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
+ install -m 644 ${UNPACKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql
fi
# Install systemd unit files
install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${WORKDIR}/postgresql.service ${D}${systemd_unitdir}/system
+ install -m 0644 ${UNPACKDIR}/postgresql.service ${D}${systemd_unitdir}/system
sed -i -e 's,@BINDIR@,${bindir},g' \
${D}${systemd_unitdir}/system/postgresql.service
# Remove the build path
@@ -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.3.bb b/meta-oe/recipes-dbs/postgresql/postgresql_16.3.bb
new file mode 100644
index 0000000000..6df719cd98
--- /dev/null
+++ b/meta-oe/recipes-dbs/postgresql/postgresql_16.3.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] = "331963d5d3dc4caf4216a049fa40b66d6bcb8c730615859411b9518764e60585"
+
+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 acfaa3f6be..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
@@ -3,7 +3,7 @@ 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>
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 30e67b7dfb..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
@@ -19,8 +19,6 @@ Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
test/runsuite.c | 20 ++++++++++----------
3 files changed, 15 insertions(+), 15 deletions(-)
-diff --git a/test/Makefile.in b/test/Makefile.in
-index 3f9a9af..09406ae 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -19,7 +19,7 @@ CPPFLAGS = @CPPFLAGS@ -I.. # config.h
@@ -32,8 +30,6 @@ index 3f9a9af..09406ae 100644
all: $(TESTBINS) runsuite reset-db
-diff --git a/test/odbcini-gen.sh b/test/odbcini-gen.sh
-index 2eaba35..6555cdb 100755
--- a/test/odbcini-gen.sh
+++ b/test/odbcini-gen.sh
@@ -6,7 +6,7 @@
@@ -45,6 +41,15 @@ index 2eaba35..6555cdb 100755
driver=${drvr}.so
if test ! -e $driver ; then
driver=${drvr}.dll
+@@ -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 =
@@ -59,8 +64,6 @@ index 2eaba35..6555cdb 100755
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
-diff --git a/test/runsuite.c b/test/runsuite.c
-index 3be5732..cd842dc 100644
--- a/test/runsuite.c
+++ b/test/runsuite.c
@@ -55,7 +55,7 @@ bailout(const char *fmt, ...)
@@ -72,7 +75,7 @@ index 3be5732..cd842dc 100644
{
const char *basename;
#ifdef WIN32
-@@ -69,7 +69,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);
@@ -90,7 +93,7 @@ index 3be5732..cd842dc 100644
if (runtest(binname, testname, i, inputdir) != 0)
failures++;
}
-@@ -161,29 +161,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 "
diff --git a/meta-oe/recipes-dbs/psqlodbc/psqlodbc_13.02.0000.bb b/meta-oe/recipes-dbs/psqlodbc/psqlodbc_16.00.0000.bb
index 299abee000..a1ef8e75e9 100644
--- a/meta-oe/recipes-dbs/psqlodbc/psqlodbc_13.02.0000.bb
+++ b/meta-oe/recipes-dbs/psqlodbc/psqlodbc_16.00.0000.bb
@@ -14,7 +14,7 @@ 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"
@@ -26,7 +26,7 @@ SRC_URI = "http://ftp.postgresql.org/pub/odbc/versions/src/${BPN}-${PV}.tar.gz \
file://run-ptest \
"
-SRC_URI[sha256sum] = "b39b7e5c41fd6475c551112fa724bf57c4a446175ec4188a90e2844cc1612585"
+SRC_URI[sha256sum] = "afd892f89d2ecee8d3f3b2314f1bd5bf2d02201872c6e3431e5c31096eca4c8b"
DEPENDS += "postgresql unixodbc"
@@ -58,5 +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 2906100dee..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
-@@ -1000,7 +1000,12 @@ option(ROCKSDB_BUILD_SHARED "Build share
+@@ -1038,7 +1038,12 @@ set(ROCKSDB_SHARED_LIB rocksdb-shared${ARTIFACT_SUFFIX})
if(WIN32)
set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib)
else()
@@ -40,6 +43,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
endif()
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-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 139312a298..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,12 +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
-@@ -153,12 +153,7 @@ else()
+@@ -149,12 +149,7 @@ else()
if(WITH_BZ2)
find_package(BZip2 REQUIRED)
add_definitions(-DBZIP2)
@@ -27,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 573767797d..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
-@@ -164,6 +164,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 0104d54347..0000000000
--- a/meta-oe/recipes-dbs/rocksdb/files/mips.patch
+++ /dev/null
@@ -1,18 +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
-@@ -158,6 +158,12 @@ static inline tokutime_t toku_time_now(v
- uint64_t cycles;
- asm volatile("rdcycle %0" : "=r"(cycles));
- return cycles;
-+#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 45deef338c..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(__s390x__)
- uint64_t result;
- asm volatile("stckf %0" : "=Q"(result) : : "cc");
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_7.5.3.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb
index d4f0346ee1..444351dbb4 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_7.5.3.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.0.0.bb
@@ -6,15 +6,17 @@ LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837"
-SRCREV = "540d5aae516265170564ec27b3e67a54a11b7045"
-SRCBRANCH = "7.5.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://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"
@@ -43,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/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 71ab80c48a..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,7 +3,6 @@ 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 \
file://0001-Do-not-use-std-shuffle-with-clang-15.patch \
@@ -18,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
@@ -43,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
+}