aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/qemu-openrc/APKBUILD3
-rw-r--r--main/qemu-openrc/qemu-openrc.pre-install9
l---------main/qemu-openrc/qemu-openrc.pre-upgrade1
3 files changed, 12 insertions, 1 deletions
diff --git a/main/qemu-openrc/APKBUILD b/main/qemu-openrc/APKBUILD
index 42ca3afd00..237641621d 100644
--- a/main/qemu-openrc/APKBUILD
+++ b/main/qemu-openrc/APKBUILD
@@ -2,13 +2,14 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=qemu-openrc
pkgver=0.4.1
-pkgrel=0
+pkgrel=1
pkgdesc="OpenRC init scripts for QEMU/KVM"
url="https://github.com/jirutka/qemu-openrc"
arch="noarch"
license="MIT"
depends="qemu socat"
makedepends=""
+install="$pkgname.pre-install $pkgname.pre-upgrade"
source="$pkgname-$pkgver.tar.gz::https://github.com/jirutka/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
diff --git a/main/qemu-openrc/qemu-openrc.pre-install b/main/qemu-openrc/qemu-openrc.pre-install
new file mode 100644
index 0000000000..3aaf2c0a89
--- /dev/null
+++ b/main/qemu-openrc/qemu-openrc.pre-install
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+adduser -S -D -H -h /var/lib/qemu -s /sbin/nologin -G qemu \
+ -g "added by apk for qemu-openrc" qemu 2>/dev/null
+
+addgroup qemu kvm 2>/dev/null
+addgroup qemu netdev 2>/dev/null
+
+exit 0
diff --git a/main/qemu-openrc/qemu-openrc.pre-upgrade b/main/qemu-openrc/qemu-openrc.pre-upgrade
new file mode 120000
index 0000000000..27cf48779c
--- /dev/null
+++ b/main/qemu-openrc/qemu-openrc.pre-upgrade
@@ -0,0 +1 @@
+qemu-openrc.pre-install \ No newline at end of file