Hello community,

here is the log from the commit of package open-vm-tools for openSUSE:Factory 
checked in at 2015-06-06 09:54:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/open-vm-tools (Old)
 and      /work/SRC/openSUSE:Factory/.open-vm-tools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "open-vm-tools"

Changes:
--------
--- /work/SRC/openSUSE:Factory/open-vm-tools/open-vm-tools-KMP.changes  
2015-05-07 08:28:54.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.open-vm-tools.new/open-vm-tools-KMP.changes     
2015-06-06 09:54:30.000000000 +0200
@@ -1,0 +2,51 @@
+Mon May 21 23:04:48 UTC 2015 - [email protected]
+
+- Build using gcc4.7 for SLES11 environments to avoid mul64.h
+  dependency problem for i586 architectures 
+- Include cstddef to resolve compile problems under gcc4.7
+  enable-gcc46+.patch
+- Ensure xutils builds properly under older versions of gcc 
+  xutils-add-cstring.patch
+- Prevent files on shared folders from being truncated to 0 bytes
+  under 4.0 kernel
+  0004-vmhgfs-bdi-kernel-4.0.patch
+
+-------------------------------------------------------------------
+Wed May 18 00:01:07 UTC 2015 - [email protected]
+
+- Update to open-vm-tools-9.10.0-2476743:
+  + vgauth added
+  + deploypkg added
+  + guest proxycerttool added
+  + hgfs and vmci/vsock fixes
+  + asyncsocket enhancements
+  + library fixes and improvements
+  + locking and logging fixes and improvements
+  + foundry fixes
+  + vm-support script fixes
+- Replace obsolete patches with rebased versions (from ArchLinux):
+  - Drop 0001-Remove-unused-DEPRECATED-macro.patch
+  - Drop 0002-Conditionally-define-g_info-macro.patch
+  - Drop 0003-Add-kuid_t-kgid_t-compatibility-layer.patch
+  - Drop 0004-Use-new-link-helpers.patch
+  - Drop 0005-Update-hgfs-file-operations-for-newer-kernels.patch
+  - Drop 0006-Fix-vmxnet-module-on-kernels-3.16.patch
+  - Drop 0007-Fix-vmhgfs-module-on-kernels-3.16.patch
+  - Drop 0008-Fix-segfault-in-vmhgfs.patch
+  - Drop open-vm-tools-linux-3.17.7.patch
+  - Drop open-vm-tools-linux-3.17.patch
+  - Drop open-vm-tools-linux-3.18.0.patch
+  - Add 0001-Fix-vmxnet-module-on-kernels-3.16.patch
+  - Add 0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch
+  - Add 0003-Fix-f_dentry-msghdr-kernel-3.19.patch
+- Add libmspack BuildRequires (deploypkg).
+- Add openssl BuildRequires (grabbitmqproxy and vgauth).
+- Compile using --without-xmlsecurity and --without-xerces as
+  pkgconfig(xml-security-c) is not yet available in the build service,
+  (disables vgauth support).
+- Disable deploypkg for older versions of SLES and openSUSE.
+- Disable ssl for older versions of SLES and openSUSE (disables
+  grabbitmqproxy and vgauth).
+- Update spec file to be compatible with SLES and openSUSE.
+
+-------------------------------------------------------------------
@@ -7,0 +59,6 @@
+Thu Mar 12 00:05:55 UTC 2015 - [email protected]
+
+- Prevent autoinstallation of open-vm-tools in SLES11SP4 environments
+  due to potential conflict with VMware tools. (bsc#921618)
+
+-------------------------------------------------------------------
@@ -11,0 +69,16 @@
+
+-------------------------------------------------------------------
+Wed Jan 21 23:58:08 UTC 2015 - [email protected]
+
+- Remove modprobe of deprecated vmsync module from SysV init script. 
+
+-------------------------------------------------------------------
+Fri Jan 16 02:55:39 UTC 2015 - [email protected]
+
+- Update specfile to ensure kernel modules are not built or required
+  for SLES11SP4 and SLES12. 
+
+-------------------------------------------------------------------
+Fri Jan  9 23:57:56 UTC 2015 - [email protected]
+
+- Use fuse-devel instead of pkgconfig(fuse) in SLES11SP4. 
open-vm-tools.changes: same change

Old:
----
  0001-Remove-unused-DEPRECATED-macro.patch
  0002-Conditionally-define-g_info-macro.patch
  0003-Add-kuid_t-kgid_t-compatibility-layer.patch
  0004-Use-new-link-helpers.patch
  0005-Update-hgfs-file-operations-for-newer-kernels.patch
  0006-Fix-vmxnet-module-on-kernels-3.16.patch
  0007-Fix-vmhgfs-module-on-kernels-3.16.patch
  0008-Fix-segfault-in-vmhgfs.patch
  open-vm-tools-9.4.6-1770165.tar.gz
  open-vm-tools-linux-3.17.7.patch
  open-vm-tools-linux-3.17.patch
  open-vm-tools-linux-3.18.0.patch
  open-vm-tools-linux-3.19.0.patch

New:
----
  0001-Fix-vmxnet-module-on-kernels-3.16.patch
  0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch
  0003-Fix-f_dentry-msghdr-kernel-3.19.patch
  0004-vmhgfs-bdi-kernel-4.0.patch
  enable-gcc46+.patch
  open-vm-tools-9.10.0-2476743.tar.gz
  xutils-add-cstring.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ open-vm-tools-KMP.spec ++++++
--- /var/tmp/diff_new_pack.RW4D66/_old  2015-06-06 09:54:32.000000000 +0200
+++ /var/tmp/diff_new_pack.RW4D66/_new  2015-06-06 09:54:32.000000000 +0200
@@ -17,32 +17,36 @@
 #
 
 
-%define with_systemd   1
 %define KMP 1
 
-# The vmhgfs modules is used with all versions
-%define vmhgfs vmhgfs
-
-# disable systemd if before 13.1
-%if 0%{suse_version} < 1310
-%define with_systemd    0
+# systemd and deploypkg should be enabled by default on versions >= 13.1
+%if 0%{?suse_version} >= 1310
+%bcond_without systemd
+%bcond_without deploypkg
+%else
+%bcond_with systemd
+%bcond_with deploypkg
 %endif
 
+# The vmhgfs module is currently built for all versions
+# (Shared Folders are not supported under ESX/ESXi, so this driver is not 
necessary for SLES11/12)
+%define vmhgfs vmhgfs
+
 # exclude AMD PCnet32 LANCE pci.id from Supplements list [bnc#397554]
 %define __find_supplements sh -c '/usr/lib/rpm/find-supplements %{name} | grep 
-v pci:v00001022d00002000'
 
-%if 0%{?suse_version} <= 1230
-# Modules to be built up to openSUSE 12.3, possibly not building on newer 
versions.
+# Modules to be built up to openSUSE 12.3 (excluding SLES11), possibly not 
building on newer versions.
+%if 0%{?suse_version} <= 1230 && 0%{?suse_version} != 1110
 %define vm_modules1230 vmci vsock
 %endif
 
-%if 0%{?suse_version} <= 1220
-# Modules to be built up to openSUSE 12.1, possibly not building on newer 
versions.
+%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
+# Modules to be built up to openSUSE 12.1 (excluding SLES11), possibly not 
building on newer versions.
 %define vm_modules1220 vmsync
 %endif
 
-%if 0%{?suse_version} <= 1210
-# Modules to be built up to openSUSE 12.1, possibly not building on newer 
versions.
+%if 0%{?suse_version} <= 1210 && 0%{?suse_version} != 1110
+# Modules to be built up to openSUSE 12.1 (excluding SLES11), possibly not 
building on newer versions.
 %define vm_modules1210 vmxnet
 %endif
 
@@ -54,14 +58,14 @@
 
 Name:           open-vm-tools-KMP
 %define tarname open-vm-tools
-Version:        9.4.6
+Version:        9.10.0
 Release:        0
-%define         svn_rev 1770165
+%define         svn_rev 2476743
 Summary:        Open Virtual Machine Tools
 License:        BSD-3-Clause and GPL-2.0 and LGPL-2.1
 Group:          System/Emulators/PC
 Url:            http://open-vm-tools.sourceforge.net/
-Source:         
http://sourceforge.net/projects/open-vm-tools/files/open-vm-tools/stable-9.4.x/%{tarname}-%{version}-%{svn_rev}.tar.gz
+Source:         
http://sourceforge.net/projects/open-vm-tools/files/open-vm-tools/stable-9.10.0/%{tarname}-%{version}-%{svn_rev}.tar.gz
 Source1:        vmtoolsd
 Source2:        vmtoolsd.service
 Source3:        vmware-user-autostart.desktop
@@ -69,25 +73,19 @@
 Source6:        open-vm-tools-modprobe.conf
 Source7:        tools.conf
 Source98:       preamble
-Patch1:         0001-Remove-unused-DEPRECATED-macro.patch
-Patch2:         0002-Conditionally-define-g_info-macro.patch
-Patch3:         0003-Add-kuid_t-kgid_t-compatibility-layer.patch
-Patch4:         0004-Use-new-link-helpers.patch
-Patch5:         0005-Update-hgfs-file-operations-for-newer-kernels.patch
-Patch6:         0006-Fix-vmxnet-module-on-kernels-3.16.patch
-Patch7:         0007-Fix-vmhgfs-module-on-kernels-3.16.patch
-Patch8:         0008-Fix-segfault-in-vmhgfs.patch
-Patch10:        open-vm-tools-linux-3.17.patch
-Patch11:        open-vm-tools-linux-3.17.7.patch
-Patch12:        open-vm-tools-linux-3.18.0.patch
-Patch13:        open-vm-tools-linux-3.19.0.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+# SUSE versions below 1110 (SLES11 SP4) must use gcc 4.7 to compile under i586
+%if 0%{?suse_version} <= 1110
+BuildRequires:  gcc47
+BuildRequires:  gcc47-c++
+%else
 BuildRequires:  gcc-c++
+%endif
 # don't use pkgconfig(gtk+-2.0) so we can build on SLE
 BuildRequires:  gtk2-devel
 BuildRequires:  gtkmm2-devel
 # Only require kernel packages if kernel modules are being built
-%if "%{?vm_modules}" != "  " && %{KMP}
+%if %{KMP}
 BuildRequires:  kernel-source
 BuildRequires:  kernel-syms
 BuildRequires:  module-init-tools
@@ -97,12 +95,13 @@
 BuildRequires:  doxygen
 BuildRequires:  libdnet-devel
 BuildRequires:  libicu-devel
+BuildRequires:  libmspack-devel
 BuildRequires:  libtool
+BuildRequires:  openssl-devel
 BuildRequires:  pam-devel
 BuildRequires:  pcre-devel
 BuildRequires:  update-desktop-files
 BuildRequires:  xorg-x11-devel
-BuildRequires:  pkgconfig(fuse)
 # libprocps is required with 12.3 and above
 %if 0%{?suse_version} >= 1230
 BuildRequires:  procps-devel
@@ -117,19 +116,26 @@
 %if 0%{?suse_version} >= 1310
 Requires:       which
 %endif
-%if 0%{?suse_version} < 1310
 Requires:       vmware-guest-kmp
-%endif
+# To prevent autoinstallation on SLES11, exclude supplements from that version
+%if 0%{?suse_version} != 1110
 Supplements:    modalias(pci:v000015ADd*sv*sd*bc*sc*i*)
+%endif
 Requires(pre):  %fillup_prereq
 Requires(pre):  %insserv_prereq
 ExclusiveArch:  %ix86 x86_64
+Patch0:         xutils-add-cstring.patch
+Patch1:         enable-gcc46+.patch
+Patch2:         0001-Fix-vmxnet-module-on-kernels-3.16.patch
+Patch3:         0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch
+Patch4:         0003-Fix-f_dentry-msghdr-kernel-3.19.patch
+Patch5:         0004-vmhgfs-bdi-kernel-4.0.patch
 
 %if %{KMP}
 %suse_kernel_module_package -n vmware-guest -p %{SOURCE98} xen um
 %endif
 
-%if %{with_systemd}
+%if %{with systemd}
 %systemd_requires
 %endif
 
@@ -212,7 +218,7 @@
 
 %package -n libvmtools-devel
 Summary:        Open Virtual Machine Tools - Development headers
-Group:          Development
+Group:          Development/Libraries/C and C++
 Requires:       libvmtools0 = %{version}
 
 %description -n libvmtools-devel
@@ -224,22 +230,12 @@
 chmod -x AUTHORS COPYING ChangeLog NEWS README
 # fix for an rpmlint warning regarding wrong line feeds
 sed -i -e "s/\r//" README
-%patch1 -p2
-%patch2 -p2
-%patch3 -p2
-%patch4 -p2
-%patch5 -p2
-%patch6 -p2
-%patch7 -p2
-%patch8 -p2
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-KVERMAJ=$(rpm -q kernel-syms --qf %%{version}\n | awk -F. '{print $1}')
-KVERMIN=$(rpm -q kernel-syms --qf %%{version}\n | awk -F. '{print $2}')
-if [ $KVERMAJ -ge 4 -o $KVERMIN -ge 19 ]; then
-%patch13 -p1
-fi
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 %if ! %{KMP}
@@ -247,12 +243,19 @@
 # disable warning deprecated-declarations which will raise error because of 
-Werror
 # disable warning sizeof-pointer-memaccess which will raise error because of 
-Werror
 # (this is because of 'g_static_mutex_init' usage which is now deprecated)
+# disable deploypkg due to old versions of libmspack not providing pkgconfig
+# disable ssl due to 'discards qualifiers' error in SLES11
+# compile without pkgconfig(xml-security-c), as this is not yet available in 
OBS
+# compile without pkgconfig(xerces-c), which requires xml-security-c to 
provide vgauth
 %if 0%{?suse_version} > 1110
 export CFLAGS="%{optflags} -Wno-unused-local-typedefs 
-Wno-unused-but-set-variable -Wno-deprecated-declarations 
-Wno-sizeof-pointer-memaccess -Wno-cpp -fPIE"
 export CXXFLAGS="%{optflags} -Wno-unused-local-typedefs 
-Wno-unused-but-set-variable -Wno-deprecated-declarations 
-Wno-sizeof-pointer-memaccess -Wno-cpp -fPIE"
 %else
 export CFLAGS="%{optflags} -Wno-deprecated-declarations -fPIE"
 export CXXFLAGS="%{optflags} -Wno-deprecated-declarations -fPIE"
+# SUSE versions below 1110 (SLES11 SP4) must use gcc 4.7 to compile under i586
+export CC=gcc-4.7
+export CXX=g++-4.7
 %endif
 export LDFLAGS="-pie"
 # Required for version 9.4.0
@@ -265,13 +268,19 @@
 %if 0%{?suse_version} < 1230
     --without-procps \
 %endif
+%if ! %{with deploypkg}
+    --disable-deploypkg \
+    --without-ssl \
+%endif
 %if %{with_X}
     --with-x \
 %else
     --without-x \
 %endif
     --disable-dependency-tracking \
-    --disable-static
+    --disable-static \
+    --without-xmlsecurity \
+    --without-xerces
 make
 %endif
 
@@ -289,7 +298,13 @@
     if [ -f ../vmci/Module.symvers ]; then
        cp ../vmci/Module.symvers .
     fi
-    make -C /usr/src/linux-obj/%{_target_cpu}/$flavor modules M=$PWD 
VM_CCVER=$(gcc -dumpversion) HEADER_DIR="/usr/src/linux-obj/$(uname 
-i)/default/include" SRCROOT=$PWD OVT_SOURCE_DIR=$TOPDIR
+    # SUSE versions below 1110 must use gcc 4.7 to compile for i586
+    %if 0%{?suse_version} > 1110
+       export CC_VER_OPTS="VM_CCVER=$(gcc -dumpversion)"
+    %else
+       export CC_VER_OPTS="CC=gcc-4.7 VM_CCVER=4.7"
+    %endif
+    make -C /usr/src/linux-obj/%{_target_cpu}/$flavor modules M=$PWD 
$CC_VER_OPTS HEADER_DIR="/usr/src/linux-obj/$(uname -i)/default/include" 
SRCROOT=$PWD OVT_SOURCE_DIR=$TOPDIR
     popd
   done
   popd
@@ -336,7 +351,7 @@
 mv %{buildroot}%{_sysconfdir}/vmware-tools/vm-support %{buildroot}%{_bindir}
 
 # install systemd/sysvinit init scripts and symlinks
-%if %{with_systemd}
+%if %{with systemd}
 install -p -m 644 -D %{SOURCE2} %{buildroot}%{_unitdir}/vmtoolsd.service
 ln -sf service %{buildroot}%{_sbindir}/rcvmtoolsd
 %else
@@ -382,13 +397,13 @@
 %endif
 
 %pre
-%if %{with_systemd}
+%if %{with systemd}
 %service_add_pre vmtoolsd.service
 %endif
 
 %post
 /sbin/ldconfig
-%if %{with_systemd}
+%if %{with systemd}
 %service_add_post vmtoolsd.service
 %else
 %{fillup_and_insserv -Y vmtoolsd}
@@ -409,7 +424,7 @@
 %endif
 
 %preun
-%if %{with_systemd}
+%if %{with systemd}
 %service_del_preun vmtoolsd.service
 %else
 # stop service with the old name (if exists) on update (something like 
%%stop_on_update)
@@ -431,7 +446,7 @@
 fi
 
 %postun
-%if %{with_systemd}
+%if %{with systemd}
 %service_del_postun vmtoolsd.service
 %else
 %restart_on_update vmtoolsd
@@ -486,8 +501,14 @@
 %dir %{_sysconfdir}/modprobe.d
 %config %{_sysconfdir}/modprobe.d/50-vmnics.conf
 %endif
+%if %{with deploypkg}
+%{_bindir}/vmware-guestproxycerttool
+%{_libdir}/%{name}/plugins/vmsvc/libdeployPkgPlugin.so
+%{_libdir}/%{name}/plugins/vmsvc/libgrabbitmqProxy.so
+%config(noreplace) %{_sysconfdir}/vmware-tools/guestproxy-ssl.conf
+%endif
 %{_datadir}/%{name}/
-%if %{with_systemd}
+%if %{with systemd}
 %{_unitdir}/vmtoolsd.service
 %else
 %{_sysconfdir}/init.d/vmtoolsd
@@ -499,7 +520,7 @@
 
 %files desktop
 %defattr(-, root, root)
-%{_sysconfdir}/xdg/autostart/vmware-user-autostart.desktop
+%config %{_sysconfdir}/xdg/autostart/vmware-user-autostart.desktop
 %verify(not mode) %attr(0755, root, root) %{_bindir}/vmware-user-suid-wrapper
 %{_libdir}/%{name}/plugins/vmusr/
 %{_bindir}/vmware-user-autostart-wrapper
@@ -511,6 +532,9 @@
 %{_libdir}/libvmtools.so.*
 %{_libdir}/libguestlib.so.*
 %{_libdir}/libhgfs.so.*
+%if %{with deploypkg}
+%{_libdir}/libDeployPkg.so.*
+%endif
 
 %files -n libvmtools-devel
 %defattr(-,root,root)
@@ -518,6 +542,10 @@
 %{_includedir}/vmGuestLib
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/vmguestlib.pc
+%if %{with deploypkg}
+%{_includedir}/libDeployPkg
+%{_libdir}/pkgconfig/libDeployPkg.pc
+%endif
 %endif
 
 %changelog

++++++ open-vm-tools.spec ++++++
--- /var/tmp/diff_new_pack.RW4D66/_old  2015-06-06 09:54:32.000000000 +0200
+++ /var/tmp/diff_new_pack.RW4D66/_new  2015-06-06 09:54:32.000000000 +0200
@@ -17,32 +17,36 @@
 #
 
 
-%define with_systemd   1
 %define KMP 0
 
-# The vmhgfs modules is used with all versions
-%define vmhgfs vmhgfs
-
-# disable systemd if before 13.1
-%if 0%{suse_version} < 1310
-%define with_systemd    0
+# systemd and deploypkg should be enabled by default on versions >= 13.1
+%if 0%{?suse_version} >= 1310
+%bcond_without systemd
+%bcond_without deploypkg
+%else
+%bcond_with systemd
+%bcond_with deploypkg
 %endif
 
+# The vmhgfs module is currently built for all versions
+# (Shared Folders are not supported under ESX/ESXi, so this driver is not 
necessary for SLES11/12)
+%define vmhgfs vmhgfs
+
 # exclude AMD PCnet32 LANCE pci.id from Supplements list [bnc#397554]
 %define __find_supplements sh -c '/usr/lib/rpm/find-supplements %{name} | grep 
-v pci:v00001022d00002000'
 
-%if 0%{?suse_version} <= 1230
-# Modules to be built up to openSUSE 12.3, possibly not building on newer 
versions.
+# Modules to be built up to openSUSE 12.3 (excluding SLES11), possibly not 
building on newer versions.
+%if 0%{?suse_version} <= 1230 && 0%{?suse_version} != 1110
 %define vm_modules1230 vmci vsock
 %endif
 
-%if 0%{?suse_version} <= 1220
-# Modules to be built up to openSUSE 12.1, possibly not building on newer 
versions.
+%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
+# Modules to be built up to openSUSE 12.1 (excluding SLES11), possibly not 
building on newer versions.
 %define vm_modules1220 vmsync
 %endif
 
-%if 0%{?suse_version} <= 1210
-# Modules to be built up to openSUSE 12.1, possibly not building on newer 
versions.
+%if 0%{?suse_version} <= 1210 && 0%{?suse_version} != 1110
+# Modules to be built up to openSUSE 12.1 (excluding SLES11), possibly not 
building on newer versions.
 %define vm_modules1210 vmxnet
 %endif
 
@@ -54,14 +58,14 @@
 
 Name:           open-vm-tools
 %define tarname open-vm-tools
-Version:        9.4.6
+Version:        9.10.0
 Release:        0
-%define         svn_rev 1770165
+%define         svn_rev 2476743
 Summary:        Open Virtual Machine Tools
 License:        BSD-3-Clause and GPL-2.0 and LGPL-2.1
 Group:          System/Emulators/PC
 Url:            http://open-vm-tools.sourceforge.net/
-Source:         
http://sourceforge.net/projects/open-vm-tools/files/open-vm-tools/stable-9.4.x/%{tarname}-%{version}-%{svn_rev}.tar.gz
+Source:         
http://sourceforge.net/projects/open-vm-tools/files/open-vm-tools/stable-9.10.0/%{tarname}-%{version}-%{svn_rev}.tar.gz
 Source1:        vmtoolsd
 Source2:        vmtoolsd.service
 Source3:        vmware-user-autostart.desktop
@@ -69,25 +73,19 @@
 Source6:        open-vm-tools-modprobe.conf
 Source7:        tools.conf
 Source98:       preamble
-Patch1:         0001-Remove-unused-DEPRECATED-macro.patch
-Patch2:         0002-Conditionally-define-g_info-macro.patch
-Patch3:         0003-Add-kuid_t-kgid_t-compatibility-layer.patch
-Patch4:         0004-Use-new-link-helpers.patch
-Patch5:         0005-Update-hgfs-file-operations-for-newer-kernels.patch
-Patch6:         0006-Fix-vmxnet-module-on-kernels-3.16.patch
-Patch7:         0007-Fix-vmhgfs-module-on-kernels-3.16.patch
-Patch8:         0008-Fix-segfault-in-vmhgfs.patch
-Patch10:        open-vm-tools-linux-3.17.patch
-Patch11:        open-vm-tools-linux-3.17.7.patch
-Patch12:        open-vm-tools-linux-3.18.0.patch
-Patch13:        open-vm-tools-linux-3.19.0.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+# SUSE versions below 1110 (SLES11 SP4) must use gcc 4.7 to compile under i586
+%if 0%{?suse_version} <= 1110
+BuildRequires:  gcc47
+BuildRequires:  gcc47-c++
+%else
 BuildRequires:  gcc-c++
+%endif
 # don't use pkgconfig(gtk+-2.0) so we can build on SLE
 BuildRequires:  gtk2-devel
 BuildRequires:  gtkmm2-devel
 # Only require kernel packages if kernel modules are being built
-%if "%{?vm_modules}" != "  " && %{KMP}
+%if %{KMP}
 BuildRequires:  kernel-source
 BuildRequires:  kernel-syms
 BuildRequires:  module-init-tools
@@ -97,12 +95,13 @@
 BuildRequires:  doxygen
 BuildRequires:  libdnet-devel
 BuildRequires:  libicu-devel
+BuildRequires:  libmspack-devel
 BuildRequires:  libtool
+BuildRequires:  openssl-devel
 BuildRequires:  pam-devel
 BuildRequires:  pcre-devel
 BuildRequires:  update-desktop-files
 BuildRequires:  xorg-x11-devel
-BuildRequires:  pkgconfig(fuse)
 # libprocps is required with 12.3 and above
 %if 0%{?suse_version} >= 1230
 BuildRequires:  procps-devel
@@ -117,19 +116,26 @@
 %if 0%{?suse_version} >= 1310
 Requires:       which
 %endif
-%if 0%{?suse_version} < 1310
 Requires:       vmware-guest-kmp
-%endif
+# To prevent autoinstallation on SLES11, exclude supplements from that version
+%if 0%{?suse_version} != 1110
 Supplements:    modalias(pci:v000015ADd*sv*sd*bc*sc*i*)
+%endif
 Requires(pre):  %fillup_prereq
 Requires(pre):  %insserv_prereq
 ExclusiveArch:  %ix86 x86_64
+Patch0:         xutils-add-cstring.patch
+Patch1:         enable-gcc46+.patch
+Patch2:         0001-Fix-vmxnet-module-on-kernels-3.16.patch
+Patch3:         0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch
+Patch4:         0003-Fix-f_dentry-msghdr-kernel-3.19.patch
+Patch5:         0004-vmhgfs-bdi-kernel-4.0.patch
 
 %if %{KMP}
 %suse_kernel_module_package -n vmware-guest -p %{SOURCE98} xen um
 %endif
 
-%if %{with_systemd}
+%if %{with systemd}
 %systemd_requires
 %endif
 
@@ -212,7 +218,7 @@
 
 %package -n libvmtools-devel
 Summary:        Open Virtual Machine Tools - Development headers
-Group:          Development
+Group:          Development/Libraries/C and C++
 Requires:       libvmtools0 = %{version}
 
 %description -n libvmtools-devel
@@ -224,22 +230,12 @@
 chmod -x AUTHORS COPYING ChangeLog NEWS README
 # fix for an rpmlint warning regarding wrong line feeds
 sed -i -e "s/\r//" README
-%patch1 -p2
-%patch2 -p2
-%patch3 -p2
-%patch4 -p2
-%patch5 -p2
-%patch6 -p2
-%patch7 -p2
-%patch8 -p2
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-KVERMAJ=$(rpm -q kernel-syms --qf %%{version}\n | awk -F. '{print $1}')
-KVERMIN=$(rpm -q kernel-syms --qf %%{version}\n | awk -F. '{print $2}')
-if [ $KVERMAJ -ge 4 -o $KVERMIN -ge 19 ]; then
-%patch13 -p1
-fi
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 %if ! %{KMP}
@@ -247,12 +243,19 @@
 # disable warning deprecated-declarations which will raise error because of 
-Werror
 # disable warning sizeof-pointer-memaccess which will raise error because of 
-Werror
 # (this is because of 'g_static_mutex_init' usage which is now deprecated)
+# disable deploypkg due to old versions of libmspack not providing pkgconfig
+# disable ssl due to 'discards qualifiers' error in SLES11
+# compile without pkgconfig(xml-security-c), as this is not yet available in 
OBS
+# compile without pkgconfig(xerces-c), which requires xml-security-c to 
provide vgauth
 %if 0%{?suse_version} > 1110
 export CFLAGS="%{optflags} -Wno-unused-local-typedefs 
-Wno-unused-but-set-variable -Wno-deprecated-declarations 
-Wno-sizeof-pointer-memaccess -Wno-cpp -fPIE"
 export CXXFLAGS="%{optflags} -Wno-unused-local-typedefs 
-Wno-unused-but-set-variable -Wno-deprecated-declarations 
-Wno-sizeof-pointer-memaccess -Wno-cpp -fPIE"
 %else
 export CFLAGS="%{optflags} -Wno-deprecated-declarations -fPIE"
 export CXXFLAGS="%{optflags} -Wno-deprecated-declarations -fPIE"
+# SUSE versions below 1110 (SLES11 SP4) must use gcc 4.7 to compile under i586
+export CC=gcc-4.7
+export CXX=g++-4.7
 %endif
 export LDFLAGS="-pie"
 # Required for version 9.4.0
@@ -265,13 +268,19 @@
 %if 0%{?suse_version} < 1230
     --without-procps \
 %endif
+%if ! %{with deploypkg}
+    --disable-deploypkg \
+    --without-ssl \
+%endif
 %if %{with_X}
     --with-x \
 %else
     --without-x \
 %endif
     --disable-dependency-tracking \
-    --disable-static
+    --disable-static \
+    --without-xmlsecurity \
+    --without-xerces
 make
 %endif
 
@@ -289,7 +298,13 @@
     if [ -f ../vmci/Module.symvers ]; then
        cp ../vmci/Module.symvers .
     fi
-    make -C /usr/src/linux-obj/%{_target_cpu}/$flavor modules M=$PWD 
VM_CCVER=$(gcc -dumpversion) HEADER_DIR="/usr/src/linux-obj/$(uname 
-i)/default/include" SRCROOT=$PWD OVT_SOURCE_DIR=$TOPDIR
+    # SUSE versions below 1110 must use gcc 4.7 to compile for i586
+    %if 0%{?suse_version} > 1110
+       export CC_VER_OPTS="VM_CCVER=$(gcc -dumpversion)"
+    %else
+       export CC_VER_OPTS="CC=gcc-4.7 VM_CCVER=4.7"
+    %endif
+    make -C /usr/src/linux-obj/%{_target_cpu}/$flavor modules M=$PWD 
$CC_VER_OPTS HEADER_DIR="/usr/src/linux-obj/$(uname -i)/default/include" 
SRCROOT=$PWD OVT_SOURCE_DIR=$TOPDIR
     popd
   done
   popd
@@ -336,7 +351,7 @@
 mv %{buildroot}%{_sysconfdir}/vmware-tools/vm-support %{buildroot}%{_bindir}
 
 # install systemd/sysvinit init scripts and symlinks
-%if %{with_systemd}
+%if %{with systemd}
 install -p -m 644 -D %{SOURCE2} %{buildroot}%{_unitdir}/vmtoolsd.service
 ln -sf service %{buildroot}%{_sbindir}/rcvmtoolsd
 %else
@@ -382,13 +397,13 @@
 %endif
 
 %pre
-%if %{with_systemd}
+%if %{with systemd}
 %service_add_pre vmtoolsd.service
 %endif
 
 %post
 /sbin/ldconfig
-%if %{with_systemd}
+%if %{with systemd}
 %service_add_post vmtoolsd.service
 %else
 %{fillup_and_insserv -Y vmtoolsd}
@@ -409,7 +424,7 @@
 %endif
 
 %preun
-%if %{with_systemd}
+%if %{with systemd}
 %service_del_preun vmtoolsd.service
 %else
 # stop service with the old name (if exists) on update (something like 
%%stop_on_update)
@@ -431,7 +446,7 @@
 fi
 
 %postun
-%if %{with_systemd}
+%if %{with systemd}
 %service_del_postun vmtoolsd.service
 %else
 %restart_on_update vmtoolsd
@@ -486,8 +501,14 @@
 %dir %{_sysconfdir}/modprobe.d
 %config %{_sysconfdir}/modprobe.d/50-vmnics.conf
 %endif
+%if %{with deploypkg}
+%{_bindir}/vmware-guestproxycerttool
+%{_libdir}/%{name}/plugins/vmsvc/libdeployPkgPlugin.so
+%{_libdir}/%{name}/plugins/vmsvc/libgrabbitmqProxy.so
+%config(noreplace) %{_sysconfdir}/vmware-tools/guestproxy-ssl.conf
+%endif
 %{_datadir}/%{name}/
-%if %{with_systemd}
+%if %{with systemd}
 %{_unitdir}/vmtoolsd.service
 %else
 %{_sysconfdir}/init.d/vmtoolsd
@@ -499,7 +520,7 @@
 
 %files desktop
 %defattr(-, root, root)
-%{_sysconfdir}/xdg/autostart/vmware-user-autostart.desktop
+%config %{_sysconfdir}/xdg/autostart/vmware-user-autostart.desktop
 %verify(not mode) %attr(0755, root, root) %{_bindir}/vmware-user-suid-wrapper
 %{_libdir}/%{name}/plugins/vmusr/
 %{_bindir}/vmware-user-autostart-wrapper
@@ -511,6 +532,9 @@
 %{_libdir}/libvmtools.so.*
 %{_libdir}/libguestlib.so.*
 %{_libdir}/libhgfs.so.*
+%if %{with deploypkg}
+%{_libdir}/libDeployPkg.so.*
+%endif
 
 %files -n libvmtools-devel
 %defattr(-,root,root)
@@ -518,6 +542,10 @@
 %{_includedir}/vmGuestLib
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/vmguestlib.pc
+%if %{with deploypkg}
+%{_includedir}/libDeployPkg
+%{_libdir}/pkgconfig/libDeployPkg.pc
+%endif
 %endif
 
 %changelog

++++++ 0006-Fix-vmxnet-module-on-kernels-3.16.patch -> 
0001-Fix-vmxnet-module-on-kernels-3.16.patch ++++++
--- 
/work/SRC/openSUSE:Factory/open-vm-tools/0006-Fix-vmxnet-module-on-kernels-3.16.patch
       2015-01-06 09:07:22.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.open-vm-tools.new/0001-Fix-vmxnet-module-on-kernels-3.16.patch
  2015-06-06 09:54:29.000000000 +0200
@@ -1,19 +1,19 @@
-From 4601d767d60e9a377c285994266c6fef49cae550 Mon Sep 17 00:00:00 2001
+From 08836a47c56b47b658025e41a20027c5d915f836 Mon Sep 17 00:00:00 2001
 From: "Scott M. Kroll" <[email protected]>
 Date: Fri, 15 Aug 2014 10:40:38 -0400
-Subject: [PATCH 10/11] Fix vmxnet module on kernels >= 3.16
+Subject: [PATCH 1/3] Fix vmxnet module on kernels >= 3.16
 
 * Add compat check for ethtool_ops in net_device struct.
 * SET_ETHTOOL_OPS is no longer defined, but can be manually.
 ---
- open-vm-tools/modules/linux/shared/compat_netdevice.h |  4 ++++
- open-vm-tools/modules/linux/vmxnet/vmxnet.c           | 13 ++++++++-----
+ modules/linux/shared/compat_netdevice.h |  4 ++++
+ modules/linux/vmxnet/vmxnet.c           | 13 ++++++++-----
  2 files changed, 12 insertions(+), 5 deletions(-)
 
-diff --git a/open-vm-tools/modules/linux/shared/compat_netdevice.h 
b/open-vm-tools/modules/linux/shared/compat_netdevice.h
+diff --git a/modules/linux/shared/compat_netdevice.h 
b/modules/linux/shared/compat_netdevice.h
 index 3aec25b..a65d59b 100644
---- a/open-vm-tools/modules/linux/shared/compat_netdevice.h
-+++ b/open-vm-tools/modules/linux/shared/compat_netdevice.h
+--- a/modules/linux/shared/compat_netdevice.h
++++ b/modules/linux/shared/compat_netdevice.h
 @@ -337,4 +337,8 @@ typedef netdev_features_t compat_netdev_features_t;
  typedef u32 compat_netdev_features_t;
  #endif
@@ -23,11 +23,11 @@
 +#endif
 +
  #endif /* __COMPAT_NETDEVICE_H__ */
-diff --git a/open-vm-tools/modules/linux/vmxnet/vmxnet.c 
b/open-vm-tools/modules/linux/vmxnet/vmxnet.c
-index 54b4590..7fb5692 100644
---- a/open-vm-tools/modules/linux/vmxnet/vmxnet.c
-+++ b/open-vm-tools/modules/linux/vmxnet/vmxnet.c
-@@ -283,8 +283,7 @@ vmxnet_change_mtu(struct net_device *dev, int new_mtu)
+diff --git a/modules/linux/vmxnet/vmxnet.c b/modules/linux/vmxnet/vmxnet.c
+index 33afb9b..40abde5 100644
+--- a/modules/linux/vmxnet/vmxnet.c
++++ b/modules/linux/vmxnet/vmxnet.c
+@@ -279,8 +279,7 @@ vmxnet_change_mtu(struct net_device *dev, int new_mtu)
  
  #endif
  
@@ -37,7 +37,7 @@
  /*
   *----------------------------------------------------------------------------
   *
-@@ -530,7 +529,7 @@ vmxnet_ethtool_ops = {
+@@ -526,7 +525,7 @@ vmxnet_ethtool_ops = {
  };
  
  
@@ -46,7 +46,7 @@
  
  
  /*
-@@ -743,7 +742,7 @@ vmxnet_ioctl(struct net_device *dev, struct ifreq *ifr, 
int cmd)
+@@ -739,7 +738,7 @@ vmxnet_ioctl(struct net_device *dev, struct ifreq *ifr, 
int cmd)
     }
     return -EOPNOTSUPP;
  }
@@ -70,5 +70,5 @@
     dev->do_ioctl = vmxnet_ioctl;
  #endif
 -- 
-2.0.4
+2.3.4
 

++++++ 0002-Fix-d_alias-to-d_u.d_alias-for-kernel-3.18.patch ++++++
>From 8df98f3c779fa43d073a42e82bd18cf28c2bd4af Mon Sep 17 00:00:00 2001
From: Wendell Smith <[email protected]>
Date: Sat, 7 Feb 2015 15:42:13 -0500
Subject: [PATCH 2/3] Fix d_alias to d_u.d_alias for kernel 3.18

---
 a/modules/linux/vmhgfs/inode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: open-vm-tools-9.10.0-2476743/modules/linux/vmhgfs/inode.c
===================================================================
--- open-vm-tools-9.10.0-2476743.orig/modules/linux/vmhgfs/inode.c
+++ open-vm-tools-9.10.0-2476743/modules/linux/vmhgfs/inode.c
@@ -1917,7 +1917,12 @@ HgfsPermission(struct inode *inode,
                            p,
 #endif
                            &inode->i_dentry,
-                           d_alias) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 1)
+                           d_u.d_alias
+#else
+                           d_alias
+#endif
+                           ) {
          int dcount = hgfs_d_count(dentry);
          if (dcount) {
             LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount));
@@ -1970,7 +1975,13 @@ HgfsPermission(struct inode *inode,
       /* Find a dentry with valid d_count. Refer bug 587879. */
       list_for_each(pos, &inode->i_dentry) {
          int dcount;
-         struct dentry *dentry = list_entry(pos, struct dentry, d_alias);
+         struct dentry *dentry = list_entry(pos, struct dentry,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 1)
+         d_u.d_alias
+#else
+         d_alias
+#endif
+         );
          dcount = hgfs_d_count(dentry);
          if (dcount) {
             LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount));
++++++ 0003-Fix-f_dentry-msghdr-kernel-3.19.patch ++++++
>From 61751db8cd4679fc76034a5d1f99df6c64c48de6 Mon Sep 17 00:00:00 2001
From: lotan <[email protected]>
Date: Mon, 30 Mar 2015 08:58:56 +0200
Subject: [PATCH 3/3] Make vmhgfs work on kernel 3.19.

---
 modules/linux/vmhgfs/dir.c           | 35 ++++++------
 modules/linux/vmhgfs/file.c          | 65 +++++++++++-----------
 modules/linux/vmhgfs/fsutil.c        |  3 +-
 modules/linux/vmhgfs/shared/compat_dentry.h    | 10 ++++
 4 files changed, 63 insertions(+), 50 deletions(-)
 create mode 100644 open-vm-tools/modules/linux/vmhgfs/shared/compat_dentry.h

diff --git a/modules/linux/vmhgfs/dir.c b/modules/linux/vmhgfs/dir.c
index 809611a..c6a87bd 100644
--- a/modules/linux/vmhgfs/dir.c
+++ b/modules/linux/vmhgfs/dir.c
@@ -31,6 +31,7 @@
 #include "compat_kernel.h"
 #include "compat_slab.h"
 #include "compat_mutex.h"
+#include "shared/compat_dentry.h"
 
 #include "cpName.h"
 #include "hgfsEscape.h"
@@ -414,7 +415,7 @@ HgfsPackDirOpenRequest(struct file *file,   // IN: File 
pointer for this open
 
    /* Build full name to send to server. */
    if (HgfsBuildPath(name, req->bufferSize - (requestSize - 1),
-                     file->f_dentry) < 0) {
+                     DENTRY(file)) < 0) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsPackDirOpenRequest: build path 
failed\n"));
       return -EINVAL;
    }
@@ -560,8 +561,8 @@ HgfsPrivateDirRelease(struct file *file,   // IN: File for 
the dir getting relea
    int result = 0;
 
    ASSERT(file);
-   ASSERT(file->f_dentry);
-   ASSERT(file->f_dentry->d_sb);
+   ASSERT(DENTRY(file));
+   ASSERT(DENTRY(file)->d_sb);
 
    LOG(6, (KERN_DEBUG "VMware hgfs: HgfsPrivateDirRelease: close fh %u\n", 
handle));
 
@@ -704,7 +705,7 @@ HgfsDirLlseek(struct file *file,
               loff_t offset,
               int origin)
 {
-   struct dentry *dentry = file->f_dentry;
+   struct dentry *dentry = DENTRY(file);
    struct inode *inode = dentry->d_inode;
    compat_mutex_t *mtx;
 
@@ -853,7 +854,7 @@ HgfsReaddirRefreshEntries(struct file *file)    // IN: File 
pointer for this ope
    }
 
    LOG(6, (KERN_DEBUG "VMware hgfs: %s: error: stale handle (%s) return %d)\n",
-            __func__, file->f_dentry->d_name.name, result));
+            __func__, DENTRY(file)->d_name.name, result));
    return result;
 }
 
@@ -988,9 +989,9 @@ HgfsReaddirNextEntry(struct file *file,              // IN: 
file
    char *fileName = NULL;
    int result;
 
-   ASSERT(file->f_dentry->d_inode->i_sb);
+   ASSERT(DENTRY(file)->d_inode->i_sb);
 
-   si = HGFS_SB_TO_COMMON(file->f_dentry->d_inode->i_sb);
+   si = HGFS_SB_TO_COMMON(DENTRY(file)->d_inode->i_sb);
    *entryIgnore = FALSE;
 
    /*
@@ -1079,18 +1080,18 @@ HgfsReaddirNextEntry(struct file *file,              // 
IN: file
     */
    if (!strncmp(entryName, ".", sizeof ".")) {
       if (!dotAndDotDotIgnore) {
-         *entryIno = file->f_dentry->d_inode->i_ino;
+         *entryIno = DENTRY(file)->d_inode->i_ino;
       } else {
          *entryIgnore = TRUE;
       }
    } else if (!strncmp(entryName, "..", sizeof "..")) {
       if (!dotAndDotDotIgnore) {
-         *entryIno = compat_parent_ino(file->f_dentry);
+         *entryIno = compat_parent_ino(DENTRY(file));
       } else {
          *entryIgnore = TRUE;
       }
    } else {
-     *entryIno = HgfsGetFileInode(&entryAttrs, file->f_dentry->d_inode->i_sb);
+     *entryIno = HgfsGetFileInode(&entryAttrs, DENTRY(file)->d_inode->i_sb);
    }
 
    if (*entryIgnore) {
@@ -1170,16 +1171,16 @@ HgfsDoReaddir(struct file *file,         // IN:
    ASSERT(filldirCtx);
 
    if (!file ||
-      !(file->f_dentry) ||
-      !(file->f_dentry->d_inode)) {
+      !(DENTRY(file)) ||
+      !(DENTRY(file)->d_inode)) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsReaddir: null input\n"));
       return -EFAULT;
    }
 
    LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s, inum %lu, pos %Lu)\n",
           __func__,
-          file->f_dentry->d_name.name,
-          file->f_dentry->d_inode->i_ino,
+          DENTRY(file)->d_name.name,
+          DENTRY(file)->d_inode->i_ino,
           *currentPos));
 
    /*
@@ -1294,7 +1295,7 @@ HgfsReaddir(struct file *file,         // IN:
    /* If either dot and dotdot are filled in for us we can exit. */
    if (!dir_emit_dots(file, ctx)) {
       LOG(6, (KERN_DEBUG "VMware hgfs: %s: dir_emit_dots(%s, @ %Lu)\n",
-              __func__, file->f_dentry->d_name.name, ctx->pos));
+              __func__, DENTRY(file)->d_name.name, ctx->pos));
       return 0;
    }
 
@@ -1464,8 +1465,8 @@ HgfsDirRelease(struct inode *inode,  // IN: Inode that 
the file* points to
 
    ASSERT(inode);
    ASSERT(file);
-   ASSERT(file->f_dentry);
-   ASSERT(file->f_dentry->d_sb);
+   ASSERT(DENTRY(file));
+   ASSERT(DENTRY(file)->d_sb);
 
    handle = FILE_GET_FI_P(file)->handle;
 
diff --git a/modules/linux/vmhgfs/file.c b/modules/linux/vmhgfs/file.c
index bbde3f4..39502d0 100644
--- a/modules/linux/vmhgfs/file.c
+++ b/modules/linux/vmhgfs/file.c
@@ -32,6 +32,7 @@
 #include "compat_fs.h"
 #include "compat_kernel.h"
 #include "compat_slab.h"
+#include "shared/compat_dentry.h"
 
 /* Must be after compat_fs.h */
 #if defined VMW_USE_AIO
@@ -384,7 +385,7 @@ HgfsPackOpenRequest(struct inode *inode, // IN: Inode of 
the file to open
    /* Build full name to send to server. */
    if (HgfsBuildPath(name,
                      req->bufferSize - (requestSize - 1),
-                     file->f_dentry) < 0) {
+                     DENTRY(file)) < 0) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsPackOpenRequest: build path "
               "failed\n"));
       return -EINVAL;
@@ -523,8 +524,8 @@ HgfsOpen(struct inode *inode,  // IN: Inode of the file to 
open
    ASSERT(inode);
    ASSERT(inode->i_sb);
    ASSERT(file);
-   ASSERT(file->f_dentry);
-   ASSERT(file->f_dentry->d_inode);
+   ASSERT(DENTRY(file));
+   ASSERT(DENTRY(file)->d_inode);
 
    iinfo = INODE_GET_II_P(inode);
 
@@ -605,7 +606,7 @@ HgfsOpen(struct inode *inode,  // IN: Inode of the file to 
open
              * This is not the root of our file system so there should always
              * be a parent.
              */
-            ASSERT(file->f_dentry->d_parent);
+            ASSERT(DENTRY(file)->d_parent);
 
             /*
              * Here we obtain a reference on the parent to make sure it doesn't
@@ -620,10 +621,10 @@ HgfsOpen(struct inode *inode,  // IN: Inode of the file 
to open
              * We could do this if we were willing to give up support for
              * O_EXCL on 2.4 kernels.
              */
-            dparent = dget(file->f_dentry->d_parent);
+            dparent = dget(DENTRY(file)->d_parent);
             iparent = dparent->d_inode;
 
-            HgfsSetUidGid(iparent, file->f_dentry,
+            HgfsSetUidGid(iparent, DENTRY(file),
                           current_fsuid(), current_fsgid());
 
             dput(dparent);
@@ -683,7 +684,7 @@ out:
     * forcing a revalidate on one will not force it on any others.
     */
    if (result != 0 && iinfo->createdAndUnopened == TRUE) {
-      HgfsDentryAgeForce(file->f_dentry);
+      HgfsDentryAgeForce(DENTRY(file));
    }
    return result;
 }
@@ -772,13 +773,13 @@ HgfsFileRead(struct kiocb *iocb,      // IN:  I/O control 
block
 
    ASSERT(iocb);
    ASSERT(iocb->ki_filp);
-   ASSERT(iocb->ki_filp->f_dentry);
+   ASSERT(DENTRY(iocb->ki_filp));
    ASSERT(iov);
 
    pos = HGFS_IOCB_TO_POS(iocb, offset);
    iovSegs = HGFS_IOV_TO_SEGS(iov, numSegs);
 
-   readDentry = iocb->ki_filp->f_dentry;
+   readDentry = DENTRY(iocb->ki_filp);
 
    LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s/%s)\n",
            __func__, readDentry->d_parent->d_name.name,
@@ -882,13 +883,13 @@ HgfsFileWrite(struct kiocb *iocb,      // IN:  I/O 
control block
 
    ASSERT(iocb);
    ASSERT(iocb->ki_filp);
-   ASSERT(iocb->ki_filp->f_dentry);
+   ASSERT(DENTRY(iocb->ki_filp));
    ASSERT(iov);
 
    pos = HGFS_IOCB_TO_POS(iocb, offset);
    iovSegs = HGFS_IOV_TO_SEGS(iov, numSegs);
 
-   writeDentry = iocb->ki_filp->f_dentry;
+   writeDentry = DENTRY(iocb->ki_filp);
 
    LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s/%s)\n",
           __func__, writeDentry->d_parent->d_name.name,
@@ -951,7 +952,7 @@ HgfsRead(struct file *file,  // IN:  File to read from
    int result;
 
    ASSERT(file);
-   ASSERT(file->f_dentry);
+   ASSERT(DENTRY(file));
    ASSERT(buf);
    ASSERT(offset);
 
@@ -959,7 +960,7 @@ HgfsRead(struct file *file,  // IN:  File to read from
            __func__, file->f_dentry->d_parent->d_name.name,
            file->f_dentry->d_name.name, count, (long long) *offset));
 
-   result = HgfsRevalidate(file->f_dentry);
+   result = HgfsRevalidate(DENTRY(file));
    if (result) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsRead: invalid dentry\n"));
       goto out;
@@ -1002,8 +1003,8 @@ HgfsWrite(struct file *file,      // IN: File to write to
    int result;
 
    ASSERT(file);
-   ASSERT(file->f_dentry);
-   ASSERT(file->f_dentry->d_inode);
+   ASSERT(DENTRY(file));
+   ASSERT(DENTRY(file)->d_inode);
    ASSERT(buf);
    ASSERT(offset);
 
@@ -1011,7 +1012,7 @@ HgfsWrite(struct file *file,      // IN: File to write to
            __func__, file->f_dentry->d_parent->d_name.name,
            file->f_dentry->d_name.name, count, (long long) *offset));
 
-   result = HgfsRevalidate(file->f_dentry);
+   result = HgfsRevalidate(DENTRY(file));
    if (result) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsWrite: invalid dentry\n"));
       goto out;
@@ -1051,7 +1052,7 @@ HgfsSeek(struct file *file,  // IN:  File to seek
    loff_t result = -1;
 
    ASSERT(file);
-   ASSERT(file->f_dentry);
+   ASSERT(DENTRY(file));
 
    LOG(6, (KERN_DEBUG "VMware hgfs: %s(%s/%s, %u, %lld, %d)\n",
            __func__,
@@ -1059,7 +1060,7 @@ HgfsSeek(struct file *file,  // IN:  File to seek
             file->f_dentry->d_name.name,
             FILE_GET_FI_P(file)->handle, offset, origin));
 
-   result = (loff_t) HgfsRevalidate(file->f_dentry);
+   result = (loff_t) HgfsRevalidate(DENTRY(file));
    if (result) {
       LOG(6, (KERN_DEBUG "VMware hgfs: %s: invalid dentry\n", __func__));
       goto out;
@@ -1143,8 +1144,8 @@ HgfsFlush(struct file *file                        // IN: 
file to flush
    int ret = 0;
 
    LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s/%s)\n",
-            __func__, file->f_dentry->d_parent->d_name.name,
-            file->f_dentry->d_name.name));
+            __func__, DENTRY(file)->d_parent->d_name.name,
+            DENTRY(file)->d_name.name));
 
    if ((file->f_mode & FMODE_WRITE) == 0) {
       goto exit;
@@ -1157,7 +1158,7 @@ HgfsFlush(struct file *file                        // IN: 
file to flush
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
    ret = vfs_fsync(file, 0);
 #else
-   ret = HgfsDoFsync(file->f_dentry->d_inode);
+   ret = HgfsDoFsync(DENTRY(file)->d_inode);
 #endif
 
 exit:
@@ -1215,13 +1216,13 @@ HgfsFsync(struct file *file,            // IN: File we 
operate on
 
    LOG(4, (KERN_DEBUG "VMware hgfs: %s(%s/%s, %lld, %lld, %d)\n",
            __func__,
-           file->f_dentry->d_parent->d_name.name,
-           file->f_dentry->d_name.name,
+           DENTRY(file)->d_parent->d_name.name,
+           DENTRY(file)->d_name.name,
            startRange, endRange,
            datasync));
 
    /* Flush writes to the server and return any errors */
-   inode = file->f_dentry->d_inode;
+   inode = DENTRY(file)->d_inode;
 #if defined VMW_FSYNC_31
    ret = filemap_write_and_wait_range(inode->i_mapping, startRange, endRange);
 #else
@@ -1261,14 +1262,14 @@ HgfsMmap(struct file *file,            // IN: File we 
operate on
 
    ASSERT(file);
    ASSERT(vma);
-   ASSERT(file->f_dentry);
+   ASSERT(DENTRY(file));
 
    LOG(6, (KERN_DEBUG "VMware hgfs: %s(%s/%s)\n",
            __func__,
            file->f_dentry->d_parent->d_name.name,
            file->f_dentry->d_name.name));
 
-   result = HgfsRevalidate(file->f_dentry);
+   result = HgfsRevalidate(DENTRY(file));
    if (result) {
       LOG(4, (KERN_DEBUG "VMware hgfs: %s: invalid dentry\n", __func__));
       goto out;
@@ -1309,8 +1310,8 @@ HgfsRelease(struct inode *inode,  // IN: Inode that this 
file points to
 
    ASSERT(inode);
    ASSERT(file);
-   ASSERT(file->f_dentry);
-   ASSERT(file->f_dentry->d_sb);
+   ASSERT(DENTRY(file));
+   ASSERT(DENTRY(file)->d_sb);
 
    handle = FILE_GET_FI_P(file)->handle;
    LOG(6, (KERN_DEBUG "VMware hgfs: %s(%s/%s, %u)\n",
@@ -1443,14 +1444,14 @@ HgfsSendfile(struct file *file,    // IN: File to read 
from
    ssize_t result;
 
    ASSERT(file);
-   ASSERT(file->f_dentry);
+   ASSERT(DENTRY(file));
    ASSERT(target);
    ASSERT(offset);
    ASSERT(actor);
 
    LOG(6, (KERN_DEBUG "VMware hgfs: HgfsSendfile: was called\n"));
 
-   result = HgfsRevalidate(file->f_dentry);
+   result = HgfsRevalidate(DENTRY(file));
    if (result) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsSendfile: invalid dentry\n"));
       goto out;
@@ -1497,7 +1498,7 @@ HgfsSpliceRead(struct file *file,            // IN: File 
to read from
    ssize_t result;
 
    ASSERT(file);
-   ASSERT(file->f_dentry);
+   ASSERT(DENTRY(file));
 
    LOG(6, (KERN_DEBUG "VMware hgfs: %s(%s/%s, %lu@%Lu)\n",
            __func__,
@@ -1505,7 +1506,7 @@ HgfsSpliceRead(struct file *file,            // IN: File 
to read from
            file->f_dentry->d_name.name,
            (unsigned long) len, (unsigned long long) *offset));
 
-   result = HgfsRevalidate(file->f_dentry);
+   result = HgfsRevalidate(DENTRY(file));
    if (result) {
       LOG(4, (KERN_DEBUG "VMware hgfs: %s: invalid dentry\n", __func__));
       goto out;
diff --git a/modules/linux/vmhgfs/fsutil.c b/modules/linux/vmhgfs/fsutil.c
index 5023324..a2e794c 100644
--- a/modules/linux/vmhgfs/fsutil.c
+++ b/modules/linux/vmhgfs/fsutil.c
@@ -36,6 +36,7 @@
 #include "compat_sched.h"
 #include "compat_slab.h"
 #include "compat_spinlock.h"
+#include "shared/compat_dentry.h"
 
 #include "vm_assert.h"
 #include "cpName.h"
@@ -1924,7 +1925,7 @@ HgfsCreateFileInfo(struct file *file,  // IN: File 
pointer to attach to
 
    ASSERT(file);
 
-   inodeInfo = INODE_GET_II_P(file->f_dentry->d_inode);
+   inodeInfo = INODE_GET_II_P(DENTRY(file)->d_inode);
    ASSERT(inodeInfo);
 
    /* Get the mode of the opened file. */
diff --git a/modules/linux/vmhgfs/shared/compat_dentry.h 
b/modules/linux/vmhgfs/shared/compat_dentry.h
new file mode 100644
index 0000000..dd53760
--- /dev/null
+++ b/modules/linux/vmhgfs/shared/compat_dentry.h
@@ -0,0 +1,10 @@
+#ifndef __COMPAT_DENTRY_H__
+#   define __COMPAT_DENTRY_H__
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
+# define DENTRY(file) (file->f_path.dentry)
+#else
+# define DENTRY(file) (file->f_dentry)
+#endif
+
+#endif /* __COMPAT_DENTRY_H__ */
-- 
2.3.4

++++++ 0004-vmhgfs-bdi-kernel-4.0.patch ++++++
This patch fixes a nasty bug with vmhgfs on kernel 4.x: files modified
on shared folders becomes 0 bytes on host.

(Patch found at https://github.com/rasa/vmware-tools-patches)


Index: open-vm-tools-9.10.0-2476743/modules/linux/vmhgfs/filesystem.c
===================================================================
--- open-vm-tools-9.10.0-2476743.orig/modules/linux/vmhgfs/filesystem.c
+++ open-vm-tools-9.10.0-2476743/modules/linux/vmhgfs/filesystem.c
@@ -386,8 +386,20 @@ HgfsReadSuper(struct super_block *sb, //
       return PTR_ERR(si);
    }
    HGFS_SET_SB_TO_COMMON(sb, si);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
+   result = bdi_setup_and_register(&si->bdi, "vmhgfs");
+   if (result) {
+      kfree(si->shareName);
+      kfree(si);
+   }
+#endif
+
    sb->s_magic = HGFS_SUPER_MAGIC;
    sb->s_op = &HgfsSuperOperations;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
+   sb->s_bdi = &si->bdi;
+#endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
    sb->s_d_op = &HgfsDentryOperations;
@@ -427,6 +439,9 @@ HgfsReadSuper(struct super_block *sb, //
   exit:
    if (result) {
       dput(rootDentry);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
+      bdi_destroy(&si->bdi);
+#endif
       kfree(si->shareName);
       kfree(si);
    }
Index: open-vm-tools-9.10.0-2476743/modules/linux/vmhgfs/module.h
===================================================================
--- open-vm-tools-9.10.0-2476743.orig/modules/linux/vmhgfs/module.h
+++ open-vm-tools-9.10.0-2476743/modules/linux/vmhgfs/module.h
@@ -29,6 +29,7 @@
 #include "driver-config.h"
 
 #include <asm/atomic.h>
+#include <linux/backing-dev.h>
 #include "compat_fs.h"
 #include "compat_semaphore.h"
 #include "compat_slab.h"
@@ -130,6 +131,9 @@ typedef struct HgfsSuperInfo {
    uint32 ttl;                      /* Maximum dentry age (in ticks). */
    char *shareName;                 /* Mounted share name. */
    size_t shareNameLen;             /* To avoid repeated strlen() calls. */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
+   struct backing_dev_info bdi;
+#endif
 } HgfsSuperInfo;
 
 /*
Index: open-vm-tools-9.10.0-2476743/modules/linux/vmhgfs/super.c
===================================================================
--- open-vm-tools-9.10.0-2476743.orig/modules/linux/vmhgfs/super.c
+++ open-vm-tools-9.10.0-2476743/modules/linux/vmhgfs/super.c
@@ -152,6 +152,9 @@ HgfsPutSuper(struct super_block *sb) //
 
    si = HGFS_SB_TO_COMMON(sb);
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)
+   bdi_destroy(&si->bdi);
+#endif
    kfree(si->shareName);
    kfree(si);
 }
++++++ enable-gcc46+.patch ++++++
When compiling under gcc4.6+, the following errors can be seen:

[   93s] In file included from /usr/include/sigc++-2.0/sigc++/signal.h:8:0,
[   93s]                  from /usr/include/sigc++-2.0/sigc++/connection.h:22,
[   93s]                  from 
../../../services/plugins/dndcp/dnd/copyPasteRpc.hh:28,
[   93s]                  from dndGuest/copyPasteRpcV3.hh:29,
[   93s]                  from dndGuest/copyPasteRpcV3.cc:26:
[   93s] /usr/include/sigc++-2.0/sigc++/signal_base.h:46:11: error: 'size_t' 
does not name a type
[   93s]    typedef size_t size_type;
[   93s]            ^
[   93s] /usr/include/sigc++-2.0/sigc++/signal_base.h:95:3: error: 'size_type' 
does not name a type
[   93s]    size_type size() const;
[   93s]    ^
[   93s] /usr/include/sigc++-2.0/sigc++/signal_base.h:239:11: error: 'size_t' 
does not name a type
[   93s]    typedef size_t size_type;
[   93s]            ^
[   93s] /usr/include/sigc++-2.0/sigc++/signal_base.h:261:3: error: 'size_type' 
does not name a type
[   93s]    size_type size() const;

As per https://gcc.gnu.org/gcc-4.6/porting_to.html, this is fixed through:

 #include <cstddef>


Index: open-vm-tools-9.10.0-2476743/services/plugins/dndcp/dnd/copyPasteRpc.hh
===================================================================
--- open-vm-tools-9.10.0-2476743.orig/services/plugins/dndcp/dnd/copyPasteRpc.hh
+++ open-vm-tools-9.10.0-2476743/services/plugins/dndcp/dnd/copyPasteRpc.hh
@@ -25,6 +25,7 @@
 #ifndef COPY_PASTE_RPC_HH
 #define COPY_PASTE_RPC_HH
 
+#include <cstddef>
 #include <sigc++/connection.h>
 #include "dndCPLibExport.hh"
 #include "rpcBase.h"
Index: open-vm-tools-9.10.0-2476743/services/plugins/dndcp/dnd/dndRpc.hh
===================================================================
--- open-vm-tools-9.10.0-2476743.orig/services/plugins/dndcp/dnd/dndRpc.hh
+++ open-vm-tools-9.10.0-2476743/services/plugins/dndcp/dnd/dndRpc.hh
@@ -25,6 +25,7 @@
 #ifndef DND_RPC_HH
 #define DND_RPC_HH
 
+#include <cstddef>
 #include <sigc++/connection.h>
 #include "dndCPLibExport.hh"
 #include "rpcBase.h"
Index: 
open-vm-tools-9.10.0-2476743/services/plugins/dndcp/dnd/fileTransferRpc.hh
===================================================================
--- 
open-vm-tools-9.10.0-2476743.orig/services/plugins/dndcp/dnd/fileTransferRpc.hh
+++ open-vm-tools-9.10.0-2476743/services/plugins/dndcp/dnd/fileTransferRpc.hh
@@ -25,6 +25,7 @@
 #ifndef FILE_TRANSFER_RPC_HH
 #define FILE_TRANSFER_RPC_HH
 
+#include <cstddef>
 #include <sigc++/connection.h>
 #include "dndCPLibExport.hh"
 #include "rpcBase.h"
++++++ open-vm-tools-9.4.6-1770165.tar.gz -> 
open-vm-tools-9.10.0-2476743.tar.gz ++++++
++++ 375006 lines of diff (skipped)

++++++ vmtoolsd ++++++
--- /var/tmp/diff_new_pack.RW4D66/_old  2015-06-06 09:54:33.000000000 +0200
+++ /var/tmp/diff_new_pack.RW4D66/_new  2015-06-06 09:54:33.000000000 +0200
@@ -88,7 +88,6 @@
                -o subtype=vmware-vmblock,default_permissions,allow_other \
                /var/run/vmblock-fuse
        modprobe $VMBALLOON
-       modprobe vmsync
        ## Start daemon with startproc(8). If this fails
        ## the return value is set appropriately by startproc.
        /sbin/startproc $VMTOOLSD_BIN
@@ -109,7 +108,6 @@
        fi
        /sbin/killproc -TERM $VMTOOLSD_BIN
        umount /var/run/vmblock-fuse || :
-       modprobe -r vmsync || :
        modprobe -r $VMBALLOON || :
 
        # Remember status and be verbose

++++++ xutils-add-cstring.patch ++++++
Index: open-vm-tools-9.10.0-2476743/services/plugins/dndcp/xutils/xutils.cc
===================================================================
--- open-vm-tools-9.10.0-2476743.orig/services/plugins/dndcp/xutils/xutils.cc
+++ open-vm-tools-9.10.0-2476743/services/plugins/dndcp/xutils/xutils.cc
@@ -29,6 +29,7 @@
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
 #include <gdk/gdkx.h>
+#include <cstring>
 
 extern "C" {
 #include "vm_assert.h"

Reply via email to