spec: Introduce a -nodeps subpackage.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 20 Aug 2013 20:32:29 +0000 (21:32 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 20 Aug 2013 20:32:29 +0000 (21:32 +0100)
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.

configure.ac
qemu-sanity-check.spec.in

index da29912..f4bd011 100644 (file)
@@ -20,7 +20,7 @@ AM_INIT_AUTOMAKE([foreign])
 
 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
index cc6ca3a..d57e96f 100644 (file)
@@ -34,11 +34,31 @@ Requires:        qemu-system-arm
 
 Requires:        kernel
 
 
 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.
 
 %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
 
 %prep
 %setup -q
@@ -65,6 +85,10 @@ make DESTDIR=$RPM_BUILD_ROOT install
 
 
 %files
 
 
 %files
+%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