From: Marcin Krol Date: Tue, 1 May 2018 19:58:09 +0000 (+0000) Subject: - updated to 2.12.0, partial PLD merge X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=3c35e694ddbb18c29d44a8288b3ab3f2804380ae;p=packages%2Fqemu.git - updated to 2.12.0, partial PLD merge --- diff --git a/qemu-cflags.patch b/qemu-cflags.patch index 451868d..cf2e106 100644 --- a/qemu-cflags.patch +++ b/qemu-cflags.patch @@ -1,10 +1,10 @@ -diff -urp qemu-2.11.0.orig/configure qemu-2.11.0/configure ---- qemu-2.11.0.orig/configure 2018-01-25 00:10:09.335918465 +0000 -+++ qemu-2.11.0/configure 2018-01-25 00:11:23.962914017 +0000 -@@ -507,10 +507,6 @@ QEMU_CFLAGS="-Wall -Wundef -Wwrite-strin +diff -urp qemu-2.12.0.orig/configure qemu-2.12.0/configure +--- qemu-2.12.0.orig/configure 2018-05-01 18:42:52.740082920 +0000 ++++ qemu-2.12.0/configure 2018-05-01 18:44:59.949081487 +0000 +@@ -535,10 +535,6 @@ QEMU_CFLAGS="-Wall -Wundef -Wwrite-strin QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS" - QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/accel/tcg -I\$(SRC_PATH)/include" + QEMU_INCLUDES="-iquote . -iquote \$(SRC_PATH) -iquote \$(SRC_PATH)/accel/tcg -iquote \$(SRC_PATH)/include" -if test "$debug_info" = "yes"; then - CFLAGS="-g $CFLAGS" - LDFLAGS="-g $LDFLAGS" @@ -12,8 +12,8 @@ diff -urp qemu-2.11.0.orig/configure qemu-2.11.0/configure # make source path absolute source_path=$(cd "$source_path"; pwd) -@@ -5122,12 +5118,8 @@ fi - # After here, no more $cc or $ld runs +@@ -5420,12 +5416,8 @@ fi + write_c_skeleton if test "$gcov" = "yes" ; then - CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS" @@ -25,4 +25,4 @@ diff -urp qemu-2.11.0.orig/configure qemu-2.11.0/configure - CFLAGS="-O2 $CFLAGS" fi - ########################################## + if test "$have_asan" = "yes"; then diff --git a/qemu-glibc2_27.patch b/qemu-glibc2_27.patch deleted file mode 100644 index b1f354a..0000000 --- a/qemu-glibc2_27.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Tue, 28 Nov 2017 11:51:27 +0100 -Subject: [PATCH] memfd: fix configure test -MIME-Version: 1.0 -Content-Type: text/plain; charset=utf8 -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 -Signed-off-by: Paolo Bonzini ---- - configure | 2 +- - util/memfd.c | 4 +--- - 2 files changed, 2 insertions(+), 4 deletions(-) - -diff --git a/configure b/configure -index 9c8aa5a..99ccc17 100755 ---- a/configure -+++ b/configure -@@ -3923,7 +3923,7 @@ fi - # check if memfd is supported - memfd=no - cat > $TMPC << EOF --#include -+#include - - int main(void) - { -diff --git a/util/memfd.c b/util/memfd.c -index 4571d1a..412e94a 100644 ---- a/util/memfd.c -+++ b/util/memfd.c -@@ -31,9 +31,7 @@ - - #include "qemu/memfd.h" - --#ifdef CONFIG_MEMFD --#include --#elif defined CONFIG_LINUX -+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD - #include - #include - --- -1.8.3.1 - diff --git a/qemu-user-execve.patch b/qemu-user-execve.patch index 78c0e57..e567b84 100644 --- a/qemu-user-execve.patch +++ b/qemu-user-execve.patch @@ -1,4 +1,6 @@ +Discussion: https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/ + https://github.com/resin-io/qemu/commit/782e5bb77014ff136f7bb6133a911e5f53e914a7 https://github.com/resin-io/qemu/commit/782e5bb77014ff136f7bb6133a911e5f53e914a7#commitcomment-17193923 @@ -43,17 +45,11 @@ Reviewed-by: Laurent Vivier v3 changes: - rebase the patchset against current code ---- qemu-2.7.0/linux-user/main.c~ 2016-09-26 12:07:20.000000000 +0300 -+++ qemu-2.7.0/linux-user/main.c 2016-09-26 12:09:24.258470304 +0300 -@@ -18,6 +18,7 @@ - */ - #include "qemu/osdep.h" - #include "qemu-version.h" -+#include - #include - #include - -@@ -75,6 +76,7 @@ static void usage(int exitcode); +diff --git a/linux-user/main.c b/linux-user/main.c +index ee12035..5951279 100644 +--- a/linux-user/main.c ++++ b/linux-user/main.c +@@ -79,6 +79,7 @@ static void usage(int exitcode); static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX; const char *qemu_uname_release; @@ -61,51 +57,24 @@ v3 changes: /* XXX: on x86 MAP_GROWSDOWN only works if ESP <= address + 32, so we allocate a bigger stack. Need a better solution, for example -@@ -3824,6 +3826,38 @@ static void handle_arg_guest_base(const char *arg) +@@ -3828,6 +3829,11 @@ static void handle_arg_guest_base(const char *arg) have_guest_base = 1; } +static void handle_arg_execve(const char *arg) +{ -+ const char *execfn; -+ char buf[PATH_MAX]; -+ char *ret; -+ int len; -+ -+ /* try getauxval() */ -+ execfn = (const char *) getauxval(AT_EXECFN); -+ -+ if (execfn != 0) { -+ ret = realpath(execfn, buf); -+ -+ if (ret != NULL) { -+ qemu_execve_path = strdup(buf); -+ return; -+ } -+ } -+ -+ /* try /proc/self/exe */ -+ len = readlink("/proc/self/exe", buf, sizeof(buf) - 1); -+ -+ if (len != -1) { -+ buf[len] = '\0'; -+ qemu_execve_path = strdup(buf); -+ return; -+ } -+ -+ fprintf(stderr, "qemu_execve: unable to determine intepreter's path\n"); -+ exit(EXIT_FAILURE); ++ qemu_execve_path = strdup(arg); +} + static void handle_arg_reserved_va(const char *arg) { char *p; -@@ -3909,6 +3943,8 @@ static const struct qemu_argument arg_table[] = { +@@ -3913,6 +3919,8 @@ static const struct qemu_argument arg_table[] = { "uname", "set qemu uname release string to 'uname'"}, {"B", "QEMU_GUEST_BASE", true, handle_arg_guest_base, "address", "set guest_base address to 'address'"}, -+ {"execve", "QEMU_EXECVE", false, handle_arg_execve, -+ "", "use this interpreter when a process calls execve()"}, ++ {"execve", "QEMU_EXECVE", true, handle_arg_execve, ++ "path", "use interpreter at 'path' when a process calls execve()"}, {"R", "QEMU_RESERVED_VA", true, handle_arg_reserved_va, "size", "reserve 'size' bytes for guest virtual address space"}, {"d", "QEMU_LOG", true, handle_arg_log, @@ -121,20 +90,14 @@ index bd90cc3..0d9b058 100644 extern unsigned long mmap_min_addr; /* ??? See if we can avoid exposing so much of the loader internals. */ ---- qemu-2.7.0/linux-user/syscall.c~ 2016-09-26 12:10:36.000000000 +0300 -+++ qemu-2.7.0/linux-user/syscall.c 2016-09-26 12:13:54.312490312 +0300 -@@ -99,6 +99,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -5842,6 +5843,118 @@ static target_timer_t get_timer_id(abi_long arg) +--- qemu-2.12.0/linux-user/syscall.c~ 2018-04-30 21:43:39.000000000 +0300 ++++ qemu-2.12.0/linux-user/syscall.c 2018-04-30 21:46:36.362935706 +0300 +@@ -5854,6 +5854,109 @@ static target_timer_t get_timer_id(abi_long arg) return timerid; } ++#define BINPRM_BUF_SIZE 128 ++ +/* qemu_execve() Must return target values and target errnos. */ +static abi_long qemu_execve(char *filename, char *argv[], + char *envp[]) @@ -145,30 +108,19 @@ index bd90cc3..0d9b058 100644 + char *cp; + char buf[BINPRM_BUF_SIZE]; + -+ /* normal execve case */ -+ if (qemu_execve_path == NULL || *qemu_execve_path == 0) { -+ return get_errno(execve(filename, argv, envp)); -+ } -+ + for (argc = 0; argv[argc] != NULL; argc++) { + /* nothing */ ; + } + + fd = open(filename, O_RDONLY); + if (fd == -1) { -+ return get_errno(fd); ++ return -ENOENT; + } + + ret = read(fd, buf, BINPRM_BUF_SIZE); + if (ret == -1) { + close(fd); -+ return get_errno(ret); -+ } -+ -+ /* if we have less than 2 bytes, we can guess it is not executable */ -+ if (ret < 2) { -+ close(fd); -+ return -host_to_target_errno(ENOEXEC); ++ return -ENOENT; + } + + close(fd); @@ -185,7 +137,7 @@ index bd90cc3..0d9b058 100644 + buf[BINPRM_BUF_SIZE - 1] = '\0'; + cp = strchr(buf, '\n'); + if (cp == NULL) { -+ cp = buf + BINPRM_BUF_SIZE - 1; ++ cp = buf+BINPRM_BUF_SIZE-1; + } + *cp = '\0'; + while (cp > buf) { @@ -196,7 +148,7 @@ index bd90cc3..0d9b058 100644 + break; + } + } -+ for (cp = buf + 2; (*cp == ' ') || (*cp == '\t'); cp++) { ++ for (cp = buf+2; (*cp == ' ') || (*cp == '\t'); cp++) { + /* nothing */ ; + } + if (*cp == '\0') { @@ -250,12 +202,17 @@ index bd90cc3..0d9b058 100644 /* do_syscall() should always have a single exit point at the end so that actions, such as logging of syscall results, can be performed. All errnos that do_syscall() returns must be -TARGET_. */ -@@ -7703,7 +7703,7 @@ +@@ -8257,7 +8257,12 @@ * before the execve completes and makes it the other * program's problem. */ - ret = get_errno(safe_execve(p, argp, envp)); -+ ret = qemu_execve(p, argp, envp); ++ if (qemu_execve_path && *qemu_execve_path) { ++ ret = get_errno(qemu_execve(p, argp, envp)); ++ } else { ++ ret = get_errno(safe_execve(p, argp, envp)); ++ } ++ unlock_user(p, arg1, 0); goto execve_end; diff --git a/qemu.binfmt b/qemu.binfmt new file mode 100644 index 0000000..92aa4df --- /dev/null +++ b/qemu.binfmt @@ -0,0 +1,22 @@ +:qemu-alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha: +:qemu-armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb: +:qemu-arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm: +:qemu-cris:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x4c\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-cris: +:qemu-i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386: +:qemu-i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386: +:qemu-m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k: +:qemu-microblazeel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xab\xba:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-microblazeel: +:qemu-microblaze:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xba\xab:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-microblaze: +:qemu-mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el: +:qemu-mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64: +:qemu-mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel: +:qemu-mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips: +:qemu-ppc64abi32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc64abi32: +:qemu-ppc64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc64: +:qemu-ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc: +:qemu-s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-s390x: +:qemu-sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb: +:qemu-sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4: +:qemu-sparc32plus:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x12:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc32plus: +:qemu-sparc64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2b:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc64: +:qemu-sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc: diff --git a/qemu.spec b/qemu.spec index 1ec11b1..240d5b1 100644 --- a/qemu.spec +++ b/qemu.spec @@ -37,12 +37,13 @@ Summary: QEMU CPU Emulator Summary(pl.UTF-8): QEMU - emulator procesora Name: qemu -Version: 2.11.1 +Version: 2.12.0 Release: 1 License: GPL v2 Group: Applications/Emulators Source0: http://wiki.qemu-project.org/download/%{name}-%{version}.tar.xz -# Source0-md5: 0ee48c0f0cae47cc5d05408e03cd199e +# Source0-md5: ca553eb04c933f58111c304452fc4cc5 +Source2: %{name}.binfmt # Loads kvm kernel modules at boot Source3: kvm-modules-load.conf # Creates /dev/kvm @@ -60,7 +61,6 @@ Patch3: %{name}-user-execve.patch Patch4: %{name}-xattr.patch Patch5: libjpeg-boolean.patch Patch6: x32.patch -Patch7: %{name}-glibc2_27.patch URL: http://www.qemu-project.org/ %{?with_gl:BuildRequires: OpenGL-GLX-devel} %{?with_gl:BuildRequires: OpenGL-devel} @@ -85,6 +85,7 @@ BuildRequires: libcap-ng-devel BuildRequires: libfdt-devel >= 1.4.2 %{?with_rdma:BuildRequires: libibverbs-devel} %{?with_iscsi:BuildRequires: libiscsi-devel >= 1.9.0} +%{?with_rdma:BuildRequires: libibumad-devel} BuildRequires: libjpeg-devel %{?with_libnfs:BuildRequires: libnfs-devel >= 1.9.3} BuildRequires: libpng-devel @@ -134,7 +135,6 @@ BuildRequires: gtk+3-devel >= 3.0.0 BuildRequires: glib2-static BuildRequires: glibc-static BuildRequires: pcre-static -BuildRequires: xen-static BuildRequires: zlib-static %endif Requires: %{name}-img = %{version}-%{release} @@ -142,6 +142,7 @@ Requires: %{name}-system-aarch64 = %{version}-%{release} Requires: %{name}-system-alpha = %{version}-%{release} Requires: %{name}-system-arm = %{version}-%{release} Requires: %{name}-system-cris = %{version}-%{release} +Requires: %{name}-system-hppa = %{version}-%{release} Requires: %{name}-system-lm32 = %{version}-%{release} Requires: %{name}-system-m68k = %{version}-%{release} Requires: %{name}-system-microblaze = %{version}-%{release} @@ -150,6 +151,8 @@ Requires: %{name}-system-moxie = %{version}-%{release} Requires: %{name}-system-nios2 = %{version}-%{release} Requires: %{name}-system-or1k = %{version}-%{release} Requires: %{name}-system-ppc = %{version}-%{release} +Requires: %{name}-system-riscv32 = %{version}-%{release} +Requires: %{name}-system-riscv64 = %{version}-%{release} Requires: %{name}-system-s390x = %{version}-%{release} Requires: %{name}-system-sh4 = %{version}-%{release} Requires: %{name}-system-sparc = %{version}-%{release} @@ -387,6 +390,25 @@ dobrą szybkość emulacji dzięki użyciu translacji dynamicznej. Ten pakiet zawiera emulator systemu z procesorem CRIS. +%package system-hppa +Summary: QEMU system emulator for HP/PA +Summary(pl.UTF-8): QEMU - emulator systemu z procesorem HP/PA +Group: Development/Tools +Requires: %{name}-common = %{version}-%{release} +%systempkg_req + +%description system-hppa +QEMU is a generic and open source processor emulator which achieves a +good emulation speed by using dynamic translation. + +This package provides the system emulator with HP/PA CPU. + +%description system-hppa -l pl.UTF-8 +QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający +dobrą szybkość emulacji dzięki użyciu translacji dynamicznej. + +Ten pakiet zawiera emulator systemu z procesorem HP/PA. + %package system-lm32 Summary: QEMU system emulator for LM32 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem LM32 @@ -546,6 +568,44 @@ dobrą szybkość emulacji dzięki użyciu translacji dynamicznej. Ten pakiet zawiera emulator systemu z procesorem PowerPC. +%package system-riscv32 +Summary: QEMU system emulator for RISC-V (32 bit) +Summary(pl.UTF-8): QEMU - emulator systemu z procesorem RISC-V (32 bit) +Group: Development/Tools +Requires: %{name}-common = %{version}-%{release} +%systempkg_req + +%description system-riscv32 +QEMU is a generic and open source processor emulator which achieves a +good emulation speed by using dynamic translation. + +This package provides the system emulator with RISC-V (32 bit) CPU. + +%description system-riscv32 -l pl.UTF-8 +QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający +dobrą szybkość emulacji dzięki użyciu translacji dynamicznej. + +Ten pakiet zawiera emulator systemu z procesorem RISC-V (32 bit). + +%package system-riscv64 +Summary: QEMU system emulator for RISC-V (64 bit) +Summary(pl.UTF-8): QEMU - emulator systemu z procesorem RISC-V (64 bit) +Group: Development/Tools +Requires: %{name}-common = %{version}-%{release} +%systempkg_req + +%description system-riscv64 +QEMU is a generic and open source processor emulator which achieves a +good emulation speed by using dynamic translation. + +This package provides the system emulator with RISC-V (64 bit) CPU. + +%description system-riscv64 -l pl.UTF-8 +QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający +dobrą szybkość emulacji dzięki użyciu translacji dynamicznej. + +Ten pakiet zawiera emulator systemu z procesorem RISC-V (64 bit). + %package system-s390x Summary: QEMU system emulator for S390 Summary(pl.UTF-8): QEMU - emulator systemu z procesorem S390 @@ -722,19 +782,6 @@ Requires: %{name}-common = %{version}-%{release} %description module-block-curl -l pl.UTF-8 Moduł QEMU dla urządeń blokowych typu 'curl'. -%package module-block-dmg -Summary: QEMU module for 'dmg' block devices -Summary(pl.UTF-8): Moduł QEMU dla urządeń blokowych typu 'dmg' -Group: Development/Tools -Requires: %{name}-common = %{version}-%{release} -Requires: bzip2-libs - -%description module-block-dmg -'dmg' block device support for QEMU. - -%description module-block-dmg -l pl.UTF-8 -Moduł QEMU dla urządeń blokowych typu 'dmg'. - %package module-block-gluster Summary: QEMU module for 'gluster' block devices Summary(pl.UTF-8): Moduł QEMU dla urządeń blokowych typu 'gluster' @@ -761,19 +808,6 @@ Requires: libiscsi >= 1.9.0 %description module-block-iscsi -l pl.UTF-8 Moduł QEMU dla urządeń blokowych typu 'iscsi'. -%package module-block-nfs -Summary: QEMU module for 'nfs' block devices -Summary(pl.UTF-8): Moduł QEMU dla urządeń blokowych typu 'nfs' -Group: Development/Tools -Requires: %{name}-common = %{version}-%{release} -Requires: libnfs >= 1.9.3 - -%description module-block-nfs -'nfs' block device support for QEMU. - -%description module-block-nfs -l pl.UTF-8 -Moduł QEMU dla urządeń blokowych typu 'nfs'. - %package module-block-rbd Summary: QEMU module for 'rbd' block devices Summary(pl.UTF-8): Moduł QEMU dla urządeń blokowych typu 'rbd' @@ -807,7 +841,6 @@ Moduł QEMU dla urządeń blokowych typu 'ssh'. %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 # workaround for conflict with alsa/error.h ln -s ../error.h qapi/error.h @@ -869,7 +902,7 @@ build dynamic \ --enable-vnc-jpeg \ --enable-vnc-png \ --enable-vnc-sasl \ - %{__enable_disable vte} \ + %{!?with_vte:--disable-vte} \ %{__enable_disable xen} \ --enable-modules \ --disable-netmap \ @@ -914,7 +947,8 @@ build static \ %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/etc/{qemu,sysconfig,udev/rules.d,modules-load.d} \ +install -d $RPM_BUILD_ROOT/usr/lib/binfmt.d \ + $RPM_BUILD_ROOT/etc/{qemu,sysconfig,udev/rules.d,modules-load.d} \ $RPM_BUILD_ROOT{%{_sysconfdir}/sasl,%{_sbindir}} %if %{with user_static} @@ -954,8 +988,61 @@ install -p ksmctl $RPM_BUILD_ROOT%{_sbindir} install -p %{SOURCE9} $RPM_BUILD_ROOT%{_sbindir}/ksmtuned install -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/ksmtuned.conf +# For the qemu-guest-agent subpackage install the udev rules. install -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d +# Install binfmt +for i in dummy \ +%ifnarch %{ix86} %{x8664} x32 + qemu-i386 \ +%endif +%ifnarch alpha + qemu-alpha \ +%endif +%ifnarch %{arm} + qemu-arm \ +%endif + qemu-armeb \ + qemu-cris \ + qemu-microblaze qemu-microblazeel \ +%ifnarch mips64 + qemu-mips64 \ +%ifnarch mips + qemu-mips \ +%endif +%endif +%ifnarch mips64el + qemu-mips64el \ +%ifnarch mipsel + qemu-mipsel \ +%endif +%endif +%ifnarch m68k + qemu-m68k \ +%endif +%ifnarch ppc ppc64 ppc64le + qemu-ppc qemu-ppc64abi32 qemu-ppc64 \ +%endif +%ifnarch sparc sparc64 + qemu-sparc qemu-sparc32plus qemu-sparc64 \ +%endif +%ifnarch s390 s390x + qemu-s390x \ +%endif +%ifnarch sh4 + qemu-sh4 \ +%endif + qemu-sh4eb \ +; do + test $i = dummy && continue + grep /$i:\$ %{SOURCE2} > $RPM_BUILD_ROOT/usr/lib/binfmt.d/$i-dynamic.conf + + %if %{with user_static} + grep /$i:\$ %{SOURCE2} > $RPM_BUILD_ROOT/usr/lib/binfmt.d/$i-static.conf + %{__sed} -i -e "s/$i/$i-static/" $RPM_BUILD_ROOT/usr/lib/binfmt.d/$i-static.conf + %endif +done < %{SOURCE2} + # packaged as %doc %{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-doc.html @@ -1071,6 +1158,17 @@ fi %dir %{_libdir}/%{name} +# modules without too many external dependencies +%attr(755,root,root) %{_libdir}/%{name}/block-dmg-bz2.so +%attr(755,root,root) %{_libdir}/%{name}/block-nfs.so + +%attr(755,root,root) %{_libdir}/%{name}/audio-alsa.so +%attr(755,root,root) %{_libdir}/%{name}/audio-pa.so +%attr(755,root,root) %{_libdir}/%{name}/audio-sdl.so +%attr(755,root,root) %{_libdir}/%{name}/ui-curses.so +%attr(755,root,root) %{_libdir}/%{name}/ui-gtk.so +%attr(755,root,root) %{_libdir}/%{name}/ui-sdl.so + %files img %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/qemu-img @@ -1083,7 +1181,9 @@ fi %files user %defattr(644,root,root,755) +/usr/lib/binfmt.d/qemu-*-dynamic.conf %attr(755,root,root) %{_bindir}/qemu-aarch64 +%attr(755,root,root) %{_bindir}/qemu-aarch64_be %attr(755,root,root) %{_bindir}/qemu-alpha %attr(755,root,root) %{_bindir}/qemu-arm %attr(755,root,root) %{_bindir}/qemu-armeb @@ -1106,6 +1206,8 @@ fi %attr(755,root,root) %{_bindir}/qemu-ppc64 %attr(755,root,root) %{_bindir}/qemu-ppc64abi32 %attr(755,root,root) %{_bindir}/qemu-ppc64le +%attr(755,root,root) %{_bindir}/qemu-riscv32 +%attr(755,root,root) %{_bindir}/qemu-riscv64 %attr(755,root,root) %{_bindir}/qemu-s390x %attr(755,root,root) %{_bindir}/qemu-sh4 %attr(755,root,root) %{_bindir}/qemu-sh4eb @@ -1113,11 +1215,15 @@ fi %attr(755,root,root) %{_bindir}/qemu-sparc32plus %attr(755,root,root) %{_bindir}/qemu-sparc64 %attr(755,root,root) %{_bindir}/qemu-x86_64 +%attr(755,root,root) %{_bindir}/qemu-xtensa +%attr(755,root,root) %{_bindir}/qemu-xtensaeb %if %{with user_static} %files user-static %defattr(644,root,root,755) +/usr/lib/binfmt.d/qemu-*-static.conf %attr(755,root,root) %{_bindir}/qemu-aarch64-static +%attr(755,root,root) %{_bindir}/qemu-aarch64_be-static %attr(755,root,root) %{_bindir}/qemu-alpha-static %attr(755,root,root) %{_bindir}/qemu-arm-static %attr(755,root,root) %{_bindir}/qemu-armeb-static @@ -1139,6 +1245,8 @@ fi %attr(755,root,root) %{_bindir}/qemu-ppc64-static %attr(755,root,root) %{_bindir}/qemu-ppc64abi32-static %attr(755,root,root) %{_bindir}/qemu-ppc64le-static +%attr(755,root,root) %{_bindir}/qemu-riscv32-static +%attr(755,root,root) %{_bindir}/qemu-riscv64-static %attr(755,root,root) %{_bindir}/qemu-s390x-static %attr(755,root,root) %{_bindir}/qemu-sh4-static %attr(755,root,root) %{_bindir}/qemu-sh4eb-static @@ -1147,6 +1255,8 @@ fi %attr(755,root,root) %{_bindir}/qemu-sparc64-static %attr(755,root,root) %{_bindir}/qemu-tilegx-static %attr(755,root,root) %{_bindir}/qemu-x86_64-static +%attr(755,root,root) %{_bindir}/qemu-xtensa-static +%attr(755,root,root) %{_bindir}/qemu-xtensaeb-static %endif %files system-aarch64 @@ -1165,6 +1275,11 @@ fi %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/qemu-system-cris +%files system-hppa +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/qemu-system-hppa +%{_datadir}/%{name}/hppa-firmware.img + %files system-lm32 %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/qemu-system-lm32 @@ -1201,10 +1316,19 @@ fi %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/qemu-system-ppc %attr(755,root,root) %{_bindir}/qemu-system-ppc64 -#%attr(755,root,root) %{_bindir}/qemu-system-ppc64le %attr(755,root,root) %{_bindir}/qemu-system-ppcemb +%{_datadir}/%{name}/canyonlands.dtb %{_datadir}/%{name}/qemu_vga.ndrv %{_datadir}/%{name}/u-boot.e500 +%{_datadir}/%{name}/u-boot-sam460-20100605.bin + +%files system-riscv32 +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/qemu-system-riscv32 + +%files system-riscv64 +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/qemu-system-riscv64 %files system-s390x %defattr(644,root,root,755) @@ -1239,7 +1363,6 @@ fi %endif %{_datadir}/%{name}/bios.bin %{_datadir}/%{name}/bios-256k.bin -%{_datadir}/%{name}/acpi-dsdt.aml %files system-xtensa %defattr(644,root,root,755) @@ -1256,10 +1379,6 @@ fi %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/%{name}/block-curl.so -%files module-block-dmg -%defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/%{name}/block-dmg-bz2.so - %if %{with glusterfs} %files module-block-gluster %defattr(644,root,root,755) @@ -1272,12 +1391,6 @@ fi %attr(755,root,root) %{_libdir}/%{name}/block-iscsi.so %endif -%if %{with libnfs} -%files module-block-nfs -%defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/%{name}/block-nfs.so -%endif - %if %{with ceph} %files module-block-rbd %defattr(644,root,root,755)