From 0b8e82e4747e1bd0cc31f02d46bda6fbf30fe10c Mon Sep 17 00:00:00 2001 From: Ravindra Kumar Date: Feb 17 2017 00:03:39 +0000 Subject: udev rules patch for longer SCSI timeouts (RHBZ#1214347). --- diff --git a/99-vmware-scsi-udev.rules b/99-vmware-scsi-udev.rules new file mode 100644 index 0000000..8963542 --- /dev/null +++ b/99-vmware-scsi-udev.rules @@ -0,0 +1,3 @@ +ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*" , ATTRS{model}=="Virtual disk*", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'" +ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*" , ATTRS{model}=="VMware Virtual S", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'" + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..68fbc3e --- /dev/null +++ b/Makefile.am @@ -0,0 +1,21 @@ +################################################################################ +### Copyright (C) 2016 VMware, Inc. All rights reserved. +### +### This program is free software; you can redistribute it and/or modify +### it under the terms of version 2 of the GNU General Public License as +### published by the Free Software Foundation. +### +### This program is distributed in the hope that it will be useful, +### but WITHOUT ANY WARRANTY; without even the implied warranty of +### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +### GNU General Public License for more details. +### +### You should have received a copy of the GNU General Public License +### along with this program; if not, write to the Free Software +### Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +################################################################################ + +install-data-local: + $(INSTALL) -d $(DESTDIR)$(UDEVRULESDIR) + $(INSTALL) $(srcdir)/99-vmware-scsi-udev.rules $(DESTDIR)$(UDEVRULESDIR) + diff --git a/open-vm-tools.spec b/open-vm-tools.spec index c947a3d..14ec731 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -1,5 +1,5 @@ ################################################################################ -### Copyright 2013-16 VMware, Inc. All rights reserved. +### Copyright 2013-17 VMware, Inc. All rights reserved. ### ### RPM SPEC file for building open-vm-tools packages. ### @@ -28,7 +28,7 @@ Name: open-vm-tools Version: %{toolsversion} -Release: 8%{?dist} +Release: 9%{?dist} Summary: Open Virtual Machine Tools for virtual machines hosted on VMware Group: Applications/System License: GPLv2 @@ -36,6 +36,8 @@ URL: http://%{name}.sourceforge.net/ Source0: http://sourceforge.net/projects/%{name}/files/%{name}/stable-%{majorversion}.x/%{name}-%{version}-%{toolsbuild}.tar.gz Source1: %{toolsdaemon}.service Source2: %{vgauthdaemon}.service +Source3: Makefile.am +Source4: 99-vmware-scsi-udev.rules %if 0%{?rhel} >= 7 ExclusiveArch: x86_64 %else @@ -45,6 +47,7 @@ ExclusiveArch: %{ix86} x86_64 Patch1: no-unused-const.patch Patch2: vmw-bitmask-gcc6.patch Patch3: hgfs-cache.patch +Patch4: udev-rules.patch BuildRequires: autoconf BuildRequires: automake @@ -129,8 +132,13 @@ VMware virtual machines. %patch1 -p0 %patch2 -p0 %patch3 -p0 +%patch4 -p0 %build +mkdir -p udev +cp %{SOURCE3} udev +cp %{SOURCE4} udev + # Fedora 23 uses libsigc++-2.0 version 2.6.1. # libsigc++-2.0 >= 2.5.1 requires C++11. Using # -std=c++11 does not provide "linux" definition @@ -278,6 +286,7 @@ fi %{_libdir}/%{name}/plugins/common/*.so %dir %{_libdir}/%{name}/plugins/vmsvc %{_libdir}/%{name}/plugins/vmsvc/*.so +%{_prefix}/lib/udev/rules.d/99-vmware-scsi-udev.rules %{_datadir}/%{name}/ %{_unitdir}/%{toolsdaemon}.service %{_unitdir}/%{vgauthdaemon}.service @@ -300,6 +309,9 @@ fi %{_libdir}/libvmtools.so %changelog +* Thu Feb 16 2017 Ravindra Kumar - 10.0.5-9 +- udev rules patch for longer SCSI timeouts (RHBZ#1214347). + * Sat Feb 11 2017 Fedora Release Engineering - 10.0.5-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/udev-rules.patch b/udev-rules.patch new file mode 100644 index 0000000..89c9753 --- /dev/null +++ b/udev-rules.patch @@ -0,0 +1,63 @@ +--- configure.ac.orig 2016-09-20 15:43:37.000488000 -0700 ++++ configure.ac 2016-09-20 16:12:30.000350000 -0700 +@@ -1129,6 +1129,26 @@ + fi + fi + ++if test "$os" = "linux"; then ++ have_udev="yes" ++ AC_ARG_WITH([udev-rules-dir], ++ [AS_HELP_STRING([--with-udev-rules-dir=DIR], ++ [where to install udev rules])], ++ [UDEVRULESDIR="$withval"], ++ [ ++ UDEVRULESDIR="/lib/udev/rules.d" ++ if test $HAVE_PKG_CONFIG = "yes"; then ++ udevdir=$(pkg-config udev --variable=udevdir) ++ if test "x$udevdir" != "x"; then ++ UDEVRULESDIR="$udevdir/rules.d" ++ fi ++ fi ++ ]) ++else ++ have_udev="no" ++ UDEVRULESDIR="" ++fi ++ + AM_CONDITIONAL(BUILD_HGFSMOUNTER, test "$buildHgfsmounter" = "yes") + AM_CONDITIONAL(LINUX, test "$os" = "linux") + AM_CONDITIONAL(SOLARIS, test "$os" = "solaris") +@@ -1155,6 +1175,7 @@ + AM_CONDITIONAL(ENABLE_GRABBITMQPROXY, test "$enable_grabbitmqproxy" = "yes") + AM_CONDITIONAL(ENABLE_VGAUTH, test "$enable_vgauth" = "yes") + AM_CONDITIONAL(HAVE_VSOCK, test "$os" = "linux") ++AM_CONDITIONAL(HAVE_UDEV, test "$have_udev" = "yes") + + if test "$have_xsm" != "yes"; then + AC_DEFINE([NO_XSM], 1, []) +@@ -1258,6 +1279,8 @@ + AC_SUBST([VIX_LIBADD]) + AC_SUBST([VGAUTH_LIBADD]) + ++AC_SUBST([UDEVRULESDIR]) ++ + ### + ### Create the Makefiles + ### +@@ -1357,6 +1380,7 @@ + docs/api/Makefile \ + scripts/Makefile \ + scripts/build/rpcgen_wrapper.sh \ ++ udev/Makefile \ + ]) + + ### +--- Makefile.am.orig 2016-09-20 15:43:16.000191000 -0700 ++++ Makefile.am 2016-09-20 15:58:00.001125000 -0700 +@@ -64,3 +64,6 @@ + endif + SUBDIRS += docs + ++if HAVE_UDEV ++ SUBDIRS += udev ++endif