From b81e44d6ac28efa8146fe5959d442b0f877ad0e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 19 Jul 2019 18:31:20 +0100 Subject: [PATCH] nwfilter: move standard XML configs out of examples dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The nwfilter XML configs are not merely examples, they are data that is actively shipped and used in production by users. Reviewed-by: Erik Skultety Signed-off-by: Daniel P. Berrangé --- examples/Makefile.am | 10 ---------- src/nwfilter/Makefile.inc.am | 8 ++++++++ .../xml/nwfilter => src/nwfilter/xml}/allow-arp.xml | 0 .../nwfilter/xml}/allow-dhcp-server.xml | 0 .../xml/nwfilter => src/nwfilter/xml}/allow-dhcp.xml | 0 .../nwfilter/xml}/allow-incoming-ipv4.xml | 0 .../xml/nwfilter => src/nwfilter/xml}/allow-ipv4.xml | 0 .../nwfilter/xml}/clean-traffic-gateway.xml | 0 .../nwfilter => src/nwfilter/xml}/clean-traffic.xml | 0 .../nwfilter/xml}/no-arp-ip-spoofing.xml | 0 .../nwfilter/xml}/no-arp-mac-spoofing.xml | 0 .../nwfilter => src/nwfilter/xml}/no-arp-spoofing.xml | 0 .../nwfilter => src/nwfilter/xml}/no-ip-multicast.xml | 0 .../nwfilter => src/nwfilter/xml}/no-ip-spoofing.xml | 0 .../nwfilter => src/nwfilter/xml}/no-mac-broadcast.xml | 0 .../nwfilter => src/nwfilter/xml}/no-mac-spoofing.xml | 0 .../nwfilter/xml}/no-other-l2-traffic.xml | 0 .../nwfilter/xml}/no-other-rarp-traffic.xml | 0 .../nwfilter/xml}/qemu-announce-self-rarp.xml | 0 .../nwfilter/xml}/qemu-announce-self.xml | 0 tests/virschematest.c | 2 +- 21 files changed, 9 insertions(+), 11 deletions(-) rename {examples/xml/nwfilter => src/nwfilter/xml}/allow-arp.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/allow-dhcp-server.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/allow-dhcp.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/allow-incoming-ipv4.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/allow-ipv4.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/clean-traffic-gateway.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/clean-traffic.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/no-arp-ip-spoofing.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/no-arp-mac-spoofing.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/no-arp-spoofing.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/no-ip-multicast.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/no-ip-spoofing.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/no-mac-broadcast.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/no-mac-spoofing.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/no-other-l2-traffic.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/no-other-rarp-traffic.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/qemu-announce-self-rarp.xml (100%) rename {examples/xml/nwfilter => src/nwfilter/xml}/qemu-announce-self.xml (100%) diff --git a/examples/Makefile.am b/examples/Makefile.am index 0adb4b42e2..ad635bdcc0 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -16,8 +16,6 @@ ## License along with this library. If not, see ## . -FILTERS = $(wildcard $(srcdir)/xml/nwfilter/*.xml) - ADMIN_EXAMPLES = \ $(wildcard $(srcdir)/c/admin/*.c) \ $(NULL) @@ -56,7 +54,6 @@ EXTRA_DIST = \ $(STORAGE_XML_EXAMPLES) \ $(SYSTEMTAP_EXAMPLES) \ $(TEST_XML_EXAMPLES) \ - $(FILTERS) \ $(NULL) AM_CPPFLAGS = \ @@ -111,13 +108,6 @@ c_misc_event_test_SOURCES = c/misc/event-test.c c_misc_hellolibvirt_SOURCES = c/misc/hellolibvirt.c c_misc_openauth_SOURCES = c/misc/openauth.c -if WITH_NWFILTER - -nwfilterdir = $(sysconfdir)/libvirt/nwfilter -nwfilter_DATA = $(FILTERS) - -endif WITH_NWFILTER - examplesdir = $(docdir)/examples adminexamplesdir = $(examplesdir)/c/admin diff --git a/src/nwfilter/Makefile.inc.am b/src/nwfilter/Makefile.inc.am index 277f75a9bd..7693634e29 100644 --- a/src/nwfilter/Makefile.inc.am +++ b/src/nwfilter/Makefile.inc.am @@ -1,5 +1,9 @@ # vim: filetype=automake +NWFILTER_XML_FILES = $(wildcard $(srcdir)/nwfilter/xml/*.xml) + +EXTRA_DIST += $(NWFILTER_XML_FILES) + NWFILTER_DRIVER_SOURCES = \ nwfilter/nwfilter_driver.h \ nwfilter/nwfilter_driver.c \ @@ -19,6 +23,10 @@ STATEFUL_DRIVER_SOURCE_FILES += $(NWFILTER_DRIVER_SOURCES) EXTRA_DIST += $(NWFILTER_DRIVER_SOURCES) if WITH_NWFILTER + +nwfilterxmldir = $(sysconfdir)/libvirt/nwfilter +nwfilterxml_DATA = $(NWFILTER_XML_FILES) + noinst_LTLIBRARIES += libvirt_driver_nwfilter_impl.la libvirt_driver_nwfilter_la_SOURCES = libvirt_driver_nwfilter_la_LIBADD = libvirt_driver_nwfilter_impl.la diff --git a/examples/xml/nwfilter/allow-arp.xml b/src/nwfilter/xml/allow-arp.xml similarity index 100% rename from examples/xml/nwfilter/allow-arp.xml rename to src/nwfilter/xml/allow-arp.xml diff --git a/examples/xml/nwfilter/allow-dhcp-server.xml b/src/nwfilter/xml/allow-dhcp-server.xml similarity index 100% rename from examples/xml/nwfilter/allow-dhcp-server.xml rename to src/nwfilter/xml/allow-dhcp-server.xml diff --git a/examples/xml/nwfilter/allow-dhcp.xml b/src/nwfilter/xml/allow-dhcp.xml similarity index 100% rename from examples/xml/nwfilter/allow-dhcp.xml rename to src/nwfilter/xml/allow-dhcp.xml diff --git a/examples/xml/nwfilter/allow-incoming-ipv4.xml b/src/nwfilter/xml/allow-incoming-ipv4.xml similarity index 100% rename from examples/xml/nwfilter/allow-incoming-ipv4.xml rename to src/nwfilter/xml/allow-incoming-ipv4.xml diff --git a/examples/xml/nwfilter/allow-ipv4.xml b/src/nwfilter/xml/allow-ipv4.xml similarity index 100% rename from examples/xml/nwfilter/allow-ipv4.xml rename to src/nwfilter/xml/allow-ipv4.xml diff --git a/examples/xml/nwfilter/clean-traffic-gateway.xml b/src/nwfilter/xml/clean-traffic-gateway.xml similarity index 100% rename from examples/xml/nwfilter/clean-traffic-gateway.xml rename to src/nwfilter/xml/clean-traffic-gateway.xml diff --git a/examples/xml/nwfilter/clean-traffic.xml b/src/nwfilter/xml/clean-traffic.xml similarity index 100% rename from examples/xml/nwfilter/clean-traffic.xml rename to src/nwfilter/xml/clean-traffic.xml diff --git a/examples/xml/nwfilter/no-arp-ip-spoofing.xml b/src/nwfilter/xml/no-arp-ip-spoofing.xml similarity index 100% rename from examples/xml/nwfilter/no-arp-ip-spoofing.xml rename to src/nwfilter/xml/no-arp-ip-spoofing.xml diff --git a/examples/xml/nwfilter/no-arp-mac-spoofing.xml b/src/nwfilter/xml/no-arp-mac-spoofing.xml similarity index 100% rename from examples/xml/nwfilter/no-arp-mac-spoofing.xml rename to src/nwfilter/xml/no-arp-mac-spoofing.xml diff --git a/examples/xml/nwfilter/no-arp-spoofing.xml b/src/nwfilter/xml/no-arp-spoofing.xml similarity index 100% rename from examples/xml/nwfilter/no-arp-spoofing.xml rename to src/nwfilter/xml/no-arp-spoofing.xml diff --git a/examples/xml/nwfilter/no-ip-multicast.xml b/src/nwfilter/xml/no-ip-multicast.xml similarity index 100% rename from examples/xml/nwfilter/no-ip-multicast.xml rename to src/nwfilter/xml/no-ip-multicast.xml diff --git a/examples/xml/nwfilter/no-ip-spoofing.xml b/src/nwfilter/xml/no-ip-spoofing.xml similarity index 100% rename from examples/xml/nwfilter/no-ip-spoofing.xml rename to src/nwfilter/xml/no-ip-spoofing.xml diff --git a/examples/xml/nwfilter/no-mac-broadcast.xml b/src/nwfilter/xml/no-mac-broadcast.xml similarity index 100% rename from examples/xml/nwfilter/no-mac-broadcast.xml rename to src/nwfilter/xml/no-mac-broadcast.xml diff --git a/examples/xml/nwfilter/no-mac-spoofing.xml b/src/nwfilter/xml/no-mac-spoofing.xml similarity index 100% rename from examples/xml/nwfilter/no-mac-spoofing.xml rename to src/nwfilter/xml/no-mac-spoofing.xml diff --git a/examples/xml/nwfilter/no-other-l2-traffic.xml b/src/nwfilter/xml/no-other-l2-traffic.xml similarity index 100% rename from examples/xml/nwfilter/no-other-l2-traffic.xml rename to src/nwfilter/xml/no-other-l2-traffic.xml diff --git a/examples/xml/nwfilter/no-other-rarp-traffic.xml b/src/nwfilter/xml/no-other-rarp-traffic.xml similarity index 100% rename from examples/xml/nwfilter/no-other-rarp-traffic.xml rename to src/nwfilter/xml/no-other-rarp-traffic.xml diff --git a/examples/xml/nwfilter/qemu-announce-self-rarp.xml b/src/nwfilter/xml/qemu-announce-self-rarp.xml similarity index 100% rename from examples/xml/nwfilter/qemu-announce-self-rarp.xml rename to src/nwfilter/xml/qemu-announce-self-rarp.xml diff --git a/examples/xml/nwfilter/qemu-announce-self.xml b/src/nwfilter/xml/qemu-announce-self.xml similarity index 100% rename from examples/xml/nwfilter/qemu-announce-self.xml rename to src/nwfilter/xml/qemu-announce-self.xml diff --git a/tests/virschematest.c b/tests/virschematest.c index d5a56d3f96..dabbc02163 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -231,7 +231,7 @@ mymain(void) "networkxml2xmlout", "networkxml2confdata"); DO_TEST_DIR("networkport.rng", "virnetworkportxml2xmldata"); DO_TEST_DIR("nodedev.rng", "nodedevschemadata"); - DO_TEST_DIR("nwfilter.rng", "nwfilterxml2xmlout", "../examples/xml/nwfilter"); + DO_TEST_DIR("nwfilter.rng", "nwfilterxml2xmlout", "../src/nwfilter"); DO_TEST_DIR("nwfilterbinding.rng", "virnwfilterbindingxml2xmldata"); DO_TEST_DIR("secret.rng", "secretxml2xmlin"); DO_TEST_DIR("storagepoolcaps.rng", "storagepoolcapsschemadata");