summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2025-12-26 03:49:06 +0700
committerShulhan <ms@kilabit.info>2025-12-26 03:49:06 +0700
commitf7290baac6b2e54d08342f43c2df746a69aeb230 (patch)
treecafedbcd29d534427d4d9f5fad36bea071440668
parent89bfa01436e0476b3a9457067599a6f4250dc649 (diff)
downloadgoogle-cloud-ops-agent-git-dev.tar.xz
all: release v2.62.0masterdev
Changes, * Set the license using SPDX license name * Remove the jdk-openjdk from depends. The OpenJDK is optional and only needed if user want to collect JVM metrics through [JMX] * Install the minimum config.yaml that collect logging using systemd_journald * Remove patching builds/otel.sh since we can pass the GO_BIN environment variable before running it. [JMX]: https://docs.cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/third-party/jvm
-rw-r--r--.SRCINFO11
-rw-r--r--0002-builds_otel.sh.patch13
-rw-r--r--PKGBUILD34
-rw-r--r--config.yaml8
4 files changed, 33 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4c1ca19..967fbe1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,11 @@
pkgbase = google-cloud-ops-agent-git
pkgdesc = Ops Agents that are part of the Google Cloud Operations product suite (specifically Cloud Logging and Cloud Monitoring)
- pkgver = 2.61.0.r9.gccfedc9126
+ pkgver = 2.62.0.r8.g2289474b0b
pkgrel = 1
url = https://github.com/GoogleCloudPlatform/ops-agent
arch = x86_64
arch = aarch64
- license = Apache License 2.0
+ license = Apache-2.0
makedepends = cmake
makedepends = git
makedepends = go
@@ -16,20 +16,21 @@ pkgbase = google-cloud-ops-agent-git
makedepends = unzip
makedepends = zip
depends = libyaml
- depends = jdk-openjdk
+ optdepends = jre-openjdk-headless: Collects JVM metrics exposed through JMX
provides = google-cloud-ops-agent
conflicts = stackdriver-collectd
+ backup = etc/google-cloud-ops-agent/config.yaml
source = google-cloud-ops-agent-git::git+https://github.com/GoogleCloudPlatform/ops-agent.git
source = fluent-bit::git+https://github.com/fluent/fluent-bit.git
source = opentelemetry-operations-collector::git+https://github.com/GoogleCloudPlatform/opentelemetry-operations-collector.git
source = opentelemetry-java-contrib::git+https://github.com/open-telemetry/opentelemetry-java-contrib.git
source = 0001-build-sh.patch
- source = 0002-builds_otel.sh.patch
+ source = config.yaml
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = ba66d01b8058644597d9b406d3b8ce7ed40aed77c7358f2b97ff0e262a4cbb98
- sha256sums = aa5e5b1a27980a22a3c879a095909a20632af9eab614060e8d0f809028911a5f
+ sha256sums = 64d22051bc853097dd9c57396788275ce62b0ee58be79e6cfd7ff0261b1466aa
pkgname = google-cloud-ops-agent-git
diff --git a/0002-builds_otel.sh.patch b/0002-builds_otel.sh.patch
deleted file mode 100644
index 725288d..0000000
--- a/0002-builds_otel.sh.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/builds/otel.sh b/builds/otel.sh
-index 2a02997e5d..cd12d5070f 100755
---- a/builds/otel.sh
-+++ b/builds/otel.sh
-@@ -48,7 +48,7 @@ if [ "$SKIP_OTEL_JAVA" != "true" ]; then
- fi
-
- if [ -z "${GO_BIN}" ]; then
-- GO_BIN=/usr/local/go/bin/go
-+ GO_BIN=/usr/bin/go
- fi
- ARCH=$($GO_BIN env GOARCH)
-
diff --git a/PKGBUILD b/PKGBUILD
index efb83f4..1f13763 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,16 @@
# Maintainer: shulhan <ms@kilabit.info>
pkgname=google-cloud-ops-agent-git
-pkgver=2.61.0.r9.gccfedc9126
+pkgver=2.62.0.r8.g2289474b0b
pkgrel=1
pkgdesc="Ops Agents that are part of the Google Cloud Operations product suite (specifically Cloud Logging and Cloud Monitoring)"
arch=('x86_64' 'aarch64')
url='https://github.com/GoogleCloudPlatform/ops-agent'
-license=('Apache License 2.0')
-groups=()
+license=('Apache-2.0')
depends=(
'libyaml'
- 'jdk-openjdk'
)
makedepends=(
'cmake'
@@ -25,20 +23,24 @@ makedepends=(
'unzip'
'zip'
)
-optdepends=()
+optdepends=(
+ 'jre-openjdk-headless: Collects JVM metrics exposed through JMX'
+)
provides=('google-cloud-ops-agent')
conflicts=('stackdriver-collectd')
-backup=()
+backup=(
+ 'etc/google-cloud-ops-agent/config.yaml'
+)
source=(
"$pkgname::git+https://github.com/GoogleCloudPlatform/ops-agent.git"
"fluent-bit::git+https://github.com/fluent/fluent-bit.git"
"opentelemetry-operations-collector::git+https://github.com/GoogleCloudPlatform/opentelemetry-operations-collector.git"
"opentelemetry-java-contrib::git+https://github.com/open-telemetry/opentelemetry-java-contrib.git"
- "0001-build-sh.patch"
- "0002-builds_otel.sh.patch"
+ '0001-build-sh.patch'
+ 'config.yaml'
)
sha256sums=(
'SKIP'
@@ -46,7 +48,7 @@ sha256sums=(
'SKIP'
'SKIP'
'ba66d01b8058644597d9b406d3b8ce7ed40aed77c7358f2b97ff0e262a4cbb98'
- 'aa5e5b1a27980a22a3c879a095909a20632af9eab614060e8d0f809028911a5f'
+ '64d22051bc853097dd9c57396788275ce62b0ee58be79e6cfd7ff0261b1466aa'
)
pkgver() {
@@ -65,6 +67,8 @@ prepare() {
"${srcdir}/opentelemetry-java-contrib"
git -c protocol.file.allow=always submodule update
+ ## Fix building otel with error
+ ## "mkdir: cannot create directory ‘./META-INF’: File exist"
rm -rf ${srcdir}/google-cloud-ops-agent-git/submodules/opentelemetry-java-contrib/META-INF
}
@@ -76,17 +80,15 @@ build() {
echo "--- Applying patches ..."
cd "${pkgname}"
git apply "${srcdir}/0001-build-sh.patch"
- git apply "${srcdir}/0002-builds_otel.sh.patch"
echo "--- Building otel ..."
export JAVA_HOME='/usr/lib/jvm/java-17-openjdk'
export PATH="${JAVA_HOME}/bin:${PATH}"
java --version
- CGO_ENABLED=1 ./builds/otel.sh "$_destdir"
+ GO_BIN=/usr/bin/go CGO_ENABLED=1 \
+ ./builds/otel.sh "$_destdir"
echo "--- Building fluent_bit ..."
- echo "--- pkgname=${pkgname}"
- echo "--- pwd=${PWD}"
./builds/fluent_bit.sh "$_destdir"
echo "--- Building systemd ..."
@@ -95,7 +97,7 @@ build() {
echo "--- Building agent_wrapper ..."
./builds/agent_wrapper.sh "$_destdir"
- echo "--- Building ..."
+ echo "--- Building ops-agent ..."
BUILD_DISTRO=arch CODE_VERSION="${pkgver}" DESTDIR="$_destdir" \
./build.sh
}
@@ -105,6 +107,8 @@ package() {
cd "${pkgname}"
rsync -ar "${_destdir}/" "${pkgdir}/"
- rm -rf ${pkgdir}/lib
chown -R root:root ${pkgdir}/
+
+ install -d ${pkgdir}/etc/google-cloud-ops-agent/
+ install -p -m=0644 "${srcdir}/config.yaml" ${pkgdir}/etc/google-cloud-ops-agent/
}
diff --git a/config.yaml b/config.yaml
new file mode 100644
index 0000000..402be29
--- /dev/null
+++ b/config.yaml
@@ -0,0 +1,8 @@
+logging:
+ receivers:
+ syslog:
+ type: systemd_journald
+ service:
+ pipelines:
+ default_pipeline:
+ receivers: [syslog]