[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 1/n] spec: fix rpm build when lxc disabled

'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>

I'm working on a couple more that I spotted while in the area:
we still unconditionally build vbox even though we recently
moved it into libvirtd for licensing reasons, which means a
client_only build will probably fall over on that; but while
testing my hypothesis, I discoverd that a client_only build
fails even earlier with:

TEST: fdstreamtest
 1) Stream read blocking                                              ... OK
 2) Stream read non-blocking                                          ... Unexpected EOF block 0 want 128
 3) Stream write blocking                                             ... OK
 4) Stream write non-blocking                                         ... Failed to finish stream: internal error: libvirt:  error : cannot execute binary /home/eblake/rpmbuild/BUILD/libvirt-1.1.1/tests/../src/libvirt_iohelper: No such file or directory

 libvirt.spec.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index e94901a..affd2ec 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -2014,17 +2014,23 @@ fi

 %config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf
+%if %{with_lxc}
 %config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf
+%if %{with_lxc}
+%if %{with_lxc}
 %attr(4755, root, root) %{_bindir}/virt-login-shell

 %if %{with_dtrace}

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]