teuf pushed to spice-xpi (f22). "Unset LD_PRELOAD before starting remote-viewer (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Jun 9 17:18:45 UTC 2015


From 08e30b3a6aaca8dcad8777fbde74f76f808883d3 Mon Sep 17 00:00:00 2001
From: Christophe Fergeau <cfergeau at redhat.com>
Date: Tue, 9 Jun 2015 18:56:53 +0200
Subject: Unset LD_PRELOAD before starting remote-viewer

Without this, remote-viewer will crash during start up
This works around rhbz#1217076

diff --git a/0001-Workaround-firefox-gtk3-bug.patch b/0001-Workaround-firefox-gtk3-bug.patch
new file mode 100644
index 0000000..437d1fd
--- /dev/null
+++ b/0001-Workaround-firefox-gtk3-bug.patch
@@ -0,0 +1,35 @@
+From 8b620b39ff250ecb64940c234a04fe05320c2ca3 Mon Sep 17 00:00:00 2001
+From: Christophe Fergeau <cfergeau at redhat.com>
+Date: Wed, 27 May 2015 16:04:14 +0200
+Subject: [spice-xpi] Workaround firefox-gtk3 bug
+
+When it's built with gtk3, firefox plugin-container will use some
+LD_PRELOAD hack in order to be able to load the gtk2 flash plugin.
+However, this LD_PRELOAD'ed .so will cause gtk3 remote-viewer to crash
+when it's started by spice-xpi
+
+This commit just cleans up the unwanted LD_PRELOAD variable from the
+environment before starting remote-viewer.
+---
+ SpiceXPI/src/plugin/controller.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/SpiceXPI/src/plugin/controller.cpp b/SpiceXPI/src/plugin/controller.cpp
+index bd8b9d7..440ad63 100644
+--- a/SpiceXPI/src/plugin/controller.cpp
++++ b/SpiceXPI/src/plugin/controller.cpp
+@@ -168,6 +168,14 @@ gpointer SpiceController::ClientThread(gpointer data)
+     if (!fake_this->m_proxy.empty())
+         env = g_environ_setenv(env, "SPICE_PROXY", fake_this->m_proxy.c_str(), TRUE);
+ 
++    // Work around bug in firefox gtk3 builds, see
++    // https://bugzilla.redhat.com/show_bug.cgi?id=1217076
++    // http://emilio.pozuelo.org/posts/75
++    //
++    // This LD_PRELOAD'ed library causes gtk3 applications to crash
++    // FIXME: remove this hack if this ever gets improved in firefox-gtk3
++    env = g_environ_unsetenv(env, "LD_PRELOAD");
++
+     // Try to spawn main client
+     client_argv = fake_this->GetClientPath();
+     if (client_argv != NULL) {
diff --git a/spice-xpi.spec b/spice-xpi.spec
index e4617eb..0fdde9c 100644
--- a/spice-xpi.spec
+++ b/spice-xpi.spec
@@ -1,11 +1,12 @@
 Name:           spice-xpi
 Version:        2.8.90
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        SPICE extension for Mozilla
 Group:          Applications/Internet
 License:        MPLv1.1 or GPLv2+ or LGPLv2+
 URL:            http://spice-space.org
 Source0:        http://spice-space.org/download/releases/%{name}-%{version}.tar.bz2
+Patch1:         0001-Workaround-firefox-gtk3-bug.patch
 
 BuildRequires:  xulrunner-devel >= 8.0
 
@@ -19,6 +20,7 @@ Spice extension for Mozilla allows the client to be used from a web browser.
 
 %prep
 %setup -q -n %{name}-%{version}
+%patch1 -p1
 
 %build
 
@@ -43,6 +45,9 @@ setsebool -P mozilla_plugin_use_spice false
 %exclude %{_libdir}/mozilla/plugins/*.la
 
 %changelog
+* Tue Jun 09 2015 Christophe Fergeau <cfergeau at redhat.com> 2.8.90-7
+- Unset LD_PRELOAD before trying to start remote-viewer. This works around rhbz#1217076
+
 * Mon Aug 18 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.8.90-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/spice-xpi.git/commit/?h=f22&id=08e30b3a6aaca8dcad8777fbde74f76f808883d3


More information about the scm-commits mailing list