commit 39008417591412870d46dd58103c0ed58d2f447e Author: CentOS Sources Date: Tue May 7 07:00:57 2019 -0400 import dleyna-renderer-0.6.0-2.el8 diff --git a/.dleyna-renderer.metadata b/.dleyna-renderer.metadata new file mode 100644 index 0000000..8f62182 --- /dev/null +++ b/.dleyna-renderer.metadata @@ -0,0 +1 @@ +2c590af078c9f500a7639d2af2274507b1e4213e SOURCES/dleyna-renderer-0.6.0.tar_2.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dee868b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/dleyna-renderer-0.6.0.tar_2.gz diff --git a/SOURCES/0001-UPnP-Disconnect-signal-handlers-during-destruction.patch b/SOURCES/0001-UPnP-Disconnect-signal-handlers-during-destruction.patch new file mode 100644 index 0000000..f830435 --- /dev/null +++ b/SOURCES/0001-UPnP-Disconnect-signal-handlers-during-destruction.patch @@ -0,0 +1,77 @@ +From 916daa1bf04bfb1d8823c3f677a021bf41df1db0 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Tue, 20 Jan 2015 13:59:33 +0100 +Subject: [PATCH] Disconnect signal handlers during destruction + +A GUPnPContextManager can outlive a dlr_upnp_t because it might be +using asynchronous operations during its construction (eg., +GUPnPNetworkManager) which retain references to it. This can be +demonstrated if the service is spawned as a result of the following +command: +$ gdbus call \ + --session \ + --dest com.intel.dleyna-renderer \ + --object-path /com/intel/dLeynaRenderer \ + --method com.intel.dLeynaRenderer.Manager.Release + +This leads to the signal handlers being invoked with an invalid +dlr_upnp_t and the outcome is a crash. + +To avoid this, we should disconnect the callbacks listening to the +context manager and the control points belonging to it. +--- + libdleyna/renderer/upnp.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/libdleyna/renderer/upnp.c b/libdleyna/renderer/upnp.c +index 17cbda720bc1..707dc09aaf5a 100644 +--- a/libdleyna/renderer/upnp.c ++++ b/libdleyna/renderer/upnp.c +@@ -45,6 +45,7 @@ struct dlr_upnp_t_ { + void *user_data; + GHashTable *server_udn_map; + GHashTable *server_uc_map; ++ GList *cps; + dlr_host_service_t *host_service; + }; + +@@ -352,6 +353,7 @@ static void prv_on_context_available(GUPnPContextManager *context_manager, + + gssdp_resource_browser_set_active(GSSDP_RESOURCE_BROWSER(cp), TRUE); + gupnp_context_manager_manage_control_point(upnp->context_manager, cp); ++ upnp->cps = g_list_prepend (upnp->cps, g_object_ref (cp)); + g_object_unref(cp); + } + +@@ -390,10 +392,28 @@ dlr_upnp_t *dlr_upnp_new(dleyna_connector_id_t connection, + void dlr_upnp_delete(dlr_upnp_t *upnp) + { + if (upnp) { ++ GList *l; ++ ++ for (l = upnp->cps; l != NULL; l = l->next) { ++ GUPnPControlPoint *cp = GUPNP_CONTROL_POINT (l->data); ++ ++ g_signal_handlers_disconnect_by_func (cp, ++ prv_server_available_cb, ++ upnp); ++ g_signal_handlers_disconnect_by_func (cp, ++ prv_server_unavailable_cb, ++ upnp); ++ } ++ ++ g_signal_handlers_disconnect_by_func (upnp->context_manager, ++ prv_on_context_available, ++ upnp); ++ + dlr_host_service_delete(upnp->host_service); + g_object_unref(upnp->context_manager); + g_hash_table_unref(upnp->server_udn_map); + g_hash_table_unref(upnp->server_uc_map); ++ g_list_free_full (upnp->cps, g_object_unref); + + g_free(upnp); + } +-- +2.9.5 + diff --git a/SPECS/dleyna-renderer.spec b/SPECS/dleyna-renderer.spec new file mode 100644 index 0000000..18ba00d --- /dev/null +++ b/SPECS/dleyna-renderer.spec @@ -0,0 +1,148 @@ +%global api 1.0 + +Name: dleyna-renderer +Version: 0.6.0 +Release: 2%{?dist} +Summary: Service for interacting with Digital Media Renderers + +License: LGPLv2 +URL: https://01.org/dleyna/ +Source0: https://01.org/sites/default/files/downloads/dleyna/%{name}-%{version}.tar_2.gz + +# https://bugzilla.gnome.org/show_bug.cgi?id=741257 +Patch0: 0001-UPnP-Disconnect-signal-handlers-during-destruction.patch + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: pkgconfig +BuildRequires: pkgconfig(dleyna-core-1.0) +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gssdp-1.0) +BuildRequires: pkgconfig(gupnp-1.0) +BuildRequires: pkgconfig(gupnp-av-1.0) +BuildRequires: pkgconfig(gupnp-dlna-2.0) +BuildRequires: pkgconfig(libsoup-2.4) +Requires: dbus +Requires: dleyna-connector-dbus%{?_isa} + +%description +D-Bus service for clients to discover and manipulate DLNA Digital Media +Renderers (DMRs). + + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%prep +%setup -q +%patch0 -p1 + + +%build +autoreconf -f -i +%configure \ + --disable-silent-rules \ + --disable-static + +# Omit unused direct shared library dependencies. +sed --in-place --expression 's! -shared ! -Wl,--as-needed\0!g' libtool + +make %{?_smp_mflags} + + +%install +%make_install +find $RPM_BUILD_ROOT -name '*.la' -delete + +# We don't need to install the headers because only the daemon is supposed to be +# using the library. +rm -rf $RPM_BUILD_ROOT/%{_includedir} +rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/libdleyna-renderer-%{api}.so + + +%files +%license COPYING +%doc AUTHORS +%doc ChangeLog +%doc README +%{_datadir}/dbus-1/services/com.intel.%{name}.service + +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/libdleyna-renderer-%{api}.so.* + +%{_libexecdir}/%{name}-service +%config(noreplace) %{_sysconfdir}/%{name}-service.conf + +%files devel +%{_libdir}/pkgconfig/dleyna-renderer-service-%{api}.pc + + +%changelog +* Wed Feb 07 2018 Fedora Release Engineering - 0.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Oct 06 2017 Debarshi Ray - 0.6.0-1 +- Update to 0.6.0 + +* Fri Oct 06 2017 Debarshi Ray - 0.5.0-9 +- Use arch-specific Requires on dleyna-connector-dbus + +* Wed Aug 02 2017 Fedora Release Engineering - 0.5.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.5.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 0.5.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Sep 15 2016 Debarshi Ray - 0.5.0-5 +- Avoid any attempts to delete the same dlr_upnp_t twice (RH #1251366) + +* Wed Feb 03 2016 Fedora Release Engineering - 0.5.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jan 21 2016 Kalev Lember - 0.5.0-3 +- Add -devel subpackage with the .pc file +- Use make_install macro +- Use license macro for COPYING + +* Wed Jun 17 2015 Fedora Release Engineering - 0.5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu May 07 2015 Debarshi Ray - 0.5.0-1 +- Update to 0.5.0 + +* Tue Jan 20 2015 Debarshi Ray - 0.4.0-4 +- Fix crash when spawned by a call to com.intel.dLeynaRenderer.Manager.Release + (RH #1154788) + +* Sat Aug 16 2014 Fedora Release Engineering - 0.4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Jan 15 2014 Bastien Nocera - 0.4.0-1 +- Update to 0.4.0 + +* Mon Sep 02 2013 Debarshi Ray - 0.1.3-2 +- Do not remove the rpaths anymore because the library has now been moved to a + private location. + +* Mon Sep 02 2013 Debarshi Ray - 0.1.3-1 +- Update to 0.1.3. + +* Sat Aug 03 2013 Fedora Release Engineering - 0.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jun 26 2013 Debarshi Ray - 0.1.1-1 +- Initial spec.