public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alexys Jacob" <ultrabug@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/ultrabug:master commit in: dev-db/mongodb/files/, dev-db/mongodb/
Date: Sun, 10 Apr 2011 14:20:55 +0000 (UTC)	[thread overview]
Message-ID: <eed9ea43633b2826fa31775edaa9c8c89548e2d0.ultrabug@gentoo> (raw)

commit:     eed9ea43633b2826fa31775edaa9c8c89548e2d0
Author:     Ultrabug <ultrabug <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 10 14:20:49 2011 +0000
Commit:     Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
CommitDate: Sun Apr 10 14:20:49 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/ultrabug.git;a=commit;h=eed9ea43

mongodb work in progress

---
 dev-db/mongodb/Manifest                          |   12 ++----
 dev-db/mongodb/files/mongodb-1.8-fix-scons.patch |   33 +++++-----------
 dev-db/mongodb/files/mongodb.confd               |    3 +-
 dev-db/mongodb/files/mongodb.initd               |   44 +++++++---------------
 dev-db/mongodb/mongodb-1.8.1.ebuild              |   34 ++++++++++-------
 5 files changed, 50 insertions(+), 76 deletions(-)

diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
index 8d0d3b2..6c355af 100644
--- a/dev-db/mongodb/Manifest
+++ b/dev-db/mongodb/Manifest
@@ -1,9 +1,5 @@
-AUX mongodb-1.8-fix-scons.patch 2000 RMD160 0728a6d2e50b3756f7d0c4c75cdd256467d20a34 SHA1 087ff1065360a63ee21ed52d1b8f78b88c8fb359 SHA256 bb7d569d43bc2aee1f51bd0082e5ff68e6da89debf0ffd8c15d992094fb6320b
-AUX mongodb-1.8-fix-scons.patch.ultrabug 1599 RMD160 de9ced190d9e1581dd06a5f120a805e894075b83 SHA1 2bc5ffd701503cf1abaf007085f536d1c9d83185 SHA256 731f63484aa5e81e70faf4cd2b3bcacf67ddaf65c05e3e0584809b075999d82b
-AUX mongodb.confd 285 RMD160 cc5e3ab24a9880a19392a7416d23d1ae7a328e11 SHA1 7c4b720ea5b0afd2fa88a6adc2d8a2e356691413 SHA256 8dfedbb433e11f8ed6ec8159ed5c02f94c22f86006cda21f0b2bb59ebe50b2ad
-AUX mongodb.initd 1129 RMD160 92a89d9d71ffcdaba8f86f1a2902abddc9866147 SHA1 2c83bfe4c5728ffc8b3dc37fd8d345d09c13f6b0 SHA256 c318a8ca1fe83c59df759b2c70e0e0c22fe38cae49de6dbd1afa8399ef626e6a
+AUX mongodb-1.8-fix-scons.patch 1649 RMD160 1e5be2fe75f25c511b1d70dd1dd7977c8f1a6db3 SHA1 1300bbc5ff4f9c4a59e89fb3e119506b3507906d SHA256 5b8db8f66adabbdd52c364a713ce38a937c4ac6282a4ac530d14930d386d582d
+AUX mongodb.confd 246 RMD160 fee0f87d5f6715b237d7195ea6dfd24a50868102 SHA1 dd786ce383ea3a112352f5b48e4948dd3377b009 SHA256 5dd09535664bd7bc9d0e927896f8e768f225c43c1d84bde9812cb36866f1f587
+AUX mongodb.initd 706 RMD160 7eafe2f49701dcbee548c32e1340d21e3cb0c482 SHA1 6a492588c90c592782eab4b3682735ba32cbd75d SHA256 15e549835897d44ded2e4be37448c08fd2b084bc1609cf747bdb3e5674ab9e00
 DIST mongodb-src-r1.8.1.tar.gz 1718969 RMD160 e8739fd15c40eac9934045af4365c13f204d16fe SHA1 615cfe4ace4899e73a7083059c7178d8f5c19f03 SHA256 8b268b4f8c4d055c74add1fc995f103d893657c4291964d370899ebefd0bc97d
-EBUILD mongodb-1.8.1.ebuild 2082 RMD160 1ce22cdfb7c236ff356d302d6b3e4e8d336d43a8 SHA1 5b8cb8c80833b710626fd0ae41c04265066faefb SHA256 1465baaef0f28b23a8acccee79247f51333f6f9fa7174d9f7b0396c83640f980
-MISC johan-fixes.patch 5859 RMD160 1abbc357419b44d6dec3dab6165aa96d9c425081 SHA1 bac0e8da059f93ebcbeef7a3c109d61eb1f8375a SHA256 7e051265cf978eafc76359d9ad6cbb3e5c4998b16383936971a9d8425c0f38fa
-MISC johan-fixes.patch.orig 5898 RMD160 6499a6181059d619e2f2e5c1cb5969bc7cd21cda SHA1 32984512cd6a1c5f2b630051dc83b6727caae2a1 SHA256 13a9525c9e13fd6405d6bc86605ad9a48ca8e983da9ef3c94917108125e3c810
-MISC johan-fixes.patch.rej 1599 RMD160 de9ced190d9e1581dd06a5f120a805e894075b83 SHA1 2bc5ffd701503cf1abaf007085f536d1c9d83185 SHA256 731f63484aa5e81e70faf4cd2b3bcacf67ddaf65c05e3e0584809b075999d82b
+EBUILD mongodb-1.8.1.ebuild 2254 RMD160 b267fc26bb0ea50a7b3008115679da9ecbf06e2a SHA1 45169685deb4d2bb302737194b1cf9b3959ee53e SHA256 778b878bc368f7988bc7f2a98849814c49dec54ddb0209579709f312735ab001

diff --git a/dev-db/mongodb/files/mongodb-1.8-fix-scons.patch b/dev-db/mongodb/files/mongodb-1.8-fix-scons.patch
index 7652f56..3d2996a 100644
--- a/dev-db/mongodb/files/mongodb-1.8-fix-scons.patch
+++ b/dev-db/mongodb/files/mongodb-1.8-fix-scons.patch
@@ -1,23 +1,18 @@
-diff --git a/SConstruct b/SConstruct
-index 41383b1..3752c4a 100644
---- a/SConstruct
-+++ b/SConstruct
-@@ -670,11 +670,10 @@ if nix:
-         
+--- 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:
+     if linux:
 -        env.Append( CPPFLAGS=" -Werror " )
--        env.Append( CPPFLAGS=" -fno-builtin-memcmp " ) # glibc's memcmp is faster than gcc's
+         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=" -fPIC -pthread -rdynamic" )
-+    env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic " )
 +    env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+     env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" )
      env.Append( LIBS=[] )
  
-     #make scons colorgcc friendly
-@@ -683,17 +682,11 @@ if nix:
+@@ -683,12 +684,11 @@
  
      if linux and has_option( "sharedclient" ):
          env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
@@ -28,21 +23,15 @@ index 41383b1..3752c4a 100644
          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:
--        #env.Append( CPPFLAGS=" -fprofile-use" )
--        #env.Append( LINKFLAGS=" -fprofile-use" )        
- 
-     if debugLogging:
-         env.Append( CPPFLAGS=" -D_DEBUG" );
-@@ -911,8 +904,9 @@ def doConfigure( myenv , needPcre=True , shell=False ):
+         #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" ] )
  

diff --git a/dev-db/mongodb/files/mongodb.confd b/dev-db/mongodb/files/mongodb.confd
index bc16601..3643f9e 100644
--- a/dev-db/mongodb/files/mongodb.confd
+++ b/dev-db/mongodb/files/mongodb.confd
@@ -2,10 +2,9 @@
 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=""
+MONGODB_OPTIONS="--journal"

diff --git a/dev-db/mongodb/files/mongodb.initd b/dev-db/mongodb/files/mongodb.initd
index 482e311..32c6968 100644
--- a/dev-db/mongodb/files/mongodb.initd
+++ b/dev-db/mongodb/files/mongodb.initd
@@ -1,7 +1,7 @@
 #!/sbin/runscript
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 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: $
 
 depend() {
 	need net
@@ -9,37 +9,21 @@ depend() {
 
 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
+	start-stop-daemon --background --start --make-pidfile \
+		--pidfile /var/run/${SVCNAME}.pid \
+		--user ${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} \
+		--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 /var/run/${SVCNAME}.pid
+	eend $?
 }

diff --git a/dev-db/mongodb/mongodb-1.8.1.ebuild b/dev-db/mongodb/mongodb-1.8.1.ebuild
index 0af2443..478f13c 100644
--- a/dev-db/mongodb/mongodb-1.8.1.ebuild
+++ b/dev-db/mongodb/mongodb-1.8.1.ebuild
@@ -16,15 +16,15 @@ SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz"
 LICENSE="AGPL-3 Apache-2.0"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="pcap static-libs v8"
+IUSE="static-libs v8"
 
-RDEPEND="pcap? ( net-libs/libpcap )
-	!v8? ( dev-lang/spidermonkey )
+RDEPEND="!v8? ( dev-lang/spidermonkey )
 	v8? ( dev-lang/v8 )
 	dev-libs/boost
-	dev-libs/libpcre"
+	dev-libs/libpcre[cxx]
+	net-libs/libpcap"
 DEPEND="${RDEPEND}
-	>=dev-util/scons-1.2.0-r1
+	dev-util/scons
 	sys-libs/readline
 	sys-libs/ncurses"
 
@@ -45,12 +45,12 @@ pkg_setup() {
 
 src_prepare() {
 	epatch "${FILESDIR}/${PN}-1.8-fix-scons.patch"
-	if use v8; then
-		# TODO: is this still true ?
+	# TODO: is this still true ?
+	#if use v8; then
 		# Suppress known test failure with v8:
 		# http://jira.mongodb.org/browse/SERVER-1147
-		sed -i -e '/add< NumberLong >/d' dbtests/jstests.cpp || die
-	fi
+		#sed -i -e '/add< NumberLong >/d' dbtests/jstests.cpp || die
+	#fi
 }
 
 src_compile() {
@@ -60,12 +60,10 @@ src_compile() {
 src_install() {
 	scons ${scons_opts} --full --nostrip install --prefix="${D}"/usr || die "Install failed"
 
-	# TODO: check for other possible .a files ?
-	use static-libs || rm ${D}/usr/*/libmongoclient.a
+	use static-libs || rm "${D}/usr/$(get_libdir)/libmongoclient.a"
 
-	# TODO: wouldn't we prefer keepdir for this ?
-	for x in /var/{lib,log,run}/${PN}; do
-		dodir "${x}" || die "Install failed"
+	for x in /var/{lib,log}/${PN}; do
+		keepdir "${x}" || die "Install failed"
 		fowners mongodb:mongodb "${x}"
 	done
 
@@ -79,3 +77,11 @@ src_install() {
 src_test() {
 	scons ${scons_opts} smoke --smokedbprefix='testdir' test || die "Tests failed"
 }
+
+pkg_postinst() {
+	if has_version '<dev-db/mongodb-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 "Journalling is now set as default, see ${CONFDIR}/${PN}."
+}
\ No newline at end of file



             reply	other threads:[~2011-04-10 14:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-10 14:20 Alexys Jacob [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-05-14  9:19 [gentoo-commits] dev/ultrabug:master commit in: dev-db/mongodb/files/, dev-db/mongodb/ Alexys Jacob
2014-05-12 15:11 Alexys Jacob
2014-01-20 11:17 Alexys Jacob
2011-04-13 14:58 Alexys Jacob
2011-04-13 10:30 Alexys Jacob
2011-04-12  8:10 Alexys Jacob
2011-04-12  8:08 Alexys Jacob
2011-04-11 16:34 Alexys Jacob
2011-04-11 15:45 Alexys Jacob
2011-04-11 14:13 Alexys Jacob
2011-04-11 12:36 Alexys Jacob
2011-04-10 17:55 Alexys Jacob
2011-04-08 17:39 Alexys Jacob
2011-04-08  8:01 Alexys Jacob
2011-04-07  7:58 Alexys Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eed9ea43633b2826fa31775edaa9c8c89548e2d0.ultrabug@gentoo \
    --to=ultrabug@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox