diff options
author | Konstantin Shalygin | 2021-07-18 03:59:42 +0700 |
---|---|---|
committer | Konstantin Shalygin | 2021-07-18 03:59:42 +0700 |
commit | 4ba3473fecc56973a4d5fbeeb247786d20587ff4 (patch) | |
tree | 3cfc28561073fb99b3590bea75bb4461fb3be1a7 | |
download | aur-4ba3473fecc56973a4d5fbeeb247786d20587ff4.tar.gz |
First release for AUR of ovirt_exporter
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | ovirt_exporter | 1 | ||||
-rw-r--r-- | ovirt_exporter.service | 12 | ||||
-rw-r--r-- | ovirt_exporter.sysusers | 1 |
6 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1c3efa164efa --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = ovirt_exporter + pkgdesc = Exporter for oVirt engine metrics + pkgver = 0.9.1 + pkgrel = 1 + url = https://github.com/czerwonk/ovirt_exporter + arch = x86_64 + arch = i686 + license = MIT + makedepends = go + backup = etc/conf.d/ovirt_exporter + source = https://github.com/czerwonk/ovirt_exporter/archive/0.9.1.tar.gz + source = ovirt_exporter + source = ovirt_exporter.service + source = ovirt_exporter.sysusers + sha256sums = ac7c4b5e470fcb2ea9c31c3e4098bb4402c492b20264bc3d7943a664c3fb4742 + sha256sums = dddb55bc9a696c56814ce4d34f6254469bf215c59629b3225546775f680a13c3 + sha256sums = fbe1800ff7dc0ce36292f4abe88141099ae0b8c245903f76a8f41ff2c6a81c0b + sha256sums = 2747fabb4e56b808361eb7dd7acf9729ab8973d1ebe2f857dd56f6c71f71e45f + +pkgname = ovirt_exporter diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..7c6927b4669a --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +pkg/* +src/* +*.tar.* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f2ce65c3f955 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Shalygin Konstantin <k0ste@k0ste.ru> +# Contributor: Shalygin Konstantin <k0ste@k0ste.ru> + +pkgname='ovirt_exporter' +pkgver='0.9.1' +pkgrel='1' +pkgdesc='Exporter for oVirt engine metrics' +arch=('x86_64' 'i686') +url="https://github.com/czerwonk/${pkgname}" +license=('MIT') +makedepends=('go') +source=("${url}/archive/${pkgver}.tar.gz" + "${pkgname}" + "${pkgname}.service" + "${pkgname}.sysusers") +sha256sums=('ac7c4b5e470fcb2ea9c31c3e4098bb4402c492b20264bc3d7943a664c3fb4742' + 'dddb55bc9a696c56814ce4d34f6254469bf215c59629b3225546775f680a13c3' + 'fbe1800ff7dc0ce36292f4abe88141099ae0b8c245903f76a8f41ff2c6a81c0b' + '2747fabb4e56b808361eb7dd7acf9729ab8973d1ebe2f857dd56f6c71f71e45f') +backup=("etc/conf.d/${pkgname}") + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + export GOPATH="${srcdir}/gopath" + export GOBIN="${GOPATH}/bin" + mkdir -p "${GOPATH}/src/github.com/czerwonk" + ln -snf "${srcdir}/${pkgname}-${pkgver}" "${GOPATH}/src/github.com/czerwonk/${pkgname}" +} + +build() { + export GOPATH="${srcdir}/gopath" + cd "${GOPATH}/src/github.com/czerwonk/${pkgname}" + GOOS=linux go build +} + +package() { + pushd "${GOPATH}/src/github.com/czerwonk/${pkgname}" + install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}" + popd + install -Dm644 "${pkgname}" "${pkgdir}/etc/conf.d/${pkgname}" + install -Dm644 "${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service" + install -Dm644 "${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf" +} diff --git a/ovirt_exporter b/ovirt_exporter new file mode 100644 index 000000000000..4b8f6ccf4705 --- /dev/null +++ b/ovirt_exporter @@ -0,0 +1 @@ +OPTIONS="-api.insecure-cert -api.password admin -api.url https://localhost/ovirt-engine/api/ -api.username user@internal" diff --git a/ovirt_exporter.service b/ovirt_exporter.service new file mode 100644 index 000000000000..54a10cd0cb89 --- /dev/null +++ b/ovirt_exporter.service @@ -0,0 +1,12 @@ +[Unit] +Description=Prometheus oVirt exporter +After=network.target + +[Service] +EnvironmentFile=-/etc/conf.d/ovirt_exporter +ExecStart=/usr/bin/ovirt_exporter $OPTIONS +User=prometheus +Group=prometheus + +[Install] +WantedBy=multi-user.target diff --git a/ovirt_exporter.sysusers b/ovirt_exporter.sysusers new file mode 100644 index 000000000000..4b2b2e3c881f --- /dev/null +++ b/ovirt_exporter.sysusers @@ -0,0 +1 @@ +u prometheus 210 "Prometheus dedicated user" |