From ba1e443ed0ef05b24d4a1fa94f3e1118a85d5e5f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 22 Aug 2013 14:07:45 +0100 Subject: [PATCH] Add qemu-sanity-check initial release (RHBZ#999108). --- .gitignore | 3 ++ qemu-sanity-check.spec | 100 +++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 104 insertions(+) create mode 100644 qemu-sanity-check.spec diff --git a/.gitignore b/.gitignore index e69de29..c76e4c1 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,3 @@ +*~ + +/qemu-sanity-check-*.tar.gz diff --git a/qemu-sanity-check.spec b/qemu-sanity-check.spec new file mode 100644 index 0000000..a05c619 --- /dev/null +++ b/qemu-sanity-check.spec @@ -0,0 +1,100 @@ +%global debug_package %{nil} + +Name: qemu-sanity-check +Version: 1.1.3 +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 + +# For building manual pages. +BuildRequires: /usr/bin/perldoc + +# For building the initramfs. +BuildRequires: cpio +BuildRequires: glibc-static + +# BuildRequire these in order to let 'make check' run. These are +# not required unless you want to run the tests. Note don't run the +# tests on ARM since qemu isn't likely to work. +%ifarch %{ix86} x86_64 +BuildRequires: qemu-system-x86 +%endif + +BuildRequires: kernel + +%ifarch %{ix86} x86_64 +Requires: qemu-system-x86 +%endif +%ifarch armv7hl +Requires: qemu-system-arm +%endif + +Requires: kernel + +# Require the -nodeps subpackage. +Requires: %{name}-nodeps = %{version}-%{release} + + +%description +Qemu-sanity-check is a short shell script that test-boots a Linux +kernel under qemu, making sure it boots up to userspace. The idea is +to test the Linux kernel and/or qemu to make sure they are working. + +Most users should install the %{name} package. + +If you are testing qemu or the kernel in those packages and you want +to avoid a circular dependency on qemu or kernel, you should use +'BuildRequires: %{name}-nodeps' instead. + + +%package nodeps +Summary: Simple qemu and Linux kernel sanity checker (no dependencies) +License: GPLv2+ + + +%description nodeps +This is the no-depedencies version of %{name}. It is exactly the same +as %{name} except that this package does not depend on qemu or kernel. + + +%prep +%setup -q + + +%build +# NB: canonical_arch is a variable in the final script, so it +# has to be escaped here. +%configure --with-qemu-list="qemu-system-\$canonical_arch" +make %{?_smp_mflags} + + +%check +%ifarch %{ix86} x86_64 +make check || { + cat test-suite.log + exit 1 +} +%endif + + +%install +make DESTDIR=$RPM_BUILD_ROOT install + + +%files +%doc COPYING + + +%files nodeps +%doc COPYING README +%{_bindir}/qemu-sanity-check +%{_libdir}/qemu-sanity-check +%{_mandir}/man1/qemu-sanity-check.1* + + +%changelog +* Thu Aug 22 2013 Richard W.M. Jones - 1.1.3-1 +- Initial release (RHBZ#999108). diff --git a/sources b/sources index e69de29..5aeac4f 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +5c00070f52ed07bd000fa9062c8c1db7 qemu-sanity-check-1.1.3.tar.gz