From e01dba6e312197883faccc89f0c07a20b1ed2bcf0f747c258ffc202ad40e0086 Mon Sep 17 00:00:00 2001 From: Kirk Allan Date: Tue, 13 Dec 2022 18:54:37 +0000 Subject: [PATCH 1/4] Accepting request 1042521 from home:ccrane:branches:Virtualization:VMware - Add containerInfo plugin (jsc-PED-1344) - Add dependencies on grpc, protobuf, and containerd for container introspection - Add _service to handle open-vm-tools sources - Update to 12.1.5 (build 20735119) - A number of Coverity reported issues have been addressed. - The deployPkg plugin may prematurely reboot the guest VM before cloud-init has completed user data setup. If both the Perl based Linux customization script and cloud-init run when the guest VM boots, the deployPkg plugin may reboot the guest before cloud-init has finished. The deployPkg plugin has been updated to wait for a running cloud-init process to finish before the guest VM reboot is initiated. This issue is fixed in this release. - A SIGSEGV may be encountered when a non-quiesing snapshot times out. This issue is fixed in this release. - Unwanted vmtoolsd service error message if not on a VMware hypervisor. When open-vm-tools comes preinstalled in a base Linux release, the vmtoolsd services are started automatically at system start and desktop login. If running on physical hardware or in a non-VMware hypervisor, the services will emit an error message to the Systemd's logging service before stopping. This issue is fixed in this release. OBS-URL: https://build.opensuse.org/request/show/1042521 OBS-URL: https://build.opensuse.org/package/show/Virtualization:VMware/open-vm-tools?expand=0&rev=421 --- _service | 14 ++++++++ detect-suse-location.patch | 26 +++++++++++++++ open-vm-tools-12.1.0-20219665.tar.gz | 3 -- open-vm-tools-12.1.5.tar.xz | 3 ++ open-vm-tools.changes | 31 +++++++++++++++++ open-vm-tools.spec | 50 +++++++++++++++++++++++----- 6 files changed, 116 insertions(+), 11 deletions(-) create mode 100644 _service create mode 100644 detect-suse-location.patch delete mode 100644 open-vm-tools-12.1.0-20219665.tar.gz create mode 100644 open-vm-tools-12.1.5.tar.xz diff --git a/_service b/_service new file mode 100644 index 0000000..ebd66e8 --- /dev/null +++ b/_service @@ -0,0 +1,14 @@ + + + git + https://github.com/vmware/open-vm-tools.git + stable-12.1.5 + open-vm-tools + 12.1.5 + + + *.tar + xz + + + diff --git a/detect-suse-location.patch b/detect-suse-location.patch new file mode 100644 index 0000000..eb7891d --- /dev/null +++ b/detect-suse-location.patch @@ -0,0 +1,26 @@ +diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac +index 3c058135..203fdc6f 100644 +--- a/open-vm-tools/configure.ac ++++ b/open-vm-tools/configure.ac +@@ -726,12 +726,18 @@ AC_DEFUN([AC_VMW_CONTAINERINFO_MSG],[ + # + # proto files needed by containerd grpc client. + # +- shared_prefix=/usr/share/gocode/src/github.com ++ for d in /usr/share/gocode/src /usr/share/go/1.*/contrib/src; do ++ if test -d "$d"/github.com; then ++ src_prefix="$d" ++ break ++ fi ++ done ++ shared_prefix=$src_prefix/github.com + AC_SUBST(TYPES_DIR, github.com/containerd/containerd/api/types) + AC_SUBST(TASKS_PROTOPATH, $shared_prefix/containerd/containerd/api/services/tasks/v1) +- AC_SUBST(DEP_PROTOPATH, /usr/share/gocode/src) ++ AC_SUBST(DEP_PROTOPATH, $src_prefix) + AC_SUBST(CONTAINERD_PROTOPATH, $shared_prefix/containerd/containerd/api/services/containers/v1) +- AC_SUBST(GOGO_PROTOPATH, $shared_prefix/gogo/protobuf) ++ AC_SUBST(GOGO_PROTOPATH, $shared_prefix/containerd/containerd/vendor/github.com/gogo/protobuf) + AC_CHECK_FILE([${CONTAINERD_PROTOPATH}/containers.proto], + [], + [AC_VMW_CONTAINERINFO_MSG(["containerd package"])]) diff --git a/open-vm-tools-12.1.0-20219665.tar.gz b/open-vm-tools-12.1.0-20219665.tar.gz deleted file mode 100644 index ee72766..0000000 --- a/open-vm-tools-12.1.0-20219665.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9cff769cb60d3e570b8dfed98179b345b089ee3cc31a60d80a4fcca1cc220ee -size 4355225 diff --git a/open-vm-tools-12.1.5.tar.xz b/open-vm-tools-12.1.5.tar.xz new file mode 100644 index 0000000..7bf1fcf --- /dev/null +++ b/open-vm-tools-12.1.5.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0167932c6b06fe8eeafafb9b30b7d1a71ae0e7d854b300135de4aa09ef1f857d +size 1790180 diff --git a/open-vm-tools.changes b/open-vm-tools.changes index fd01830..e7fbca6 100644 --- a/open-vm-tools.changes +++ b/open-vm-tools.changes @@ -1,3 +1,34 @@ +------------------------------------------------------------------- +Mon Dec 12 19:01:53 UTC 2022 - Caleb Crane + +- Add containerInfo plugin (jsc-PED-1344) + - Add dependencies on grpc, protobuf, and containerd for container introspection + +------------------------------------------------------------------- +Thu Dec 8 20:24:29 UTC 2022 - Caleb Crane + +- Add _service to handle open-vm-tools sources +- Update to 12.1.5 (build 20735119) + - A number of Coverity reported issues have been addressed. + + - The deployPkg plugin may prematurely reboot the guest VM before cloud-init + has completed user data setup. If both the Perl based Linux customization + script and cloud-init run when the guest VM boots, the deployPkg plugin + may reboot the guest before cloud-init has finished. The deployPkg + plugin has been updated to wait for a running cloud-init process to + finish before the guest VM reboot is initiated. This issue is fixed in + this release. + + - A SIGSEGV may be encountered when a non-quiesing snapshot times out. + This issue is fixed in this release. + + - Unwanted vmtoolsd service error message if not on a VMware hypervisor. + When open-vm-tools comes preinstalled in a base Linux release, the vmtoolsd + services are started automatically at system start and desktop login. + If running on physical hardware or in a non-VMware hypervisor, the services + will emit an error message to the Systemd's logging service before stopping. + This issue is fixed in this release. + ------------------------------------------------------------------- Thu Aug 25 15:57:57 UTC 2022 - Kirk Allan diff --git a/open-vm-tools.spec b/open-vm-tools.spec index d9000e4..62af89d 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -38,16 +38,13 @@ %define with_X 1 Name: open-vm-tools -%define subname open-vm-tools -%define tarname open-vm-tools -%define bldnum 20219665 -Version: 12.1.0 +Version: 12.1.5 Release: 0 Summary: Open Virtual Machine Tools License: BSD-3-Clause AND GPL-2.0-only AND LGPL-2.1-only Group: System/Emulators/PC URL: https://github.com/vmware/open-vm-tools -Source: %{tarname}-%{version}-%{bldnum}.tar.gz +Source: %{name}-%{version}.tar.xz Source1: vmtoolsd Source2: vmtoolsd.service Source3: vmware-user-autostart.desktop @@ -74,8 +71,12 @@ BuildRequires: pcre-devel BuildRequires: procps-devel BuildRequires: update-desktop-files %if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300 +BuildRequires: containerd-devel BuildRequires: glibc >= 2.27 +BuildRequires: grpc-devel +BuildRequires: libcurl-devel BuildRequires: libtirpc-devel +BuildRequires: protobuf-devel BuildRequires: rpcgen BuildRequires: pkgconfig(gdk-pixbuf-xlib-2.0) >= 2.21.0 BuildRequires: pkgconfig(sm) @@ -86,9 +87,11 @@ BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xrandr) BuildRequires: pkgconfig(xrender) BuildRequires: pkgconfig(xtst) +%define arg_containerinfo --enable-containerinfo=yes %else BuildRequires: glibc >= 2.12 BuildRequires: xorg-x11-devel +%define arg_containerinfo --enable-containerinfo=no %endif BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libudev) @@ -151,6 +154,7 @@ ExclusiveArch: %ix86 x86_64 aarch64 #SUSE specific patches Patch0: pam-vmtoolsd.patch +Patch1: detect-suse-location.patch %if 0%{?suse_version} >= 1500 %systemd_ordering @@ -233,8 +237,23 @@ Requires: libvmtools0 = %{version} Those are the development headers for libvmtools. They are needed if you intend to create own plugins for vmtoolsd. +%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300 +%package containerinfo +Summary: Container Info Plugin +Group: System Environment/Libraries +# Tumbleweed but not Leap 15 or SLE 15 which have different libgrpc and libprotobuf packages +%if 0%{suse_version} > 1500 +Requires: %{name}%{?_isa} = %{version}-%{release}, curl, libgrpc++1_51, libgrpc29, libprotobuf3_21_11 +%else +Requires: %{name}%{?_isa} = %{version}-%{release}, curl, libgrpc++1, libgrpc8, libprotobuf20 +%endif + +%description containerinfo +This package interfaces with the container runtime to retrieve a list of containers running on a Linux guest +%endif + %prep -%setup -q -n %{tarname}-%{version}-%{bldnum} +%setup -q -n %{name}-%{version}/%{name} # fix for an rpmlint warning regarding wrong line feeds sed -i -e "s/\r//" README @@ -242,6 +261,7 @@ sed -i -e "s/\r//" README #SUSE specific patches %patch0 -p2 +%patch1 -p2 %build %if %{with_X} @@ -257,7 +277,7 @@ sed -i -e "s/\r//" README export CFLAGS="%{optflags} -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-sizeof-pointer-memaccess -Wno-cpp -fPIE" export CXXFLAGS="%{optflags} -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-sizeof-pointer-memaccess -Wno-cpp -fPIE" %if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300 -export LDFLAGS="-pie -ltirpc" +export LDFLAGS="-pie -ltirpc -labsl_synchronization -lgpr" %else export LDFLAGS="-pie" %endif @@ -281,7 +301,8 @@ chmod 755 configure --enable-servicediscovery \ %{arg_with_fuse} \ --enable-salt-minion \ - --disable-static + --disable-static \ + %{?arg_containerinfo} make %install @@ -412,6 +433,14 @@ systemctl try-restart vmtoolsd.service || : %postun -n libvmtools0 -p /sbin/ldconfig +%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300 +%post containerinfo +systemctl try-restart vmtoolsd.service || : + +%postun containerinfo +systemctl try-restart vmtoolsd.service || : +%endif + %files %defattr(-, root, root) %if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 0120300 @@ -537,4 +566,9 @@ systemctl try-restart vmtoolsd.service || : %{_includedir}/libDeployPkg %{_libdir}/pkgconfig/libDeployPkg.pc +%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300 +%files containerinfo +%{_libdir}/%{name}/plugins/vmsvc/libcontainerInfo.so +%endif + %changelog From 4d9165cbada4e32f4627d5e72a0fd70afecd480dfab1371ecdada473dc8b80db Mon Sep 17 00:00:00 2001 From: Kirk Allan Date: Tue, 13 Dec 2022 19:09:11 +0000 Subject: [PATCH 2/4] Add boo#1205962 OBS-URL: https://build.opensuse.org/package/show/Virtualization:VMware/open-vm-tools?expand=0&rev=422 --- open-vm-tools.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-vm-tools.changes b/open-vm-tools.changes index e7fbca6..bd0fb6e 100644 --- a/open-vm-tools.changes +++ b/open-vm-tools.changes @@ -8,7 +8,7 @@ Mon Dec 12 19:01:53 UTC 2022 - Caleb Crane Thu Dec 8 20:24:29 UTC 2022 - Caleb Crane - Add _service to handle open-vm-tools sources -- Update to 12.1.5 (build 20735119) +- Update to 12.1.5 (build 20735119) (boo#1205962) - A number of Coverity reported issues have been addressed. - The deployPkg plugin may prematurely reboot the guest VM before cloud-init From a775c08d77822732efd28af0681eeb54eafb30eafea49234dcd84c35644811db Mon Sep 17 00:00:00 2001 From: Kirk Allan Date: Wed, 14 Dec 2022 17:44:37 +0000 Subject: [PATCH 3/4] Accepting request 1042968 from home:kallan:branches:Virtualization:VMware - Don't use new LDFLAGS, -labsl_synchronization -lgpr, when building for SLE. - Add dependencies on grpc, protobuf, and containerd for container introspection - Added patches (jsc-PED-1344) + detect-suse-location.patch OBS-URL: https://build.opensuse.org/request/show/1042968 OBS-URL: https://build.opensuse.org/package/show/Virtualization:VMware/open-vm-tools?expand=0&rev=423 --- open-vm-tools.changes | 11 ++++++++++- open-vm-tools.spec | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/open-vm-tools.changes b/open-vm-tools.changes index bd0fb6e..fde8a95 100644 --- a/open-vm-tools.changes +++ b/open-vm-tools.changes @@ -1,8 +1,17 @@ +------------------------------------------------------------------- +Tue Dec 13 19:54:02 UTC 2022 - Kirk Allan + +- Don't use new LDFLAGS, -labsl_synchronization -lgpr, when building for SLE. + ------------------------------------------------------------------- Mon Dec 12 19:01:53 UTC 2022 - Caleb Crane - Add containerInfo plugin (jsc-PED-1344) - - Add dependencies on grpc, protobuf, and containerd for container introspection + - Add dependencies on grpc, protobuf, and containerd for container + introspection + +- Added patches (jsc-PED-1344) + + detect-suse-location.patch ------------------------------------------------------------------- Thu Dec 8 20:24:29 UTC 2022 - Caleb Crane diff --git a/open-vm-tools.spec b/open-vm-tools.spec index 62af89d..4677af1 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -276,11 +276,15 @@ sed -i -e "s/\r//" README # (this is because of 'g_static_mutex_init' usage which is now deprecated) export CFLAGS="%{optflags} -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-sizeof-pointer-memaccess -Wno-cpp -fPIE" export CXXFLAGS="%{optflags} -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-sizeof-pointer-memaccess -Wno-cpp -fPIE" -%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300 +%if 0%{?suse_version} > 1500 export LDFLAGS="-pie -ltirpc -labsl_synchronization -lgpr" %else +%if 0%{?sle_version} >= 150300 +export LDFLAGS="-pie -ltirpc" +%else export LDFLAGS="-pie" %endif +%endif # Required for version 9.4.0 export CUSTOM_PROCPS_NAME=procps autoreconf -fi From 3d5a09a3ef05120c3298c284f20b5323f06f2191ded4b6347c1633c5de58b026 Mon Sep 17 00:00:00 2001 From: Kirk Allan Date: Wed, 14 Dec 2022 22:39:16 +0000 Subject: [PATCH 4/4] Accepting request 1043005 from home:kallan:branches:Virtualization:VMware - Don't list libgrpc++, libgrpc, and libprotobuf in the containerinfo Requires section. The dependencies will be added automatically. OBS-URL: https://build.opensuse.org/request/show/1043005 OBS-URL: https://build.opensuse.org/package/show/Virtualization:VMware/open-vm-tools?expand=0&rev=424 --- open-vm-tools.changes | 6 ++++++ open-vm-tools.spec | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/open-vm-tools.changes b/open-vm-tools.changes index fde8a95..178fd16 100644 --- a/open-vm-tools.changes +++ b/open-vm-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Dec 14 21:24:00 UTC 2022 - Kirk Allan + +- Don't list libgrpc++, libgrpc, and libprotobuf in the containerinfo Requires + section. The dependencies will be added automatically. + ------------------------------------------------------------------- Tue Dec 13 19:54:02 UTC 2022 - Kirk Allan diff --git a/open-vm-tools.spec b/open-vm-tools.spec index 4677af1..cedc10c 100644 --- a/open-vm-tools.spec +++ b/open-vm-tools.spec @@ -241,12 +241,7 @@ if you intend to create own plugins for vmtoolsd. %package containerinfo Summary: Container Info Plugin Group: System Environment/Libraries -# Tumbleweed but not Leap 15 or SLE 15 which have different libgrpc and libprotobuf packages -%if 0%{suse_version} > 1500 -Requires: %{name}%{?_isa} = %{version}-%{release}, curl, libgrpc++1_51, libgrpc29, libprotobuf3_21_11 -%else -Requires: %{name}%{?_isa} = %{version}-%{release}, curl, libgrpc++1, libgrpc8, libprotobuf20 -%endif +Requires: %{name}%{?_isa} = %{version}-%{release}, curl %description containerinfo This package interfaces with the container runtime to retrieve a list of containers running on a Linux guest