Skip to content

Commit 9941146

Browse files
committed
Revert "fix: revert away from official fluent-bit build"
This reverts commit cf2f4b2.
1 parent cf2f4b2 commit 9941146

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

l2/mkosi.build

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,7 @@ chmod +x $DESTDIR/usr/bin/vault
3535
cd "$BUILDROOT"
3636
IMPORT_PATH="github.com/GoogleCloudPlatform/ops-agent"
3737
BUILD_CMD="
38-
# Install cmake 3.28 to fix build issues on Apple Silicon hosts
39-
# See https://gitlab.kitware.com/cmake/cmake/-/issues/25562
40-
curl -L -o cmake.sh https://cmake.org/files/v3.28/cmake-3.28.6-linux-x86_64.sh
41-
chmod +x cmake.sh
42-
./cmake.sh --prefix=/usr --skip-license
43-
44-
# Fluentbit
45-
export SOURCE_DATE_EPOCH=0 PATH=/usr/local/go/bin:\$PATH
46-
export CFLAGS='-fno-ident -Wno-date-time' CXXFLAGS='-fno-ident -Wno-date-time'
47-
git submodule update --init --depth 1 submodules/fluent-bit
48-
./builds/fluent_bit.sh \$(pwd)/out
49-
50-
# Main gcp ops agent binaries
38+
# Main gcs agent binaries
5139
mkdir -p out/libexec
5240
LDFLAGS='-s -w -buildid='
5341
go build -buildvcs=false -trimpath -ldflags \"\$LDFLAGS \\
@@ -66,7 +54,8 @@ make_git_package \
6654
"https://github.com/GoogleCloudPlatform/ops-agent" \
6755
"$BUILD_CMD" \
6856
"out/libexec:/opt/google-cloud-ops-agent/libexec" \
69-
"out/opt/google-cloud-ops-agent/subagents/fluent-bit:/opt/google-cloud-ops-agent/subagents/fluent-bit" \
7057
"systemd/google-cloud-ops-agent-fluent-bit.service:/usr/lib/systemd/system/google-cloud-ops-agent-fluent-bit.service" \
7158
"systemd/google-cloud-ops-agent.service:/usr/lib/systemd/system/google-cloud-ops-agent.service"
59+
mkdir -p "$DESTDIR/opt/google-cloud-ops-agent/subagents"
60+
ln -s /opt/fluent-bit/bin/fluent-bit "$DESTDIR/opt/google-cloud-ops-agent/subagents/fluent-bit"
7261
sed -i 's|@PREFIX@|/opt/google-cloud-ops-agent|g; s|@SYSCONFDIR@|/etc|g' "$DESTDIR/usr/lib/systemd/system/google-cloud-ops-agent"*.service

l2/mkosi.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ WithNetwork=true
1616
BuildScripts=l2/mkosi.build
1717
ExtraTrees=l2/mkosi.extra
1818
PostInstallationScripts=l2/mkosi.postinst
19+
SyncScripts=l2/mkosi.sync
1920

2021
Packages=prometheus-node-exporter
22+
fluent-bit
2123
prometheus-process-exporter
2224
usrmerge
2325
xfsprogs

l2/mkosi.sync

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
if [ ! -f "$SRCDIR/mkosi.packages/fluent-bit.deb" ]; then
4+
curl -sSfL https://packages.fluentbit.io/debian/bookworm/fluent-bit_3.1.6_amd64.deb -o "$SRCDIR/mkosi.packages/fluent-bit.deb"
5+
fi

0 commit comments

Comments
 (0)