[Pkg-mongodb-maintainers] [pkg-mongodb] 318/394: Fix build with python-pymongo 3.0+

Apollon Oikonomopoulos apoikos at moszumanska.debian.org
Wed Sep 21 13:59:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

apoikos pushed a commit to branch master
in repository pkg-mongodb.

commit e6bc8320e2869e8b256bf92f85e2a481783ddfbf
Author: Laszlo Boszormenyi (GCS) <gcs at debian.org>
Date:   Tue Jun 30 16:53:52 2015 +0000

    Fix build with python-pymongo 3.0+
---
 debian/changelog                  |  3 ++
 debian/patches/0013-pymongo.patch | 67 +++++++++++++++++++++++++++++++++++++++
 debian/patches/series             |  1 +
 3 files changed, 71 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 32428fd..3579101 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,9 @@ mongodb (1:2.4.14-1) unstable; urgency=low
   * Remove applied patches.
   * Specify home directory when adding mongodb user.
 
+  [ Svante Signell <svante.signell at gmail.com> ]
+  * Fix build with python-pymongo 3.0+ (closes: #786823).
+
  -- Laszlo Boszormenyi (GCS) <gcs at debian.org>  Sun, 31 May 2015 12:46:04 +0000
 
 mongodb (1:2.4.10-5) unstable; urgency=high
diff --git a/debian/patches/0013-pymongo.patch b/debian/patches/0013-pymongo.patch
new file mode 100644
index 0000000..8e849dc
--- /dev/null
+++ b/debian/patches/0013-pymongo.patch
@@ -0,0 +1,67 @@
+Index: mongodb-2.4.10/buildscripts/smoke.py
+===================================================================
+--- mongodb-2.4.10.orig/buildscripts/smoke.py
++++ mongodb-2.4.10/buildscripts/smoke.py
+@@ -49,7 +49,7 @@ from subprocess import (Popen,
+ import sys
+ import time
+ 
+-from pymongo import Connection
++from pymongo import MongoClient
+ from pymongo.errors import OperationFailure
+ 
+ import utils
+@@ -166,7 +166,7 @@ class mongod(object):
+ 
+     def setup_admin_user(self, port=mongod_port):
+         try:
+-            Connection( "localhost" , int(port) ).admin.add_user("admin","password")
++            MomgoClient( "localhost" , int(port) ).admin.add_user("admin","password")
+         except OperationFailure, e:
+             if e.message == 'need to login':
+                 pass # SERVER-4225
+@@ -230,7 +230,7 @@ class mongod(object):
+             self.setup_admin_user(self.port)
+ 
+         if self.slave:
+-            local = Connection(port=self.port, slave_okay=True).local
++            local = MongoClient(port=self.port, slave_okay=True).local
+             synced = False
+             while not synced:
+                 synced = True
+@@ -289,7 +289,7 @@ class mongod(object):
+         sys.stdout.flush()
+ 
+     def wait_for_repl(self):
+-        Connection(port=self.port).test.smokeWait.insert({}, w=2, wtimeout=5*60*1000)
++        MongoClient(port=self.port).test.smokeWait.insert({}, w=2, wtimeout=5*60*1000)
+ 
+ class Bug(Exception):
+     def __str__(self):
+@@ -325,7 +325,7 @@ def check_db_hashes(master, slave):
+ 
+     # FIXME: maybe make this run dbhash on all databases?
+     for mongod in [master, slave]:
+-        mongod.dbhash = Connection(port=mongod.port, slave_okay=True).test.command("dbhash")
++        mongod.dbhash = MongoClient(port=mongod.port, slave_okay=True).test.command("dbhash")
+         mongod.dict = mongod.dbhash["collections"]
+ 
+     global lost_in_slave, lost_in_master, screwy_in_slave, replicated_collections
+@@ -512,7 +512,7 @@ def runTest(test):
+     
+     if start_mongod:
+         try:
+-            c = Connection(host="127.0.0.1", port=int(mongod_port), ssl=use_ssl)
++            c = MongoClient(host="127.0.0.1", port=int(mongod_port), ssl=use_ssl)
+         except Exception,e:
+             print "Exception from pymongo: ", e
+             raise TestServerFailure(path)
+@@ -550,7 +550,7 @@ def run_tests(tests):
+                            auth=auth,
+                            authMechanism=authMechanism,
+                            use_ssl=use_ssl).__enter__()
+-            primary = Connection(port=master.port, slave_okay=True);
++            primary = MongoClient(port=master.port, slave_okay=True);
+ 
+             primary.admin.command({'replSetInitiate' : {'_id' : 'foo', 'members' : [
+                             {'_id': 0, 'host':'localhost:%s' % master.port},
diff --git a/debian/patches/series b/debian/patches/series
index 54d40fa..1c4cd19 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,4 +12,5 @@
 0099-Pagesize-hacks.patch
 0004-Support-ppc64el-builds.patch
 0012-support-gnu.patch
+0013-pymongo.patch
 no-unused-function.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mongodb/pkg-mongodb.git



More information about the Pkg-mongodb-maintainers mailing list