diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-emulation/qemu/files | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'app-emulation/qemu/files')
-rw-r--r-- | app-emulation/qemu/files/65-kvm.rules-r1 | 2 | ||||
-rw-r--r-- | app-emulation/qemu/files/bridge.conf | 14 | ||||
-rw-r--r-- | app-emulation/qemu/files/qemu-2.11.0-glibc-2.27.patch | 54 | ||||
-rw-r--r-- | app-emulation/qemu/files/qemu-2.11.1-capstone_include_path.patch | 11 | ||||
-rw-r--r-- | app-emulation/qemu/files/qemu-2.5.0-cflags.patch | 13 | ||||
-rw-r--r-- | app-emulation/qemu/files/qemu-2.5.0-sysmacros.patch | 15 | ||||
-rw-r--r-- | app-emulation/qemu/files/qemu-binfmt.initd.head | 64 | ||||
-rw-r--r-- | app-emulation/qemu/files/qemu-binfmt.initd.tail | 14 |
8 files changed, 187 insertions, 0 deletions
diff --git a/app-emulation/qemu/files/65-kvm.rules-r1 b/app-emulation/qemu/files/65-kvm.rules-r1 new file mode 100644 index 000000000000..ab3776ac29e3 --- /dev/null +++ b/app-emulation/qemu/files/65-kvm.rules-r1 @@ -0,0 +1,2 @@ +KERNEL=="kvm", GROUP="kvm", MODE="0660" +KERNEL=="vhost-net", GROUP="kvm", MODE="0660", OPTIONS+="static_node=vhost-net" diff --git a/app-emulation/qemu/files/bridge.conf b/app-emulation/qemu/files/bridge.conf new file mode 100644 index 000000000000..2bde37e2efc9 --- /dev/null +++ b/app-emulation/qemu/files/bridge.conf @@ -0,0 +1,14 @@ +# This should have the following permissions: root:qemu 0640 + +# allow br0 +# Uncommenting the above would allow users in the 'qemu' group +# to add devices to 'br0' + +# allow virbr0 +# Uncommenting the above would allow users in the 'qemu' group +# to add devices to 'virbr0' + +# include /etc/qemu/bob.conf +# Uncommenting the above would allow users in the 'bob' group +# to have permissions defined in it, iff it has the following +# permissions: root:bob 0640 diff --git a/app-emulation/qemu/files/qemu-2.11.0-glibc-2.27.patch b/app-emulation/qemu/files/qemu-2.11.0-glibc-2.27.patch new file mode 100644 index 000000000000..1562bb3c64a1 --- /dev/null +++ b/app-emulation/qemu/files/qemu-2.11.0-glibc-2.27.patch @@ -0,0 +1,54 @@ +From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini <pbonzini@redhat.com> +Date: Tue, 28 Nov 2017 11:51:27 +0100 +Subject: [PATCH] memfd: fix configure test +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Recent glibc added memfd_create in sys/mman.h. This conflicts with +the definition in util/memfd.c: + + /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration + +Fix the configure test, and remove the sys/memfd.h inclusion since the +file actually does not exist---it is a typo in the memfd_create(2) man +page. + +Cc: Marc-André Lureau <marcandre.lureau@redhat.com> +Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> +--- + configure | 2 +- + util/memfd.c | 4 +--- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/configure b/configure +index 9c8aa5a98b..99ccc1725a 100755 +--- a/configure ++++ b/configure +@@ -3923,7 +3923,7 @@ fi + # check if memfd is supported + memfd=no + cat > $TMPC << EOF +-#include <sys/memfd.h> ++#include <sys/mman.h> + + int main(void) + { +diff --git a/util/memfd.c b/util/memfd.c +index 4571d1aba8..412e94a405 100644 +--- a/util/memfd.c ++++ b/util/memfd.c +@@ -31,9 +31,7 @@ + + #include "qemu/memfd.h" + +-#ifdef CONFIG_MEMFD +-#include <sys/memfd.h> +-#elif defined CONFIG_LINUX ++#if defined CONFIG_LINUX && !defined CONFIG_MEMFD + #include <sys/syscall.h> + #include <asm/unistd.h> + +-- +2.11.0 diff --git a/app-emulation/qemu/files/qemu-2.11.1-capstone_include_path.patch b/app-emulation/qemu/files/qemu-2.11.1-capstone_include_path.patch new file mode 100644 index 000000000000..d79570ebb8aa --- /dev/null +++ b/app-emulation/qemu/files/qemu-2.11.1-capstone_include_path.patch @@ -0,0 +1,11 @@ +--- qemu-2.11.1/include/disas/capstone.h 2018-02-14 22:53:22.000000000 +0100 ++++ qemu-2.11.1/include/disas/capstone.h 2018-02-17 20:12:12.754703951 +0100 +@@ -3,7 +3,7 @@ + + #ifdef CONFIG_CAPSTONE + +-#include <capstone.h> ++#include <capstone/capstone.h> + + #else + diff --git a/app-emulation/qemu/files/qemu-2.5.0-cflags.patch b/app-emulation/qemu/files/qemu-2.5.0-cflags.patch new file mode 100644 index 000000000000..173394fd02f2 --- /dev/null +++ b/app-emulation/qemu/files/qemu-2.5.0-cflags.patch @@ -0,0 +1,13 @@ +--- a/configure ++++ b/configure +@@ -4468,10 +4468,6 @@ fi + if test "$gcov" = "yes" ; then + CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS" + LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS" +-elif test "$fortify_source" = "yes" ; then +- CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" +-elif test "$debug" = "no"; then +- CFLAGS="-O2 $CFLAGS" + fi + + ########################################## diff --git a/app-emulation/qemu/files/qemu-2.5.0-sysmacros.patch b/app-emulation/qemu/files/qemu-2.5.0-sysmacros.patch new file mode 100644 index 000000000000..f2e766dc1c35 --- /dev/null +++ b/app-emulation/qemu/files/qemu-2.5.0-sysmacros.patch @@ -0,0 +1,15 @@ +Linux C libs are moving away from implicit header pollution with sys/types.h + +--- a/include/qemu/osdep.h ++++ b/include/qemu/osdep.h +@@ -78,6 +78,10 @@ extern int daemon(int, int); + #include <assert.h> + #include <signal.h> + ++#ifdef __linux__ ++#include <sys/sysmacros.h> ++#endif ++ + #ifdef __OpenBSD__ + #include <sys/signal.h> + #endif diff --git a/app-emulation/qemu/files/qemu-binfmt.initd.head b/app-emulation/qemu/files/qemu-binfmt.initd.head new file mode 100644 index 000000000000..858d5d745381 --- /dev/null +++ b/app-emulation/qemu/files/qemu-binfmt.initd.head @@ -0,0 +1,64 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Enable automatic non-native program execution by the kernel. + +# Defaulting to OC should be safe because it comes down to: +# - do we trust the interp itself to not be malicious? yes; we built it. +# - do we trust the programs we're running? ish; same permission as native +# binaries apply. so if user can do bad stuff natively, cross isn't worse. +: ${QEMU_BINFMT_FLAGS:=OC} + +depend() { + after procfs +} + +start() { + ebegin "Registering qemu-user binaries (flags: ${QEMU_BINFMT_FLAGS})" + + if [ ! -d /proc/sys/fs/binfmt_misc ] ; then + modprobe -q binfmt_misc + fi + + if [ ! -d /proc/sys/fs/binfmt_misc ] ; then + eend 1 "You need support for 'misc binaries' in your kernel!" + return + fi + + if [ ! -f /proc/sys/fs/binfmt_misc/register ] ; then + mount -t binfmt_misc -o nodev,noexec,nosuid \ + binfmt_misc /proc/sys/fs/binfmt_misc >/dev/null 2>&1 + eend $? || return + fi + + # Probe the native cpu type so we don't try registering them. + local cpu="$(uname -m)" + case "${cpu}" in + armv[4-9]*) + cpu="arm" + ;; + i386|i486|i586|i686|i86pc|BePC|x86_64) + cpu="i386" + ;; + m68k) + cpu="m68k" + ;; + mips*) + cpu="mips" + ;; + "Power Macintosh"|ppc|ppc64) + cpu="ppc" + ;; + s390*) + cpu="s390" + ;; + sh*) + cpu="sh" + ;; + sparc*) + cpu="sparc" + ;; + esac + + # Register the interpreter for each cpu except for the native one. diff --git a/app-emulation/qemu/files/qemu-binfmt.initd.tail b/app-emulation/qemu/files/qemu-binfmt.initd.tail new file mode 100644 index 000000000000..7679481929ae --- /dev/null +++ b/app-emulation/qemu/files/qemu-binfmt.initd.tail @@ -0,0 +1,14 @@ + eend 0 +} + +stop() { + # We unregister everything in the "qemu-xxx" namespace. + ebegin "Unregistering qemu-user binaries" + local f + for f in /proc/sys/fs/binfmt_misc/qemu-* ; do + if [ -f "${f}" ] ; then + echo '-1' > "${f}" + fi + done + eend 0 +} |