packages: libvirt/libvirt-driver-modules.patch - remote driver cannot be bu...
baggins
baggins at pld-linux.org
Thu Apr 19 14:37:10 CEST 2012
Author: baggins Date: Thu Apr 19 12:37:09 2012 GMT
Module: packages Tag: HEAD
---- Log message:
- remote driver cannot be built as a module
- network driver needs RTLD_GLOBAL
- lxc driver needs libblkid
---- Files affected:
packages/libvirt:
libvirt-driver-modules.patch (1.1 -> 1.2)
---- Diffs:
================================================================
Index: packages/libvirt/libvirt-driver-modules.patch
diff -u packages/libvirt/libvirt-driver-modules.patch:1.1 packages/libvirt/libvirt-driver-modules.patch:1.2
--- packages/libvirt/libvirt-driver-modules.patch:1.1 Mon Apr 2 14:01:27 2012
+++ packages/libvirt/libvirt-driver-modules.patch Thu Apr 19 14:37:04 2012
@@ -1,22 +1,42 @@
diff -ur libvirt-0.9.11/src/Makefile.am libvirt-0.9.11-mod/src/Makefile.am
--- libvirt-0.9.11/src/Makefile.am 2012-03-23 14:56:20.000000000 +0100
+++ libvirt-0.9.11-mod/src/Makefile.am 2012-04-01 11:47:02.416334370 +0200
-@@ -648,10 +648,10 @@
- -I$(top_srcdir)/src/rpc \
- $(AM_CFLAGS)
- libvirt_driver_remote_la_LDFLAGS = $(AM_LDFLAGS)
--libvirt_driver_remote_la_LIBADD = $(GNUTLS_LIBS) \
-- libvirt-net-rpc-client.la \
-- libvirt-net-rpc-server.la \
-- libvirt-net-rpc.la
-+libvirt_driver_remote_la_LIBADD = $(GNUTLS_LIBS)
-+libvirt_la_BUILT_LIBADD += libvirt-net-rpc-client.la \
-+ libvirt-net-rpc-server.la \
-+ libvirt-net-rpc.la
- if WITH_DRIVER_MODULES
- libvirt_driver_remote_la_LIBADD += ../gnulib/lib/libgnu.la
- libvirt_driver_remote_la_LDFLAGS += -module -avoid-version
-@@ -1070,7 +1070,6 @@
+@@ -635,12 +635,8 @@
+ endif
+
+ if WITH_REMOTE
+-if WITH_DRIVER_MODULES
+-mod_LTLIBRARIES += libvirt_driver_remote.la
+-else
+ noinst_LTLIBRARIES += libvirt_driver_remote.la
+ libvirt_la_BUILT_LIBADD += libvirt_driver_remote.la
+-endif
+ libvirt_driver_remote_la_CFLAGS = \
+ $(GNUTLS_CFLAGS) \
+ $(XDR_CFLAGS) \
+@@ -648,10 +644,6 @@
+ libvirt-net-rpc-client.la \
+ libvirt-net-rpc-server.la \
+ libvirt-net-rpc.la
+-if WITH_DRIVER_MODULES
+-libvirt_driver_remote_la_LIBADD += ../gnulib/lib/libgnu.la
+-libvirt_driver_remote_la_LDFLAGS += -module -avoid-version
+-endif
+ libvirt_driver_remote_la_SOURCES = $(REMOTE_DRIVER_SOURCES)
+
+ $(srcdir)/remote/remote_driver.c: $(REMOTE_DRIVER_GENERATED)
+@@ -832,6 +832,10 @@
+ libvirt_driver_lxc_la_CFLAGS = \
+ -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ libvirt_driver_lxc_la_LIBADD = $(CAPNG_LIBS)
++if HAVE_LIBBLKID
++libvirt_driver_lxc_la_CFLAGS += $(BLKID_CFLAGS)
++libvirt_driver_lxc_la_LIBADD += $(BLKID_LIBS)
++endif
+ if WITH_SECDRIVER_SELINUX
+ libvirt_driver_lxc_la_LIBADD += $(SELINUX_LIBS)
+ endif
+@@ -1070,7 +1054,6 @@
endif
if WITH_DRIVER_MODULES
@@ -24,3 +44,116 @@
libvirt_driver_nodedev_la_LDFLAGS += -module -avoid-version
endif
endif
+--- libvirt-0.9.11/src/driver.c~ 2011-07-20 03:23:18.000000000 +0200
++++ libvirt-0.9.11/src/driver.c 2012-04-19 13:20:05.906390855 +0200
+@@ -39,7 +39,7 @@
+ # include <dlfcn.h>
+
+ void *
+-virDriverLoadModule(const char *name)
++virDriverLoadModule(const char *name, int global)
+ {
+ const char *moddir = getenv("LIBVIRT_DRIVER_DIR");
+ char *modfile = NULL, *regfunc = NULL;
+@@ -59,7 +59,10 @@
+ goto cleanup;
+ }
+
+- handle = dlopen(modfile, RTLD_NOW | RTLD_LOCAL);
++ if (global)
++ handle = dlopen(modfile, RTLD_NOW | RTLD_GLOBAL);
++ else
++ handle = dlopen(modfile, RTLD_NOW | RTLD_LOCAL);
+ if (!handle) {
+ VIR_ERROR(_("failed to load module %s %s"), modfile, dlerror());
+ goto cleanup;
+--- libvirt-0.9.11/src/driver.h~ 2012-03-09 08:33:16.000000000 +0100
++++ libvirt-0.9.11/src/driver.h 2012-04-19 13:20:26.199724041 +0200
+@@ -1621,6 +1621,6 @@
+ # ifdef WITH_LIBVIRTD
+ int virRegisterStateDriver(virStateDriverPtr);
+ # endif
+-void *virDriverLoadModule(const char *name);
++void *virDriverLoadModule(const char *name, int global);
+
+ #endif /* __VIR_DRIVER_H__ */
+--- libvirt-0.9.11/src/libvirt.c~ 2012-03-31 12:22:02.000000000 +0200
++++ libvirt-0.9.11/src/libvirt.c 2012-04-19 12:32:29.704680534 +0200
+@@ -431,32 +431,29 @@
+ * is not loaded they'll get a suitable error at that point
+ */
+ # ifdef WITH_TEST
+- virDriverLoadModule("test");
++ virDriverLoadModule("test", 0);
+ # endif
+ # ifdef WITH_XEN
+- virDriverLoadModule("xen");
++ virDriverLoadModule("xen", 0);
+ # endif
+ # ifdef WITH_OPENVZ
+- virDriverLoadModule("openvz");
++ virDriverLoadModule("openvz", 0);
+ # endif
+ # ifdef WITH_VMWARE
+- virDriverLoadModule("vmware");
++ virDriverLoadModule("vmware", 0);
+ # endif
+ # ifdef WITH_VBOX
+- virDriverLoadModule("vbox");
++ virDriverLoadModule("vbox", 0);
+ # endif
+ # ifdef WITH_ESX
+- virDriverLoadModule("esx");
++ virDriverLoadModule("esx", 0);
+ # endif
+ # ifdef WITH_HYPERV
+- virDriverLoadModule("hyperv");
++ virDriverLoadModule("hyperv", 0);
+ # endif
+ # ifdef WITH_XENAPI
+- virDriverLoadModule("xenapi");
++ virDriverLoadModule("xenapi", 0);
+ # endif
+-# ifdef WITH_REMOTE
+- virDriverLoadModule("remote");
+-# endif
+ #else
+ # ifdef WITH_TEST
+ if (testRegister() == -1) return -1;
+@@ -482,10 +482,10 @@
+ # ifdef WITH_XENAPI
+ if (xenapiRegister() == -1) return -1;
+ # endif
++#endif
+ # ifdef WITH_REMOTE
+ if (remoteRegister () == -1) return -1;
+ # endif
+-#endif
+
+ return 0;
+ }
+--- libvirt-0.9.11/daemon/libvirtd.c~ 2012-03-31 12:22:02.000000000 +0200
++++ libvirt-0.9.11/daemon/libvirtd.c 2012-04-19 13:24:33.839722250 +0200
+@@ -401,14 +401,14 @@
+ * If they try to open a connection for a module that
+ * is not loaded they'll get a suitable error at that point
+ */
+- virDriverLoadModule("network");
+- virDriverLoadModule("storage");
+- virDriverLoadModule("nodedev");
+- virDriverLoadModule("secret");
+- virDriverLoadModule("qemu");
+- virDriverLoadModule("lxc");
+- virDriverLoadModule("uml");
+- virDriverLoadModule("nwfilter");
++ virDriverLoadModule("network", 1);
++ virDriverLoadModule("storage", 0);
++ virDriverLoadModule("nodedev", 0);
++ virDriverLoadModule("secret", 0);
++ virDriverLoadModule("qemu", 0);
++ virDriverLoadModule("lxc", 0);
++ virDriverLoadModule("uml", 0);
++ virDriverLoadModule("nwfilter", 0);
+ #else
+ # ifdef WITH_NETWORK
+ networkRegister();
================================================================
---- CVS-web:
http://cvs.pld-linux.org/packages/libvirt/libvirt-driver-modules.patch?r1=1.1&r2=1.2
More information about the pld-cvs-commit
mailing list