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: Mon, 20 Jan 2014 11:17:06 +0000 (UTC) [thread overview]
Message-ID: <1390216608.69d84cbc4cc1b505d5730b2f3e3124fa92025d5d.ultrabug@gentoo> (raw)
commit: 69d84cbc4cc1b505d5730b2f3e3124fa92025d5d
Author: Ultrabug <ultrabug <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 20 11:16:48 2014 +0000
Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
CommitDate: Mon Jan 20 11:16:48 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/ultrabug.git;a=commit;h=69d84cbc
add dev branch of mongodb wrt bug #496196
---
dev-db/mongodb/Manifest | 16 +++
dev-db/mongodb/files/mms-agent.confd | 9 ++
dev-db/mongodb/files/mms-agent.initd | 41 ++++++
.../mongodb/files/mongodb-2.2-r1-fix-boost.patch | 13 ++
dev-db/mongodb/files/mongodb-2.4.8-fix-grsec.patch | 24 ++++
dev-db/mongodb/files/mongodb-2.5.4-fix-scons.patch | 32 +++++
dev-db/mongodb/files/mongodb.conf | 8 ++
dev-db/mongodb/files/mongodb.confd | 14 ++
dev-db/mongodb/files/mongodb.initd-r1 | 40 ++++++
dev-db/mongodb/files/mongodb.logrotate | 13 ++
dev-db/mongodb/files/mongodb.service | 10 ++
dev-db/mongodb/files/mongos.confd | 16 +++
dev-db/mongodb/files/mongos.initd-r1 | 50 +++++++
dev-db/mongodb/metadata.xml | 29 +++++
dev-db/mongodb/mongodb-2.5.4.ebuild | 145 +++++++++++++++++++++
15 files changed, 460 insertions(+)
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
new file mode 100644
index 0000000..54859ab
--- /dev/null
+++ b/dev-db/mongodb/Manifest
@@ -0,0 +1,16 @@
+AUX mms-agent.confd 205 SHA256 29e678e722268311fb59f5af57ac3fbadb9e930cd3cb1ce9e4dc33d30e021e40 SHA512 e81e68ebad2d409a9e631de0aaf264eab99b3faa5c313a7c96a6672a6c51d3243100f5ef599bf2a347b4f9e1b1a6ebf95fa890cb614d9745c58430fadd8ee13a WHIRLPOOL 24d98082e138dbcee0a276c4874d88a23f7f53d1bf0f6a7f2e979c005413f14809269622ecd013913221a267eb1fc806130d69915ce5cd38a646b498912ca729
+AUX mms-agent.initd 1277 SHA256 fda9a9eb7e2abceef572ffbad0987b74670b6b5e0c50d93f58ef8141825a2cea SHA512 32bdcadf7395f371809b253934f8c3dd0074e6aafccfab091f8bf699524eb32ffdc787b479e08056e2fac933f1627a5f1cc03842a2f8b939f8b68bb2e6da71c2 WHIRLPOOL a9f78afe5286e2762c27ab0a272e4e5719e070cbd9ab5f551ef322346bb3ff46d0b49c76906fe63f8c78c9bf6a11d720d2908044d5666e5dd98afdef55fca76e
+AUX mongodb-2.2-r1-fix-boost.patch 870 SHA256 885991e16aecc66d88b40418531a66449ab8e434ca677acc7814e7485231e841 SHA512 902c11e15e26be6c64053b4f3c0d0fda1670373fa3a5805063b49957843173b3663f6271ae541bb07aedf884a9861099bb1f452761f7baeaa819f14eb0755336 WHIRLPOOL b5df66a5e90202db903989c66b7423103ca1a666a477175c1746c94d5cf250ac4ceb2d237737ee2bfc158a8f9c611916e91d5133ba94e544abbaaec8b0d0361a
+AUX mongodb-2.4.8-fix-grsec.patch 824 SHA256 65a50faa697f4e76eaf87b459121b8ba7c04d028a5524939296db2ca701cf2fb SHA512 7dac727a63dab7713a85f7d483f68a6fe9ed7c5ef06324a899a558d118857e9937c5e48e1fe2ae2063d1442c17b68b60b6c14934184a2badf4ecc9b3f68731bd WHIRLPOOL feef78707135bd128c21a5c344bbf25eef1ef796b236461656baa6299a0335759fff42103c36aebca1afcb23697f4ff42df382ceb2d05d0f90e913cfdac0e597
+AUX mongodb-2.5.4-fix-scons.patch 1355 SHA256 02b90cf2a6f35df5021d8985b1bddd8c0f65d4764f59469c3c51e46864bac02f SHA512 f2f0e1439bab449951696f6d49f32e89dba0f848391475354d0b4d34e325a88604c8e87d2fe85701b5dcb7958a22714df283e79ba61bbd0b93f5b20d0914923c WHIRLPOOL 7fb2929f03744819395c00ef2eefc3fcb91fa00dc436348a69dbca55d2ac1c18c9d76c7d29dfb47aff751088d9798061f588bb4b22a94353229d39d65f6090af
+AUX mongodb.conf 246 SHA256 8010ce728d657524cd76b5afda7ffbc1cc389642336b12b89cec5df2b09fc0e4 SHA512 05dead727d3ea5fe8af1a3c3888693f6b3e2b8cb7f197a5d793352e10d2c524e96c9a5c55ad2e88c1114643a9612ec0b26a2574b48a5260a9b51ec8941461f1c WHIRLPOOL 17a27daaa7892140d741256cf9acaf2f2909a545f350c936183aeb7b6671c25a3dc11f191b01ed008195965b8cc39b49f1a3a8c69cfd90c4ca57b9fa2732beff
+AUX mongodb.confd 361 SHA256 a4ca29c577428c02cd0b0a8b46756df5f53a05519c9d13c270533cf99b9b819d SHA512 9bcd870742c31bf25f34188ddc3c414de1103e9860dea9f54eee276b89bc2cf1226abab1749c5cda6a6fb0880e541373754e5e83d63cc7189d4b9c274fd555c3 WHIRLPOOL 35d785763d0cb1e21516a3fa15332d6c93d35e6faea02b60f81c389878dd89fe026504c6cfce5e9abfc8353f74b0e959a7501373d2a389f269c6952d33e8d2e8
+AUX mongodb.initd-r1 1215 SHA256 d56c5e301a7c35bcc60fa60859eee56342be7e4911edd19e519804bcf08a5ef0 SHA512 d09b6786f986edafceba4042dbfd29f336996af93f11cd92c3dcc267d7cb522946e6800cb75fae9d02ee1490856b218be96012b132766deb0240fdaf4a65e6b7 WHIRLPOOL 416fdef48831961d410fb85f18148f70455bfc005e1f788c0f3fa035e8a4fc0c1001b1a1b37878018bdd3ba927843d7b0a0ca4c2850c9d57e21c74388cb1e077
+AUX mongodb.logrotate 205 SHA256 76994c32d999def5c925bd7be3f96687b3406f1d67b89aa6a4df8053025b1e01 SHA512 8c089b1a11f494e4148fb4646265964c925bf937633a65e395ee1361d42facf837871dd493a9a2e0f480ae0e0829dbd3ed60794c5334e2716332e131fc5c2c51 WHIRLPOOL c1d94339a6e58363ba37bfd0f878ea6db403eaee02aa030891bfd54af1a61e34622286e560ba5217201435a745217b2da55d857fece83d5a94b12d915ad2940c
+AUX mongodb.service 220 SHA256 19f55ab28652b3817e98fc3f15cc2f6f3255a5e1dfd7b0d5a27c9ba22fd2703e SHA512 177251404b2e818ae2b546fe8b13cb76e348c99e85c7bef22a04b0f07b600fd515a309ede50214f4198594388a6d2b31f46e945b9dae84aabb4dfa13b1123bb9 WHIRLPOOL 0f6e032acbc7f625b03dcec990126cef064925a341e38c27cddbed5a951c8cfeded00ee3b8b0d9044245c833e86748262434665342e6baa98500fb02c07f4281
+AUX mongos.confd 345 SHA256 2afd582564623da0e928ca667d37bef467334c82d08b49301f1f6c16ba177767 SHA512 61d8734cef644187eeadc821c89e63a3fbf61860fe2db6e74557b1c6760fe83ba7549cb04f9e3aacea4d8e7e4d81a3b1bc0d5e29715eca33c4761adb17ea9ab7 WHIRLPOOL 39c338211f2dcc4dacc4e6463657339287a5da6f20b02c68f1bb5b084d5db14eed4da435b3ed2319d3bf9c415dd6a9d4a6a84c105872fd5513c6146c2b5afc1b
+AUX mongos.initd-r1 1370 SHA256 d4c9f32f0f001ae7cfe2b35034fd8e5a24a83fd1bc89941550c68fd98a3c9454 SHA512 28aea696b53bb557d41c5cb501ae30a72470750eb49e59442df67e98b087008fdc75e41d516443b7cc5cb5eb9aa710b98455d7955a4c1b76869ef841e67417b4 WHIRLPOOL db36b6250ef6fdbd4aec5bd249593ba81a2af44aefc26ad3ab2b04af5a4b6e84e416e0b90c4f3bb98dcaf182aeb1eab93bb8bebcdbe539881ca2c595e3e5d137
+DIST 20130821-10gen-mms-agent.zip 31918 SHA256 b48f35fe2ad058dc4ebcab01dad1229c0597e78a9011b57cd1030a05cdd16e7c SHA512 9467d229829076733a023d81e377479e1e4c71c4d2c1d163928abf7215bc87809a304768f83b531b6f585d19b18585f9d0d35fd74762cf180586be11536eb1a8 WHIRLPOOL d632c1761d1f47f2139a046d58af09641a0c8d9f3168d7ebc99dac5c6a3b5b0846cba8eac581b67d35c5e7580c6910759503b85e7ca74e5930c0e0dac3d77c97
+DIST mongodb-src-r2.5.4.tar.gz 14198740 SHA256 18a83049fabb3bbc6e9519c3e20b6c4e412ae1f0f8e4c7684994e3ed919f969c SHA512 23bda909d4c74aef080e0a3c1ead92cb2a96a68f85e6835da1b2a2edfb88271cd5ca6379a4bfcba1902dd9c7c192efc6bd22795efd8c9be6290c7575b80b098a WHIRLPOOL 8932c85cd759fb67db1655e24278c90beb27d01696959e2e9c07848a51442d23197dc7bb94e59231c722a8754c551fc77b3b231a968578298c30b7e5f5b0b03c
+EBUILD mongodb-2.5.4.ebuild 3687 SHA256 cd2dc9330ba2d2ff562516612f2a7ecefdcd9209968944e88d4b7eff69f3c123 SHA512 76a545a34a309b2b384882d9c8b84e680dcc685a31fdfb292546b8133d2225a3b84fda7187f12489b94e761b7e8356cb5ce43c075a840916791b499fb1a4fede WHIRLPOOL 65d5ddc20d5c16985c6dad1facb76094acf497ee582c3cfebb756376771e1bf9560b156156e466c478cd40f4a6c7d0cbf026478a44a0af485540de79aadd5d1a
+MISC metadata.xml 1090 SHA256 bb0066679f4a7ee9f21238becfdf1cb6e38489c1a9d46e0671d4098455f886ea SHA512 b4e4fec0815ac98c85b437f2155f4620b91fe24e81f559b92901038f68534e07dc91ae77ac609311e9febbe64b8ef0ad5ad164346cdb466e28bf1732ed18048a WHIRLPOOL b5305d0cbc7398d66d9e26b14adeaccfeeee8d0d24fad8bb957517273b97f94b0feb1afc1bdefaa01ea06502c570376e8e7a0ce68dca76c8ae5dbbf686d6458a
diff --git a/dev-db/mongodb/files/mms-agent.confd b/dev-db/mongodb/files/mms-agent.confd
new file mode 100644
index 0000000..d19b21e
--- /dev/null
+++ b/dev-db/mongodb/files/mms-agent.confd
@@ -0,0 +1,9 @@
+# Your API key - See: http://mms.10gen.com/settings
+API_KEY=""
+SECRET_KEY=""
+
+# Seconds between Mongo status checks
+#COLLECTION_INTERVAL=56
+
+# Seconds between cloud configuration checks
+#CONF_INTERVAL=120
\ No newline at end of file
diff --git a/dev-db/mongodb/files/mms-agent.initd b/dev-db/mongodb/files/mms-agent.initd
new file mode 100644
index 0000000..b296be7
--- /dev/null
+++ b/dev-db/mongodb/files/mms-agent.initd
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mms-agent.initd,v 1.3 2013/01/18 11:19:27 ultrabug Exp $
+
+ROOTDIR=/opt/mms-agent
+PIDFILE=/var/run/mm-agent.pid
+EXEC="/usr/bin/env python agent.py"
+LOGFILE=/var/log/mongodb/mms-agent.log
+
+depend() {
+ need net
+ use syslog
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+
+ checkpath -d -m 0755 -o root:root /var/run/
+
+ # Setup API/SECRETY KEYS
+ sed -i -e "s/^mms_key.*/mms_key = '${API_KEY}'/g" \
+ -e "s/^secret_key.*/secret_key = '${SECRET_KEY}'/g" ${ROOTDIR}/settings.py &>/dev/null
+
+ # Tune the agent
+ [ -z "${COLLECTION_INTERVAL}" ] || sed -i \
+ -e "s/^collection_interval.*/collection_interval = ${COLLECTION_INTERVAL}/g" ${ROOTDIR}/settings.py &>/dev/null
+ [ -z "${CONF_INTERVAL}" ] || sed -i \
+ -e "s/^conf_interval.*/conf_interval = ${CONF_INTERVAL}/g" ${ROOTDIR}/settings.py &>/dev/null
+
+ start-stop-daemon --start --chdir ${ROOTDIR} --exec ${EXEC} \
+ --pidfile "${PIDFILE}" --make-pidfile --background \
+ --user mongodb:mongodb --stdout ${LOGFILE} --stderr ${LOGFILE}
+ eend $?
+}
+
+stop() {
+ ebegin "Requesting ${SVCNAME} to stop"
+ start-stop-daemon --stop --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch b/dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch
new file mode 100644
index 0000000..b6c9a1e
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch
@@ -0,0 +1,13 @@
+--- mongodb-src-r2.2.0/SConstruct.old 2012-10-09 12:41:25.000000000 -0400
++++ mongodb-src-r2.2.0/SConstruct 2012-10-09 12:41:41.000000000 -0400
+@@ -171,8 +171,8 @@
+ add_option( "extrapathdyn", "comma separated list of add'l paths (--extrapath /opt/foo/,/foo) dynamic linking" , 1 , True )
+ add_option( "extralib", "comma separated list of libraries (--extralib js_static,readline" , 1 , True )
+
+-add_option( "boost-compiler", "compiler used for boost (gcc41)" , 1 , True , "boostCompiler" )
+-add_option( "boost-version", "boost version for linking(1_38)" , 1 , True , "boostVersion" )
++add_option( "boost-compiler", "compiler used for boost (gcc41)" , 1 , False , "boostCompiler" )
++add_option( "boost-version", "boost version for linking(1_38)" , 1 , False , "boostVersion" )
+
+ add_option( "no-glibc-check" , "don't check for new versions of glibc" , 0 , False )
+
diff --git a/dev-db/mongodb/files/mongodb-2.4.8-fix-grsec.patch b/dev-db/mongodb/files/mongodb-2.4.8-fix-grsec.patch
new file mode 100644
index 0000000..cff7d0f
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-2.4.8-fix-grsec.patch
@@ -0,0 +1,24 @@
+--- a/src/mongo/db/db.cpp 2013-12-31 10:47:50.125065072 +0100
++++ b/src/mongo/db/db.cpp 2013-12-31 10:50:49.252477950 +0100
+@@ -528,6 +528,7 @@
+ /// warn if readahead > 256KB (gridfs chunk size)
+ static void checkReadAhead(const string& dir) {
+ #ifdef __linux__
++ try {
+ const dev_t dev = getPartition(dir);
+
+ // This path handles the case where the filesystem uses the whole device (including LVM)
+@@ -561,6 +562,13 @@
+ }
+ }
+ }
++ }
++ catch (const std::exception& e) {
++ log() << "unable to validate readahead settings due to error: " << e.what()
++ << startupWarningsLog;
++ log() << "for more information, see http://dochub.mongodb.org/core/readahead"
++ << startupWarningsLog;
++ }
+ #endif // __linux__
+ }
+
diff --git a/dev-db/mongodb/files/mongodb-2.5.4-fix-scons.patch b/dev-db/mongodb/files/mongodb-2.5.4-fix-scons.patch
new file mode 100644
index 0000000..79076a0
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-2.5.4-fix-scons.patch
@@ -0,0 +1,32 @@
+--- a/SConstruct 2014-01-13 11:53:09.523206053 +0100
++++ b/SConstruct 2014-01-13 11:55:03.561532653 +0100
+@@ -837,18 +837,16 @@
+ # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used.
+ env.Append( CCFLAGS=["-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 or darwin:
+- env.Append( CCFLAGS=["-Werror", "-pipe"] )
+
+ env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] )
+- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'])
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+ env.Append( LINKFLAGS=["-fPIC", "-pthread"] )
+
+ # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
+@@ -866,7 +864,7 @@
+ if not darwin:
+ env.Append( LINKFLAGS=["-rdynamic"] )
+
+- env.Append( LIBS=[] )
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy'] )
+
+ #make scons colorgcc friendly
+ for key in ('HOME', 'TERM'):
diff --git a/dev-db/mongodb/files/mongodb.conf b/dev-db/mongodb/files/mongodb.conf
new file mode 100644
index 0000000..c5272b7
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.conf
@@ -0,0 +1,8 @@
+# See http://www.mongodb.org/display/DOCS/File+Based+Configuration for format details
+# Run mongod --help to see a list of options
+
+bind_ip = 127.0.0.1
+quiet = true
+dbpath = /var/lib/mongodb
+logpath = /var/log/mongodb/mongod.log
+logappend = true
diff --git a/dev-db/mongodb/files/mongodb.confd b/dev-db/mongodb/files/mongodb.confd
new file mode 100644
index 0000000..4f76c5a
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.confd
@@ -0,0 +1,14 @@
+# Mongodb essentials
+MONGODB_EXEC="/usr/bin/mongod"
+MONGODB_RUN="/var/run/mongodb"
+MONGODB_DATA="/var/lib/mongodb"
+MONGODB_USER="mongodb"
+
+# Listen to specified IP, comment this to listen to all
+MONGODB_IP="127.0.0.1"
+
+# Listen to specified port
+MONGODB_PORT="27017"
+
+# Set extra options here, such as disabling the admin web server
+MONGODB_OPTIONS="--journal"
diff --git a/dev-db/mongodb/files/mongodb.initd-r1 b/dev-db/mongodb/files/mongodb.initd-r1
new file mode 100644
index 0000000..2e4c01a
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.initd-r1
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mongodb.initd-r1,v 1.1 2013/08/16 12:54:44 ultrabug Exp $
+
+depend() {
+ use net
+}
+
+start() {
+ checkpath -d -m 0750 -o "${MONGODB_USER}":mongodb "${MONGODB_RUN}"
+
+ # Listen to MONGODB_IP if configured
+ [ -z "${MONGODB_IP}" ] || MONGODB_OPTIONS="--bind_ip ${MONGODB_IP} ${MONGODB_OPTIONS}"
+
+ # Baselayout-1 user should use --chuid instead of --user
+ local USEROPT="--user"
+ if [ ! -f /etc/init.d/sysfs ]; then
+ USEROPT="--chuid"
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --background --start --make-pidfile \
+ --pidfile ${MONGODB_RUN:-/var/run/mongodb}/${SVCNAME}.pid \
+ ${USEROPT} ${MONGODB_USER:-mongodb} \
+ --exec ${MONGODB_EXEC:-/usr/bin/mongod} \
+ -- \
+ --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 --pidfile ${MONGODB_RUN:-/var/run/mongodb}/${SVCNAME}.pid
+ eend $?
+}
diff --git a/dev-db/mongodb/files/mongodb.logrotate b/dev-db/mongodb/files/mongodb.logrotate
new file mode 100644
index 0000000..f95a438
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.logrotate
@@ -0,0 +1,13 @@
+# Default log rotation / compression keeps 1 year of logs.
+/var/log/mongodb/*.log {
+ daily
+ rotate 365
+ dateext
+ copytruncate
+ delaycompress
+ compress
+ notifempty
+ extension gz
+ sharedscripts
+ missingok
+}
diff --git a/dev-db/mongodb/files/mongodb.service b/dev-db/mongodb/files/mongodb.service
new file mode 100644
index 0000000..78d5511
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=High-performance, schema-free document-oriented database
+After=network.target
+
+[Service]
+User=mongodb
+ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-db/mongodb/files/mongos.confd b/dev-db/mongodb/files/mongos.confd
new file mode 100644
index 0000000..644cd0a
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.confd
@@ -0,0 +1,16 @@
+# Mongos essentials
+MONGOS_EXEC="/usr/bin/mongos"
+MONGOS_RUN="/var/run/mongodb"
+MONGOS_USER="mongodb"
+
+# Listen to specified IP, comment this to listen to all
+MONGOS_IP="127.0.0.1"
+
+# Listen to specified port
+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-r1 b/dev-db/mongodb/files/mongos.initd-r1
new file mode 100644
index 0000000..fe08878
--- /dev/null
+++ b/dev-db/mongodb/files/mongos.initd-r1
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mongos.initd-r1,v 1.1 2013/08/16 12:54:44 ultrabug Exp $
+
+depend() {
+ use 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
+
+ checkpath -d -m 0750 -o "${MONGOS_USER}":mongodb "${MONGOS_RUN}"
+
+ # Listen to MONGOS_IP if configured
+ [ -z "${MONGOS_IP}" ] || MONGOS_OPTIONS="--bind_ip ${MONGOS_IP} ${MONGOS_OPTIONS}"
+
+ # Baselayout-1 user should use --chuid instead of --user
+ local USEROPT="--user"
+ if [ ! -f /etc/init.d/sysfs ]; then
+ USEROPT="--chuid"
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --background --start --make-pidfile \
+ --pidfile ${MONGOS_RUN:-/var/run/mongodb}/${SVCNAME}.pid \
+ ${USEROPT} ${MONGOS_USER:-mongodb} \
+ --exec ${MONGOS_EXEC:-/usr/bin/mongos} \
+ -- \
+ --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 $?
+}
diff --git a/dev-db/mongodb/metadata.xml b/dev-db/mongodb/metadata.xml
new file mode 100644
index 0000000..87c16b5
--- /dev/null
+++ b/dev-db/mongodb/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>ultrabug@gentoo.org</email>
+ <name>Alexys Jacob</name>
+ </maintainer>
+ <maintainer>
+ <email>bugs@bergstroem.nu</email>
+ <name>Johan Bergström</name>
+ <description>Proxy Maintainer. CC on bugs</description>
+ </maintainer>
+ <longdescription lang="en">
+ MongoDB (from "humongous") is a scalable, high-performance, open source,
+ schema-free, document-oriented database. Written in C++, MongoDB features:
+
+ MongoDB bridges the gap between key-value stores (which are fast and highly
+ scalable) and traditional RDBMS systems (which provide structured schemas
+ and powerful queries).
+ </longdescription>
+ <use>
+ <flag name="spidermonkey">Use embedded SpiderMonkey engine
+ (<pkg>dev-lang/spidermonkey</pkg>) instead of v8</flag>
+ <flag name="mms-agent">Install the MongoDB Monitoring Service agent</flag>
+ <flag name="sharedclient">build client shared library libmongoclient.so</flag>
+ </use>
+</pkgmetadata>
+
diff --git a/dev-db/mongodb/mongodb-2.5.4.ebuild b/dev-db/mongodb/mongodb-2.5.4.ebuild
new file mode 100644
index 0000000..e06d76c
--- /dev/null
+++ b/dev-db/mongodb/mongodb-2.5.4.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-2.4.8.ebuild,v 1.3 2013/12/26 11:27:44 ultrabug Exp $
+
+EAPI=4
+SCONS_MIN_VERSION="1.2.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="2400M"
+
+inherit eutils flag-o-matic multilib pax-utils scons-utils systemd user versionator check-reqs
+
+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
+ mms-agent? ( http://dev.gentoo.org/~ultrabug/20130821-10gen-mms-agent.zip )"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="kerberos mms-agent sharedclient spidermonkey ssl static-libs"
+
+PDEPEND="mms-agent? ( dev-python/pymongo app-arch/unzip )"
+RDEPEND="
+ >=dev-libs/boost-1.50[threads(+)]
+ dev-libs/libpcre[cxx]
+ dev-util/google-perftools[-minimal]
+ net-libs/libpcap
+ app-arch/snappy
+ ssl? ( >=dev-libs/openssl-1.0.1c )"
+DEPEND="${RDEPEND}
+ sys-libs/readline
+ sys-libs/ncurses
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ scons_opts=" --cc=$(tc-getCC) --cxx=$(tc-getCXX)"
+ scons_opts+=" --use-system-tcmalloc"
+ scons_opts+=" --use-system-pcre"
+ scons_opts+=" --use-system-snappy"
+ scons_opts+=" --use-system-boost"
+
+ if use prefix; then
+ scons_opts+=" --cpppath=${EPREFIX}/usr/include"
+ scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)"
+ fi
+
+ if use kerberos; then
+ scons_opts+=" --use-sasl-client"
+ fi
+
+ if use sharedclient; then
+ scons_opts+=" --sharedclient"
+ fi
+
+ if use spidermonkey; then
+ scons_opts+=" --usesm"
+ else
+ scons_opts+=" --usev8"
+ fi
+
+ if use ssl; then
+ scons_opts+=" --ssl"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-2.5.4-fix-scons.patch"
+ epatch "${FILESDIR}/${PN}-2.2-r1-fix-boost.patch"
+
+ # bug #462606
+ sed -i -e "s@\$INSTALL_DIR/lib@\$INSTALL_DIR/$(get_libdir)@g" src/SConscript.client || die
+
+ # bug #482576
+ sed -i -e "/-Werror/d" src/third_party/v8/SConscript || die
+}
+
+src_compile() {
+ escons ${scons_opts} all
+}
+
+src_install() {
+ escons ${scons_opts} --full --nostrip install --prefix="${ED}"/usr
+
+ use static-libs || find "${ED}"/usr/ -type f -name "*.a" -delete
+
+ if ! use spidermonkey; then
+ pax-mark m "${ED}"/usr/bin/{mongo,mongod}
+ fi
+
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r1" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd" ${PN/db/s}
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ insinto /etc
+ doins "${FILESDIR}"/${PN}.conf
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ if use mms-agent; then
+ local MY_PN="mms-agent"
+ local MY_D="/opt/${MY_PN}"
+ insinto ${MY_D}
+ doins "${WORKDIR}/${MY_PN}/"*
+ fowners -R mongodb:mongodb ${MY_D}
+ newinitd "${FILESDIR}/${MY_PN}.initd" ${MY_PN}
+ newconfd "${FILESDIR}/${MY_PN}.confd" ${MY_PN}
+ fi
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+src_test() {
+ escons ${scons_opts} test
+ "${S}"/test --dbpath=unittest || die
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} < 2.4 ]]; 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}"
+}
next reply other threads:[~2014-01-20 11:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-20 11:17 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
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-10 14:20 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=1390216608.69d84cbc4cc1b505d5730b2f3e3124fa92025d5d.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