[libvirt] [PATCH] locking: don't create qemu-sanlock.conf file when QEMU isn't enabled

Daniel P. Berrangé posted 1 patch 5 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180718182046.20364-1-berrange@redhat.com
Test syntax-check passed
src/locking/Makefile.inc.am | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
[libvirt] [PATCH] locking: don't create qemu-sanlock.conf file when QEMU isn't enabled
Posted by Daniel P. Berrangé 5 years, 8 months ago
The test targets result in the qemu-sanlock.conf file being created
when sanlock is enabled, even if QEMU is not enabled. As a result it
never gets cleaned up when distclean is run, breaking distcheck.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 src/locking/Makefile.inc.am | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Pushed as a build fix for when jansson isn't available (which turns
off QEMU)

diff --git a/src/locking/Makefile.inc.am b/src/locking/Makefile.inc.am
index 649c769e00..f2eb2efb7b 100644
--- a/src/locking/Makefile.inc.am
+++ b/src/locking/Makefile.inc.am
@@ -156,10 +156,10 @@ sanlock_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
 sanlock_la_LIBADD = -lsanlock_client libvirt.la ../gnulib/lib/libgnu.la
 
 augeas_DATA += locking/libvirt_sanlock.aug
-augeastest_DATA += test_libvirt_sanlock.aug
-CLEANFILES += test_libvirt_sanlock.aug
 
 if WITH_QEMU
+augeastest_DATA += test_libvirt_sanlock.aug
+CLEANFILES += test_libvirt_sanlock.aug
 nodist_conf_DATA += locking/qemu-sanlock.conf
 BUILT_SOURCES += locking/qemu-sanlock.conf
 DISTCLEANFILES += locking/qemu-sanlock.conf
@@ -213,6 +213,7 @@ if WITH_SANLOCK
 endif WITH_SANLOCK
 
 if WITH_SANLOCK
+if WITH_QEMU
 test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in \
 		locking/qemu-sanlock.conf $(AUG_GENTEST)
 	$(AM_V_GEN)$(AUG_GENTEST) locking/qemu-sanlock.conf $< $@
@@ -221,6 +222,9 @@ check-augeas-sanlock: test_libvirt_sanlock.aug
 	$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
 	    '$(AUGPARSE)' -I $(srcdir)/locking test_libvirt_sanlock.aug; \
 	fi
+else ! WITH_QEMU
+check-augeas-sanlock:
+endif ! WITH_QEMU
 else ! WITH_SANLOCK
 check-augeas-sanlock:
 endif ! WITH_SANLOCK
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list