qemu: enable guest_agent no matter whether softmmu is enabled
authorYousong Zhou <redacted>
Thu, 6 Feb 2020 19:09:39 +0000 (03:09 +0800)
committerYousong Zhou <redacted>
Thu, 6 Feb 2020 19:12:54 +0000 (03:12 +0800)
Fixes: openwrt/packages#11067
Reported-by: Rosen Penev <redacted>
Signed-off-by: Yousong Zhou <redacted>
utils/qemu/Makefile
utils/qemu/patches/0001-configure-allow-disable-fortify_source.patch
utils/qemu/patches/0002-configure-allow-enabling-disabling-libudev-from-comm.patch
utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch [new file with mode: 0644]
utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch [moved from utils/qemu/patches/0003-disas-fix-compilation-failure-when-isnan-is-a-macro.patch with 94% similarity]
utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch [moved from utils/qemu/patches/0004-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch with 90% similarity]
utils/qemu/patches/0006-slirp-ipreass-fix-use-after-free.patch [moved from utils/qemu/patches/0005-slirp-ipreass-fix-use-after-free.patch with 100% similarity]

index 8dd7e5e827345c1f0169ec99882443f604fe13f9..4fd85fcf38e3f3f1edf594348a261619df298765 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qemu
 PKG_VERSION:=4.2.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_HASH:=d3481d4108ce211a053ef15be69af1bdd9dde1510fda80d92be0f6c3e98768f0
 PKG_SOURCE_URL:=http://download.qemu.org/
index a1fb69c707d99dc39d6294cf8003e9e5eb46831f..d2e9823c4f36670aee147e5c269dcb3ce2f39455 100644 (file)
@@ -1,7 +1,7 @@
-From cbb0971d0d1bc32413095810e24f17eb7169810a Mon Sep 17 00:00:00 2001
+From d4fcdea769a4629c874ebe1801d83e854c94d5e4 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Sat, 24 Feb 2018 13:43:19 +0800
-Subject: [PATCH 1/4] configure: allow disable fortify_source
+Subject: [PATCH 1/5] configure: allow disable fortify_source
 
 Tell build system of qemu to not add _FORTIFY_SOURCE options and let the
 OpenWrt base build system decide flavor of fortify_source to use
@@ -10,12 +10,12 @@ OpenWrt base build system decide flavor of fortify_source to use
  1 file changed, 2 insertions(+)
 
 diff --git a/configure b/configure
-index 1c563a7027..f4d949b35b 100755
+index 6099be1d84..b52d2cb406 100755
 --- a/configure
 +++ b/configure
-@@ -1518,6 +1518,8 @@ for opt do
+@@ -1539,6 +1539,8 @@ for opt do
    ;;
-   --disable-libpmem) libpmem=no
+   --disable-plugins) plugins="no"
    ;;
 +  --disable-fortify-source) fortify_source="no"
 +  ;;
index ea0183fa525447a6b41f0de94fcbbb89388f9518..cdd8b3d01caaa0b8c304e72514116e9b9b8bbe48 100644 (file)
@@ -1,7 +1,7 @@
-From 39b07d1742475f2c60ae2c80f3f2853bb556e0b1 Mon Sep 17 00:00:00 2001
+From 2a6ab8342245c8dc2a09478d8eb0292e2dbcecf2 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Tue, 2 Apr 2019 06:31:31 +0000
-Subject: [PATCH 2/4] configure: allow enabling/disabling libudev from command
+Subject: [PATCH 2/5] configure: allow enabling/disabling libudev from command
  line
 
 ---
@@ -9,12 +9,12 @@ Subject: [PATCH 2/4] configure: allow enabling/disabling libudev from command
  1 file changed, 4 insertions(+)
 
 diff --git a/configure b/configure
-index f4d949b35b..939f54178b 100755
+index b52d2cb406..efe06f3c2b 100755
 --- a/configure
 +++ b/configure
-@@ -1518,6 +1518,10 @@ for opt do
+@@ -1539,6 +1539,10 @@ for opt do
    ;;
-   --disable-libpmem) libpmem=no
+   --disable-plugins) plugins="no"
    ;;
 +  --enable-libudev) libudev=yes
 +  ;;
diff --git a/utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch b/utils/qemu/patches/0003-configure-enable-guest_agent-no-matter-whether-softm.patch
new file mode 100644 (file)
index 0000000..8ac16c6
--- /dev/null
@@ -0,0 +1,27 @@
+From 296215421441b73bc6eb487f1d4e7e15e0510a77 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Fri, 7 Feb 2020 03:02:44 +0800
+Subject: [PATCH 3/5] configure: enable guest_agent no matter whether softmmu
+ is enabled
+
+guest_agent as a tool to be run on guest machines does not depend on
+whether there is a softmmu is to be built at this configure/make run
+
+Fixes a512590 ("configure: qemu-ga is only needed with softmmu targets")
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index efe06f3c2b..552d16ca8f 100755
+--- a/configure
++++ b/configure
+@@ -6246,7 +6246,7 @@ fi
+ # Probe for guest agent support/options
+ if [ "$guest_agent" != "no" ]; then
+-  if [ "$softmmu" = no -a "$want_tools" = no ] ; then
++  if [ "$guest_agent" = "" -a "$want_tools" = no ] ; then
+       guest_agent=no
+   elif [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" -o "$mingw32" = "yes" ] ; then
+       tools="qemu-ga\$(EXESUF) $tools"
similarity index 94%
rename from utils/qemu/patches/0003-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
rename to utils/qemu/patches/0004-disas-fix-compilation-failure-when-isnan-is-a-macro.patch
index a204f183de697ca97efcbf040e5a227130837ca8..8b85b5dde1638cf47ecf567d63054fea048a2f76 100644 (file)
@@ -1,7 +1,7 @@
-From fb90eacb808c3b1719d6a5f2deefe88c82589bfb Mon Sep 17 00:00:00 2001
+From 3ac531a6bdeecbe40741a76f1dc2b7fa6c11f8ef Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Sat, 24 Feb 2018 13:45:25 +0800
-Subject: [PATCH 3/4] disas: fix compilation failure when isnan is a macro
+Subject: [PATCH 4/5] disas: fix compilation failure when isnan is a macro
 
 ---
  disas/libvixl/vixl/utils.h | 16 +++++++++++-----
similarity index 90%
rename from utils/qemu/patches/0004-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
rename to utils/qemu/patches/0005-pc-bios-fix-compilation-when-AS-is-actually-gcc-driv.patch
index 45e4ca51ac89986dbb284e36e493db9c8e247577..02dca03cf96bfadec47523b286aa161b845904fb 100644 (file)
@@ -1,7 +1,7 @@
-From 8cff6a5f07f66103809e6bf4a26c512d70ab2841 Mon Sep 17 00:00:00 2001
+From b6223a90ebbb5729e41b4fcb3bc9ac309ec04784 Mon Sep 17 00:00:00 2001
 From: Yousong Zhou <yszhou4tech@gmail.com>
 Date: Sat, 24 Feb 2018 13:46:31 +0800
-Subject: [PATCH 4/4] pc-bios: fix compilation when $(AS) is actually gcc
+Subject: [PATCH 5/5] pc-bios: fix compilation when $(AS) is actually gcc
  driver
 
 ---
git clone https://git.99rst.org/PROJECT