[tango] 01/01: release
Frédéric-Emmanuel Picca
picca at moszumanska.debian.org
Thu Jul 17 16:02:26 UTC 2014
This is an automated email from the git hooks/post-receive script.
picca pushed a commit to branch master
in repository tango.
commit 933014032d8ae444f33740efcf9b93598ff231d9
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date: Thu Jul 17 13:09:24 2014 +0200
release
---
debian/changelog | 7 +-
debian/control | 2 +-
debian/patches/0008-fix-upstream-p812_4.patch | 205 ++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 2 +-
5 files changed, 213 insertions(+), 4 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index b83827c..5033d74 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,10 @@
-tango (8.1.2c+dfsg-5) UNRELEASED; urgency=medium
+tango (8.1.2c+dfsg-5) unstable; urgency=medium
+ * Bump Standards-Version to 3.9.5 (nothing to do)
+ * debian/patches
+ + 0008-fix-upsteam-p812_4.patch
* create the user in the postinst to deal with the piuparts remaining
- files error. An empty tango home directory (/var/lib.tango) is part of
+ files error. An empty tango home directory (/var/lib/tango) is part of
tango-common so we let dpkg deal with its removal (Closes: #657146)
* add the tango user to the video group. Some tango devices need access to
video grabbers.
diff --git a/debian/control b/debian/control
index 357f792..eace183 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 9),
libmysqlclient-dev,
libzmq3-dev (>= 3.2.2),
po-debconf
-Standards-Version: 3.9.4
+Standards-Version: 3.9.5
Vcs-Browser: http://git.debian.org/?p=debian-science/packages/tango.git
Vcs-Git: git://git.debian.org/git/debian-science/packages/tango.git
Homepage: http://www.tango-controls.org
diff --git a/debian/patches/0008-fix-upstream-p812_4.patch b/debian/patches/0008-fix-upstream-p812_4.patch
new file mode 100644
index 0000000..6be32c2
--- /dev/null
+++ b/debian/patches/0008-fix-upstream-p812_4.patch
@@ -0,0 +1,205 @@
+From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca at debian.org>
+Date: Thu, 17 Jul 2014 10:31:05 +0200
+Subject: fix upstream p812_4
+
+---
+ lib/cpp/client/event.cpp | 3 ++-
+ lib/cpp/client/eventconsumer.h | 7 +++--
+ lib/cpp/client/eventkeepalive.cpp | 2 +-
+ lib/cpp/client/zmqeventconsumer.cpp | 54 ++++++++++++++++++++++++++-----------
+ 4 files changed, 46 insertions(+), 20 deletions(-)
+
+diff --git a/lib/cpp/client/event.cpp b/lib/cpp/client/event.cpp
+index f3fecf1..47625dd 100644
+--- a/lib/cpp/client/event.cpp
++++ b/lib/cpp/client/event.cpp
+@@ -1631,6 +1631,7 @@ void EventConsumer::unsubscribe_event(int event_id)
+ delete epos->second.callback_monitor;
+
+ string deleted_channel_name = epos->second.channel_name;
++ string deleted_event_endpoint = evt_cb.endpoint;
+ event_callback_map.erase(epos);
+
+ //
+@@ -1689,7 +1690,7 @@ void EventConsumer::unsubscribe_event(int event_id)
+ }
+ else
+ {
+- disconnect_event_channel(deleted_channel_name,evt_ch.endpoint);
++ disconnect_event_channel(deleted_channel_name,evt_ch.endpoint,deleted_event_endpoint);
+ }
+
+ delete evt_ch.adm_device_proxy;
+diff --git a/lib/cpp/client/eventconsumer.h b/lib/cpp/client/eventconsumer.h
+index 20c8604..7f65bc1 100644
+--- a/lib/cpp/client/eventconsumer.h
++++ b/lib/cpp/client/eventconsumer.h
+@@ -414,7 +414,7 @@ protected :
+ void get_fire_sync_event(DeviceProxy *,CallBack *,EventQueue *,EventType,string &,const string &,EventCallBackStruct &);
+
+ virtual void connect_event_channel(string &,Database *,bool,DeviceData &) = 0;
+- virtual void disconnect_event_channel(TANGO_UNUSED(string &channel_name),TANGO_UNUSED(string &endpoint)) {}
++ virtual void disconnect_event_channel(TANGO_UNUSED(string &channel_name),TANGO_UNUSED(string &endpoint),TANGO_UNUSED(string &endpoint_event)) {}
+ virtual void connect_event_system(string &,string &,string &e,const vector<string> &,EvChanIte &,EventCallBackStruct &,DeviceData &) = 0;
+ virtual void disconnect_event(string &,string &) {}
+
+@@ -502,7 +502,7 @@ public :
+ protected :
+ ZmqEventConsumer(ApiUtil *ptr);
+ virtual void connect_event_channel(string &,Database *,bool,DeviceData &);
+- virtual void disconnect_event_channel(string &channel_name,string &endpoint);
++ virtual void disconnect_event_channel(string &channel_name,string &endpoint,string &endpoint_event);
+ virtual void connect_event_system(string &,string &,string &e,const vector<string> &,EvChanIte &,EventCallBackStruct &,DeviceData &);
+ virtual void disconnect_event(string &,string &);
+
+@@ -530,6 +530,7 @@ private :
+
+ int old_poll_nb;
+ omni_mutex subscription_mutex;
++ bool ctrl_socket_bound;
+
+ void *run_undetached(void *arg);
+ void push_heartbeat_event(string &);
+@@ -540,6 +541,8 @@ private :
+ void process_event(zmq_msg_t &,zmq_msg_t &,zmq_msg_t &,zmq_msg_t &);
+ void multi_tango_host(zmq::socket_t *,SocketCmd,string &);
+ void print_error_message(const char *mess) {ApiUtil *au=ApiUtil::instance();au->print_error_message(mess);}
++ void set_ctrl_sock_bound() {subscription_mutex.lock();ctrl_socket_bound=true;subscription_mutex.unlock();}
++ bool is_ctrl_sock_bound() {bool _b;subscription_mutex.lock();_b=ctrl_socket_bound;subscription_mutex.unlock();return _b;}
+
+ friend class DelayEvent;
+ };
+diff --git a/lib/cpp/client/eventkeepalive.cpp b/lib/cpp/client/eventkeepalive.cpp
+index 2d93241..e43c802 100644
+--- a/lib/cpp/client/eventkeepalive.cpp
++++ b/lib/cpp/client/eventkeepalive.cpp
+@@ -190,7 +190,7 @@ bool EventConsumerKeepAliveThread::reconnect_to_zmq_channel(EvChanIte &ipos,Even
+ string adm_name = ipos->second.full_adm_name;
+
+ #ifdef ZMQ_HAS_DISCONNECT
+- event_consumer->disconnect_event_channel(adm_name,ipos->second.endpoint);
++ event_consumer->disconnect_event_channel(adm_name,ipos->second.endpoint,epos->second.endpoint);
+ #endif
+ event_consumer->connect_event_channel(adm_name,
+ epos->second.device->get_device_db(),
+diff --git a/lib/cpp/client/zmqeventconsumer.cpp b/lib/cpp/client/zmqeventconsumer.cpp
+index 3212100..bb56814 100644
+--- a/lib/cpp/client/zmqeventconsumer.cpp
++++ b/lib/cpp/client/zmqeventconsumer.cpp
+@@ -65,7 +65,8 @@ ZmqEventConsumer *ZmqEventConsumer::_instance = NULL;
+ /* */
+ /************************************************************************/
+
+-ZmqEventConsumer::ZmqEventConsumer(ApiUtil *ptr) : EventConsumer(ptr),omni_thread((void *)ptr),zmq_context(1)
++ZmqEventConsumer::ZmqEventConsumer(ApiUtil *ptr) : EventConsumer(ptr),
++omni_thread((void *)ptr),zmq_context(1),ctrl_socket_bound(false)
+ {
+ cout3 << "calling Tango::ZmqEventConsumer::ZmqEventConsumer() \n";
+
+@@ -161,6 +162,8 @@ void *ZmqEventConsumer::run_undetached(TANGO_UNUSED(void *arg))
+ control_sock->setsockopt(ZMQ_LINGER,&linger,sizeof(linger));
+ control_sock->bind(CTRL_SOCK_ENDPOINT);
+
++ set_ctrl_sock_bound();
++
+ //
+ // Initialize poll set
+ //
+@@ -784,6 +787,7 @@ bool ZmqEventConsumer::process_ctrl(zmq::message_t &received_ctrl,zmq::pollitem_
+ const char *event_name = &(tmp_ptr[1]);
+ #ifdef ZMQ_HAS_DISCONNECT
+ const char *endpoint = &(tmp_ptr[1 + ::strlen(event_name) + 1]);
++ const char *endpoint_event = &(tmp_ptr[1 + ::strlen(event_name) + ::strlen(endpoint) + 2]);
+ #endif
+
+ //
+@@ -815,6 +819,17 @@ bool ZmqEventConsumer::process_ctrl(zmq::message_t &received_ctrl,zmq::pollitem_
+ connected_heartbeat.erase(pos);
+
+ heartbeat_sub_sock->disconnect(endpoint);
++
++//
++// Remove the event endpoint from the already connected event and disconnect the event socket
++//
++
++ pos = find(connected_pub.begin(),connected_pub.end(),string(endpoint_event));
++ if (pos != connected_pub.end())
++ {
++ connected_pub.erase(pos);
++ event_sub_sock->disconnect(endpoint_event);
++ }
+ #endif
+ }
+ break;
+@@ -927,20 +942,6 @@ bool ZmqEventConsumer::process_ctrl(zmq::message_t &received_ctrl,zmq::pollitem_
+ string base_name(event_name);
+ multi_tango_host(event_sub_sock,UNSUBSCRIBE,base_name);
+ }
+-
+-#ifdef ZMQ_HAS_DISCONNECT
+-//
+-// Remove the endpoint in the vector of already connected event and disconnect the socket to this endpoint
+-//
+-
+- vector<string>::iterator pos;
+- pos = find(connected_pub.begin(),connected_pub.end(),endpoint_str);
+- if (pos != connected_pub.end())
+- {
+- connected_pub.erase(pos);
+- event_sub_sock->disconnect(endpoint);
+- }
+-#endif
+ }
+ else
+ {
+@@ -1384,10 +1385,11 @@ void ZmqEventConsumer::connect_event_channel(string &channel_name,TANGO_UNUSED(D
+ // in :
+ // - channel name : The event channel name (DS admin name)
+ // - endpoint : The ZMQ endpoint for the heartbeat publisher socket
++// - endpoint_event : The ZMQ endpoint for the event publisher socket
+ //
+ //--------------------------------------------------------------------------------------------------------------------
+
+-void ZmqEventConsumer::disconnect_event_channel(string &channel_name,string &endpoint)
++void ZmqEventConsumer::disconnect_event_channel(string &channel_name,string &endpoint,string &endpoint_event)
+ {
+ string unsub(channel_name);
+ unsub = unsub + '.' + HEARTBEAT_EVENT_NAME;
+@@ -1420,6 +1422,9 @@ void ZmqEventConsumer::disconnect_event_channel(string &channel_name,string &end
+ ::strcpy(&(buffer[length]),endpoint.c_str());
+ length = length + endpoint.size() + 1;
+
++ ::strcpy(&(buffer[length]),endpoint_event.c_str());
++ length = length + endpoint_event.size() + 1;
++
+ //
+ // Send command to main ZMQ thread
+ //
+@@ -2838,10 +2843,27 @@ DelayEvent::DelayEvent(EventConsumer *ec):released(false),eve_con(NULL)
+ // I have tried with a yield call but it still failed in some cases (when running the DS with a file as database for
+ // instance). Replace the yield with a 15 mS sleep !!!
+ //
++// Since ZMQ 4, it's possible to connect to the remote socket even if it is not yet bound but the remote
++// socket will hang in its recv call!!!!
++// We still need the sleep call but not in the exception case
++//
+
+ try
+ {
+ sender.connect(CTRL_SOCK_ENDPOINT);
++
++ if (eve_con->is_ctrl_sock_bound() == false)
++ {
++#ifndef _TG_WINDOWS_
++ struct timespec ts;
++ ts.tv_sec = 0;
++ ts.tv_nsec = 15000000;
++
++ nanosleep(&ts,NULL);
++#else
++ Sleep(20);
++#endif
++ }
+ }
+ catch (zmq::error_t &e)
+ {
diff --git a/debian/patches/series b/debian/patches/series
index e89d79e..29c4cc4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
0005-forwarded-upstrean-fix-FTBFS-on-sparc64.patch
0006-fix-upstream-p812_2.patch
0007-fix-upstream-p812_3.patch
+0008-fix-upstream-p812_4.patch
diff --git a/debian/rules b/debian/rules
index 253bb56..4b91ba5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,7 @@ PACKAGE := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)+.*/\1/p')
FULLDEBVERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*-.*\)/\1/p')
-CONFIGURE_OPTS := --with-omni=/usr --disable-dbcreate --disable-java --with-doxygen --disable-jpegmmx
+CONFIGURE_OPTS := --with-omni=/usr --disable-static --disable-dbcreate --disable-java --with-doxygen --disable-jpegmmx
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/tango.git
More information about the debian-science-commits
mailing list