Commit bf8c2c79 authored by Jonas Smedegaard's avatar Jonas Smedegaard

Add qemu-system-common postinst to permit kvm group access to...

Add qemu-system-common postinst to permit kvm group access to qemu-bridge-helper. Pre-depend on adduser and recommend libcap2-bin. Closes: Bug#765936. Thanks to Guido Günther.
parent e31d2b93
......@@ -194,10 +194,14 @@ Description: QEMU full system emulation (data files)
Package: qemu-system-common
Architecture: amd64 arm arm64 armel armhf i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el s390x sparc sparc64 x32
Multi-Arch: foreign
Pre-Depends: adduser
Pre-Depends:
# to permit kvm group access to qemu-bridge-helper
adduser
Replaces: qemu-system-data (<< 1:3.1+dfsg-1~), qemu-utils (<< 1:3.1+dfsg-3~)
Breaks: qemu-system-data (<< 1:3.1+dfsg-1~), qemu-utils (<< 1:3.1+dfsg-3~)
Depends: ${misc:Depends}, ${shlibs:Depends},
# to permit kvm group access to qemu-bridge-helper
libcap2-bin,
# to fix wrong acl for newly created device node on ubuntu:
:ubuntu: acl
Description: QEMU full system emulation binaries (common files)
......
#! /bin/sh
set -e
if [ "$1" = configure ] ; then
# Add the kvm group unless it's already there
# (generally handled by udev nowadays - see #887852, #892945)
if ! getent group kvm >/dev/null; then
addgroup --quiet --system kvm || true
fi
fi
# permit kvm group access to qemu-bridge-helper
# (See #765936)
chgrp kvm /usr/lib/qemu/qemu-bridge-helper
chmod 0660 /usr/lib/qemu/qemu-bridge-helper
if which setcap >/dev/null; then
setcap cap_net_admin+ep /usr/lib/qemu/qemu-bridge-helper
fi
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment