summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Albertson <ramereth@gentoo.org>2010-03-07 23:39:41 +0000
committerLance Albertson <ramereth@gentoo.org>2010-03-07 23:39:41 +0000
commit8694b56df785ef0501be1299bb9223bd3f65da7e (patch)
tree7e98439d7526db1834e4498807d2077fee150fd5 /dev-db/mongodb/files
parentcorrected problem with prefix stuff (diff)
downloadgentoo-2-8694b56df785ef0501be1299bb9223bd3f65da7e.tar.gz
gentoo-2-8694b56df785ef0501be1299bb9223bd3f65da7e.tar.bz2
gentoo-2-8694b56df785ef0501be1299bb9223bd3f65da7e.zip
Import ebuild from the sunrise overlay and apply various fixes. Resolves #273259
(Portage version: 2.1.7.16/cvs/Linux x86_64)
Diffstat (limited to 'dev-db/mongodb/files')
-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.confd11
-rw-r--r--dev-db/mongodb/files/mongodb.initd45
4 files changed, 111 insertions, 0 deletions
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
new file mode 100644
index 000000000000..b10de0e14f84
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-1.2-modify-post-strip.patch
@@ -0,0 +1,11 @@
+--- 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
new file mode 100644
index 000000000000..31bda47c0ce7
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-1.2-modify-testing.patch
@@ -0,0 +1,44 @@
+--- 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.confd b/dev-db/mongodb/files/mongodb.confd
new file mode 100644
index 000000000000..bc1660130ce4
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.confd
@@ -0,0 +1,11 @@
+# Mongodb essentials
+MONGODB_EXEC="/usr/bin/mongod"
+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=""
diff --git a/dev-db/mongodb/files/mongodb.initd b/dev-db/mongodb/files/mongodb.initd
new file mode 100644
index 000000000000..9ddd60564688
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.initd
@@ -0,0 +1,45 @@
+#!/sbin/runscript
+# Copyright 1999-2009 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.1 2010/03/07 23:39:39 ramereth 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
+
+ start-stop-daemon --background --start --user ${MONGODB_USER} --pidfile \
+ "${MONGODB_PID_FILE}" --make-pidfile --exec ${MONGODB_EXEC} \
+ -- ${args} run
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec ${EXEC} --pidfile ${MONGODB_PID_FILE}
+ eend $? "Failed to stop ${SVCNAME}"
+}