summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-dbs
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-dbs')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch34
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch37
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0002-makefile-build-SHARED_MEMENVLIB.patch43
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/run-ptest10
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb33
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb_git.bb37
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch33
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch33
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch64
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch38
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch64
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch35
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch39
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch23
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch43
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch50
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb_git.bb73
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_10.4.12.bb (renamed from external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_5.5.64.bb)1
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc50
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-build-breakage-from-lock_guard-error-6161.patch32
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch30
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch8
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch67
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch26
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch32
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch27
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch16
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch34
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch29
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch160
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch18
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch65
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch34
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_10.4.12.bb (renamed from external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_5.5.64.bb)2
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mysql-python/0001-_mysql.c-fix-compilation-with-MariaDB-with-10.3.13.patch34
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb11
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch41
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch39
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch46
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch25
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.init4
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc27
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_10.10.bb10
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_12.3.bb12
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch115
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/files/0001-db-write_thread.cc-Initialize-state.patch31
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb/0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch194
-rw-r--r--external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb21
48 files changed, 737 insertions, 1193 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch b/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch
deleted file mode 100644
index 3135d4d5..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0001-Makefile-Fix-parallel-build.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From c85978e77725ef233543370d24e23f853f449170 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 21 Sep 2017 17:47:02 -0700
-Subject: [PATCH] Makefile: Fix parallel build
-
-Sometimes mkdir $(SHARED_OUTDIR)/db races with compiler which is
-creating .o file in the same directory $(SHARED_OUTDIR)/db/db_bench.o
-
-Fixes error like
-
-| mkdir out-static
-| mkdir out-shared/db
-| Assembler messages:
-| Fatal error: can't create out-shared/db/db_bench.o: No such file or directory
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index f7cc7d7..51a0bcd 100644
---- a/Makefile
-+++ b/Makefile
-@@ -386,6 +386,7 @@ $(STATIC_OUTDIR)/write_batch_test:db/write_batch_test.cc $(STATIC_LIBOBJECTS) $(
- $(STATIC_OUTDIR)/memenv_test:$(STATIC_OUTDIR)/helpers/memenv/memenv_test.o $(STATIC_OUTDIR)/libmemenv.a $(STATIC_OUTDIR)/libleveldb.a $(TESTHARNESS)
- $(XCRUN) $(CXX) $(LDFLAGS) $(STATIC_OUTDIR)/helpers/memenv/memenv_test.o $(STATIC_OUTDIR)/libmemenv.a $(STATIC_OUTDIR)/libleveldb.a $(TESTHARNESS) -o $@ $(LIBS)
-
-+$(SHARED_OUTDIR)/db/db_bench.o: | $(SHARED_OUTDIR)/db
- $(SHARED_OUTDIR)/db_bench:$(SHARED_OUTDIR)/db/db_bench.o $(SHARED_LIBS) $(TESTUTIL)
- $(XCRUN) $(CXX) $(LDFLAGS) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(SHARED_OUTDIR)/db/db_bench.o $(TESTUTIL) $(SHARED_OUTDIR)/$(SHARED_LIB3) -o $@ $(LIBS)
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch b/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch
deleted file mode 100644
index 8f93cb32..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0001-build_detect_platform-Check-for-__SSE4_2__.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 5fd0918df2bb30e8f3edb2ee895d178edbf26f40 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 4 Sep 2017 22:38:03 -0700
-Subject: [PATCH 1/2] build_detect_platform: Check for __SSE4_2__
-
-just using -msse4.2 is not enough, especially with clang
-where it may accept -msse4.2 even during cross compiling
-for say arm, however the difference is that builtin defines
-wont be defined.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- build_detect_platform | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: git/build_detect_platform
-===================================================================
---- git.orig/build_detect_platform
-+++ git/build_detect_platform
-@@ -224,13 +224,13 @@ EOF
- rm -f $CXXOUTPUT 2>/dev/null
-
- # Test if gcc SSE 4.2 is supported
-- $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -msse4.2 2>/dev/null <<EOF
-+ $CXX $CXXFLAGS -Werror -x c++ - -o $CXXOUTPUT -msse4.2 -dD -E 2>/dev/null <<EOF
- int main() {}
- EOF
-+ eval fgrep __SSE4_2__ $CXXOUTPUT >/dev/null 2>&1
- if [ "$?" = 0 ]; then
- PLATFORM_SSEFLAGS="-msse4.2"
- fi
--
- rm -f $CXXOUTPUT 2>/dev/null
- fi
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0002-makefile-build-SHARED_MEMENVLIB.patch b/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0002-makefile-build-SHARED_MEMENVLIB.patch
deleted file mode 100644
index fc708b23..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/0002-makefile-build-SHARED_MEMENVLIB.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 1ed8cec1fcf666904bb3ebd29fc85e235b72d122 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 4 Sep 2017 22:40:49 -0700
-Subject: [PATCH 2/2] makefile: build SHARED_MEMENVLIB
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- Makefile | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index f7cc7d7..cb42278 100644
---- a/Makefile
-+++ b/Makefile
-@@ -126,12 +126,12 @@ SHARED_VERSION_MINOR = 20
- SHARED_LIB1 = libleveldb.$(PLATFORM_SHARED_EXT)
- SHARED_LIB2 = $(SHARED_LIB1).$(SHARED_VERSION_MAJOR)
- SHARED_LIB3 = $(SHARED_LIB1).$(SHARED_VERSION_MAJOR).$(SHARED_VERSION_MINOR)
--SHARED_LIBS = $(SHARED_OUTDIR)/$(SHARED_LIB1) $(SHARED_OUTDIR)/$(SHARED_LIB2) $(SHARED_OUTDIR)/$(SHARED_LIB3)
-+SHARED_LIBS = $(SHARED_OUTDIR)/$(SHARED_LIB1) $(SHARED_OUTDIR)/$(SHARED_LIB2) $(SHARED_OUTDIR)/$(SHARED_LIB3) $(SHARED_MEMENVLIB)
- $(SHARED_OUTDIR)/$(SHARED_LIB1): $(SHARED_OUTDIR)/$(SHARED_LIB3)
- ln -fs $(SHARED_LIB3) $(SHARED_OUTDIR)/$(SHARED_LIB1)
- $(SHARED_OUTDIR)/$(SHARED_LIB2): $(SHARED_OUTDIR)/$(SHARED_LIB3)
- ln -fs $(SHARED_LIB3) $(SHARED_OUTDIR)/$(SHARED_LIB2)
--SHARED_MEMENVLIB = $(SHARED_OUTDIR)/libmemenv.a
-+SHARED_MEMENVLIB = $(SHARED_OUTDIR)/libmemenv.$(PLATFORM_SHARED_EXT).$(SHARED_VERSION_MAJOR).$(SHARED_VERSION_MINOR)
- endif
-
- $(SHARED_OUTDIR)/$(SHARED_LIB3): $(SHARED_LIBOBJECTS)
-@@ -294,7 +294,7 @@ endif
-
- $(SHARED_MEMENVLIB):$(SHARED_MEMENVOBJECTS)
- rm -f $@
-- $(AR) -rs $@ $(SHARED_MEMENVOBJECTS)
-+ $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(basename $(notdir $(SHARED_MEMENVLIB))) $(SHARED_MEMENVOBJECTS) -o $(SHARED_MEMENVLIB) $(LIBS)
-
- $(STATIC_OUTDIR)/db_bench:db/db_bench.cc $(STATIC_LIBOBJECTS) $(TESTUTIL)
- $(CXX) $(LDFLAGS) $(CXXFLAGS) db/db_bench.cc $(STATIC_LIBOBJECTS) $(TESTUTIL) -o $@ $(LIBS)
---
-2.14.1
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/run-ptest b/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/run-ptest
new file mode 100644
index 00000000..9ae70c12
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb/run-ptest
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+for test in *_test; do
+ if ./${test}; then
+ echo "PASS: ${test}"
+ else
+ echo "FAIL: ${test}"
+ fi
+done
+
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb b/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb
new file mode 100644
index 00000000..b597ef1e
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb_1.22.bb
@@ -0,0 +1,33 @@
+SUMMARY = "LevelDB is a fast key-value storage library"
+DESCRIPTION = "LevelDB is a fast key-value storage library that provides an ordered mapping from string keys to string values"
+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 \
+ file://run-ptest"
+
+SRCREV = "78b39d68c15ba020c0d60a3906fb66dbf1697595"
+S = "${WORKDIR}/git"
+
+inherit cmake ptest
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[benchmarks] = "-DLEVELDB_BUILD_BENCHMARKS=ON,-DLEVELDB_BUILD_BENCHMARKS=OFF,sqlite"
+PACKAGECONFIG[snappy] = ",,snappy"
+PACKAGECONFIG[tcmalloc] = ",,gperftools"
+
+EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH=ON \
+ -DLEVELDB_BUILD_TESTS=${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'ON', 'OFF', d)}"
+
+do_install_append() {
+ install -D -m 0755 ${B}/leveldbutil ${D}${bindir}/leveldbutil
+}
+
+do_install_ptest() {
+ install -m 0755 ${B}/*_test ${D}${PTEST_PATH}
+}
+
+# Do not try to build lib32-leveldb for mips64, but allow libn32-leveldb.
+#
+COMPATIBLE_HOST_mipsarcho32_pn-lib32-leveldb = "null"
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb_git.bb b/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb_git.bb
deleted file mode 100644
index 8fec89c6..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/leveldb/leveldb_git.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "LevelDB is a fast key-value storage library"
-DESCRIPTION = "LevelDB is a fast key-value storage library that provides an ordered mapping from string keys to string values"
-HOMEPAGE = "http://leveldb.googlecode.com"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=92d1b128950b11ba8495b64938fc164d"
-
-SRCREV = "a53934a3ae1244679f812d998a4f16f2c7f309a6"
-PV = "1.20+git${SRCPV}"
-
-SRC_URI = "git://github.com/google/${BPN}.git \
- file://0001-build_detect_platform-Check-for-__SSE4_2__.patch \
- file://0002-makefile-build-SHARED_MEMENVLIB.patch \
- file://0001-Makefile-Fix-parallel-build.patch \
- "
-
-S = "${WORKDIR}/git"
-
-inherit utils
-
-do_compile() {
- # do not use oe_runmake. oe_runmake pass to make compilation arguments and override
- # leveldb makefile variable CFLAGS and broke leveldb build.
- CFLAGS="${CFLAGS}" make ${PARALLEL_MAKE}|| die
-}
-
-do_install() {
- install -d ${D}${libdir} ${D}${bindir} ${D}${includedir}/leveldb
- oe_libinstall -C ${B}/out-shared libleveldb ${D}${libdir}
- oe_libinstall -C ${S}/out-static libleveldb ${D}${libdir}
- oe_libinstall -C ${S}/out-static libmemenv ${D}${libdir}
- install -m 0755 ${B}/out-shared/db_bench ${D}${bindir}
- install -m 0755 ${B}/out-static/*_test ${D}${bindir}
- install -m 644 ${S}/include/leveldb/*.h ${D}${includedir}/leveldb/
-}
-
-PACKAGES =+ "${PN}-ptest"
-FILES_${PN}-ptest = "${bindir}"
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch
deleted file mode 100644
index 4d7ac3aa..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From fbfceebce2121831904f2f7115252dd03b413a6d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 19 Sep 2017 18:52:53 -0700
-Subject: [PATCH] IntelRDFPMathLib20U1: Check for __DEFINED_wchar_t
-
-This is defined by musl if wchar_t is already defined
-
-avoids errors like
-
-src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h:46:15: error: typedef redefinition with different types
- ('int' vs 'unsigned int')
-typedef int wchar_t;
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: git/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
-===================================================================
---- git.orig/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
-+++ git/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
-@@ -43,7 +43,7 @@
-
- #if 0 // MongoDB Modification -- just `#include <stddef.h>`
- // Fix system header issue on Sun solaris and define required type by ourselves
--#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__)
-+#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__) && !defined(__DEFINED_wchar_t)
- typedef int wchar_t;
- #endif
- #else
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch
deleted file mode 100644
index 070411ab..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 5994023a03634dfc0318976c293e7391fe6aa060 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 24 Aug 2018 12:56:22 -0700
-Subject: [PATCH 1/2] Support deprecated resolver functions
-
-Needed for musl libc
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/mongo/util/dns_query_posix-impl.h | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/src/mongo/util/dns_query_posix-impl.h b/src/mongo/util/dns_query_posix-impl.h
-index d19958010c..bbca3309ed 100644
---- a/src/mongo/util/dns_query_posix-impl.h
-+++ b/src/mongo/util/dns_query_posix-impl.h
-@@ -53,6 +53,12 @@
-
- #include <boost/noncopyable.hpp>
-
-+#ifndef res_ninit
-+#define res_nclose(arg)
-+#define res_ninit(arg) res_init()
-+#define res_nsearch(sta, nam, clas, typ, ans, alen) res_search(nam, clas, typ, ans, alen)
-+#endif
-+
- namespace mongo {
- namespace dns {
- // The anonymous namespace is safe, in this header, as it is not really a header. It is only used
---
-2.18.0
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch
deleted file mode 100644
index a6d721ac..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 53368d3f4adc09dd84234a9af31771bcd8ca2757 Mon Sep 17 00:00:00 2001
-From: Sven Ebenfeld <sven.ebenfeld@gmail.com>
-Date: Fri, 15 Jan 2016 22:41:28 +0100
-Subject: [PATCH] Tell scons to use build settings from environment variables
-
-Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
----
- SConstruct | 8 ++++++--
- src/mongo/util/SConscript | 2 ++
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-Index: git/SConstruct
-===================================================================
---- git.orig/SConstruct
-+++ git/SConstruct
-@@ -564,6 +564,7 @@ def variable_arch_converter(val):
- 'amd64': 'x86_64',
- 'emt64': 'x86_64',
- 'x86': 'i386',
-+ 'aarch64': 'arm64',
- }
- val = val.lower()
-
-@@ -652,7 +653,8 @@ env_vars.Add(
- )
-
- env_vars.Add('CC',
-- help='Select the C compiler to use')
-+ help='Select the C compiler to use',
-+ default=os.getenv('CC'))
-
- env_vars.Add('CCFLAGS',
- help='Sets flags for the C and C++ compiler',
-@@ -672,7 +674,8 @@ env_vars.Add('CPPPATH',
- converter=variable_shlex_converter)
-
- env_vars.Add('CXX',
-- help='Select the C++ compiler to use')
-+ help='Select the C++ compiler to use',
-+ default=os.getenv('CXX'))
-
- env_vars.Add('CXXFLAGS',
- help='Sets flags for the C++ compiler',
-@@ -961,6 +964,7 @@ envDict = dict(BUILD_ROOT=buildDir,
- )
-
- env = Environment(variables=env_vars, **envDict)
-+env.PrependENVPath('PATH', os.getenv('PATH'))
- del envDict
-
- env.AddMethod(mongo_platform.env_os_is_wrapper, 'TargetOSIs')
-Index: git/src/mongo/util/SConscript
-===================================================================
---- git.orig/src/mongo/util/SConscript
-+++ git/src/mongo/util/SConscript
-@@ -329,6 +329,8 @@ if env['MONGO_ALLOCATOR'] == 'tcmalloc':
- 'MONGO_HAVE_GPERFTOOLS_SIZE_CLASS_STATS'
- ]
- )
-+ if not use_system_version_of_library('valgrind'):
-+ tcmspEnv.InjectThirdPartyIncludePaths('valgrind')
-
- if not use_system_version_of_library('valgrind'):
- # Include valgrind since tcmalloc disables itself while running under valgrind
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch
deleted file mode 100644
index c17ebf1e..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 3eed8388b49d5d3cbc2db74fee1b017eb4b40d0a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 2 Sep 2017 10:06:24 -0700
-Subject: [PATCH] Use __GLIBC__ to control use of gnu_get_libc_version
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
- src/mongo/util/processinfo_linux.cpp | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-Index: git/src/mongo/util/processinfo_linux.cpp
-===================================================================
---- git.orig/src/mongo/util/processinfo_linux.cpp
-+++ git/src/mongo/util/processinfo_linux.cpp
-@@ -44,10 +44,10 @@
- #include <unistd.h>
- #ifdef __BIONIC__
- #include <android/api-level.h>
--#elif __UCLIBC__
--#include <features.h>
--#else
-+#elif defined(__GLIBC__) && !defined(__UCLIBC__)
- #include <gnu/libc-version.h>
-+#else
-+#include <features.h>
- #endif
-
- #include <boost/filesystem.hpp>
-@@ -503,7 +503,7 @@ void ProcessInfo::SystemInfo::collectSys
- stringstream ss;
- ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__;
- bExtra.append("libcVersion", ss.str());
--#else
-+#elif defined(__GLIBC__)
- bExtra.append("libcVersion", gnu_get_libc_version());
- #endif
- if (!verSig.empty())
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch
deleted file mode 100644
index 99edad3c..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From a4951489d649c2b609cbb80f6cfb49fdcad8bd43 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 2 Sep 2017 10:03:37 -0700
-Subject: [PATCH] Use long long instead of int64_t
-
-Fixes
-error: call to member function 'appendNumber' is ambiguous
-since this function expects long long as parameter and not int64_t
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
- src/mongo/util/procparser.cpp | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-Index: git/src/mongo/util/procparser.cpp
-===================================================================
---- git.orig/src/mongo/util/procparser.cpp
-+++ git/src/mongo/util/procparser.cpp
-@@ -260,7 +260,7 @@ Status parseProcStat(const std::vector<S
-
- StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin());
-
-- uint64_t value;
-+ long long value;
-
- if (!parseNumberFromString(stringValue, &value).isOK()) {
- value = 0;
-@@ -272,7 +272,7 @@ Status parseProcStat(const std::vector<S
- } else {
- StringData stringValue((*partIt).begin(), (*partIt).end() - (*partIt).begin());
-
-- uint64_t value;
-+ long long value;
-
- if (!parseNumberFromString(stringValue, &value).isOK()) {
- value = 0;
-@@ -365,7 +365,7 @@ Status parseProcMemInfo(const std::vecto
-
- StringData stringValue((*partIt).begin(), (*partIt).end());
-
-- uint64_t value;
-+ long long value;
-
- if (!parseNumberFromString(stringValue, &value).isOK()) {
- value = 0;
-@@ -522,7 +522,7 @@ Status parseProcDiskStats(const std::vec
- StringData data,
- BSONObjBuilder* builder) {
- bool foundKeys = false;
-- std::vector<uint64_t> stats;
-+ std::vector<long long> stats;
- stats.reserve(kDiskFieldCount);
-
- using string_split_iterator = boost::split_iterator<StringData::const_iterator>;
-@@ -597,7 +597,7 @@ Status parseProcDiskStats(const std::vec
-
- StringData stringValue((*partIt).begin(), (*partIt).end());
-
-- uint64_t value;
-+ long long value;
-
- if (!parseNumberFromString(stringValue, &value).isOK()) {
- value = 0;
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch
deleted file mode 100644
index 098306f5..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From df7ef16afcc6ab55daa686e4f15c16e3d1280337 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 2 Sep 2017 12:42:30 -0700
-Subject: [PATCH 2/4] Add a definition for the macro __ELF_NATIVE_CLASS
-
-It depends on the native arch's word size.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/mongo/util/stacktrace_posix.cpp | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/src/mongo/util/stacktrace_posix.cpp b/src/mongo/util/stacktrace_posix.cpp
-index 53ab85f56f..7c458e7ef2 100644
---- a/src/mongo/util/stacktrace_posix.cpp
-+++ b/src/mongo/util/stacktrace_posix.cpp
-@@ -37,6 +37,15 @@
- #include <string>
- #include <sys/utsname.h>
-
-+#if !defined(__GLIBC__)
-+#if defined __x86_64__ && !defined __ILP32__
-+# define __WORDSIZE 64
-+#else
-+# define __WORDSIZE 32
-+#endif
-+#define __ELF_NATIVE_CLASS __WORDSIZE
-+#endif
-+
- #include "mongo/base/init.h"
- #include "mongo/config.h"
- #include "mongo/db/jsobj.h"
---
-2.14.1
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch
deleted file mode 100644
index 085fa50d..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 98543889f7ba38c02eb7cd9822f45e27d619edd6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 24 Aug 2018 13:07:01 -0700
-Subject: [PATCH 2/2] Fix default stack size to 256K
-
-On musl default stack size is ~80K which is too low
-for mongodb
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- .../platform/stack_locator_pthread_getattr_np.cpp | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/mongo/platform/stack_locator_pthread_getattr_np.cpp b/src/mongo/platform/stack_locator_pthread_getattr_np.cpp
-index 648d26a41c..6e398f00c9 100644
---- a/src/mongo/platform/stack_locator_pthread_getattr_np.cpp
-+++ b/src/mongo/platform/stack_locator_pthread_getattr_np.cpp
-@@ -35,6 +35,16 @@
- #include "mongo/util/assert_util.h"
- #include "mongo/util/scopeguard.h"
-
-+__attribute__((constructor))
-+static void set_default_stack_size(void)
-+{
-+ pthread_attr_t attr;
-+ invariant(pthread_attr_init(&attr) == 0);
-+ invariant(pthread_attr_setstacksize(&attr, 256*1024) == 0);
-+ pthread_setattr_default_np(&attr);
-+ invariant(pthread_attr_destroy(&attr) == 0);
-+}
-+
- namespace mongo {
-
- StackLocator::StackLocator() {
---
-2.18.0
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch
deleted file mode 100644
index a2e1f795..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From a1c77702926eb8546ff96b00b5b994f7478dabae Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 2 Sep 2017 13:13:15 -0700
-Subject: [PATCH 4/4] wiredtiger: Disable strtouq on musl
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/third_party/wiredtiger/build_linux/wiredtiger_config.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: git/src/third_party/wiredtiger/build_linux/wiredtiger_config.h
-===================================================================
---- git.orig/src/third_party/wiredtiger/build_linux/wiredtiger_config.h
-+++ git/src/third_party/wiredtiger/build_linux/wiredtiger_config.h
-@@ -104,7 +104,7 @@
- #define HAVE_STRING_H 1
-
- /* Define to 1 if you have the `strtouq' function. */
--#define HAVE_STRTOUQ 1
-+/* #undef HAVE_STRTOUQ 1 */
-
- /* Define to 1 if you have the `sync_file_range' function. */
- /* #undef HAVE_SYNC_FILE_RANGE */
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch
deleted file mode 100644
index c0689875..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Add alises for arm64 which is same as aarch64
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: git/SConstruct
-===================================================================
---- git.orig/SConstruct
-+++ git/SConstruct
-@@ -1055,6 +1055,7 @@ elif endian == "big":
- processor_macros = {
- 'arm' : { 'endian': 'little', 'defines': ('__arm__',) },
- 'aarch64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')},
-+ 'arm64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')},
- 'i386' : { 'endian': 'little', 'defines': ('__i386', '_M_IX86')},
- 'ppc64le' : { 'endian': 'little', 'defines': ('__powerpc64__',)},
- 's390x' : { 'endian': 'big', 'defines': ('__s390x__',)},
-Index: git/src/third_party/IntelRDFPMathLib20U1/SConscript
-===================================================================
---- git.orig/src/third_party/IntelRDFPMathLib20U1/SConscript
-+++ git/src/third_party/IntelRDFPMathLib20U1/SConscript
-@@ -308,7 +308,7 @@ if processor == 'i386':
- elif processor == 'arm':
- cpp_defines['IA32'] = '1'
- cpp_defines['ia32'] = '1'
--elif processor == "aarch64":
-+elif processor == "aarch64" or processor == 'arm64':
- cpp_defines['efi2'] = '1'
- cpp_defines['EFI2'] = '1'
- # Using 64 bit little endian
-Index: git/src/third_party/wiredtiger/SConscript
-===================================================================
---- git.orig/src/third_party/wiredtiger/SConscript
-+++ git/src/third_party/wiredtiger/SConscript
-@@ -151,7 +151,7 @@ condition_map = {
- 'POSIX_HOST' : not env.TargetOSIs('windows'),
- 'WINDOWS_HOST' : env.TargetOSIs('windows'),
-
-- 'ARM64_HOST' : env['TARGET_ARCH'] == 'aarch64',
-+ 'ARM64_HOST' : env['TARGET_ARCH'] in ('aarch64', 'arm64'),
- 'POWERPC_HOST' : env['TARGET_ARCH'] == 'ppc64le',
- 'X86_HOST' : env['TARGET_ARCH'] == 'x86_64',
- 'ZSERIES_HOST' : env['TARGET_ARCH'] == 's390x',
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch
deleted file mode 100644
index 23d4923d..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-imported from debian
-
-Upstream-Status: Pending
-Index: git/src/third_party/wiredtiger/SConscript
-===================================================================
---- git.orig/src/third_party/wiredtiger/SConscript
-+++ git/src/third_party/wiredtiger/SConscript
-@@ -181,7 +181,9 @@ if useSnappy:
- # If not available at runtime, we fall back to software in some cases.
- #
- # On zSeries we may disable because SLES 11 kernel doe not support the instructions.
--if not (env['TARGET_ARCH'] == 's390x' and get_option("use-s390x-crc32") == "off"):
-+# Debian: disable hardware-assisted crc32 on s390x and arm64, as at least the
-+# buildd's do not support the instructions.
-+if env['TARGET_ARCH'] not in ('s390x', 'arm64', 'aarch64'):
- env.Append(CPPDEFINES=["HAVE_CRC32_HARDWARE"])
-
- wtlib = env.Library(
-Index: git/src/third_party/wiredtiger/dist/filelist
-===================================================================
---- git.orig/src/third_party/wiredtiger/dist/filelist
-+++ git/src/third_party/wiredtiger/dist/filelist
-@@ -54,7 +54,6 @@ src/checksum/power8/crc32_wrapper.c POWE
- src/checksum/software/checksum.c
- src/checksum/x86/crc32-x86.c X86_HOST
- src/checksum/zseries/crc32-s390x.c ZSERIES_HOST
--src/checksum/zseries/crc32le-vx.sx ZSERIES_HOST
- src/config/config.c
- src/config/config_api.c
- src/config/config_check.c
-Index: git/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
-===================================================================
---- git.orig/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
-+++ git/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
-@@ -77,6 +77,7 @@ unsigned int __wt_crc32c_le(unsigned int
- return crc; \
- }
-
-+#if defined(HAVE_CRC32_HARDWARE)
- /* Main CRC-32 functions */
- DEFINE_CRC32_VX(__wt_crc32c_le_vx, __wt_crc32c_le_vgfm_16, __wt_crc32c_le)
-
-@@ -89,6 +90,7 @@ __wt_checksum_hw(const void *chunk, size
- {
- return (~__wt_crc32c_le_vx(0xffffffff, chunk, len));
- }
-+#endif
-
- #endif
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb_git.bb b/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb_git.bb
deleted file mode 100644
index d39ab0a3..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb_git.bb
+++ /dev/null
@@ -1,73 +0,0 @@
-SUMMARY = "mongodb"
-LICENSE = "AGPL-3.0 & Apache-2.0 & Zlib"
-LIC_FILES_CHKSUM = "file://GNU-AGPL-3.0.txt;md5=73f1eb20517c55bf9493b7dd6e480788 \
- file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
-
-DEPENDS = "openssl libpcre libpcap zlib boost curl python \
- python-setuptools-native python-typing-native \
- python-pyyaml-native python-cheetah-native \
- "
-
-inherit scons dos2unix siteinfo pythonnative
-
-PV = "4.0.1+git${SRCPV}"
-#v4.0.1
-SRCREV = "54f1582fc6eb01de4d4c42f26fc133e623f065fb"
-SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.0 \
- file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
- file://0001-Use-long-long-instead-of-int64_t.patch \
- file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
- file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \
- file://arm64-support.patch \
- file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \
- file://disable-hw-crc32-on-arm64-s390x.patch \
- file://0001-Support-deprecated-resolver-functions.patch \
- "
-SRC_URI_append_libc-musl ="\
- file://0002-Fix-default-stack-size-to-256K.patch \
- file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
- "
-S = "${WORKDIR}/git"
-
-COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux'
-
-COMPATIBLE_HOST_arm = "null"
-COMPATIBLE_HOST_libc-musl_x86 = "null"
-
-PACKAGECONFIG ??= "tcmalloc"
-# gperftools compilation fails for arm below v7 because of missing support of
-# dmb operation. So we use system-allocator instead of tcmalloc
-PACKAGECONFIG_remove_armv6 = "tcmalloc"
-PACKAGECONFIG_remove_libc-musl = "tcmalloc"
-
-PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
-
-EXTRA_OESCONS = "--prefix=${D}${prefix} \
- LIBPATH=${STAGING_LIBDIR} \
- LINKFLAGS='${LDFLAGS}' \
- CXXFLAGS='${CXXFLAGS}' \
- TARGET_ARCH=${TARGET_ARCH} \
- --ssl \
- --disable-warnings-as-errors \
- --use-system-pcre \
- --use-system-zlib \
- --js-engine=none \
- --nostrip \
- --endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
- --wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \
- ${PACKAGECONFIG_CONFARGS} \
- mongod mongos"
-
-do_configure_prepend() {
- # tests use hex floats, not supported in plain C++
- sed -e 's|-std=c++11|-std=gnu++11|g' -i ${S}/SConstruct
-}
-scons_do_compile() {
- ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \
- die "scons build execution failed."
-}
-
-scons_do_install() {
- ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \
- die "scons install execution failed."
-}
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_5.5.64.bb b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_10.4.12.bb
index 4ce960d7..e1a038df 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_5.5.64.bb
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb-native_10.4.12.bb
@@ -13,6 +13,7 @@ do_install() {
install -d ${D}${bindir}
install -m 0755 sql/gen_lex_hash ${D}${bindir}/
+ 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}/
}
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc
index f51667d9..95f5acba 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb.inc
@@ -2,12 +2,9 @@ SUMMARY = "A robust, scalable, and reliable SQL server"
HOMEPAGE = "http://mariadb.org"
SECTION = "libs"
LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b1becf0cfa3366e0f4d854d1d264f311"
-SRC_URI = "http://archive.mariadb.org/${BP}/source/${BP}.tar.gz \
- file://fix-cmake-module-path.patch \
- file://remove-bad-path.patch \
- file://fix-mysqlclient-r-version.patch \
+SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz \
file://my.cnf \
file://mysqld.service \
file://install_db.service \
@@ -15,11 +12,17 @@ SRC_URI = "http://archive.mariadb.org/${BP}/source/${BP}.tar.gz \
file://mysql-systemd-start \
file://configure.cmake-fix-valgrind.patch \
file://fix-a-building-failure.patch \
- file://change-cc-to-cc-version.patch \
+ file://support-files-CMakeLists.txt-fix-do_populate_sysroot.patch \
+ file://sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \
file://0001-disable-ucontext-on-musl.patch \
+ file://c11_atomics.patch \
+ file://clang_version_header_conflict.patch \
+ file://fix-arm-atomic.patch \
+ file://0001-Fix-build-breakage-from-lock_guard-error-6161.patch \
+ file://0001-Fix-library-LZ4-lookup.patch \
"
-SRC_URI[md5sum] = "03968ae08cff3038e2420921ef257550"
-SRC_URI[sha256sum] = "c103f3c54741b296980d6be48b221340eebaa97c6bd95a02fd8d530a5df5c343"
+SRC_URI[md5sum] = "97d7c0f508c04a31c138fdb24e95dbc4"
+SRC_URI[sha256sum] = "fef1e1d38aa253dd8a51006bd15aad184912fce31c446bb69434fcde735aa208"
UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases"
@@ -27,7 +30,9 @@ S = "${WORKDIR}/mariadb-${PV}"
BINCONFIG_GLOB = "mysql_config"
-inherit cmake gettext binconfig update-rc.d useradd systemd
+inherit cmake gettext binconfig update-rc.d useradd systemd multilib_script
+
+MULTILIB_SCRIPTS = "${PN}-server:${bindir}/mysql_install_db ${PN}-server:${bindir}/mysqld_safe"
INITSCRIPT_PACKAGES = "${PN}-server ${PN}-setupdb"
INITSCRIPT_NAME_${PN}-server = "mysqld"
@@ -55,14 +60,13 @@ PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} setupdb"
PACKAGECONFIG_class-native = ""
PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam"
PACKAGECONFIG[valgrind] = "-DWITH_VALGRIND=TRUE,-DWITH_VALGRIND=FALSE,valgrind"
-PACKAGECONFIG[libedit] = "-DLIBEDIT_INTERFACE=TRUE,-DLIBEDIT_INTERFACE=FALSE,libedit"
PACKAGECONFIG[krb5] = ", ,krb5"
PACKAGECONFIG[setupdb] = ", ,,${PN}-setupdb"
# MariaDB doesn't link properly with gold
# https://mariadb.atlassian.net/browse/MDEV-5982
TARGET_CFLAGS += "-fuse-ld=bfd"
-
+LDFLAGS += " -pthread"
BUILD_CFLAGS += "-fuse-ld=bfd"
BUILD_CXXFLAGS += "-fuse-ld=bfd"
@@ -120,6 +124,11 @@ do_compile_prepend_class-target () {
echo "#endif" >>${B}/include/openssl/kssl.h
fi
fi
+ # workaround to handle out-of-source build from source package
+ yacc_files="sql_yacc.hh sql_yacc.cc sql_yacc_ora.hh sql_yacc_ora.cc"
+ for yacc_file in ${yacc_files}; do
+ cp ${S}/sql/${yacc_file} ${B}/sql/${yacc_file}
+ done
}
SYSROOT_PREPROCESS_FUNCS += "mariadb_sysroot_preprocess"
@@ -159,6 +168,10 @@ do_install() {
if [ -f ${D}${datadir}/doc/README ]; then
mv ${D}${datadir}/doc/README ${D}${datadir}/doc/${PN}/
fi
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
+ mv ${D}/lib/security ${D}/${libdir}
+ rmdir --ignore-fail-on-non-empty ${D}/lib
+ fi
}
PACKAGES = "${PN}-dbg ${PN} \
@@ -181,13 +194,13 @@ RDEPENDS_${PN}-client = "perl perl-module-getopt-long perl-module-file-temp \
RDEPENDS_${PN}-server = "perl perl-module-getopt-long perl-module-data-dumper \
perl-module-file-basename perl-module-file-path perl-module-sys-hostname \
perl-module-file-copy perl-module-file-temp perl-module-posix \
- ${PN}-client libdbi-perl libdbd-mysql-perl"
+ ${PN}-client ${PN}-setupdb libdbi-perl libdbd-mysql-perl"
RDEPENDS_${PN}-leftovers = "perl perl-module-cwd perl-module-benchmark perl-module-getopt-long \
perl-module-posix perl-module-data-dumper perl-module-sigtrap perl-module-threads \
perl-module-threads-shared perl-module-io-socket perl-module-sys-hostname perl-module-file-copy \
perl-module-file-spec perl-module-file-find perl-module-file-basename perl-module-file-path \
perl-module-constant perl-module-lib perl-module-file-temp perl-module-file-spec-functions \
- perl-module-io-socket-inet perl-module-io-select"
+ perl-module-io-socket-inet perl-module-io-select bash"
RDEPENDS_${PN}-setupdb = "coreutils"
# Allow old code to link to the backward compatible library
@@ -195,10 +208,12 @@ RDEPENDS_libmysqlclient-dev = "libmysqlclient-r-dev"
FILES_libmysqlclient = "\
${libdir}/libmysqlclient.so.* \
+ ${libdir}/libmariadb.so.* \
${sysconfdir}/my.cnf.d/client.cnf"
FILES_libmysqlclient-dev = " \
${includedir}/mysql/ \
${libdir}/libmysqlclient.so \
+ ${libdir}/libmariadb.so \
${sysconfdir}/aclocal \
${bindir}/mysql_config"
FILES_libmysqlclient-staticdev = "\
@@ -215,9 +230,11 @@ FILES_libmysqlclient-r-dev = "\
FILES_libmysqlclient-r-staticdev = "${libdir}/libmysqlclient_r.a"
FILES_libmysqld = "\
- ${libdir}/libmysqld.so.*"
+ ${libdir}/libmysqld.so.* \
+ ${libdir}/libmariadbd.so.*"
FILES_libmysqld-dev = "\
- ${libdir}/libmysqld.so"
+ ${libdir}/libmysqld.so \
+ ${libdir}/libmariadbd.so"
FILES_${PN}-client = "\
${bindir}/myisam_ftdump \
@@ -286,11 +303,14 @@ FILES_${PN}-server = "\
${sbindir}/ndbd \
${sbindir}/ndb_mgmd \
${libdir}/plugin/*.so \
+ ${libdir}/security/*.so \
+ ${libdir}/plugin/auth_pam_tool_dir/auth_pam_tool \
${datadir}/mysql/ \
${localstatedir}/mysql/ \
${sysconfdir}/init.d/mysqld \
${sysconfdir}/my.cnf \
${sysconfdir}/my.cnf.d/server.cnf \
+ ${sysconfdir}/security/user_map.conf \
${sysconfdir}/tmpfiles.d"
DESCRIPTION_${PN}-leftovers = "unpackaged and probably unneeded files for ${PN}"
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-build-breakage-from-lock_guard-error-6161.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-build-breakage-from-lock_guard-error-6161.patch
new file mode 100644
index 00000000..87c70617
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-build-breakage-from-lock_guard-error-6161.patch
@@ -0,0 +1,32 @@
+Subject: [PATCH] Fix build breakage from lock_guard error (#6161)
+
+Summary:
+This change fixes a source issue that caused compile time error which
+breaks build for many fbcode services in that setup. The size() member
+function of channel is a const member, so member variables accessed
+within it are implicitly const as well. This caused error when clang
+fails to resolve to a constructor that takes std::mutex because the
+suitable constructor got rejected due to loss of constness for its
+argument. The fix is to add mutable modifier to the lock_ member of
+channel.
+
+Pull Request resolved: https://github.com/facebook/rocksdb/pull/6161
+
+Differential Revision: D18967685
+
+Pulled By: maysamyabandeh
+
+Upstream-Status: Backport
+
+fbshipit-source-id:698b6a5153c3c92eeacb842c467aa28cc350d432
+--- a/storage/rocksdb/rocksdb/util/channel.h
++++ b/storage/rocksdb/rocksdb/util/channel.h
+@@ -60,7 +60,7 @@ class channel {
+
+ private:
+ std::condition_variable cv_;
+- std::mutex lock_;
++ mutable std::mutex lock_;
+ std::queue<T> buffer_;
+ bool eof_;
+ };
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch
new file mode 100644
index 00000000..574dfd31
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-library-LZ4-lookup.patch
@@ -0,0 +1,30 @@
+From 1d7612b063eb1fc7bf97bc27b13e1de596748aa1 Mon Sep 17 00:00:00 2001
+From: Sumit Garg <sumit.garg@linaro.org>
+Date: Wed, 8 Jan 2020 04:58:30 +0000
+Subject: [PATCH] Fix library LZ4 lookup.
+
+Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
+---
+ cmake/FindLZ4.cmake | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake
+index e97dd63e2b0..2f4694e727c 100644
+--- a/cmake/FindLZ4.cmake
++++ b/cmake/FindLZ4.cmake
+@@ -1,5 +1,10 @@
+-find_path(LZ4_INCLUDE_DIR NAMES lz4.h)
+-find_library(LZ4_LIBRARY NAMES lz4)
++find_path(LZ4_INCLUDE_DIR
++ NAMES lz4.h
++ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
++
++find_library(LZ4_LIBRARY
++ NAMES lz4
++ NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+--
+2.17.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch
index 60e9199f..daf2432a 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/0001-disable-ucontext-on-musl.patch
@@ -1,4 +1,4 @@
-From 5bc3e7ef9700d12054e0125a126f1bb093f01ef9 Mon Sep 17 00:00:00 2001
+From b658bdb38b7ff6a78915fd0ac390fc224e4006cb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 26 Mar 2017 14:30:33 -0700
Subject: [PATCH] disable ucontext on musl
@@ -6,12 +6,13 @@ Subject: [PATCH] disable ucontext on musl
musl does not have *contex() APIs even though it has ucontext.h header
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
---
include/my_context.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/my_context.h b/include/my_context.h
-index dd44103..9b28c17 100644
+index ea0e3496..4c9b37dc 100644
--- a/include/my_context.h
+++ b/include/my_context.h
@@ -31,7 +31,7 @@
@@ -23,6 +24,3 @@ index dd44103..9b28c17 100644
#define MY_CONTEXT_USE_UCONTEXT
#else
#define MY_CONTEXT_DISABLE
---
-2.12.1
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch
new file mode 100644
index 00000000..16998613
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch
@@ -0,0 +1,67 @@
+Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
+Date: Fri Dec 21 19:14:04 2018 +0200
+
+ Link with libatomic to enable C11 atomics support
+
+ Some architectures (mips) require libatomic to support proper
+ atomic operations. Check first if support is available without
+ linking, otherwise use the library.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/configure.cmake
++++ b/configure.cmake
+@@ -926,7 +926,25 @@ int main()
+ long long int *ptr= &var;
+ return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
+ }"
+-HAVE_GCC_C11_ATOMICS)
++HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
++IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
++ SET(HAVE_GCC_C11_ATOMICS True)
++ELSE()
++ SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
++ LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
++ CHECK_CXX_SOURCE_COMPILES("
++ int main()
++ {
++ long long int var= 1;
++ long long int *ptr= &var;
++ return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
++ }"
++ HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++ IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++ SET(HAVE_GCC_C11_ATOMICS True)
++ ENDIF()
++ SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
++ENDIF()
+
+ IF(WITH_VALGRIND)
+ SET(HAVE_valgrind 1)
+--- a/mysys/CMakeLists.txt
++++ b/mysys/CMakeLists.txt
+@@ -78,6 +78,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings
+ ${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_LIBRARY})
+ DTRACE_INSTRUMENT(mysys)
+
++IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++ TARGET_LINK_LIBRARIES(mysys atomic)
++ENDIF()
++
+ IF(HAVE_BFD_H)
+ TARGET_LINK_LIBRARIES(mysys bfd)
+ ENDIF(HAVE_BFD_H)
+--- a/sql/CMakeLists.txt
++++ b/sql/CMakeLists.txt
+@@ -178,6 +178,10 @@ ELSE()
+ SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL})
+ ENDIF()
+
++IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++ TARGET_LINK_LIBRARIES(sql atomic)
++ENDIF()
++
+
+ IF(MSVC AND NOT WITHOUT_DYNAMIC_PLUGINS)
+
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch
deleted file mode 100644
index 02bda24f..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/change-cc-to-cc-version.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-mariadb: replace the CC with CC_VERSION and CXX with CXX_VERSION
-
-mysqlbug.sh is a bug report script. It makes a report with the build information,
-including gcc version. The CC is the local path of gcc, which is useless for bug
-report, and the path may expose private information, so change it to CC_VERSION.
-
-Upstream-Status: Pending
-
-Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-================================
-diff --git a/scripts/mysqlbug.sh.old b/scripts/mysqlbug.sh
-index e9df210..d4b8d53 100644
---- a/scripts/mysqlbug.sh.old
-+++ b/scripts/mysqlbug.sh
-@@ -24,8 +24,8 @@ VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@"
- COMPILATION_COMMENT="@COMPILATION_COMMENT@"
- BUGmysql="maria-developers@lists.launchpad.net"
- # This is set by configure
--COMP_CALL_INFO="CC='@SAVE_CC@' CFLAGS='@SAVE_CFLAGS@' CXX='@SAVE_CXX@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'"
--COMP_RUN_INFO="CC='@CC@' CFLAGS='@CFLAGS@' CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'"
-+COMP_CALL_INFO="CC='@CC_VERSION@' CFLAGS='@SAVE_CFLAGS@' CXX='@CXX_VERSION@' CXXFLAGS='@SAVE_CXXFLAGS@' LDFLAGS='@SAVE_LDFLAGS@' ASFLAGS='@SAVE_ASFLAGS@'"
-+COMP_RUN_INFO="CC='@CC_VERSION@' CFLAGS='@CFLAGS@' CXX='@CXX_VERSION@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'"
- CONFIGURE_LINE="@CONF_COMMAND@"
-
- LIBC_INFO=""
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch
new file mode 100644
index 00000000..c77a8694
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/clang_version_header_conflict.patch
@@ -0,0 +1,32 @@
+libc++ also has a file called version and this file and how cflags are specified
+it ends up including this file and resulting in compile errors
+
+fixes errors like
+storage/mroonga/version:1:1: error: expected unqualified-id
+7.07
+^
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/storage/mroonga/CMakeLists.txt
++++ b/storage/mroonga/CMakeLists.txt
+@@ -80,7 +80,7 @@ else()
+ set(MRN_SOURCE_DIR ${CMAKE_SOURCE_DIR})
+ endif()
+
+-file(READ ${MRN_SOURCE_DIR}/version MRN_VERSION)
++file(READ ${MRN_SOURCE_DIR}/ver MRN_VERSION)
+ file(READ ${MRN_SOURCE_DIR}/version_major MRN_VERSION_MAJOR)
+ file(READ ${MRN_SOURCE_DIR}/version_minor MRN_VERSION_MINOR)
+ file(READ ${MRN_SOURCE_DIR}/version_micro MRN_VERSION_MICRO)
+--- /dev/null
++++ b/storage/mroonga/ver
+@@ -0,0 +1 @@
++7.07
+\ No newline at end of file
+--- a/storage/mroonga/version
++++ /dev/null
+@@ -1 +0,0 @@
+-7.07
+\ No newline at end of file
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch
index e97def60..ac942795 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/configure.cmake-fix-valgrind.patch
@@ -1,6 +1,6 @@
-From 5effba0d7d47071a3f1bca56823190d5a95bb1a6 Mon Sep 17 00:00:00 2001
+From 24e2b0edc2612acefcc48414bb6f0aeb086061a9 Mon Sep 17 00:00:00 2001
From: Jackie Huang <jackie.huang@windriver.com>
-Date: Wed, 12 Nov 2014 03:09:10 -0500
+Date: Tue, 26 Feb 2019 23:57:06 -0800
Subject: [PATCH] configure.cmake: fix valgrind
Check valgrind headers only if WITH_VALGRIND is set.
@@ -15,27 +15,26 @@ PACKAGECONFIG to decide if valgrind is needed or not.
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+
---
- configure.cmake | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ configure.cmake | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/configure.cmake b/configure.cmake
-index 0bd7bbe..51a098f 100644
+index 3cfc4b31..d017b3b3 100644
--- a/configure.cmake
+++ b/configure.cmake
-@@ -1047,10 +1047,10 @@ MARK_AS_ADVANCED(WITH_ATOMIC_LOCKS MY_ATOMIC_MODE_RWLOCK MY_ATOMIC_MODE_DUMMY)
+@@ -930,10 +930,9 @@ HAVE_GCC_C11_ATOMICS)
IF(WITH_VALGRIND)
SET(HAVE_valgrind 1)
-+ CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h"
-+ HAVE_VALGRIND)
- ENDIF()
-
+-ENDIF()
+-
-CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h"
-- HAVE_VALGRIND)
++ CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h"
+ HAVE_VALGRIND_MEMCHECK_H)
++ENDIF()
#--------------------------------------------------------------------
# Check for IPv6 support
---
-2.0.0
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch
index 0c4e1023..9149ee21 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-a-building-failure.patch
@@ -1,4 +1,7 @@
-[PATCH] fix a building failure
+From 1b2b6a61c9f82157cd2e0c3744f6c07e07aeb0bd Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Mon, 4 Mar 2019 01:11:30 -0800
+Subject: [PATCH] fix a building failure
Upstream-Status: Inappropriate [configuration]
@@ -6,17 +9,18 @@ building failed since native does not generate import_executables.cmake
In fact, our building system will export the needed commands
Signed-off-by: Roy Li <rongqing.li@windriver.com>
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
CMakeLists.txt | 5 -----
1 file changed, 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c1ce1c5..83b3a7e 100644
+index fc30750..4f9110e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -350,11 +350,6 @@ MYSQL_CHECK_READLINE()
+@@ -347,11 +347,6 @@ CHECK_PCRE()
- CHECK_JEMALLOC()
+ CHECK_SYSTEMD()
-IF(CMAKE_CROSSCOMPILING)
- SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build")
@@ -24,8 +28,8 @@ index c1ce1c5..83b3a7e 100644
-ENDIF()
-
#
- # Setup maintainer mode options by the end. Platform checks are
+ # Setup maintainer mode options. Platform checks are
# not run with the warning options as to not perturb fragile checks
--
-1.9.1
+2.17.1
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch
new file mode 100644
index 00000000..05b0cf8f
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-arm-atomic.patch
@@ -0,0 +1,34 @@
+From f447aca534d1a12809eeb146e8220d305cc3884d Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Thu, 9 Apr 2020 14:07:19 +0800
+Subject: [PATCH] build_rocksdb.cmake: fix atomic support on arm
+
+Check to link with libatomic to enable C11 atomics support
+to fix below build error on arm:
+| /build/tmp/work/armv5e-wrs-linux-gnueabi/mariadb/10.3.13-r0/recipe-sysroot-native/usr/bin/arm-wrs-linux-gnueabi/../../libexec/arm-wrs-linux-gnueabi/gcc/arm-wrs-linux-gnueabi/8.3.0/ld.bfd: librocksdblib.a(env_posix.cc.o): in function `std::__atomic_base<unsigned long long>::store(unsigned long long, std::memory_order)':
+| /usr/include/c++/8.3.0/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ storage/rocksdb/build_rocksdb.cmake | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake
+index d7895b0..3bcd52a 100644
+--- a/storage/rocksdb/build_rocksdb.cmake
++++ b/storage/rocksdb/build_rocksdb.cmake
+@@ -470,6 +470,9 @@ list(APPEND SOURCES ${CMAKE_CURRENT_BINARY_DIR}/build_version.cc)
+
+ ADD_CONVENIENCE_LIBRARY(rocksdblib ${SOURCES})
+ target_link_libraries(rocksdblib ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
++IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++ TARGET_LINK_LIBRARIES(rocksdblib atomic)
++ENDIF()
+ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ set_target_properties(rocksdblib PROPERTIES COMPILE_FLAGS "-fPIC -fno-builtin-memcmp -Wno-error")
+ endif()
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch
deleted file mode 100644
index 8d9f558d..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-cmake-module-path.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Avoid CMAKE_MODULE_PATH being overwritten
-
-OE-Core's setting of CMAKE_MODULE_PATH stomps on MariaDB's value unless
-we set it after setting the project name.
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-Upstream-Status: Inappropriate [working around OE-Core bug]
-
---- mariadb/CMakeLists.txt 2014-07-17 11:01:07.676353047 +0100
-+++ mariadb/CMakeLists.txt 2014-07-17 11:01:31.299353107 +0100
-@@ -28,8 +28,6 @@
-
- MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
-
--SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
--
- # Distinguish between community and non-community builds, with the
- # default being a community build. This does not impact the feature
- # set that will be compiled in; it's merely provided as a hint to
-@@ -77,6 +75,8 @@
- ENDIF()
- PROJECT(${MYSQL_PROJECT_NAME})
-
-+SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
-+
- IF(BUILD_CONFIG)
- INCLUDE(
- ${CMAKE_SOURCE_DIR}/cmake/build_configurations/${BUILD_CONFIG}.cmake)
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch
deleted file mode 100644
index a519e429..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/fix-mysqlclient-r-version.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From 6db2a606196fb38a6d106dc409eee1cb9a40a440 Mon Sep 17 00:00:00 2001
-From: Tor Didriksen <tor.didriksen@oracle.com>
-Date: Mon, 24 Jun 2013 17:15:35 +0200
-Subject: [PATCH] Bug#16809055 MYSQL 5.6 AND 5.7 STILL USE LIBMYSQLCLIENT.SO.18
-
-With this patch, the libmysql/ directory contains:
-libmysqlclient.a
-libmysqlclient_r.a -> libmysqlclient.a
-libmysqlclient_r.so -> libmysqlclient.so*
-libmysqlclient_r.so.18 -> libmysqlclient.so.18*
-libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0*
-libmysqlclient.so -> libmysqlclient.so.18*
-libmysqlclient.so.18 -> libmysqlclient.so.18.1.0*
-libmysqlclient.so.18.1.0*
-
-This fixes libmysqlclient_r symlinks pointing to the unversioned
-libmysqlclient.so symlink (leading to package QA errors since the
-libmysqlclient-r package ends up depending on libmysqlclient-dev).
-
-Borrowed from MySQL 5.6 tree at https://github.com/percona/mysql/
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
----
- cmake/install_macros.cmake | 25 +++++++++++++++----------
- libmysql/CMakeLists.txt | 34 +++++++++++++++++++++++++++-------
- 2 files changed, 42 insertions(+), 17 deletions(-)
-
-diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake
-index b8efdf8..a0d0e68 100644
---- a/cmake/install_macros.cmake
-+++ b/cmake/install_macros.cmake
-@@ -1,4 +1,4 @@
--# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
-+# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
- #
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
-@@ -167,28 +167,33 @@ ENDFUNCTION()
-
-
- # Install symbolic link to CMake target.
--# the link is created in the same directory as target
--# and extension will be the same as for target file.
--MACRO(INSTALL_SYMLINK linkname target destination component)
-+# We do 'cd path; ln -s target_name link_name'
-+# We also add an INSTALL target for "${path}/${link_name}"
-+MACRO(INSTALL_SYMLINK target target_name link_name destination component)
- IF(UNIX)
- GET_TARGET_PROPERTY(location ${target} LOCATION)
- GET_FILENAME_COMPONENT(path ${location} PATH)
-- GET_FILENAME_COMPONENT(name ${location} NAME)
-- SET(output ${path}/${linkname})
-+ MESSAGE(STATUS "target ${target}")
-+ MESSAGE(STATUS "link_name ${link_name}")
-+ MESSAGE(STATUS "target_name ${target_name}")
-+ MESSAGE(STATUS "path ${path}")
-+ MESSAGE(STATUS "")
-+
-+ SET(output ${path}/${link_name})
- ADD_CUSTOM_COMMAND(
- OUTPUT ${output}
- COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${output}
- COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink
-- ${name}
-- ${linkname}
-+ ${target_name}
-+ ${link_name}
- WORKING_DIRECTORY ${path}
- DEPENDS ${target}
- )
-
-- ADD_CUSTOM_TARGET(symlink_${linkname}
-+ ADD_CUSTOM_TARGET(symlink_${link_name}
- ALL
- DEPENDS ${output})
-- SET_TARGET_PROPERTIES(symlink_${linkname} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
-+ SET_TARGET_PROPERTIES(symlink_${link_name} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
- IF(CMAKE_GENERATOR MATCHES "Xcode")
- # For Xcode, replace project config with install config
- STRING(REPLACE "${CMAKE_CFG_INTDIR}"
-diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
-index be5760f..96286ff 100644
---- a/libmysql/CMakeLists.txt
-+++ b/libmysql/CMakeLists.txt
-@@ -433,6 +433,12 @@ IF(MSVC)
- INSTALL_DEBUG_TARGET(clientlib DESTINATION ${INSTALL_LIBDIR}/debug)
- ENDIF()
-
-+MACRO(GET_TARGET_NAME target out_name)
-+ GET_TARGET_PROPERTY(location ${target} LOCATION)
-+ GET_FILENAME_COMPONENT(name ${location} NAME)
-+ SET(${out_name} ${name})
-+ENDMACRO()
-+
- IF(UNIX)
- MACRO(GET_VERSIONED_LIBNAME LIBNAME EXTENSION VERSION OUTNAME)
- SET(DOT_VERSION ".${VERSION}")
-@@ -445,7 +451,13 @@ IF(UNIX)
- SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
- ENDIF()
- ENDMACRO()
-- INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development)
-+ENDIF()
-+
-+IF(UNIX)
-+ GET_TARGET_NAME(mysqlclient lib_name)
-+ INSTALL_SYMLINK(mysqlclient
-+ ${lib_name} ${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a
-+ ${INSTALL_LIBDIR} Development)
- ENDIF()
-
- IF(NOT DISABLE_SHARED)
-@@ -456,10 +468,9 @@ IF(NOT DISABLE_SHARED)
- # libtool compatability
- IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE)
- SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}")
-- ELSEIF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
-- SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0")
- ELSE()
-- SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0")
-+ SET(OS_SHARED_LIB_VERSION
-+ "${SHARED_LIB_MAJOR_VERSION}.${SHARED_LIB_MINOR_VERSION}.0")
- ENDIF()
- # Name of shared library is mysqlclient on Unix
- SET_TARGET_PROPERTIES(libmysql PROPERTIES
-@@ -482,8 +493,13 @@ IF(NOT DISABLE_SHARED)
- "${CMAKE_SHARED_LIBRARY_SUFFIX}"
- ""
- linkname)
-- INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
-- SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
-+ GET_TARGET_NAME(libmysql lib_name)
-+ GET_FILENAME_COMPONENT(lib_name_we ${lib_name} NAME_WE)
-+ INSTALL_SYMLINK(libmysql
-+ ${lib_name} ${linkname}
-+ ${INSTALL_LIBDIR} SharedLibraries)
-+ SET(OS_SHARED_LIB_SYMLINKS
-+ "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
- LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS)
- FOREACH(ver ${OS_SHARED_LIB_SYMLINKS})
- GET_VERSIONED_LIBNAME(
-@@ -491,7 +507,11 @@ IF(NOT DISABLE_SHARED)
- "${CMAKE_SHARED_LIBRARY_SUFFIX}"
- "${ver}"
- linkname)
-- INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
-+ GET_VERSIONED_LIBNAME(
-+ ${lib_name_we} "${CMAKE_SHARED_LIBRARY_SUFFIX}" "${ver}" lib_name_ver)
-+ INSTALL_SYMLINK(libmysql
-+ ${lib_name_ver} ${linkname}
-+ ${INSTALL_LIBDIR} SharedLibraries)
- ENDFOREACH()
- ENDIF()
- ENDIF()
---
-2.0.3
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch
deleted file mode 100644
index ff26b0b8..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/remove-bad-path.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Remove host path from include directories
-
-Naturally this breaks cross-compilation if present.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
---- mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt 2014-07-17 14:37:04.529327998 +0100
-+++ mariadb-5.5.38/storage/tokudb/ft-index/CMakeLists.txt 2014-07-17 14:43:56.991337895 +0100
-@@ -39,7 +39,6 @@
-
- ## default includes and libraries
- include_directories(SYSTEM
-- /usr/local/include
- ${ZLIB_INCLUDE_DIRS}
- )
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch
new file mode 100644
index 00000000..afc1be47
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch
@@ -0,0 +1,65 @@
+From 796464015bffe6e0beca9e1c355b223512803c3e Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Wed, 27 Feb 2019 23:01:00 -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, 20 insertions(+), 10 deletions(-)
+
+diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
+index c6910f46..bf51f4cb 100644
+--- a/sql/CMakeLists.txt
++++ b/sql/CMakeLists.txt
+@@ -50,11 +50,16 @@ ${WSREP_INCLUDES}
+
+
+
+-ADD_CUSTOM_COMMAND(
+- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
+- COMMAND gen_lex_token > lex_token.h
+- DEPENDS gen_lex_token
+-)
++IF(NOT CMAKE_CROSSCOMPILING)
++ ADD_CUSTOM_COMMAND(
++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
++ COMMAND gen_lex_token > lex_token.h
++ DEPENDS gen_lex_token)
++ELSE()
++ ADD_CUSTOM_COMMAND(
++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_token.h
++ COMMAND gen_lex_token > lex_token.h)
++ENDIF()
+
+ ADD_DEFINITIONS(-DMYSQL_SERVER -DHAVE_EVENT_SCHEDULER)
+
+@@ -370,11 +375,16 @@ IF(NOT CMAKE_CROSSCOMPILING)
+ ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc)
+ ENDIF()
+
+-ADD_CUSTOM_COMMAND(
+- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
+- COMMAND gen_lex_hash > lex_hash.h
+- DEPENDS gen_lex_hash
+-)
++IF(NOT CMAKE_CROSSCOMPILING)
++ ADD_CUSTOM_COMMAND(
++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
++ COMMAND gen_lex_hash > lex_hash.h
++ DEPENDS gen_lex_hash)
++ELSE()
++ ADD_CUSTOM_COMMAND(
++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
++ COMMAND gen_lex_hash > lex_hash.h)
++ENDIF()
+
+ MYSQL_ADD_EXECUTABLE(mysql_tzinfo_to_sql tztime.cc COMPONENT Server)
+ SET_TARGET_PROPERTIES(mysql_tzinfo_to_sql PROPERTIES COMPILE_FLAGS "-DTZINFO2SQL")
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch
new file mode 100644
index 00000000..4f9a4e9b
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb/support-files-CMakeLists.txt-fix-do_populate_sysroot.patch
@@ -0,0 +1,34 @@
+From 4ac5b555d058d4d489f25a3806a787b7b2465d09 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Wed, 27 Feb 2019 22:41:26 -0800
+Subject: [PATCH] support-files/CMakeLists.txt: fix do_populate_sysroot issue
+
+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]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+
+---
+ support-files/CMakeLists.txt | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
+index b5767432..56733de1 100644
+--- a/support-files/CMakeLists.txt
++++ b/support-files/CMakeLists.txt
+@@ -165,12 +165,5 @@ IF(UNIX)
+ INSTALL(FILES rpm/enable_encryption.preset DESTINATION ${INSTALL_SYSCONF2DIR}
+ COMPONENT IniFiles)
+ ENDIF()
+-
+- # This is for SuSE:
+- INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink
+- ${INSTALL_SYSCONFDIR}/init.d/mysql
+- ${INSTALL_SBINDIR}/rcmysql
+- WORKING_DIRECTORY \$ENV{DESTDIR}${prefix})"
+- COMPONENT SupportFiles)
+ ENDIF(INSTALL_SYSCONFDIR)
+ ENDIF()
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_5.5.64.bb b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_10.4.12.bb
index d7895732..c0b53379 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_5.5.64.bb
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mariadb_10.4.12.bb
@@ -2,7 +2,7 @@ require mariadb.inc
EXTRA_OECMAKE += "-DSTACK_DIRECTION=-1"
-DEPENDS += "mariadb-native ncurses zlib readline libaio libevent"
+DEPENDS += "mariadb-native bison-native openssl ncurses zlib libaio libedit libevent libxml2"
PROVIDES += "mysql5 libmysqlclient"
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mysql-python/0001-_mysql.c-fix-compilation-with-MariaDB-with-10.3.13.patch b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mysql-python/0001-_mysql.c-fix-compilation-with-MariaDB-with-10.3.13.patch
new file mode 100644
index 00000000..173241ea
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mysql-python/0001-_mysql.c-fix-compilation-with-MariaDB-with-10.3.13.patch
@@ -0,0 +1,34 @@
+From 45436592aa64308b2ab46f84c6107c6d7de0a3ec Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Wed, 6 Mar 2019 00:16:17 -0800
+Subject: [PATCH] _mysql.c: fix compilation with MariaDB 10.3.13
+
+Use standard API function MYSQL_OPT_RECONNECT
+instead of direct modification of internal structures
+which does not work for MariaDB.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ _mysql.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/_mysql.c
++++ b/_mysql.c
+@@ -2002,7 +2002,14 @@ _mysql_ConnectionObject_ping(
+ int r, reconnect = -1;
+ if (!PyArg_ParseTuple(args, "|I", &reconnect)) return NULL;
+ check_connection(self);
+- if ( reconnect != -1 ) self->connection.reconnect = reconnect;
++ if ( reconnect != -1 ) {
++#if MYSQL_VERSION_ID >= 50013
++ my_bool recon = reconnect;
++ mysql_options(&self->connection, MYSQL_OPT_RECONNECT, &recon);
++#else
++ self->connection.reconnect = reconnect;
++#endif
++ }
+ Py_BEGIN_ALLOW_THREADS
+ r = mysql_ping(&(self->connection));
+ Py_END_ALLOW_THREADS
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb
index ac0df4f0..4617da8e 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/mysql/mysql-python_1.2.5.bb
@@ -8,10 +8,17 @@ DEPENDS = "mysql5"
SRCNAME = "MySQL-python"
-SRC_URI = "https://pypi.python.org/packages/source/M/${SRCNAME}/${SRCNAME}-${PV}.zip"
+SRC_URI = "https://pypi.python.org/packages/source/M/${SRCNAME}/${SRCNAME}-${PV}.zip \
+ file://0001-_mysql.c-fix-compilation-with-MariaDB-with-10.3.13.patch \
+"
SRC_URI[md5sum] = "654f75b302db6ed8dc5a898c625e030c"
SRC_URI[sha256sum] = "811040b647e5d5686f84db415efd697e6250008b112b6909ba77ac059e140c74"
S = "${WORKDIR}/${SRCNAME}-${PV}"
-inherit setuptools
+inherit ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "setuptools", "", d)}
+
+python() {
+ if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
+ raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
+}
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch
new file mode 100644
index 00000000..865ad328
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Add-support-for-RISC-V.patch
@@ -0,0 +1,41 @@
+From b06a228a5fd1589fc9bed654b3288b321fc21aa1 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.
+
+The architecture is sufficiently similar to aarch64 that simply
+extending the existing aarch64 macro works.
+---
+ 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 3fe29ce..7cd578f 100644
+--- a/src/include/storage/s_lock.h
++++ b/src/include/storage/s_lock.h
+@@ -316,11 +316,12 @@ tas(volatile slock_t *lock)
+
+ /*
+ * On ARM and ARM64, we use __sync_lock_test_and_set(int *, int) if available.
++ * On RISC-V, the same.
+ *
+ * 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)
+ #ifdef HAVE_GCC__SYNC_INT32_TAS
+ #define HAS_TEST_AND_SET
+
+@@ -337,7 +338,7 @@ tas(volatile slock_t *lock)
+ #define S_UNLOCK(lock) __sync_lock_release(lock)
+
+ #endif /* HAVE_GCC__SYNC_INT32_TAS */
+-#endif /* __arm__ || __arm || __aarch64__ || __aarch64 */
++#endif /* __arm__ || __arm || __aarch64__ || __aarch64 || __riscv */
+
+
+ /* S/390 and S/390x Linux (32- and 64-bit zSeries) */
+--
+2.9.3
+
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch
new file mode 100644
index 00000000..32b7f428
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Improve-reproducibility.patch
@@ -0,0 +1,39 @@
+From 3c13315447fa175da6c9ebe59a039e611cdb5bd1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 4 Jun 2019 13:45:30 +0800
+Subject: [PATCH] Improve reproducibility,
+
+Remove build patch from binaries which pg_config do
+not record var-CC, var-CFLAGS, and configure
+
+$ /usr/bin/pg_config --cc
+not recorded
+
+$ /usr/bin/pg_config --configure
+not recorded
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ src/common/Makefile | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/common/Makefile b/src/common/Makefile
+index 1fc2c66..5e6c457 100644
+--- a/src/common/Makefile
++++ b/src/common/Makefile
+@@ -27,10 +27,6 @@ include $(top_builddir)/src/Makefile.global
+ # don't include subdirectory-path-dependent -I and -L switches
+ STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
+ STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS))
+-override CPPFLAGS += -DVAL_CONFIGURE="\"$(configure_args)\""
+-override CPPFLAGS += -DVAL_CC="\"$(CC)\""
+-override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""
+-override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\""
+ override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\""
+ override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\""
+ override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\""
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch
deleted file mode 100644
index f14da06d..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From d3ee8c8df5808b63e86f40831f2ba62cbb33d291 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Wed, 8 Aug 2018 09:18:27 +0800
-Subject: [PATCH] postgresql: Use pkg-config for libxml2 detection.
-
-Upstream-Status: Inappropriate [configuration]
-
-xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS.
-
-Signed-off-by: Philip Balister <philip@balister.org>
-
-upate to version 10.4
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- configure.in | 15 ++-------------
- 1 file changed, 2 insertions(+), 13 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index d9fe56e..3e2cd3a 100644
---- a/configure.in
-+++ b/configure.in
-@@ -816,19 +816,8 @@ PGAC_ARG_BOOL(with, libxml, no, [build with XML support],
- [AC_DEFINE([USE_LIBXML], 1, [Define to 1 to build with XML support. (--with-libxml)])])
-
- if test "$with_libxml" = yes ; then
-- PGAC_PATH_PROGS(XML2_CONFIG, xml2-config)
-- if test -n "$XML2_CONFIG"; then
-- for pgac_option in `$XML2_CONFIG --cflags`; do
-- case $pgac_option in
-- -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
-- esac
-- done
-- for pgac_option in `$XML2_CONFIG --libs`; do
-- case $pgac_option in
-- -L*) LDFLAGS="$LDFLAGS $pgac_option";;
-- esac
-- done
-- fi
-+ CPPFLAGS="$CPPFLAGS `pkg-config --short-errors --print-errors --cflags "libxml-2.0" 2>&1`"
-+ LIBS="`pkg-config --short-errors --print-errors --libs "libxml-2.0" 2>&1` $LIBS"
- fi
-
- AC_SUBST(with_libxml)
---
-2.7.4
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
index 97151094..22b62d9d 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch
@@ -1,4 +1,7 @@
-[PATCH] not check libperl under cross compiling
+From 7e2af4de19be58bc9d551c41ce2750396d357f34 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 27 Nov 2018 13:25:15 +0800
+Subject: [PATCH] PATCH] not check libperl under cross compiling
Upstream-Status: Inappropriate [configuration]
@@ -6,23 +9,29 @@ libperl ldflags returned by PGAC_CHECK_PERL_EMBED_LDFLAGS are native,
can not be used to check target library.
postpresql has the dependency on perl, so not need to check libperl
-again, like in postgresql-9.2.4
+again, like in postgresql-9.2.4
Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+update patch to version 11.1
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
configure.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: postgresql-9.4.15/configure.in
-===================================================================
---- postgresql-9.4.15.orig/configure.in
-+++ postgresql-9.4.15/configure.in
-@@ -1879,7 +1879,7 @@ if test "$with_tcl" = yes; then
+diff --git a/configure.in b/configure.in
+index b98b9bb..8584677 100644
+--- a/configure.in
++++ b/configure.in
+@@ -2211,7 +2211,7 @@ Use --without-tcl to disable building PL/Tcl.])
fi
# check for <perl.h>
-if test "$with_perl" = yes; then
+if test "$with_perl" = yes && test "$cross_compiling" = no; then
ac_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE"
+ CPPFLAGS="$CPPFLAGS $perl_includespec"
AC_CHECK_HEADER(perl.h, [], [AC_MSG_ERROR([header file <perl.h> is required for Perl])],
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.init b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.init
index 4a4f0cd1..1791e68b 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.init
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/files/postgresql.init
@@ -14,8 +14,8 @@
# PGVERSION is the full package version, e.g., 8.4.0
# Note: the specfile inserts the correct value during package build
PGVERSION=9.2.4
-# PGMAJORVERSION is major version, e.g., 8.4 (this should match PG_VERSION)
-PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/'`
+# PGMAJORVERSION is major version, e.g., 10 (this should match PG_VERSION)
+PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\).*$/\1/'`
# Source function library.
. /etc/init.d/functions
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc
index dc852245..5b20098a 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql.inc
@@ -18,7 +18,7 @@ DESCRIPTION = "\
this package if you're installing the postgresql-server package. \
"
HOMEPAGE = "http://www.postgresql.com"
-LICENSE = "BSD"
+LICENSE = "BSD-0-Clause"
DEPENDS = "libnsl2 zlib readline tzcode-native"
ARM_INSTRUCTION_SET = "arm"
@@ -29,7 +29,6 @@ SRC_URI = "http://ftp.postgresql.org/pub/source/v${PV}/${BP}.tar.bz2 \
file://postgresql.pam \
file://postgresql-setup \
file://postgresql.service \
- file://0001-Use-pkg-config-for-libxml2-detection.patch \
"
LEAD_SONAME = "libpq.so"
@@ -37,7 +36,7 @@ LEAD_SONAME = "libpq.so"
# LDFLAGS for shared libraries
export LDFLAGS_SL = "${LDFLAGS}"
-inherit autotools pkgconfig perlnative pythonnative useradd update-rc.d systemd gettext
+inherit autotools pkgconfig perlnative python3native useradd update-rc.d systemd gettext cpan-base
CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6"
@@ -58,7 +57,7 @@ enable_pam = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
PACKAGECONFIG ??= "${enable_pam} openssl python uuid libxml tcl nls libxml perl"
PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
-PACKAGECONFIG[python] = "--with-python,--without-python,python,python"
+PACKAGECONFIG[python] = "--with-python,--without-python,python3,python3"
PACKAGECONFIG[uuid] = "--with-uuid=e2fs,--without-uuid,util-linux,"
PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native,"
PACKAGECONFIG[nls] = "--enable-nls,--disable-nls,,"
@@ -72,6 +71,16 @@ EXTRA_OECONF += "--enable-thread-safety --disable-rpath \
EXTRA_OECONF_sh4 += "--disable-spinlocks"
EXTRA_OECONF_aarch64 += "--disable-spinlocks"
+DEBUG_OPTIMIZATION_remove_mips = " -Og"
+DEBUG_OPTIMIZATION_append_mips = " -O"
+BUILD_OPTIMIZATION_remove_mips = " -Og"
+BUILD_OPTIMIZATION_append_mips = " -O"
+
+DEBUG_OPTIMIZATION_remove_mipsel = " -Og"
+DEBUG_OPTIMIZATION_append_mipsel = " -O"
+BUILD_OPTIMIZATION_remove_mipsel = " -Og"
+BUILD_OPTIMIZATION_append_mipsel = " -O"
+
PACKAGES_DYNAMIC += "^${PN}-plperl \
^${PN}-pltcl \
^${PN}-plpython \
@@ -106,6 +115,10 @@ python populate_packages_prepend() {
}
+# This will make native perl use target settings (for include dirs etc.)
+export PERLCONFIGTARGET = "${@is_target(d)}"
+export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}"
+
do_configure() {
# do_configure
autotools_do_configure
@@ -119,7 +132,7 @@ do_configure() {
BLIBNA="\${STAGING_BASE_LIBDIR_NATIVE}"
sed -i -e "/^perl_archlibexp/s:${LIBPNA}:${STAGING_LIBDIR}:g" \
${B}/src/Makefile.global
- sed -i -e "/^perl_privlibexp/s:${LIBPNA}:${STAGING_LIBDIR}:g" \
+ sed -i -e "/^perl_privlibexp/s:${libdir}:${STAGING_LIBDIR}:g" \
${B}/src/Makefile.global
# remove the rpath, replace with correct lib path
sed -i \
@@ -266,7 +279,9 @@ FILES_${PN}-timezone = "${datadir}/${BPN}/timezone \
${datadir}/${BPN}/timezonesets \
"
RDEPENDS_${PN} += "${PN}-timezone"
-FILES_${PN}-server-dev = "${includedir}/${BPN}/server"
+FILES_${PN}-server-dev = "${includedir}/${BPN}/server \
+ ${libdir}/${BPN}/pgxs \
+"
FILES_libecpg = "${libdir}/libecpg*${SOLIBS}"
FILES_libecpg-dev = "${libdir}/libecpg*${SOLIBSDEV} \
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_10.10.bb b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_10.10.bb
deleted file mode 100644
index 8be794c3..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_10.10.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require postgresql.inc
-
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=87da2b84884860b71f5f24ab37e7da78"
-
-SRC_URI += "\
- file://not-check-libperl.patch \
-"
-
-SRC_URI[md5sum] = "3dac8187636fa8237802bef85be78023"
-SRC_URI[sha256sum] = "ad4f9b8575f98ed6091bf9bb2cb16f0e52795a5f66546c1f499ca5c69b21f253"
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_12.3.bb b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_12.3.bb
new file mode 100644
index 00000000..cc7e3ff5
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/postgresql/postgresql_12.3.bb
@@ -0,0 +1,12 @@
+require postgresql.inc
+
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fc4ce21960f0c561460d750bc270d11f"
+
+SRC_URI += "\
+ file://not-check-libperl.patch \
+ file://0001-Add-support-for-RISC-V.patch \
+ file://0001-Improve-reproducibility.patch \
+"
+
+SRC_URI[md5sum] = "a30c023dd7088e44d73be71af2ef404a"
+SRC_URI[sha256sum] = "94ed64a6179048190695c86ec707cc25d016056ce10fc9d229267d9a8f1dcf41"
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch b/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch
new file mode 100644
index 00000000..9bfb1f31
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/files/0001-cmake-Add-check-for-atomic-support.patch
@@ -0,0 +1,115 @@
+From ba0a0e54d9544babbd3963891f4e3200dd5583f5 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
+
+Detect if libatomic should be linked in or compiler and platform can
+provide the needed atomic instrinsics, this helps build on certain
+platforms like mips or clang/i386
+
+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_exchange_8'
+| /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_or_8'
+| /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_compare_exchange_8'
+| /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_sub_8'
+| /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_load_8'
+| /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_store_8'
+| /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 | 6 +++
+ cmake/modules/CheckAtomic.cmake | 69 +++++++++++++++++++++++++++++++++
+ 2 files changed, 75 insertions(+)
+ create mode 100644 cmake/modules/CheckAtomic.cmake
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -780,7 +780,13 @@ if(WIN32)
+ set(SYSTEM_LIBS ${SYSTEM_LIBS} shlwapi.lib rpcrt4.lib)
+ set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
+ else()
++ # check if linking against libatomic is necessary
++ include(CheckAtomic)
++
+ set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT})
++ if(HAVE_CXX_ATOMIC_WITH_LIB OR HAVE_CXX_ATOMICS64_WITH_LIB)
++ set(SYSTEM_LIBS ${SYSTEM_LIBS} atomic)
++ endif()
+ set(LIBS ${ROCKSDB_SHARED_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
+
+ add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES})
+--- /dev/null
++++ b/cmake/modules/CheckAtomic.cmake
+@@ -0,0 +1,69 @@
++# Checks if atomic operations are supported natively or if linking against
++# libatomic is needed.
++
++# Check inspired by LLVMs cmake/modules/CheckAtomic.cmake
++
++INCLUDE(CheckCXXSourceCompiles)
++INCLUDE(CheckLibraryExists)
++
++function(check_working_cxx_atomics varname)
++ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
++ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11")
++ CHECK_CXX_SOURCE_COMPILES("
++#include <atomic>
++std::atomic<int> x;
++int main() {
++ return x;
++}
++" ${varname})
++ set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
++endfunction(check_working_cxx_atomics)
++
++function(check_working_cxx_atomics64 varname)
++ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
++ set(CMAKE_REQUIRED_FLAGS "-std=c++11 ${CMAKE_REQUIRED_FLAGS}")
++ CHECK_CXX_SOURCE_COMPILES("
++#include <atomic>
++#include <cstdint>
++std::atomic<uint64_t> x (0);
++std::atomic<double> y (0);
++int main() {
++ uint64_t i = x.load(std::memory_order_relaxed);
++ return int(y);
++}
++" ${varname})
++ set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
++endfunction(check_working_cxx_atomics64)
++
++# Check if atomics work without libatomic
++check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB)
++
++if(NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
++ check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
++ if( HAVE_LIBATOMIC )
++ list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
++ check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB)
++ if (NOT HAVE_CXX_ATOMICS_WITH_LIB)
++ message(FATAL_ERROR "Host compiler must support std::atomic!")
++ endif()
++ else()
++ message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
++ endif()
++endif()
++
++# Check if 64bit atomics work without libatomic
++check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITHOUT_LIB)
++
++if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB)
++ check_library_exists(atomic __atomic_load_8 "" HAVE_CXX_LIBATOMICS64)
++ if(HAVE_CXX_LIBATOMICS64)
++ list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
++ check_working_cxx_atomics64(HAVE_CXX_ATOMICS64_WITH_LIB)
++ if (NOT HAVE_CXX_ATOMICS64_WITH_LIB)
++ message(FATAL_ERROR "Host compiler must support std::atomic!")
++ endif()
++ else()
++ message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
++ endif()
++endif()
++
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/files/0001-db-write_thread.cc-Initialize-state.patch b/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/files/0001-db-write_thread.cc-Initialize-state.patch
new file mode 100644
index 00000000..97ddbce5
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/files/0001-db-write_thread.cc-Initialize-state.patch
@@ -0,0 +1,31 @@
+From 49dcd22dcf1aae5995c42eac0fda68516fc1cd43 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 19 Jun 2019 17:57:24 +0800
+Subject: [PATCH] db/write_thread.cc: Initialize state
+
+Fixed an error when compiled without -O2:
+db/write_thread.cc:183:14: error: 'state' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ db/write_thread.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/db/write_thread.cc b/db/write_thread.cc
+index 835992c..6f99a11 100644
+--- a/db/write_thread.cc
++++ b/db/write_thread.cc
+@@ -59,7 +59,7 @@ uint8_t WriteThread::BlockingAwaitState(Writer* w, uint8_t goal_mask) {
+
+ uint8_t WriteThread::AwaitState(Writer* w, uint8_t goal_mask,
+ AdaptationContext* ctx) {
+- uint8_t state;
++ uint8_t state = 0;
+
+ // 1. Busy loop using "pause" for 1 micro sec
+ // 2. Else SOMETIMES busy loop using "yield" for 100 micro sec (default)
+--
+2.7.4
+
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb/0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch b/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb/0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch
deleted file mode 100644
index be498974..00000000
--- a/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb/0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-From 8d65d70b54d1d306a0a0b00e036bc8ddd39d8ec1 Mon Sep 17 00:00:00 2001
-From: "przemyslaw.skibinski@percona.com" <przemyslaw.skibinski@percona.com>
-Date: Fri, 20 Apr 2018 13:28:05 -0700
-Subject: [PATCH] Fix GitHub issue #3716: gcc-8 warnings
-
-Summary:
-Fix the following gcc-8 warnings:
-- conflicting C language linkage declaration [-Werror]
-- writing to an object with no trivial copy-assignment [-Werror=class-memaccess]
-- array subscript -1 is below array bounds [-Werror=array-bounds]
-
-Solves https://github.com/facebook/rocksdb/issues/3716
-Closes https://github.com/facebook/rocksdb/pull/3736
-
-Differential Revision: D7684161
-
-Pulled By: yiwu-arbug
-
-fbshipit-source-id: 47c0423d26b74add251f1d3595211eee1e41e54a
----
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport [https://github.com/facebook/rocksdb/commit/dee95a1afc6c63515e7d94dec33acdb79638b6d7.patch]
-
- db/c.cc | 77 ++++++++++++++-------------------------
- memtable/inlineskiplist.h | 12 +++---
- 2 files changed, 33 insertions(+), 56 deletions(-)
-
-diff --git a/db/c.cc b/db/c.cc
-index 064103ed4..0d485d096 100644
---- a/db/c.cc
-+++ b/db/c.cc
-@@ -1388,23 +1388,24 @@ void rocksdb_writebatch_put_log_data(
- b->rep.PutLogData(Slice(blob, len));
- }
-
-+class H : public WriteBatch::Handler {
-+ public:
-+ void* state_;
-+ void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen);
-+ void (*deleted_)(void*, const char* k, size_t klen);
-+ virtual void Put(const Slice& key, const Slice& value) override {
-+ (*put_)(state_, key.data(), key.size(), value.data(), value.size());
-+ }
-+ virtual void Delete(const Slice& key) override {
-+ (*deleted_)(state_, key.data(), key.size());
-+ }
-+};
-+
- void rocksdb_writebatch_iterate(
- rocksdb_writebatch_t* b,
- void* state,
- void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen),
- void (*deleted)(void*, const char* k, size_t klen)) {
-- class H : public WriteBatch::Handler {
-- public:
-- void* state_;
-- void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen);
-- void (*deleted_)(void*, const char* k, size_t klen);
-- virtual void Put(const Slice& key, const Slice& value) override {
-- (*put_)(state_, key.data(), key.size(), value.data(), value.size());
-- }
-- virtual void Delete(const Slice& key) override {
-- (*deleted_)(state_, key.data(), key.size());
-- }
-- };
- H handler;
- handler.state_ = state;
- handler.put_ = put;
-@@ -1649,18 +1650,6 @@ void rocksdb_writebatch_wi_iterate(
- void* state,
- void (*put)(void*, const char* k, size_t klen, const char* v, size_t vlen),
- void (*deleted)(void*, const char* k, size_t klen)) {
-- class H : public WriteBatch::Handler {
-- public:
-- void* state_;
-- void (*put_)(void*, const char* k, size_t klen, const char* v, size_t vlen);
-- void (*deleted_)(void*, const char* k, size_t klen);
-- virtual void Put(const Slice& key, const Slice& value) override {
-- (*put_)(state_, key.data(), key.size(), value.data(), value.size());
-- }
-- virtual void Delete(const Slice& key) override {
-- (*deleted_)(state_, key.data(), key.size());
-- }
-- };
- H handler;
- handler.state_ = state;
- handler.put_ = put;
-@@ -3109,20 +3098,21 @@ void rocksdb_slicetransform_destroy(rocksdb_slicetransform_t* st) {
- delete st;
- }
-
-+struct Wrapper : public rocksdb_slicetransform_t {
-+ const SliceTransform* rep_;
-+ ~Wrapper() { delete rep_; }
-+ const char* Name() const override { return rep_->Name(); }
-+ Slice Transform(const Slice& src) const override {
-+ return rep_->Transform(src);
-+ }
-+ bool InDomain(const Slice& src) const override {
-+ return rep_->InDomain(src);
-+ }
-+ bool InRange(const Slice& src) const override { return rep_->InRange(src); }
-+ static void DoNothing(void*) { }
-+};
-+
- rocksdb_slicetransform_t* rocksdb_slicetransform_create_fixed_prefix(size_t prefixLen) {
-- struct Wrapper : public rocksdb_slicetransform_t {
-- const SliceTransform* rep_;
-- ~Wrapper() { delete rep_; }
-- const char* Name() const override { return rep_->Name(); }
-- Slice Transform(const Slice& src) const override {
-- return rep_->Transform(src);
-- }
-- bool InDomain(const Slice& src) const override {
-- return rep_->InDomain(src);
-- }
-- bool InRange(const Slice& src) const override { return rep_->InRange(src); }
-- static void DoNothing(void*) { }
-- };
- Wrapper* wrapper = new Wrapper;
- wrapper->rep_ = rocksdb::NewFixedPrefixTransform(prefixLen);
- wrapper->state_ = nullptr;
-@@ -3131,19 +3121,6 @@ rocksdb_slicetransform_t* rocksdb_slicetransform_create_fixed_prefix(size_t pref
- }
-
- rocksdb_slicetransform_t* rocksdb_slicetransform_create_noop() {
-- struct Wrapper : public rocksdb_slicetransform_t {
-- const SliceTransform* rep_;
-- ~Wrapper() { delete rep_; }
-- const char* Name() const override { return rep_->Name(); }
-- Slice Transform(const Slice& src) const override {
-- return rep_->Transform(src);
-- }
-- bool InDomain(const Slice& src) const override {
-- return rep_->InDomain(src);
-- }
-- bool InRange(const Slice& src) const override { return rep_->InRange(src); }
-- static void DoNothing(void*) { }
-- };
- Wrapper* wrapper = new Wrapper;
- wrapper->rep_ = rocksdb::NewNoopTransform();
- wrapper->state_ = nullptr;
-diff --git a/memtable/inlineskiplist.h b/memtable/inlineskiplist.h
-index 702a7336d..eadda1dc1 100644
---- a/memtable/inlineskiplist.h
-+++ b/memtable/inlineskiplist.h
-@@ -280,7 +280,7 @@ struct InlineSkipList<Comparator>::Node {
- // next_[0]. This is used for passing data from AllocateKey to Insert.
- void StashHeight(const int height) {
- assert(sizeof(int) <= sizeof(next_[0]));
-- memcpy(&next_[0], &height, sizeof(int));
-+ memcpy(static_cast<void*>(&next_[0]), &height, sizeof(int));
- }
-
- // Retrieves the value passed to StashHeight. Undefined after a call
-@@ -300,30 +300,30 @@ struct InlineSkipList<Comparator>::Node {
- assert(n >= 0);
- // Use an 'acquire load' so that we observe a fully initialized
- // version of the returned Node.
-- return (next_[-n].load(std::memory_order_acquire));
-+ return ((&next_[0] - n)->load(std::memory_order_acquire));
- }
-
- void SetNext(int n, Node* x) {
- assert(n >= 0);
- // Use a 'release store' so that anybody who reads through this
- // pointer observes a fully initialized version of the inserted node.
-- next_[-n].store(x, std::memory_order_release);
-+ (&next_[0] - n)->store(x, std::memory_order_release);
- }
-
- bool CASNext(int n, Node* expected, Node* x) {
- assert(n >= 0);
-- return next_[-n].compare_exchange_strong(expected, x);
-+ return (&next_[0] - n)->compare_exchange_strong(expected, x);
- }
-
- // No-barrier variants that can be safely used in a few locations.
- Node* NoBarrier_Next(int n) {
- assert(n >= 0);
-- return next_[-n].load(std::memory_order_relaxed);
-+ return (&next_[0] - n)->load(std::memory_order_relaxed);
- }
-
- void NoBarrier_SetNext(int n, Node* x) {
- assert(n >= 0);
-- next_[-n].store(x, std::memory_order_relaxed);
-+ (&next_[0] - n)->store(x, std::memory_order_relaxed);
- }
-
- // Insert node after prev on specific level.
---
-2.17.0
-
diff --git a/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb b/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
index 594d1a9c..b9038df8 100644
--- a/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
+++ b/external/meta-openembedded/meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb
@@ -6,27 +6,38 @@ LIC_FILES_CHKSUM = "file://LICENSE.Apache;md5=3b83ef96387f14655fc854ddc3c6bd57 \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://LICENSE.leveldb;md5=fb04ff57a14f308f2eed4a9b87d45837"
-SRCREV = "c60df9d9e7629fe208a9b848293a5599f83d5e77"
-SRCBRANCH = "5.13.fb"
-PV = "5.13.1"
+SRCREV = "551a110918493a19d11243f53408b97485de1411"
+SRCBRANCH = "6.6.fb"
+PV = "6.6.4"
SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH} \
- file://0001-Fix-GitHub-issue-3716-gcc-8-warnings.patch \
+ file://0001-db-write_thread.cc-Initialize-state.patch \
+ file://0001-cmake-Add-check-for-atomic-support.patch \
"
S = "${WORKDIR}/git"
inherit cmake
-PACKAGECONFIG ??= "bzip2 zlib lz4"
+PACKAGECONFIG ??= "bzip2 zlib lz4 gflags"
PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON,-DWITH_BZ2=OFF,bzip2"
PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON,-DWITH_LZ4=OFF,lz4"
PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON,-DWITH_ZLIB=OFF,zlib"
+PACKAGECONFIG[zstd] = "-DWITH_ZSTD=ON,-DWITH_ZSTD=OFF,zstd"
PACKAGECONFIG[lite] = "-DROCKSDB_LITE=ON,-DROCKSDB_LITE=OFF"
+PACKAGECONFIG[gflags] = "-DWITH_GFLAGS=ON,-DWITH_GFLAGS=OFF,gflags"
# Tools and tests currently don't compile on armv5 so we disable them
EXTRA_OECMAKE = "\
-DPORTABLE=ON \
-DWITH_TESTS=OFF \
-DWITH_TOOLS=OFF \
+ -DFAIL_ON_WARNINGS=OFF \
"
+
+do_install_append() {
+ # fix for qa check buildpaths
+ sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/rocksdb/RocksDBTargets.cmake
+}
+
+LDFLAGS_append_riscv64 = " -pthread"