summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexys Jacob <ultrabug@gentoo.org>2011-04-13 14:56:32 +0000
committerAlexys Jacob <ultrabug@gentoo.org>2011-04-13 14:56:32 +0000
commit770933e25a768dea0da6b792263c2f0b98de1cba (patch)
treef1f775499406fe3f9fab1e6f3eca272b57f3c6ad /dev-db/mongodb
parentDepend on dev-libs/boost, remove local copy. Bug #363187 (diff)
downloadgentoo-2-770933e25a768dea0da6b792263c2f0b98de1cba.tar.gz
gentoo-2-770933e25a768dea0da6b792263c2f0b98de1cba.tar.bz2
gentoo-2-770933e25a768dea0da6b792263c2f0b98de1cba.zip
Mongodb rework/bump. Fix bugs #329167, #334081, #337085, #337593, #337973, #338039, #340032, #356731. Many thanks to Johan Bergström for his help and testing. Drop old versions.
(Portage version: 2.1.9.45/cvs/Linux x86_64)
Diffstat (limited to 'dev-db/mongodb')
-rw-r--r--dev-db/mongodb/ChangeLog19
-rw-r--r--dev-db/mongodb/files/mongodb-1.2-modify-post-strip.patch11
-rw-r--r--dev-db/mongodb/files/mongodb-1.2-modify-testing.patch44
-rw-r--r--dev-db/mongodb/files/mongodb-1.4-modify-post-strip.patch12
-rw-r--r--dev-db/mongodb/files/mongodb-1.4-modify-testing.patch44
-rw-r--r--dev-db/mongodb/files/mongodb-1.6-fix-scons.patch39
-rw-r--r--dev-db/mongodb/files/mongodb-1.6.0-fix-scons.patch22
-rw-r--r--dev-db/mongodb/files/mongodb-1.8-fix-scons.patch39
-rw-r--r--dev-db/mongodb/files/mongodb.confd4
-rw-r--r--dev-db/mongodb/files/mongodb.initd48
-rw-r--r--dev-db/mongodb/files/mongos.confd13
-rw-r--r--dev-db/mongodb/files/mongos.initd43
-rw-r--r--dev-db/mongodb/mongodb-1.2.4.ebuild61
-rw-r--r--dev-db/mongodb/mongodb-1.4.4.ebuild61
-rw-r--r--dev-db/mongodb/mongodb-1.5.5.ebuild63
-rw-r--r--dev-db/mongodb/mongodb-1.6.0.ebuild78
-rw-r--r--dev-db/mongodb/mongodb-1.6.5.ebuild82
-rw-r--r--dev-db/mongodb/mongodb-1.8.1.ebuild82
18 files changed, 336 insertions, 429 deletions
diff --git a/dev-db/mongodb/ChangeLog b/dev-db/mongodb/ChangeLog
index e322b3b8283d..670a6333a763 100644
--- a/dev-db/mongodb/ChangeLog
+++ b/dev-db/mongodb/ChangeLog
@@ -1,6 +1,23 @@
# ChangeLog for dev-db/mongodb
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/ChangeLog,v 1.13 2011/03/30 17:25:19 ultrabug Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/ChangeLog,v 1.14 2011/04/13 14:56:32 ultrabug Exp $
+
+*mongodb-1.8.1 (13 Apr 2011)
+*mongodb-1.6.5 (13 Apr 2011)
+
+ 13 Apr 2011; Ultrabug <ultrabug@gentoo.org> -mongodb-1.2.4.ebuild,
+ -files/mongodb-1.2-modify-post-strip.patch,
+ -files/mongodb-1.2-modify-testing.patch, -mongodb-1.4.4.ebuild,
+ -files/mongodb-1.4-modify-post-strip.patch,
+ -files/mongodb-1.4-modify-testing.patch, -mongodb-1.5.5.ebuild,
+ -mongodb-1.6.0.ebuild, -files/mongodb-1.6.0-fix-scons.patch,
+ +mongodb-1.6.5.ebuild, +files/mongodb-1.6-fix-scons.patch,
+ +mongodb-1.8.1.ebuild, +files/mongodb-1.8-fix-scons.patch,
+ +files/mongos.confd, +files/mongos.initd, files/mongodb.confd,
+ files/mongodb.initd:
+ Mongodb rework/bump. Fix bugs #329167, #334081, #337085, #337593, #337973,
+ #338039, #340032, #356731. Many thanks to Johan Bergström for his help and
+ testing. Drop old versions.
30 Mar 2011; Ultrabug <ultrabug@gentoo.org> mongodb-1.2.4.ebuild,
mongodb-1.4.4.ebuild, mongodb-1.5.5.ebuild, mongodb-1.6.0.ebuild:
diff --git a/dev-db/mongodb/files/mongodb-1.2-modify-post-strip.patch b/dev-db/mongodb/files/mongodb-1.2-modify-post-strip.patch
deleted file mode 100644
index b10de0e14f84..000000000000
--- a/dev-db/mongodb/files/mongodb-1.2-modify-post-strip.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- SConstruct 2009-10-17 15:22:09.000000000 +0200
-+++ SConstruct.new 2009-10-17 15:23:31.000000000 +0200
-@@ -1240,8 +1240,6 @@
- fullInstallName = installDir + "/bin/" + name
-
- allBinaries += [ name ]
-- if solaris or linux:
-- e.AddPostAction( inst, e.Action( 'strip ' + fullInstallName ) )
-
- if linux and len( COMMAND_LINE_TARGETS ) == 1 and str( COMMAND_LINE_TARGETS[0] ) == "s3dist":
- e.AddPostAction( inst , checkGlibc )
diff --git a/dev-db/mongodb/files/mongodb-1.2-modify-testing.patch b/dev-db/mongodb/files/mongodb-1.2-modify-testing.patch
deleted file mode 100644
index 31bda47c0ce7..000000000000
--- a/dev-db/mongodb/files/mongodb-1.2-modify-testing.patch
+++ /dev/null
@@ -1,44 +0,0 @@
---- SConstruct.old 2009-10-17 15:26:14.000000000 +0200
-+++ SConstruct 2009-10-17 15:29:52.000000000 +0200
-@@ -995,15 +995,17 @@
- Exit( 1 )
-
- def ensureTestDirs():
-- ensureDir( "/tmp/unittest/" )
-- ensureDir( "/data/" )
-- ensureDir( "/data/db/" )
-+ ensureDir( "testdir/" )
-+ ensureDir( "testdir/tmp/" )
-+ ensureDir( "testdir/tmp/unittest/" )
-+ ensureDir( "testdir/data/" )
-+ ensureDir( "testdir/data/db/" )
-
- def testSetup( env , target , source ):
- ensureTestDirs()
-
- if len( COMMAND_LINE_TARGETS ) == 1 and str( COMMAND_LINE_TARGETS[0] ) == "test":
-- ensureDir( "/tmp/unittest/" );
-+ ensureDir( "testdir/tmp/unittest/" );
-
- addSmoketest( "smoke", [ add_exe( "test" ) ] , [ test[ 0 ].abspath ] )
- addSmoketest( "smokePerf", [ "perftest" ] , [ perftest[ 0 ].abspath ] )
-@@ -1072,7 +1074,7 @@
- mongodForTestsPort = "40000"
- import os
- ensureTestDirs()
-- dirName = "/data/db/sconsTests/"
-+ dirName = "testdir/data/db/sconsTests/"
- ensureDir( dirName )
- from subprocess import Popen
- mongodForTests = Popen( [ mongod[0].abspath, "--port", mongodForTestsPort, "--dbpath", dirName ] )
-
---- dbtests/dbtests.cpp 2009-10-17 16:40:46.000000000 +0200
-+++ dbtests/dbtests.cpp.new 2009-10-17 16:40:54.000000000 +0200
-@@ -22,6 +22,6 @@
- #include "dbtests.h"
-
- int main( int argc, char** argv ) {
-- return Suite::run(argc, argv, "/tmp/unittest");
-+ return Suite::run(argc, argv, "testdir/tmp/unittest");
- }
-
diff --git a/dev-db/mongodb/files/mongodb-1.4-modify-post-strip.patch b/dev-db/mongodb/files/mongodb-1.4-modify-post-strip.patch
deleted file mode 100644
index 5795c7e48925..000000000000
--- a/dev-db/mongodb/files/mongodb-1.4-modify-post-strip.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ur mongodb-src-r1.3.3/SConstruct mongodb-src-r1.3.3.new/SConstruct
---- mongodb-src-r1.3.3/SConstruct 2010-03-02 07:37:07.000000000 -0800
-+++ mongodb-src-r1.3.3.new/SConstruct 2010-03-07 22:36:10.000000000 -0800
-@@ -1478,8 +1478,6 @@
- fullInstallName = installDir + "/bin/" + name
-
- allBinaries += [ name ]
-- if (solaris or linux) and (not GetOption("nostrip")):
-- e.AddPostAction( inst, e.Action( 'strip ' + fullInstallName ) )
-
- if linux and len( COMMAND_LINE_TARGETS ) == 1 and str( COMMAND_LINE_TARGETS[0] ) == "s3dist":
- e.AddPostAction( inst , checkGlibc )
diff --git a/dev-db/mongodb/files/mongodb-1.4-modify-testing.patch b/dev-db/mongodb/files/mongodb-1.4-modify-testing.patch
deleted file mode 100644
index eac7843d5c2f..000000000000
--- a/dev-db/mongodb/files/mongodb-1.4-modify-testing.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -ur mongodb-src-r1.4.0/SConstruct mongodb-src-r1.4.0.new/SConstruct
---- mongodb-src-r1.4.0/SConstruct 2010-03-02 07:37:07.000000000 -0800
-+++ mongodb-src-r1.4.0.new/SConstruct 2010-03-07 22:40:02.000000000 -0800
-@@ -1211,15 +1211,17 @@
- Exit( 1 )
-
- def ensureTestDirs():
-- ensureDir( "/tmp/unittest/" )
-- ensureDir( "/data/" )
-- ensureDir( "/data/db/" )
-+ ensureDir( "testdir/" )
-+ ensureDir( "testdir/tmp" )
-+ ensureDir( "testdir/tmp/unittest/" )
-+ ensureDir( "testdir/data/" )
-+ ensureDir( "testdir/data/db/" )
-
- def testSetup( env , target , source ):
- ensureTestDirs()
-
- if len( COMMAND_LINE_TARGETS ) == 1 and str( COMMAND_LINE_TARGETS[0] ) == "test":
-- ensureDir( "/tmp/unittest/" );
-+ ensureDir( "testdir/tmp/unittest/" );
-
- addSmoketest( "smoke", [ add_exe( "test" ) ] , [ test[ 0 ].abspath ] )
- addSmoketest( "smokePerf", [ "perftest" ] , [ perftest[ 0 ].abspath ] )
-@@ -1297,7 +1299,7 @@
- mongodForTestsPort = "32000"
- import os
- ensureTestDirs()
-- dirName = "/data/db/sconsTests/"
-+ dirName = "testdir/data/db/sconsTests/"
- ensureDir( dirName )
- from subprocess import Popen
- mongodForTests = Popen( [ mongod[0].abspath, "--port", mongodForTestsPort, "--dbpath", dirName ] )
-diff -ur mongodb-src-r1.4.0/dbtests/dbtests.cpp mongodb-src-r1.4.0.new/dbtests/dbtests.cpp
---- mongodb-src-r1.4.0/dbtests/dbtests.cpp 2010-03-02 07:37:07.000000000 -0800
-+++ mongodb-src-r1.4.0.new/dbtests/dbtests.cpp 2010-03-07 22:40:37.000000000 -0800
-@@ -23,6 +23,6 @@
-
- int main( int argc, char** argv ) {
- static StaticObserver StaticObserver;
-- return Suite::run(argc, argv, "/tmp/unittest");
-+ return Suite::run(argc, argv, "testdir/tmp/unittest");
- }
diff --git a/dev-db/mongodb/files/mongodb-1.6-fix-scons.patch b/dev-db/mongodb/files/mongodb-1.6-fix-scons.patch
new file mode 100644
index 000000000000..342c36f01595
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-1.6-fix-scons.patch
@@ -0,0 +1,39 @@
+diff --git a/SConstruct b/SConstruct
+index e3046ff..529b19b 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -745,20 +745,19 @@ else:
+
+ if nix:
+ env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" )
+- if linux:
+- env.Append( CPPFLAGS=" -Werror " )
+ env.Append( CXXFLAGS=" -Wnon-virtual-dtor " )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'])
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+ env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" )
+ env.Append( LIBS=[] )
+
+ if linux and GetOption( "sharedclient" ):
+ env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
++ env.Append( SHLINKFLAGS=" -Wl,-soname=libmongoclient.so " )
+
+ if debugBuild:
+ env.Append( CPPFLAGS=" -O0 -fstack-protector " );
+ env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
+- else:
+- env.Append( CPPFLAGS=" -O3" )
+
+ if debugLogging:
+ env.Append( CPPFLAGS=" -D_DEBUG" );
+@@ -972,8 +971,8 @@ def doConfigure( myenv , needPcre=True , shell=False ):
+
+ myCheckLib( J , True )
+ mozHeader = "js"
+- if bigLibString(myenv).find( "mozjs" ) >= 0:
+- mozHeader = "mozjs"
++ env.Append( CPPPATH=["/usr/include/nspr"] )
++ env.Append( CPPDEFINES=[ "XULRUNNER" ] )
+
+ if not conf.CheckHeader( mozHeader + "/jsapi.h" ):
+ if conf.CheckHeader( "jsapi.h" ):
diff --git a/dev-db/mongodb/files/mongodb-1.6.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-1.6.0-fix-scons.patch
deleted file mode 100644
index 7122df8ec7b7..000000000000
--- a/dev-db/mongodb/files/mongodb-1.6.0-fix-scons.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -urN mongodb-src-r1.6.0.orig/SConstruct mongodb-src-r1.6.0/SConstruct
---- mongodb-src-r1.6.0.orig/SConstruct 2010-08-05 15:32:06.000000000 +0200
-+++ mongodb-src-r1.6.0/SConstruct 2010-08-16 16:12:52.000000000 +0200
-@@ -745,8 +745,7 @@
-
- if nix:
- env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" )
-- if linux:
-- env.Append( CPPFLAGS=" -Werror " )
-+ env.Append( CXXFLAGS=os.environ['CXXFLAGS'])
- env.Append( CXXFLAGS=" -Wnon-virtual-dtor " )
- env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" )
- env.Append( LIBS=[] )
-@@ -757,8 +756,6 @@
- if debugBuild:
- env.Append( CPPFLAGS=" -O0 -fstack-protector " );
- env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
-- else:
-- env.Append( CPPFLAGS=" -O3" )
-
- if debugLogging:
- env.Append( CPPFLAGS=" -D_DEBUG" );
diff --git a/dev-db/mongodb/files/mongodb-1.8-fix-scons.patch b/dev-db/mongodb/files/mongodb-1.8-fix-scons.patch
new file mode 100644
index 000000000000..3d2996a35354
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-1.8-fix-scons.patch
@@ -0,0 +1,39 @@
+--- a/SConstruct 2011-04-06 06:40:13.000000000 +0200
++++ b/SConstruct 2011-04-10 15:50:52.696516582 +0200
+@@ -671,9 +671,10 @@
+ env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" )
+ # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
+ if linux:
+- env.Append( CPPFLAGS=" -Werror " )
+ env.Append( CPPFLAGS=" -fno-builtin-memcmp " ) # glibc's memcmp is faster than gcc's
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'])
+ env.Append( CXXFLAGS=" -Wnon-virtual-dtor " )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+ env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" )
+ env.Append( LIBS=[] )
+
+@@ -683,12 +684,11 @@
+
+ if linux and has_option( "sharedclient" ):
+ env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
++ env.Append( SHLINKFLAGS=" -Wl,-soname=libmongoclient.so " )
+
+ if debugBuild:
+ env.Append( CPPFLAGS=" -O0 -fstack-protector " );
+ env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
+- else:
+- env.Append( CPPFLAGS=" -O3" )
+ #env.Append( CPPFLAGS=" -fprofile-generate" )
+ #env.Append( LINKFLAGS=" -fprofile-generate" )
+ # then:
+@@ -911,8 +911,8 @@
+
+ myCheckLib( J , True )
+ mozHeader = "js"
+- if bigLibString(myenv).find( "mozjs" ) >= 0:
+- mozHeader = "mozjs"
++ env.Append( CPPPATH=["/usr/include/nspr"] )
++ env.Append( CPPDEFINES=[ "XULRUNNER" ] )
+
+ if not conf.CheckHeader( mozHeader + "/jsapi.h" ):
+ if conf.CheckHeader( "jsapi.h" ):
diff --git a/dev-db/mongodb/files/mongodb.confd b/dev-db/mongodb/files/mongodb.confd
index bc1660130ce4..9b3a43835271 100644
--- a/dev-db/mongodb/files/mongodb.confd
+++ b/dev-db/mongodb/files/mongodb.confd
@@ -1,11 +1,11 @@
# Mongodb essentials
MONGODB_EXEC="/usr/bin/mongod"
+MONGODB_RUN="/var/run/mongodb"
MONGODB_DATA="/var/lib/mongodb"
MONGODB_USER="mongodb"
-MONGODB_PID_FILE="/var/run/mongodb/mongodb.pid"
MONGODB_IP="127.0.0.1"
MONGODB_PORT="27017"
# Set extra options here, such as disabling the admin web server
-MONGODB_OPTIONS=""
+MONGODB_OPTIONS="--journal"
diff --git a/dev-db/mongodb/files/mongodb.initd b/dev-db/mongodb/files/mongodb.initd
index 482e311fcd6b..ac1bc31930ca 100644
--- a/dev-db/mongodb/files/mongodb.initd
+++ b/dev-db/mongodb/files/mongodb.initd
@@ -1,45 +1,33 @@
#!/sbin/runscript
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mongodb.initd,v 1.2 2010/05/21 06:39:57 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mongodb.initd,v 1.3 2011/04/13 14:56:32 ultrabug Exp $
depend() {
need net
}
start() {
- ebegin "Starting ${SVCNAME}"
- if [ -z "$MONGODB_PID_FILE" ] ; then
- ewarn "MONGODB_PID_FILE must be set"
- return -1
- fi
- if [ -z "$MONGODB_USER" ] ; then
- ewarn "ERROR: MONGODB_USER must be set"
- return -1
- fi
-
- args=""
- if [ -n "$MONGODB_DATA" ] ; then
- args="$args --dbpath $MONGODB_DATA"
- fi
- if [ -n "$MONGODB_PORT" ] ; then
- args="$args --port $MONGODB_PORT"
- fi
- if [ -n "$MONGODB_IP" ] ; then
- args="$args --bind_ip $MONGODB_IP"
- fi
- if [ -n "$MONGODB_OPTIONS" ] ; then
- args="$args $MONGODB_OPTIONS"
- fi
+ mkdir -p ${MONGODB_RUN:-/var/run/mongodb}
+ chown ${MONGODB_USER:-mongodb}: ${MONGODB_RUN:-/var/run/mongodb}
- start-stop-daemon --background --start --user ${MONGODB_USER} --pidfile \
- "${MONGODB_PID_FILE}" --make-pidfile --exec ${MONGODB_EXEC} \
- -- ${args} run
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --background --start --make-pidfile \
+ --pidfile ${MONGODB_RUN:-/var/run/mongodb}/${SVCNAME}.pid \
+ --chuid ${MONGODB_USER:-mongodb} \
+ --exec ${MONGODB_EXEC:-/usr/bin/mongod} \
+ -- \
+ --bind_ip ${MONGODB_IP:-127.0.0.1} \
+ --port ${MONGODB_PORT:-27017} \
+ --dbpath ${MONGODB_DATA:-/var/lib/mongodb} \
+ --unixSocketPrefix ${MONGODB_RUN:-/var/run/mongodb} \
+ --logappend --logpath /var/log/mongodb/${SVCNAME}.log \
+ ${MONGODB_OPTIONS}
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop --exec ${MONGODB_EXEC} --pidfile ${MONGODB_PID_FILE}
- eend $? "Failed to stop ${SVCNAME}"
+ start-stop-daemon --stop --pidfile ${MONGODB_RUN:-/var/run/mongodb}/${SVCNAME}.pid
+ eend $?
}
diff --git a/dev-db/mongodb/files/mongos.confd b/dev-db/mongodb/files/mongos.confd
new file mode 100644
index 000000000000..8ac0ebcd655b
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.confd
@@ -0,0 +1,13 @@
+# Mongos essentials
+MONGOS_EXEC="/usr/bin/mongos"
+MONGOS_RUN="/var/run/mongodb"
+MONGOS_USER="mongodb"
+
+MONGOS_IP="127.0.0.1"
+MONGOS_PORT="27018"
+
+# 1 to 3 comma separated config servers (mandatory)
+MONGOS_CONFIGDB=""
+
+# Set extra options here
+MONGOS_OPTIONS=""
diff --git a/dev-db/mongodb/files/mongos.initd b/dev-db/mongodb/files/mongos.initd
new file mode 100644
index 000000000000..9279c4fc9993
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.initd
@@ -0,0 +1,43 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mongos.initd,v 1.1 2011/04/13 14:56:32 ultrabug Exp $
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ -z "${MONGOS_CONFIGDB}" ]; then
+ eerror "MONGOS_CONFIGDB is not defined, check your configuration file !"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ mkdir -p ${MONGOS_RUN:-/var/run/mongodb}
+ chown ${MONGOS_USER:-mongodb}: ${MONGOS_RUN:-/var/run/mongodb}
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --background --start --make-pidfile \
+ --pidfile ${MONGOS_RUN:-/var/run/mongodb}/${SVCNAME}.pid \
+ --chuid ${MONGOS_USER:-mongodb} \
+ --exec ${MONGOS_EXEC:-/usr/bin/mongos} \
+ -- \
+ --bind_ip ${MONGOS_IP:-127.0.0.1} \
+ --port ${MONGOS_PORT:-27018} \
+ --unixSocketPrefix ${MONGOS_RUN:-/var/run/mongodb} \
+ --logappend --logpath /var/log/mongodb/${SVCNAME}.log \
+ --configdb ${MONGOS_CONFIGDB} \
+ ${MONGOS_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile ${MONGOS_RUN:-/var/run/mongodb}/${SVCNAME}.pid
+ eend $?
+} \ No newline at end of file
diff --git a/dev-db/mongodb/mongodb-1.2.4.ebuild b/dev-db/mongodb/mongodb-1.2.4.ebuild
deleted file mode 100644
index 257b98a6cb7c..000000000000
--- a/dev-db/mongodb/mongodb-1.2.4.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-1.2.4.ebuild,v 1.2 2011/03/30 17:25:19 ultrabug Exp $
-
-EAPI="2"
-
-inherit eutils versionator
-
-MY_PATCHVER=$(get_version_component_range 1-2)
-MY_P="${PN}-src-r${PV}"
-
-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=""
-
-RDEPEND="dev-lang/spidermonkey[unicode]
- dev-libs/boost
- dev-libs/libpcre"
-
-DEPEND="${RDEPEND}
- >=dev-util/scons-1.2.0-r1"
-
-# Must change this on every upgrade
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/"${PN}"-"${MY_PATCHVER}"-modify-*.patch
-}
-
-src_compile() {
- scons ${MAKEOPTS} all || die "Compile failed"
-}
-
-src_install() {
- scons ${MAKEOPTS} install --prefix="${D}"/usr || die "Install failed"
-
- for x in /var/{lib,log,run}/${PN}; do
- dodir "${x}" || die "Install failed"
- fowners mongodb:mongodb "${x}"
- done
-
- doman debian/mongo*.1 || die "Install failed"
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd" ${PN} || die "Install failed"
- newconfd "${FILESDIR}/${PN}.confd" ${PN} || die "Install failed"
-}
-
-src_test() {
- scons ${MAKEOPTS} smoke test || die "Tests failed"
-}
diff --git a/dev-db/mongodb/mongodb-1.4.4.ebuild b/dev-db/mongodb/mongodb-1.4.4.ebuild
deleted file mode 100644
index 937ee4a01d25..000000000000
--- a/dev-db/mongodb/mongodb-1.4.4.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-1.4.4.ebuild,v 1.2 2011/03/30 17:25:19 ultrabug Exp $
-
-EAPI="2"
-
-inherit eutils versionator
-
-MY_PATCHVER=$(get_version_component_range 1-2)
-MY_P="${PN}-src-r${PV}"
-
-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=""
-
-RDEPEND="dev-lang/spidermonkey[unicode]
- dev-libs/boost
- dev-libs/libpcre"
-
-DEPEND="${RDEPEND}
- >=dev-util/scons-1.2.0-r1"
-
-# Must change this on every upgrade
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/"${PN}"-"${MY_PATCHVER}"-modify-*.patch
-}
-
-src_compile() {
- scons ${MAKEOPTS} all || die "Compile failed"
-}
-
-src_install() {
- scons ${MAKEOPTS} install --prefix="${D}"/usr || die "Install failed"
-
- for x in /var/{lib,log,run}/${PN}; do
- dodir "${x}" || die "Install failed"
- fowners mongodb:mongodb "${x}"
- done
-
- doman debian/mongo*.1 || die "Install failed"
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd" ${PN} || die "Install failed"
- newconfd "${FILESDIR}/${PN}.confd" ${PN} || die "Install failed"
-}
-
-src_test() {
- scons ${MAKEOPTS} smoke test || die "Tests failed"
-}
diff --git a/dev-db/mongodb/mongodb-1.5.5.ebuild b/dev-db/mongodb/mongodb-1.5.5.ebuild
deleted file mode 100644
index 88aa7b277050..000000000000
--- a/dev-db/mongodb/mongodb-1.5.5.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-1.5.5.ebuild,v 1.3 2011/03/30 17:25:19 ultrabug Exp $
-
-EAPI="2"
-
-inherit eutils versionator
-
-MY_PATCHVER=$(get_version_component_range 1-2)
-MY_P="${PN}-src-r${PV}"
-
-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=""
-
-RDEPEND="dev-lang/spidermonkey[unicode]
- dev-libs/boost
- dev-libs/libpcre"
-
-DEPEND="${RDEPEND}
- >=dev-util/scons-1.2.0-r1
- sys-libs/readline
- sys-libs/ncurses"
-
-# Must change this on every upgrade
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-}
-
-#src_prepare() {
-# epatch "${FILESDIR}"/"${PN}"-"${MY_PATCHVER}"-modify-*.patch
-#}
-
-src_compile() {
- scons ${MAKEOPTS} all || die "Compile failed"
-}
-
-src_install() {
- scons ${MAKEOPTS} --nostrip install --prefix="${D}"/usr || die "Install failed"
-
- for x in /var/{lib,log,run}/${PN}; do
- dodir "${x}" || die "Install failed"
- fowners mongodb:mongodb "${x}"
- done
-
- doman debian/mongo*.1 || die "Install failed"
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd" ${PN} || die "Install failed"
- newconfd "${FILESDIR}/${PN}.confd" ${PN} || die "Install failed"
-}
-
-src_test() {
- scons ${MAKEOPTS} smoke --smokedbprefix='testdir' test || die "Tests failed"
-}
diff --git a/dev-db/mongodb/mongodb-1.6.0.ebuild b/dev-db/mongodb/mongodb-1.6.0.ebuild
deleted file mode 100644
index 465d4f947f1d..000000000000
--- a/dev-db/mongodb/mongodb-1.6.0.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-1.6.0.ebuild,v 1.3 2011/03/30 17:25:19 ultrabug Exp $
-
-EAPI="2"
-
-inherit eutils versionator
-
-MY_PATCHVER=$(get_version_component_range 1-2)
-MY_P="${PN}-src-r${PV}"
-
-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="v8"
-
-RDEPEND="!v8? ( dev-lang/spidermonkey[unicode] )
- v8? ( dev-lang/v8 )
- dev-libs/boost
- dev-libs/libpcre"
-
-DEPEND="${RDEPEND}
- >=dev-util/scons-1.2.0-r1
- sys-libs/readline
- sys-libs/ncurses"
-
-# Must change this on every upgrade
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
- enewgroup mongodb
- enewuser mongodb -1 -1 /var/lib/${PN} mongodb
-
- scons_opts="${MAKEOPTS}"
- if use v8; then
- scons_opts+=" --usev8"
- else
- scons_opts+=" --usesm"
- fi
-}
-
-src_prepare() {
- epatch "${FILESDIR}/${P}-fix-scons.patch"
-#} epatch "${FILESDIR}"/"${PN}"-"${MY_PATCHVER}"-modify-*.patch
-
- if use v8; then
- # Suppress known test failure with v8:
- # http://jira.mongodb.org/browse/SERVER-1147
- sed -e '/add< NumberLong >/d' -i dbtests/jstests.cpp || die
- fi
-}
-
-src_compile() {
- scons ${scons_opts} all || die "Compile failed"
-}
-
-src_install() {
- scons ${scons_opts} --full --nostrip install --prefix="${D}"/usr || die "Install failed"
-
- for x in /var/{lib,log,run}/${PN}; do
- dodir "${x}" || die "Install failed"
- fowners mongodb:mongodb "${x}"
- done
-
- doman debian/mongo*.1 || die "Install failed"
- dodoc README docs/building.md
-
- newinitd "${FILESDIR}/${PN}.initd" ${PN} || die "Install failed"
- newconfd "${FILESDIR}/${PN}.confd" ${PN} || die "Install failed"
-}
-
-src_test() {
- scons ${scons_opts} smoke --smokedbprefix='testdir' test || die "Tests failed"
-}
diff --git a/dev-db/mongodb/mongodb-1.6.5.ebuild b/dev-db/mongodb/mongodb-1.6.5.ebuild
new file mode 100644
index 000000000000..d85f1e61e785
--- /dev/null
+++ b/dev-db/mongodb/mongodb-1.6.5.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-1.6.5.ebuild,v 1.1 2011/04/13 14:56:32 ultrabug Exp $
+
+EAPI=4
+SCONS_MIN_VERSION="1.2.0"
+
+inherit eutils multilib scons-utils versionator
+
+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="static-libs v8"
+
+RDEPEND="!v8? ( >=dev-lang/spidermonkey-1.9 )
+ v8? ( dev-lang/v8 )
+ dev-libs/boost
+ dev-libs/libpcre[cxx]
+ net-libs/libpcap"
+DEPEND="${RDEPEND}
+ sys-libs/readline
+ sys-libs/ncurses"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ scons_opts=" --sharedclient"
+ if use v8; then
+ scons_opts+=" --usev8"
+ else
+ scons_opts+=" --usesm"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.6-fix-scons.patch"
+}
+
+src_compile() {
+ escons ${scons_opts} all
+}
+
+src_install() {
+ escons ${scons_opts} --full --nostrip install --prefix="${D}"/usr
+
+ use static-libs || rm "${D}/usr/$(get_libdir)/libmongoclient.a"
+
+ for x in /var/{lib,log,run}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+
+ # Remove unsupported options
+ sed -i -e '/--unixSocketPrefix/d' "${D}/etc/init.d/${PN}"
+ sed -i -e 's/--journal//g' "${D}/etc/conf.d/${PN}"
+}
+
+src_test() {
+ escons ${scons_opts} smoke --smokedbprefix='testdir' test
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} < 1.6 ]]; then
+ ewarn "You just upgraded from a previous version of mongodb !"
+ ewarn "Make sure you run 'mongod --upgrade' before using this version."
+ fi
+}
diff --git a/dev-db/mongodb/mongodb-1.8.1.ebuild b/dev-db/mongodb/mongodb-1.8.1.ebuild
new file mode 100644
index 000000000000..5f6f777beeb2
--- /dev/null
+++ b/dev-db/mongodb/mongodb-1.8.1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-1.8.1.ebuild,v 1.1 2011/04/13 14:56:32 ultrabug Exp $
+
+EAPI=4
+SCONS_MIN_VERSION="1.2.0"
+
+inherit eutils multilib scons-utils versionator
+
+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="static-libs v8"
+
+RDEPEND="!v8? ( >=dev-lang/spidermonkey-1.9 )
+ v8? ( dev-lang/v8 )
+ dev-libs/boost
+ dev-libs/libpcre[cxx]
+ net-libs/libpcap"
+DEPEND="${RDEPEND}
+ sys-libs/readline
+ sys-libs/ncurses"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ scons_opts=" --sharedclient"
+ if use v8; then
+ scons_opts+=" --usev8"
+ else
+ scons_opts+=" --usesm"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.8-fix-scons.patch"
+}
+
+src_compile() {
+ escons ${scons_opts} all
+}
+
+src_install() {
+ escons ${scons_opts} --full --nostrip install --prefix="${D}"/usr
+
+ use static-libs || rm "${D}/usr/$(get_libdir)/libmongoclient.a"
+
+ for x in /var/{lib,log,run}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd" ${PN/db/s}
+}
+
+src_test() {
+ escons ${scons_opts} test
+ "${S}"/test --dbpath=unittest || die
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} < 1.8 ]]; then
+ ewarn "You just upgraded from a previous version of mongodb !"
+ ewarn "Make sure you run 'mongod --upgrade' before using this version."
+ fi
+ elog "Journaling is now enabled by default, see /etc/conf.d/${PN}.conf"
+}