summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Corcoran2018-03-10 12:37:13 +1300
committerMichael Corcoran2018-03-10 12:48:30 +1300
commite4e4124744b0ef28b99c2d8a2c5713e5cf803225 (patch)
tree18383d1febdb4c1492ff9ac969d34f9292e28e7f
parent371cf720d3814794f69255836c34e230df691bf6 (diff)
downloadaur-e4e4124744b0ef28b99c2d8a2c5713e5cf803225.tar.gz
Add systemd unit, and post install instructions
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD15
-rw-r--r--libvirt-snmp.install10
-rw-r--r--libvirt-snmp.service11
4 files changed, 36 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 60d36e360967..c8a93eb1741f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = libvirt-snmp-git
pkgdesc = net-snmp agent for libvirt virtualization management
pkgver = r28.5370943
- pkgrel = 1
+ pkgrel = 2
url = http://libvirt.org/
+ install = libvirt-snmp.install
arch = x86_64
license = GPL
makedepends = git
@@ -13,8 +14,12 @@ pkgbase = libvirt-snmp-git
conflicts = libvirt-snmp
source = libvirt-snmp-git::git+https://github.com/libvirt/libvirt-snmp.git
source = 001-u64-to-counter64.patch
+ source = libvirt-snmp.service
+ source = libvirt-snmp.install
md5sums = SKIP
md5sums = 062bf2ba6682cc44e1483dddb64278c9
+ md5sums = f4b8b6345abe4fadab45e81290799029
+ md5sums = a101751363499dbb87492e040c6702ae
pkgname = libvirt-snmp-git
diff --git a/PKGBUILD b/PKGBUILD
index 9f845e57d028..8d559711f885 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=libvirt-snmp-git
_pkgname=libvirt-snmp
pkgver=r28.5370943
-pkgrel=1
+pkgrel=2
pkgdesc="net-snmp agent for libvirt virtualization management"
arch=('x86_64')
url="http://libvirt.org/"
@@ -13,13 +13,15 @@ makedepends=('git'
'perl')
provides=($_pkgname)
conflicts=($_pkgname)
+install=${_pkgname}.install
source=("$pkgname::git+https://github.com/libvirt/libvirt-snmp.git"
- '001-u64-to-counter64.patch')
+ '001-u64-to-counter64.patch'
+ "${_pkgname}.service"
+ "${_pkgname}.install")
md5sums=('SKIP'
- '062bf2ba6682cc44e1483dddb64278c9')
-
-# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
-# a description of each element in the source array.
+ '062bf2ba6682cc44e1483dddb64278c9'
+ 'f4b8b6345abe4fadab45e81290799029'
+ 'a101751363499dbb87492e040c6702ae')
pkgver() {
cd "$pkgname"
@@ -41,4 +43,5 @@ build() {
package() {
cd "$pkgname"
make DESTDIR="$pkgdir/" install
+ install -D -m644 "${srcdir}/libvirt-snmp.service" "${pkgdir}/usr/lib/systemd/system/libvirt-snmp.service"
}
diff --git a/libvirt-snmp.install b/libvirt-snmp.install
new file mode 100644
index 000000000000..e35ecc9b845c
--- /dev/null
+++ b/libvirt-snmp.install
@@ -0,0 +1,10 @@
+post_install() {
+ cat << EOF
+==> Ensure you have "master agentx" set in your snmpd config
+==> Enable and start libvirt-snmp.service
+EOF
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/libvirt-snmp.service b/libvirt-snmp.service
new file mode 100644
index 000000000000..1efc0bfe2665
--- /dev/null
+++ b/libvirt-snmp.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=libvirt SNMP sub-agent
+Requires=snmpd.service
+After=snmpd.service
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/libvirtMib_subagent -f -L
+
+[Install]
+WantedBy=multi-user.target