From d9a72336a4ba8aefc20f583461a70be875ef109383056da92d0420a7f0b66921 Mon Sep 17 00:00:00 2001 From: Kirk Allan Date: Fri, 28 Aug 2020 16:19:01 +0000 Subject: [PATCH] Accepting request 830310 from home:kallan:branches:Virtualization:VMware - Update to 11.1.5 (build 16724464) (boo#1175573) + This source release rolls up the SDMP fixes release post 11.1.0. + Fix serveral Coverity reported issues. + Address github issues: https://github.com/vmware/open-vm-tools/issues/451 https://github.com/vmware/open-vm-tools/issues/429 https://github.com/vmware/open-vm-tools/issues/428 - Drop unnecessary patch: - gcc10-warning.patch - sdmp-get-version.patch - sdmp-netstat-to-ss.patch - sdmp-warnings.patch OBS-URL: https://build.opensuse.org/request/show/830310 OBS-URL: https://build.opensuse.org/package/show/Virtualization:VMware/open-vm-tools?expand=0&rev=397 --- gcc10-warning.patch | 40 ------------ open-vm-tools-11.1.0-16036546.tar.gz | 3 - open-vm-tools-11.1.5-16724464.tar.gz | 3 + open-vm-tools.changes | 16 +++++ open-vm-tools.spec | 14 +--- sdmp-get-version.patch | 44 ------------- sdmp-netstat-to-ss.patch | 95 ---------------------------- sdmp-warnings.patch | 25 -------- 8 files changed, 22 insertions(+), 218 deletions(-) delete mode 100644 gcc10-warning.patch delete mode 100644 open-vm-tools-11.1.0-16036546.tar.gz create mode 100644 open-vm-tools-11.1.5-16724464.tar.gz delete mode 100644 sdmp-get-version.patch delete mode 100644 sdmp-netstat-to-ss.patch delete mode 100644 sdmp-warnings.patch diff --git a/gcc10-warning.patch b/gcc10-warning.patch deleted file mode 100644 index f1dfa61..0000000 --- a/gcc10-warning.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/open-vm-tools/lib/user/utilBacktrace.c -+++ b/open-vm-tools/lib/user/utilBacktrace.c -@@ -431,13 +431,16 @@ Util_BacktraceWithFunc(int bugNr, - } - } - #else -- uintptr_t *x = (uintptr_t *) &bugNr; -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Warray-bounds" -+ uintptr_t *x = ((uintptr_t *) &bugNr) - 2; -+#pragma GCC diagnostic pop - - if (bugNr == 0) { - outFunc(outFuncData, "Backtrace:\n"); - } else { - outFunc(outFuncData, "Backtrace for bugNr=%d\n",bugNr); - } -- UtilBacktraceFromPointerWithFunc(&x[-2], outFunc, outFuncData); -+ UtilBacktraceFromPointerWithFunc(x, outFunc, outFuncData); - #endif - } ---- a/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp -+++ b/open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp -@@ -94,15 +94,15 @@ - * This is for V1 text copy paste only! - */ - #ifndef GDK_SELECTION_CLIPBOARD --GdkAtom GDK_SELECTION_CLIPBOARD; -+extern GdkAtom GDK_SELECTION_CLIPBOARD; - #endif - - #ifndef GDK_SELECTION_TYPE_TIMESTAMP --GdkAtom GDK_SELECTION_TYPE_TIMESTAMP; -+extern GdkAtom GDK_SELECTION_TYPE_TIMESTAMP; - #endif - - #ifndef GDK_SELECTION_TYPE_UTF8_STRING --GdkAtom GDK_SELECTION_TYPE_UTF8_STRING; -+extern GdkAtom GDK_SELECTION_TYPE_UTF8_STRING; - #endif diff --git a/open-vm-tools-11.1.0-16036546.tar.gz b/open-vm-tools-11.1.0-16036546.tar.gz deleted file mode 100644 index 63bf7cf..0000000 --- a/open-vm-tools-11.1.0-16036546.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cb029af04357f19a899995f9e1ecfe55222b76158ab6d64fe8b56df0ccf87308 -size 3986835 diff --git a/open-vm-tools-11.1.5-16724464.tar.gz b/open-vm-tools-11.1.5-16724464.tar.gz new file mode 100644 index 0000000..6a9144d --- /dev/null +++ b/open-vm-tools-11.1.5-16724464.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb33171b22872d66632b4151feafd4da480aee0c6bd5dcc188651984c1e9c511 +size 3988511 diff --git a/open-vm-tools.changes b/open-vm-tools.changes index da6153d..96b85e8 100644 --- a/open-vm-tools.changes +++ b/open-vm-tools.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Fri Aug 28 14:57:34 UTC 2020 - Kirk Allan + +- Update to 11.1.5 (build 16724464) (boo#1175573) + + This source release rolls up the SDMP fixes release post 11.1.0. + + Fix serveral Coverity reported issues. + + Address github issues: + https://github.com/vmware/open-vm-tools/issues/451 + https://github.com/vmware/open-vm-tools/issues/429 + https://github.com/vmware/open-vm-tools/issues/428 +- Drop unnecessary patch: + - gcc10-warning.patch + - sdmp-get-version.patch + - sdmp-netstat-to-ss.patch + - sdmp-warnings.patch + ------------------------------------------------------------------- Thu Jun 18 18:10:23 UTC 2020 - Kirk Allan diff --git a/open-vm-tools.spec b/open-vm-tools.spec index 8383d9c..e261025 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -40,8 +40,8 @@ Name: open-vm-tools %define subname open-vm-tools %define tarname open-vm-tools -%define bldnum 16036546 -Version: 11.1.0 +%define bldnum 16724464 +Version: 11.1.5 Release: 0 Summary: Open Virtual Machine Tools License: BSD-3-Clause AND GPL-2.0-only AND LGPL-2.1-only @@ -135,11 +135,7 @@ Obsoletes: open-vm-tools-deploypkg <= 10.0.5 Supplements: modalias(pci:v000015ADd*sv*sd*bc*sc*i*) ExclusiveArch: %ix86 x86_64 #Upstream patches -Patch0: gcc10-warning.patch -Patch1: pam-vmtoolsd.patch -Patch2: sdmp-warnings.patch -Patch3: sdmp-get-version.patch -Patch4: sdmp-netstat-to-ss.patch +Patch0: pam-vmtoolsd.patch %if 0%{?suse_version} >= 1500 %systemd_ordering @@ -220,10 +216,6 @@ if you intend to create own plugins for vmtoolsd. sed -i -e "s/\r//" README #Upstream patches %patch0 -p2 -%patch1 -p2 -%patch2 -p2 -%patch3 -p2 -%patch4 -p2 %build %if %{with_X} diff --git a/sdmp-get-version.patch b/sdmp-get-version.patch deleted file mode 100644 index e5bdf6e..0000000 --- a/sdmp-get-version.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit 99a1a5ea0db308b88301f3c37c8458a255b8c473 -Author: Oliver Kurth -Date: Tue May 26 15:32:58 2020 -0700 - - serviceDiscovery: Updating 'get-versions.sh' script - - The following changes have been made: - - 1. Environment variable 'ALIVE_BASE' is used to construct the path of - the file where vcops version is stored. The variable is not avialable - when running the script inside serviceDiscovery plugin process, so a - hardcoded path is used. - - 2. Added command to retrieve tcserver version - -diff --git a/open-vm-tools/services/plugins/serviceDiscovery/get-versions.sh b/open-vm-tools/services/plugins/serviceDiscovery/get-versions.sh -index 496c95eb..b74d1715 100644 ---- a/open-vm-tools/services/plugins/serviceDiscovery/get-versions.sh -+++ b/open-vm-tools/services/plugins/serviceDiscovery/get-versions.sh -@@ -23,7 +23,7 @@ get_version() { - } - - get_vcops_version() { -- cat $ALIVE_BASE/user/conf/lastbuildversion.txt 2>/dev/null -+ cat /usr/lib/vmware-vcops/user/conf/lastbuildversion.txt 2>/dev/null - } - - get_srm_mgt_server_version() { -@@ -76,10 +76,15 @@ get_db2_version() { - db2level 2>/dev/null | grep "DB2 v" - } - -+get_tcserver_version() { -+ command -v tcserver >/dev/null 2>&1 && { tcserver version 2>/dev/null; } -+} -+ - echo VERSIONSTART "vcops_version" "$(get_vcops_version)" VERSIONEND - echo VERSIONSTART "srm_mgt_server_version" "$(get_srm_mgt_server_version)" VERSIONEND - echo VERSIONSTART "vcenter_appliance_version" "$(get_vcenter_appliance_version)" VERSIONEND - echo VERSIONSTART "db2_version" "$(get_db2_version)" VERSIONEND -+echo VERSIONSTART "tcserver_version" "$(get_tcserver_version)" VERSIONEND - - get_version "/\S+/(httpd-prefork|httpd|httpd2-prefork)($|\s)" -v - get_version "/usr/(bin|sbin)/apache\S*" -v diff --git a/sdmp-netstat-to-ss.patch b/sdmp-netstat-to-ss.patch deleted file mode 100644 index 97b29c8..0000000 --- a/sdmp-netstat-to-ss.patch +++ /dev/null @@ -1,95 +0,0 @@ -commit 64db1c0ccf1b6f5fb705a5d32778991d2e8ea7a8 -Author: Oliver Kurth -Date: Thu Jun 11 20:43:21 2020 -0700 - - ServiceDiscovery: Replacing deprecated 'netstat' command with 'ss' - - Updating the Linux serviceDiscovery scripts to use "ss" in place of - the deprecated "netstat" command. - -diff --git a/open-vm-tools/services/plugins/serviceDiscovery/get-connection-info.sh b/open-vm-tools/services/plugins/serviceDiscovery/get-connection-info.sh -index 1694514a..0fc89c62 100644 ---- a/open-vm-tools/services/plugins/serviceDiscovery/get-connection-info.sh -+++ b/open-vm-tools/services/plugins/serviceDiscovery/get-connection-info.sh -@@ -1,16 +1,16 @@ - #!/bin/sh - - # check if necesary commands exist --command -v netstat >/dev/null 2>&1 || { echo >&2 "netstat doesn't exist"; exit 1; } -+command -v ss >/dev/null 2>&1 || { echo >&2 "ss doesn't exist"; exit 1; } - command -v grep >/dev/null 2>&1 || { echo >&2 "grep doesn't exist"; exit 1; } - command -v sort >/dev/null 2>&1 || { echo >&2 "sort doesn't exist"; exit 1; } - command -v tr >/dev/null 2>&1 || { echo >&2 "tr doesn't exist"; exit 1; } - - # get pids of listening processes --space_separated_pids=$(netstat -lntup | grep -Eo "[0-9]+/" | sort -u) -+space_separated_pids=$(ss -lntup | grep -Eo "pid=[0-9]+" | sort -u) - - # grep pattern - pattern=$(echo $space_separated_pids | tr ' ' '|') - - # get matching lines --netstat -antup | grep -E $pattern -+ss -antup | grep -E $pattern -diff --git a/open-vm-tools/services/plugins/serviceDiscovery/get-listening-process-info.sh b/open-vm-tools/services/plugins/serviceDiscovery/get-listening-process-info.sh -index 173b1c04..d7a10200 100644 ---- a/open-vm-tools/services/plugins/serviceDiscovery/get-listening-process-info.sh -+++ b/open-vm-tools/services/plugins/serviceDiscovery/get-listening-process-info.sh -@@ -1,14 +1,14 @@ - #!/bin/sh - - # check if necesary commands exist --command -v netstat >/dev/null 2>&1 || { echo >&2 "netstat doesn't exist"; exit 1; } -+command -v ss >/dev/null 2>&1 || { echo >&2 "ss doesn't exist"; exit 1; } - command -v grep >/dev/null 2>&1 || { echo >&2 "grep doesn't exist"; exit 1; } - command -v sort >/dev/null 2>&1 || { echo >&2 "sort doesn't exist"; exit 1; } - command -v tr >/dev/null 2>&1 || { echo >&2 "tr doesn't exist"; exit 1; } - command -v ps >/dev/null 2>&1 || { echo >&2 "ps doesn't exist"; exit 1; } - - # get pids of listening processes --space_separated_pids=$(netstat -lntup | grep -Eo "[0-9]+/" | grep -Eo "[0-9]*" | sort -u) -+space_separated_pids=$(ss -lntup | grep -Eo "pid=[0-9]+" | grep -Eo "[0-9]*" | sort -u) - - # ps accepts comma separated pids - comma_separated_pids=$(echo $space_separated_pids | tr ' ' ',') -diff --git a/open-vm-tools/services/plugins/serviceDiscovery/get-listening-process-perf-metrics.sh b/open-vm-tools/services/plugins/serviceDiscovery/get-listening-process-perf-metrics.sh -index ad83762d..9a694d4c 100644 ---- a/open-vm-tools/services/plugins/serviceDiscovery/get-listening-process-perf-metrics.sh -+++ b/open-vm-tools/services/plugins/serviceDiscovery/get-listening-process-perf-metrics.sh -@@ -1,7 +1,7 @@ - #!/bin/sh - - # check if necesary commands exist --command -v netstat >/dev/null 2>&1 || { echo >&2 "netstat doesn't exist"; exit 1; } -+command -v ss >/dev/null 2>&1 || { echo >&2 "ss doesn't exist"; exit 1; } - command -v grep >/dev/null 2>&1 || { echo >&2 "grep doesn't exist"; exit 1; } - command -v sort >/dev/null 2>&1 || { echo >&2 "sort doesn't exist"; exit 1; } - command -v awk >/dev/null 2>&1 || { echo >&2 "awk doesn't exist"; exit 1; } -@@ -108,6 +108,6 @@ get_performance_metrics() { - run $pids - } - --space_separated_pids=$(netstat -lntup | grep -Eo "[0-9]+/" | grep -Eo "[0-9]+" | sort -u) -+space_separated_pids=$(ss -lntup | grep -Eo "pid=[0-9]+" | grep -Eo "[0-9]+" | sort -u) - - get_performance_metrics $space_separated_pids -\ No newline at end of file -diff --git a/open-vm-tools/services/plugins/serviceDiscovery/get-versions.sh b/open-vm-tools/services/plugins/serviceDiscovery/get-versions.sh -index b74d1715..c7a1e7cf 100644 ---- a/open-vm-tools/services/plugins/serviceDiscovery/get-versions.sh -+++ b/open-vm-tools/services/plugins/serviceDiscovery/get-versions.sh -@@ -1,12 +1,12 @@ - #!/bin/sh - - # check if necesary commands exist --command -v netstat >/dev/null 2>&1 || { echo >&2 "netstat doesn't exist"; exit 1; } -+command -v ss >/dev/null 2>&1 || { echo >&2 "ss doesn't exist"; exit 1; } - command -v grep >/dev/null 2>&1 || { echo >&2 "grep doesn't exist"; exit 1; } - command -v sort >/dev/null 2>&1 || { echo >&2 "sort doesn't exist"; exit 1; } - command -v ps >/dev/null 2>&1 || { echo >&2 "ps doesn't exist"; exit 1; } - --space_separated_pids=$(netstat -lntup | grep -Eo "[0-9]+/" | grep -Eo "[0-9]*" | sort -u) -+space_separated_pids=$(ss -lntup | grep -Eo "pid=[0-9]+" | grep -Eo "[0-9]*" | sort -u) - - get_command_line() { - ps --pid $1 -o command diff --git a/sdmp-warnings.patch b/sdmp-warnings.patch deleted file mode 100644 index 3001a1b..0000000 --- a/sdmp-warnings.patch +++ /dev/null @@ -1,25 +0,0 @@ -commit 2141bda9c0c424b8a1407940642676b2b8d53499 -Author: Oliver Kurth -Date: Wed Jun 10 12:05:45 2020 -0700 - - SDMP plugin logs warning message every 5 minute if there is no - Namespace DB instance created on a VM. Changing the log level to - debug to solve the problem. - -diff --git a/open-vm-tools/services/plugins/serviceDiscovery/serviceDiscovery.c b/open-vm-tools/services/plugins/serviceDiscovery/serviceDiscovery.c -index 87dd5893..c6c2e1dc 100644 ---- a/open-vm-tools/services/plugins/serviceDiscovery/serviceDiscovery.c -+++ b/open-vm-tools/services/plugins/serviceDiscovery/serviceDiscovery.c -@@ -381,9 +381,9 @@ ReadData(ToolsAppCtx *ctx, - status = SendRpcMessage(ctx, DynBuf_Get(&buf), DynBuf_GetSize(&buf), - resultData, resultDataLen); - if (!status) { -- g_warning("%s: Read over RPC failed, result: %s, resultDataLen: %" FMTSZ -- "u\n", __FUNCTION__, (*resultData != NULL) ? -- *resultData : "(null)", *resultDataLen); -+ g_debug("%s: Read over RPC failed, result: %s, resultDataLen: %" FMTSZ -+ "u\n", __FUNCTION__, (*resultData != NULL) ? -+ *resultData : "(null)", *resultDataLen); - } - done: - DynBuf_Destroy(&buf);