330 lines
11 KiB
RPMSpec
330 lines
11 KiB
RPMSpec
#
|
|
# spec file for package open-vm-tools (Version 2009.07.22)
|
|
#
|
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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
|
|
|
|
%define __find_supplements sh -c '/usr/lib/rpm/find-supplements %{name} | grep -v pci:v00001022d00002000'
|
|
|
|
Name: open-vm-tools
|
|
Group: System/Emulators/PC
|
|
Summary: Open Virtual Machine Tools
|
|
Version: 2009.07.22
|
|
Release: 1
|
|
%define svn_rev 179896
|
|
Url: http://open-vm-tools.sourceforge.net/
|
|
License: BSD 3-clause (or similar) ; GPL v2 only ; LGPL v2.1 only
|
|
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
|
|
Source98: preamble
|
|
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*)
|
|
%define vm_modules vmblock vmhgfs vmmemctl vmsync vmxnet vmci vsock vmxnet3 pvscsi
|
|
%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
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
The VMware Guest Components Team
|
|
|
|
%package -n vmware-guest-KMP
|
|
License: BSD 3-clause (or similar) ; GPL v2 only ; LGPL v2.1 only
|
|
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
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
The VMware Guest Components Team
|
|
|
|
%package gui
|
|
License: BSD 3-clause (or similar) ; GPL v2 only ; LGPL v2.1 only
|
|
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
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
The VMware Guest Components Team
|
|
|
|
%package -n libvmtools0
|
|
License: BSD 3-clause (or similar) ; GPL v2 only ; LGPL v2.1 only
|
|
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).
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
The VMware Guest Components Team
|
|
|
|
|
|
%package -n libvmtools-devel
|
|
License: BSD 3-clause (or similar) ; GPL v2 only ; LGPL v2.1 only
|
|
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.
|
|
|
|
Authors:
|
|
--------
|
|
The VMware Guest Components Team
|
|
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version}-%{svn_rev}
|
|
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 $RPM_BUILD_ROOT -name *.la -exec rm {} \;
|
|
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
|
|
# 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/vmsvc
|
|
%dir %{_libdir}/%{name}/plugins/vmusr
|
|
%{_libdir}/%{name}/plugins/vmsvc/libguestInfo.so
|
|
%{_libdir}/%{name}/plugins/vmsvc/libhgfsServer.so
|
|
%{_libdir}/%{name}/plugins/vmsvc/libpowerOps.so
|
|
%{_libdir}/%{name}/plugins/vmsvc/libtimeSync.so
|
|
%{_libdir}/%{name}/plugins/vmsvc/libvix.so
|
|
%{_libdir}/%{name}/plugins/vmsvc/libvmbackup.so
|
|
%{_libdir}/%{name}/plugins/vmusr/libhgfsServer.so
|
|
%{_libdir}/%{name}/plugins/vmusr/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
|
|
%{_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
|