Skip to content

Commit

Permalink
PT-44956105 - add mongo 2.2.3 to fedora 16 build
Browse files Browse the repository at this point in the history
  • Loading branch information
ezuce-admin committed Feb 22, 2013
1 parent 73abe7d commit 706bb1c
Show file tree
Hide file tree
Showing 14 changed files with 1,560 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mak/modules.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ lib_fedora_16 = \
sec \
js \
v8 \
$(lib_common)
$(lib_common) \
mongodb

# ruby-postgres broken, but should be replaced with ruby-pg on
# all distros
Expand Down
22 changes: 22 additions & 0 deletions mongodb/.sipxecs.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
mongodb_VER = 2.2.3
mongodb_REL = 1
mongodb_SRPM = mongodb-$(mongodb_VER)-$(mongodb_REL)$(RPM_DIST).src.rpm
mongodb_SPEC = $(SRC)/$(PROJ)/mongodb.spec
mongodb_SOURCES = \
$(SRC)/$(PROJ)/mongodb-src-r2.2.3.tar.gz \
$(SRC)/$(PROJ)/mongodb-2.2.0-boost-filesystem3.patch \
$(SRC)/$(PROJ)/mongodb-2.2.0-fix-xtime.patch \
$(SRC)/$(PROJ)/mongodb-2.2.0-full-flag.patch \
$(SRC)/$(PROJ)/mongodb-2.2.0-no-term.patch \
$(SRC)/$(PROJ)/mongodb-2.2.0-shared-library.patch \
$(SRC)/$(PROJ)/mongodb-2.2.0-use-system-version.patch \
$(SRC)/$(PROJ)/mongodb.conf \
$(SRC)/$(PROJ)/mongodb.init \
$(SRC)/$(PROJ)/mongodb.logrotate \
$(SRC)/$(PROJ)/mongodb.spec \
$(SRC)/$(PROJ)/mongodb-tmpfile \
$(SRC)/$(PROJ)/mongod.service \
$(SRC)/$(PROJ)/mongod.sysconf

# targets not defined, nothing to do
mongodb.autoreconf mongodb.configure mongodb.dist:;
13 changes: 13 additions & 0 deletions mongodb/mongod.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=High-performance, schema-free document-oriented database
After=syslog.target network.target

[Service]
Type=forking
User=mongodb
PIDFile=/var/run/mongodb/mongodb.pid
EnvironmentFile=/etc/sysconfig/mongod
ExecStart=/usr/bin/mongod $OPTIONS run

[Install]
WantedBy=multi-user.target
1 change: 1 addition & 0 deletions mongodb/mongod.sysconf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OPTIONS="--quiet -f /etc/mongodb.conf"
619 changes: 619 additions & 0 deletions mongodb/mongodb-2.2.0-boost-filesystem3.patch

Large diffs are not rendered by default.

102 changes: 102 additions & 0 deletions mongodb/mongodb-2.2.0-fix-xtime.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
diff -Nru mongodb-src-r2.2.0.orig/src/mongo/util/background.cpp mongodb-src-r2.2.0/src/mongo/util/background.cpp
--- mongodb-src-r2.2.0.orig/src/mongo/util/background.cpp 2012-08-28 01:28:11.000000000 -0400
+++ mongodb-src-r2.2.0/src/mongo/util/background.cpp 2012-09-13 13:29:57.817750182 -0400
@@ -92,7 +92,7 @@
if ( msTimeOut ) {
// add msTimeOut millisecond to current time
boost::xtime xt;
- boost::xtime_get( &xt, MONGO_BOOST_TIME_UTC );
+ xt = boost::get_xtime(boost::get_system_time());

unsigned long long ns = msTimeOut * 1000000ULL; // milli to nano
if ( xt.nsec + ns < 1000000000 ) {
diff -Nru mongodb-src-r2.2.0.orig/src/mongo/util/concurrency/mutex.h mongodb-src-r2.2.0/src/mongo/util/concurrency/mutex.h
--- mongodb-src-r2.2.0.orig/src/mongo/util/concurrency/mutex.h 2012-08-28 01:28:11.000000000 -0400
+++ mongodb-src-r2.2.0/src/mongo/util/concurrency/mutex.h 2012-09-13 13:30:19.747755106 -0400
@@ -38,7 +38,7 @@

inline boost::xtime incxtimemillis( long long s ) {
boost::xtime xt;
- boost::xtime_get(&xt, MONGO_BOOST_TIME_UTC);
+ xt = boost::get_xtime(boost::get_system_time());
xt.sec += (int)( s / 1000 );
xt.nsec += (int)(( s % 1000 ) * 1000000);
if ( xt.nsec >= 1000000000 ) {
diff -Nru mongodb-src-r2.2.0.orig/src/mongo/util/queue.h mongodb-src-r2.2.0/src/mongo/util/queue.h
--- mongodb-src-r2.2.0.orig/src/mongo/util/queue.h 2012-08-28 01:28:11.000000000 -0400
+++ mongodb-src-r2.2.0/src/mongo/util/queue.h 2012-09-13 13:31:04.514762934 -0400
@@ -121,7 +121,7 @@
Timer timer;

boost::xtime xt;
- boost::xtime_get(&xt, MONGO_BOOST_TIME_UTC);
+ xt = boost::get_xtime(boost::get_system_time());
xt.sec += maxSecondsToWait;

scoped_lock l( _lock );
diff -Nru mongodb-src-r2.2.0.orig/src/mongo/util/time_support.cpp mongodb-src-r2.2.0/src/mongo/util/time_support.cpp
--- mongodb-src-r2.2.0.orig/src/mongo/util/time_support.cpp 2012-08-28 01:28:11.000000000 -0400
+++ mongodb-src-r2.2.0/src/mongo/util/time_support.cpp 2012-09-13 13:34:10.394794129 -0400
@@ -106,7 +106,7 @@
if ( s <= 0 )
return;
boost::xtime xt;
- boost::xtime_get(&xt, MONGO_BOOST_TIME_UTC);
+ xt = boost::get_xtime(boost::get_system_time());
xt.sec += (int)( s / 1000000 );
xt.nsec += (int)(( s % 1000000 ) * 1000);
if ( xt.nsec >= 1000000000 ) {
@@ -118,13 +118,13 @@
#elif defined(__sunos__)
void sleepsecs(int s) {
boost::xtime xt;
- boost::xtime_get(&xt, MONGO_BOOST_TIME_UTC);
+ xt = boost::get_xtime(boost::get_system_time());
xt.sec += s;
boost::thread::sleep(xt);
}
void sleepmillis(long long s) {
boost::xtime xt;
- boost::xtime_get(&xt, MONGO_BOOST_TIME_UTC);
+ xt = boost::get_xtime(boost::get_system_time());
xt.sec += (int)( s / 1000 );
xt.nsec += (int)(( s % 1000 ) * 1000000);
if ( xt.nsec >= 1000000000 ) {
@@ -137,7 +137,7 @@
if ( s <= 0 )
return;
boost::xtime xt;
- boost::xtime_get(&xt, MONGO_BOOST_TIME_UTC);
+ xt = boost::get_xtime(boost::get_system_time());
xt.sec += (int)( s / 1000000 );
xt.nsec += (int)(( s % 1000000 ) * 1000);
if ( xt.nsec >= 1000000000 ) {
@@ -238,24 +238,24 @@
#ifdef _WIN32 // no gettimeofday on windows
unsigned long long curTimeMillis64() {
boost::xtime xt;
- boost::xtime_get(&xt, MONGO_BOOST_TIME_UTC);
+ xt = boost::get_xtime(boost::get_system_time());
return ((unsigned long long)xt.sec) * 1000 + xt.nsec / 1000000;
}
Date_t jsTime() {
boost::xtime xt;
- boost::xtime_get(&xt, MONGO_BOOST_TIME_UTC);
+ xt = boost::get_xtime(boost::get_system_time());
unsigned long long t = xt.nsec / 1000000;
return ((unsigned long long) xt.sec * 1000) + t + getJSTimeVirtualSkew() + getJSTimeVirtualThreadSkew();
}
unsigned long long curTimeMicros64() {
boost::xtime xt;
- boost::xtime_get(&xt, MONGO_BOOST_TIME_UTC);
+ xt = boost::get_xtime(boost::get_system_time());
unsigned long long t = xt.nsec / 1000;
return (((unsigned long long) xt.sec) * 1000000) + t;
}
unsigned curTimeMicros() {
boost::xtime xt;
- boost::xtime_get(&xt, MONGO_BOOST_TIME_UTC);
+ xt = boost::get_xtime(boost::get_system_time());
unsigned t = xt.nsec / 1000;
unsigned secs = xt.sec % 1024;
return secs*1000000 + t;
12 changes: 12 additions & 0 deletions mongodb/mongodb-2.2.0-full-flag.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -ur mongodb-src-r2.2.0.orig/src/SConscript.client mongodb-src-r2.2.0/src/SConscript.client
--- mongodb-src-r2.2.0.orig/src/SConscript.client 2012-10-05 12:57:10.944338273 -0500
+++ mongodb-src-r2.2.0/src/SConscript.client 2012-10-05 12:58:53.347336622 -0500
@@ -134,7 +134,7 @@
# install
prefix = GetOption("prefix")

-env.Install(prefix + "/lib", '${LIBPREFIX}mongoclient${LIBSUFFIX}')
+env.InstallAs(prefix + "/lib", '${LIBPREFIX}mongoclient${LIBSUFFIX}')

for x in clientHeaderDirectories:
env.Install(prefix + "/include/mongo/" + x,
12 changes: 12 additions & 0 deletions mongodb/mongodb-2.2.0-no-term.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -urp mongodb-src-r2.2.0.orig/SConstruct mongodb-src-r2.2.0/SConstruct
--- mongodb-src-r2.2.0.orig/SConstruct 2012-08-28 00:28:11.000000000 -0500
+++ mongodb-src-r2.2.0/SConstruct 2012-09-11 08:48:48.296688525 -0500
@@ -695,7 +695,7 @@ if nix:
env.Append( LIBS=[] )

#make scons colorgcc friendly
- for key in ('HOME', 'TERM'):
+ for key in ('HOME'):
try:
env['ENV'][key] = os.environ[key]
except KeyError:
12 changes: 12 additions & 0 deletions mongodb/mongodb-2.2.0-shared-library.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -ur mongodb-src-r2.2.0.orig/src/SConscript.client mongodb-src-r2.2.0/src/SConscript.client
--- mongodb-src-r2.2.0.orig/src/SConscript.client 2012-08-28 00:28:11.000000000 -0500
+++ mongodb-src-r2.2.0/src/SConscript.client 2012-10-02 11:20:48.968121332 -0500
@@ -98,7 +98,7 @@
mongoclient_lib = env.Library('mongoclient', clientSource),
mongoclient_install = env.Install('#/', [
mongoclient_lib,
- #env.SharedLibrary('mongoclient', clientSource),
+ env.SharedLibrary('mongoclient', clientSource),
])
env.Alias('mongoclient', mongoclient_install)

41 changes: 41 additions & 0 deletions mongodb/mongodb-2.2.0-use-system-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff -ur mongodb-src-r2.2.0.orig/SConstruct mongodb-src-r2.2.0/SConstruct
--- mongodb-src-r2.2.0.orig/SConstruct 2012-09-28 16:48:16.755503308 -0500
+++ mongodb-src-r2.2.0/SConstruct 2012-09-28 16:51:19.261374860 -0500
@@ -249,7 +249,7 @@

printLocalInfo()

-boostLibs = [ "thread" , "filesystem" , "program_options", "system" ]
+boostLibs = [ "thread" , "filesystem" , "iostreams" , "program_options", "system" ]

onlyServer = len( COMMAND_LINE_TARGETS ) == 0 or ( len( COMMAND_LINE_TARGETS ) == 1 and str( COMMAND_LINE_TARGETS[0] ) in [ "mongod" , "mongos" , "test" ] )
nix = False
@@ -790,6 +790,28 @@
print( "c++ compiler not installed!" )
Exit(1)

+ if use_system_version_of_library("snappy"):
+ if not conf.CheckCXXHeader("snappy.h"):
+ print( "can't find snappy header" )
+ Exit(1)
+ if not conf.CheckLib("libsnappy"):
+ print( "can't find snappy library" )
+ Exit(1)
+
+ if use_system_version_of_library("pcre"):
+ if not conf.CheckCXXHeader("pcre.h"):
+ print( "can't find pcre header" )
+ Exit(1)
+ if not conf.CheckLib("libpcre"):
+ print( "can't find pcre library" )
+ Exit(1)
+ if not conf.CheckCXXHeader("pcrecpp.h"):
+ print( "can't find pcrecpp header" )
+ Exit(1)
+ if not conf.CheckLib("libpcrecpp"):
+ print( "can't find pcrecpp library" )
+ Exit(1)
+
if use_system_version_of_library("boost"):
if not conf.CheckCXXHeader( "boost/filesystem/operations.hpp" ):
print( "can't find boost headers" )
88 changes: 88 additions & 0 deletions mongodb/mongodb.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
##
### Basic Defaults
##
bind_ip = 127.0.0.1
port = 27017
fork = true
pidfilepath = /var/run/mongodb/mongodb.pid
logpath = /var/log/mongodb/mongodb.log
dbpath =/var/lib/mongodb
journal = true

# Enables periodic logging of CPU utilization and I/O wait
#cpu = true

# Turn on/off security. Off is currently the default
#noauth = true
#auth = true

# Verbose logging output.
#verbose = true

# Inspect all client data for validity on receipt (useful for
# developing drivers)
#objcheck = true

# Enable db quota management
#quota = true

# Set oplogging level where n is
# 0=off (default)
# 1=W
# 2=R
# 3=both
# 7=W+some reads
#oplog = 0

# Diagnostic/debugging option
#nocursors = true

# Ignore query hints
#nohints = true

# Disable the HTTP interface (Defaults to port+1000).
nohttpinterface = true

# Turns off server-side scripting. This will result in greatly limited
# functionality
#noscripting = true

# Turns off table scans. Any query that would do a table scan fails.
#notablescan = true

# Disable data file preallocation.
#noprealloc = true

# Specify .ns file size for new databases.
# nssize = <size>

# Accout token for Mongo monitoring server.
#mms-token = <token>

# Server name for Mongo monitoring server.
#mms-name = <server-name>

# Ping interval for Mongo monitoring server.
#mms-interval = <seconds>

# Replication Options

# in replicated mongo databases, specify here whether this is a slave or master
#slave = true
#source = master.example.com
# Slave only: specify a single database to replicate
#only = master.example.com
# or
#master = true
#source = slave.example.com

# Address of a server to pair with.
#pairwith = <server:port>
# Address of arbiter server.
#arbiter = <server:port>
# Automatically resync if slave data is stale
#autoresync
# Custom size for replication operation log.
#oplogSize = <MB>
# Size limit for in-memory storage of op ids.
#opIdMem = <bytes>
Loading

0 comments on commit 706bb1c

Please sign in to comment.