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..178fd16 100644
--- a/open-vm-tools.changes
+++ b/open-vm-tools.changes
@@ -1,3 +1,49 @@
+-------------------------------------------------------------------
+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
+
+- 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
+
+- Added patches (jsc-PED-1344)
+ + detect-suse-location.patch
+
+-------------------------------------------------------------------
+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) (boo#1205962)
+ - 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..cedc10c 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,18 @@ 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
+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
+%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 +256,7 @@ sed -i -e "s/\r//" README
#SUSE specific patches
%patch0 -p2
+%patch1 -p2
%build
%if %{with_X}
@@ -256,11 +271,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
@@ -281,7 +300,8 @@ chmod 755 configure
--enable-servicediscovery \
%{arg_with_fuse} \
--enable-salt-minion \
- --disable-static
+ --disable-static \
+ %{?arg_containerinfo}
make
%install
@@ -412,6 +432,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 +565,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