diff options
author | Shulhan | 2021-12-02 19:56:54 +0700 |
---|---|---|
committer | Shulhan | 2021-12-02 20:02:23 +0700 |
commit | 978cbd3d7815623a24135c925852a28da6bfe80d (patch) | |
tree | d414510835daec206f9d45bb4624c98916f5a93f | |
download | aur-978cbd3d7815623a24135c925852a28da6bfe80d.tar.gz |
google-cloud-ops-agent-git: the google cloud ops-agent for Arch
This is the ops-agent that are part of the Google Cloud Operations
product suite (specifically Cloud Logging and Cloud Monitoring) [1].
This package replace stackdriver-collectd in the AUR [2].
[1] https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/
[2] https://aur.archlinux.org/packages/stackdriver-collectd/
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | PKGBUILD | 75 |
4 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5a3f506d3ae7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +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.7.0.r7.g43187fc + pkgrel = 1 + url = https://github.com/GoogleCloudPlatform/ops-agent + arch = x86_64 + license = Apache License 2.0 + makedepends = cmake + makedepends = go + makedepends = git + makedepends = pkg-config + provides = google-cloud-ops-agent + conflicts = stackdriver-collectd + source = google-cloud-ops-agent-git::git+https://github.com/GoogleCloudPlatform/ops-agent.git + source = collectd::git+https://github.com/Stackdriver/collectd.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 + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + +pkgname = google-cloud-ops-agent-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..bc0519f21b11 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +*.zst +/collectd +/fluent-bit +/google-cloud-ops-agent-git +/opentelemetry-java-contrib +/opentelemetry-operations-collector +/pkg +/src +/tmp diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..172791ae974a --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +.PHONY: all check release + +all: + makepkg -sd + +check: + namcap PKGBUILD + +release: + makepkg --printsrcinfo > .SRCINFO diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..70a9d484a172 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,75 @@ +# Maintainer: shulhan <ms@kilabit.info> + +pkgname=google-cloud-ops-agent-git +pkgver=2.7.0.r7.g43187fc +pkgrel=1 + +pkgdesc="Ops Agents that are part of the Google Cloud Operations product suite (specifically Cloud Logging and Cloud Monitoring)" +arch=(x86_64) +url='https://github.com/GoogleCloudPlatform/ops-agent' +license=('Apache License 2.0') +groups=() + +depends=() +makedepends=( + 'cmake' + 'go' + 'git' + 'pkg-config' +) +optdepends=() + +provides=('google-cloud-ops-agent') +conflicts=('stackdriver-collectd') + +backup=() + +source=( + "$pkgname::git+https://github.com/GoogleCloudPlatform/ops-agent.git" + "collectd::git+https://github.com/Stackdriver/collectd.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" +) +md5sums=( + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' + 'SKIP' +) + +pkgver() { + cd "${pkgname}" + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${pkgname}" + git submodule init + git config submodule."submodules/collectd".url \ + "${srcdir}/collectd" + git config submodule."submodules/fluent-bit".url \ + "${srcdir}/fluent-bit" + git config submodule."submodules/opentelemetry-operations-collector".url \ + "${srcdir}/opentelemetry-operations-collector" + git config submodule."submodules/opentelemetry-java-contrib".url \ + "${srcdir}/opentelemetry-java-contrib" + git submodule update +} + +build() { + cd "${pkgname}" + echo "build in $PWD" + BUILD_DISTRO=arch CODE_VERSION="${pkgver}" \ + ./build.sh +} + +package() { + cd "${pkgname}" + tar -xf /tmp/google-cloud-ops-agent.tgz -C ${pkgdir}/ + rm -rf ${pkgdir}/lib + chown -R root:root ${pkgdir}/etc + chown -R root:root ${pkgdir}/opt + chown -R root:root ${pkgdir}/usr +} |