open-vm-tools/open-vm-tools.spec

515 lines
22 KiB
RPMSpec

#
# spec file for package open-vm-tools (Version 2009.01.21)
#
# 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.01.21
Release: 1
%define svn_rev 142982
Url: http://open-vm-tools.sourceforge.net/
License: BSD 3-Clause; GPL v2 only; LGPL v2.1 only
Source: %{name}-%{version}-%{svn_rev}.tar.bz2
Source1: vmware-guest
Source2: vmware-user.desktop
Source3: vmware-toolbox.desktop
Source4: preamble
Source99: %{name}-%{version}-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: kernel-source kernel-syms module-init-tools
BuildRequires: libdnet-devel libicu-devel pcre-devel procps
BuildRequires: gtk2-devel update-desktop-files xorg-x11-devel
# openSUSE 10.2 seems not to pull libtiff in automatically... weird
%if 0%{?suse_version} == 1020
BuildRequires: libtiff
%endif
# liburiparser was not present before 11.0
%if 0%{?suse_version} >= 1100
BuildRequires: liburiparser-devel
%endif
PreReq: %insserv_prereq %fillup_prereq
PreReq: permissions
ExclusiveArch: %ix86 x86_64
Requires: vmware-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 -p %{SOURCE4} 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-KMP
License: BSD 3-Clause; GPL v2 only; LGPL v2.1 only
Summary: Open Virtual Machine Tools
Group: System/Emulators/PC
%description -n vmware-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; 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
%debugpackage
%prep
%setup -q -n %{name}-%{version}-%{svn_rev}
chmod -x AUTHORS COPYING ChangeLog NEWS README
%build
# comments in a continued line seem not to work... shame
# --disable-unity : liburiparser was not present before 11.0
# --without-gtk2 : gtk2 lib seem to be to old for openSUSE<10.3
%configure \
%if 0%{?suse_version} < 1100
--disable-unity \
%endif
%if 0%{suse_version} < 1020
--without-gtk2 \
%endif
--without-kernel-modules \
--without-procps \
--disable-dependency-tracking
make
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
#make modules
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
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/*
#installation of libguestlib
mkdir -p $RPM_BUILD_ROOT%{_libdir}
install -m 0755 libguestlib/.libs/libguestlib.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libguestlib.so.0.0.0
ln -s %{_libdir}/libguestlib.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libguestlib.so.0
ln -s %{_libdir}/libguestlib.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libguestlib.so
# installation of vmware-guestd
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/init.d
install -m 0755 guestd/vmware-guestd $RPM_BUILD_ROOT%{_sbindir}/vmware-guestd
install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/vmware-guest
# and the corresponding PAM magic for vmware-guestd
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/
cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/vmware-guestd
#%PAM-1.0
auth sufficient /%{_lib}/security/pam_unix2.so shadow nullok
auth required /%{_lib}/security/pam_unix_auth.so shadow nullok
account sufficient /%{_lib}/security/pam_unix2.so
account required /%{_lib}/security/pam_unix_acct.so
EOF
# create /etc/vmware-tools/tools.conf
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/vmware-tools
cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/vmware-tools/tools.conf
bindir = "%{_bindir}"
disable-tools-version = TRUE
EOF
# and also /etc/xdg/autostart/vmware-user.desktop
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/vmware-user.desktop
# For vmware-guestd to run the default soft power operation scripts,
# they must be installed to /etc/vmware-tools with the executable bit activated.
install -m 0555 scripts/linux/poweroff-vm-default $RPM_BUILD_ROOT%{_sysconfdir}/vmware-tools/
install -m 0555 scripts/linux/poweron-vm-default $RPM_BUILD_ROOT%{_sysconfdir}/vmware-tools/
install -m 0555 scripts/linux/resume-vm-default $RPM_BUILD_ROOT%{_sysconfdir}/vmware-tools/
install -m 0555 scripts/linux/suspend-vm-default $RPM_BUILD_ROOT%{_sysconfdir}/vmware-tools/
# installing vmware-user (is being started by vmware-guestd when a X-session starts and one of
# the applications from /etc/vmware-tools/xautostart.conf is detected
# it is NOT multi-user able!
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m 0755 vmware-user/vmware-user $RPM_BUILD_ROOT%{_bindir}
# the toolbox, to be started by the user
install -m 0755 toolbox/vmware-toolbox $RPM_BUILD_ROOT%{_bindir}/vmware-toolbox
# checkvm is a simple console application.
install -m 0755 checkvm/vmware-checkvm $RPM_BUILD_ROOT%{_bindir}/vmware-checkvm
# xferlogs is a simple console application.
install -m 0755 xferlogs/vmware-xferlogs $RPM_BUILD_ROOT%{_bindir}/vmware-xferlogs
# hgfsclient is a simple console application.
install -m 0755 hgfsclient/vmware-hgfsclient $RPM_BUILD_ROOT%{_bindir}/vmware-hgfsclient
# install vmware-user-suid-wrapper
install -m 0755 vmware-user-suid-wrapper/vmware-user-suid-wrapper $RPM_BUILD_ROOT/%{_bindir}/vmware-user-suid-wrapper
# Install hgfsmounter
mkdir -p $RPM_BUILD_ROOT/sbin
cp hgfsmounter/mount.vmhgfs $RPM_BUILD_ROOT/sbin/mount.vmhgfs
# provide a menu entry for the various Desktop Environments
mkdir -p $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/applications/vmware-toolbox.desktop
install -m 0644 toolbox/bigIcon.xpm $RPM_BUILD_ROOT%{_datadir}/pixmaps/vmware-toolbox.xpm
%suse_update_desktop_file -r vmware-toolbox System Monitor
# "morph" the amd32 driver over to the vmnetx driver for better performance
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d
cat <<EOF > $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/vmnics
install pcnet32 /sbin/modprobe -q --ignore-install vmxnet; /sbin/modprobe -q --ignore-install pcnet32 $CMDLINE_OPTS; /bin/true;
EOF
#provide the rcvmware-guest link
ln -sf ../../etc/init.d/vmware-guest $RPM_BUILD_ROOT%{_sbindir}/rcvmware-guest
%post
%run_permissions
/sbin/ldconfig
%{fillup_and_insserv -y vmware-guest}
%verifyscript
%verify_permissions -e /sbin/mount.vmhgfs
%preun
%stop_on_removal vmware-guest
%postun
%restart_on_update vmware-guest
%insserv_cleanup
/sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/vmware*
%exclude %{_bindir}/vmware-toolbox
%exclude %{_bindir}/vmware-user
%config %{_sysconfdir}/init.d/vmware*
%config %{_sysconfdir}/vmware-tools
%config %{_sysconfdir}/modprobe.d/vmnics
%config %{_sysconfdir}/pam.d/vmware*
%verify(not mode) %attr(0755,root,root) /sbin/mount.vmhgfs
%{_sbindir}/vmware*
%{_sbindir}/rcvmware-guest
%{_libdir}/libguestlib.*
%files gui
%defattr(-, root, root)
%{_bindir}/vmware-toolbox
%{_bindir}/vmware-user
%{_datadir}/applications/vmware*
%{_datadir}/pixmaps/vmware*
%{_sysconfdir}/xdg/autostart/vmware-user.desktop
%changelog
* Mon Jan 26 2009 prusnak@suse.cz
- reviewed changes by Dominique
* Thu Jan 22 2009 dominique@leuenberger.net
- Update to version 2009.01.21
* First open source release of the HGFS module for Solaris,
under the CDDL. Other modules are expected to be added in
the upcoming releases.
* Added an implementation of vmblock on top of FUSE;
vmware-user still doesn't use this module even if it is
available, though.
* Linux modules now add the "supported" tag used by Novell in
their SLES 10 SP2 release when loading modules.
* Fix compilation of modules in newer Linux kernels which
don't include $(LINUXINCLUDE) in the compiler flags anymore.
- Added Requires: kernel-%%1 to preamble, as rpmlint said it would
be policy to require kenrel-$favour from the kmp
- marked config files in /etc as %%config (rpmlint)
* Fri Jan 16 2009 prusnak@suse.cz
- reviewed changes by Dominique
* Thu Dec 25 2008 dominique@leuenberger.net
- Update to version 2008.12.23
* Lots of makefile cleanup with the switch to using libtool archives.
* Automatically disable Unity if multimon support is disabled.
* Actually build the pvscsi modules.
* First bits of the "Core Service" project are starting to show up; the
base "vmtools" library was added to the package. It currently is mostly
a collection of the existing libraries already shipped with open-vm-tools,
plus some extra functionality build on top of glib. Currently no other
code in open-vm-tools uses it, so it's optional.
* The HGFS driver was fixed for the Linux 2.6.28 kernel.
* Wed Nov 19 2008 dominique@leuenberger.net
- Updated to version 2008.11.19
* The pvscsi Linux kernel module has been added (for kernels >= 2.6.8).
It provides access to VMware's new paravirtualized SCSI device.
* The HGFS driver and user-level code has seen a lot of refactoring to
enable more consistent name escaping. The FreeBSD driver now supports
symlinks.
* The Linux module makefiles now support exporting symbol version files,
allowing modules with dependencies (such as vsock, which depends on vmci)
to correctly build and load on Linux >= 2.6.26 with CONFIG_MODVERSIONS.
* Rudimentary support for dkms.
* Assortment of bug fixes.
* Wed Oct 15 2008 dominique@leuenberger.net
- Updated to version 2008.10.10
* The vmxnet3 Linux kernel module has been added. This module provides
better network performance for the guest. The corresponding virtual
hardware is available beginning with Workstation 6.5, though
performance benefits are unlikely to be realized until a later VMware
product release. The module should work for all kernels beginning with
2.6.
* The open-vm-tools no longer depend on libproc-dev. Several people
reported this issue (Sourceforge bug 1960947).
* Added a command line argument to skip privileged operations during
make install (--without-root-privileges).
* Guestd now supports backwards time synchronization, though the
corresponding hypervisor-side changes are not yet part of any shipping
VMware products.
* Assortment of bug fixes.
* Wed Sep 17 2008 prusnak@suse.cz
- fixed license problem with region.c by applying patch from upstream
* Mon Sep 08 2008 dominique@leuenberger.net
- Removed patch kver.patch, refactored it's function in the
make call, overriding the HEADER_DIR variable inside the
Makefile (Tip sponsored by Adar from VMware Inc.)
* Thu Sep 04 2008 prusnak@suse.cz
- reviewed changes by Dominique
* Wed Sep 03 2008 dominique@leuenberger.net
- Activated compilation of modules vmci and vsock after fixing the
kver.patch
- dropped obsoleted patch:
* str_c.patch (included in update)
* Wed Sep 03 2008 prusnak@suse.cz
- updated to 2008-09-03
* Fixed an issue where open-vm-tools fails to configure when using
--without-icu. Thanks to Timo Gurr for reporting the issue
(Sourceforge bug 2046262).
* Fixed failed build on Ubuntu Intrepid and Fedora 9.
Thanks to Nathan Charles for reporting the issue
(Sourceforge bug 2048423).
* Fixed kernel module build issues on 2.6.27 pre-release kernels.
Thanks to Dominique Leuenberger for reporting the issue
(Sourceforge bug 2071170).
* ...and other bug fixes.
- dropped obsoleted patches:
* 2.6.27-kernel.patch (included in update)
* fix-Werror.patch (included in update)
* Sun Aug 24 2008 dominique@leuenberger.net
- Added open-vm-tools-2008-08-08-2.6.27-kernel.patch to compile on
more recent kernels (patch should be merged in next release)
* Fri Aug 22 2008 dominique@leuenberger.net
- added packageand(open-vm-tools:xorg-x11) to Supplements
of open-vm-tools-gui sub package
* Fri Aug 22 2008 dominique@leuenberger.net
- Re-arranged comments for the configure line. Apparently, comments
that appear in a line continuing on the next line, split using '\'
break the flow
* Wed Aug 20 2008 dominique@leuenberger.net
- Added --without-kernel-modules to configure, as we take
care of it on ourself using the loop, for the different
kernel variants
* Tue Aug 12 2008 prusnak@suse.cz
- updated to 2008.08.08
* Unity for X11 guests has been added. Unity is implemented within
vmware-user and requires no additional setup beyond setting up the
vmware-user application itself. Unity should work with Fusion 1.x
releases as well as with the upcoming Workstation 6.5 release. Our
in-house testing was with Linux guests, and they should mostly work.
There is very little standing in the way of FreeBSD/Solaris support,
though we've never built or tested Unity for those platforms.
* The VMCI Linux kernel module has been added. This module provides
high-speed datagram and socket interfaces for guest<->guest and
host<->guest communication. It should work for all kernels beginning
with 2.4, and for VMware products beginning with Workstation 6.5.
* The VMCI sockets Linux kernel module has been added. It provides
both datagram and stream socket interfaces to userlevel for use with
VMCI. As with VMCI, it should work for kernels 2.4 or later, and for
VMware products beginning with Workstation 6.5.
* The command-line Toolbox has been added. This application provides
the same functionality as the GTK Toolbox, but with a scriptable
command-line interface. It also has some statistic retrieval commands
that aren't found in the GTK Toolbox.
* Fixed compilation of vmsync and vmmemctl Linux kernel modules on
2.6.26. Thanks to Pavol Rusnak for the report (Sourceforge bug 2032683).
* Fixed an issue with guestd's nicInfo updating mechanism. Thanks to
Jason Lunz for the patch (not tracked on Sourceforge).
* Fixed handling of $(DESTDIR) in automake. Thanks to Mike Auty for
the patch (Sourceforge bug 2018802).
* Fixed build of vmware-user using gtk 1.2. Thanks to Stephen Duncan
for the report (Sourceforge bug 2014338).
* Fixed compilation of lib/guestApp when using --without-x. Thanks to
Martin Preishuber for the report (Sourceforge bug 2013568).
* As usual, other bug fixes.
* Mon Jul 21 2008 prusnak@suse.cz
- updated to 2008.07.01:
* fixed a backwards time synchronization issue
* fixed an issue where open-vm-tools configured via --without-x didn't
compile (not tracked on Sourceforge)
* one can now pass --without-kernel-modules, --with-kernel-release, and
--with-linuxdir to the ./configure script
* other bug fixes.
- branched open-vm-tools-gui subpackage with tools that need X
* Thu Jun 12 2008 prusnak@suse.cz
- open-vm-tools now requires vmware-kmp [bnc#397972]
- exclude AMD PCnet32 LANCE pci.id from Supplements list [bnc#397554]
* Mon Jun 09 2008 dominique-obs@leuenberger.net
- Updated to version 2008.06.03
adopted spec file to new build structure layout (the binaries
are now named correctly just after build and do not need to
be renamed anymore)
- Replaced -werror patch with -fix-Werror-patch (submitted to
VMware for inclusion)
* Mon Jun 02 2008 prusnak@suse.cz
- updated vmware init-script [bnc#394431]:
* check whether /tmp/VMwareDnD exists and create it if necessary
* use modules vmblock, vmmemctl, vmsync for better performance
* mount the virtual system for Drag'n'Drop
* Wed May 28 2008 dominique-rpm@leuenberger.net
- Excluded the building of KMPs for XEN, probably nobody installs
a vmware host in xen.
* Thu May 22 2008 prusnak@suse.cz
- added Recommends: open-vm-tools to KMP preamble [bnc#391434]
- added -y to %%fillup_and_insserv macro, so the service starts
automatically [bnc#391434]
* Tue May 20 2008 dominique-rpm@leuenberger.net
- replaced %%build section with the one from openSUSE internal
stable build, for building properly against all buildtargets
* Tue May 20 2008 dominique-rpm@leuenberger.net
- Added preamble for %%suse_kernel_module_package in order to have
a Recommends: open-vm-tools on the kmp.
The KMP is installed by Supplements: the hardware ID, and the KMP
then pulls in the open-vm-tools package by Recommends (if available)
* Wed May 07 2008 dominique-rpm@leuenberger.net
- Updated to 2008.05.15:
* Removed "blessed app" code for starting vmware-user
* lib/file/filePosix.c: Use new Posix_RealPath implementation.
* Cleanup UTF-8 handling.
- Added patch open-vm-tools-2008.05.02-str.c that should solve
compilation with FORTIFY_SOURCE enabled
* Tue May 06 2008 prusnak@suse.cz
- updated to 2008.05.02:
* continued Unicode support
* open-vm-tools now depends on libicu for codeset conversions
* a few more bug fixes
* Mon Apr 28 2008 ro@suse.de
- tweak build section long enough to really build modules
matching to kernel flavour (and not just build all for -default)
(bnc#384192)
* Wed Apr 23 2008 ro@suse.de
- added vmware-KMP package and description tags to specfile
- added preable file for kmp packages
* Wed Apr 23 2008 prusnak@suse.cz
- fixed %%verifyscript
* Tue Apr 22 2008 prusnak@suse.cz
- updated to 2008.04.14
* continued Unicode support
* more bug fixes, including a security fix in guestd
- added permissions scripts to %%post section
* Tue Mar 25 2008 dominique-rpm@leuenberger.net
- updated to 2008.03.19
* Thu Mar 20 2008 prusnak@suse.cz
- add Supplements to automatically install in VMware
* Tue Mar 18 2008 prusnak@suse.cz
- first autobuild checkin
- turn off -Werror (werror.patch)
- reworked spec file
* Fri Mar 14 2008 dominique-rpm@leuenberger.net
- updated to 2008.03.11
(developer snapshot to support all modules on 2.6.25 kernels)
* Tue Mar 11 2008 dominique-rpm@leuenberger.net
- updated to 2008.03.10
(developer snapshot to support kernel version 2.6.25-rc1)
* Sun Mar 09 2008 dominique-rpm@leuenberger.net
- refactored open-vm-tools-kver.patch to detect the kernel source
correctly
* Sat Mar 08 2008 dominique-rpm@leuenberger.net
- create link from /sbin/rcvmware to /etc/init.d/vmware-guest
- autostart the service after installation
* Sat Mar 08 2008 dominique-rpm@leuenberger.net
- initial build of open-vm-tools
- builds kmps and open-vm-tools