aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2017-09-24 22:55:52 +0100
committerStuart Shelton <stuart@shelton.me>2017-09-25 00:52:53 +0100
commit11c39ddabc43d22dfa1cab312982e5735c9d4523 (patch)
tree68be8cd4923655c83e70909c2170fc07f84ef04e /dev-db/mongodb
parentAdd dev-lang/perl-5.24.3 (diff)
downloadsrcshelton-11c39ddabc43d22dfa1cab312982e5735c9d4523.tar.gz
srcshelton-11c39ddabc43d22dfa1cab312982e5735c9d4523.tar.bz2
srcshelton-11c39ddabc43d22dfa1cab312982e5735c9d4523.zip
Add dev-db/mongodb-3.0.14, dev-db/mongodb-3.2.16, update README.md
Diffstat (limited to 'dev-db/mongodb')
-rw-r--r--dev-db/mongodb/Manifest21
-rw-r--r--dev-db/mongodb/files/mongodb-3.0.14-fix-scons.patch36
-rw-r--r--dev-db/mongodb/files/mongodb-3.0.14-fix-std-string.patch83
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch49
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch15
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch283
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch84
-rw-r--r--dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch38
-rw-r--r--dev-db/mongodb/files/mongodb.conf-r233
-rw-r--r--dev-db/mongodb/files/mongodb.conf-r334
-rw-r--r--dev-db/mongodb/files/mongodb.confd-r212
-rw-r--r--dev-db/mongodb/files/mongodb.initd-r226
-rw-r--r--dev-db/mongodb/files/mongodb.logrotate12
-rw-r--r--dev-db/mongodb/files/mongodb.service10
-rw-r--r--dev-db/mongodb/files/mongos.conf-r230
-rw-r--r--dev-db/mongodb/files/mongos.confd-r212
-rw-r--r--dev-db/mongodb/files/mongos.initd-r226
-rw-r--r--dev-db/mongodb/mongodb-3.0.14.ebuild179
-rw-r--r--dev-db/mongodb/mongodb-3.2.16.ebuild210
19 files changed, 1193 insertions, 0 deletions
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
new file mode 100644
index 00000000..dff6aebe
--- /dev/null
+++ b/dev-db/mongodb/Manifest
@@ -0,0 +1,21 @@
+AUX mongodb-3.0.14-fix-scons.patch 1419 SHA256 b23c96e9c6c7d050c390a2ea656f27f8b2feb6f9286ee27c82c3e876f9e495a1 SHA512 2cf591ee25d33adf98ca6baeb086fb8677720809bc3e2b9398bba6ae84548b2aa3dfd57216e185fc6aa0aa185c9a906fe2a1b97bc81942560f02903b24f7bd25 WHIRLPOOL 2fb334eb1b80c22dd1bf0614f4f733ae096321a2382f9199b3ea8fa5ab2200f960fa247fcc6f9a7ec369ec599b635c087440ea1964b6a92edd50608d5527ec0f
+AUX mongodb-3.0.14-fix-std-string.patch 2341 SHA256 f82bb7bdf457c665308159a1bc7fa0ba6f98bca23d03e3a4273af88a2b531d70 SHA512 1c1d46f4d058685371914ac70c8ad36fba387e9a140ddfd5650cf0411a73776d7b8ef6108a778eaeaa5ba22eba0e16b2301d257a47250a67e7e013d7bb402e47 WHIRLPOOL 6fe6af8464bc7eebdfdf1a6a9d0e7cebac5c203b10dabaaa83718f00904a1e5d158d1c63ca84d331d56a3d6b61143c85d4fe9f0aebbc0587fbefa2c2f2b01355
+AUX mongodb-3.2.0-fix-scons.patch 1738 SHA256 1f269f83a0c5c1a44749ef35dd803b8f43facd3e80e6e85c79962d73929c4645 SHA512 04f95586b46960405b7b1906ea3c3c75d37d6831a458f619347ac028c77db5744131cb7bf39cdf62bf564500b1f6785e25b9a0c0526f126bf2072269385afe45 WHIRLPOOL 6a73736acdd53384af3e1426b8a1c1b4f0f0d5bcdc7f2cec2f89ae169f00ceda9a7caa2cbef4e9a9c3c23ef2f1745a68a0f6a8534201319a976615842102f353
+AUX mongodb-3.2.10-boost-1.62.patch 702 SHA256 bf373d1514b7947dc4747e11babf87a4bd8e7d581781c6771a844e69c1c4d273 SHA512 79edfd1a6eaba597b31a82e54722dccab288d8b8840a53f79140b5fca221b5acd9fbc770d99e46ea9fa0da502cdf18dd35d982c95a4aa341806c3d8b61fc732f WHIRLPOOL 4c489e4a5f058873ec6b9215610fd20a73c733699856141b68e6c717977f9620f3723d2c40436cd4963b96ae49dadb6e0227b5368df5a08871cc70d9b12e60f5
+AUX mongodb-3.2.16-Replace-string-with-explicit-std-string.patch 12636 SHA256 c55afdf1ba8d513b7e1ee68ce895c20d45e5eb20666c72cbc982a6fd997fc61d SHA512 43a610b0c37c74576ef3e3df3734c4d9d904271dd3853003ff439f61099666a356ed5d4f046573a753c652dfe1e1c1607b1abe041482b740fe828f543272646c WHIRLPOOL a65574dc682ab6399d7a8f43501a13546e8aaffce786434d18585f41e9a7820d5e1dd9d41325d7517e0ca49311770b4d4d0d981d29689769ee64928bf042d79d
+AUX mongodb-3.2.4-boost-1.60.patch 3352 SHA256 c473a461950dd1397b4fa22af8e2e779925847de56fd50e6d525f3bcfb8b3d75 SHA512 260c3edc3a04f3fae9f18fb73b3ae027709aa019751627d1a24b2ee40a72f91ef9de64606aff32c0890861fc56ae3c80341ba87cd16fffdd009b4fa5089c70db WHIRLPOOL d952fd59365a9b85e92774052fc5a9324f1c0e916cf9ad0fb1723da1e88772a3ec0d6f6eb15dd73527597502fb466b7424671e087943bb6bb13185bf3d0c468c
+AUX mongodb-3.4.6-sysmacros-include.patch 1419 SHA256 9ef54b5e58aab228b4ff97374815c8c508be06f6caaabaff295c3f9dc9fe148b SHA512 ab269ec003b74848f981021f5eb09e38216d75dd9d1b8a155068b2a335d9ec9d1f5f575028ae9b4b0d8745d15e464cb05b70aabc6c28c984115574c6747afc05 WHIRLPOOL eaa5a1ff6e4cccdfa20233a22da5ba3453d66bc16f86f370f2750453cdf5bd8ce81160e6c29abd972a95eb1d00f944408328653314b38000c78dd086d5e84e72
+AUX mongodb.conf-r2 698 SHA256 780fa095f5eacee59f3f683f225fe545c8ec93a27157894885d5f4656a6ae15a SHA512 15480651b5e7b1927b95d633193aee08def71e2f9ef6438f93972e359b2605e51ce6f071f5fd64b73b2bf4db58710a04634a36144db2c2e585588098d69b66fb WHIRLPOOL 2d2d2bf793ae5b1c7c27be227001c3eeb1a76cd620ce8e3882e7d43f10625df8c21d8452dabeef4b8cb750246436d57ad900f915aadd74dcc02c9341ab5d343b
+AUX mongodb.conf-r3 722 SHA256 b4009296b3e794fa1686aec0502b01431e94fc4754cb66d1f00bad64dcb24e72 SHA512 ef193bfed673477aa0e868114bd52be6675492c164f218c71ccd02c4a620b5c4799ea1d18df0c3f2b364027b9f25e60ac4475bb216b25e1dc10bfd00a9f5d45d WHIRLPOOL f536abc8102f20c94bf19c9691345a31eaed84768a413d508437b0aab5100e36cb29f193e0d90e1b76d13892789bd9a9bd815d0f76491df0db375315df7a135e
+AUX mongodb.confd-r2 553 SHA256 8c13285096a8f87dcdb31e5c324143f59caeb92dac4c704d5b597bf47ed1f013 SHA512 eeaec4e10c5a461dd392254243c7bbc57367e4a9bd683e8788e0bd8cfe6ccb4df2033a359d6aaa864f893d7851eed7af44ef9c46905e480e26702f8fdb08e35b WHIRLPOOL 80827a813915a8ebc62a08211ad34d16389efe80dc959d45c6a9e627d8021eb8c10fc88a626f3ecf605c22a0ae85fb0e024d4ece77db022297dd352fd34aada2
+AUX mongodb.initd-r2 658 SHA256 7ec36571b21127240425957ba1366c2b4f2e53b9804b305467093cdfd7866d14 SHA512 16ceb373b827da64417930a3140efbf5134d841ecfef932b1d738c36be7389fb8ce6df06bef174834890bccef241aaf0f519b557813aa7ed45b361bc51ae29b6 WHIRLPOOL 919777a7b8ad68ce12bacd99e4fa8459896fd249d8be1c1093eebcc138b1c3a27dc731971bf0632e759247bedcdf818d597413e4cc93eda1b2a3d89f8b2449dd
+AUX mongodb.logrotate 153 SHA256 9a77d08e63a882b6d7ef0b05eb6eaefb44013019a334734d34b9f26aca1851b0 SHA512 ed7db6a63ef3b405417231848eef9dafd48796460f56821877c11acf1fc25cf0b38d7d71e80e8d13c053568039d2f4680c0a61f8a8bc3bda65eeee1a45598b53 WHIRLPOOL c17fa95e706f7eafdbe1d5c9cfa8e1a8fb8b8458308119113c45c7b8c4f08d97f79c879de3ff0c5831ffa4e8fc0e6a21a8296d014d18bdcdd9a2b544550f5571
+AUX mongodb.service 220 SHA256 19f55ab28652b3817e98fc3f15cc2f6f3255a5e1dfd7b0d5a27c9ba22fd2703e SHA512 177251404b2e818ae2b546fe8b13cb76e348c99e85c7bef22a04b0f07b600fd515a309ede50214f4198594388a6d2b31f46e945b9dae84aabb4dfa13b1123bb9 WHIRLPOOL 0f6e032acbc7f625b03dcec990126cef064925a341e38c27cddbed5a951c8cfeded00ee3b8b0d9044245c833e86748262434665342e6baa98500fb02c07f4281
+AUX mongos.conf-r2 648 SHA256 d1bf479cee999b4e59e5100c134cd3e7af4bb126342418100cf8f9a08a26f6a7 SHA512 5aa8ced8d83572358e008c0df45dbe72a2e9c0003c9f49514d6b91bf9b75d4fb48b189ffe00d14e5675679943a05215a9873c5c9bde9ab1be4ed4813e75714e3 WHIRLPOOL f1036ea1bd7efa54d28d131dd1bfd1e06c1c3ffbf247ee68a33eee0383d87bf3bfa6639040e6b68a0a14cce0bd77bd5b91a8e245f615007fccccb0cbe2becd84
+AUX mongos.confd-r2 550 SHA256 3e3732aeb25e4e014415d3c071cb6d47c47a59ee259ac2c0c68542672b361898 SHA512 8856eed8d3d16557906419ba75a8a21ba56fc45ccbc46a64b64d70b45c7ae45982c3d4e133b991a3e50b6efd203b35a584ceeebaca90a77e4a491cf49998a93e WHIRLPOOL 392453f29d0734aea5d0bfdf311981e2432969ec4f5386498344d17cd1eb0c4760120af8732088d71b3468454d6aa1000d98101121f0b38d74721c5eb131eae6
+AUX mongos.initd-r2 658 SHA256 8dd76fc09b94580f15ed66edbb685f229fcb972430aee360621ba1b48b979854 SHA512 91075a1b8176ebb0e574e13bcbc469e89efa449702c7fc25c2f64bc5cedd0d4631061e464e6a3906502a0982a95354c5692d39959b5ef4f07627f03e9a9111ca WHIRLPOOL 27ca74a692aca0bb16b12d2ea7a2682020d6a725d94b3af93dfb5fdcef4c419550ea6a137b5c4768fab6fe45eb5c98a4c04ca5a0a247078b64b0747304661dff
+DIST firefox-38.8.0esr.source.tar.bz2 181198635 SHA256 9475adcee29d590383c4885bc5f958093791d1db4302d694a5d2766698f59982 SHA512 fcd2497a60176b8403a1793d1ad0a1c96a0a60217c2d4d7acd0506abf6810892bd51fd113d8f952f92b20032efc539a6b1233d8d124c2eb72d726b0935c04d65 WHIRLPOOL cbc170093bbc1403a4112e5a1a73ceeda4d0ab86dc02697b4010097a612124652e8ad27ae33bca056a5d1f8450239a98b746ff983ab4a0db010e10c815781d8d
+DIST mongodb-src-r3.0.14.tar.gz 28093922 SHA256 ebbb758ca7ee53e8d25e2410bb7ef61640829566d094cde2487b55e73d0fd880 SHA512 477fab29ca0ad2a0f24b895e30dc4770af8d6a1a57f3c10a02a989b58dd22510db554da0418129d4e81958342ad169696eed4b86bf5aa73916c7cec879db1152 WHIRLPOOL 7fc02969c52954f0fd9b90ace9efd3677a9d6b8d3618b5dedb470343a3ba71789d451cc30a95742b2b9e61b21ffe0f1a23e239e388a497a327f2cc8ed1ed6aef
+DIST mongodb-src-r3.2.16.tar.gz 29293555 SHA256 7a8b1b16f3fa545af16f48aeef1f918f57d96a80e1ceb6e669cdb81fab6511d0 SHA512 ba57aae430959f7df036b7e19e1b7d81956184bededd35631616c6e3dc9423dc79a50ab3265bc48b06d198a7043bca902aee2ea75954e38151ebead5b5ab2db2 WHIRLPOOL 0ac7b7cfae8b8b3727dc722c616eb576b3ae3aced5340b9fbd9a995d9f55552411c0507cb43a7378fa35187cf940d72d86ee20d08762f87bb4ebcd13eb697f09
+EBUILD mongodb-3.0.14.ebuild 4886 SHA256 60b7037dc3f6634e481174efc1319e5324ac9c247ddc163a8b940de0af8e7bdd SHA512 5a8f632a5c0597d10abaf4044b89db063b3d32f24d766326a096bb0a39bc0b66eabb32b78fcca2929b6f5f839843e4c0e4e6fd7d31d546c9cf94a1498c552d62 WHIRLPOOL 1cce3832ad62aad4eb0ebf76fd7f2c402d100285f0b319cb07dba9c773ad720e16fa6680f417d3eb8bd512cfe2e59a863f48f65a1412c400fb33d0d174102376
+EBUILD mongodb-3.2.16.ebuild 6019 SHA256 9e6bf61ee96b6e1ff05675c5de4828ca8bb8b05f22420801e3c89879bf143f41 SHA512 d4cc776af4b6cc53f440e22e8fd4a9dc524f9c56ac0d116d2415cb924c08dfcd87f98dbcef74a765a2270f1f84afd04a2fb796bf7c7beccd71dbd44eab13b1cb WHIRLPOOL c595cfedd401840a2b8e21140b18f61c5301828cd0a0e56655a462a46fd726c668d5a2f3bdb612ba64dfc932dedebb7a30f76a17269416cdffebe2458716061b
diff --git a/dev-db/mongodb/files/mongodb-3.0.14-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.0.14-fix-scons.patch
new file mode 100644
index 00000000..1db5d769
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.0.14-fix-scons.patch
@@ -0,0 +1,36 @@
+diff --git a/SConstruct b/SConstruct
+--- a/SConstruct
++++ b/SConstruct
+@@ -1008,7 +1008,6 @@
+ # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
+ env.Append( CCFLAGS=["-fPIC",
+ "-fno-strict-aliasing",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -1016,13 +1015,13 @@
+ "-Winvalid-pch"] )
+ # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
+ if linux or darwin:
+- env.Append( CCFLAGS=["-pipe"] )
+ if not has_option("disable-warnings-as-errors"):
+ env.Append( CCFLAGS=["-Werror"] )
+
+ env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
+- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
+ env.Append( LINKFLAGS=["-fPIC", "-pthread"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+
+ # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
+ # startup.
+@@ -1039,7 +1038,7 @@
+ if not darwin:
+ env.Append( LINKFLAGS=["-rdynamic"] )
+
+- env.Append( LIBS=[] )
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] )
+
+ #make scons colorgcc friendly
+ for key in ('HOME', 'TERM'):
diff --git a/dev-db/mongodb/files/mongodb-3.0.14-fix-std-string.patch b/dev-db/mongodb/files/mongodb-3.0.14-fix-std-string.patch
new file mode 100644
index 00000000..9de319bd
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.0.14-fix-std-string.patch
@@ -0,0 +1,83 @@
+--- a/src/mongo/shell/bench.cpp 2017-09-20 19:12:20.893056990 +0200
++++ b/src/mongo/shell/bench.cpp 2017-09-20 19:14:08.165060566 +0200
+@@ -52,6 +52,9 @@
+ #include "mongo/util/time_support.h"
+ #include "mongo/util/version.h"
+
++#include <string>
++using namespace std;
++
+ // ---------------------------------
+ // ---- benchmarking system --------
+ // ---------------------------------
+--- a/src/mongo/db/dbwebserver.cpp 2017-09-20 19:24:50.042081961 +0200
++++ b/src/mongo/db/dbwebserver.cpp 2017-09-20 19:26:20.240084968 +0200
+@@ -58,6 +58,8 @@
+ #include "mongo/util/ramlog.h"
+ #include "mongo/util/version.h"
+
++#include <string>
++using namespace std;
+
+ namespace mongo {
+
+--- a/src/mongo/db/matcher/expression_leaf.cpp 2017-09-20 19:27:59.009088260 +0200
++++ b/src/mongo/db/matcher/expression_leaf.cpp 2017-09-20 19:28:31.082089329 +0200
+@@ -39,6 +39,9 @@
+ #include "mongo/db/jsobj.h"
+ #include "mongo/db/matcher/path.h"
+
++#include <string>
++using namespace std;
++
+ namespace mongo {
+
+ Status LeafMatchExpression::initPath(const StringData& path) {
+--- a/src/mongo/db/repl/master_slave.cpp 2017-09-20 19:30:04.569092445 +0200
++++ b/src/mongo/db/repl/master_slave.cpp 2017-09-20 19:31:19.145094931 +0200
+@@ -70,6 +70,9 @@
+ #include "mongo/util/exit.h"
+ #include "mongo/util/log.h"
+
++#include <string>
++using namespace std;
++
+ using boost::scoped_ptr;
+ using std::auto_ptr;
+ using std::cout;
+--- a/src/mongo/util/net/miniwebserver.cpp 2017-09-20 19:32:55.368098138 +0200
++++ b/src/mongo/util/net/miniwebserver.cpp 2017-09-20 19:33:57.128100197 +0200
+@@ -39,6 +39,9 @@
+ #include "mongo/util/hex.h"
+ #include "mongo/util/log.h"
+
++#include <string>
++using namespace std;
++
+ namespace mongo {
+
+ using boost::shared_ptr;
+--- a/src/mongo/s/config.cpp 2017-09-20 19:42:45.614117812 +0200
++++ b/src/mongo/s/config.cpp 2017-09-20 19:43:28.278119234 +0200
+@@ -60,6 +60,9 @@
+ #include "mongo/util/net/message.h"
+ #include "mongo/util/stringutils.h"
+
++#include <string>
++using namespace std;
++
+ namespace mongo {
+
+ using boost::scoped_ptr;
+--- a/src/mongo/s/grid.cpp 2017-09-20 19:51:07.684134547 +0200
++++ b/src/mongo/s/grid.cpp 2017-09-20 19:51:43.436135739 +0200
+@@ -55,6 +55,9 @@
+ #include "mongo/util/startup_test.h"
+ #include "mongo/util/stringutils.h"
+
++#include <string>
++using namespace std;
++
+ namespace mongo {
+
+ using std::endl;
diff --git a/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch
new file mode 100644
index 00000000..8b29bd4a
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch
@@ -0,0 +1,49 @@
+From ab6f929ee4584f3f1a040e55a63f493603f228d2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 1 Jan 2016 10:27:35 +0100
+Subject: [PATCH] Fix build for Gentoo
+
+---
+ SConstruct | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index 64c8387..fa9ab8b 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1371,7 +1371,6 @@ if env.TargetOSIs('posix'):
+ env.Append( CCFLAGS=["-fno-omit-frame-pointer",
+ "-fPIC",
+ "-fno-strict-aliasing",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -1382,8 +1381,9 @@ if env.TargetOSIs('posix'):
+ if not has_option("disable-warnings-as-errors"):
+ env.Append( CCFLAGS=["-Werror"] )
+
+- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
+ env.Append( LINKFLAGS=["-fPIC", "-pthread"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+
+ # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
+ # startup.
+@@ -1398,10 +1398,10 @@ if env.TargetOSIs('posix'):
+ env.Append( SHLINKFLAGS=["-Wl,-z,now"] )
+ env.Append( LINKFLAGS=["-rdynamic"] )
+
+- env.Append( LIBS=[] )
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] )
+
+- #make scons colorgcc friendly
+- for key in ('HOME', 'TERM'):
++ #make scons colorgcc, distcc, ccache friendly
++ for key in ('HOME', 'PATH', 'TERM'):
+ try:
+ env['ENV'][key] = os.environ[key]
+ except KeyError:
+--
+2.6.4
+
diff --git a/dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch b/dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch
new file mode 100644
index 00000000..30a3bdff
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.10-boost-1.62.patch
@@ -0,0 +1,15 @@
+Derived from http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/databases/mongodb/patches/patch-src_mongo_db_fts_unicode_string.cpp v1.1
+
+* Fix build with boost 1.62.0
+
+--- a/src/mongo/db/fts/unicode/string.cpp 2016-09-26 12:10:04.000000000 +0000
++++ b/src/mongo/db/fts/unicode/string.cpp
+@@ -274,7 +274,7 @@ bool String::substrMatch(const std::stri
+
+ // Case sensitive and diacritic sensitive.
+ return boost::algorithm::boyer_moore_search(
+- haystack.begin(), haystack.end(), needle.begin(), needle.end()) != haystack.end();
++ haystack.begin(), haystack.end(), needle.begin(), needle.end()) != std::make_pair(haystack.end(), haystack.end());
+ }
+
+ } // namespace unicode
diff --git a/dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch b/dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch
new file mode 100644
index 00000000..6067850a
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch
@@ -0,0 +1,283 @@
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/db/dbwebserver.cpp mongodb-src-r3.2.16/src/mongo/db/dbwebserver.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/db/dbwebserver.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/db/dbwebserver.cpp 2017-08-01 15:43:55.860712772 +0200
+@@ -69,6 +69,7 @@
+ using std::map;
+ using std::stringstream;
+ using std::vector;
++using std::string;
+
+ using namespace html;
+
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/db/matcher/expression_leaf.cpp mongodb-src-r3.2.16/src/mongo/db/matcher/expression_leaf.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/db/matcher/expression_leaf.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/db/matcher/expression_leaf.cpp 2017-08-01 15:46:17.070708001 +0200
+@@ -200,7 +200,7 @@
+ }
+
+ void ComparisonMatchExpression::toBSON(BSONObjBuilder* out) const {
+- string opString = "";
++ std::string opString = "";
+ switch (matchType()) {
+ case LT:
+ opString = "$lt";
+@@ -880,7 +880,7 @@
+ }
+
+ void BitTestMatchExpression::toBSON(BSONObjBuilder* out) const {
+- string opString = "";
++ std::string opString = "";
+
+ switch (matchType()) {
+ case BITS_ALL_SET:
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/db/repl/master_slave.cpp mongodb-src-r3.2.16/src/mongo/db/repl/master_slave.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/db/repl/master_slave.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/db/repl/master_slave.cpp 2017-08-01 15:54:45.140690837 +0200
+@@ -161,7 +161,7 @@
+
+ BSONObjBuilder dbsNextPassBuilder;
+ int n = 0;
+- for (set<string>::iterator i = addDbNextPass.begin(); i != addDbNextPass.end(); i++) {
++ for (set<std::string>::iterator i = addDbNextPass.begin(); i != addDbNextPass.end(); i++) {
+ n++;
+ dbsNextPassBuilder.appendBool(*i, 1);
+ }
+@@ -170,7 +170,7 @@
+
+ BSONObjBuilder incompleteCloneDbsBuilder;
+ n = 0;
+- for (set<string>::iterator i = incompleteCloneDbs.begin(); i != incompleteCloneDbs.end(); i++) {
++ for (set<std::string>::iterator i = incompleteCloneDbs.begin(); i != incompleteCloneDbs.end(); i++) {
+ n++;
+ incompleteCloneDbsBuilder.appendBool(*i, 1);
+ }
+@@ -181,7 +181,7 @@
+ }
+
+ void ReplSource::ensureMe(OperationContext* txn) {
+- string myname = getHostName();
++ std::string myname = getHostName();
+
+ // local.me is an identifier for a server for getLastError w:2+
+ bool exists = Helpers::getSingleton(txn, "local.me", _me);
+@@ -373,10 +373,10 @@
+ }
+
+ virtual bool run(OperationContext* txn,
+- const string& ns,
++ const std::string& ns,
+ BSONObj& cmdObj,
+ int options,
+- string& errmsg,
++ std::string& errmsg,
+ BSONObjBuilder& result) {
+ HandshakeArgs handshake;
+ Status status = handshake.initialize(cmdObj);
+@@ -393,7 +393,7 @@
+ } handshakeCmd;
+
+ bool replHandshake(DBClientConnection* conn, const OID& myRID) {
+- string myname = getHostName();
++ std::string myname = getHostName();
+
+ BSONObjBuilder cmd;
+ cmd.append("handshake", myRID);
+@@ -445,7 +445,7 @@
+ BSONElement e = i.next();
+ if (e.eoo())
+ break;
+- string name = e.embeddedObject().getField("name").valuestr();
++ std::string name = e.embeddedObject().getField("name").valuestr();
+ if (!e.embeddedObject().getBoolField("empty")) {
+ if (name != "local") {
+ if (only.empty() || only == name) {
+@@ -459,7 +459,7 @@
+ save(txn);
+ }
+
+-void ReplSource::resyncDrop(OperationContext* txn, const string& db) {
++void ReplSource::resyncDrop(OperationContext* txn, const std::string& db) {
+ log() << "resync: dropping database " << db;
+ OldClientContext ctx(txn, db);
+ dropDatabase(txn, ctx.db());
+@@ -502,13 +502,13 @@
+
+ static DatabaseIgnorer ___databaseIgnorer;
+
+-void DatabaseIgnorer::doIgnoreUntilAfter(const string& db, const Timestamp& futureOplogTime) {
++void DatabaseIgnorer::doIgnoreUntilAfter(const std::string& db, const Timestamp& futureOplogTime) {
+ if (futureOplogTime > _ignores[db]) {
+ _ignores[db] = futureOplogTime;
+ }
+ }
+
+-bool DatabaseIgnorer::ignoreAt(const string& db, const Timestamp& currentOplogTime) {
++bool DatabaseIgnorer::ignoreAt(const std::string& db, const Timestamp& currentOplogTime) {
+ if (_ignores[db].isNull()) {
+ return false;
+ }
+@@ -598,7 +598,7 @@
+
+ // The database is present on the master and no conflicting databases
+ // are present on the master. Drop any local conflicts.
+- for (set<string>::const_iterator i = duplicates.begin(); i != duplicates.end(); ++i) {
++ for (set<std::string>::const_iterator i = duplicates.begin(); i != duplicates.end(); ++i) {
+ ___databaseIgnorer.doIgnoreUntilAfter(*i, lastTime);
+ incompleteCloneDbs.erase(*i);
+ addDbNextPass.erase(*i);
+@@ -793,10 +793,10 @@
+ }
+
+ void ReplSource::syncToTailOfRemoteLog() {
+- string _ns = ns();
++ std::string _ns = ns();
+ BSONObjBuilder b;
+ if (!only.empty()) {
+- b.appendRegex("ns", string("^") + pcrecpp::RE::QuoteMeta(only));
++ b.appendRegex("ns", std::string("^") + pcrecpp::RE::QuoteMeta(only));
+ }
+ BSONObj last = oplogReader.findOne(_ns.c_str(), Query(b.done()).sort(BSON("$natural" << -1)));
+ if (!last.isEmpty()) {
+@@ -844,7 +844,7 @@
+ */
+ int ReplSource::_sync_pullOpLog(OperationContext* txn, int& nApplied) {
+ int okResultCode = 1;
+- string ns = string("local.oplog.$") + sourceName();
++ std::string ns = std::string("local.oplog.$") + sourceName();
+ LOG(2) << "sync_pullOpLog " << ns << " syncedTo:" << syncedTo.toStringLong() << '\n';
+
+ bool tailing = true;
+@@ -864,7 +864,7 @@
+ BSONElement e = i.next();
+ if (e.eoo())
+ break;
+- string name = e.embeddedObject().getField("name").valuestr();
++ std::string name = e.embeddedObject().getField("name").valuestr();
+ if (!e.embeddedObject().getBoolField("empty")) {
+ if (name != "local") {
+ if (only.empty() || only == name) {
+@@ -888,7 +888,7 @@
+ if (!only.empty()) {
+ // note we may here skip a LOT of data table scanning, a lot of work for the master.
+ // maybe append "\\." here?
+- query.appendRegex("ns", string("^") + pcrecpp::RE::QuoteMeta(only));
++ query.appendRegex("ns", std::string("^") + pcrecpp::RE::QuoteMeta(only));
+ }
+ BSONObj queryObj = query.done();
+ // e.g. queryObj = { ts: { $gte: syncedTo } }
+@@ -907,7 +907,7 @@
+
+ // show any deferred database creates from a previous pass
+ {
+- set<string>::iterator i = addDbNextPass.begin();
++ set<std::string>::iterator i = addDbNextPass.begin();
+ if (i != addDbNextPass.end()) {
+ BSONObjBuilder b;
+ b.append("ns", *i + '.');
+@@ -938,7 +938,7 @@
+ BSONObj op = oplogReader.next();
+ BSONElement ts = op.getField("ts");
+ if (ts.type() != Date && ts.type() != bsonTimestamp) {
+- string err = op.getStringField("$err");
++ std::string err = op.getStringField("$err");
+ if (!err.empty()) {
+ // 13051 is "tailable cursor requested on non capped collection"
+ if (op.getIntField("code") == 13051) {
+@@ -1106,7 +1106,7 @@
+
+ // FIXME Handle cases where this db isn't on default port, or default port is spec'd in
+ // hostName.
+- if ((string("localhost") == hostName || string("127.0.0.1") == hostName) &&
++ if ((std::string("localhost") == hostName || std::string("127.0.0.1") == hostName) &&
+ serverGlobalParams.port == ServerGlobalParams::DefaultDBPort) {
+ log() << "can't sync from self (localhost). sources configuration may be wrong." << endl;
+ sleepsecs(5);
+@@ -1251,7 +1251,7 @@
+ if (s) {
+ stringstream ss;
+ ss << "sleep " << s << " sec before next pass";
+- string msg = ss.str();
++ std::string msg = ss.str();
+ if (!serverGlobalParams.quiet)
+ log() << msg << endl;
+ ReplInfo r(msg.c_str());
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/shell/bench.cpp mongodb-src-r3.2.16/src/mongo/shell/bench.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/shell/bench.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/shell/bench.cpp 2017-08-01 16:20:20.864638957 +0200
+@@ -674,7 +674,7 @@
+ invariant(bsonTemplateEvaluator.setId(_id) == BsonTemplateEvaluator::StatusSuccess);
+
+ if (_config->username != "") {
+- string errmsg;
++ std::string errmsg;
+ if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+ uasserted(15931, "Authenticating to connection for _benchThread failed: " + errmsg);
+ }
+@@ -920,7 +920,7 @@
+
+ if (!result["err"].eoo() && result["err"].type() == String &&
+ (_config->throwGLE || op.throwGLE))
+- throw DBException((string) "From benchRun GLE" +
++ throw DBException((std::string) "From benchRun GLE" +
+ causedBy(result["err"].String()),
+ result["code"].eoo() ? 0 : result["code"].Int());
+ }
+@@ -987,7 +987,7 @@
+
+ if (!result["err"].eoo() && result["err"].type() == String &&
+ (_config->throwGLE || op.throwGLE))
+- throw DBException((string) "From benchRun GLE" +
++ throw DBException((std::string) "From benchRun GLE" +
+ causedBy(result["err"].String()),
+ result["code"].eoo() ? 0 : result["code"].Int());
+ }
+@@ -1035,7 +1035,7 @@
+
+ if (!result["err"].eoo() && result["err"].type() == String &&
+ (_config->throwGLE || op.throwGLE))
+- throw DBException((string) "From benchRun GLE " +
++ throw DBException((std::string) "From benchRun GLE " +
+ causedBy(result["err"].String()),
+ result["code"].eoo() ? 0 : result["code"].Int());
+ }
+@@ -1136,7 +1136,7 @@
+ try {
+ std::unique_ptr<DBClientBase> conn(_config->createConnection());
+ if (!_config->username.empty()) {
+- string errmsg;
++ std::string errmsg;
+ if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+ uasserted(15932, "Authenticating to connection for benchThread failed: " + errmsg);
+ }
+@@ -1168,7 +1168,7 @@
+ std::unique_ptr<DBClientBase> conn(_config->createConnection());
+ // Must authenticate to admin db in order to run serverStatus command
+ if (_config->username != "") {
+- string errmsg;
++ std::string errmsg;
+ if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+ uasserted(16704,
+ str::stream()
+@@ -1204,7 +1204,7 @@
+ {
+ std::unique_ptr<DBClientBase> conn(_config->createConnection());
+ if (_config->username != "") {
+- string errmsg;
++ std::string errmsg;
+ // this can only fail if admin access was revoked since start of run
+ if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+ uasserted(16705,
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/util/net/miniwebserver.cpp mongodb-src-r3.2.16/src/mongo/util/net/miniwebserver.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/util/net/miniwebserver.cpp 2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/util/net/miniwebserver.cpp 2017-08-01 16:01:01.832678112 +0200
+@@ -45,8 +45,9 @@
+ using std::endl;
+ using std::stringstream;
+ using std::vector;
++using std::string;
+
+-MiniWebServer::MiniWebServer(const string& name, const string& ip, int port)
++MiniWebServer::MiniWebServer(const std::string& name, const std::string& ip, int port)
+ : Listener(name, ip, port, false) {}
+
+ string MiniWebServer::parseURL(const char* buf) {
diff --git a/dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch b/dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch
new file mode 100644
index 00000000..41c9bd2b
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.4-boost-1.60.patch
@@ -0,0 +1,84 @@
+Fix issues caused by boost::none changes.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=578846
+Adapted from: https://github.com/mongodb/mongo/commit/92c3f80f384d2825efeabd0d26aa534c0deb6988
+
+--- mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor.cpp
++++ mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor.cpp
+@@ -47,7 +47,7 @@
+ if (_referenceDoc.isEmpty()) {
+ FTDCBSONUtil::extractMetricsFromDocument(sample, sample, &_metrics);
+ _reset(sample, date);
+- return {boost::none_t()};
++ return {boost::none};
+ }
+
+ _metrics.resize(0);
+@@ -107,7 +107,7 @@
+ }
+
+ // The buffer is not full, inform the caller
+- return {boost::none_t()};
++ return {boost::none};
+ }
+
+ StatusWith<std::tuple<ConstDataRange, Date_t>> FTDCCompressor::getCompressedSamples() {
+--- mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor_test.cpp
++++ mongodb-src-r3.2.4/src/mongo/db/ftdc/compressor_test.cpp
+@@ -122,7 +122,7 @@
+ TestTie() : _compressor(&_config) {}
+
+ ~TestTie() {
+- validate(boost::none_t());
++ validate(boost::none);
+ }
+
+ StatusWith<boost::optional<std::tuple<ConstDataRange, FTDCCompressor::CompressorState, Date_t>>>
+--- mongodb-src-r3.2.4/src/mongo/db/ftdc/file_writer.cpp
++++ mongodb-src-r3.2.4/src/mongo/db/ftdc/file_writer.cpp
+@@ -205,7 +205,7 @@
+
+ Status FTDCFileWriter::close() {
+ if (_archiveStream.is_open()) {
+- Status s = flush(boost::none_t(), Date_t());
++ Status s = flush(boost::none, Date_t());
+
+ _archiveStream.close();
+
+--- mongodb-src-r3.2.4/src/mongo/util/concurrency/shared_mutex_win.hpp
++++ mongodb-src-r3.2.4/src/mongo/util/concurrency/shared_mutex_win.hpp
+@@ -175,7 +175,7 @@
+ return true;
+ }
+
+- unsigned long const res=detail::win32::WaitForSingleObject(unlock_sem,::boost::detail::get_milliseconds_until(wait_until));
++ unsigned long const res=WaitForSingleObject(unlock_sem,::boost::detail::get_milliseconds_until(wait_until));
+ if(res==detail::win32::timeout)
+ {
+ for(;;)
+@@ -328,7 +328,7 @@
+ {
+ return true;
+ }
+- unsigned long const wait_res=detail::win32::WaitForMultipleObjects(2,semaphores,true,::boost::detail::get_milliseconds_until(wait_until));
++ unsigned long const wait_res=WaitForMultipleObjects(2,semaphores,true,::boost::detail::get_milliseconds_until(wait_until));
+ if(wait_res==detail::win32::timeout)
+ {
+ for(;;)
+@@ -421,7 +421,7 @@
+ return;
+ }
+
+- BOOST_VERIFY(!detail::win32::WaitForSingleObject(unlock_sem,detail::win32::infinite));
++ BOOST_VERIFY(!WaitForSingleObject(unlock_sem,detail::win32::infinite));
+ }
+ }
+
+@@ -502,7 +502,7 @@
+ {
+ if(!last_reader)
+ {
+- BOOST_VERIFY(!detail::win32::WaitForSingleObject(upgrade_sem,detail::win32::infinite));
++ BOOST_VERIFY(!WaitForSingleObject(upgrade_sem,detail::win32::infinite));
+ }
+ break;
+ }
diff --git a/dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch b/dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch
new file mode 100644
index 00000000..868ba73e
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch
@@ -0,0 +1,38 @@
+From e245cac2b3c18015dee8caddd449532785d15c2b Mon Sep 17 00:00:00 2001
+From: Jason Carey <jcarey@argv.me>
+Date: Mon, 26 Jun 2017 11:09:10 -0400
+Subject: [PATCH] SERVER-29855 Pull major/minor from sys/sysmacros.h
+
+Per newer versions of glibc:
+
+----
+error: In the GNU C Library, "major" is defined
+ by <sys/sysmacros.h>. For historical compatibility, it is
+ currently defined by <sys/types.h> as well, but we plan to
+ remove this soon. To use "major", include <sys/sysmacros.h>
+ directly. If you did not intend to use a system-defined macro
+ "major", you should undefine it after including <sys/types.h>. [-Werror]
+ string path = str::stream() << "/sys/dev/block/" << major(dev) << ':' << minor(dev)
+----
+
+Including <sys/sysmacros.h> appears to be the correct solution to quiet
+the warning
+---
+ src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
+index 5a784b25dc7..c43e148d3f4 100644
+--- a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
++++ b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
+@@ -36,6 +36,10 @@
+ #include <boost/filesystem/path.hpp>
+ #include <fstream>
+
++#ifdef __linux__
++#include <sys/sysmacros.h>
++#endif
++
+ #include "mongo/db/mongod_options.h"
+ #include "mongo/db/storage/mmap_v1/data_file_sync.h"
+ #include "mongo/db/storage/mmap_v1/dur.h"
diff --git a/dev-db/mongodb/files/mongodb.conf-r2 b/dev-db/mongodb/files/mongodb.conf-r2
new file mode 100644
index 00000000..8e8a6440
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.conf-r2
@@ -0,0 +1,33 @@
+# !! IMPORTANT !!
+#
+# This file uses the YAML format as described in the documentation:
+# http://docs.mongodb.org/manual/reference/configuration-options/
+
+storage:
+ dbPath: "/var/lib/mongodb"
+
+systemLog:
+ destination: file
+ path: "/var/log/mongodb/mongodb.log"
+ quiet: true
+ logAppend: true
+
+net:
+ port: 27017
+ bindIp: 127.0.0.1
+# ssl:
+# mode: disabled
+
+#security:
+ #keyFile:
+ #clusterAuthMode:
+
+#replication:
+ #replSetName:
+
+# Specifies one of the MongoDB parameters described here:
+# http://docs.mongodb.org/manual/reference/parameters/
+#
+# You can specify multiple setParameter fields such as:
+# setParameter: {enableTestCommands: 1}
+#setParameter:
diff --git a/dev-db/mongodb/files/mongodb.conf-r3 b/dev-db/mongodb/files/mongodb.conf-r3
new file mode 100644
index 00000000..83b4cc05
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.conf-r3
@@ -0,0 +1,34 @@
+# !! IMPORTANT !!
+#
+# This file uses the YAML format as described in the documentation:
+# http://docs.mongodb.org/manual/reference/configuration-options/
+
+storage:
+ dbPath: "/var/lib/mongodb"
+ #engine: wiredTiger
+
+systemLog:
+ destination: file
+ path: "/var/log/mongodb/mongodb.log"
+ quiet: true
+ logAppend: true
+
+net:
+ port: 27017
+ bindIp: 127.0.0.1
+ #ssl:
+ # mode: disabled
+
+#security:
+ #keyFile:
+ #clusterAuthMode:
+
+#replication:
+ #replSetName:
+
+# Specifies one of the MongoDB parameters described here:
+# http://docs.mongodb.org/manual/reference/parameters/
+#
+# You can specify multiple setParameter fields such as:
+# setParameter: {enableTestCommands: 1}
+#setParameter:
diff --git a/dev-db/mongodb/files/mongodb.confd-r2 b/dev-db/mongodb/files/mongodb.confd-r2
new file mode 100644
index 00000000..3a7a9615
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.confd-r2
@@ -0,0 +1,12 @@
+# !! IMPORTANT !!
+#
+# This file is ONLY used to override some of the init script configuration.
+#
+# You should NOT use this file to configure your mongodb instance,
+# see the /etc/mongodb.conf file instead.
+#
+# Available init script modifiers :
+# - config_file : the configuration file to use (default : /etc/mongodb.conf)
+# - user : the user used to run your mongodb instance (default : mongodb)
+# - group : the group used to run your mongodb instance (default : mongodb)
+# - run_dir : the run directory for your PID files (default : /var/run/mongodb)
diff --git a/dev-db/mongodb/files/mongodb.initd-r2 b/dev-db/mongodb/files/mongodb.initd-r2
new file mode 100644
index 00000000..d8b96a8f
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.initd-r2
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+config_file=${config_file:-/etc/${SVCNAME}.conf}
+run_dir=${run_dir:-/var/run/mongodb}
+
+command="/usr/bin/mongod"
+command_args="--config ${config_file}"
+command_background="true"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${user:-mongodb}
+group=${group:-mongodb}
+start_stop_daemon_args="--user ${user} --group ${group}"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+ if [ ! -f ${config_file} ]; then
+ eerror "Missing configuration file ${config_file}"
+ return 1
+ fi
+}
diff --git a/dev-db/mongodb/files/mongodb.logrotate b/dev-db/mongodb/files/mongodb.logrotate
new file mode 100644
index 00000000..52a03b51
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.logrotate
@@ -0,0 +1,12 @@
+# Default log rotation
+/var/log/mongodb/*.log {
+ daily
+ rotate 14
+ dateext
+ copytruncate
+ delaycompress
+ compress
+ notifempty
+ extension gz
+ missingok
+}
diff --git a/dev-db/mongodb/files/mongodb.service b/dev-db/mongodb/files/mongodb.service
new file mode 100644
index 00000000..78d55118
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=High-performance, schema-free document-oriented database
+After=network.target
+
+[Service]
+User=mongodb
+ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-db/mongodb/files/mongos.conf-r2 b/dev-db/mongodb/files/mongos.conf-r2
new file mode 100644
index 00000000..fc006896
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.conf-r2
@@ -0,0 +1,30 @@
+# !! IMPORTANT !!
+#
+# This file uses the YAML format as described in the documentation:
+# http://docs.mongodb.org/manual/reference/configuration-options/
+
+systemLog:
+ destination: file
+ path: "/var/log/mongodb/mongos.log"
+ quiet: true
+ logAppend: true
+
+net:
+ port: 27017
+ bindIp: 127.0.0.1
+ ssl:
+ mode: disabled
+
+#security:
+ #keyFile:
+ #clusterAuthMode:
+
+#sharding:
+ #configDB:
+
+# Specifies one of the MongoDB parameters described here:
+# http://docs.mongodb.org/manual/reference/parameters/
+#
+# You can specify multiple setParameter fields such as:
+# setParameter: {enableTestCommands: 1}
+#setParameter:
diff --git a/dev-db/mongodb/files/mongos.confd-r2 b/dev-db/mongodb/files/mongos.confd-r2
new file mode 100644
index 00000000..0d42e8a1
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.confd-r2
@@ -0,0 +1,12 @@
+# !! IMPORTANT !!
+#
+# This file is ONLY used to override some of the init script configuration.
+#
+# You should NOT use this file to configure your mongos instance,
+# see the /etc/mongos.conf file instead.
+#
+# Available init script modifiers :
+# - config_file : the configuration file to use (default : /etc/mongos.conf)
+# - user : the user used to run your mongodb instance (default : mongodb)
+# - group : the group used to run your mongodb instance (default : mongodb)
+# - run_dir : the run directory for your PID files (default : /var/run/mongodb)
diff --git a/dev-db/mongodb/files/mongos.initd-r2 b/dev-db/mongodb/files/mongos.initd-r2
new file mode 100644
index 00000000..7b877d13
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.initd-r2
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+config_file=${config_file:-/etc/${SVCNAME}.conf}
+run_dir=${run_dir:-/var/run/mongodb}
+
+command="/usr/bin/mongos"
+command_args="--config ${config_file}"
+command_background="true"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${user:-mongodb}
+group=${group:-mongodb}
+start_stop_daemon_args="--user ${user} --group ${group}"
+
+depend() {
+ use net
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+ if [ ! -f ${config_file} ]; then
+ eerror "Missing configuration file ${config_file}"
+ return 1
+ fi
+}
diff --git a/dev-db/mongodb/mongodb-3.0.14.ebuild b/dev-db/mongodb/mongodb-3.0.14.ebuild
new file mode 100644
index 00000000..1d3836f0
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.0.14.ebuild
@@ -0,0 +1,179 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M" # Less if stripped binaries are installed.
+CHECKREQS_MEMORY="640" # Default 1024M, but builds on RPi with ~700M available...
+
+inherit eutils flag-o-matic multilib pax-utils scons-utils systemd toolchain-funcs user versionator check-reqs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="http://www.mongodb.org"
+SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug kerberos libressl mms-agent +mongos ssl systemd +tools"
+
+RDEPEND="app-arch/snappy
+ >=dev-cpp/yaml-cpp-0.5.1
+ >=dev-libs/boost-1.57[threads(+)]
+ >=dev-libs/libpcre-8.39[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ sys-libs/zlib
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ >=sys-devel/gcc-4.8.2:*
+ sys-libs/ncurses
+ sys-libs/readline
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.0.14-fix-scons.patch"
+ "${FILESDIR}/${PN}-3.0.14-fix-std-string.patch"
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+)
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ # Maintainer notes
+ #
+ # --use-system-tcmalloc is strongly NOT recommended:
+ # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
+ #
+ # --c++11 is required by scons instead of auto detection:
+ # https://jira.mongodb.org/browse/SERVER-19661
+
+ scons_opts=(
+ --variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX) --c++11
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ )
+
+ if use debug; then
+ scons_opts+=( --dbg=on )
+ fi
+
+ if use prefix; then
+ scons_opts+=(
+ --cpppath="${EPREFIX}/usr/include"
+ --libpath="${EPREFIX}/usr/$(get_libdir)"
+ )
+ fi
+
+ if use kerberos; then
+ scons_opts+=( --use-sasl-client )
+ fi
+
+ if use ssl; then
+ scons_opts+=( --ssl )
+ fi
+}
+
+src_compile() {
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+ escons "${scons_opts[@]}" core tools || die
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr || die
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ done
+
+ doman debian/mongo*.1
+ #dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r2" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ use systemd && systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+
+ if ! use mongos; then
+ rm "${ED}"/etc/mongos.conf "${ED}"/etc/init.d/mongos "${ED}"/usr/share/man/man1/mongos.1* "${ED}"/usr/bin/mongos ||
+ die "Error removing mongo shard elements: ${?}"
+ fi
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+src_test() {
+ escons "${scons_opts[@]}" unittests || die
+
+ # tests fail
+ sed -i '/\/util\/options_parser\/options_parser_test/d' build/unittests.txt || die
+ sed -i '/\/mongo\/server_options_test/d' build/unittests.txt || die
+
+ local x
+ while read x; do
+ einfo "Running test $x"
+ ./$x || die
+ done < build/unittests.txt
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3.0 ${v}; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "${PN} configuration files have changed !"
+ ewarn " "
+ ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
+ ewarn " "
+ ewarn "Make sure you also follow the upgrading process :"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+ ewarn " "
+ ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+ ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+ ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+ break
+ fi
+ done
+}
diff --git a/dev-db/mongodb/mongodb-3.2.16.ebuild b/dev-db/mongodb/mongodb-3.2.16.ebuild
new file mode 100644
index 00000000..228a7cd2
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.2.16.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M" # Less if stripped binaries are installed.
+CHECKREQS_MEMORY="640" # Default 1024M, but builds on RPi with ~700M available...
+
+inherit eutils flag-o-matic multilib pax-utils scons-utils systemd toolchain-funcs user versionator check-reqs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="http://www.mongodb.org"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz
+ arm? ( https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/38.8.0esr/source/firefox-38.8.0esr.source.tar.bz2 )"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~arm"
+IUSE="debug kerberos libressl mms-agent +mongos ssl systemd test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.2
+ >=dev-cpp/yaml-cpp-0.5.1
+ >=dev-libs/boost-1.57[threads(+)]
+ >=dev-libs/libpcre-8.39[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )"
+DEPEND="${RDEPEND}
+ >=sys-devel/gcc-4.8.2:*
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo
+ dev-python/pyyaml
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
+ ewarn "To upgrade an existing MongoDB deployment to 3.2, you must be"
+ ewarn "running a 3.0-series release. Please update to the latest 3.0"
+ ewarn "release before continuing if wish to keep your data."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ # Maintainer notes
+ #
+ # --use-system-tcmalloc is strongly NOT recommended:
+ # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
+
+ scons_opts=(
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+
+ --disable-warnings-as-errors
+ --use-system-boost
+ --use-system-pcre
+ --use-system-snappy
+ --use-system-stemmer
+ --use-system-yaml
+ --use-system-zlib
+ )
+
+ # wiredtiger not supported on 32bit platforms #572166
+ if use x86 || use arm; then
+ scons_opts+=( --wiredtiger=off --mmapv1=on )
+ fi
+
+ if use debug; then
+ scons_opts+=( --dbg=on )
+ fi
+
+ if use prefix; then
+ scons_opts+=(
+ --cpppath="${EPREFIX}/usr/include"
+ --libpath="${EPREFIX}/usr/$(get_libdir)"
+ )
+ fi
+
+ if use kerberos; then
+ scons_opts+=( --use-sasl-client )
+ fi
+
+ if use ssl; then
+ scons_opts+=( --ssl )
+ fi
+}
+
+src_prepare() {
+ mv "${WORKDIR}"/mozilla-esr38 "${S}"/src/third_party/mozjs-38/mozilla-release || die
+
+ epatch \
+ "${FILESDIR}/${PN}-3.2.0-fix-scons.patch" \
+ "${FILESDIR}/${PN}-3.2.4-boost-1.60.patch" \
+ "${FILESDIR}/${PN}-3.2.16-Replace-string-with-explicit-std-string.patch"
+ if has_version ">=dev-libs/boost-1.62"; then
+ epatch "${FILESDIR}/${PN}-3.2.10-boost-1.62.patch"
+ fi
+ epatch_user
+}
+
+src_compile() {
+ if use arm; then
+ pushd src/third_party/mozjs-38/ >/dev/null || die "chdir() to src/third_party/mozjs-38 failed: ${?}"
+ ./gen-config.sh arm linux || die "Configuration for ARM failed: ${?}"
+ popd >/dev/null
+ fi
+
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+ escons "${scons_opts[@]}" core tools || die
+}
+
+src_install() {
+ escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr || die
+
+ local x
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ done
+
+ doman debian/mongo*.1
+ #dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r2" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ use systemd && systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+
+ if ! use mongos; then
+ rm "${ED}"/etc/mongos.conf "${ED}"/etc/init.d/mongos "${ED}"/usr/share/man/man1/mongos.1* "${ED}"/usr/bin/mongos ||
+ die "Error removing mongo shard elements: ${?}"
+ fi
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+src_test() {
+ # this one test fails
+ rm jstests/core/repl_write_threads_start_param.js
+
+ ./buildscripts/resmoke.py --dbpathPrefix=test --suites core || die "Tests failed"
+}
+
+pkg_postinst() {
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 3.0 ${v}; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "${PN} configuration files have changed !"
+ ewarn " "
+ ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
+ ewarn " "
+ ewarn "Make sure you also follow the upgrading process :"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+ ewarn " "
+ ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+ ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+ ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+ break
+ fi
+ done
+
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.org/manual/release-notes/3.2/"
+ ewarn " https://docs.mongodb.org/master/release-notes/3.2-upgrade/"
+ ewarn
+ ewarn " Starting in 3.2, MongoDB uses the WiredTiger as the default storage engine."
+}