diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 7ebd3caa09..89c94b3306 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -16,7 +16,6 @@ AVAHI_SOURCES = \
DISTCLEANFILES =
EXTRA_DIST = \
- default-network.xml \
remote_generate_stubs.pl rpcgen_fix.pl \
remote_protocol.x \
libvirtd.conf \
@@ -26,10 +25,8 @@ EXTRA_DIST = \
libvirtd.sasl \
libvirtd.sysconf \
libvirtd.aug \
- libvirtd_qemu.aug \
libvirtd.logrotate.in \
test_libvirtd.aug \
- test_libvirtd_qemu.aug \
$(AVAHI_SOURCES) \
$(DAEMON_SOURCES)
@@ -69,18 +66,16 @@ remote_protocol.c: remote_protocol.h
if WITH_LIBVIRTD
-UUID=$(shell uuidgen 2>/dev/null)
-
sbin_PROGRAMS = libvirtd
confdir = $(sysconfdir)/libvirt/
conf_DATA = libvirtd.conf
augeasdir = $(datadir)/augeas/lenses
-augeas_DATA = libvirtd.aug libvirtd_qemu.aug
+augeas_DATA = libvirtd.aug
augeastestsdir = $(datadir)/augeas/lenses/tests
-augeastests_DATA = test_libvirtd.aug test_libvirtd_qemu.aug
+augeastests_DATA = test_libvirtd.aug
libvirtd_SOURCES = $(DAEMON_SOURCES)
@@ -164,27 +159,14 @@ libvirtd_LDADD += $(AVAHI_LIBS)
endif
-default_xml_dest = libvirt/qemu/networks/default.xml
install-data-local: install-init install-data-sasl install-data-polkit \
install-logrotate
- mkdir -p $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart
- $(INSTALL_DATA) $(srcdir)/default-network.xml \
- $(DESTDIR)$(sysconfdir)/$(default_xml_dest)
- test -z "$(UUID)" || \
- sed -i -e "s,,\n $(UUID)," \
- $(DESTDIR)$(sysconfdir)/$(default_xml_dest)
- test -e $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml || \
- ln -s ../default.xml \
- $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
- mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/qemu
+ mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt
mkdir -p $(DESTDIR)$(localstatedir)/run/libvirt
mkdir -p $(DESTDIR)$(localstatedir)/lib/libvirt
-uninstall-local:: uninstall-init install-data-sasl install-data-polkit
- rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
- rm -f $(DESTDIR)$(sysconfdir)/$(default_xml_dest)
- rmdir $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart || :
- rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
+uninstall-local:: uninstall-init uninstall-data-sasl uninstall-data-polkit
+ rmdir $(DESTDIR)$(localstatedir)/log/libvirt || :
rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || :
@@ -257,8 +239,6 @@ libvirtd.init: libvirtd.init.in
check-local:
test -x '$(AUGPARSE)' \
&& '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug || :
- test -x '$(AUGPARSE)' \
- && '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd_qemu.aug || :
else
diff --git a/src/Makefile.am b/src/Makefile.am
index 31aad5fe5f..f2c0545f35 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,11 +19,11 @@ INCLUDES = \
$(WARN_CFLAGS) \
$(LOCK_CHECKING_CFLAGS)
-confdir = $(sysconfdir)/libvirt/
-conf_DATA = qemu.conf
-
EXTRA_DIST = $(conf_DATA)
+if WITH_NETWORK
+UUID=$(shell uuidgen 2>/dev/null)
+endif
lib_LTLIBRARIES = libvirt.la
@@ -358,7 +358,23 @@ if WITH_DRIVER_MODULES
libvirt_driver_qemu_la_LDFLAGS += -module -avoid-version
endif
libvirt_driver_qemu_la_SOURCES = $(QEMU_DRIVER_SOURCES)
+
+confdir = $(sysconfdir)/libvirt/
+conf_DATA = qemu/qemu.conf
+
+augeasdir = $(datadir)/augeas/lenses
+augeas_DATA = qemu/libvirtd_qemu.aug
+
+augeastestdir = $(datadir)/augeas/lenses/tests
+augeastest_DATA = qemu/test_libvirtd_qemu.aug
+
+check-local:
+ test -x '$(AUGPARSE)' \
+ && '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd_qemu.aug || :
+
endif
+EXTRA_DIST += qemu/qemu.conf qemu/libvirtd_qemu.aug qemu/test_libvirtd_qemu.aug
+
if WITH_LXC
if WITH_DRIVER_MODULES
@@ -438,6 +454,10 @@ libvirt_driver_network_la_LDFLAGS = -module -avoid-version
endif
libvirt_driver_network_la_SOURCES = $(NETWORK_DRIVER_SOURCES)
endif
+EXTRA_DIST += network/default.xml
+
+
+
if WITH_NETCF
libvirt_driver_interface_la_LDFLAGS = $(NETCF_LIBS)
@@ -688,7 +708,7 @@ endif
endif
EXTRA_DIST += $(LXC_CONTROLLER_SOURCES)
-install-exec-local:
+install-data-local:
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/images"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/boot"
@@ -696,6 +716,7 @@ if WITH_QEMU
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/qemu"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt/qemu"
+ $(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/qemu"
endif
if WITH_LXC
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc"
@@ -710,8 +731,46 @@ if WITH_NETWORK
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/iptables/nat"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/network"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/network"
+ $(MKDIR_P) "$(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart"
+ $(INSTALL_DATA) $(srcdir)/network/default.xml \
+ $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
+ test -z "$(UUID)" || \
+ sed -i -e "s,,\n $(UUID)," \
+ $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
+ test -e $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml || \
+ ln -s ../default.xml \
+ $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
endif
+uninstall-local::
+ rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/images" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/boot" ||:
+if WITH_QEMU
+ rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/qemu" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/cache/libvirt/qemu" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/log/libvirt/qemu" ||:
+endif
+if WITH_LXC
+ rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/lxc" ||:
+endif
+if WITH_UML
+ rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/uml" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/uml" ||:
+endif
+if WITH_NETWORK
+ rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
+ rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
+ rmdir "$(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart" || :
+ rmdir "$(DESTDIR)$(sysconfdir)/libvirt/qemu/networks" || :
+ rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/iptables/filter" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/iptables/nat" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/network" ||:
+ rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/network" ||:
+endif
+ rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt" ||:
CLEANFILES = *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s
DISTCLEANFILES = $(BUILT_SOURCES)
diff --git a/daemon/default-network.xml b/src/network/default.xml
similarity index 100%
rename from daemon/default-network.xml
rename to src/network/default.xml
diff --git a/daemon/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
similarity index 100%
rename from daemon/libvirtd_qemu.aug
rename to src/qemu/libvirtd_qemu.aug
diff --git a/src/qemu.conf b/src/qemu/qemu.conf
similarity index 100%
rename from src/qemu.conf
rename to src/qemu/qemu.conf
diff --git a/daemon/test_libvirtd_qemu.aug b/src/qemu/test_libvirtd_qemu.aug
similarity index 100%
rename from daemon/test_libvirtd_qemu.aug
rename to src/qemu/test_libvirtd_qemu.aug
diff --git a/tests/networkschematest b/tests/networkschematest
index 1d7cffc207..ac22bc1557 100755
--- a/tests/networkschematest
+++ b/tests/networkschematest
@@ -3,7 +3,7 @@
test -z "$srcdir" && srcdir=`pwd`
test -z "$abs_srcdir" && abs_srcdir=`pwd`
-DIRS="../qemud"
+DIRS="../src/network"
n=0
f=0