All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package"
@ 2019-02-10 11:45 Fabrice Fontaine
  2019-02-10 11:45 ` [Buildroot] [PATCH 2/12] package/mongodb: add zlib mandatory dependency Fabrice Fontaine
                   ` (11 more replies)
  0 siblings, 12 replies; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 11:45 UTC (permalink / raw)
  To: buildroot

This reverts commit 13ccd7e7fef7a353151cd61cd3ecd6590dfb3ddf.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 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

diff --git a/Config.in.legacy b/Config.in.legacy
index 80bab04448..25b48fba82 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -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
diff --git a/DEVELOPERS b/DEVELOPERS
index 4a19745852..9af02229bf 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -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/
diff --git a/package/Config.in b/package/Config.in
index ad4fdb8bd0..783e5a55d2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/mongodb/0001-add-missing-sysmacros-include.patch b/package/mongodb/0001-add-missing-sysmacros-include.patch
new file mode 100644
index 0000000000..3a8bfa16c7
--- /dev/null
+++ b/package/mongodb/0001-add-missing-sysmacros-include.patch
@@ -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 <F.LaRoche@pilz.de>
+
+--- ./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>
diff --git a/package/mongodb/Config.in b/package/mongodb/Config.in
new file mode 100644
index 0000000000..ed3ad56916
--- /dev/null
+++ b/package/mongodb/Config.in
@@ -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
diff --git a/package/mongodb/mongodb.hash b/package/mongodb/mongodb.hash
new file mode 100644
index 0000000000..b01ad53ab5
--- /dev/null
+++ b/package/mongodb/mongodb.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256 4764945631bca4ac5c2b239e04e91db00e39716915204349170c37cb7897c564  mongodb-r3.3.4.tar.gz
diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk
new file mode 100644
index 0000000000..54c904e51a
--- /dev/null
+++ b/package/mongodb/mongodb.mk
@@ -0,0 +1,66 @@
+################################################################################
+#
+# mongodb
+#
+################################################################################
+
+MONGODB_VERSION_BASE = 3.3.4
+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_DEPENDENCIES = host-scons
+
+MONGODB_SCONS_TARGETS = mongod mongos
+
+MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \
+	-j"$(PARALLEL_JOBS)"
+
+MONGODB_SCONS_OPTS = --disable-warnings-as-errors
+
+# need to pass mongo version when not building from git repo
+MONGODB_SCONS_OPTS += MONGO_VERSION=$(MONGODB_VERSION_BASE)-
+
+# WiredTiger database storage engine only supported on 64 bits
+ifeq ($(BR2_ARCH_IS_64),y)
+MONGODB_SCONS_OPTS += --wiredtiger=on
+else
+MONGODB_SCONS_OPTS += --wiredtiger=off
+endif
+
+# JavaScript scripting engine and tcmalloc supported only on
+# x86/x86-64 systems. Mongo target is a shell interface that
+# depends on the javascript engine, so it will also only be
+# built on x86/x86-64 systems.
+ifeq ($(BR2_i386)$(BR2_x86_64),y)
+MONGODB_SCONS_OPTS += --js-engine=mozjs --allocator=tcmalloc
+MONGODB_SCONS_TARGETS += mongo
+else
+MONGODB_SCONS_OPTS += --js-engine=none --allocator=system
+endif
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+MONGODB_DEPENDENCIES += openssl
+MONGODB_SCONS_OPTS += --ssl=SSL
+endif
+
+define MONGODB_BUILD_CMDS
+	(cd $(@D); \
+		$(SCONS) \
+		$(MONGODB_SCONS_ENV) \
+		$(MONGODB_SCONS_OPTS) \
+		$(MONGODB_SCONS_TARGETS))
+endef
+
+define MONGODB_INSTALL_TARGET_CMDS
+	(cd $(@D); \
+		$(SCONS) \
+		$(MONGODB_SCONS_ENV) \
+		$(MONGODB_SCONS_OPTS) \
+		--prefix=$(TARGET_DIR)/usr \
+		install)
+endef
+
+$(eval $(generic-package))
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 2/12] package/mongodb: add zlib mandatory dependency
  2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
@ 2019-02-10 11:45 ` Fabrice Fontaine
  2019-02-10 11:45 ` [Buildroot] [PATCH 3/12] package/mongodb: add snappy " Fabrice Fontaine
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 11:45 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/mongodb/Config.in  | 1 +
 package/mongodb/mongodb.mk | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/package/mongodb/Config.in b/package/mongodb/Config.in
index ed3ad56916..3748095a5b 100644
--- a/package/mongodb/Config.in
+++ b/package/mongodb/Config.in
@@ -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).
diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk
index 54c904e51a..bcba6a40b3 100644
--- a/package/mongodb/mongodb.mk
+++ b/package/mongodb/mongodb.mk
@@ -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)-
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 3/12] package/mongodb: add snappy mandatory dependency
  2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
  2019-02-10 11:45 ` [Buildroot] [PATCH 2/12] package/mongodb: add zlib mandatory dependency Fabrice Fontaine
@ 2019-02-10 11:45 ` Fabrice Fontaine
  2019-02-10 11:45 ` [Buildroot] [PATCH 4/12] package/mongodb: add yaml-cpp " Fabrice Fontaine
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 11:45 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/mongodb/Config.in  | 1 +
 package/mongodb/mongodb.mk | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/package/mongodb/Config.in b/package/mongodb/Config.in
index 3748095a5b..65cf4df53d 100644
--- a/package/mongodb/Config.in
+++ b/package/mongodb/Config.in
@@ -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
diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk
index bcba6a40b3..ce634dc0d8 100644
--- a/package/mongodb/mongodb.mk
+++ b/package/mongodb/mongodb.mk
@@ -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
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 4/12] package/mongodb: add yaml-cpp mandatory dependency
  2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
  2019-02-10 11:45 ` [Buildroot] [PATCH 2/12] package/mongodb: add zlib mandatory dependency Fabrice Fontaine
  2019-02-10 11:45 ` [Buildroot] [PATCH 3/12] package/mongodb: add snappy " Fabrice Fontaine
@ 2019-02-10 11:45 ` Fabrice Fontaine
  2019-02-10 11:45 ` [Buildroot] [PATCH 5/12] package/libyaml: add host variant Fabrice Fontaine
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 11:45 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/mongodb/Config.in  | 1 +
 package/mongodb/mongodb.mk | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/package/mongodb/Config.in b/package/mongodb/Config.in
index 65cf4df53d..2eaa9e908c 100644
--- a/package/mongodb/Config.in
+++ b/package/mongodb/Config.in
@@ -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
diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk
index ce634dc0d8..07b854842f 100644
--- a/package/mongodb/mongodb.mk
+++ b/package/mongodb/mongodb.mk
@@ -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
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 5/12] package/libyaml: add host variant
  2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
                   ` (2 preceding siblings ...)
  2019-02-10 11:45 ` [Buildroot] [PATCH 4/12] package/mongodb: add yaml-cpp " Fabrice Fontaine
@ 2019-02-10 11:45 ` Fabrice Fontaine
  2019-02-10 11:45 ` [Buildroot] [PATCH 6/12] package/python-pyyaml: " Fabrice Fontaine
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 11:45 UTC (permalink / raw)
  To: buildroot

host-libyaml is needed for host-python-pyyaml

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libyaml/libyaml.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/libyaml/libyaml.mk b/package/libyaml/libyaml.mk
index 26e318736c..dc7368a168 100644
--- a/package/libyaml/libyaml.mk
+++ b/package/libyaml/libyaml.mk
@@ -12,3 +12,4 @@ LIBYAML_LICENSE = MIT
 LIBYAML_LICENSE_FILES = LICENSE
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 6/12] package/python-pyyaml: add host variant
  2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
                   ` (3 preceding siblings ...)
  2019-02-10 11:45 ` [Buildroot] [PATCH 5/12] package/libyaml: add host variant Fabrice Fontaine
@ 2019-02-10 11:45 ` Fabrice Fontaine
  2019-02-10 11:45 ` [Buildroot] [PATCH 7/12] package/python-typing: " Fabrice Fontaine
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 11:45 UTC (permalink / raw)
  To: buildroot

host-python-pyyaml is needed for mongodb 4.1.7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/python-pyyaml/python-pyyaml.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/python-pyyaml/python-pyyaml.mk b/package/python-pyyaml/python-pyyaml.mk
index 95f0f0bb9e..961a3135db 100644
--- a/package/python-pyyaml/python-pyyaml.mk
+++ b/package/python-pyyaml/python-pyyaml.mk
@@ -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))
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 7/12] package/python-typing: add host variant
  2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
                   ` (4 preceding siblings ...)
  2019-02-10 11:45 ` [Buildroot] [PATCH 6/12] package/python-pyyaml: " Fabrice Fontaine
@ 2019-02-10 11:45 ` Fabrice Fontaine
  2019-02-10 11:45 ` [Buildroot] [PATCH 8/12] package/mongodb: bump to version 4.0.6 Fabrice Fontaine
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 11:45 UTC (permalink / raw)
  To: buildroot

host-python-typing is needed for mongodb 4.1.7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/python-typing/python-typing.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/python-typing/python-typing.mk b/package/python-typing/python-typing.mk
index acb5316129..663227dfc9 100644
--- a/package/python-typing/python-typing.mk
+++ b/package/python-typing/python-typing.mk
@@ -12,3 +12,4 @@ PYTHON_TYPING_LICENSE = Python-2.0, others
 PYTHON_TYPING_LICENSE_FILES = LICENSE
 
 $(eval $(python-package))
+$(eval $(host-python-package))
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 8/12] package/mongodb: bump to version 4.0.6
  2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
                   ` (5 preceding siblings ...)
  2019-02-10 11:45 ` [Buildroot] [PATCH 7/12] package/python-typing: " Fabrice Fontaine
@ 2019-02-10 11:45 ` Fabrice Fontaine
  2019-02-10 12:49   ` Yann E. MORIN
  2019-02-10 11:45 ` [Buildroot] [PATCH 9/12] package/mongodb: add boost mandatory dependency Fabrice Fontaine
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 11:45 UTC (permalink / raw)
  To: buildroot

- 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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../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

diff --git a/package/mongodb/0001-add-missing-sysmacros-include.patch b/package/mongodb/0001-add-missing-sysmacros-include.patch
deleted file mode 100644
index 3a8bfa16c7..0000000000
--- a/package/mongodb/0001-add-missing-sysmacros-include.patch
+++ /dev/null
@@ -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 <F.LaRoche@pilz.de>
-
---- ./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>
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 <fontaine.fabrice@gmail.com>
+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 <fontaine.fabrice@gmail.com>
+[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
+
diff --git a/package/mongodb/Config.in b/package/mongodb/Config.in
index 2eaa9e908c..8bfbe0168c 100644
--- a/package/mongodb/Config.in
+++ b/package/mongodb/Config.in
@@ -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
diff --git a/package/mongodb/mongodb.hash b/package/mongodb/mongodb.hash
index b01ad53ab5..916323d7c1 100644
--- a/package/mongodb/mongodb.hash
+++ b/package/mongodb/mongodb.hash
@@ -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
diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk
index 07b854842f..8679641c5d 100644
--- a/package/mongodb/mongodb.mk
+++ b/package/mongodb/mongodb.mk
@@ -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
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 9/12] package/mongodb: add boost mandatory dependency
  2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
                   ` (6 preceding siblings ...)
  2019-02-10 11:45 ` [Buildroot] [PATCH 8/12] package/mongodb: bump to version 4.0.6 Fabrice Fontaine
@ 2019-02-10 11:45 ` Fabrice Fontaine
  2019-02-10 13:06   ` Thomas Petazzoni
  2019-02-10 11:45 ` [Buildroot] [PATCH 10/12] package/mongodb: add pcre " Fabrice Fontaine
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 11:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/mongodb/Config.in  | 5 +++++
 package/mongodb/mongodb.mk | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/package/mongodb/Config.in b/package/mongodb/Config.in
index 8bfbe0168c..c45e1e38c5 100644
--- a/package/mongodb/Config.in
+++ b/package/mongodb/Config.in
@@ -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
diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk
index 8679641c5d..3525306145 100644
--- a/package/mongodb/mongodb.mk
+++ b/package/mongodb/mongodb.mk
@@ -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
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 10/12] package/mongodb: add pcre mandatory dependency
  2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
                   ` (7 preceding siblings ...)
  2019-02-10 11:45 ` [Buildroot] [PATCH 9/12] package/mongodb: add boost mandatory dependency Fabrice Fontaine
@ 2019-02-10 11:45 ` Fabrice Fontaine
  2019-02-10 11:45 ` [Buildroot] [PATCH 11/12] package/mongodb: add sqlite " Fabrice Fontaine
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 11:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/mongodb/Config.in  | 1 +
 package/mongodb/mongodb.mk | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/package/mongodb/Config.in b/package/mongodb/Config.in
index c45e1e38c5..95a303af64 100644
--- a/package/mongodb/Config.in
+++ b/package/mongodb/Config.in
@@ -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
diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk
index 3525306145..a9f48e9715 100644
--- a/package/mongodb/mongodb.mk
+++ b/package/mongodb/mongodb.mk
@@ -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
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 11/12] package/mongodb: add sqlite mandatory dependency
  2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
                   ` (8 preceding siblings ...)
  2019-02-10 11:45 ` [Buildroot] [PATCH 10/12] package/mongodb: add pcre " Fabrice Fontaine
@ 2019-02-10 11:45 ` Fabrice Fontaine
  2019-02-10 11:45 ` [Buildroot] [PATCH 12/12] package/mongodb: add libcurl optional dependency Fabrice Fontaine
  2019-02-10 13:05 ` [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Thomas Petazzoni
  11 siblings, 0 replies; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 11:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/mongodb/Config.in  | 1 +
 package/mongodb/mongodb.mk | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/package/mongodb/Config.in b/package/mongodb/Config.in
index 95a303af64..969b8e062f 100644
--- a/package/mongodb/Config.in
+++ b/package/mongodb/Config.in
@@ -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
diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk
index a9f48e9715..b63010426d 100644
--- a/package/mongodb/mongodb.mk
+++ b/package/mongodb/mongodb.mk
@@ -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
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 12/12] package/mongodb: add libcurl optional dependency
  2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
                   ` (9 preceding siblings ...)
  2019-02-10 11:45 ` [Buildroot] [PATCH 11/12] package/mongodb: add sqlite " Fabrice Fontaine
@ 2019-02-10 11:45 ` Fabrice Fontaine
  2019-02-10 13:05 ` [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Thomas Petazzoni
  11 siblings, 0 replies; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 11:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/mongodb/mongodb.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk
index b63010426d..e420ecb41d 100644
--- a/package/mongodb/mongodb.mk
+++ b/package/mongodb/mongodb.mk
@@ -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 += \
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 8/12] package/mongodb: bump to version 4.0.6
  2019-02-10 11:45 ` [Buildroot] [PATCH 8/12] package/mongodb: bump to version 4.0.6 Fabrice Fontaine
@ 2019-02-10 12:49   ` Yann E. MORIN
  0 siblings, 0 replies; 18+ messages in thread
From: Yann E. MORIN @ 2019-02-10 12:49 UTC (permalink / raw)
  To: buildroot

Fabrice, All,

On 2019-02-10 12:45 +0100, Fabrice Fontaine spake thusly:
> - 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

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.

> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  .../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
> 
> diff --git a/package/mongodb/0001-add-missing-sysmacros-include.patch b/package/mongodb/0001-add-missing-sysmacros-include.patch
> deleted file mode 100644
> index 3a8bfa16c7..0000000000
> --- a/package/mongodb/0001-add-missing-sysmacros-include.patch
> +++ /dev/null
> @@ -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 <F.LaRoche@pilz.de>
> -
> ---- ./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>
> 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 <fontaine.fabrice@gmail.com>
> +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 <fontaine.fabrice@gmail.com>
> +[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
> +
> diff --git a/package/mongodb/Config.in b/package/mongodb/Config.in
> index 2eaa9e908c..8bfbe0168c 100644
> --- a/package/mongodb/Config.in
> +++ b/package/mongodb/Config.in
> @@ -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
> diff --git a/package/mongodb/mongodb.hash b/package/mongodb/mongodb.hash
> index b01ad53ab5..916323d7c1 100644
> --- a/package/mongodb/mongodb.hash
> +++ b/package/mongodb/mongodb.hash
> @@ -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
> diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk
> index 07b854842f..8679641c5d 100644
> --- a/package/mongodb/mongodb.mk
> +++ b/package/mongodb/mongodb.mk
> @@ -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
> -- 
> 2.14.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package"
  2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
                   ` (10 preceding siblings ...)
  2019-02-10 11:45 ` [Buildroot] [PATCH 12/12] package/mongodb: add libcurl optional dependency Fabrice Fontaine
@ 2019-02-10 13:05 ` Thomas Petazzoni
  11 siblings, 0 replies; 18+ messages in thread
From: Thomas Petazzoni @ 2019-02-10 13:05 UTC (permalink / raw)
  To: buildroot

On Sun, 10 Feb 2019 12:45:17 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> This reverts commit 13ccd7e7fef7a353151cd61cd3ecd6590dfb3ddf.
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 9/12] package/mongodb: add boost mandatory dependency
  2019-02-10 11:45 ` [Buildroot] [PATCH 9/12] package/mongodb: add boost mandatory dependency Fabrice Fontaine
@ 2019-02-10 13:06   ` Thomas Petazzoni
  2019-02-10 13:22     ` Fabrice Fontaine
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2019-02-10 13:06 UTC (permalink / raw)
  To: buildroot

Hello Fabrice,

On Sun, 10 Feb 2019 12:45:25 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 9/12] package/mongodb: add boost mandatory dependency
  2019-02-10 13:06   ` Thomas Petazzoni
@ 2019-02-10 13:22     ` Fabrice Fontaine
  2019-02-10 13:33       ` Thomas Petazzoni
  0 siblings, 1 reply; 18+ messages in thread
From: Fabrice Fontaine @ 2019-02-10 13:22 UTC (permalink / raw)
  To: buildroot

Dear Thomas,

Le dim. 10 f?vr. 2019 ? 14:06, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a ?crit :
>
> Hello Fabrice,
>
> On Sun, 10 Feb 2019 12:45:25 +0100
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>
> 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.
>
> 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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 9/12] package/mongodb: add boost mandatory dependency
  2019-02-10 13:22     ` Fabrice Fontaine
@ 2019-02-10 13:33       ` Thomas Petazzoni
  2019-02-10 13:44         ` Yann E. MORIN
  0 siblings, 1 reply; 18+ messages in thread
From: Thomas Petazzoni @ 2019-02-10 13:33 UTC (permalink / raw)
  To: buildroot

Fabrice,

On Sun, 10 Feb 2019 14:22:39 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

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

> 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
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Buildroot] [PATCH 9/12] package/mongodb: add boost mandatory dependency
  2019-02-10 13:33       ` Thomas Petazzoni
@ 2019-02-10 13:44         ` Yann E. MORIN
  0 siblings, 0 replies; 18+ messages in thread
From: Yann E. MORIN @ 2019-02-10 13:44 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2019-02-10 14:33 +0100, Thomas Petazzoni spake thusly:
> On Sun, 10 Feb 2019 14:22:39 +0100
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> 
> > > 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.
> 
> > 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.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2019-02-10 13:44 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-10 11:45 [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Fabrice Fontaine
2019-02-10 11:45 ` [Buildroot] [PATCH 2/12] package/mongodb: add zlib mandatory dependency Fabrice Fontaine
2019-02-10 11:45 ` [Buildroot] [PATCH 3/12] package/mongodb: add snappy " Fabrice Fontaine
2019-02-10 11:45 ` [Buildroot] [PATCH 4/12] package/mongodb: add yaml-cpp " Fabrice Fontaine
2019-02-10 11:45 ` [Buildroot] [PATCH 5/12] package/libyaml: add host variant Fabrice Fontaine
2019-02-10 11:45 ` [Buildroot] [PATCH 6/12] package/python-pyyaml: " Fabrice Fontaine
2019-02-10 11:45 ` [Buildroot] [PATCH 7/12] package/python-typing: " Fabrice Fontaine
2019-02-10 11:45 ` [Buildroot] [PATCH 8/12] package/mongodb: bump to version 4.0.6 Fabrice Fontaine
2019-02-10 12:49   ` Yann E. MORIN
2019-02-10 11:45 ` [Buildroot] [PATCH 9/12] package/mongodb: add boost mandatory dependency Fabrice Fontaine
2019-02-10 13:06   ` Thomas Petazzoni
2019-02-10 13:22     ` Fabrice Fontaine
2019-02-10 13:33       ` Thomas Petazzoni
2019-02-10 13:44         ` Yann E. MORIN
2019-02-10 11:45 ` [Buildroot] [PATCH 10/12] package/mongodb: add pcre " Fabrice Fontaine
2019-02-10 11:45 ` [Buildroot] [PATCH 11/12] package/mongodb: add sqlite " Fabrice Fontaine
2019-02-10 11:45 ` [Buildroot] [PATCH 12/12] package/mongodb: add libcurl optional dependency Fabrice Fontaine
2019-02-10 13:05 ` [Buildroot] [PATCH 1/12] Revert "package/mongodb: remove package" Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.