This allows users to install qemu-sanity-check with ordinary
dependencies, but the special qemu and kernel packages to
BuildRequires: qemu-sanity-check-nodeps so that they don't get a
circular dependency on qemu/kernel.
dnl Only used temporarily while the spec file is contained in the
dnl tarball. We will remove this later.
dnl Only used temporarily while the spec file is contained in the
dnl tarball. We will remove this later.
-AC_SUBST([RPM_RELEASE],[1])
+AC_SUBST([RPM_RELEASE],[2])
dnl Check for basic C environment.
AC_PROG_CC_STDC
dnl Check for basic C environment.
AC_PROG_CC_STDC
+# 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.
%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.
+
+%doc COPYING
+
+
+%files nodeps
%doc COPYING README
%{_bindir}/qemu-sanity-check
%{_libdir}/qemu-sanity-check
%doc COPYING README
%{_bindir}/qemu-sanity-check
%{_libdir}/qemu-sanity-check