From cc326e1946bdb8f110428be72cf336db742c6aaa Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Fri, 9 Apr 2021 12:32:04 +0200 Subject: [PATCH] * Fri Apr 09 2021 Miroslav Rezanina - 11.2.5-2.el9 - ovt-Fixes-necessary-to-build-open-vm-tools-with-newer-gt.patch [bz#1936382] - ovt-Update-spec-file-for-correct-build.patch [bz#1936382] - Resolves: bz#1936382 ([ESXi][RHEL-9][FTBS] open-vm-tools not working with newer gtk libraries) --- open-vm-tools.spec | 36 +++--- ...to-build-open-vm-tools-with-newer-gt.patch | 106 ++++++++++++++++++ 2 files changed, 129 insertions(+), 13 deletions(-) create mode 100644 ovt-Fixes-necessary-to-build-open-vm-tools-with-newer-gt.patch diff --git a/open-vm-tools.spec b/open-vm-tools.spec index 4f9d038..b4a09af 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -28,7 +28,7 @@ Name: open-vm-tools Version: %{toolsversion} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Open Virtual Machine Tools for virtual machines hosted on VMware License: GPLv2 URL: https://github.com/vmware/%{name} @@ -46,11 +46,15 @@ ExclusiveArch: %{ix86} x86_64 %endif Patch1: %{name}-gcc11.patch +# For bz#1936382 - [ESXi][RHEL-9][FTBS] open-vm-tools not working with newer gtk libraries +Patch2: ovt-Fixes-necessary-to-build-open-vm-tools-with-newer-gt.patch +# For bz#1936382 - [ESXi][RHEL-9][FTBS] open-vm-tools not working with newer gtk libraries +Patch3: ovt-Update-spec-file-for-correct-build.patch -BuildRequires: make BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool +BuildRequires: make BuildRequires: gcc-c++ BuildRequires: doxygen # Fuse is optional and enables vmblock-fuse @@ -69,6 +73,7 @@ BuildRequires: gtkmm30-devel >= 3.10.0 BuildRequires: gtk2-devel >= 2.4.0 BuildRequires: gtkmm24-devel %endif +BuildRequires: libdrm-devel BuildRequires: libicu-devel BuildRequires: libmspack-devel # Unfortunately, xmlsec1-openssl does not add libtool-ltdl @@ -84,10 +89,14 @@ BuildRequires: libXtst-devel BuildRequires: openssl-devel BuildRequires: pam-devel BuildRequires: procps-devel -%if 0%{?fedora} >= 28 || 0%{?rhel} >=9 +%if 0%{?fedora} >= 28 || 0%{?rhel} >=8 BuildRequires: rpcgen %endif -BuildRequires: systemd +BuildRequires: systemd-devel +%if 0%{?fedora} >= 30 || 0%{?rhel} >= 9 +BuildRequires: systemd-rpm-macros +%endif + %if 0%{?fedora} >= 28 || 0%{?rhel} >=9 BuildRequires: libtirpc-devel %endif @@ -95,13 +104,11 @@ BuildRequires: xmlsec1-openssl-devel Requires: coreutils Requires: fuse -Requires: libdrm Requires: iproute Requires: grep Requires: pciutils Requires: sed Requires: systemd -Requires: systemd-libs Requires: tar Requires: util-linux Requires: which @@ -174,7 +181,7 @@ machines. # configure.ac get modified autoreconf -vif -%if 0%{?fedora} >= 28 || 0%{?rhel} >=9 +%if 0%{?fedora} >= 28 || 0%{?rhel} >=8 %global usetirpc with-tirpc %else %global usetirpc without-tirpc @@ -258,8 +265,7 @@ if [ "$1" = "2" ]; then # Cleanup vmtoolsd-init.service in case of upgrades %{_bindir}/systemctl disable %{toolsdaemon}-init.service &> /dev/null || /bin/true fi -%systemd_post %{vgauthdaemon}.service -%systemd_post %{toolsdaemon}.service +%systemd_post %{vgauthdaemon}.service %{toolsdaemon}.service %post desktop %systemd_post run-vmblock\x2dfuse.mount @@ -271,8 +277,7 @@ if %{_bindir}/systemctl is-active %{toolsdaemon}.service &> /dev/null; then fi %preun -%systemd_preun %{toolsdaemon}.service -%systemd_preun %{vgauthdaemon}.service +%systemd_preun %{toolsdaemon}.service %{vgauthdaemon}.service if [ "$1" = "0" -a \ -f %{_bindir}/vmware-checkvm ] && \ @@ -301,8 +306,7 @@ fi %else /sbin/ldconfig %endif -%systemd_postun_with_restart %{toolsdaemon}.service -%systemd_postun_with_restart %{vgauthdaemon}.service +%systemd_postun_with_restart %{toolsdaemon}.service %{vgauthdaemon}.service %postun desktop %systemd_postun run-vmblock\x2dfuse.mount @@ -391,6 +395,12 @@ fi %{_bindir}/vmware-vgauth-smoketest %changelog +* Fri Apr 09 2021 Miroslav Rezanina - 11.2.5-2.el9 +- ovt-Fixes-necessary-to-build-open-vm-tools-with-newer-gt.patch [bz#1936382] +- ovt-Update-spec-file-for-correct-build.patch [bz#1936382] +- Resolves: bz#1936382 + ([ESXi][RHEL-9][FTBS] open-vm-tools not working with newer gtk libraries) + * Fri Jan 15 2021 Ravindra Kumar - 11.2.5-1 - Package new upstream version open-vm-tools-11.2.5-17337674. - libdnet dependency was removed in open-vm-tools 11.0.0. So, diff --git a/ovt-Fixes-necessary-to-build-open-vm-tools-with-newer-gt.patch b/ovt-Fixes-necessary-to-build-open-vm-tools-with-newer-gt.patch new file mode 100644 index 0000000..e050739 --- /dev/null +++ b/ovt-Fixes-necessary-to-build-open-vm-tools-with-newer-gt.patch @@ -0,0 +1,106 @@ +From 305aec78caf0266c69005c4d01e7955025af7b21 Mon Sep 17 00:00:00 2001 +From: Miroslav Rezanina +Date: Mon, 8 Mar 2021 09:28:50 +0100 +Subject: [PATCH 1/2] Fixes necessary to build open-vm-tools with newer gtk and + gcc + +RH-Author: Miroslav Rezanina (mrezanin) +RH-MergeRequest: 2: Fixes necessary to build open-vm-tools with newer gtk and gcc +RH-Commit: [1/2] a91a8017174b4788132aeb5832187e0c91b6419d (mrezanin/rhel-src-open-vm-tools) +RH-Bugzilla: 1936382 +RH-Acked-by: Cathy Avery + +gtk updates present in RHEL 9 makes some functions used by open-vm-tools +deprecated so they raise warning during build. Code has to be updated to +use non-deprecated functionality. + +In addition, some small fixes are necessary for proper build using gcc +version available in RHEL 9. + +Signed-off-by: Miroslav Rezanina +--- + open-vm-tools/lib/include/tracer.hh | 2 -- + open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp | 1 + + .../plugins/dndcp/dndGuest/dndCPTransportGuestRpc.hpp | 2 -- + open-vm-tools/services/plugins/dndcp/dndUIX11.cpp | 4 ++-- + open-vm-tools/services/plugins/dndcp/dndcp.cpp | 4 ++-- + 5 files changed, 5 insertions(+), 8 deletions(-) + +diff --git a/open-vm-tools/lib/include/tracer.hh b/open-vm-tools/lib/include/tracer.hh +index 697caedb..71642ea1 100644 +--- a/open-vm-tools/lib/include/tracer.hh ++++ b/open-vm-tools/lib/include/tracer.hh +@@ -28,9 +28,7 @@ + + #include "vm_basic_defs.h" + +-extern "C" { + #include "glib.h" +-} + + + #ifdef VMX86_DEVEL +diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp b/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp +index 68212ab8..a7882b80 100644 +--- a/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp ++++ b/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp +@@ -1666,6 +1666,7 @@ CopyPasteUIX11::FileBlockMonitorThread(void *arg) // IN + char buf[sizeof(VMBLOCK_FUSE_READ_RESPONSE)]; + ssize_t size; + size = read(fd, buf, sizeof(VMBLOCK_FUSE_READ_RESPONSE)); ++ (void) size; /* Prevent unused variable warning */ + /* + * The current thread will block in read function until + * any other application accesses the file params->fileBlockName +diff --git a/open-vm-tools/services/plugins/dndcp/dndGuest/dndCPTransportGuestRpc.hpp b/open-vm-tools/services/plugins/dndcp/dndGuest/dndCPTransportGuestRpc.hpp +index 9b70984f..300c9323 100644 +--- a/open-vm-tools/services/plugins/dndcp/dndGuest/dndCPTransportGuestRpc.hpp ++++ b/open-vm-tools/services/plugins/dndcp/dndGuest/dndCPTransportGuestRpc.hpp +@@ -31,13 +31,11 @@ + + #include "dnd.h" + +-extern "C" { + #ifdef VMX86_TOOLS + #include "vmware/tools/guestrpc.h" + #else + #include "guest_rpc.h" + #endif +-} + + #define GUEST_RPC_CMD_STR_DND "dnd.transport" + #define GUEST_RPC_CMD_STR_CP "copypaste.transport" +diff --git a/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp b/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp +index 50c2bf5e..9bb3ad64 100644 +--- a/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp ++++ b/open-vm-tools/services/plugins/dndcp/dndUIX11.cpp +@@ -467,8 +467,8 @@ DnDUIX11::OnSrcDragBegin(const CPClipboard *clip, // IN + #ifndef GTK3 + event.device = gdk_device_get_core_pointer(); + #else +- GdkDeviceManager* manager = gdk_display_get_device_manager(gdk_window_get_display(event.window)); +- event.device = gdk_device_manager_get_client_pointer(manager); ++ GdkSeat* seat = gdk_display_get_default_seat(gdk_window_get_display(event.window)); ++ event.device = gdk_seat_get_pointer(seat); + #endif + event.x_root = mOrigin.get_x(); + event.y_root = mOrigin.get_y(); +diff --git a/open-vm-tools/services/plugins/dndcp/dndcp.cpp b/open-vm-tools/services/plugins/dndcp/dndcp.cpp +index d1013f4a..e0bf2906 100644 +--- a/open-vm-tools/services/plugins/dndcp/dndcp.cpp ++++ b/open-vm-tools/services/plugins/dndcp/dndcp.cpp +@@ -33,9 +33,9 @@ + + extern "C" { + #include "vmware/guestrpc/tclodefs.h" +-#include "vmware/tools/plugin.h" +-#include "vmware/tools/utils.h" + } ++#include "vmware/tools/utils.h" ++#include "vmware/tools/plugin.h" + + #include + #include "copyPasteDnDWrapper.h" +-- +2.27.0 +