Dominique Leuenberger
5d0168b1fa
Copy from home:dimstar:branches:Virtualization:VMware/open-vm-tools via accept of submit request 38976 revision 7. Request was accepted with message: Reviewed ok OBS-URL: https://build.opensuse.org/request/show/38976 OBS-URL: https://build.opensuse.org/package/show/Virtualization:VMware/open-vm-tools?expand=0&rev=159
331 lines
11 KiB
RPMSpec
331 lines
11 KiB
RPMSpec
#
|
|
# spec file for package open-vm-tools (Version 2010.03.20)
|
|
#
|
|
# Copyright (c) 2010 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/
|
|
#
|
|
|
|
# norootforbuild
|
|
|
|
# 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'
|
|
%define build_vmxnet3 0%{suse_version} <= 1120
|
|
|
|
Name: open-vm-tools
|
|
Group: System/Emulators/PC
|
|
Summary: Open Virtual Machine Tools
|
|
Version: 2010.03.20
|
|
Release: 1
|
|
%define svn_rev 243334
|
|
Url: http://open-vm-tools.sourceforge.net/
|
|
License: BSD3c ; GPLv2 ; LGPLv2.1
|
|
Source: %{name}-%{version}-%{svn_rev}.tar.bz2
|
|
Source1: vmtoolsd
|
|
Source2: vmware-user-autostart.desktop
|
|
Source3: vmware-toolbox.desktop
|
|
Source4: open-vm-tools.permissions
|
|
Source5: vmware-user-autostart-wrapper
|
|
Source6: open-vm-tools-modprobe.conf
|
|
# VMXNET3 driver is extracted from open-vm-tools 2009.12,16 last one that carried it.
|
|
# We keep it in for compatibility of older openSUSE Releases that have a kernel < 2.26.32. From then on,
|
|
# vmxnet3 is part of the kernel.
|
|
Source7: vmxnet3.tar.bz2
|
|
Source98: preamble
|
|
# PATCH-FIX-UPSTREAM open-vm-tools-libpng14.patch sf#2983141 dimstar@opensuse.org -- Fix build with libpng 1.4
|
|
Patch0: open-vm-tools-libpng14.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: kernel-source
|
|
BuildRequires: kernel-syms
|
|
BuildRequires: module-init-tools
|
|
BuildRequires: libdnet-devel
|
|
BuildRequires: libicu-devel
|
|
BuildRequires: pcre-devel
|
|
BuildRequires: procps
|
|
BuildRequires: gtk2-devel
|
|
BuildRequires: update-desktop-files
|
|
BuildRequires: xorg-x11-devel
|
|
BuildRequires: gtkmm2-devel
|
|
# liburiparser was not present before 11.0
|
|
%if 0%{?suse_version} >= 1100
|
|
BuildRequires: liburiparser-devel
|
|
%endif
|
|
BuildRequires: pam-devel
|
|
PreReq: %insserv_prereq %fillup_prereq
|
|
PreReq: permissions
|
|
ExclusiveArch: %ix86 x86_64
|
|
Requires: vmware-guest-kmp
|
|
Supplements: modalias(pci:v000015ADd*sv*sd*bc*sc*i*)
|
|
|
|
%if %build_vmxnet3
|
|
%define vm_modules vmblock vmhgfs vmmemctl vmsync vmxnet vmci vsock pvscsi vmxnet3
|
|
%else
|
|
%define vm_modules vmblock vmhgfs vmmemctl vmsync vmxnet vmci vsock pvscsi
|
|
%endif
|
|
|
|
%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
|
|
|
|
%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)
|
|
|
|
%description gui
|
|
GUI Toolbox for Open Virtual Machine Tools
|
|
|
|
%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}
|
|
%if %build_vmxnet3
|
|
pushd modules/linux
|
|
tar xvf %{S:7}
|
|
popd
|
|
%endif
|
|
%patch0 -p1
|
|
chmod -x AUTHORS COPYING ChangeLog NEWS README
|
|
# fix for an rpmlint warning regarding wrong line feeds
|
|
sed -i -e "s/\r//" README
|
|
|
|
%build
|
|
# comments in a continued line seem not to work... shame
|
|
# --disable-unity : liburiparser was not present before 11.0
|
|
%configure \
|
|
%if 0%{?suse_version} < 1100
|
|
--disable-unity \
|
|
%endif
|
|
--without-kernel-modules \
|
|
--without-root-privileges \
|
|
--without-procps \
|
|
--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=$RPM_BUILD_ROOT
|
|
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 $RPM_BUILD_ROOT/lib/modules/*/updates/*
|
|
|
|
%makeinstall
|
|
# Clean up the *.la files make install put all around
|
|
find %{buildroot} -name '*.la' -delete -print
|
|
rm %{buildroot}%{_datadir}/applications/vmware-user.desktop
|
|
|
|
# install the vmtoolsd init script and also it's rcvmtoolsd softlink
|
|
install -D -m 0755 %{S:1} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/vmtoolsd
|
|
ln -sf ../../etc/init.d/vmtoolsd $RPM_BUILD_ROOT%{_sbindir}/rcvmtoolsd
|
|
|
|
# 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 %{S:5} $RPM_BUILD_ROOT%{_bindir}/vmware-user-autostart-wrapper
|
|
install -D -m 0644 %{S:2} $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/vmware-user-autostart.desktop
|
|
install -D -m 0644 %{S:6} %{buildroot}%{_sysconfdir}/modprobe.d/50-vmnics.conf
|
|
|
|
# handle the .destop files for translations
|
|
%suse_update_desktop_file vmware-user-autostart
|
|
|
|
# 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 -rf %{buildroot}%{_datadir}/%{name}
|
|
|
|
%post
|
|
%run_permissions
|
|
/sbin/ldconfig
|
|
%{fillup_and_insserv -Y vmtoolsd}
|
|
|
|
%verifyscript gui
|
|
%verify_permissions
|
|
|
|
%post gui
|
|
%run_permissions
|
|
|
|
%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
|
|
%dir %{_libdir}/%{name}/plugins/vmusr
|
|
%{_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
|
|
|
|
%files gui
|
|
%defattr(-, root, root)
|
|
%{_sysconfdir}/xdg/autostart/vmware-user-autostart.desktop
|
|
%{_bindir}/vmware-toolbox
|
|
%{_bindir}/vmware-user
|
|
%verify(not mode) %attr(0755,root,root) %{_bindir}/vmware-user-suid-wrapper
|
|
%{_bindir}/vmware-user-autostart-wrapper
|
|
%{_libdir}/%{name}/plugins/vmusr/libresolutionSet.so
|
|
%{_libdir}/%{name}/plugins/vmusr/libvixUser.so
|
|
|
|
%files -n libvmtools0
|
|
%defattr(-, root, root)
|
|
%{_libdir}/libvmtools.so.*
|
|
%{_libdir}/libguestlib.so.*
|
|
|
|
%files -n libvmtools-devel
|
|
%defattr(-,root,root)
|
|
%{_includedir}/vmGuestLib
|
|
%{_libdir}/*.so
|
|
%{_libdir}/pkgconfig/vmguestlib.pc
|
|
|
|
%changelog
|