]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
spec: fix rpm build when lxc disabled
authorEric Blake <eblake@redhat.com>
Tue, 3 Sep 2013 21:10:01 +0000 (15:10 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 4 Sep 2013 17:30:18 +0000 (11:30 -0600)
'make rpm' failed if ~/.rpmmacros contains '%_without_lxc 1',
which simulates the case of not having lxc available.

RPM build errors:
    File not found: /home/eblake/rpmbuild/BUILDROOT/libvirt-1.1.1-1.fc19.x86_64/etc/libvirt/virt-login-shell.conf
    File not found by glob: /home/eblake/rpmbuild/BUILDROOT/libvirt-1.1.1-1.fc19.x86_64/usr/share/man/man1/virt-login-shell.1*
    File not found: /home/eblake/rpmbuild/BUILDROOT/libvirt-1.1.1-1.fc19.x86_64/usr/bin/virt-login-shell
make: *** [rpm] Error 1

Reported by Dan Berrange.

* libvirt.spec.in: Mark virt-login-shell as conditional on lxc.

Signed-off-by: Eric Blake <eblake@redhat.com>
libvirt.spec.in

index e94901a6f7a3941c29fa0df6859e292e3c39b985..affd2ec113d53abd68d7be35cb0c74ce5bc3bd55 100644 (file)
@@ -2014,17 +2014,23 @@ fi
 %doc AUTHORS ChangeLog.gz NEWS README COPYING COPYING.LESSER TODO
 
 %config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
+%if %{with_lxc}
 %config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf
+%endif
 %{_mandir}/man1/virsh.1*
 %{_mandir}/man1/virt-xml-validate.1*
 %{_mandir}/man1/virt-pki-validate.1*
 %{_mandir}/man1/virt-host-validate.1*
+%if %{with_lxc}
 %{_mandir}/man1/virt-login-shell.1*
+%endif
 %{_bindir}/virsh
 %{_bindir}/virt-xml-validate
 %{_bindir}/virt-pki-validate
 %{_bindir}/virt-host-validate
+%if %{with_lxc}
 %attr(4755, root, root) %{_bindir}/virt-login-shell
+%endif
 %{_libdir}/lib*.so.*
 
 %if %{with_dtrace}