[RFC PATCH] build: isolate core libvirt libs deps from xen runtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wim ten Have <wim.ten.have@xxxxxxxxxx>

Generating libvirt packages per make rpm, "with_libxl=1" and "with_xen=1",
adds strict runtime dependencies per libxenlight for xen-libs package from
core libvirt-libs package.  This is not necessary and unfortunate since
those dependencies set demand to "xen-libs" package even when there's no
need for libvirt xen or libxl driver components.

This patch is to have two separate xenconfig lib tool libraries: one for
core libvirt (without XL), and a another that contains xl for libxl driver
(libvirt_driver_libxl_impl.la) which when loading the driver, loads the
remaining symbols (xen{Format,Parse}XL. For the user/sysadmin, this means
the xen dependencies are moved into libxl driver, instead of core libvirt.

Signed-off-by: Joao Martins <joao.m.martins@xxxxxxxxxx>
Signed-off-by: Wim ten Have <wim.ten.have@xxxxxxxxxx>
---
 src/Makefile.am              | 17 +++++++++++++----
 src/libvirt_xenxlconfig.syms |  2 --
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 173fba1e6..80fa2feba 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1197,7 +1197,8 @@ XENCONFIG_SOURCES =						\
 		xenconfig/xen_sxpr.c xenconfig/xen_sxpr.h	\
 		xenconfig/xen_xm.c xenconfig/xen_xm.h
 if WITH_LIBXL
-XENCONFIG_SOURCES +=						\
+XENCONFIG_LIBXL_SOURCES =							\
+		$(XENCONFIG_SOURCES)						\
 		xenconfig/xen_xl.c xenconfig/xen_xl.h
 endif WITH_LIBXL
 
@@ -1258,10 +1259,17 @@ endif WITH_VMX
 if WITH_XENCONFIG
 noinst_LTLIBRARIES += libvirt_xenconfig.la
 libvirt_la_BUILT_LIBADD += libvirt_xenconfig.la
-libvirt_xenconfig_la_LIBADD = $(LIBXL_LIBS)
 libvirt_xenconfig_la_CFLAGS = \
-		-I$(srcdir)/conf -I$(srcdir)/libxl $(AM_CFLAGS)
+		-I$(srcdir)/conf $(AM_CFLAGS)
 libvirt_xenconfig_la_SOURCES = $(XENCONFIG_SOURCES)
+
+if WITH_LIBXL
+noinst_LTLIBRARIES += libvirt_xenconfig_libxl.la
+libvirt_xenconfig_libxl_la_LIBADD = $(LIBXL_LIBS)
+libvirt_xenconfig_libxl_la_CFLAGS = \
+		-I$(srcdir)/conf -I$(srcdir)/libxl $(AM_CFLAGS)
+libvirt_xenconfig_libxl_la_SOURCES = $(XENCONFIG_LIBXL_SOURCES)
+endif WITH_LIBXL
 endif WITH_XENCONFIG
 
 
@@ -1417,7 +1425,7 @@ libvirt_driver_libxl_impl_la_CFLAGS = 		\
 		$(AM_CFLAGS)
 libvirt_driver_libxl_impl_la_LDFLAGS = $(AM_LDFLAGS)
 libvirt_driver_libxl_impl_la_LIBADD = $(LIBXL_LIBS) \
-				      libvirt_xenconfig.la \
+				      libvirt_xenconfig_libxl.la \
 				      libvirt_secret.la
 libvirt_driver_libxl_impl_la_SOURCES = $(LIBXL_DRIVER_SOURCES)
 
@@ -2045,6 +2053,7 @@ EXTRA_DIST +=							\
 		$(VBOX_DRIVER_EXTRA_DIST)			\
 		$(VMWARE_DRIVER_SOURCES)			\
 		$(XENCONFIG_SOURCES)				\
+		$(XENCONFIG_LIBXL_SOURCES)			\
 		$(ACCESS_DRIVER_POLKIT_POLICY)
 
 check-local: check-augeas
diff --git a/src/libvirt_xenxlconfig.syms b/src/libvirt_xenxlconfig.syms
index dbe43aac7..50407002d 100644
--- a/src/libvirt_xenxlconfig.syms
+++ b/src/libvirt_xenxlconfig.syms
@@ -3,8 +3,6 @@
 #
 
 #xenconfig/xen_xl.h
-xenFormatXL;
-xenParseXL;
 
 # Let emacs know we want case-insensitive sorting
 # Local Variables:
-- 
2.13.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux