# # spec file for package open-vm-tools # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (C) 2010 Dominique Leuenberger, Amsterdam, Netherlands. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # 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' # Modules that have to be build up to version 12.1 (Last checked on 2011-09-21 with kernel 3.1-rc6) %define vm_modules vmblock vmhgfs vmsync vmxnet vmci vsock # X modules are lower prio upstream and once in a while fail. Offer an easy way to enable/disable them. %define with_X 1 Name: open-vm-tools Version: 8.8.0 Release: 1 %define svn_rev 471268 License: BSD3c ; GPLv2 ; LGPLv2.1 Summary: Open Virtual Machine Tools Url: http://open-vm-tools.sourceforge.net/ Group: System/Emulators/PC Source: http://sourceforge.net/projects/open-vm-tools/files/open-vm-tools/stable-8.8.x/%{name}-%{version}-%{svn_rev}.tar.gz Source1: vmtoolsd Source2: vmware-user-autostart.desktop Source4: open-vm-tools.permissions Source5: vmware-user-autostart-wrapper Source6: open-vm-tools-modprobe.conf Source98: preamble # PATCH-FIX-UPSTREAM open-vm-tools-vmxnet+kernel-3.0.patch idoenmez@suse.de -- Fix compilation with kernel 3.0 Patch0: open-vm-tools-vmxnet+kernel-3.0.patch BuildRequires: gcc-c++ # don't use pkgconfig(gtk+-2.0) so we can build on SLE BuildRequires: gtk2-devel BuildRequires: gtkmm2-devel BuildRequires: kernel-source BuildRequires: kernel-syms BuildRequires: libdnet-devel BuildRequires: libicu-devel BuildRequires: module-init-tools BuildRequires: pcre-devel BuildRequires: procps BuildRequires: update-desktop-files BuildRequires: xorg-x11-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build # liburiparser was not present before 11.0 %if 0%{?suse_version} >= 1100 BuildRequires: liburiparser-devel %endif BuildRequires: pam-devel Requires: vmware-guest-kmp Supplements: modalias(pci:v000015ADd*sv*sd*bc*sc*i*) Requires(pre): %fillup_prereq Requires(pre): %insserv_prereq Requires(pre): permissions ExclusiveArch: %ix86 x86_64 %suse_kernel_module_package -n vmware-guest -p %{SOURCE98} xen um %description Open Virtual Machine Tools (open-vm-tools) are the open source implementation of VMware Tools. They are a set of guest operating system virtualization components that enhance performance and user experience of virtual machines. As virtualization technology rapidly becomes mainstream, each virtualization solution provider implements their own set of tools and utilities to supplement the guest virtual machine. However, most of the implementations are proprietary and are tied to a specific virtualization platform. With the Open Virtual Machine Tools project, we are hoping to solve this and other related problems. The tools are currently composed of kernel modules for Linux and user-space programs for all VMware supported Unix-like guest operating systems. They provide several useful functions like: * File transfer between a host and guest * Improved memory management and network performance under virtualization * General mechanisms and protocols for communication between host and guests and from guest to guest %package -n vmware-guest-KMP License: BSD3c ; GPLv2 ; LGPLv2.1 Summary: Open Virtual Machine Tools - for VM GUESTS Group: System/Emulators/PC %description -n vmware-guest-KMP Open Virtual Machine Tools (open-vm-tools) are the open source implementation of VMware Tools. They are a set of guest operating system virtualization components that enhance performance and user experience of virtual machines. As virtualization technology rapidly becomes mainstream, each virtualization solution provider implements their own set of tools and utilities to supplement the guest virtual machine. However, most of the implementations are proprietary and are tied to a specific virtualization platform. With the Open Virtual Machine Tools project, we are hoping to solve this and other related problems. The tools are currently composed of kernel modules for Linux and user-space programs for all VMware supported Unix-like guest operating systems. They provide several useful functions like: * File transfer between a host and guest * Improved memory management and network performance under virtualization * General mechanisms and protocols for communication between host and guests and from guest to guest %if %{with_X} %package gui License: BSD3c ; GPLv2 ; LGPLv2.1 Summary: Open Virtual Machine Tools - GUI Group: System/Emulators/PC Requires: open-vm-tools Supplements: packageand(open-vm-tools:xorg-x11) Requires(pre): permissions %description gui GUI Toolbox for Open Virtual Machine Tools %endif %package -n libvmtools0 License: BSD3c ; GPLv2 ; LGPLv2.1 Summary: Open Virtual Machine Tools - shared library Group: System/Libraries %description -n libvmtools0 This is a shared library used by several Open VM Tools components, such as vmware-toolbox-cmd and vmtoolsd (and its plugins). %package -n libvmtools-devel License: BSD3c ; GPLv2 ; LGPLv2.1 Summary: Open Virtual Machine Tools - Development headers Group: Development Requires: libvmtools0 = %{version} %description -n libvmtools-devel Those are the development headers for libvmtools. They are needed if you intend to create own plugins for vmtoolsd. %prep %setup -q -n %{name}-%{version}-%{svn_rev} %patch0 -p0 chmod -x AUTHORS COPYING ChangeLog NEWS README # fix for an rpmlint warning regarding wrong line feeds sed -i -e "s/\r//" README %build # disable warning unused-but-set-variable which will raise error because of -Werror export CFLAGS="%{optflags} -Wno-unused-but-set-variable" # comments in a continued line seem not to work... shame # --disable-unity : liburiparser was not present before 11.0 %configure \ %if 0%{?suse_version} < 1140 --disable-unity \ %endif --without-kernel-modules \ --without-root-privileges \ --without-procps \ %if %{with_X} --with-x \ %else --without-x \ %endif --disable-dependency-tracking \ --disable-static make TOPDIR=$PWD cd .. mkdir -p obj for flavor in %{flavors_to_build}; do rm -rf obj/$flavor cp -r %{name}-%{version}-%{svn_rev} obj/$flavor pushd obj/$flavor for module in %{vm_modules}; do pushd modules/linux/$module 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 popd done popd done %install # let's use the kernel's own modules_install routine export INSTALL_MOD_PATH=%{buildroot} export INSTALL_MOD_DIR=updates pushd .. for flavor in %{flavors_to_build}; do pushd obj/$flavor for module in %{vm_modules}; do make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install M=$PWD/modules/linux/$module done popd done popd # fix some rights on the kernel modules, to have a complete -debuginfo package chmod u+x %{buildroot}/lib/modules/*/updates/* %make_install # Clean up the *.la files make install put all around find %{buildroot} -name '*.la' -delete -print # install the vmtoolsd init script and also it's rcvmtoolsd softlink install -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/vmtoolsd ln -sf ../../etc/init.d/vmtoolsd %{buildroot}%{_sbindir}/rcvmtoolsd %if %{with_X} # vmware-user is started by vmware-user-suid-wrapper by xdg-autostart # unfortunately, vmware-user-suid-wrapper does not wait for it's block device # to appear. For this reason we have now a vmware-user-autostart-wrapper # which checks for /proc/fs/vmblock/dev to appear and then starts vmware-user-suid-wrapper install -D -m 0755 %{SOURCE5} %{buildroot}%{_bindir}/vmware-user-autostart-wrapper install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/xdg/autostart/vmware-user-autostart.desktop # In case we install vmware-user-suid-wrapper, we need to give it 4755 permissions. install -D -m 0644 %{S:4} %{buildroot}%{_sysconfdir}/permissions.d/open-vm-tools # We have our own 'safe' autostart wrapper, which checks for modules to start in autologin mode... # Thus we drop the 'original' autostartup rm %{buildroot}%{_sysconfdir}/xdg/autostart/vmware-user.desktop # handle the .destop files for translations %suse_update_desktop_file vmware-user-autostart %endif # modprobe configuration for vmnics. install -D -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/modprobe.d/50-vmnics.conf # fix a link pointing to the buildroot for mount.vmhgfs ( cd %{buildroot}/sbin; rm mount.vmhgfs; ln -s ..%{_sbindir}/mount.vmhgfs ) # 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. rm -r %{buildroot}%{_datadir}/%{name} %post %run_permissions /sbin/ldconfig %{fillup_and_insserv -Y vmtoolsd} %if %{with_X} %verifyscript gui %verify_permissions %post gui %run_permissions %endif %preun # stop service with the old name (if exists) on update (something like %%stop_on_update) test -n "$FIRST_ARG" || FIRST_ARG=$1 if test "$FIRST_ARG" -ge 1 ; then test -f /etc/sysconfig/services && . /etc/sysconfig/services if test "$YAST_IS_RUNNING" != "instsys" ; then /etc/init.d/vmware-guestd stop &> /dev/null || : fi fi %stop_on_removal vmtoolsd %postun %restart_on_update vmtoolsd %insserv_cleanup /sbin/ldconfig %post -n libvmtools0 -p /sbin/ldconfig %postun -n libvmtools0 -p /sbin/ldconfig %clean rm -rf %{buildroot} %files %defattr(-, root, root) %doc AUTHORS COPYING ChangeLog NEWS README %{_bindir}/vmtoolsd %dir %{_libdir}/%{name} %dir %{_libdir}/%{name}/plugins %dir %{_libdir}/%{name}/plugins/common %dir %{_libdir}/%{name}/plugins/vmsvc %if %{with_X} %dir %{_libdir}/%{name}/plugins/vmusr %endif %{_libdir}/%{name}/plugins/vmsvc/libguestInfo.so %{_libdir}/%{name}/plugins/vmsvc/libpowerOps.so %{_libdir}/%{name}/plugins/vmsvc/libtimeSync.so %{_libdir}/%{name}/plugins/vmsvc/libvmbackup.so %{_libdir}/%{name}/plugins/common/libhgfsServer.so %{_libdir}/%{name}/plugins/common/libvix.so %{_bindir}/vmware-checkvm %{_bindir}/vmware-hgfsclient %{_bindir}/vmware-rpctool %{_bindir}/vmware-toolbox-cmd %{_bindir}/vmware-xferlogs %{_sbindir}/mount.vmhgfs /sbin/mount.vmhgfs %config(noreplace) %{_sysconfdir}/pam.d/vmtoolsd %{_sysconfdir}/vmware-tools %{_sysconfdir}/init.d/vmtoolsd %{_sysconfdir}/modprobe.d/50-vmnics.conf %{_sbindir}/rcvmtoolsd %exclude %{_libdir}/*.so %if %{with_X} %files gui %defattr(-, root, root) %{_bindir}/vmware-toolbox %{_sysconfdir}/xdg/autostart/vmware-user-autostart.desktop %{_sysconfdir}/permissions.d/open-vm-tools %verify(not mode) %attr(0755,root,root) %{_bindir}/vmware-user-suid-wrapper %{_libdir}/%{name}/plugins/vmusr/libdesktopEvents.so %{_libdir}/%{name}/plugins/vmusr/libdndcp.so %{_libdir}/%{name}/plugins/vmusr/libresolutionSet.so %if 0%{?suse_version} >= 1140 %{_libdir}/%{name}/plugins/vmusr/libunity.so %endif %{_libdir}/%{name}/plugins/vmusr/libvixUser.so %{_bindir}/vmware-user-autostart-wrapper %endif %files -n libvmtools0 %defattr(-, root, root) %{_libdir}/libvmtools.so.* %{_libdir}/libguestlib.so.* %{_libdir}/libhgfs.so.* %files -n libvmtools-devel %defattr(-,root,root) %{_includedir}/vmGuestLib %{_libdir}/*.so %{_libdir}/pkgconfig/vmguestlib.pc %changelog