From nobody Wed May 14 18:21:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519812887737194.59461307015715; Wed, 28 Feb 2018 02:14:47 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 287AD356DA; Wed, 28 Feb 2018 10:14:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EE53F60181; Wed, 28 Feb 2018 10:14:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B615F4A472; Wed, 28 Feb 2018 10:14:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1SAEeow005567 for ; Wed, 28 Feb 2018 05:14:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id 19B392026E0E; Wed, 28 Feb 2018 10:14:40 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5B9832026E04; Wed, 28 Feb 2018 10:14:39 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 28 Feb 2018 10:14:20 +0000 Message-Id: <20180228101435.464-3-berrange@redhat.com> In-Reply-To: <20180228101435.464-1-berrange@redhat.com> References: <20180228101435.464-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/17] make: split network driver build rules into network/Makefile.inc.am X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 28 Feb 2018 10:14:46 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: Daniel P. Berrang=C3=A9 --- src/Makefile.am | 85 +---------------------------------- src/network/Makefile.inc.am | 106 ++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 107 insertions(+), 84 deletions(-) create mode 100644 src/network/Makefile.inc.am diff --git a/src/Makefile.am b/src/Makefile.am index e50f6eecb3..d16cbe2f0c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -99,6 +99,7 @@ include xenapi/Makefile.inc.am include vz/Makefile.inc.am include lxc/Makefile.inc.am include interface/Makefile.inc.am +include network/Makefile.inc.am =20 =20 THREAD_LIBS =3D $(LIB_PTHREAD) $(LTLIBMULTITHREAD) @@ -114,9 +115,6 @@ SECDRIVER_CFLAGS +=3D $(APPARMOR_CFLAGS) SECDRIVER_LIBS +=3D $(APPARMOR_LIBS) endif WITH_SECDRIVER_APPARMOR =20 -if WITH_NETWORK -UUID=3D$(shell uuidgen 2>/dev/null) -endif WITH_NETWORK =20 lib_LTLIBRARIES =3D libvirt.la libvirt-qemu.la libvirt-lxc.la =20 @@ -782,7 +780,6 @@ check-drivername: EXTRA_DIST +=3D check-drivername.pl =20 DRIVER_SOURCE_FILES +=3D \ - $(NETWORK_DRIVER_SOURCES) \ $(NODE_DEVICE_DRIVER_SOURCES) \ $(NODE_DEVICE_DRIVER_HAL_SOURCES) \ $(NODE_DEVICE_DRIVER_UDEV_SOURCES) \ @@ -793,7 +790,6 @@ DRIVER_SOURCE_FILES +=3D \ $(NULL) =20 STATEFUL_DRIVER_SOURCE_FILES +=3D \ - $(NETWORK_DRIVER_SOURCES) \ $(NODE_DEVICE_DRIVER_SOURCES) \ $(NWFILTER_DRIVER_SOURCES) \ $(SECRET_DRIVER_SOURCES) \ @@ -830,12 +826,6 @@ SECURITY_DRIVER_APPARMOR_HELPER_SOURCES =3D \ $(DATATYPES_SOURCES) \ security/virt-aa-helper.c =20 -NETWORK_DRIVER_SOURCES =3D \ - network/bridge_driver.h network/bridge_driver.c \ - network/bridge_driver_platform.h \ - network/bridge_driver_platform.c \ - $(NULL) -EXTRA_DIST +=3D network/bridge_driver_linux.c network/bridge_driver_nop.c =20 SECRET_UTIL_SOURCES =3D \ secret/secret_util.h secret/secret_util.c @@ -894,9 +884,6 @@ STORAGE_HELPER_DISK_SOURCES =3D \ UTIL_IO_HELPER_SOURCES =3D \ util/iohelper.c =20 -NETWORK_LEASES_HELPER_SOURCES =3D \ - network/leaseshelper.c - # Network filters NWFILTER_DRIVER_SOURCES =3D \ nwfilter/nwfilter_driver.h nwfilter/nwfilter_driver.c \ @@ -1167,27 +1154,6 @@ EXTRA_DIST +=3D \ $< $(srcdir)/$(subst $(srcdir)/,,$@) =20 =20 -if WITH_NETWORK -noinst_LTLIBRARIES +=3D libvirt_driver_network_impl.la -libvirt_driver_network_la_SOURCES =3D -libvirt_driver_network_la_LIBADD =3D libvirt_driver_network_impl.la -mod_LTLIBRARIES +=3D libvirt_driver_network.la -libvirt_driver_network_la_LIBADD +=3D libvirt.la ../gnulib/lib/libgnu.la \ - $(LIBNL_LIBS) \ - $(DBUS_LIBS) \ - $(NULL) -libvirt_driver_network_la_LDFLAGS =3D $(AM_LDFLAGS_MOD_NOUNDEF) - -libvirt_driver_network_impl_la_CFLAGS =3D \ - $(LIBNL_CFLAGS) \ - $(DBUS_CFLAGS) \ - -I$(srcdir)/access \ - -I$(srcdir)/conf \ - $(AM_CFLAGS) -libvirt_driver_network_impl_la_SOURCES =3D $(NETWORK_DRIVER_SOURCES) -libvirt_driver_network_impl_la_LIBADD =3D $(DBUS_LIBS) -endif WITH_NETWORK -EXTRA_DIST +=3D network/default.xml =20 =20 if WITH_SECRETS @@ -1530,7 +1496,6 @@ access/viraccessapichecklxc.c: $(srcdir)/rpc/gendispa= tch.pl \ # Add all conditional sources just in case... EXTRA_DIST +=3D \ $(REMOTE_DRIVER_SOURCES) \ - $(NETWORK_DRIVER_SOURCES) \ $(STORAGE_DRIVER_SOURCES) \ $(STORAGE_DRIVER_FS_SOURCES) \ $(STORAGE_DRIVER_LVM_SOURCES) \ @@ -2652,27 +2617,6 @@ libvirt_iohelper_CFLAGS =3D \ $(PIE_CFLAGS) \ $(NULL) =20 -if WITH_NETWORK -libexec_PROGRAMS +=3D libvirt_leaseshelper -libvirt_leaseshelper_SOURCES =3D $(NETWORK_LEASES_HELPER_SOURCES) -libvirt_leaseshelper_LDFLAGS =3D \ - $(AM_LDFLAGS) \ - $(PIE_LDFLAGS) \ - $(NULL) -libvirt_leaseshelper_LDADD =3D \ - libvirt_util.la \ - ../gnulib/lib/libgnu.la -if WITH_DTRACE_PROBES -libvirt_leaseshelper_LDADD +=3D libvirt_probes.lo -endif WITH_DTRACE_PROBES - -libvirt_leaseshelper_CFLAGS =3D \ - $(AM_CFLAGS) \ - $(PIE_CFLAGS) \ - $(NULL) -else ! WITH_NETWORK -EXTRA_DIST +=3D $(NETWORK_LEASES_HELPER_SOURCES) -endif ! WITH_NETWORK =20 endif WITH_LIBVIRTD =20 @@ -2834,25 +2778,6 @@ endif WITH_LIBVIRTD if WITH_SANLOCK $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock" endif WITH_SANLOCK -if WITH_NETWORK - $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/network" - $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/dnsmasq" - $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/network" - $(MKDIR_P) "$(DESTDIR)$(confdir)/qemu/networks/autostart" - $(INSTALL_DATA) $(srcdir)/network/default.xml \ - $(DESTDIR)$(confdir)/qemu/networks/default.xml - test -z "$(UUID)" || \ - { sed -e "s,,; $(UUID)," \ - $(DESTDIR)$(confdir)/qemu/networks/default.xml | \ - tr ";" "\n" > \ - $(DESTDIR)$(confdir)/qemu/networks/default.xml.t && \ - cp $(DESTDIR)$(confdir)/qemu/networks/default.xml.t \ - $(DESTDIR)$(confdir)/qemu/networks/default.xml && \ - rm $(DESTDIR)$(confdir)/qemu/networks/default.xml.t; } - ( cd $(DESTDIR)$(confdir)/qemu/networks/autostart && \ - rm -f default.xml && \ - $(LN_S) ../default.xml default.xml ) -endif WITH_NETWORK =20 uninstall-local:: uninstall-init uninstall-systemd uninstall-upstart \ uninstall-sysctl uninstall-polkit uninstall-sasl \ @@ -2870,14 +2795,6 @@ endif WITH_LIBVIRTD if WITH_SANLOCK rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/sanlock" ||: endif WITH_SANLOCK -if WITH_NETWORK - rm -f $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml - rm -f $(DESTDIR)$(confdir)/qemu/networks/default.xml - rmdir "$(DESTDIR)$(confdir)/qemu/networks/autostart" || : - rmdir "$(DESTDIR)$(confdir)/qemu/networks" || : - rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/network" ||: - rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/network" ||: -endif WITH_NETWORK rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt" ||: =20 CLEANFILES +=3D *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s diff --git a/src/network/Makefile.inc.am b/src/network/Makefile.inc.am new file mode 100644 index 0000000000..508c8c0422 --- /dev/null +++ b/src/network/Makefile.inc.am @@ -0,0 +1,106 @@ +NETWORK_DRIVER_SOURCES =3D \ + network/bridge_driver.h \ + network/bridge_driver.c \ + network/bridge_driver_platform.h \ + network/bridge_driver_platform.c \ + $(NULL) + +NETWORK_DRIVER_PLATFORM_INC =3D \ + network/bridge_driver_linux.c \ + network/bridge_driver_nop.c \ + $(NULL) + +NETWORK_LEASES_HELPER_SOURCES =3D \ + network/leaseshelper.c \ + $(NULL) + +DRIVER_SOURCE_FILES +=3D $(NETWORK_DRIVER_SOURCES) +STATEFUL_DRIVER_SOURCE_FILES +=3D $(NETWORK_DRIVER_SOURCES) +EXTRA_DIST +=3D \ + $(NETWORK_DRIVER_SOURCES) \ + $(NETWORK_DRIVER_PLATFORM_INC) \ + $(NETWORK_LEASES_HELPER_SOURCES) \ + $(NULL) + + +if WITH_NETWORK + +noinst_LTLIBRARIES +=3D libvirt_driver_network_impl.la +libvirt_driver_network_la_SOURCES =3D +libvirt_driver_network_la_LIBADD =3D \ + libvirt_driver_network_impl.la \ + libvirt.la \ + ../gnulib/lib/libgnu.la \ + $(LIBNL_LIBS) \ + $(DBUS_LIBS) \ + $(NULL) +mod_LTLIBRARIES +=3D libvirt_driver_network.la +libvirt_driver_network_la_LDFLAGS =3D $(AM_LDFLAGS_MOD_NOUNDEF) + +libvirt_driver_network_impl_la_CFLAGS =3D \ + $(LIBNL_CFLAGS) \ + $(DBUS_CFLAGS) \ + -I$(srcdir)/access \ + -I$(srcdir)/conf \ + $(AM_CFLAGS) \ + $(NULL) +libvirt_driver_network_impl_la_SOURCES =3D $(NETWORK_DRIVER_SOURCES) +libvirt_driver_network_impl_la_LIBADD =3D $(DBUS_LIBS) + +libexec_PROGRAMS +=3D libvirt_leaseshelper +libvirt_leaseshelper_SOURCES =3D $(NETWORK_LEASES_HELPER_SOURCES) +libvirt_leaseshelper_LDFLAGS =3D \ + $(AM_LDFLAGS) \ + $(PIE_LDFLAGS) \ + $(NULL) +libvirt_leaseshelper_LDADD =3D \ + libvirt_util.la \ + ../gnulib/lib/libgnu.la +if WITH_DTRACE_PROBES +libvirt_leaseshelper_LDADD +=3D libvirt_probes.lo +endif WITH_DTRACE_PROBES + +libvirt_leaseshelper_CFLAGS =3D \ + $(AM_CFLAGS) \ + $(PIE_CFLAGS) \ + $(NULL) + +INSTALL_DATA_DIRS +=3D network + +UUID=3D$(shell uuidgen 2>/dev/null) + +install-data-network: + $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/network" + $(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/dnsmasq" + $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/network" + $(MKDIR_P) "$(DESTDIR)$(confdir)/qemu/networks/autostart" + $(INSTALL_DATA) $(srcdir)/network/default.xml \ + $(DESTDIR)$(confdir)/qemu/networks/default.xml + test -z "$(UUID)" || \ + { sed -e "s,,; $(UUID)," \ + $(DESTDIR)$(confdir)/qemu/networks/default.xml | \ + tr ";" "\n" > \ + $(DESTDIR)$(confdir)/qemu/networks/default.xml.t && \ + cp $(DESTDIR)$(confdir)/qemu/networks/default.xml.t \ + $(DESTDIR)$(confdir)/qemu/networks/default.xml && \ + rm $(DESTDIR)$(confdir)/qemu/networks/default.xml.t; } + ( cd $(DESTDIR)$(confdir)/qemu/networks/autostart && \ + rm -f default.xml && \ + $(LN_S) ../default.xml default.xml ) + +uninstall-data-network: + rm -f $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml + rm -f $(DESTDIR)$(confdir)/qemu/networks/default.xml + rmdir "$(DESTDIR)$(confdir)/qemu/networks/autostart" || : + rmdir "$(DESTDIR)$(confdir)/qemu/networks" || : + rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/network" ||: + rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/network" ||: + +endif WITH_NETWORK + +EXTRA_DIST +=3D network/default.xml + +.PHONY: \ + install-data-network \ + uninstall-data-network \ + $(NULL) --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list