Re: [libvirt] [PATCH 1 of 5] Split out version script into multiple files

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

 



John Levon <john.levon@xxxxxxx> wrote:
> On Tue, Dec 23, 2008 at 12:57:19PM +0100, Jim Meyering wrote:
>
>> This all looks fine, but I'd prefer to retain the WARNING in the generated
>> file, so that people are less likely to modify it directly.  Along the
>
> Sure, your changes sound fine - are you going to commit your version?

I had trouble applying the first change set, both in configure.in
(rejected hunk) and with the renamed file.  Plus I made some small
additional changes, so please check it carefully.  The other 4 applied
cleanly.  Also, look over the five log messages.  Each of those will be
copied mechanically into the ChangeLog file.

Once you sign off, I'll commit these.

BTW, I noticed that configure.in contains many uses of test's -o
operator, but that's not portable.  See the "Limitations of Builtins"
section in autoconf's documentation.  But that probably doesn't
matter for libvirt, since I suspect that all systems for which
libvirt is useful have a sufficiently modern /bin/sh.


>From 87ff5b3d474e036a6d4b12276d2ebb3b1c2531d6 Mon Sep 17 00:00:00 2001
From: john.levon@xxxxxxx <john.levon@xxxxxxx>
Date: Tue, 23 Dec 2008 17:38:26 +0100
Subject: [PATCH 1/5] split version script into multiple files

* src/Makefile.am (PRIVSYMFILES): Define.
(EXTRA_DIST): Append $(PRIVSYMFILES).
(libvirt.syms): New rule.
Reflect renaming: s/libvirt_sym.version/libvirt.syms/.
(BUILT_SOURCES): Depend on libvirt.syms.
* configure.in: Define ENABLE_DEBUG as an automake conditional.
(AC_OUTPUT): Remove src/libvirt_sym.version.
* src/.cvsignore: s/libvirt_sym.version/libvirt.syms/.
* src/.gitignore: Regenerate.
* src/libvirt_public.syms: Renamed from src/libvirt_sym.version.in.
* src/libvirt_debug.syms: New file.
* src/libvirt_private.syms: New file.
Author: John Levon
---
 configure.in               |    2 +-
 src/.cvsignore             |    2 +-
 src/.gitignore             |    2 +-
 src/Makefile.am            |   52 ++++-
 src/libvirt_debug.syms     |   19 ++
 src/libvirt_private.syms   |  346 ++++++++++++++++++++++++
 src/libvirt_public.syms    |  240 +++++++++++++++++
 src/libvirt_sym.version.in |  626 --------------------------------------------
 8 files changed, 653 insertions(+), 636 deletions(-)
 create mode 100644 src/libvirt_debug.syms
 create mode 100644 src/libvirt_private.syms
 create mode 100644 src/libvirt_public.syms
 delete mode 100644 src/libvirt_sym.version.in

diff --git a/configure.in b/configure.in
index e870004..3358cff 100644
--- a/configure.in
+++ b/configure.in
@@ -195,6 +195,7 @@ dnl --enable-debug=(yes|no)
 AC_ARG_ENABLE([debug],
               [AC_HELP_STRING([--enable-debug=no/yes],
                              [enable debugging output])],[],[enable_debug=yes])
+AM_CONDITIONAL([ENABLE_DEBUG], test x"$enable_debug" = x"yes")
 if test x"$enable_debug" = x"yes"; then
    AC_DEFINE([ENABLE_DEBUG], [], [whether debugging is enabled])
 fi
@@ -1253,7 +1254,6 @@ AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
 	  gnulib/lib/Makefile \
 	  gnulib/tests/Makefile \
           libvirt.pc libvirt.spec mingw32-libvirt.spec \
-          src/libvirt_sym.version \
           po/Makefile.in \
 	  include/libvirt/Makefile include/libvirt/libvirt.h \
 	  python/Makefile python/tests/Makefile \
diff --git a/src/.cvsignore b/src/.cvsignore
index cef59e0..537340f 100644
--- a/src/.cvsignore
+++ b/src/.cvsignore
@@ -15,4 +15,4 @@ libvirt_parthelper
 libvirt_lxc
 virsh-net-edit.c
 virsh-pool-edit.c
-libvirt_sym.version
+libvirt.syms
diff --git a/src/.gitignore b/src/.gitignore
index cef59e0..537340f 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -15,4 +15,4 @@ libvirt_parthelper
 libvirt_lxc
 virsh-net-edit.c
 virsh-pool-edit.c
-libvirt_sym.version
+libvirt.syms
diff --git a/src/Makefile.am b/src/Makefile.am
index 6c65f91..984c12a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -192,6 +192,8 @@ libvirt_driver_la_SOURCES =					\
 libvirt_driver_la_CFLAGS = $(XEN_CFLAGS) $(NUMACTL_CFLAGS)
 libvirt_driver_la_LDFLAGS = $(XEN_LIBS) $(NUMACTL_LIBS)

+PRIVSYMFILES = libvirt_private.syms
+
 if WITH_TEST
 if WITH_DRIVER_MODULES
 mod_LTLIBRARIES += libvirt_driver_test.la
@@ -390,31 +392,67 @@ EXTRA_DIST +=							\
 		$(NODE_DEVICE_DRIVER_HAL_SOURCES)		\
 		$(NODE_DEVICE_DRIVER_DEVKIT_SOURCES)

+#
+# Build our version script.  This is composed of three parts:
+#
+# 1. libvirt_public.syms - public API.  These functions are always
+# present in the library and should never change incompatibly.
+#
+# 2. libvirt_private.syms - private API.  These symbols are private and
+# semantics may change on every release, hence the version number is
+# spliced in at build time. This ensures that if libvirtd, virsh, or a
+# driver module was built against one libvirt release, it will refuse to
+# load with another where symbols may have same names but different
+# semantics. Such symbols should never be visible in an (installed)
+# public header file.
+#
+# 3. libvirt_*.syms - dynamic private API.  Like libvirt_private.syms,
+# except that build options (such as --enable-debug) can mean these
+# symbols aren't present at all.
+#
+
+if ENABLE_DEBUG
+PRIVSYMFILES += libvirt_debug.syms
+endif
+
+EXTRA_DIST += libvirt_public.syms $(PRIVSYMFILES)
+
+libvirt.syms: libvirt_public.syms $(PRIVSYMFILES)
+	rm -f $@-tmp $@
+	printf '# WARNING: generated from the following:\n# $^\n\n' >$@-tmp
+	cat $(srcdir)/libvirt_public.syms >>$@-tmp
+	printf '\n\n# Private symbols\n\n' >>$@-tmp
+	printf 'LIBVIRT_PRIVATE_$(VERSION) {\n\n'  >>$@-tmp
+	printf 'global:\n\n' >>$@-tmp
+	for file in $(PRIVSYMFILES); do \
+	    cat $(srcdir)/$$file >>$@-tmp; \
+	done
+	printf '\n\nlocal:\n*;\n\n};' >>$@-tmp
+	chmod a-w $@-tmp
+	mv $@-tmp libvirt.syms

 # Empty source list - it merely links a bunch of convenience libs together
 libvirt_la_SOURCES =
 libvirt_la_LIBADD += \
 		    @CYGWIN_EXTRA_LIBADD@ ../gnulib/lib/libgnu.la
-libvirt_la_LDFLAGS = @VERSION_SCRIPT_FLAGS@xxxxxxxxxxxxxxxxxxx \
+libvirt_la_LDFLAGS = $(VERSION_SCRIPT_FLAGS)libvirt.syms \
                      -version-info @LIBVIRT_VERSION_INFO@ \
                     $(COVERAGE_CFLAGS:-f%=-Wc,-f%) \
                     $(LIBXML_LIBS) $(SELINUX_LIBS) \
 		    $(XEN_LIBS) $(DRIVER_MODULE_LIBS) \
 		    @CYGWIN_EXTRA_LDFLAGS@ @MINGW_EXTRA_LDFLAGS@
 libvirt_la_CFLAGS = $(COVERAGE_CFLAGS) -DIN_LIBVIRT
-libvirt_la_DEPENDENCIES = $(libvirt_la_LIBADD) libvirt_sym.version
+libvirt_la_DEPENDENCIES = $(libvirt_la_LIBADD) libvirt.syms

 # Create an automake "convenience library" version of libvirt_la,
 # just for testing, since the test harness requires access to internal
 # bits and pieces that we don't want to make publicly accessible.
 noinst_LTLIBRARIES += libvirt_test.la

-# Convert libvirt_sym.version
-#      to libvirt_test_sym.version, and
-# remove -version-info X.Y.Z (not needed since this is a convenience library.
+# Remove version script from convenience library
 test_LDFLAGS =						\
   $$(echo '$(libvirt_la_LDFLAGS)'			\
-     |sed 's!-Wl,--v.*_sym\.version!!'			\
+     |sed 's!@VERSION_SCRIPT_FLAGS@libvirt.syms!!'	\
      |sed 's!-version-info @LIBVIRT_VERSION_INFO@!!')

 # Just like the above, but with a slightly different set of public symbols.
@@ -438,7 +476,7 @@ virsh_LDADD =							\
 		../gnulib/lib/libgnu.la				\
 		$(VIRSH_LIBS)
 virsh_CFLAGS = $(COVERAGE_CFLAGS) $(READLINE_CFLAGS) $(NUMACTL_CFLAGS)
-BUILT_SOURCES = virsh-net-edit.c virsh-pool-edit.c
+BUILT_SOURCES = virsh-net-edit.c virsh-pool-edit.c libvirt.syms

 virsh-net-edit.c: virsh.c Makefile.am
 	rm -f $@-tmp
diff --git a/src/libvirt_debug.syms b/src/libvirt_debug.syms
new file mode 100644
index 0000000..1742a0b
--- /dev/null
+++ b/src/libvirt_debug.syms
@@ -0,0 +1,19 @@
+#
+# These symbols are dependent upon --enable-debug.
+#
+
+
+# libvirt_internal.h
+debugFlag;
+
+
+# logging.h
+virLogMessage;
+virLogSetDefaultPriority;
+virLogDefineFilter;
+virLogDefineOutput;
+virLogParseFilters;
+virLogParseOutputs;
+virLogStartup;
+virLogShutdown;
+virLogReset;
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
new file mode 100644
index 0000000..fb7b5f9
--- /dev/null
+++ b/src/libvirt_private.syms
@@ -0,0 +1,346 @@
+#
+# General private symbols. See Makefile.am.
+#
+
+
+# bridge.h
+brAddBridge;
+brAddInterface;
+brAddTap;
+brDeleteBridge;
+brInit;
+brSetEnableSTP;
+brSetForwardDelay;
+brSetInetAddress;
+brSetInetNetmask;
+brSetInterfaceUp;
+brShutdown;
+
+
+# buf.h
+virBufferVSprintf;
+virBufferEscapeString;
+virBufferAdd;
+virBufferAddChar;
+virBufferContentAndReset;
+virBufferError;
+
+
+# caps.h
+virCapabilitiesAddGuest;
+virCapabilitiesAddGuestDomain;
+virCapabilitiesAddGuestFeature;
+virCapabilitiesAddHostMigrateTransport;
+virCapabilitiesAddHostNUMACell;
+virCapabilitiesAddHostFeature;
+virCapabilitiesDefaultGuestArch;
+virCapabilitiesDefaultGuestEmulator;
+virCapabilitiesDefaultGuestMachine;
+virCapabilitiesFormatXML;
+virCapabilitiesFree;
+virCapabilitiesNew;
+virCapabilitiesSetMacPrefix;
+
+
+# conf.h
+virConfNew;
+virConfReadFile;
+virConfReadMem;
+virConfFree;
+virConfFreeValue;
+virConfGetValue;
+virConfSetValue;
+virConfWriteFile;
+virConfWriteMem;
+
+
+# datatypes.h
+virGetDomain;
+virGetNetwork;
+virGetStoragePool;
+virGetStorageVol;
+virGetNodeDevice;
+virUnrefDomain;
+
+
+# domain_conf.h
+virDiskNameToBusDeviceIndex;
+virDiskNameToIndex;
+virDomainAssignDef;
+virDomainConfigFile;
+virDomainCpuSetFormat;
+virDomainCpuSetParse;
+virDomainChrDefFree;
+virDomainChrTypeFromString;
+virDomainChrTypeToString;
+virDomainDefDefaultEmulator;
+virDomainDefFormat;
+virDomainDefFree;
+virDomainDefParseFile;
+virDomainDefParseNode;
+virDomainDefParseString;
+virDomainDeleteConfig;
+virDomainDeviceDefFree;
+virDomainDeviceDefParse;
+virDomainDiskBusTypeToString;
+virDomainDiskDefFree;
+virDomainDiskDeviceTypeToString;
+virDomainDiskQSort;
+virDomainFindByID;
+virDomainFindByName;
+virDomainFindByUUID;
+virDomainGraphicsTypeFromString;
+virDomainGraphicsDefFree;
+virDomainInputDefFree;
+virDomainLifecycleTypeFromString;
+virDomainLifecycleTypeToString;
+virDomainLoadAllConfigs;
+virDomainNetDefFree;
+virDomainObjFree;
+virDomainObjListFree;
+virDomainRemoveInactive;
+virDomainSaveXML;
+virDomainSaveConfig;
+virDomainSoundDefFree;
+virDomainSoundModelTypeFromString;
+virDomainSoundModelTypeToString;
+virDomainVirtTypeToString;
+virDomainFSDefFree;
+virDomainObjLock;
+virDomainObjUnlock;
+
+
+# domain_event.h
+virDomainEventCallbackListAdd;
+virDomainEventCallbackListFree;
+virDomainEventCallbackListRemove;
+virDomainEventCallbackListRemoveConn;
+virDomainEventCallbackListMarkDelete;
+virDomainEventCallbackListPurgeMarked;
+virDomainEventQueueNew;
+virDomainEventQueueFree;
+virDomainEventQueuePop;
+virDomainEventQueuePush;
+virDomainEventNew;
+virDomainEventNewFromDom;
+virDomainEventNewFromObj;
+virDomainEventNewFromDef;
+virDomainEventFree;
+virDomainEventDispatchDefaultFunc;
+virDomainEventDispatch;
+virDomainEventQueueDispatch;
+
+
+# driver.h
+virDriverLoadModule;
+
+
+# event.h
+virEventAddHandle;
+virEventAddTimeout;
+virEventRemoveHandle;
+virEventRemoveTimeout;
+virEventUpdateHandle;
+virEventUpdateTimeout;
+
+
+# hash.h
+virHashAddEntry;
+virHashCreate;
+virHashForEach;
+virHashFree;
+virHashLookup;
+virHashRemoveEntry;
+virHashRemoveSet;
+virHashSearch;
+virHashSize;
+
+
+# iptables.h
+iptablesAddForwardAllowCross;
+iptablesAddForwardAllowIn;
+iptablesAddForwardAllowOut;
+iptablesAddForwardAllowRelatedIn;
+iptablesAddForwardMasquerade;
+iptablesAddForwardRejectIn;
+iptablesAddForwardRejectOut;
+iptablesAddTcpInput;
+iptablesAddUdpInput;
+iptablesContextFree;
+iptablesContextNew;
+iptablesReloadRules;
+iptablesRemoveForwardAllowCross;
+iptablesRemoveForwardAllowIn;
+iptablesRemoveForwardAllowOut;
+iptablesRemoveForwardAllowRelatedIn;
+iptablesRemoveForwardMasquerade;
+iptablesRemoveForwardRejectIn;
+iptablesRemoveForwardRejectOut;
+iptablesRemoveTcpInput;
+iptablesRemoveUdpInput;
+iptablesSaveRules;
+
+
+# libvirt_internal.h
+virStateInitialize;
+virStateCleanup;
+virStateReload;
+virStateActive;
+virDrvSupportsFeature;
+virDomainMigratePrepare;
+virDomainMigratePerform;
+virDomainMigrateFinish;
+virDomainMigratePrepare2;
+virDomainMigrateFinish2;
+virRegisterDriver;
+virRegisterNetworkDriver;
+virRegisterStateDriver;
+virRegisterStorageDriver;
+virRegisterDeviceMonitor;
+
+
+# memory.h
+virAlloc;
+virAllocN;
+virReallocN;
+virFree;
+
+
+# network_conf.h
+virNetworkAssignDef;
+virNetworkDefFormat;
+virNetworkDefFree;
+virNetworkDefParseFile;
+virNetworkDefParseNode;
+virNetworkDefParseString;
+virNetworkDeleteConfig;
+virNetworkFindByName;
+virNetworkFindByUUID;
+virNetworkLoadAllConfigs;
+virNetworkObjListFree;
+virNetworkDefParseNode;
+virNetworkRemoveInactive;
+virNetworkSaveConfig;
+virNetworkObjLock;
+virNetworkObjUnlock;
+
+
+# nodeinfo.h
+virNodeInfoPopulate;
+virCapsInitNUMA;
+
+
+# node_device_conf.h
+virNodeDeviceObjRemove;
+virNodeDevCapTypeToString;
+virNodeDeviceFindByName;
+virNodeDeviceObjListFree;
+virNodeDeviceDefFree;
+virNodeDevCapsDefFree;
+virNodeDeviceDefFormat;
+virNodeDeviceObjLock;
+virNodeDeviceObjUnlock;
+virNodeDeviceAssignDef;
+
+
+# qparams.h
+qparam_get_query;
+qparam_query_parse;
+free_qparam_set;
+
+
+# stats_linux.h
+linuxDomainInterfaceStats;
+xenLinuxDomainBlockStats;
+
+
+# storage_backend.h
+virStorageBackendForType;
+virStorageBackendRunProgNul;
+virStorageBackendRunProgRegex;
+virStorageBackendStablePath;
+virStorageBackendUpdateVolInfo;
+virStorageBackendUpdateVolInfoFD;
+
+
+# storage_conf.h
+virStoragePoolDefFormat;
+virStoragePoolDefFree;
+virStoragePoolDefParse;
+virStoragePoolLoadAllConfigs;
+virStoragePoolObjAssignDef;
+virStoragePoolObjClearVols;
+virStoragePoolObjDeleteDef;
+virStoragePoolObjFindByName;
+virStoragePoolObjFindByUUID;
+virStoragePoolObjListFree;
+virStoragePoolObjRemove;
+virStoragePoolObjSaveDef;
+virStoragePoolSourceFree;
+virStoragePoolSourceListFormat;
+virStorageVolDefFindByKey;
+virStorageVolDefFindByName;
+virStorageVolDefFindByPath;
+virStorageVolDefFormat;
+virStorageVolDefFree;
+virStorageVolDefParse;
+virStoragePoolFormatDiskTypeToString;
+virStoragePoolFormatFileSystemTypeToString;
+virStoragePoolFormatFileSystemNetTypeToString;
+virStorageVolFormatFileSystemTypeToString;
+virStoragePoolTypeFromString;
+virStoragePoolObjLock;
+virStoragePoolObjUnlock;
+
+
+# util.h
+virFileReadAll;
+virStrToLong_i;
+virStrToLong_ll;
+virStrToLong_ull;
+virStrToLong_ui;
+virFileLinkPointsTo;
+saferead;
+safewrite;
+virMacAddrCompare;
+virEnumFromString;
+virEnumToString;
+virEventAddHandle;
+virEventRemoveHandle;
+virExec;
+virFormatMacAddr;
+virParseMacAddr;
+virFileDeletePid;
+virFileExists;
+virFileHasSuffix;
+virFileLinkPointsTo;
+virFileMakePath;
+virFileOpenTty;
+virFileReadLimFD;
+virFilePid;
+virFileReadPid;
+virFileLinkPointsTo;
+virParseNumber;
+virAsprintf;
+virRun;
+virSkipSpaces;
+
+
+# uuid.h
+virUUIDFormat;
+virUUIDGenerate;
+virUUIDParse;
+
+
+# virterror_internal.h
+virReportErrorHelper;
+virErrorMsg;
+virRaiseError;
+
+
+# xml.h
+virXPathLong;
+virXPathNode;
+virXPathNodeSet;
+virXPathString;
+virXMLPropString;
diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
new file mode 100644
index 0000000..be3fb4f
--- /dev/null
+++ b/src/libvirt_public.syms
@@ -0,0 +1,240 @@
+#
+# Officially exported symbols, for which header
+# file definitions are installed in /usr/include/libvirt
+# either from libvirt.h and virterror.h
+#
+# Versions here are *fixed* to match the libvirt version
+# at which the symbol was introduced. This ensures that
+# a new client app requiring symbol foo() can't accidentally
+# run with old libvirt.so not providing foo() - the global
+# soname version info can't enforce this since we never
+# change the soname
+#
+LIBVIRT_0.0.3 {
+    global:
+	virConnectClose;
+	virConnectGetType;
+	virConnectGetVersion;
+	virConnectListDomains;
+	virConnectNumOfDomains;
+	virConnectOpen;
+	virConnectOpenReadOnly;
+
+	virDomainCreateLinux;
+	virDomainDestroy;
+	virDomainFree;
+	virDomainGetID;
+	virDomainGetInfo;
+	virDomainGetMaxMemory;
+	virDomainGetName;
+	virDomainGetOSType;
+	virDomainGetXMLDesc;
+	virDomainLookupByID;
+	virDomainLookupByName;
+	virDomainRestore;
+	virDomainResume;
+	virDomainSave;
+	virDomainSetMaxMemory;
+	virDomainShutdown;
+	virDomainSuspend;
+
+	virGetVersion;
+};
+
+LIBVIRT_0.0.5 {
+    global:
+	virDomainLookupByUUID;
+	virDomainGetUUID;
+} LIBVIRT_0.0.3;
+
+LIBVIRT_0.1.0 {
+    global:
+	virInitialize;
+	virNodeGetInfo;
+	virDomainReboot;
+
+	virCopyLastError;
+	virConnSetErrorFunc;
+	virResetLastError;
+	virResetError;
+	virConnGetLastError;
+	virGetLastError;
+	virSetErrorFunc;
+	virConnCopyLastError;
+	virConnResetLastError;
+	virDefaultErrorFunc;
+} LIBVIRT_0.0.5;
+
+LIBVIRT_0.1.1 {
+    global:
+	virDomainLookupByUUIDString;
+	virDomainGetUUIDString;
+	virDomainSetMemory;
+	virDomainDefineXML;
+	virDomainCreate;
+	virDomainUndefine;
+	virConnectListDefinedDomains;
+} LIBVIRT_0.1.0;
+
+LIBVIRT_0.1.4 {
+    global:
+	virDomainSetVcpus;
+	virDomainPinVcpu;
+	virDomainGetVcpus;
+} LIBVIRT_0.1.1;
+
+LIBVIRT_0.1.5 {
+    global:
+	virConnectNumOfDefinedDomains;
+} LIBVIRT_0.1.4;
+
+LIBVIRT_0.1.9 {
+    global:
+	virDomainCoreDump;
+	virDomainAttachDevice;
+	virDomainDetachDevice;
+} LIBVIRT_0.1.5;
+
+LIBVIRT_0.2.0 {
+    global:
+	virConnectNumOfNetworks;
+	virConnectListNetworks;
+	virConnectNumOfDefinedNetworks;
+	virConnectListDefinedNetworks;
+	virNetworkLookupByName;
+	virNetworkLookupByUUID;
+	virNetworkLookupByUUIDString;
+	virNetworkCreateXML;
+	virNetworkDefineXML;
+	virNetworkUndefine;
+	virNetworkCreate;
+	virNetworkDestroy;
+	virNetworkFree;
+	virNetworkGetName;
+	virNetworkGetUUID;
+	virNetworkGetUUIDString;
+	virNetworkGetXMLDesc;
+	virNetworkGetBridgeName;
+} LIBVIRT_0.1.9;
+
+LIBVIRT_0.2.1 {
+    global:
+	virConnectGetCapabilities;
+	virConnectGetMaxVcpus;
+	virDomainGetMaxVcpus;
+	virDomainGetAutostart;
+	virDomainSetAutostart;
+	virNetworkGetAutostart;
+	virNetworkSetAutostart;
+} LIBVIRT_0.2.0;
+
+LIBVIRT_0.2.3 {
+    global:
+	virDomainGetSchedulerType;
+	virDomainGetSchedulerParameters;
+	virDomainSetSchedulerParameters;
+} LIBVIRT_0.2.1;
+
+LIBVIRT_0.3.0 {
+    global:
+	virConnectGetHostname;
+	virConnectGetURI;
+	virDomainGetConnect;
+	virNetworkGetConnect;
+} LIBVIRT_0.2.3;
+
+LIBVIRT_0.3.2 {
+    global:
+	virDomainMigrate;
+	virDomainBlockStats;
+	virDomainInterfaceStats;
+} LIBVIRT_0.3.0;
+
+LIBVIRT_0.3.3 {
+    global:
+	virNodeGetCellsFreeMemory;
+	virNodeGetFreeMemory;
+} LIBVIRT_0.3.2;
+
+LIBVIRT_0.4.0 {
+    global:
+	virConnectOpenAuth;
+	virConnectAuthPtrDefault;
+} LIBVIRT_0.3.3;
+
+LIBVIRT_0.4.1 {
+    global:
+	virStoragePoolGetConnect;
+	virConnectNumOfStoragePools;
+	virConnectNumOfDefinedStoragePools;
+	virConnectListStoragePools;
+	virConnectListDefinedStoragePools;
+	virStoragePoolLookupByName;
+	virStoragePoolLookupByUUID;
+	virStoragePoolLookupByUUIDString;
+	virStoragePoolLookupByVolume;
+	virStoragePoolCreateXML;
+	virStoragePoolDefineXML;
+	virStoragePoolUndefine;
+	virStoragePoolCreate;
+	virStoragePoolBuild;
+	virStoragePoolDestroy;
+	virStoragePoolDelete;
+	virStoragePoolRefresh;
+	virStoragePoolFree;
+	virStoragePoolGetName;
+	virStoragePoolGetUUID;
+	virStoragePoolGetUUIDString;
+	virStoragePoolGetInfo;
+	virStoragePoolGetXMLDesc;
+	virStoragePoolSetAutostart;
+	virStoragePoolGetAutostart;
+	virStoragePoolNumOfVolumes;
+	virStoragePoolListVolumes;
+
+	virStorageVolGetConnect;
+	virStorageVolLookupByName;
+	virStorageVolLookupByKey;
+	virStorageVolLookupByPath;
+	virStorageVolCreateXML;
+	virStorageVolDelete;
+	virStorageVolFree;
+	virStorageVolGetName;
+	virStorageVolGetKey;
+	virStorageVolGetInfo;
+	virStorageVolGetXMLDesc;
+	virStorageVolGetPath;
+} LIBVIRT_0.4.0;
+
+LIBVIRT_0.4.2 {
+    global:
+	virDomainBlockPeek;
+	virDomainMemoryPeek;
+} LIBVIRT_0.4.1;
+
+LIBVIRT_0.4.5 {
+    global:
+	virConnectFindStoragePoolSources;
+} LIBVIRT_0.4.2;
+
+LIBVIRT_0.5.0 {
+    global:
+	virDomainCreateXML;
+	virEventRegisterImpl;
+	virConnectDomainEventRegister;
+	virConnectDomainEventDeregister;
+
+	virNodeNumOfDevices;
+	virNodeListDevices;
+	virNodeDeviceLookupByName;
+	virNodeDeviceFree;
+	virNodeDeviceGetXMLDesc;
+	virNodeDeviceGetName;
+	virNodeDeviceGetParent;
+	virNodeDeviceNumOfCaps;
+	virNodeDeviceListCaps;
+
+} LIBVIRT_0.4.5;
+
+# no new entry point in 0.5.1
+# .... define new API here using predicted next version number ....
diff --git a/src/libvirt_sym.version.in b/src/libvirt_sym.version.in
deleted file mode 100644
index de919da..0000000
--- a/src/libvirt_sym.version.in
+++ /dev/null
@@ -1,626 +0,0 @@
-#
-# WARNING: libvirt_sym.version.in  is the master file
-#
-# WARNING: libvirt_sym.version is auto-generated by configure
-#
-
-#
-# First officially exported symbols, for which header
-# file definitions are installed in /usr/include/libvirt
-# either from libvirt.h and virterror.h
-#
-# Versions here are *fixed* to match the libvirt version
-# at which the symbol was introduced. This ensures that
-# a new client app requiring symbol foo() can't accidentally
-# run with old libvirt.so not providing foo() - the global
-# soname version info can't enforce this since we never
-# change the soname
-#
-LIBVIRT_0.0.3 {
-    global:
-	virConnectClose;
-	virConnectGetType;
-	virConnectGetVersion;
-	virConnectListDomains;
-	virConnectNumOfDomains;
-	virConnectOpen;
-	virConnectOpenReadOnly;
-
-	virDomainCreateLinux;
-	virDomainDestroy;
-	virDomainFree;
-	virDomainGetID;
-	virDomainGetInfo;
-	virDomainGetMaxMemory;
-	virDomainGetName;
-	virDomainGetOSType;
-	virDomainGetXMLDesc;
-	virDomainLookupByID;
-	virDomainLookupByName;
-	virDomainRestore;
-	virDomainResume;
-	virDomainSave;
-	virDomainSetMaxMemory;
-	virDomainShutdown;
-	virDomainSuspend;
-
-	virGetVersion;
-};
-
-LIBVIRT_0.0.5 {
-    global:
-	virDomainLookupByUUID;
-	virDomainGetUUID;
-} LIBVIRT_0.0.3;
-
-LIBVIRT_0.1.0 {
-    global:
-	virInitialize;
-	virNodeGetInfo;
-	virDomainReboot;
-
-	virCopyLastError;
-	virConnSetErrorFunc;
-	virResetLastError;
-	virResetError;
-	virConnGetLastError;
-	virGetLastError;
-	virSetErrorFunc;
-	virConnCopyLastError;
-	virConnResetLastError;
-	virDefaultErrorFunc;
-} LIBVIRT_0.0.5;
-
-LIBVIRT_0.1.1 {
-    global:
-	virDomainLookupByUUIDString;
-	virDomainGetUUIDString;
-	virDomainSetMemory;
-	virDomainDefineXML;
-	virDomainCreate;
-	virDomainUndefine;
-	virConnectListDefinedDomains;
-} LIBVIRT_0.1.0;
-
-LIBVIRT_0.1.4 {
-    global:
-	virDomainSetVcpus;
-	virDomainPinVcpu;
-	virDomainGetVcpus;
-} LIBVIRT_0.1.1;
-
-LIBVIRT_0.1.5 {
-    global:
-	virConnectNumOfDefinedDomains;
-} LIBVIRT_0.1.4;
-
-LIBVIRT_0.1.9 {
-    global:
-	virDomainCoreDump;
-	virDomainAttachDevice;
-	virDomainDetachDevice;
-} LIBVIRT_0.1.5;
-
-LIBVIRT_0.2.0 {
-    global:
-	virConnectNumOfNetworks;
-	virConnectListNetworks;
-	virConnectNumOfDefinedNetworks;
-	virConnectListDefinedNetworks;
-	virNetworkLookupByName;
-	virNetworkLookupByUUID;
-	virNetworkLookupByUUIDString;
-	virNetworkCreateXML;
-	virNetworkDefineXML;
-	virNetworkUndefine;
-	virNetworkCreate;
-	virNetworkDestroy;
-	virNetworkFree;
-	virNetworkGetName;
-	virNetworkGetUUID;
-	virNetworkGetUUIDString;
-	virNetworkGetXMLDesc;
-	virNetworkGetBridgeName;
-} LIBVIRT_0.1.9;
-
-LIBVIRT_0.2.1 {
-    global:
-	virConnectGetCapabilities;
-	virConnectGetMaxVcpus;
-	virDomainGetMaxVcpus;
-	virDomainGetAutostart;
-	virDomainSetAutostart;
-	virNetworkGetAutostart;
-	virNetworkSetAutostart;
-} LIBVIRT_0.2.0;
-
-LIBVIRT_0.2.3 {
-    global:
-	virDomainGetSchedulerType;
-	virDomainGetSchedulerParameters;
-	virDomainSetSchedulerParameters;
-} LIBVIRT_0.2.1;
-
-LIBVIRT_0.3.0 {
-    global:
-	virConnectGetHostname;
-	virConnectGetURI;
-	virDomainGetConnect;
-	virNetworkGetConnect;
-} LIBVIRT_0.2.3;
-
-LIBVIRT_0.3.2 {
-    global:
-	virDomainMigrate;
-	virDomainBlockStats;
-	virDomainInterfaceStats;
-} LIBVIRT_0.3.0;
-
-LIBVIRT_0.3.3 {
-    global:
-	virNodeGetCellsFreeMemory;
-	virNodeGetFreeMemory;
-} LIBVIRT_0.3.2;
-
-LIBVIRT_0.4.0 {
-    global:
-	virConnectOpenAuth;
-	virConnectAuthPtrDefault;
-} LIBVIRT_0.3.3;
-
-LIBVIRT_0.4.1 {
-    global:
-	virStoragePoolGetConnect;
-	virConnectNumOfStoragePools;
-	virConnectNumOfDefinedStoragePools;
-	virConnectListStoragePools;
-	virConnectListDefinedStoragePools;
-	virStoragePoolLookupByName;
-	virStoragePoolLookupByUUID;
-	virStoragePoolLookupByUUIDString;
-	virStoragePoolLookupByVolume;
-	virStoragePoolCreateXML;
-	virStoragePoolDefineXML;
-	virStoragePoolUndefine;
-	virStoragePoolCreate;
-	virStoragePoolBuild;
-	virStoragePoolDestroy;
-	virStoragePoolDelete;
-	virStoragePoolRefresh;
-	virStoragePoolFree;
-	virStoragePoolGetName;
-	virStoragePoolGetUUID;
-	virStoragePoolGetUUIDString;
-	virStoragePoolGetInfo;
-	virStoragePoolGetXMLDesc;
-	virStoragePoolSetAutostart;
-	virStoragePoolGetAutostart;
-	virStoragePoolNumOfVolumes;
-	virStoragePoolListVolumes;
-
-	virStorageVolGetConnect;
-	virStorageVolLookupByName;
-	virStorageVolLookupByKey;
-	virStorageVolLookupByPath;
-	virStorageVolCreateXML;
-	virStorageVolDelete;
-	virStorageVolFree;
-	virStorageVolGetName;
-	virStorageVolGetKey;
-	virStorageVolGetInfo;
-	virStorageVolGetXMLDesc;
-	virStorageVolGetPath;
-} LIBVIRT_0.4.0;
-
-LIBVIRT_0.4.2 {
-    global:
-	virDomainBlockPeek;
-	virDomainMemoryPeek;
-} LIBVIRT_0.4.1;
-
-LIBVIRT_0.4.5 {
-    global:
-	virConnectFindStoragePoolSources;
-} LIBVIRT_0.4.2;
-
-LIBVIRT_0.5.0 {
-    global:
-	virDomainCreateXML;
-	virEventRegisterImpl;
-	virConnectDomainEventRegister;
-	virConnectDomainEventDeregister;
-
-	virNodeNumOfDevices;
-	virNodeListDevices;
-	virNodeDeviceLookupByName;
-	virNodeDeviceFree;
-	virNodeDeviceGetXMLDesc;
-	virNodeDeviceGetName;
-	virNodeDeviceGetParent;
-	virNodeDeviceNumOfCaps;
-	virNodeDeviceListCaps;
-
-} LIBVIRT_0.4.5;
-
-# no new entry point in 0.5.1
-# .... define new API here using predicted next version number ....
-
-
-
-
-# Finally these symbols are private and semantics may change
-# on every release, hence the version number is spliced in at
-# build time. This ensures that if libvirtd, virsh, or a driver
-# module was built against one libvirt release, it will refuse
-# to load with another where symbols may have same names but
-# different semantics.
-#
-# No header files are provided outside the source tree.
-#
-# Keep this section ordered alphabetically by header file name
-#
-# Symbols here are only for use by virsh, libvirtd and dlopen
-# driver modules
-#
-LIBVIRT_PRIVATE_@VERSION@ {
-
-  global:
-	# bridge.h
-	brAddBridge;
-	brAddInterface;
-	brAddTap;
-	brDeleteBridge;
-	brInit;
-	brSetEnableSTP;
-	brSetForwardDelay;
-	brSetInetAddress;
-	brSetInetNetmask;
-	brSetInterfaceUp;
-	brShutdown;
-
-
-	# buf.h
-	virBufferVSprintf;
-	virBufferEscapeString;
-	virBufferAdd;
-	virBufferAddChar;
-	virBufferContentAndReset;
-	virBufferError;
-
-
-	# caps.h
-	virCapabilitiesAddGuest;
-	virCapabilitiesAddGuestDomain;
-	virCapabilitiesAddGuestFeature;
-	virCapabilitiesAddHostMigrateTransport;
-	virCapabilitiesAddHostNUMACell;
-	virCapabilitiesAddHostFeature;
-	virCapabilitiesDefaultGuestArch;
-	virCapabilitiesDefaultGuestEmulator;
-	virCapabilitiesDefaultGuestMachine;
-	virCapabilitiesFormatXML;
-	virCapabilitiesFree;
-	virCapabilitiesNew;
-	virCapabilitiesSetMacPrefix;
-
-
-	# conf.h
-	virConfNew;
-	virConfReadFile;
-	virConfReadMem;
-	virConfFree;
-	virConfFreeValue;
-	virConfGetValue;
-	virConfSetValue;
-	virConfWriteFile;
-	virConfWriteMem;
-
-
-	# datatypes.h
-	virGetDomain;
-	virGetNetwork;
-	virGetStoragePool;
-	virGetStorageVol;
-	virGetNodeDevice;
-	virUnrefDomain;
-
-
-	# domain_conf.h
-	virDiskNameToBusDeviceIndex;
-	virDiskNameToIndex;
-	virDomainAssignDef;
-	virDomainConfigFile;
-	virDomainCpuSetFormat;
-	virDomainCpuSetParse;
-	virDomainChrDefFree;
-	virDomainChrTypeFromString;
-	virDomainChrTypeToString;
-	virDomainDefDefaultEmulator;
-	virDomainDefFormat;
-	virDomainDefFree;
-	virDomainDefParseFile;
-	virDomainDefParseNode;
-	virDomainDefParseString;
-	virDomainDeleteConfig;
-	virDomainDeviceDefFree;
-	virDomainDeviceDefParse;
-	virDomainDiskBusTypeToString;
-	virDomainDiskDefFree;
-	virDomainDiskDeviceTypeToString;
-	virDomainDiskQSort;
-	virDomainFindByID;
-	virDomainFindByName;
-	virDomainFindByUUID;
-	virDomainGraphicsTypeFromString;
-	virDomainGraphicsDefFree;
-	virDomainInputDefFree;
-	virDomainLifecycleTypeFromString;
-	virDomainLifecycleTypeToString;
-	virDomainLoadAllConfigs;
-	virDomainNetDefFree;
-	virDomainObjFree;
-	virDomainObjListFree;
-	virDomainRemoveInactive;
-	virDomainSaveXML;
-	virDomainSaveConfig;
-	virDomainSoundDefFree;
-	virDomainSoundModelTypeFromString;
-	virDomainSoundModelTypeToString;
-	virDomainVirtTypeToString;
-	virDomainFSDefFree;
-	virDomainObjLock;
-	virDomainObjUnlock;
-
-
-	# domain_event.h
-	virDomainEventCallbackListAdd;
-	virDomainEventCallbackListFree;
-	virDomainEventCallbackListRemove;
-	virDomainEventCallbackListRemoveConn;
-	virDomainEventCallbackListMarkDelete;
-	virDomainEventCallbackListPurgeMarked;
-	virDomainEventQueueNew;
-	virDomainEventQueueFree;
-	virDomainEventQueuePop;
-	virDomainEventQueuePush;
-	virDomainEventNew;
-	virDomainEventNewFromDom;
-	virDomainEventNewFromObj;
-	virDomainEventNewFromDef;
-	virDomainEventFree;
-	virDomainEventDispatchDefaultFunc;
-	virDomainEventDispatch;
-	virDomainEventQueueDispatch;
-
-
-
-	# driver.h
-	virDriverLoadModule;
-
-
-	# event.h
-	virEventAddHandle;
-	virEventAddTimeout;
-	virEventRemoveHandle;
-	virEventRemoveTimeout;
-	virEventUpdateHandle;
-	virEventUpdateTimeout;
-
-
-	# hash.h
-	virHashAddEntry;
-	virHashCreate;
-	virHashForEach;
-	virHashFree;
-	virHashLookup;
-	virHashRemoveEntry;
-	virHashRemoveSet;
-	virHashSearch;
-	virHashSize;
-
-
-	# iptables.h
-	iptablesAddForwardAllowCross;
-	iptablesAddForwardAllowIn;
-	iptablesAddForwardAllowOut;
-	iptablesAddForwardAllowRelatedIn;
-	iptablesAddForwardMasquerade;
-	iptablesAddForwardRejectIn;
-	iptablesAddForwardRejectOut;
-	iptablesAddTcpInput;
-	iptablesAddUdpInput;
-	iptablesContextFree;
-	iptablesContextNew;
-	iptablesReloadRules;
-	iptablesRemoveForwardAllowCross;
-	iptablesRemoveForwardAllowIn;
-	iptablesRemoveForwardAllowOut;
-	iptablesRemoveForwardAllowRelatedIn;
-	iptablesRemoveForwardMasquerade;
-	iptablesRemoveForwardRejectIn;
-	iptablesRemoveForwardRejectOut;
-	iptablesRemoveTcpInput;
-	iptablesRemoveUdpInput;
-	iptablesSaveRules;
-
-
-	# libvirt_internal.h
-	debugFlag;
-	virStateInitialize;
-	virStateCleanup;
-	virStateReload;
-	virStateActive;
-	virDrvSupportsFeature;
-	virDomainMigratePrepare;
-	virDomainMigratePerform;
-	virDomainMigrateFinish;
-	virDomainMigratePrepare2;
-	virDomainMigrateFinish2;
-	virRegisterDriver;
-	virRegisterNetworkDriver;
-	virRegisterStateDriver;
-	virRegisterStorageDriver;
-	virRegisterDeviceMonitor;
-
-	/* logging.h */
-        virLogSetDefaultPriority;
-        virLogDefineFilter;
-        virLogDefineOutput;
-        virLogParseFilters;
-        virLogParseOutputs;
-        virLogStartup;
-        virLogShutdown;
-        virLogReset;
-        virLogMessage;
-
-	# memory.h
-	virAlloc;
-	virAllocN;
-	virReallocN;
-	virFree;
-
-
-	# network_conf.h
-	virNetworkAssignDef;
-	virNetworkDefFormat;
-	virNetworkDefFree;
-	virNetworkDefParseFile;
-	virNetworkDefParseNode;
-	virNetworkDefParseString;
-	virNetworkDeleteConfig;
-	virNetworkFindByName;
-	virNetworkFindByUUID;
-	virNetworkLoadAllConfigs;
-	virNetworkObjListFree;
-	virNetworkDefParseNode;
-	virNetworkRemoveInactive;
-	virNetworkSaveConfig;
-	virNetworkObjLock;
-	virNetworkObjUnlock;
-
-
-	# nodeinfo.h
-	virNodeInfoPopulate;
-	virCapsInitNUMA;
-
-
-	# node_device_conf.h
-	virNodeDeviceObjRemove;
-	virNodeDevCapTypeToString;
-	virNodeDeviceFindByName;
-	virNodeDeviceObjListFree;
-	virNodeDeviceDefFree;
-	virNodeDevCapsDefFree;
-	virNodeDeviceDefFormat;
-	virNodeDeviceObjLock;
-	virNodeDeviceObjUnlock;
-	virNodeDeviceAssignDef;
-
-
-	# qparams.h
-	qparam_get_query;
-	qparam_query_parse;
-	free_qparam_set;
-
-
-	# stats_linux.h
-	linuxDomainInterfaceStats;
-	xenLinuxDomainBlockStats;
-
-
-	# storage_backend.h
-	virStorageBackendForType;
-	virStorageBackendRunProgNul;
-	virStorageBackendRunProgRegex;
-	virStorageBackendStablePath;
-	virStorageBackendUpdateVolInfo;
-	virStorageBackendUpdateVolInfoFD;
-
-
-	# storage_conf.h
-	virStoragePoolDefFormat;
-	virStoragePoolDefFree;
-	virStoragePoolDefParse;
-	virStoragePoolLoadAllConfigs;
-	virStoragePoolObjAssignDef;
-	virStoragePoolObjClearVols;
-	virStoragePoolObjDeleteDef;
-	virStoragePoolObjFindByName;
-	virStoragePoolObjFindByUUID;
-	virStoragePoolObjListFree;
-	virStoragePoolObjRemove;
-	virStoragePoolObjSaveDef;
-	virStoragePoolSourceFree;
-	virStoragePoolSourceListFormat;
-	virStorageVolDefFindByKey;
-	virStorageVolDefFindByName;
-	virStorageVolDefFindByPath;
-	virStorageVolDefFormat;
-	virStorageVolDefFree;
-	virStorageVolDefParse;
-	virStoragePoolFormatDiskTypeToString;
-	virStoragePoolFormatFileSystemTypeToString;
-	virStoragePoolFormatFileSystemNetTypeToString;
-	virStorageVolFormatFileSystemTypeToString;
-	virStoragePoolTypeFromString;
-	virStoragePoolObjLock;
-	virStoragePoolObjUnlock;
-
-
-	# util.h
-	virFileReadAll;
-	virStrToLong_i;
-	virStrToLong_ll;
-	virStrToLong_ull;
-	virStrToLong_ui;
-	virFileLinkPointsTo;
-	saferead;
-	safewrite;
-	virMacAddrCompare;
-	virEnumFromString;
-	virEnumToString;
-	virEventAddHandle;
-	virEventRemoveHandle;
-	virExec;
-	virFormatMacAddr;
-	virParseMacAddr;
-	virFileDeletePid;
-	virFileExists;
-	virFileHasSuffix;
-	virFileLinkPointsTo;
-	virFileMakePath;
-	virFileOpenTty;
-	virFileReadLimFD;
-	virFilePid;
-	virFileReadPid;
-	virFileLinkPointsTo;
-	virParseNumber;
-	virAsprintf;
-	virRun;
-	virSkipSpaces;
-
-
-	# uuid.h
-	virUUIDFormat;
-	virUUIDGenerate;
-	virUUIDParse;
-
-
-	# virterror_internal.h
-	virReportErrorHelper;
-	virErrorMsg;
-	virRaiseError;
-
-
-	# xml.h
-	virXPathLong;
-	virXPathNode;
-	virXPathNodeSet;
-	virXPathString;
-	virXMLPropString;
-
-
-	# Finally everything else is totally private
-    local:
-	*;
-};
--
1.6.1.rc3.359.g43db1


>From ab53472203cb88ddf826dda1a367d1d6ac8b2838 Mon Sep 17 00:00:00 2001
From: john.levon@xxxxxxx <john.levon@xxxxxxx>
Date: Tue, 23 Dec 2008 17:46:20 +0100
Subject: [PATCH 2/5] Move --with-driver-modules symbols into a separate sym file

* src/Makefile.am (PRIVSYMFILES): Append libvirt_driver_modules.syms.
* src/libvirt_private.syms: Move virDriverLoadModule into...
* src/libvirt_driver_modules.syms: ... this new file.
Author: John Levon
---
 src/Makefile.am                 |    4 ++++
 src/libvirt_driver_modules.syms |    7 +++++++
 src/libvirt_private.syms        |    4 ----
 3 files changed, 11 insertions(+), 4 deletions(-)
 create mode 100644 src/libvirt_driver_modules.syms

diff --git a/src/Makefile.am b/src/Makefile.am
index 984c12a..29b4df6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -415,6 +415,10 @@ if ENABLE_DEBUG
 PRIVSYMFILES += libvirt_debug.syms
 endif

+if WITH_DRIVER_MODULES
+PRIVSYMFILES += libvirt_driver_modules.syms
+endif
+
 EXTRA_DIST += libvirt_public.syms $(PRIVSYMFILES)

 libvirt.syms: libvirt_public.syms $(PRIVSYMFILES)
diff --git a/src/libvirt_driver_modules.syms b/src/libvirt_driver_modules.syms
new file mode 100644
index 0000000..ce8d9b8
--- /dev/null
+++ b/src/libvirt_driver_modules.syms
@@ -0,0 +1,7 @@
+#
+# These symbols are dependent upon --with-driver-modules.
+#
+
+
+# driver.h
+virDriverLoadModule;
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index fb7b5f9..6f3cd67 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -131,10 +131,6 @@ virDomainEventDispatch;
 virDomainEventQueueDispatch;


-# driver.h
-virDriverLoadModule;
-
-
 # event.h
 virEventAddHandle;
 virEventAddTimeout;
--
1.6.1.rc3.359.g43db1


>From b3e42a27112bdd520fb3a9ccdb7ac2a84afd6b16 Mon Sep 17 00:00:00 2001
From: john.levon@xxxxxxx <john.levon@xxxxxxx>
Date: Tue, 23 Dec 2008 17:46:29 +0100
Subject: [PATCH 3/5] Move bridge symbols into a separate syms file

* configure.in: Provide a new --with-bridge option.
* src/Makefile.am (PRIVSYMFILES) [WITH_BRIDGE]: Append libvirt_bridge.syms.
* src/bridge.c: Test WITH_BRIDGE rather than particular drivers.
* src/libvirt_private.syms: Move bridge-related symbols into...
* src/libvirt_bridge.syms: ...this new file.
Author: John Levon
---
 configure.in             |    7 +++++++
 src/Makefile.am          |    4 ++++
 src/bridge.c             |    4 ++--
 src/libvirt_bridge.syms  |   18 ++++++++++++++++++
 src/libvirt_private.syms |   14 --------------
 5 files changed, 31 insertions(+), 16 deletions(-)
 create mode 100644 src/libvirt_bridge.syms

diff --git a/configure.in b/configure.in
index 3358cff..96f288e 100644
--- a/configure.in
+++ b/configure.in
@@ -275,6 +275,13 @@ if test "$with_qemu" = "yes" ; then
 fi
 AM_CONDITIONAL([WITH_QEMU], [test "$with_qemu" = "yes"])

+with_bridge=no
+if test "$with_qemu" = "yes" -o "$with_lxc" = "yes"; then
+    with_bridge=yes
+    AC_DEFINE_UNQUOTED([WITH_BRIDGE], 1, [whether bridge code is needed])
+fi
+AM_CONDITIONAL([WITH_BRIDGE], [test "$with_bridge" = "yes"])
+
 if test "$with_uml" = "yes" ; then
     AC_DEFINE_UNQUOTED([WITH_UML], 1, [whether UML driver is enabled])
 fi
diff --git a/src/Makefile.am b/src/Makefile.am
index 29b4df6..ccc6b5f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -419,6 +419,10 @@ if WITH_DRIVER_MODULES
 PRIVSYMFILES += libvirt_driver_modules.syms
 endif

+if WITH_BRIDGE
+PRIVSYMFILES += libvirt_bridge.syms
+endif
+
 EXTRA_DIST += libvirt_public.syms $(PRIVSYMFILES)

 libvirt.syms: libvirt_public.syms $(PRIVSYMFILES)
diff --git a/src/bridge.c b/src/bridge.c
index 13d81bc..38e0b46 100644
--- a/src/bridge.c
+++ b/src/bridge.c
@@ -21,7 +21,7 @@

 #include <config.h>

-#if defined(WITH_QEMU) || defined(WITH_LXC)
+#if defined(WITH_BRIDGE)

 #include "bridge.h"

@@ -750,4 +750,4 @@ brSetEnableSTP(brControl *ctl ATTRIBUTE_UNUSED,
     return 0;
 }

-#endif /* WITH_QEMU || WITH_LXC */
+#endif /* WITH_BRIDGE */
diff --git a/src/libvirt_bridge.syms b/src/libvirt_bridge.syms
new file mode 100644
index 0000000..f898f42
--- /dev/null
+++ b/src/libvirt_bridge.syms
@@ -0,0 +1,18 @@
+#
+# These symbols are dependent upon --with-qemu or --with-lxc via
+# WITH_BRIDGE.
+#
+
+
+# bridge.h
+brAddBridge;
+brAddInterface;
+brAddTap;
+brDeleteBridge;
+brInit;
+brSetEnableSTP;
+brSetForwardDelay;
+brSetInetAddress;
+brSetInetNetmask;
+brSetInterfaceUp;
+brShutdown;
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 6f3cd67..d5451c3 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -3,20 +3,6 @@
 #


-# bridge.h
-brAddBridge;
-brAddInterface;
-brAddTap;
-brDeleteBridge;
-brInit;
-brSetEnableSTP;
-brSetForwardDelay;
-brSetInetAddress;
-brSetInetNetmask;
-brSetInterfaceUp;
-brShutdown;
-
-
 # buf.h
 virBufferVSprintf;
 virBufferEscapeString;
--
1.6.1.rc3.359.g43db1


>From 38b60934f442b342cf53ed59ef9a13dbe9970688 Mon Sep 17 00:00:00 2001
From: john.levon@xxxxxxx <john.levon@xxxxxxx>
Date: Tue, 23 Dec 2008 17:46:33 +0100
Subject: [PATCH 4/5] migrate linux-specific symbol names into their own sym file

* configure.in (WITH_LINUX): New automake conditional.
* src/Makefile.am (PRIVSYMFILES) [WITH_LINUX]: Append libvirt_linux.syms.
* src/libvirt_private.syms: Move two symbol names into...
* src/libvirt_linux.syms: ...this new file.
Author: John Levon
---
 configure.in             |    2 ++
 src/Makefile.am          |    4 ++++
 src/libvirt_linux.syms   |    8 ++++++++
 src/libvirt_private.syms |    5 -----
 4 files changed, 14 insertions(+), 5 deletions(-)
 create mode 100644 src/libvirt_linux.syms

diff --git a/configure.in b/configure.in
index 96f288e..c333cc4 100644
--- a/configure.in
+++ b/configure.in
@@ -1248,6 +1248,8 @@ then
 fi
 AM_CONDITIONAL([WITH_NODE_DEVICES], [test "$with_nodedev" = "yes"])

+AM_CONDITIONAL([WITH_LINUX], [test `uname -s` = "Linux"])
+
 # Only COPYING.LIB is under version control, yet COPYING
 # is included as part of the distribution tarball.
 # Copy one to the other, but only if this is a srcdir-build.
diff --git a/src/Makefile.am b/src/Makefile.am
index ccc6b5f..1f707e2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -423,6 +423,10 @@ if WITH_BRIDGE
 PRIVSYMFILES += libvirt_bridge.syms
 endif

+if WITH_LINUX
+PRIVSYMFILES += libvirt_linux.syms
+endif
+
 EXTRA_DIST += libvirt_public.syms $(PRIVSYMFILES)

 libvirt.syms: libvirt_public.syms $(PRIVSYMFILES)
diff --git a/src/libvirt_linux.syms b/src/libvirt_linux.syms
new file mode 100644
index 0000000..018c892
--- /dev/null
+++ b/src/libvirt_linux.syms
@@ -0,0 +1,8 @@
+#
+# Linux-specific private symbols.
+#
+
+
+# stats_linux.h
+linuxDomainInterfaceStats;
+xenLinuxDomainBlockStats;
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index d5451c3..14c5944 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -231,11 +231,6 @@ qparam_query_parse;
 free_qparam_set;


-# stats_linux.h
-linuxDomainInterfaceStats;
-xenLinuxDomainBlockStats;
-
-
 # storage_backend.h
 virStorageBackendForType;
 virStorageBackendRunProgNul;
--
1.6.1.rc3.359.g43db1


>From dd96dc83b9210fb7e3364818944de0dbb50c9fef Mon Sep 17 00:00:00 2001
From: john.levon@xxxxxxx <john.levon@xxxxxxx>
Date: Tue, 23 Dec 2008 17:46:35 +0100
Subject: [PATCH 5/5] Remove storage backend symbols from version script

* src/libvirt_private.syms: Remove virStorageBackend* symbol names.
They're linked into qemud, not libvirt.
Author: John Levon
---
 src/libvirt_private.syms |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 14c5944..90bcc68 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -231,15 +231,6 @@ qparam_query_parse;
 free_qparam_set;


-# storage_backend.h
-virStorageBackendForType;
-virStorageBackendRunProgNul;
-virStorageBackendRunProgRegex;
-virStorageBackendStablePath;
-virStorageBackendUpdateVolInfo;
-virStorageBackendUpdateVolInfoFD;
-
-
 # storage_conf.h
 virStoragePoolDefFormat;
 virStoragePoolDefFree;
--
1.6.1.rc3.359.g43db1

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