[packages/xen] - added qemu patch (fixes detection of NPTL, iscsi, usbredir in xen-qemu)

qboosh qboosh at pld-linux.org
Sun Oct 28 07:19:37 CET 2012


commit 7d9b583747bd3e68c316ab17694156f2591d4b85
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Oct 28 07:20:12 2012 +0100

    - added qemu patch (fixes detection of NPTL, iscsi, usbredir in xen-qemu)

 xen-qemu.patch | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 xen.spec       |  9 ++++---
 2 files changed, 89 insertions(+), 4 deletions(-)
---
diff --git a/xen.spec b/xen.spec
index 9f99e7b..18e4222 100644
--- a/xen.spec
+++ b/xen.spec
@@ -1,6 +1,5 @@
 #
 # TODO:
-#  - most of the qemu config options aren't detected (NPTL, vde, fdt)
 #  - check if other tools/libs are not usable in domU, move them to -guest
 #    packages if so
 #  - pass bconds to qemu configure script (tricky, as the script is called from
@@ -76,6 +75,7 @@ Patch7:		xen-net-disable-iptables-on-bridge.patch
 Patch8:		xen-configure-xend.patch
 Patch9:		xen-initscript.patch
 Patch10:	xen-quemu-softloat-c99.patch
+Patch11:	xen-qemu.patch
 URL:		http://www.xen.org/products/xenhyp.html
 %{?with_opengl:BuildRequires:	OpenGL-devel}
 %{?with_sdl:BuildRequires:	SDL-devel >= 1.2.1}
@@ -120,8 +120,7 @@ BuildRequires:	texi2html
 BuildRequires:	texlive-dvips
 BuildRequires:	texlive-latex-psnfss
 BuildRequires:	texlive-xetex
-# not adjusted for usbredir 0.5.x (libusbredirparser-0.5)
-#BuildRequires:	usbredir-devel
+BuildRequires:	usbredir-devel
 BuildRequires:	vde2-devel
 BuildRequires:	which
 # for xfsctl (<xfs/xfs.h>)
@@ -345,6 +344,7 @@ Ten pakiet zapewnia bashowe dopełnianie poleceń dla Xena (xl).
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
+%patch11 -p1
 
 # stubdom sources
 ln -s %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} stubdom
@@ -382,7 +382,8 @@ unset CXXFLAGS
 %{__make} -j1 dist-stubdom \
 	%{!?with_ocaml:OCAML_TOOLS=n} \
 	CC="%{__cc}" \
-	CXX="%{__cxx}"
+	CXX="%{__cxx}" \
+	V=1
 
 %install
 rm -rf $RPM_BUILD_ROOT
diff --git a/xen-qemu.patch b/xen-qemu.patch
new file mode 100644
index 0000000..d8f3a55
--- /dev/null
+++ b/xen-qemu.patch
@@ -0,0 +1,84 @@
+qemu-xen-traditional/configure: define _GNU_SOURCE for NPTL defs
+qemu-xen/configure: use -O2 for tests to eliminate fortify warnings (-Werror is in effect sometimes)
+qemu-xen/configure: support usbredir 0.5+
+tools/qemu-xen/block/iscsi.c: update for libiscsi 1.6.0(?)
+--- xen-4.2.0/tools/qemu-xen-traditional/configure.orig	2012-09-06 18:05:30.000000000 +0200
++++ xen-4.2.0/tools/qemu-xen-traditional/configure	2012-10-27 08:16:21.702515768 +0200
+@@ -738,10 +738,10 @@
+ #endif
+ }
+ EOF
+ 
+-if $cc $ARCH_CFLAGS -c -o $TMPO $TMPC > /dev/null 2> /dev/null ; then
++if $cc $ARCH_CFLAGS -D_GNU_SOURCE -c -o $TMPO $TMPC > /dev/null 2> /dev/null ; then
+   :
+ else
+    nptl="no"
+ fi
+ 
+@@ -788,7 +790,7 @@
+         fi
+ 
+         # static link with sdl ?
+-        if test "$sdl" = "yes" ; then
++        if test "$static" = "yes" -a "$sdl" = "yes" ; then
+             aa="no"
+             `$sdl_config --static-libs 2>/dev/null | grep \\\-laa > /dev/null` && aa="yes"
+             sdl_static_libs=`$sdl_config --static-libs 2>/dev/null`
+--- xen-4.2.0/tools/qemu-xen/configure.orig	2012-09-10 20:10:52.000000000 +0200
++++ xen-4.2.0/tools/qemu-xen/configure	2012-10-27 13:28:33.178396347 +0200
+@@ -21,14 +21,14 @@
+ rm -f config.log
+ 
+ compile_object() {
+-  echo $cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log
+-  $cc $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log 2>&1
++  echo $cc -O2 $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log
++  $cc -O2 $QEMU_CFLAGS -c -o $TMPO $TMPC >> config.log 2>&1
+ }
+ 
+ compile_prog() {
+   local_cflags="$1"
+   local_ldflags="$2"
+-  echo $cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags >> config.log
+-  $cc $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags >> config.log 2>&1
++  echo $cc -O2 $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags >> config.log
++  $cc -O2 $QEMU_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags >> config.log 2>&1
+ }
+ 
+@@ -2543,6 +2543,12 @@
+         usb_redir_libs=$($pkg_config --libs libusbredirparser 2>/dev/null)
+         QEMU_CFLAGS="$QEMU_CFLAGS $usb_redir_cflags"
+         LIBS="$LIBS $usb_redir_libs"
++    elif $pkg_config libusbredirparser-0.5 >/dev/null 2>&1 ; then
++        usb_redir="yes"
++        usb_redir_cflags=$($pkg_config --cflags libusbredirparser-0.5 2>/dev/null)
++        usb_redir_libs=$($pkg_config --libs libusbredirparser-0.5 2>/dev/null)
++        QEMU_CFLAGS="$QEMU_CFLAGS $usb_redir_cflags"
++        LIBS="$LIBS $usb_redir_libs"
+     else
+         if test "$usb_redir" = "yes"; then
+             feature_not_found "usb-redir"
+--- xen-4.2.0/tools/qemu-xen/block/iscsi.c.orig	2012-09-10 20:10:52.000000000 +0200
++++ xen-4.2.0/tools/qemu-xen/block/iscsi.c	2012-10-27 21:27:02.120524882 +0200
+@@ -224,9 +224,9 @@
+     size = nb_sectors * BDRV_SECTOR_SIZE;
+     acb->buf = g_malloc(size);
+     qemu_iovec_to_buffer(acb->qiov, acb->buf);
+-    acb->task = iscsi_write10_task(iscsi, iscsilun->lun, acb->buf, size,
+-                              sector_qemu2lun(sector_num, iscsilun),
+-                              fua, 0, iscsilun->block_size,
++    acb->task = iscsi_write10_task(iscsi, iscsilun->lun, sector_qemu2lun(sector_num, iscsilun),
++		              acb->buf, size, iscsilun->block_size,
++			      0, 0, fua, 0, 0,
+                               iscsi_aio_write10_cb, acb);
+     if (acb->task == NULL) {
+         error_report("iSCSI: Failed to send write10 command. %s",
+@@ -309,6 +309,7 @@
+     acb->task = iscsi_read10_task(iscsi, iscsilun->lun,
+                              sector_qemu2lun(sector_num, iscsilun),
+                              lun_read_size, iscsilun->block_size,
++			     0, 0, 0, 0, 0,
+                              iscsi_aio_read10_cb, acb);
+     if (acb->task == NULL) {
+         error_report("iSCSI: Failed to send read10 command. %s",
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xen.git/commitdiff/7d9b583747bd3e68c316ab17694156f2591d4b85



More information about the pld-cvs-commit mailing list