Backport patch to work around gtype threading

This commit is contained in:
Colin Walters 2017-03-21 15:43:49 -04:00
parent 4469c1e57b
commit 727bd6d6c3
2 changed files with 38 additions and 2 deletions

View File

@ -3,7 +3,7 @@
Name: dconf Name: dconf
Version: 0.26.0 Version: 0.26.0
Release: 2%{?dist} Release: 3%{?dist}
Summary: A configuration system Summary: A configuration system
Group: System Environment/Base Group: System Environment/Base
@ -12,6 +12,9 @@ URL: http://live.gnome.org/dconf
#VCS: git:git://git.gnome.org/dconf #VCS: git:git://git.gnome.org/dconf
Source0: http://download.gnome.org/sources/dconf/0.26/dconf-%{version}.tar.xz Source0: http://download.gnome.org/sources/dconf/0.26/dconf-%{version}.tar.xz
Patch0: gtype-threads.patch
BuildRequires: git
BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: vala-devel >= %{vala_version} BuildRequires: vala-devel >= %{vala_version}
BuildRequires: gtk-doc BuildRequires: gtk-doc
@ -34,7 +37,7 @@ development using dconf.
%prep %prep
%setup -q %autosetup -Sgit -n %{name}-%{version}
%build %build
%configure %configure
@ -85,6 +88,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/vala %{_datadir}/vala
%changelog %changelog
* Tue Mar 21 2017 Colin Walters <walters@verbum.org> - 0.26.0-3
- Backport patch to work around gtype threading
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-2 * Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.26.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

30
gtype-threads.patch Normal file
View File

@ -0,0 +1,30 @@
From 701d19d12d4e0599340c9bd1eb2b3e25a40d780b Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Fri, 18 Nov 2016 16:40:23 -0500
Subject: gdbus: Work around threading deadlock in glib
See https://bugzilla.gnome.org/show_bug.cgi?id=674885
for more details. What dconf is doing right now provokes
this more easily by involving *another* thread in the mix.
---
gdbus/dconf-gdbus-thread.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gdbus/dconf-gdbus-thread.c b/gdbus/dconf-gdbus-thread.c
index e397e3a..8ed28b5 100644
--- a/gdbus/dconf-gdbus-thread.c
+++ b/gdbus/dconf-gdbus-thread.c
@@ -94,6 +94,10 @@ dconf_gdbus_get_worker_context (void)
{
GMainContext *context;
+ /* Work around https://bugzilla.gnome.org/show_bug.cgi?id=674885 */
+ g_type_ensure (G_TYPE_DBUS_CONNECTION);
+ g_type_ensure (G_TYPE_DBUS_PROXY);
+
context = g_main_context_new ();
g_thread_new ("dconf worker", dconf_gdbus_worker_thread, context);
g_once_init_leave (&worker_context, context);
--
cgit v0.12