From f928ccd2ca556febb514084076ca2fd518cab6ef Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 28 Aug 2013 16:30:17 +0100 Subject: [PATCH] New upstream version 1.1.4. - Remove 3 x patches which are now upstream. - This version can handle debug kernels (RHBZ#1002189). --- ...-reboot-2-to-reboot-the-system-from-.patch | 62 ------------------- ...e-accel-kvm-tcg-option-on-qemu-comma.patch | 28 --------- 0003-qemu-Use-oops-panic-panic-1.patch | 29 --------- qemu-sanity-check.spec | 17 +++-- 4 files changed, 8 insertions(+), 128 deletions(-) delete mode 100644 0001-init-Try-to-call-reboot-2-to-reboot-the-system-from-.patch delete mode 100644 0002-qemu-Pass-machine-accel-kvm-tcg-option-on-qemu-comma.patch delete mode 100644 0003-qemu-Use-oops-panic-panic-1.patch diff --git a/0001-init-Try-to-call-reboot-2-to-reboot-the-system-from-.patch b/0001-init-Try-to-call-reboot-2-to-reboot-the-system-from-.patch deleted file mode 100644 index 8ff1824..0000000 --- a/0001-init-Try-to-call-reboot-2-to-reboot-the-system-from-.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 1a2ef4ef4740caeb0357c433004256ce33444a69 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 22 Aug 2013 15:40:57 +0100 -Subject: [PATCH 1/4] init: Try to call reboot(2) to reboot the system from the - initramfs. - -For some reason, panic=1 is broken on kernel 3.11. Calling reboot is -more reliable. - -Note that qemu won't actually reboot the VM, because we are passing --no-reboot on the command line, so the VM should exit instead. ---- - configure.ac | 2 ++ - init.c | 12 ++++++++++++ - 2 files changed, 14 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 791360f..1b3c22b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -28,6 +28,8 @@ test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant]) - - AM_PROG_CC_C_O - -+AC_CHECK_HEADERS([sys/reboot.h]) -+ - dnl Allow the package to override the default list of qemu binary - dnl names which are tried, since this heavily depends on how qemu - dnl has been packaged in the downstream distro. -diff --git a/init.c b/init.c -index f19772b..ef7011c 100644 ---- a/init.c -+++ b/init.c -@@ -22,6 +22,10 @@ - #include - #include - -+#ifdef HAVE_SYS_REBOOT_H -+#include -+#endif -+ - int - main (int argc, char *argv[]) - { -@@ -29,6 +33,14 @@ main (int argc, char *argv[]) - fprintf (stderr, "***** initrd started up OK *****\n"); - fprintf (stderr, "\n"); - fprintf (stderr, "\n"); -+ -+#if defined(HAVE_SYS_REBOOT_H) && defined(RB_AUTOBOOT) -+ /* Try to reboot the system. */ -+ reboot (RB_AUTOBOOT); -+ perror ("reboot"); -+ /* Reboot attempt failed, fallthrough below. */ -+#endif -+ - fprintf (stderr, "expect to see a kernel panic below, that is normal\n"); - fprintf (stderr, "\n"); - fprintf (stderr, "\n"); --- -1.8.3.1 - diff --git a/0002-qemu-Pass-machine-accel-kvm-tcg-option-on-qemu-comma.patch b/0002-qemu-Pass-machine-accel-kvm-tcg-option-on-qemu-comma.patch deleted file mode 100644 index 893a3ac..0000000 --- a/0002-qemu-Pass-machine-accel-kvm-tcg-option-on-qemu-comma.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 280f8df59eba30ac4c0907efbdc86891139aab57 Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 22 Aug 2013 15:41:54 +0100 -Subject: [PATCH 2/4] qemu: Pass -machine accel=kvm:tcg option on qemu command - line. - -This makes qemu try to use KVM, and fall back cleanly to TCG if -hardware accelerated virt is not available. ---- - qemu-sanity-check.in | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/qemu-sanity-check.in b/qemu-sanity-check.in -index 4a13b07..24ce8ef 100644 ---- a/qemu-sanity-check.in -+++ b/qemu-sanity-check.in -@@ -136,6 +136,8 @@ argv[$((i++))]="$qemu" - argv[$((i++))]="-nographic" - argv[$((i++))]="-nodefconfig" - argv[$((i++))]="-nodefaults" -+argv[$((i++))]="-machine" -+argv[$((i++))]="accel=kvm:tcg" - argv[$((i++))]="-no-reboot" - argv[$((i++))]="-serial" - argv[$((i++))]="file:$test_output" --- -1.8.3.1 - diff --git a/0003-qemu-Use-oops-panic-panic-1.patch b/0003-qemu-Use-oops-panic-panic-1.patch deleted file mode 100644 index d173781..0000000 --- a/0003-qemu-Use-oops-panic-panic-1.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 32c2ebeebf59ea0d4c57f9054b181197a573620e Mon Sep 17 00:00:00 2001 -From: "Richard W.M. Jones" -Date: Thu, 22 Aug 2013 15:58:16 +0100 -Subject: [PATCH 3/4] qemu: Use oops=panic panic=-1 - -panic=-1 causes the kernel to reboot immediately without -waiting. - -oops=panic turns kernel OOPS into a panic. ---- - qemu-sanity-check.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/qemu-sanity-check.in b/qemu-sanity-check.in -index 24ce8ef..712fd8b 100644 ---- a/qemu-sanity-check.in -+++ b/qemu-sanity-check.in -@@ -146,7 +146,7 @@ argv[$((i++))]="$kernel" - argv[$((i++))]="-initrd" - argv[$((i++))]="$initrd" - argv[$((i++))]="-append" --argv[$((i++))]="console=ttyS0 panic=1" -+argv[$((i++))]="console=ttyS0 oops=panic panic=-1" - - #echo "${argv[@]}" - --- -1.8.3.1 - diff --git a/qemu-sanity-check.spec b/qemu-sanity-check.spec index db56ed8..dfb4fcc 100644 --- a/qemu-sanity-check.spec +++ b/qemu-sanity-check.spec @@ -1,25 +1,19 @@ %global debug_package %{nil} Name: qemu-sanity-check -Version: 1.1.3 -Release: 4%{?dist} +Version: 1.1.4 +Release: 1%{?dist} Summary: Simple qemu and Linux kernel sanity checker License: GPLv2+ URL: http://people.redhat.com/~rjones/qemu-sanity-check Source0: http://people.redhat.com/~rjones/qemu-sanity-check/files/%{name}-%{version}.tar.gz -# Upstream patches to fix sanity check on broken kernels which don't -# respond to panic=1 option properly. -Patch1: 0001-init-Try-to-call-reboot-2-to-reboot-the-system-from-.patch -Patch2: 0002-qemu-Pass-machine-accel-kvm-tcg-option-on-qemu-comma.patch -Patch3: 0003-qemu-Use-oops-panic-panic-1.patch - # Non-upstream patch to disable test which fails on broken kernels # which don't respond to panic=1 option properly. Patch4: 0004-Disable-bad-userspace-test-Fedora-only.patch -# Because the above patches touch configure.ac and Makefile.am: +# Because the above patch touches configure.ac/Makefile.am: BuildRequires: autoconf, automake # For building manual pages. @@ -117,6 +111,11 @@ make DESTDIR=$RPM_BUILD_ROOT install %changelog +* Wed Aug 28 2013 Richard W.M. Jones - 1.1.4-1 +- New upstream version 1.1.4. +- Remove 3 x patches which are now upstream. +- This version can handle debug kernels (RHBZ#1002189). + * Thu Aug 22 2013 Richard W.M. Jones - 1.1.3-4 - +BR autoconf, automake. - Run autoreconf after patching.