From: John Wolfe Date: Sun, 1 Jan 2023 06:13:07 +0000 (-0800) Subject: open-vm-tools SUSE: Detect the proto files for the containerd grpc client X-Git-Tag: stable-12.2.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=301cea5522870a746112cd6d634a04c465dcf7cc;p=thirdparty%2Fopen-vm-tools.git open-vm-tools SUSE: Detect the proto files for the containerd grpc client 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 --- diff --git a/open-vm-tools/AUTHORS b/open-vm-tools/AUTHORS index 3adc18b00..ac5fd878e 100644 --- a/open-vm-tools/AUTHORS +++ b/open-vm-tools/AUTHORS @@ -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 diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac index 5c35356e6..7aae6641d 100644 --- a/open-vm-tools/configure.ac +++ b/open-vm-tools/configure.ac @@ -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//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],