summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-08-24 13:14:12 -0700
committerKhem Raj <raj.khem@gmail.com>2018-08-24 17:11:07 -0700
commit5cf9a144ad16efd6a6de09205da1aa56ec7fed0a (patch)
tree8045e4d3e32821a8f2c4163b6ab5b6a737ec7071 /meta-oe/recipes-dbs
parent9b5562e9a21d9ac6f707548a4170f4b6b81da781 (diff)
downloadmeta-openembedded-5cf9a144ad16efd6a6de09205da1aa56ec7fed0a.tar.gz
mongodb: Upgrade to 4.0.1 release
Drop/adapt patches as some of them are not needed anymore Add patches to support musl especially thread stack and resolver functionality Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-dbs')
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch17
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch33
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch12
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch44
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch4
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch26
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch39
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch25
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch39
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch13
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch6
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch6
-rw-r--r--meta-oe/recipes-dbs/mongodb/mongodb_git.bb19
13 files changed, 125 insertions, 158 deletions
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch
index 5da34480e..4d7ac3aa5 100644
--- a/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch
@@ -18,19 +18,16 @@ Upstream-Status: Pending
18 src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h | 2 +- 18 src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-) 19 1 file changed, 1 insertion(+), 1 deletion(-)
20 20
21diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h 21Index: git/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
22index 2b3f76db86..cc80305775 100755 22===================================================================
23--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h 23--- git.orig/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
24+++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h 24+++ git/src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
25@@ -42,7 +42,7 @@ 25@@ -43,7 +43,7 @@
26 #include <ctype.h>
27 26
27 #if 0 // MongoDB Modification -- just `#include <stddef.h>`
28 // Fix system header issue on Sun solaris and define required type by ourselves 28 // Fix system header issue on Sun solaris and define required type by ourselves
29-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__) 29-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__)
30+#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__) && !defined(__DEFINED_wchar_t) 30+#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__) && !defined(__DEFINED_wchar_t)
31 typedef int wchar_t; 31 typedef int wchar_t;
32 #endif 32 #endif
33 33 #else
34--
352.14.1
36
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch
new file mode 100644
index 000000000..070411ab9
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Support-deprecated-resolver-functions.patch
@@ -0,0 +1,33 @@
1From 5994023a03634dfc0318976c293e7391fe6aa060 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 24 Aug 2018 12:56:22 -0700
4Subject: [PATCH 1/2] Support deprecated resolver functions
5
6Needed for musl libc
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 src/mongo/util/dns_query_posix-impl.h | 6 ++++++
12 1 file changed, 6 insertions(+)
13
14diff --git a/src/mongo/util/dns_query_posix-impl.h b/src/mongo/util/dns_query_posix-impl.h
15index d19958010c..bbca3309ed 100644
16--- a/src/mongo/util/dns_query_posix-impl.h
17+++ b/src/mongo/util/dns_query_posix-impl.h
18@@ -53,6 +53,12 @@
19
20 #include <boost/noncopyable.hpp>
21
22+#ifndef res_ninit
23+#define res_nclose(arg)
24+#define res_ninit(arg) res_init()
25+#define res_nsearch(sta, nam, clas, typ, ans, alen) res_search(nam, clas, typ, ans, alen)
26+#endif
27+
28 namespace mongo {
29 namespace dns {
30 // The anonymous namespace is safe, in this header, as it is not really a header. It is only used
31--
322.18.0
33
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch
index aa01e954f..a6d721ac5 100644
--- a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch
@@ -13,7 +13,7 @@ Index: git/SConstruct
13=================================================================== 13===================================================================
14--- git.orig/SConstruct 14--- git.orig/SConstruct
15+++ git/SConstruct 15+++ git/SConstruct
16@@ -548,6 +548,7 @@ def variable_arch_converter(val): 16@@ -564,6 +564,7 @@ def variable_arch_converter(val):
17 'amd64': 'x86_64', 17 'amd64': 'x86_64',
18 'emt64': 'x86_64', 18 'emt64': 'x86_64',
19 'x86': 'i386', 19 'x86': 'i386',
@@ -21,7 +21,7 @@ Index: git/SConstruct
21 } 21 }
22 val = val.lower() 22 val = val.lower()
23 23
24@@ -627,7 +628,8 @@ env_vars.Add( 24@@ -652,7 +653,8 @@ env_vars.Add(
25 ) 25 )
26 26
27 env_vars.Add('CC', 27 env_vars.Add('CC',
@@ -31,7 +31,7 @@ Index: git/SConstruct
31 31
32 env_vars.Add('CCFLAGS', 32 env_vars.Add('CCFLAGS',
33 help='Sets flags for the C and C++ compiler', 33 help='Sets flags for the C and C++ compiler',
34@@ -647,7 +649,8 @@ env_vars.Add('CPPPATH', 34@@ -672,7 +674,8 @@ env_vars.Add('CPPPATH',
35 converter=variable_shlex_converter) 35 converter=variable_shlex_converter)
36 36
37 env_vars.Add('CXX', 37 env_vars.Add('CXX',
@@ -41,19 +41,19 @@ Index: git/SConstruct
41 41
42 env_vars.Add('CXXFLAGS', 42 env_vars.Add('CXXFLAGS',
43 help='Sets flags for the C++ compiler', 43 help='Sets flags for the C++ compiler',
44@@ -895,6 +898,7 @@ envDict = dict(BUILD_ROOT=buildDir, 44@@ -961,6 +964,7 @@ envDict = dict(BUILD_ROOT=buildDir,
45 ) 45 )
46 46
47 env = Environment(variables=env_vars, **envDict) 47 env = Environment(variables=env_vars, **envDict)
48+env.PrependENVPath('PATH', os.getenv('PATH')) 48+env.PrependENVPath('PATH', os.getenv('PATH'))
49 del envDict 49 del envDict
50 50
51 env.AddMethod(env_os_is_wrapper, 'TargetOSIs') 51 env.AddMethod(mongo_platform.env_os_is_wrapper, 'TargetOSIs')
52Index: git/src/mongo/util/SConscript 52Index: git/src/mongo/util/SConscript
53=================================================================== 53===================================================================
54--- git.orig/src/mongo/util/SConscript 54--- git.orig/src/mongo/util/SConscript
55+++ git/src/mongo/util/SConscript 55+++ git/src/mongo/util/SConscript
56@@ -274,6 +274,8 @@ if env['MONGO_ALLOCATOR'] == 'tcmalloc': 56@@ -329,6 +329,8 @@ if env['MONGO_ALLOCATOR'] == 'tcmalloc':
57 'MONGO_HAVE_GPERFTOOLS_SIZE_CLASS_STATS' 57 'MONGO_HAVE_GPERFTOOLS_SIZE_CLASS_STATS'
58 ] 58 ]
59 ) 59 )
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch
index f8c419d8a..c17ebf1e7 100644
--- a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch
@@ -9,34 +9,25 @@ Upstream-Status: Pending
9 src/mongo/util/processinfo_linux.cpp | 6 ++++-- 9 src/mongo/util/processinfo_linux.cpp | 6 ++++--
10 1 file changed, 4 insertions(+), 2 deletions(-) 10 1 file changed, 4 insertions(+), 2 deletions(-)
11 11
12diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp 12Index: git/src/mongo/util/processinfo_linux.cpp
13index 910015215e..bf8c1ffd15 100644 13===================================================================
14--- a/src/mongo/util/processinfo_linux.cpp 14--- git.orig/src/mongo/util/processinfo_linux.cpp
15+++ b/src/mongo/util/processinfo_linux.cpp 15+++ git/src/mongo/util/processinfo_linux.cpp
16@@ -40,7 +40,7 @@ 16@@ -44,10 +44,10 @@
17 #include <sys/mman.h>
18 #include <sys/utsname.h>
19 #include <unistd.h> 17 #include <unistd.h>
20-#ifdef __UCLIBC__ 18 #ifdef __BIONIC__
21+#ifndef __GLIBC__ 19 #include <android/api-level.h>
22 #include <features.h> 20-#elif __UCLIBC__
23 #else 21-#include <features.h>
22-#else
23+#elif defined(__GLIBC__) && !defined(__UCLIBC__)
24 #include <gnu/libc-version.h> 24 #include <gnu/libc-version.h>
25@@ -451,11 +451,13 @@ double ProcessInfo::getSystemMemoryPressurePercentage() { 25+#else
26 } 26+#include <features.h>
27 27 #endif
28 void ProcessInfo::getExtraInfo(BSONObjBuilder& info) {
29+#if defined(__GLIBC__)
30 LinuxProc p(_pid);
31 if (p._maj_flt <= std::numeric_limits<long long>::max())
32 info.appendNumber("page_faults", static_cast<long long>(p._maj_flt));
33 else
34 info.appendNumber("page_faults", static_cast<double>(p._maj_flt));
35+#endif
36 }
37 28
38 /** 29 #include <boost/filesystem.hpp>
39@@ -491,7 +493,7 @@ void ProcessInfo::SystemInfo::collectSystemInfo() { 30@@ -503,7 +503,7 @@ void ProcessInfo::SystemInfo::collectSys
40 stringstream ss; 31 stringstream ss;
41 ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__; 32 ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__;
42 bExtra.append("libcVersion", ss.str()); 33 bExtra.append("libcVersion", ss.str());
@@ -45,6 +36,3 @@ index 910015215e..bf8c1ffd15 100644
45 bExtra.append("libcVersion", gnu_get_libc_version()); 36 bExtra.append("libcVersion", gnu_get_libc_version());
46 #endif 37 #endif
47 if (!verSig.empty()) 38 if (!verSig.empty())
48--
492.14.1
50
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch
index 389b302c3..99edad3c4 100644
--- a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch
@@ -44,7 +44,7 @@ Index: git/src/mongo/util/procparser.cpp
44 44
45 if (!parseNumberFromString(stringValue, &value).isOK()) { 45 if (!parseNumberFromString(stringValue, &value).isOK()) {
46 value = 0; 46 value = 0;
47@@ -426,7 +426,7 @@ Status parseProcDiskStats(const std::vec 47@@ -522,7 +522,7 @@ Status parseProcDiskStats(const std::vec
48 StringData data, 48 StringData data,
49 BSONObjBuilder* builder) { 49 BSONObjBuilder* builder) {
50 bool foundKeys = false; 50 bool foundKeys = false;
@@ -53,7 +53,7 @@ Index: git/src/mongo/util/procparser.cpp
53 stats.reserve(kDiskFieldCount); 53 stats.reserve(kDiskFieldCount);
54 54
55 using string_split_iterator = boost::split_iterator<StringData::const_iterator>; 55 using string_split_iterator = boost::split_iterator<StringData::const_iterator>;
56@@ -501,7 +501,7 @@ Status parseProcDiskStats(const std::vec 56@@ -597,7 +597,7 @@ Status parseProcDiskStats(const std::vec
57 57
58 StringData stringValue((*partIt).begin(), (*partIt).end()); 58 StringData stringValue((*partIt).begin(), (*partIt).end());
59 59
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch
deleted file mode 100644
index 0334d994e..000000000
--- a/meta-oe/recipes-dbs/mongodb/mongodb/0001-Use-strerror_r-only-on-glibc-systems.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From a4dfc92ff342e59596ab64267a8d4f22f173c23b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 2 Sep 2017 12:40:41 -0700
4Subject: [PATCH 1/4] Use strerror_r only on glibc systems
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 src/mongo/util/log.cpp | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/src/mongo/util/log.cpp b/src/mongo/util/log.cpp
12index 1957eb4791..ddf3908818 100644
13--- a/src/mongo/util/log.cpp
14+++ b/src/mongo/util/log.cpp
15@@ -101,7 +101,7 @@ string errnoWithDescription(int errNumber) {
16 char buf[kBuflen];
17 char* msg{nullptr};
18
19-#if defined(__GNUC__) && defined(_GNU_SOURCE)
20+#if defined(__GNUC__) && defined(_GNU_SOURCE) && defined(__GLIBC__)
21 msg = strerror_r(errNumber, buf, kBuflen);
22 #elif defined(_WIN32)
23
24--
252.14.1
26
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch
new file mode 100644
index 000000000..085fa50d9
--- /dev/null
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0002-Fix-default-stack-size-to-256K.patch
@@ -0,0 +1,39 @@
1From 98543889f7ba38c02eb7cd9822f45e27d619edd6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 24 Aug 2018 13:07:01 -0700
4Subject: [PATCH 2/2] Fix default stack size to 256K
5
6On musl default stack size is ~80K which is too low
7for mongodb
8
9Upstream-Status: Pending
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 .../platform/stack_locator_pthread_getattr_np.cpp | 10 ++++++++++
14 1 file changed, 10 insertions(+)
15
16diff --git a/src/mongo/platform/stack_locator_pthread_getattr_np.cpp b/src/mongo/platform/stack_locator_pthread_getattr_np.cpp
17index 648d26a41c..6e398f00c9 100644
18--- a/src/mongo/platform/stack_locator_pthread_getattr_np.cpp
19+++ b/src/mongo/platform/stack_locator_pthread_getattr_np.cpp
20@@ -35,6 +35,16 @@
21 #include "mongo/util/assert_util.h"
22 #include "mongo/util/scopeguard.h"
23
24+__attribute__((constructor))
25+static void set_default_stack_size(void)
26+{
27+ pthread_attr_t attr;
28+ invariant(pthread_attr_init(&attr) == 0);
29+ invariant(pthread_attr_setstacksize(&attr, 256*1024) == 0);
30+ pthread_setattr_default_np(&attr);
31+ invariant(pthread_attr_destroy(&attr) == 0);
32+}
33+
34 namespace mongo {
35
36 StackLocator::StackLocator() {
37--
382.18.0
39
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch
deleted file mode 100644
index dc488ad7e..000000000
--- a/meta-oe/recipes-dbs/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1From 5759878e5d278f11a1063e8fccd1e6b7b54caadf Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 2 Aug 2017 16:25:37 -0700
4Subject: [PATCH 2/2] d_state.cpp: Add missing dependenncy on
5 local_sharding_info
6
7Fixes
8| src/mongo/s/d_state.cpp:81: error: undefined reference to 'mongo::enableLocalShardingInfo(mongo::ServiceContext*, std::function<bool (mongo::OperationContext*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>)'
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 src/mongo/s/SConscript | 1 +
13 1 file changed, 1 insertion(+)
14
15Index: git/src/mongo/s/SConscript
16===================================================================
17--- git.orig/src/mongo/s/SConscript
18+++ git/src/mongo/s/SConscript
19@@ -317,5 +317,6 @@ env.Library(
20 "$BUILD_DIR/mongo/db/s/sharding",
21 "$BUILD_DIR/mongo/executor/network_interface_factory",
22 "$BUILD_DIR/mongo/s/client/shard_local",
23+ "$BUILD_DIR/mongo/s/local_sharding_info",
24 ],
25 )
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch
deleted file mode 100644
index 1591f94c9..000000000
--- a/meta-oe/recipes-dbs/mongodb/mongodb/0003-Conditionalize-glibc-specific-strerror_r.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 458f80f482a201b427a1c92235804d0c3f98fd51 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 2 Sep 2017 13:01:11 -0700
4Subject: [PATCH 3/4] Conditionalize glibc specific strerror_r
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 .../asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp | 11 ++++-------
9 1 file changed, 4 insertions(+), 7 deletions(-)
10
11diff --git a/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp b/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp
12index 4e7badb14a..0eeae884e2 100644
13--- a/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp
14+++ b/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp
15@@ -97,17 +97,14 @@ public:
16 #if defined(__sun) || defined(__QNX__) || defined(__SYMBIAN32__)
17 using namespace std;
18 return strerror(value);
19-#elif defined(__MACH__) && defined(__APPLE__) \
20- || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) \
21- || defined(_AIX) || defined(__hpux) || defined(__osf__) \
22- || defined(__ANDROID__)
23+#elif defined(__GLIBC__) && defined(_GNU_SOURCE)
24+ char buf[256] = "";
25+ return strerror_r(value, buf, sizeof(buf));
26+#else
27 char buf[256] = "";
28 using namespace std;
29 strerror_r(value, buf, sizeof(buf));
30 return buf;
31-#else
32- char buf[256] = "";
33- return strerror_r(value, buf, sizeof(buf));
34 #endif
35 #endif // defined(ASIO_WINDOWS)
36 }
37--
382.14.1
39
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch b/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch
index e871f2ba9..a2e1f795b 100644
--- a/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch
@@ -8,11 +8,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
8 src/third_party/wiredtiger/build_linux/wiredtiger_config.h | 2 +- 8 src/third_party/wiredtiger/build_linux/wiredtiger_config.h | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-) 9 1 file changed, 1 insertion(+), 1 deletion(-)
10 10
11diff --git a/src/third_party/wiredtiger/build_linux/wiredtiger_config.h b/src/third_party/wiredtiger/build_linux/wiredtiger_config.h 11Index: git/src/third_party/wiredtiger/build_linux/wiredtiger_config.h
12index 1122e1e319..fdfd48687b 100644 12===================================================================
13--- a/src/third_party/wiredtiger/build_linux/wiredtiger_config.h 13--- git.orig/src/third_party/wiredtiger/build_linux/wiredtiger_config.h
14+++ b/src/third_party/wiredtiger/build_linux/wiredtiger_config.h 14+++ git/src/third_party/wiredtiger/build_linux/wiredtiger_config.h
15@@ -101,7 +101,7 @@ 15@@ -104,7 +104,7 @@
16 #define HAVE_STRING_H 1 16 #define HAVE_STRING_H 1
17 17
18 /* Define to 1 if you have the `strtouq' function. */ 18 /* Define to 1 if you have the `strtouq' function. */
@@ -21,6 +21,3 @@ index 1122e1e319..fdfd48687b 100644
21 21
22 /* Define to 1 if you have the `sync_file_range' function. */ 22 /* Define to 1 if you have the `sync_file_range' function. */
23 /* #undef HAVE_SYNC_FILE_RANGE */ 23 /* #undef HAVE_SYNC_FILE_RANGE */
24--
252.14.1
26
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch b/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch
index 9046bb2f4..c06898758 100644
--- a/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/arm64-support.patch
@@ -7,7 +7,7 @@ Index: git/SConstruct
7=================================================================== 7===================================================================
8--- git.orig/SConstruct 8--- git.orig/SConstruct
9+++ git/SConstruct 9+++ git/SConstruct
10@@ -990,6 +990,7 @@ elif endian == "big": 10@@ -1055,6 +1055,7 @@ elif endian == "big":
11 processor_macros = { 11 processor_macros = {
12 'arm' : { 'endian': 'little', 'defines': ('__arm__',) }, 12 'arm' : { 'endian': 'little', 'defines': ('__arm__',) },
13 'aarch64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')}, 13 'aarch64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')},
@@ -19,7 +19,7 @@ Index: git/src/third_party/IntelRDFPMathLib20U1/SConscript
19=================================================================== 19===================================================================
20--- git.orig/src/third_party/IntelRDFPMathLib20U1/SConscript 20--- git.orig/src/third_party/IntelRDFPMathLib20U1/SConscript
21+++ git/src/third_party/IntelRDFPMathLib20U1/SConscript 21+++ git/src/third_party/IntelRDFPMathLib20U1/SConscript
22@@ -301,7 +301,7 @@ if processor == 'i386': 22@@ -308,7 +308,7 @@ if processor == 'i386':
23 elif processor == 'arm': 23 elif processor == 'arm':
24 cpp_defines['IA32'] = '1' 24 cpp_defines['IA32'] = '1'
25 cpp_defines['ia32'] = '1' 25 cpp_defines['ia32'] = '1'
@@ -32,7 +32,7 @@ Index: git/src/third_party/wiredtiger/SConscript
32=================================================================== 32===================================================================
33--- git.orig/src/third_party/wiredtiger/SConscript 33--- git.orig/src/third_party/wiredtiger/SConscript
34+++ git/src/third_party/wiredtiger/SConscript 34+++ git/src/third_party/wiredtiger/SConscript
35@@ -139,7 +139,7 @@ condition_map = { 35@@ -151,7 +151,7 @@ condition_map = {
36 'POSIX_HOST' : not env.TargetOSIs('windows'), 36 'POSIX_HOST' : not env.TargetOSIs('windows'),
37 'WINDOWS_HOST' : env.TargetOSIs('windows'), 37 'WINDOWS_HOST' : env.TargetOSIs('windows'),
38 38
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch b/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch
index 5c5c20ce3..23d4923d2 100644
--- a/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch
+++ b/meta-oe/recipes-dbs/mongodb/mongodb/disable-hw-crc32-on-arm64-s390x.patch
@@ -5,7 +5,7 @@ Index: git/src/third_party/wiredtiger/SConscript
5=================================================================== 5===================================================================
6--- git.orig/src/third_party/wiredtiger/SConscript 6--- git.orig/src/third_party/wiredtiger/SConscript
7+++ git/src/third_party/wiredtiger/SConscript 7+++ git/src/third_party/wiredtiger/SConscript
8@@ -169,7 +169,9 @@ if useSnappy: 8@@ -181,7 +181,9 @@ if useSnappy:
9 # If not available at runtime, we fall back to software in some cases. 9 # If not available at runtime, we fall back to software in some cases.
10 # 10 #
11 # On zSeries we may disable because SLES 11 kernel doe not support the instructions. 11 # On zSeries we may disable because SLES 11 kernel doe not support the instructions.
@@ -32,7 +32,7 @@ Index: git/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
32=================================================================== 32===================================================================
33--- git.orig/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c 33--- git.orig/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
34+++ git/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c 34+++ git/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
35@@ -78,6 +78,7 @@ unsigned int __wt_crc32c_le(unsigned int 35@@ -77,6 +77,7 @@ unsigned int __wt_crc32c_le(unsigned int
36 return crc; \ 36 return crc; \
37 } 37 }
38 38
@@ -40,7 +40,7 @@ Index: git/src/third_party/wiredtiger/src/checksum/zseries/crc32-s390x.c
40 /* Main CRC-32 functions */ 40 /* Main CRC-32 functions */
41 DEFINE_CRC32_VX(__wt_crc32c_le_vx, __wt_crc32c_le_vgfm_16, __wt_crc32c_le) 41 DEFINE_CRC32_VX(__wt_crc32c_le_vx, __wt_crc32c_le_vgfm_16, __wt_crc32c_le)
42 42
43@@ -90,6 +91,7 @@ __wt_checksum_hw(const void *chunk, size 43@@ -89,6 +90,7 @@ __wt_checksum_hw(const void *chunk, size
44 { 44 {
45 return (~__wt_crc32c_le_vx(0xffffffff, chunk, len)); 45 return (~__wt_crc32c_le_vx(0xffffffff, chunk, len));
46 } 46 }
diff --git a/meta-oe/recipes-dbs/mongodb/mongodb_git.bb b/meta-oe/recipes-dbs/mongodb/mongodb_git.bb
index bb3ff3b40..dd22388b5 100644
--- a/meta-oe/recipes-dbs/mongodb/mongodb_git.bb
+++ b/meta-oe/recipes-dbs/mongodb/mongodb_git.bb
@@ -3,25 +3,28 @@ LICENSE = "AGPL-3.0 & Apache-2.0 & Zlib"
3LIC_FILES_CHKSUM = "file://GNU-AGPL-3.0.txt;md5=73f1eb20517c55bf9493b7dd6e480788 \ 3LIC_FILES_CHKSUM = "file://GNU-AGPL-3.0.txt;md5=73f1eb20517c55bf9493b7dd6e480788 \
4 file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" 4 file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
5 5
6DEPENDS = "openssl libpcre libpcap zlib python boost" 6DEPENDS = "openssl libpcre libpcap zlib boost curl python \
7 python-setuptools-native python-typing-native \
8 python-pyyaml-native python-cheetah-native \
9 "
7 10
8inherit scons dos2unix siteinfo 11inherit scons dos2unix siteinfo pythonnative
9 12
10PV = "3.4.13+git${SRCPV}" 13PV = "4.0.1+git${SRCPV}"
11SRCREV = "fbdef2ccc53e0fcc9afb570063633d992b2aae42" 14#v4.0.1
12SRC_URI = "git://github.com/mongodb/mongo.git;branch=v3.4 \ 15SRCREV = "54f1582fc6eb01de4d4c42f26fc133e623f065fb"
16SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.0 \
13 file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \ 17 file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
14 file://0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch \
15 file://0001-Use-long-long-instead-of-int64_t.patch \ 18 file://0001-Use-long-long-instead-of-int64_t.patch \
16 file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \ 19 file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
17 file://0001-Use-strerror_r-only-on-glibc-systems.patch \
18 file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \ 20 file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \
19 file://0003-Conditionalize-glibc-specific-strerror_r.patch \
20 file://arm64-support.patch \ 21 file://arm64-support.patch \
21 file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \ 22 file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \
22 file://disable-hw-crc32-on-arm64-s390x.patch \ 23 file://disable-hw-crc32-on-arm64-s390x.patch \
24 file://0001-Support-deprecated-resolver-functions.patch \
23 " 25 "
24SRC_URI_append_libc-musl ="\ 26SRC_URI_append_libc-musl ="\
27 file://0002-Fix-default-stack-size-to-256K.patch \
25 file://0004-wiredtiger-Disable-strtouq-on-musl.patch \ 28 file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
26 " 29 "
27S = "${WORKDIR}/git" 30S = "${WORKDIR}/git"