diff options
| author | Shulhan <ms@kilabit.info> | 2025-12-26 03:49:06 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-12-26 03:49:06 +0700 |
| commit | f7290baac6b2e54d08342f43c2df746a69aeb230 (patch) | |
| tree | cafedbcd29d534427d4d9f5fad36bea071440668 /PKGBUILD | |
| parent | 89bfa01436e0476b3a9457067599a6f4250dc649 (diff) | |
| download | google-cloud-ops-agent-git-dev.tar.xz | |
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
Diffstat (limited to 'PKGBUILD')
| -rw-r--r-- | PKGBUILD | 34 |
1 files changed, 19 insertions, 15 deletions
@@ -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/ } |
