Skip to contentSkip to conversation

libupnp: add 1.8.3 version

PATCH New Fabrice Fontaine 3 participants 6 messages Nov 14, 2017 – Nov 15, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libupnp: add 1.8.3 version

Branch 1.8.x of libupnp is not compatible with branch 1.6.x so add an option to select the version. By default, libupnp-1.6.x is enabled.

Update gmrender-resurrect, igd2-for-linux, libupnpp, mediastreamer, mpd, ushare and vlc to make them depends on libupnp-1.6.x instead of selecting libupnp

vlc and igd2-for-linux should support libunp-1.8.x in their next version

gerbera package (based on MediaTomb) will soon be added and depends on libupnp-1.8.x

---
 package/gmrender-resurrect/Config.in   |  9 +++++----
 package/igd2-for-linux/Config.in       |  7 ++++---
 package/libupnp/Config.in              | 14 ++++++++++++++
 package/libupnp/libupnp.hash           |  2 ++
 package/libupnp/libupnp.mk             |  4 ++++
 package/libupnpp/Config.in             |  8 ++++----
 package/mediastreamer/mediastreamer.mk |  2 +-
 package/mpd/Config.in                  |  5 ++++-
 package/ushare/Config.in               |  7 +++----
 package/vlc/vlc.mk                     |  2 +-
 10 files changed, 42 insertions(+), 18 deletions(-)
package/gmrender-resurrect/Config.in +5 -4
index db655ad7f..cfc69a8e9 100644
@@ -1,16 +1,17 @@
 config BR2_PACKAGE_GMRENDER_RESURRECT
 	bool "gmrender-resurrect"
 	depends on BR2_USE_WCHAR # gstreamer1 -> libglib2
-	depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer1 -> libglib2, libupnp
+	depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer1 -> libglib2
 	depends on BR2_USE_MMU # gstreamer1
+	depends on BR2_PACKAGE_LIBUPNP_1_6
 	select BR2_PACKAGE_GSTREAMER1
 	select BR2_PACKAGE_GST1_PLUGINS_BASE # run-time only
-	select BR2_PACKAGE_LIBUPNP
 	help
 	  UPnP (DLNA) media renderer based on gstreamer
 
 	  https://github.com/hzeller/gmrender-resurrect
 
-comment "gmrender-resurrect needs a toolchain w/ wchar, threads"
+comment "gmrender-resurrect needs libupnp-1.6.x and a toolchain w/ wchar, threads"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_PACKAGE_LIBUPNP_1_6
package/igd2-for-linux/Config.in +4 -3
index 157cc6f30..9e5f7e9bd 100644
@@ -3,8 +3,8 @@ config BR2_PACKAGE_IGD2_FOR_LINUX
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_WCHAR
+	depends on BR2_PACKAGE_LIBUPNP_1_6
 	select BR2_PACKAGE_IPTABLES # runtime
-	select BR2_PACKAGE_LIBUPNP
 	help
 	  This is The Linux UPnP Internet Gateway Device 2. It is
 	  modified from the original Linux UPnP Internet Gateway Device
@@ -20,6 +20,7 @@ config BR2_PACKAGE_IGD2_FOR_LINUX
 
 	  https://github.com/ffontaine/igd2-for-linux
 
-comment "igd2-for-linux needs a toolchain w/ threads, wchar"
+comment "igd2-for-linux needs libupnp-1.6.x and a toolchain w/ threads, wchar"
 	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \
+		!BR2_PACKAGE_LIBUPNP_1_6
package/libupnp/Config.in +14 -0
index 7c6c37607..0a8e98c97 100644
@@ -10,5 +10,19 @@ config BR2_PACKAGE_LIBUPNP
 
 	  http://pupnp.sourceforge.net/
 
+choice
+	prompt "libupnp version"
+	default BR2_PACKAGE_LIBUPNP_1_6
+	help
+	  Select the version of libupnp API you wish to use.
+
+config BR2_PACKAGE_LIBUPNP_1_6
+	bool "libupnp 1.6.x"
+
+config BR2_PACKAGE_LIBUPNP_1_8
+	bool "libupnp 1.8.x"
+
+endchoice
+
 comment "libupnp needs a toolchain w/ threads"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS
package/libupnp/libupnp.hash +2 -0
index 10124618f..f73755d30 100644
@@ -1,2 +1,4 @@
 # Locally computed:
 sha256	0bdfacb7fa8d99b78343b550800ff193264f92c66ef67852f87f042fd1a1ebbc	libupnp-1.6.22.tar.bz2
+sha256	9afa0b09faa9ebd9e8a6425ddbfe8d1d856544c49b1f86fde221219e569a308d	libupnp-1.8.3.tar.bz2
+sha256	0375955c8a79d6e8fa0792d45d00fc4e7710d7ac95bcbd27f9225a83f5c946fd	LICENSE
package/libupnp/libupnp.mk +4 -0
index bf01b4d94..8ab58463d 100644
@@ -4,7 +4,11 @@
 #
 ################################################################################
 
+ifeq ($(BR2_PACKAGE_LIBUPNP_1_8),y)
+LIBUPNP_VERSION = 1.8.3
+else
 LIBUPNP_VERSION = 1.6.22
+endif
 LIBUPNP_SOURCE = libupnp-$(LIBUPNP_VERSION).tar.bz2
 LIBUPNP_SITE = http://downloads.sourceforge.net/project/pupnp/pupnp/libUPnP%20$(LIBUPNP_VERSION)
 LIBUPNP_CONF_ENV = ac_cv_lib_compat_ftime=no
package/libupnpp/Config.in +4 -4
index 32877ff56..62127b48e 100644
@@ -1,16 +1,16 @@
 config BR2_PACKAGE_LIBUPNPP
 	bool "libupnpp"
 	depends on BR2_INSTALL_LIBSTDCPP
-	depends on BR2_TOOLCHAIN_HAS_THREADS # libupnp
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	depends on BR2_PACKAGE_LIBUPNP_1_6
 	select BR2_PACKAGE_EXPAT
 	select BR2_PACKAGE_LIBCURL
-	select BR2_PACKAGE_LIBUPNP
 	help
 	  The libupnpp C++ library wraps libupnp for easier use by
 	  upmpdcli and upplay.
 
 	  http://www.lesbonscomptes.com/upmpdcli/
 
-comment "libupnpp needs a toolchain w/ C++, threads, gcc >= 4.9"
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+comment "libupnpp needs libupnp-1.6.x and a toolchain w/ C++, gcc >= 4.9"
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || !BR2_PACKAGE_LIBUPNP_1_6
package/mediastreamer/mediastreamer.mk +1 -1
index 1276cfae1..d10c55c73 100644
@@ -24,7 +24,7 @@ else
 MEDIASTREAMER_CONF_OPTS += --disable-alsa
 endif
 
-ifeq ($(BR2_PACKAGE_LIBUPNP),y)
+ifeq ($(BR2_PACKAGE_LIBUPNP_1_6),y)
 MEDIASTREAMER_CONF_OPTS += --enable-upnp
 MEDIASTREAMER_DEPENDENCIES += libupnp
 else
package/mpd/Config.in +4 -1
index 5991b6f4b..6deddbc09 100644
@@ -308,11 +308,14 @@ config BR2_PACKAGE_MPD_TCP
 
 config BR2_PACKAGE_MPD_UPNP
 	bool "UPnP"
+	depends on BR2_PACKAGE_LIBUPNP_1_6
 	select BR2_PACKAGE_EXPAT
-	select BR2_PACKAGE_LIBUPNP
 	help
 	  Enable MPD UPnP client support.
 
+comment "UPnP client support needs libupnp-1.6.x"
+	depends on !BR2_PACKAGE_LIBUPNP_1_6
+
 endif
 
 comment "mpd needs a toolchain w/ C++, threads, wchar, gcc >= 4.9"
package/ushare/Config.in +3 -4
index c3475b846..03dc92820 100644
@@ -1,11 +1,10 @@
 config BR2_PACKAGE_USHARE
 	bool "ushare"
-	depends on BR2_TOOLCHAIN_HAS_THREADS # libupnp
 	# ushare has a completely custom configure script that does
 	# broken things with library ordering, which breaks static
 	# linking.
 	depends on !BR2_STATIC_LIBS
-	select BR2_PACKAGE_LIBUPNP
+	depends on BR2_PACKAGE_LIBUPNP_1_6
 	help
 	  uShare is a UPnP (TM) A/V & DLNA Media Server.
 	  It implements the server component that provides UPnP media devices
@@ -13,5 +12,5 @@ config BR2_PACKAGE_USHARE
 
 	  http://ushare.geexbox.org/
 
-comment "ushare needs a toolchain w/ threads, dynamic library"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
+comment "ushare needs libupnp-1.6.x and a toolchain with dynamic library"
+	depends on BR2_STATIC_LIBS || !BR2_PACKAGE_LIBUPNP_1_6
package/vlc/vlc.mk +1 -1
index 4602f92c4..aeb05c411 100644
@@ -281,7 +281,7 @@ else
 VLC_CONF_OPTS += --disable-theora
 endif
 
-ifeq ($(BR2_PACKAGE_LIBUPNP),y)
+ifeq ($(BR2_PACKAGE_LIBUPNP_1_6),y)
 VLC_CONF_OPTS += --enable-upnp
 VLC_DEPENDENCIES += libupnp
 else
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 libupnp: add 1.8.3 version

Hello,

Quoted 11 lines · Fabrice Fontaine
package/libupnp/Config.in +3 -0
index 7c6c37607..0a8e98c97 100644
@@ -10,5 +10,19 @@ config BR2_PACKAGE_LIBUPNP
 
 	  http://pupnp.sourceforge.net/
 
+choice
+	prompt "libupnp version"
+	default BR2_PACKAGE_LIBUPNP_1_6

package/libupnp/Config.in config BR2_PACKAGE_LIBUPNP · line 25

Quoted 10 lines
package/libupnp/Config.in +10 -0
+	help
+	  Select the version of libupnp API you wish to use.
+
+config BR2_PACKAGE_LIBUPNP_1_6
+	bool "libupnp 1.6.x"
+
+config BR2_PACKAGE_LIBUPNP_1_8
+	bool "libupnp 1.8.x"
+
+endchoice

I believe we should perhaps instead add a separate libupnp18 package, all those "depends on" to decide which package should be visible depending on the version of libupnp that is currently selected are a bit annoying. But don't rewrite your patch right now: wait for other Buildroot developers to give their opinion on this matter.

Is it possible to install both libupnp 1.6 and libupnp 1.8 in the same system without any conflict ?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 libupnp: add 1.8.3 version

Dear Thomas,

2017-11-15 13:43 GMT+01:00 Thomas Petazzoni <thomas.petazzoni@free- electrons.com>:

Quoted 32 lines

Hello,

Quoted 11 lines · Fabrice Fontaine
package/libupnp/Config.in +3 -0
index 7c6c37607..0a8e98c97 100644
@@ -10,5 +10,19 @@ config BR2_PACKAGE_LIBUPNP
 
        http://pupnp.sourceforge.net/
 
+choice
+     prompt "libupnp version"
+     default BR2_PACKAGE_LIBUPNP_1_6

package/libupnp/Config.in config BR2_PACKAGE_LIBUPNP · line 25

Quoted 10 lines
package/libupnp/Config.in +10 -0
+     help
+       Select the version of libupnp API you wish to use.
+
+config BR2_PACKAGE_LIBUPNP_1_6
+     bool "libupnp 1.6.x"
+
+config BR2_PACKAGE_LIBUPNP_1_8
+     bool "libupnp 1.8.x"
+
+endchoice

I believe we should perhaps instead add a separate libupnp18 package, all those "depends on" to decide which package should be visible depending on the version of libupnp that is currently selected are a bit annoying. But don't rewrite your patch right now: wait for other Buildroot developers to give their opinion on this matter.

Quoted 3 lines

Is it possible to install both libupnp 1.6 and libupnp 1.8 in the same system without any conflict ?

Unfortunately no, it was possible in 1.8.0 and 1.8.1 but we had to rollback due to the vlc developer who wasn't happy with this change:
https://github.com/mrjimenez/pupnp/commit/07f504c61bd9e4d93eb3d373ffc852
7cafe0b9af

Quoted 9 lines

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Best Regards,

Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171115/11ca7dc7/attachment.html>

#3 lore raw

PATCH 1/1 libupnp: add 1.8.3 version

Hello,

Quoted 20 lines · Fabrice Fontaine
Quoted 20 lines

package/libupnp/Config.in config BR2_PACKAGE_LIBUPNP · line 25

Quoted 13 lines
package/libupnp/Config.in +13 -0
+choice
+     prompt "libupnp version"
+     default BR2_PACKAGE_LIBUPNP_1_6
+     help
+       Select the version of libupnp API you wish to use.
+
+config BR2_PACKAGE_LIBUPNP_1_6
+     bool "libupnp 1.6.x"
+
+config BR2_PACKAGE_LIBUPNP_1_8
+     bool "libupnp 1.8.x"
+
+endchoice  

I believe we should perhaps instead add a separate libupnp18 package, all those "depends on" to decide which package should be visible depending on the version of libupnp that is currently selected are a bit annoying. But don't rewrite your patch right now: wait for other Buildroot developers to give their opinion on this matter.

Quoted 7 lines
Quoted 3 lines

Is it possible to install both libupnp 1.6 and libupnp 1.8 in the same system without any conflict ?

Unfortunately no, it was possible in 1.8.0 and 1.8.1 but we had to rollback due to the vlc developer who wasn't happy with this change:
https://github.com/mrjimenez/pupnp/commit/07f504c61bd9e4d93eb3d373ffc852
7cafe0b9af

OK, the reasoning makes sense.

What is the transition plan ? Will the different Buildroot packages that use the 1.6 version be upgraded to use 1.8 at some point in the reasonably near future ? Or will we have to keep both versions forever ?

Peter, Arnout, what are your thoughts on how to handle this?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 libupnp: add 1.8.3 version

Quoted 32 lines · Thomas Petazzoni

Hello,

Quoted 20 lines · Fabrice Fontaine
Quoted 20 lines

package/libupnp/Config.in config BR2_PACKAGE_LIBUPNP · line 25

Quoted 13 lines
package/libupnp/Config.in +13 -0
+choice
+     prompt "libupnp version"
+     default BR2_PACKAGE_LIBUPNP_1_6
+     help
+       Select the version of libupnp API you wish to use.
+
+config BR2_PACKAGE_LIBUPNP_1_6
+     bool "libupnp 1.6.x"
+
+config BR2_PACKAGE_LIBUPNP_1_8
+     bool "libupnp 1.8.x"
+
+endchoice  

I believe we should perhaps instead add a separate libupnp18 package, all those "depends on" to decide which package should be visible depending on the version of libupnp that is currently selected are a bit annoying. But don't rewrite your patch right now: wait for other Buildroot developers to give their opinion on this matter.

Quoted 7 lines
Quoted 3 lines

Is it possible to install both libupnp 1.6 and libupnp 1.8 in the same system without any conflict ?

Unfortunately no, it was possible in 1.8.0 and 1.8.1 but we had to rollback due to the vlc developer who wasn't happy with this change:
https://github.com/mrjimenez/pupnp/commit/07f504c61bd9e4d93eb3d373ffc852
7cafe0b9af

Quoted 7 lines

OK, the reasoning makes sense.

What is the transition plan ? Will the different Buildroot packages that use the 1.6 version be upgraded to use 1.8 at some point in the reasonably near future ? Or will we have to keep both versions forever ?

Peter, Arnout, what are your thoughts on how to handle this?

For libraries that change API, we've almost always created a new package, and
sometimes they are not side-by-side installable. Python3 is a great example, but also e.g. opencv3.

So I agree it should be a new package libupnp18 that depends on
!BR2_PACKAGE_LIBUPNP and where that dependency has to be propagated to gerbera.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#5 lore raw

PATCH 1/1 libupnp: add 1.8.3 version

Dear all,

2017-11-15 22:32 GMT+01:00 Arnout Vandecappelle <[email protected]>:

Quoted 27 lines · Thomas Petazzoni
Quoted 24 lines

Hello,

Quoted 20 lines · Fabrice Fontaine
Quoted 20 lines

package/libupnp/Config.in config BR2_PACKAGE_LIBUPNP · line 25

Quoted 13 lines
package/libupnp/Config.in +13 -0
+choice
+     prompt "libupnp version"
+     default BR2_PACKAGE_LIBUPNP_1_6
+     help
+       Select the version of libupnp API you wish to use.
+
+config BR2_PACKAGE_LIBUPNP_1_6
+     bool "libupnp 1.6.x"
+
+config BR2_PACKAGE_LIBUPNP_1_8
+     bool "libupnp 1.8.x"
+
+endchoice

I believe we should perhaps instead add a separate libupnp18 package, all those "depends on" to decide which package should be visible depending on the version of libupnp that is currently selected are a bit annoying. But don't rewrite your patch right now: wait for other Buildroot developers to give their opinion on this matter.

Quoted 16 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

Is it possible to install both libupnp 1.6 and libupnp 1.8 in the same system without any conflict ?

Unfortunately no, it was possible in 1.8.0 and 1.8.1 but we had to

rollback

Quoted 2 lines
Quoted 2 lines

due to the vlc developer who wasn't happy with this change:
https://github.com/mrjimenez/pupnp/commit/

07f504c61bd9e4d93eb3d373ffc852

Quoted 7 lines
Quoted 1 line

7cafe0b9af

OK, the reasoning makes sense.

What is the transition plan ? Will the different Buildroot packages that use the 1.6 version be upgraded to use 1.8 at some point in the reasonably near future ? Or will we have to keep both versions forever ?

The transition plan is not very clear, 1.8.x is a major change to libupnp, parameters can't be retrieved/updated through pointers anymore, the applications have to use getter/setter functions. Moreover, internal APIs, such as threadutil is no more public anymore. So, this could be a massive rework for applications and some of them are not very active anymore.

Quoted 3 lines
Quoted 2 lines

Peter, Arnout, what are your thoughts on how to handle this?

Personally, I prefer your suggestion of creating a libupnp18 package if this is the standard way of handling this in buildroot.

Quoted 14 lines

For libraries that change API, we've almost always created a new package,
and
sometimes they are not side-by-side installable. Python3 is a great example, but
also e.g. opencv3.

So I agree it should be a new package libupnp18 that depends on
!BR2_PACKAGE_LIBUPNP and where that dependency has to be propagated to gerbera.

Regards,
Arnout

Quoted 8 lines

--

Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

Best Regards,

Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171115/1dc44a8f/attachment.html>