Fix registration bug and endianness issues.
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 15 Oct 2008 10:18:22 +0000 (11:18 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 15 Oct 2008 10:18:22 +0000 (11:18 +0100)
libvirt/mingw32-libvirt-0.4.6-debug-registration.patch [new file with mode: 0644]
libvirt/mingw32-libvirt-0.4.6-register-remote.patch [new file with mode: 0644]
libvirt/mingw32-libvirt.spec

diff --git a/libvirt/mingw32-libvirt-0.4.6-debug-registration.patch b/libvirt/mingw32-libvirt-0.4.6-debug-registration.patch
new file mode 100644 (file)
index 0000000..180f195
--- /dev/null
@@ -0,0 +1,12 @@
+--- libvirt-0.4.6/src/libvirt.c.orig   2008-09-22 14:12:12.000000000 +0100
++++ libvirt-0.4.6/src/libvirt.c        2008-10-14 15:30:56.000000000 +0100
+@@ -540,6 +540,9 @@
+         return -1;
+     }
++    DEBUG ("registering %s as driver %d",
++           driver->name, virDriverTabCount);
++
+     virDriverTab[virDriverTabCount] = driver;
+     return virDriverTabCount++;
+ }
diff --git a/libvirt/mingw32-libvirt-0.4.6-register-remote.patch b/libvirt/mingw32-libvirt-0.4.6-register-remote.patch
new file mode 100644 (file)
index 0000000..4d0d77d
--- /dev/null
@@ -0,0 +1,14 @@
+--- libvirt-0.4.6/src/libvirt.c.orig   2008-10-14 15:33:00.000000000 +0100
++++ libvirt-0.4.6/src/libvirt.c        2008-10-14 15:48:54.000000000 +0100
+@@ -297,10 +297,10 @@
+     if (lxcRegister() == -1) return -1;
+ #endif
+     if (storageRegister() == -1) return -1;
++#endif
+ #ifdef WITH_REMOTE
+     if (remoteRegister () == -1) return -1;
+ #endif
+-#endif
+     return(0);
+ }
index 02719da..78c353e 100644 (file)
@@ -6,7 +6,7 @@
 
 Name:           mingw32-libvirt
 Version:        0.4.6
-Release:        4%{?dist}%{?extra_release}
+Release:        6%{?dist}%{?extra_release}
 Summary:        MinGW Windows libvirt virtualization library
 
 License:        LGPLv2+
@@ -15,6 +15,9 @@ URL:            http://libvirt.org/
 Source0:        ftp://libvirt.org/libvirt/libvirt-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+Patch0:         mingw32-libvirt-0.4.6-debug-registration.patch
+Patch1:         mingw32-libvirt-0.4.6-register-remote.patch
+
 BuildRequires:  mingw32-filesystem >= 23
 BuildRequires:  mingw32-gcc
 BuildRequires:  mingw32-binutils
@@ -23,7 +26,8 @@ BuildRequires:  mingw32-libgcrypt
 BuildRequires:  mingw32-gnutls
 BuildRequires:  mingw32-gettext
 BuildRequires:  mingw32-libxml2
-BuildRequires:  mingw32-portablexdr
+# Portable XDR <= 4.0.10 contains a serious endianness bug on Windows.
+BuildRequires:  mingw32-portablexdr >= 4.0.11
 BuildRequires:  mingw32-readline
 BuildRequires:  pkgconfig
 # Need native version for msgfmt
@@ -38,6 +42,8 @@ MinGW Windows libvirt virtualization library.
 
 %prep
 %setup -q -n libvirt-%{version}
+%patch0 -p1
+%patch1 -p1
 
 
 %build
@@ -90,6 +96,11 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Wed Oct 15 2008 Richard Jones <rjones@redhat.com> - 0.4.6-6
+- Add patches from
+  https://www.redhat.com/archives/libvir-list/2008-October/msg00328.html
+- BR mingw32-portablexdr >= 4.0.11 to fix serious Windows endianness bug.
+
 * Tue Oct 14 2008 Richard Jones <rjones@redhat.com> - 0.4.6-4
 - +BR mingw32-readline.