public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrice Clement" <monsieurp@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mongodb/files/, dev-db/mongodb/
Date: Thu, 21 Sep 2017 19:50:05 +0000 (UTC)	[thread overview]
Message-ID: <1506023401.4fb6b5123a834fbb1d1726aaeebee2ec3ad79fa4.monsieurp@gentoo> (raw)

commit:     4fb6b5123a834fbb1d1726aaeebee2ec3ad79fa4
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue Sep  5 16:09:31 2017 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Thu Sep 21 19:50:01 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fb6b512

dev-db/mongodb: fix building with newer libpcre/glibc.

Gentoo-Bug: https://bugs.gentoo.org/580768
Gentoo-Bug: https://bugs.gentoo.org/625148
Gentoo-Bug: https://bugs.gentoo.org/626342

Package-Manager: Portage-2.3.8, Repoman-2.3.2

 ...6-Replace-string-with-explicit-std-string.patch | 283 +++++++++++++++++++++
 dev-db/mongodb/mongodb-3.2.16.ebuild               |  23 +-
 2 files changed, 294 insertions(+), 12 deletions(-)

diff --git a/dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch b/dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch
new file mode 100644
index 00000000000..6067850ad0b
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.16-Replace-string-with-explicit-std-string.patch
@@ -0,0 +1,283 @@
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/db/dbwebserver.cpp mongodb-src-r3.2.16/src/mongo/db/dbwebserver.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/db/dbwebserver.cpp	2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/db/dbwebserver.cpp	2017-08-01 15:43:55.860712772 +0200
+@@ -69,6 +69,7 @@
+ using std::map;
+ using std::stringstream;
+ using std::vector;
++using std::string;
+ 
+ using namespace html;
+ 
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/db/matcher/expression_leaf.cpp mongodb-src-r3.2.16/src/mongo/db/matcher/expression_leaf.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/db/matcher/expression_leaf.cpp	2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/db/matcher/expression_leaf.cpp	2017-08-01 15:46:17.070708001 +0200
+@@ -200,7 +200,7 @@
+ }
+ 
+ void ComparisonMatchExpression::toBSON(BSONObjBuilder* out) const {
+-    string opString = "";
++    std::string opString = "";
+     switch (matchType()) {
+         case LT:
+             opString = "$lt";
+@@ -880,7 +880,7 @@
+ }
+ 
+ void BitTestMatchExpression::toBSON(BSONObjBuilder* out) const {
+-    string opString = "";
++    std::string opString = "";
+ 
+     switch (matchType()) {
+         case BITS_ALL_SET:
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/db/repl/master_slave.cpp mongodb-src-r3.2.16/src/mongo/db/repl/master_slave.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/db/repl/master_slave.cpp	2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/db/repl/master_slave.cpp	2017-08-01 15:54:45.140690837 +0200
+@@ -161,7 +161,7 @@
+ 
+     BSONObjBuilder dbsNextPassBuilder;
+     int n = 0;
+-    for (set<string>::iterator i = addDbNextPass.begin(); i != addDbNextPass.end(); i++) {
++    for (set<std::string>::iterator i = addDbNextPass.begin(); i != addDbNextPass.end(); i++) {
+         n++;
+         dbsNextPassBuilder.appendBool(*i, 1);
+     }
+@@ -170,7 +170,7 @@
+ 
+     BSONObjBuilder incompleteCloneDbsBuilder;
+     n = 0;
+-    for (set<string>::iterator i = incompleteCloneDbs.begin(); i != incompleteCloneDbs.end(); i++) {
++    for (set<std::string>::iterator i = incompleteCloneDbs.begin(); i != incompleteCloneDbs.end(); i++) {
+         n++;
+         incompleteCloneDbsBuilder.appendBool(*i, 1);
+     }
+@@ -181,7 +181,7 @@
+ }
+ 
+ void ReplSource::ensureMe(OperationContext* txn) {
+-    string myname = getHostName();
++    std::string myname = getHostName();
+ 
+     // local.me is an identifier for a server for getLastError w:2+
+     bool exists = Helpers::getSingleton(txn, "local.me", _me);
+@@ -373,10 +373,10 @@
+     }
+ 
+     virtual bool run(OperationContext* txn,
+-                     const string& ns,
++                     const std::string& ns,
+                      BSONObj& cmdObj,
+                      int options,
+-                     string& errmsg,
++                     std::string& errmsg,
+                      BSONObjBuilder& result) {
+         HandshakeArgs handshake;
+         Status status = handshake.initialize(cmdObj);
+@@ -393,7 +393,7 @@
+ } handshakeCmd;
+ 
+ bool replHandshake(DBClientConnection* conn, const OID& myRID) {
+-    string myname = getHostName();
++    std::string myname = getHostName();
+ 
+     BSONObjBuilder cmd;
+     cmd.append("handshake", myRID);
+@@ -445,7 +445,7 @@
+         BSONElement e = i.next();
+         if (e.eoo())
+             break;
+-        string name = e.embeddedObject().getField("name").valuestr();
++	std::string name = e.embeddedObject().getField("name").valuestr();
+         if (!e.embeddedObject().getBoolField("empty")) {
+             if (name != "local") {
+                 if (only.empty() || only == name) {
+@@ -459,7 +459,7 @@
+     save(txn);
+ }
+ 
+-void ReplSource::resyncDrop(OperationContext* txn, const string& db) {
++void ReplSource::resyncDrop(OperationContext* txn, const std::string& db) {
+     log() << "resync: dropping database " << db;
+     OldClientContext ctx(txn, db);
+     dropDatabase(txn, ctx.db());
+@@ -502,13 +502,13 @@
+ 
+ static DatabaseIgnorer ___databaseIgnorer;
+ 
+-void DatabaseIgnorer::doIgnoreUntilAfter(const string& db, const Timestamp& futureOplogTime) {
++void DatabaseIgnorer::doIgnoreUntilAfter(const std::string& db, const Timestamp& futureOplogTime) {
+     if (futureOplogTime > _ignores[db]) {
+         _ignores[db] = futureOplogTime;
+     }
+ }
+ 
+-bool DatabaseIgnorer::ignoreAt(const string& db, const Timestamp& currentOplogTime) {
++bool DatabaseIgnorer::ignoreAt(const std::string& db, const Timestamp& currentOplogTime) {
+     if (_ignores[db].isNull()) {
+         return false;
+     }
+@@ -598,7 +598,7 @@
+ 
+     // The database is present on the master and no conflicting databases
+     // are present on the master.  Drop any local conflicts.
+-    for (set<string>::const_iterator i = duplicates.begin(); i != duplicates.end(); ++i) {
++    for (set<std::string>::const_iterator i = duplicates.begin(); i != duplicates.end(); ++i) {
+         ___databaseIgnorer.doIgnoreUntilAfter(*i, lastTime);
+         incompleteCloneDbs.erase(*i);
+         addDbNextPass.erase(*i);
+@@ -793,10 +793,10 @@
+ }
+ 
+ void ReplSource::syncToTailOfRemoteLog() {
+-    string _ns = ns();
++    std::string _ns = ns();
+     BSONObjBuilder b;
+     if (!only.empty()) {
+-        b.appendRegex("ns", string("^") + pcrecpp::RE::QuoteMeta(only));
++        b.appendRegex("ns", std::string("^") + pcrecpp::RE::QuoteMeta(only));
+     }
+     BSONObj last = oplogReader.findOne(_ns.c_str(), Query(b.done()).sort(BSON("$natural" << -1)));
+     if (!last.isEmpty()) {
+@@ -844,7 +844,7 @@
+ */
+ int ReplSource::_sync_pullOpLog(OperationContext* txn, int& nApplied) {
+     int okResultCode = 1;
+-    string ns = string("local.oplog.$") + sourceName();
++    std::string ns = std::string("local.oplog.$") + sourceName();
+     LOG(2) << "sync_pullOpLog " << ns << " syncedTo:" << syncedTo.toStringLong() << '\n';
+ 
+     bool tailing = true;
+@@ -864,7 +864,7 @@
+                 BSONElement e = i.next();
+                 if (e.eoo())
+                     break;
+-                string name = e.embeddedObject().getField("name").valuestr();
++		std::string name = e.embeddedObject().getField("name").valuestr();
+                 if (!e.embeddedObject().getBoolField("empty")) {
+                     if (name != "local") {
+                         if (only.empty() || only == name) {
+@@ -888,7 +888,7 @@
+         if (!only.empty()) {
+             // note we may here skip a LOT of data table scanning, a lot of work for the master.
+             // maybe append "\\." here?
+-            query.appendRegex("ns", string("^") + pcrecpp::RE::QuoteMeta(only));
++            query.appendRegex("ns", std::string("^") + pcrecpp::RE::QuoteMeta(only));
+         }
+         BSONObj queryObj = query.done();
+         // e.g. queryObj = { ts: { $gte: syncedTo } }
+@@ -907,7 +907,7 @@
+ 
+     // show any deferred database creates from a previous pass
+     {
+-        set<string>::iterator i = addDbNextPass.begin();
++        set<std::string>::iterator i = addDbNextPass.begin();
+         if (i != addDbNextPass.end()) {
+             BSONObjBuilder b;
+             b.append("ns", *i + '.');
+@@ -938,7 +938,7 @@
+         BSONObj op = oplogReader.next();
+         BSONElement ts = op.getField("ts");
+         if (ts.type() != Date && ts.type() != bsonTimestamp) {
+-            string err = op.getStringField("$err");
++	    std::string err = op.getStringField("$err");
+             if (!err.empty()) {
+                 // 13051 is "tailable cursor requested on non capped collection"
+                 if (op.getIntField("code") == 13051) {
+@@ -1106,7 +1106,7 @@
+ 
+     // FIXME Handle cases where this db isn't on default port, or default port is spec'd in
+     // hostName.
+-    if ((string("localhost") == hostName || string("127.0.0.1") == hostName) &&
++    if ((std::string("localhost") == hostName || std::string("127.0.0.1") == hostName) &&
+         serverGlobalParams.port == ServerGlobalParams::DefaultDBPort) {
+         log() << "can't sync from self (localhost). sources configuration may be wrong." << endl;
+         sleepsecs(5);
+@@ -1251,7 +1251,7 @@
+         if (s) {
+             stringstream ss;
+             ss << "sleep " << s << " sec before next pass";
+-            string msg = ss.str();
++	    std::string msg = ss.str();
+             if (!serverGlobalParams.quiet)
+                 log() << msg << endl;
+             ReplInfo r(msg.c_str());
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/shell/bench.cpp mongodb-src-r3.2.16/src/mongo/shell/bench.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/shell/bench.cpp	2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/shell/bench.cpp	2017-08-01 16:20:20.864638957 +0200
+@@ -674,7 +674,7 @@
+     invariant(bsonTemplateEvaluator.setId(_id) == BsonTemplateEvaluator::StatusSuccess);
+ 
+     if (_config->username != "") {
+-        string errmsg;
++	std::string errmsg;
+         if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+             uasserted(15931, "Authenticating to connection for _benchThread failed: " + errmsg);
+         }
+@@ -920,7 +920,7 @@
+ 
+                             if (!result["err"].eoo() && result["err"].type() == String &&
+                                 (_config->throwGLE || op.throwGLE))
+-                                throw DBException((string) "From benchRun GLE" +
++                                throw DBException((std::string) "From benchRun GLE" +
+                                                       causedBy(result["err"].String()),
+                                                   result["code"].eoo() ? 0 : result["code"].Int());
+                         }
+@@ -987,7 +987,7 @@
+ 
+                             if (!result["err"].eoo() && result["err"].type() == String &&
+                                 (_config->throwGLE || op.throwGLE))
+-                                throw DBException((string) "From benchRun GLE" +
++                                throw DBException((std::string) "From benchRun GLE" +
+                                                       causedBy(result["err"].String()),
+                                                   result["code"].eoo() ? 0 : result["code"].Int());
+                         }
+@@ -1035,7 +1035,7 @@
+ 
+                             if (!result["err"].eoo() && result["err"].type() == String &&
+                                 (_config->throwGLE || op.throwGLE))
+-                                throw DBException((string) "From benchRun GLE " +
++                                throw DBException((std::string) "From benchRun GLE " +
+                                                       causedBy(result["err"].String()),
+                                                   result["code"].eoo() ? 0 : result["code"].Int());
+                         }
+@@ -1136,7 +1136,7 @@
+     try {
+         std::unique_ptr<DBClientBase> conn(_config->createConnection());
+         if (!_config->username.empty()) {
+-            string errmsg;
++	    std::string errmsg;
+             if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+                 uasserted(15932, "Authenticating to connection for benchThread failed: " + errmsg);
+             }
+@@ -1168,7 +1168,7 @@
+         std::unique_ptr<DBClientBase> conn(_config->createConnection());
+         // Must authenticate to admin db in order to run serverStatus command
+         if (_config->username != "") {
+-            string errmsg;
++	    std::string errmsg;
+             if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+                 uasserted(16704,
+                           str::stream()
+@@ -1204,7 +1204,7 @@
+     {
+         std::unique_ptr<DBClientBase> conn(_config->createConnection());
+         if (_config->username != "") {
+-            string errmsg;
++	    std::string errmsg;
+             // this can only fail if admin access was revoked since start of run
+             if (!conn->auth("admin", _config->username, _config->password, errmsg)) {
+                 uasserted(16705,
+diff -Nru mongodb-src-r3.2.16_orig/src/mongo/util/net/miniwebserver.cpp mongodb-src-r3.2.16/src/mongo/util/net/miniwebserver.cpp
+--- mongodb-src-r3.2.16_orig/src/mongo/util/net/miniwebserver.cpp	2017-07-14 22:36:01.000000000 +0200
++++ mongodb-src-r3.2.16/src/mongo/util/net/miniwebserver.cpp	2017-08-01 16:01:01.832678112 +0200
+@@ -45,8 +45,9 @@
+ using std::endl;
+ using std::stringstream;
+ using std::vector;
++using std::string;
+ 
+-MiniWebServer::MiniWebServer(const string& name, const string& ip, int port)
++MiniWebServer::MiniWebServer(const std::string& name, const std::string& ip, int port)
+     : Listener(name, ip, port, false) {}
+ 
+ string MiniWebServer::parseURL(const char* buf) {

diff --git a/dev-db/mongodb/mongodb-3.2.16.ebuild b/dev-db/mongodb/mongodb-3.2.16.ebuild
index c7a04e63cca..f18602bddd9 100644
--- a/dev-db/mongodb/mongodb-3.2.16.ebuild
+++ b/dev-db/mongodb/mongodb-3.2.16.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=6
 SCONS_MIN_VERSION="2.3.0"
 CHECKREQS_DISK_BUILD="2400M"
 CHECKREQS_DISK_USR="512M"
@@ -44,6 +44,14 @@ DEPEND="${RDEPEND}
 	)"
 PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
 
+PATCHES=(
+	"${FILESDIR}/${PN}-3.2.0-fix-scons.patch"
+	"${FILESDIR}/${PN}-3.2.4-boost-1.60.patch"
+	"${FILESDIR}/${PN}-3.2.10-boost-1.62.patch"
+	"${FILESDIR}/${PN}-3.2.16-Replace-string-with-explicit-std-string.patch"
+	"${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+)
+
 S=${WORKDIR}/${MY_P}
 
 pkg_pretend() {
@@ -99,16 +107,6 @@ pkg_setup() {
 	fi
 }
 
-src_prepare() {
-	epatch \
-		"${FILESDIR}/${PN}-3.2.0-fix-scons.patch" \
-		"${FILESDIR}/${PN}-3.2.4-boost-1.60.patch"
-	if has_version ">=dev-libs/boost-1.62"; then
-		epatch "${FILESDIR}/${PN}-3.2.10-boost-1.62.patch"
-	fi
-	epatch_user
-}
-
 src_compile() {
 	# respect mongoDB upstream's basic recommendations
 	# see bug #536688 and #526114
@@ -122,6 +120,7 @@ src_compile() {
 src_install() {
 	escons "${scons_opts[@]}" --nostrip install --prefix="${ED}"/usr
 
+	local x
 	for x in /var/{lib,log}/${PN}; do
 		keepdir "${x}"
 		fowners mongodb:mongodb "${x}"
@@ -157,7 +156,7 @@ pkg_preinst() {
 
 src_test() {
 	# this one test fails
-	rm jstests/core/repl_write_threads_start_param.js
+	rm jstests/core/repl_write_threads_start_param.js || die
 
 	./buildscripts/resmoke.py --dbpathPrefix=test --suites core || die "Tests failed"
 }


             reply	other threads:[~2017-09-21 19:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 19:50 Patrice Clement [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-11  9:51 [gentoo-commits] repo/gentoo:master commit in: dev-db/mongodb/files/, dev-db/mongodb/ Sam James
2024-12-11  5:48 Sam James
2024-12-11  5:48 Sam James
2024-12-11  5:48 Sam James
2024-05-10 14:18 Alexys Jacob
2023-01-30  3:27 Sam James
2022-12-31 15:36 Sam James
2022-12-30 20:22 Sam James
2022-06-17 17:55 Sam James
2022-04-26 13:37 Alexys Jacob
2021-08-20 18:07 Alexys Jacob
2021-08-19 16:38 Alexys Jacob
2021-08-19 16:38 Alexys Jacob
2021-07-15 14:14 Thomas Deutschmann
2021-01-18 10:42 Alexys Jacob
2020-11-09 14:11 Alexys Jacob
2020-11-09 14:11 Alexys Jacob
2019-09-22 18:59 Alexys Jacob
2018-01-06 21:34 Alexys Jacob
2018-01-05 13:07 Alexys Jacob
2017-10-13  8:33 Alexys Jacob
2017-07-31 12:14 Alexys Jacob
2016-10-21 18:50 David Seifert
2016-04-02 18:54 David Seifert
2015-12-31 14:07 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=1506023401.4fb6b5123a834fbb1d1726aaeebee2ec3ad79fa4.monsieurp@gentoo \
    --to=monsieurp@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