Commits

Lukas Linhart committed e26b745

Added patched mongodb from sunrise

  • Participants
  • Parent commits c5b2e40

Comments (0)

Files changed (8)

dev-db/mongodb/ChangeLog

+# ChangeLog for dev-db/mongodb
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+  01 Aug 2009; Johan Bergström (jbergstroem) <bugs@bergstroem.nu>
+  mongodb-0.9.7.ebuild:
+  Die if doman fails. Thanks to Tommy[D]
+
+  01 Aug 2009; Johan Bergström (jbergstroem) <bugs@bergstroem.nu>
+  mongodb-0.9.7.ebuild:
+  Remove scons hack since MAKEOPTS are safe to pass. Thanks to Tommy[D]
+
+  31 Jul 2009; Johan Bergström (jbergstroem) <bugs@bergstroem.nu>
+  -mongodb-0.9.6.ebuild, +mongodb-0.9.7.ebuild,
+  files/modify-post-strip.patch:
+  Version bump
+
+  27 Jul 2009; Johan Bergström (jbergstroem) <bugs@bergstroem.nu>
+  +mongodb-0.9.6.ebuild, +files/modify-post-strip.patch,
+  +files/modify-testing.patch, +files/mongodb.confd, +files/mongodb.initd,
+  +metadata.xml:
+  New ebuild for bug 273259. Thanks to scarabeus and ssuominen
+

dev-db/mongodb/Manifest

+AUX modify-post-strip.patch 456 RMD160 262692df49f375ff6eab566a34e646b4f9eb0306 SHA1 9800d4b197efd8bf36de05ca06e58c847b979243 SHA256 1ee26bf6f9091dd99f573e4bd12d9341dcbdcebe74edb0ae25caafba6deb1572
+AUX modify-testing.patch 1276 RMD160 a4cfdad3b9c6102d28f487ad009aabef581eabeb SHA1 bebd414e2d8af94b44dbcb81d92a7b1274cd5c86 SHA256 1e0ae2e54f22a28f6462ac37284dd0b8b4776e82373c4d25959c012998a445ce
+AUX mongodb.confd 285 RMD160 cc5e3ab24a9880a19392a7416d23d1ae7a328e11 SHA1 7c4b720ea5b0afd2fa88a6adc2d8a2e356691413 SHA256 8dfedbb433e11f8ed6ec8159ed5c02f94c22f86006cda21f0b2bb59ebe50b2ad
+AUX mongodb.initd 1024 RMD160 cd38a158302270c75d2e12360f6d7fab259aca66 SHA1 f841675161b318ee7647e028df38b03ae6e4c647 SHA256 a9136dbcbd9626d80988c2f46c73af6b2f23bc4af52c9f68d33d2feaa1649dcb
+DIST mongodb-0.9.7.tar.gz 3904991 RMD160 b71d52af72ad8b41bd72a5fe47f1e34de7bb27e8 SHA1 bd8541bb1b899d839263a61247b7696a15a5eea2 SHA256 d423ee0cc8f935ebb5e9ee2f873b9dac28ded4f0990a7daa003964d8a4c8af2a
+EBUILD mongodb-0.9.7.ebuild 1265 RMD160 4e5af70eb6f129d7cd6bd230fca5062135d2d3f6 SHA1 d27c265ac48e2f9347b2384331e5123aa701e446 SHA256 67e2b03ed6e78512228565afe432165bcc63a8cb417912e6c0af9354674dae37
+MISC ChangeLog 856 RMD160 5c8286b7feb69174dc71534f1e9bd1598870a94c SHA1 efdfbb89180c5bedaf010fd7d810d0df3c2943c9 SHA256 a67a552188a717a84a7b52e1f6d334b51b85e674a340aa661ff247d7c017354d
+MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42

dev-db/mongodb/files/modify-post-strip.patch

+--- SConstruct	2009-07-29 20:49:21.000000000 +0200
++++ SConstruct.new	2009-07-31 10:24:00.000000000 +0200
+@@ -1179,8 +1179,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 )

dev-db/mongodb/files/modify-testing.patch

+diff -u SConstruct.old SConstruct
+--- SConstruct.old	2009-06-10 12:47:25.000000000 +0200
++++ SConstruct	2009-06-10 12:47:42.000000000 +0200
+@@ -811,9 +811,11 @@
+             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()
+@@ -890,7 +892,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 ] )
+diff -u dbtests/dbtests.cpp.old dbtests/dbtests.cpp
+--- dbtests/dbtests.cpp.old	2009-06-10 13:10:43.000000000 +0200
++++ dbtests/dbtests.cpp	2009-06-09 15:37:04.000000000 +0200
+@@ -35,7 +35,7 @@
+ namespace mongo {
+     extern const char* dbpath;
+ } // namespace mongo
+-string dbpathSpec = "/tmp/unittest/";
++string dbpathSpec = "testdir/tmp/unittest/";
+ 
+ Suite::~Suite() {
+     DBDirectClient c;
+

dev-db/mongodb/files/mongodb.confd

+# 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=""

dev-db/mongodb/files/mongodb.initd

+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+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}"
+}

dev-db/mongodb/metadata.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>maintainer-wanted</herd>
+</pkgmetadata>

dev-db/mongodb/mongodb-0.9.7.ebuild

+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+
+inherit eutils
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="http://www.mongodb.org"
+SRC_URI="http://github.com/mongodb/mongo/tarball/r${PV} -> ${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/spidermonkey
+	dev-libs/boost
+	dev-libs/libpcre"
+
+DEPEND="${RDEPEND}
+	>=dev-util/scons-1.2.0-r1
+	test? ( dev-libs/unittest )"
+
+S=${WORKDIR}/${PN}-mongo-6dc201583a91ae97f547fbff748019dfbc8ea1d4
+
+pkg_setup() {
+	enewgroup mongodb
+	enewuser mongodb -1 /var/lib/${PN} mongodb
+}
+
+src_prepare() {
+	epatch "${FILESDIR}"/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"
+
+	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"
+}