summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo (XenGi) Band2018-12-29 22:52:42 +0100
committerRicardo (XenGi) Band2018-12-29 22:52:42 +0100
commitc076a8fb71d0833a00c62ab92290314d2a2e7af4 (patch)
tree72a54fd79ed68b0b18dd7c69ce2d9dace27decc5
downloadaur-c076a8fb71d0833a00c62ab92290314d2a2e7af4.tar.gz
initial dump
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD37
-rw-r--r--sensu.sysusers2
-rw-r--r--sensu.tmpfiles5
4 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0557a128048e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = sensu-go-agent
+ pkgdesc = Sensu Go Agent
+ pkgver = 5.1.0
+ pkgrel = 1
+ url = https://sensu.io
+ arch = x86_64
+ license = MIT
+ source = sensu-go-agent-5.1.0-0ubuntu18.1_amd64.deb::https://packagecloud.io/sensu/stable/packages/ubuntu/cosmic/sensu-go-agent_5.1.0-0ubuntu18.1_amd64.deb/download.deb
+ source = sensu.sysusers
+ source = sensu.tmpfiles
+ sha1sums = 321a7eb50c67a45675e688a94740db5148efd656
+ sha1sums = 054c2cfb7b2c4e6900fe79620b40fd060dbc0d8a
+ sha1sums = 9cca06fcbb23d5618382cc14e4ab4cc73c1f91fa
+
+pkgname = sensu-go-agent
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..66595c10d614
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Ricardo (XenGi) Band <email@ricardo.band>
+pkgname=sensu-go-agent
+_pkgname=sensu-agent
+pkgver=5.1.0
+_pkgver=5.1.0-0ubuntu18.1
+pkgrel=1
+pkgdesc="Sensu Go Agent"
+arch=('x86_64')
+url='https://sensu.io'
+license=('MIT')
+source=("${pkgname}-${_pkgver}_amd64.deb::https://packagecloud.io/sensu/stable/packages/ubuntu/cosmic/${pkgname}_${_pkgver}_amd64.deb/download.deb"
+ "sensu.sysusers"
+ "sensu.tmpfiles")
+sha1sums=('321a7eb50c67a45675e688a94740db5148efd656'
+ '054c2cfb7b2c4e6900fe79620b40fd060dbc0d8a'
+ '9cca06fcbb23d5618382cc14e4ab4cc73c1f91fa')
+
+prepare() {
+ cd "${srcdir}"
+ tar xaf data.tar.gz
+ # change /usr/sbin to /usr/bin
+ sed -i 's/\/usr\/sbin\//\/usr\/bin\//g' "${srcdir}/usr/share/${pkgname}-${pkgver}/${_pkgname}.service"
+}
+
+# TODO: better build from source
+# build() {}
+
+package() {
+ install -Dm755 "${srcdir}/usr/sbin/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
+ install -Dm644 "${srcdir}/usr/share/doc/${pkgname}-${pkgver}/LICENSE.txt" "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/LICENSE.txt"
+ install -Dm644 "${srcdir}/usr/share/doc/${pkgname}-${pkgver}/README.txt" "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/README.txt"
+ install -Dm644 "${srcdir}/usr/share/doc/${pkgname}-${pkgver}/agent.yml.example" "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/agent.yml.example"
+ install -Dm644 "${srcdir}/usr/share/${pkgname}-${pkgver}/${_pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service"
+ install -Dm644 "sensu.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
+ install -Dm644 "sensu.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
+}
+
diff --git a/sensu.sysusers b/sensu.sysusers
new file mode 100644
index 000000000000..14b6d0d9b411
--- /dev/null
+++ b/sensu.sysusers
@@ -0,0 +1,2 @@
+u sensu - "Sensu Monitoring Framework" /opt/sensu /sbin/nologin
+g sensu - -
diff --git a/sensu.tmpfiles b/sensu.tmpfiles
new file mode 100644
index 000000000000..5da270e36f07
--- /dev/null
+++ b/sensu.tmpfiles
@@ -0,0 +1,5 @@
+d /etc/sensu 0750 sensu sensu
+d /var/cache/sensu 0750 sensu sensu
+d /var/lib/sensu 0750 sensu sensu
+d /var/log/sensu 0750 sensu sensu
+d /run/sensu 0750 sensu sensu