pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

database/mongodb3 build and runtime issues on netbsd-9, with patch



I run mongodb3 as a dependency for net/unifi. After upgrading to
netbsd-9 and trying to rebuild against pkgsrc-2019Q4, I ran into a
couple of issues. There's a missing header for shared_ptr use, and
it appears mongodb likely wants to run fdatasync against either
directory [1] or read-only file descriptors. The attached patch works
around both of those issues and also upgrades to the latest minor
version on the 3.4 branch. Tested and running on x86 netbsd-9.

1: https://docs.mongodb.com/manual/administration/production-notes/#fsync-on-directories

Cheers,
-- 
Paul Ripke
"Great minds discuss ideas, average minds discuss events, small minds
 discuss people."
-- Disputed: Often attributed to Eleanor Roosevelt. 1948.
diff --git a/databases/mongodb3/Makefile b/databases/mongodb3/Makefile
index 9edc189cee0..c078b968441 100644
--- a/databases/mongodb3/Makefile
+++ b/databases/mongodb3/Makefile
@@ -3,7 +3,7 @@
 # This package is intentionally old to avoid:
 #   Server Side Public License
 #   c++17 (and c++14 if 3.4.4 does not already need it)
-DISTNAME=	mongodb-src-r3.4.23
+DISTNAME=	mongodb-src-r3.4.24
 PKGNAME=	${DISTNAME:S/src-r//}
 CATEGORIES=	databases
 MASTER_SITES=	http://fastdl.mongodb.org/src/
diff --git a/databases/mongodb3/distinfo b/databases/mongodb3/distinfo
index 1cd095e7f2b..769ee7d730b 100644
--- a/databases/mongodb3/distinfo
+++ b/databases/mongodb3/distinfo
@@ -1,15 +1,16 @@
 $NetBSD: distinfo,v 1.4 2019/09/17 08:20:27 adam Exp $
 
-SHA1 (mongodb-src-r3.4.23.tar.gz) = a73c8706f45865fc79c57911dac414a7f379e592
-RMD160 (mongodb-src-r3.4.23.tar.gz) = 7348ef75a0b120967166747edceaf2da725752f6
-SHA512 (mongodb-src-r3.4.23.tar.gz) = 01931d3701a9ed3109132cf3106a6f959f3a393e71284537959095f853cdad5c8b17eebddd4dc1d6a8cb4f5af8393b0bda62034318aa78fd5f656589449f7eb4
-Size (mongodb-src-r3.4.23.tar.gz) = 40176687 bytes
+SHA1 (mongodb-src-r3.4.24.tar.gz) = 86909b211998f0cbc8104df774aecb3d00a01763
+RMD160 (mongodb-src-r3.4.24.tar.gz) = f7e4bfe1e2bd046f1a6c0f2695762076ffee5ae5
+SHA512 (mongodb-src-r3.4.24.tar.gz) = c19d5215f514ad0c1bd33f17f9d79198e07657260c0a8399c9a84bbf274ec4f6e61a94b36bb132e93a46e96ee8b4d994a1bed70b2d26f906ffe8e78343394226
+Size (mongodb-src-r3.4.24.tar.gz) = 40232175 bytes
 SHA1 (patch-SConstruct) = b6c2893d82d9b954c889d867ec909a05728af83d
 SHA1 (patch-src_mongo_base_initializer.h) = f82d58895251f7be08a09012ed7db64e3863a1fe
 SHA1 (patch-src_mongo_db_matcher_expression__leaf.cpp) = 52064034fabb5de63eccf87ddd140303c54f0312
 SHA1 (patch-src_mongo_db_repl_isself.c) = 82321c918b91ce1a68ce79c14589126aca6baf96
 SHA1 (patch-src_mongo_db_repl_master__slave.cpp) = 2f37f0819a2b2743df01f6b6ab0b3013b3b7d726
 SHA1 (patch-src_mongo_db_repl_oplog__fetcher.cpp) = e12dbfbd4e70ee210cdd4eb0582661666e8eb06a
+SHA1 (patch-src_mongo_db_storage_mmap_v1_durop.h) = 793e372342ed9434b304efc01acca1ed1280a492
 SHA1 (patch-src_mongo_installer_msi_SConscript) = 78424fa10f90470dd941b900ef8fd131d28f6e65
 SHA1 (patch-src_mongo_platform_random.cpp) = 9af0fd82a653bf4f273ce107e54c5e63eaeb3b85
 SHA1 (patch-src_mongo_platform_stack__locator__netbsd.cpp) = 3f67bbae82c0f3cae410a21219589bc082e7b9b1
@@ -26,3 +27,4 @@ SHA1 (patch-src_third__party_s2_base_port.h) = 892ce91b5aaa432f34e1e7c169b7fd6ee
 SHA1 (patch-src_third__party_wiredtiger_SConscript) = 71fd2326a4e95fec674326225bce5ccf5793aa5a
 SHA1 (patch-src_third__party_wiredtiger_build__dragonfly_wiredtiger__config.h) = 0b00da401f832d985107dfa5dcc6447db4beec6d
 SHA1 (patch-src_third__party_wiredtiger_build__netbsd_wiredtiger__config.h) = edd3c4e5784e52ad0078bcb7ef1e0902bc354285
+SHA1 (patch-src_third__party_wiredtiger_src_os_posix_os_fs.c) = ecf223d58250c1055f6276de0ae7403c38ef6529
diff --git a/databases/mongodb3/patches/patch-src_mongo_db_storage_mmap_v1_durop.h b/databases/mongodb3/patches/patch-src_mongo_db_storage_mmap_v1_durop.h
new file mode 100644
index 00000000000..3b5f30d8502
--- /dev/null
+++ b/databases/mongodb3/patches/patch-src_mongo_db_storage_mmap_v1_durop.h
@@ -0,0 +1,10 @@
+--- src/mongo/db/storage/mmap_v1/durop.h.orig	2019-09-05 03:33:32.000000000 +1000
++++ src/mongo/db/storage/mmap_v1/durop.h	2020-02-22 23:21:02.992031104 +1100
+@@ -30,6 +30,7 @@
+ 
+ #pragma once
+ 
++#include <memory>
+ 
+ #include "mongo/db/storage/mmap_v1/dur_journalformat.h"
+ #include "mongo/db/storage/paths.h"
diff --git a/databases/mongodb3/patches/patch-src_third__party_wiredtiger_src_os_posix_os_fs.c b/databases/mongodb3/patches/patch-src_third__party_wiredtiger_src_os_posix_os_fs.c
new file mode 100644
index 00000000000..ebf7860e3f5
--- /dev/null
+++ b/databases/mongodb3/patches/patch-src_third__party_wiredtiger_src_os_posix_os_fs.c
@@ -0,0 +1,11 @@
+--- src/third_party/wiredtiger/src/os_posix/os_fs.c.orig	2019-09-05 03:33:32.000000000 +1000
++++ src/third_party/wiredtiger/src/os_posix/os_fs.c	2020-02-22 14:22:57.007959842 +1100
+@@ -103,7 +103,7 @@
+ #if defined(HAVE_FDATASYNC)
+ 	/* See comment in __posix_sync(): sync cannot be retried or fail. */
+ 	WT_SYSCALL(fdatasync(fd), ret);
+-	if (ret == 0)
++	if (ret == 0 || errno == EBADF)
+ 		return (0);
+ 	WT_PANIC_RET(session, ret, "%s: %s: fdatasync", name, func);
+ #else


Home | Main Index | Thread Index | Old Index