1 |
commit: 80b554b3f8965c2bfaed570d3e17927164c4228b |
2 |
Author: Tony Vroon <chainsaw <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 6 12:20:06 2018 +0000 |
4 |
Commit: Tony Vroon <chainsaw <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 9 08:59:26 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80b554b3 |
7 |
|
8 |
dev-db/tokumx: GCC 7 build breakage fixes. |
9 |
|
10 |
Unresolved symbol issue at final link addressed by Mariusz Ceier. |
11 |
Implicit casts of smart pointers to boolean made explicit by me. |
12 |
No revision bump. |
13 |
|
14 |
Closes: https://bugs.gentoo.org/625158 |
15 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
16 |
|
17 |
dev-db/tokumx/files/tokumx-2.0.2-gcc-7.patch | 102 +++++++++++++++++++++ |
18 |
.../files/tokumx-2.0.2-undefined-reference.patch | 47 ++++++++++ |
19 |
dev-db/tokumx/tokumx-2.0.2.ebuild | 9 +- |
20 |
3 files changed, 155 insertions(+), 3 deletions(-) |
21 |
|
22 |
diff --git a/dev-db/tokumx/files/tokumx-2.0.2-gcc-7.patch b/dev-db/tokumx/files/tokumx-2.0.2-gcc-7.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..1203d1fc809 |
25 |
--- /dev/null |
26 |
+++ b/dev-db/tokumx/files/tokumx-2.0.2-gcc-7.patch |
27 |
@@ -0,0 +1,102 @@ |
28 |
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/client_load.cpp tokumx-enterprise-2.0.2/src/mongo/db/client_load.cpp |
29 |
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/client_load.cpp 2018-07-03 15:57:40.709360944 +0100 |
30 |
++++ tokumx-enterprise-2.0.2/src/mongo/db/client_load.cpp 2018-07-03 15:57:48.127361253 +0100 |
31 |
+@@ -74,7 +74,7 @@ |
32 |
+ } |
33 |
+ |
34 |
+ bool Client::loadInProgress() const { |
35 |
+- return _loadInfo; |
36 |
++ return bool(_loadInfo); |
37 |
+ } |
38 |
+ |
39 |
+ } // namespace mongo |
40 |
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/collection_map.h tokumx-enterprise-2.0.2/src/mongo/db/collection_map.h |
41 |
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/collection_map.h 2018-07-03 15:57:40.709360944 +0100 |
42 |
++++ tokumx-enterprise-2.0.2/src/mongo/db/collection_map.h 2018-07-03 15:57:48.127361253 +0100 |
43 |
+@@ -66,7 +66,7 @@ |
44 |
+ // which must succeed, by the first invariant. |
45 |
+ Collection *getCollection(const StringData &ns); |
46 |
+ |
47 |
+- bool allocated() const { return _metadb; } |
48 |
++ bool allocated() const { return bool(_metadb); } |
49 |
+ |
50 |
+ void getNamespaces( list<string>& tofill ); |
51 |
+ |
52 |
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/ops/query.cpp tokumx-enterprise-2.0.2/src/mongo/db/ops/query.cpp |
53 |
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/ops/query.cpp 2018-07-03 15:57:40.703360944 +0100 |
54 |
++++ tokumx-enterprise-2.0.2/src/mongo/db/ops/query.cpp 2018-07-03 15:58:08.348362094 +0100 |
55 |
+@@ -635,7 +635,7 @@ |
56 |
+ shared_ptr<ExplainRecordingStrategy> ret |
57 |
+ ( new SimpleCursorExplainStrategy( ancillaryInfo, _cursor ) ); |
58 |
+ ret->notePlan( queryPlan.valid() && queryPlan.scanAndOrderRequired, |
59 |
+- queryPlan.keyFieldsOnly ); |
60 |
++ bool(queryPlan.keyFieldsOnly) ); |
61 |
+ return ret; |
62 |
+ } |
63 |
+ |
64 |
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/pipeline/document_source_sort.cpp tokumx-enterprise-2.0.2/src/mongo/db/pipeline/document_source_sort.cpp |
65 |
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/pipeline/document_source_sort.cpp 2018-07-03 15:57:40.707360944 +0100 |
66 |
++++ tokumx-enterprise-2.0.2/src/mongo/db/pipeline/document_source_sort.cpp 2018-07-03 15:57:48.128361253 +0100 |
67 |
+@@ -106,7 +106,7 @@ |
68 |
+ bool DocumentSourceSort::coalesce(const intrusive_ptr<DocumentSource> &pNextSource) { |
69 |
+ if (!limitSrc) { |
70 |
+ limitSrc = dynamic_cast<DocumentSourceLimit*>(pNextSource.get()); |
71 |
+- return limitSrc; // false if next is not a $limit |
72 |
++ return bool(limitSrc); // false if next is not a $limit |
73 |
+ } |
74 |
+ else { |
75 |
+ return limitSrc->coalesce(pNextSource); |
76 |
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/queryoptimizercursorimpl.cpp tokumx-enterprise-2.0.2/src/mongo/db/queryoptimizercursorimpl.cpp |
77 |
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/queryoptimizercursorimpl.cpp 2018-07-03 15:57:40.702360944 +0100 |
78 |
++++ tokumx-enterprise-2.0.2/src/mongo/db/queryoptimizercursorimpl.cpp 2018-07-03 15:57:48.128361253 +0100 |
79 |
+@@ -370,7 +370,7 @@ |
80 |
+ |
81 |
+ // The query plan must have a matcher. The matcher's constructor performs some aspects |
82 |
+ // of query validation that should occur before a cursor is returned. |
83 |
+- fassert( 16449, singlePlan->matcher() ); |
84 |
++ fassert( 16449, bool(singlePlan->matcher()) ); |
85 |
+ |
86 |
+ if ( needMatcher ) { |
87 |
+ single->setMatcher( singlePlan->matcher() ); |
88 |
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/query_optimizer_internal.cpp tokumx-enterprise-2.0.2/src/mongo/db/query_optimizer_internal.cpp |
89 |
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/query_optimizer_internal.cpp 2018-07-03 15:57:40.707360944 +0100 |
90 |
++++ tokumx-enterprise-2.0.2/src/mongo/db/query_optimizer_internal.cpp 2018-07-03 15:57:48.129361253 +0100 |
91 |
+@@ -234,7 +234,7 @@ |
92 |
+ // The query plan must have a matcher. The matcher's constructor performs some aspects |
93 |
+ // of query validation that should occur as part of this class's init() if not handled |
94 |
+ // already. |
95 |
+- fassert( 16249, queryPlan().matcher() ); |
96 |
++ fassert( 16249, bool(queryPlan().matcher()) ); |
97 |
+ |
98 |
+ // TODO This violates the current Cursor interface abstraction, but for now it's simpler to keep our own set of |
99 |
+ // dups rather than avoid poisoning the cursor's dup set with unreturned documents. Deduping documents |
100 |
+@@ -257,7 +257,7 @@ |
101 |
+ _explainPlanInfo.reset( new ExplainPlanInfo() ); |
102 |
+ _explainPlanInfo->notePlan( *_c, |
103 |
+ queryPlan().scanAndOrderRequired(), |
104 |
+- queryPlan().keyFieldsOnly() ); |
105 |
++ bool(queryPlan().keyFieldsOnly()) ); |
106 |
+ return _explainPlanInfo; |
107 |
+ } |
108 |
+ |
109 |
+@@ -1226,7 +1226,7 @@ |
110 |
+ _explainPlanInfo.reset( new ExplainPlanInfo() ); |
111 |
+ _explainPlanInfo->notePlan( *_c, |
112 |
+ _queryPlan->scanAndOrderRequired(), |
113 |
+- _queryPlan->keyFieldsOnly() ); |
114 |
++ bool(_queryPlan->keyFieldsOnly()) ); |
115 |
+ shared_ptr<ExplainClauseInfo> clauseInfo( new ExplainClauseInfo() ); |
116 |
+ clauseInfo->addPlanInfo( _explainPlanInfo ); |
117 |
+ _mps->addClauseInfo( clauseInfo ); |
118 |
+diff -uNr tokumx-enterprise-2.0.2.ORIG/src/mongo/db/query_plan_summary.h tokumx-enterprise-2.0.2/src/mongo/db/query_plan_summary.h |
119 |
+--- tokumx-enterprise-2.0.2.ORIG/src/mongo/db/query_plan_summary.h 2018-07-03 15:57:40.705360944 +0100 |
120 |
++++ tokumx-enterprise-2.0.2/src/mongo/db/query_plan_summary.h 2018-07-03 15:57:48.129361253 +0100 |
121 |
+@@ -35,7 +35,7 @@ |
122 |
+ * The 'fieldRangeMulti' attribute is required, and its presence indicates the object has |
123 |
+ * been configured with a query plan. |
124 |
+ */ |
125 |
+- bool valid() const { return fieldRangeSetMulti; } |
126 |
++ bool valid() const { return bool(fieldRangeSetMulti); } |
127 |
+ |
128 |
+ // A description of the valid values for the fields of a query, in the context of a multikey |
129 |
+ // index or in memory sort. |
130 |
|
131 |
diff --git a/dev-db/tokumx/files/tokumx-2.0.2-undefined-reference.patch b/dev-db/tokumx/files/tokumx-2.0.2-undefined-reference.patch |
132 |
new file mode 100644 |
133 |
index 00000000000..012498f7ecd |
134 |
--- /dev/null |
135 |
+++ b/dev-db/tokumx/files/tokumx-2.0.2-undefined-reference.patch |
136 |
@@ -0,0 +1,47 @@ |
137 |
+diff -uNr a/src/third_party/backup/copier.cc b/src/third_party/backup/copier.cc |
138 |
+--- a/src/third_party/backup/copier.cc 2018-07-06 12:43:52.698825122 +0200 |
139 |
++++ b/src/third_party/backup/copier.cc 2018-07-06 12:41:40.066804121 +0200 |
140 |
+@@ -107,10 +107,12 @@ |
141 |
+ int r = 0; |
142 |
+ char *fname = 0; |
143 |
+ size_t n_known = 0; |
144 |
++ char *dupname; |
145 |
+ { |
146 |
+ with_mutex_locked tm(&m_todo_mutex, BACKTRACE(NULL)); |
147 |
+ // Start with "." |
148 |
+- m_todo.push_back(strdup(".")); |
149 |
++ dupname = strdup("."); |
150 |
++ m_todo.push_back(dupname); |
151 |
+ n_known = m_todo.size(); |
152 |
+ } |
153 |
+ while (n_known != 0) { |
154 |
+@@ -697,6 +699,7 @@ |
155 |
+ int error = 0; |
156 |
+ with_mutex_locked tm(&m_todo_mutex, BACKTRACE(NULL)); |
157 |
+ struct dirent const *e = NULL; |
158 |
++ char *dupname; |
159 |
+ while((e = readdir(dir)) != NULL) { |
160 |
+ if (!the_manager.copy_is_enabled()) break; |
161 |
+ if(is_dot(e)) { |
162 |
+@@ -716,8 +719,9 @@ |
163 |
+ goto out; |
164 |
+ } |
165 |
+ |
166 |
++ dupname = strdup(new_name); |
167 |
+ // Add it to our todo list. |
168 |
+- m_todo.push_back(strdup(new_name)); |
169 |
++ m_todo.push_back(dupname); |
170 |
+ TRACE("~~~Added this file to todo list:", new_name); |
171 |
+ } |
172 |
+ } |
173 |
+@@ -730,7 +734,9 @@ |
174 |
+ // |
175 |
+ void copier::add_file_to_todo(const char *file) throw() { |
176 |
+ with_mutex_locked tm(&m_todo_mutex, BACKTRACE(NULL)); |
177 |
+- m_todo.push_back(strdup(file)); |
178 |
++ char *dupname; |
179 |
++ dupname = strdup(file); |
180 |
++ m_todo.push_back(dupname); |
181 |
+ } |
182 |
+ |
183 |
+ //////////////////////////////////////////////////////////////////////////////// |
184 |
|
185 |
diff --git a/dev-db/tokumx/tokumx-2.0.2.ebuild b/dev-db/tokumx/tokumx-2.0.2.ebuild |
186 |
index 987be829e3b..04851a08462 100644 |
187 |
--- a/dev-db/tokumx/tokumx-2.0.2.ebuild |
188 |
+++ b/dev-db/tokumx/tokumx-2.0.2.ebuild |
189 |
@@ -1,4 +1,4 @@ |
190 |
-# Copyright 1999-2017 Gentoo Foundation |
191 |
+# Copyright 1999-2018 Gentoo Foundation |
192 |
# Distributed under the terms of the GNU General Public License v2 |
193 |
|
194 |
EAPI=6 |
195 |
@@ -19,10 +19,11 @@ KEYWORDS="~amd64" |
196 |
IUSE="pax_kernel" |
197 |
REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
198 |
|
199 |
-RDEPEND="!dev-db/mongodb |
200 |
+RDEPEND="!app-admin/mongo-tools |
201 |
+ !dev-db/mongodb |
202 |
+ !dev-libs/mongo-cxx-driver |
203 |
${PYTHON_DEPS} |
204 |
dev-libs/jemalloc |
205 |
- !dev-libs/mongo-cxx-driver |
206 |
>=dev-libs/boost-1.50[threads(+)] |
207 |
>=dev-libs/libpcre-8.30[cxx] |
208 |
net-libs/libpcap" |
209 |
@@ -40,6 +41,8 @@ CHECKREQS_DISK_BUILD="13G" |
210 |
src_prepare() { |
211 |
eapply "${FILESDIR}/${P}-no-werror.patch" |
212 |
eapply "${FILESDIR}/${P}-boost-57.patch" |
213 |
+ eapply "${FILESDIR}/${P}-gcc-7.patch" |
214 |
+ eapply "${FILESDIR}/${P}-undefined-reference.patch" |
215 |
cmake-utils_src_prepare |
216 |
} |