Skip to contentSkip to conversation

Revert "package/mongodb: remove package"

PATCH New Fabrice Fontaine 3 participants 18 messages Feb 10, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/12 Revert "package/mongodb: remove package"

This reverts commit 13ccd7e7fef7a353151cd61cd3ecd6590dfb3ddf.

---
 Config.in.legacy                                   |  6 --
 DEVELOPERS                                         |  1 +
 package/Config.in                                  |  1 +
 .../0001-add-missing-sysmacros-include.patch       | 19 +++++++
 package/mongodb/Config.in                          | 30 ++++++++++
 package/mongodb/mongodb.hash                       |  2 +
 package/mongodb/mongodb.mk                         | 66 ++++++++++++++++++++++
 7 files changed, 119 insertions(+), 6 deletions(-)
 create mode 100644 package/mongodb/0001-add-missing-sysmacros-include.patch
 create mode 100644 package/mongodb/Config.in
 create mode 100644 package/mongodb/mongodb.hash
 create mode 100644 package/mongodb/mongodb.mk
Config.in.legacy +0 -6
index 80bab04448..25b48fba82 100644
@@ -207,12 +207,6 @@ config BR2_PACKAGE_GNURADIO_QTGUI
 	help
 	  The gr-qtgui option was removed.
 
-config BR2_PACKAGE_MONGODB
-	bool "mongodb package removed"
-	select BR2_LEGACY
-	help
-	  The mongodb package was removed.
-
 config BR2_PACKAGE_LUACRYPTO
 	bool "luacrypto package removed"
 	select BR2_LEGACY
DEVELOPERS +1 -0
index 4a19745852..9af02229bf 100644
@@ -1956,6 +1956,7 @@ F:	package/aoetools/
 F:	package/curlpp/
 F:	package/daq/
 F:	package/libgdiplus/
+F:	package/mongodb/
 F:	package/pimd/
 F:	package/snort/
 F:	package/stella/
package/Config.in +1 -0
index ad4fdb8bd0..783e5a55d2 100644
@@ -1214,6 +1214,7 @@ menu "Database"
 	source "package/leveldb/Config.in"
 	source "package/libgit2/Config.in"
 	source "package/libpqxx/Config.in"
+	source "package/mongodb/Config.in"
 	source "package/mysql/Config.in"
 	source "package/postgresql/Config.in"
 	source "package/redis/Config.in"
package/mongodb/0001-add-missing-sysmacros-include.patch new file +19 -0
new file mode 100644
index 0000000000..3a8bfa16c7
@@ -0,0 +1,19 @@
+Add missing <sys/sysmacros.h>
+
+mmap_v1_engine.cpp is using major()/minor(), which are defined by
+<sys/sysmacros.h>. This header file was implicitly included by
+<sys/types.h> in glibc < 2.28. But this glibc 2.28, this is no longer
+the case, so <sys/sysmacros.h> needs to be included explicitly.
+
+Signed-off-by: Florian La Roche <[email protected]>
+
+--- ./src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
++++ ./src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
+@@ -32,6 +32,7 @@
+ 
+ #include "mongo/db/storage/mmap_v1/mmap_v1_engine.h"
+ 
++#include <sys/sysmacros.h>
+ #include <boost/filesystem/path.hpp>
+ #include <boost/filesystem/operations.hpp>
+ #include <fstream>
package/mongodb/Config.in new file +30 -0
new file mode 100644
index 0000000000..ed3ad56916
@@ -0,0 +1,30 @@
+# from src/mongo/platform/bits.h
+config BR2_PACKAGE_MONGODB_ARCH_SUPPORTS
+	bool
+	# ARM needs LDREX/STREX, so ARMv6+
+	default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5
+	default y if BR2_aarch64 || BR2_i386 || BR2_powerpc64 || BR2_x86_64
+
+config BR2_PACKAGE_MONGODB
+	bool "mongodb"
+	depends on BR2_PACKAGE_MONGODB_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_USES_GLIBC # needs glibc malloc_usable_size
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	help
+	  MongoDB is a cross-platform document-oriented database
+	  (NoSQL).
+
+	  It uses JSON-like documents with dynamic schemas (BSON),
+	  making the integration of data in certain types of
+	  applications easier and faster.
+
+	  https://www.mongodb.org/
+
+comment "mongodb needs a glibc toolchain w/ wchar, threads, C++, gcc >= 4.8"
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+	depends on BR2_PACKAGE_MONGODB_ARCH_SUPPORTS
package/mongodb/mongodb.hash new file +2 -0
new file mode 100644
index 0000000000..b01ad53ab5
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256 4764945631bca4ac5c2b239e04e91db00e39716915204349170c37cb7897c564  mongodb-r3.3.4.tar.gz
package/mongodb/mongodb.mk new file +66 -0

66 lines not on this page · raw message

Signature · 1 line
2.14.1
#1 lore raw

PATCH 2/12 package/mongodb: add zlib mandatory dependency

Without this change, mongodb uses its own embedded version of zlib

---
 package/mongodb/Config.in  | 1 +
 package/mongodb/mongodb.mk | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
package/mongodb/Config.in +1 -0
index ed3ad56916..3748095a5b 100644
@@ -13,6 +13,7 @@ config BR2_PACKAGE_MONGODB
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	select BR2_PACKAGE_ZLIB
 	help
 	  MongoDB is a cross-platform document-oriented database
 	  (NoSQL).
package/mongodb/mongodb.mk +6 -2
index 54c904e51a..bcba6a40b3 100644
@@ -11,14 +11,18 @@ MONGODB_SITE = $(call github,mongodb,mongo,$(MONGODB_VERSION))
 MONGODB_LICENSE = AGPL-3.0, Apache-2.0
 MONGODB_LICENSE_FILES = GNU-AGPL-3.0.txt APACHE-2.0.txt
 
-MONGODB_DEPENDENCIES = host-scons
+MONGODB_DEPENDENCIES = \
+	host-scons \
+	zlib
 
 MONGODB_SCONS_TARGETS = mongod mongos
 
 MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \
 	-j"$(PARALLEL_JOBS)"
 
-MONGODB_SCONS_OPTS = --disable-warnings-as-errors
+MONGODB_SCONS_OPTS = \
+	--disable-warnings-as-errors \
+	--use-system-zlib
 
 # need to pass mongo version when not building from git repo
 MONGODB_SCONS_OPTS += MONGO_VERSION=$(MONGODB_VERSION_BASE)-
Signature · 1 line
2.14.1
#2 lore raw

PATCH 3/12 package/mongodb: add snappy mandatory dependency

In reply to Fabrice Fontaine

Without this change, mongodb uses its own embedded version of snappy

---
 package/mongodb/Config.in  | 1 +
 package/mongodb/mongodb.mk | 2 ++
 2 files changed, 3 insertions(+)
package/mongodb/Config.in +1 -0
index 3748095a5b..65cf4df53d 100644
@@ -13,6 +13,7 @@ config BR2_PACKAGE_MONGODB
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	select BR2_PACKAGE_SNAPPY
 	select BR2_PACKAGE_ZLIB
 	help
 	  MongoDB is a cross-platform document-oriented database
package/mongodb/mongodb.mk +2 -0
index bcba6a40b3..ce634dc0d8 100644
@@ -13,6 +13,7 @@ MONGODB_LICENSE_FILES = GNU-AGPL-3.0.txt APACHE-2.0.txt
 
 MONGODB_DEPENDENCIES = \
 	host-scons \
+	snappy \
 	zlib
 
 MONGODB_SCONS_TARGETS = mongod mongos
@@ -22,6 +23,7 @@ MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \
 
 MONGODB_SCONS_OPTS = \
 	--disable-warnings-as-errors \
+	--use-system-snappy \
 	--use-system-zlib
 
 # need to pass mongo version when not building from git repo
Signature · 1 line
2.14.1
#3 lore raw

PATCH 4/12 package/mongodb: add yaml-cpp mandatory dependency

In reply to Fabrice Fontaine

Without this change, mongodb uses its own embedded version of yaml-cpp

---
 package/mongodb/Config.in  | 1 +
 package/mongodb/mongodb.mk | 2 ++
 2 files changed, 3 insertions(+)
package/mongodb/Config.in +1 -0
index 65cf4df53d..2eaa9e908c 100644
@@ -14,6 +14,7 @@ config BR2_PACKAGE_MONGODB
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
 	select BR2_PACKAGE_SNAPPY
+	select BR2_PACKAGE_YAML_CPP
 	select BR2_PACKAGE_ZLIB
 	help
 	  MongoDB is a cross-platform document-oriented database
package/mongodb/mongodb.mk +2 -0
index ce634dc0d8..07b854842f 100644
@@ -14,6 +14,7 @@ MONGODB_LICENSE_FILES = GNU-AGPL-3.0.txt APACHE-2.0.txt
 MONGODB_DEPENDENCIES = \
 	host-scons \
 	snappy \
+	yaml-cpp \
 	zlib
 
 MONGODB_SCONS_TARGETS = mongod mongos
@@ -24,6 +25,7 @@ MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \
 MONGODB_SCONS_OPTS = \
 	--disable-warnings-as-errors \
 	--use-system-snappy \
+	--use-system-yaml \
 	--use-system-zlib
 
 # need to pass mongo version when not building from git repo
Signature · 1 line
2.14.1
#4 lore raw

PATCH 5/12 package/libyaml: add host variant

In reply to Fabrice Fontaine

host-libyaml is needed for host-python-pyyaml

---
 package/libyaml/libyaml.mk | 1 +
 1 file changed, 1 insertion(+)
package/libyaml/libyaml.mk +1 -0
index 26e318736c..dc7368a168 100644
@@ -12,3 +12,4 @@ LIBYAML_LICENSE = MIT
 LIBYAML_LICENSE_FILES = LICENSE
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.14.1
#5 lore raw

PATCH 6/12 package/python-pyyaml: add host variant

In reply to Fabrice Fontaine

host-python-pyyaml is needed for mongodb 4.1.7

---
 package/python-pyyaml/python-pyyaml.mk | 2 ++
 1 file changed, 2 insertions(+)
package/python-pyyaml/python-pyyaml.mk +2 -0
index 95f0f0bb9e..961a3135db 100644
@@ -11,5 +11,7 @@ PYTHON_PYYAML_SETUP_TYPE = distutils
 PYTHON_PYYAML_LICENSE = MIT
 PYTHON_PYYAML_LICENSE_FILES = LICENSE
 PYTHON_PYYAML_DEPENDENCIES = libyaml
+HOST_PYTHON_DEPENDENCIES = host-libyaml
 
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 1 line
2.14.1
#6 lore raw

PATCH 7/12 package/python-typing: add host variant

In reply to Fabrice Fontaine

host-python-typing is needed for mongodb 4.1.7

---
 package/python-typing/python-typing.mk | 1 +
 1 file changed, 1 insertion(+)
package/python-typing/python-typing.mk +1 -0
index acb5316129..663227dfc9 100644
@@ -12,3 +12,4 @@ PYTHON_TYPING_LICENSE = Python-2.0, others
 PYTHON_TYPING_LICENSE_FILES = LICENSE
 
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 1 line
2.14.1
#7 lore raw

PATCH 8/12 package/mongodb: bump to version 4.0.6

In reply to Fabrice Fontaine

- 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
- Add hash for license files

---
 .../0001-add-missing-sysmacros-include.patch       | 19 --------
 ....cpp-fix-build-with-gcc-7-and-fpermissive.patch | 55 ++++++++++++++++++++++
 package/mongodb/Config.in                          | 10 ++--
 package/mongodb/mongodb.hash                       |  4 +-
 package/mongodb/mongodb.mk                         | 14 ++++--
 5 files changed, 73 insertions(+), 29 deletions(-)
 delete mode 100644 package/mongodb/0001-add-missing-sysmacros-include.patch
 create mode 100644 package/mongodb/0001-ssl_manager.cpp-fix-build-with-gcc-7-and-fpermissive.patch
package/mongodb/0001-add-missing-sysmacros-include.patch deleted +0 -19
deleted file mode 100644
index 3a8bfa16c7..0000000000
@@ -1,19 +0,0 @@
-Add missing <sys/sysmacros.h>
-
-mmap_v1_engine.cpp is using major()/minor(), which are defined by
-<sys/sysmacros.h>. This header file was implicitly included by
-<sys/types.h> in glibc < 2.28. But this glibc 2.28, this is no longer
-the case, so <sys/sysmacros.h> needs to be included explicitly.
-
-Signed-off-by: Florian La Roche <[email protected]>
-
---- ./src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
-+++ ./src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
-@@ -32,6 +32,7 @@
- 
- #include "mongo/db/storage/mmap_v1/mmap_v1_engine.h"
- 
-+#include <sys/sysmacros.h>
- #include <boost/filesystem/path.hpp>
- #include <boost/filesystem/operations.hpp>
- #include <fstream>
package/mongodb/0001-ssl_manager.cpp-fix-build-with-gcc-7-and-fpermissive.patch new file +55 -0

55 lines not on this page · raw message

package/mongodb/Config.in +5 -5
index 2eaa9e908c..8bfbe0168c 100644
@@ -1,9 +1,9 @@
-# from src/mongo/platform/bits.h
+# from https://docs.mongodb.com/manual/installation/#supported-platforms
 config BR2_PACKAGE_MONGODB_ARCH_SUPPORTS
 	bool
 	# ARM needs LDREX/STREX, so ARMv6+
 	default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5
-	default y if BR2_aarch64 || BR2_i386 || BR2_powerpc64 || BR2_x86_64
+	default y if BR2_aarch64 || BR2_powerpc64 || BR2_x86_64
 
 config BR2_PACKAGE_MONGODB
 	bool "mongodb"
@@ -12,7 +12,7 @@ config BR2_PACKAGE_MONGODB
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_6
 	select BR2_PACKAGE_SNAPPY
 	select BR2_PACKAGE_YAML_CPP
 	select BR2_PACKAGE_ZLIB
@@ -26,8 +26,8 @@ config BR2_PACKAGE_MONGODB
 
 	  https://www.mongodb.org/
 
-comment "mongodb needs a glibc toolchain w/ wchar, threads, C++, gcc >= 4.8"
+comment "mongodb needs a glibc toolchain w/ wchar, threads, C++, gcc >= 6"
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
 		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC || \
-		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_6
 	depends on BR2_PACKAGE_MONGODB_ARCH_SUPPORTS
package/mongodb/mongodb.hash +3 -1
index b01ad53ab5..916323d7c1 100644
@@ -1,2 +1,4 @@
 # Locally computed:
-sha256 4764945631bca4ac5c2b239e04e91db00e39716915204349170c37cb7897c564  mongodb-r3.3.4.tar.gz
+sha256 5db85f06b2a0b2ae393339a4aed1366928aaef2b46c7c32826fa87c3217dc6f7  mongodb-r4.0.6.tar.gz
+sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  APACHE-2.0.txt
+sha256 09d99ca61eb07873d5334077acba22c33e7f7d0a9fa08c92734e0ac8430d6e27  LICENSE-Community.txt
package/mongodb/mongodb.mk +10 -4
index 07b854842f..8679641c5d 100644
@@ -4,14 +4,17 @@
 #
 ################################################################################
 
-MONGODB_VERSION_BASE = 3.3.4
+MONGODB_VERSION_BASE = 4.0.6
 MONGODB_VERSION = r$(MONGODB_VERSION_BASE)
 MONGODB_SITE = $(call github,mongodb,mongo,$(MONGODB_VERSION))
 
-MONGODB_LICENSE = AGPL-3.0, Apache-2.0
-MONGODB_LICENSE_FILES = GNU-AGPL-3.0.txt APACHE-2.0.txt
+MONGODB_LICENSE = Apache-2.0 (drivers), SSPL (database)
+MONGODB_LICENSE_FILES = APACHE-2.0.txt LICENSE-Community.txt
 
 MONGODB_DEPENDENCIES = \
+	host-python-cheetah \
+	host-python-pyyaml \
+	host-python-typing \
 	host-scons \
 	snappy \
 	yaml-cpp \
@@ -24,6 +27,7 @@ MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \
 
 MONGODB_SCONS_OPTS = \
 	--disable-warnings-as-errors \
+	--enable-free-mon=off \
 	--use-system-snappy \
 	--use-system-yaml \
 	--use-system-zlib
@@ -51,7 +55,9 @@ endif
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 MONGODB_DEPENDENCIES += openssl
-MONGODB_SCONS_OPTS += --ssl=SSL
+MONGODB_SCONS_OPTS += \
+	--ssl \
+	--ssl-provider=openssl
 endif
 
 define MONGODB_BUILD_CMDS
Signature · 1 line
2.14.1
#8 lore raw

PATCH 8/12 package/mongodb: bump to version 4.0.6

Fabrice, All,

On 2019-02-10 12:45 +0100, Fabrice Fontaine spake thusly:

Quoted 4 lines

- 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:

Quoted 8 lines

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
- Add hash for license files

I haven't looked into the patch series in details, but here are my preliminary comments.

- I think you should just introduce mongodb-4 without first reverting

    and trying to fix the previously-dropped 3.3.4;

- don;t introduce mandatory dependencies (boost et al.) as separate patches, otherwise the state of the tree is inconsistent.

I think your series should just look like:

[1/5] package/libyaml: add host variant
[2/5] package/python-pyyaml: add host variant [3/5] package/python-typing: add host variant [4/5] package/mongodb: new package
[5/5] package/mongodb: add libcurl optional dependency

(and the optional libcurl support could very well be added just in patch 4, as it is not too complex.)

Regards,
Yann E. MORIN.

Quoted 194 lines
---
 .../0001-add-missing-sysmacros-include.patch       | 19 --------
 ....cpp-fix-build-with-gcc-7-and-fpermissive.patch | 55 ++++++++++++++++++++++
 package/mongodb/Config.in                          | 10 ++--
 package/mongodb/mongodb.hash                       |  4 +-
 package/mongodb/mongodb.mk                         | 14 ++++--
 5 files changed, 73 insertions(+), 29 deletions(-)
 delete mode 100644 package/mongodb/0001-add-missing-sysmacros-include.patch
 create mode 100644 package/mongodb/0001-ssl_manager.cpp-fix-build-with-gcc-7-and-fpermissive.patch
package/mongodb/0001-add-missing-sysmacros-include.patch deleted +0 -19
deleted file mode 100644
index 3a8bfa16c7..0000000000
@@ -1,19 +0,0 @@
-Add missing <sys/sysmacros.h>
-
-mmap_v1_engine.cpp is using major()/minor(), which are defined by
-<sys/sysmacros.h>. This header file was implicitly included by
-<sys/types.h> in glibc < 2.28. But this glibc 2.28, this is no longer
-the case, so <sys/sysmacros.h> needs to be included explicitly.
-
-Signed-off-by: Florian La Roche <[email protected]>
-
---- ./src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
-+++ ./src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
-@@ -32,6 +32,7 @@
- 
- #include "mongo/db/storage/mmap_v1/mmap_v1_engine.h"
- 
-+#include <sys/sysmacros.h>
- #include <boost/filesystem/path.hpp>
- #include <boost/filesystem/operations.hpp>
- #include <fstream>
package/mongodb/0001-ssl_manager.cpp-fix-build-with-gcc-7-and-fpermissive.patch new file +55 -0
new file mode 100644
index 0000000000..b4b1746682
@@ -0,0 +1,55 @@
+From 362be06fc16a5ad0f9e9aa90cc763c5242e8e35c Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+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> 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 <[email protected]>
+[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<DERToken> parse(ConstDataRange cdr, size_t* outLength);
++    static StatusWith<DERToken> parse(ConstDataRange cdr, uint64_t* outLength);
+ 
+ private:
+     DERType _type{DERType::EndOfContent};
+@@ -799,7 +799,7 @@ struct DataType::Handler<DERToken> {
+                        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<std::string> readDERString(ConstDataRangeCursor& cdc) {
+ }
+ 
+ 
+-StatusWith<DERToken> DERToken::parse(ConstDataRange cdr, size_t* outLength) {
++StatusWith<DERToken> DERToken::parse(ConstDataRange cdr, uint64_t* outLength) {
+     const size_t kTagLength = 1;
+     const size_t kTagLengthAndInitialLengthByteLength = kTagLength + 1;
+ 
+-- 
+2.14.1
+
package/mongodb/Config.in +5 -5
index 2eaa9e908c..8bfbe0168c 100644
@@ -1,9 +1,9 @@
-# from src/mongo/platform/bits.h
+# from https://docs.mongodb.com/manual/installation/#supported-platforms
 config BR2_PACKAGE_MONGODB_ARCH_SUPPORTS
 	bool
 	# ARM needs LDREX/STREX, so ARMv6+
 	default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5
-	default y if BR2_aarch64 || BR2_i386 || BR2_powerpc64 || BR2_x86_64
+	default y if BR2_aarch64 || BR2_powerpc64 || BR2_x86_64
 
 config BR2_PACKAGE_MONGODB
 	bool "mongodb"
@@ -12,7 +12,7 @@ config BR2_PACKAGE_MONGODB
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_6
 	select BR2_PACKAGE_SNAPPY
 	select BR2_PACKAGE_YAML_CPP
 	select BR2_PACKAGE_ZLIB
@@ -26,8 +26,8 @@ config BR2_PACKAGE_MONGODB
 
 	  https://www.mongodb.org/
 
-comment "mongodb needs a glibc toolchain w/ wchar, threads, C++, gcc >= 4.8"
+comment "mongodb needs a glibc toolchain w/ wchar, threads, C++, gcc >= 6"
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
 		!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC || \
-		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_6
 	depends on BR2_PACKAGE_MONGODB_ARCH_SUPPORTS
package/mongodb/mongodb.hash +3 -1
index b01ad53ab5..916323d7c1 100644
@@ -1,2 +1,4 @@
 # Locally computed:
-sha256 4764945631bca4ac5c2b239e04e91db00e39716915204349170c37cb7897c564  mongodb-r3.3.4.tar.gz
+sha256 5db85f06b2a0b2ae393339a4aed1366928aaef2b46c7c32826fa87c3217dc6f7  mongodb-r4.0.6.tar.gz
+sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  APACHE-2.0.txt
+sha256 09d99ca61eb07873d5334077acba22c33e7f7d0a9fa08c92734e0ac8430d6e27  LICENSE-Community.txt
package/mongodb/mongodb.mk +10 -4
index 07b854842f..8679641c5d 100644
@@ -4,14 +4,17 @@
 #
 ################################################################################
 
-MONGODB_VERSION_BASE = 3.3.4
+MONGODB_VERSION_BASE = 4.0.6
 MONGODB_VERSION = r$(MONGODB_VERSION_BASE)
 MONGODB_SITE = $(call github,mongodb,mongo,$(MONGODB_VERSION))
 
-MONGODB_LICENSE = AGPL-3.0, Apache-2.0
-MONGODB_LICENSE_FILES = GNU-AGPL-3.0.txt APACHE-2.0.txt
+MONGODB_LICENSE = Apache-2.0 (drivers), SSPL (database)
+MONGODB_LICENSE_FILES = APACHE-2.0.txt LICENSE-Community.txt
 
 MONGODB_DEPENDENCIES = \
+	host-python-cheetah \
+	host-python-pyyaml \
+	host-python-typing \
 	host-scons \
 	snappy \
 	yaml-cpp \
@@ -24,6 +27,7 @@ MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \
 
 MONGODB_SCONS_OPTS = \
 	--disable-warnings-as-errors \
+	--enable-free-mon=off \
 	--use-system-snappy \
 	--use-system-yaml \
 	--use-system-zlib
@@ -51,7 +55,9 @@ endif
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 MONGODB_DEPENDENCIES += openssl
-MONGODB_SCONS_OPTS += --ssl=SSL
+MONGODB_SCONS_OPTS += \
+	--ssl \
+	--ssl-provider=openssl
 endif
 
 define MONGODB_BUILD_CMDS
Signature · 6 lines
2.14.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#9 lore raw

PATCH 9/12 package/mongodb: add boost mandatory dependency

In reply to Fabrice Fontaine
---
 package/mongodb/Config.in  | 5 +++++
 package/mongodb/mongodb.mk | 2 ++
 2 files changed, 7 insertions(+)
package/mongodb/Config.in +5 -0
index 8bfbe0168c..c45e1e38c5 100644
@@ -13,6 +13,11 @@ config BR2_PACKAGE_MONGODB
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_6
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_FILESYSTEM
+	select BR2_PACKAGE_BOOST_IOSTREAMS
+	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+	select BR2_PACKAGE_BOOST_SYSTEM
 	select BR2_PACKAGE_SNAPPY
 	select BR2_PACKAGE_YAML_CPP
 	select BR2_PACKAGE_ZLIB
package/mongodb/mongodb.mk +2 -0
index 8679641c5d..3525306145 100644
@@ -12,6 +12,7 @@ MONGODB_LICENSE = Apache-2.0 (drivers), SSPL (database)
 MONGODB_LICENSE_FILES = APACHE-2.0.txt LICENSE-Community.txt
 
 MONGODB_DEPENDENCIES = \
+	boost \
 	host-python-cheetah \
 	host-python-pyyaml \
 	host-python-typing \
@@ -28,6 +29,7 @@ MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \
 MONGODB_SCONS_OPTS = \
 	--disable-warnings-as-errors \
 	--enable-free-mon=off \
+	--use-system-boost \
 	--use-system-snappy \
 	--use-system-yaml \
 	--use-system-zlib
Signature · 1 line
2.14.1
#10 lore raw

PATCH 9/12 package/mongodb: add boost mandatory dependency

Hello Fabrice,

Quoted 1 line · On Sun, 10 Feb 2019 12:45:25 +0100 Fabrice Fontaine…

I don't understand PATCH 9/12, 10/12 and 11/12. If those are mandatory dependencies, mongodb will not build after PATCH 8/12 is applied.

Could you make sure this patch series is bisectable ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#11 lore raw

PATCH 9/12 package/mongodb: add boost mandatory dependency

Dear Thomas,

Le dim. 10 f?vr. 2019 ? 14:06, Thomas Petazzoni
<[email protected]> a ?crit :

Quoted 10 lines

Hello Fabrice,

Quoted 1 line · On Sun, 10 Feb 2019 12:45:25 +0100 Fabrice Fontaine…

I don't understand PATCH 9/12, 10/12 and 11/12. If those are mandatory dependencies, mongodb will not build after PATCH 8/12 is applied.

mongodb will build after patch 8/12 because it embeds all its external dependencies in src/third_party. Path 9 to 12 enable the system libraries instead of the embededded ones.

However, as suggested by Yann in a separate email, I'll create a mongodb-4 package and put all the mongodb related changes in a single "new mongodb-4 package" patch.

Quoted 10 lines

Could you make sure this patch series is bisectable ?

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Best Regards,

Fabrice

#12 lore raw

PATCH 9/12 package/mongodb: add boost mandatory dependency

Fabrice,

Quoted 5 lines · On Sun, 10 Feb 2019 14:22:39 +0100 Fabrice Fontaine…
Quoted 2 lines

I don't understand PATCH 9/12, 10/12 and 11/12. If those are mandatory dependencies, mongodb will not build after PATCH 8/12 is applied.

mongodb will build after patch 8/12 because it embeds all its external dependencies in src/third_party. Path 9 to 12 enable the system libraries instead of the embededded ones.

OK.

Quoted 3 lines

However, as suggested by Yann in a separate email, I'll create a mongodb-4 package and put all the mongodb related changes in a single "new mongodb-4 package" patch.

Why should it be named mongodb-4 and not just mongodb, since we're anyway no longer going to have a mongodb package that provides the 3.x version ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#13 lore raw

PATCH 9/12 package/mongodb: add boost mandatory dependency

Thomas, All,

On 2019-02-10 14:33 +0100, Thomas Petazzoni spake thusly:

Quoted 11 lines
Quoted 5 lines · On Sun, 10 Feb 2019 14:22:39 +0100 Fabrice Fontaine…
Quoted 2 lines

I don't understand PATCH 9/12, 10/12 and 11/12. If those are mandatory dependencies, mongodb will not build after PATCH 8/12 is applied.

mongodb will build after patch 8/12 because it embeds all its external dependencies in src/third_party. Path 9 to 12 enable the system libraries instead of the embededded ones.

OK.

Quoted 7 lines
Quoted 3 lines

However, as suggested by Yann in a separate email, I'll create a mongodb-4 package and put all the mongodb related changes in a single "new mongodb-4 package" patch.

Why should it be named mongodb-4 and not just mongodb, since we're anyway no longer going to have a mongodb package that provides the 3.x version ?

Right, I just used 'mongodb-4' as a way to identify that it was mongodb 4.x I was talking about. The package should indeed be named 'mongodb'.

Sorry for the confusion.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#14 lore raw

PATCH 10/12 package/mongodb: add pcre mandatory dependency

In reply to Fabrice Fontaine
---
 package/mongodb/Config.in  | 1 +
 package/mongodb/mongodb.mk | 2 ++
 2 files changed, 3 insertions(+)
package/mongodb/Config.in +1 -0
index c45e1e38c5..95a303af64 100644
@@ -18,6 +18,7 @@ config BR2_PACKAGE_MONGODB
 	select BR2_PACKAGE_BOOST_IOSTREAMS
 	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
 	select BR2_PACKAGE_BOOST_SYSTEM
+	select BR2_PACKAGE_PCRE
 	select BR2_PACKAGE_SNAPPY
 	select BR2_PACKAGE_YAML_CPP
 	select BR2_PACKAGE_ZLIB
package/mongodb/mongodb.mk +2 -0
index 3525306145..a9f48e9715 100644
@@ -17,6 +17,7 @@ MONGODB_DEPENDENCIES = \
 	host-python-pyyaml \
 	host-python-typing \
 	host-scons \
+	pcre \
 	snappy \
 	yaml-cpp \
 	zlib
@@ -30,6 +31,7 @@ MONGODB_SCONS_OPTS = \
 	--disable-warnings-as-errors \
 	--enable-free-mon=off \
 	--use-system-boost \
+	--use-system-pcre \
 	--use-system-snappy \
 	--use-system-yaml \
 	--use-system-zlib
Signature · 1 line
2.14.1
#15 lore raw

PATCH 11/12 package/mongodb: add sqlite mandatory dependency

In reply to Fabrice Fontaine
---
 package/mongodb/Config.in  | 1 +
 package/mongodb/mongodb.mk | 2 ++
 2 files changed, 3 insertions(+)
package/mongodb/Config.in +1 -0
index 95a303af64..969b8e062f 100644
@@ -20,6 +20,7 @@ config BR2_PACKAGE_MONGODB
 	select BR2_PACKAGE_BOOST_SYSTEM
 	select BR2_PACKAGE_PCRE
 	select BR2_PACKAGE_SNAPPY
+	select BR2_PACKAGE_SQLITE
 	select BR2_PACKAGE_YAML_CPP
 	select BR2_PACKAGE_ZLIB
 	help
package/mongodb/mongodb.mk +2 -0
index a9f48e9715..b63010426d 100644
@@ -19,6 +19,7 @@ MONGODB_DEPENDENCIES = \
 	host-scons \
 	pcre \
 	snappy \
+	sqlite \
 	yaml-cpp \
 	zlib
 
@@ -33,6 +34,7 @@ MONGODB_SCONS_OPTS = \
 	--use-system-boost \
 	--use-system-pcre \
 	--use-system-snappy \
+	--use-system-sqlite \
 	--use-system-yaml \
 	--use-system-zlib
 
Signature · 1 line
2.14.1
#16 lore raw

PATCH 12/12 package/mongodb: add libcurl optional dependency

In reply to Fabrice Fontaine
---
 package/mongodb/mongodb.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
package/mongodb/mongodb.mk +7 -1
index b63010426d..e420ecb41d 100644
@@ -30,7 +30,6 @@ MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \
 
 MONGODB_SCONS_OPTS = \
 	--disable-warnings-as-errors \
-	--enable-free-mon=off \
 	--use-system-boost \
 	--use-system-pcre \
 	--use-system-snappy \
@@ -59,6 +58,13 @@ else
 MONGODB_SCONS_OPTS += --js-engine=none --allocator=system
 endif
 
+ifeq ($(BR2_PACKAGE_LIBCURL),y)
+MONGODB_DEPENDENCIES += libcurl
+MONGODB_SCONS_OPTS += --enable-free-mon=on
+else
+MONGODB_SCONS_OPTS += --enable-free-mon=off
+endif
+
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 MONGODB_DEPENDENCIES += openssl
 MONGODB_SCONS_OPTS += \
Signature · 1 line
2.14.1
#17 lore raw

PATCH 1/12 Revert "package/mongodb: remove package"

In reply to Fabrice Fontaine
Quoted 3 lines · On Sun, 10 Feb 2019 12:45:17 +0100 Fabrice Fontaine…

This reverts commit 13ccd7e7fef7a353151cd61cd3ecd6590dfb3ddf.

If we apply just this commit, we re-introduce the build failure with OpenSSL 1.1, which was the reason for dropping mongodb in the first place.

Bestregards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com