]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
open-vm-tools SUSE: Detect the proto files for the containerd grpc client
authorJohn Wolfe <jwolfe@vmware.com>
Sun, 1 Jan 2023 06:13:07 +0000 (22:13 -0800)
committerJohn Wolfe <jwolfe@vmware.com>
Sun, 1 Jan 2023 06:13:07 +0000 (22:13 -0800)
On SUSE systems, the Go src'es are installed in a different location,
namely /usr/share/go/1.18/contrib/src.
Extend the config checks to detect that location.

OVT pull request: https://github.com/vmware/open-vm-tools/pull/626

open-vm-tools/AUTHORS
open-vm-tools/configure.ac

index 3adc18b000f778fd2e9ef6af619cc08421aa9acc..ac5fd878e72c75656efa5b7f85cd1dc5b8260551 100644 (file)
@@ -85,3 +85,6 @@ Bartosz Brachaczek Make HgfsConvertFromNtTimeNsec aware of 64-bit time_t on i386
 
 Bernd Zeimetz   Fix building containerinfo plugin on i386
                 - https://github.com/vmware/open-vm-tools/pull/588
+
+Dirk Mueller    Detect the proto files for containerd grpc client on SUSE like systems
+                - https://github.com/vmware/open-vm-tools/pull/626
index 5c35356e659bf02330f0fcd5f826b562831e0575..7aae6641d8b8801885e1105acefcc41c6147a84b 100644 (file)
@@ -726,10 +726,20 @@ AC_DEFUN([AC_VMW_CONTAINERINFO_MSG],[
 #
 # proto files needed by containerd grpc client.
 #
-   shared_prefix=/usr/share/gocode/src/github.com
+# Installation location varies between Linux vendors.
+#   Canonical, Ubuntu and Debian: in /usr/share/gocode/src
+#   openSUSE/SUSE: in /usr/share/go/<version>/contrib/src
+#
+   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_CHECK_FILE([${CONTAINERD_PROTOPATH}/containers.proto],