diff --git a/open-vm-tools-kernel-3.6.patch b/open-vm-tools-kernel-3.6.patch deleted file mode 100644 index aded09d..0000000 --- a/open-vm-tools-kernel-3.6.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: open-vm-tools-9.2.2-893683/modules/linux/vmsync/sync.c -=================================================================== ---- open-vm-tools-9.2.2-893683.orig/modules/linux/vmsync/sync.c -+++ open-vm-tools-9.2.2-893683/modules/linux/vmsync/sync.c -@@ -162,7 +162,7 @@ VmSyncThawDevices(void *_state) // IN - cancel_delayed_work(&state->thawTask); - list_for_each_safe(cur, tmp, &state->devices) { - dev = list_entry(cur, VmSyncBlockDevice, list); -- if (dev->sb != NULL && dev->sb->s_frozen != SB_UNFROZEN) { -+ if (dev->sb != NULL && dev->sb->s_writers.frozen != SB_UNFROZEN) { - thaw_bdev(dev->bdev, dev->sb); - atomic_dec(&gFreezeCount); - } -@@ -237,7 +237,7 @@ VmSyncAddPath(const VmSyncState *state, - * the superblock is already frozen. - */ - if (inode->i_sb->s_bdev == NULL || -- inode->i_sb->s_frozen != SB_UNFROZEN) { -+ inode->i_sb->s_writers.frozen != SB_UNFROZEN) { - result = (inode->i_sb->s_bdev == NULL) ? -EINVAL : -EALREADY; - compat_path_release(&nd); - goto exit; diff --git a/open-vm-tools-kernel-3.8.patch b/open-vm-tools-kernel-3.8.patch deleted file mode 100644 index 56fcb6b..0000000 --- a/open-vm-tools-kernel-3.8.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- a/modules/linux/shared/compat_mm.h -+++ b/modules/linux/shared/compat_mm.h -@@ -99,8 +99,18 @@ static inline struct page * alloc_pages( - vmtruncate(inode, size); \ - result; \ - }) --#else -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) - #define compat_vmtruncate(inode, size) vmtruncate(inode, size) -+#else -+#define compat_vmtruncate(inode, size) \ -+({ \ -+ result = inode_newsize_ok(inode, size); \ -+ if (!result) \ -+ { \ -+ truncate_setsize(inode, size); \ -+ } \ -+ result; \ -+}) - #endif - - ---- a/modules/linux/vmci/linux/driver.c -+++ b/modules/linux/vmci/linux/driver.c -@@ -124,7 +124,7 @@ static struct pci_driver vmci_driver = { - .name = "vmci", - .id_table = vmci_ids, - .probe = vmci_probe_device, -- .remove = __devexit_p(vmci_remove_device), -+ .remove = vmci_remove_device, - }; - - #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) -@@ -1750,7 +1750,7 @@ vmci_enable_msix(struct pci_dev *pdev) / - *----------------------------------------------------------------------------- - */ - --static int __devinit -+static int - vmci_probe_device(struct pci_dev *pdev, // IN: vmci PCI device - const struct pci_device_id *id) // IN: matching device ID - { -@@ -1978,7 +1978,7 @@ vmci_probe_device(struct pci_dev *pdev, - *----------------------------------------------------------------------------- - */ - --static void __devexit -+static void - vmci_remove_device(struct pci_dev* pdev) - { - struct vmci_device *dev = pci_get_drvdata(pdev); - diff --git a/open-vm-tools.changes b/open-vm-tools.changes index 5ed200e..716a135 100644 --- a/open-vm-tools.changes +++ b/open-vm-tools.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Tue Sep 10 18:50:47 UTC 2013 - dimstar@opensuse.org + +- Really drop open-vm-tools-kernel-3.8.patch (osc rm). +- Drop open-vm-tools-kernel-3.6.patch: fixed upstream. +- Inject -Wno-unused-local-typedefs into CFLAGS. +- Only build vmsync up to openSUSE 12.3. +- Disable build of vmhgfs (and related tools) on openSUSE > 12.3, + as the module fails and VMWare is unresponsive in providing a + fix. Maybe one day, when there is actual commitment, the module + and the related tools / mount-helpers can be re-enabled (see also + bnc#834369). +- Wrap the KMP Package in a condition to only build when there are + actually modules to be built (vm_modules not empty). +- Do not require vmware-guest-kmp from the main package if we do + not built KMP packages (if there are no modules to be built). + ------------------------------------------------------------------- Mon May 13 15:30:52 UTC 2013 - dimstar@opensuse.org diff --git a/open-vm-tools.spec b/open-vm-tools.spec index d27069e..f40c37e 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -17,6 +17,11 @@ # +# vmhgfs modules doe not build on kernel 3.11 +%if 0%{suse_version} < 1310 +%define vmhgfs vmhgfs +%endif + # 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' @@ -27,11 +32,11 @@ %if 0%{?suse_version} <= 1230 # Modules to be built up to openSUSE 12.1, possibly not building on newer versions. -%define vm_modules1230 vmci vsock +%define vm_modules1230 vmci vsock vmsync %endif # Modules that have to be build up to version 12.2 (Last checked on 2012-02-05 with kernel 3.2.0) -%define vm_modules %{?vm_modules1230} vmhgfs vmsync %{?vm_modules1210} +%define vm_modules %{?vm_modules1230} %{?vmhgfs} %{?vm_modules1210} # X modules are lower prio upstream and once in a while fail. Offer an easy way to enable/disable them. %define with_X 1 @@ -52,7 +57,6 @@ Source5: vmware-user-autostart-wrapper Source6: open-vm-tools-modprobe.conf Source7: tools.conf Source98: preamble -Patch0: open-vm-tools-kernel-3.6.patch BuildRequires: gcc-c++ # don't use pkgconfig(gtk+-2.0) so we can build on SLE BuildRequires: gtk2-devel @@ -72,16 +76,22 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: liburiparser-devel %endif BuildRequires: pam-devel +%if 0%{?suse_version} < 1310 Requires: vmware-guest-kmp +%endif +%if "%{?vmhgfs}" # In order to have access to vmblock-fuse, we do require fuse Requires: fuse +%endif Supplements: modalias(pci:v000015ADd*sv*sd*bc*sc*i*) Requires(pre): %fillup_prereq Requires(pre): %insserv_prereq Requires(pre): permissions ExclusiveArch: %ix86 x86_64 +%if 0%{?suse_version} < 1310 %suse_kernel_module_package -n vmware-guest -p %{SOURCE98} xen um +%endif %description Open Virtual Machine Tools (open-vm-tools) are the open source @@ -167,9 +177,6 @@ if you intend to create own plugins for vmtoolsd. %prep %setup -q -n %{name}-%{version}-%{svn_rev} -%if 0%{?suse_version} > 1220 -%patch0 -p1 -%endif chmod -x AUTHORS COPYING ChangeLog NEWS README # fix for an rpmlint warning regarding wrong line feeds sed -i -e "s/\r//" README @@ -179,8 +186,8 @@ sed -i -e "s/\r//" README # disable warning deprecated-declarations which will raise error because of -Werror # (this is because of 'g_static_mutex_init' usage which is now deprecated) %if 0%{?suse_version} > 1110 -export CFLAGS="%{optflags} -Wno-unused-but-set-variable -Wno-deprecated-declarations -fPIE" -export CPPFLAGS="%{optflags} -Wno-unused-but-set-variable -Wno-deprecated-declarations -fPIE" +export CFLAGS="%{optflags} -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-deprecated-declarations -fPIE" +export CPPFLAGS="%{optflags} -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-deprecated-declarations -fPIE" %else export CFLAGS="%{optflags} -Wno-deprecated-declarations -fPIE" export CPPFLAGS="%{optflags} -Wno-deprecated-declarations -fPIE" @@ -236,8 +243,8 @@ for flavor in %{flavors_to_build}; do done popd -# fix some rights on the kernel modules, to have a complete -debuginfo package -chmod u+x %{buildroot}/lib/modules/*/updates/* +# fix some rights on the kernel modules, to have a complete -debuginfo package; do not fail if there are no modules left. +chmod u+x %{buildroot}/lib/modules/*/updates/* || : %if 0%{?suse_version} > 1110 %make_install @@ -276,8 +283,12 @@ rm %{buildroot}%{_sysconfdir}/xdg/autostart/vmware-user.desktop # modprobe configuration for vmnics. install -D -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/modprobe.d/50-vmnics.conf +%if "%{?vmhgfs}" # fix a link pointing to the buildroot for mount.vmhgfs ( cd %{buildroot}/sbin; rm mount.vmhgfs; ln -s ..%{_sbindir}/mount.vmhgfs ) +%else +find %{buildroot} -name '*vmhgfs*' -delete -print +%endif # the script installs some binaries into /usr/share/open-vm-tools which are just some tests. # So we drop them for the moment. Upstream has been informed about this. @@ -353,8 +364,10 @@ rm -rf %{buildroot} %{_bindir}/vmware-toolbox-cmd %{_bindir}/vmware-vmblock-fuse %{_bindir}/vmware-xferlogs +%if "%{?vmhgfs}" %{_sbindir}/mount.vmhgfs /sbin/mount.vmhgfs +%endif %config(noreplace) %{_sysconfdir}/pam.d/vmtoolsd %dir %{_sysconfdir}/vmware-tools %dir %{_sysconfdir}/vmware-tools/scripts