diff options
author | Shulhan | 2023-07-15 14:53:27 +0700 |
---|---|---|
committer | Shulhan | 2023-07-15 15:07:21 +0700 |
commit | 1d88da4acbf721ab319261e84ac27985a5812770 (patch) | |
tree | e043be207aa64f5dac51c7dc8784b21e2893b305 | |
parent | 29d6096821e59ac2aca3de8c0cdd74a58af75663 (diff) | |
download | aur-1d88da4acbf721ab319261e84ac27985a5812770.tar.gz |
all: patch the default config.yaml to use systemd_journald
Previosly, the default config.yaml receivers for syslog is using
"type: files" that read /var/log/messages and /var/log/syslog.
In Arch Linux, those files are not exist anymore, so we replace the
with "type: systemd_journald" to make all the system logs forwarded to
Cloud Logging.
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | 0001-build-sh.patch | 22 | ||||
-rw-r--r-- | PKGBUILD | 4 |
3 files changed, 19 insertions, 9 deletions
@@ -26,6 +26,6 @@ pkgbase = google-cloud-ops-agent-git sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP - sha256sums = a4ec5040542b3b7b33b995f8357fd81dac901975f7d52955b713f8cccc756501 + sha256sums = b76f3853c695b688d1c34ba967b04c9d3eca58e7cd20af45a1403789e3481525 pkgname = google-cloud-ops-agent-git diff --git a/0001-build-sh.patch b/0001-build-sh.patch index 4461f5581abe..29b921027f44 100644 --- a/0001-build-sh.patch +++ b/0001-build-sh.patch @@ -27,9 +27,19 @@ index 4a97050f7..041b3ac72 100755 - # 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 +diff --git a/confgenerator/built-in-config-linux.yaml b/confgenerator/built-in-config-linux.yaml +index cd84fc39b..10eb9c2fe 100644 +--- a/confgenerator/built-in-config-linux.yaml ++++ b/confgenerator/built-in-config-linux.yaml +@@ -1,10 +1,7 @@ + logging: + receivers: + syslog: +- type: files +- include_paths: +- - /var/log/messages +- - /var/log/syslog ++ type: systemd_journald + service: + pipelines: + default_pipeline: @@ -42,7 +42,7 @@ sha256sums=( 'SKIP' 'SKIP' 'SKIP' - 'a4ec5040542b3b7b33b995f8357fd81dac901975f7d52955b713f8cccc756501' + 'b76f3853c695b688d1c34ba967b04c9d3eca58e7cd20af45a1403789e3481525' ) pkgver() { @@ -70,6 +70,7 @@ build() { echo "destdir: $_destdir" cd "${pkgname}" + git apply "${srcdir}/0001-build-sh.patch" CGO_ENABLED=1 ./builds/otel.sh "$_destdir" ./builds/fluent_bit.sh "$_destdir" @@ -77,7 +78,6 @@ build() { ./builds/ops_agent_diagnostics.sh "$_destdir" ./builds/agent_wrapper.sh "$_destdir" - git apply "${srcdir}/0001-build-sh.patch" BUILD_DISTRO=arch CODE_VERSION="${pkgver}" DESTDIR="$_destdir" \ ./build.sh } |