summaryrefslogtreecommitdiff
path: root/qemu-all
diff options
context:
space:
mode:
authorThomas Penteker <tek@serverop.de>2014-06-20 22:29:13 +0200
committerThomas Penteker <tek@serverop.de>2014-06-20 22:29:13 +0200
commit42d84073ff688b87649265063ff7a949ab36e669 (patch)
tree851e22dfbc8757788949f517bca8648ebdfa7af0 /qemu-all
parent4721d86d27ad1e0c26304ae231afe913e8917fd2 (diff)
downloadopt-42d84073ff688b87649265063ff7a949ab36e669.tar.gz
opt-42d84073ff688b87649265063ff7a949ab36e669.tar.xz
[notify] qemu/qemu-all: add udev rules for /dev/kvm
This change requires you to run the bundled pre-install script, that will a new group 'kvm' with proper permissions for the /dev/kvm device, to allow unprivileged users (members of the kvm group) to run kvm-accelerated qemu instances. Please note that this change prevents non-root and non-kvm members from using /dev/kvm acceleration.
Diffstat (limited to 'qemu-all')
-rw-r--r--qemu-all/.footprint3
-rw-r--r--qemu-all/Pkgfile6
-rwxr-xr-xqemu-all/pre-install2
3 files changed, 10 insertions, 1 deletions
diff --git a/qemu-all/.footprint b/qemu-all/.footprint
index 5b94c0247..68a3c7e77 100644
--- a/qemu-all/.footprint
+++ b/qemu-all/.footprint
@@ -1,6 +1,9 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/qemu/
-rw-r--r-- root/root etc/qemu/target-x86_64.conf (EMPTY)
+drwxr-xr-x root/root etc/udev/
+drwxr-xr-x root/root etc/udev/rules.d/
+-rw-r--r-- root/root etc/udev/rules.d/60-kvm.rules
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/qemu-aarch64
diff --git a/qemu-all/Pkgfile b/qemu-all/Pkgfile
index 1897e8986..078d5e941 100644
--- a/qemu-all/Pkgfile
+++ b/qemu-all/Pkgfile
@@ -3,7 +3,7 @@
# Maintainer: Thomas Penteker, tek at serverop dot de
# Packager: Lucas Hazel, lucas at die dot net dot au
# Depends on: libsdl
-# Nice to have: libseccomp libiscsi
+# Nice to have: libseccomp libiscsi libusb usbredir
name=qemu-all
version=2.0.0
@@ -38,5 +38,9 @@ build() {
install -D -m 644 qemu-img.1 $PKG/usr/man/man1/qemu-img.1
install -D -m 644 qemu-nbd.8 $PKG/usr/man/man8/qemu-nbd.8
+ install -d $PKG/etc/udev/rules.d/
+ echo 'KERNEL=="kvm", NAME="kvm", OWNER="root", GROUP="kvm", MODE="0660"' > \
+ $PKG/etc/udev/rules.d/60-kvm.rules
+
rm -rf $PKG/usr/share/locale
}
diff --git a/qemu-all/pre-install b/qemu-all/pre-install
new file mode 100755
index 000000000..ece20be8c
--- /dev/null
+++ b/qemu-all/pre-install
@@ -0,0 +1,2 @@
+#!/bin/sh
+getent group kvm || /usr/sbin/groupadd kvm

Generated by cgit