1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

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
This commit is contained in:
Daniel P. Berrange 2009-09-16 12:31:13 +01:00
parent 7ff256ec98
commit ec171c529a
7 changed files with 69 additions and 30 deletions

View File

@ -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,</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)/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

View File

@ -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,</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
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)

View File

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