]> git.pld-linux.org Git - packages/mongodb.git/commitdiff
Version: 2.2.0
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Mon, 8 Oct 2012 14:11:32 +0000 (16:11 +0200)
committerJacek Konieczny <jajcus@jajcus.net>
Mon, 8 Oct 2012 14:11:32 +0000 (16:11 +0200)
boost-1.50.patch
config.patch [deleted file]
mongodb-build.patch [deleted file]
mongodb-cflags.patch [new file with mode: 0644]
mongodb-install.patch [new file with mode: 0644]
mongodb-system-libs.patch
mongodb.logrotate
mongodb.spec

index 7ad61aee474580953b72730e9be6c0c033c4cd23..0c1c16743c0e84f18bf7be49fe2f21f5e87eef2a 100644 (file)
@@ -1,121 +1,7 @@
---- mongodb-src-r2.0.6/pch.h~  2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/pch.h   2012-07-11 14:32:55.482057987 +0200
-@@ -79,7 +79,7 @@
- //#include <boost/any.hpp>
- #include "boost/thread/once.hpp"
- //#include <boost/archive/iterators/transform_width.hpp>
--#define BOOST_FILESYSTEM_VERSION 2
-+#define BOOST_FILESYSTEM_VERSION 3
- #include <boost/filesystem/convenience.hpp>
- #include <boost/filesystem/exception.hpp>
- #include <boost/filesystem/operations.hpp>
-Binary files mongodb-src-r2.0.6.orig/lib/libboost_thread-gcc41-mt-d-1_34_1.a and mongodb-src-r2.0.6/lib/libboost_thread-gcc41-mt-d-1_34_1.a differ
-diff -ur mongodb-src-r2.0.6.orig/util/background.cpp mongodb-src-r2.0.6/util/background.cpp
---- mongodb-src-r2.0.6.orig/util/background.cpp        2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/util/background.cpp     2012-07-11 14:35:09.392053263 +0200
-@@ -89,7 +89,7 @@
-             if ( msTimeOut ) {
-                 // add msTimeOut millisecond to current time
-                 boost::xtime xt;
--                boost::xtime_get( &xt, boost::TIME_UTC );
-+                boost::xtime_get( &xt, boost::TIME_UTC_ );
-                 unsigned long long ns = msTimeOut * 1000000ULL; // milli to nano
-                 if ( xt.nsec + ns < 1000000000 ) {
-diff -ur mongodb-src-r2.0.6.orig/util/concurrency/mutex.h mongodb-src-r2.0.6/util/concurrency/mutex.h
---- mongodb-src-r2.0.6.orig/util/concurrency/mutex.h   2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/util/concurrency/mutex.h        2012-07-11 14:35:09.392053263 +0200
-@@ -29,7 +29,7 @@
-     inline boost::xtime incxtimemillis( long long s ) {
-         boost::xtime xt;
--        boost::xtime_get(&xt, boost::TIME_UTC);
-+        boost::xtime_get(&xt, boost::TIME_UTC_);
-         xt.sec += (int)( s / 1000 );
-         xt.nsec += (int)(( s % 1000 ) * 1000000);
-         if ( xt.nsec >= 1000000000 ) {
-diff -ur mongodb-src-r2.0.6.orig/util/queue.h mongodb-src-r2.0.6/util/queue.h
---- mongodb-src-r2.0.6.orig/util/queue.h       2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/util/queue.h    2012-07-11 14:35:09.392053263 +0200
-@@ -82,7 +82,7 @@
-             Timer timer;
-             boost::xtime xt;
--            boost::xtime_get(&xt, boost::TIME_UTC);
-+            boost::xtime_get(&xt, boost::TIME_UTC_);
-             xt.sec += maxSecondsToWait;
-             scoped_lock l( _lock );
-diff -ur mongodb-src-r2.0.6.orig/util/time_support.h mongodb-src-r2.0.6/util/time_support.h
---- mongodb-src-r2.0.6.orig/util/time_support.h        2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/util/time_support.h     2012-07-11 14:35:09.392053263 +0200
-@@ -106,7 +106,7 @@
-         if ( s <= 0 )
-             return;
-         boost::xtime xt;
--        boost::xtime_get(&xt, boost::TIME_UTC);
-+        boost::xtime_get(&xt, boost::TIME_UTC_);
-         xt.sec += (int)( s / 1000000 );
-         xt.nsec += (int)(( s % 1000000 ) * 1000);
-         if ( xt.nsec >= 1000000000 ) {
-@@ -118,13 +118,13 @@
- #elif defined(__sunos__)
-     inline void sleepsecs(int s) {
-         boost::xtime xt;
--        boost::xtime_get(&xt, boost::TIME_UTC);
-+        boost::xtime_get(&xt, boost::TIME_UTC_);
-         xt.sec += s;
-         boost::thread::sleep(xt);
-     }
-     inline void sleepmillis(long long s) {
-         boost::xtime xt;
--        boost::xtime_get(&xt, boost::TIME_UTC);
-+        boost::xtime_get(&xt, boost::TIME_UTC_);
-         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, boost::TIME_UTC);
-+        boost::xtime_get(&xt, boost::TIME_UTC_);
-         xt.sec += (int)( s / 1000000 );
-         xt.nsec += (int)(( s % 1000000 ) * 1000);
-         if ( xt.nsec >= 1000000000 ) {
-@@ -202,24 +202,24 @@
- #ifdef _WIN32 // no gettimeofday on windows
-     inline unsigned long long curTimeMillis64() {
-         boost::xtime xt;
--        boost::xtime_get(&xt, boost::TIME_UTC);
-+        boost::xtime_get(&xt, boost::TIME_UTC_);
-         return ((unsigned long long)xt.sec) * 1000 + xt.nsec / 1000000;
-     }
-     inline Date_t jsTime() {
-         boost::xtime xt;
--        boost::xtime_get(&xt, boost::TIME_UTC);
-+        boost::xtime_get(&xt, boost::TIME_UTC_);
-         unsigned long long t = xt.nsec / 1000000;
-         return ((unsigned long long) xt.sec * 1000) + t + getJSTimeVirtualSkew() + getJSTimeVirtualThreadSkew();
-     }
-     inline unsigned long long curTimeMicros64() {
-         boost::xtime xt;
--        boost::xtime_get(&xt, boost::TIME_UTC);
-+        boost::xtime_get(&xt, boost::TIME_UTC_);
-         unsigned long long t = xt.nsec / 1000;
-         return (((unsigned long long) xt.sec) * 1000000) + t;
-     }    
-     inline unsigned curTimeMicros() {
-         boost::xtime xt;
--        boost::xtime_get(&xt, boost::TIME_UTC);
-+        boost::xtime_get(&xt, boost::TIME_UTC_);
-         unsigned t = xt.nsec / 1000;
-         unsigned secs = xt.sec % 1024;
-         return secs*1000000 + t;
-diff -ur mongodb-src-r2.0.6.orig/db/db.cpp mongodb-src-r2.0.6/db/db.cpp
---- mongodb-src-r2.0.6.orig/db/db.cpp  2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/db/db.cpp       2012-07-11 14:39:15.945377899 +0200
-@@ -326,7 +326,7 @@
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/db/db.cpp mongodb-src-r2.2.0/src/mongo/db/db.cpp
+--- mongodb-src-r2.2.0.orig/src/mongo/db/db.cpp        2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/db/db.cpp     2012-09-28 13:37:59.000000000 +0200
+@@ -348,7 +348,7 @@
          boost::filesystem::path path( dbpath );
          for ( boost::filesystem::directory_iterator i( path );
                  i != boost::filesystem::directory_iterator(); ++i ) {
@@ -124,7 +10,7 @@ diff -ur mongodb-src-r2.0.6.orig/db/db.cpp mongodb-src-r2.0.6/db/db.cpp
              if ( boost::filesystem::is_directory( *i ) &&
                      fileName.length() && fileName[ 0 ] == '$' )
                  boost::filesystem::remove_all( *i );
-@@ -655,11 +655,13 @@
+@@ -748,11 +748,13 @@
      dbExecCommand = argv[0];
  
      srand(curTimeMicros());
@@ -138,7 +24,7 @@ diff -ur mongodb-src-r2.0.6.orig/db/db.cpp mongodb-src-r2.0.6/db/db.cpp
  
      {
          unsigned x = 0x12345678;
-@@ -976,7 +976,7 @@
+@@ -1083,7 +1085,7 @@
          if (params.count("shutdown")){
              bool failed = false;
  
@@ -147,10 +33,10 @@ diff -ur mongodb-src-r2.0.6.orig/db/db.cpp mongodb-src-r2.0.6/db/db.cpp
              if ( !boost::filesystem::exists( name ) || boost::filesystem::file_size( name ) == 0 )
                  failed = true;
  
-diff -ur mongodb-src-r2.0.6.orig/db/dur.cpp mongodb-src-r2.0.6/db/dur.cpp
---- mongodb-src-r2.0.6.orig/db/dur.cpp 2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/db/dur.cpp      2012-07-11 14:38:50.248712139 +0200
-@@ -692,7 +692,7 @@
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/db/dur.cpp mongodb-src-r2.2.0/src/mongo/db/dur.cpp
+--- mongodb-src-r2.2.0.orig/src/mongo/db/dur.cpp       2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/db/dur.cpp    2012-09-28 13:37:59.000000000 +0200
+@@ -770,7 +770,7 @@
  
              bool samePartition = true;
              try {
@@ -159,66 +45,19 @@ diff -ur mongodb-src-r2.0.6.orig/db/dur.cpp mongodb-src-r2.0.6/db/dur.cpp
                  samePartition = onSamePartition(getJournalDir().string(), dbpathDir);
              }
              catch(...) {
-diff -ur mongodb-src-r2.0.6.orig/db/instance.cpp mongodb-src-r2.0.6/db/instance.cpp
---- mongodb-src-r2.0.6.orig/db/instance.cpp    2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/db/instance.cpp 2012-07-11 14:39:15.948711232 +0200
-@@ -893,7 +893,7 @@
-     }
-     void acquirePathLock(bool doingRepair) {
--        string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string();
-+        string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native();
-         bool oldFile = false;
-diff -ur mongodb-src-r2.0.6.orig/db/pdfile.cpp mongodb-src-r2.0.6/db/pdfile.cpp
---- mongodb-src-r2.0.6.orig/db/pdfile.cpp      2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/db/pdfile.cpp   2012-07-11 14:38:50.252045472 +0200
-@@ -2093,7 +2093,7 @@
-             uniqueReservedPath( ( preserveClonedFilesOnFailure || backupOriginalFiles ) ?
-                                 "backup" : "$tmp" );
-         BOOST_CHECK_EXCEPTION( boost::filesystem::create_directory( reservedPath ) );
--        string reservedPathString = reservedPath.native_directory_string();
-+        string reservedPathString = reservedPath.native();
-         bool res;
-         {
-diff -ur mongodb-src-r2.0.6.orig/dbtests/framework.cpp mongodb-src-r2.0.6/dbtests/framework.cpp
---- mongodb-src-r2.0.6.orig/dbtests/framework.cpp      2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/dbtests/framework.cpp   2012-07-11 14:38:50.252045472 +0200
-@@ -281,7 +281,7 @@
-                 boost::filesystem::create_directory(p);
-             }
--            string dbpathString = p.native_directory_string();
-+            string dbpathString = p.native();
-             dbpath = dbpathString.c_str();
-             cmdLine.prealloc = false;
-diff -ur mongodb-src-r2.0.6.orig/shell/shell_utils.cpp mongodb-src-r2.0.6/shell/shell_utils.cpp
---- mongodb-src-r2.0.6.orig/shell/shell_utils.cpp      2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/shell/shell_utils.cpp   2012-07-11 14:39:15.948711232 +0200
-@@ -388,7 +388,7 @@
- #endif
-                 }
--                argv_.push_back( programPath.native_file_string() );
-+                argv_.push_back( programPath.native() );
-                 port_ = -1;
---- mongodb-src-r2.0.6/db/dur_journal.cpp~     2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/db/dur_journal.cpp      2012-07-11 14:43:04.345369843 +0200
-@@ -169,7 +169,7 @@
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/db/dur_journal.cpp mongodb-src-r2.2.0/src/mongo/db/dur_journal.cpp
+--- mongodb-src-r2.2.0.orig/src/mongo/db/dur_journal.cpp       2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/db/dur_journal.cpp    2012-09-28 13:42:45.000000000 +0200
+@@ -176,7 +176,7 @@
                  for ( boost::filesystem::directory_iterator i( getJournalDir() );
                          i != boost::filesystem::directory_iterator();
                          ++i ) {
 -                    string fileName = boost::filesystem::path(*i).leaf();
 +                    string fileName = boost::filesystem::path(*i).filename().string();
-                     if( str::startsWith(fileName, "j._") )
+                     if( anyFiles || str::startsWith(fileName, "j._") )
                          return true;
                  }
-@@ -185,7 +185,7 @@
+@@ -194,7 +194,7 @@
                  for ( boost::filesystem::directory_iterator i( getJournalDir() );
                          i != boost::filesystem::directory_iterator();
                          ++i ) {
@@ -227,36 +66,38 @@ diff -ur mongodb-src-r2.0.6.orig/shell/shell_utils.cpp mongodb-src-r2.0.6/shell/
                      if( str::startsWith(fileName, "j._") ) {
                          try {
                              removeOldJournalFile(*i);
---- mongodb-src-r2.0.6/db/dur_recover.cpp~     2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/db/dur_recover.cpp      2012-07-11 14:43:24.775369122 +0200
-@@ -71,7 +71,7 @@
-                     i != filesystem::directory_iterator();
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/db/dur_recover.cpp mongodb-src-r2.2.0/src/mongo/db/dur_recover.cpp
+--- mongodb-src-r2.2.0.orig/src/mongo/db/dur_recover.cpp       2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/db/dur_recover.cpp    2012-09-28 13:43:01.000000000 +0200
+@@ -72,7 +72,7 @@
+                     i != boost::filesystem::directory_iterator();
                      ++i ) {
-                 filesystem::path filepath = *i;
--                string fileName = filesystem::path(*i).leaf();
-+                string fileName = filesystem::path(*i).filename().string();
+                 boost::filesystem::path filepath = *i;
+-                string fileName = boost::filesystem::path(*i).leaf();
++                string fileName = boost::filesystem::path(*i).filename().string();
                  if( str::startsWith(fileName, "j._") ) {
                      unsigned u = str::toUnsigned( str::after(fileName, '_') );
                      if( m.count(u) ) {
-@@ -84,7 +84,7 @@
+@@ -85,7 +85,7 @@
                  if( i != m.begin() && m.count(i->first - 1) == 0 ) {
                      uasserted(13532,
                      str::stream() << "unexpected file in journal directory " << dir.string()
--                      << " : " << filesystem::path(i->second).leaf() << " : can't find its preceeding file");
-+                      << " : " << filesystem::path(i->second).filename().string() << " : can't find its preceeding file");
+-                      << " : " << boost::filesystem::path(i->second).leaf() << " : can't find its preceeding file");
++                      << " : " << boost::filesystem::path(i->second).filename().string() << " : can't find its preceeding file");
                  }
                  files.push_back(i->second);
              }
---- mongodb-src-r2.0.6/db/instance.cpp~        2012-07-11 14:39:59.022043046 +0200
-+++ mongodb-src-r2.0.6/db/instance.cpp 2012-07-11 14:43:51.298701519 +0200
-@@ -645,13 +645,13 @@
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/db/instance.cpp mongodb-src-r2.2.0/src/mongo/db/instance.cpp
+--- mongodb-src-r2.2.0.orig/src/mongo/db/instance.cpp  2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/db/instance.cpp       2012-09-28 13:43:18.000000000 +0200
+@@ -833,13 +833,13 @@
                  i != boost::filesystem::directory_iterator(); ++i ) {
              if ( directoryperdb ) {
                  boost::filesystem::path p = *i;
 -                string dbName = p.leaf();
 +                string dbName = p.filename().string();
                  p /= ( dbName + ".ns" );
-                 if ( MMF::exists( p ) )
+                 if ( exists( p ) )
                      names.push_back( dbName );
              }
              else {
@@ -265,9 +106,19 @@ diff -ur mongodb-src-r2.0.6.orig/shell/shell_utils.cpp mongodb-src-r2.0.6/shell/
                  if ( fileName.length() > 3 && fileName.substr( fileName.length() - 3, 3 ) == ".ns" )
                      names.push_back( fileName.substr( 0, fileName.length() - 3 ) );
              }
---- mongodb-src-r2.0.6/db/pdfile.cpp~  2012-07-11 14:39:59.022043046 +0200
-+++ mongodb-src-r2.0.6/db/pdfile.cpp   2012-07-11 14:44:07.945367599 +0200
-@@ -1987,7 +1987,7 @@
+@@ -1102,7 +1102,7 @@
+     }
+     void acquirePathLock(bool doingRepair) {
+-        string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string();
++        string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native();
+         bool oldFile = false;
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/db/pdfile.cpp mongodb-src-r2.2.0/src/mongo/db/pdfile.cpp
+--- mongodb-src-r2.2.0.orig/src/mongo/db/pdfile.cpp    2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/db/pdfile.cpp 2012-09-28 13:43:42.000000000 +0200
+@@ -1675,7 +1675,7 @@
              virtual bool apply( const Path &p ) {
                  if ( !boost::filesystem::exists( p ) )
                      return false;
@@ -276,7 +127,7 @@ diff -ur mongodb-src-r2.0.6.orig/shell/shell_utils.cpp mongodb-src-r2.0.6/shell/
                  return true;
              }
              virtual const char * op() const {
-@@ -2010,7 +2010,7 @@
+@@ -1698,7 +1698,7 @@
              virtual bool apply( const Path &p ) {
                  if ( !boost::filesystem::exists( p ) )
                      return false;
@@ -285,25 +136,57 @@ diff -ur mongodb-src-r2.0.6.orig/shell/shell_utils.cpp mongodb-src-r2.0.6/shell/
                  return true;
              }
              virtual const char * op() const {
---- mongodb-src-r2.0.6/tools/tool.cpp~ 2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/tools/tool.cpp  2012-07-11 14:51:25.822018820 +0200
-@@ -113,11 +113,13 @@
-         // we want durability to be disabled.
-         cmdLine.dur = false;
+@@ -1783,7 +1783,7 @@
+             uniqueReservedPath( ( preserveClonedFilesOnFailure || backupOriginalFiles ) ?
+                                 "backup" : "_tmp" );
+         MONGO_ASSERT_ON_EXCEPTION( boost::filesystem::create_directory( reservedPath ) );
+-        string reservedPathString = reservedPath.native_directory_string();
++        string reservedPathString = reservedPath.native();
  
-+#if( BOOST_VERSION < 105000 )
- #if( BOOST_VERSION >= 104500 )
-     boost::filesystem::path::default_name_check( boost::filesystem2::no_check );
- #else
-     boost::filesystem::path::default_name_check( boost::filesystem::no_check );
+         bool res;
+         {
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/dbtests/framework.cpp mongodb-src-r2.2.0/src/mongo/dbtests/framework.cpp
+--- mongodb-src-r2.2.0.orig/src/mongo/dbtests/framework.cpp    2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/dbtests/framework.cpp 2012-09-28 13:37:59.000000000 +0200
+@@ -199,7 +199,7 @@
+                 boost::filesystem::create_directory(p);
+             }
+-            string dbpathString = p.native_directory_string();
++            string dbpathString = p.native();
+             dbpath = dbpathString.c_str();
+             cmdLine.prealloc = false;
+Only in mongodb-src-r2.2.0/src/mongo/dbtests: framework.cpp.orig
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/pch.h mongodb-src-r2.2.0/src/mongo/pch.h
+--- mongodb-src-r2.2.0.orig/src/mongo/pch.h    2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/pch.h 2012-09-28 13:38:28.000000000 +0200
+@@ -44,7 +44,7 @@
+ #include "string.h"
+ #include "limits.h"
+-#define BOOST_FILESYSTEM_VERSION 2
++#define BOOST_FILESYSTEM_VERSION 3
+ #include <boost/shared_ptr.hpp>
+ #include <boost/smart_ptr.hpp>
+ #include <boost/function.hpp>
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/shell/shell_utils_launcher.cpp mongodb-src-r2.2.0/src/mongo/shell/shell_utils_launcher.cpp
+--- mongodb-src-r2.2.0.orig/src/mongo/shell/shell_utils_launcher.cpp   2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/shell/shell_utils_launcher.cpp        2012-09-28 13:39:57.000000000 +0200
+@@ -184,7 +184,7 @@
+             }
  #endif
-+#endif
  
-         _name = argv[0];
+-            _argv.push_back( programPath.native_file_string() );
++            _argv.push_back( programPath.native() );
+             _port = -1;
  
---- mongodb-src-r2.0.6/tools/restore.cpp~      2012-06-04 15:42:54.000000000 +0200
-+++ mongodb-src-r2.0.6/tools/restore.cpp       2012-07-11 14:53:11.865348411 +0200
-@@ -131,7 +131,7 @@
+Only in mongodb-src-r2.2.0/src/mongo/shell: shell_utils_launcher.cpp~
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/tools/restore.cpp mongodb-src-r2.2.0/src/mongo/tools/restore.cpp
+--- mongodb-src-r2.2.0.orig/src/mongo/tools/restore.cpp        2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/tools/restore.cpp     2012-09-28 13:41:57.000000000 +0200
+@@ -174,7 +174,7 @@
          log(2) << "drillDown: " << root.string() << endl;
  
          // skip hidden files and directories
@@ -312,7 +195,7 @@ diff -ur mongodb-src-r2.0.6.orig/shell/shell_utils.cpp mongodb-src-r2.0.6/shell/
              return;
  
          if ( is_directory( root ) ) {
-@@ -161,10 +161,10 @@
+@@ -204,10 +204,10 @@
                  }
  
                  // don't insert oplog
@@ -320,12 +203,12 @@ diff -ur mongodb-src-r2.0.6.orig/shell/shell_utils.cpp mongodb-src-r2.0.6/shell/
 +                if (top_level && !use_db && p.filename().string() == "oplog.bson")
                      continue;
  
--                if ( p.leaf() == "system.indexes.bson" )
-+                if ( p.filename().string() == "system.indexes.bson" )
+-                if ( p.leaf() == "system.indexes.bson" ) {
++                if ( p.filename().string() == "system.indexes.bson" ) {
                      indexes = p;
-                 else
+                 } else {
                      drillDown(p, use_db, use_coll);
-@@ -184,7 +184,7 @@
+@@ -233,7 +233,7 @@
  
          log() << root.string() << endl;
  
@@ -334,30 +217,56 @@ diff -ur mongodb-src-r2.0.6.orig/shell/shell_utils.cpp mongodb-src-r2.0.6/shell/
              log() << "\t skipping" << endl;
              return;
          }
-@@ -210,7 +210,7 @@
+@@ -255,7 +255,7 @@
+         verify( ns.size() );
+-        string oldCollName = root.leaf(); // Name of the collection that was dumped from
++        string oldCollName = root.filename().string(); // Name of the collection that was dumped from
+         oldCollName = oldCollName.substr( 0 , oldCollName.find_last_of( "." ) );
+         if (use_coll) {
              ns += "." + _coll;
-         }
-         else {
--            string l = root.leaf();
-+            string l = root.filename().string();
-             l = l.substr( 0 , l.find_last_of( "." ) );
-             ns += "." + l;
-         }
-@@ -218,7 +218,7 @@
-         out() << "\t going into namespace [" << ns << "]" << endl;
+@@ -267,7 +267,7 @@
+         log() << "\tgoing into namespace [" << ns << "]" << endl;
  
          if ( _drop ) {
 -            if (root.leaf() != "system.users.bson" ) {
 +            if (root.filename().string() != "system.users.bson" ) {
-                 out() << "\t dropping" << endl;
+                 log() << "\t dropping" << endl;
                  conn().dropCollection( ns );
              } else {
-@@ -235,7 +235,7 @@
-         _curns = ns.c_str();
-         _curdb = NamespaceString(_curns).db;
+@@ -287,7 +287,7 @@
+             if (!boost::filesystem::exists(metadataFile.string())) {
+                 // This is fine because dumps from before 2.1 won't have a metadata file, just print a warning.
+                 // System collections shouldn't have metadata so don't warn if that file is missing.
+-                if (!startsWith(metadataFile.leaf(), "system.")) {
++                if (!startsWith(metadataFile.filename().string(), "system.")) {
+                     log() << metadataFile.string() << " not found. Skipping." << endl;
+                 }
+             } else {
+@@ -317,7 +317,7 @@
+         }
          processFile( root );
 -        if (_drop && root.leaf() == "system.users.bson") {
 +        if (_drop && root.filename().string() == "system.users.bson") {
              // Delete any users that used to exist but weren't in the dump file
              for (set<string>::iterator it = _users.begin(); it != _users.end(); ++it) {
                  BSONObj userMatch = BSON("user" << *it);
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/tools/tool.cpp mongodb-src-r2.2.0/src/mongo/tools/tool.cpp
+--- mongodb-src-r2.2.0.orig/src/mongo/tools/tool.cpp   2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/tools/tool.cpp        2012-09-28 13:37:59.000000000 +0200
+@@ -118,11 +118,13 @@
+         // we want durability to be disabled.
+         cmdLine.dur = false;
++#if( BOOST_VERSION < 105000 )
+ #if( BOOST_VERSION >= 104500 )
+     boost::filesystem::path::default_name_check( boost::filesystem2::no_check );
+ #else
+     boost::filesystem::path::default_name_check( boost::filesystem::no_check );
+ #endif
++#endif
+         _name = argv[0];
diff --git a/config.patch b/config.patch
deleted file mode 100644 (file)
index 3365b5b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
---- mongodb-src-r2.0.1/SConstruct.orig 2011-10-22 02:52:16.000000000 +0200
-+++ mongodb-src-r2.0.1/SConstruct      2011-11-01 19:46:50.060469479 +0100
-@@ -673,7 +673,6 @@
-     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:
--        env.Append( CPPFLAGS=" -Werror " )
-         if not has_option('clang'): 
-             env.Append( CPPFLAGS=" -fno-builtin-memcmp " ) # glibc's memcmp is faster than gcc's
-@@ -732,10 +732,6 @@
-         print( "removing precompiled headers" )
-         os.unlink('pch.h.gch') # gcc uses the file if it exists
--if usev8:
--    env.Prepend( CPPPATH=["../v8/include/"] )
--    env.Prepend( LIBPATH=["../v8/"] )
--
- if "uname" in dir(os):
-     hacks = buildscripts.findHacks( os.uname() )
-     if hacks is not None:
-@@ -919,6 +915,10 @@
-         else:
-             myCheckLib( "v8" , True )
-+    myCheckLib(["pcrecpp"], True)
-+    myCheckLib(["pcre"], True)
-+    myCheckLib(["snappy"], True)
-+
-     # requires ports devel/libexecinfo to be installed
-     if freebsd or openbsd:
-         myCheckLib( "execinfo", True )
diff --git a/mongodb-build.patch b/mongodb-build.patch
deleted file mode 100644 (file)
index ef076af..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- mongodb-src-r2.0.6/SConstruct.orig 2012-06-13 13:02:51.000000000 +0200
-+++ mongodb-src-r2.0.6/SConstruct      2012-06-13 13:03:02.000000000 +0200
-@@ -196,7 +196,7 @@
- for shortName in getThirdPartyShortNames():
-     add_option( "use-system-" + shortName , "use system version of library " + shortName , 0 , True )
--add_option( "use-system-all" , "use all system libraries " + shortName , 0 , True )
-+add_option( "use-system-all" , "use all system libraries ", 0 , True )
- # --- environment setup ---
diff --git a/mongodb-cflags.patch b/mongodb-cflags.patch
new file mode 100644 (file)
index 0000000..c58001c
--- /dev/null
@@ -0,0 +1,12 @@
+--- mongodb-src-r2.2.0.orig/SConstruct 2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/SConstruct      2012-09-28 13:17:32.000000000 +0200
+@@ -712,7 +712,8 @@
+         env.Append( CCFLAGS=["-O0", "-fstack-protector"] )
+         env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
+     else:
+-        env.Append( CCFLAGS=["-O3"] )
++        env.Append( CCFLAGS=ARGUMENTS.get("CXXFLAGS", "-O3").split() )
++        env.Append( CPPDEFINES=ARGUMENTS.get("CPPFLAGS", "").split() )
+     if debugLogging:
+         env.Append( CPPDEFINES=["_DEBUG"] );
diff --git a/mongodb-install.patch b/mongodb-install.patch
new file mode 100644 (file)
index 0000000..ee7c308
--- /dev/null
@@ -0,0 +1,16 @@
+https://jira.mongodb.org/browse/SERVER-5575
+
+diff --git a/src/SConscript.client b/src/SConscript.client
+index 7a6bdc9..3fb55e5 100644
+--- a/src/SConscript.client
++++ b/src/SConscript.client
+@@ -134,7 +134,7 @@ env.Install(
+ # 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,
+
index 161d4bbb235a85f404f89d89bfc08c9a75cae58e..fb464c57cd8e1fe0e67a75304a863751731351f7 100644 (file)
@@ -1,10 +1,35 @@
---- mongodb-src-r2.0.1/util/compress.cpp.orig  2011-10-22 02:52:16.000000000 +0200
-+++ mongodb-src-r2.0.1/util/compress.cpp       2011-11-02 19:02:01.943272460 +0100
-@@ -1,6 +1,6 @@
- // @file compress.cpp
+--- mongodb-src-r2.2.0.orig/src/mongo/util/compress.cpp        2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/util/compress.cpp     2012-09-28 14:07:08.000000000 +0200
+@@ -2,7 +2,7 @@
  
--#include "../third_party/snappy/snappy.h"
+ #include "mongo/util/compress.h"
+-#include "third_party/snappy/snappy.h"
 +#include <snappy.h>
- #include "compress.h"
- #include <string>
- #include <string.h>
+ namespace mongo {
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/scripting/engine_spidermonkey.cpp mongodb-src-r2.2.0/src/mongo/scripting/engine_spidermonkey.cpp
+--- mongodb-src-r2.2.0.orig/src/mongo/scripting/engine_spidermonkey.cpp        2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/scripting/engine_spidermonkey.cpp     2012-10-08 12:27:07.000000000 +0200
+@@ -25,7 +25,7 @@
+ #include <boost/date_time/posix_time/posix_time.hpp>
+ #endif
+-#include <third_party/js-1.7/jsdate.h>
++#include <js/jsdate.h>
+ #include "mongo/util/mongoutils/str.h"
+diff -dur mongodb-src-r2.2.0.orig/src/mongo/scripting/engine_spidermonkey.h mongodb-src-r2.2.0/src/mongo/scripting/engine_spidermonkey.h
+--- mongodb-src-r2.2.0.orig/src/mongo/scripting/engine_spidermonkey.h  2012-08-28 07:28:11.000000000 +0200
++++ mongodb-src-r2.2.0/src/mongo/scripting/engine_spidermonkey.h       2012-10-08 12:27:55.000000000 +0200
+@@ -29,7 +29,7 @@
+ #define JS_PUBLIC_DATA(t)   t
+ #endif
+-#include <third_party/js-1.7/jsapi.h>
++#include <js/jsapi.h>
+ // END inc hacking
index 0b39d268ddd57f4d02a3e41fe8d48f578c60cf83..8fadf5f47785cbba7a52011ea49623ad1bd058eb 100644 (file)
@@ -1,4 +1,5 @@
 /var/log/mongo/*.log {
+       olddir /var/log/archive/mongo
        su mongod mongod
        weekly
        rotate 10
index 47a316545523804660daa46358ac0fd09f3637ec..2fdd988fd7da1556b150b7e5fbbf7c64848cb11f 100644 (file)
@@ -1,31 +1,34 @@
-# TODO: pass rpmldflags
+# TODO:
+#      - fix 'libs' subpackage (disabled due to broken 'sharedclient' build option)
+#
 Summary:       MongoDB client shell and tools
 Summary(pl.UTF-8):     Powłoka kliencka i narzędzia dla bazy danych MongoDB
 Name:          mongodb
-Version:       2.0.6
-Release:       4
+Version:       2.2.0
+Release:       0.1
 License:       AGPL v3
 Group:         Applications/Databases
 Source0:       http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
-# Source0-md5: b3b32fecdcbe8e8068ec2989be9d2da4
+# Source0-md5: 832bdb6cc659176fd8d6b16a660ccfc6
 Source1:       %{name}.logrotate
 Source2:       %{name}.init
-Patch0:                config.patch
+Patch0:                %{name}-cflags.patch
 Patch1:                %{name}-system-libs.patch
-Patch2:                %{name}-build.patch
-Patch3:                boost-1.50.patch
+Patch2:                boost-1.50.patch
+Patch3:                %{name}-install.patch
 URL:           http://www.mongodb.org/
 BuildRequires: boost-devel >= 1.42
 BuildRequires: libpcap-devel
 BuildRequires: libstdc++-devel >= 6:4.0
 BuildRequires: pcre-cxx-devel
-BuildRequires: pcre-devel
+BuildRequires: pcre-devel >= 8.30
 BuildRequires: readline-devel
 BuildRequires: rpmbuild(macros) >= 1.228
 BuildRequires: scons >= 1.2
 BuildRequires: sed >= 4.0
 BuildRequires: snappy-devel
 BuildRequires: v8-devel
+Requires:      %{name}-libs = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -66,7 +69,8 @@ Ten pakiet zawiera bibliotekę kliencką mongo.
 Summary:       Header files for MongoDB client library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki klienckiej MongoDB
 Group:         Development/Libraries
-Requires:      %{name}-libs = %{version}-%{release}
+#Requires:     %{name}-libs = %{version}-%{release}
+Requires:      %{name}-static = %{version}-%{release}
 
 %description devel
 Mongo (from "huMONGOus") is a schema-free document-oriented database.
@@ -134,19 +138,20 @@ konfiguracji oraz skrypty init.d.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-%{__sed} -i -e 's,-O3,%{rpmcxxflags} %{rpmcppflags},' SConstruct
 
 # Fix permissions
 find -type f -executable | xargs chmod a-x
 
 # force system pcre/js/snappy
-%{__rm} -r third_party/{js-1.7,pcre-7.4,snappy,*.py}
+%{__rm} -r src/third_party/{js-1.7,pcre-8.30,snappy,boost}
 
 %build
 %scons \
+       CPPFLAGS="%{rpmcppflags} -DXP_UNIX" \
+       --use-system-all=yes \
+       --extralib=pcrecpp,pcre,snappy \
        --prefix=$RPM_BUILD_ROOT%{_prefix} \
-       --sharedclient \
-       --full all \
+       --full=all \
        --usev8 \
        --cxx=%{__cxx}
 
@@ -158,9 +163,10 @@ install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir}/man1} \
 
 # XXX: scons is so great, recompiles everything here!
 %scons install \
+       --use-system-all=yes \
+       --extralib=pcrecpp,pcre,snappy \
        --prefix=$RPM_BUILD_ROOT%{_prefix} \
-       --sharedclient \
-       --full \
+       --full=all \
        --usev8 \
        --cxx=%{__cxx}
 
@@ -229,9 +235,11 @@ fi
 %{_mandir}/man1/mongostat.1*
 %{_mandir}/man1/mongorestore.1*
 
+%if 0
 %files libs
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libmongoclient.so
+%endif
 
 %files devel
 %defattr(644,root,root,755)
@@ -254,5 +262,6 @@ fi
 %{_mandir}/man1/mongod.1*
 %{_mandir}/man1/mongos.1*
 %attr(755,mongod,mongod) %dir %{_var}/lib/mongo
-%attr(755,mongod,mongod) %dir %{_var}/log/mongo
+%attr(775,root,mongod) %dir %{_var}/log/mongo
+%attr(775,root,mongod) %dir %{_var}/log/archive/mongo
 %attr(640,mongod,mongod) %config(noreplace) %verify(not md5 mtime size) %{_var}/log/mongo/mongod.log
This page took 0.24862 seconds and 4 git commands to generate.