diff options
author | Michael Gmelin <grembo@FreeBSD.org> | 2014-09-12 18:06:17 +0000 |
---|---|---|
committer | Michael Gmelin <grembo@FreeBSD.org> | 2014-09-12 18:06:17 +0000 |
commit | a9fd01f49122b5d4b1840c4b726bf06b1c510dc9 (patch) | |
tree | b35a1987e6cdd0a6b55ffc4ed9b24499882cab9b /devel/ice | |
parent | 7bc80d6ec0100ab85b75ca5ca79d070446bea80b (diff) | |
download | ports-a9fd01f49122b5d4b1840c4b726bf06b1c510dc9.tar.gz ports-a9fd01f49122b5d4b1840c4b726bf06b1c510dc9.zip |
Notes
Diffstat (limited to 'devel/ice')
-rw-r--r-- | devel/ice/Makefile | 17 | ||||
-rw-r--r-- | devel/ice/files/patch-cpp-src-IceGrid-AdapterCache.cpp | 102 | ||||
-rw-r--r-- | devel/ice/files/patch-cpp-src-IceGrid-AdapterCache.h | 23 | ||||
-rw-r--r-- | devel/ice/files/patch-cpp-src-IceGrid-Database.cpp | 11 | ||||
-rw-r--r-- | devel/ice/files/patch-cpp-test-Glacier2-staticFiltering-run.py | 6 | ||||
-rw-r--r-- | devel/ice/files/patch-py-modules-IcePy-Types.cpp | 112 |
6 files changed, 264 insertions, 7 deletions
diff --git a/devel/ice/Makefile b/devel/ice/Makefile index 9e6b243bfef0..bd6dee549a6a 100644 --- a/devel/ice/Makefile +++ b/devel/ice/Makefile @@ -3,7 +3,7 @@ PORTNAME= Ice PORTVERSION= 3.5.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= http://download.zeroc.com/Ice/3.5/ @@ -12,8 +12,16 @@ COMMENT= Modern alternative to object middleware such as CORBA/COM/DCOM/COM+ LICENSE= GPLv2 +SLAVE_PORT?= no + +.if ${SLAVE_PORT} == "no" LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2 \ libmcpp.so:${PORTSDIR}/devel/mcpp +.else +LIB_VRS= ${PORTVERSION:R:S|.||g} +LIB_DEPENDS+= libIce.so.${LIB_VRS}:${PORTSDIR}/devel/ice +PLIST_SUB+= LIB_VERSION="${PORTVERSION}" LIB_VRS="${LIB_VRS}" +.endif OPTIONS_DEFINE?= DEBUG DEMOS DOCS TESTS OPTIONS_DEFAULT?= DEMOS TESTS @@ -22,11 +30,12 @@ DEMOS_DESC?= Build demos .include <bsd.port.options.mk> -.if ${PORT_OPTIONS:MTESTS} -USE_PYTHON_BUILD= yes +USES+= iconv gmake + +.if ${PORT_OPTIONS:MTESTS} && ${SLAVE_PORT} == "no" +USES+= python:build .endif -USES= iconv gmake USE_BDB= yes WANT_BDB_VER= 5 INVALID_BDB_VER= 40 41 42 43 44 46 47 48 6 diff --git a/devel/ice/files/patch-cpp-src-IceGrid-AdapterCache.cpp b/devel/ice/files/patch-cpp-src-IceGrid-AdapterCache.cpp new file mode 100644 index 000000000000..a0d8aba5a8b3 --- /dev/null +++ b/devel/ice/files/patch-cpp-src-IceGrid-AdapterCache.cpp @@ -0,0 +1,102 @@ +--- cpp/src/IceGrid/AdapterCache.cpp.orig 2013-03-11 15:19:47.000000000 +0000 ++++ cpp/src/IceGrid/AdapterCache.cpp 2014-09-08 14:21:13.335195726 +0000 +@@ -202,8 +202,12 @@ AdapterCache::addServerAdapter(const AdapterDescriptor& desc, const ServerEntryP + ReplicaGroupEntryPtr repEntry = ReplicaGroupEntryPtr::dynamicCast(getImpl(desc.replicaGroupId)); + if(!repEntry) + { +- Ice::Error out(_communicator->getLogger()); +- out << "can't add adapter `" << desc.id << "' to unknown replica group `" << desc.replicaGroupId << "'"; ++ // ++ // Add an un-assigned replica group, the replica group will in theory be added ++ // shortly after when its application is loaded. ++ // ++ repEntry = new ReplicaGroupEntry(*this, desc.replicaGroupId, "", new RandomLoadBalancingPolicy("0")); ++ addImpl(desc.replicaGroupId, repEntry); + } + repEntry->addReplica(desc.id, entry); + } +@@ -213,13 +217,24 @@ void + AdapterCache::addReplicaGroup(const ReplicaGroupDescriptor& desc, const string& app) + { + Lock sync(*this); +- if(getImpl(desc.id)) ++ ReplicaGroupEntryPtr repEntry = ReplicaGroupEntryPtr::dynamicCast(getImpl(desc.id)); ++ if(repEntry) + { +- Ice::Error out(_communicator->getLogger()); +- out << "can't add duplicate replica group `" << desc.id << "'"; ++ // ++ // If the replica group isn't assigned to an application, ++ // assign it. Otherwise, it's a duplicate so we log an error. ++ // ++ if(repEntry->getApplication().empty()) ++ { ++ repEntry->update(app, desc.loadBalancing); ++ } ++ else ++ { ++ Ice::Error out(_communicator->getLogger()); ++ out << "can't add duplicate replica group `" << desc.id << "'"; ++ } + return; + } +- + addImpl(desc.id, new ReplicaGroupEntry(*this, desc.id, app, desc.loadBalancing)); + } + +@@ -258,7 +273,16 @@ AdapterCache::removeServerAdapter(const string& id) + Ice::Error out(_communicator->getLogger()); + out << "can't remove adapter `" << id << "' from unknown replica group `" << replicaGroupId << "'"; + } +- repEntry->removeReplica(id); ++ else ++ { ++ // ++ // If the replica group is empty and it's not assigned, remove it. ++ // ++ if(repEntry->removeReplica(id)) ++ { ++ removeImpl(replicaGroupId); ++ } ++ } + } + } + +@@ -440,7 +464,7 @@ ReplicaGroupEntry::ReplicaGroupEntry(AdapterCache& cache, + _lastReplica(0), + _requestInProgress(false) + { +- update(policy); ++ update(application, policy); + } + + bool +@@ -502,7 +526,7 @@ ReplicaGroupEntry::addReplica(const string& /*replicaId*/, const ServerAdapterEn + _replicas.push_back(adapter); + } + +-void ++bool + ReplicaGroupEntry::removeReplica(const string& replicaId) + { + Lock sync(*this); +@@ -516,14 +540,18 @@ ReplicaGroupEntry::removeReplica(const string& replicaId) + break; + } + } ++ ++ // Replica group can be removed if not assigned to an application and there's no more replicas ++ return _replicas.empty() && _application.empty(); + } + + void +-ReplicaGroupEntry::update(const LoadBalancingPolicyPtr& policy) ++ReplicaGroupEntry::update(const string& application, const LoadBalancingPolicyPtr& policy) + { + Lock sync(*this); + assert(policy); + ++ _application = application; + _loadBalancing = policy; + + istringstream is(_loadBalancing->nReplicas); diff --git a/devel/ice/files/patch-cpp-src-IceGrid-AdapterCache.h b/devel/ice/files/patch-cpp-src-IceGrid-AdapterCache.h new file mode 100644 index 000000000000..1892a09f4682 --- /dev/null +++ b/devel/ice/files/patch-cpp-src-IceGrid-AdapterCache.h @@ -0,0 +1,23 @@ +--- cpp/src/IceGrid/AdapterCache.h.orig 2013-03-11 15:19:47.000000000 +0000 ++++ cpp/src/IceGrid/AdapterCache.h 2014-09-08 14:21:13.335195726 +0000 +@@ -62,7 +62,7 @@ protected: + + AdapterCache& _cache; + const std::string _id; +- const std::string _application; ++ std::string _application; + }; + typedef IceUtil::Handle<AdapterEntry> AdapterEntryPtr; + +@@ -105,9 +105,9 @@ public: + virtual AdapterPrx getProxy(const std::string&, bool) const { return 0; } + + void addReplica(const std::string&, const ServerAdapterEntryPtr&); +- void removeReplica(const std::string&); ++ bool removeReplica(const std::string&); + +- void update(const LoadBalancingPolicyPtr&); ++ void update(const std::string&, const LoadBalancingPolicyPtr&); + bool hasAdaptersFromOtherApplications() const; + + private: diff --git a/devel/ice/files/patch-cpp-src-IceGrid-Database.cpp b/devel/ice/files/patch-cpp-src-IceGrid-Database.cpp new file mode 100644 index 000000000000..5b59405740fd --- /dev/null +++ b/devel/ice/files/patch-cpp-src-IceGrid-Database.cpp @@ -0,0 +1,11 @@ +--- cpp/src/IceGrid/Database.cpp.orig 2013-03-11 15:19:47.000000000 +0000 ++++ cpp/src/IceGrid/Database.cpp 2014-09-08 14:21:13.335195726 +0000 +@@ -2088,7 +2088,7 @@ Database::reload(const ApplicationHelper& oldApp, + { + ReplicaGroupEntryPtr entry = ReplicaGroupEntryPtr::dynamicCast(_adapterCache.get(r->id)); + assert(entry); +- entry->update(r->loadBalancing); ++ entry->update(application, r->loadBalancing); + } + catch(const AdapterNotExistException&) + { diff --git a/devel/ice/files/patch-cpp-test-Glacier2-staticFiltering-run.py b/devel/ice/files/patch-cpp-test-Glacier2-staticFiltering-run.py index 71682c85e713..f3a00fbb3848 100644 --- a/devel/ice/files/patch-cpp-test-Glacier2-staticFiltering-run.py +++ b/devel/ice/files/patch-cpp-test-Glacier2-staticFiltering-run.py @@ -14,11 +14,11 @@ domainname = "" +print "Network and process debug output:" -+subprocess.call(["/usr/bin/netstat", "-an"]) -+subprocess.call(["/bin/ps", "-alxww"]) -+subprocess.call(["/usr/bin/sockstat"]) +subprocess.call(["/sbin/ifconfig", "-a"]) +subprocess.call(["/sbin/sysctl", "-a"]) ++subprocess.call(["/bin/ps", "-alxww"]) ++subprocess.call(["/usr/bin/sockstat"]) ++subprocess.call(["/usr/bin/netstat", "-an"]) testcases = [ ('testing category filter', ('', '', '', 'foo "a cat with spaces"', '', ''), diff --git a/devel/ice/files/patch-py-modules-IcePy-Types.cpp b/devel/ice/files/patch-py-modules-IcePy-Types.cpp new file mode 100644 index 000000000000..160a9cc8a064 --- /dev/null +++ b/devel/ice/files/patch-py-modules-IcePy-Types.cpp @@ -0,0 +1,112 @@ +--- py/modules/IcePy/Types.cpp.orig 2013-03-11 15:19:47.000000000 +0000 ++++ py/modules/IcePy/Types.cpp 2014-09-08 14:21:13.335195726 +0000 +@@ -1232,11 +1232,15 @@ IcePy::StructInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMa + { + assert(PyObject_IsInstance(p, pythonType.get()) == 1); // validate() should have caught this. + ++ int sizePos = -1; + if(optional) + { + if(_variableLength) + { +- os->startSize(); ++ // BUGFIX: #5481 startSize/endSize can't be nested ++ //os->startSize(); ++ sizePos = os->pos(); ++ os->write(Ice::Int(0)); + } + else + { +@@ -1266,7 +1270,9 @@ IcePy::StructInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMa + + if(optional && _variableLength) + { +- os->endSize(); ++ assert(sizePos != -1); ++ //os->endSize(); ++ os->rewrite(os->pos() - sizePos - 4, sizePos); + } + } + +@@ -1402,11 +1408,15 @@ IcePy::SequenceInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Object + { + PrimitiveInfoPtr pi = PrimitiveInfoPtr::dynamicCast(elementType); + ++ int sizePos = -1; + if(optional) + { + if(elementType->variableLength()) + { +- os->startSize(); ++ // BUGFIX: #5481 startSize/endSize can't be nested ++ //os->startSize(); ++ sizePos = os->pos(); ++ os->write(Ice::Int(0)); + } + else if(elementType->wireSize() > 1) + { +@@ -1490,7 +1500,9 @@ IcePy::SequenceInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Object + + if(optional && elementType->variableLength()) + { +- os->endSize(); ++ assert(sizePos != -1); ++ //os->endSize(); ++ os->rewrite(os->pos() - sizePos - 4, sizePos); + } + } + +@@ -2480,11 +2492,15 @@ IcePy::DictionaryInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Obje + + const Ice::Int sz = p == Py_None ? 0 : static_cast<Ice::Int>(PyDict_Size(p)); + ++ int sizePos = -1; + if(optional) + { + if(_variableLength) + { +- os->startSize(); ++ // BUGFIX: #5481 startSize/endSize can't be nested ++ //os->startSize(); ++ sizePos = os->pos(); ++ os->write(Ice::Int(0)); + } + else + { +@@ -2523,7 +2539,9 @@ IcePy::DictionaryInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, Obje + + if(optional && _variableLength) + { +- os->endSize(); ++ assert(sizePos != -1); ++ //os->endSize(); ++ os->rewrite(os->pos() - sizePos - 4, sizePos); + } + } + +@@ -2958,9 +2976,13 @@ IcePy::ProxyInfo::optionalFormat() const + void + IcePy::ProxyInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap*, bool optional, const Ice::StringSeq*) + { ++ int sizePos = -1; + if(optional) + { +- os->startSize(); ++ // BUGFIX: #5481 startSize/endSize can't be nested ++ //os->startSize(); ++ sizePos = os->pos(); ++ os->write(Ice::Int(0)); + } + + if(p == Py_None) +@@ -2978,7 +3000,9 @@ IcePy::ProxyInfo::marshal(PyObject* p, const Ice::OutputStreamPtr& os, ObjectMap + + if(optional) + { +- os->endSize(); ++ assert(sizePos != -1); ++ //os->endSize(); ++ os->rewrite(os->pos() - sizePos - 4, sizePos); + } + } + |