app-power-metrics/stx-power-metrics-images/files/cadvisor-0001-Fix-flags-typ...

47 lines
1.6 KiB
Diff

From 0206b1abbb215ebd948f151e95b20befb11db3db Mon Sep 17 00:00:00 2001
From: Caio Cesar Ferreira <Caio.CesarFerreira@windriver.com>
Date: Wed, 14 Jun 2023 09:58:18 -0300
Subject: [PATCH] Fix flags typo
Fix typo in GO_TAGS variable in Dockerfile. This typo was preventing cadvisor to
compile with libpfm support.
This fix is already on upstream and will be available on next release:
https://github.com/google/cadvisor/commit/0206b1abbb215ebd948f151e95b20befb11db3db
Signed-off-by: Caio Cesar Ferreira <Caio.CesarFerreira@windriver.com>
---
build/build.sh | 2 +-
deploy/Dockerfile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/build/build.sh b/build/build.sh
index 05332b14..e0613553 100755
--- a/build/build.sh
+++ b/build/build.sh
@@ -19,7 +19,7 @@ set -e
export GOOS=${GOOS:-$(go env GOOS)}
export GOARCH=${GOARCH:-$(go env GOARCH)}
export CGO_ENABLED=${GO_CGO_ENABLED:-"1"}
-GO_FLAGS=${GO_FLAGS:-"-tags netgo"} # Extra go flags to use in the build.
+GO_FLAGS=${GO_FLAGS:-"-tags=netgo"} # Extra go flags to use in the build.
BUILD_USER=${BUILD_USER:-"${USER}@${HOSTNAME}"}
BUILD_DATE=${BUILD_DATE:-$( date +%Y%m%d-%H:%M:%S )}
VERBOSE=${VERBOSE:-}
diff --git a/deploy/Dockerfile b/deploy/Dockerfile
index 6b533ebc..0bd5b7de 100644
--- a/deploy/Dockerfile
+++ b/deploy/Dockerfile
@@ -40,7 +40,7 @@ ADD . .
ARG VERSION
# libipmctl only works on x86_64 CPUs.
-RUN export GO_TAGS="-tags=libfpm,netgo"; \
+RUN export GO_TAGS="libpfm,netgo"; \
if [ "$(uname --machine)" = "x86_64" ]; then \
export GO_TAGS="$GO_TAGS,libipmctl"; \
fi; \
--
2.25.1