From 93658b550c6aea8f1c982cca90b7eee54b13454f Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Wed, 28 Aug 2019 14:54:00 +0000 Subject: [PATCH] qemu: use upstream patch to fix OBS Apply the upstream patch that fixes OBS fixes #690 Signed-off-by: Julio Montes --- ...utines-of-9p-to-increase-the-I-O-per.patch | 4 +- ...ile-nvdimm-support-read-only-files-a.patch | 4 +- ...onfigure-get-right-version-of-python.patch | 29 -------- ...ore-resilient-Python-version-capture.patch | 71 +++++++++++++++++++ 4 files changed, 75 insertions(+), 33 deletions(-) delete mode 100644 qemu/patches/4.1.x/0003-configure-get-right-version-of-python.patch create mode 100644 qemu/patches/4.1.x/0003-configure-more-resilient-Python-version-capture.patch diff --git a/qemu/patches/4.1.x/0001-9p-removing-coroutines-of-9p-to-increase-the-I-O-per.patch b/qemu/patches/4.1.x/0001-9p-removing-coroutines-of-9p-to-increase-the-I-O-per.patch index c62b35893e..43464e17c1 100644 --- a/qemu/patches/4.1.x/0001-9p-removing-coroutines-of-9p-to-increase-the-I-O-per.patch +++ b/qemu/patches/4.1.x/0001-9p-removing-coroutines-of-9p-to-increase-the-I-O-per.patch @@ -1,7 +1,7 @@ -From 942227c56f03163d222884d7f4054dea758eb94b Mon Sep 17 00:00:00 2001 +From 493163ca322c87860492328c7898064051321c67 Mon Sep 17 00:00:00 2001 From: Yang Zhong Date: Wed, 28 Mar 2018 20:14:53 +0800 -Subject: [PATCH 1/2] 9p: removing coroutines of 9p to increase the I/O +Subject: [PATCH 1/3] 9p: removing coroutines of 9p to increase the I/O performance This is a quick workaround, need to be fixed. diff --git a/qemu/patches/4.1.x/0002-memory-backend-file-nvdimm-support-read-only-files-a.patch b/qemu/patches/4.1.x/0002-memory-backend-file-nvdimm-support-read-only-files-a.patch index d8b705cfb9..c920155735 100644 --- a/qemu/patches/4.1.x/0002-memory-backend-file-nvdimm-support-read-only-files-a.patch +++ b/qemu/patches/4.1.x/0002-memory-backend-file-nvdimm-support-read-only-files-a.patch @@ -1,7 +1,7 @@ -From 8fa3c7a1b430dfde30baa64d237cce6f41244f65 Mon Sep 17 00:00:00 2001 +From f116c58ab18762b1fdf5b5908af8612bf933d159 Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Mon, 8 Jul 2019 21:19:36 +0000 -Subject: [PATCH 2/2] memory-backend-file/nvdimm: support read-only files as +Subject: [PATCH 2/3] memory-backend-file/nvdimm: support read-only files as memory-backends Currently is not possible to use a file that is part of a read-only diff --git a/qemu/patches/4.1.x/0003-configure-get-right-version-of-python.patch b/qemu/patches/4.1.x/0003-configure-get-right-version-of-python.patch deleted file mode 100644 index 9497f8614f..0000000000 --- a/qemu/patches/4.1.x/0003-configure-get-right-version-of-python.patch +++ /dev/null @@ -1,29 +0,0 @@ -From cf8c67cfaac7cdef766032cf012c7c586c4826d2 Mon Sep 17 00:00:00 2001 -From: Julio Montes -Date: Fri, 23 Aug 2019 14:04:03 +0000 -Subject: [PATCH] configure: get right version of python - -In some systems the version of python is printed out together with the -version of GCC, omit GCC version to get the right version of python. - -Signed-off-by: Julio Montes ---- - configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure b/configure -index 714e7fb6a1..f22262dc60 100755 ---- a/configure -+++ b/configure -@@ -1864,7 +1864,7 @@ if ! $python -c 'import sys; sys.exit(sys.version_info < (2,7))'; then - fi - - # Preserve python version since some functionality is dependent on it --python_version=$($python -V 2>&1 | sed -e 's/Python\ //') -+python_version=$($python -V 2>&1 | head -1 | cut -d' ' -f2) - - # Suppress writing compiled files - python="$python -B" --- -2.17.2 - diff --git a/qemu/patches/4.1.x/0003-configure-more-resilient-Python-version-capture.patch b/qemu/patches/4.1.x/0003-configure-more-resilient-Python-version-capture.patch new file mode 100644 index 0000000000..bf4736315f --- /dev/null +++ b/qemu/patches/4.1.x/0003-configure-more-resilient-Python-version-capture.patch @@ -0,0 +1,71 @@ +From 19ec1516315083bb609a6683271dc19adb464522 Mon Sep 17 00:00:00 2001 +From: Cleber Rosa +Date: Mon, 26 Aug 2019 11:58:32 -0400 +Subject: [PATCH 3/3] configure: more resilient Python version capture + +The current approach to capture the Python version is fragile, as it +was demonstrated by a very specific build of Python 3 on Fedora 29 +that, under non-interactive shells would print multiline version +information. + +The (badly) stripped version output would be sent to config-host.mak, +producing bad syntax and rendering the makefiles unusable. Now, the +Python versions is printed by configure, but only a simple (and better +controlled variable) indicating whether the build system is using +Python 2 is kept on config-host.mak. + +Signed-off-by: Cleber Rosa + +Message-Id: <20190826155832.17427-1-crosa@redhat.com> +Reviewed-by: Tony Nguyen +--- + configure | 5 +++-- + tests/Makefile.include | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/configure b/configure +index 714e7fb6a1..0a6a617fa3 100755 +--- a/configure ++++ b/configure +@@ -1864,7 +1864,7 @@ if ! $python -c 'import sys; sys.exit(sys.version_info < (2,7))'; then + fi + + # Preserve python version since some functionality is dependent on it +-python_version=$($python -V 2>&1 | sed -e 's/Python\ //') ++python_version=$($python -c 'import sys; print("%d.%d.%d" % (sys.version_info[0], sys.version_info[1], sys.version_info[2]))' 2>/dev/null) + + # Suppress writing compiled files + python="$python -B" +@@ -6514,6 +6514,7 @@ if ! $python -c 'import sys; sys.exit(sys.version_info < (3,0))'; then + echo + echo "warning: Python 2 support is deprecated" >&2 + echo "warning: Python 3 will be required for building future versions of QEMU" >&2 ++ python2="y" + fi + + config_host_mak="config-host.mak" +@@ -7333,7 +7334,7 @@ echo "INSTALL_DATA=$install -c -m 0644" >> $config_host_mak + echo "INSTALL_PROG=$install -c -m 0755" >> $config_host_mak + echo "INSTALL_LIB=$install -c -m 0644" >> $config_host_mak + echo "PYTHON=$python" >> $config_host_mak +-echo "PYTHON_VERSION=$python_version" >> $config_host_mak ++echo "PYTHON2=$python2" >> $config_host_mak + echo "CC=$cc" >> $config_host_mak + if $iasl -h > /dev/null 2>&1; then + echo "IASL=$iasl" >> $config_host_mak +diff --git a/tests/Makefile.include b/tests/Makefile.include +index fd7fdb8658..fc67846431 100644 +--- a/tests/Makefile.include ++++ b/tests/Makefile.include +@@ -1132,7 +1132,7 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results + AVOCADO_SHOW=app + AVOCADO_TAGS=$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGET_DIRS))) + +-ifneq ($(findstring v2,"v$(PYTHON_VERSION)"),v2) ++ifneq ($(PYTHON2),y) + $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) + $(call quiet-command, \ + $(PYTHON) -m venv --system-site-packages $@, \ +-- +2.17.2 +