aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2013-03-29 08:56:13 +0000
committerAlex Dupre <ale@FreeBSD.org>2013-03-29 08:56:13 +0000
commit62166b29b30b86fcbf9b04b69e1b1bf11965b16f (patch)
tree6f87c1c82c1e497b2b3d31d3b77b31dab36589e9
parent0d883f21c44f82b8069695ddbc8e08ee5fb56d52 (diff)
downloadports-62166b29b30b86fcbf9b04b69e1b1bf11965b16f.tar.gz
ports-62166b29b30b86fcbf9b04b69e1b1bf11965b16f.zip
Notes
-rw-r--r--databases/mongodb/Makefile58
-rw-r--r--databases/mongodb/distinfo4
-rw-r--r--databases/mongodb/files/mongod.in64
-rw-r--r--databases/mongodb/files/patch-SConstruct93
-rw-r--r--databases/mongodb/files/patch-boost-1.52215
-rw-r--r--databases/mongodb/files/patch-src_mongo_SConscript29
-rw-r--r--databases/mongodb/files/patch-src_mongo_scripting_engine_spidermonkey.cpp11
-rw-r--r--databases/mongodb/files/patch-src_mongo_scripting_engine_spidermonkey.h11
-rw-r--r--databases/mongodb/files/patch-src_mongo_util_net_ssl_manager.cpp20
-rw-r--r--databases/mongodb/pkg-plist208
10 files changed, 318 insertions, 395 deletions
diff --git a/databases/mongodb/Makefile b/databases/mongodb/Makefile
index 081058d5e320..0b49ac54c966 100644
--- a/databases/mongodb/Makefile
+++ b/databases/mongodb/Makefile
@@ -2,29 +2,35 @@
# $FreeBSD$
PORTNAME= mongodb
-PORTVERSION= 2.2.3
+PORTVERSION= 2.4.1
CATEGORIES= databases net
MASTER_SITES= http://downloads.mongodb.org/src/
DISTNAME= ${PORTNAME}-src-r${PORTVERSION}
-MAINTAINER= mail@derzinn.de
+MAINTAINER= ale@FreeBSD.org
COMMENT= NOSQL distributed document-oriented database
-LIB_DEPENDS= boost_system:${PORTSDIR}/devel/boost-libs \
- execinfo.1:${PORTSDIR}/devel/libexecinfo \
- nspr4:${PORTSDIR}/devel/nspr \
+# mongodb is AGPLv3, C++ driver is AL2
+LICENSE= AGPLv3 AL2
+LICENSE_COMB= multi
+
+LIB_DEPENDS= execinfo:${PORTSDIR}/devel/libexecinfo \
pcre:${PORTSDIR}/devel/pcre \
snappy:${PORTSDIR}/archivers/snappy
+# boost 1.52 from ports make mongod segfaulting with many tests
+# LIB_DEPENDS+= boost_system:${PORTSDIR}/devel/boost-libs
+# SCONS_ARGS+= --use-system-boost
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= "not yet ported to anything other than i386 and amd64"
-OPTIONS_DEFINE= V8
-V8_DESC= Use v8 instead of spider monkey for javascript
+OPTIONS_DEFINE= SM SSL TEST
+OPTIONS_DEFAULT=SSL
+SM_DESC= Use SpiderMonkey instead of V8 for JavaScript
+TEST_DESC= Add support for running regression test
USE_SCONS= yes
-SCONS_TARGET= all
-SCONS_ARGS= --prefix=${PREFIX} --cxx=${CXX} --cpp=${CPP} --use-system-all --ssl
+SCONS_ARGS= --prefix=${PREFIX} --cc=${CC} --cxx=${CXX} --use-system-pcre --use-system-snappy
USERS= mongodb
GROUPS= mongodb
@@ -33,17 +39,43 @@ USE_RC_SUBR= mongod
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MV8}
-SCONS_ARGS+= --usev8
+.if ${PORT_OPTIONS:MSM}
+SCONS_ARGS+= --usesm --use-system-sm
+LIB_DEPENDS+= js:${PORTSDIR}/lang/spidermonkey17
+.else
+SCONS_ARGS+= --usev8 --use-system-v8
LIB_DEPENDS+= v8:${PORTSDIR}/lang/v8
+.endif
+
+.if ${PORT_OPTIONS:MSSL}
+USE_OPENSSL= yes
+SCONS_ARGS+= --ssl
+.endif
+
+.if ${PORT_OPTIONS:MTEST}
+BUILD_DEPENDS= pymongo>=2.5:${PORTSDIR}/databases/pymongo
+SCONS_TARGET= all
+SMOKE_TESTS= smokeAll smokeCppUnittests
+. if ${PORT_OPTIONS:MSSL}
+SMOKE_TESTS+= smokeSsl
+. endif
.else
-SCONS_ARGS+= --usesm
-LIB_DEPENDS+= js:${PORTSDIR}/lang/spidermonkey17
+SCONS_TARGET= core tools
.endif
+post-patch:
+ @${REINPLACE_CMD} 's/\["-O3"\]/"${CFLAGS}"/' \
+ ${WRKSRC}/SConstruct
+
post-install:
@if [ ! -f ${PREFIX}/etc/mongodb.conf ]; then \
${TOUCH} ${PREFIX}/etc/mongodb.conf ; \
fi
+.if ${PORT_OPTIONS:MTEST}
+test: build-depends build
+ @cd ${BUILD_WRKSRC} && \
+ ${SCONS_BIN} ${SCONS_ENV} ${SCONS_ARGS} ${SMOKE_TESTS}
+.endif
+
.include <bsd.port.mk>
diff --git a/databases/mongodb/distinfo b/databases/mongodb/distinfo
index 825b588a036f..cb582529a8fd 100644
--- a/databases/mongodb/distinfo
+++ b/databases/mongodb/distinfo
@@ -1,2 +1,2 @@
-SHA256 (mongodb-src-r2.2.3.tar.gz) = dd292c73f8182eb201ae4dd4bd7132c79c56247a7bc4fcde9d09a5bc6c74978d
-SIZE (mongodb-src-r2.2.3.tar.gz) = 10178451
+SHA256 (mongodb-src-r2.4.1.tar.gz) = d61ad944b8f27e0efb9a08998cbda587ee5d1a4406a938443e681502738da3b2
+SIZE (mongodb-src-r2.4.1.tar.gz) = 14101118
diff --git a/databases/mongodb/files/mongod.in b/databases/mongodb/files/mongod.in
index 272ecbea3ca7..a06b88ff5226 100644
--- a/databases/mongodb/files/mongod.in
+++ b/databases/mongodb/files/mongod.in
@@ -7,45 +7,55 @@
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
-# mongod_enable (bool): Set to NO by default.
-# Set it to YES to enable mongod.
+# mongod_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable mongod.
+# mongod_limits (bool): Set to "NO" by default.
+# Set it to yes to run `limits -e -U mongodb`
+# just before mongod starts.
+# mongod_dbpath (str): Default to "/var/db/mongodb"
+# Base database directory.
+# mongod_pidfile (str): Custum PID file path and name.
+# Default to "${mongod_dbpath}/mongod.pid".
+# mongod_flags (str): Custom additional arguments to be passed to mongod.
+# Default to "--logpath ${mongod_dbpath}/mongod.log --logappend".
#
-# Additional configurable variables:
-# mongod_config (path): Set to %%PREFIX%%/etc/mongodb.conf
-# by default. Additional configuration. You
-# can also use mongod_flags for additional
-# command line arguments.
-# mongod_dbpath (path): Set to /var/db/mongodb by default
-# mongod_user (username): Set to "mongodb" by default
. /etc/rc.subr
name="mongod"
rcvar=mongod_enable
-command=%%PREFIX%%/bin/${name}
-
load_rc_config $name
: ${mongod_enable="NO"}
-: ${mongod_config="%%PREFIX%%/etc/mongodb.conf"}
+: ${mongod_limits="NO"}
: ${mongod_dbpath="/var/db/mongodb"}
+: ${mongod_flags="--logpath ${mongod_dbpath}/mongod.log --logappend"}
: ${mongod_user="mongodb"}
+: ${mongod_group="mongodb"}
-# Note: if you use a config file for mongodb,
-# the parameters passed on cl override the config file
-# ie, dbpath, logappend, logpath etc in the command_args below.
-# This means that your config file will be ignored unless
-# you comment out remove the cl parameters.
-#
-# Using config file: uncomment the following line AND comment out
-# the next line.
-
-# command_args="-f $mongod_config"
-
-command_args="-f $mongod_config --dbpath $mongod_dbpath --logappend --logpath $mongod_dbpath/mongod.log --fork"
-
-required_dirs=${mongod_dbpath}
+pidfile=${mongod_pidfile:-"${mongod_dbpath}/mongod.pid"}
+command=%%PREFIX%%/bin/${name}
+command_args="--config %%PREFIX%%/etc/mongodb.conf --dbpath $mongod_dbpath --pidfilepath ${pidfile} --fork"
+start_precmd="${name}_prestart"
+
+mongod_create_dbpath()
+{
+ mkdir ${mongod_dbpath} >/dev/null 2>/dev/null
+ [ $? -eq 0 ] && chown -R ${mongod_user}:${mongod_group} ${mongod_dbpath}
+}
+
+
+mongod_prestart()
+{
+ if [ ! -d ${mongod_dbpath} ]; then
+ mongod_create_dbpath || return 1
+ fi
+ if checkyesno mongod_limits; then
+ eval `/usr/bin/limits -e -U ${mongod_user}` 2>/dev/null
+ else
+ return 0
+ fi
+}
run_rc_command "$1"
-
diff --git a/databases/mongodb/files/patch-SConstruct b/databases/mongodb/files/patch-SConstruct
index 1afbf3cc91db..7fccb9f6a9fb 100644
--- a/databases/mongodb/files/patch-SConstruct
+++ b/databases/mongodb/files/patch-SConstruct
@@ -1,7 +1,15 @@
-diff -ru ./SConstruct ../../mongodb-src-r2.2.0/SConstruct
---- ./SConstruct 2012-08-28 09:28:11.000000000 +0400
-+++ ../../mongodb-src-r2.2.0/SConstruct 2012-10-14 14:04:31.000000000 +0400
-@@ -790,6 +790,20 @@
+--- SConstruct.orig 2013-03-22 20:55:25.000000000 +0100
++++ SConstruct 2013-03-26 20:22:38.000000000 +0100
+@@ -702,7 +702,7 @@
+ env.Append( LIBS=[] )
+
+ #make scons colorgcc friendly
+- for key in ('HOME', 'TERM'):
++ for key in ('HOME', 'TERM', 'PATH', 'CCACHE_DIR'):
+ try:
+ env['ENV'][key] = os.environ[key]
+ except KeyError:
+@@ -805,6 +805,20 @@
print( "c++ compiler not installed!" )
Exit(1)
@@ -15,85 +23,10 @@ diff -ru ./SConstruct ../../mongodb-src-r2.2.0/SConstruct
+ if not conf.CheckLib("snappy"):
+ Exit(1)
+
-+ if use_system_version_of_library("js"):
++ if usesm and use_system_version_of_library("js"):
+ if not conf.CheckLib("js"):
+ Exit(1)
+
if use_system_version_of_library("boost"):
if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ):
print( "can't find boost headers" )
-@@ -1100,7 +1114,7 @@
- Export("has_option use_system_version_of_library")
- Export("installSetup")
- Export("usesm usev8")
--Export("darwin windows solaris linux nix")
-+Export("darwin windows solaris linux nix freebsd")
-
- env.SConscript( 'src/SConscript', variant_dir='$BUILD_DIR', duplicate=False )
- env.SConscript( 'src/SConscript.client', variant_dir='$BUILD_DIR/client_build', duplicate=False )
-diff -ru ./src/SConscript.client ../../mongodb-src-r2.2.0/src/SConscript.client
---- ./src/SConscript.client 2012-08-28 09:28:11.000000000 +0400
-+++ ../../mongodb-src-r2.2.0/src/SConscript.client 2012-10-14 16:48:25.000000000 +0400
-@@ -134,7 +134,7 @@
- # install
- prefix = GetOption("prefix")
-
--env.Install(prefix + "/lib", '${LIBPREFIX}mongoclient${LIBSUFFIX}')
-+env.InstallAs(prefix + "/lib", '${LIBPREFIX}mongoclient${LIBSUFFIX}')
-
- for x in clientHeaderDirectories:
- env.Install(prefix + "/include/mongo/" + x,
-diff -ru ./src/mongo/SConscript ../../mongodb-src-r2.2.0/src/mongo/SConscript
---- ./src/mongo/SConscript 2012-08-28 09:28:11.000000000 +0400
-+++ ../../mongodb-src-r2.2.0/src/mongo/SConscript 2012-10-14 21:34:12.000000000 +0400
-@@ -11,7 +11,7 @@
- Import("has_option")
- Import("usesm usev8")
- Import("installSetup")
--Import("darwin windows solaris linux nix")
-+Import("darwin windows solaris linux nix freebsd")
-
- env.SConscript(['platform/SConscript',
- 'unittest/SConscript'])
-@@ -170,7 +170,7 @@
-
- if usesm:
- env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_spidermonkey.cpp'],
-- LIBDEPS=['$BUILD_DIR/third_party/js-1.7/js', 'bson_template_evaluator'])
-+ LIBDEPS=['bson_template_evaluator'], CPPDEFINES=["XP_UNIX"])
- elif usev8:
- env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_v8.cpp',
- 'scripting/v8_db.cpp',
-@@ -519,7 +519,7 @@
- if (not has_option( "no-glibc-check" ) and linux and "s3dist" in COMMAND_LINE_TARGETS):
- e.AddPostAction( name, checkGlibc )
-
-- if (solaris or linux) and (not has_option("nostrip")):
-+ if (solaris or linux or freebsd) and (not has_option("nostrip")):
- name = e.Command('stripped/%s' % name, name, Copy('$TARGET', '$SOURCE'))[0]
- e.AddPostAction(name, 'strip $TARGET')
-
-diff -ru ./src/mongo/scripting/engine_spidermonkey.cpp ../../mongodb-src-r2.2.0/src/mongo/scripting/engine_spidermonkey.cpp
---- ./src/mongo/scripting/engine_spidermonkey.cpp 2012-08-28 09:28:11.000000000 +0400
-+++ ../../mongodb-src-r2.2.0/src/mongo/scripting/engine_spidermonkey.cpp 2012-10-14 21:34:33.000000000 +0400
-@@ -25,7 +25,7 @@
- #include <boost/date_time/posix_time/posix_time.hpp>
- #endif
-
--#include <third_party/js-1.7/jsdate.h>
-+#include <jsdate.h>
-
- #include "mongo/util/mongoutils/str.h"
-
-diff -ru ./src/mongo/scripting/engine_spidermonkey.h ../../mongodb-src-r2.2.0/src/mongo/scripting/engine_spidermonkey.h
---- ./src/mongo/scripting/engine_spidermonkey.h 2012-08-28 09:28:11.000000000 +0400
-+++ ../../mongodb-src-r2.2.0/src/mongo/scripting/engine_spidermonkey.h 2012-10-14 21:35:21.000000000 +0400
-@@ -29,7 +29,7 @@
- #define JS_PUBLIC_DATA(t) t
- #endif
-
--#include <third_party/js-1.7/jsapi.h>
-+#include <jsapi.h>
-
- // END inc hacking
-
diff --git a/databases/mongodb/files/patch-boost-1.52 b/databases/mongodb/files/patch-boost-1.52
deleted file mode 100644
index 60bb474f93f6..000000000000
--- a/databases/mongodb/files/patch-boost-1.52
+++ /dev/null
@@ -1,215 +0,0 @@
---- src/mongo/db/db.cpp 2012-08-28 08:28:11.000000000 +0300
-+++ src/mongo/db/db.cpp 2012-10-21 18:25:50.000000000 +0300
-@@ -348,7 +348,7 @@
- boost::filesystem::path path( dbpath );
- for ( boost::filesystem::directory_iterator i( path );
- i != boost::filesystem::directory_iterator(); ++i ) {
-- string fileName = boost::filesystem::path(*i).leaf();
-+ string fileName = boost::filesystem::path(*i).leaf().string();
- if ( boost::filesystem::is_directory( *i ) &&
- fileName.length() && fileName[ 0 ] == '$' )
- boost::filesystem::remove_all( *i );
-@@ -748,11 +748,11 @@
- dbExecCommand = argv[0];
-
- srand(curTimeMicros());
--#if( BOOST_VERSION >= 104500 )
-- boost::filesystem::path::default_name_check( boost::filesystem2::no_check );
--#else
-- boost::filesystem::path::default_name_check( boost::filesystem::no_check );
--#endif
-+// #if( BOOST_VERSION >= 104500 )
-+// boost::filesystem::path::default_name_check( boost::filesystem2::no_check );
-+// #else
-+// boost::filesystem::path::default_name_check( boost::filesystem::no_check );
-+// #endif
-
- {
- unsigned x = 0x12345678;
-@@ -1083,7 +1083,7 @@
- if (params.count("shutdown")){
- bool failed = false;
-
-- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string();
-+ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).string();
- if ( !boost::filesystem::exists( name ) || boost::filesystem::file_size( name ) == 0 )
- failed = true;
-
---- src/mongo/db/dur.cpp 2012-08-28 08:28:11.000000000 +0300
-+++ src/mongo/db/dur.cpp 2012-10-21 18:25:50.000000000 +0300
-@@ -770,7 +770,7 @@
-
- bool samePartition = true;
- try {
-- const string dbpathDir = boost::filesystem::path(dbpath).native_directory_string();
-+ const string dbpathDir = boost::filesystem::path(dbpath).string();
- samePartition = onSamePartition(getJournalDir().string(), dbpathDir);
- }
- catch(...) {
---- src/mongo/db/dur_journal.cpp 2012-08-28 08:28:11.000000000 +0300
-+++ src/mongo/db/dur_journal.cpp 2012-10-21 18:25:50.000000000 +0300
-@@ -176,7 +176,7 @@
- for ( boost::filesystem::directory_iterator i( getJournalDir() );
- i != boost::filesystem::directory_iterator();
- ++i ) {
-- string fileName = boost::filesystem::path(*i).leaf();
-+ string fileName = boost::filesystem::path(*i).leaf().string();
- if( anyFiles || str::startsWith(fileName, "j._") )
- return true;
- }
-@@ -194,7 +194,7 @@
- for ( boost::filesystem::directory_iterator i( getJournalDir() );
- i != boost::filesystem::directory_iterator();
- ++i ) {
-- string fileName = boost::filesystem::path(*i).leaf();
-+ string fileName = boost::filesystem::path(*i).leaf().string();
- if( str::startsWith(fileName, "j._") ) {
- try {
- removeOldJournalFile(*i);
---- src/mongo/db/dur_recover.cpp 2012-08-28 08:28:11.000000000 +0300
-+++ src/mongo/db/dur_recover.cpp 2012-10-21 18:25:50.000000000 +0300
-@@ -72,7 +72,7 @@
- i != boost::filesystem::directory_iterator();
- ++i ) {
- boost::filesystem::path filepath = *i;
-- string fileName = boost::filesystem::path(*i).leaf();
-+ string fileName = boost::filesystem::path(*i).leaf().string();
- if( str::startsWith(fileName, "j._") ) {
- unsigned u = str::toUnsigned( str::after(fileName, '_') );
- if( m.count(u) ) {
-@@ -85,7 +85,7 @@
- if( i != m.begin() && m.count(i->first - 1) == 0 ) {
- uasserted(13532,
- str::stream() << "unexpected file in journal directory " << dir.string()
-- << " : " << boost::filesystem::path(i->second).leaf() << " : can't find its preceeding file");
-+ << " : " << boost::filesystem::path(i->second).leaf().string() << " : can't find its preceeding file");
- }
- files.push_back(i->second);
- }
---- src/mongo/db/instance.cpp 2012-08-28 08:28:11.000000000 +0300
-+++ work/mongodb-src-r2.2.0/src/mongo/db/instance.cpp 2012-10-21 18:25:50.000000000 +0300
-@@ -833,13 +833,13 @@
- i != boost::filesystem::directory_iterator(); ++i ) {
- if ( directoryperdb ) {
- boost::filesystem::path p = *i;
-- string dbName = p.leaf();
-+ string dbName = p.leaf().string();
- p /= ( dbName + ".ns" );
- if ( exists( p ) )
- names.push_back( dbName );
- }
- else {
-- string fileName = boost::filesystem::path(*i).leaf();
-+ string fileName = boost::filesystem::path(*i).leaf().string();
- if ( fileName.length() > 3 && fileName.substr( fileName.length() - 3, 3 ) == ".ns" )
- names.push_back( fileName.substr( 0, fileName.length() - 3 ) );
- }
-@@ -1102,7 +1102,7 @@
- }
-
- void acquirePathLock(bool doingRepair) {
-- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string();
-+ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).string();
-
- bool oldFile = false;
-
---- src/mongo/db/pdfile.cpp 2012-08-28 08:28:11.000000000 +0300
-+++ src/mongo/db/pdfile.cpp 2012-10-21 18:25:50.000000000 +0300
-@@ -1675,7 +1675,7 @@
- virtual bool apply( const Path &p ) {
- if ( !boost::filesystem::exists( p ) )
- return false;
-- boostRenameWrapper( p, newPath_ / ( p.leaf() + ".bak" ) );
-+ boostRenameWrapper( p, newPath_ / ( p.leaf().string() + ".bak" ) );
- return true;
- }
- virtual const char * op() const {
-@@ -1783,7 +1783,7 @@
- uniqueReservedPath( ( preserveClonedFilesOnFailure || backupOriginalFiles ) ?
- "backup" : "_tmp" );
- MONGO_ASSERT_ON_EXCEPTION( boost::filesystem::create_directory( reservedPath ) );
-- string reservedPathString = reservedPath.native_directory_string();
-+ string reservedPathString = reservedPath.string();
-
- bool res;
- {
---- src/mongo/dbtests/framework.cpp 2012-08-28 08:28:11.000000000 +0300
-+++ src/mongo/dbtests/framework.cpp 2012-10-21 18:25:50.000000000 +0300
-@@ -199,7 +199,7 @@
- boost::filesystem::create_directory(p);
- }
-
-- string dbpathString = p.native_directory_string();
-+ string dbpathString = p.string();
- dbpath = dbpathString.c_str();
-
- cmdLine.prealloc = false;
---- src/mongo/pch.h 2012-08-28 08:28:11.000000000 +0300
-+++ src/mongo/pch.h 2012-10-21 18:25:50.000000000 +0300
-@@ -44,7 +44,7 @@
- #include "string.h"
- #include "limits.h"
-
--#define BOOST_FILESYSTEM_VERSION 2
-+#define BOOST_FILESYSTEM_VERSION 3
- #include <boost/shared_ptr.hpp>
- #include <boost/smart_ptr.hpp>
- #include <boost/function.hpp>
---- src/mongo/shell/shell_utils_launcher.cpp 2012-08-28 08:28:11.000000000 +0300
-+++ src/mongo/shell/shell_utils_launcher.cpp 2012-10-21 18:25:50.000000000 +0300
-@@ -184,7 +184,7 @@
- }
- #endif
-
-- _argv.push_back( programPath.native_file_string() );
-+ _argv.push_back( programPath.string() );
-
- _port = -1;
-
---- src/mongo/tools/restore.cpp 2012-08-28 08:28:11.000000000 +0300
-+++ src/mongo/tools/restore.cpp 2012-10-21 18:25:50.000000000 +0300
-@@ -174,7 +174,7 @@
- log(2) << "drillDown: " << root.string() << endl;
-
- // skip hidden files and directories
-- if (root.leaf()[0] == '.' && root.leaf() != ".")
-+ if (root.leaf().string()[0] == '.' && root.leaf().string() != ".")
- return;
-
- if ( is_directory( root ) ) {
-@@ -255,7 +255,7 @@
-
- verify( ns.size() );
-
-- string oldCollName = root.leaf(); // Name of the collection that was dumped from
-+ string oldCollName = root.leaf().string(); // Name of the collection that was dumped from
- oldCollName = oldCollName.substr( 0 , oldCollName.find_last_of( "." ) );
- if (use_coll) {
- ns += "." + _coll;
-@@ -287,7 +287,7 @@
- if (!boost::filesystem::exists(metadataFile.string())) {
- // This is fine because dumps from before 2.1 won't have a metadata file, just print a warning.
- // System collections shouldn't have metadata so don't warn if that file is missing.
-- if (!startsWith(metadataFile.leaf(), "system.")) {
-+ if (!startsWith(metadataFile.leaf().string(), "system.")) {
- log() << metadataFile.string() << " not found. Skipping." << endl;
- }
- } else {
---- src/mongo/tools/tool.cpp 2012-08-28 08:28:11.000000000 +0300
-+++ src/mongo/tools/tool.cpp 2012-10-21 18:25:50.000000000 +0300
-@@ -118,11 +118,11 @@
- // we want durability to be disabled.
- cmdLine.dur = false;
-
--#if( BOOST_VERSION >= 104500 )
-- boost::filesystem::path::default_name_check( boost::filesystem2::no_check );
--#else
-- boost::filesystem::path::default_name_check( boost::filesystem::no_check );
--#endif
-+// #if( BOOST_VERSION >= 104500 )
-+// boost::filesystem::path::default_name_check( boost::filesystem2::no_check );
-+// #else
-+// boost::filesystem::path::default_name_check( boost::filesystem::no_check );
-+// #endif
-
- _name = argv[0];
diff --git a/databases/mongodb/files/patch-src_mongo_SConscript b/databases/mongodb/files/patch-src_mongo_SConscript
new file mode 100644
index 000000000000..5e65400269ca
--- /dev/null
+++ b/databases/mongodb/files/patch-src_mongo_SConscript
@@ -0,0 +1,29 @@
+--- src/mongo/SConscript.orig 2013-03-22 20:55:25.000000000 +0100
++++ src/mongo/SConscript 2013-03-25 17:46:04.000000000 +0100
+@@ -13,7 +13,7 @@ Import("has_option")
+ Import("usesm usev8")
+ Import("installSetup")
+ Import("enforce_glibc")
+-Import("darwin windows solaris linux nix")
++Import("darwin windows solaris linux freebsd nix")
+
+ env.SConscript(['base/SConscript',
+ 'db/auth/SConscript',
+@@ -310,7 +310,7 @@ env.CppUnitTest('bson_template_evaluator
+ if usesm:
+ env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_spidermonkey.cpp',
+ 'scripting/sm_db.cpp'],
+- LIBDEPS=['$BUILD_DIR/third_party/js-1.7/js', 'bson_template_evaluator'])
++ LIBDEPS=['bson_template_evaluator'], CPPDEFINES=["XP_UNIX"])
+ elif usev8:
+ env.StaticLibrary('scripting', scripting_common_files + ['scripting/engine_v8.cpp',
+ 'scripting/v8_db.cpp',
+@@ -765,7 +765,7 @@ def installBinary( e, name ):
+ if enforce_glibc:
+ e.AddPostAction( name, checkGlibc )
+
+- if (solaris or linux) and (not has_option("nostrip")):
++ if (solaris or linux or freebsd) and (not has_option("nostrip")):
+ name = e.Command('stripped/%s' % name, name, Copy('$TARGET', '$SOURCE'))[0]
+ e.AddPostAction(name, 'strip $TARGET')
+
diff --git a/databases/mongodb/files/patch-src_mongo_scripting_engine_spidermonkey.cpp b/databases/mongodb/files/patch-src_mongo_scripting_engine_spidermonkey.cpp
new file mode 100644
index 000000000000..4dc52b78869f
--- /dev/null
+++ b/databases/mongodb/files/patch-src_mongo_scripting_engine_spidermonkey.cpp
@@ -0,0 +1,11 @@
+--- src/mongo/scripting/engine_spidermonkey.cpp.orig 2013-03-15 19:59:55.000000000 +0100
++++ src/mongo/scripting/engine_spidermonkey.cpp 2013-03-22 17:54:19.000000000 +0100
+@@ -25,7 +25,7 @@
+ #include <boost/date_time/posix_time/posix_time.hpp>
+ #endif
+
+-#include <third_party/js-1.7/jsdate.h>
++#include <jsdate.h>
+
+ #include "mongo/scripting/engine_spidermonkey_internal.h"
+ #include "mongo/util/mongoutils/str.h"
diff --git a/databases/mongodb/files/patch-src_mongo_scripting_engine_spidermonkey.h b/databases/mongodb/files/patch-src_mongo_scripting_engine_spidermonkey.h
new file mode 100644
index 000000000000..0f9a5a4d92f3
--- /dev/null
+++ b/databases/mongodb/files/patch-src_mongo_scripting_engine_spidermonkey.h
@@ -0,0 +1,11 @@
+--- src/mongo/scripting/engine_spidermonkey.h.orig 2013-03-15 19:59:55.000000000 +0100
++++ src/mongo/scripting/engine_spidermonkey.h 2013-03-22 17:54:19.000000000 +0100
+@@ -29,7 +29,7 @@
+ #define JS_PUBLIC_DATA(t) t
+ #endif
+
+-#include <third_party/js-1.7/jsapi.h>
++#include <jsapi.h>
+
+ // END inc hacking
+
diff --git a/databases/mongodb/files/patch-src_mongo_util_net_ssl_manager.cpp b/databases/mongodb/files/patch-src_mongo_util_net_ssl_manager.cpp
new file mode 100644
index 000000000000..7877107aa5d4
--- /dev/null
+++ b/databases/mongodb/files/patch-src_mongo_util_net_ssl_manager.cpp
@@ -0,0 +1,20 @@
+--- src/mongo/util/net/ssl_manager.cpp.orig 2013-03-25 17:59:54.000000000 +0100
++++ src/mongo/util/net/ssl_manager.cpp 2013-03-25 18:03:11.000000000 +0100
+@@ -183,6 +183,7 @@ namespace mongo {
+ }
+
+ void SSLManager::_setupFIPS() {
++#ifdef OPENSSL_FIPS
+ // Turn on FIPS mode if requested.
+ int status = FIPS_mode_set(1);
+ if (!status) {
+@@ -191,6 +192,9 @@ namespace mongo {
+ fassertFailed(16703);
+ }
+ log() << "FIPS 140-2 mode activated" << endl;
++#else
++ error() << "can't activate FIPS mode: OpenSSL not built with FIPS support" << endl;
++#endif
+ }
+
+ bool SSLManager::_setupPEM(const std::string& keyFile , const std::string& password) {
diff --git a/databases/mongodb/pkg-plist b/databases/mongodb/pkg-plist
index 662a9825fe85..b3788aa43acf 100644
--- a/databases/mongodb/pkg-plist
+++ b/databases/mongodb/pkg-plist
@@ -14,10 +14,30 @@ bin/mongos
bin/mongosniff
bin/mongostat
bin/mongotop
+include/mongo/base/configuration_variable_manager.h
+include/mongo/base/counter.h
+include/mongo/base/disallow_copying.h
+include/mongo/base/error_codes.h
+include/mongo/base/global_initializer.h
+include/mongo/base/global_initializer_registerer.h
+include/mongo/base/init.h
+include/mongo/base/initializer.h
+include/mongo/base/initializer_context.h
+include/mongo/base/initializer_dependency_graph.h
+include/mongo/base/initializer_function.h
+include/mongo/base/make_string_vector.h
+include/mongo/base/owned_pointer_map.h
+include/mongo/base/owned_pointer_vector.h
+include/mongo/base/parse_number.h
+include/mongo/base/status.h
+include/mongo/base/string_data-inl.h
+include/mongo/base/string_data.h
include/mongo/bson/bson-inl.h
include/mongo/bson/bson.h
include/mongo/bson/bson_builder_base.h
include/mongo/bson/bson_db.h
+include/mongo/bson/bson_field.h
+include/mongo/bson/bson_validate.h
include/mongo/bson/bsonelement.h
include/mongo/bson/bsonmisc.h
include/mongo/bson/bsonobj.h
@@ -27,11 +47,10 @@ include/mongo/bson/bsontypes.h
include/mongo/bson/inline_decls.h
include/mongo/bson/oid.h
include/mongo/bson/ordering.h
-include/mongo/bson/stringdata.h
include/mongo/bson/util/atomic_int.h
+include/mongo/bson/util/bson_extract.h
include/mongo/bson/util/builder.h
include/mongo/bson/util/misc.h
-include/mongo/client/authentication_table.h
include/mongo/client/authlevel.h
include/mongo/client/clientOnly-private.h
include/mongo/client/connpool.h
@@ -46,19 +65,40 @@ include/mongo/client/gridfs.h
include/mongo/client/model.h
include/mongo/client/parallel.h
include/mongo/client/redef_macros.h
+include/mongo/client/sasl_client_authenticate.h
include/mongo/client/syncclusterconnection.h
include/mongo/client/undef_macros.h
-include/mongo/db/commands.h
+include/mongo/db/auth/action_set.h
+include/mongo/db/auth/action_type.h
+include/mongo/db/auth/auth_external_state.h
+include/mongo/db/auth/auth_external_state_d.h
+include/mongo/db/auth/auth_external_state_mock.h
+include/mongo/db/auth/auth_external_state_s.h
+include/mongo/db/auth/auth_external_state_server_common.h
+include/mongo/db/auth/auth_index_d.h
+include/mongo/db/auth/authentication_session.h
+include/mongo/db/auth/authorization_manager.h
+include/mongo/db/auth/mongo_authentication_session.h
+include/mongo/db/auth/principal.h
+include/mongo/db/auth/principal_name.h
+include/mongo/db/auth/principal_set.h
+include/mongo/db/auth/privilege.h
+include/mongo/db/auth/privilege_set.h
+include/mongo/db/auth/security_key.h
include/mongo/db/background.h
include/mongo/db/btree.h
+include/mongo/db/btree_stats.h
include/mongo/db/btreebuilder.h
+include/mongo/db/btreecursor.h
+include/mongo/db/btreeposition.h
+include/mongo/db/cc_by_loc.h
include/mongo/db/client.h
-include/mongo/db/client_common.h
+include/mongo/db/client_basic.h
include/mongo/db/clientcursor.h
include/mongo/db/cloner.h
include/mongo/db/cmdline.h
include/mongo/db/collection.h
-include/mongo/db/compact.h
+include/mongo/db/commands.h
include/mongo/db/curop-inl.h
include/mongo/db/curop.h
include/mongo/db/cursor.h
@@ -81,31 +121,32 @@ include/mongo/db/dur_stats.h
include/mongo/db/durop.h
include/mongo/db/explain.h
include/mongo/db/extsort.h
+include/mongo/db/field_ref.h
include/mongo/db/filever.h
-include/mongo/db/globals.h
include/mongo/db/hasher.h
include/mongo/db/hashindex.h
include/mongo/db/index.h
include/mongo/db/index_insertion_continuation.h
+include/mongo/db/index_rebuilder.h
+include/mongo/db/index_set.h
include/mongo/db/index_update.h
include/mongo/db/indexkey.h
+include/mongo/db/initialize_server_global_state.h
include/mongo/db/instance.h
include/mongo/db/interrupt_status.h
include/mongo/db/interrupt_status_mongod.h
+include/mongo/db/intervalbtreecursor.h
include/mongo/db/introspect.h
include/mongo/db/jsobj.h
include/mongo/db/jsobjmanipulator.h
include/mongo/db/json.h
include/mongo/db/key.h
+include/mongo/db/keypattern.h
+include/mongo/db/kill_current_op.h
include/mongo/db/lasterror.h
include/mongo/db/lockstat.h
include/mongo/db/lockstate.h
include/mongo/db/matcher.h
-include/mongo/db/ops/count.h
-include/mongo/db/ops/delete.h
-include/mongo/db/ops/query.h
-include/mongo/db/ops/update.h
-include/mongo/db/ops/update_internal.h
include/mongo/db/memconcept.h
include/mongo/db/minilex.h
include/mongo/db/module.h
@@ -115,12 +156,18 @@ include/mongo/db/namespace.h
include/mongo/db/namespace_details-inl.h
include/mongo/db/namespace_details.h
include/mongo/db/namespacestring.h
-include/mongo/db/nonce.h
include/mongo/db/oplog.h
include/mongo/db/oplogreader.h
+include/mongo/db/ops/count.h
+include/mongo/db/ops/delete.h
+include/mongo/db/ops/modifier_base.h
+include/mongo/db/ops/query.h
+include/mongo/db/ops/update.h
+include/mongo/db/ops/update_internal.h
include/mongo/db/pagefault.h
include/mongo/db/pdfile.h
include/mongo/db/pdfile_private.h
+include/mongo/db/pdfile_version.h
include/mongo/db/prefetch.h
include/mongo/db/projection.h
include/mongo/db/queryoptimizer.h
@@ -146,25 +193,92 @@ include/mongo/db/replutil.h
include/mongo/db/resource.h
include/mongo/db/restapi.h
include/mongo/db/scanandorder.h
-include/mongo/db/security.h
-include/mongo/db/security_common.h
+include/mongo/db/server_parameters.h
+include/mongo/db/server_parameters_inline.h
+include/mongo/db/sort_phase_one.h
include/mongo/db/stats/counters.h
include/mongo/db/stats/fine_clock.h
include/mongo/db/stats/service_stats.h
include/mongo/db/stats/snapshots.h
+include/mongo/db/stats/timer_stats.h
include/mongo/db/stats/top.h
include/mongo/db/taskqueue.h
include/mongo/db/ttl.h
include/mongo/pch.h
+include/mongo/platform/atomic_intrinsics.h
+include/mongo/platform/atomic_intrinsics_gcc.h
+include/mongo/platform/atomic_intrinsics_win32.h
+include/mongo/platform/atomic_word.h
+include/mongo/platform/basic.h
+include/mongo/platform/bits.h
+include/mongo/platform/compiler.h
+include/mongo/platform/compiler_gcc.h
+include/mongo/platform/compiler_msvc.h
+include/mongo/platform/cstdint.h
+include/mongo/platform/float_utils.h
+include/mongo/platform/random.h
+include/mongo/platform/strtoll.h
+include/mongo/platform/unordered_map.h
+include/mongo/platform/unordered_set.h
+include/mongo/platform/windows_basic.h
+include/mongo/s/balance.h
+include/mongo/s/balancer_policy.h
+include/mongo/s/chunk.h
+include/mongo/s/chunk_diff.h
+include/mongo/s/chunk_diff.hpp
+include/mongo/s/chunk_version.h
+include/mongo/s/client_info.h
+include/mongo/s/cluster_client_internal.h
+include/mongo/s/collection_manager.h
+include/mongo/s/config.h
+include/mongo/s/config_upgrade.h
+include/mongo/s/config_upgrade_helpers.h
+include/mongo/s/cursors.h
+include/mongo/s/d_chunk_manager.h
+include/mongo/s/d_logic.h
+include/mongo/s/d_writeback.h
+include/mongo/s/field_parser-inl.h
+include/mongo/s/field_parser.h
+include/mongo/s/grid.h
+include/mongo/s/interrupt_status_mongos.h
+include/mongo/s/metadata_loader.h
+include/mongo/s/mongo_version_range.h
+include/mongo/s/request.h
+include/mongo/s/server.h
+include/mongo/s/shard.h
+include/mongo/s/shardkey.h
+include/mongo/s/stale_exception.h
+include/mongo/s/strategy.h
+include/mongo/s/type_changelog.h
+include/mongo/s/type_chunk.h
+include/mongo/s/type_collection.h
+include/mongo/s/type_config_version.h
+include/mongo/s/type_database.h
+include/mongo/s/type_lockpings.h
+include/mongo/s/type_locks.h
+include/mongo/s/type_mongos.h
+include/mongo/s/type_settings.h
+include/mongo/s/type_shard.h
+include/mongo/s/type_tags.h
+include/mongo/s/version_manager.h
+include/mongo/s/writeback_listener.h
include/mongo/scripting/bench.h
include/mongo/scripting/bson_template_evaluator.h
include/mongo/scripting/engine.h
include/mongo/scripting/engine_spidermonkey.h
+include/mongo/scripting/engine_spidermonkey_internal.h
include/mongo/scripting/engine_v8.h
include/mongo/scripting/v8_db.h
+include/mongo/scripting/v8_deadline_monitor.h
+include/mongo/scripting/v8_profiler.h
include/mongo/scripting/v8_utils.h
-include/mongo/scripting/v8_wrapper.h
include/mongo/server.h
+include/mongo/shell/linenoise.h
+include/mongo/shell/linenoise_utf8.h
+include/mongo/shell/mk_wcwidth.h
+include/mongo/shell/shell_utils.h
+include/mongo/shell/shell_utils_extended.h
+include/mongo/shell/shell_utils_launcher.h
include/mongo/targetver.h
include/mongo/util/admin_access.h
include/mongo/util/alignedbuilder.h
@@ -177,8 +291,6 @@ include/mongo/util/bson_util.h
include/mongo/util/bufreader.h
include/mongo/util/checksum.h
include/mongo/util/compress.h
-include/mongo/util/md5.hpp
-include/mongo/util/concurrency/shared_mutex_win.hpp
include/mongo/util/concurrency/list.h
include/mongo/util/concurrency/mapsf.h
include/mongo/util/concurrency/msg.h
@@ -189,6 +301,7 @@ include/mongo/util/concurrency/qlock.h
include/mongo/util/concurrency/race.h
include/mongo/util/concurrency/rwlock.h
include/mongo/util/concurrency/rwlockimpl.h
+include/mongo/util/concurrency/shared_mutex_win.hpp
include/mongo/util/concurrency/simplerwlock.h
include/mongo/util/concurrency/spin_lock.h
include/mongo/util/concurrency/synchronization.h
@@ -198,11 +311,19 @@ include/mongo/util/concurrency/threadlocal.h
include/mongo/util/concurrency/ticketholder.h
include/mongo/util/concurrency/value.h
include/mongo/util/debug_util.h
+include/mongo/util/descriptive_stats-inl.h
+include/mongo/util/descriptive_stats.h
+include/mongo/util/elapsed_tracker.h
include/mongo/util/embedded_builder.h
+include/mongo/util/exception_filter_win32.h
include/mongo/util/exit_code.h
+include/mongo/util/fail_point.h
+include/mongo/util/fail_point_registry.h
+include/mongo/util/fail_point_service.h
include/mongo/util/file.h
include/mongo/util/file_allocator.h
include/mongo/util/goodies.h
+include/mongo/util/gsasl_session.h
include/mongo/util/hashtab.h
include/mongo/util/heapcheck.h
include/mongo/util/hex.h
@@ -213,6 +334,7 @@ include/mongo/util/logfile.h
include/mongo/util/lruishmap.h
include/mongo/util/map_util.h
include/mongo/util/md5.h
+include/mongo/util/md5.hpp
include/mongo/util/mmap.h
include/mongo/util/mongoutils/checksum.h
include/mongo/util/mongoutils/hash.h
@@ -227,6 +349,7 @@ include/mongo/util/net/message_port.h
include/mongo/util/net/message_server.h
include/mongo/util/net/miniwebserver.h
include/mongo/util/net/sock.h
+include/mongo/util/net/ssl_manager.h
include/mongo/util/ntservice.h
include/mongo/util/optime.h
include/mongo/util/password.h
@@ -235,11 +358,14 @@ include/mongo/util/processinfo.h
include/mongo/util/progress_meter.h
include/mongo/util/queue.h
include/mongo/util/ramlog.h
+include/mongo/util/safe_num.h
include/mongo/util/scopeguard.h
include/mongo/util/signal_handlers.h
include/mongo/util/stack_introspect.h
include/mongo/util/stacktrace.h
include/mongo/util/startup_test.h
+include/mongo/util/string_map.h
+include/mongo/util/string_map_internal.h
include/mongo/util/string_writer.h
include/mongo/util/stringutils.h
include/mongo/util/systeminfo.h
@@ -252,58 +378,24 @@ include/mongo/util/timer-win32-inl.h
include/mongo/util/timer.h
include/mongo/util/touch_pages.h
include/mongo/util/trace.h
+include/mongo/util/unordered_fast_key_table.h
+include/mongo/util/unordered_fast_key_table_internal.h
include/mongo/util/version.h
include/mongo/util/winutil.h
-include/mongo/s/balance.h
-include/mongo/s/balancer_policy.h
-include/mongo/s/chunk.h
-include/mongo/s/chunk_diff.h
-include/mongo/s/client_info.h
-include/mongo/s/config.h
-include/mongo/s/cursors.h
-include/mongo/s/d_chunk_manager.h
-include/mongo/s/d_logic.h
-include/mongo/s/d_writeback.h
-include/mongo/s/grid.h
-include/mongo/s/chunk_diff.hpp
-include/mongo/s/interrupt_status_mongos.h
-include/mongo/s/request.h
-include/mongo/s/server.h
-include/mongo/s/shard.h
-include/mongo/s/shard_version.h
-include/mongo/s/shardkey.h
-include/mongo/s/stats.h
-include/mongo/s/strategy.h
-include/mongo/s/util.h
-include/mongo/s/writeback_listener.h
-include/mongo/platform/atomic_intrinsics.h
-include/mongo/platform/atomic_intrinsics_gcc.h
-include/mongo/platform/atomic_intrinsics_win32.h
-include/mongo/platform/atomic_word.h
-include/mongo/platform/basic.h
-include/mongo/platform/bits.h
-include/mongo/platform/compiler.h
-include/mongo/platform/compiler_gcc.h
-include/mongo/platform/compiler_msvc.h
-include/mongo/platform/float_utils.h
-include/mongo/platform/windows_basic.h
-include/mongo/shell/linenoise.h
-include/mongo/shell/linenoise_utf8.h
-include/mongo/shell/mk_wcwidth.h
-include/mongo/shell/shell_utils.h
-include/mongo/shell/shell_utils_extended.h
-include/mongo/shell/shell_utils_launcher.h
+lib/libmongoclient.a
+@dirrm include/mongo/base
@dirrm include/mongo/bson/util
@dirrm include/mongo/bson
-@dirrm include/mongo/shell
-@dirrm include/mongo/platform
@dirrm include/mongo/client
+@dirrm include/mongo/db/auth
@dirrm include/mongo/db/ops
@dirrm include/mongo/db/repl
@dirrm include/mongo/db/stats
@dirrm include/mongo/db
+@dirrm include/mongo/platform
@dirrm include/mongo/s
@dirrm include/mongo/scripting
+@dirrm include/mongo/shell
@dirrm include/mongo/util/concurrency
@dirrm include/mongo/util/mongoutils
@dirrm include/mongo/util/net