From f1ad8498cf562c6d4769cbda9e75d894f435de98 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 22 Aug 2016 13:07:31 +0000 Subject: [PATCH] - updated to 2.6.1, partial PLD merge --- 99-qemu-guest-agent.rules | 2 + CVE-2015-3456.patch | 84 -------------------------- libjpeg-boolean.patch | 10 +-- qemu-cflags.patch | 9 +-- qemu-kde_virtual_workspaces_hack.patch | 79 ------------------------ qemu-sh.patch | 12 ++++ qemu-system-libcacard.patch | 71 ---------------------- qemu-whitelist.patch | 11 ++-- qemu-xattr.patch | 20 +++--- qemu.spec | 60 +++++++++++++----- vgabios-widescreens.patch | 7 ++- 11 files changed, 87 insertions(+), 278 deletions(-) create mode 100644 99-qemu-guest-agent.rules delete mode 100644 CVE-2015-3456.patch delete mode 100644 qemu-kde_virtual_workspaces_hack.patch create mode 100644 qemu-sh.patch delete mode 100644 qemu-system-libcacard.patch diff --git a/99-qemu-guest-agent.rules b/99-qemu-guest-agent.rules new file mode 100644 index 0000000..8a290ab --- /dev/null +++ b/99-qemu-guest-agent.rules @@ -0,0 +1,2 @@ +SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \ + TAG+="systemd" ENV{SYSTEMD_WANTS}="qemu-guest-agent.service" diff --git a/CVE-2015-3456.patch b/CVE-2015-3456.patch deleted file mode 100644 index 50c19d9..0000000 --- a/CVE-2015-3456.patch +++ /dev/null @@ -1,84 +0,0 @@ -From e907746266721f305d67bc0718795fedee2e824c Mon Sep 17 00:00:00 2001 -From: Petr Matousek -Date: Wed, 6 May 2015 09:48:59 +0200 -Subject: [PATCH] fdc: force the fifo access to be in bounds of the allocated buffer - -During processing of certain commands such as FD_CMD_READ_ID and -FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could -get out of bounds leading to memory corruption with values coming -from the guest. - -Fix this by making sure that the index is always bounded by the -allocated memory. - -This is CVE-2015-3456. - -Signed-off-by: Petr Matousek -Reviewed-by: John Snow -Signed-off-by: John Snow ---- - hw/block/fdc.c | 17 +++++++++++------ - 1 files changed, 11 insertions(+), 6 deletions(-) - -diff --git a/hw/block/fdc.c b/hw/block/fdc.c -index f72a392..d8a8edd 100644 ---- a/hw/block/fdc.c -+++ b/hw/block/fdc.c -@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) - { - FDrive *cur_drv; - uint32_t retval = 0; -- int pos; -+ uint32_t pos; - - cur_drv = get_cur_drv(fdctrl); - fdctrl->dsr &= ~FD_DSR_PWRDOWN; -@@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) - return 0; - } - pos = fdctrl->data_pos; -+ pos %= FD_SECTOR_LEN; - if (fdctrl->msr & FD_MSR_NONDMA) { -- pos %= FD_SECTOR_LEN; - if (pos == 0) { - if (fdctrl->data_pos != 0) - if (!fdctrl_seek_to_next_sect(fdctrl, cur_drv)) { -@@ -1852,10 +1852,13 @@ static void fdctrl_handle_option(FDCtrl *fdctrl, int direction) - static void fdctrl_handle_drive_specification_command(FDCtrl *fdctrl, int direction) - { - FDrive *cur_drv = get_cur_drv(fdctrl); -+ uint32_t pos; - -- if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x80) { -+ pos = fdctrl->data_pos - 1; -+ pos %= FD_SECTOR_LEN; -+ if (fdctrl->fifo[pos] & 0x80) { - /* Command parameters done */ -- if (fdctrl->fifo[fdctrl->data_pos - 1] & 0x40) { -+ if (fdctrl->fifo[pos] & 0x40) { - fdctrl->fifo[0] = fdctrl->fifo[1]; - fdctrl->fifo[2] = 0; - fdctrl->fifo[3] = 0; -@@ -1955,7 +1958,7 @@ static uint8_t command_to_handler[256]; - static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value) - { - FDrive *cur_drv; -- int pos; -+ uint32_t pos; - - /* Reset mode */ - if (!(fdctrl->dor & FD_DOR_nRESET)) { -@@ -2004,7 +2007,9 @@ static void fdctrl_write_data(FDCtrl *fdctrl, uint32_t value) - } - - FLOPPY_DPRINTF("%s: %02x\n", __func__, value); -- fdctrl->fifo[fdctrl->data_pos++] = value; -+ pos = fdctrl->data_pos++; -+ pos %= FD_SECTOR_LEN; -+ fdctrl->fifo[pos] = value; - if (fdctrl->data_pos == fdctrl->data_len) { - /* We now have all parameters - * and will be able to treat the command --- -1.7.0.4 - diff --git a/libjpeg-boolean.patch b/libjpeg-boolean.patch index c321830..4774981 100644 --- a/libjpeg-boolean.patch +++ b/libjpeg-boolean.patch @@ -1,10 +1,10 @@ -diff -dur qemu-1.7.1.orig/ui/vnc-enc-tight.c qemu-1.7.1/ui/vnc-enc-tight.c ---- qemu-1.7.1.orig/ui/vnc-enc-tight.c 2014-03-25 15:01:10.000000000 +0100 -+++ qemu-1.7.1/ui/vnc-enc-tight.c 2014-04-09 11:36:05.000000000 +0200 -@@ -41,6 +41,8 @@ +diff -urp qemu-2.6.1.orig/ui/vnc-enc-tight.c qemu-2.6.1/ui/vnc-enc-tight.c +--- qemu-2.6.1.orig/ui/vnc-enc-tight.c 2016-08-22 12:53:19.826554000 +0000 ++++ qemu-2.6.1/ui/vnc-enc-tight.c 2016-08-22 12:55:03.484554000 +0000 +@@ -40,6 +40,8 @@ + #include #endif #ifdef CONFIG_VNC_JPEG - #include +#define HAVE_BOOLEAN +#define boolean int #include diff --git a/qemu-cflags.patch b/qemu-cflags.patch index b118f7a..286d987 100644 --- a/qemu-cflags.patch +++ b/qemu-cflags.patch @@ -1,6 +1,7 @@ ---- qemu-2.5.0/configure.orig 2015-12-16 22:04:48.000000000 +0000 -+++ qemu-2.5.0/configure 2016-01-20 08:44:46.108727000 +0000 -@@ -418,10 +418,6 @@ +diff -urp qemu-2.6.1.orig/configure qemu-2.6.1/configure +--- qemu-2.6.1.orig/configure 2016-08-22 12:44:02.279554000 +0000 ++++ qemu-2.6.1/configure 2016-08-22 12:44:21.033554000 +0000 +@@ -392,10 +392,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)/include" @@ -11,7 +12,7 @@ # make source path absolute source_path=`cd "$source_path"; pwd` -@@ -4498,12 +4494,8 @@ +@@ -4514,12 +4510,8 @@ fi # After here, no more $cc or $ld runs if test "$gcov" = "yes" ; then diff --git a/qemu-kde_virtual_workspaces_hack.patch b/qemu-kde_virtual_workspaces_hack.patch deleted file mode 100644 index cc3d5e7..0000000 --- a/qemu-kde_virtual_workspaces_hack.patch +++ /dev/null @@ -1,79 +0,0 @@ -Proof of concept patch for using kde's virtual workspaces from withing qemu, -when running full screen (so that a virtual workspace is a whole OS). -This should: -- use configurable key bindings or even be able to get them from the current - environment -- use dcop directly (preferably using runtime probing for dcop libs), without - having to invoke the dcop app (which is obviously slower) - -But for now whoever wants to can just hack in his key bindings and it will -kind of work. - -Would actually be nice if kde (and gnome) had the ability to create workspaces -on the fly, so qemu could have a mode when it assigns itself a completely new -workspace on startup. This way I could have another OS running in the -'background' without altering my workflow (that is -- without depriving me of -one workspace which I normally use). - ---- qemu-0.8.2/sdl.c 2006-07-22 19:23:34.000000000 +0200 -+++ qemu-0.8.2.new/sdl.c 2006-11-25 20:57:12.220599750 +0100 -@@ -35,9 +35,11 @@ - static int gui_saved_grab; - static int gui_fullscreen; - static int gui_key_modifier_pressed; -+static int gui_key_modifier_pressed2; - static int gui_keysym; - static int gui_fullscreen_initial_grab; - static int gui_grab_code = KMOD_LALT | KMOD_LCTRL; -+static int gui_switch_workspace_code = KMOD_LMETA; - static uint8_t modifiers_state[256]; - static int width, height; - static SDL_Cursor *sdl_cursor_normal; -@@ -382,13 +384,36 @@ - case SDL_KEYDOWN: - case SDL_KEYUP: - if (ev->type == SDL_KEYDOWN) { -+ mod_state = (SDL_GetModState() & gui_switch_workspace_code) == -+ gui_switch_workspace_code; -+ gui_key_modifier_pressed2 = mod_state; - mod_state = (SDL_GetModState() & gui_grab_code) == - gui_grab_code; - gui_key_modifier_pressed = mod_state; -- if (gui_key_modifier_pressed) { -+ if (gui_key_modifier_pressed2) { - int keycode; -+ char cmd[] = "dcop kwin default setCurrentDesktop 1 >/dev/null"; - keycode = sdl_keyevent_to_keycode(&ev->key); - switch(keycode) { -+ case 0x02 ... 0x0a: /* '1' to '9' keys */ -+ sdl_grab_end(); -+ cmd[36] =(char)keycode+'0'-1; -+ system(cmd); -+ break; -+ default: -+ break; -+ -+ break; -+ } -+ } -+ else if (gui_key_modifier_pressed) { -+ int keycode; -+ keycode = sdl_keyevent_to_keycode(&ev->key); -+ switch(keycode) { -+ case 0x10: -+ case 0x2d: /* 'q' or 'x' */ -+ qemu_system_shutdown_request(); -+ break; - case 0x21: /* 'f' key on US keyboard */ - toggle_full_screen(ds); - gui_keysym = 1; -@@ -508,6 +533,9 @@ - !ev->active.gain && !gui_fullscreen_initial_grab) { - sdl_grab_end(); - } -+ else if(gui_fullscreen && ev->active.state == SDL_APPINPUTFOCUS) { -+ sdl_grab_start(); -+ } - break; - default: - break; diff --git a/qemu-sh.patch b/qemu-sh.patch new file mode 100644 index 0000000..f2f4f8e --- /dev/null +++ b/qemu-sh.patch @@ -0,0 +1,12 @@ +diff -urp qemu-2.6.1.orig/configure qemu-2.6.1/configure +--- qemu-2.6.1.orig/configure 2016-08-22 12:55:29.238554000 +0000 ++++ qemu-2.6.1/configure 2016-08-22 12:55:44.167554000 +0000 +@@ -4769,7 +4769,7 @@ echo "GNUTLS rnd $gnutls_rnd" + echo "libgcrypt $gcrypt" + echo "libgcrypt kdf $gcrypt_kdf" + if test "$nettle" = "yes"; then +- echo "nettle $nettle ($nettle_version)" ++ echo "nettle $nettle \($nettle_version)" + else + echo "nettle $nettle" + fi diff --git a/qemu-system-libcacard.patch b/qemu-system-libcacard.patch deleted file mode 100644 index b5d9c06..0000000 --- a/qemu-system-libcacard.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -urNp qemu-2.4.0.orig/configure qemu-2.4.0/configure ---- qemu-2.4.0.orig/configure 2015-08-25 06:46:52.000000000 +0000 -+++ qemu-2.4.0/configure 2015-08-25 06:52:47.586593251 +0000 -@@ -3765,9 +3765,11 @@ if test "$smartcard_nss" != "no"; then - int main(void) { PK11_FreeSlot(0); return 0; } - EOF - # FIXME: do not include $glib_* in here -+ libcacard_libs="$($pkg_config --libs libcacard 2>/dev/null)" -+ libcacard_cflags="$($pkg_config --cflags libcacard 2>/dev/null)" - nss_libs="$($pkg_config --libs nss 2>/dev/null) $glib_libs" - nss_cflags="$($pkg_config --cflags nss 2>/dev/null) $glib_cflags" -- test_cflags="$nss_cflags" -+ test_cflags="$libcacard_cflags" - # The header files in nss < 3.13.3 have a bug which causes them to - # emit a warning. If we're going to compile QEMU with -Werror, then - # test that the headers don't have this bug. Otherwise we would pass -@@ -3779,6 +3781,8 @@ EOF - $pkg_config --atleast-version=3.12.8 nss && \ - compile_prog "$test_cflags" "$nss_libs"; then - smartcard_nss="yes" -+ QEMU_CFLAGS="$QEMU_CFLAGS $libcacard_cflags $nss_cflags" -+ libs_softmmu="$libcacard_libs $nss_libs $libs_softmmu" - else - if test "$smartcard_nss" = "yes"; then - feature_not_found "nss" "Install nss devel >= 3.12.8" -@@ -4933,6 +4937,8 @@ fi - - if test "$smartcard_nss" = "yes" ; then - echo "CONFIG_SMARTCARD_NSS=y" >> $config_host_mak -+ echo "LIBCACARD_LIBS=$libcacard_libs" >> $config_host_mak -+ echo "LIBCACARD_CFLAGS=$libcacard_cflags" >> $config_host_mak - echo "NSS_LIBS=$nss_libs" >> $config_host_mak - echo "NSS_CFLAGS=$nss_cflags" >> $config_host_mak - fi -diff -urNp qemu-2.4.0.orig/hw/usb/ccid-card-passthru.c qemu-2.4.0/hw/usb/ccid-card-passthru.c ---- qemu-2.4.0.orig/hw/usb/ccid-card-passthru.c 2015-08-11 19:11:07.000000000 +0000 -+++ qemu-2.4.0/hw/usb/ccid-card-passthru.c 2015-08-25 06:52:53.709593251 +0000 -@@ -12,7 +12,7 @@ - #include "qemu/error-report.h" - #include "qemu/sockets.h" - #include "ccid.h" --#include "libcacard/vscard_common.h" -+#include - - #define DPRINTF(card, lvl, fmt, ...) \ - do { \ -diff -urNp qemu-2.4.0.orig/Makefile qemu-2.4.0/Makefile ---- qemu-2.4.0.orig/Makefile 2015-08-11 19:11:05.000000000 +0000 -+++ qemu-2.4.0/Makefile 2015-08-25 06:52:47.588593251 +0000 -@@ -157,9 +157,6 @@ dummy := $(call unnest-vars,, \ - ifneq ($(wildcard config-host.mak),) - include $(SRC_PATH)/tests/Makefile - endif --ifeq ($(CONFIG_SMARTCARD_NSS),y) --include $(SRC_PATH)/libcacard/Makefile --endif - - all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules - -diff -urNp qemu-2.4.0.orig/Makefile.objs qemu-2.4.0/Makefile.objs ---- qemu-2.4.0.orig/Makefile.objs 2015-08-11 19:11:05.000000000 +0000 -+++ qemu-2.4.0/Makefile.objs 2015-08-25 06:54:03.092593251 +0000 -@@ -75,8 +75,6 @@ common-obj-y += backends/ - - common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o - --common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y) -- - common-obj-$(CONFIG_FDT) += device_tree.o - - ###################################################################### diff --git a/qemu-whitelist.patch b/qemu-whitelist.patch index 318b990..cbfa13f 100644 --- a/qemu-whitelist.patch +++ b/qemu-whitelist.patch @@ -1,8 +1,9 @@ ---- scripts/create_config.org 2011-02-16 15:44:05.000000000 +0100 -+++ scripts/create_config 2011-03-21 21:26:16.136615526 +0100 -@@ -33,7 +33,9 @@ - CONFIG_BDRV_WHITELIST=*) - echo "#define CONFIG_BDRV_WHITELIST \\" +diff -urp qemu-2.6.1.orig/scripts/create_config qemu-2.6.1/scripts/create_config +--- qemu-2.6.1.orig/scripts/create_config 2016-08-22 12:45:39.876554000 +0000 ++++ qemu-2.6.1/scripts/create_config 2016-08-22 12:46:15.281554000 +0000 +@@ -41,7 +41,9 @@ case $line in + CONFIG_BDRV_RW_WHITELIST=*) + echo "#define CONFIG_BDRV_RW_WHITELIST\\" for drv in ${line#*=}; do - echo " \"${drv}\",\\" + if [ ! -z "$drv" ]; then diff --git a/qemu-xattr.patch b/qemu-xattr.patch index 4d89cb2..8820334 100644 --- a/qemu-xattr.patch +++ b/qemu-xattr.patch @@ -1,23 +1,19 @@ -Workaround vs defines conflict: -When including both, the latter must be included first. -Move "qemu-xattr.h" (which includes to the front, -before (which includes . - ---- qemu-1.7.1/fsdev/virtfs-proxy-helper.c.orig 2014-03-25 15:01:10.000000000 +0100 -+++ qemu-1.7.1/fsdev/virtfs-proxy-helper.c 2014-04-03 02:55:41.115547990 +0200 +diff -urp qemu-2.6.1.orig/fsdev/virtfs-proxy-helper.c qemu-2.6.1/fsdev/virtfs-proxy-helper.c +--- qemu-2.6.1.orig/fsdev/virtfs-proxy-helper.c 2016-08-22 12:47:04.270554000 +0000 ++++ qemu-2.6.1/fsdev/virtfs-proxy-helper.c 2016-08-22 12:52:40.042554000 +0000 @@ -9,6 +9,7 @@ * the COPYING file in the top-level directory. */ +#include "qemu/xattr.h" + #include "qemu/osdep.h" #include #include - #include -@@ -22,7 +23,6 @@ +@@ -23,7 +24,6 @@ #endif #include "qemu-common.h" #include "qemu/sockets.h" -#include "qemu/xattr.h" - #include "virtio-9p-marshal.h" - #include "hw/9pfs/virtio-9p-proxy.h" - #include "fsdev/virtio-9p-marshal.h" + #include "9p-iov-marshal.h" + #include "hw/9pfs/9p-proxy.h" + #include "fsdev/9p-iov-marshal.h" diff --git a/qemu.spec b/qemu.spec index cfa48fd..2e80cb0 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,10 +1,11 @@ -# TODO: archipelago (libxseg) on bcond (GPL v3 vs v2-only conflict) # # Conditional build: %bcond_without sdl # SDL UI and audio support +%bcond_without gl # Don't require gl deps %bcond_without ceph # Ceph/RBD support %bcond_without glusterfs # GlusterFS backend %bcond_without rdma # RDMA-based migration support +%bcond_with xseg # Archipelago backend [non-distributable: GPLv3+ vs GPLv2-only] %bcond_with gtk2 # GTK+ 2.x instead of 3.x %bcond_without gtk3 # Do not build GTK+ UI %bcond_without vte # VTE support in GTK+ UI @@ -32,12 +33,12 @@ Summary: QEMU CPU Emulator Summary(pl.UTF-8): QEMU - emulator procesora Name: qemu -Version: 2.5.0 +Version: 2.6.1 Release: 1 License: GPL v2 Group: Applications/Emulators Source0: http://wiki.qemu-project.org/download/%{name}-%{version}.tar.bz2 -# Source0-md5: f469f2330bbe76e3e39db10e9ac4f8db +# Source0-md5: 6a183b192018192943b6781e1bb9b72f # Loads kvm kernel modules at boot Source3: kvm-modules-load.conf # Creates /dev/kvm @@ -47,15 +48,16 @@ Source6: ksm.sysconfig Source7: ksmctl.c Source9: ksmtuned Source10: ksmtuned.conf +Source12: 99-%{name}-guest-agent.rules Patch0: %{name}-cflags.patch Patch1: vgabios-widescreens.patch Patch2: %{name}-whitelist.patch Patch3: %{name}-xattr.patch Patch4: libjpeg-boolean.patch -# Proof of concept, for reference, do not remove -Patch400: %{name}-kde_virtual_workspaces_hack.patch +Patch5: %{name}-sh.patch URL: http://www.qemu-project.org/ -BuildRequires: OpenGL-GLX-devel +%{?with_gl:BuildRequires: OpenGL-GLX-devel} +%{?with_gl:BuildRequires: OpenGL-devel} %{?with_sdl:BuildRequires: SDL2-devel >= 2.0} BuildRequires: alsa-lib-devel BuildRequires: bcc >= 0.16.21-2 @@ -66,13 +68,14 @@ BuildRequires: bzip2-devel BuildRequires: curl-devel BuildRequires: cyrus-sasl-devel >= 2 %{?with_esd:BuildRequires: esound-devel} -BuildRequires: glib2-devel >= 1:2.12 +BuildRequires: glib2-devel >= 1:2.22 %{?with_glusterfs:BuildRequires: glusterfs-devel >= 3.4} BuildRequires: gnutls-devel > 2.10.0 BuildRequires: libaio-devel %{?with_smartcard:BuildRequires: libcacard-devel} BuildRequires: libcap-devel BuildRequires: libcap-ng-devel +%{?with_gl:BuildRequires: libepoxy-devel} BuildRequires: libfdt-devel %{?with_rdma:BuildRequires: libibverbs-devel} %{?with_iscsi:BuildRequires: libiscsi-devel >= 1.9.0} @@ -84,10 +87,11 @@ BuildRequires: libpng-devel BuildRequires: libssh2-devel >= 1.2.8 BuildRequires: libusb-devel >= 1.0.13 BuildRequires: libuuid-devel +%{?with_xseg:BuildRequires: libxseg-devel} %{?with_lttng:BuildRequires: lttng-ust-devel} BuildRequires: lzo-devel >= 2 BuildRequires: ncurses-devel -%{?with_smartcard:BuildRequires: nss-devel >= 3.12.8} +%{?with_smartcard:BuildRequires: nss-devel >= 1:3.12.8} BuildRequires: numactl-devel BuildRequires: perl-Encode BuildRequires: perl-tools-pod @@ -210,7 +214,7 @@ Requires(pre): /bin/id Requires(pre): /usr/bin/getgid Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/useradd -Requires: glib2 >= 1:2.12 +Requires: glib2 >= 1:2.22 %{?with_libnfs:Requires: libnfs >= 1.9.3} Requires: libssh2 >= 1.2.8 Provides: group(qemu) @@ -638,7 +642,7 @@ Ten pakiet zawiera emulator systemu z procesorem Xtensa. Summary: QEMU guest agent Summary(pl.UTF-8): Agent gościa QEMU Group: Daemons -Requires: glib2 >= 1:2.12 +Requires: glib2 >= 1:2.22 Obsoletes: qemu-kvm-guest-agent %description guest-agent @@ -661,6 +665,18 @@ systemach-gościach, komunikującego się kanałem virtio-serial o nazwie Ten pakiet nie musi być zainstalowany w systemie hosta. +%package module-block-archipelago +Summary: QEMU module for Archipelago block devices +Summary(pl.UTF-8): Moduł QEMU dla urządeń blokowych Archipelago +Group: Development/Tools +Requires: %{name}-common = %{version}-%{release} + +%description module-block-archipelago +Archipelago block device support for QEMU. + +%description module-block-archipelago -l pl.UTF-8 +Moduł QEMU dla urządeń blokowych Archipelago. + %package module-block-curl Summary: QEMU module for 'curl' block devices Summary(pl.UTF-8): Moduł QEMU dla urządeń blokowych typu 'curl' @@ -739,9 +755,10 @@ Moduł QEMU dla urządeń blokowych typu 'ssh'. %setup -q %patch0 -p1 %patch1 -p1 -%patch2 -p0 +%patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 # workaround for conflict with alsa/error.h ln -s ../error.h qapi/error.h @@ -757,6 +774,7 @@ ln -s ../error.h qapi/error.h --cc="%{__cc}" \ --host-cc="%{__cc}" \ --disable-strip \ + %{__enable_disable xseg archipelago} \ --enable-attr \ %{__enable_disable bluetooth bluez} \ %{__enable_disable brlapi} \ @@ -810,14 +828,16 @@ ln -s ../error.h qapi/error.h %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/usr/lib/binfmt.d \ - $RPM_BUILD_ROOT/etc/{sysconfig,udev/rules.d,modules-load.d} \ +install -d \ + $RPM_BUILD_ROOT/etc/{qemu,sysconfig,udev/rules.d,modules-load.d} \ $RPM_BUILD_ROOT{%{_sysconfdir}/sasl,%{_sbindir}} %{__make} install \ %{!?with_smartcard:CONFIG_USB_SMARTCARD=n} \ DESTDIR=$RPM_BUILD_ROOT +echo "#allow br0" > $RPM_BUILD_ROOT/etc/qemu/bridge.conf + install -d $RPM_BUILD_ROOT%{_sysconfdir} cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/qemu-ifup #!/bin/sh @@ -838,6 +858,8 @@ install -p ksmctl $RPM_BUILD_ROOT%{_sbindir} install -p %{SOURCE9} $RPM_BUILD_ROOT%{_sbindir}/ksmtuned install -p %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/ksmtuned.conf +install -p %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d + # packaged as %doc %{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qemu-{doc,tech}.html %{__rm} $RPM_BUILD_ROOT%{_docdir}/qemu/qmp-commands.txt @@ -889,6 +911,8 @@ fi %config(noreplace) %verify(not md5 mtime size) /etc/ksmtuned.conf %config(noreplace) %verify(not md5 mtime size) /etc/sasl/qemu.conf %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ksm +%dir /etc/qemu +%attr(640,root,qemu) %config(noreplace) %verify(not md5 mtime size) /etc/qemu/bridge.conf %attr(755,root,root) %{_bindir}/virtfs-proxy-helper %attr(755,root,root) %{_bindir}/qemu-nbd %attr(755,root,root) %{_libdir}/qemu-bridge-helper @@ -931,7 +955,6 @@ fi %{_datadir}/%{name}/pxe-virtio.rom %{_datadir}/%{name}/qemu_logo_no_text.svg %{_datadir}/%{name}/s390-ccw.img -%{_datadir}/%{name}/s390-zipl.rom %{_datadir}/%{name}/sgabios.bin %{_datadir}/%{name}/slof.bin %{_datadir}/%{name}/spapr-rtas.bin @@ -1035,6 +1058,7 @@ 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}/u-boot.e500 @@ -1072,7 +1096,6 @@ fi %{_datadir}/%{name}/bios.bin %{_datadir}/%{name}/bios-256k.bin %{_datadir}/%{name}/acpi-dsdt.aml -%{_datadir}/%{name}/q35-acpi-dsdt.aml %files system-xtensa %defattr(644,root,root,755) @@ -1081,9 +1104,16 @@ fi %files guest-agent %defattr(644,root,root,755) +%config(noreplace) %verify(not md5 mtime size) /etc/udev/rules.d/99-qemu-guest-agent.rules %attr(755,root,root) %{_bindir}/qemu-ga %{_mandir}/man8/qemu-ga.8* +%if %{with xseg} +%files module-block-archipelago +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/%{name}/block-archipelago.so +%endif + %files module-block-curl %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/%{name}/block-curl.so diff --git a/vgabios-widescreens.patch b/vgabios-widescreens.patch index 19541a1..e46293f 100644 --- a/vgabios-widescreens.patch +++ b/vgabios-widescreens.patch @@ -1,6 +1,7 @@ ---- qemu-1.1.0/roms/vgabios/vbetables-gen.c.orig 2012-06-05 11:08:17.000000000 +0200 -+++ qemu-1.1.0/roms/vgabios/vbetables-gen.c 2012-09-23 17:17:34.709685781 +0200 -@@ -76,6 +76,8 @@ +diff -urp qemu-2.6.1.orig/roms/vgabios/vbetables-gen.c qemu-2.6.1/roms/vgabios/vbetables-gen.c +--- qemu-2.6.1.orig/roms/vgabios/vbetables-gen.c 2016-08-22 12:44:56.027554000 +0000 ++++ qemu-2.6.1/roms/vgabios/vbetables-gen.c 2016-08-22 12:45:15.194554000 +0000 +@@ -76,6 +76,8 @@ ModeInfo modes[] = { { 2560, 1600, 16 , 0x18a}, { 2560, 1600, 24 , 0x18b}, { 2560, 1600, 32 , 0x18c}, -- 2.46.0