























Hi,
Thanks for the hint!
I plan to switch to this fork, but I need to fix some issues first. At the moment, prometheus-libvirt-exporter --version returns no version.
I saw some warning during the build, it seems to be related to go-releaser.
https://github.com/inovex/prometheus-libvirt-exporter looks like a better maintained fork. Any chance to update the PKGBUILD?
Here is the diff:
diff --git a/PKGBUILD b/PKGBUILD
index 2f4c154..5632b25 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,37 @@
# Maintainer: Wallun <wallun@disroot.org>
pkgname=prometheus-libvirt-exporter
-pkgver=1.2.0
+pkgver=1.6.0
pkgrel=2
pkgdesc="A prometheus exporter for libvirt"
arch=('x86_64')
-url="https://github.com/zhangjianweibj/prometheus-libvirt-exporter"
+url="https://github.com/inovex/prometheus-libvirt-exporter"
options=()
license=(MIT)
depends=()
optdepends=()
makedepends=(
'go'
+ 'goreleaser'
)
-source=("${pkgname}-${pkgver}::${url}/archive/refs/tags/${pkgver}.tar.gz"
+source=("${pkgname}-${pkgver}::${url}/archive/refs/tags/v${pkgver}.tar.gz"
prometheus-libvirt-exporter.service)
-sha256sums=('f73940ebf884f26001151be085fe7a04e4f83b097b9344d67b1751bf7a9ddc46'
+sha256sums=('9836f3282b9857ee1eea632738d7f4ec394eed342f472a74211e605700b329a5'
'b31552e3ce21a5c5e4e683b78e2fb4be0c1f56378271b14e1b39e925d0913085')
build() {
cd "${srcdir}/${pkgname}-${pkgver}" || 1
- make
+ # https://github.com/inovex/prometheus-libvirt-exporter/blob/master/Taskfile.yml
+ EXPORTER_VERSION="${pkgver}" goreleaser build --clean --snapshot --single-target
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
# Install binary
- install -D -m0775 "${srcdir}/${pkgname}-${pkgver}/build/${pkgname}"\
+ install -D -m0775 "${srcdir}/${pkgname}-${pkgver}/dist/prometheus-libvirt-exporter_linux_amd64_v1/${pkgname}"\
"${pkgdir}/usr/bin/${pkgname}"
# Install systemd service file
- install -D -m0644 "${srcdir}/${pkgname}.service" \
+ install -D -m0644 "${srcdir}/${pkgname}-${pkgver}/contrib/prometheus-libvirt-exporter.service" \
"${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
Thanks wallun. Not sure if it was you but upstream merged a PR 5days ago which I think fixed the version problem: https://github.com/inovex/prometheus-libvirt-exporter/issues/64