From e756ea6545c07ea8c1d58ba23d8d826934f45891fa5edad5c7b2b198f7c2306f Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 19 Oct 2020 12:38:41 +0000 Subject: [PATCH] Accepting request 842313 from GNOME:Next Resub, fixed .changes - Update to version 1.2.0: + Switch to GUPnP 1.2.0 API + Update GLib dependency to 2.38 + Replace deprecated GLib APIs + Fix crashes + Switch to meson build. - Add meson and gtk-doc BuildRequires and macros following upstreams port, and run tests during build. - Drop no longer needed libtool BuildRequires, and various autotools related macros and commands. - Drop patches fixed upstream: + gupnp-igd-free-GStaticMutex-in-AddRemoveData.patch + gupnp-igd-port-to-new-gupnp-api.patch OBS-URL: https://build.opensuse.org/request/show/842313 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gupnp-igd?expand=0&rev=50 --- gupnp-igd-0.2.5.tar.xz | 3 - gupnp-igd-1.2.0.tar.xz | 3 + ...d-free-GStaticMutex-in-AddRemoveData.patch | 44 --------- gupnp-igd-port-to-new-gupnp-api.patch | 99 ------------------- gupnp-igd.changes | 17 ++++ gupnp-igd.spec | 24 +++-- 6 files changed, 31 insertions(+), 159 deletions(-) delete mode 100644 gupnp-igd-0.2.5.tar.xz create mode 100644 gupnp-igd-1.2.0.tar.xz delete mode 100644 gupnp-igd-free-GStaticMutex-in-AddRemoveData.patch delete mode 100644 gupnp-igd-port-to-new-gupnp-api.patch diff --git a/gupnp-igd-0.2.5.tar.xz b/gupnp-igd-0.2.5.tar.xz deleted file mode 100644 index 385cae8..0000000 --- a/gupnp-igd-0.2.5.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8b4a1aa38bacbcac2c1755153147ead7ee9af7d4d1f544b6577cfc35e10e3b20 -size 287964 diff --git a/gupnp-igd-1.2.0.tar.xz b/gupnp-igd-1.2.0.tar.xz new file mode 100644 index 0000000..0751ec5 --- /dev/null +++ b/gupnp-igd-1.2.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b5120098aa13edd27818ba9ee4d7fe961bf540bf50d056ff703c61545e02be1 +size 26100 diff --git a/gupnp-igd-free-GStaticMutex-in-AddRemoveData.patch b/gupnp-igd-free-GStaticMutex-in-AddRemoveData.patch deleted file mode 100644 index 8967e9e..0000000 --- a/gupnp-igd-free-GStaticMutex-in-AddRemoveData.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 761854febad29224c194fabb76c24f2701099c2f Mon Sep 17 00:00:00 2001 -From: Matthew Waters -Date: Fri, 10 Nov 2017 23:17:29 +1100 -Subject: [PATCH] free GStaticMutex in AddRemoveData - -Fixes a memory leak reported by valgrind - - 128 bytes in 16 blocks are definitely lost in loss record 6,923 of 7,784 - at 0x4C2CE5F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) - by 0x7AEAEB8: g_malloc (gmem.c:94) - by 0x7B02A25: g_slice_alloc (gslice.c:1025) - by 0x7AB6D9A: g_mutex_new (gthread-deprecated.c:1461) - by 0x7AB70B4: g_static_mutex_get_mutex_impl (gthread-deprecated.c:524) - by 0xBE6E74F: ??? (in /usr/lib/libgupnp-igd-1.0.so.4.2.0) - by 0x7AE5784: g_main_dispatch (gmain.c:3182) - by 0x7AE5784: g_main_context_dispatch (gmain.c:3847) - by 0x7AE5B4F: g_main_context_iterate.isra.30 (gmain.c:3920) - by 0x7AE5E61: g_main_loop_run (gmain.c:4116) - by 0xBE6ED7D: ??? (in /usr/lib/libgupnp-igd-1.0.so.4.2.0) - by 0x7B0D2A4: g_thread_proxy (gthread.c:784) - by 0x8028089: start_thread (in /usr/lib/libpthread-2.26.so) - by 0x833524E: clone (in /usr/lib/libc-2.26.so) - -https://bugzilla.gnome.org/show_bug.cgi?id=790165 ---- - libgupnp-igd/gupnp-simple-igd-thread.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libgupnp-igd/gupnp-simple-igd-thread.c b/libgupnp-igd/gupnp-simple-igd-thread.c -index 8212f76..f38e9b7 100644 ---- a/libgupnp-igd/gupnp-simple-igd-thread.c -+++ b/libgupnp-igd/gupnp-simple-igd-thread.c -@@ -450,6 +450,8 @@ free_add_remove_port_data (gpointer user_data) - g_free (data->local_ip); - g_free (data->description); - -+ g_static_mutex_free (&data->mutex); -+ - g_slice_free (struct AddRemovePortData, data); - } - --- -2.18.1 - diff --git a/gupnp-igd-port-to-new-gupnp-api.patch b/gupnp-igd-port-to-new-gupnp-api.patch deleted file mode 100644 index 502445e..0000000 --- a/gupnp-igd-port-to-new-gupnp-api.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 63531558a16ac2334a59f627b2fca5576dcfbb2e Mon Sep 17 00:00:00 2001 -From: Jens Georg -Date: Sat, 1 Dec 2018 21:33:21 +0100 -Subject: [PATCH] Swtich to new GUPnP API - ---- - configure.ac | 2 +- - gupnp-igd-1.0-uninstalled.pc.in | 2 +- - gupnp-igd-1.0.pc.in | 2 +- - libgupnp-igd/Makefile.am | 2 +- - tests/gtest/gupnp-simple-igd.c | 6 ++++-- - 5 files changed, 8 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f03921f..aa7f0ca 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -11,7 +11,7 @@ AC_STDC_HEADERS - AC_PROG_LIBTOOL - AC_FUNC_MMAP - --PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.26 gobject-2.0 >= 2.26 gssdp-1.0 gupnp-1.0 >= 0.18 gthread-2.0) -+PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.26 gobject-2.0 >= 2.26 gssdp-1.2 gupnp-1.2 >= 0.18 gthread-2.0) - - # glib-genmarshal - GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0` -diff --git a/gupnp-igd-1.0-uninstalled.pc.in b/gupnp-igd-1.0-uninstalled.pc.in -index 483956f..6db3bee 100644 ---- a/gupnp-igd-1.0-uninstalled.pc.in -+++ b/gupnp-igd-1.0-uninstalled.pc.in -@@ -5,7 +5,7 @@ includedir=${pcfiledir}/ - - Name: gupnp-igd-1.0 - Description: GUPnP Simple IGD library --Requires: gupnp-1.0 -+Requires: gupnp-1.2 - Version: @VERSION@ - Libs: ${libdir}/libgupnp-av-1.0.la - Cflags: -I${includedir} -diff --git a/gupnp-igd-1.0.pc.in b/gupnp-igd-1.0.pc.in -index 6660d63..aa74ed3 100644 ---- a/gupnp-igd-1.0.pc.in -+++ b/gupnp-igd-1.0.pc.in -@@ -5,7 +5,7 @@ includedir=@includedir@ - - Name: gupnp-igd-1.0 - Description: GUPnP Simple IGD library --Requires: gupnp-1.0 -+Requires: gupnp-1.2 - Version: @VERSION@ - Libs: -L${libdir} -lgupnp-igd-1.0 - Cflags: -I${includedir}/gupnp-igd-1.0 -diff --git a/libgupnp-igd/Makefile.am b/libgupnp-igd/Makefile.am -index fe020b5..e10d857 100644 ---- a/libgupnp-igd/Makefile.am -+++ b/libgupnp-igd/Makefile.am -@@ -60,7 +60,7 @@ GUPnPIgd_1_0_gir_VERSION = 1.0 - GUPnPIgd_1_0_gir_LIBS = $(lib_LTLIBRARIES) - GUPnPIgd_1_0_gir_FILES = $(libgupnp_igd_1_0_la_SOURCES) $(libgupnp_igd_inc_HEADERS) - GUPnPIgd_1_0_gir_INCLUDES=GObject-2.0 --GUPnPIgd_1_0_gir_PACKAGES=gupnp-1.0 -+GUPnPIgd_1_0_gir_PACKAGES=gupnp-1.2 - GUPnPIgd_1_0_gir_CFLAGS=-I$(srcdir) -I$(top_srcdir) - - if HAVE_INTROSPECTION -diff --git a/tests/gtest/gupnp-simple-igd.c b/tests/gtest/gupnp-simple-igd.c -index 9b32b2a..d051d13 100644 ---- a/tests/gtest/gupnp-simple-igd.c -+++ b/tests/gtest/gupnp-simple-igd.c -@@ -273,13 +273,14 @@ run_gupnp_simple_igd_test (GMainContext *mainctx, GUPnPSimpleIgd *igd, - GUPnPDeviceInfo *subdev1; - GUPnPDeviceInfo *subdev2; - const gchar *xml_path = "."; -+ GError *error = 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 (NULL, "lo", 0, NULL); -+ context = gupnp_context_new ("lo", 0, NULL); - g_assert (context); - - if (g_getenv ("XML_PATH")) -@@ -293,8 +294,9 @@ run_gupnp_simple_igd_test (GMainContext *mainctx, GUPnPSimpleIgd *igd, - gupnp_context_host_path (context, "WANPPPConnection.xml", "/WANPPPConnection.xml"); - */ - -- dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml", xml_path); -+ dev = gupnp_root_device_new (context, "InternetGatewayDevice.xml", xml_path, &error); - g_assert (dev); -+ g_assert (error == NULL); - - subdev1 = gupnp_device_info_get_device (GUPNP_DEVICE_INFO (dev), - "urn:schemas-upnp-org:device:WANDevice:1"); --- -2.18.1 - diff --git a/gupnp-igd.changes b/gupnp-igd.changes index 149c1f7..e3d1af7 100644 --- a/gupnp-igd.changes +++ b/gupnp-igd.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Fri Oct 16 18:41:16 UTC 2020 - Bjørn Lie + +- Update to version 1.2.0: + + Switch to GUPnP 1.2.0 API + + Update GLib dependency to 2.38 + + Replace deprecated GLib APIs + + Fix crashes + + Switch to meson build. +- Add meson and gtk-doc BuildRequires and macros following + upstreams port, and run tests during build. +- Drop no longer needed libtool BuildRequires, and various + autotools related macros and commands. +- Drop patches fixed upstream: + + gupnp-igd-free-GStaticMutex-in-AddRemoveData.patch + + gupnp-igd-port-to-new-gupnp-api.patch + ------------------------------------------------------------------- Sun Jan 6 00:34:44 UTC 2019 - bjorn.lie@gmail.com diff --git a/gupnp-igd.spec b/gupnp-igd.spec index abce369..655afc7 100644 --- a/gupnp-igd.spec +++ b/gupnp-igd.spec @@ -17,20 +17,17 @@ Name: gupnp-igd -Version: 0.2.5 +Version: 1.2.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/0.2/%{name}-%{version}.tar.xz +Source: http://download.gnome.org/sources/gupnp-igd/1.2/%{name}-%{version}.tar.xz Source1: baselibs.conf -# PATCH-FIX-UPSTREAM gupnp-igd-free-GStaticMutex-in-AddRemoveData.patch -- Free GStaticMutex in AddRemoveData -Patch0: gupnp-igd-free-GStaticMutex-in-AddRemoveData.patch -# PATCH-FIX-UPSTREAM gupnp-igd-port-to-new-gupnp-api.patch -- Port to new GUPnP API -Patch1: gupnp-igd-port-to-new-gupnp-api.patch -BuildRequires: libtool +BuildRequires: gtk-doc +BuildRequires: meson BuildRequires: pkgconfig BuildRequires: pkgconfig(glib-2.0) >= 2.26 BuildRequires: pkgconfig(gobject-2.0) >= 2.26 @@ -78,15 +75,16 @@ to have a very simple API. %autosetup -p1 %build -autoreconf -fiv -%configure \ - --disable-static \ +%meson \ + -Dgtk_doc=true \ %{nil} -%make_build +%meson_build %install -%make_install -find %{buildroot} -type f -name "*.la" -delete -print +%meson_install + +%check +%meson_test %post -n libgupnp-igd-1_0-4 -p /sbin/ldconfig %postun -n libgupnp-igd-1_0-4 -p /sbin/ldconfig