From c5b7678b4a2cc6a2659ac1637bf74ea7ff14c147 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 10 Feb 2019 15:26:19 +0100 Subject: package/mongodb: new package Here is the list of the changes compared to the removed mongodb 3.3.4 version: - Remove patch (not applicable anymore) - Add patch (sent upstream) to fix openssl build with gcc 7 and -fpermissive - Remove 32 bits x86 platforms, removed since version 3.4: https://docs.mongodb.com/manual/installation/#supported-platforms - Change license: since October 2018, license is SSPL: - https://www.mongodb.com/community/licensing - https://jira.mongodb.org/browse/SERVER-38767 - gcc must be at least 5.3 so add a dependency on gcc >= 6 - Add a dependency on host-python-xxx modules: https://github.com/mongodb/mongo/blob/r4.0.6/docs/building.md - Use system versions of boost, pcre, snappy, sqlite, yaml-cpp and zlib instead of embedded mongodb ones - Add hash for license files Signed-off-by: Fabrice Fontaine Tested-by: Adam Duskett Signed-off-by: Peter Korsgaard --- ....cpp-fix-build-with-gcc-7-and-fpermissive.patch | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 package/mongodb/0001-ssl_manager.cpp-fix-build-with-gcc-7-and-fpermissive.patch (limited to 'package/mongodb/0001-ssl_manager.cpp-fix-build-with-gcc-7-and-fpermissive.patch') diff --git a/package/mongodb/0001-ssl_manager.cpp-fix-build-with-gcc-7-and-fpermissive.patch b/package/mongodb/0001-ssl_manager.cpp-fix-build-with-gcc-7-and-fpermissive.patch new file mode 100644 index 0000000000..b4b1746682 --- /dev/null +++ b/package/mongodb/0001-ssl_manager.cpp-fix-build-with-gcc-7-and-fpermissive.patch @@ -0,0 +1,55 @@ +From 362be06fc16a5ad0f9e9aa90cc763c5242e8e35c Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 9 Feb 2019 12:41:45 +0100 +Subject: [PATCH] ssl_manager.cpp: fix build with gcc 7 and -fpermissive + +Change prototype of DERToken::parse function from +parse(ConstDataRange cdr, size_t* outLength); +to parse(ConstDataRange cdr, uint64_t* outLength); + +Otherwise, we got the following error: + +src/mongo/util/net/ssl_manager.cpp: In static member function 'static mongo::StatusWith mongo::{anonymous}::DERToken::parse(mongo::ConstDataRange, size_t*)': +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) || + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/mongodb/mongo/pull/1296] +--- + src/mongo/util/net/ssl_manager.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/mongo/util/net/ssl_manager.cpp b/src/mongo/util/net/ssl_manager.cpp +index b93ebe84a4..3511eb5d99 100644 +--- a/src/mongo/util/net/ssl_manager.cpp ++++ b/src/mongo/util/net/ssl_manager.cpp +@@ -782,7 +782,7 @@ public: + * + * Returns a DERToken which consists of the (tag, length, value) tuple. + */ +- static StatusWith parse(ConstDataRange cdr, size_t* outLength); ++ static StatusWith parse(ConstDataRange cdr, uint64_t* outLength); + + private: + DERType _type{DERType::EndOfContent}; +@@ -799,7 +799,7 @@ struct DataType::Handler { + size_t length, + size_t* advanced, + std::ptrdiff_t debug_offset) { +- size_t outLength; ++ uint64_t outLength; + + auto swPair = DERToken::parse(ConstDataRange(ptr, length), &outLength); + +@@ -844,7 +844,7 @@ StatusWith readDERString(ConstDataRangeCursor& cdc) { + } + + +-StatusWith DERToken::parse(ConstDataRange cdr, size_t* outLength) { ++StatusWith DERToken::parse(ConstDataRange cdr, uint64_t* outLength) { + const size_t kTagLength = 1; + const size_t kTagLengthAndInitialLengthByteLength = kTagLength + 1; + +-- +2.14.1 + -- cgit v1.2.3