- fix building with gcc 6.x auto/th/mongodb-2.2.4-9
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 14 Apr 2017 15:40:54 +0000 (17:40 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 14 Apr 2017 15:40:54 +0000 (17:40 +0200)
- rel 9

gcc6.patch [new file with mode: 0644]
mongodb.spec
no-Werror.patch [new file with mode: 0644]

diff --git a/gcc6.patch b/gcc6.patch
new file mode 100644 (file)
index 0000000..d49a563
--- /dev/null
@@ -0,0 +1,68 @@
+--- mongodb-src-r2.2.4/src/mongo/util/concurrency/threadlocal.h~       2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/util/concurrency/threadlocal.h        2017-04-14 17:05:17.819748109 +0200
+@@ -16,10 +16,10 @@
+ *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+-#include "mongo/client/undef_macros.h"
++//#include "mongo/client/undef_macros.h"
+ #include <boost/thread/tss.hpp>
+ #include <boost/bind.hpp>
+-#include "mongo/client/redef_macros.h"
++//#include "mongo/client/redef_macros.h"
+ namespace mongo { 
+--- mongodb-src-r2.2.4/src/mongo/db/queryoptimizer.h~  2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/db/queryoptimizer.h   2017-04-14 17:12:49.282347360 +0200
+@@ -170,7 +170,7 @@
+         _keyFieldsOnly( queryPlan.keyFieldsOnly() ),
+         _scanAndOrderRequired( queryPlan.scanAndOrderRequired() ) {
+         }
+-        bool valid() const { return _fieldRangeSetMulti; }
++        bool valid() const { return _fieldRangeSetMulti != NULL; }
+         shared_ptr<FieldRangeSet> _fieldRangeSetMulti;
+         shared_ptr<Projection::KeyOnly> _keyFieldsOnly;
+         bool _scanAndOrderRequired;
+--- mongodb-src-r2.2.4/src/mongo/db/queryoptimizer.cpp~        2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/db/queryoptimizer.cpp 2017-04-14 17:22:59.293485280 +0200
+@@ -1419,7 +1419,7 @@
+             if ( _explainPlanInfo ) {
+                 _explainPlanInfo.reset( new ExplainPlanInfo() );
+                 _explainPlanInfo->notePlan( *_c, _queryPlan->scanAndOrderRequired(),
+-                                           _queryPlan->keyFieldsOnly() );
++                                           _queryPlan->keyFieldsOnly() != NULL );
+                 shared_ptr<ExplainClauseInfo> clauseInfo( new ExplainClauseInfo() );
+                 clauseInfo->addPlanInfo( _explainPlanInfo );
+                 _mps->addClauseInfo( clauseInfo );
+--- mongodb-src-r2.2.4/src/mongo/db/queryoptimizercursorimpl.cpp~      2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/db/queryoptimizercursorimpl.cpp       2017-04-14 17:24:01.807612099 +0200
+@@ -96,7 +96,7 @@
+             // The query plan must have a matcher.  The matcher's constructor performs some aspects
+             // of query validation that should occur as part of this class's init() if not handled
+             // already.
+-            fassert( 16249, queryPlan().matcher() );
++            fassert( 16249, queryPlan().matcher() != NULL );
+             // All candidate cursors must support yields for QueryOptimizerCursorImpl's
+             // prepareToYield() and prepareToTouchEarlierIterate() to work.
+@@ -221,7 +221,7 @@
+             }
+             _explainPlanInfo.reset( new ExplainPlanInfo() );
+             _explainPlanInfo->notePlan( *_c, queryPlan().scanAndOrderRequired(),
+-                                        queryPlan().keyFieldsOnly() );
++                                        queryPlan().keyFieldsOnly() != NULL );
+             return _explainPlanInfo;
+         }
+         shared_ptr<ExplainPlanInfo> explainInfo() const { return _explainPlanInfo; }
+--- mongodb-src-r2.2.4/src/mongo/db/ops/query.cpp~     2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/db/ops/query.cpp      2017-04-14 17:25:35.475055105 +0200
+@@ -584,7 +584,7 @@
+         shared_ptr<ExplainRecordingStrategy> ret
+         ( new SimpleCursorExplainStrategy( ancillaryInfo, _cursor ) );
+         ret->notePlan( queryPlan.valid() && queryPlan._scanAndOrderRequired,
+-                      queryPlan._keyFieldsOnly );
++                      queryPlan._keyFieldsOnly != NULL );
+         return ret;
+     }
index a40cfbc147c43b6199ad07609a9a658facd3fa6b..a383d92050767efbb07a5040a648cfd0e4f9d557 100644 (file)
@@ -8,7 +8,7 @@ Summary:        MongoDB client shell and tools
 Summary(pl.UTF-8):     Powłoka kliencka i narzędzia dla bazy danych MongoDB
 Name:          mongodb
 Version:       2.2.4
-Release:       8
+Release:       9
 License:       AGPL v3
 Group:         Applications/Databases
 Source0:       http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
@@ -23,6 +23,8 @@ Patch2:               boost-1.50.patch
 Patch3:                %{name}-install.patch
 Patch4:                %{name}-shared.patch
 Patch5:                gcc4.patch
+Patch6:                no-Werror.patch
+Patch7:                gcc6.patch
 URL:           http://www.mongodb.org/
 BuildRequires: boost-devel >= 1.50
 BuildRequires: libpcap-devel
@@ -152,6 +154,8 @@ konfiguracji oraz skrypty init.d.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
 
 # Fix permissions
 find -type f -executable | xargs chmod a-x
diff --git a/no-Werror.patch b/no-Werror.patch
new file mode 100644 (file)
index 0000000..00f55d8
--- /dev/null
@@ -0,0 +1,11 @@
+--- mongodb-src-r2.2.4/SConstruct~     2017-04-14 16:32:34.000000000 +0200
++++ mongodb-src-r2.2.4/SConstruct      2017-04-14 16:33:47.864602817 +0200
+@@ -686,7 +686,7 @@
+                          "-Winvalid-pch"] )
+     # env.Append( " -Wconversion" ) TODO: this doesn't really work yet
+     if linux:
+-        env.Append( CCFLAGS=["-Werror", "-pipe"] )
++        env.Append( CCFLAGS=["-pipe"] )
+         if not has_option('clang'):
+             env.Append( CCFLAGS=["-fno-builtin-memcmp"] ) # glibc's memcmp is faster than gcc's
This page took 0.071562 seconds and 4 git commands to generate.