diff --git a/2c413bbd8b9afc41648f21ad173f0caf81a5f98b.patch b/2c413bbd8b9afc41648f21ad173f0caf81a5f98b.patch deleted file mode 100644 index 9c02e61..0000000 --- a/2c413bbd8b9afc41648f21ad173f0caf81a5f98b.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 2c413bbd8b9afc41648f21ad173f0caf81a5f98b Mon Sep 17 00:00:00 2001 -From: Jens Georg -Date: Thu, 13 Jan 2022 07:40:09 +0100 -Subject: [PATCH] Test: Interact with service in its context - -Otherwise it there is a data race in notification handling since GUPnP -instances are not safe to be used from multiple threads at the same time. ---- - tests/gtest/gupnp-simple-igd.c | 37 +++++++++++++++++++++++++--------- - 1 file changed, 28 insertions(+), 9 deletions(-) - -diff --git a/tests/gtest/gupnp-simple-igd.c b/tests/gtest/gupnp-simple-igd.c -index 6e62fea..4e689ef 100644 ---- a/tests/gtest/gupnp-simple-igd.c -+++ b/tests/gtest/gupnp-simple-igd.c -@@ -182,12 +182,28 @@ delete_port_mapping_cb (GUPnPService *service, - g_source_attach (src, g_main_context_get_thread_default ()); - } - -+typedef struct _MappedData { -+ GMainContext *context; -+ const char *ip_address; -+ guint port; -+} MappedData; -+ -+gboolean service_notify (gpointer user_data) { -+ MappedData *d = (MappedData *) user_data; -+ gupnp_service_notify (GUPNP_SERVICE (ipservice), -+ "ExternalIPAddress", G_TYPE_STRING, d->ip_address, NULL); -+ -+ return G_SOURCE_REMOVE; -+} -+ - static void - mapped_external_port_cb (GUPnPSimpleIgd *igd, gchar *proto, - gchar *external_ip, gchar *replaces_external_ip, guint external_port, - gchar *local_ip, guint local_port, gchar *description, gpointer user_data) - { -- guint requested_external_port = GPOINTER_TO_UINT (user_data); -+ -+ MappedData *d = (MappedData *) user_data; -+ guint requested_external_port = d->port; - - g_assert (invalid_ip == NULL); - -@@ -218,13 +234,13 @@ mapped_external_port_cb (GUPnPSimpleIgd *igd, gchar *proto, - } - else - { -- if (!strcmp (external_ip, IP_ADDRESS_FIRST)) -- gupnp_service_notify (GUPNP_SERVICE (ipservice), -- "ExternalIPAddress", G_TYPE_STRING, IP_ADDRESS_SECOND, NULL); -- else if (!strcmp (external_ip, PPP_ADDRESS_FIRST)) -- gupnp_service_notify (GUPNP_SERVICE (pppservice), -- "ExternalIPAddress", G_TYPE_STRING, PPP_ADDRESS_SECOND, NULL); -- else -+ if (!strcmp (external_ip, IP_ADDRESS_FIRST)) { -+ d->ip_address = IP_ADDRESS_SECOND; -+ g_main_context_invoke(d->context, service_notify, d); -+ } else if (!strcmp (external_ip, PPP_ADDRESS_FIRST)) { -+ d->ip_address = PPP_ADDRESS_SECOND; -+ g_main_context_invoke(d->context, service_notify, d); -+ } else - g_assert_not_reached (); - } - } -@@ -333,9 +349,12 @@ run_gupnp_simple_igd_test (GMainContext *mainctx, GUPnPSimpleIgd *igd, - - gupnp_root_device_set_available (dev, TRUE); - -+ MappedData d; -+ d.context = mainctx; -+ d.port = requested_port; - - g_signal_connect (igd, "mapped-external-port", -- G_CALLBACK (mapped_external_port_cb), GUINT_TO_POINTER (requested_port)); -+ G_CALLBACK (mapped_external_port_cb), &d); - g_signal_connect (igd, "error-mapping-port", - G_CALLBACK (error_mapping_port_cb), NULL); - --- -GitLab - diff --git a/79a1e4cf8c256132978a1d8ab718c8ad132386de.patch b/79a1e4cf8c256132978a1d8ab718c8ad132386de.patch deleted file mode 100644 index a623ea9..0000000 --- a/79a1e4cf8c256132978a1d8ab718c8ad132386de.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 79a1e4cf8c256132978a1d8ab718c8ad132386de Mon Sep 17 00:00:00 2001 -From: Jens Georg -Date: Tue, 3 May 2022 22:39:16 +0200 -Subject: [PATCH] Port to GUPnP 1.6 API - -And thus to libsoup3. The code changes are even compatible with GUPnP -1.4.3 so the gupnp version could be a configure option ---- - NEWS | 2 +- - README | 4 ++-- - libgupnp-igd/meson.build | 2 +- - meson.build | 6 +++--- - subprojects/.gitignore | 4 ++-- - subprojects/{gupnp-1.2.wrap => gupnp-1.6.wrap} | 2 +- - tests/gtest/gupnp-simple-igd.c | 6 +++--- - 7 files changed, 13 insertions(+), 13 deletions(-) - rename subprojects/{gupnp-1.2.wrap => gupnp-1.6.wrap} (76%) - -diff --git a/NEWS b/NEWS -index 5979f6d..eabb318 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,5 +1,5 @@ - ******************* --* GUPnP IGD 1.20 * -+* GUPnP IGD 1.2.0 * - ******************* - - - Switch to GUPnP 1.2.0 API -diff --git a/README b/README -index 4b74b6f..09884d2 100644 ---- a/README -+++ b/README -@@ -1,9 +1,9 @@ - This is a library to handle UPnP IGD port mapping. - --It was written by Olivier Crête . -+It was written by Olivier Crête . - - It is supposed to have a very simple API. Read the gtk-doc. - - The only dependencies are: -- - GUPnP 1.2 -+ - GUPnP 1.6 - - GLib 2.38 -diff --git a/libgupnp-igd/meson.build b/libgupnp-igd/meson.build -index c37ef3d..6dcd394 100644 ---- a/libgupnp-igd/meson.build -+++ b/libgupnp-igd/meson.build -@@ -38,7 +38,7 @@ pkg.generate( - subdirs : 'gupnp-igd-1.0', - filebase : 'gupnp-igd-1.0', - description: 'GUPnP Simple IGD library', -- requires_private : 'gupnp-1.2' -+ requires_private : 'gupnp-1.6' - ) - - -diff --git a/meson.build b/meson.build -index df2fb24..8377d01 100644 ---- a/meson.build -+++ b/meson.build -@@ -1,4 +1,4 @@ --project('gupnp-igd', 'c', version: '1.2.0') -+project('gupnp-igd', 'c', version: '1.5.0') - - gnome = import('gnome') - pkg = import('pkgconfig') -@@ -7,8 +7,8 @@ glib_req = '>= 2.38' - dependencies = [ - dependency('glib-2.0', version: glib_req, required: true), - dependency('gobject-2.0', version: glib_req, required: true), -- dependency('gupnp-1.2', version : '>= 1.2.0'), -- dependency('gssdp-1.2', version : '>= 1.2.0'), -+ dependency('gupnp-1.6', version : '>= 1.5.0'), -+ dependency('gssdp-1.6', version : '>= 1.5.0'), - dependency('gthread-2.0', required: true) - ] - -diff --git a/tests/gtest/gupnp-simple-igd.c b/tests/gtest/gupnp-simple-igd.c -index 593c46e..ec770ca 100644 ---- a/tests/gtest/gupnp-simple-igd.c -+++ b/tests/gtest/gupnp-simple-igd.c -@@ -88,7 +88,7 @@ get_external_ip_address_cb (GUPnPService *service, - else - g_assert_not_reached (); - -- gupnp_service_action_return (action); -+ gupnp_service_action_return_success (action); - - } - -@@ -139,7 +139,7 @@ add_port_mapping_cb (GUPnPService *service, - if (return_conflict && external_port == INTERNAL_PORT) - gupnp_service_action_return_error (action, 718, "ConflictInMappingEntry"); - else -- gupnp_service_action_return (action); -+ gupnp_service_action_return_success (action); - } - - static gboolean -@@ -172,7 +172,7 @@ delete_port_mapping_cb (GUPnPService *service, - g_assert (external_port != INTERNAL_PORT); - g_assert (proto && !strcmp (proto, "UDP")); - -- gupnp_service_action_return (action); -+ gupnp_service_action_return_success (action); - - g_free (remote_host); - g_free (proto); --- -GitLab - diff --git a/baselibs.conf b/baselibs.conf index a99a1bd..42d840e 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1,2 @@ -libgupnp-igd-1_0-4 \ No newline at end of file +libgupnp-igd-1_6-0 + diff --git a/bbe36b279e247cd8ec4ab00bcdf02178af8a99af.patch b/bbe36b279e247cd8ec4ab00bcdf02178af8a99af.patch deleted file mode 100644 index 608e644..0000000 --- a/bbe36b279e247cd8ec4ab00bcdf02178af8a99af.patch +++ /dev/null @@ -1,32 +0,0 @@ -From bbe36b279e247cd8ec4ab00bcdf02178af8a99af Mon Sep 17 00:00:00 2001 -From: Jens Georg -Date: Thu, 13 Jan 2022 07:42:31 +0100 -Subject: [PATCH] Remove obsolete host_path in test - -gupnp_root_device_new will do this automatically, actually does for -quite some time now (pre 1.0) ---- - tests/gtest/gupnp-simple-igd.c | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/tests/gtest/gupnp-simple-igd.c b/tests/gtest/gupnp-simple-igd.c -index 4e689ef..593c46e 100644 ---- a/tests/gtest/gupnp-simple-igd.c -+++ b/tests/gtest/gupnp-simple-igd.c -@@ -302,13 +302,6 @@ run_gupnp_simple_igd_test (GMainContext *mainctx, GUPnPSimpleIgd *igd, - if (g_getenv ("XML_PATH")) - xml_path = g_getenv ("XML_PATH"); - -- gupnp_context_host_path (context, xml_path, ""); -- -- /* -- gupnp_context_host_path (context, "InternetGatewayDevice.xml", "/InternetGatewayDevice.xml"); -- gupnp_context_host_path (context, "WANIPConnection.xml", "/WANIPConnection.xml"); -- gupnp_context_host_path (context, "WANPPPConnection.xml", "/WANPPPConnection.xml"); -- */ - - dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml", xml_path, &error); - g_assert (dev); --- -GitLab - diff --git a/fa1546614190942ab266832e7470a6debf8c32cb.patch b/fa1546614190942ab266832e7470a6debf8c32cb.patch deleted file mode 100644 index cd475d5..0000000 --- a/fa1546614190942ab266832e7470a6debf8c32cb.patch +++ /dev/null @@ -1,34 +0,0 @@ -From fa1546614190942ab266832e7470a6debf8c32cb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= -Date: Sun, 6 Nov 2022 16:12:29 -0500 -Subject: [PATCH] test: Port to g_inet_address_new_loopback - ---- - tests/gtest/gupnp-simple-igd.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/tests/gtest/gupnp-simple-igd.c b/tests/gtest/gupnp-simple-igd.c -index ec770ca..1f30b27 100644 ---- a/tests/gtest/gupnp-simple-igd.c -+++ b/tests/gtest/gupnp-simple-igd.c -@@ -290,13 +290,16 @@ run_gupnp_simple_igd_test (GMainContext *mainctx, GUPnPSimpleIgd *igd, - GUPnPDeviceInfo *subdev2; - const gchar *xml_path = "."; - GError *error = NULL; -+ GInetAddress *loopback = NULL; - - g_signal_connect (igd, "context-available", - G_CALLBACK (ignore_non_localhost), NULL); - - if (mainctx) - g_main_context_push_thread_default (mainctx); -- context = gupnp_context_new ("lo", 0, NULL); -+ loopback = g_inet_address_new_loopback (G_SOCKET_FAMILY_IPV4); -+ context = gupnp_context_new_for_address (loopback, 0, GSSDP_UDA_VERSION_1_0, NULL); -+ g_object_unref (loopback); - g_assert (context); - - if (g_getenv ("XML_PATH")) --- -GitLab - diff --git a/gupnp-igd-1.2.0.tar.xz b/gupnp-igd-1.2.0.tar.xz deleted file mode 100644 index 0751ec5..0000000 --- a/gupnp-igd-1.2.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4b5120098aa13edd27818ba9ee4d7fe961bf540bf50d056ff703c61545e02be1 -size 26100 diff --git a/gupnp-igd-1.6.0.tar.xz b/gupnp-igd-1.6.0.tar.xz new file mode 100644 index 0000000..ff949ce --- /dev/null +++ b/gupnp-igd-1.6.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4099978339ab22126d4968f2a332b6d094fc44c78797860781f1fc2f11771b74 +size 29220 diff --git a/gupnp-igd.changes b/gupnp-igd.changes index c15bf6e..f368c4d 100644 --- a/gupnp-igd.changes +++ b/gupnp-igd.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Thu Apr 13 09:29:30 UTC 2023 - Bjørn Lie + +- Update to version 1.6.0: + + Switch to GUPnP 1.6.0 API + + Update GLib dependency to 2.70 + + Add Javascript example +- Drop patches fixed upstream: + + 2c413bbd8b9afc41648f21ad173f0caf81a5f98b.patch + + bbe36b279e247cd8ec4ab00bcdf02178af8a99af.patch + + 79a1e4cf8c256132978a1d8ab718c8ad132386de.patch + + fa1546614190942ab266832e7470a6debf8c32cb.patch +- Rename libgupnp-igd-1_0-4 and typelib-1_0-GUPnPIgd-1_0 to + libgupnp-igd-1_6-0 and typelib-1_0-GUPnPIgd-1_6 following + upstream changes. Also update baselibs.conf. + ------------------------------------------------------------------- Fri Mar 24 10:19:09 UTC 2023 - Bjørn Lie diff --git a/gupnp-igd.spec b/gupnp-igd.spec index 865ec48..9780489 100644 --- a/gupnp-igd.spec +++ b/gupnp-igd.spec @@ -17,22 +17,14 @@ Name: gupnp-igd -Version: 1.2.0 +Version: 1.6.0 Release: 0 Summary: Library to handle UPnP IGD port mapping License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ URL: https://wiki.gnome.org/Projects/GUPnP -Source: http://download.gnome.org/sources/gupnp-igd/1.2/%{name}-%{version}.tar.xz +Source: https://download.gnome.org/sources/gupnp-igd/1.6/%{name}-%{version}.tar.xz Source1: baselibs.conf -# PATCH-FIX-UPSTREAM 79a1e4cf8c256132978a1d8ab718c8ad132386de.patch -- Port to GUPnP 1.6 API -Patch0: 79a1e4cf8c256132978a1d8ab718c8ad132386de.patch -# PATCH-FIX-UPSTREAM fa1546614190942ab266832e7470a6debf8c32cb.patch -- test: Port to g_inet_address_new_loopback -Patch1: fa1546614190942ab266832e7470a6debf8c32cb.patch -# PATCH-FIX-UPSTREAM 2c413bbd8b9afc41648f21ad173f0caf81a5f98b.patch -- Test: Interact with service in its context -Patch2: 2c413bbd8b9afc41648f21ad173f0caf81a5f98b.patch -# PATCH-FIX-UPSTREAM bbe36b279e247cd8ec4ab00bcdf02178af8a99af.patch -- Remove obsolete host_path in test -Patch3: bbe36b279e247cd8ec4ab00bcdf02178af8a99af.patch BuildRequires: gtk-doc BuildRequires: meson @@ -49,21 +41,21 @@ BuildRequires: pkgconfig(gupnp-1.6) GUPnP-IGD is a library to handle UPnP IGD port mapping. It is supposed to have a very simple API. -%package -n libgupnp-igd-1_0-4 +%package -n libgupnp-igd-1_6-0 Summary: Library to handle UPnP IGD port mapping # Obsoletes may be removed when Leap 42.3 is out of support. Group: Development/Libraries/C and C++ Obsoletes: python-gupnp-igd -%description -n libgupnp-igd-1_0-4 +%description -n libgupnp-igd-1_6-0 GUPnP-IGD is a library to handle UPnP IGD port mapping. It is supposed to have a very simple API. -%package -n typelib-1_0-GUPnPIgd-1_0 +%package -n typelib-1_0-GUPnPIgd-1_6 Summary: Library to handle UPnP IGD port mapping -- Introspection bindings Group: Development/Libraries/C and C++ -%description -n typelib-1_0-GUPnPIgd-1_0 +%description -n typelib-1_0-GUPnPIgd-1_6 GUPnP-IGD is a library to handle UPnP IGD port mapping. It is supposed to have a very simple API. @@ -72,8 +64,8 @@ This package provides the GObject Introspection bindings for GUPnP-IGD. %package -n libgupnp-igd-devel Summary: Library to handle UPnP IGD port mapping - Development Files Group: Development/Libraries/C and C++ -Requires: libgupnp-igd-1_0-4 = %{version} -Requires: typelib-1_0-GUPnPIgd-1_0 = %{version} +Requires: libgupnp-igd-1_6-0 = %{version} +Requires: typelib-1_0-GUPnPIgd-1_6 = %{version} %description -n libgupnp-igd-devel GUPnP-IGD is a library to handle UPnP IGD port mapping. It is supposed @@ -94,21 +86,21 @@ to have a very simple API. %check %meson_test -%ldconfig_scriptlets -n libgupnp-igd-1_0-4 +%ldconfig_scriptlets -n libgupnp-igd-1_6-0 -%files -n libgupnp-igd-1_0-4 +%files -n libgupnp-igd-1_6-0 %license COPYING %doc AUTHORS NEWS README %{_libdir}/*.so.* -%files -n typelib-1_0-GUPnPIgd-1_0 -%{_libdir}/girepository-1.0/GUPnPIgd-1.0.typelib +%files -n typelib-1_0-GUPnPIgd-1_6 +%{_libdir}/girepository-1.0/GUPnPIgd-1.6.typelib %files -n libgupnp-igd-devel -%{_includedir}/%{name}-1.0 +%{_includedir}/%{name}-1.6 %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc -%{_datadir}/gir-1.0/GUPnPIgd-1.0.gir +%{_datadir}/gir-1.0/GUPnPIgd-1.6.gir %dir %{_datadir}/gtk-doc %dir %{_datadir}/gtk-doc/html %{_datadir}/gtk-doc/html/%{name}