mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 05:47:13 +02:00
main/qemu: fix qemu-bridge-helper - set suid, chmod 04710, info msg
This commit is contained in:
parent
7520fd8c89
commit
b7913e00d6
@ -1,8 +1,9 @@
|
|||||||
# Contributor: Valery Kartel <valery.kartel@gmail.com>
|
# Contributor: Valery Kartel <valery.kartel@gmail.com>
|
||||||
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
||||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||||
pkgname=qemu
|
pkgname=qemu
|
||||||
pkgver=2.5.1
|
pkgver=2.5.1
|
||||||
pkgrel=2
|
pkgrel=3
|
||||||
pkgdesc="QEMU is a generic machine emulator and virtualizer"
|
pkgdesc="QEMU is a generic machine emulator and virtualizer"
|
||||||
url="http://qemu.org/"
|
url="http://qemu.org/"
|
||||||
arch="all"
|
arch="all"
|
||||||
@ -36,7 +37,9 @@ makedepends="
|
|||||||
zlib-dev
|
zlib-dev
|
||||||
"
|
"
|
||||||
depends=""
|
depends=""
|
||||||
install="$pkgname.pre-install"
|
pkggroups="qemu"
|
||||||
|
install="$pkgname.pre-install $pkgname.post-install"
|
||||||
|
options="suid" # needed for qemu-bridge-helper
|
||||||
subpackages="$pkgname-guest-agent:guest"
|
subpackages="$pkgname-guest-agent:guest"
|
||||||
|
|
||||||
_subsystems="
|
_subsystems="
|
||||||
@ -213,6 +216,11 @@ package() {
|
|||||||
gzip "$pkgdir"/usr/share/man/man1/*
|
gzip "$pkgdir"/usr/share/man/man1/*
|
||||||
gzip "$pkgdir"/usr/share/man/man8/*
|
gzip "$pkgdir"/usr/share/man/man8/*
|
||||||
|
|
||||||
|
# qemu-bridge-helper needs suid to create tunX devices;
|
||||||
|
# allow only users in the qemu group to run it.
|
||||||
|
chmod 04710 "$pkgdir"/usr/libexec/qemu/qemu-bridge-helper
|
||||||
|
chgrp qemu "$pkgdir"/usr/libexec/qemu/qemu-bridge-helper
|
||||||
|
|
||||||
if [ -n "$_arch" ]; then
|
if [ -n "$_arch" ]; then
|
||||||
cd "$builddir"/build-gtk
|
cd "$builddir"/build-gtk
|
||||||
install $_arch-softmmu/qemu-system-$_arch \
|
install $_arch-softmmu/qemu-system-$_arch \
|
||||||
@ -223,6 +231,8 @@ package() {
|
|||||||
_subsys() {
|
_subsys() {
|
||||||
pkgdesc="Qemu ${1/-/ } emulator"
|
pkgdesc="Qemu ${1/-/ } emulator"
|
||||||
depends="qemu"
|
depends="qemu"
|
||||||
|
options=""
|
||||||
|
|
||||||
mkdir -p "$subpkgdir"/usr/bin
|
mkdir -p "$subpkgdir"/usr/bin
|
||||||
mv "$pkgdir"/usr/bin/qemu-$1 "$subpkgdir"/usr/bin/ || return 1
|
mv "$pkgdir"/usr/bin/qemu-$1 "$subpkgdir"/usr/bin/ || return 1
|
||||||
}
|
}
|
||||||
@ -230,6 +240,7 @@ _subsys() {
|
|||||||
img() {
|
img() {
|
||||||
pkgdesc="QEMU command line tool for manipulating disk images"
|
pkgdesc="QEMU command line tool for manipulating disk images"
|
||||||
replaces="qemu"
|
replaces="qemu"
|
||||||
|
options=""
|
||||||
|
|
||||||
mkdir -p "$subpkgdir"/usr/bin
|
mkdir -p "$subpkgdir"/usr/bin
|
||||||
mv "$pkgdir"/usr/bin/qemu-img \
|
mv "$pkgdir"/usr/bin/qemu-img \
|
||||||
@ -251,6 +262,7 @@ img() {
|
|||||||
|
|
||||||
guest() {
|
guest() {
|
||||||
pkgdesc="QEMU guest agent"
|
pkgdesc="QEMU guest agent"
|
||||||
|
options=""
|
||||||
|
|
||||||
mkdir -p "$subpkgdir"/usr/bin
|
mkdir -p "$subpkgdir"/usr/bin
|
||||||
mv "$pkgdir"/usr/bin/qemu-ga "$subpkgdir"/usr/bin/
|
mv "$pkgdir"/usr/bin/qemu-ga "$subpkgdir"/usr/bin/
|
||||||
|
10
main/qemu/qemu.post-install
Normal file
10
main/qemu/qemu.post-install
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cat 1>&2 <<EOF
|
||||||
|
*
|
||||||
|
* If you want to run VM as unprivileged user and let Qemu create tunX devices,
|
||||||
|
* then you must add that user to the group "qemu".
|
||||||
|
* If you use KVM for hardware-assisted virtualization, then you may also need
|
||||||
|
* to add that user to the group "kvm".
|
||||||
|
*
|
||||||
|
EOF
|
@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
addgroup -S -g 34 kvm 2>/dev/null
|
addgroup -S -g 34 kvm 2>/dev/null
|
||||||
|
addgroup -S -g 35 qemu 2>/dev/null
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user