Skip to contentSkip to conversation

mongodb: add and fix Upstream-Status

PATCH In review Martin Jansa 2 participants 3 messages Sep 22, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mongodb: add and fix Upstream-Status

* add 'Upstream-Status: Pending' where it was missing and fix malformatted one in 1296.patch

* fixes:
ERROR: lib32-mongodb-4.4.24-r0 do_patch: QA Issue: Malformed Upstream-Status in patch meta-oe/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/1296.patch
Please correct according to https://docs.yoctoproject.org/contributor-guide/recipe-style-guide.html#patch-upstream-status :
Upstream-Status: submitted https://github.com/mongodb/mongo/pull/1296 [patch-status]
ERROR: lib32-mongodb-4.4.24-r0 do_patch: QA Issue: Missing Upstream-Status in patch meta-oe/meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-free_mon-Include-missing-cstdint.patch Please add according to https://docs.yoctoproject.org/contributor-guide/recipe-style-guide.html#patch-upstream-status . [patch-status]
...

---
 ...0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch | 2 ++
 ...-Tell-scons-to-use-build-settings-from-environment-va.patch | 2 ++
 ...-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch | 2 ++
 .../mongodb/0001-Use-long-long-instead-of-int64_t.patch        | 2 ++
 .../mongodb/0001-asio-Dont-use-experimental-with-clang.patch   | 2 ++
 .../mongodb/0001-free_mon-Include-missing-cstdint.patch        | 2 ++
 ...002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch | 2 ++
 .../mongodb/mongodb/0003-Fix-unknown-prefix-env.patch          | 2 ++
 .../mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch      | 2 ++
 .../meta-python/recipes-dbs/mongodb/mongodb/1296.patch         | 3 ++-
 .../recipes-dbs/mongodb/mongodb/arm64-support.patch            | 2 ++
 11 files changed, 22 insertions(+), 1 deletion(-)
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch +2 -0
index e636adc556..500e76bc2f 100644
@@ -13,6 +13,8 @@ typedef int   wchar_t;
 
 Signed-off-by: Khem Raj <[email protected]>
 Signed-off-by: Vincent Prince <[email protected]>
+
+Upstream-Status: Pending
 ---
  src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Tell-scons-to-use-build-settings-from-environment-va.patch +2 -0
index b8a325295d..4d84d3d15b 100644
@@ -6,6 +6,8 @@ Subject: [PATCH 01/10] Tell scons to use build settings from environment
 
 Signed-off-by: Sven Ebenfeld <[email protected]>
 Signed-off-by: Vincent Prince <[email protected]>
+
+Upstream-Status: Pending
 ---
  SConstruct | 8 ++++++--
  1 file changed, 6 insertions(+), 2 deletions(-)
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch +2 -0
index 8d82be1b57..cfbcbd9aa2 100644
@@ -5,6 +5,8 @@ Subject: [PATCH 03/10] Use __GLIBC__ to control use of gnu_get_libc_version
 
 Signed-off-by: Khem Raj <[email protected]>
 Signed-off-by: Vincent Prince <[email protected]>
+
+Upstream-Status: Pending
 ---
  src/mongo/util/processinfo_linux.cpp | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Use-long-long-instead-of-int64_t.patch +2 -0
index 958e09c3dc..310301d57b 100644
@@ -9,6 +9,8 @@ since this function expects long long as parameter and not int64_t
 
 Signed-off-by: Khem Raj <[email protected]>
 Signed-off-by: Vincent Prince <[email protected]>
+
+Upstream-Status: Pending
 ---
  src/mongo/util/procparser.cpp | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-asio-Dont-use-experimental-with-clang.patch +2 -0
index e726933f56..ad944e4666 100644
@@ -5,6 +5,8 @@ Subject: [PATCH 10/10] asio: Dont use experimental with clang
 
 Signed-off-by: Khem Raj <[email protected]>
 Signed-off-by: Vincent Prince <[email protected]>
+
+Upstream-Status: Pending
 ---
  src/third_party/asio-master/asio/include/asio/detail/string_view.hpp | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-free_mon-Include-missing-cstdint.patch +2 -0
index 1373d1a794..8cee14889f 100644
@@ -10,6 +10,8 @@ for uintXX_t.
 [1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
 
 Signed-off-by: Khem Raj <[email protected]>
+
+Upstream-Status: Pending
 ---
  src/mongo/db/free_mon/free_mon_options.h | 1 +
  1 file changed, 1 insertion(+)
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch +2 -0
index 57f4168f5a..d1e662f291 100644
@@ -7,6 +7,8 @@ It depends on the native arch's word size.
 
 Signed-off-by: Khem Raj <[email protected]>
 Signed-off-by: Vincent Prince <[email protected]>
+
+Upstream-Status: Pending
 ---
  src/mongo/util/stacktrace_posix.cpp | 9 +++++++++
  1 file changed, 9 insertions(+)
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0003-Fix-unknown-prefix-env.patch +2 -0
index 910ef0b5f4..d2ba6eb805 100644
@@ -1,3 +1,5 @@
+Upstream-Status: Pending
+
 Index: git/SConstruct
 ===================================================================
 --- git.orig/SConstruct
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0004-wiredtiger-Disable-strtouq-on-musl.patch +2 -0
index 2cea9bc31f..45051e103d 100644
@@ -4,6 +4,8 @@ Date: Sat, 2 Sep 2017 13:13:15 -0700
 Subject: [PATCH 09/10] wiredtiger: Disable strtouq on musl
 
 Signed-off-by: Khem Raj <[email protected]>
+
+Upstream-Status: Pending
 ---
  src/third_party/wiredtiger/build_linux/wiredtiger_config.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/1296.patch +2 -1
index e4ae30776b..9259f96be8 100644
@@ -1,4 +1,3 @@
-Upstream-Status: submitted https://github.com/mongodb/mongo/pull/1296
 From 362be06fc16a5ad0f9e9aa90cc763c5242e8e35c Mon Sep 17 00:00:00 2001
 From: Fabrice Fontaine <[email protected]>
 Date: Sat, 9 Feb 2019 12:41:45 +0100
@@ -14,6 +13,8 @@ src/mongo/util/net/ssl_manager.cpp: In static member function 'static mongo::Sta
 src/mongo/util/net/ssl_manager.cpp:575:79: error: invalid conversion from 'size_t* {aka unsigned int*}' to 'long unsigned int*' [-fpermissive]
   if (mongoUnsignedAddOverflow64(tagAndLengthByteCount, derLength, outLength) ||
 
+Upstream-Status: Submitted [https://github.com/mongodb/mongo/pull/1296]
+
 Signed-off-by: Fabrice Fontaine <[email protected]>
 Signed-off-by: Vincent Prince <[email protected]>
 ---
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/arm64-support.patch +2 -0
index 1a7bf0fc52..24b0ad58b6 100644
@@ -5,6 +5,8 @@ Subject: [PATCH 05/10] Add alises for arm64 which is same as aarch64
 
 Signed-off-by: Khem Raj <[email protected]>
 Signed-off-by: Vincent Prince <[email protected]>
+
+Upstream-Status: Pending
 ---
  SConstruct                                      | 1 +
  src/third_party/IntelRDFPMathLib20U1/SConscript | 2 +-
Signature · 1 line
2.42.0
#1 lore raw

PATCH 2/2 mongodb: Fix build on 32bit

---
 .../mongodb/0001-Fix-build-on-32bit.patch     | 38 +++++++++++++++++++
 .../recipes-dbs/mongodb/mongodb_git.bb        |  1 +
 2 files changed, 39 insertions(+)
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-build-on-32bit.patch
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-build-on-32bit.patch new file +38 -0
new file mode 100644
index 0000000000..4abc044151
@@ -0,0 +1,38 @@
+From b172ebe7e709b10338c1b260310dacc15c557cff Mon Sep 17 00:00:00 2001
+From: Martin Jansa <[email protected]>
+Date: Fri, 22 Sep 2023 15:37:29 +0200
+Subject: [PATCH] Fix build on 32bit
+
+* fixes:
+  src/mongo/util/net/http_client_curl.cpp: In function 'size_t mongo::{anonymous}::ReadMemoryCallback(char*, size_t, size_t, void*)':
+  src/mongo/util/net/http_client_curl.cpp:172:21: error: no matching function for call to 'min(size_t, long unsigned int)'
+    172 |             std::min(size * nitems, static_cast<unsigned long>(bufReader->remaining()));
+        |             ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* reported in:
+  https://jira.mongodb.org/browse/SERVER-73007
+  but will probably get closed like:
+  mongodb/0001-Fix-type-mismatch-on-32bit-arches.patch
+  submitted in:
+  https://jira.mongodb.org/browse/SERVER-74633
+  as they don't support 32bit builds
+
+Signed-off-by: Martin Jansa <[email protected]>
+Upstream-Status: Pending
+---
+ src/mongo/util/net/http_client_curl.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/mongo/util/net/http_client_curl.cpp b/src/mongo/util/net/http_client_curl.cpp
+index 57290d0f8ed..f251fe2a550 100644
+--- a/src/mongo/util/net/http_client_curl.cpp
++++ b/src/mongo/util/net/http_client_curl.cpp
+@@ -169,7 +169,7 @@ size_t ReadMemoryCallback(char* buffer, size_t size, size_t nitems, void* instre
+ 
+     if (bufReader->remaining() > 0) {
+         size_t readSize =
+-            std::min(size * nitems, static_cast<unsigned long>(bufReader->remaining()));
++            std::min(size * nitems, static_cast<size_t>(bufReader->remaining()));
+         auto buf = bufReader->readBytes(readSize);
+         memcpy(buffer, buf.rawData(), readSize);
+         ret = readSize;
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb +1 -0
index f1a508f3f2..037d58cf17 100644
@@ -35,6 +35,7 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \
            file://0001-free_mon-Include-missing-cstdint.patch \
            file://0001-apply-msvc-workaround-for-clang-16.patch \
            file://0001-Fix-type-mismatch-on-32bit-arches.patch \
+           file://0001-Fix-build-on-32bit.patch \
            "
 SRC_URI:append:libc-musl ="\
            file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \
Signature · 1 line
2.42.0
#2 lore raw

Re: [oe] [meta-oe][PATCH 2/2] mongodb: Fix build on 32bit

Quoted 22 lines · Martin Jansa
---
  .../mongodb/0001-Fix-build-on-32bit.patch     | 38 +++++++++++++++++++
  .../recipes-dbs/mongodb/mongodb_git.bb        |  1 +
  2 files changed, 39 insertions(+)

create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-build-on-32bit.patch

meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-build-on-32bit.patch new file +9 -0
new file mode 100644
index 0000000000..4abc044151
@@ -0,0 +1,38 @@
+From b172ebe7e709b10338c1b260310dacc15c557cff Mon Sep 17 00:00:00 2001
+From: Martin Jansa <[email protected]>
+Date: Fri, 22 Sep 2023 15:37:29 +0200
+Subject: [PATCH] Fix build on 32bit
+
+* fixes:
+  src/mongo/util/net/http_client_curl.cpp: In function 'size_t mongo::{anonymous}::ReadMemoryCallback(char*, size_t, size_t, void*)':
+  src/mongo/util/net/http_client_curl.cpp:172:21: error: no matching function for call to 'min(size_t, long unsigned int)'
+    172 |             std::min(size * nitems, static_cast<unsigned long>(bufReader->remaining()));

meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-build-on-32bit.patch line 19

Quoted 10 lines
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-build-on-32bit.patch new file +10 -0
+        |             ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* reported in:
+  https://jira.mongodb.org/browse/SERVER-73007
+  but will probably get closed like:
+  mongodb/0001-Fix-type-mismatch-on-32bit-arches.patch
+  submitted in:
+  https://jira.mongodb.org/browse/SERVER-74633
+  as they don't support 32bit builds
+

Thanks for taking care of it, I was seeing this failure on my CI for on x86 but had tabled it down in the long list of TODO, really appreciated.

Yeah, perhaps we should just disable it for all 32bit arches as well.

Quoted 42 lines
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb/0001-Fix-build-on-32bit.patch new file +19 -0
+Signed-off-by: Martin Jansa <[email protected]>
+Upstream-Status: Pending
+---
+ src/mongo/util/net/http_client_curl.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/mongo/util/net/http_client_curl.cpp b/src/mongo/util/net/http_client_curl.cpp
+index 57290d0f8ed..f251fe2a550 100644
+--- a/src/mongo/util/net/http_client_curl.cpp
++++ b/src/mongo/util/net/http_client_curl.cpp
+@@ -169,7 +169,7 @@ size_t ReadMemoryCallback(char* buffer, size_t size, size_t nitems, void* instre
+
+     if (bufReader->remaining() > 0) {
+         size_t readSize =
+-            std::min(size * nitems, static_cast<unsigned long>(bufReader->remaining()));
++            std::min(size * nitems, static_cast<size_t>(bufReader->remaining()));
+         auto buf = bufReader->readBytes(readSize);
+         memcpy(buffer, buf.rawData(), readSize);
+         ret = readSize;
meta-oe/dynamic-layers/meta-python/recipes-dbs/mongodb/mongodb_git.bb +1 -1
index f1a508f3f2..037d58cf17 100644
@@ -35,6 +35,7 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \
             file://0001-free_mon-Include-missing-cstdint.patch \
             file://0001-apply-msvc-workaround-for-clang-16.patch \
             file://0001-Fix-type-mismatch-on-32bit-arches.patch \
+           file://0001-Fix-build-on-32bit.patch \
             "
  SRC_URI:append:libc-musl ="\
             file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \
 
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#105070): https://lists.openembedded.org/g/openembedded-devel/message/105070
Mute This Topic: https://lists.openembedded.org/mt/101521811/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-