2008-04-24 01:47:24 +02:00
|
|
|
#
|
2011-04-29 12:44:49 +02:00
|
|
|
# spec file for package open-vm-tools
|
2008-04-24 01:47:24 +02:00
|
|
|
#
|
2014-03-26 16:03:45 +01:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-09-22 11:33:11 +02:00
|
|
|
# Copyright (c) 2010 Dominique Leuenberger, Amsterdam, Netherlands.
|
2008-04-24 01:47:24 +02:00
|
|
|
#
|
2008-09-06 02:58:45 +02:00
|
|
|
# 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.
|
|
|
|
|
2008-04-24 01:47:24 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-06-09 11:04:40 +02:00
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
%define with_systemd 1
|
|
|
|
|
2014-11-10 17:06:43 +01:00
|
|
|
# The vmhgfs modules is used with all versions
|
2013-09-10 22:13:52 +02:00
|
|
|
%define vmhgfs vmhgfs
|
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
# disable systemd if before 13.1
|
|
|
|
%if 0%{suse_version} < 1310
|
|
|
|
%define with_systemd 0
|
|
|
|
%endif
|
|
|
|
|
2010-03-05 11:55:11 +01:00
|
|
|
# exclude AMD PCnet32 LANCE pci.id from Supplements list [bnc#397554]
|
2008-06-24 00:14:21 +02:00
|
|
|
%define __find_supplements sh -c '/usr/lib/rpm/find-supplements %{name} | grep -v pci:v00001022d00002000'
|
2010-06-07 09:45:04 +02:00
|
|
|
|
2014-10-08 09:10:20 +02:00
|
|
|
%if 0%{?suse_version} <= 1230
|
|
|
|
# Modules to be built up to openSUSE 12.3, possibly not building on newer versions.
|
|
|
|
%define vm_modules1230 vmci vsock
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?suse_version} <= 1220
|
2012-02-05 19:33:18 +01:00
|
|
|
# Modules to be built up to openSUSE 12.1, possibly not building on newer versions.
|
2014-10-08 09:10:20 +02:00
|
|
|
%define vm_modules1220 vmsync
|
2012-02-05 19:33:18 +01:00
|
|
|
%endif
|
|
|
|
|
2014-10-08 09:10:20 +02:00
|
|
|
%if 0%{?suse_version} <= 1210
|
|
|
|
# Modules to be built up to openSUSE 12.1, possibly not building on newer versions.
|
|
|
|
%define vm_modules1210 vmxnet
|
2013-05-13 17:46:57 +02:00
|
|
|
%endif
|
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
# Modules that have to be build up to version 12.3 (Last checked on 2012-02-05 with kernel 3.2.0)
|
2014-10-08 09:10:20 +02:00
|
|
|
%define vm_modules %{?vm_modules1230} %{?vmhgfs} %{?vm_modules1210} %{?vm_modules1220}
|
2010-11-25 15:06:18 +01:00
|
|
|
|
2011-04-14 22:37:34 +02:00
|
|
|
# X modules are lower prio upstream and once in a while fail. Offer an easy way to enable/disable them.
|
2010-12-22 10:17:01 +01:00
|
|
|
%define with_X 1
|
2010-11-25 15:06:18 +01:00
|
|
|
|
2008-04-24 01:47:24 +02:00
|
|
|
Name: open-vm-tools
|
2014-10-08 09:10:20 +02:00
|
|
|
Version: 9.4.6
|
2012-02-05 19:33:18 +01:00
|
|
|
Release: 0
|
2014-10-08 09:10:20 +02:00
|
|
|
%define svn_rev 1770165
|
2011-05-25 16:31:38 +02:00
|
|
|
Summary: Open Virtual Machine Tools
|
2013-03-04 20:21:05 +01:00
|
|
|
License: BSD-3-Clause and GPL-2.0 and LGPL-2.1
|
2011-05-25 16:31:38 +02:00
|
|
|
Group: System/Emulators/PC
|
2012-02-05 19:33:18 +01:00
|
|
|
Url: http://open-vm-tools.sourceforge.net/
|
2014-03-26 16:03:45 +01:00
|
|
|
Source: http://sourceforge.net/projects/open-vm-tools/files/open-vm-tools/stable-9.4.x/%{name}-%{version}-%{svn_rev}.tar.gz
|
2009-06-10 15:30:14 +02:00
|
|
|
Source1: vmtoolsd
|
2014-03-26 16:03:45 +01:00
|
|
|
Source2: vmtoolsd.service
|
|
|
|
Source3: vmware-user-autostart.desktop
|
2009-06-10 15:30:14 +02:00
|
|
|
Source5: vmware-user-autostart-wrapper
|
2010-03-23 22:27:15 +01:00
|
|
|
Source6: open-vm-tools-modprobe.conf
|
2012-04-06 20:11:26 +02:00
|
|
|
Source7: tools.conf
|
2009-06-10 15:30:14 +02:00
|
|
|
Source98: preamble
|
2014-11-10 17:06:43 +01:00
|
|
|
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
|
2014-05-18 15:10:04 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2008-09-06 02:58:45 +02:00
|
|
|
BuildRequires: gcc-c++
|
2011-05-31 13:30:28 +02:00
|
|
|
# don't use pkgconfig(gtk+-2.0) so we can build on SLE
|
|
|
|
BuildRequires: gtk2-devel
|
2011-05-25 16:31:38 +02:00
|
|
|
BuildRequires: gtkmm2-devel
|
2014-03-26 16:03:45 +01:00
|
|
|
# Only require kernel packages if kernel modules are being built
|
|
|
|
%if "%{?vm_modules}" != " "
|
2009-06-10 15:30:14 +02:00
|
|
|
BuildRequires: kernel-source
|
|
|
|
BuildRequires: kernel-syms
|
2014-03-26 16:03:45 +01:00
|
|
|
%endif
|
2014-10-08 09:10:20 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2014-03-26 16:03:45 +01:00
|
|
|
BuildRequires: doxygen
|
2009-06-10 15:30:14 +02:00
|
|
|
BuildRequires: libdnet-devel
|
|
|
|
BuildRequires: libicu-devel
|
2014-10-08 09:10:20 +02:00
|
|
|
BuildRequires: libtool
|
2011-05-25 16:31:38 +02:00
|
|
|
BuildRequires: module-init-tools
|
2014-05-18 15:10:04 +02:00
|
|
|
BuildRequires: pam-devel
|
2009-06-10 15:30:14 +02:00
|
|
|
BuildRequires: pcre-devel
|
|
|
|
BuildRequires: update-desktop-files
|
|
|
|
BuildRequires: xorg-x11-devel
|
2012-10-12 11:40:39 +02:00
|
|
|
BuildRequires: pkgconfig(fuse)
|
2014-03-26 16:03:45 +01:00
|
|
|
# libprocps is required with 12.3 and above
|
|
|
|
%if 0%{?suse_version} >= 1230
|
|
|
|
BuildRequires: procps-devel
|
2008-09-06 02:58:45 +02:00
|
|
|
%endif
|
2013-09-10 22:18:23 +02:00
|
|
|
%if "%{?vmhgfs}"
|
2014-03-26 16:03:45 +01:00
|
|
|
# Fuse is optional and enables vmblock-fuse
|
|
|
|
BuildRequires: fuse-devel
|
2013-09-10 22:13:52 +02:00
|
|
|
%endif
|
2014-05-18 15:10:04 +02:00
|
|
|
Requires: net-tools
|
|
|
|
Requires: tar
|
2014-10-08 09:10:20 +02:00
|
|
|
%if 0%{?suse_version} >= 1310
|
2014-05-18 15:10:04 +02:00
|
|
|
Requires: which
|
2014-10-08 09:10:20 +02:00
|
|
|
%endif
|
2014-05-18 15:10:04 +02:00
|
|
|
%if 0%{?suse_version} < 1310
|
|
|
|
Requires: vmware-guest-kmp
|
|
|
|
%endif
|
2008-06-24 00:14:21 +02:00
|
|
|
Supplements: modalias(pci:v000015ADd*sv*sd*bc*sc*i*)
|
2011-05-25 16:31:38 +02:00
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
Requires(pre): %insserv_prereq
|
|
|
|
Requires(pre): permissions
|
|
|
|
ExclusiveArch: %ix86 x86_64
|
2010-11-25 15:06:18 +01:00
|
|
|
|
2009-06-10 15:30:14 +02:00
|
|
|
%suse_kernel_module_package -n vmware-guest -p %{SOURCE98} xen um
|
2008-04-24 01:47:24 +02:00
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
%if %{with_systemd}
|
|
|
|
%systemd_requires
|
|
|
|
%endif
|
|
|
|
|
2008-04-24 01:47:24 +02:00
|
|
|
%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
|
|
|
|
|
2009-06-10 15:30:14 +02:00
|
|
|
%package -n vmware-guest-KMP
|
2009-08-10 18:23:51 +02:00
|
|
|
Summary: Open Virtual Machine Tools - for VM GUESTS
|
2008-04-24 01:47:24 +02:00
|
|
|
Group: System/Emulators/PC
|
|
|
|
|
2009-06-10 15:30:14 +02:00
|
|
|
%description -n vmware-guest-KMP
|
2008-04-24 01:47:24 +02:00
|
|
|
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
|
|
|
|
|
2011-05-25 16:31:38 +02:00
|
|
|
%if %{with_X}
|
2010-11-29 17:11:33 +01:00
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
%package desktop
|
|
|
|
Summary: User experience components for Open Virtual Machine Tools
|
2008-09-06 02:58:45 +02:00
|
|
|
Group: System/Emulators/PC
|
2014-03-26 16:03:45 +01:00
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
Obsoletes: %{name}-gui < %{version}
|
|
|
|
Provides: %{name}-gui = %{version}
|
2013-11-02 14:43:52 +01:00
|
|
|
Supplements: packageand(open-vm-tools:xorg-x11-server)
|
2011-05-25 16:31:38 +02:00
|
|
|
Requires(pre): permissions
|
2008-09-06 02:58:45 +02:00
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
%description desktop
|
|
|
|
This package contains only the user-space programs and libraries of
|
|
|
|
%{name} that are essential for improved user experience of VMware virtual
|
|
|
|
machines.
|
2010-11-25 15:06:18 +01:00
|
|
|
%endif
|
2008-09-06 02:58:45 +02:00
|
|
|
|
2009-06-10 15:30:14 +02:00
|
|
|
%package -n libvmtools0
|
2009-08-10 18:23:51 +02:00
|
|
|
Summary: Open Virtual Machine Tools - shared library
|
|
|
|
Group: System/Libraries
|
2009-06-10 15:30:14 +02:00
|
|
|
|
|
|
|
%description -n libvmtools0
|
2011-05-25 16:31:38 +02:00
|
|
|
This is a shared library used by several Open VM Tools components,
|
2009-08-10 18:23:51 +02:00
|
|
|
such as vmware-toolbox-cmd and vmtoolsd (and its plugins).
|
2009-06-10 15:30:14 +02:00
|
|
|
|
2009-08-10 18:23:51 +02:00
|
|
|
%package -n libvmtools-devel
|
|
|
|
Summary: Open Virtual Machine Tools - Development headers
|
|
|
|
Group: Development
|
|
|
|
Requires: libvmtools0 = %{version}
|
2009-06-10 15:30:14 +02:00
|
|
|
|
2009-08-10 18:23:51 +02:00
|
|
|
%description -n libvmtools-devel
|
|
|
|
Those are the development headers for libvmtools. They are needed
|
|
|
|
if you intend to create own plugins for vmtoolsd.
|
2009-06-10 15:30:14 +02:00
|
|
|
|
2008-04-24 01:47:24 +02:00
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{version}-%{svn_rev}
|
|
|
|
chmod -x AUTHORS COPYING ChangeLog NEWS README
|
2009-06-10 15:30:14 +02:00
|
|
|
# fix for an rpmlint warning regarding wrong line feeds
|
|
|
|
sed -i -e "s/\r//" README
|
2014-11-10 17:06:43 +01:00
|
|
|
%patch1 -p2
|
|
|
|
%patch2 -p2
|
|
|
|
%patch3 -p2
|
|
|
|
%patch4 -p2
|
|
|
|
%patch5 -p2
|
|
|
|
%patch6 -p2
|
|
|
|
%patch7 -p2
|
|
|
|
%patch8 -p2
|
2008-04-24 01:47:24 +02:00
|
|
|
|
|
|
|
%build
|
2011-05-31 13:30:28 +02:00
|
|
|
# disable warning unused-but-set-variable which will raise error because of -Werror
|
2012-01-25 14:37:25 +01:00
|
|
|
# disable warning deprecated-declarations which will raise error because of -Werror
|
2014-10-08 09:10:20 +02:00
|
|
|
# disable warning sizeof-pointer-memaccess which will raise error because of -Werror
|
2012-01-25 14:37:25 +01:00
|
|
|
# (this is because of 'g_static_mutex_init' usage which is now deprecated)
|
2012-02-04 15:20:18 +01:00
|
|
|
%if 0%{?suse_version} > 1110
|
2014-10-20 17:36:02 +02:00
|
|
|
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"
|
2012-02-04 15:20:18 +01:00
|
|
|
%else
|
|
|
|
export CFLAGS="%{optflags} -Wno-deprecated-declarations -fPIE"
|
2014-03-26 16:03:45 +01:00
|
|
|
export CXXFLAGS="%{optflags} -Wno-deprecated-declarations -fPIE"
|
2012-02-04 15:20:18 +01:00
|
|
|
%endif
|
2012-01-24 17:53:12 +01:00
|
|
|
export LDFLAGS="-pie"
|
2014-03-26 16:03:45 +01:00
|
|
|
# Required for version 9.4.0
|
|
|
|
export CUSTOM_PROCPS_NAME=procps
|
2014-10-08 09:10:20 +02:00
|
|
|
autoreconf -fi
|
2014-10-31 09:19:19 +01:00
|
|
|
echo 'HTML_TIMESTAMP=NO' >> docs/api/doxygen.conf
|
2008-09-06 02:58:45 +02:00
|
|
|
%configure \
|
|
|
|
--without-kernel-modules \
|
2009-06-10 15:30:14 +02:00
|
|
|
--without-root-privileges \
|
2014-03-26 16:03:45 +01:00
|
|
|
%if 0%{?suse_version} < 1230
|
2008-09-06 02:58:45 +02:00
|
|
|
--without-procps \
|
2014-03-26 16:03:45 +01:00
|
|
|
%endif
|
2011-05-25 16:31:38 +02:00
|
|
|
%if %{with_X}
|
2010-11-25 15:06:18 +01:00
|
|
|
--with-x \
|
|
|
|
%else
|
|
|
|
--without-x \
|
|
|
|
%endif
|
2009-06-10 15:30:14 +02:00
|
|
|
--disable-dependency-tracking \
|
|
|
|
--disable-static
|
2008-04-24 01:47:24 +02:00
|
|
|
make
|
2010-03-05 11:55:11 +01:00
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
# If a KMP is not being built, flavors_to_build will be undefined and no modules should be built
|
|
|
|
%if "%{?flavors_to_build}"
|
2009-06-10 15:30:14 +02:00
|
|
|
TOPDIR=$PWD
|
2008-04-24 01:47:24 +02:00
|
|
|
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
|
2008-04-28 15:39:39 +02:00
|
|
|
for module in %{vm_modules}; do
|
|
|
|
pushd modules/linux/$module
|
2012-04-06 20:11:26 +02:00
|
|
|
if [ -f ../vmci/Module.symvers ]; then
|
|
|
|
cp ../vmci/Module.symvers .
|
|
|
|
fi
|
2009-06-10 15:30:14 +02:00
|
|
|
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
|
2008-04-28 15:39:39 +02:00
|
|
|
popd
|
|
|
|
done
|
2008-04-24 01:47:24 +02:00
|
|
|
popd
|
|
|
|
done
|
2014-03-26 16:03:45 +01:00
|
|
|
%endif
|
2008-04-24 01:47:24 +02:00
|
|
|
|
|
|
|
%install
|
2014-03-26 16:03:45 +01:00
|
|
|
# If a KMP is not being built, flavors_to_build will be undefined and no modules can be installed
|
|
|
|
%if "%{?flavors_to_build}"
|
2008-04-24 01:47:24 +02:00
|
|
|
# let's use the kernel's own modules_install routine
|
2011-05-25 16:31:38 +02:00
|
|
|
export INSTALL_MOD_PATH=%{buildroot}
|
2008-04-24 01:47:24 +02:00
|
|
|
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
|
2010-03-05 11:55:11 +01:00
|
|
|
|
2013-09-10 22:13:52 +02:00
|
|
|
# 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/* || :
|
2014-03-26 16:03:45 +01:00
|
|
|
%endif
|
2010-03-05 11:55:11 +01:00
|
|
|
|
2012-02-04 15:20:18 +01:00
|
|
|
%if 0%{?suse_version} > 1110
|
2011-05-25 16:31:38 +02:00
|
|
|
%make_install
|
2012-02-04 15:20:18 +01:00
|
|
|
%else
|
|
|
|
%makeinstall
|
|
|
|
%endif
|
2010-03-05 11:55:11 +01:00
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
# Remove exec bit from config files
|
|
|
|
chmod a-x %{buildroot}%{_sysconfdir}/pam.d/*
|
|
|
|
|
|
|
|
# Remove unnecessary files from packaging
|
|
|
|
find %{buildroot}%{_libdir} -name '*.la' -delete
|
|
|
|
rm -fr %{buildroot}%{_defaultdocdir}
|
|
|
|
rm -fr %{buildroot}/usr/share/doc/open-vm-tools/api
|
|
|
|
rm -f docs/api/build/html/FreeSans.ttf
|
|
|
|
|
2014-05-18 15:10:04 +02:00
|
|
|
# Move vm-support to /usr/bin (bnc#874931)
|
|
|
|
mv %{buildroot}%{_sysconfdir}/vmware-tools/vm-support %{buildroot}%{_bindir}
|
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
# install systemd/sysvinit init scripts and symlinks
|
|
|
|
%if %{with_systemd}
|
|
|
|
install -p -m 644 -D %{SOURCE2} %{buildroot}%{_unitdir}/vmtoolsd.service
|
|
|
|
ln -sf service %{buildroot}%{_sbindir}/rcvmtoolsd
|
|
|
|
%else
|
2011-05-25 16:31:38 +02:00
|
|
|
install -D -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/vmtoolsd
|
|
|
|
ln -sf ../../etc/init.d/vmtoolsd %{buildroot}%{_sbindir}/rcvmtoolsd
|
2014-03-26 16:03:45 +01:00
|
|
|
%endif
|
2010-03-05 11:55:11 +01:00
|
|
|
|
2011-05-25 16:31:38 +02:00
|
|
|
%if %{with_X}
|
2009-06-10 15:30:14 +02:00
|
|
|
# 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
|
2011-05-25 16:31:38 +02:00
|
|
|
install -D -m 0755 %{SOURCE5} %{buildroot}%{_bindir}/vmware-user-autostart-wrapper
|
2014-03-26 16:03:45 +01:00
|
|
|
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/xdg/autostart/vmware-user-autostart.desktop
|
2011-09-22 08:49:08 +02:00
|
|
|
|
2012-04-06 20:11:26 +02:00
|
|
|
# Install the default tools.conf
|
|
|
|
install -D -m 0644 %{S:7} %{buildroot}%{_sysconfdir}/vmware-tools/tools.conf
|
2014-03-26 16:03:45 +01:00
|
|
|
# Remove the 'disable-perl-mon=1' setting if procps is available
|
|
|
|
%if 0%{?suse_version} > 1220
|
|
|
|
sed -i '/openSUSE/,+2d' %{buildroot}%{_sysconfdir}/vmware-tools/tools.conf
|
|
|
|
%endif
|
2011-09-22 08:49:08 +02:00
|
|
|
|
2010-12-22 10:17:01 +01:00
|
|
|
# We have our own 'safe' autostart wrapper, which checks for modules to start in autologin mode...
|
|
|
|
# Thus we drop the 'original' autostartup
|
2011-05-25 16:31:38 +02:00
|
|
|
rm %{buildroot}%{_sysconfdir}/xdg/autostart/vmware-user.desktop
|
2010-03-05 11:55:11 +01:00
|
|
|
|
2009-06-10 15:30:14 +02:00
|
|
|
# handle the .destop files for translations
|
|
|
|
%suse_update_desktop_file vmware-user-autostart
|
2010-11-25 15:06:18 +01:00
|
|
|
%endif
|
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
# modprobe configuration for vmnics - only include if before SLE-12
|
|
|
|
%if 0%{?suse_version} < 1315
|
2011-05-25 16:31:38 +02:00
|
|
|
install -D -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/modprobe.d/50-vmnics.conf
|
2014-03-26 16:03:45 +01:00
|
|
|
%endif
|
2010-03-05 11:55:11 +01:00
|
|
|
|
2013-09-10 22:18:23 +02:00
|
|
|
%if "%{?vmhgfs}"
|
2009-06-10 15:30:14 +02:00
|
|
|
# fix a link pointing to the buildroot for mount.vmhgfs
|
|
|
|
( cd %{buildroot}/sbin; rm mount.vmhgfs; ln -s ..%{_sbindir}/mount.vmhgfs )
|
2013-09-10 22:13:52 +02:00
|
|
|
%else
|
|
|
|
find %{buildroot} -name '*vmhgfs*' -delete -print
|
|
|
|
%endif
|
2010-03-05 11:55:11 +01:00
|
|
|
|
2014-05-14 19:06:32 +02:00
|
|
|
%pre
|
|
|
|
%if %{with_systemd}
|
|
|
|
%service_add_pre vmtoolsd.service
|
|
|
|
%endif
|
|
|
|
|
2008-04-24 01:47:24 +02:00
|
|
|
%post
|
2014-11-11 13:26:59 +01:00
|
|
|
%if 0%{?suse_version} <= 1130
|
|
|
|
%run_permissions
|
|
|
|
%else
|
|
|
|
%set_permissions /usr/bin/vmware-user-suid-wrapper
|
|
|
|
%endif
|
2008-04-24 01:47:24 +02:00
|
|
|
/sbin/ldconfig
|
2014-03-26 16:03:45 +01:00
|
|
|
%if %{with_systemd}
|
|
|
|
%service_add_post vmtoolsd.service
|
|
|
|
%else
|
2009-06-10 15:30:14 +02:00
|
|
|
%{fillup_and_insserv -Y vmtoolsd}
|
2014-03-26 16:03:45 +01:00
|
|
|
%endif
|
2010-03-05 11:55:11 +01:00
|
|
|
|
2011-05-25 16:31:38 +02:00
|
|
|
%if %{with_X}
|
2011-09-22 11:33:11 +02:00
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
%verifyscript desktop
|
2011-09-22 11:33:11 +02:00
|
|
|
%verify_permissions -e /usr/bin/vmware-user-suid-wrapper
|
2008-04-24 01:47:24 +02:00
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
%post desktop
|
2011-09-22 11:33:11 +02:00
|
|
|
%if 0%{?suse_version} <= 1130
|
2009-06-10 15:30:14 +02:00
|
|
|
%run_permissions
|
2011-09-22 11:33:11 +02:00
|
|
|
%else
|
|
|
|
%set_permissions /usr/bin/vmware-user-suid-wrapper
|
|
|
|
%endif
|
|
|
|
|
2010-11-25 15:06:18 +01:00
|
|
|
%endif
|
2009-06-10 15:30:14 +02:00
|
|
|
|
2008-04-24 01:47:24 +02:00
|
|
|
%preun
|
2014-03-26 16:03:45 +01:00
|
|
|
%if %{with_systemd}
|
|
|
|
%service_del_preun vmtoolsd.service
|
|
|
|
%else
|
2010-11-25 15:06:18 +01:00
|
|
|
# stop service with the old name (if exists) on update (something like %%stop_on_update)
|
2009-06-10 15:30:14 +02:00
|
|
|
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
|
2014-11-10 16:11:53 +01:00
|
|
|
/etc/init.d/vmware-guestd stop > /dev/null 2>&1 || :
|
2009-06-10 15:30:14 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
%stop_on_removal vmtoolsd
|
2014-03-26 16:03:45 +01:00
|
|
|
%endif
|
2014-05-18 15:10:04 +02:00
|
|
|
# Tell VMware that open-vm-tools is being uninstalled
|
|
|
|
if [ "$1" = "0" -a \
|
|
|
|
-e %{_bindir}/vmware-checkvm -a \
|
|
|
|
-e %{_bindir}/vmware-rpctool ] && \
|
2014-11-10 16:11:53 +01:00
|
|
|
%{_bindir}/vmware-checkvm > /dev/null 2>&1; then
|
|
|
|
%{_bindir}/vmware-rpctool 'tools.set.version 0' > /dev/null 2>&1 || true
|
2014-05-18 15:10:04 +02:00
|
|
|
fi
|
2008-04-24 01:47:24 +02:00
|
|
|
|
|
|
|
%postun
|
2014-03-26 16:03:45 +01:00
|
|
|
%if %{with_systemd}
|
|
|
|
%service_del_postun vmtoolsd.service
|
|
|
|
%else
|
2009-06-10 15:30:14 +02:00
|
|
|
%restart_on_update vmtoolsd
|
2008-04-24 01:47:24 +02:00
|
|
|
%insserv_cleanup
|
2014-03-26 16:03:45 +01:00
|
|
|
%endif
|
2008-04-24 01:47:24 +02:00
|
|
|
/sbin/ldconfig
|
|
|
|
|
2009-06-10 15:30:14 +02:00
|
|
|
%post -n libvmtools0 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -n libvmtools0 -p /sbin/ldconfig
|
|
|
|
|
2008-04-24 01:47:24 +02:00
|
|
|
%clean
|
2009-08-10 18:23:51 +02:00
|
|
|
rm -rf %{buildroot}
|
2008-04-24 01:47:24 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%doc AUTHORS COPYING ChangeLog NEWS README
|
2009-06-10 15:30:14 +02:00
|
|
|
%{_bindir}/vmtoolsd
|
|
|
|
%dir %{_libdir}/%{name}
|
|
|
|
%dir %{_libdir}/%{name}/plugins
|
2010-01-09 11:48:58 +01:00
|
|
|
%dir %{_libdir}/%{name}/plugins/common
|
2009-06-10 15:30:14 +02:00
|
|
|
%dir %{_libdir}/%{name}/plugins/vmsvc
|
|
|
|
%{_libdir}/%{name}/plugins/vmsvc/libguestInfo.so
|
|
|
|
%{_libdir}/%{name}/plugins/vmsvc/libpowerOps.so
|
|
|
|
%{_libdir}/%{name}/plugins/vmsvc/libtimeSync.so
|
|
|
|
%{_libdir}/%{name}/plugins/vmsvc/libvmbackup.so
|
2010-01-09 11:48:58 +01:00
|
|
|
%{_libdir}/%{name}/plugins/common/libhgfsServer.so
|
|
|
|
%{_libdir}/%{name}/plugins/common/libvix.so
|
2009-06-10 15:30:14 +02:00
|
|
|
%{_bindir}/vmware-checkvm
|
|
|
|
%{_bindir}/vmware-hgfsclient
|
|
|
|
%{_bindir}/vmware-rpctool
|
|
|
|
%{_bindir}/vmware-toolbox-cmd
|
|
|
|
%{_bindir}/vmware-xferlogs
|
2014-05-18 15:10:04 +02:00
|
|
|
%{_bindir}/vm-support
|
2013-09-10 22:18:23 +02:00
|
|
|
%if "%{?vmhgfs}"
|
2009-06-10 15:30:14 +02:00
|
|
|
%{_sbindir}/mount.vmhgfs
|
|
|
|
/sbin/mount.vmhgfs
|
2013-09-10 22:13:52 +02:00
|
|
|
%endif
|
2009-06-10 15:30:14 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/pam.d/vmtoolsd
|
2012-04-06 20:11:26 +02:00
|
|
|
%dir %{_sysconfdir}/vmware-tools
|
|
|
|
%dir %{_sysconfdir}/vmware-tools/scripts
|
|
|
|
%dir %{_sysconfdir}/vmware-tools/scripts/vmware
|
|
|
|
%{_sysconfdir}/vmware-tools/poweroff-vm-default
|
|
|
|
%{_sysconfdir}/vmware-tools/poweron-vm-default
|
|
|
|
%{_sysconfdir}/vmware-tools/resume-vm-default
|
|
|
|
%{_sysconfdir}/vmware-tools/scripts/vmware/network
|
|
|
|
%{_sysconfdir}/vmware-tools/statechange.subr
|
|
|
|
%{_sysconfdir}/vmware-tools/suspend-vm-default
|
|
|
|
%config(noreplace) %{_sysconfdir}/vmware-tools/tools.conf
|
2014-03-26 16:03:45 +01:00
|
|
|
%if 0%{?suse_version} < 1315
|
|
|
|
%config %{_sysconfdir}/modprobe.d/50-vmnics.conf
|
|
|
|
%endif
|
|
|
|
%{_datadir}/%{name}/
|
|
|
|
%if %{with_systemd}
|
|
|
|
%{_unitdir}/vmtoolsd.service
|
|
|
|
%else
|
2009-06-10 15:30:14 +02:00
|
|
|
%{_sysconfdir}/init.d/vmtoolsd
|
2014-03-26 16:03:45 +01:00
|
|
|
%endif
|
2009-06-10 15:30:14 +02:00
|
|
|
%{_sbindir}/rcvmtoolsd
|
|
|
|
%exclude %{_libdir}/*.so
|
2008-09-06 02:58:45 +02:00
|
|
|
|
2011-05-25 16:31:38 +02:00
|
|
|
%if %{with_X}
|
2010-11-29 17:11:33 +01:00
|
|
|
|
2014-03-26 16:03:45 +01:00
|
|
|
%files desktop
|
2008-09-06 02:58:45 +02:00
|
|
|
%defattr(-, root, root)
|
2009-06-10 15:30:14 +02:00
|
|
|
%{_sysconfdir}/xdg/autostart/vmware-user-autostart.desktop
|
2014-11-12 00:37:11 +01:00
|
|
|
%verify(not mode) %{_bindir}/vmware-user-suid-wrapper
|
2014-03-26 16:03:45 +01:00
|
|
|
%{_libdir}/%{name}/plugins/vmusr/
|
2010-11-25 15:06:18 +01:00
|
|
|
%{_bindir}/vmware-user-autostart-wrapper
|
2014-03-26 16:03:45 +01:00
|
|
|
%{_bindir}/vmware-vmblock-fuse
|
2010-11-25 15:06:18 +01:00
|
|
|
%endif
|
2009-06-10 15:30:14 +02:00
|
|
|
|
|
|
|
%files -n libvmtools0
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%{_libdir}/libvmtools.so.*
|
|
|
|
%{_libdir}/libguestlib.so.*
|
2010-11-25 15:06:18 +01:00
|
|
|
%{_libdir}/libhgfs.so.*
|
2008-04-24 01:47:24 +02:00
|
|
|
|
2009-08-10 18:23:51 +02:00
|
|
|
%files -n libvmtools-devel
|
|
|
|
%defattr(-,root,root)
|
2014-03-26 16:03:45 +01:00
|
|
|
%doc docs/api/build/*
|
2009-08-10 18:23:51 +02:00
|
|
|
%{_includedir}/vmGuestLib
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_libdir}/pkgconfig/vmguestlib.pc
|
|
|
|
|
2008-04-24 01:47:24 +02:00
|
|
|
%changelog
|