- Package new upstream version open-vm-tools-9.10.0-2476743

- New version requires adding a new service vgauthd
- Removed old patches that are no longer needed
- Fix (strerror_r.patch) for picking GNU signature of strerror_r
- Fix (toolboxcmd.patch) for compiling toolboxcmd-shrink.c with gcc 5.0.1
This commit is contained in:
Ravindra Kumar 2015-04-30 17:18:36 -07:00
parent a9bc33f850
commit c5619c1d06
10 changed files with 102 additions and 69 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/open-vm-tools-9.2.3-1031360.tar.gz
/open-vm-tools-9.4.0-1280544.tar.gz
/open-vm-tools-9.4.6-1770165.tar.gz
/open-vm-tools-9.10.0-2476743.tar.gz

View File

@ -1,14 +0,0 @@
diff -uNr open-vm-tools-9.4.0-1280544.orig/lib/include/vmware/tools/log.h open-vm-tools-9.4.0-1280544/lib/include/vmware/tools/log.h
--- open-vm-tools-9.4.0-1280544.orig/lib/include/vmware/tools/log.h 2013-09-23 19:51:10.000000000 +0400
+++ open-vm-tools-9.4.0-1280544/lib/include/vmware/tools/log.h 2014-02-18 10:56:50.368604176 +0400
@@ -134,7 +134,9 @@
*******************************************************************************
*/
-#define g_info(fmt, ...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, fmt, ## __VA_ARGS__)
+#if !defined(g_info)
+# define g_info(fmt, ...) g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, fmt, ## __VA_ARGS__)
+#endif
/*

View File

@ -1,21 +0,0 @@
--- open-vm-tools-9.4.6-1770165/configure.ac.orig 2015-02-03 18:42:39.431466158 -0800
+++ open-vm-tools-9.4.6-1770165/configure.ac 2015-02-03 18:43:15.338468630 -0800
@@ -1032,7 +1032,7 @@
AM_CONDITIONAL(HAVE_GNU_LD, test "$with_gnu_ld" = "yes")
AM_CONDITIONAL(HAVE_GTKMM, test "$have_x" = "yes" -a "$with_gtkmm" = "yes")
AM_CONDITIONAL(HAVE_PAM, test "$with_pam" = "yes")
-AM_CONDITIONAL(USE_SLASH_PROC, test "os" = "linux" -a "$have_glib_2_14" = "yes")
+AM_CONDITIONAL(USE_SLASH_PROC, test "$os" = "linux" -a "$have_glib_2_14" = "yes")
AM_CONDITIONAL(USE_PRINTF_WRAPPERS, test "$bsdPrintfWrappers" = "yes")
if test "$have_xsm" != "yes"; then
--- open-vm-tools-9.4.6-1770165/services/plugins/guestInfo/getlib/Makefile.am.orig 2015-02-03 18:48:55.528772952 -0800
+++ open-vm-tools-9.4.6-1770165/services/plugins/guestInfo/getlib/Makefile.am 2015-02-03 18:52:51.597199001 -0800
@@ -28,4 +28,6 @@
libGuestInfo_la_CPPFLAGS += -I$(srcdir)/..
AM_CFLAGS = $(DNET_CPPFLAGS)
-
+if USE_SLASH_PROC
+AM_CFLAGS += -DUSE_SLASH_PROC
+endif

View File

@ -19,24 +19,25 @@
################################################################################
%global _hardened_build 1
%global majorversion 9.4
%global minorversion 6
%global toolsbuild 1770165
%global majorversion 9.10
%global minorversion 0
%global toolsbuild 2476743
%global toolsversion %{majorversion}.%{minorversion}
%global toolsdaemon vmtoolsd
%global vgauthdaemon vgauthd
Name: open-vm-tools
Version: %{toolsversion}
Release: 6%{?dist}
Release: 1%{?dist}
Summary: Open Virtual Machine Tools for virtual machines hosted on VMware
Group: Applications/System
License: GPLv2
URL: http://%{name}.sourceforge.net/
Source0: http://sourceforge.net/projects/%{name}/files/%{name}/stable-%{majorversion}.x/%{name}-%{version}-%{toolsbuild}.tar.gz
Source1: %{toolsdaemon}.service
Patch0: g_info_redefine.patch
Patch1: sizeof_argument.patch
Patch2: ip_route_config.patch
Source2: %{vgauthdaemon}.service
Patch0: strerror_r.patch
Patch1: toolboxcmd.patch
%if 0%{?rhel} >= 7
ExclusiveArch: x86_64
%else
@ -55,6 +56,7 @@ BuildRequires: gtk2-devel >= 2.4.0
BuildRequires: gtkmm24-devel
BuildRequires: libdnet-devel
BuildRequires: libicu-devel
BuildRequires: libmspack-devel
BuildRequires: libX11-devel
BuildRequires: libXext-devel
BuildRequires: libXi-devel
@ -62,9 +64,12 @@ BuildRequires: libXinerama-devel
BuildRequires: libXrandr-devel
BuildRequires: libXrender-devel
BuildRequires: libXtst-devel
BuildRequires: openssl-devel
BuildRequires: pam-devel
BuildRequires: procps-devel
BuildRequires: systemd
BuildRequires: xerces-c-devel
BuildRequires: xml-security-c-devel
Requires: initscripts
Requires: coreutils
@ -104,21 +109,17 @@ VMware virtual machines.
%prep
%setup -q -n %{name}-%{version}-%{toolsbuild}
%patch0 -p1 -b .g_info
%patch1 -p1 -b .sizeof
%patch2 -p1 -b .ip
%patch0 -p1 -b .strerror_r
%patch1 -p1 -b .toolboxcmd
%build
# Use -Wno-unused-local-typedefs to build with GCC 4.8
# Use -Wno-deprecated-declarations for version 9.4.0+
# Use _DEFAULT_SOURCE to suppress warning until upstream
# is fixed. Refer https://sourceware.org/bugzilla/show_bug.cgi?id=16632.
export CFLAGS="$RPM_OPT_FLAGS -Wno-unused-local-typedefs -Wno-deprecated-declarations -D_DEFAULT_SOURCE"
export CXXLAGS="$RPM_OPT_FLAGS -Wno-unused-local-typedefs -Wno-deprecated-declarations -D_DEFAULT_SOURCE"
# Required for version 9.4.0+
export CUSTOM_PROCPS_NAME=procps
# Required for version 9.4.6
autoreconf -i
export CFLAGS="$RPM_OPT_FLAGS -D_DEFAULT_SOURCE"
export CXXLAGS="$RPM_OPT_FLAGS -D_DEFAULT_SOURCE"
# Required for regenerating configure script when
# configure.ac get modified
#autoreconf -i
%configure \
--without-kernel-modules \
--disable-static
@ -131,6 +132,8 @@ make install DESTDIR=%{buildroot}
# Remove exec bit from config files
chmod a-x %{buildroot}%{_sysconfdir}/pam.d/*
chmod a-x %{buildroot}%{_sysconfdir}/vmware-tools/*.conf
chmod a-x %{buildroot}%{_sysconfdir}/vmware-tools/vgauth/schemas/*
# Remove the DOS line endings
sed -i "s|\r||g" README
@ -148,17 +151,25 @@ mv %{buildroot}%{_sysconfdir}/vmware-tools/vm-support %{buildroot}%{_bindir}
# Systemd unit files
install -p -m 644 -D %{SOURCE1} %{buildroot}%{_unitdir}/%{toolsdaemon}.service
install -p -m 644 -D %{SOURCE2} %{buildroot}%{_unitdir}/%{vgauthdaemon}.service
# 'make check' in open-vm-tools rebuilds docs and ends up regenerating
# the font file. We can add %%check secion once 'make check' is fixed
# upstream
%post
if [ -e %{_bindir}/vmware-guestproxycerttool ]; then
mkdir -p %{_sysconfdir}/vmware-tools/GuestProxyData/server
mkdir -p -m 0700 %{_sysconfdir}/vmware-tools/GuestProxyData/trusted
%{_bindir}/vmware-guestproxycerttool -g &> /dev/null || /bin/true
fi
/sbin/ldconfig
%systemd_post %{vgauthdaemon}.service
%systemd_post %{toolsdaemon}.service
%preun
%systemd_preun %{toolsdaemon}.service
%systemd_preun %{vgauthdaemon}.service
# Tell VMware that open-vm-tools is being uninstalled
if [ "$1" = "0" -a \
@ -171,6 +182,11 @@ fi
%postun
/sbin/ldconfig
%systemd_postun_with_restart %{toolsdaemon}.service
%systemd_postun_with_restart %{vgauthdaemon}.service
# Cleanup GuestProxy certs if open-vm-tools is being uninstalled
if [ "$1" = "0" ]; then \
rm -rf %{_sysconfdir}/vmware-tools/GuestProxyData &> /dev/null || /bin/true
fi
%post devel -p /sbin/ldconfig
@ -179,16 +195,28 @@ fi
%files
%doc AUTHORS ChangeLog COPYING NEWS README
%config(noreplace) %{_sysconfdir}/pam.d/*
%{_sysconfdir}/vmware-tools/
%config(noreplace) %{_sysconfdir}/vmware-tools/*.conf
%config %{_sysconfdir}/vmware-tools/vgauth/schemas/*
%{_sysconfdir}/vmware-tools/poweroff-vm-default
%{_sysconfdir}/vmware-tools/poweron-vm-default
%{_sysconfdir}/vmware-tools/resume-vm-default
%{_sysconfdir}/vmware-tools/statechange.subr
%{_sysconfdir}/vmware-tools/suspend-vm-default
%{_sysconfdir}/vmware-tools/scripts/vmware/
%{_bindir}/VGAuthService
%{_bindir}/vm-support
%{_bindir}/vmtoolsd
%{_bindir}/vmware-checkvm
%{_bindir}/vmware-guestproxycerttool
%{_bindir}/vmware-hgfsclient
%{_bindir}/vmware-rpctool
%{_bindir}/vmware-toolbox-cmd
%{_bindir}/vmware-vgauth-cmd
%{_bindir}/vmware-xferlogs
%{_bindir}/vm-support
%{_libdir}/libDeployPkg.so.*
%{_libdir}/libguestlib.so.*
%{_libdir}/libhgfs.so.*
%{_libdir}/libvgauth.so.*
%{_libdir}/libvmtools.so.*
%dir %{_libdir}/%{name}/
%dir %{_libdir}/%{name}/plugins
@ -200,6 +228,7 @@ fi
%{_datadir}/%{name}/
%exclude /sbin/
%{_unitdir}/%{toolsdaemon}.service
%{_unitdir}/%{vgauthdaemon}.service
%files desktop
%{_sysconfdir}/xdg/autostart/*.desktop
@ -209,13 +238,23 @@ fi
%files devel
%doc docs/api/build/*
%exclude %{_includedir}/libDeployPkg/
%{_includedir}/vmGuestLib/
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libDeployPkg.so
%{_libdir}/libguestlib.so
%{_libdir}/libhgfs.so
%{_libdir}/libvgauth.so
%{_libdir}/libvmtools.so
%changelog
* Thu Apr 30 2015 Ravindra Kumar <ravindrakumar@vmware.com> - 9.10.0-1
- Package new upstream version open-vm-tools-9.10.0-2476743
- New version requires adding a new service vgauthd
- Removed old patches that are no longer needed
- Fix (strerror_r.patch) for picking GNU signature of strerror_r
- Fix (toolboxcmd.patch) for compiling toolboxcmd-shrink.c with gcc 5.0.1
* Wed Feb 04 2015 Ravindra Kumar <ravindrakumar@vmware.com> - 9.4.6-6
- Added a patch for missing NetIpRouteConfigInfo (BZ#1189295)

View File

@ -1,12 +0,0 @@
--- open-vm-tools-9.4.6-1770165.orig/lib/syncDriver/syncDriverPosix.c 2014-07-15 13:42:21.043818478 -0700
+++ open-vm-tools-9.4.6-1770165/lib/syncDriver/syncDriverPosix.c 2014-07-15 13:55:41.724103304 -0700
@@ -72,8 +72,7 @@
size_t i;
for (i = 0; i < ARRAYSIZE(gRemoteFSTypes); i++) {
- if (Str_Strncmp(fsType, gRemoteFSTypes[i],
- sizeof gRemoteFSTypes[i]) == 0) {
+ if (Str_Strcmp(gRemoteFSTypes[i], fsType) == 0) {
return TRUE;
}
}

View File

@ -1 +1 @@
3969daf1535d34e1c5f0c87a779b7642 open-vm-tools-9.4.6-1770165.tar.gz
d19439b499f0cbc7001e0cc65aa1a5a7 open-vm-tools-9.10.0-2476743.tar.gz

14
strerror_r.patch Normal file
View File

@ -0,0 +1,14 @@
--- open-vm-tools-9.10.0-2476743.orig/vgauth/common/VGAuthLog.c 2015-03-19 15:53:25.000000000 -0700
+++ open-vm-tools-9.10.0-2476743/vgauth/common/VGAuthLog.c 2015-04-21 01:24:32.370582529 -0700
@@ -25,6 +25,11 @@
#ifdef _WIN32
#include <windows.h>
#else
+/*
+ * Need GNU definition of strerror_r for better compatibility
+ * across different glibc versions.
+ */
+#define _GNU_SOURCE
#include <errno.h>
#include <unistd.h>
#include <string.h>

11
toolboxcmd.patch Normal file
View File

@ -0,0 +1,11 @@
--- open-vm-tools-9.10.0-2476743.orig/toolbox/toolboxcmd-shrink.c 2015-03-19 15:53:25.000000000 -0700
+++ open-vm-tools-9.10.0-2476743/toolbox/toolboxcmd-shrink.c 2015-04-29 17:35:12.190392096 -0700
@@ -391,7 +391,7 @@
* Verify that wiping/shrinking are permitted before going through with the
* wiping operation.
*/
- if (!ShrinkGetWiperState() == WIPER_ENABLED && !Wiper_IsWipeSupported(part)) {
+ if (ShrinkGetWiperState() != WIPER_ENABLED && !Wiper_IsWipeSupported(part)) {
g_debug("%s cannot be wiped / shrunk\n", mountPoint);
ToolsCmd_PrintErr("%s",
SU_(disk.shrink.disabled, SHRINK_DISABLED_ERR));

12
vgauthd.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=VGAuth Service for open-vm-tools
Documentation=http://github.com/vmware/open-vm-tools
ConditionVirtualization=vmware
PartOf=vmtoolsd.service
[Service]
ExecStart=/usr/bin/VGAuthService -s
TimeoutStopSec=5
[Install]
RequiredBy=vmtoolsd.service

View File

@ -1,7 +1,9 @@
[Unit]
Description=Service for virtual machines hosted on VMware
Documentation=http://open-vm-tools.sourceforge.net/about.php
Documentation=http://github.com/vmware/open-vm-tools
ConditionVirtualization=vmware
Requires=vgauthd.service
After=vgauthd.service
[Service]
ExecStart=/usr/bin/vmtoolsd
@ -9,3 +11,4 @@ TimeoutStopSec=5
[Install]
WantedBy=multi-user.target
Also=vgauthd.service