Bug#884249: ring: FTBFS against upnp 1.8

2017-12-19 Thread Uwe Kleine-König
Control: tag -1 + patch

Hello,

On Tue, Dec 12, 2017 at 10:17:27PM +0100, Sebastian Ramacher wrote:
> Source: ring
> Version: 20171129.2.cf5bbff~ds1-1
> Severity: important
> Tags: sid buster
> 
> ring FTBFS against upnp 1.8 (available in experimental)
> | ../../doltlibtool  --tag=CXX   --mode=compile g++-6 -DHAVE_CONFIG_H -I. 
> -I../..  -I/<>/daemon/src -I/<>/daemon/src/config 
> -I/<>/daemon/src/media -I/<>/daemon/test 
> -I/<>/daemon/src/dring  -DPREFIX=\"/usr\" 
> -DPROGSHAREDIR=\"/usr/share/ring\" -DENABLE_TRACE -DRING_REVISION=\"\" 
> -DRING_DIRTY_REPO=\"dirty\" -DPJSIP_MAX_PKT_LEN=8000 -DPJ_AUTOCONF=1 
> -DHAVE_SPEEX_CODEC -DHAVE_GSM_CODEC -DHAVE_OPUS -Wdate-time 
> -D_FORTIFY_SOURCE=2 
> -I/<>/daemon/contrib/x86_64-linux-gnu/include -I./ -I../ 
> -DPREFIX=\"/usr\" -DPROGSHAREDIR=\"/usr/share/ring\" -g -O2 
> -fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat 
> -Werror=format-security -DMSGPACK_DEFAULT_API_VERSION=1 -DPJ_AUTOCONF=1  
> -I/<>/daemon/contrib/x86_64-linux-gnu/include -MT 
> libclient_la-videomanager.lo -MD -MP -MF .deps/libclient_la-videomanager.Tpo 
> -c -o libclient_la-videomanager.lo `test -f 'videomanager.cpp' || echo 
> './'`videomanager.cpp
> | In file included from configurationmanager.cpp:43:0:
> | /<>/daemon/src/upnp/upnp_context.h:225:48: error: 
> 'Upnp_Discovery' does not name a type
> |  void parseDevice(IXML_Document* doc, const Upnp_Discovery* d_event);
> | ^~
> | /<>/daemon/src/upnp/upnp_context.h:227:45: error: 
> 'Upnp_Discovery' does not name a type
> |  void parseIGD(IXML_Document* doc, const Upnp_Discovery* d_event);
> |  ^~
> | Makefile:550: recipe for target 'libclient_la-configurationmanager.lo' 
> failed
> | make[5]: *** [libclient_la-configurationmanager.lo] Error 1
> 
> Full log at
> https://people.debian.org/~sramacher/logs/upnp/ring_amd64-2017-12-12T20:48:40Z.log

the patch below makes ring build against both libupnp-dev/unstable (using
libupnp 1.6) and libupnp-dev/experimental (using libupnp 1.8). Note I
didn't do any runtime tests and for libupnp6 it depends on libupnp-dev
1.6.24-3 because on the earlier revisions the used compat code was
broken and incomplete.

Best regards
Uwe

diff --git a/debian/control b/debian/control
index fb3c582bf2ec..8b79b341f8f2 100644
--- a/debian/control
+++ b/debian/control
@@ -29,7 +29,7 @@ Build-Depends: debhelper (>= 9),
 # ring-daemon
libdbus-1-dev,
libdbus-c++-dev,
-   libupnp-dev,
+   libupnp-dev (>= 1.6.24-3~),
libgnutls28-dev (>= 3.4.14),
libpulse-dev,
libasound2-dev,
diff --git a/debian/patches/libupnp1.8.patch b/debian/patches/libupnp1.8.patch
new file mode 100644
index ..2d70866d8627
--- /dev/null
+++ b/debian/patches/libupnp1.8.patch
@@ -0,0 +1,187 @@
+--- a/daemon/src/upnp/upnp_context.cpp
 b/daemon/src/upnp/upnp_context.cpp
+@@ -709,7 +709,7 @@
+  * relevant lists
+  */
+ void
+-UPnPContext::parseDevice(IXML_Document* doc, const Upnp_Discovery* d_event)
++UPnPContext::parseDevice(IXML_Document* doc, const UpnpDiscovery* d_event)
+ {
+ if (not doc or not d_event)
+ return;
+@@ -729,7 +729,7 @@
+ }
+ 
+ void
+-UPnPContext::parseIGD(IXML_Document* doc, const Upnp_Discovery* d_event)
++UPnPContext::parseIGD(IXML_Document* doc, const UpnpDiscovery* d_event)
+ {
+ if (not doc or not d_event)
+ return;
+@@ -766,7 +766,7 @@
+ std::string baseURL = get_first_doc_item(doc, "URLBase");
+ if (baseURL.empty()) {
+ /* get it from the discovery event location */
+-baseURL = std::string(d_event->Location);
++baseURL = std::string(UpnpDiscovery_get_Location_cstr(d_event));
+ }
+ 
+ /* check if its a valid IGD:
+@@ -925,7 +925,7 @@
+ }
+ 
+ int
+-UPnPContext::cp_callback(Upnp_EventType event_type, void* event, void* 
user_data)
++UPnPContext::cp_callback(Upnp_EventType event_type, const void* event, void* 
user_data)
+ {
+ if (auto upnpContext = static_cast(user_data))
+ return upnpContext->handleUPnPEvents(event_type, event);
+@@ -935,7 +935,7 @@
+ }
+ 
+ int
+-UPnPContext::handleUPnPEvents(Upnp_EventType event_type, void* event)
++UPnPContext::handleUPnPEvents(Upnp_EventType event_type, const void* event)
+ {
+ switch( event_type )
+ {
+@@ -943,7 +943,7 @@
+ /* RING_DBG("UPnP: CP received a discovery advertisement"); */
+ case UPNP_DISCOVERY_SEARCH_RESULT:
+ {
+-struct Upnp_Discovery* d_event = ( struct Upnp_Discovery* )event;
++const UpnpDiscovery* d_event = ( const UpnpDiscovery* )event;
+ std::unique_ptr 
desc_doc(nullptr, ixmlDocument_free);
+ int upnp_err;
+ 
+@@ -952,18 +952,18 @@
+ 
+ /* check if we are already in the process of checking this device */
+ 

Bug#884249: ring: FTBFS against upnp 1.8

2017-12-12 Thread Sebastian Ramacher
Source: ring
Version: 20171129.2.cf5bbff~ds1-1
Severity: important
Tags: sid buster

ring FTBFS against upnp 1.8 (available in experimental)
| ../../doltlibtool  --tag=CXX   --mode=compile g++-6 -DHAVE_CONFIG_H -I. 
-I../..  -I/<>/daemon/src -I/<>/daemon/src/config 
-I/<>/daemon/src/media -I/<>/daemon/test 
-I/<>/daemon/src/dring  -DPREFIX=\"/usr\" 
-DPROGSHAREDIR=\"/usr/share/ring\" -DENABLE_TRACE -DRING_REVISION=\"\" 
-DRING_DIRTY_REPO=\"dirty\" -DPJSIP_MAX_PKT_LEN=8000 -DPJ_AUTOCONF=1 
-DHAVE_SPEEX_CODEC -DHAVE_GSM_CODEC -DHAVE_OPUS -Wdate-time -D_FORTIFY_SOURCE=2 
-I/<>/daemon/contrib/x86_64-linux-gnu/include -I./ -I../ 
-DPREFIX=\"/usr\" -DPROGSHAREDIR=\"/usr/share/ring\" -g -O2 
-fdebug-prefix-map=/<>=. -fstack-protector-strong -Wformat 
-Werror=format-security -DMSGPACK_DEFAULT_API_VERSION=1 -DPJ_AUTOCONF=1  
-I/<>/daemon/contrib/x86_64-linux-gnu/include -MT 
libclient_la-videomanager.lo -MD -MP -MF .deps/libclient_la-videomanager.Tpo -c 
-o libclient_la-videomanager.lo `test -f 'videomanager.cpp' || echo 
'./'`videomanager.cpp
| In file included from configurationmanager.cpp:43:0:
| /<>/daemon/src/upnp/upnp_context.h:225:48: error: 
'Upnp_Discovery' does not name a type
|  void parseDevice(IXML_Document* doc, const Upnp_Discovery* d_event);
| ^~
| /<>/daemon/src/upnp/upnp_context.h:227:45: error: 
'Upnp_Discovery' does not name a type
|  void parseIGD(IXML_Document* doc, const Upnp_Discovery* d_event);
|  ^~
| Makefile:550: recipe for target 'libclient_la-configurationmanager.lo' failed
| make[5]: *** [libclient_la-configurationmanager.lo] Error 1

Full log at
https://people.debian.org/~sramacher/logs/upnp/ring_amd64-2017-12-12T20:48:40Z.log

Cheers
-- 
Sebastian Ramacher


signature.asc
Description: PGP signature