提交 ec171c52 编写于 作者: D Daniel P. Berrange

Move config files to align with driver sources

* daemon/default-network.xml: Move to src/network/default.xml
* daemon/libvirtd_qemu.aug, daemon/test_libvirtd_qemu.aug: Move
  to src/qemu/
* src/qemu.conf: Move to src/qemu/qemu.conf
* daemon/Makefile.am: Remove rules for default-nmetwork.xml and
  libvirtd_qemu.aug and test_libvirtd_qemu.aug. Fix typo in
  uninstall-local that would install polkit again.
* src/Makefile.am: Add rules for installing network/default.xml
  and the qemu/*.aug files. Add test case for QEMU augeas files.
  Add uninstall-local rule for files/directories created during
  install. Rename install-exec-local to install-data-local.
  Only install qemu.conf if WITH_QEMU is set.
* tests/networkschematest: Update for XML location move
上级 7ff256ec
...@@ -16,7 +16,6 @@ AVAHI_SOURCES = \ ...@@ -16,7 +16,6 @@ AVAHI_SOURCES = \
DISTCLEANFILES = DISTCLEANFILES =
EXTRA_DIST = \ EXTRA_DIST = \
default-network.xml \
remote_generate_stubs.pl rpcgen_fix.pl \ remote_generate_stubs.pl rpcgen_fix.pl \
remote_protocol.x \ remote_protocol.x \
libvirtd.conf \ libvirtd.conf \
...@@ -26,10 +25,8 @@ EXTRA_DIST = \ ...@@ -26,10 +25,8 @@ EXTRA_DIST = \
libvirtd.sasl \ libvirtd.sasl \
libvirtd.sysconf \ libvirtd.sysconf \
libvirtd.aug \ libvirtd.aug \
libvirtd_qemu.aug \
libvirtd.logrotate.in \ libvirtd.logrotate.in \
test_libvirtd.aug \ test_libvirtd.aug \
test_libvirtd_qemu.aug \
$(AVAHI_SOURCES) \ $(AVAHI_SOURCES) \
$(DAEMON_SOURCES) $(DAEMON_SOURCES)
...@@ -69,18 +66,16 @@ remote_protocol.c: remote_protocol.h ...@@ -69,18 +66,16 @@ remote_protocol.c: remote_protocol.h
if WITH_LIBVIRTD if WITH_LIBVIRTD
UUID=$(shell uuidgen 2>/dev/null)
sbin_PROGRAMS = libvirtd sbin_PROGRAMS = libvirtd
confdir = $(sysconfdir)/libvirt/ confdir = $(sysconfdir)/libvirt/
conf_DATA = libvirtd.conf conf_DATA = libvirtd.conf
augeasdir = $(datadir)/augeas/lenses augeasdir = $(datadir)/augeas/lenses
augeas_DATA = libvirtd.aug libvirtd_qemu.aug augeas_DATA = libvirtd.aug
augeastestsdir = $(datadir)/augeas/lenses/tests augeastestsdir = $(datadir)/augeas/lenses/tests
augeastests_DATA = test_libvirtd.aug test_libvirtd_qemu.aug augeastests_DATA = test_libvirtd.aug
libvirtd_SOURCES = $(DAEMON_SOURCES) libvirtd_SOURCES = $(DAEMON_SOURCES)
...@@ -164,27 +159,14 @@ libvirtd_LDADD += $(AVAHI_LIBS) ...@@ -164,27 +159,14 @@ libvirtd_LDADD += $(AVAHI_LIBS)
endif endif
default_xml_dest = libvirt/qemu/networks/default.xml
install-data-local: install-init install-data-sasl install-data-polkit \ install-data-local: install-init install-data-sasl install-data-polkit \
install-logrotate install-logrotate
mkdir -p $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt
$(INSTALL_DATA) $(srcdir)/default-network.xml \
$(DESTDIR)$(sysconfdir)/$(default_xml_dest)
test -z "$(UUID)" || \
sed -i -e "s,</name>,</name>\n <uuid>$(UUID)</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)/run/libvirt mkdir -p $(DESTDIR)$(localstatedir)/run/libvirt
mkdir -p $(DESTDIR)$(localstatedir)/lib/libvirt mkdir -p $(DESTDIR)$(localstatedir)/lib/libvirt
uninstall-local:: uninstall-init install-data-sasl install-data-polkit uninstall-local:: uninstall-init uninstall-data-sasl uninstall-data-polkit
rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml rmdir $(DESTDIR)$(localstatedir)/log/libvirt || :
rm -f $(DESTDIR)$(sysconfdir)/$(default_xml_dest)
rmdir $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart || :
rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
rmdir $(DESTDIR)$(localstatedir)/run/libvirt || : rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || : rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || :
...@@ -257,8 +239,6 @@ libvirtd.init: libvirtd.init.in ...@@ -257,8 +239,6 @@ libvirtd.init: libvirtd.init.in
check-local: check-local:
test -x '$(AUGPARSE)' \ test -x '$(AUGPARSE)' \
&& '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug || : && '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd.aug || :
test -x '$(AUGPARSE)' \
&& '$(AUGPARSE)' -I $(srcdir) $(srcdir)/test_libvirtd_qemu.aug || :
else else
......
...@@ -19,11 +19,11 @@ INCLUDES = \ ...@@ -19,11 +19,11 @@ INCLUDES = \
$(WARN_CFLAGS) \ $(WARN_CFLAGS) \
$(LOCK_CHECKING_CFLAGS) $(LOCK_CHECKING_CFLAGS)
confdir = $(sysconfdir)/libvirt/
conf_DATA = qemu.conf
EXTRA_DIST = $(conf_DATA) EXTRA_DIST = $(conf_DATA)
if WITH_NETWORK
UUID=$(shell uuidgen 2>/dev/null)
endif
lib_LTLIBRARIES = libvirt.la lib_LTLIBRARIES = libvirt.la
...@@ -358,7 +358,23 @@ if WITH_DRIVER_MODULES ...@@ -358,7 +358,23 @@ if WITH_DRIVER_MODULES
libvirt_driver_qemu_la_LDFLAGS += -module -avoid-version libvirt_driver_qemu_la_LDFLAGS += -module -avoid-version
endif endif
libvirt_driver_qemu_la_SOURCES = $(QEMU_DRIVER_SOURCES) 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 endif
EXTRA_DIST += qemu/qemu.conf qemu/libvirtd_qemu.aug qemu/test_libvirtd_qemu.aug
if WITH_LXC if WITH_LXC
if WITH_DRIVER_MODULES if WITH_DRIVER_MODULES
...@@ -438,6 +454,10 @@ libvirt_driver_network_la_LDFLAGS = -module -avoid-version ...@@ -438,6 +454,10 @@ libvirt_driver_network_la_LDFLAGS = -module -avoid-version
endif endif
libvirt_driver_network_la_SOURCES = $(NETWORK_DRIVER_SOURCES) libvirt_driver_network_la_SOURCES = $(NETWORK_DRIVER_SOURCES)
endif endif
EXTRA_DIST += network/default.xml
if WITH_NETCF if WITH_NETCF
libvirt_driver_interface_la_LDFLAGS = $(NETCF_LIBS) libvirt_driver_interface_la_LDFLAGS = $(NETCF_LIBS)
...@@ -688,7 +708,7 @@ endif ...@@ -688,7 +708,7 @@ endif
endif endif
EXTRA_DIST += $(LXC_CONTROLLER_SOURCES) EXTRA_DIST += $(LXC_CONTROLLER_SOURCES)
install-exec-local: install-data-local:
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/images" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/images"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/boot" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/boot"
...@@ -696,6 +716,7 @@ if WITH_QEMU ...@@ -696,6 +716,7 @@ if WITH_QEMU
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/qemu"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/qemu" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/qemu"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt/qemu" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt/qemu"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/log/libvirt/qemu"
endif endif
if WITH_LXC if WITH_LXC
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/lxc"
...@@ -710,8 +731,46 @@ if WITH_NETWORK ...@@ -710,8 +731,46 @@ if WITH_NETWORK
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/iptables/nat" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/iptables/nat"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/network" $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/network"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/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,</name>,</name>\n <uuid>$(UUID)</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 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 CLEANFILES = *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s
DISTCLEANFILES = $(BUILT_SOURCES) DISTCLEANFILES = $(BUILT_SOURCES)
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
test -z "$srcdir" && srcdir=`pwd` test -z "$srcdir" && srcdir=`pwd`
test -z "$abs_srcdir" && abs_srcdir=`pwd` test -z "$abs_srcdir" && abs_srcdir=`pwd`
DIRS="../qemud" DIRS="../src/network"
n=0 n=0
f=0 f=0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册