summaryrefslogtreecommitdiff
path: root/0001-build-sh.patch
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-02-17 00:11:16 +0700
committerShulhan <ms@kilabit.info>2023-02-17 00:11:54 +0700
commit1198b7531a4dc6ecadc30284744934dfbaa536d1 (patch)
treed236a18a0fadcbc6039fc8e6624eef557a9b7bce /0001-build-sh.patch
parenta82178cdd43d4d98480400abdd57e74fab2795ce (diff)
downloadgoogle-cloud-ops-agent-git-1198b7531a4dc6ecadc30284744934dfbaa536d1.tar.xz
all: fix build failed due to upstream changes
Since PR #1038 merged to master, the build failed due to the $DESTDIR now replaced with "/work" for building with docker. [1] [1] https://github.com/GoogleCloudPlatform/ops-agent/pull/1038#discussion_r1106206200
Diffstat (limited to '0001-build-sh.patch')
-rw-r--r--0001-build-sh.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/0001-build-sh.patch b/0001-build-sh.patch
new file mode 100644
index 0000000..4461f55
--- /dev/null
+++ b/0001-build-sh.patch
@@ -0,0 +1,35 @@
+diff --git a/build.sh b/build.sh
+index 4a97050f7..041b3ac72 100755
+--- a/build.sh
++++ b/build.sh
+@@ -40,19 +40,15 @@ if [ -z "$DESTDIR" ]; then
+ fi
+
+ function build_opsagentengine() {
+- if [[ ! -f /work/google_cloud_ops_agent_engine ]]; then
+- go build -buildvcs=false -o "/work/google_cloud_ops_agent_engine" \
+- -ldflags "$LD_FLAGS" \
+- github.com/GoogleCloudPlatform/ops-agent/cmd/google_cloud_ops_agent_engine
++ if [[ ! -f "$DESTDIR$prefix/libexec/google_cloud_ops_agent_engine" ]]; then
++ mkdir -p "$DESTDIR$prefix/libexec"
++ go build -buildvcs=false -o "$DESTDIR$prefix/libexec/google_cloud_ops_agent_engine" \
++ -ldflags "$LD_FLAGS" \
++ github.com/GoogleCloudPlatform/ops-agent/cmd/google_cloud_ops_agent_engine
+ fi
+- mkdir -p "$DESTDIR$prefix/libexec"
+- cp /work/google_cloud_ops_agent_engine "$DESTDIR$prefix/libexec/google_cloud_ops_agent_engine"
+ }
+
+ (build_opsagentengine)
+
+-# Copy the cached compilations from docker to the destination
+-cp -r /work/cache/* $DESTDIR
+-
+ # N.B. Don't include $DESTDIR itself in the tarball, since mktemp -d will create it mode 0700.
+ (cd "$DESTDIR" && tar -czf /tmp/google-cloud-ops-agent.tgz *)
+diff --git a/submodules/fluent-bit b/submodules/fluent-bit
+--- a/submodules/fluent-bit
++++ b/submodules/fluent-bit
+@@ -1 +1 @@
+-Subproject commit 97a5e9dcf3f9d2e2107660cf73f6ef253fd227cd
++Subproject commit 97a5e9dcf3f9d2e2107660cf73f6ef253fd227cd-dirty