From fec5bc0e046ed3f7f3563fca3ea41ba8e31cf406 Mon Sep 17 00:00:00 2001 From: Ravindra Kumar Date: Fri, 29 Dec 2017 14:59:01 -0800 Subject: [PATCH] Patch for a Wayland related crash in the desktopEvents plugin (RHBZ#1526952). gdk_set_allowed_backends() is available in version 3.10 and later only. --- open-vm-tools.spec | 13 ++++++++++--- wayland-crash.patch | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 wayland-crash.patch diff --git a/open-vm-tools.spec b/open-vm-tools.spec index 9c78987..a6eb89e 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -28,7 +28,7 @@ Name: open-vm-tools Version: %{toolsversion} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Open Virtual Machine Tools for virtual machines hosted on VMware Group: Applications/System License: GPLv2 @@ -42,6 +42,8 @@ ExclusiveArch: x86_64 ExclusiveArch: %{ix86} x86_64 %endif +Patch1: wayland-crash.patch + BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool @@ -57,8 +59,8 @@ BuildRequires: glib2-devel >= 2.14.0 # gdk-pixbuf2-xlib-devel. Therefore, we need to pull in # gdk-pixbuf2-xlib-devel dependency ourselves. BuildRequires: gdk-pixbuf2-xlib-devel -BuildRequires: gtk3-devel >= 3.0.0 -BuildRequires: gtkmm30-devel >= 3.0.0 +BuildRequires: gtk3-devel >= 3.10.0 +BuildRequires: gtkmm30-devel >= 3.10.0 %else BuildRequires: gtk2-devel >= 2.4.0 BuildRequires: gtkmm24-devel @@ -140,6 +142,7 @@ machines. %prep %setup -q -n %{name}-%{version}-%{toolsbuild} +%patch1 -p1 %build # Required for regenerating configure script when @@ -314,6 +317,10 @@ fi %{_bindir}/vmware-vgauth-smoketest %changelog +* Fri Dec 29 2017 Ravindra Kumar - 10.2.0-3 +- Patch for a Wayland related crash in the desktopEvents plugin (RHBZ#1526952). +- gdk_set_allowed_backends() is available in version 3.10 and later only. + * Mon Dec 18 2017 Ravindra Kumar - 10.2.0-2 - Build with gtk3 only on newer distros. diff --git a/wayland-crash.patch b/wayland-crash.patch new file mode 100644 index 0000000..967773a --- /dev/null +++ b/wayland-crash.patch @@ -0,0 +1,35 @@ +diff -ru open-vm-tools-10.2.0-7253323.orig/services/plugins/desktopEvents/x11Lock.c open-vm-tools-10.2.0-7253323/services/plugins/desktopEvents/x11Lock.c +--- open-vm-tools-10.2.0-7253323.orig/services/plugins/desktopEvents/x11Lock.c 2017-12-15 11:09:51.000000000 -0800 ++++ open-vm-tools-10.2.0-7253323/services/plugins/desktopEvents/x11Lock.c 2017-12-29 14:39:35.821511531 -0800 +@@ -364,6 +364,13 @@ + g_set_prgname(VMUSER_TITLE); + argv[0] = VMUSER_TITLE; + ++#if defined(GTK3) && GTK_MINOR_VERSION >= 10 ++ /* ++ * There is no Wayland support yet, only X11 backend is supported. ++ */ ++ gdk_set_allowed_backends("x11"); ++#endif ++ + /* XXX: is calling gtk_init() multiple times safe? */ + gtk_init(&argc, (char ***) &argv); + +diff -ru open-vm-tools-10.2.0-7253323.orig/services/plugins/dndcp/copyPasteDnDX11.cpp open-vm-tools-10.2.0-7253323/services/plugins/dndcp/copyPasteDnDX11.cpp +--- open-vm-tools-10.2.0-7253323.orig/services/plugins/dndcp/copyPasteDnDX11.cpp 2017-12-15 11:09:51.000000000 -0800 ++++ open-vm-tools-10.2.0-7253323/services/plugins/dndcp/copyPasteDnDX11.cpp 2017-12-29 14:39:51.587510648 -0800 +@@ -211,6 +211,14 @@ + CopyPasteDnDX11::Init(ToolsAppCtx *ctx) + { + TRACE_CALL(); ++ ++#if defined(GTK3) && GTK_MINOR_VERSION >= 10 ++ /* ++ * There is no Wayland support yet, only X11 backend is supported. ++ */ ++ gdk_set_allowed_backends("x11"); ++#endif ++ + CopyPasteDnDWrapper *wrapper = CopyPasteDnDWrapper::GetInstance(); + + ASSERT(ctx);